html_url stringlengths 48 51 | title stringlengths 5 280 | comments stringlengths 63 51.8k | body stringlengths 0 36.2k ⌀ | comment_length int64 16 1.52k | text stringlengths 159 54.1k | embeddings listlengths 768 768 |
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/4525 | Out of memory error on workers while running Beam+Dataflow | @albertvillanova Since we have already processed the NQ dataset on our machines can we upload it to datasets so the NQ PR can be merged? | ## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
| 25 | Out of memory error on workers while running Beam+Dataflow
## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
@albertvillanova Since we have already processed the NQ dataset on our machines can we upload it to datasets so the NQ PR can be merged? | [
-0.3179207444190979,
-0.12448765337467194,
-0.04219004511833191,
0.325805127620697,
0.3414510488510132,
-0.14221429824829102,
-0.09138506650924683,
0.4362598657608032,
-0.1771542876958847,
0.3672865331172943,
0.2916374206542969,
0.17966338992118835,
-0.20729193091392517,
0.29709017276763916,
0.017125552520155907,
-0.26205524802207947,
-0.06626906245946884,
-0.005221329629421234,
-0.35569286346435547,
-0.09661632776260376,
-0.29713374376296997,
-0.03457030653953552,
-0.11048303544521332,
-0.07314218580722809,
-0.11726446449756622,
0.05389855057001114,
0.107256218791008,
0.4139477610588074,
-0.07015205174684525,
-0.22861814498901367,
-0.06279042363166809,
-0.11586974561214447,
0.07130087167024612,
0.3142407536506653,
-0.00012188479740871117,
-0.06275603175163269,
0.43871384859085083,
0.06228065490722656,
-0.2059805542230606,
-0.053728193044662476,
-0.032909903675317764,
-0.3655340373516083,
-0.12045765668153763,
0.0588950589299202,
0.014400869607925415,
-0.5790768265724182,
0.1763344556093216,
-0.3162025809288025,
0.32520565390586853,
0.5608006715774536,
0.07473074644804001,
0.08038074523210526,
0.26977866888046265,
0.18152792751789093,
0.21284112334251404,
-0.035108864307403564,
-0.05375117063522339,
0.2698899507522583,
0.23745004832744598,
-0.36455461382865906,
0.21583408117294312,
0.1666087955236435,
0.19662989675998688,
-0.010068289935588837,
0.2543727159500122,
-0.15034779906272888,
0.2740083932876587,
-0.5025782585144043,
0.2648738622665405,
0.27127495408058167,
0.20192527770996094,
-0.24250200390815735,
0.13461948931217194,
-0.3733041286468506,
0.17644301056861877,
-0.24762408435344696,
0.26927417516708374,
0.363773912191391,
-0.48760128021240234,
-0.1214117556810379,
-0.527358889579773,
-0.2158638834953308,
-0.08068926632404327,
0.32597994804382324,
0.18513250350952148,
0.021651439368724823,
-0.11677226424217224,
0.24219956994056702,
0.3242601454257965,
-0.05004183202981949,
0.6149072051048279,
-0.1527658849954605,
0.07137956470251083,
-0.0858222022652626,
-0.4351768493652344,
-0.08971680700778961,
0.16071264445781708,
-0.21966049075126648,
0.20741817355155945,
-0.08452196419239044,
-0.38217106461524963,
-0.03140607476234436,
0.19613908231258392,
-0.1683107316493988,
0.46027299761772156,
0.27587223052978516,
-0.09481551498174667,
0.14077620208263397,
0.019949819892644882,
-0.00581202981993556,
-0.2708378732204437,
-0.17453786730766296,
0.027956970036029816,
-0.6094490885734558,
-0.1337055265903473,
-0.06845298409461975,
0.3605669140815735,
0.012115519493818283,
0.09540955722332001,
0.0868021622300148,
-0.093608058989048,
0.22808872163295746,
0.1541600078344345,
0.44920772314071655,
-0.00322737917304039,
0.607182502746582,
-0.12736567854881287,
0.12570618093013763,
-0.14646433293819427,
-0.2800045609474182,
-0.17747578024864197,
0.14299921691417694,
-0.5383463501930237,
-0.052086926996707916,
0.09608694911003113,
-0.22970297932624817,
0.28036871552467346,
-0.07943695783615112,
0.185634046792984,
-0.6217135787010193,
0.26869991421699524,
-0.3050214350223541,
0.07617375999689102,
0.1886168122291565,
-0.04756659269332886,
0.13873916864395142,
-0.15060019493103027,
0.33828508853912354,
0.155306875705719,
0.4130154252052307,
-0.33169934153556824,
-0.7142782211303711,
-0.040441691875457764,
0.09067296236753464,
-0.0037189647555351257,
0.3584856390953064,
-0.0006031841039657593,
-0.07530361413955688,
0.3249034285545349,
0.17882969975471497,
-0.0960165485739708,
-0.46915435791015625,
-0.10934779047966003,
-0.09721139818429947,
0.1579122692346573,
0.37736332416534424,
-0.02293841913342476,
0.2762838304042816,
-0.0012996091973036528,
0.014649532735347748,
0.4374241828918457,
0.055641256272792816,
-0.16527530550956726,
0.2267512083053589,
-0.23394489288330078,
-0.37913817167282104,
0.30407992005348206,
-0.06622273474931717,
-0.1390976756811142,
0.3959626257419586,
0.0697285383939743,
-0.02550649829208851,
-0.2382306456565857,
-0.008316563442349434,
-0.0660979226231575,
0.1560378223657608,
0.13027174770832062,
0.23189659416675568,
-0.26230764389038086,
0.2058728188276291,
-0.3505077660083771,
-0.226212278008461,
-0.0532601922750473,
0.11262011528015137,
0.4177105128765106,
-0.03323926031589508,
-0.10219716280698776,
0.02221592143177986,
0.17187991738319397,
0.002568911761045456,
0.09755370020866394,
0.3538062572479248,
-0.15176540613174438,
0.03860051557421684,
-0.03053358569741249,
-0.26037362217903137,
-0.20436838269233704,
0.11721762269735336,
-0.06657639145851135,
-0.06184414029121399,
0.4010004997253418,
0.18008694052696228,
-0.23906871676445007,
0.07861257344484329,
-0.04575689509510994,
-0.17490960657596588,
-0.006956348195672035,
0.10201163589954376,
-0.3647189736366272,
-0.2568778991699219,
-0.13745971024036407,
0.11535358428955078,
-0.8277051448822021,
0.01479681208729744,
-0.15473808348178864,
0.2829660475254059,
-0.08613631874322891,
-0.3054013252258301,
-0.09589666873216629,
0.14147748053073883,
0.029285842552781105,
0.2161426991224289,
-0.1751239001750946,
0.37610214948654175,
-0.0974125787615776,
0.15250878036022186,
-0.21832984685897827,
0.3186455965042114,
0.03383171558380127,
-0.1786680817604065,
0.14609360694885254,
-0.28511470556259155,
-0.14663255214691162,
0.2432989478111267,
0.16593188047409058,
-0.1597050279378891,
-0.07662296295166016,
0.2198808491230011,
0.20292456448078156,
0.17965476214885712,
-0.0944797694683075,
-0.10465781390666962,
0.30119359493255615,
0.0668242871761322,
0.24652253091335297,
-0.09825518727302551,
0.010600287467241287,
0.046045925468206406,
-0.35290083289146423,
-0.07801563292741776,
0.48210951685905457,
0.11903609335422516,
-0.03786931931972504,
0.02002396620810032,
-0.20588085055351257,
-0.17741256952285767,
0.2964673638343811,
0.2819262742996216,
0.5339245200157166,
0.07711436599493027,
0.1697365939617157,
0.2081507444381714,
0.10197629779577255,
-0.06834035366773605,
0.16766248643398285,
0.10936591029167175,
0.576978862285614,
0.3514205813407898,
0.10978326201438904,
-0.09700020402669907,
-0.1171187087893486,
0.027422692626714706,
0.36047786474227905,
0.41848790645599365,
-0.38697290420532227,
-0.0756634846329689,
-0.09720806032419205,
-0.11971508711576462,
-0.32956770062446594,
0.33069226145744324,
-0.12090738117694855,
-0.25416773557662964,
-0.11144240200519562,
0.06111188977956772,
-0.3849814832210541,
0.04288603365421295,
0.2994481325149536,
0.05973871052265167,
0.04126270115375519,
-0.01608896441757679,
0.031848445534706116,
-0.03999509662389755,
-0.037078142166137695,
-0.09253956377506256,
0.36462825536727905,
-0.14720851182937622,
0.18976490199565887,
0.256786972284317,
-0.28692173957824707,
-0.17057746648788452,
0.10487080365419388,
0.26744091510772705,
0.3569685220718384,
0.5967714190483093,
-0.09184741973876953,
0.3900044560432434,
0.13155756890773773,
-0.04119276627898216,
0.1388920098543167,
-0.06693685054779053,
-0.021814581006765366,
-0.14928142726421356,
0.14716382324695587,
0.18394847214221954,
-0.3534565567970276,
-0.5560477375984192,
-0.058566972613334656,
-0.43790310621261597,
0.101499542593956,
-0.15147554874420166,
0.03690805286169052,
0.07629907876253128,
0.4020797312259674,
-0.2050609290599823,
0.10263974964618683,
0.0924692377448082,
-0.07129118591547012,
-0.28510358929634094,
-0.14817975461483002,
-0.11888288706541061,
-0.05189964547753334,
-0.01140923798084259,
0.1653687208890915,
0.12481328845024109,
0.37369227409362793,
-0.5742104649543762,
-0.037167664617300034,
-0.29506823420524597,
-0.21038177609443665,
-0.28057268261909485,
-0.06426627188920975,
0.33693233132362366,
-0.05777492746710777,
0.006412407383322716,
0.06137534976005554,
0.01364731416106224,
0.02398598939180374,
0.04759296402335167,
0.28497493267059326,
0.2467295229434967,
0.2743972837924957,
0.02631485089659691,
0.7497295141220093,
-0.02383672446012497,
0.180414080619812,
0.08029916137456894,
-0.17573976516723633,
0.45122283697128296,
0.14867770671844482,
-0.10184108465909958,
0.6407608985900879,
0.0993366688489914,
-0.1402498185634613,
-0.10927200317382812,
0.042149245738983154,
-0.20272491872310638,
-0.13068705797195435,
-0.005087606608867645,
-0.19248217344284058,
-0.1457650363445282,
0.3520159423351288,
-0.3024119436740875,
0.3199042081832886,
0.1387394219636917,
0.05951957404613495,
-0.003127962350845337,
-0.20976004004478455,
-0.16487646102905273,
-0.12306943535804749,
-0.09784769266843796,
0.02295016497373581,
-0.05880327522754669,
-0.1668565273284912,
-0.3072408437728882,
0.043387435376644135,
-0.04851285740733147,
0.377621591091156,
-0.05635245144367218,
0.11679025739431381,
-0.008995912969112396,
-0.09572048485279083,
0.6420639753341675,
-0.300699919462204,
-0.10198019444942474,
-0.17174240946769714,
-0.27291440963745117,
-0.031083907932043076,
-0.20603224635124207,
0.02587156370282173,
-0.024333711713552475,
0.22242970764636993,
0.21765604615211487,
0.024713225662708282,
-0.35649386048316956,
0.3609442710876465,
-0.008644714951515198,
-0.1827370673418045,
-0.2881239950656891,
-0.04056002199649811,
-0.16853652894496918,
-0.2989383041858673,
-0.035491250455379486,
-0.10998135805130005,
0.13431625068187714,
-0.3868103623390198,
-0.08320575952529907,
0.07579367607831955,
0.15907907485961914,
0.13825610280036926,
-0.01894081011414528,
0.27103209495544434,
-0.20169182121753693,
0.11963893473148346,
0.05555882304906845,
0.24973663687705994,
0.24216915667057037,
0.19351127743721008,
0.11548183858394623,
-0.0036143958568573,
0.11059272289276123,
0.1066933199763298,
0.2411734163761139,
0.5215757489204407,
-0.20765995979309082,
-0.2883319556713104,
0.020866218954324722,
0.3867443799972534,
-0.2595761716365814,
0.4780765473842621,
0.3917366862297058,
0.17419686913490295,
-0.005110675934702158,
-0.34141722321510315,
0.044449128210544586,
0.13327233493328094,
-0.053830064833164215,
0.3611895442008972,
-0.24300526082515717,
-0.20356550812721252,
0.10210054367780685,
0.3517509400844574,
1.1873949766159058,
-0.2560913562774658,
0.013052672147750854,
0.1647394895553589,
-0.30053073167800903,
0.6263619661331177,
-0.625778079032898,
0.2518238127231598,
-0.26333335041999817,
-0.3297612965106964,
0.1888357549905777,
-0.2192295342683792,
-0.002086736261844635,
-0.015976399183273315,
0.16008496284484863,
0.3508228063583374,
0.1531193107366562,
0.1187235563993454,
-0.08072347193956375,
0.2111988067626953,
-0.19023500382900238,
-0.05563958361744881,
-0.19482015073299408,
0.047927454113960266,
-0.2505906820297241,
-0.015919972211122513,
-0.30737945437431335,
0.09169749915599823,
0.22449761629104614,
0.021404743194580078,
-0.3516777753829956,
0.25864627957344055,
-0.30154821276664734,
-0.11288443207740784,
-0.024361006915569305,
-0.1529855728149414,
0.1045917272567749,
0.5068589448928833,
0.2185697704553604,
0.33337265253067017,
-0.08062941581010818,
0.40471675992012024,
0.018613319844007492,
-0.17460957169532776,
0.1528114676475525,
0.12573722004890442,
0.407822847366333,
-0.23510423302650452,
-0.4662654399871826,
0.05772173032164574,
-0.22224077582359314,
0.03516865521669388,
-0.38480859994888306,
0.081668920814991,
0.16467244923114777,
-0.18538159132003784,
-0.32259640097618103,
0.21704980731010437,
-0.0774097591638565,
-0.001583382487297058,
0.0892888754606247,
-0.019572943449020386,
-0.2598622143268585,
0.18757811188697815,
-0.24570603668689728,
-0.35194796323776245,
-0.02870432659983635,
-0.15702331066131592,
0.37778788805007935,
-0.2217346578836441,
0.5133670568466187,
0.21774078905582428,
0.06077555567026138,
-0.1719810664653778,
-0.13404661417007446,
0.40282341837882996,
-0.42648348212242126,
0.08628234267234802,
-0.018437162041664124,
-0.2969436049461365,
0.04750003665685654,
-0.14471614360809326,
-0.04759429395198822,
0.2825298607349396,
0.05756788328289986,
-0.21744365990161896,
-0.3293708562850952,
0.13833662867546082,
-0.3302876055240631,
0.36616313457489014,
-0.19536885619163513,
0.28609195351600647,
-0.005943732336163521,
-0.08717446029186249,
-0.21075521409511566,
0.06397361308336258,
-0.42249080538749695,
0.2527047395706177,
-0.06691496819257736,
0.037265803664922714,
0.09308962523937225,
-0.1990072876214981,
-0.0715906023979187,
0.0023613926023244858,
-0.16823691129684448,
-0.11563581228256226,
0.12576355040073395,
0.14029264450073242,
-0.025738965719938278,
-0.34145694971084595,
-0.0205155648291111,
-0.5516072511672974,
-0.13324251770973206,
-0.18896348774433136,
0.19231480360031128,
-0.0932830274105072,
-0.12948743999004364,
0.0674365758895874,
-0.05566702410578728,
0.25432005524635315,
0.10819727182388306,
0.42037302255630493,
0.07664119452238083,
0.4934372305870056,
-0.10158327221870422,
0.2945255637168884,
0.29345738887786865,
-0.041786450892686844,
-0.42612433433532715,
-0.011092975735664368,
-0.024180784821510315,
0.23524150252342224,
0.10725151002407074,
-0.2775578498840332,
-0.16204608976840973,
-0.053276777267456055,
0.2861033082008362,
0.4138427972793579,
-0.23306837677955627,
0.146237313747406,
0.34753748774528503,
0.13508032262325287,
0.07833971083164215,
0.22168685495853424,
0.33784645795822144,
0.003028303850442171,
-0.0667118951678276,
0.005376338958740234,
0.08287031948566437,
-0.11304350197315216,
-0.13126204907894135,
0.2187248170375824,
-0.27842092514038086,
-0.5897895097732544,
0.00042368099093437195,
0.014626946300268173,
-0.056450262665748596,
-0.12236489355564117,
-0.0013479441404342651,
0.12530817091464996,
0.14009372889995575,
0.7140223383903503,
0.11960773169994354,
0.18026210367679596,
0.32365965843200684,
0.21127372980117798,
-0.015298672020435333,
-0.45878127217292786,
-0.2097761183977127,
0.5016226768493652,
-0.2853482961654663,
0.23913869261741638,
-0.2798146605491638,
0.022403918206691742,
0.22009502351284027,
-0.3724938631057739,
-0.03787325322628021,
0.1936887949705124,
-0.2706792652606964,
0.038121797144412994,
-0.29689574241638184,
-0.11415412276983261,
-0.04193955659866333,
0.230354905128479,
0.2111303061246872,
-0.276108980178833,
0.20923291146755219,
0.13155284523963928,
-0.41753292083740234,
-0.01957881636917591,
0.28620675206184387,
0.36564937233924866,
-0.03545915335416794,
-0.404375821352005,
0.15768000483512878,
0.11825551837682724,
-0.07216836512088776,
-0.11964535713195801,
0.29820477962493896,
0.47275474667549133,
0.4340927302837372,
-0.22080668807029724,
0.05388457700610161,
0.47984087467193604,
0.047490693628787994,
-0.2682685852050781,
0.04548002406954765,
0.46884146332740784,
0.5673755407333374,
0.11229319870471954,
0.11769168078899384,
-0.05809282138943672,
-0.055296484380960464,
0.34776026010513306,
0.3328334093093872,
-0.3607565462589264,
-0.05689644068479538,
0.097407765686512,
-0.22215485572814941,
-0.16654007136821747,
0.04301707074046135,
-0.34958335757255554,
-0.06010240316390991,
0.47086891531944275,
-0.06964875012636185,
0.2441125214099884,
0.0441695936024189,
0.023393332958221436,
-0.19039396941661835,
0.45347529649734497,
0.20711052417755127,
0.292917400598526,
-0.4905242323875427,
-0.4067947268486023,
-0.30933231115341187,
0.04232364147901535,
-0.09486755728721619,
0.24090924859046936,
0.23384852707386017,
0.2883282005786896,
-0.10818088799715042,
-0.32197409868240356,
-0.27338141202926636,
-0.06440094858407974,
0.09485878795385361,
0.3143032193183899,
-0.38965904712677,
-0.42241427302360535,
-0.0865737795829773,
0.09856484085321426,
0.3361666202545166,
-0.2893314063549042,
0.12364637851715088,
-0.21641206741333008,
-0.20058193802833557,
0.2649870812892914,
0.21116748452186584,
-0.043314892798662186,
-0.07020630687475204,
0.30581146478652954,
0.10352607071399689,
0.3858698010444641,
0.10868262499570847,
-0.29201656579971313,
-0.4035603106021881,
-0.4986024498939514,
-0.21533772349357605,
-0.056619398295879364,
-0.0025109685957431793,
0.24292710423469543,
-0.3103574812412262,
0.270866334438324,
-0.2856939435005188,
-0.14194855093955994,
-0.032260917127132416,
0.30050626397132874,
-0.016372621059417725,
-0.19375090301036835,
0.20532333850860596,
0.19772933423519135,
0.24480412900447845,
0.2973262667655945,
-0.06112440675497055,
-0.006612565368413925,
-0.3463704586029053,
-0.1477833092212677,
0.42900025844573975,
0.0910186618566513,
-0.3435969352722168,
-0.2823697328567505,
0.08761527389287949,
0.17529022693634033,
-0.0303731020539999,
-0.47166335582733154,
-0.022052429616451263,
0.13011808693408966,
0.14728863537311554,
-0.2639214098453522,
0.05785626918077469,
-0.35397693514823914,
0.1769774705171585,
0.06097136810421944,
0.1225929707288742,
-0.01870589330792427,
-0.2262902408838272,
0.15499339997768402,
-0.08807773888111115
] |
https://github.com/huggingface/datasets/issues/4525 | Out of memory error on workers while running Beam+Dataflow | Maybe @lhoestq can give a more accurate answer as I am not sure about the authentication requirements to upload those files to our cloud bucket.
Anyway I propose to continue this discussion on the dedicated PR for Natural questions dataset:
- #4368 | ## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
| 42 | Out of memory error on workers while running Beam+Dataflow
## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
Maybe @lhoestq can give a more accurate answer as I am not sure about the authentication requirements to upload those files to our cloud bucket.
Anyway I propose to continue this discussion on the dedicated PR for Natural questions dataset:
- #4368 | [
-0.3179207444190979,
-0.12448765337467194,
-0.04219004511833191,
0.325805127620697,
0.3414510488510132,
-0.14221429824829102,
-0.09138506650924683,
0.4362598657608032,
-0.1771542876958847,
0.3672865331172943,
0.2916374206542969,
0.17966338992118835,
-0.20729193091392517,
0.29709017276763916,
0.017125552520155907,
-0.26205524802207947,
-0.06626906245946884,
-0.005221329629421234,
-0.35569286346435547,
-0.09661632776260376,
-0.29713374376296997,
-0.03457030653953552,
-0.11048303544521332,
-0.07314218580722809,
-0.11726446449756622,
0.05389855057001114,
0.107256218791008,
0.4139477610588074,
-0.07015205174684525,
-0.22861814498901367,
-0.06279042363166809,
-0.11586974561214447,
0.07130087167024612,
0.3142407536506653,
-0.00012188479740871117,
-0.06275603175163269,
0.43871384859085083,
0.06228065490722656,
-0.2059805542230606,
-0.053728193044662476,
-0.032909903675317764,
-0.3655340373516083,
-0.12045765668153763,
0.0588950589299202,
0.014400869607925415,
-0.5790768265724182,
0.1763344556093216,
-0.3162025809288025,
0.32520565390586853,
0.5608006715774536,
0.07473074644804001,
0.08038074523210526,
0.26977866888046265,
0.18152792751789093,
0.21284112334251404,
-0.035108864307403564,
-0.05375117063522339,
0.2698899507522583,
0.23745004832744598,
-0.36455461382865906,
0.21583408117294312,
0.1666087955236435,
0.19662989675998688,
-0.010068289935588837,
0.2543727159500122,
-0.15034779906272888,
0.2740083932876587,
-0.5025782585144043,
0.2648738622665405,
0.27127495408058167,
0.20192527770996094,
-0.24250200390815735,
0.13461948931217194,
-0.3733041286468506,
0.17644301056861877,
-0.24762408435344696,
0.26927417516708374,
0.363773912191391,
-0.48760128021240234,
-0.1214117556810379,
-0.527358889579773,
-0.2158638834953308,
-0.08068926632404327,
0.32597994804382324,
0.18513250350952148,
0.021651439368724823,
-0.11677226424217224,
0.24219956994056702,
0.3242601454257965,
-0.05004183202981949,
0.6149072051048279,
-0.1527658849954605,
0.07137956470251083,
-0.0858222022652626,
-0.4351768493652344,
-0.08971680700778961,
0.16071264445781708,
-0.21966049075126648,
0.20741817355155945,
-0.08452196419239044,
-0.38217106461524963,
-0.03140607476234436,
0.19613908231258392,
-0.1683107316493988,
0.46027299761772156,
0.27587223052978516,
-0.09481551498174667,
0.14077620208263397,
0.019949819892644882,
-0.00581202981993556,
-0.2708378732204437,
-0.17453786730766296,
0.027956970036029816,
-0.6094490885734558,
-0.1337055265903473,
-0.06845298409461975,
0.3605669140815735,
0.012115519493818283,
0.09540955722332001,
0.0868021622300148,
-0.093608058989048,
0.22808872163295746,
0.1541600078344345,
0.44920772314071655,
-0.00322737917304039,
0.607182502746582,
-0.12736567854881287,
0.12570618093013763,
-0.14646433293819427,
-0.2800045609474182,
-0.17747578024864197,
0.14299921691417694,
-0.5383463501930237,
-0.052086926996707916,
0.09608694911003113,
-0.22970297932624817,
0.28036871552467346,
-0.07943695783615112,
0.185634046792984,
-0.6217135787010193,
0.26869991421699524,
-0.3050214350223541,
0.07617375999689102,
0.1886168122291565,
-0.04756659269332886,
0.13873916864395142,
-0.15060019493103027,
0.33828508853912354,
0.155306875705719,
0.4130154252052307,
-0.33169934153556824,
-0.7142782211303711,
-0.040441691875457764,
0.09067296236753464,
-0.0037189647555351257,
0.3584856390953064,
-0.0006031841039657593,
-0.07530361413955688,
0.3249034285545349,
0.17882969975471497,
-0.0960165485739708,
-0.46915435791015625,
-0.10934779047966003,
-0.09721139818429947,
0.1579122692346573,
0.37736332416534424,
-0.02293841913342476,
0.2762838304042816,
-0.0012996091973036528,
0.014649532735347748,
0.4374241828918457,
0.055641256272792816,
-0.16527530550956726,
0.2267512083053589,
-0.23394489288330078,
-0.37913817167282104,
0.30407992005348206,
-0.06622273474931717,
-0.1390976756811142,
0.3959626257419586,
0.0697285383939743,
-0.02550649829208851,
-0.2382306456565857,
-0.008316563442349434,
-0.0660979226231575,
0.1560378223657608,
0.13027174770832062,
0.23189659416675568,
-0.26230764389038086,
0.2058728188276291,
-0.3505077660083771,
-0.226212278008461,
-0.0532601922750473,
0.11262011528015137,
0.4177105128765106,
-0.03323926031589508,
-0.10219716280698776,
0.02221592143177986,
0.17187991738319397,
0.002568911761045456,
0.09755370020866394,
0.3538062572479248,
-0.15176540613174438,
0.03860051557421684,
-0.03053358569741249,
-0.26037362217903137,
-0.20436838269233704,
0.11721762269735336,
-0.06657639145851135,
-0.06184414029121399,
0.4010004997253418,
0.18008694052696228,
-0.23906871676445007,
0.07861257344484329,
-0.04575689509510994,
-0.17490960657596588,
-0.006956348195672035,
0.10201163589954376,
-0.3647189736366272,
-0.2568778991699219,
-0.13745971024036407,
0.11535358428955078,
-0.8277051448822021,
0.01479681208729744,
-0.15473808348178864,
0.2829660475254059,
-0.08613631874322891,
-0.3054013252258301,
-0.09589666873216629,
0.14147748053073883,
0.029285842552781105,
0.2161426991224289,
-0.1751239001750946,
0.37610214948654175,
-0.0974125787615776,
0.15250878036022186,
-0.21832984685897827,
0.3186455965042114,
0.03383171558380127,
-0.1786680817604065,
0.14609360694885254,
-0.28511470556259155,
-0.14663255214691162,
0.2432989478111267,
0.16593188047409058,
-0.1597050279378891,
-0.07662296295166016,
0.2198808491230011,
0.20292456448078156,
0.17965476214885712,
-0.0944797694683075,
-0.10465781390666962,
0.30119359493255615,
0.0668242871761322,
0.24652253091335297,
-0.09825518727302551,
0.010600287467241287,
0.046045925468206406,
-0.35290083289146423,
-0.07801563292741776,
0.48210951685905457,
0.11903609335422516,
-0.03786931931972504,
0.02002396620810032,
-0.20588085055351257,
-0.17741256952285767,
0.2964673638343811,
0.2819262742996216,
0.5339245200157166,
0.07711436599493027,
0.1697365939617157,
0.2081507444381714,
0.10197629779577255,
-0.06834035366773605,
0.16766248643398285,
0.10936591029167175,
0.576978862285614,
0.3514205813407898,
0.10978326201438904,
-0.09700020402669907,
-0.1171187087893486,
0.027422692626714706,
0.36047786474227905,
0.41848790645599365,
-0.38697290420532227,
-0.0756634846329689,
-0.09720806032419205,
-0.11971508711576462,
-0.32956770062446594,
0.33069226145744324,
-0.12090738117694855,
-0.25416773557662964,
-0.11144240200519562,
0.06111188977956772,
-0.3849814832210541,
0.04288603365421295,
0.2994481325149536,
0.05973871052265167,
0.04126270115375519,
-0.01608896441757679,
0.031848445534706116,
-0.03999509662389755,
-0.037078142166137695,
-0.09253956377506256,
0.36462825536727905,
-0.14720851182937622,
0.18976490199565887,
0.256786972284317,
-0.28692173957824707,
-0.17057746648788452,
0.10487080365419388,
0.26744091510772705,
0.3569685220718384,
0.5967714190483093,
-0.09184741973876953,
0.3900044560432434,
0.13155756890773773,
-0.04119276627898216,
0.1388920098543167,
-0.06693685054779053,
-0.021814581006765366,
-0.14928142726421356,
0.14716382324695587,
0.18394847214221954,
-0.3534565567970276,
-0.5560477375984192,
-0.058566972613334656,
-0.43790310621261597,
0.101499542593956,
-0.15147554874420166,
0.03690805286169052,
0.07629907876253128,
0.4020797312259674,
-0.2050609290599823,
0.10263974964618683,
0.0924692377448082,
-0.07129118591547012,
-0.28510358929634094,
-0.14817975461483002,
-0.11888288706541061,
-0.05189964547753334,
-0.01140923798084259,
0.1653687208890915,
0.12481328845024109,
0.37369227409362793,
-0.5742104649543762,
-0.037167664617300034,
-0.29506823420524597,
-0.21038177609443665,
-0.28057268261909485,
-0.06426627188920975,
0.33693233132362366,
-0.05777492746710777,
0.006412407383322716,
0.06137534976005554,
0.01364731416106224,
0.02398598939180374,
0.04759296402335167,
0.28497493267059326,
0.2467295229434967,
0.2743972837924957,
0.02631485089659691,
0.7497295141220093,
-0.02383672446012497,
0.180414080619812,
0.08029916137456894,
-0.17573976516723633,
0.45122283697128296,
0.14867770671844482,
-0.10184108465909958,
0.6407608985900879,
0.0993366688489914,
-0.1402498185634613,
-0.10927200317382812,
0.042149245738983154,
-0.20272491872310638,
-0.13068705797195435,
-0.005087606608867645,
-0.19248217344284058,
-0.1457650363445282,
0.3520159423351288,
-0.3024119436740875,
0.3199042081832886,
0.1387394219636917,
0.05951957404613495,
-0.003127962350845337,
-0.20976004004478455,
-0.16487646102905273,
-0.12306943535804749,
-0.09784769266843796,
0.02295016497373581,
-0.05880327522754669,
-0.1668565273284912,
-0.3072408437728882,
0.043387435376644135,
-0.04851285740733147,
0.377621591091156,
-0.05635245144367218,
0.11679025739431381,
-0.008995912969112396,
-0.09572048485279083,
0.6420639753341675,
-0.300699919462204,
-0.10198019444942474,
-0.17174240946769714,
-0.27291440963745117,
-0.031083907932043076,
-0.20603224635124207,
0.02587156370282173,
-0.024333711713552475,
0.22242970764636993,
0.21765604615211487,
0.024713225662708282,
-0.35649386048316956,
0.3609442710876465,
-0.008644714951515198,
-0.1827370673418045,
-0.2881239950656891,
-0.04056002199649811,
-0.16853652894496918,
-0.2989383041858673,
-0.035491250455379486,
-0.10998135805130005,
0.13431625068187714,
-0.3868103623390198,
-0.08320575952529907,
0.07579367607831955,
0.15907907485961914,
0.13825610280036926,
-0.01894081011414528,
0.27103209495544434,
-0.20169182121753693,
0.11963893473148346,
0.05555882304906845,
0.24973663687705994,
0.24216915667057037,
0.19351127743721008,
0.11548183858394623,
-0.0036143958568573,
0.11059272289276123,
0.1066933199763298,
0.2411734163761139,
0.5215757489204407,
-0.20765995979309082,
-0.2883319556713104,
0.020866218954324722,
0.3867443799972534,
-0.2595761716365814,
0.4780765473842621,
0.3917366862297058,
0.17419686913490295,
-0.005110675934702158,
-0.34141722321510315,
0.044449128210544586,
0.13327233493328094,
-0.053830064833164215,
0.3611895442008972,
-0.24300526082515717,
-0.20356550812721252,
0.10210054367780685,
0.3517509400844574,
1.1873949766159058,
-0.2560913562774658,
0.013052672147750854,
0.1647394895553589,
-0.30053073167800903,
0.6263619661331177,
-0.625778079032898,
0.2518238127231598,
-0.26333335041999817,
-0.3297612965106964,
0.1888357549905777,
-0.2192295342683792,
-0.002086736261844635,
-0.015976399183273315,
0.16008496284484863,
0.3508228063583374,
0.1531193107366562,
0.1187235563993454,
-0.08072347193956375,
0.2111988067626953,
-0.19023500382900238,
-0.05563958361744881,
-0.19482015073299408,
0.047927454113960266,
-0.2505906820297241,
-0.015919972211122513,
-0.30737945437431335,
0.09169749915599823,
0.22449761629104614,
0.021404743194580078,
-0.3516777753829956,
0.25864627957344055,
-0.30154821276664734,
-0.11288443207740784,
-0.024361006915569305,
-0.1529855728149414,
0.1045917272567749,
0.5068589448928833,
0.2185697704553604,
0.33337265253067017,
-0.08062941581010818,
0.40471675992012024,
0.018613319844007492,
-0.17460957169532776,
0.1528114676475525,
0.12573722004890442,
0.407822847366333,
-0.23510423302650452,
-0.4662654399871826,
0.05772173032164574,
-0.22224077582359314,
0.03516865521669388,
-0.38480859994888306,
0.081668920814991,
0.16467244923114777,
-0.18538159132003784,
-0.32259640097618103,
0.21704980731010437,
-0.0774097591638565,
-0.001583382487297058,
0.0892888754606247,
-0.019572943449020386,
-0.2598622143268585,
0.18757811188697815,
-0.24570603668689728,
-0.35194796323776245,
-0.02870432659983635,
-0.15702331066131592,
0.37778788805007935,
-0.2217346578836441,
0.5133670568466187,
0.21774078905582428,
0.06077555567026138,
-0.1719810664653778,
-0.13404661417007446,
0.40282341837882996,
-0.42648348212242126,
0.08628234267234802,
-0.018437162041664124,
-0.2969436049461365,
0.04750003665685654,
-0.14471614360809326,
-0.04759429395198822,
0.2825298607349396,
0.05756788328289986,
-0.21744365990161896,
-0.3293708562850952,
0.13833662867546082,
-0.3302876055240631,
0.36616313457489014,
-0.19536885619163513,
0.28609195351600647,
-0.005943732336163521,
-0.08717446029186249,
-0.21075521409511566,
0.06397361308336258,
-0.42249080538749695,
0.2527047395706177,
-0.06691496819257736,
0.037265803664922714,
0.09308962523937225,
-0.1990072876214981,
-0.0715906023979187,
0.0023613926023244858,
-0.16823691129684448,
-0.11563581228256226,
0.12576355040073395,
0.14029264450073242,
-0.025738965719938278,
-0.34145694971084595,
-0.0205155648291111,
-0.5516072511672974,
-0.13324251770973206,
-0.18896348774433136,
0.19231480360031128,
-0.0932830274105072,
-0.12948743999004364,
0.0674365758895874,
-0.05566702410578728,
0.25432005524635315,
0.10819727182388306,
0.42037302255630493,
0.07664119452238083,
0.4934372305870056,
-0.10158327221870422,
0.2945255637168884,
0.29345738887786865,
-0.041786450892686844,
-0.42612433433532715,
-0.011092975735664368,
-0.024180784821510315,
0.23524150252342224,
0.10725151002407074,
-0.2775578498840332,
-0.16204608976840973,
-0.053276777267456055,
0.2861033082008362,
0.4138427972793579,
-0.23306837677955627,
0.146237313747406,
0.34753748774528503,
0.13508032262325287,
0.07833971083164215,
0.22168685495853424,
0.33784645795822144,
0.003028303850442171,
-0.0667118951678276,
0.005376338958740234,
0.08287031948566437,
-0.11304350197315216,
-0.13126204907894135,
0.2187248170375824,
-0.27842092514038086,
-0.5897895097732544,
0.00042368099093437195,
0.014626946300268173,
-0.056450262665748596,
-0.12236489355564117,
-0.0013479441404342651,
0.12530817091464996,
0.14009372889995575,
0.7140223383903503,
0.11960773169994354,
0.18026210367679596,
0.32365965843200684,
0.21127372980117798,
-0.015298672020435333,
-0.45878127217292786,
-0.2097761183977127,
0.5016226768493652,
-0.2853482961654663,
0.23913869261741638,
-0.2798146605491638,
0.022403918206691742,
0.22009502351284027,
-0.3724938631057739,
-0.03787325322628021,
0.1936887949705124,
-0.2706792652606964,
0.038121797144412994,
-0.29689574241638184,
-0.11415412276983261,
-0.04193955659866333,
0.230354905128479,
0.2111303061246872,
-0.276108980178833,
0.20923291146755219,
0.13155284523963928,
-0.41753292083740234,
-0.01957881636917591,
0.28620675206184387,
0.36564937233924866,
-0.03545915335416794,
-0.404375821352005,
0.15768000483512878,
0.11825551837682724,
-0.07216836512088776,
-0.11964535713195801,
0.29820477962493896,
0.47275474667549133,
0.4340927302837372,
-0.22080668807029724,
0.05388457700610161,
0.47984087467193604,
0.047490693628787994,
-0.2682685852050781,
0.04548002406954765,
0.46884146332740784,
0.5673755407333374,
0.11229319870471954,
0.11769168078899384,
-0.05809282138943672,
-0.055296484380960464,
0.34776026010513306,
0.3328334093093872,
-0.3607565462589264,
-0.05689644068479538,
0.097407765686512,
-0.22215485572814941,
-0.16654007136821747,
0.04301707074046135,
-0.34958335757255554,
-0.06010240316390991,
0.47086891531944275,
-0.06964875012636185,
0.2441125214099884,
0.0441695936024189,
0.023393332958221436,
-0.19039396941661835,
0.45347529649734497,
0.20711052417755127,
0.292917400598526,
-0.4905242323875427,
-0.4067947268486023,
-0.30933231115341187,
0.04232364147901535,
-0.09486755728721619,
0.24090924859046936,
0.23384852707386017,
0.2883282005786896,
-0.10818088799715042,
-0.32197409868240356,
-0.27338141202926636,
-0.06440094858407974,
0.09485878795385361,
0.3143032193183899,
-0.38965904712677,
-0.42241427302360535,
-0.0865737795829773,
0.09856484085321426,
0.3361666202545166,
-0.2893314063549042,
0.12364637851715088,
-0.21641206741333008,
-0.20058193802833557,
0.2649870812892914,
0.21116748452186584,
-0.043314892798662186,
-0.07020630687475204,
0.30581146478652954,
0.10352607071399689,
0.3858698010444641,
0.10868262499570847,
-0.29201656579971313,
-0.4035603106021881,
-0.4986024498939514,
-0.21533772349357605,
-0.056619398295879364,
-0.0025109685957431793,
0.24292710423469543,
-0.3103574812412262,
0.270866334438324,
-0.2856939435005188,
-0.14194855093955994,
-0.032260917127132416,
0.30050626397132874,
-0.016372621059417725,
-0.19375090301036835,
0.20532333850860596,
0.19772933423519135,
0.24480412900447845,
0.2973262667655945,
-0.06112440675497055,
-0.006612565368413925,
-0.3463704586029053,
-0.1477833092212677,
0.42900025844573975,
0.0910186618566513,
-0.3435969352722168,
-0.2823697328567505,
0.08761527389287949,
0.17529022693634033,
-0.0303731020539999,
-0.47166335582733154,
-0.022052429616451263,
0.13011808693408966,
0.14728863537311554,
-0.2639214098453522,
0.05785626918077469,
-0.35397693514823914,
0.1769774705171585,
0.06097136810421944,
0.1225929707288742,
-0.01870589330792427,
-0.2262902408838272,
0.15499339997768402,
-0.08807773888111115
] |
https://github.com/huggingface/datasets/issues/4525 | Out of memory error on workers while running Beam+Dataflow | > I asked my colleague who ran the code and he said apache beam.
He looked into it further and he just used DirectRunner. @albertvillanova | ## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
| 25 | Out of memory error on workers while running Beam+Dataflow
## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
> I asked my colleague who ran the code and he said apache beam.
He looked into it further and he just used DirectRunner. @albertvillanova | [
-0.3179207444190979,
-0.12448765337467194,
-0.04219004511833191,
0.325805127620697,
0.3414510488510132,
-0.14221429824829102,
-0.09138506650924683,
0.4362598657608032,
-0.1771542876958847,
0.3672865331172943,
0.2916374206542969,
0.17966338992118835,
-0.20729193091392517,
0.29709017276763916,
0.017125552520155907,
-0.26205524802207947,
-0.06626906245946884,
-0.005221329629421234,
-0.35569286346435547,
-0.09661632776260376,
-0.29713374376296997,
-0.03457030653953552,
-0.11048303544521332,
-0.07314218580722809,
-0.11726446449756622,
0.05389855057001114,
0.107256218791008,
0.4139477610588074,
-0.07015205174684525,
-0.22861814498901367,
-0.06279042363166809,
-0.11586974561214447,
0.07130087167024612,
0.3142407536506653,
-0.00012188479740871117,
-0.06275603175163269,
0.43871384859085083,
0.06228065490722656,
-0.2059805542230606,
-0.053728193044662476,
-0.032909903675317764,
-0.3655340373516083,
-0.12045765668153763,
0.0588950589299202,
0.014400869607925415,
-0.5790768265724182,
0.1763344556093216,
-0.3162025809288025,
0.32520565390586853,
0.5608006715774536,
0.07473074644804001,
0.08038074523210526,
0.26977866888046265,
0.18152792751789093,
0.21284112334251404,
-0.035108864307403564,
-0.05375117063522339,
0.2698899507522583,
0.23745004832744598,
-0.36455461382865906,
0.21583408117294312,
0.1666087955236435,
0.19662989675998688,
-0.010068289935588837,
0.2543727159500122,
-0.15034779906272888,
0.2740083932876587,
-0.5025782585144043,
0.2648738622665405,
0.27127495408058167,
0.20192527770996094,
-0.24250200390815735,
0.13461948931217194,
-0.3733041286468506,
0.17644301056861877,
-0.24762408435344696,
0.26927417516708374,
0.363773912191391,
-0.48760128021240234,
-0.1214117556810379,
-0.527358889579773,
-0.2158638834953308,
-0.08068926632404327,
0.32597994804382324,
0.18513250350952148,
0.021651439368724823,
-0.11677226424217224,
0.24219956994056702,
0.3242601454257965,
-0.05004183202981949,
0.6149072051048279,
-0.1527658849954605,
0.07137956470251083,
-0.0858222022652626,
-0.4351768493652344,
-0.08971680700778961,
0.16071264445781708,
-0.21966049075126648,
0.20741817355155945,
-0.08452196419239044,
-0.38217106461524963,
-0.03140607476234436,
0.19613908231258392,
-0.1683107316493988,
0.46027299761772156,
0.27587223052978516,
-0.09481551498174667,
0.14077620208263397,
0.019949819892644882,
-0.00581202981993556,
-0.2708378732204437,
-0.17453786730766296,
0.027956970036029816,
-0.6094490885734558,
-0.1337055265903473,
-0.06845298409461975,
0.3605669140815735,
0.012115519493818283,
0.09540955722332001,
0.0868021622300148,
-0.093608058989048,
0.22808872163295746,
0.1541600078344345,
0.44920772314071655,
-0.00322737917304039,
0.607182502746582,
-0.12736567854881287,
0.12570618093013763,
-0.14646433293819427,
-0.2800045609474182,
-0.17747578024864197,
0.14299921691417694,
-0.5383463501930237,
-0.052086926996707916,
0.09608694911003113,
-0.22970297932624817,
0.28036871552467346,
-0.07943695783615112,
0.185634046792984,
-0.6217135787010193,
0.26869991421699524,
-0.3050214350223541,
0.07617375999689102,
0.1886168122291565,
-0.04756659269332886,
0.13873916864395142,
-0.15060019493103027,
0.33828508853912354,
0.155306875705719,
0.4130154252052307,
-0.33169934153556824,
-0.7142782211303711,
-0.040441691875457764,
0.09067296236753464,
-0.0037189647555351257,
0.3584856390953064,
-0.0006031841039657593,
-0.07530361413955688,
0.3249034285545349,
0.17882969975471497,
-0.0960165485739708,
-0.46915435791015625,
-0.10934779047966003,
-0.09721139818429947,
0.1579122692346573,
0.37736332416534424,
-0.02293841913342476,
0.2762838304042816,
-0.0012996091973036528,
0.014649532735347748,
0.4374241828918457,
0.055641256272792816,
-0.16527530550956726,
0.2267512083053589,
-0.23394489288330078,
-0.37913817167282104,
0.30407992005348206,
-0.06622273474931717,
-0.1390976756811142,
0.3959626257419586,
0.0697285383939743,
-0.02550649829208851,
-0.2382306456565857,
-0.008316563442349434,
-0.0660979226231575,
0.1560378223657608,
0.13027174770832062,
0.23189659416675568,
-0.26230764389038086,
0.2058728188276291,
-0.3505077660083771,
-0.226212278008461,
-0.0532601922750473,
0.11262011528015137,
0.4177105128765106,
-0.03323926031589508,
-0.10219716280698776,
0.02221592143177986,
0.17187991738319397,
0.002568911761045456,
0.09755370020866394,
0.3538062572479248,
-0.15176540613174438,
0.03860051557421684,
-0.03053358569741249,
-0.26037362217903137,
-0.20436838269233704,
0.11721762269735336,
-0.06657639145851135,
-0.06184414029121399,
0.4010004997253418,
0.18008694052696228,
-0.23906871676445007,
0.07861257344484329,
-0.04575689509510994,
-0.17490960657596588,
-0.006956348195672035,
0.10201163589954376,
-0.3647189736366272,
-0.2568778991699219,
-0.13745971024036407,
0.11535358428955078,
-0.8277051448822021,
0.01479681208729744,
-0.15473808348178864,
0.2829660475254059,
-0.08613631874322891,
-0.3054013252258301,
-0.09589666873216629,
0.14147748053073883,
0.029285842552781105,
0.2161426991224289,
-0.1751239001750946,
0.37610214948654175,
-0.0974125787615776,
0.15250878036022186,
-0.21832984685897827,
0.3186455965042114,
0.03383171558380127,
-0.1786680817604065,
0.14609360694885254,
-0.28511470556259155,
-0.14663255214691162,
0.2432989478111267,
0.16593188047409058,
-0.1597050279378891,
-0.07662296295166016,
0.2198808491230011,
0.20292456448078156,
0.17965476214885712,
-0.0944797694683075,
-0.10465781390666962,
0.30119359493255615,
0.0668242871761322,
0.24652253091335297,
-0.09825518727302551,
0.010600287467241287,
0.046045925468206406,
-0.35290083289146423,
-0.07801563292741776,
0.48210951685905457,
0.11903609335422516,
-0.03786931931972504,
0.02002396620810032,
-0.20588085055351257,
-0.17741256952285767,
0.2964673638343811,
0.2819262742996216,
0.5339245200157166,
0.07711436599493027,
0.1697365939617157,
0.2081507444381714,
0.10197629779577255,
-0.06834035366773605,
0.16766248643398285,
0.10936591029167175,
0.576978862285614,
0.3514205813407898,
0.10978326201438904,
-0.09700020402669907,
-0.1171187087893486,
0.027422692626714706,
0.36047786474227905,
0.41848790645599365,
-0.38697290420532227,
-0.0756634846329689,
-0.09720806032419205,
-0.11971508711576462,
-0.32956770062446594,
0.33069226145744324,
-0.12090738117694855,
-0.25416773557662964,
-0.11144240200519562,
0.06111188977956772,
-0.3849814832210541,
0.04288603365421295,
0.2994481325149536,
0.05973871052265167,
0.04126270115375519,
-0.01608896441757679,
0.031848445534706116,
-0.03999509662389755,
-0.037078142166137695,
-0.09253956377506256,
0.36462825536727905,
-0.14720851182937622,
0.18976490199565887,
0.256786972284317,
-0.28692173957824707,
-0.17057746648788452,
0.10487080365419388,
0.26744091510772705,
0.3569685220718384,
0.5967714190483093,
-0.09184741973876953,
0.3900044560432434,
0.13155756890773773,
-0.04119276627898216,
0.1388920098543167,
-0.06693685054779053,
-0.021814581006765366,
-0.14928142726421356,
0.14716382324695587,
0.18394847214221954,
-0.3534565567970276,
-0.5560477375984192,
-0.058566972613334656,
-0.43790310621261597,
0.101499542593956,
-0.15147554874420166,
0.03690805286169052,
0.07629907876253128,
0.4020797312259674,
-0.2050609290599823,
0.10263974964618683,
0.0924692377448082,
-0.07129118591547012,
-0.28510358929634094,
-0.14817975461483002,
-0.11888288706541061,
-0.05189964547753334,
-0.01140923798084259,
0.1653687208890915,
0.12481328845024109,
0.37369227409362793,
-0.5742104649543762,
-0.037167664617300034,
-0.29506823420524597,
-0.21038177609443665,
-0.28057268261909485,
-0.06426627188920975,
0.33693233132362366,
-0.05777492746710777,
0.006412407383322716,
0.06137534976005554,
0.01364731416106224,
0.02398598939180374,
0.04759296402335167,
0.28497493267059326,
0.2467295229434967,
0.2743972837924957,
0.02631485089659691,
0.7497295141220093,
-0.02383672446012497,
0.180414080619812,
0.08029916137456894,
-0.17573976516723633,
0.45122283697128296,
0.14867770671844482,
-0.10184108465909958,
0.6407608985900879,
0.0993366688489914,
-0.1402498185634613,
-0.10927200317382812,
0.042149245738983154,
-0.20272491872310638,
-0.13068705797195435,
-0.005087606608867645,
-0.19248217344284058,
-0.1457650363445282,
0.3520159423351288,
-0.3024119436740875,
0.3199042081832886,
0.1387394219636917,
0.05951957404613495,
-0.003127962350845337,
-0.20976004004478455,
-0.16487646102905273,
-0.12306943535804749,
-0.09784769266843796,
0.02295016497373581,
-0.05880327522754669,
-0.1668565273284912,
-0.3072408437728882,
0.043387435376644135,
-0.04851285740733147,
0.377621591091156,
-0.05635245144367218,
0.11679025739431381,
-0.008995912969112396,
-0.09572048485279083,
0.6420639753341675,
-0.300699919462204,
-0.10198019444942474,
-0.17174240946769714,
-0.27291440963745117,
-0.031083907932043076,
-0.20603224635124207,
0.02587156370282173,
-0.024333711713552475,
0.22242970764636993,
0.21765604615211487,
0.024713225662708282,
-0.35649386048316956,
0.3609442710876465,
-0.008644714951515198,
-0.1827370673418045,
-0.2881239950656891,
-0.04056002199649811,
-0.16853652894496918,
-0.2989383041858673,
-0.035491250455379486,
-0.10998135805130005,
0.13431625068187714,
-0.3868103623390198,
-0.08320575952529907,
0.07579367607831955,
0.15907907485961914,
0.13825610280036926,
-0.01894081011414528,
0.27103209495544434,
-0.20169182121753693,
0.11963893473148346,
0.05555882304906845,
0.24973663687705994,
0.24216915667057037,
0.19351127743721008,
0.11548183858394623,
-0.0036143958568573,
0.11059272289276123,
0.1066933199763298,
0.2411734163761139,
0.5215757489204407,
-0.20765995979309082,
-0.2883319556713104,
0.020866218954324722,
0.3867443799972534,
-0.2595761716365814,
0.4780765473842621,
0.3917366862297058,
0.17419686913490295,
-0.005110675934702158,
-0.34141722321510315,
0.044449128210544586,
0.13327233493328094,
-0.053830064833164215,
0.3611895442008972,
-0.24300526082515717,
-0.20356550812721252,
0.10210054367780685,
0.3517509400844574,
1.1873949766159058,
-0.2560913562774658,
0.013052672147750854,
0.1647394895553589,
-0.30053073167800903,
0.6263619661331177,
-0.625778079032898,
0.2518238127231598,
-0.26333335041999817,
-0.3297612965106964,
0.1888357549905777,
-0.2192295342683792,
-0.002086736261844635,
-0.015976399183273315,
0.16008496284484863,
0.3508228063583374,
0.1531193107366562,
0.1187235563993454,
-0.08072347193956375,
0.2111988067626953,
-0.19023500382900238,
-0.05563958361744881,
-0.19482015073299408,
0.047927454113960266,
-0.2505906820297241,
-0.015919972211122513,
-0.30737945437431335,
0.09169749915599823,
0.22449761629104614,
0.021404743194580078,
-0.3516777753829956,
0.25864627957344055,
-0.30154821276664734,
-0.11288443207740784,
-0.024361006915569305,
-0.1529855728149414,
0.1045917272567749,
0.5068589448928833,
0.2185697704553604,
0.33337265253067017,
-0.08062941581010818,
0.40471675992012024,
0.018613319844007492,
-0.17460957169532776,
0.1528114676475525,
0.12573722004890442,
0.407822847366333,
-0.23510423302650452,
-0.4662654399871826,
0.05772173032164574,
-0.22224077582359314,
0.03516865521669388,
-0.38480859994888306,
0.081668920814991,
0.16467244923114777,
-0.18538159132003784,
-0.32259640097618103,
0.21704980731010437,
-0.0774097591638565,
-0.001583382487297058,
0.0892888754606247,
-0.019572943449020386,
-0.2598622143268585,
0.18757811188697815,
-0.24570603668689728,
-0.35194796323776245,
-0.02870432659983635,
-0.15702331066131592,
0.37778788805007935,
-0.2217346578836441,
0.5133670568466187,
0.21774078905582428,
0.06077555567026138,
-0.1719810664653778,
-0.13404661417007446,
0.40282341837882996,
-0.42648348212242126,
0.08628234267234802,
-0.018437162041664124,
-0.2969436049461365,
0.04750003665685654,
-0.14471614360809326,
-0.04759429395198822,
0.2825298607349396,
0.05756788328289986,
-0.21744365990161896,
-0.3293708562850952,
0.13833662867546082,
-0.3302876055240631,
0.36616313457489014,
-0.19536885619163513,
0.28609195351600647,
-0.005943732336163521,
-0.08717446029186249,
-0.21075521409511566,
0.06397361308336258,
-0.42249080538749695,
0.2527047395706177,
-0.06691496819257736,
0.037265803664922714,
0.09308962523937225,
-0.1990072876214981,
-0.0715906023979187,
0.0023613926023244858,
-0.16823691129684448,
-0.11563581228256226,
0.12576355040073395,
0.14029264450073242,
-0.025738965719938278,
-0.34145694971084595,
-0.0205155648291111,
-0.5516072511672974,
-0.13324251770973206,
-0.18896348774433136,
0.19231480360031128,
-0.0932830274105072,
-0.12948743999004364,
0.0674365758895874,
-0.05566702410578728,
0.25432005524635315,
0.10819727182388306,
0.42037302255630493,
0.07664119452238083,
0.4934372305870056,
-0.10158327221870422,
0.2945255637168884,
0.29345738887786865,
-0.041786450892686844,
-0.42612433433532715,
-0.011092975735664368,
-0.024180784821510315,
0.23524150252342224,
0.10725151002407074,
-0.2775578498840332,
-0.16204608976840973,
-0.053276777267456055,
0.2861033082008362,
0.4138427972793579,
-0.23306837677955627,
0.146237313747406,
0.34753748774528503,
0.13508032262325287,
0.07833971083164215,
0.22168685495853424,
0.33784645795822144,
0.003028303850442171,
-0.0667118951678276,
0.005376338958740234,
0.08287031948566437,
-0.11304350197315216,
-0.13126204907894135,
0.2187248170375824,
-0.27842092514038086,
-0.5897895097732544,
0.00042368099093437195,
0.014626946300268173,
-0.056450262665748596,
-0.12236489355564117,
-0.0013479441404342651,
0.12530817091464996,
0.14009372889995575,
0.7140223383903503,
0.11960773169994354,
0.18026210367679596,
0.32365965843200684,
0.21127372980117798,
-0.015298672020435333,
-0.45878127217292786,
-0.2097761183977127,
0.5016226768493652,
-0.2853482961654663,
0.23913869261741638,
-0.2798146605491638,
0.022403918206691742,
0.22009502351284027,
-0.3724938631057739,
-0.03787325322628021,
0.1936887949705124,
-0.2706792652606964,
0.038121797144412994,
-0.29689574241638184,
-0.11415412276983261,
-0.04193955659866333,
0.230354905128479,
0.2111303061246872,
-0.276108980178833,
0.20923291146755219,
0.13155284523963928,
-0.41753292083740234,
-0.01957881636917591,
0.28620675206184387,
0.36564937233924866,
-0.03545915335416794,
-0.404375821352005,
0.15768000483512878,
0.11825551837682724,
-0.07216836512088776,
-0.11964535713195801,
0.29820477962493896,
0.47275474667549133,
0.4340927302837372,
-0.22080668807029724,
0.05388457700610161,
0.47984087467193604,
0.047490693628787994,
-0.2682685852050781,
0.04548002406954765,
0.46884146332740784,
0.5673755407333374,
0.11229319870471954,
0.11769168078899384,
-0.05809282138943672,
-0.055296484380960464,
0.34776026010513306,
0.3328334093093872,
-0.3607565462589264,
-0.05689644068479538,
0.097407765686512,
-0.22215485572814941,
-0.16654007136821747,
0.04301707074046135,
-0.34958335757255554,
-0.06010240316390991,
0.47086891531944275,
-0.06964875012636185,
0.2441125214099884,
0.0441695936024189,
0.023393332958221436,
-0.19039396941661835,
0.45347529649734497,
0.20711052417755127,
0.292917400598526,
-0.4905242323875427,
-0.4067947268486023,
-0.30933231115341187,
0.04232364147901535,
-0.09486755728721619,
0.24090924859046936,
0.23384852707386017,
0.2883282005786896,
-0.10818088799715042,
-0.32197409868240356,
-0.27338141202926636,
-0.06440094858407974,
0.09485878795385361,
0.3143032193183899,
-0.38965904712677,
-0.42241427302360535,
-0.0865737795829773,
0.09856484085321426,
0.3361666202545166,
-0.2893314063549042,
0.12364637851715088,
-0.21641206741333008,
-0.20058193802833557,
0.2649870812892914,
0.21116748452186584,
-0.043314892798662186,
-0.07020630687475204,
0.30581146478652954,
0.10352607071399689,
0.3858698010444641,
0.10868262499570847,
-0.29201656579971313,
-0.4035603106021881,
-0.4986024498939514,
-0.21533772349357605,
-0.056619398295879364,
-0.0025109685957431793,
0.24292710423469543,
-0.3103574812412262,
0.270866334438324,
-0.2856939435005188,
-0.14194855093955994,
-0.032260917127132416,
0.30050626397132874,
-0.016372621059417725,
-0.19375090301036835,
0.20532333850860596,
0.19772933423519135,
0.24480412900447845,
0.2973262667655945,
-0.06112440675497055,
-0.006612565368413925,
-0.3463704586029053,
-0.1477833092212677,
0.42900025844573975,
0.0910186618566513,
-0.3435969352722168,
-0.2823697328567505,
0.08761527389287949,
0.17529022693634033,
-0.0303731020539999,
-0.47166335582733154,
-0.022052429616451263,
0.13011808693408966,
0.14728863537311554,
-0.2639214098453522,
0.05785626918077469,
-0.35397693514823914,
0.1769774705171585,
0.06097136810421944,
0.1225929707288742,
-0.01870589330792427,
-0.2262902408838272,
0.15499339997768402,
-0.08807773888111115
] |
https://github.com/huggingface/datasets/issues/4525 | Out of memory error on workers while running Beam+Dataflow | OK, thank you @seirasto for your hint.
That explains why you did not encounter the out of memory error: this only appears when the processing is distributed (on workers memory) and DirectRunner does not distribute the processing (all is done in a single machine). | ## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
| 44 | Out of memory error on workers while running Beam+Dataflow
## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
OK, thank you @seirasto for your hint.
That explains why you did not encounter the out of memory error: this only appears when the processing is distributed (on workers memory) and DirectRunner does not distribute the processing (all is done in a single machine). | [
-0.3179207444190979,
-0.12448765337467194,
-0.04219004511833191,
0.325805127620697,
0.3414510488510132,
-0.14221429824829102,
-0.09138506650924683,
0.4362598657608032,
-0.1771542876958847,
0.3672865331172943,
0.2916374206542969,
0.17966338992118835,
-0.20729193091392517,
0.29709017276763916,
0.017125552520155907,
-0.26205524802207947,
-0.06626906245946884,
-0.005221329629421234,
-0.35569286346435547,
-0.09661632776260376,
-0.29713374376296997,
-0.03457030653953552,
-0.11048303544521332,
-0.07314218580722809,
-0.11726446449756622,
0.05389855057001114,
0.107256218791008,
0.4139477610588074,
-0.07015205174684525,
-0.22861814498901367,
-0.06279042363166809,
-0.11586974561214447,
0.07130087167024612,
0.3142407536506653,
-0.00012188479740871117,
-0.06275603175163269,
0.43871384859085083,
0.06228065490722656,
-0.2059805542230606,
-0.053728193044662476,
-0.032909903675317764,
-0.3655340373516083,
-0.12045765668153763,
0.0588950589299202,
0.014400869607925415,
-0.5790768265724182,
0.1763344556093216,
-0.3162025809288025,
0.32520565390586853,
0.5608006715774536,
0.07473074644804001,
0.08038074523210526,
0.26977866888046265,
0.18152792751789093,
0.21284112334251404,
-0.035108864307403564,
-0.05375117063522339,
0.2698899507522583,
0.23745004832744598,
-0.36455461382865906,
0.21583408117294312,
0.1666087955236435,
0.19662989675998688,
-0.010068289935588837,
0.2543727159500122,
-0.15034779906272888,
0.2740083932876587,
-0.5025782585144043,
0.2648738622665405,
0.27127495408058167,
0.20192527770996094,
-0.24250200390815735,
0.13461948931217194,
-0.3733041286468506,
0.17644301056861877,
-0.24762408435344696,
0.26927417516708374,
0.363773912191391,
-0.48760128021240234,
-0.1214117556810379,
-0.527358889579773,
-0.2158638834953308,
-0.08068926632404327,
0.32597994804382324,
0.18513250350952148,
0.021651439368724823,
-0.11677226424217224,
0.24219956994056702,
0.3242601454257965,
-0.05004183202981949,
0.6149072051048279,
-0.1527658849954605,
0.07137956470251083,
-0.0858222022652626,
-0.4351768493652344,
-0.08971680700778961,
0.16071264445781708,
-0.21966049075126648,
0.20741817355155945,
-0.08452196419239044,
-0.38217106461524963,
-0.03140607476234436,
0.19613908231258392,
-0.1683107316493988,
0.46027299761772156,
0.27587223052978516,
-0.09481551498174667,
0.14077620208263397,
0.019949819892644882,
-0.00581202981993556,
-0.2708378732204437,
-0.17453786730766296,
0.027956970036029816,
-0.6094490885734558,
-0.1337055265903473,
-0.06845298409461975,
0.3605669140815735,
0.012115519493818283,
0.09540955722332001,
0.0868021622300148,
-0.093608058989048,
0.22808872163295746,
0.1541600078344345,
0.44920772314071655,
-0.00322737917304039,
0.607182502746582,
-0.12736567854881287,
0.12570618093013763,
-0.14646433293819427,
-0.2800045609474182,
-0.17747578024864197,
0.14299921691417694,
-0.5383463501930237,
-0.052086926996707916,
0.09608694911003113,
-0.22970297932624817,
0.28036871552467346,
-0.07943695783615112,
0.185634046792984,
-0.6217135787010193,
0.26869991421699524,
-0.3050214350223541,
0.07617375999689102,
0.1886168122291565,
-0.04756659269332886,
0.13873916864395142,
-0.15060019493103027,
0.33828508853912354,
0.155306875705719,
0.4130154252052307,
-0.33169934153556824,
-0.7142782211303711,
-0.040441691875457764,
0.09067296236753464,
-0.0037189647555351257,
0.3584856390953064,
-0.0006031841039657593,
-0.07530361413955688,
0.3249034285545349,
0.17882969975471497,
-0.0960165485739708,
-0.46915435791015625,
-0.10934779047966003,
-0.09721139818429947,
0.1579122692346573,
0.37736332416534424,
-0.02293841913342476,
0.2762838304042816,
-0.0012996091973036528,
0.014649532735347748,
0.4374241828918457,
0.055641256272792816,
-0.16527530550956726,
0.2267512083053589,
-0.23394489288330078,
-0.37913817167282104,
0.30407992005348206,
-0.06622273474931717,
-0.1390976756811142,
0.3959626257419586,
0.0697285383939743,
-0.02550649829208851,
-0.2382306456565857,
-0.008316563442349434,
-0.0660979226231575,
0.1560378223657608,
0.13027174770832062,
0.23189659416675568,
-0.26230764389038086,
0.2058728188276291,
-0.3505077660083771,
-0.226212278008461,
-0.0532601922750473,
0.11262011528015137,
0.4177105128765106,
-0.03323926031589508,
-0.10219716280698776,
0.02221592143177986,
0.17187991738319397,
0.002568911761045456,
0.09755370020866394,
0.3538062572479248,
-0.15176540613174438,
0.03860051557421684,
-0.03053358569741249,
-0.26037362217903137,
-0.20436838269233704,
0.11721762269735336,
-0.06657639145851135,
-0.06184414029121399,
0.4010004997253418,
0.18008694052696228,
-0.23906871676445007,
0.07861257344484329,
-0.04575689509510994,
-0.17490960657596588,
-0.006956348195672035,
0.10201163589954376,
-0.3647189736366272,
-0.2568778991699219,
-0.13745971024036407,
0.11535358428955078,
-0.8277051448822021,
0.01479681208729744,
-0.15473808348178864,
0.2829660475254059,
-0.08613631874322891,
-0.3054013252258301,
-0.09589666873216629,
0.14147748053073883,
0.029285842552781105,
0.2161426991224289,
-0.1751239001750946,
0.37610214948654175,
-0.0974125787615776,
0.15250878036022186,
-0.21832984685897827,
0.3186455965042114,
0.03383171558380127,
-0.1786680817604065,
0.14609360694885254,
-0.28511470556259155,
-0.14663255214691162,
0.2432989478111267,
0.16593188047409058,
-0.1597050279378891,
-0.07662296295166016,
0.2198808491230011,
0.20292456448078156,
0.17965476214885712,
-0.0944797694683075,
-0.10465781390666962,
0.30119359493255615,
0.0668242871761322,
0.24652253091335297,
-0.09825518727302551,
0.010600287467241287,
0.046045925468206406,
-0.35290083289146423,
-0.07801563292741776,
0.48210951685905457,
0.11903609335422516,
-0.03786931931972504,
0.02002396620810032,
-0.20588085055351257,
-0.17741256952285767,
0.2964673638343811,
0.2819262742996216,
0.5339245200157166,
0.07711436599493027,
0.1697365939617157,
0.2081507444381714,
0.10197629779577255,
-0.06834035366773605,
0.16766248643398285,
0.10936591029167175,
0.576978862285614,
0.3514205813407898,
0.10978326201438904,
-0.09700020402669907,
-0.1171187087893486,
0.027422692626714706,
0.36047786474227905,
0.41848790645599365,
-0.38697290420532227,
-0.0756634846329689,
-0.09720806032419205,
-0.11971508711576462,
-0.32956770062446594,
0.33069226145744324,
-0.12090738117694855,
-0.25416773557662964,
-0.11144240200519562,
0.06111188977956772,
-0.3849814832210541,
0.04288603365421295,
0.2994481325149536,
0.05973871052265167,
0.04126270115375519,
-0.01608896441757679,
0.031848445534706116,
-0.03999509662389755,
-0.037078142166137695,
-0.09253956377506256,
0.36462825536727905,
-0.14720851182937622,
0.18976490199565887,
0.256786972284317,
-0.28692173957824707,
-0.17057746648788452,
0.10487080365419388,
0.26744091510772705,
0.3569685220718384,
0.5967714190483093,
-0.09184741973876953,
0.3900044560432434,
0.13155756890773773,
-0.04119276627898216,
0.1388920098543167,
-0.06693685054779053,
-0.021814581006765366,
-0.14928142726421356,
0.14716382324695587,
0.18394847214221954,
-0.3534565567970276,
-0.5560477375984192,
-0.058566972613334656,
-0.43790310621261597,
0.101499542593956,
-0.15147554874420166,
0.03690805286169052,
0.07629907876253128,
0.4020797312259674,
-0.2050609290599823,
0.10263974964618683,
0.0924692377448082,
-0.07129118591547012,
-0.28510358929634094,
-0.14817975461483002,
-0.11888288706541061,
-0.05189964547753334,
-0.01140923798084259,
0.1653687208890915,
0.12481328845024109,
0.37369227409362793,
-0.5742104649543762,
-0.037167664617300034,
-0.29506823420524597,
-0.21038177609443665,
-0.28057268261909485,
-0.06426627188920975,
0.33693233132362366,
-0.05777492746710777,
0.006412407383322716,
0.06137534976005554,
0.01364731416106224,
0.02398598939180374,
0.04759296402335167,
0.28497493267059326,
0.2467295229434967,
0.2743972837924957,
0.02631485089659691,
0.7497295141220093,
-0.02383672446012497,
0.180414080619812,
0.08029916137456894,
-0.17573976516723633,
0.45122283697128296,
0.14867770671844482,
-0.10184108465909958,
0.6407608985900879,
0.0993366688489914,
-0.1402498185634613,
-0.10927200317382812,
0.042149245738983154,
-0.20272491872310638,
-0.13068705797195435,
-0.005087606608867645,
-0.19248217344284058,
-0.1457650363445282,
0.3520159423351288,
-0.3024119436740875,
0.3199042081832886,
0.1387394219636917,
0.05951957404613495,
-0.003127962350845337,
-0.20976004004478455,
-0.16487646102905273,
-0.12306943535804749,
-0.09784769266843796,
0.02295016497373581,
-0.05880327522754669,
-0.1668565273284912,
-0.3072408437728882,
0.043387435376644135,
-0.04851285740733147,
0.377621591091156,
-0.05635245144367218,
0.11679025739431381,
-0.008995912969112396,
-0.09572048485279083,
0.6420639753341675,
-0.300699919462204,
-0.10198019444942474,
-0.17174240946769714,
-0.27291440963745117,
-0.031083907932043076,
-0.20603224635124207,
0.02587156370282173,
-0.024333711713552475,
0.22242970764636993,
0.21765604615211487,
0.024713225662708282,
-0.35649386048316956,
0.3609442710876465,
-0.008644714951515198,
-0.1827370673418045,
-0.2881239950656891,
-0.04056002199649811,
-0.16853652894496918,
-0.2989383041858673,
-0.035491250455379486,
-0.10998135805130005,
0.13431625068187714,
-0.3868103623390198,
-0.08320575952529907,
0.07579367607831955,
0.15907907485961914,
0.13825610280036926,
-0.01894081011414528,
0.27103209495544434,
-0.20169182121753693,
0.11963893473148346,
0.05555882304906845,
0.24973663687705994,
0.24216915667057037,
0.19351127743721008,
0.11548183858394623,
-0.0036143958568573,
0.11059272289276123,
0.1066933199763298,
0.2411734163761139,
0.5215757489204407,
-0.20765995979309082,
-0.2883319556713104,
0.020866218954324722,
0.3867443799972534,
-0.2595761716365814,
0.4780765473842621,
0.3917366862297058,
0.17419686913490295,
-0.005110675934702158,
-0.34141722321510315,
0.044449128210544586,
0.13327233493328094,
-0.053830064833164215,
0.3611895442008972,
-0.24300526082515717,
-0.20356550812721252,
0.10210054367780685,
0.3517509400844574,
1.1873949766159058,
-0.2560913562774658,
0.013052672147750854,
0.1647394895553589,
-0.30053073167800903,
0.6263619661331177,
-0.625778079032898,
0.2518238127231598,
-0.26333335041999817,
-0.3297612965106964,
0.1888357549905777,
-0.2192295342683792,
-0.002086736261844635,
-0.015976399183273315,
0.16008496284484863,
0.3508228063583374,
0.1531193107366562,
0.1187235563993454,
-0.08072347193956375,
0.2111988067626953,
-0.19023500382900238,
-0.05563958361744881,
-0.19482015073299408,
0.047927454113960266,
-0.2505906820297241,
-0.015919972211122513,
-0.30737945437431335,
0.09169749915599823,
0.22449761629104614,
0.021404743194580078,
-0.3516777753829956,
0.25864627957344055,
-0.30154821276664734,
-0.11288443207740784,
-0.024361006915569305,
-0.1529855728149414,
0.1045917272567749,
0.5068589448928833,
0.2185697704553604,
0.33337265253067017,
-0.08062941581010818,
0.40471675992012024,
0.018613319844007492,
-0.17460957169532776,
0.1528114676475525,
0.12573722004890442,
0.407822847366333,
-0.23510423302650452,
-0.4662654399871826,
0.05772173032164574,
-0.22224077582359314,
0.03516865521669388,
-0.38480859994888306,
0.081668920814991,
0.16467244923114777,
-0.18538159132003784,
-0.32259640097618103,
0.21704980731010437,
-0.0774097591638565,
-0.001583382487297058,
0.0892888754606247,
-0.019572943449020386,
-0.2598622143268585,
0.18757811188697815,
-0.24570603668689728,
-0.35194796323776245,
-0.02870432659983635,
-0.15702331066131592,
0.37778788805007935,
-0.2217346578836441,
0.5133670568466187,
0.21774078905582428,
0.06077555567026138,
-0.1719810664653778,
-0.13404661417007446,
0.40282341837882996,
-0.42648348212242126,
0.08628234267234802,
-0.018437162041664124,
-0.2969436049461365,
0.04750003665685654,
-0.14471614360809326,
-0.04759429395198822,
0.2825298607349396,
0.05756788328289986,
-0.21744365990161896,
-0.3293708562850952,
0.13833662867546082,
-0.3302876055240631,
0.36616313457489014,
-0.19536885619163513,
0.28609195351600647,
-0.005943732336163521,
-0.08717446029186249,
-0.21075521409511566,
0.06397361308336258,
-0.42249080538749695,
0.2527047395706177,
-0.06691496819257736,
0.037265803664922714,
0.09308962523937225,
-0.1990072876214981,
-0.0715906023979187,
0.0023613926023244858,
-0.16823691129684448,
-0.11563581228256226,
0.12576355040073395,
0.14029264450073242,
-0.025738965719938278,
-0.34145694971084595,
-0.0205155648291111,
-0.5516072511672974,
-0.13324251770973206,
-0.18896348774433136,
0.19231480360031128,
-0.0932830274105072,
-0.12948743999004364,
0.0674365758895874,
-0.05566702410578728,
0.25432005524635315,
0.10819727182388306,
0.42037302255630493,
0.07664119452238083,
0.4934372305870056,
-0.10158327221870422,
0.2945255637168884,
0.29345738887786865,
-0.041786450892686844,
-0.42612433433532715,
-0.011092975735664368,
-0.024180784821510315,
0.23524150252342224,
0.10725151002407074,
-0.2775578498840332,
-0.16204608976840973,
-0.053276777267456055,
0.2861033082008362,
0.4138427972793579,
-0.23306837677955627,
0.146237313747406,
0.34753748774528503,
0.13508032262325287,
0.07833971083164215,
0.22168685495853424,
0.33784645795822144,
0.003028303850442171,
-0.0667118951678276,
0.005376338958740234,
0.08287031948566437,
-0.11304350197315216,
-0.13126204907894135,
0.2187248170375824,
-0.27842092514038086,
-0.5897895097732544,
0.00042368099093437195,
0.014626946300268173,
-0.056450262665748596,
-0.12236489355564117,
-0.0013479441404342651,
0.12530817091464996,
0.14009372889995575,
0.7140223383903503,
0.11960773169994354,
0.18026210367679596,
0.32365965843200684,
0.21127372980117798,
-0.015298672020435333,
-0.45878127217292786,
-0.2097761183977127,
0.5016226768493652,
-0.2853482961654663,
0.23913869261741638,
-0.2798146605491638,
0.022403918206691742,
0.22009502351284027,
-0.3724938631057739,
-0.03787325322628021,
0.1936887949705124,
-0.2706792652606964,
0.038121797144412994,
-0.29689574241638184,
-0.11415412276983261,
-0.04193955659866333,
0.230354905128479,
0.2111303061246872,
-0.276108980178833,
0.20923291146755219,
0.13155284523963928,
-0.41753292083740234,
-0.01957881636917591,
0.28620675206184387,
0.36564937233924866,
-0.03545915335416794,
-0.404375821352005,
0.15768000483512878,
0.11825551837682724,
-0.07216836512088776,
-0.11964535713195801,
0.29820477962493896,
0.47275474667549133,
0.4340927302837372,
-0.22080668807029724,
0.05388457700610161,
0.47984087467193604,
0.047490693628787994,
-0.2682685852050781,
0.04548002406954765,
0.46884146332740784,
0.5673755407333374,
0.11229319870471954,
0.11769168078899384,
-0.05809282138943672,
-0.055296484380960464,
0.34776026010513306,
0.3328334093093872,
-0.3607565462589264,
-0.05689644068479538,
0.097407765686512,
-0.22215485572814941,
-0.16654007136821747,
0.04301707074046135,
-0.34958335757255554,
-0.06010240316390991,
0.47086891531944275,
-0.06964875012636185,
0.2441125214099884,
0.0441695936024189,
0.023393332958221436,
-0.19039396941661835,
0.45347529649734497,
0.20711052417755127,
0.292917400598526,
-0.4905242323875427,
-0.4067947268486023,
-0.30933231115341187,
0.04232364147901535,
-0.09486755728721619,
0.24090924859046936,
0.23384852707386017,
0.2883282005786896,
-0.10818088799715042,
-0.32197409868240356,
-0.27338141202926636,
-0.06440094858407974,
0.09485878795385361,
0.3143032193183899,
-0.38965904712677,
-0.42241427302360535,
-0.0865737795829773,
0.09856484085321426,
0.3361666202545166,
-0.2893314063549042,
0.12364637851715088,
-0.21641206741333008,
-0.20058193802833557,
0.2649870812892914,
0.21116748452186584,
-0.043314892798662186,
-0.07020630687475204,
0.30581146478652954,
0.10352607071399689,
0.3858698010444641,
0.10868262499570847,
-0.29201656579971313,
-0.4035603106021881,
-0.4986024498939514,
-0.21533772349357605,
-0.056619398295879364,
-0.0025109685957431793,
0.24292710423469543,
-0.3103574812412262,
0.270866334438324,
-0.2856939435005188,
-0.14194855093955994,
-0.032260917127132416,
0.30050626397132874,
-0.016372621059417725,
-0.19375090301036835,
0.20532333850860596,
0.19772933423519135,
0.24480412900447845,
0.2973262667655945,
-0.06112440675497055,
-0.006612565368413925,
-0.3463704586029053,
-0.1477833092212677,
0.42900025844573975,
0.0910186618566513,
-0.3435969352722168,
-0.2823697328567505,
0.08761527389287949,
0.17529022693634033,
-0.0303731020539999,
-0.47166335582733154,
-0.022052429616451263,
0.13011808693408966,
0.14728863537311554,
-0.2639214098453522,
0.05785626918077469,
-0.35397693514823914,
0.1769774705171585,
0.06097136810421944,
0.1225929707288742,
-0.01870589330792427,
-0.2262902408838272,
0.15499339997768402,
-0.08807773888111115
] |
https://github.com/huggingface/datasets/issues/4525 | Out of memory error on workers while running Beam+Dataflow | @albertvillanova Doesn't DirectRunner offer distributed processing through?
https://beam.apache.org/documentation/runners/direct/
```
Setting parallelism
Number of threads or subprocesses is defined by setting the direct_num_workers pipeline option. From 2.22.0, direct_num_workers = 0 is supported. When direct_num_workers is set to 0, it will set the number of threads/subprocess to the number of cores of the machine where the pipeline is running.
Setting running mode
In Beam 2.19.0 and newer, you can use the direct_running_mode pipeline option to set the running mode. direct_running_mode can be one of ['in_memory', 'multi_threading', 'multi_processing'].
in_memory: Runner and workers’ communication happens in memory (not through gRPC). This is a default mode.
multi_threading: Runner and workers communicate through gRPC and each worker runs in a thread.
multi_processing: Runner and workers communicate through gRPC and each worker runs in a subprocess.
``` | ## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
| 130 | Out of memory error on workers while running Beam+Dataflow
## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
@albertvillanova Doesn't DirectRunner offer distributed processing through?
https://beam.apache.org/documentation/runners/direct/
```
Setting parallelism
Number of threads or subprocesses is defined by setting the direct_num_workers pipeline option. From 2.22.0, direct_num_workers = 0 is supported. When direct_num_workers is set to 0, it will set the number of threads/subprocess to the number of cores of the machine where the pipeline is running.
Setting running mode
In Beam 2.19.0 and newer, you can use the direct_running_mode pipeline option to set the running mode. direct_running_mode can be one of ['in_memory', 'multi_threading', 'multi_processing'].
in_memory: Runner and workers’ communication happens in memory (not through gRPC). This is a default mode.
multi_threading: Runner and workers communicate through gRPC and each worker runs in a thread.
multi_processing: Runner and workers communicate through gRPC and each worker runs in a subprocess.
``` | [
-0.3179207444190979,
-0.12448765337467194,
-0.04219004511833191,
0.325805127620697,
0.3414510488510132,
-0.14221429824829102,
-0.09138506650924683,
0.4362598657608032,
-0.1771542876958847,
0.3672865331172943,
0.2916374206542969,
0.17966338992118835,
-0.20729193091392517,
0.29709017276763916,
0.017125552520155907,
-0.26205524802207947,
-0.06626906245946884,
-0.005221329629421234,
-0.35569286346435547,
-0.09661632776260376,
-0.29713374376296997,
-0.03457030653953552,
-0.11048303544521332,
-0.07314218580722809,
-0.11726446449756622,
0.05389855057001114,
0.107256218791008,
0.4139477610588074,
-0.07015205174684525,
-0.22861814498901367,
-0.06279042363166809,
-0.11586974561214447,
0.07130087167024612,
0.3142407536506653,
-0.00012188479740871117,
-0.06275603175163269,
0.43871384859085083,
0.06228065490722656,
-0.2059805542230606,
-0.053728193044662476,
-0.032909903675317764,
-0.3655340373516083,
-0.12045765668153763,
0.0588950589299202,
0.014400869607925415,
-0.5790768265724182,
0.1763344556093216,
-0.3162025809288025,
0.32520565390586853,
0.5608006715774536,
0.07473074644804001,
0.08038074523210526,
0.26977866888046265,
0.18152792751789093,
0.21284112334251404,
-0.035108864307403564,
-0.05375117063522339,
0.2698899507522583,
0.23745004832744598,
-0.36455461382865906,
0.21583408117294312,
0.1666087955236435,
0.19662989675998688,
-0.010068289935588837,
0.2543727159500122,
-0.15034779906272888,
0.2740083932876587,
-0.5025782585144043,
0.2648738622665405,
0.27127495408058167,
0.20192527770996094,
-0.24250200390815735,
0.13461948931217194,
-0.3733041286468506,
0.17644301056861877,
-0.24762408435344696,
0.26927417516708374,
0.363773912191391,
-0.48760128021240234,
-0.1214117556810379,
-0.527358889579773,
-0.2158638834953308,
-0.08068926632404327,
0.32597994804382324,
0.18513250350952148,
0.021651439368724823,
-0.11677226424217224,
0.24219956994056702,
0.3242601454257965,
-0.05004183202981949,
0.6149072051048279,
-0.1527658849954605,
0.07137956470251083,
-0.0858222022652626,
-0.4351768493652344,
-0.08971680700778961,
0.16071264445781708,
-0.21966049075126648,
0.20741817355155945,
-0.08452196419239044,
-0.38217106461524963,
-0.03140607476234436,
0.19613908231258392,
-0.1683107316493988,
0.46027299761772156,
0.27587223052978516,
-0.09481551498174667,
0.14077620208263397,
0.019949819892644882,
-0.00581202981993556,
-0.2708378732204437,
-0.17453786730766296,
0.027956970036029816,
-0.6094490885734558,
-0.1337055265903473,
-0.06845298409461975,
0.3605669140815735,
0.012115519493818283,
0.09540955722332001,
0.0868021622300148,
-0.093608058989048,
0.22808872163295746,
0.1541600078344345,
0.44920772314071655,
-0.00322737917304039,
0.607182502746582,
-0.12736567854881287,
0.12570618093013763,
-0.14646433293819427,
-0.2800045609474182,
-0.17747578024864197,
0.14299921691417694,
-0.5383463501930237,
-0.052086926996707916,
0.09608694911003113,
-0.22970297932624817,
0.28036871552467346,
-0.07943695783615112,
0.185634046792984,
-0.6217135787010193,
0.26869991421699524,
-0.3050214350223541,
0.07617375999689102,
0.1886168122291565,
-0.04756659269332886,
0.13873916864395142,
-0.15060019493103027,
0.33828508853912354,
0.155306875705719,
0.4130154252052307,
-0.33169934153556824,
-0.7142782211303711,
-0.040441691875457764,
0.09067296236753464,
-0.0037189647555351257,
0.3584856390953064,
-0.0006031841039657593,
-0.07530361413955688,
0.3249034285545349,
0.17882969975471497,
-0.0960165485739708,
-0.46915435791015625,
-0.10934779047966003,
-0.09721139818429947,
0.1579122692346573,
0.37736332416534424,
-0.02293841913342476,
0.2762838304042816,
-0.0012996091973036528,
0.014649532735347748,
0.4374241828918457,
0.055641256272792816,
-0.16527530550956726,
0.2267512083053589,
-0.23394489288330078,
-0.37913817167282104,
0.30407992005348206,
-0.06622273474931717,
-0.1390976756811142,
0.3959626257419586,
0.0697285383939743,
-0.02550649829208851,
-0.2382306456565857,
-0.008316563442349434,
-0.0660979226231575,
0.1560378223657608,
0.13027174770832062,
0.23189659416675568,
-0.26230764389038086,
0.2058728188276291,
-0.3505077660083771,
-0.226212278008461,
-0.0532601922750473,
0.11262011528015137,
0.4177105128765106,
-0.03323926031589508,
-0.10219716280698776,
0.02221592143177986,
0.17187991738319397,
0.002568911761045456,
0.09755370020866394,
0.3538062572479248,
-0.15176540613174438,
0.03860051557421684,
-0.03053358569741249,
-0.26037362217903137,
-0.20436838269233704,
0.11721762269735336,
-0.06657639145851135,
-0.06184414029121399,
0.4010004997253418,
0.18008694052696228,
-0.23906871676445007,
0.07861257344484329,
-0.04575689509510994,
-0.17490960657596588,
-0.006956348195672035,
0.10201163589954376,
-0.3647189736366272,
-0.2568778991699219,
-0.13745971024036407,
0.11535358428955078,
-0.8277051448822021,
0.01479681208729744,
-0.15473808348178864,
0.2829660475254059,
-0.08613631874322891,
-0.3054013252258301,
-0.09589666873216629,
0.14147748053073883,
0.029285842552781105,
0.2161426991224289,
-0.1751239001750946,
0.37610214948654175,
-0.0974125787615776,
0.15250878036022186,
-0.21832984685897827,
0.3186455965042114,
0.03383171558380127,
-0.1786680817604065,
0.14609360694885254,
-0.28511470556259155,
-0.14663255214691162,
0.2432989478111267,
0.16593188047409058,
-0.1597050279378891,
-0.07662296295166016,
0.2198808491230011,
0.20292456448078156,
0.17965476214885712,
-0.0944797694683075,
-0.10465781390666962,
0.30119359493255615,
0.0668242871761322,
0.24652253091335297,
-0.09825518727302551,
0.010600287467241287,
0.046045925468206406,
-0.35290083289146423,
-0.07801563292741776,
0.48210951685905457,
0.11903609335422516,
-0.03786931931972504,
0.02002396620810032,
-0.20588085055351257,
-0.17741256952285767,
0.2964673638343811,
0.2819262742996216,
0.5339245200157166,
0.07711436599493027,
0.1697365939617157,
0.2081507444381714,
0.10197629779577255,
-0.06834035366773605,
0.16766248643398285,
0.10936591029167175,
0.576978862285614,
0.3514205813407898,
0.10978326201438904,
-0.09700020402669907,
-0.1171187087893486,
0.027422692626714706,
0.36047786474227905,
0.41848790645599365,
-0.38697290420532227,
-0.0756634846329689,
-0.09720806032419205,
-0.11971508711576462,
-0.32956770062446594,
0.33069226145744324,
-0.12090738117694855,
-0.25416773557662964,
-0.11144240200519562,
0.06111188977956772,
-0.3849814832210541,
0.04288603365421295,
0.2994481325149536,
0.05973871052265167,
0.04126270115375519,
-0.01608896441757679,
0.031848445534706116,
-0.03999509662389755,
-0.037078142166137695,
-0.09253956377506256,
0.36462825536727905,
-0.14720851182937622,
0.18976490199565887,
0.256786972284317,
-0.28692173957824707,
-0.17057746648788452,
0.10487080365419388,
0.26744091510772705,
0.3569685220718384,
0.5967714190483093,
-0.09184741973876953,
0.3900044560432434,
0.13155756890773773,
-0.04119276627898216,
0.1388920098543167,
-0.06693685054779053,
-0.021814581006765366,
-0.14928142726421356,
0.14716382324695587,
0.18394847214221954,
-0.3534565567970276,
-0.5560477375984192,
-0.058566972613334656,
-0.43790310621261597,
0.101499542593956,
-0.15147554874420166,
0.03690805286169052,
0.07629907876253128,
0.4020797312259674,
-0.2050609290599823,
0.10263974964618683,
0.0924692377448082,
-0.07129118591547012,
-0.28510358929634094,
-0.14817975461483002,
-0.11888288706541061,
-0.05189964547753334,
-0.01140923798084259,
0.1653687208890915,
0.12481328845024109,
0.37369227409362793,
-0.5742104649543762,
-0.037167664617300034,
-0.29506823420524597,
-0.21038177609443665,
-0.28057268261909485,
-0.06426627188920975,
0.33693233132362366,
-0.05777492746710777,
0.006412407383322716,
0.06137534976005554,
0.01364731416106224,
0.02398598939180374,
0.04759296402335167,
0.28497493267059326,
0.2467295229434967,
0.2743972837924957,
0.02631485089659691,
0.7497295141220093,
-0.02383672446012497,
0.180414080619812,
0.08029916137456894,
-0.17573976516723633,
0.45122283697128296,
0.14867770671844482,
-0.10184108465909958,
0.6407608985900879,
0.0993366688489914,
-0.1402498185634613,
-0.10927200317382812,
0.042149245738983154,
-0.20272491872310638,
-0.13068705797195435,
-0.005087606608867645,
-0.19248217344284058,
-0.1457650363445282,
0.3520159423351288,
-0.3024119436740875,
0.3199042081832886,
0.1387394219636917,
0.05951957404613495,
-0.003127962350845337,
-0.20976004004478455,
-0.16487646102905273,
-0.12306943535804749,
-0.09784769266843796,
0.02295016497373581,
-0.05880327522754669,
-0.1668565273284912,
-0.3072408437728882,
0.043387435376644135,
-0.04851285740733147,
0.377621591091156,
-0.05635245144367218,
0.11679025739431381,
-0.008995912969112396,
-0.09572048485279083,
0.6420639753341675,
-0.300699919462204,
-0.10198019444942474,
-0.17174240946769714,
-0.27291440963745117,
-0.031083907932043076,
-0.20603224635124207,
0.02587156370282173,
-0.024333711713552475,
0.22242970764636993,
0.21765604615211487,
0.024713225662708282,
-0.35649386048316956,
0.3609442710876465,
-0.008644714951515198,
-0.1827370673418045,
-0.2881239950656891,
-0.04056002199649811,
-0.16853652894496918,
-0.2989383041858673,
-0.035491250455379486,
-0.10998135805130005,
0.13431625068187714,
-0.3868103623390198,
-0.08320575952529907,
0.07579367607831955,
0.15907907485961914,
0.13825610280036926,
-0.01894081011414528,
0.27103209495544434,
-0.20169182121753693,
0.11963893473148346,
0.05555882304906845,
0.24973663687705994,
0.24216915667057037,
0.19351127743721008,
0.11548183858394623,
-0.0036143958568573,
0.11059272289276123,
0.1066933199763298,
0.2411734163761139,
0.5215757489204407,
-0.20765995979309082,
-0.2883319556713104,
0.020866218954324722,
0.3867443799972534,
-0.2595761716365814,
0.4780765473842621,
0.3917366862297058,
0.17419686913490295,
-0.005110675934702158,
-0.34141722321510315,
0.044449128210544586,
0.13327233493328094,
-0.053830064833164215,
0.3611895442008972,
-0.24300526082515717,
-0.20356550812721252,
0.10210054367780685,
0.3517509400844574,
1.1873949766159058,
-0.2560913562774658,
0.013052672147750854,
0.1647394895553589,
-0.30053073167800903,
0.6263619661331177,
-0.625778079032898,
0.2518238127231598,
-0.26333335041999817,
-0.3297612965106964,
0.1888357549905777,
-0.2192295342683792,
-0.002086736261844635,
-0.015976399183273315,
0.16008496284484863,
0.3508228063583374,
0.1531193107366562,
0.1187235563993454,
-0.08072347193956375,
0.2111988067626953,
-0.19023500382900238,
-0.05563958361744881,
-0.19482015073299408,
0.047927454113960266,
-0.2505906820297241,
-0.015919972211122513,
-0.30737945437431335,
0.09169749915599823,
0.22449761629104614,
0.021404743194580078,
-0.3516777753829956,
0.25864627957344055,
-0.30154821276664734,
-0.11288443207740784,
-0.024361006915569305,
-0.1529855728149414,
0.1045917272567749,
0.5068589448928833,
0.2185697704553604,
0.33337265253067017,
-0.08062941581010818,
0.40471675992012024,
0.018613319844007492,
-0.17460957169532776,
0.1528114676475525,
0.12573722004890442,
0.407822847366333,
-0.23510423302650452,
-0.4662654399871826,
0.05772173032164574,
-0.22224077582359314,
0.03516865521669388,
-0.38480859994888306,
0.081668920814991,
0.16467244923114777,
-0.18538159132003784,
-0.32259640097618103,
0.21704980731010437,
-0.0774097591638565,
-0.001583382487297058,
0.0892888754606247,
-0.019572943449020386,
-0.2598622143268585,
0.18757811188697815,
-0.24570603668689728,
-0.35194796323776245,
-0.02870432659983635,
-0.15702331066131592,
0.37778788805007935,
-0.2217346578836441,
0.5133670568466187,
0.21774078905582428,
0.06077555567026138,
-0.1719810664653778,
-0.13404661417007446,
0.40282341837882996,
-0.42648348212242126,
0.08628234267234802,
-0.018437162041664124,
-0.2969436049461365,
0.04750003665685654,
-0.14471614360809326,
-0.04759429395198822,
0.2825298607349396,
0.05756788328289986,
-0.21744365990161896,
-0.3293708562850952,
0.13833662867546082,
-0.3302876055240631,
0.36616313457489014,
-0.19536885619163513,
0.28609195351600647,
-0.005943732336163521,
-0.08717446029186249,
-0.21075521409511566,
0.06397361308336258,
-0.42249080538749695,
0.2527047395706177,
-0.06691496819257736,
0.037265803664922714,
0.09308962523937225,
-0.1990072876214981,
-0.0715906023979187,
0.0023613926023244858,
-0.16823691129684448,
-0.11563581228256226,
0.12576355040073395,
0.14029264450073242,
-0.025738965719938278,
-0.34145694971084595,
-0.0205155648291111,
-0.5516072511672974,
-0.13324251770973206,
-0.18896348774433136,
0.19231480360031128,
-0.0932830274105072,
-0.12948743999004364,
0.0674365758895874,
-0.05566702410578728,
0.25432005524635315,
0.10819727182388306,
0.42037302255630493,
0.07664119452238083,
0.4934372305870056,
-0.10158327221870422,
0.2945255637168884,
0.29345738887786865,
-0.041786450892686844,
-0.42612433433532715,
-0.011092975735664368,
-0.024180784821510315,
0.23524150252342224,
0.10725151002407074,
-0.2775578498840332,
-0.16204608976840973,
-0.053276777267456055,
0.2861033082008362,
0.4138427972793579,
-0.23306837677955627,
0.146237313747406,
0.34753748774528503,
0.13508032262325287,
0.07833971083164215,
0.22168685495853424,
0.33784645795822144,
0.003028303850442171,
-0.0667118951678276,
0.005376338958740234,
0.08287031948566437,
-0.11304350197315216,
-0.13126204907894135,
0.2187248170375824,
-0.27842092514038086,
-0.5897895097732544,
0.00042368099093437195,
0.014626946300268173,
-0.056450262665748596,
-0.12236489355564117,
-0.0013479441404342651,
0.12530817091464996,
0.14009372889995575,
0.7140223383903503,
0.11960773169994354,
0.18026210367679596,
0.32365965843200684,
0.21127372980117798,
-0.015298672020435333,
-0.45878127217292786,
-0.2097761183977127,
0.5016226768493652,
-0.2853482961654663,
0.23913869261741638,
-0.2798146605491638,
0.022403918206691742,
0.22009502351284027,
-0.3724938631057739,
-0.03787325322628021,
0.1936887949705124,
-0.2706792652606964,
0.038121797144412994,
-0.29689574241638184,
-0.11415412276983261,
-0.04193955659866333,
0.230354905128479,
0.2111303061246872,
-0.276108980178833,
0.20923291146755219,
0.13155284523963928,
-0.41753292083740234,
-0.01957881636917591,
0.28620675206184387,
0.36564937233924866,
-0.03545915335416794,
-0.404375821352005,
0.15768000483512878,
0.11825551837682724,
-0.07216836512088776,
-0.11964535713195801,
0.29820477962493896,
0.47275474667549133,
0.4340927302837372,
-0.22080668807029724,
0.05388457700610161,
0.47984087467193604,
0.047490693628787994,
-0.2682685852050781,
0.04548002406954765,
0.46884146332740784,
0.5673755407333374,
0.11229319870471954,
0.11769168078899384,
-0.05809282138943672,
-0.055296484380960464,
0.34776026010513306,
0.3328334093093872,
-0.3607565462589264,
-0.05689644068479538,
0.097407765686512,
-0.22215485572814941,
-0.16654007136821747,
0.04301707074046135,
-0.34958335757255554,
-0.06010240316390991,
0.47086891531944275,
-0.06964875012636185,
0.2441125214099884,
0.0441695936024189,
0.023393332958221436,
-0.19039396941661835,
0.45347529649734497,
0.20711052417755127,
0.292917400598526,
-0.4905242323875427,
-0.4067947268486023,
-0.30933231115341187,
0.04232364147901535,
-0.09486755728721619,
0.24090924859046936,
0.23384852707386017,
0.2883282005786896,
-0.10818088799715042,
-0.32197409868240356,
-0.27338141202926636,
-0.06440094858407974,
0.09485878795385361,
0.3143032193183899,
-0.38965904712677,
-0.42241427302360535,
-0.0865737795829773,
0.09856484085321426,
0.3361666202545166,
-0.2893314063549042,
0.12364637851715088,
-0.21641206741333008,
-0.20058193802833557,
0.2649870812892914,
0.21116748452186584,
-0.043314892798662186,
-0.07020630687475204,
0.30581146478652954,
0.10352607071399689,
0.3858698010444641,
0.10868262499570847,
-0.29201656579971313,
-0.4035603106021881,
-0.4986024498939514,
-0.21533772349357605,
-0.056619398295879364,
-0.0025109685957431793,
0.24292710423469543,
-0.3103574812412262,
0.270866334438324,
-0.2856939435005188,
-0.14194855093955994,
-0.032260917127132416,
0.30050626397132874,
-0.016372621059417725,
-0.19375090301036835,
0.20532333850860596,
0.19772933423519135,
0.24480412900447845,
0.2973262667655945,
-0.06112440675497055,
-0.006612565368413925,
-0.3463704586029053,
-0.1477833092212677,
0.42900025844573975,
0.0910186618566513,
-0.3435969352722168,
-0.2823697328567505,
0.08761527389287949,
0.17529022693634033,
-0.0303731020539999,
-0.47166335582733154,
-0.022052429616451263,
0.13011808693408966,
0.14728863537311554,
-0.2639214098453522,
0.05785626918077469,
-0.35397693514823914,
0.1769774705171585,
0.06097136810421944,
0.1225929707288742,
-0.01870589330792427,
-0.2262902408838272,
0.15499339997768402,
-0.08807773888111115
] |
https://github.com/huggingface/datasets/issues/4525 | Out of memory error on workers while running Beam+Dataflow | Unrelated to the OOM issue, but we deprecated datasets with Beam scripts in #6474. I think we can close this issue | ## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
| 21 | Out of memory error on workers while running Beam+Dataflow
## Describe the bug
While running the preprocessing of the natural_question dataset (see PR #4368), there is an issue for the "default" config (train+dev files).
Previously we ran the preprocessing for the "dev" config (only dev files) with success.
Train data files are larger than dev ones and apparently workers run out of memory while processing them.
Any help/hint is welcome!
Error message:
```
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
Info from the Diagnostics tab:
```
Out of memory: Killed process 1882 (python) total-vm:6041764kB, anon-rss:3290928kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:9520kB oom_score_adj:900
The worker VM had to shut down one or more processes due to lack of memory.
```
## Additional information
### Stack trace
```
Traceback (most recent call last):
File "/home/albert_huggingface_co/natural_questions/venv/bin/datasets-cli", line 8, in <module>
sys.exit(main())
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/datasets_cli.py", line 39, in main
service.run()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/commands/run_beam.py", line 127, in run
builder.download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/datasets/builder.py", line 1389, in _download_and_prepare
pipeline_results.wait_until_finish()
File "/home/albert_huggingface_co/natural_questions/venv/lib/python3.9/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 1667, in wait_until_finish
raise DataflowRuntimeException(
apache_beam.runners.dataflow.dataflow_runner.DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error:
Data channel closed, unable to receive additional data from SDK sdk-0-0
```
### Logs
```
Error message from worker: Data channel closed, unable to receive additional data from SDK sdk-0-0
Workflow failed. Causes: S30:train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/Read+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/GroupByKey/GroupByWindow+train/ReadAllFromText/ReadAllFiles/Reshard/ReshufflePerKey/FlatMap(restore_timestamps)+train/ReadAllFromText/ReadAllFiles/Reshard/RemoveRandomKeys+train/ReadAllFromText/ReadAllFiles/ReadRange+train/Map(_parse_example)+train/Encode+train/Count N. Examples+train/Get values/Values+train/Save to parquet/Write/WriteImpl/WindowInto(WindowIntoFn)+train/Save to parquet/Write/WriteImpl/WriteBundles+train/Save to parquet/Write/WriteImpl/Pair+train/Save to parquet/Write/WriteImpl/GroupByKey/Write failed., The job failed because a work item has failed 4 times. Look in previous log entries for the cause of each one of the 4 failures. For more information, see https://cloud.google.com/dataflow/docs/guides/common-errors. The work item was attempted on these workers: beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: Data channel closed, unable to receive additional data from SDK sdk-0-0, beamapp-alberthuggingface-06170554-5p23-harness-t4v9 Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-bwsj Root cause: The worker lost contact with the service., beamapp-alberthuggingface-06170554-5p23-harness-5052 Root cause: The worker lost contact with the service.
```
Unrelated to the OOM issue, but we deprecated datasets with Beam scripts in #6474. I think we can close this issue | [
-0.3179207444190979,
-0.12448765337467194,
-0.04219004511833191,
0.325805127620697,
0.3414510488510132,
-0.14221429824829102,
-0.09138506650924683,
0.4362598657608032,
-0.1771542876958847,
0.3672865331172943,
0.2916374206542969,
0.17966338992118835,
-0.20729193091392517,
0.29709017276763916,
0.017125552520155907,
-0.26205524802207947,
-0.06626906245946884,
-0.005221329629421234,
-0.35569286346435547,
-0.09661632776260376,
-0.29713374376296997,
-0.03457030653953552,
-0.11048303544521332,
-0.07314218580722809,
-0.11726446449756622,
0.05389855057001114,
0.107256218791008,
0.4139477610588074,
-0.07015205174684525,
-0.22861814498901367,
-0.06279042363166809,
-0.11586974561214447,
0.07130087167024612,
0.3142407536506653,
-0.00012188479740871117,
-0.06275603175163269,
0.43871384859085083,
0.06228065490722656,
-0.2059805542230606,
-0.053728193044662476,
-0.032909903675317764,
-0.3655340373516083,
-0.12045765668153763,
0.0588950589299202,
0.014400869607925415,
-0.5790768265724182,
0.1763344556093216,
-0.3162025809288025,
0.32520565390586853,
0.5608006715774536,
0.07473074644804001,
0.08038074523210526,
0.26977866888046265,
0.18152792751789093,
0.21284112334251404,
-0.035108864307403564,
-0.05375117063522339,
0.2698899507522583,
0.23745004832744598,
-0.36455461382865906,
0.21583408117294312,
0.1666087955236435,
0.19662989675998688,
-0.010068289935588837,
0.2543727159500122,
-0.15034779906272888,
0.2740083932876587,
-0.5025782585144043,
0.2648738622665405,
0.27127495408058167,
0.20192527770996094,
-0.24250200390815735,
0.13461948931217194,
-0.3733041286468506,
0.17644301056861877,
-0.24762408435344696,
0.26927417516708374,
0.363773912191391,
-0.48760128021240234,
-0.1214117556810379,
-0.527358889579773,
-0.2158638834953308,
-0.08068926632404327,
0.32597994804382324,
0.18513250350952148,
0.021651439368724823,
-0.11677226424217224,
0.24219956994056702,
0.3242601454257965,
-0.05004183202981949,
0.6149072051048279,
-0.1527658849954605,
0.07137956470251083,
-0.0858222022652626,
-0.4351768493652344,
-0.08971680700778961,
0.16071264445781708,
-0.21966049075126648,
0.20741817355155945,
-0.08452196419239044,
-0.38217106461524963,
-0.03140607476234436,
0.19613908231258392,
-0.1683107316493988,
0.46027299761772156,
0.27587223052978516,
-0.09481551498174667,
0.14077620208263397,
0.019949819892644882,
-0.00581202981993556,
-0.2708378732204437,
-0.17453786730766296,
0.027956970036029816,
-0.6094490885734558,
-0.1337055265903473,
-0.06845298409461975,
0.3605669140815735,
0.012115519493818283,
0.09540955722332001,
0.0868021622300148,
-0.093608058989048,
0.22808872163295746,
0.1541600078344345,
0.44920772314071655,
-0.00322737917304039,
0.607182502746582,
-0.12736567854881287,
0.12570618093013763,
-0.14646433293819427,
-0.2800045609474182,
-0.17747578024864197,
0.14299921691417694,
-0.5383463501930237,
-0.052086926996707916,
0.09608694911003113,
-0.22970297932624817,
0.28036871552467346,
-0.07943695783615112,
0.185634046792984,
-0.6217135787010193,
0.26869991421699524,
-0.3050214350223541,
0.07617375999689102,
0.1886168122291565,
-0.04756659269332886,
0.13873916864395142,
-0.15060019493103027,
0.33828508853912354,
0.155306875705719,
0.4130154252052307,
-0.33169934153556824,
-0.7142782211303711,
-0.040441691875457764,
0.09067296236753464,
-0.0037189647555351257,
0.3584856390953064,
-0.0006031841039657593,
-0.07530361413955688,
0.3249034285545349,
0.17882969975471497,
-0.0960165485739708,
-0.46915435791015625,
-0.10934779047966003,
-0.09721139818429947,
0.1579122692346573,
0.37736332416534424,
-0.02293841913342476,
0.2762838304042816,
-0.0012996091973036528,
0.014649532735347748,
0.4374241828918457,
0.055641256272792816,
-0.16527530550956726,
0.2267512083053589,
-0.23394489288330078,
-0.37913817167282104,
0.30407992005348206,
-0.06622273474931717,
-0.1390976756811142,
0.3959626257419586,
0.0697285383939743,
-0.02550649829208851,
-0.2382306456565857,
-0.008316563442349434,
-0.0660979226231575,
0.1560378223657608,
0.13027174770832062,
0.23189659416675568,
-0.26230764389038086,
0.2058728188276291,
-0.3505077660083771,
-0.226212278008461,
-0.0532601922750473,
0.11262011528015137,
0.4177105128765106,
-0.03323926031589508,
-0.10219716280698776,
0.02221592143177986,
0.17187991738319397,
0.002568911761045456,
0.09755370020866394,
0.3538062572479248,
-0.15176540613174438,
0.03860051557421684,
-0.03053358569741249,
-0.26037362217903137,
-0.20436838269233704,
0.11721762269735336,
-0.06657639145851135,
-0.06184414029121399,
0.4010004997253418,
0.18008694052696228,
-0.23906871676445007,
0.07861257344484329,
-0.04575689509510994,
-0.17490960657596588,
-0.006956348195672035,
0.10201163589954376,
-0.3647189736366272,
-0.2568778991699219,
-0.13745971024036407,
0.11535358428955078,
-0.8277051448822021,
0.01479681208729744,
-0.15473808348178864,
0.2829660475254059,
-0.08613631874322891,
-0.3054013252258301,
-0.09589666873216629,
0.14147748053073883,
0.029285842552781105,
0.2161426991224289,
-0.1751239001750946,
0.37610214948654175,
-0.0974125787615776,
0.15250878036022186,
-0.21832984685897827,
0.3186455965042114,
0.03383171558380127,
-0.1786680817604065,
0.14609360694885254,
-0.28511470556259155,
-0.14663255214691162,
0.2432989478111267,
0.16593188047409058,
-0.1597050279378891,
-0.07662296295166016,
0.2198808491230011,
0.20292456448078156,
0.17965476214885712,
-0.0944797694683075,
-0.10465781390666962,
0.30119359493255615,
0.0668242871761322,
0.24652253091335297,
-0.09825518727302551,
0.010600287467241287,
0.046045925468206406,
-0.35290083289146423,
-0.07801563292741776,
0.48210951685905457,
0.11903609335422516,
-0.03786931931972504,
0.02002396620810032,
-0.20588085055351257,
-0.17741256952285767,
0.2964673638343811,
0.2819262742996216,
0.5339245200157166,
0.07711436599493027,
0.1697365939617157,
0.2081507444381714,
0.10197629779577255,
-0.06834035366773605,
0.16766248643398285,
0.10936591029167175,
0.576978862285614,
0.3514205813407898,
0.10978326201438904,
-0.09700020402669907,
-0.1171187087893486,
0.027422692626714706,
0.36047786474227905,
0.41848790645599365,
-0.38697290420532227,
-0.0756634846329689,
-0.09720806032419205,
-0.11971508711576462,
-0.32956770062446594,
0.33069226145744324,
-0.12090738117694855,
-0.25416773557662964,
-0.11144240200519562,
0.06111188977956772,
-0.3849814832210541,
0.04288603365421295,
0.2994481325149536,
0.05973871052265167,
0.04126270115375519,
-0.01608896441757679,
0.031848445534706116,
-0.03999509662389755,
-0.037078142166137695,
-0.09253956377506256,
0.36462825536727905,
-0.14720851182937622,
0.18976490199565887,
0.256786972284317,
-0.28692173957824707,
-0.17057746648788452,
0.10487080365419388,
0.26744091510772705,
0.3569685220718384,
0.5967714190483093,
-0.09184741973876953,
0.3900044560432434,
0.13155756890773773,
-0.04119276627898216,
0.1388920098543167,
-0.06693685054779053,
-0.021814581006765366,
-0.14928142726421356,
0.14716382324695587,
0.18394847214221954,
-0.3534565567970276,
-0.5560477375984192,
-0.058566972613334656,
-0.43790310621261597,
0.101499542593956,
-0.15147554874420166,
0.03690805286169052,
0.07629907876253128,
0.4020797312259674,
-0.2050609290599823,
0.10263974964618683,
0.0924692377448082,
-0.07129118591547012,
-0.28510358929634094,
-0.14817975461483002,
-0.11888288706541061,
-0.05189964547753334,
-0.01140923798084259,
0.1653687208890915,
0.12481328845024109,
0.37369227409362793,
-0.5742104649543762,
-0.037167664617300034,
-0.29506823420524597,
-0.21038177609443665,
-0.28057268261909485,
-0.06426627188920975,
0.33693233132362366,
-0.05777492746710777,
0.006412407383322716,
0.06137534976005554,
0.01364731416106224,
0.02398598939180374,
0.04759296402335167,
0.28497493267059326,
0.2467295229434967,
0.2743972837924957,
0.02631485089659691,
0.7497295141220093,
-0.02383672446012497,
0.180414080619812,
0.08029916137456894,
-0.17573976516723633,
0.45122283697128296,
0.14867770671844482,
-0.10184108465909958,
0.6407608985900879,
0.0993366688489914,
-0.1402498185634613,
-0.10927200317382812,
0.042149245738983154,
-0.20272491872310638,
-0.13068705797195435,
-0.005087606608867645,
-0.19248217344284058,
-0.1457650363445282,
0.3520159423351288,
-0.3024119436740875,
0.3199042081832886,
0.1387394219636917,
0.05951957404613495,
-0.003127962350845337,
-0.20976004004478455,
-0.16487646102905273,
-0.12306943535804749,
-0.09784769266843796,
0.02295016497373581,
-0.05880327522754669,
-0.1668565273284912,
-0.3072408437728882,
0.043387435376644135,
-0.04851285740733147,
0.377621591091156,
-0.05635245144367218,
0.11679025739431381,
-0.008995912969112396,
-0.09572048485279083,
0.6420639753341675,
-0.300699919462204,
-0.10198019444942474,
-0.17174240946769714,
-0.27291440963745117,
-0.031083907932043076,
-0.20603224635124207,
0.02587156370282173,
-0.024333711713552475,
0.22242970764636993,
0.21765604615211487,
0.024713225662708282,
-0.35649386048316956,
0.3609442710876465,
-0.008644714951515198,
-0.1827370673418045,
-0.2881239950656891,
-0.04056002199649811,
-0.16853652894496918,
-0.2989383041858673,
-0.035491250455379486,
-0.10998135805130005,
0.13431625068187714,
-0.3868103623390198,
-0.08320575952529907,
0.07579367607831955,
0.15907907485961914,
0.13825610280036926,
-0.01894081011414528,
0.27103209495544434,
-0.20169182121753693,
0.11963893473148346,
0.05555882304906845,
0.24973663687705994,
0.24216915667057037,
0.19351127743721008,
0.11548183858394623,
-0.0036143958568573,
0.11059272289276123,
0.1066933199763298,
0.2411734163761139,
0.5215757489204407,
-0.20765995979309082,
-0.2883319556713104,
0.020866218954324722,
0.3867443799972534,
-0.2595761716365814,
0.4780765473842621,
0.3917366862297058,
0.17419686913490295,
-0.005110675934702158,
-0.34141722321510315,
0.044449128210544586,
0.13327233493328094,
-0.053830064833164215,
0.3611895442008972,
-0.24300526082515717,
-0.20356550812721252,
0.10210054367780685,
0.3517509400844574,
1.1873949766159058,
-0.2560913562774658,
0.013052672147750854,
0.1647394895553589,
-0.30053073167800903,
0.6263619661331177,
-0.625778079032898,
0.2518238127231598,
-0.26333335041999817,
-0.3297612965106964,
0.1888357549905777,
-0.2192295342683792,
-0.002086736261844635,
-0.015976399183273315,
0.16008496284484863,
0.3508228063583374,
0.1531193107366562,
0.1187235563993454,
-0.08072347193956375,
0.2111988067626953,
-0.19023500382900238,
-0.05563958361744881,
-0.19482015073299408,
0.047927454113960266,
-0.2505906820297241,
-0.015919972211122513,
-0.30737945437431335,
0.09169749915599823,
0.22449761629104614,
0.021404743194580078,
-0.3516777753829956,
0.25864627957344055,
-0.30154821276664734,
-0.11288443207740784,
-0.024361006915569305,
-0.1529855728149414,
0.1045917272567749,
0.5068589448928833,
0.2185697704553604,
0.33337265253067017,
-0.08062941581010818,
0.40471675992012024,
0.018613319844007492,
-0.17460957169532776,
0.1528114676475525,
0.12573722004890442,
0.407822847366333,
-0.23510423302650452,
-0.4662654399871826,
0.05772173032164574,
-0.22224077582359314,
0.03516865521669388,
-0.38480859994888306,
0.081668920814991,
0.16467244923114777,
-0.18538159132003784,
-0.32259640097618103,
0.21704980731010437,
-0.0774097591638565,
-0.001583382487297058,
0.0892888754606247,
-0.019572943449020386,
-0.2598622143268585,
0.18757811188697815,
-0.24570603668689728,
-0.35194796323776245,
-0.02870432659983635,
-0.15702331066131592,
0.37778788805007935,
-0.2217346578836441,
0.5133670568466187,
0.21774078905582428,
0.06077555567026138,
-0.1719810664653778,
-0.13404661417007446,
0.40282341837882996,
-0.42648348212242126,
0.08628234267234802,
-0.018437162041664124,
-0.2969436049461365,
0.04750003665685654,
-0.14471614360809326,
-0.04759429395198822,
0.2825298607349396,
0.05756788328289986,
-0.21744365990161896,
-0.3293708562850952,
0.13833662867546082,
-0.3302876055240631,
0.36616313457489014,
-0.19536885619163513,
0.28609195351600647,
-0.005943732336163521,
-0.08717446029186249,
-0.21075521409511566,
0.06397361308336258,
-0.42249080538749695,
0.2527047395706177,
-0.06691496819257736,
0.037265803664922714,
0.09308962523937225,
-0.1990072876214981,
-0.0715906023979187,
0.0023613926023244858,
-0.16823691129684448,
-0.11563581228256226,
0.12576355040073395,
0.14029264450073242,
-0.025738965719938278,
-0.34145694971084595,
-0.0205155648291111,
-0.5516072511672974,
-0.13324251770973206,
-0.18896348774433136,
0.19231480360031128,
-0.0932830274105072,
-0.12948743999004364,
0.0674365758895874,
-0.05566702410578728,
0.25432005524635315,
0.10819727182388306,
0.42037302255630493,
0.07664119452238083,
0.4934372305870056,
-0.10158327221870422,
0.2945255637168884,
0.29345738887786865,
-0.041786450892686844,
-0.42612433433532715,
-0.011092975735664368,
-0.024180784821510315,
0.23524150252342224,
0.10725151002407074,
-0.2775578498840332,
-0.16204608976840973,
-0.053276777267456055,
0.2861033082008362,
0.4138427972793579,
-0.23306837677955627,
0.146237313747406,
0.34753748774528503,
0.13508032262325287,
0.07833971083164215,
0.22168685495853424,
0.33784645795822144,
0.003028303850442171,
-0.0667118951678276,
0.005376338958740234,
0.08287031948566437,
-0.11304350197315216,
-0.13126204907894135,
0.2187248170375824,
-0.27842092514038086,
-0.5897895097732544,
0.00042368099093437195,
0.014626946300268173,
-0.056450262665748596,
-0.12236489355564117,
-0.0013479441404342651,
0.12530817091464996,
0.14009372889995575,
0.7140223383903503,
0.11960773169994354,
0.18026210367679596,
0.32365965843200684,
0.21127372980117798,
-0.015298672020435333,
-0.45878127217292786,
-0.2097761183977127,
0.5016226768493652,
-0.2853482961654663,
0.23913869261741638,
-0.2798146605491638,
0.022403918206691742,
0.22009502351284027,
-0.3724938631057739,
-0.03787325322628021,
0.1936887949705124,
-0.2706792652606964,
0.038121797144412994,
-0.29689574241638184,
-0.11415412276983261,
-0.04193955659866333,
0.230354905128479,
0.2111303061246872,
-0.276108980178833,
0.20923291146755219,
0.13155284523963928,
-0.41753292083740234,
-0.01957881636917591,
0.28620675206184387,
0.36564937233924866,
-0.03545915335416794,
-0.404375821352005,
0.15768000483512878,
0.11825551837682724,
-0.07216836512088776,
-0.11964535713195801,
0.29820477962493896,
0.47275474667549133,
0.4340927302837372,
-0.22080668807029724,
0.05388457700610161,
0.47984087467193604,
0.047490693628787994,
-0.2682685852050781,
0.04548002406954765,
0.46884146332740784,
0.5673755407333374,
0.11229319870471954,
0.11769168078899384,
-0.05809282138943672,
-0.055296484380960464,
0.34776026010513306,
0.3328334093093872,
-0.3607565462589264,
-0.05689644068479538,
0.097407765686512,
-0.22215485572814941,
-0.16654007136821747,
0.04301707074046135,
-0.34958335757255554,
-0.06010240316390991,
0.47086891531944275,
-0.06964875012636185,
0.2441125214099884,
0.0441695936024189,
0.023393332958221436,
-0.19039396941661835,
0.45347529649734497,
0.20711052417755127,
0.292917400598526,
-0.4905242323875427,
-0.4067947268486023,
-0.30933231115341187,
0.04232364147901535,
-0.09486755728721619,
0.24090924859046936,
0.23384852707386017,
0.2883282005786896,
-0.10818088799715042,
-0.32197409868240356,
-0.27338141202926636,
-0.06440094858407974,
0.09485878795385361,
0.3143032193183899,
-0.38965904712677,
-0.42241427302360535,
-0.0865737795829773,
0.09856484085321426,
0.3361666202545166,
-0.2893314063549042,
0.12364637851715088,
-0.21641206741333008,
-0.20058193802833557,
0.2649870812892914,
0.21116748452186584,
-0.043314892798662186,
-0.07020630687475204,
0.30581146478652954,
0.10352607071399689,
0.3858698010444641,
0.10868262499570847,
-0.29201656579971313,
-0.4035603106021881,
-0.4986024498939514,
-0.21533772349357605,
-0.056619398295879364,
-0.0025109685957431793,
0.24292710423469543,
-0.3103574812412262,
0.270866334438324,
-0.2856939435005188,
-0.14194855093955994,
-0.032260917127132416,
0.30050626397132874,
-0.016372621059417725,
-0.19375090301036835,
0.20532333850860596,
0.19772933423519135,
0.24480412900447845,
0.2973262667655945,
-0.06112440675497055,
-0.006612565368413925,
-0.3463704586029053,
-0.1477833092212677,
0.42900025844573975,
0.0910186618566513,
-0.3435969352722168,
-0.2823697328567505,
0.08761527389287949,
0.17529022693634033,
-0.0303731020539999,
-0.47166335582733154,
-0.022052429616451263,
0.13011808693408966,
0.14728863537311554,
-0.2639214098453522,
0.05785626918077469,
-0.35397693514823914,
0.1769774705171585,
0.06097136810421944,
0.1225929707288742,
-0.01870589330792427,
-0.2262902408838272,
0.15499339997768402,
-0.08807773888111115
] |
https://github.com/huggingface/datasets/issues/4524 | Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException) | Hi @dan-the-meme-man, thanks for reporting.
We are investigating a similar issue but with Beam+Dataflow (instead of Beam+Flink):
- #4525
In order to go deeper into the root cause, we need as much information as possible: logs from the main process + logs from the workers are very informative.
In the case of the issue with Beam+Dataflow, the logs from the workers report an out of memory issue. | ## Describe the bug
When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs.
## Steps to reproduce the bug
```python
# bash commands
!pip install datasets
!pip install apache-beam[interactive]
!pip install mwparserfromhell
!pip install dill==0.3.5.1
!pip install requests==2.23.0
# imports
import os
from datasets import load_dataset
import apache_beam as beam
import mwparserfromhell
from google.colab import drive
import dill
import requests
# mount drive
drive_dir = os.path.join(os.getcwd(), 'drive')
drive.mount(drive_dir)
# confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands
print(dill.__version__)
print(requests.__version__)
lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue
lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang)
if not os.path.exists(lang_dir):
x = None
x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
split='train')
x.save_to_disk(lang_dir)
```
## Expected results
Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error.
## Actual results
Traceback below:
```
Exception in thread run_worker_3-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run
for work_request in self._control_stub.Control(get_responses()):
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Socket closed"
debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}"
>
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
Exception in thread read_grpc_client_inputs:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda>
target=lambda: self._read_inputs(elements_iterator),
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module>
18 x = None
19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
---> 20 split='train')
21 x.save_to_disk(lang_dir)
3 frames
[/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration)
604
605 if self._runtime_exception:
--> 606 raise self._runtime_exception
607
608 return self._state
RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
| 67 | Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException)
## Describe the bug
When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs.
## Steps to reproduce the bug
```python
# bash commands
!pip install datasets
!pip install apache-beam[interactive]
!pip install mwparserfromhell
!pip install dill==0.3.5.1
!pip install requests==2.23.0
# imports
import os
from datasets import load_dataset
import apache_beam as beam
import mwparserfromhell
from google.colab import drive
import dill
import requests
# mount drive
drive_dir = os.path.join(os.getcwd(), 'drive')
drive.mount(drive_dir)
# confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands
print(dill.__version__)
print(requests.__version__)
lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue
lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang)
if not os.path.exists(lang_dir):
x = None
x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
split='train')
x.save_to_disk(lang_dir)
```
## Expected results
Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error.
## Actual results
Traceback below:
```
Exception in thread run_worker_3-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run
for work_request in self._control_stub.Control(get_responses()):
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Socket closed"
debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}"
>
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
Exception in thread read_grpc_client_inputs:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda>
target=lambda: self._read_inputs(elements_iterator),
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module>
18 x = None
19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
---> 20 split='train')
21 x.save_to_disk(lang_dir)
3 frames
[/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration)
604
605 if self._runtime_exception:
--> 606 raise self._runtime_exception
607
608 return self._state
RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
Hi @dan-the-meme-man, thanks for reporting.
We are investigating a similar issue but with Beam+Dataflow (instead of Beam+Flink):
- #4525
In order to go deeper into the root cause, we need as much information as possible: logs from the main process + logs from the workers are very informative.
In the case of the issue with Beam+Dataflow, the logs from the workers report an out of memory issue. | [
-0.1141185313463211,
0.04956594109535217,
-0.06658198684453964,
0.2739277184009552,
-0.010553043335676193,
0.06644310802221298,
0.2546956241130829,
0.23666155338287354,
0.049875009804964066,
0.20283326506614685,
0.2942869961261749,
-0.005584292113780975,
-0.030993543565273285,
-0.12871453166007996,
-0.10305894911289215,
-0.47226062417030334,
0.0018324628472328186,
0.10724346339702606,
-0.22562387585639954,
0.142754927277565,
-0.16223756968975067,
0.4710835814476013,
-0.14502659440040588,
-0.011380068957805634,
0.14232796430587769,
-0.21091046929359436,
0.1944633275270462,
0.0419132336974144,
-0.1338081657886505,
-0.1276470422744751,
0.010013671591877937,
-0.040162164717912674,
-0.052909109741449356,
0.24688485264778137,
-0.00012629799311980605,
-0.02085847035050392,
0.5169038772583008,
-0.05459171533584595,
-0.3701651394367218,
-0.2900087237358093,
0.024071447551250458,
-0.2993486523628235,
0.27404025197029114,
-0.11097583919763565,
0.2210451364517212,
0.10671292245388031,
0.18710410594940186,
-0.19732722640037537,
0.183198019862175,
0.10783840715885162,
0.08149982988834381,
0.42113378643989563,
0.14278967678546906,
-0.06363869458436966,
0.7317013740539551,
-0.33503299951553345,
-0.1974579393863678,
0.24268709123134613,
0.2951291799545288,
0.13208577036857605,
-0.03321916610002518,
0.4213660657405853,
-0.11209526658058167,
-0.2540782392024994,
0.046359188854694366,
-0.3385380804538727,
-0.1107623353600502,
-0.2929506301879883,
0.09453508257865906,
0.2673426866531372,
0.5003007650375366,
-0.15002763271331787,
-0.15802925825119019,
-0.15936319530010223,
-0.00974993221461773,
-0.07924841344356537,
0.49657848477363586,
0.023315295577049255,
-0.19865582883358002,
0.10992982983589172,
0.16255642473697662,
0.07208682596683502,
-0.15435823798179626,
0.21760126948356628,
0.1405707597732544,
0.5647544860839844,
0.06869696080684662,
0.356091171503067,
0.002707086503505707,
0.12924297153949738,
0.26512351632118225,
-0.15249092876911163,
0.14444465935230255,
-0.17836116254329681,
-0.11051177978515625,
0.13040003180503845,
0.07714231312274933,
0.10710333287715912,
0.13184568285942078,
-0.05846218019723892,
0.11517966538667679,
0.00892920047044754,
0.04698367789387703,
0.27229684591293335,
0.1541304737329483,
0.20158395171165466,
0.23488029837608337,
-0.313758909702301,
0.3322216868400574,
0.3094932734966278,
0.1757386326789856,
0.28387370705604553,
0.09990900754928589,
-0.3499845862388611,
-0.5064929127693176,
0.2662244439125061,
-0.00203566811978817,
-0.004319474101066589,
-0.19313402473926544,
0.2257576435804367,
-0.6439700126647949,
0.041688837110996246,
-0.006835847161710262,
0.15470096468925476,
-0.07256752997636795,
0.6961513161659241,
0.27570974826812744,
0.11233574151992798,
-0.2948036193847656,
-0.16789202392101288,
0.12321572750806808,
0.31207236647605896,
-0.08863374590873718,
-0.20962873101234436,
0.13598060607910156,
-0.18644046783447266,
0.20910106599330902,
0.017662227153778076,
-0.030136436223983765,
0.09205080568790436,
0.11757831275463104,
-0.22720564901828766,
-0.37049809098243713,
0.37331584095954895,
0.23298609256744385,
0.3694442808628082,
0.06614930182695389,
0.0362563356757164,
-0.16672304272651672,
0.17900055646896362,
-0.014222465455532074,
-0.059594038873910904,
0.1860922873020172,
0.045462168753147125,
-0.07173625379800797,
0.08872461318969727,
-0.09922834485769272,
-0.0649833083152771,
0.004452817142009735,
-0.3025408983230591,
0.05820401757955551,
-0.49241960048675537,
-0.2624351382255554,
-0.17614257335662842,
-0.10532667487859726,
0.40024667978286743,
-0.22078929841518402,
-0.10632635653018951,
-0.12872129678726196,
-0.13949313759803772,
-0.013925723731517792,
0.10333885252475739,
-0.13725712895393372,
0.20854538679122925,
-0.15089593827724457,
0.060746341943740845,
0.4071860611438751,
-0.3241088390350342,
-0.17039699852466583,
0.22107639908790588,
-0.03318541869521141,
0.14421167969703674,
0.18964210152626038,
0.027599038556218147,
0.16272278130054474,
0.008881052024662495,
-0.10175660252571106,
0.35468554496765137,
-0.026672178879380226,
-0.000700557604432106,
-0.30604925751686096,
-0.3537541627883911,
0.1794733852148056,
0.10420630872249603,
0.2660719156265259,
-0.05698416382074356,
0.3031668961048126,
0.11977333575487137,
0.12693582475185394,
-0.05581193044781685,
0.11499164253473282,
0.73151034116745,
-0.159241184592247,
0.09134736657142639,
-0.022256044670939445,
0.015868201851844788,
-0.15604335069656372,
0.2467743456363678,
-0.11685207486152649,
0.18563894927501678,
-0.00765073299407959,
0.041658759117126465,
-0.40022265911102295,
0.16203640401363373,
0.10666270554065704,
-0.031964290887117386,
-0.03817228600382805,
0.21621905267238617,
-0.28205397725105286,
0.4401136338710785,
0.18694549798965454,
0.14329656958580017,
-0.1998371183872223,
-0.08469764143228531,
-0.16268135607242584,
0.17568747699260712,
-0.31991061568260193,
-0.017199639230966568,
0.04878183454275131,
-0.02440650761127472,
0.311388224363327,
-0.18496155738830566,
-0.2718210518360138,
0.06939157098531723,
0.16180512309074402,
0.1644623577594757,
0.08438421785831451,
-0.10362653434276581,
0.27533113956451416,
0.010111253708600998,
0.041107483208179474,
0.30918702483177185,
0.16797931492328644,
-0.11558808386325836,
0.31441232562065125,
0.21598957479000092,
0.13580630719661713,
0.16527707874774933,
0.14682160317897797,
0.20393219590187073,
0.3249613642692566,
0.15226079523563385,
-0.11839236319065094,
-0.09883710741996765,
0.37067705392837524,
0.34870821237564087,
0.05085769668221474,
-0.15496568381786346,
-0.1854943186044693,
0.07260771095752716,
0.39596936106681824,
0.003978818655014038,
0.07251060009002686,
0.04629072546958923,
0.01465018093585968,
-0.03988461196422577,
0.4833560883998871,
0.15917178988456726,
0.17968928813934326,
0.007901683449745178,
0.11460477113723755,
0.02927973121404648,
-0.04626496881246567,
-0.16476009786128998,
0.15624722838401794,
0.3143112063407898,
0.3088589012622833,
0.2512184977531433,
0.15371958911418915,
0.07222523540258408,
-0.15231359004974365,
-0.21758584678173065,
-0.0958160012960434,
-0.07074309140443802,
-0.19484584033489227,
0.19762831926345825,
-0.22760361433029175,
-0.23802009224891663,
-0.4610196650028229,
0.08430962264537811,
-0.568860650062561,
-0.5121237635612488,
0.08217187225818634,
0.31587085127830505,
-0.2811777889728546,
0.39011532068252563,
0.3176363408565521,
-0.022008925676345825,
0.17958106100559235,
-0.37014856934547424,
-0.15913672745227814,
-0.2854551672935486,
-0.5522995591163635,
-0.09681688249111176,
0.2130575180053711,
0.0868811383843422,
0.14161889255046844,
-0.09732016921043396,
-0.39080482721328735,
-0.47528427839279175,
-0.3241932988166809,
0.3556431829929352,
-0.23266305029392242,
0.10800907015800476,
0.3426862359046936,
0.26336944103240967,
-0.19274823367595673,
-0.0845302864909172,
0.08172716200351715,
-0.14627605676651,
-0.09422338753938675,
0.048233047127723694,
0.09800852835178375,
0.09471797198057175,
-0.25899243354797363,
-0.31980741024017334,
-0.19049808382987976,
-0.43112286925315857,
-0.04520619660615921,
-0.04564196988940239,
0.0976526141166687,
0.17855387926101685,
0.2754158079624176,
0.1559879034757614,
0.27617451548576355,
0.0664050504565239,
0.058968253433704376,
0.22757557034492493,
0.020230360329151154,
-0.14309121668338776,
-0.3923976421356201,
0.22159308195114136,
0.056200236082077026,
-0.09792342782020569,
0.42462778091430664,
-0.41420477628707886,
-0.32620230317115784,
0.052505478262901306,
0.05921713635325432,
-0.20881611108779907,
-0.15813036262989044,
0.5095481872558594,
0.0440707802772522,
0.2000277191400528,
-0.2905828356742859,
-0.14524002373218536,
0.014333769679069519,
-0.2523781359195709,
0.30861544609069824,
0.19026777148246765,
0.41490638256073,
0.11107403039932251,
0.9283589720726013,
-0.03385474905371666,
0.31512895226478577,
0.4428243935108185,
0.30713745951652527,
0.23738563060760498,
-0.31578853726387024,
0.07433831691741943,
0.01649090275168419,
-0.08220508694648743,
-0.10964271426200867,
0.12276552617549896,
-0.13844344019889832,
-0.19103720784187317,
-0.30337920784950256,
0.00801829993724823,
-0.27288562059402466,
-0.20326553285121918,
0.17144443094730377,
0.02054750733077526,
0.2660180926322937,
0.13098162412643433,
0.20306748151779175,
0.09430530667304993,
0.04754636436700821,
0.06843852996826172,
0.3838741183280945,
-0.24178439378738403,
0.12306860089302063,
0.2982792556285858,
0.06861801445484161,
-0.47749292850494385,
0.35867932438850403,
0.38681289553642273,
0.4339747726917267,
-0.0660298690199852,
-0.0017034076154232025,
0.014704108238220215,
-0.1796928346157074,
0.17116867005825043,
-0.41201087832450867,
0.19966812431812286,
0.37459224462509155,
-0.01758897863328457,
-0.5598280429840088,
-0.19328108429908752,
-0.29296818375587463,
-0.39695191383361816,
0.5325961112976074,
-0.04933921992778778,
-0.5107924342155457,
0.0506557933986187,
0.16958817839622498,
0.05162908509373665,
0.1946628987789154,
0.17377448081970215,
-0.26874780654907227,
-0.4583147466182709,
-0.27976587414741516,
-0.07129519432783127,
0.04354880750179291,
0.2865728735923767,
-0.16606099903583527,
0.11292096972465515,
0.16458886861801147,
-0.1798023283481598,
-0.28969520330429077,
-0.07586497068405151,
0.007035461254417896,
-0.194771870970726,
-0.14945486187934875,
-0.31854090094566345,
0.3579431176185608,
-0.11518760025501251,
0.05525537580251694,
0.0473485141992569,
-0.1084781289100647,
0.3820594847202301,
0.06324385851621628,
-0.26345890760421753,
0.4673122763633728,
-0.222415030002594,
0.16655728220939636,
-0.07690495252609253,
-0.1954372376203537,
0.3685409426689148,
0.19444991648197174,
0.16841241717338562,
-0.00404575327411294,
-0.22462540864944458,
-0.16735312342643738,
0.25623565912246704,
0.1510467380285263,
-0.12324079126119614,
0.3908015787601471,
-0.24999700486660004,
-0.28188201785087585,
0.4415457844734192,
0.0843772143125534,
1.056862711906433,
-0.12118077278137207,
0.20113012194633484,
0.41624218225479126,
-0.33960628509521484,
0.4328427016735077,
-0.3258034586906433,
0.280412495136261,
-0.22197844088077545,
-0.0603354275226593,
-0.12983505427837372,
-0.13776768743991852,
0.3513633608818054,
-0.2255202978849411,
-0.3082580268383026,
0.3680858314037323,
0.011179760098457336,
0.40849271416664124,
0.08288221806287766,
0.09296752512454987,
-0.543188750743866,
-0.045947957783937454,
-0.33891209959983826,
-0.02120976150035858,
-0.05026489496231079,
0.2919903099536896,
-0.4646501839160919,
-0.0688309445977211,
-0.2694350779056549,
-0.5700240731239319,
-0.4996815323829651,
0.07591382414102554,
-0.5514021515846252,
0.32080763578414917,
-0.4781772196292877,
-0.46517372131347656,
0.12456640601158142,
0.21549378335475922,
-0.029865875840187073,
0.06995606422424316,
-0.2599618434906006,
0.4516775608062744,
-0.3524903655052185,
-0.07373666018247604,
0.0732668787240982,
0.03802299499511719,
0.2163267880678177,
-0.27477672696113586,
0.12258581072092056,
-0.08729075640439987,
-0.4289621114730835,
-0.22635044157505035,
-0.10119615495204926,
0.1875729262828827,
0.22567416727542877,
0.1256755292415619,
-0.09069111943244934,
0.1056724265217781,
-0.15155275166034698,
-0.24840284883975983,
-0.0039616841822862625,
-0.2437572330236435,
0.06866458058357239,
-0.1445099413394928,
-0.2403022199869156,
-0.11066867411136627,
-0.044122252613306046,
0.4871910810470581,
0.033697597682476044,
-0.05174262449145317,
0.3490384817123413,
0.28123292326927185,
-0.2708282470703125,
-0.11526324599981308,
-0.022339466959238052,
-0.5574508309364319,
-0.40707364678382874,
0.06362790614366531,
-0.32559481263160706,
-0.37126123905181885,
-0.27094316482543945,
0.4567202627658844,
0.1114077940583229,
0.26309967041015625,
0.11836639046669006,
-0.5893000960350037,
0.13719595968723297,
0.23386886715888977,
-0.09904773533344269,
0.008715298026800156,
0.08579085767269135,
0.22866691648960114,
0.21861551702022552,
-0.3202684819698334,
-0.0690787136554718,
0.03610820323228836,
-0.2552253305912018,
0.123984195291996,
0.2420825958251953,
0.03270024061203003,
0.20473170280456543,
0.09682726860046387,
-0.05941601097583771,
0.2653125822544098,
-0.3130396902561188,
0.002594791352748871,
-0.11944139003753662,
0.2067163586616516,
0.052151113748550415,
-0.06280552595853806,
0.1323820948600769,
-0.25166091322898865,
-0.09503638744354248,
-0.029445510357618332,
0.04722977802157402,
0.0853506326675415,
-0.20336799323558807,
-0.21150252223014832,
0.16602496802806854,
0.7569208741188049,
-0.14808708429336548,
0.16263744235038757,
-0.18597742915153503,
0.27118390798568726,
0.24016259610652924,
0.21045954525470734,
0.37370139360427856,
0.06217978894710541,
-0.304973840713501,
-0.036508724093437195,
-0.013588525354862213,
0.04430084303021431,
0.11879965662956238,
-0.09688794612884521,
-0.10494673997163773,
-0.029237061738967896,
0.38385528326034546,
0.16719989478588104,
-0.23442122340202332,
-0.27628952264785767,
0.35473790764808655,
0.023857316002249718,
-0.18757981061935425,
0.02655210718512535,
0.6213762760162354,
0.04718859866261482,
-0.21335451304912567,
0.08802610635757446,
0.36414018273353577,
-0.04640144109725952,
0.1436181366443634,
0.1696973443031311,
0.13923616707324982,
0.13289496302604675,
0.18715056777000427,
0.04416441172361374,
0.10728463530540466,
0.282624214887619,
-0.25162968039512634,
-0.1638917773962021,
0.2513800263404846,
0.0931742787361145,
-0.3232939541339874,
0.3264235258102417,
0.06636753678321838,
0.09352980554103851,
-0.15295591950416565,
-0.5462002158164978,
0.2676181197166443,
0.14018630981445312,
0.08974901586771011,
0.2835242748260498,
0.06104685366153717,
0.3059001863002777,
-0.18091605603694916,
-0.03422395512461662,
-0.333417683839798,
0.3660636246204376,
-0.08016393333673477,
0.08380566537380219,
0.009121198207139969,
-0.03733361139893532,
-0.0771409198641777,
0.21823179721832275,
0.17750266194343567,
0.1204865425825119,
0.23468507826328278,
0.4349623918533325,
-0.16102726757526398,
-0.5174186825752258,
0.0787772610783577,
-0.0928778275847435,
-0.03964381664991379,
-0.18778865039348602,
0.18256522715091705,
0.038221269845962524,
-0.02820935845375061,
-0.19198328256607056,
0.04890156164765358,
0.354024738073349,
0.19308646023273468,
-0.14248844981193542,
-0.3408809304237366,
-0.00476798415184021,
0.2924033999443054,
-0.13044732809066772,
-0.010475195944309235,
0.40439724922180176,
0.48321714997291565,
0.48133784532546997,
-0.05563438683748245,
-0.07852064818143845,
-0.14955386519432068,
0.20028024911880493,
0.051166512072086334,
-0.48392778635025024,
-0.008752062916755676,
-0.3092247545719147,
0.10348429530858994,
-0.30330511927604675,
0.19387301802635193,
-0.47974756360054016,
0.5162332057952881,
0.07864972949028015,
0.47857630252838135,
0.06022579222917557,
-0.07273280620574951,
-0.037278711795806885,
0.020102795213460922,
0.21930785477161407,
0.27007463574409485,
-0.05068354308605194,
-0.12884294986724854,
-0.28896039724349976,
-0.44386816024780273,
0.21207691729068756,
-0.2900163233280182,
0.14120692014694214,
0.02382267266511917,
0.003292163833975792,
0.1310284286737442,
0.09023885428905487,
0.2350347638130188,
0.2593669891357422,
0.055361196398735046,
-0.05873639136552811,
-0.3425421714782715,
-0.20924855768680573,
0.23407435417175293,
-0.3655557930469513,
-0.08342030644416809,
-0.36132264137268066,
0.07296717911958694,
-0.04607196897268295,
-0.06611097604036331,
-0.2549248933792114,
-0.46898895502090454,
0.19336025416851044,
-0.16332091391086578,
0.38753989338874817,
0.20658552646636963,
0.41420233249664307,
-0.04419386759400368,
-0.30351200699806213,
-0.2953838109970093,
-0.34249672293663025,
0.011895899660885334,
-0.04512923210859299,
-0.17641624808311462,
0.38792160153388977,
-0.15879951417446136,
0.04791852459311485,
-0.4456306993961334,
0.8013253211975098,
-0.11863487213850021,
0.2303192913532257,
-0.19796742498874664,
0.07407466322183609,
-0.26913687586784363,
0.3721279501914978,
-0.13797016441822052,
0.23607265949249268,
-0.0706782341003418,
0.11313043534755707,
-0.6486817598342896,
-0.34653136134147644,
0.24775639176368713,
-0.3834611475467682,
-0.3235161006450653,
0.1006699800491333,
0.01606975495815277,
0.04879799485206604,
0.04392438381910324,
-0.5278241634368896,
-0.09793058037757874,
0.02571374922990799,
0.23509421944618225,
-0.23149120807647705,
-0.01520569622516632,
-0.06225026771426201,
-0.10804009437561035,
-0.053531087934970856,
-0.3321961760520935,
0.09682886302471161,
-0.2962004244327545,
0.20201756060123444,
-0.3016108274459839
] |
https://github.com/huggingface/datasets/issues/4524 | Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException) | As I continued working on this today, I came to suspect that it is in fact an out of memory issue - I have a few more notebooks that I've left running, and if they produce the same error, I will try to get the logs. In the meantime, if there's any chance that there is a repo out there with those three languages already as .arrow files, or if you know about how much memory would be needed to actually download those sets, please let me know! | ## Describe the bug
When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs.
## Steps to reproduce the bug
```python
# bash commands
!pip install datasets
!pip install apache-beam[interactive]
!pip install mwparserfromhell
!pip install dill==0.3.5.1
!pip install requests==2.23.0
# imports
import os
from datasets import load_dataset
import apache_beam as beam
import mwparserfromhell
from google.colab import drive
import dill
import requests
# mount drive
drive_dir = os.path.join(os.getcwd(), 'drive')
drive.mount(drive_dir)
# confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands
print(dill.__version__)
print(requests.__version__)
lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue
lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang)
if not os.path.exists(lang_dir):
x = None
x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
split='train')
x.save_to_disk(lang_dir)
```
## Expected results
Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error.
## Actual results
Traceback below:
```
Exception in thread run_worker_3-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run
for work_request in self._control_stub.Control(get_responses()):
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Socket closed"
debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}"
>
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
Exception in thread read_grpc_client_inputs:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda>
target=lambda: self._read_inputs(elements_iterator),
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module>
18 x = None
19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
---> 20 split='train')
21 x.save_to_disk(lang_dir)
3 frames
[/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration)
604
605 if self._runtime_exception:
--> 606 raise self._runtime_exception
607
608 return self._state
RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
| 88 | Downloading via Apache Pipeline, client cancelled (org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException)
## Describe the bug
When downloading some `wikipedia` languages (in particular, I'm having a hard time with Spanish, Cebuano, and Russian) via FlinkRunner, I encounter the exception in the title. I have been playing with package versions a lot, because unfortunately, the different dependencies required by these packages seem to be incompatible in terms of versions (dill and requests, for instance). It should be noted that the following code runs for several hours without issue, executing the `load_dataset()` function, before the exception occurs.
## Steps to reproduce the bug
```python
# bash commands
!pip install datasets
!pip install apache-beam[interactive]
!pip install mwparserfromhell
!pip install dill==0.3.5.1
!pip install requests==2.23.0
# imports
import os
from datasets import load_dataset
import apache_beam as beam
import mwparserfromhell
from google.colab import drive
import dill
import requests
# mount drive
drive_dir = os.path.join(os.getcwd(), 'drive')
drive.mount(drive_dir)
# confirming the versions of these two packages are the ones that are suggested by the outputs from the bash commands
print(dill.__version__)
print(requests.__version__)
lang = 'es' # or 'ru' or 'ceb' - these are the ones causing the issue
lang_dir = os.path.join(drive_dir, 'path/to/my/folder', lang)
if not os.path.exists(lang_dir):
x = None
x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
split='train')
x.save_to_disk(lang_dir)
```
## Expected results
Although some warnings are generally produced by this code (run in Colab Notebook), most languages I've tried have been successfully downloaded. It should simply go through without issue, but for these languages, I am continually encountering this error.
## Actual results
Traceback below:
```
Exception in thread run_worker_3-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in run
for work_request in self._control_stub.Control(get_responses()):
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Socket closed"
debug_error_string = "{"created":"@1655593643.871830638","description":"Error received from peer ipv4:127.0.0.1:44441","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Socket closed","grpc_status":14}"
>
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:apache_beam.runners.worker.sdk_worker:Error processing instruction 26. Original traceback is
Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 267, in _execute
response = task()
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 340, in <lambda>
lambda: self.create_worker().do_instruction(request), request)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 581, in do_instruction
getattr(request, request_type), request.instruction_id)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 618, in process_bundle
bundle_processor.process_bundle(instruction_id))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 996, in process_bundle
element.data)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 221, in process_encoded
self.output(decoded_value)
File "apache_beam/runners/worker/operations.py", line 346, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 348, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 215, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 707, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 708, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 1200, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1281, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 1198, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 718, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 782, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/bundle_processor.py", line 426, in __getitem__
self._cache[target_window] = self._side_input_data.view_fn(raw_view)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 391, in <lambda>
lambda iterable: from_runtime_iterable(iterable, view_options))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/pvalue.py", line 512, in _from_runtime_iterable
head = list(itertools.islice(it, 2))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1228, in _lazy_iterator
self._underlying.get_raw(state_key, continuation_token))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1019, in get_raw
continuation_token=continuation_token)))
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/sdk_worker.py", line 1060, in _blocking_request
raise RuntimeError(response.error)
RuntimeError: Unknown process bundle instruction id '26' [while running 'train/Save to parquet/Write/WriteImpl/WriteBundles']
ERROR:root:org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
ERROR:apache_beam.runners.worker.data_plane:Failed to read inputs in the data plane.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
Exception in thread read_grpc_client_inputs:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 651, in <lambda>
target=lambda: self._read_inputs(elements_iterator),
File "/usr/local/lib/python3.7/dist-packages/apache_beam/runners/worker/data_plane.py", line 634, in _read_inputs
for elements in elements_iterator:
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 426, in __next__
return self._next()
File "/usr/local/lib/python3.7/dist-packages/grpc/_channel.py", line 826, in _next
raise self
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.CANCELLED
details = "Multiplexer hanging up"
debug_error_string = "{"created":"@1655593654.436885887","description":"Error received from peer ipv4:127.0.0.1:43263","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Multiplexer hanging up","grpc_status":1}"
>
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[/tmp/ipykernel_219/3869142325.py](https://localhost:8080/#) in <module>
18 x = None
19 x = load_dataset('wikipedia', '20220301.' + lang, beam_runner='Flink',
---> 20 split='train')
21 x.save_to_disk(lang_dir)
3 frames
[/usr/local/lib/python3.7/dist-packages/apache_beam/runners/portability/portable_runner.py](https://localhost:8080/#) in wait_until_finish(self, duration)
604
605 if self._runtime_exception:
--> 606 raise self._runtime_exception
607
608 return self._state
RuntimeError: Pipeline BeamApp-root-0618220708-b3b59a0e_d8efcf67-9119-4f76-b013-70de7b29b54d failed in state FAILED: org.apache.beam.vendor.grpc.v1p43p2.io.grpc.StatusRuntimeException: CANCELLED: client cancelled
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.2
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
As I continued working on this today, I came to suspect that it is in fact an out of memory issue - I have a few more notebooks that I've left running, and if they produce the same error, I will try to get the logs. In the meantime, if there's any chance that there is a repo out there with those three languages already as .arrow files, or if you know about how much memory would be needed to actually download those sets, please let me know! | [
-0.1141185313463211,
0.04956594109535217,
-0.06658198684453964,
0.2739277184009552,
-0.010553043335676193,
0.06644310802221298,
0.2546956241130829,
0.23666155338287354,
0.049875009804964066,
0.20283326506614685,
0.2942869961261749,
-0.005584292113780975,
-0.030993543565273285,
-0.12871453166007996,
-0.10305894911289215,
-0.47226062417030334,
0.0018324628472328186,
0.10724346339702606,
-0.22562387585639954,
0.142754927277565,
-0.16223756968975067,
0.4710835814476013,
-0.14502659440040588,
-0.011380068957805634,
0.14232796430587769,
-0.21091046929359436,
0.1944633275270462,
0.0419132336974144,
-0.1338081657886505,
-0.1276470422744751,
0.010013671591877937,
-0.040162164717912674,
-0.052909109741449356,
0.24688485264778137,
-0.00012629799311980605,
-0.02085847035050392,
0.5169038772583008,
-0.05459171533584595,
-0.3701651394367218,
-0.2900087237358093,
0.024071447551250458,
-0.2993486523628235,
0.27404025197029114,
-0.11097583919763565,
0.2210451364517212,
0.10671292245388031,
0.18710410594940186,
-0.19732722640037537,
0.183198019862175,
0.10783840715885162,
0.08149982988834381,
0.42113378643989563,
0.14278967678546906,
-0.06363869458436966,
0.7317013740539551,
-0.33503299951553345,
-0.1974579393863678,
0.24268709123134613,
0.2951291799545288,
0.13208577036857605,
-0.03321916610002518,
0.4213660657405853,
-0.11209526658058167,
-0.2540782392024994,
0.046359188854694366,
-0.3385380804538727,
-0.1107623353600502,
-0.2929506301879883,
0.09453508257865906,
0.2673426866531372,
0.5003007650375366,
-0.15002763271331787,
-0.15802925825119019,
-0.15936319530010223,
-0.00974993221461773,
-0.07924841344356537,
0.49657848477363586,
0.023315295577049255,
-0.19865582883358002,
0.10992982983589172,
0.16255642473697662,
0.07208682596683502,
-0.15435823798179626,
0.21760126948356628,
0.1405707597732544,
0.5647544860839844,
0.06869696080684662,
0.356091171503067,
0.002707086503505707,
0.12924297153949738,
0.26512351632118225,
-0.15249092876911163,
0.14444465935230255,
-0.17836116254329681,
-0.11051177978515625,
0.13040003180503845,
0.07714231312274933,
0.10710333287715912,
0.13184568285942078,
-0.05846218019723892,
0.11517966538667679,
0.00892920047044754,
0.04698367789387703,
0.27229684591293335,
0.1541304737329483,
0.20158395171165466,
0.23488029837608337,
-0.313758909702301,
0.3322216868400574,
0.3094932734966278,
0.1757386326789856,
0.28387370705604553,
0.09990900754928589,
-0.3499845862388611,
-0.5064929127693176,
0.2662244439125061,
-0.00203566811978817,
-0.004319474101066589,
-0.19313402473926544,
0.2257576435804367,
-0.6439700126647949,
0.041688837110996246,
-0.006835847161710262,
0.15470096468925476,
-0.07256752997636795,
0.6961513161659241,
0.27570974826812744,
0.11233574151992798,
-0.2948036193847656,
-0.16789202392101288,
0.12321572750806808,
0.31207236647605896,
-0.08863374590873718,
-0.20962873101234436,
0.13598060607910156,
-0.18644046783447266,
0.20910106599330902,
0.017662227153778076,
-0.030136436223983765,
0.09205080568790436,
0.11757831275463104,
-0.22720564901828766,
-0.37049809098243713,
0.37331584095954895,
0.23298609256744385,
0.3694442808628082,
0.06614930182695389,
0.0362563356757164,
-0.16672304272651672,
0.17900055646896362,
-0.014222465455532074,
-0.059594038873910904,
0.1860922873020172,
0.045462168753147125,
-0.07173625379800797,
0.08872461318969727,
-0.09922834485769272,
-0.0649833083152771,
0.004452817142009735,
-0.3025408983230591,
0.05820401757955551,
-0.49241960048675537,
-0.2624351382255554,
-0.17614257335662842,
-0.10532667487859726,
0.40024667978286743,
-0.22078929841518402,
-0.10632635653018951,
-0.12872129678726196,
-0.13949313759803772,
-0.013925723731517792,
0.10333885252475739,
-0.13725712895393372,
0.20854538679122925,
-0.15089593827724457,
0.060746341943740845,
0.4071860611438751,
-0.3241088390350342,
-0.17039699852466583,
0.22107639908790588,
-0.03318541869521141,
0.14421167969703674,
0.18964210152626038,
0.027599038556218147,
0.16272278130054474,
0.008881052024662495,
-0.10175660252571106,
0.35468554496765137,
-0.026672178879380226,
-0.000700557604432106,
-0.30604925751686096,
-0.3537541627883911,
0.1794733852148056,
0.10420630872249603,
0.2660719156265259,
-0.05698416382074356,
0.3031668961048126,
0.11977333575487137,
0.12693582475185394,
-0.05581193044781685,
0.11499164253473282,
0.73151034116745,
-0.159241184592247,
0.09134736657142639,
-0.022256044670939445,
0.015868201851844788,
-0.15604335069656372,
0.2467743456363678,
-0.11685207486152649,
0.18563894927501678,
-0.00765073299407959,
0.041658759117126465,
-0.40022265911102295,
0.16203640401363373,
0.10666270554065704,
-0.031964290887117386,
-0.03817228600382805,
0.21621905267238617,
-0.28205397725105286,
0.4401136338710785,
0.18694549798965454,
0.14329656958580017,
-0.1998371183872223,
-0.08469764143228531,
-0.16268135607242584,
0.17568747699260712,
-0.31991061568260193,
-0.017199639230966568,
0.04878183454275131,
-0.02440650761127472,
0.311388224363327,
-0.18496155738830566,
-0.2718210518360138,
0.06939157098531723,
0.16180512309074402,
0.1644623577594757,
0.08438421785831451,
-0.10362653434276581,
0.27533113956451416,
0.010111253708600998,
0.041107483208179474,
0.30918702483177185,
0.16797931492328644,
-0.11558808386325836,
0.31441232562065125,
0.21598957479000092,
0.13580630719661713,
0.16527707874774933,
0.14682160317897797,
0.20393219590187073,
0.3249613642692566,
0.15226079523563385,
-0.11839236319065094,
-0.09883710741996765,
0.37067705392837524,
0.34870821237564087,
0.05085769668221474,
-0.15496568381786346,
-0.1854943186044693,
0.07260771095752716,
0.39596936106681824,
0.003978818655014038,
0.07251060009002686,
0.04629072546958923,
0.01465018093585968,
-0.03988461196422577,
0.4833560883998871,
0.15917178988456726,
0.17968928813934326,
0.007901683449745178,
0.11460477113723755,
0.02927973121404648,
-0.04626496881246567,
-0.16476009786128998,
0.15624722838401794,
0.3143112063407898,
0.3088589012622833,
0.2512184977531433,
0.15371958911418915,
0.07222523540258408,
-0.15231359004974365,
-0.21758584678173065,
-0.0958160012960434,
-0.07074309140443802,
-0.19484584033489227,
0.19762831926345825,
-0.22760361433029175,
-0.23802009224891663,
-0.4610196650028229,
0.08430962264537811,
-0.568860650062561,
-0.5121237635612488,
0.08217187225818634,
0.31587085127830505,
-0.2811777889728546,
0.39011532068252563,
0.3176363408565521,
-0.022008925676345825,
0.17958106100559235,
-0.37014856934547424,
-0.15913672745227814,
-0.2854551672935486,
-0.5522995591163635,
-0.09681688249111176,
0.2130575180053711,
0.0868811383843422,
0.14161889255046844,
-0.09732016921043396,
-0.39080482721328735,
-0.47528427839279175,
-0.3241932988166809,
0.3556431829929352,
-0.23266305029392242,
0.10800907015800476,
0.3426862359046936,
0.26336944103240967,
-0.19274823367595673,
-0.0845302864909172,
0.08172716200351715,
-0.14627605676651,
-0.09422338753938675,
0.048233047127723694,
0.09800852835178375,
0.09471797198057175,
-0.25899243354797363,
-0.31980741024017334,
-0.19049808382987976,
-0.43112286925315857,
-0.04520619660615921,
-0.04564196988940239,
0.0976526141166687,
0.17855387926101685,
0.2754158079624176,
0.1559879034757614,
0.27617451548576355,
0.0664050504565239,
0.058968253433704376,
0.22757557034492493,
0.020230360329151154,
-0.14309121668338776,
-0.3923976421356201,
0.22159308195114136,
0.056200236082077026,
-0.09792342782020569,
0.42462778091430664,
-0.41420477628707886,
-0.32620230317115784,
0.052505478262901306,
0.05921713635325432,
-0.20881611108779907,
-0.15813036262989044,
0.5095481872558594,
0.0440707802772522,
0.2000277191400528,
-0.2905828356742859,
-0.14524002373218536,
0.014333769679069519,
-0.2523781359195709,
0.30861544609069824,
0.19026777148246765,
0.41490638256073,
0.11107403039932251,
0.9283589720726013,
-0.03385474905371666,
0.31512895226478577,
0.4428243935108185,
0.30713745951652527,
0.23738563060760498,
-0.31578853726387024,
0.07433831691741943,
0.01649090275168419,
-0.08220508694648743,
-0.10964271426200867,
0.12276552617549896,
-0.13844344019889832,
-0.19103720784187317,
-0.30337920784950256,
0.00801829993724823,
-0.27288562059402466,
-0.20326553285121918,
0.17144443094730377,
0.02054750733077526,
0.2660180926322937,
0.13098162412643433,
0.20306748151779175,
0.09430530667304993,
0.04754636436700821,
0.06843852996826172,
0.3838741183280945,
-0.24178439378738403,
0.12306860089302063,
0.2982792556285858,
0.06861801445484161,
-0.47749292850494385,
0.35867932438850403,
0.38681289553642273,
0.4339747726917267,
-0.0660298690199852,
-0.0017034076154232025,
0.014704108238220215,
-0.1796928346157074,
0.17116867005825043,
-0.41201087832450867,
0.19966812431812286,
0.37459224462509155,
-0.01758897863328457,
-0.5598280429840088,
-0.19328108429908752,
-0.29296818375587463,
-0.39695191383361816,
0.5325961112976074,
-0.04933921992778778,
-0.5107924342155457,
0.0506557933986187,
0.16958817839622498,
0.05162908509373665,
0.1946628987789154,
0.17377448081970215,
-0.26874780654907227,
-0.4583147466182709,
-0.27976587414741516,
-0.07129519432783127,
0.04354880750179291,
0.2865728735923767,
-0.16606099903583527,
0.11292096972465515,
0.16458886861801147,
-0.1798023283481598,
-0.28969520330429077,
-0.07586497068405151,
0.007035461254417896,
-0.194771870970726,
-0.14945486187934875,
-0.31854090094566345,
0.3579431176185608,
-0.11518760025501251,
0.05525537580251694,
0.0473485141992569,
-0.1084781289100647,
0.3820594847202301,
0.06324385851621628,
-0.26345890760421753,
0.4673122763633728,
-0.222415030002594,
0.16655728220939636,
-0.07690495252609253,
-0.1954372376203537,
0.3685409426689148,
0.19444991648197174,
0.16841241717338562,
-0.00404575327411294,
-0.22462540864944458,
-0.16735312342643738,
0.25623565912246704,
0.1510467380285263,
-0.12324079126119614,
0.3908015787601471,
-0.24999700486660004,
-0.28188201785087585,
0.4415457844734192,
0.0843772143125534,
1.056862711906433,
-0.12118077278137207,
0.20113012194633484,
0.41624218225479126,
-0.33960628509521484,
0.4328427016735077,
-0.3258034586906433,
0.280412495136261,
-0.22197844088077545,
-0.0603354275226593,
-0.12983505427837372,
-0.13776768743991852,
0.3513633608818054,
-0.2255202978849411,
-0.3082580268383026,
0.3680858314037323,
0.011179760098457336,
0.40849271416664124,
0.08288221806287766,
0.09296752512454987,
-0.543188750743866,
-0.045947957783937454,
-0.33891209959983826,
-0.02120976150035858,
-0.05026489496231079,
0.2919903099536896,
-0.4646501839160919,
-0.0688309445977211,
-0.2694350779056549,
-0.5700240731239319,
-0.4996815323829651,
0.07591382414102554,
-0.5514021515846252,
0.32080763578414917,
-0.4781772196292877,
-0.46517372131347656,
0.12456640601158142,
0.21549378335475922,
-0.029865875840187073,
0.06995606422424316,
-0.2599618434906006,
0.4516775608062744,
-0.3524903655052185,
-0.07373666018247604,
0.0732668787240982,
0.03802299499511719,
0.2163267880678177,
-0.27477672696113586,
0.12258581072092056,
-0.08729075640439987,
-0.4289621114730835,
-0.22635044157505035,
-0.10119615495204926,
0.1875729262828827,
0.22567416727542877,
0.1256755292415619,
-0.09069111943244934,
0.1056724265217781,
-0.15155275166034698,
-0.24840284883975983,
-0.0039616841822862625,
-0.2437572330236435,
0.06866458058357239,
-0.1445099413394928,
-0.2403022199869156,
-0.11066867411136627,
-0.044122252613306046,
0.4871910810470581,
0.033697597682476044,
-0.05174262449145317,
0.3490384817123413,
0.28123292326927185,
-0.2708282470703125,
-0.11526324599981308,
-0.022339466959238052,
-0.5574508309364319,
-0.40707364678382874,
0.06362790614366531,
-0.32559481263160706,
-0.37126123905181885,
-0.27094316482543945,
0.4567202627658844,
0.1114077940583229,
0.26309967041015625,
0.11836639046669006,
-0.5893000960350037,
0.13719595968723297,
0.23386886715888977,
-0.09904773533344269,
0.008715298026800156,
0.08579085767269135,
0.22866691648960114,
0.21861551702022552,
-0.3202684819698334,
-0.0690787136554718,
0.03610820323228836,
-0.2552253305912018,
0.123984195291996,
0.2420825958251953,
0.03270024061203003,
0.20473170280456543,
0.09682726860046387,
-0.05941601097583771,
0.2653125822544098,
-0.3130396902561188,
0.002594791352748871,
-0.11944139003753662,
0.2067163586616516,
0.052151113748550415,
-0.06280552595853806,
0.1323820948600769,
-0.25166091322898865,
-0.09503638744354248,
-0.029445510357618332,
0.04722977802157402,
0.0853506326675415,
-0.20336799323558807,
-0.21150252223014832,
0.16602496802806854,
0.7569208741188049,
-0.14808708429336548,
0.16263744235038757,
-0.18597742915153503,
0.27118390798568726,
0.24016259610652924,
0.21045954525470734,
0.37370139360427856,
0.06217978894710541,
-0.304973840713501,
-0.036508724093437195,
-0.013588525354862213,
0.04430084303021431,
0.11879965662956238,
-0.09688794612884521,
-0.10494673997163773,
-0.029237061738967896,
0.38385528326034546,
0.16719989478588104,
-0.23442122340202332,
-0.27628952264785767,
0.35473790764808655,
0.023857316002249718,
-0.18757981061935425,
0.02655210718512535,
0.6213762760162354,
0.04718859866261482,
-0.21335451304912567,
0.08802610635757446,
0.36414018273353577,
-0.04640144109725952,
0.1436181366443634,
0.1696973443031311,
0.13923616707324982,
0.13289496302604675,
0.18715056777000427,
0.04416441172361374,
0.10728463530540466,
0.282624214887619,
-0.25162968039512634,
-0.1638917773962021,
0.2513800263404846,
0.0931742787361145,
-0.3232939541339874,
0.3264235258102417,
0.06636753678321838,
0.09352980554103851,
-0.15295591950416565,
-0.5462002158164978,
0.2676181197166443,
0.14018630981445312,
0.08974901586771011,
0.2835242748260498,
0.06104685366153717,
0.3059001863002777,
-0.18091605603694916,
-0.03422395512461662,
-0.333417683839798,
0.3660636246204376,
-0.08016393333673477,
0.08380566537380219,
0.009121198207139969,
-0.03733361139893532,
-0.0771409198641777,
0.21823179721832275,
0.17750266194343567,
0.1204865425825119,
0.23468507826328278,
0.4349623918533325,
-0.16102726757526398,
-0.5174186825752258,
0.0787772610783577,
-0.0928778275847435,
-0.03964381664991379,
-0.18778865039348602,
0.18256522715091705,
0.038221269845962524,
-0.02820935845375061,
-0.19198328256607056,
0.04890156164765358,
0.354024738073349,
0.19308646023273468,
-0.14248844981193542,
-0.3408809304237366,
-0.00476798415184021,
0.2924033999443054,
-0.13044732809066772,
-0.010475195944309235,
0.40439724922180176,
0.48321714997291565,
0.48133784532546997,
-0.05563438683748245,
-0.07852064818143845,
-0.14955386519432068,
0.20028024911880493,
0.051166512072086334,
-0.48392778635025024,
-0.008752062916755676,
-0.3092247545719147,
0.10348429530858994,
-0.30330511927604675,
0.19387301802635193,
-0.47974756360054016,
0.5162332057952881,
0.07864972949028015,
0.47857630252838135,
0.06022579222917557,
-0.07273280620574951,
-0.037278711795806885,
0.020102795213460922,
0.21930785477161407,
0.27007463574409485,
-0.05068354308605194,
-0.12884294986724854,
-0.28896039724349976,
-0.44386816024780273,
0.21207691729068756,
-0.2900163233280182,
0.14120692014694214,
0.02382267266511917,
0.003292163833975792,
0.1310284286737442,
0.09023885428905487,
0.2350347638130188,
0.2593669891357422,
0.055361196398735046,
-0.05873639136552811,
-0.3425421714782715,
-0.20924855768680573,
0.23407435417175293,
-0.3655557930469513,
-0.08342030644416809,
-0.36132264137268066,
0.07296717911958694,
-0.04607196897268295,
-0.06611097604036331,
-0.2549248933792114,
-0.46898895502090454,
0.19336025416851044,
-0.16332091391086578,
0.38753989338874817,
0.20658552646636963,
0.41420233249664307,
-0.04419386759400368,
-0.30351200699806213,
-0.2953838109970093,
-0.34249672293663025,
0.011895899660885334,
-0.04512923210859299,
-0.17641624808311462,
0.38792160153388977,
-0.15879951417446136,
0.04791852459311485,
-0.4456306993961334,
0.8013253211975098,
-0.11863487213850021,
0.2303192913532257,
-0.19796742498874664,
0.07407466322183609,
-0.26913687586784363,
0.3721279501914978,
-0.13797016441822052,
0.23607265949249268,
-0.0706782341003418,
0.11313043534755707,
-0.6486817598342896,
-0.34653136134147644,
0.24775639176368713,
-0.3834611475467682,
-0.3235161006450653,
0.1006699800491333,
0.01606975495815277,
0.04879799485206604,
0.04392438381910324,
-0.5278241634368896,
-0.09793058037757874,
0.02571374922990799,
0.23509421944618225,
-0.23149120807647705,
-0.01520569622516632,
-0.06225026771426201,
-0.10804009437561035,
-0.053531087934970856,
-0.3321961760520935,
0.09682886302471161,
-0.2962004244327545,
0.20201756060123444,
-0.3016108274459839
] |
https://github.com/huggingface/datasets/issues/4521 | Datasets method `.map` not hashing | Didn't realize it's a bug when I asked the question yesterday! Free free to post an answer if you are sure the cause has been addressed.
https://stackoverflow.com/questions/72664827/can-pickle-dill-foo-but-not-lambda-x-foox | ## Describe the bug
Datasets method `.map` not hashing, even with an empty no-op function
## Steps to reproduce the bug
```python
from datasets import load_dataset
# download 9MB dummy dataset
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
def prepare_dataset(batch):
return(batch)
ds = ds.map(
prepare_dataset,
num_proc=1,
desc="preprocess train dataset",
)
```
## Expected results
Hashed and cached dataset preprocessing
## Actual results
Does not hash properly:
```
Parameter 'function'=<function prepare_dataset at 0x7fccb68e9280> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.3.dev0
- Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.31
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
cc @lhoestq
| 27 | Datasets method `.map` not hashing
## Describe the bug
Datasets method `.map` not hashing, even with an empty no-op function
## Steps to reproduce the bug
```python
from datasets import load_dataset
# download 9MB dummy dataset
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
def prepare_dataset(batch):
return(batch)
ds = ds.map(
prepare_dataset,
num_proc=1,
desc="preprocess train dataset",
)
```
## Expected results
Hashed and cached dataset preprocessing
## Actual results
Does not hash properly:
```
Parameter 'function'=<function prepare_dataset at 0x7fccb68e9280> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.3.dev0
- Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.31
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
cc @lhoestq
Didn't realize it's a bug when I asked the question yesterday! Free free to post an answer if you are sure the cause has been addressed.
https://stackoverflow.com/questions/72664827/can-pickle-dill-foo-but-not-lambda-x-foox | [
-0.208235964179039,
-0.014491558074951172,
0.05189582332968712,
-0.06907941401004791,
0.21113190054893494,
0.06441668421030045,
0.46527957916259766,
0.33714061975479126,
0.18764156103134155,
0.09930907934904099,
-0.049112237989902496,
0.6498112678527832,
-0.21225260198116302,
-0.26959362626075745,
-0.02624225988984108,
0.22371090948581696,
-0.011972524225711823,
0.13865157961845398,
-0.5358319282531738,
-0.351213276386261,
-0.3983670473098755,
-0.09047660231590271,
-0.2543196678161621,
-0.016077227890491486,
-0.21252579987049103,
-0.08165261894464493,
-0.1504824310541153,
0.08149836957454681,
-0.017002785578370094,
-0.21200916171073914,
0.15515682101249695,
-0.11527493596076965,
0.002720274031162262,
0.48105335235595703,
-0.00010854672291316092,
0.1374332159757614,
0.22120225429534912,
-0.07340889424085617,
-0.18644535541534424,
-0.3923937678337097,
-0.3650376498699188,
-0.25010254979133606,
-0.06069079786539078,
-0.20639051496982574,
0.03140236437320709,
-0.04526921734213829,
0.03689771145582199,
-0.3872564435005188,
0.09783708304166794,
0.23093955218791962,
0.22743722796440125,
0.23670071363449097,
0.023950692266225815,
0.06305527687072754,
0.3252086937427521,
-0.008605532348155975,
-0.2707750201225281,
0.07766498625278473,
-0.05102406442165375,
-0.10548337548971176,
-0.3779955208301544,
0.331620991230011,
-0.05013183504343033,
0.016982844099402428,
-0.017809659242630005,
0.10696376860141754,
0.0409359373152256,
-0.31653499603271484,
0.07110650837421417,
0.08921347558498383,
0.1495646834373474,
-0.3677396774291992,
-0.3680979311466217,
0.04521241784095764,
-0.2230735570192337,
-0.13944676518440247,
0.17777279019355774,
0.020672373473644257,
0.10014967620372772,
-0.045450132340192795,
-0.21044373512268066,
-0.08942191302776337,
0.17194311320781708,
0.17614524066448212,
0.1552698314189911,
0.11136871576309204,
0.04601094871759415,
0.06985805928707123,
0.1686716377735138,
-0.13099879026412964,
0.08870060741901398,
-0.295095294713974,
0.013325545936822891,
0.3882151246070862,
-0.2950142025947571,
-0.14189060032367706,
0.24010908603668213,
-0.1487339437007904,
0.22576186060905457,
-0.01303478330373764,
0.05457298830151558,
0.04644732549786568,
-0.21126818656921387,
0.08568282425403595,
-0.012981601059436798,
0.02927885204553604,
0.23149260878562927,
0.44467973709106445,
0.13686788082122803,
-0.3038657605648041,
-0.24581794440746307,
0.13953343033790588,
0.328825980424881,
-0.32738083600997925,
0.21486537158489227,
0.07227443158626556,
0.24524803459644318,
-0.09362214803695679,
0.026274869218468666,
0.13085633516311646,
-0.602204442024231,
-0.14861315488815308,
-0.07878175377845764,
0.25147828459739685,
0.09721565991640091,
-0.22436070442199707,
0.03729170560836792,
0.09541389346122742,
-0.2139231264591217,
-0.038464535027742386,
-0.3564770221710205,
0.06028096750378609,
-0.27879756689071655,
0.05756618082523346,
0.14499951899051666,
-0.13839827477931976,
0.1546684354543686,
0.12441188842058182,
-0.04728291928768158,
0.24759691953659058,
0.10782846808433533,
-0.16380567848682404,
0.4758705496788025,
0.26390278339385986,
-0.0650445744395256,
0.1439361572265625,
0.12873458862304688,
-0.012789752334356308,
-0.09451878815889359,
0.2682935893535614,
-0.2713431715965271,
-0.18556928634643555,
0.11114513128995895,
0.19563670456409454,
-0.08065719157457352,
0.14193230867385864,
-0.14212346076965332,
0.21238058805465698,
0.21598760783672333,
-0.19807429611682892,
0.1681504249572754,
-0.13968871533870697,
-0.150486558675766,
-0.3975297808647156,
0.15952512621879578,
0.5585700273513794,
-0.18297693133354187,
0.03444759547710419,
-0.15545852482318878,
-0.0312749445438385,
0.26414066553115845,
0.11796645820140839,
-0.13602133095264435,
-0.12888309359550476,
-0.3204537332057953,
0.42000120878219604,
0.33556699752807617,
0.06309151649475098,
-0.6210646629333496,
0.3244469165802002,
0.012974567711353302,
-0.01066921278834343,
-0.23833969235420227,
-0.026389868929982185,
0.13770636916160583,
-0.1618821918964386,
-0.021953217685222626,
0.04278326779603958,
0.007040413096547127,
0.021640485152602196,
-0.5776403546333313,
-0.1611706167459488,
0.11502699553966522,
-0.1140146255493164,
0.2697725296020508,
0.17750871181488037,
0.18503376841545105,
-0.1333477795124054,
0.1496466100215912,
-0.03965979442000389,
0.21769216656684875,
0.1442602276802063,
0.16571810841560364,
-0.38119977712631226,
-0.07418118417263031,
-0.22889655828475952,
-0.6189349293708801,
0.06518807262182236,
-0.021099410951137543,
0.012685757130384445,
-0.19896765053272247,
-0.1329576075077057,
0.1454795002937317,
-0.06543661653995514,
-0.04343697056174278,
-0.14025908708572388,
0.0937478095293045,
-0.005579888820648193,
0.03378475084900856,
-0.027366166934370995,
-0.18077939748764038,
0.054905496537685394,
-0.18162351846694946,
-0.037648752331733704,
-0.037246935069561005,
0.21020610630512238,
-0.10282077640295029,
-0.2272253930568695,
-0.14010566473007202,
-0.029165469110012054,
0.21824467182159424,
-0.03314392268657684,
-0.2009100615978241,
0.25873416662216187,
-0.09458090364933014,
-0.24751906096935272,
0.19353103637695312,
0.1984431892633438,
-0.05254209786653519,
-0.4076671302318573,
-0.05880828946828842,
0.24708494544029236,
0.16411192715168,
-0.12195190042257309,
-0.10786911100149155,
0.3453780710697174,
0.07492896169424057,
0.08764302730560303,
-0.12244357168674469,
0.1761823296546936,
0.10569272935390472,
-0.05402495339512825,
-0.17411866784095764,
-0.18633362650871277,
-0.02533898875117302,
-0.04270089790225029,
0.5286229252815247,
0.2947995364665985,
-0.11100683361291885,
-0.09009692817926407,
0.6188150644302368,
-0.029026418924331665,
0.24905630946159363,
0.151784285902977,
-0.15245559811592102,
-0.04886704683303833,
0.06284017115831375,
-0.0552288219332695,
0.31773173809051514,
0.17106589674949646,
0.09046013653278351,
0.03284161910414696,
-0.15661302208900452,
-0.018738308921456337,
0.08643104135990143,
-0.1599626988172531,
0.22082170844078064,
0.0700332373380661,
0.11911355704069138,
0.05846918746829033,
-0.29634490609169006,
-0.0015507116913795471,
0.2243298441171646,
0.2710249125957489,
-0.43712636828422546,
-0.05871811509132385,
-0.36395159363746643,
0.4764728248119354,
0.17509332299232483,
-0.1556907594203949,
-0.21447014808654785,
-0.3432578146457672,
-0.00869092345237732,
0.0832306295633316,
-0.23540052771568298,
0.5228374600410461,
-0.23456093668937683,
-0.10960797965526581,
0.09482264518737793,
-0.4954853653907776,
-0.42650672793388367,
-0.051148973405361176,
-0.09672623127698898,
0.07159247994422913,
0.1764451414346695,
-0.4313681125640869,
0.14070241153240204,
0.23896582424640656,
-0.22169266641139984,
-0.4560840427875519,
-0.2165316343307495,
0.009086400270462036,
-0.14187078177928925,
0.18501688539981842,
0.13999944925308228,
-0.0900452733039856,
-0.39800333976745605,
0.02928469330072403,
0.18609540164470673,
-0.4951976239681244,
-0.2960646450519562,
0.08720127493143082,
-0.02832929417490959,
0.1735549420118332,
-0.327059268951416,
-0.3639761209487915,
-0.08881055563688278,
-0.40721768140792847,
0.025814130902290344,
-0.19445177912712097,
0.19319254159927368,
0.06324729323387146,
0.2475716471672058,
0.15839743614196777,
0.054672759026288986,
-0.22244015336036682,
-0.37790125608444214,
-0.16075953841209412,
0.6068296432495117,
-0.20071910321712494,
-0.307883620262146,
0.03629932925105095,
-0.2589477300643921,
-0.016335386782884598,
0.4199800491333008,
-0.2681199312210083,
0.04309886693954468,
-0.14585484564304352,
0.47818970680236816,
0.0399041622877121,
0.17788437008857727,
0.44647982716560364,
0.20406155288219452,
-0.1460813283920288,
-0.29172801971435547,
-0.2844967246055603,
0.14940571784973145,
-0.033750325441360474,
0.260516494512558,
0.2459900677204132,
0.4045049548149109,
0.08604741096496582,
1.0040785074234009,
0.14313970506191254,
-0.4310987889766693,
0.3682079315185547,
-0.08257635682821274,
0.11711692810058594,
-0.20197120308876038,
-0.39065471291542053,
-0.15624551475048065,
0.023339122533798218,
0.11684438586235046,
-0.08555905520915985,
-0.18464359641075134,
-0.4690603017807007,
-0.03071320801973343,
0.10049819946289062,
-0.5036522746086121,
-0.2617824971675873,
0.32349470257759094,
-0.6339010000228882,
0.009309716522693634,
0.1637403517961502,
0.3277740776538849,
-0.17123280465602875,
-0.07509789615869522,
0.18073593080043793,
-0.0669165849685669,
0.48249149322509766,
-0.06130704656243324,
0.17285896837711334,
0.22757750749588013,
-0.25524479150772095,
0.410058856010437,
-0.016352560371160507,
0.24283717572689056,
-0.17804093658924103,
-0.20376864075660706,
-0.09032104909420013,
-0.05349786952137947,
0.7010260820388794,
-0.5231866240501404,
-0.023047812283039093,
0.26742085814476013,
-0.13751143217086792,
-0.26372185349464417,
0.09902064502239227,
-0.18931850790977478,
0.500917375087738,
0.18190227448940277,
0.21506555378437042,
-0.3392930030822754,
-0.18739834427833557,
0.16028805077075958,
-0.16816818714141846,
0.07075372338294983,
-0.03856741636991501,
-0.22834409773349762,
-0.1158529594540596,
-0.10699743032455444,
0.15587863326072693,
-0.08989550918340683,
-0.0779106467962265,
-0.0752156674861908,
-0.03120257705450058,
-0.28319066762924194,
-0.10332980751991272,
0.16933384537696838,
-0.05199473723769188,
0.36181172728538513,
0.2123483419418335,
0.36227262020111084,
-0.02166254073381424,
0.19280369579792023,
0.22780659794807434,
0.3475642204284668,
-0.23569226264953613,
-0.02939487248659134,
0.0963432565331459,
-0.01973695680499077,
0.23438680171966553,
0.24533085525035858,
-0.07920805364847183,
-0.12302271276712418,
-0.0731939747929573,
0.10940693318843842,
-0.11359152942895889,
-0.048957716673612595,
0.34037119150161743,
-0.04048171639442444,
-0.2147083729505539,
-0.31546539068222046,
0.5158014893531799,
0.27883943915367126,
-0.2225603312253952,
0.6987826228141785,
-0.05334694683551788,
-0.17747928202152252,
0.3939831256866455,
0.14976443350315094,
0.885055422782898,
-0.07596151530742645,
0.001502498984336853,
0.13401636481285095,
0.009300358593463898,
0.1398160308599472,
0.17043177783489227,
0.09036483615636826,
-0.3451134264469147,
-0.32995685935020447,
0.010758897289633751,
-0.20034383237361908,
0.20977112650871277,
0.3471032977104187,
-0.14141155779361725,
0.21607069671154022,
-0.2724129855632782,
0.20132316648960114,
0.09355250746011734,
-0.08522653579711914,
-0.01778523437678814,
-0.146438866853714,
-0.1051073670387268,
0.2348378598690033,
0.13080590963363647,
0.2561286985874176,
0.038447510451078415,
-0.06176023930311203,
-0.1460452675819397,
-0.3528170585632324,
-0.1118125170469284,
0.3361407518386841,
-0.11788294464349747,
0.2425035834312439,
-0.07217282056808472,
-0.05584097281098366,
0.07633723318576813,
0.13544867932796478,
-0.14659224450588226,
0.020556719973683357,
0.030284475535154343,
0.01690162532031536,
0.40451759099960327,
0.4330123960971832,
0.14898696541786194,
-0.11211081594228745,
0.442445307970047,
0.2124166190624237,
-0.1428748220205307,
0.20619219541549683,
-0.1634293496608734,
-0.47247135639190674,
-0.1712530106306076,
0.18188779056072235,
-0.19772686064243317,
-0.24564799666404724,
-0.05185291916131973,
0.12637457251548767,
-0.08149587363004684,
-0.11639110743999481,
0.17061717808246613,
0.13187694549560547,
-0.14245346188545227,
0.4476374387741089,
0.02063627727329731,
-0.25427353382110596,
-0.012209836393594742,
0.5710797309875488,
-0.03252715617418289,
0.1946069747209549,
0.43815115094184875,
-0.10222378373146057,
-0.24783621728420258,
-0.25366103649139404,
0.012984924018383026,
0.20209641754627228,
-0.24582797288894653,
0.3357761800289154,
-0.2280968576669693,
0.06154389679431915,
-0.07298913598060608,
0.055140893906354904,
-0.03054439276456833,
0.2632162570953369,
-0.107494056224823,
-0.11237034946680069,
-0.3374484181404114,
0.15525680780410767,
-0.1323527842760086,
0.27129918336868286,
-0.0971853956580162,
0.1978883296251297,
0.05413202941417694,
0.24435807764530182,
-0.3967130184173584,
0.1793294996023178,
-0.0074919648468494415,
0.16014452278614044,
-0.10941731929779053,
0.11127717792987823,
0.38858911395072937,
-0.12245750427246094,
0.15067918598651886,
0.218734472990036,
-0.298614501953125,
-0.2571258842945099,
-0.13817906379699707,
0.10666169226169586,
0.07126325368881226,
0.022231779992580414,
-0.03653929382562637,
-0.1705581098794937,
-0.1021893322467804,
-0.16599157452583313,
-0.11239273846149445,
0.32966649532318115,
-0.03306879848241806,
0.3568381071090698,
0.38606971502304077,
-0.08627911657094955,
0.05395335704088211,
-0.109315887093544,
-0.17894530296325684,
0.1427857130765915,
-0.04004985839128494,
0.12778282165527344,
0.07136278599500656,
-0.055802468210458755,
-0.027102181687951088,
-0.16941970586776733,
-0.12220253050327301,
0.06744400411844254,
0.3086448013782501,
-0.12371370196342468,
-0.15215404331684113,
0.1867920309305191,
0.3250977694988251,
0.04225943982601166,
-0.24202024936676025,
-0.1734163910150528,
0.13295787572860718,
0.2511056363582611,
-0.25101375579833984,
0.06531897187232971,
0.344875693321228,
0.24038687348365784,
0.24127933382987976,
0.0872889831662178,
-0.24678118526935577,
0.08781281113624573,
-0.06130875647068024,
0.09117666631937027,
0.011583767831325531,
-0.4432876706123352,
0.041639335453510284,
0.4102993905544281,
-0.1190747544169426,
0.2645300030708313,
0.44065287709236145,
-0.10774128139019012,
0.05720805376768112,
0.3944305181503296,
-0.08862119168043137,
0.34209147095680237,
-0.09238340705633163,
0.058346226811409,
-0.11080389469861984,
-0.47585779428482056,
0.26510825753211975,
0.29846495389938354,
-0.050397396087646484,
0.3070012032985687,
0.05370720475912094,
0.14057567715644836,
-0.0290810726583004,
-0.19110171496868134,
0.07154760509729385,
0.24089181423187256,
-0.31740692257881165,
-0.05446534603834152,
-0.21250678598880768,
-0.05889836698770523,
-0.11826272308826447,
0.11861298978328705,
-0.0038370825350284576,
-0.10624176263809204,
1.0583057403564453,
0.1953340768814087,
0.024286039173603058,
0.07092568278312683,
0.08658885210752487,
0.06690037250518799,
0.4654082953929901,
-0.1455824226140976,
0.08733607828617096,
-0.14183233678340912,
-0.038618654012680054,
-0.10228079557418823,
0.3464215099811554,
0.21902526915073395,
0.37762799859046936,
-0.14304308593273163,
0.10880192369222641,
0.2141626626253128,
-0.08238432556390762,
-0.18027357757091522,
0.5192263126373291,
0.018117345869541168,
-0.18479634821414948,
0.25258103013038635,
0.13944830000400543,
-0.2134353071451187,
0.18769022822380066,
0.08426778018474579,
0.49406126141548157,
0.0802011787891388,
0.3847767114639282,
0.04700851812958717,
-0.18491195142269135,
0.10095471888780594,
-0.13641253113746643,
-0.02431180700659752,
-0.21009711921215057,
0.39232558012008667,
-0.0740065723657608,
0.223037987947464,
-0.2582520544528961,
0.12795087695121765,
0.08477527648210526,
0.23138004541397095,
0.392251193523407,
0.1441054344177246,
-0.5569819808006287,
0.146467924118042,
-0.5041083097457886,
0.14001283049583435,
-0.07181935012340546,
0.17237576842308044,
-0.27339646220207214,
0.342966765165329,
0.15102994441986084,
0.1204434409737587,
0.13972042500972748,
-0.2500813901424408,
0.19447647035121918,
0.5019518733024597,
-0.1161583662033081,
0.004840031266212463,
-0.5089250802993774,
-0.04377958923578262,
0.117815300822258,
-0.5066766738891602,
0.023315638303756714,
-0.010198306292295456,
0.11181560903787613,
-0.13702909648418427,
-0.18107300996780396,
0.246862530708313,
0.14747464656829834,
0.7822596430778503,
0.2559443712234497,
0.23425686359405518,
-0.2552669942378998,
-0.13929589092731476,
-0.12905819714069366,
-0.01750250533223152,
-0.1510903388261795,
-0.005024328827857971,
0.03609088435769081,
0.23276227712631226,
-0.06332451105117798,
-0.28401264548301697,
-0.2103201299905777,
0.16055309772491455,
-0.022885698825120926,
0.05645071342587471,
-0.18411464989185333,
0.2551320195198059,
-0.08130532503128052,
-0.1759391576051712,
-0.197346031665802,
0.42032209038734436,
-0.06915301084518433,
0.2821548283100128,
-0.253639280796051,
-0.44675859808921814,
0.5486958026885986,
-0.5277625918388367,
-0.05914006009697914,
-0.17110010981559753,
0.2164364457130432,
-0.031160734593868256,
-0.27653375267982483,
-0.3908587098121643,
-0.25717073678970337,
0.3500562906265259,
-0.10272509604692459,
-0.19580693542957306,
-0.02277785912156105,
0.035429634153842926,
0.10710777342319489,
-0.18420156836509705,
0.385812371969223,
-0.02885289490222931,
-0.16638503968715668,
0.2164389193058014,
-0.3138100504875183
] |
https://github.com/huggingface/datasets/issues/4520 | Failure to hash `dataclasses` - results in functions that cannot be hashed or cached in `.map` | I think this has been fixed by #4516, let me know if you encounter this again :)
I re-ran your code in 3.7 and 3.9 and it works fine | Dataclasses cannot be hashed. As a result, they cannot be hashed or cached if used in the `.map` method. Dataclasses are used extensively in Transformers examples scripts: (c.f. [CTC example](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py)). Since dataclasses cannot be hashed, one has to define separate variables prior to passing dataclass attributes to the `.map` method:
```python
phoneme_language = data_args.phoneme_language
```
in the example https://github.com/huggingface/transformers/blob/3c7e56fbb11f401de2528c1dcf0e282febc031cd/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py#L603-L630
## Steps to reproduce the bug
```python
from dataclasses import dataclass, field
from datasets.fingerprint import Hasher
@dataclass
class DataTrainingArguments:
"""
Arguments pertaining to what data we are going to input our model for training and eval.
"""
phoneme_language: str = field(
default=None, metadata={"help": "The name of the phoneme language to use."}
)
data_args = DataTrainingArguments(phoneme_language ="foo")
Hasher.hash(data_args)
phoneme_language = data_args.phoneme_language
Hasher.hash(phoneme_language)
```
## Expected results
A hash.
## Actual results
<details>
<summary> Traceback </summary>
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Input In [1], in <cell line: 16>()
10 phoneme_language: str = field(
11 default=None, metadata={"help": "The name of the phoneme language to use."}
12 )
14 data_args = DataTrainingArguments(phoneme_language ="foo")
---> 16 Hasher.hash(data_args)
18 phoneme_language = data_args. phoneme_language
20 Hasher.hash(phoneme_language)
File ~/datasets/src/datasets/fingerprint.py:237, in Hasher.hash(cls, value)
235 return cls.dispatch[type(value)](cls, value)
236 else:
--> 237 return cls.hash_default(value)
File ~/datasets/src/datasets/fingerprint.py:230, in Hasher.hash_default(cls, value)
228 @classmethod
229 def hash_default(cls, value: Any) -> str:
--> 230 return cls.hash_bytes(dumps(value))
File ~/datasets/src/datasets/utils/py_utils.py:564, in dumps(obj)
562 file = StringIO()
563 with _no_cache_fields(obj):
--> 564 dump(obj, file)
565 return file.getvalue()
File ~/datasets/src/datasets/utils/py_utils.py:539, in dump(obj, file)
537 def dump(obj, file):
538 """pickle an object to a file"""
--> 539 Pickler(file, recurse=True).dump(obj)
540 return
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:620, in Pickler.dump(self, obj)
618 raise PicklingError(msg)
619 else:
--> 620 StockPickler.dump(self, obj)
621 return
File /usr/lib/python3.8/pickle.py:487, in _Pickler.dump(self, obj)
485 if self.proto >= 4:
486 self.framer.start_framing()
--> 487 self.save(obj)
488 self.write(STOP)
489 self.framer.end_framing()
File /usr/lib/python3.8/pickle.py:603, in _Pickler.save(self, obj, save_persistent_id)
599 raise PicklingError("Tuple returned by %s must have "
600 "two to six elements" % reduce)
602 # Save the reduce() output and finally memoize the object
--> 603 self.save_reduce(obj=obj, *rv)
File /usr/lib/python3.8/pickle.py:687, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj)
684 raise PicklingError(
685 "args[0] from __newobj__ args has the wrong class")
686 args = args[1:]
--> 687 save(cls)
688 save(args)
689 write(NEWOBJ)
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1838, in save_type(pickler, obj, postproc_list)
1836 postproc_list = []
1837 postproc_list.append((setattr, (obj, '__qualname__', obj_name)))
-> 1838 _save_with_postproc(pickler, (_create_type, (
1839 type(obj), obj.__name__, obj.__bases__, _dict
1840 )), obj=obj, postproc_list=postproc_list)
1841 log.info("# %s" % _t)
1842 else:
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1140, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list)
1137 pickler._postproc[id(obj)] = postproc_list
1139 # TODO: Use state_setter in Python 3.8 to allow for faster cPickle implementations
-> 1140 pickler.save_reduce(*reduction, obj=obj)
1142 if is_pickler_dill:
1143 # pickler.x -= 1
1144 # print(pickler.x*' ', 'pop', obj, id(obj))
1145 postproc = pickler._postproc.pop(id(obj))
File /usr/lib/python3.8/pickle.py:692, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj)
690 else:
691 save(func)
--> 692 save(args)
693 write(REDUCE)
695 if obj is not None:
696 # If the object is already in the memo, this means it is
697 # recursive. In this case, throw away everything we put on the
698 # stack, and fetch the object back from the memo.
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File /usr/lib/python3.8/pickle.py:901, in _Pickler.save_tuple(self, obj)
899 write(MARK)
900 for element in obj:
--> 901 save(element)
903 if id(obj) in memo:
904 # Subtle. d was not in memo when we entered save_tuple(), so
905 # the process of saving the tuple's elements must have saved
(...)
909 # could have been done in the "for element" loop instead, but
910 # recursive tuples are a rare thing.
911 get = self.get(memo[id(obj)][0])
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1251, in save_module_dict(pickler, obj)
1248 if is_dill(pickler, child=False) and pickler._session:
1249 # we only care about session the first pass thru
1250 pickler._first_pass = False
-> 1251 StockPickler.save_dict(pickler, obj)
1252 log.info("# D2")
1253 return
File /usr/lib/python3.8/pickle.py:971, in _Pickler.save_dict(self, obj)
968 self.write(MARK + DICT)
970 self.memoize(obj)
--> 971 self._batch_setitems(obj.items())
File /usr/lib/python3.8/pickle.py:997, in _Pickler._batch_setitems(self, items)
995 for k, v in tmp:
996 save(k)
--> 997 save(v)
998 write(SETITEMS)
999 elif n:
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File ~/datasets/src/datasets/utils/py_utils.py:862, in save_function(pickler, obj)
859 if state_dict:
860 state = state, state_dict
--> 862 dill._dill._save_with_postproc(
863 pickler,
864 (
865 dill._dill._create_function,
866 (obj.__code__, globs, obj.__name__, obj.__defaults__, closure),
867 state,
868 ),
869 obj=obj,
870 postproc_list=postproc_list,
871 )
872 else:
873 closure = obj.func_closure
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1153, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list)
1151 dest, source = reduction[1]
1152 if source:
-> 1153 pickler.write(pickler.get(pickler.memo[id(dest)][0]))
1154 pickler._batch_setitems(iter(source.items()))
1155 else:
1156 # Updating with an empty dictionary. Same as doing nothing.
KeyError: 140434581781568
```
</details>
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.3.dev0
- Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
cc @lhoestq | 29 | Failure to hash `dataclasses` - results in functions that cannot be hashed or cached in `.map`
Dataclasses cannot be hashed. As a result, they cannot be hashed or cached if used in the `.map` method. Dataclasses are used extensively in Transformers examples scripts: (c.f. [CTC example](https://github.com/huggingface/transformers/blob/main/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py)). Since dataclasses cannot be hashed, one has to define separate variables prior to passing dataclass attributes to the `.map` method:
```python
phoneme_language = data_args.phoneme_language
```
in the example https://github.com/huggingface/transformers/blob/3c7e56fbb11f401de2528c1dcf0e282febc031cd/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py#L603-L630
## Steps to reproduce the bug
```python
from dataclasses import dataclass, field
from datasets.fingerprint import Hasher
@dataclass
class DataTrainingArguments:
"""
Arguments pertaining to what data we are going to input our model for training and eval.
"""
phoneme_language: str = field(
default=None, metadata={"help": "The name of the phoneme language to use."}
)
data_args = DataTrainingArguments(phoneme_language ="foo")
Hasher.hash(data_args)
phoneme_language = data_args.phoneme_language
Hasher.hash(phoneme_language)
```
## Expected results
A hash.
## Actual results
<details>
<summary> Traceback </summary>
```
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Input In [1], in <cell line: 16>()
10 phoneme_language: str = field(
11 default=None, metadata={"help": "The name of the phoneme language to use."}
12 )
14 data_args = DataTrainingArguments(phoneme_language ="foo")
---> 16 Hasher.hash(data_args)
18 phoneme_language = data_args. phoneme_language
20 Hasher.hash(phoneme_language)
File ~/datasets/src/datasets/fingerprint.py:237, in Hasher.hash(cls, value)
235 return cls.dispatch[type(value)](cls, value)
236 else:
--> 237 return cls.hash_default(value)
File ~/datasets/src/datasets/fingerprint.py:230, in Hasher.hash_default(cls, value)
228 @classmethod
229 def hash_default(cls, value: Any) -> str:
--> 230 return cls.hash_bytes(dumps(value))
File ~/datasets/src/datasets/utils/py_utils.py:564, in dumps(obj)
562 file = StringIO()
563 with _no_cache_fields(obj):
--> 564 dump(obj, file)
565 return file.getvalue()
File ~/datasets/src/datasets/utils/py_utils.py:539, in dump(obj, file)
537 def dump(obj, file):
538 """pickle an object to a file"""
--> 539 Pickler(file, recurse=True).dump(obj)
540 return
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:620, in Pickler.dump(self, obj)
618 raise PicklingError(msg)
619 else:
--> 620 StockPickler.dump(self, obj)
621 return
File /usr/lib/python3.8/pickle.py:487, in _Pickler.dump(self, obj)
485 if self.proto >= 4:
486 self.framer.start_framing()
--> 487 self.save(obj)
488 self.write(STOP)
489 self.framer.end_framing()
File /usr/lib/python3.8/pickle.py:603, in _Pickler.save(self, obj, save_persistent_id)
599 raise PicklingError("Tuple returned by %s must have "
600 "two to six elements" % reduce)
602 # Save the reduce() output and finally memoize the object
--> 603 self.save_reduce(obj=obj, *rv)
File /usr/lib/python3.8/pickle.py:687, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj)
684 raise PicklingError(
685 "args[0] from __newobj__ args has the wrong class")
686 args = args[1:]
--> 687 save(cls)
688 save(args)
689 write(NEWOBJ)
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1838, in save_type(pickler, obj, postproc_list)
1836 postproc_list = []
1837 postproc_list.append((setattr, (obj, '__qualname__', obj_name)))
-> 1838 _save_with_postproc(pickler, (_create_type, (
1839 type(obj), obj.__name__, obj.__bases__, _dict
1840 )), obj=obj, postproc_list=postproc_list)
1841 log.info("# %s" % _t)
1842 else:
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1140, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list)
1137 pickler._postproc[id(obj)] = postproc_list
1139 # TODO: Use state_setter in Python 3.8 to allow for faster cPickle implementations
-> 1140 pickler.save_reduce(*reduction, obj=obj)
1142 if is_pickler_dill:
1143 # pickler.x -= 1
1144 # print(pickler.x*' ', 'pop', obj, id(obj))
1145 postproc = pickler._postproc.pop(id(obj))
File /usr/lib/python3.8/pickle.py:692, in _Pickler.save_reduce(self, func, args, state, listitems, dictitems, state_setter, obj)
690 else:
691 save(func)
--> 692 save(args)
693 write(REDUCE)
695 if obj is not None:
696 # If the object is already in the memo, this means it is
697 # recursive. In this case, throw away everything we put on the
698 # stack, and fetch the object back from the memo.
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File /usr/lib/python3.8/pickle.py:901, in _Pickler.save_tuple(self, obj)
899 write(MARK)
900 for element in obj:
--> 901 save(element)
903 if id(obj) in memo:
904 # Subtle. d was not in memo when we entered save_tuple(), so
905 # the process of saving the tuple's elements must have saved
(...)
909 # could have been done in the "for element" loop instead, but
910 # recursive tuples are a rare thing.
911 get = self.get(memo[id(obj)][0])
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1251, in save_module_dict(pickler, obj)
1248 if is_dill(pickler, child=False) and pickler._session:
1249 # we only care about session the first pass thru
1250 pickler._first_pass = False
-> 1251 StockPickler.save_dict(pickler, obj)
1252 log.info("# D2")
1253 return
File /usr/lib/python3.8/pickle.py:971, in _Pickler.save_dict(self, obj)
968 self.write(MARK + DICT)
970 self.memoize(obj)
--> 971 self._batch_setitems(obj.items())
File /usr/lib/python3.8/pickle.py:997, in _Pickler._batch_setitems(self, items)
995 for k, v in tmp:
996 save(k)
--> 997 save(v)
998 write(SETITEMS)
999 elif n:
File /usr/lib/python3.8/pickle.py:560, in _Pickler.save(self, obj, save_persistent_id)
558 f = self.dispatch.get(t)
559 if f is not None:
--> 560 f(self, obj) # Call unbound method with explicit self
561 return
563 # Check private dispatch table if any, or else
564 # copyreg.dispatch_table
File ~/datasets/src/datasets/utils/py_utils.py:862, in save_function(pickler, obj)
859 if state_dict:
860 state = state, state_dict
--> 862 dill._dill._save_with_postproc(
863 pickler,
864 (
865 dill._dill._create_function,
866 (obj.__code__, globs, obj.__name__, obj.__defaults__, closure),
867 state,
868 ),
869 obj=obj,
870 postproc_list=postproc_list,
871 )
872 else:
873 closure = obj.func_closure
File ~/hf/lib/python3.8/site-packages/dill/_dill.py:1153, in _save_with_postproc(pickler, reduction, is_pickler_dill, obj, postproc_list)
1151 dest, source = reduction[1]
1152 if source:
-> 1153 pickler.write(pickler.get(pickler.memo[id(dest)][0]))
1154 pickler._batch_setitems(iter(source.items()))
1155 else:
1156 # Updating with an empty dictionary. Same as doing nothing.
KeyError: 140434581781568
```
</details>
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.3.dev0
- Platform: Linux-5.11.0-1028-gcp-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
cc @lhoestq
I think this has been fixed by #4516, let me know if you encounter this again :)
I re-ran your code in 3.7 and 3.9 and it works fine | [
0.013226669281721115,
-0.08187210559844971,
0.06473235785961151,
0.08420798927545547,
0.52198326587677,
0.1191551461815834,
0.47535276412963867,
0.29460152983665466,
0.015639130026102066,
0.014600217342376709,
-0.06058335304260254,
0.2825549840927124,
-0.2347131371498108,
-0.15448817610740662,
-0.018689624965190887,
-0.1759844869375229,
-0.05729158967733383,
-0.028569459915161133,
-0.3890363574028015,
-0.036523301154375076,
-0.15884767472743988,
0.16975818574428558,
-0.0796419307589531,
0.08728459477424622,
-0.6611484289169312,
0.010214192792773247,
-0.024631856009364128,
-0.0286392942070961,
0.012041410431265831,
-0.24865251779556274,
0.38674673438072205,
-0.0698947161436081,
0.028392773121595383,
0.5190291404724121,
-0.00010815334098879248,
0.22057543694972992,
0.2711079716682434,
-0.06639759987592697,
-0.15821319818496704,
-0.1730925589799881,
0.06278793513774872,
0.045049384236335754,
-0.12175887823104858,
-0.24722573161125183,
-0.02246132493019104,
-0.027208678424358368,
0.06404536217451096,
-0.12499941885471344,
0.46553319692611694,
0.17567656934261322,
0.23680032789707184,
0.27750954031944275,
0.015018317848443985,
0.08869808167219162,
0.21686848998069763,
0.18738071620464325,
-0.16859589517116547,
0.26803159713745117,
0.06399012356996536,
-0.10549789667129517,
-0.23418650031089783,
0.2839232087135315,
0.06638704985380173,
-0.21387702226638794,
0.12176234275102615,
0.07224208116531372,
-0.04964558035135269,
-0.21173110604286194,
0.09114278852939606,
0.03901223465800285,
-0.02901948243379593,
-0.4675764739513397,
-0.43972039222717285,
-0.15621742606163025,
-0.20850443840026855,
0.0027922801673412323,
0.3555215001106262,
-0.2116893231868744,
0.144254669547081,
0.15361253917217255,
-0.5311254858970642,
0.2401304990053177,
0.1403222233057022,
0.22260460257530212,
0.10976052284240723,
-0.017411813139915466,
-0.12264539301395416,
0.10037477314472198,
-0.050431977957487106,
-0.16456593573093414,
-0.15425103902816772,
-0.037202972918748856,
0.16614721715450287,
0.1829236000776291,
-0.23385430872440338,
-0.23250152170658112,
0.257963627576828,
-0.12440028041601181,
0.04400664567947388,
-0.18125231564044952,
0.06626743823289871,
0.16494333744049072,
0.12491868436336517,
0.2493855059146881,
-0.04268958792090416,
0.38073524832725525,
0.18470945954322815,
0.3464162051677704,
0.13303688168525696,
-0.3227723240852356,
-0.3034193217754364,
-0.06497877836227417,
0.061233147978782654,
-0.1000036746263504,
0.3564084470272064,
0.29978147149086,
0.0811588242650032,
0.05001530423760414,
0.16852439939975739,
0.06712046265602112,
-0.26505541801452637,
0.14346492290496826,
0.3195415139198303,
0.45040974020957947,
0.0813126340508461,
0.029831185936927795,
0.22805486619472504,
0.06196039915084839,
-0.05071575194597244,
-0.06013525649905205,
-0.2963245213031769,
-0.006099943071603775,
-0.33968788385391235,
0.10587441176176071,
0.26510530710220337,
0.03309013321995735,
0.2879296541213989,
-0.0432894267141819,
0.40588366985321045,
-0.011557091027498245,
0.11250369250774384,
-0.059386298060417175,
0.2874825596809387,
0.13232457637786865,
-0.36797380447387695,
0.20415472984313965,
0.22316938638687134,
0.25592899322509766,
-0.20477518439292908,
0.011289805173873901,
-0.40635931491851807,
-0.1728484183549881,
0.3078380823135376,
0.1853712648153305,
-0.12111059576272964,
0.1598077267408371,
0.04762190580368042,
0.05636509507894516,
0.4402996599674225,
-0.32816576957702637,
0.10416872799396515,
-0.393979012966156,
-0.13858355581760406,
-0.32809606194496155,
0.08889134973287582,
0.2603945732116699,
0.193522647023201,
-0.23523683845996857,
0.12901678681373596,
0.09785361588001251,
0.08832632005214691,
0.14986391365528107,
-0.387124627828598,
0.1918746829032898,
-0.09791748225688934,
0.3808221220970154,
0.0668649822473526,
-0.3398861587047577,
-0.4911077916622162,
0.15381908416748047,
0.1714341938495636,
0.12634770572185516,
-0.10557917505502701,
-0.16890433430671692,
0.31288307905197144,
-0.22438544034957886,
-0.027036793529987335,
0.09575623273849487,
-0.08296174556016922,
0.19382105767726898,
-0.24753372371196747,
-0.07347450405359268,
0.1487497091293335,
0.04834119603037834,
0.15463821589946747,
0.0785253494977951,
0.036262743175029755,
0.18182791769504547,
-0.09182459861040115,
-0.2783348560333252,
0.30376923084259033,
0.1474839597940445,
0.03733283281326294,
-0.13575424253940582,
0.17767639458179474,
-0.2681121528148651,
-0.5193999409675598,
0.22470396757125854,
-0.32464277744293213,
0.022818388417363167,
-0.20143099129199982,
-0.19467000663280487,
0.17569124698638916,
-0.09856785833835602,
-0.09240949153900146,
-0.16715991497039795,
0.16916488111019135,
-0.09016101062297821,
0.15768331289291382,
-0.2781223952770233,
-0.06126811355352402,
0.19391639530658722,
0.007220609113574028,
0.015012812800705433,
-0.15443246066570282,
0.10972873866558075,
-0.16295866668224335,
-0.22716151177883148,
-0.3408728241920471,
0.12855565547943115,
0.18348073959350586,
-0.25723737478256226,
-0.2545756995677948,
0.25882434844970703,
-0.014067890122532845,
-0.014541290700435638,
-0.22251775860786438,
0.41273409128189087,
0.11763284355401993,
-0.3754287362098694,
0.053507063537836075,
0.45136740803718567,
0.18724815547466278,
-0.21946841478347778,
0.029335256665945053,
0.46290796995162964,
0.2771816551685333,
-0.04981706291437149,
0.032729342579841614,
0.07456768304109573,
0.19154536724090576,
-0.02003902941942215,
-0.3127020001411438,
-0.134710431098938,
-0.08514349162578583,
-0.036452412605285645,
0.3924362361431122,
0.21557536721229553,
0.10374850034713745,
-0.08110003918409348,
0.628139317035675,
0.1016349196434021,
0.18366023898124695,
0.1596643030643463,
-0.3461958169937134,
-0.10977910459041595,
-0.15070615708827972,
-0.014373667538166046,
0.29603487253189087,
0.01626323163509369,
0.0559573620557785,
0.15664298832416534,
-0.09744324535131454,
0.0081575196236372,
0.11855766922235489,
-0.006735861301422119,
-0.10655471682548523,
0.10783316940069199,
0.06874547898769379,
0.031298208981752396,
-0.25285032391548157,
-0.20325584709644318,
0.15628181397914886,
0.04779843986034393,
-0.4727763235569,
0.22563011944293976,
-0.230383962392807,
0.2713015675544739,
0.04195217415690422,
-0.27159246802330017,
-0.11309446394443512,
-0.23181673884391785,
0.06409329175949097,
0.04797975718975067,
-0.3661061227321625,
0.32967913150787354,
0.07442887127399445,
0.09116268157958984,
0.18432305753231049,
-0.32179415225982666,
-0.18474864959716797,
-0.3456761837005615,
-0.1778026819229126,
0.012993253767490387,
-0.015446126461029053,
-0.31503796577453613,
-0.0991043746471405,
0.05650695413351059,
-0.13336747884750366,
0.03252768516540527,
-0.42752185463905334,
0.10401523113250732,
-0.2696584463119507,
0.02943263202905655,
0.04095024615526199,
-0.09324789047241211,
-0.32189667224884033,
-0.2708384692668915,
0.351071298122406,
-0.43289148807525635,
-0.2067084014415741,
0.35239994525909424,
0.13096073269844055,
-0.15451909601688385,
-0.28223034739494324,
-0.2834187150001526,
0.0055713290348649025,
-0.27432912588119507,
0.2220001369714737,
-0.29404136538505554,
0.08127167075872421,
0.6094660758972168,
-0.0005728937685489655,
0.18082521855831146,
-0.31444022059440613,
0.13600963354110718,
-0.32135891914367676,
-0.4592336416244507,
0.5221284031867981,
-0.3023308217525482,
-0.3227322995662689,
-0.22307518124580383,
-0.11674679815769196,
0.20382560789585114,
0.31495189666748047,
-0.0625920295715332,
-0.29988354444503784,
-0.20884858071804047,
0.1317959576845169,
0.1773170381784439,
0.06691624224185944,
0.46914955973625183,
0.07499627023935318,
-0.047275543212890625,
-0.23950952291488647,
-0.28308847546577454,
0.14963598549365997,
0.29177194833755493,
0.26113244891166687,
-0.10572218149900436,
0.14927904307842255,
0.13168801367282867,
0.8335981965065002,
0.27052104473114014,
-0.38638821244239807,
0.14659452438354492,
0.1809246838092804,
0.049982741475105286,
-0.01810871809720993,
-0.3308188319206238,
0.04533175379037857,
-0.3133440315723419,
-0.06889884173870087,
0.10665184259414673,
0.0768817663192749,
-0.1669987142086029,
-0.13072538375854492,
0.15791013836860657,
-0.3191959261894226,
-0.4994126856327057,
0.3884962201118469,
-0.26039835810661316,
0.35433000326156616,
-0.038703009486198425,
0.3276836574077606,
-0.3277994692325592,
0.046773865818977356,
0.25224170088768005,
0.11668245494365692,
0.14131654798984528,
0.019841216504573822,
-0.2915950417518616,
-0.04978132247924805,
-0.20056918263435364,
0.17087365686893463,
0.14974768459796906,
0.4039137065410614,
-0.15526726841926575,
-0.18773680925369263,
-0.05018007755279541,
0.07078400254249573,
0.45439982414245605,
-0.21853983402252197,
0.250541090965271,
0.0968296229839325,
-0.46419399976730347,
-0.07288777828216553,
-0.09215889871120453,
-0.22172825038433075,
0.036926086992025375,
0.33200761675834656,
0.2617235481739044,
-0.3459107279777527,
-0.03306751325726509,
-0.14194248616695404,
-0.022994859144091606,
-0.026618024334311485,
-0.03200841695070267,
-0.04864927753806114,
-0.149470716714859,
-0.17279459536075592,
0.021983176469802856,
0.26711562275886536,
-0.1444447636604309,
-0.009024472907185555,
-0.0022727400064468384,
0.05281667411327362,
-0.2063363492488861,
0.12184001505374908,
0.1269327998161316,
0.15085378289222717,
-0.04753504693508148,
0.2618197500705719,
0.09534083306789398,
0.11203007400035858,
-0.2994430363178253,
0.501771092414856,
0.03897801414132118,
-0.5729475021362305,
0.08311481773853302,
0.2006167620420456,
0.012642532587051392,
0.3847808241844177,
-0.2013082355260849,
-0.07319559901952744,
0.22518807649612427,
0.022427190095186234,
-0.1364365518093109,
0.12491770088672638,
0.2051859349012375,
0.21251818537712097,
-0.13580916821956635,
-0.10508540272712708,
0.22044488787651062,
0.006139885634183884,
-0.02572481334209442,
0.250097393989563,
-0.20251058042049408,
-0.3596213459968567,
0.5923905968666077,
0.09050437062978745,
1.0849798917770386,
-0.03651317209005356,
0.18334797024726868,
-0.12758007645606995,
0.2707812190055847,
0.21904218196868896,
-0.035471297800540924,
0.22640661895275116,
-0.20184534788131714,
-0.20822331309318542,
-0.03215819597244263,
-0.10730676352977753,
0.11114223301410675,
0.1426449418067932,
-0.22667434811592102,
0.06934700161218643,
-0.058932334184646606,
0.5631780624389648,
0.14991723001003265,
-0.06809165328741074,
0.0897955372929573,
-0.3741828203201294,
0.15985694527626038,
0.2662964463233948,
0.08885718882083893,
0.23738060891628265,
0.012682633474469185,
-0.21238906681537628,
-0.12289679050445557,
-0.3959730267524719,
-0.16399161517620087,
0.2822023034095764,
-0.4692310690879822,
0.3157499432563782,
0.24679289758205414,
0.10446895658969879,
0.28891196846961975,
0.17831827700138092,
0.31216663122177124,
0.1302122175693512,
-0.3283446729183197,
0.14521153271198273,
0.11591370403766632,
0.205813467502594,
-0.0021996016148477793,
0.011898062191903591,
0.5313925743103027,
0.12744319438934326,
-0.016136176884174347,
0.052032873034477234,
-0.07366666197776794,
-0.4283146858215332,
-0.0748911052942276,
-0.03748999536037445,
-0.3521896004676819,
-0.34892332553863525,
0.1252848356962204,
-0.036996617913246155,
-0.3687528669834137,
-0.2378937304019928,
0.19497546553611755,
0.15803295373916626,
-0.33974015712738037,
0.3284784257411957,
0.14695024490356445,
-0.24240371584892273,
0.15459229052066803,
0.5423513650894165,
0.027085641399025917,
-0.08570940792560577,
0.33884191513061523,
0.04728424921631813,
-0.37289124727249146,
-0.14295905828475952,
-0.30448371171951294,
0.1398419737815857,
-0.480599582195282,
0.14419978857040405,
-0.16847002506256104,
-0.11427626013755798,
-0.08206380903720856,
0.13488341867923737,
0.1343289017677307,
0.13787566125392914,
-0.20483753085136414,
-0.17782938480377197,
-0.685840368270874,
0.2186051905155182,
-0.026848789304494858,
0.21711112558841705,
0.055464014410972595,
0.45085880160331726,
-0.013054686598479748,
0.33211374282836914,
-0.39615851640701294,
0.03121251054108143,
-0.07023803889751434,
0.23142075538635254,
0.28043583035469055,
-0.29956334829330444,
0.38513892889022827,
-0.17803803086280823,
0.10610251128673553,
0.3377183675765991,
-0.39389365911483765,
-0.23514598608016968,
-0.2587563991546631,
0.08331947773694992,
0.30882471799850464,
-0.02919563464820385,
-0.08474134653806686,
0.12972475588321686,
0.055202189832925797,
-0.33475804328918457,
0.2206835150718689,
0.31262242794036865,
-0.0978531688451767,
0.3787725269794464,
-0.18096113204956055,
0.05628974735736847,
0.10166759788990021,
-0.0998210608959198,
-0.1171579360961914,
-0.05835579335689545,
0.01701083965599537,
0.0024308301508426666,
-0.13129054009914398,
0.04067740589380264,
-0.11535433679819107,
0.15951189398765564,
0.03399108350276947,
-0.014434348791837692,
0.4459495544433594,
-0.1599610298871994,
0.08172345161437988,
0.14192995429039001,
0.15882834792137146,
-0.05114690214395523,
-0.28460493683815,
0.03985581547021866,
0.33253124356269836,
0.17894428968429565,
-0.1720288246870041,
0.11780046671628952,
0.029125377535820007,
0.0492602214217186,
0.21048909425735474,
0.13866332173347473,
0.06364242732524872,
0.07836960256099701,
0.1905553936958313,
-0.09332738071680069,
0.3473050594329834,
-0.30329442024230957,
0.24851717054843903,
0.370939165353775,
-0.0793837234377861,
0.21957416832447052,
0.5286946892738342,
0.09558786451816559,
0.15585395693778992,
0.15311765670776367,
-0.1036020889878273,
0.4003944993019104,
-0.24940216541290283,
0.12391649186611176,
0.0685659646987915,
-0.2403487265110016,
0.07221715152263641,
0.1348567008972168,
-0.03053860366344452,
0.3262726664543152,
-0.2334301769733429,
0.23988908529281616,
-0.35048896074295044,
-0.17279933393001556,
-0.1462729126214981,
0.08660657703876495,
-0.256428062915802,
-0.09494607150554657,
0.13528677821159363,
-0.03782026097178459,
-0.2234615683555603,
-0.20293524861335754,
-0.19353358447551727,
-0.06768356263637543,
0.6559486389160156,
0.10424573719501495,
-0.1728580743074417,
-0.061662688851356506,
-0.3315044641494751,
-0.03463776409626007,
0.32348233461380005,
-0.21404439210891724,
0.2850120961666107,
-0.0996866524219513,
-0.029100336134433746,
-0.11740106344223022,
0.3288314640522003,
0.36472180485725403,
0.19344590604305267,
-0.06293679773807526,
0.2794362008571625,
-0.12260164320468903,
0.023105410858988762,
-0.11524458974599838,
0.46442681550979614,
0.1194661408662796,
-0.048753347247838974,
0.07092954218387604,
0.15029104053974152,
-0.21616186201572418,
-0.13447242975234985,
-0.19408081471920013,
0.14159339666366577,
0.10608077049255371,
0.7480639219284058,
-0.06203644722700119,
0.055271051824092865,
-0.07707507163286209,
-0.00993279367685318,
-0.427894651889801,
-0.2886417508125305,
0.4696122407913208,
-0.04155914485454559,
0.32532376050949097,
-0.06597301363945007,
0.11325003206729889,
0.11624625325202942,
0.4906889796257019,
0.41489163041114807,
-0.1394117772579193,
-0.2596922218799591,
0.23119674623012543,
-0.1807677149772644,
0.1633293181657791,
-0.07230912148952484,
0.4554893672466278,
-0.13551181554794312,
0.08163803815841675,
0.23657041788101196,
0.09086970239877701,
-0.06266415119171143,
-0.22878174483776093,
-0.006192082539200783,
-0.12400542199611664,
-0.1079949140548706,
0.22658909857273102,
-0.23063631355762482,
0.15110497176647186,
0.3353378176689148,
-0.39782556891441345,
0.005778755992650986,
0.30826282501220703,
0.13047689199447632,
-0.3034893274307251,
-0.016871806234121323,
0.009869813919067383,
-0.2795085906982422,
0.44828152656555176,
0.1717807799577713,
0.46312597393989563,
-0.18271023035049438,
-0.050719279795885086,
-0.21251553297042847,
-0.22069033980369568,
0.12532860040664673,
-0.06991899758577347,
-0.03764014318585396,
0.33500224351882935,
-0.19199153780937195,
-0.366095632314682,
-0.33887147903442383,
-0.170113667845726,
-0.07868033647537231,
-0.39136195182800293,
-0.23680388927459717,
0.25256672501564026,
-0.46408775448799133,
0.046078670769929886,
0.009105644188821316,
0.3840121328830719,
-0.20956778526306152,
0.031891003251075745,
-0.3597286343574524,
-0.4480721354484558,
0.5385758876800537,
-0.4388660192489624,
-0.29809585213661194,
-0.06539179384708405,
0.19095346331596375,
-0.16099372506141663,
-0.0032371412962675095,
-0.6025667786598206,
-0.004478886723518372,
0.06182202324271202,
-0.06230402737855911,
-0.39629995822906494,
0.11151282489299774,
-0.0504683256149292,
-0.06679275631904602,
-0.14271996915340424,
0.40711864829063416,
0.05788009613752365,
-0.02651158720254898,
0.06118572875857353,
-0.14787298440933228
] |
https://github.com/huggingface/datasets/issues/4508 | cast_storage method from datasets.features | Hi! We've recently added a check to the `ClassLabel` type to ensure the values are in the valid label range `-1, 0, ..., num_classes-1` (-1 is used for missing values). The error in your case happens only if the `labels` column is of type `Sequence(ClassLabel(...))` before the `map` call and can be avoided by calling `dataset = dataset.cast_column("labels", Sequence(Value("int")))` beforehand. The token-classification examples in Transformers introduce a new `labels` column, so their type is also `Sequence(Value("int"))`, which doesn't lead to an error as this type unbounded. | ## Describe the bug
A bug occurs when mapping a function to a dataset object. I ran the same code with the same data yesterday and it worked just fine. It works when i run locally on an old version of datasets.
## Steps to reproduce the bug
Steps are:
- load whatever datset
- write a preprocessing function such as "tokenize_and_align_labels" written in https://huggingface.co/docs/transformers/tasks/token_classification
- map the function on dataset and get "ValueError: Class label -100 less than -1" from cast_storage method from datasets.features
# Sample code to reproduce the bug
def tokenize_and_align_labels(examples):
tokenized_inputs = tokenizer(examples["tokens"], truncation=True, is_split_into_words=True, max_length=38,padding="max_length")
labels = []
for i, label in enumerate(examples[f"labels"]):
word_ids = tokenized_inputs.word_ids(batch_index=i) # Map tokens to their respective word.
previous_word_idx = None
label_ids = []
for word_idx in word_ids: # Set the special tokens to -100.
if word_idx is None:
label_ids.append(-100)
elif word_idx != previous_word_idx: # Only label the first token of a given word.
label_ids.append(label[word_idx])
else:
label_ids.append(-100)
previous_word_idx = word_idx
labels.append(label_ids)
tokenized_inputs["labels"] = labels
return tokenized_inputs
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
dt = dataset.map(tokenize_and_align_labels, batched=True)
## Expected results
New dataset objects should load and do on older versions.
## Actual results
"ValueError: Class label -100 less than -1" from cast_storage method from datasets.features
## Environment info
everything works fine on older installations of datasets/transformers
Issue arises when installing datasets on google collab under python3.7
I can't manage to find the exact output you're requirering but version printed is datasets-2.3.2
| 86 | cast_storage method from datasets.features
## Describe the bug
A bug occurs when mapping a function to a dataset object. I ran the same code with the same data yesterday and it worked just fine. It works when i run locally on an old version of datasets.
## Steps to reproduce the bug
Steps are:
- load whatever datset
- write a preprocessing function such as "tokenize_and_align_labels" written in https://huggingface.co/docs/transformers/tasks/token_classification
- map the function on dataset and get "ValueError: Class label -100 less than -1" from cast_storage method from datasets.features
# Sample code to reproduce the bug
def tokenize_and_align_labels(examples):
tokenized_inputs = tokenizer(examples["tokens"], truncation=True, is_split_into_words=True, max_length=38,padding="max_length")
labels = []
for i, label in enumerate(examples[f"labels"]):
word_ids = tokenized_inputs.word_ids(batch_index=i) # Map tokens to their respective word.
previous_word_idx = None
label_ids = []
for word_idx in word_ids: # Set the special tokens to -100.
if word_idx is None:
label_ids.append(-100)
elif word_idx != previous_word_idx: # Only label the first token of a given word.
label_ids.append(label[word_idx])
else:
label_ids.append(-100)
previous_word_idx = word_idx
labels.append(label_ids)
tokenized_inputs["labels"] = labels
return tokenized_inputs
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
dt = dataset.map(tokenize_and_align_labels, batched=True)
## Expected results
New dataset objects should load and do on older versions.
## Actual results
"ValueError: Class label -100 less than -1" from cast_storage method from datasets.features
## Environment info
everything works fine on older installations of datasets/transformers
Issue arises when installing datasets on google collab under python3.7
I can't manage to find the exact output you're requirering but version printed is datasets-2.3.2
Hi! We've recently added a check to the `ClassLabel` type to ensure the values are in the valid label range `-1, 0, ..., num_classes-1` (-1 is used for missing values). The error in your case happens only if the `labels` column is of type `Sequence(ClassLabel(...))` before the `map` call and can be avoided by calling `dataset = dataset.cast_column("labels", Sequence(Value("int")))` beforehand. The token-classification examples in Transformers introduce a new `labels` column, so their type is also `Sequence(Value("int"))`, which doesn't lead to an error as this type unbounded. | [
-0.3089793622493744,
-0.13102863729000092,
0.1109490692615509,
0.05474085733294487,
0.5661734342575073,
-0.1985185593366623,
0.3588041365146637,
0.22773292660713196,
0.02829030156135559,
0.24875777959823608,
-0.12301083654165268,
0.45689085125923157,
-0.14625199139118195,
0.057177990674972534,
0.09477499127388,
-0.050412654876708984,
0.30897894501686096,
-0.0631350576877594,
-0.18672111630439758,
-0.09247097373008728,
-0.4215737581253052,
0.04786182940006256,
-0.28447425365448,
0.1155749261379242,
-0.4241170287132263,
0.07031039893627167,
0.11156134307384491,
-0.21936020255088806,
-0.09225761890411377,
-0.3735732138156891,
0.1789734810590744,
-0.19509680569171906,
0.2048022449016571,
0.5009598731994629,
-0.00011592834198381752,
-0.23264048993587494,
0.20564185082912445,
0.03146306425333023,
-0.20551009476184845,
-0.20939742028713226,
-0.030467985197901726,
0.04265003651380539,
-0.0020048851147294044,
-0.09635128080844879,
-0.15311048924922943,
-0.10813355445861816,
0.0016433298587799072,
-0.24308356642723083,
0.20198211073875427,
0.25164493918418884,
0.19636553525924683,
0.25574299693107605,
0.2028651088476181,
-0.14128056168556213,
0.054929617792367935,
0.05932269245386124,
-0.20390920341014862,
0.3051358759403229,
0.161173015832901,
0.00002368912100791931,
0.015248194336891174,
0.4431770145893097,
-0.04876290634274483,
-0.16905662417411804,
0.5061055421829224,
0.06535801291465759,
-0.0027211755514144897,
-0.33871135115623474,
0.18182089924812317,
-0.28305569291114807,
0.4122520983219147,
-0.4049656093120575,
-0.4658198952674866,
-0.3470238149166107,
-0.10087928920984268,
-0.34063059091567993,
0.19455742835998535,
-0.283049076795578,
0.0803685337305069,
0.10144301503896713,
-0.38428324460983276,
0.0030621348414570093,
-0.04651809483766556,
0.18428824841976166,
-0.04326479882001877,
0.4567350149154663,
-0.22616757452487946,
0.17562459409236908,
0.06003262847661972,
-0.3791200518608093,
-0.10766071081161499,
-0.006188923493027687,
0.09198378026485443,
0.36323511600494385,
-0.20552535355091095,
-0.3469327390193939,
0.06790365278720856,
-0.16375517845153809,
0.0749729797244072,
0.27945801615715027,
-0.23715056478977203,
0.14574983716011047,
-0.006091626361012459,
0.012995973229408264,
0.2009114921092987,
0.6958580613136292,
0.21195030212402344,
0.4480518698692322,
-0.00044080987572669983,
0.0014429230941459537,
-0.2507326006889343,
-0.2436242401599884,
-0.01402315590530634,
0.0806768387556076,
0.40497106313705444,
0.038259103894233704,
0.1864214688539505,
-0.24504417181015015,
-0.09995050728321075,
0.12618981301784515,
-0.22114315629005432,
0.3550832271575928,
0.27866673469543457,
0.3711444139480591,
0.23542992770671844,
0.019597943872213364,
0.02570275217294693,
0.34156090021133423,
-0.21117337048053741,
0.08576839417219162,
-0.16757433116436005,
-0.005041820928454399,
-0.23527885973453522,
-0.04228583723306656,
-0.11028969287872314,
0.10907146334648132,
0.10065212100744247,
-0.022378312423825264,
0.11719492077827454,
-0.2087051421403885,
0.14145706593990326,
-0.10194408893585205,
0.5824167132377625,
0.13110506534576416,
-0.44284555315971375,
0.359672486782074,
0.23218965530395508,
-0.2757951021194458,
-0.18168306350708008,
-0.06152253597974777,
-0.23898831009864807,
-0.2775028347969055,
-0.14704817533493042,
0.17603902518749237,
0.0030872412025928497,
0.12621548771858215,
-0.29059743881225586,
0.25509488582611084,
0.3373057246208191,
-0.17543889582157135,
0.09509985148906708,
-0.31501638889312744,
-0.5469134449958801,
-0.1456429809331894,
0.2682993412017822,
0.28645455837249756,
-0.14082762598991394,
-0.19833841919898987,
-0.1166386753320694,
0.02663438208401203,
0.12753252685070038,
0.21274760365486145,
-0.059395235031843185,
0.3131290674209595,
-0.2843618094921112,
0.44804471731185913,
0.1312883049249649,
-0.39555057883262634,
-0.6613146662712097,
-0.007759887259453535,
-0.29905205965042114,
0.019405918195843697,
-0.46101170778274536,
-0.07615354657173157,
0.5865426063537598,
-0.19729478657245636,
0.1568419635295868,
-0.012692518532276154,
0.11504697054624557,
0.1499778926372528,
-0.32435762882232666,
0.03007630445063114,
-0.055295415222644806,
-0.2883184850215912,
0.09304076433181763,
0.27888619899749756,
0.05433088168501854,
0.42531198263168335,
-0.01291532814502716,
-0.1580979824066162,
0.26057565212249756,
0.0029829759150743484,
0.24762684106826782,
0.1306963860988617,
0.021662447601556778,
-0.473653644323349,
-0.42928144335746765,
0.1703622043132782,
0.34693148732185364,
0.08466904610395432,
-0.09042197465896606,
-0.18037226796150208,
-0.1300370693206787,
0.3478775918483734,
-0.15562395751476288,
-0.2350797951221466,
0.10328026115894318,
0.033123522996902466,
0.22488084435462952,
-0.0052550118416547775,
0.00290863960981369,
-0.024985985830426216,
0.15243162214756012,
0.19783909618854523,
-0.149618461728096,
0.09337971359491348,
0.05733485519886017,
-0.21457873284816742,
-0.3401308059692383,
0.1341235339641571,
0.37427616119384766,
-0.015910914167761803,
-0.33767881989479065,
0.35788196325302124,
0.10291643440723419,
-0.17844508588314056,
-0.4532789885997772,
0.3850720524787903,
0.2031649649143219,
-0.17942920327186584,
-0.10931091755628586,
0.2105439454317093,
0.17503343522548676,
0.09199967235326767,
-0.060303881764411926,
0.26729416847229004,
0.2741216719150543,
0.08622471988201141,
-0.1790761798620224,
0.12082294374704361,
0.009504863992333412,
0.06129813566803932,
-0.04667036980390549,
-0.5149130821228027,
-0.11382152140140533,
-0.25002798438072205,
0.24708737432956696,
-0.005478577688336372,
-0.028814494609832764,
0.26541048288345337,
0.4517497420310974,
-0.17475749552249908,
0.19896379113197327,
-0.013118550181388855,
-0.2877092659473419,
0.07843177020549774,
0.15525171160697937,
0.2152528613805771,
0.3421410024166107,
-0.002033140743151307,
-0.03355715051293373,
0.047691430896520615,
-0.0507044717669487,
0.10897073149681091,
-0.005249738693237305,
0.06309451162815094,
-0.025688152760267258,
0.1694013923406601,
0.2619622051715851,
0.21197310090065002,
-0.24707359075546265,
-0.06572169065475464,
-0.11124998331069946,
0.22705532610416412,
-0.4516703188419342,
0.0041505396366119385,
-0.267514705657959,
0.08456262201070786,
-0.355924516916275,
-0.05709877237677574,
-0.047110509127378464,
-0.32336413860321045,
-0.010044652968645096,
0.23442500829696655,
-0.323638379573822,
0.4645725190639496,
0.028989184647798538,
0.05204775929450989,
0.017058009281754494,
-0.1264028400182724,
-0.0971551239490509,
0.13568276166915894,
-0.10392043739557266,
-0.15577295422554016,
0.03360457718372345,
-0.08637203276157379,
0.11675608903169632,
0.03144180774688721,
-0.010944291949272156,
-0.4074253439903259,
-0.6910455822944641,
0.2050558179616928,
-0.09751220047473907,
0.3874155282974243,
0.11311118304729462,
-0.11791467666625977,
-0.24076233804225922,
-0.1486516147851944,
0.32553166151046753,
-0.4068891406059265,
-0.11818336695432663,
-0.1001758798956871,
0.1269644945859909,
-0.08618534356355667,
-0.22753581404685974,
0.04240339994430542,
0.05813673138618469,
-0.1974780261516571,
0.19054628908634186,
-0.06658431887626648,
0.08917213976383209,
0.03369354456663132,
-0.04346334561705589,
0.013286114670336246,
-0.15619933605194092,
0.014378954656422138,
-0.2892497479915619,
-0.07812890410423279,
0.25449487566947937,
-0.21365411579608917,
-0.2918928563594818,
-0.31906628608703613,
-0.08066296577453613,
-0.04418217018246651,
0.08123601227998734,
-0.07951685786247253,
-0.2939226031303406,
-0.23194651305675507,
0.12837724387645721,
0.02867552638053894,
-0.03397653251886368,
0.45183154940605164,
0.10375767946243286,
0.02745351381599903,
-0.3220377266407013,
-0.46915969252586365,
0.058218829333782196,
-0.04456603527069092,
0.0528300404548645,
-0.007297169417142868,
0.3127667307853699,
-0.09499213844537735,
0.5179356932640076,
0.03791269659996033,
-0.10621516406536102,
0.11989106237888336,
-0.1572975516319275,
0.3046626150608063,
-0.3607654869556427,
-0.3720872402191162,
0.13707639276981354,
0.06841076165437698,
-0.16430239379405975,
0.14063958823680878,
0.07013678550720215,
-0.015084100887179375,
0.24406203627586365,
-0.2692002058029175,
-0.03553863987326622,
-0.3511500060558319,
0.05595098435878754,
-0.12963488698005676,
0.05730345845222473,
0.08133596181869507,
0.321016401052475,
-0.3471549451351166,
-0.026231667026877403,
0.14936992526054382,
-0.0978328287601471,
-0.078578419983387,
0.029481060802936554,
-0.5631706714630127,
-0.08621624112129211,
-0.4227449893951416,
0.3118898272514343,
0.2106756716966629,
0.31704017519950867,
-0.021149303764104843,
-0.22861286997795105,
-0.06025807559490204,
0.0836777612566948,
0.406404972076416,
-0.2619496285915375,
0.21836501359939575,
0.036054469645023346,
-0.16541799902915955,
-0.1572621762752533,
-0.011693377047777176,
0.011533327400684357,
0.10164075344800949,
0.17892010509967804,
0.7696003913879395,
-0.09433848410844803,
-0.21229387819766998,
0.07947947084903717,
-0.018994728103280067,
-0.027234315872192383,
0.1344086229801178,
-0.14008764922618866,
-0.17505240440368652,
-0.37919384241104126,
0.2777595520019531,
0.30088862776756287,
0.16774187982082367,
0.1374567449092865,
0.010829489678144455,
-0.18321335315704346,
-0.055268242955207825,
-0.12418840825557709,
0.11398722231388092,
0.33575183153152466,
0.04046938195824623,
0.2146603912115097,
0.22071252763271332,
-0.029959850013256073,
0.2771531939506531,
0.3417603671550751,
-0.16196690499782562,
-0.5454023480415344,
0.1514018476009369,
0.08186401426792145,
0.18634966015815735,
0.2790924310684204,
-0.09028752893209457,
-0.13641491532325745,
-0.13553692400455475,
0.3686254024505615,
-0.42237910628318787,
0.07290215790271759,
0.2961444556713104,
0.24984514713287354,
-0.3461133539676666,
-0.2256895899772644,
0.2613390386104584,
0.048132333904504776,
-0.18750110268592834,
0.0692644864320755,
0.17439135909080505,
-0.4182671308517456,
0.5797436833381653,
0.19429875910282135,
0.933394730091095,
-0.0697689801454544,
0.02995455078780651,
0.18152034282684326,
0.0887768566608429,
0.6450950503349304,
0.018634416162967682,
0.07327782362699509,
-0.4084642231464386,
-0.2261386662721634,
0.06825072318315506,
0.02331727370619774,
-0.12935003638267517,
0.00706423819065094,
-0.25779202580451965,
0.07908978313207626,
-0.1049308255314827,
0.5759717226028442,
-0.05146246403455734,
0.05367414653301239,
0.08991178125143051,
-0.3474823534488678,
-0.26609423756599426,
0.1810658872127533,
0.22158263623714447,
0.3663705885410309,
-0.04248395562171936,
0.10837637633085251,
-0.058638282120227814,
-0.42830532789230347,
-0.29986119270324707,
0.18274331092834473,
-0.22869977355003357,
0.11031297594308853,
0.3131638765335083,
0.09245304763317108,
0.12932173907756805,
0.21161684393882751,
0.42863672971725464,
0.44185909628868103,
-0.18686287105083466,
0.04829418286681175,
0.13071078062057495,
0.38166946172714233,
0.18829816579818726,
-0.3210006356239319,
0.3017650544643402,
0.08341174572706223,
-0.042443692684173584,
-0.19290956854820251,
0.05794786661863327,
-0.043275050818920135,
-0.15007251501083374,
0.03954729065299034,
0.093799889087677,
-0.5172792673110962,
-0.003991399891674519,
-0.13855934143066406,
0.16394354403018951,
-0.3044997453689575,
0.12288141250610352,
-0.2580961585044861,
-0.0954965204000473,
-0.007053755223751068,
-0.06338159739971161,
-0.3386651575565338,
-0.0088161900639534,
0.42133858799934387,
-0.1432032287120819,
0.09692670404911041,
0.44828179478645325,
-0.10589229315519333,
-0.10639897733926773,
-0.1413775384426117,
0.04294168949127197,
0.43174639344215393,
-0.618989884853363,
0.32101115584373474,
-0.16513457894325256,
-0.2057318091392517,
0.00401489669457078,
0.4036600887775421,
0.046844061464071274,
-0.17012101411819458,
-0.13991637527942657,
-0.23171386122703552,
-0.4446335732936859,
0.055426225066185,
-0.009246330708265305,
0.15134839713573456,
0.10040507465600967,
0.44067293405532837,
-0.09328380972146988,
0.038930799812078476,
-0.3034982681274414,
-0.15480753779411316,
-0.26994946599006653,
0.20098011195659637,
0.1195673868060112,
0.011203009635210037,
0.08711014688014984,
-0.1143917441368103,
0.025522390380501747,
0.3499101996421814,
-0.14649109542369843,
-0.09251363575458527,
-0.32997533679008484,
0.14327947795391083,
0.2154598832130432,
-0.22437940537929535,
-0.17450650036334991,
0.10233420133590698,
0.01603662595152855,
-0.46738648414611816,
0.3742724657058716,
0.4313424527645111,
0.05576905608177185,
0.2837793827056885,
0.35702279210090637,
0.15032958984375,
0.20814670622348785,
0.07550577819347382,
0.15420113503932953,
0.24834242463111877,
-0.1462773084640503,
0.23728738725185394,
-0.16574977338314056,
0.03374538570642471,
0.00010943431698251516,
0.2759937644004822,
0.010509006679058075,
0.14488035440444946,
0.22765401005744934,
-0.20068703591823578,
0.055382583290338516,
0.40090861916542053,
0.3301742672920227,
0.06897779554128647,
-0.34156307578086853,
-0.30964338779449463,
0.3113594651222229,
0.15806061029434204,
-0.0823720172047615,
-0.22297650575637817,
0.2240830659866333,
-0.1570679396390915,
-0.06147479638457298,
0.07909857481718063,
0.034114960581064224,
-0.1448812633752823,
0.05482882633805275,
-0.06915641576051712,
0.4196004569530487,
-0.22529356181621552,
0.2031826376914978,
0.25484469532966614,
-0.04801297187805176,
0.20690345764160156,
0.5283762812614441,
0.13140037655830383,
0.2318935990333557,
0.29991334676742554,
-0.0937175527215004,
0.03228727728128433,
-0.0558808296918869,
0.17281639575958252,
0.023539960384368896,
-0.23007285594940186,
0.10373705625534058,
0.3372037410736084,
-0.23858997225761414,
0.1656067967414856,
-0.2139010727405548,
-0.06848856061697006,
-0.1744253784418106,
-0.3033626079559326,
0.08860548585653305,
0.3366537392139435,
-0.41600650548934937,
-0.22002556920051575,
0.06331955641508102,
0.02362825721502304,
-0.07899022847414017,
0.0927179604768753,
-0.22532227635383606,
-0.07461361587047577,
0.41199126839637756,
-0.1152590960264206,
0.003477834165096283,
-0.18025466799736023,
-0.20798709988594055,
0.06843813508749008,
0.28768348693847656,
-0.3043399155139923,
0.4285025894641876,
-0.12292708456516266,
0.12325525283813477,
0.07189765572547913,
0.3634882867336273,
0.5936453938484192,
0.32609593868255615,
0.09578923881053925,
0.0007931310683488846,
-0.1666385382413864,
-0.0055596549063920975,
-0.07335793972015381,
0.33924388885498047,
-0.08549079298973083,
-0.04807503893971443,
0.2994382381439209,
0.07620611041784286,
-0.13062447309494019,
-0.0007191598415374756,
-0.05790948495268822,
0.3016894459724426,
-0.0933440625667572,
0.34371766448020935,
-0.11520728468894958,
-0.06334762275218964,
-0.2267550528049469,
0.07060915231704712,
-0.1643364429473877,
0.07767186313867569,
0.3606988489627838,
-0.015839898958802223,
0.37196221947669983,
-0.2944672405719757,
0.10905185341835022,
0.3447088599205017,
0.3258868157863617,
0.2738371789455414,
-0.25712868571281433,
-0.25494399666786194,
-0.05631284788250923,
-0.5206552743911743,
0.26031431555747986,
0.07324036955833435,
0.07698800414800644,
0.06309528648853302,
-0.08018288761377335,
-0.05251077562570572,
-0.15140406787395477,
-0.050947949290275574,
-0.18556946516036987,
-0.10735663771629333,
0.07926196604967117,
0.0019693635404109955,
0.07043736428022385,
-0.27134913206100464,
0.021987196058034897,
0.28048592805862427,
-0.3818623423576355,
0.114775151014328,
-0.17076362669467926,
-0.01390840858221054,
0.0186859630048275,
0.1646108329296112,
-0.34682732820510864,
-0.22409898042678833,
0.4026488661766052,
0.37263786792755127,
0.2799811363220215,
-0.15763935446739197,
0.07758068293333054,
-0.20021039247512817,
-0.074124775826931,
-0.4503367841243744,
0.19621732831001282,
-0.13486050069332123,
0.4684564769268036,
-0.066289521753788,
0.20267993211746216,
-0.3475508391857147,
-0.27647364139556885,
0.20969991385936737,
-0.04721258208155632,
-0.4046735167503357,
0.39919736981391907,
-0.19412371516227722,
-0.055357929319143295,
0.08860985934734344,
0.3603086471557617,
0.137288898229599,
0.5432599186897278,
-0.2596398591995239,
-0.5228977203369141,
0.6682778000831604,
-0.4663870632648468,
-0.46858105063438416,
-0.0113305002450943,
0.09566080570220947,
0.19929629564285278,
-0.5061313509941101,
-0.7215898036956787,
0.03736530989408493,
0.31742486357688904,
0.1202574223279953,
-0.44022753834724426,
0.06886222958564758,
-0.14578664302825928,
-0.04444049298763275,
-0.11592693626880646,
0.7847024202346802,
0.12254662811756134,
-0.022672660648822784,
0.4655914604663849,
-0.1304675042629242
] |
https://github.com/huggingface/datasets/issues/4507 | How to let `load_dataset` return a `Dataset` instead of `DatasetDict` in customized loading script | Hi @liyucheng09.
Users can pass the `split` parameter to `load_dataset`. For example, if your split name is "train",
```python
ds = load_dataset("dataset_name", split="train")
```
will return a `Dataset` instance. | If the dataset does not need splits, i.e., no training and validation split, more like a table. How can I let the `load_dataset` function return a `Dataset` object directly rather than return a `DatasetDict` object with only one key-value pair.
Or I can paraphrase the question in the following way: how to skip `_split_generators` step in `DatasetBuilder` to let `as_dataset` gives a single `Dataset` rather than a list`[Dataset]`?
Many thanks for any help. | 29 | How to let `load_dataset` return a `Dataset` instead of `DatasetDict` in customized loading script
If the dataset does not need splits, i.e., no training and validation split, more like a table. How can I let the `load_dataset` function return a `Dataset` object directly rather than return a `DatasetDict` object with only one key-value pair.
Or I can paraphrase the question in the following way: how to skip `_split_generators` step in `DatasetBuilder` to let `as_dataset` gives a single `Dataset` rather than a list`[Dataset]`?
Many thanks for any help.
Hi @liyucheng09.
Users can pass the `split` parameter to `load_dataset`. For example, if your split name is "train",
```python
ds = load_dataset("dataset_name", split="train")
```
will return a `Dataset` instance. | [
-0.1562710702419281,
-0.02551160752773285,
0.021684885025024414,
0.1328735053539276,
0.20360057055950165,
0.0798845961689949,
0.37073591351509094,
0.2622440457344055,
0.40183335542678833,
0.30113378167152405,
0.04661203920841217,
0.5615159273147583,
-0.18064871430397034,
0.5828617811203003,
0.2112601101398468,
-0.05937231332063675,
-0.06677430123090744,
0.44857165217399597,
-0.009136758744716644,
-0.015142057090997696,
-0.4958464503288269,
-0.0038721710443496704,
-0.010075092315673828,
-0.0624082088470459,
-0.015279972925782204,
0.15451213717460632,
0.09851858019828796,
0.19700270891189575,
-0.21678832173347473,
-0.2041802704334259,
0.46003368496894836,
0.3231223523616791,
-0.13200466334819794,
-0.016506008803844452,
-0.00012994837015867233,
0.0873325914144516,
0.11491457372903824,
-0.1478409469127655,
-0.4293544292449951,
-0.4261131286621094,
-0.18165603280067444,
-0.0002882992848753929,
0.32180026173591614,
-0.12232732772827148,
-0.18256822228431702,
-0.18759481608867645,
-0.18903273344039917,
-0.44527673721313477,
0.135265052318573,
0.19642163813114166,
0.04590683430433273,
0.011509155854582787,
-0.4192664623260498,
0.02012534998357296,
-0.14790180325508118,
0.3070146441459656,
-0.04790499061346054,
-0.11707592010498047,
0.08887027204036713,
0.04480531066656113,
-0.07462497800588608,
0.009631925262510777,
-0.19849440455436707,
-0.08224606513977051,
0.6155270338058472,
0.12569323182106018,
-0.018165335059165955,
-0.3528401553630829,
0.1441337764263153,
0.15642452239990234,
0.5480502247810364,
-0.2732788622379303,
-0.18086452782154083,
-0.3214796185493469,
0.13473711907863617,
-0.3792632222175598,
0.034823138266801834,
0.0017873719334602356,
-0.24990758299827576,
0.31898432970046997,
-0.23383283615112305,
-0.42262786626815796,
-0.23429714143276215,
-0.009370267391204834,
-0.22268496453762054,
-0.13090747594833374,
0.1492045819759369,
0.38985273241996765,
0.17102496325969696,
0.32060861587524414,
0.544529378414154,
-0.26307424902915955,
0.26132315397262573,
0.15854068100452423,
-0.11378920078277588,
-0.23528195917606354,
-0.05958744138479233,
0.003601856529712677,
0.1287904679775238,
0.2551608681678772,
0.2115303874015808,
0.0870918482542038,
-0.03415876254439354,
0.03274472802877426,
0.22475257515907288,
-0.13013401627540588,
0.417031854391098,
0.35836905241012573,
-0.050009794533252716,
-0.057413890957832336,
0.006831526756286621,
0.023720767349004745,
0.005574814975261688,
0.06085267663002014,
0.14341381192207336,
0.1553974151611328,
0.054642923176288605,
0.05279975011944771,
-0.2271072119474411,
0.02807331457734108,
0.10942370444536209,
-0.14441494643688202,
0.021733542904257774,
0.307502418756485,
0.09789970517158508,
0.4547724723815918,
-0.03338361904025078,
0.14315074682235718,
-0.043923407793045044,
-0.439675509929657,
-0.06059015542268753,
-0.019838247448205948,
-0.059144094586372375,
0.297252893447876,
0.29701849818229675,
-0.17125637829303741,
0.08363693207502365,
0.15557914972305298,
-0.1260536015033722,
-0.06788851320743561,
0.21444982290267944,
-0.11893534660339355,
0.18353502452373505,
0.26111507415771484,
0.19401432573795319,
0.09155255556106567,
0.14409521222114563,
-0.2852984666824341,
-0.21465298533439636,
0.2914004623889923,
-0.22389519214630127,
-0.5957714915275574,
0.026624586433172226,
0.014165380038321018,
-0.2639821767807007,
0.18693110346794128,
-0.17199298739433289,
0.19050997495651245,
-0.10568448156118393,
-0.04886144772171974,
-0.1726473569869995,
-0.19096189737319946,
-0.6254872679710388,
-0.3676324188709259,
0.1896422952413559,
0.16698800027370453,
-0.6392416954040527,
-0.19827067852020264,
-0.18186776340007782,
-0.2835058569908142,
0.10784944891929626,
-0.0701560229063034,
-0.27608606219291687,
0.6161097288131714,
-0.17803731560707092,
-0.2886200249195099,
0.6645247340202332,
-0.039185792207717896,
-0.47318342328071594,
0.3241494297981262,
-0.12310458719730377,
0.35975590348243713,
0.2418249547481537,
0.3295707106590271,
0.3020867109298706,
0.11265639960765839,
0.20461392402648926,
0.3951956629753113,
-0.1228937953710556,
-0.011571742594242096,
0.17274658381938934,
-0.3277474641799927,
0.4093306064605713,
0.020994924008846283,
0.2727798819541931,
0.5972186923027039,
-0.27419909834861755,
0.009877852164208889,
0.24644649028778076,
-0.07283304631710052,
-0.18045485019683838,
-0.11492927372455597,
-0.09904882311820984,
0.032668620347976685,
0.012641113251447678,
-0.07799375057220459,
-0.6933742165565491,
0.21589189767837524,
-0.0820770412683487,
-0.16003619134426117,
-0.06451776623725891,
-0.39890801906585693,
-0.26551035046577454,
0.028613990172743797,
-0.05009089782834053,
0.19339925050735474,
-0.0992305800318718,
-0.06888870894908905,
0.021505847573280334,
-0.3334117829799652,
-0.4798692762851715,
0.3861154317855835,
-0.09805575758218765,
0.3172760009765625,
-0.4474714398384094,
0.13171495497226715,
0.494873970746994,
0.1503208726644516,
-0.03761017322540283,
0.18170073628425598,
0.08634184300899506,
-0.007875930517911911,
0.09421626478433609,
0.3375488817691803,
0.32449454069137573,
-0.05245240032672882,
-0.22767892479896545,
0.034064412117004395,
-0.09482620656490326,
0.09676925837993622,
-0.04121490567922592,
0.06135636568069458,
0.1720970720052719,
-0.2104339897632599,
-0.04407871514558792,
0.49730104207992554,
-0.34298205375671387,
0.5015273094177246,
0.03165871649980545,
0.13364461064338684,
-0.01147117093205452,
-0.0732501894235611,
-0.3399433195590973,
-0.2038629800081253,
-0.14447714388370514,
-0.22845770418643951,
0.3930557072162628,
0.18664149940013885,
-0.23851028084754944,
0.03034088760614395,
0.5945290327072144,
-0.2643226981163025,
-0.052494414150714874,
0.10094389319419861,
-0.013094626367092133,
-0.1737290620803833,
-0.14926396310329437,
0.2935176491737366,
0.498676061630249,
0.07810205966234207,
-0.10694052278995514,
0.0908777266740799,
-0.03464404493570328,
0.010000588372349739,
0.27469179034233093,
-0.0008747652173042297,
0.07459121197462082,
0.14588940143585205,
-0.2482203245162964,
-0.23279017210006714,
-0.16242998838424683,
0.034342098981142044,
0.039635494351387024,
0.06964261084794998,
-0.36685067415237427,
-0.04984527826309204,
-0.24503573775291443,
0.1553504467010498,
-0.1963050663471222,
0.08572953194379807,
-0.047748055309057236,
-0.19547325372695923,
-0.022719476372003555,
0.11250555515289307,
0.0566827766597271,
-0.06865613162517548,
-0.0018179025501012802,
0.46143296360969543,
-0.33438727259635925,
-0.23554550111293793,
0.00300481915473938,
0.012900084257125854,
0.20561516284942627,
-0.06365574151277542,
-0.10242488980293274,
0.10618787258863449,
0.46570825576782227,
-0.2075536549091339,
-0.2617031931877136,
-0.021746503189206123,
0.1303742229938507,
0.2674383819103241,
0.08552394062280655,
0.11495092511177063,
0.598505973815918,
0.2509766221046448,
0.3557004928588867,
-0.1163974329829216,
0.07550546526908875,
-0.022983629256486893,
0.037400022149086,
0.010162578895688057,
0.03023679181933403,
0.5136423110961914,
-0.024684056639671326,
-0.17610898613929749,
-0.22058941423892975,
-0.20816729962825775,
-0.31381088495254517,
0.024078577756881714,
0.19397640228271484,
-0.14820919930934906,
0.148081973195076,
-0.023165978491306305,
0.15978190302848816,
-0.1257934272289276,
-0.16811154782772064,
-0.18293866515159607,
0.17551204562187195,
-0.0911015197634697,
-0.04626357927918434,
-0.12951460480690002,
-0.1841937154531479,
0.26902949810028076,
0.28489696979522705,
-0.30580413341522217,
0.29616448283195496,
-0.041960299015045166,
-0.03927917033433914,
-0.2726080119609833,
0.0035096686333417892,
0.2384151816368103,
0.2919347286224365,
0.16981613636016846,
-0.18550384044647217,
-0.15685304999351501,
0.08779783546924591,
-0.2282683551311493,
0.03363961726427078,
0.3201962411403656,
0.5044771432876587,
-0.09803958237171173,
0.7205929756164551,
0.05748109892010689,
-0.13006854057312012,
-0.10878060758113861,
-0.11873707920312881,
0.15908409655094147,
-0.22797170281410217,
-0.2857707142829895,
-0.5782793760299683,
-0.10835123062133789,
-0.03195140138268471,
0.2675737738609314,
-0.22023621201515198,
0.12768055498600006,
-0.27263742685317993,
0.01473001018166542,
-0.06795269250869751,
-0.20331226289272308,
0.30551308393478394,
-0.3847123384475708,
0.18192559480667114,
0.014664813876152039,
0.27076300978660583,
-0.3273251950740814,
0.12364285439252853,
-0.2205376774072647,
0.14338912069797516,
0.5386433601379395,
-0.12449658662080765,
-0.5678925514221191,
-0.11374423652887344,
-0.5242860317230225,
0.2513222396373749,
-0.06670275330543518,
-0.22615259885787964,
0.23436014354228973,
-0.1170124039053917,
0.14733314514160156,
0.18867728114128113,
0.6813730597496033,
-0.0002646148204803467,
-0.17115852236747742,
0.041975390166044235,
-0.30361369252204895,
-0.2385128140449524,
0.19151735305786133,
-0.03620864450931549,
0.730093240737915,
-0.2956472337245941,
0.19470950961112976,
-0.2660582363605499,
-0.3595271110534668,
0.1357579529285431,
0.25140926241874695,
-0.4507259130477905,
-0.23925888538360596,
-0.13435406982898712,
-0.044467415660619736,
-0.1130908951163292,
-0.15569552779197693,
-0.014955809339880943,
0.29150357842445374,
-0.3171710669994354,
-0.2837774157524109,
-0.2724781036376953,
-0.18919169902801514,
0.3688352704048157,
0.04622023180127144,
0.17224690318107605,
0.026973910629749298,
0.11518341302871704,
0.2741199731826782,
0.193810373544693,
0.01646525040268898,
0.6307210922241211,
-0.2937062084674835,
-0.5594392418861389,
-0.09314139187335968,
-0.04630141705274582,
0.5390300750732422,
0.305832177400589,
-0.2562633752822876,
0.2259978950023651,
0.02411545254290104,
-0.06671278178691864,
-0.38750115036964417,
0.10121180862188339,
0.07064680755138397,
-0.32575523853302,
-0.654390811920166,
-0.8745322823524475,
0.27935588359832764,
-0.037997327744960785,
-0.11832819133996964,
0.3191272020339966,
-0.0038327649235725403,
-0.41781559586524963,
0.46486586332321167,
-0.11042308062314987,
0.7547852396965027,
-0.2441018968820572,
0.09620626270771027,
-0.03583121299743652,
0.10144853591918945,
0.4450537860393524,
-0.009626895189285278,
-0.03080788627266884,
-0.386359840631485,
-0.3401954770088196,
-0.18268781900405884,
-0.11895276606082916,
0.2604873776435852,
0.6964110136032104,
-0.037332259118556976,
0.34449952840805054,
-0.12557658553123474,
-0.07241782546043396,
0.07057224959135056,
0.46215105056762695,
0.16145059466362,
-0.04730294272303581,
-0.01261676475405693,
-0.08572385460138321,
-0.13396766781806946,
0.02749096043407917,
0.1684713363647461,
0.16475175321102142,
0.08355522155761719,
-0.3841392993927002,
-0.019456863403320312,
-0.22500184178352356,
-0.15573443472385406,
-0.14619910717010498,
-0.022149469703435898,
-0.35819894075393677,
0.38740092515945435,
0.2920807898044586,
-0.04331301152706146,
0.12728343904018402,
0.04257255420088768,
-0.06359314918518066,
-0.04488573968410492,
0.38260024785995483,
-0.09309446066617966,
0.04240209609270096,
0.17614808678627014,
0.3120647668838501,
-0.2480170726776123,
0.12000929564237595,
-0.03917940706014633,
-0.37978607416152954,
0.09531551599502563,
-0.03757692873477936,
0.419114351272583,
-0.630536675453186,
-0.2894999384880066,
-0.010825693607330322,
0.31394466757774353,
-0.13441181182861328,
-0.07713498175144196,
0.07998345792293549,
-0.0920792892575264,
0.03266459330916405,
-0.11170671880245209,
-0.3688822388648987,
0.04567065089941025,
0.1012706309556961,
0.376878023147583,
-0.05495611950755119,
0.361948698759079,
-0.0550423339009285,
0.13931336998939514,
-0.22200673818588257,
0.2626275420188904,
0.494834303855896,
-0.34854111075401306,
0.4368523061275482,
0.2015274465084076,
0.15449662506580353,
-0.14024533331394196,
0.17366914451122284,
-0.2635737657546997,
0.2874387204647064,
-0.32849380373954773,
-0.10764066874980927,
-0.14884662628173828,
0.027495965361595154,
0.23751626908779144,
0.3781842291355133,
0.21328598260879517,
-0.08458170294761658,
-0.24316486716270447,
0.16548879444599152,
-0.14076724648475647,
-0.11186142265796661,
0.07091851532459259,
0.13326245546340942,
0.02975155971944332,
0.3312968611717224,
-0.23997822403907776,
0.07504300773143768,
0.010809456929564476,
-0.29020458459854126,
-0.00624694861471653,
-0.07877941429615021,
-0.20646549761295319,
0.26805999875068665,
-0.1155378445982933,
0.28845688700675964,
0.1159072294831276,
-0.03224346041679382,
-0.13705502450466156,
-0.15326158702373505,
0.22980281710624695,
0.1649584174156189,
0.18614664673805237,
0.35995587706565857,
0.2612731456756592,
0.16284865140914917,
-0.5198992490768433,
0.026647230610251427,
-0.14723926782608032,
0.4496847987174988,
-0.0012075472623109818,
0.3559940755367279,
0.04772180691361427,
-0.013096369802951813,
-0.12100410461425781,
0.005168847739696503,
0.2877466678619385,
0.1595962792634964,
0.17397540807724,
-0.001774221658706665,
0.257688045501709,
-0.10964663326740265,
0.19465075433254242,
0.34734705090522766,
-0.24550873041152954,
0.10349835455417633,
0.025890687480568886,
0.05098406970500946,
-0.16308076679706573,
-0.20619182288646698,
0.2908835709095001,
-0.22108720242977142,
0.06520819664001465,
0.5237260460853577,
-0.05193279683589935,
0.29271411895751953,
0.024279173463582993,
-0.32147881388664246,
0.3273352384567261,
0.15588665008544922,
0.2736498713493347,
0.8406696915626526,
0.14226381480693817,
0.04310544207692146,
0.1023208424448967,
0.1330839842557907,
-0.07236146181821823,
0.48877042531967163,
-0.036273129284381866,
0.3814881145954132,
-0.0968930646777153,
0.09220638126134872,
0.3325568437576294,
-0.3049435019493103,
0.07404671609401703,
0.19450029730796814,
-0.31178075075149536,
0.044549230486154556,
-0.11081625521183014,
0.028659965842962265,
-0.1980689913034439,
0.043617136776447296,
-0.08601956069469452,
-0.1238556057214737,
0.035084616392850876,
-0.23257741332054138,
-0.36475497484207153,
-0.129524365067482,
-0.35744330286979675,
0.03655073419213295,
-0.14413435757160187,
-0.35631752014160156,
0.08316665142774582,
-0.14573480188846588,
0.21831189095973969,
0.025187958031892776,
0.24591514468193054,
-0.16992750763893127,
-0.010103605687618256,
-0.034554265439510345,
-0.052294835448265076,
-0.15903441607952118,
0.41215142607688904,
0.5450948476791382,
-0.087422676384449,
-0.13088275492191315,
0.22270260751247406,
-0.07655857503414154,
-0.14383041858673096,
-0.04858690872788429,
-0.11873205006122589,
-0.2199498414993286,
-0.031995199620723724,
-0.15657782554626465,
0.09711545705795288,
0.30135685205459595,
0.0021959859877824783,
0.02804887294769287,
-0.17057737708091736,
0.37837666273117065,
0.1297939568758011,
-0.5263311266899109,
0.6033072471618652,
0.1924665868282318,
-0.23561173677444458,
-0.023665521293878555,
0.2945689260959625,
-0.1473335325717926,
-0.43189138174057007,
0.27202895283699036,
0.06147923693060875,
0.010853242129087448,
-0.0898531898856163,
-0.0028815269470214844,
-0.211335688829422,
0.5021452307701111,
-0.09199962019920349,
0.2520011365413666,
-0.37575945258140564,
-0.08811574429273605,
-0.1107872873544693,
0.010500192642211914,
0.01928294450044632,
-0.12695762515068054,
0.03747551143169403,
0.08287403732538223,
0.07851941883563995,
0.27701157331466675,
0.02217109501361847,
0.12451866269111633,
-0.15518376231193542,
0.42029693722724915,
0.24795286357402802,
-0.31231871247291565,
-0.21973763406276703,
0.23254437744617462,
-0.20341992378234863,
-0.30084219574928284,
0.056566450744867325,
0.1837770640850067,
-0.18310004472732544,
-0.026221632957458496,
-0.028295375406742096,
0.47139090299606323,
0.03683895245194435,
0.2373989075422287,
0.15381532907485962,
0.2501130700111389,
-0.032942987978458405,
0.12119891494512558,
0.10669076442718506,
0.12022113800048828,
-0.34784311056137085,
0.41127336025238037,
0.17536714673042297,
0.13634100556373596,
-0.06914272159337997,
0.09413965791463852,
-0.05276455357670784,
-0.09358090907335281,
0.12068566679954529,
-0.025240885093808174,
-0.5215944051742554,
0.17376992106437683,
-0.18237601220607758,
-0.06508179754018784,
0.08745406568050385,
0.4730634391307831,
0.02334892377257347,
0.01084529422223568,
-0.09154937416315079,
0.061713092029094696,
0.26829150319099426,
-0.21429899334907532,
-0.3247970938682556,
-0.01648392528295517,
0.22892755270004272,
0.020014729350805283,
-0.07161342352628708,
-0.3610440194606781,
-0.3254256844520569,
0.32444605231285095,
-0.2756791412830353,
0.09127871692180634,
0.20796801149845123,
0.03280356153845787,
0.10776180028915405,
-0.1478605717420578,
-0.09318400919437408,
0.1828474998474121,
-0.11473538726568222,
-0.146091029047966,
-0.5145769715309143
] |
https://github.com/huggingface/datasets/issues/4506 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results | Important info:
As hashes are generated randomly for functions, it leads to **false identifying some results as already hashed** (mapping function is not executed after a method update) when there's a `pytorch_lightning.seed_everything(123)` | ## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
| 32 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
Important info:
As hashes are generated randomly for functions, it leads to **false identifying some results as already hashed** (mapping function is not executed after a method update) when there's a `pytorch_lightning.seed_everything(123)` | [
0.10672178864479065,
0.02344939112663269,
0.008314356207847595,
-0.041032254695892334,
0.2454584389925003,
0.06037779897451401,
0.33440572023391724,
0.32415586709976196,
-0.10414811968803406,
0.049883536994457245,
0.278200626373291,
0.43940889835357666,
-0.22675356268882751,
-0.4884522557258606,
0.023868151009082794,
-0.04346679896116257,
0.011115819215774536,
-0.030841901898384094,
-0.060910746455192566,
-0.1307050585746765,
-0.2952660024166107,
0.09226478636264801,
-0.22410058975219727,
0.15662947297096252,
-0.403685063123703,
-0.19215935468673706,
0.09778088331222534,
0.09054307639598846,
0.10707338154315948,
-0.24282513558864594,
0.19910947978496552,
-0.1409236639738083,
-0.37319061160087585,
0.44022077322006226,
-0.00011341904610162601,
0.025860078632831573,
0.3562939763069153,
-0.20444242656230927,
-0.21711738407611847,
-0.220667764544487,
-0.33816924691200256,
-0.0019631879404187202,
0.009327518753707409,
-0.17839884757995605,
0.07954619079828262,
0.06933296471834183,
-0.0040088798850774765,
-0.5810602903366089,
0.42709124088287354,
0.1785760372877121,
0.18747195601463318,
-0.017387328669428825,
0.10517370700836182,
0.01684148609638214,
0.2805146276950836,
-0.06898187100887299,
-0.18444226682186127,
0.30907538533210754,
0.0027881115674972534,
0.07571689039468765,
-0.1500914990901947,
0.41446638107299805,
-0.11734826862812042,
0.07049286365509033,
0.06464432924985886,
0.000574890524148941,
0.1712941974401474,
-0.38897982239723206,
0.2322397530078888,
0.04791931435465813,
-0.07519788295030594,
-0.17827856540679932,
-0.3173028528690338,
-0.15851497650146484,
-0.2320987582206726,
-0.015932023525238037,
0.21504056453704834,
-0.18546085059642792,
-0.06411004066467285,
0.13230004906654358,
-0.5101627111434937,
-0.06389985233545303,
0.2161412537097931,
0.2309395968914032,
0.18349507451057434,
-0.21301710605621338,
-0.07444863766431808,
0.18340086936950684,
0.20272935926914215,
-0.2837027311325073,
0.14266979694366455,
-0.21910230815410614,
-0.09080250561237335,
0.3423565924167633,
-0.08932571113109589,
0.03193017840385437,
0.3433915972709656,
-0.19976800680160522,
0.22685331106185913,
0.0060284435749053955,
0.23794592916965485,
0.0998825803399086,
0.005378800444304943,
0.22224414348602295,
0.12507981061935425,
0.22549185156822205,
-0.02804197371006012,
0.3085099160671234,
0.10537084937095642,
-0.26930293440818787,
-0.2528292238712311,
0.04074417054653168,
0.2230495661497116,
-0.3017033338546753,
0.6913601160049438,
0.11981599777936935,
0.18125854432582855,
-0.12523804605007172,
0.011655932292342186,
0.1865127682685852,
-0.6204096078872681,
-0.14724254608154297,
-0.011624864302575588,
0.04529820382595062,
0.09119091928005219,
0.030384497717022896,
0.22832123935222626,
0.10893236845731735,
0.13735370337963104,
0.18111953139305115,
-0.24953298270702362,
-0.11615042388439178,
-0.39167919754981995,
0.37464284896850586,
0.09377627074718475,
-0.1054489016532898,
0.117457814514637,
0.10354968905448914,
0.28896385431289673,
-0.15122389793395996,
0.026457397267222404,
-0.059130895882844925,
0.5586838126182556,
0.07615499198436737,
-0.1517760157585144,
0.3664364814758301,
0.19900409877300262,
0.0756688266992569,
-0.12372090667486191,
0.029190849512815475,
-0.33316248655319214,
-0.3998660743236542,
0.44667142629623413,
0.16250231862068176,
-0.04268821328878403,
0.37178316712379456,
-0.07728249579668045,
0.11293236911296844,
0.43437162041664124,
-0.2751823663711548,
0.06768696010112762,
-0.10625456273555756,
-0.0929783284664154,
-0.38930362462997437,
0.19455301761627197,
0.40345239639282227,
0.21297335624694824,
0.04354441165924072,
-0.1454620212316513,
0.25654056668281555,
0.09008653461933136,
0.23415204882621765,
-0.2847282886505127,
0.23082232475280762,
-0.21696314215660095,
0.3403434753417969,
0.41557154059410095,
-0.003938879817724228,
-0.5698850750923157,
0.39545050263404846,
0.02627313882112503,
0.2425411492586136,
-0.1776411235332489,
-0.2147633582353592,
0.15156090259552002,
-0.33617159724235535,
0.5074620246887207,
0.04372455179691315,
-0.0465686172246933,
-0.028158510103821754,
-0.314063161611557,
-0.11543777585029602,
-0.051437877118587494,
-0.19368577003479004,
0.058775559067726135,
0.15708708763122559,
-0.04724825173616409,
0.06364474445581436,
0.06677944958209991,
-0.06811381876468658,
0.2009880095720291,
0.05493782460689545,
0.13846692442893982,
-0.35711783170700073,
0.025845225900411606,
-0.18843844532966614,
-0.31130945682525635,
0.14959803223609924,
0.08101463317871094,
-0.3353870213031769,
-0.17115651071071625,
-0.0258566252887249,
0.011598300188779831,
-0.168175607919693,
-0.22188378870487213,
-0.048807669430971146,
0.11028918623924255,
-0.059260159730911255,
0.20357953011989594,
-0.0869295597076416,
-0.12905792891979218,
0.03855857998132706,
0.040540993213653564,
-0.211253821849823,
-0.18231701850891113,
0.1054127961397171,
0.00723804347217083,
-0.30855321884155273,
-0.2560783326625824,
-0.014674626290798187,
0.3425849676132202,
0.011964265257120132,
-0.36056509613990784,
0.23684287071228027,
-0.11085351556539536,
-0.008332498371601105,
-0.29256659746170044,
0.42337629199028015,
-0.18478649854660034,
-0.38881391286849976,
0.12562084197998047,
0.32617640495300293,
0.0635872557759285,
-0.1365431249141693,
0.18205276131629944,
0.18379580974578857,
0.03765876591205597,
0.22324571013450623,
-0.15121692419052124,
0.06888851523399353,
0.29285407066345215,
-0.04677934572100639,
-0.26739081740379333,
-0.37898558378219604,
-0.06266598403453827,
-0.10238543152809143,
0.5523214936256409,
0.13022978603839874,
0.008248485624790192,
0.021434038877487183,
0.48775672912597656,
0.01935536041855812,
0.37541866302490234,
0.05874386802315712,
-0.09179604798555374,
-0.2270563542842865,
-0.21893370151519775,
0.12641103565692902,
0.31858062744140625,
-0.010816228576004505,
-0.0016771815717220306,
-0.019293496385216713,
-0.14102643728256226,
-0.10947708785533905,
0.09153829514980316,
-0.11903862655162811,
0.34869566559791565,
0.3594934046268463,
0.1741376370191574,
0.17378146946430206,
-0.014720190316438675,
-0.07009109854698181,
0.13719868659973145,
-0.06673841178417206,
-0.26903560757637024,
0.01773456670343876,
-0.3350536525249481,
0.24062436819076538,
-0.00864360947161913,
-0.39222022891044617,
0.031968168914318085,
-0.3352312743663788,
0.09323108196258545,
0.16093692183494568,
-0.28832170367240906,
0.3921137750148773,
-0.028058229014277458,
-0.013962805271148682,
0.05886136740446091,
-0.4205983281135559,
-0.27142322063446045,
-0.23006662726402283,
-0.143924742937088,
-0.048039019107818604,
-0.059607405215501785,
-0.39568787813186646,
0.138894721865654,
-0.08225443214178085,
-0.18680791556835175,
-0.37096384167671204,
-0.007582530379295349,
0.12315261363983154,
-0.10258223116397858,
0.23297525942325592,
0.020068690180778503,
-0.02276402711868286,
-0.14684152603149414,
-0.13326022028923035,
0.38052263855934143,
-0.40658771991729736,
-0.08783938735723495,
0.18743778765201569,
-0.03546365723013878,
-0.1447155624628067,
-0.15022414922714233,
-0.19003930687904358,
-0.025915006175637245,
-0.32444801926612854,
0.1364569216966629,
-0.5487316846847534,
0.020902063697576523,
0.2624354064464569,
0.17074072360992432,
0.05113760754466057,
-0.03364056348800659,
0.10815069079399109,
-0.4462893605232239,
-0.19726811349391937,
0.48771932721138,
-0.0482192300260067,
-0.026207726448774338,
-0.08760789781808853,
-0.24788279831409454,
0.09400948882102966,
0.5941733717918396,
-0.26399552822113037,
-0.17867058515548706,
-0.1435656100511551,
0.18192002177238464,
-0.12469547986984253,
0.0723356232047081,
0.3590698838233948,
0.21925108134746552,
-0.06752094626426697,
-0.24808785319328308,
-0.37834033370018005,
0.042670730501413345,
0.2657923400402069,
0.31878697872161865,
0.339225172996521,
0.3653058707714081,
0.055731844156980515,
1.0950074195861816,
0.27663442492485046,
-0.2788728177547455,
0.057804908603429794,
-0.06334754079580307,
0.050309404730796814,
-0.06594247370958328,
-0.31974929571151733,
-0.19707068800926208,
-0.15556633472442627,
-0.30353844165802,
-0.12993207573890686,
-0.038176510483026505,
-0.44883328676223755,
-0.10250633955001831,
0.004282291978597641,
-0.5498935580253601,
-0.5066492557525635,
0.38415321707725525,
-0.6594849824905396,
0.21803608536720276,
-0.0039604660123586655,
0.259962797164917,
-0.08913251757621765,
-0.007002220489084721,
0.20186010003089905,
-0.1478119045495987,
0.5546920299530029,
-0.06350085884332657,
0.10882890224456787,
-0.05048989877104759,
-0.0713808611035347,
0.3245687484741211,
0.14680930972099304,
0.39519190788269043,
-0.2778644263744354,
-0.23660549521446228,
-0.3108753561973572,
0.10367527604103088,
0.21135392785072327,
-0.534941554069519,
0.05378393828868866,
0.0988907516002655,
-0.24165679514408112,
-0.27807867527008057,
-0.06267614662647247,
-0.06710448116064072,
0.6168242692947388,
0.10974553227424622,
0.0989309698343277,
-0.3072068691253662,
0.16755253076553345,
-0.12685394287109375,
0.16267512738704681,
-0.009410608559846878,
0.002681613899767399,
-0.10184827446937561,
-0.08789880573749542,
-0.2798585593700409,
0.03248275816440582,
0.2518576383590698,
-0.2553686201572418,
0.17729395627975464,
-0.08578501641750336,
0.1374814212322235,
0.05449763685464859,
-0.011012755334377289,
0.10165515542030334,
0.36731791496276855,
-0.10278645902872086,
0.3102349638938904,
0.11208610236644745,
0.14941081404685974,
-0.15556712448596954,
0.6105509400367737,
-0.05508286878466606,
-0.07477045059204102,
-0.0613456666469574,
0.0753725916147232,
0.17703640460968018,
0.545122504234314,
-0.28186386823654175,
-0.04576700180768967,
-0.032282207161188126,
0.16824904084205627,
-0.05560235306620598,
-0.195621058344841,
0.44407832622528076,
-0.1577320694923401,
-0.20198151469230652,
-0.3905997574329376,
0.5154627561569214,
0.3704952299594879,
-0.22074709832668304,
0.7332896590232849,
-0.2675744891166687,
-0.2885895073413849,
0.444863498210907,
0.060200683772563934,
1.121077299118042,
0.12281181663274765,
0.006543461233377457,
-0.30641254782676697,
0.1591850370168686,
-0.03261618688702583,
0.17723225057125092,
0.15544608235359192,
-0.21069231629371643,
-0.04236805811524391,
0.05984931439161301,
-0.18225619196891785,
-0.16315814852714539,
0.24551507830619812,
-0.26925069093704224,
0.2202603816986084,
-0.3145027458667755,
0.2913617193698883,
0.035656049847602844,
-0.21430926024913788,
-0.09019854664802551,
-0.2130672037601471,
-0.16262997686862946,
0.14913561940193176,
0.2448274940252304,
0.05870463326573372,
0.0072253793478012085,
-0.003677097149193287,
-0.1219896525144577,
-0.2751725912094116,
-0.3765559196472168,
0.36354881525039673,
-0.38105520606040955,
0.2893524169921875,
0.011804338544607162,
0.04974846541881561,
-0.07383056730031967,
-0.019354481250047684,
0.024500902742147446,
0.20080271363258362,
-0.12788528203964233,
0.026691293343901634,
0.4780782461166382,
0.30602777004241943,
0.02888433448970318,
-0.01942325383424759,
0.4362160265445709,
0.12196104973554611,
-0.029859349131584167,
-0.009070917963981628,
-0.28844723105430603,
-0.3919355869293213,
-0.5875298380851746,
0.10671087354421616,
-0.04944045841693878,
-0.22006787359714508,
-0.1286449432373047,
0.12082523107528687,
-0.12341630458831787,
-0.028316065669059753,
0.1477459818124771,
0.30926406383514404,
-0.144157275557518,
0.4693050682544708,
-0.0066106319427490234,
-0.23819060623645782,
0.2397845834493637,
0.264949768781662,
-0.2365322709083557,
-0.08623246848583221,
0.23264159262180328,
-0.30993059277534485,
-0.16008606553077698,
-0.1618918776512146,
-0.14843720197677612,
-0.05047139897942543,
-0.34749725461006165,
0.2411728948354721,
-0.2873571515083313,
0.09375268220901489,
-0.0028823665343225002,
0.029928110539913177,
0.2591094374656677,
0.20125585794448853,
-0.23957309126853943,
-0.279718279838562,
-0.11726868152618408,
0.22633519768714905,
0.14091114699840546,
0.25850242376327515,
-0.26606398820877075,
-0.016896378248929977,
0.028694557026028633,
0.3573027551174164,
-0.32508742809295654,
0.02900615893304348,
0.12603849172592163,
0.25007936358451843,
-0.0004295334219932556,
0.19445282220840454,
0.21474304795265198,
-0.12522825598716736,
0.09510958939790726,
0.2954009175300598,
-0.3408240079879761,
-0.1499755084514618,
-0.18493185937404633,
0.153611958026886,
0.0960521325469017,
-0.004905602894723415,
0.01908329874277115,
-0.15882188081741333,
0.08352717757225037,
-0.38131678104400635,
0.14442899823188782,
0.4542689025402069,
0.08963750302791595,
0.13396434485912323,
0.21403251588344574,
0.013384167104959488,
-0.14347100257873535,
0.051773250102996826,
-0.24224308133125305,
0.18178802728652954,
-0.19912150502204895,
-0.0006549805402755737,
0.04842625930905342,
-0.049424052238464355,
-0.06631289422512054,
-0.1244044080376625,
0.03612279146909714,
0.0848609060049057,
0.3314950168132782,
-0.1483912318944931,
0.033614885061979294,
0.18031617999076843,
0.2627096176147461,
0.3401769995689392,
-0.3613581955432892,
-0.11899951100349426,
0.0034463410265743732,
0.15623527765274048,
0.004015136510133743,
-0.05186860263347626,
0.12740279734134674,
0.1737811118364334,
0.02064712718129158,
0.08647467941045761,
-0.06569952517747879,
-0.16146054863929749,
0.03916051611304283,
-0.02919521927833557,
0.19459004700183868,
-0.5494240522384644,
0.043733496218919754,
0.1894075572490692,
-0.02470315992832184,
0.18253132700920105,
0.361465185880661,
-0.17430713772773743,
0.2527831792831421,
0.22039900720119476,
0.005803808569908142,
0.31866857409477234,
0.10268634557723999,
0.10864078998565674,
-0.01372334361076355,
-0.17353224754333496,
0.1423761397600174,
0.224227175116539,
-0.24820071458816528,
0.2787747383117676,
0.03871200978755951,
0.1530877947807312,
-0.09099743515253067,
-0.07212432473897934,
0.00016506202518939972,
0.20406830310821533,
-0.1327466070652008,
0.04663532227277756,
0.25987479090690613,
-0.10128381103277206,
-0.38612088561058044,
-0.16762199997901917,
-0.052770551294088364,
0.12094563990831375,
1.1269623041152954,
0.3190651535987854,
0.036946851760149,
0.07448966801166534,
-0.1697850525379181,
0.03936902806162834,
0.5396586060523987,
-0.3392516076564789,
0.2798502445220947,
-0.04264640808105469,
-0.2931971251964569,
0.07972061634063721,
0.35562217235565186,
0.44002479314804077,
0.42510151863098145,
-0.1851024180650711,
0.2950836718082428,
-0.037018291652202606,
-0.05912918597459793,
-0.04560313746333122,
0.6426827311515808,
0.03151564300060272,
-0.277556449174881,
0.14610764384269714,
0.1371355652809143,
-0.17771264910697937,
0.3425386846065521,
-0.14309097826480865,
0.4063837230205536,
-0.05130922049283981,
0.644219160079956,
-0.03915009647607803,
-0.011288542300462723,
0.012720894068479538,
0.023795492947101593,
-0.3251144587993622,
-0.4672824442386627,
0.3834061920642853,
-0.16726753115653992,
0.21782559156417847,
-0.11776190996170044,
0.11724208295345306,
0.12978769838809967,
0.389065146446228,
0.5564422011375427,
-0.0019525960087776184,
-0.2580704092979431,
0.031041376292705536,
-0.4754715859889984,
0.19635939598083496,
-0.21033266186714172,
0.11761735379695892,
-0.0757770910859108,
0.20470044016838074,
0.1700727790594101,
0.39311498403549194,
0.1445557326078415,
-0.28797826170921326,
-0.10092367231845856,
0.19574348628520966,
-0.25716426968574524,
-0.1369859129190445,
-0.20446552336215973,
-0.07216291129589081,
0.2450331747531891,
-0.3888799846172333,
-0.0739859938621521,
-0.027478504925966263,
0.14432188868522644,
-0.07223322987556458,
-0.43118929862976074,
0.22505390644073486,
0.13902059197425842,
0.7400192618370056,
0.3751417398452759,
0.22019268572330475,
-0.21221482753753662,
-0.1634574830532074,
-0.15549378097057343,
-0.1684451848268509,
0.036228738725185394,
0.0005240365862846375,
0.06529311090707779,
0.1398710012435913,
-0.20894043147563934,
-0.14072075486183167,
-0.4232511520385742,
-0.17884543538093567,
-0.17545603215694427,
-0.08009246736764908,
-0.1881542056798935,
0.07805784791707993,
-0.16223159432411194,
0.005746190436184406,
-0.05869843810796738,
0.5002332329750061,
-0.3014855682849884,
0.30193012952804565,
-0.19423317909240723,
-0.4128889739513397,
0.590125322341919,
-0.40912705659866333,
-0.34970828890800476,
-0.08457282185554504,
0.3347123861312866,
-0.3761083483695984,
-0.2019043117761612,
-0.38284197449684143,
-0.25132420659065247,
0.37954509258270264,
-0.07829896360635757,
-0.19901211559772491,
-0.05389599874615669,
-0.004737691022455692,
-0.01438063383102417,
-0.05519016459584236,
0.40118101239204407,
0.06552717089653015,
-0.06954140961170197,
0.13794945180416107,
-0.1063961386680603
] |
https://github.com/huggingface/datasets/issues/4506 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results | Hi ! Thanks for reporting. This bug seems to appear in python 3.9 using dill 3.5.1
As a workaround you can use an older version of dill:
```
pip install "dill<0.3.5"
``` | ## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
| 32 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
Hi ! Thanks for reporting. This bug seems to appear in python 3.9 using dill 3.5.1
As a workaround you can use an older version of dill:
```
pip install "dill<0.3.5"
``` | [
0.10672178864479065,
0.02344939112663269,
0.008314356207847595,
-0.041032254695892334,
0.2454584389925003,
0.06037779897451401,
0.33440572023391724,
0.32415586709976196,
-0.10414811968803406,
0.049883536994457245,
0.278200626373291,
0.43940889835357666,
-0.22675356268882751,
-0.4884522557258606,
0.023868151009082794,
-0.04346679896116257,
0.011115819215774536,
-0.030841901898384094,
-0.060910746455192566,
-0.1307050585746765,
-0.2952660024166107,
0.09226478636264801,
-0.22410058975219727,
0.15662947297096252,
-0.403685063123703,
-0.19215935468673706,
0.09778088331222534,
0.09054307639598846,
0.10707338154315948,
-0.24282513558864594,
0.19910947978496552,
-0.1409236639738083,
-0.37319061160087585,
0.44022077322006226,
-0.00011341904610162601,
0.025860078632831573,
0.3562939763069153,
-0.20444242656230927,
-0.21711738407611847,
-0.220667764544487,
-0.33816924691200256,
-0.0019631879404187202,
0.009327518753707409,
-0.17839884757995605,
0.07954619079828262,
0.06933296471834183,
-0.0040088798850774765,
-0.5810602903366089,
0.42709124088287354,
0.1785760372877121,
0.18747195601463318,
-0.017387328669428825,
0.10517370700836182,
0.01684148609638214,
0.2805146276950836,
-0.06898187100887299,
-0.18444226682186127,
0.30907538533210754,
0.0027881115674972534,
0.07571689039468765,
-0.1500914990901947,
0.41446638107299805,
-0.11734826862812042,
0.07049286365509033,
0.06464432924985886,
0.000574890524148941,
0.1712941974401474,
-0.38897982239723206,
0.2322397530078888,
0.04791931435465813,
-0.07519788295030594,
-0.17827856540679932,
-0.3173028528690338,
-0.15851497650146484,
-0.2320987582206726,
-0.015932023525238037,
0.21504056453704834,
-0.18546085059642792,
-0.06411004066467285,
0.13230004906654358,
-0.5101627111434937,
-0.06389985233545303,
0.2161412537097931,
0.2309395968914032,
0.18349507451057434,
-0.21301710605621338,
-0.07444863766431808,
0.18340086936950684,
0.20272935926914215,
-0.2837027311325073,
0.14266979694366455,
-0.21910230815410614,
-0.09080250561237335,
0.3423565924167633,
-0.08932571113109589,
0.03193017840385437,
0.3433915972709656,
-0.19976800680160522,
0.22685331106185913,
0.0060284435749053955,
0.23794592916965485,
0.0998825803399086,
0.005378800444304943,
0.22224414348602295,
0.12507981061935425,
0.22549185156822205,
-0.02804197371006012,
0.3085099160671234,
0.10537084937095642,
-0.26930293440818787,
-0.2528292238712311,
0.04074417054653168,
0.2230495661497116,
-0.3017033338546753,
0.6913601160049438,
0.11981599777936935,
0.18125854432582855,
-0.12523804605007172,
0.011655932292342186,
0.1865127682685852,
-0.6204096078872681,
-0.14724254608154297,
-0.011624864302575588,
0.04529820382595062,
0.09119091928005219,
0.030384497717022896,
0.22832123935222626,
0.10893236845731735,
0.13735370337963104,
0.18111953139305115,
-0.24953298270702362,
-0.11615042388439178,
-0.39167919754981995,
0.37464284896850586,
0.09377627074718475,
-0.1054489016532898,
0.117457814514637,
0.10354968905448914,
0.28896385431289673,
-0.15122389793395996,
0.026457397267222404,
-0.059130895882844925,
0.5586838126182556,
0.07615499198436737,
-0.1517760157585144,
0.3664364814758301,
0.19900409877300262,
0.0756688266992569,
-0.12372090667486191,
0.029190849512815475,
-0.33316248655319214,
-0.3998660743236542,
0.44667142629623413,
0.16250231862068176,
-0.04268821328878403,
0.37178316712379456,
-0.07728249579668045,
0.11293236911296844,
0.43437162041664124,
-0.2751823663711548,
0.06768696010112762,
-0.10625456273555756,
-0.0929783284664154,
-0.38930362462997437,
0.19455301761627197,
0.40345239639282227,
0.21297335624694824,
0.04354441165924072,
-0.1454620212316513,
0.25654056668281555,
0.09008653461933136,
0.23415204882621765,
-0.2847282886505127,
0.23082232475280762,
-0.21696314215660095,
0.3403434753417969,
0.41557154059410095,
-0.003938879817724228,
-0.5698850750923157,
0.39545050263404846,
0.02627313882112503,
0.2425411492586136,
-0.1776411235332489,
-0.2147633582353592,
0.15156090259552002,
-0.33617159724235535,
0.5074620246887207,
0.04372455179691315,
-0.0465686172246933,
-0.028158510103821754,
-0.314063161611557,
-0.11543777585029602,
-0.051437877118587494,
-0.19368577003479004,
0.058775559067726135,
0.15708708763122559,
-0.04724825173616409,
0.06364474445581436,
0.06677944958209991,
-0.06811381876468658,
0.2009880095720291,
0.05493782460689545,
0.13846692442893982,
-0.35711783170700073,
0.025845225900411606,
-0.18843844532966614,
-0.31130945682525635,
0.14959803223609924,
0.08101463317871094,
-0.3353870213031769,
-0.17115651071071625,
-0.0258566252887249,
0.011598300188779831,
-0.168175607919693,
-0.22188378870487213,
-0.048807669430971146,
0.11028918623924255,
-0.059260159730911255,
0.20357953011989594,
-0.0869295597076416,
-0.12905792891979218,
0.03855857998132706,
0.040540993213653564,
-0.211253821849823,
-0.18231701850891113,
0.1054127961397171,
0.00723804347217083,
-0.30855321884155273,
-0.2560783326625824,
-0.014674626290798187,
0.3425849676132202,
0.011964265257120132,
-0.36056509613990784,
0.23684287071228027,
-0.11085351556539536,
-0.008332498371601105,
-0.29256659746170044,
0.42337629199028015,
-0.18478649854660034,
-0.38881391286849976,
0.12562084197998047,
0.32617640495300293,
0.0635872557759285,
-0.1365431249141693,
0.18205276131629944,
0.18379580974578857,
0.03765876591205597,
0.22324571013450623,
-0.15121692419052124,
0.06888851523399353,
0.29285407066345215,
-0.04677934572100639,
-0.26739081740379333,
-0.37898558378219604,
-0.06266598403453827,
-0.10238543152809143,
0.5523214936256409,
0.13022978603839874,
0.008248485624790192,
0.021434038877487183,
0.48775672912597656,
0.01935536041855812,
0.37541866302490234,
0.05874386802315712,
-0.09179604798555374,
-0.2270563542842865,
-0.21893370151519775,
0.12641103565692902,
0.31858062744140625,
-0.010816228576004505,
-0.0016771815717220306,
-0.019293496385216713,
-0.14102643728256226,
-0.10947708785533905,
0.09153829514980316,
-0.11903862655162811,
0.34869566559791565,
0.3594934046268463,
0.1741376370191574,
0.17378146946430206,
-0.014720190316438675,
-0.07009109854698181,
0.13719868659973145,
-0.06673841178417206,
-0.26903560757637024,
0.01773456670343876,
-0.3350536525249481,
0.24062436819076538,
-0.00864360947161913,
-0.39222022891044617,
0.031968168914318085,
-0.3352312743663788,
0.09323108196258545,
0.16093692183494568,
-0.28832170367240906,
0.3921137750148773,
-0.028058229014277458,
-0.013962805271148682,
0.05886136740446091,
-0.4205983281135559,
-0.27142322063446045,
-0.23006662726402283,
-0.143924742937088,
-0.048039019107818604,
-0.059607405215501785,
-0.39568787813186646,
0.138894721865654,
-0.08225443214178085,
-0.18680791556835175,
-0.37096384167671204,
-0.007582530379295349,
0.12315261363983154,
-0.10258223116397858,
0.23297525942325592,
0.020068690180778503,
-0.02276402711868286,
-0.14684152603149414,
-0.13326022028923035,
0.38052263855934143,
-0.40658771991729736,
-0.08783938735723495,
0.18743778765201569,
-0.03546365723013878,
-0.1447155624628067,
-0.15022414922714233,
-0.19003930687904358,
-0.025915006175637245,
-0.32444801926612854,
0.1364569216966629,
-0.5487316846847534,
0.020902063697576523,
0.2624354064464569,
0.17074072360992432,
0.05113760754466057,
-0.03364056348800659,
0.10815069079399109,
-0.4462893605232239,
-0.19726811349391937,
0.48771932721138,
-0.0482192300260067,
-0.026207726448774338,
-0.08760789781808853,
-0.24788279831409454,
0.09400948882102966,
0.5941733717918396,
-0.26399552822113037,
-0.17867058515548706,
-0.1435656100511551,
0.18192002177238464,
-0.12469547986984253,
0.0723356232047081,
0.3590698838233948,
0.21925108134746552,
-0.06752094626426697,
-0.24808785319328308,
-0.37834033370018005,
0.042670730501413345,
0.2657923400402069,
0.31878697872161865,
0.339225172996521,
0.3653058707714081,
0.055731844156980515,
1.0950074195861816,
0.27663442492485046,
-0.2788728177547455,
0.057804908603429794,
-0.06334754079580307,
0.050309404730796814,
-0.06594247370958328,
-0.31974929571151733,
-0.19707068800926208,
-0.15556633472442627,
-0.30353844165802,
-0.12993207573890686,
-0.038176510483026505,
-0.44883328676223755,
-0.10250633955001831,
0.004282291978597641,
-0.5498935580253601,
-0.5066492557525635,
0.38415321707725525,
-0.6594849824905396,
0.21803608536720276,
-0.0039604660123586655,
0.259962797164917,
-0.08913251757621765,
-0.007002220489084721,
0.20186010003089905,
-0.1478119045495987,
0.5546920299530029,
-0.06350085884332657,
0.10882890224456787,
-0.05048989877104759,
-0.0713808611035347,
0.3245687484741211,
0.14680930972099304,
0.39519190788269043,
-0.2778644263744354,
-0.23660549521446228,
-0.3108753561973572,
0.10367527604103088,
0.21135392785072327,
-0.534941554069519,
0.05378393828868866,
0.0988907516002655,
-0.24165679514408112,
-0.27807867527008057,
-0.06267614662647247,
-0.06710448116064072,
0.6168242692947388,
0.10974553227424622,
0.0989309698343277,
-0.3072068691253662,
0.16755253076553345,
-0.12685394287109375,
0.16267512738704681,
-0.009410608559846878,
0.002681613899767399,
-0.10184827446937561,
-0.08789880573749542,
-0.2798585593700409,
0.03248275816440582,
0.2518576383590698,
-0.2553686201572418,
0.17729395627975464,
-0.08578501641750336,
0.1374814212322235,
0.05449763685464859,
-0.011012755334377289,
0.10165515542030334,
0.36731791496276855,
-0.10278645902872086,
0.3102349638938904,
0.11208610236644745,
0.14941081404685974,
-0.15556712448596954,
0.6105509400367737,
-0.05508286878466606,
-0.07477045059204102,
-0.0613456666469574,
0.0753725916147232,
0.17703640460968018,
0.545122504234314,
-0.28186386823654175,
-0.04576700180768967,
-0.032282207161188126,
0.16824904084205627,
-0.05560235306620598,
-0.195621058344841,
0.44407832622528076,
-0.1577320694923401,
-0.20198151469230652,
-0.3905997574329376,
0.5154627561569214,
0.3704952299594879,
-0.22074709832668304,
0.7332896590232849,
-0.2675744891166687,
-0.2885895073413849,
0.444863498210907,
0.060200683772563934,
1.121077299118042,
0.12281181663274765,
0.006543461233377457,
-0.30641254782676697,
0.1591850370168686,
-0.03261618688702583,
0.17723225057125092,
0.15544608235359192,
-0.21069231629371643,
-0.04236805811524391,
0.05984931439161301,
-0.18225619196891785,
-0.16315814852714539,
0.24551507830619812,
-0.26925069093704224,
0.2202603816986084,
-0.3145027458667755,
0.2913617193698883,
0.035656049847602844,
-0.21430926024913788,
-0.09019854664802551,
-0.2130672037601471,
-0.16262997686862946,
0.14913561940193176,
0.2448274940252304,
0.05870463326573372,
0.0072253793478012085,
-0.003677097149193287,
-0.1219896525144577,
-0.2751725912094116,
-0.3765559196472168,
0.36354881525039673,
-0.38105520606040955,
0.2893524169921875,
0.011804338544607162,
0.04974846541881561,
-0.07383056730031967,
-0.019354481250047684,
0.024500902742147446,
0.20080271363258362,
-0.12788528203964233,
0.026691293343901634,
0.4780782461166382,
0.30602777004241943,
0.02888433448970318,
-0.01942325383424759,
0.4362160265445709,
0.12196104973554611,
-0.029859349131584167,
-0.009070917963981628,
-0.28844723105430603,
-0.3919355869293213,
-0.5875298380851746,
0.10671087354421616,
-0.04944045841693878,
-0.22006787359714508,
-0.1286449432373047,
0.12082523107528687,
-0.12341630458831787,
-0.028316065669059753,
0.1477459818124771,
0.30926406383514404,
-0.144157275557518,
0.4693050682544708,
-0.0066106319427490234,
-0.23819060623645782,
0.2397845834493637,
0.264949768781662,
-0.2365322709083557,
-0.08623246848583221,
0.23264159262180328,
-0.30993059277534485,
-0.16008606553077698,
-0.1618918776512146,
-0.14843720197677612,
-0.05047139897942543,
-0.34749725461006165,
0.2411728948354721,
-0.2873571515083313,
0.09375268220901489,
-0.0028823665343225002,
0.029928110539913177,
0.2591094374656677,
0.20125585794448853,
-0.23957309126853943,
-0.279718279838562,
-0.11726868152618408,
0.22633519768714905,
0.14091114699840546,
0.25850242376327515,
-0.26606398820877075,
-0.016896378248929977,
0.028694557026028633,
0.3573027551174164,
-0.32508742809295654,
0.02900615893304348,
0.12603849172592163,
0.25007936358451843,
-0.0004295334219932556,
0.19445282220840454,
0.21474304795265198,
-0.12522825598716736,
0.09510958939790726,
0.2954009175300598,
-0.3408240079879761,
-0.1499755084514618,
-0.18493185937404633,
0.153611958026886,
0.0960521325469017,
-0.004905602894723415,
0.01908329874277115,
-0.15882188081741333,
0.08352717757225037,
-0.38131678104400635,
0.14442899823188782,
0.4542689025402069,
0.08963750302791595,
0.13396434485912323,
0.21403251588344574,
0.013384167104959488,
-0.14347100257873535,
0.051773250102996826,
-0.24224308133125305,
0.18178802728652954,
-0.19912150502204895,
-0.0006549805402755737,
0.04842625930905342,
-0.049424052238464355,
-0.06631289422512054,
-0.1244044080376625,
0.03612279146909714,
0.0848609060049057,
0.3314950168132782,
-0.1483912318944931,
0.033614885061979294,
0.18031617999076843,
0.2627096176147461,
0.3401769995689392,
-0.3613581955432892,
-0.11899951100349426,
0.0034463410265743732,
0.15623527765274048,
0.004015136510133743,
-0.05186860263347626,
0.12740279734134674,
0.1737811118364334,
0.02064712718129158,
0.08647467941045761,
-0.06569952517747879,
-0.16146054863929749,
0.03916051611304283,
-0.02919521927833557,
0.19459004700183868,
-0.5494240522384644,
0.043733496218919754,
0.1894075572490692,
-0.02470315992832184,
0.18253132700920105,
0.361465185880661,
-0.17430713772773743,
0.2527831792831421,
0.22039900720119476,
0.005803808569908142,
0.31866857409477234,
0.10268634557723999,
0.10864078998565674,
-0.01372334361076355,
-0.17353224754333496,
0.1423761397600174,
0.224227175116539,
-0.24820071458816528,
0.2787747383117676,
0.03871200978755951,
0.1530877947807312,
-0.09099743515253067,
-0.07212432473897934,
0.00016506202518939972,
0.20406830310821533,
-0.1327466070652008,
0.04663532227277756,
0.25987479090690613,
-0.10128381103277206,
-0.38612088561058044,
-0.16762199997901917,
-0.052770551294088364,
0.12094563990831375,
1.1269623041152954,
0.3190651535987854,
0.036946851760149,
0.07448966801166534,
-0.1697850525379181,
0.03936902806162834,
0.5396586060523987,
-0.3392516076564789,
0.2798502445220947,
-0.04264640808105469,
-0.2931971251964569,
0.07972061634063721,
0.35562217235565186,
0.44002479314804077,
0.42510151863098145,
-0.1851024180650711,
0.2950836718082428,
-0.037018291652202606,
-0.05912918597459793,
-0.04560313746333122,
0.6426827311515808,
0.03151564300060272,
-0.277556449174881,
0.14610764384269714,
0.1371355652809143,
-0.17771264910697937,
0.3425386846065521,
-0.14309097826480865,
0.4063837230205536,
-0.05130922049283981,
0.644219160079956,
-0.03915009647607803,
-0.011288542300462723,
0.012720894068479538,
0.023795492947101593,
-0.3251144587993622,
-0.4672824442386627,
0.3834061920642853,
-0.16726753115653992,
0.21782559156417847,
-0.11776190996170044,
0.11724208295345306,
0.12978769838809967,
0.389065146446228,
0.5564422011375427,
-0.0019525960087776184,
-0.2580704092979431,
0.031041376292705536,
-0.4754715859889984,
0.19635939598083496,
-0.21033266186714172,
0.11761735379695892,
-0.0757770910859108,
0.20470044016838074,
0.1700727790594101,
0.39311498403549194,
0.1445557326078415,
-0.28797826170921326,
-0.10092367231845856,
0.19574348628520966,
-0.25716426968574524,
-0.1369859129190445,
-0.20446552336215973,
-0.07216291129589081,
0.2450331747531891,
-0.3888799846172333,
-0.0739859938621521,
-0.027478504925966263,
0.14432188868522644,
-0.07223322987556458,
-0.43118929862976074,
0.22505390644073486,
0.13902059197425842,
0.7400192618370056,
0.3751417398452759,
0.22019268572330475,
-0.21221482753753662,
-0.1634574830532074,
-0.15549378097057343,
-0.1684451848268509,
0.036228738725185394,
0.0005240365862846375,
0.06529311090707779,
0.1398710012435913,
-0.20894043147563934,
-0.14072075486183167,
-0.4232511520385742,
-0.17884543538093567,
-0.17545603215694427,
-0.08009246736764908,
-0.1881542056798935,
0.07805784791707993,
-0.16223159432411194,
0.005746190436184406,
-0.05869843810796738,
0.5002332329750061,
-0.3014855682849884,
0.30193012952804565,
-0.19423317909240723,
-0.4128889739513397,
0.590125322341919,
-0.40912705659866333,
-0.34970828890800476,
-0.08457282185554504,
0.3347123861312866,
-0.3761083483695984,
-0.2019043117761612,
-0.38284197449684143,
-0.25132420659065247,
0.37954509258270264,
-0.07829896360635757,
-0.19901211559772491,
-0.05389599874615669,
-0.004737691022455692,
-0.01438063383102417,
-0.05519016459584236,
0.40118101239204407,
0.06552717089653015,
-0.06954140961170197,
0.13794945180416107,
-0.1063961386680603
] |
https://github.com/huggingface/datasets/issues/4506 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results | installing `dill<0.3.5` after installing `datasets` by pip results in dependency conflict with the version required for `multiprocess`. It can be solved by installing `pip install datasets "dill<0.3.5"` (simultaneously) on a clean environment | ## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
| 32 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
installing `dill<0.3.5` after installing `datasets` by pip results in dependency conflict with the version required for `multiprocess`. It can be solved by installing `pip install datasets "dill<0.3.5"` (simultaneously) on a clean environment | [
0.10672178864479065,
0.02344939112663269,
0.008314356207847595,
-0.041032254695892334,
0.2454584389925003,
0.06037779897451401,
0.33440572023391724,
0.32415586709976196,
-0.10414811968803406,
0.049883536994457245,
0.278200626373291,
0.43940889835357666,
-0.22675356268882751,
-0.4884522557258606,
0.023868151009082794,
-0.04346679896116257,
0.011115819215774536,
-0.030841901898384094,
-0.060910746455192566,
-0.1307050585746765,
-0.2952660024166107,
0.09226478636264801,
-0.22410058975219727,
0.15662947297096252,
-0.403685063123703,
-0.19215935468673706,
0.09778088331222534,
0.09054307639598846,
0.10707338154315948,
-0.24282513558864594,
0.19910947978496552,
-0.1409236639738083,
-0.37319061160087585,
0.44022077322006226,
-0.00011341904610162601,
0.025860078632831573,
0.3562939763069153,
-0.20444242656230927,
-0.21711738407611847,
-0.220667764544487,
-0.33816924691200256,
-0.0019631879404187202,
0.009327518753707409,
-0.17839884757995605,
0.07954619079828262,
0.06933296471834183,
-0.0040088798850774765,
-0.5810602903366089,
0.42709124088287354,
0.1785760372877121,
0.18747195601463318,
-0.017387328669428825,
0.10517370700836182,
0.01684148609638214,
0.2805146276950836,
-0.06898187100887299,
-0.18444226682186127,
0.30907538533210754,
0.0027881115674972534,
0.07571689039468765,
-0.1500914990901947,
0.41446638107299805,
-0.11734826862812042,
0.07049286365509033,
0.06464432924985886,
0.000574890524148941,
0.1712941974401474,
-0.38897982239723206,
0.2322397530078888,
0.04791931435465813,
-0.07519788295030594,
-0.17827856540679932,
-0.3173028528690338,
-0.15851497650146484,
-0.2320987582206726,
-0.015932023525238037,
0.21504056453704834,
-0.18546085059642792,
-0.06411004066467285,
0.13230004906654358,
-0.5101627111434937,
-0.06389985233545303,
0.2161412537097931,
0.2309395968914032,
0.18349507451057434,
-0.21301710605621338,
-0.07444863766431808,
0.18340086936950684,
0.20272935926914215,
-0.2837027311325073,
0.14266979694366455,
-0.21910230815410614,
-0.09080250561237335,
0.3423565924167633,
-0.08932571113109589,
0.03193017840385437,
0.3433915972709656,
-0.19976800680160522,
0.22685331106185913,
0.0060284435749053955,
0.23794592916965485,
0.0998825803399086,
0.005378800444304943,
0.22224414348602295,
0.12507981061935425,
0.22549185156822205,
-0.02804197371006012,
0.3085099160671234,
0.10537084937095642,
-0.26930293440818787,
-0.2528292238712311,
0.04074417054653168,
0.2230495661497116,
-0.3017033338546753,
0.6913601160049438,
0.11981599777936935,
0.18125854432582855,
-0.12523804605007172,
0.011655932292342186,
0.1865127682685852,
-0.6204096078872681,
-0.14724254608154297,
-0.011624864302575588,
0.04529820382595062,
0.09119091928005219,
0.030384497717022896,
0.22832123935222626,
0.10893236845731735,
0.13735370337963104,
0.18111953139305115,
-0.24953298270702362,
-0.11615042388439178,
-0.39167919754981995,
0.37464284896850586,
0.09377627074718475,
-0.1054489016532898,
0.117457814514637,
0.10354968905448914,
0.28896385431289673,
-0.15122389793395996,
0.026457397267222404,
-0.059130895882844925,
0.5586838126182556,
0.07615499198436737,
-0.1517760157585144,
0.3664364814758301,
0.19900409877300262,
0.0756688266992569,
-0.12372090667486191,
0.029190849512815475,
-0.33316248655319214,
-0.3998660743236542,
0.44667142629623413,
0.16250231862068176,
-0.04268821328878403,
0.37178316712379456,
-0.07728249579668045,
0.11293236911296844,
0.43437162041664124,
-0.2751823663711548,
0.06768696010112762,
-0.10625456273555756,
-0.0929783284664154,
-0.38930362462997437,
0.19455301761627197,
0.40345239639282227,
0.21297335624694824,
0.04354441165924072,
-0.1454620212316513,
0.25654056668281555,
0.09008653461933136,
0.23415204882621765,
-0.2847282886505127,
0.23082232475280762,
-0.21696314215660095,
0.3403434753417969,
0.41557154059410095,
-0.003938879817724228,
-0.5698850750923157,
0.39545050263404846,
0.02627313882112503,
0.2425411492586136,
-0.1776411235332489,
-0.2147633582353592,
0.15156090259552002,
-0.33617159724235535,
0.5074620246887207,
0.04372455179691315,
-0.0465686172246933,
-0.028158510103821754,
-0.314063161611557,
-0.11543777585029602,
-0.051437877118587494,
-0.19368577003479004,
0.058775559067726135,
0.15708708763122559,
-0.04724825173616409,
0.06364474445581436,
0.06677944958209991,
-0.06811381876468658,
0.2009880095720291,
0.05493782460689545,
0.13846692442893982,
-0.35711783170700073,
0.025845225900411606,
-0.18843844532966614,
-0.31130945682525635,
0.14959803223609924,
0.08101463317871094,
-0.3353870213031769,
-0.17115651071071625,
-0.0258566252887249,
0.011598300188779831,
-0.168175607919693,
-0.22188378870487213,
-0.048807669430971146,
0.11028918623924255,
-0.059260159730911255,
0.20357953011989594,
-0.0869295597076416,
-0.12905792891979218,
0.03855857998132706,
0.040540993213653564,
-0.211253821849823,
-0.18231701850891113,
0.1054127961397171,
0.00723804347217083,
-0.30855321884155273,
-0.2560783326625824,
-0.014674626290798187,
0.3425849676132202,
0.011964265257120132,
-0.36056509613990784,
0.23684287071228027,
-0.11085351556539536,
-0.008332498371601105,
-0.29256659746170044,
0.42337629199028015,
-0.18478649854660034,
-0.38881391286849976,
0.12562084197998047,
0.32617640495300293,
0.0635872557759285,
-0.1365431249141693,
0.18205276131629944,
0.18379580974578857,
0.03765876591205597,
0.22324571013450623,
-0.15121692419052124,
0.06888851523399353,
0.29285407066345215,
-0.04677934572100639,
-0.26739081740379333,
-0.37898558378219604,
-0.06266598403453827,
-0.10238543152809143,
0.5523214936256409,
0.13022978603839874,
0.008248485624790192,
0.021434038877487183,
0.48775672912597656,
0.01935536041855812,
0.37541866302490234,
0.05874386802315712,
-0.09179604798555374,
-0.2270563542842865,
-0.21893370151519775,
0.12641103565692902,
0.31858062744140625,
-0.010816228576004505,
-0.0016771815717220306,
-0.019293496385216713,
-0.14102643728256226,
-0.10947708785533905,
0.09153829514980316,
-0.11903862655162811,
0.34869566559791565,
0.3594934046268463,
0.1741376370191574,
0.17378146946430206,
-0.014720190316438675,
-0.07009109854698181,
0.13719868659973145,
-0.06673841178417206,
-0.26903560757637024,
0.01773456670343876,
-0.3350536525249481,
0.24062436819076538,
-0.00864360947161913,
-0.39222022891044617,
0.031968168914318085,
-0.3352312743663788,
0.09323108196258545,
0.16093692183494568,
-0.28832170367240906,
0.3921137750148773,
-0.028058229014277458,
-0.013962805271148682,
0.05886136740446091,
-0.4205983281135559,
-0.27142322063446045,
-0.23006662726402283,
-0.143924742937088,
-0.048039019107818604,
-0.059607405215501785,
-0.39568787813186646,
0.138894721865654,
-0.08225443214178085,
-0.18680791556835175,
-0.37096384167671204,
-0.007582530379295349,
0.12315261363983154,
-0.10258223116397858,
0.23297525942325592,
0.020068690180778503,
-0.02276402711868286,
-0.14684152603149414,
-0.13326022028923035,
0.38052263855934143,
-0.40658771991729736,
-0.08783938735723495,
0.18743778765201569,
-0.03546365723013878,
-0.1447155624628067,
-0.15022414922714233,
-0.19003930687904358,
-0.025915006175637245,
-0.32444801926612854,
0.1364569216966629,
-0.5487316846847534,
0.020902063697576523,
0.2624354064464569,
0.17074072360992432,
0.05113760754466057,
-0.03364056348800659,
0.10815069079399109,
-0.4462893605232239,
-0.19726811349391937,
0.48771932721138,
-0.0482192300260067,
-0.026207726448774338,
-0.08760789781808853,
-0.24788279831409454,
0.09400948882102966,
0.5941733717918396,
-0.26399552822113037,
-0.17867058515548706,
-0.1435656100511551,
0.18192002177238464,
-0.12469547986984253,
0.0723356232047081,
0.3590698838233948,
0.21925108134746552,
-0.06752094626426697,
-0.24808785319328308,
-0.37834033370018005,
0.042670730501413345,
0.2657923400402069,
0.31878697872161865,
0.339225172996521,
0.3653058707714081,
0.055731844156980515,
1.0950074195861816,
0.27663442492485046,
-0.2788728177547455,
0.057804908603429794,
-0.06334754079580307,
0.050309404730796814,
-0.06594247370958328,
-0.31974929571151733,
-0.19707068800926208,
-0.15556633472442627,
-0.30353844165802,
-0.12993207573890686,
-0.038176510483026505,
-0.44883328676223755,
-0.10250633955001831,
0.004282291978597641,
-0.5498935580253601,
-0.5066492557525635,
0.38415321707725525,
-0.6594849824905396,
0.21803608536720276,
-0.0039604660123586655,
0.259962797164917,
-0.08913251757621765,
-0.007002220489084721,
0.20186010003089905,
-0.1478119045495987,
0.5546920299530029,
-0.06350085884332657,
0.10882890224456787,
-0.05048989877104759,
-0.0713808611035347,
0.3245687484741211,
0.14680930972099304,
0.39519190788269043,
-0.2778644263744354,
-0.23660549521446228,
-0.3108753561973572,
0.10367527604103088,
0.21135392785072327,
-0.534941554069519,
0.05378393828868866,
0.0988907516002655,
-0.24165679514408112,
-0.27807867527008057,
-0.06267614662647247,
-0.06710448116064072,
0.6168242692947388,
0.10974553227424622,
0.0989309698343277,
-0.3072068691253662,
0.16755253076553345,
-0.12685394287109375,
0.16267512738704681,
-0.009410608559846878,
0.002681613899767399,
-0.10184827446937561,
-0.08789880573749542,
-0.2798585593700409,
0.03248275816440582,
0.2518576383590698,
-0.2553686201572418,
0.17729395627975464,
-0.08578501641750336,
0.1374814212322235,
0.05449763685464859,
-0.011012755334377289,
0.10165515542030334,
0.36731791496276855,
-0.10278645902872086,
0.3102349638938904,
0.11208610236644745,
0.14941081404685974,
-0.15556712448596954,
0.6105509400367737,
-0.05508286878466606,
-0.07477045059204102,
-0.0613456666469574,
0.0753725916147232,
0.17703640460968018,
0.545122504234314,
-0.28186386823654175,
-0.04576700180768967,
-0.032282207161188126,
0.16824904084205627,
-0.05560235306620598,
-0.195621058344841,
0.44407832622528076,
-0.1577320694923401,
-0.20198151469230652,
-0.3905997574329376,
0.5154627561569214,
0.3704952299594879,
-0.22074709832668304,
0.7332896590232849,
-0.2675744891166687,
-0.2885895073413849,
0.444863498210907,
0.060200683772563934,
1.121077299118042,
0.12281181663274765,
0.006543461233377457,
-0.30641254782676697,
0.1591850370168686,
-0.03261618688702583,
0.17723225057125092,
0.15544608235359192,
-0.21069231629371643,
-0.04236805811524391,
0.05984931439161301,
-0.18225619196891785,
-0.16315814852714539,
0.24551507830619812,
-0.26925069093704224,
0.2202603816986084,
-0.3145027458667755,
0.2913617193698883,
0.035656049847602844,
-0.21430926024913788,
-0.09019854664802551,
-0.2130672037601471,
-0.16262997686862946,
0.14913561940193176,
0.2448274940252304,
0.05870463326573372,
0.0072253793478012085,
-0.003677097149193287,
-0.1219896525144577,
-0.2751725912094116,
-0.3765559196472168,
0.36354881525039673,
-0.38105520606040955,
0.2893524169921875,
0.011804338544607162,
0.04974846541881561,
-0.07383056730031967,
-0.019354481250047684,
0.024500902742147446,
0.20080271363258362,
-0.12788528203964233,
0.026691293343901634,
0.4780782461166382,
0.30602777004241943,
0.02888433448970318,
-0.01942325383424759,
0.4362160265445709,
0.12196104973554611,
-0.029859349131584167,
-0.009070917963981628,
-0.28844723105430603,
-0.3919355869293213,
-0.5875298380851746,
0.10671087354421616,
-0.04944045841693878,
-0.22006787359714508,
-0.1286449432373047,
0.12082523107528687,
-0.12341630458831787,
-0.028316065669059753,
0.1477459818124771,
0.30926406383514404,
-0.144157275557518,
0.4693050682544708,
-0.0066106319427490234,
-0.23819060623645782,
0.2397845834493637,
0.264949768781662,
-0.2365322709083557,
-0.08623246848583221,
0.23264159262180328,
-0.30993059277534485,
-0.16008606553077698,
-0.1618918776512146,
-0.14843720197677612,
-0.05047139897942543,
-0.34749725461006165,
0.2411728948354721,
-0.2873571515083313,
0.09375268220901489,
-0.0028823665343225002,
0.029928110539913177,
0.2591094374656677,
0.20125585794448853,
-0.23957309126853943,
-0.279718279838562,
-0.11726868152618408,
0.22633519768714905,
0.14091114699840546,
0.25850242376327515,
-0.26606398820877075,
-0.016896378248929977,
0.028694557026028633,
0.3573027551174164,
-0.32508742809295654,
0.02900615893304348,
0.12603849172592163,
0.25007936358451843,
-0.0004295334219932556,
0.19445282220840454,
0.21474304795265198,
-0.12522825598716736,
0.09510958939790726,
0.2954009175300598,
-0.3408240079879761,
-0.1499755084514618,
-0.18493185937404633,
0.153611958026886,
0.0960521325469017,
-0.004905602894723415,
0.01908329874277115,
-0.15882188081741333,
0.08352717757225037,
-0.38131678104400635,
0.14442899823188782,
0.4542689025402069,
0.08963750302791595,
0.13396434485912323,
0.21403251588344574,
0.013384167104959488,
-0.14347100257873535,
0.051773250102996826,
-0.24224308133125305,
0.18178802728652954,
-0.19912150502204895,
-0.0006549805402755737,
0.04842625930905342,
-0.049424052238464355,
-0.06631289422512054,
-0.1244044080376625,
0.03612279146909714,
0.0848609060049057,
0.3314950168132782,
-0.1483912318944931,
0.033614885061979294,
0.18031617999076843,
0.2627096176147461,
0.3401769995689392,
-0.3613581955432892,
-0.11899951100349426,
0.0034463410265743732,
0.15623527765274048,
0.004015136510133743,
-0.05186860263347626,
0.12740279734134674,
0.1737811118364334,
0.02064712718129158,
0.08647467941045761,
-0.06569952517747879,
-0.16146054863929749,
0.03916051611304283,
-0.02919521927833557,
0.19459004700183868,
-0.5494240522384644,
0.043733496218919754,
0.1894075572490692,
-0.02470315992832184,
0.18253132700920105,
0.361465185880661,
-0.17430713772773743,
0.2527831792831421,
0.22039900720119476,
0.005803808569908142,
0.31866857409477234,
0.10268634557723999,
0.10864078998565674,
-0.01372334361076355,
-0.17353224754333496,
0.1423761397600174,
0.224227175116539,
-0.24820071458816528,
0.2787747383117676,
0.03871200978755951,
0.1530877947807312,
-0.09099743515253067,
-0.07212432473897934,
0.00016506202518939972,
0.20406830310821533,
-0.1327466070652008,
0.04663532227277756,
0.25987479090690613,
-0.10128381103277206,
-0.38612088561058044,
-0.16762199997901917,
-0.052770551294088364,
0.12094563990831375,
1.1269623041152954,
0.3190651535987854,
0.036946851760149,
0.07448966801166534,
-0.1697850525379181,
0.03936902806162834,
0.5396586060523987,
-0.3392516076564789,
0.2798502445220947,
-0.04264640808105469,
-0.2931971251964569,
0.07972061634063721,
0.35562217235565186,
0.44002479314804077,
0.42510151863098145,
-0.1851024180650711,
0.2950836718082428,
-0.037018291652202606,
-0.05912918597459793,
-0.04560313746333122,
0.6426827311515808,
0.03151564300060272,
-0.277556449174881,
0.14610764384269714,
0.1371355652809143,
-0.17771264910697937,
0.3425386846065521,
-0.14309097826480865,
0.4063837230205536,
-0.05130922049283981,
0.644219160079956,
-0.03915009647607803,
-0.011288542300462723,
0.012720894068479538,
0.023795492947101593,
-0.3251144587993622,
-0.4672824442386627,
0.3834061920642853,
-0.16726753115653992,
0.21782559156417847,
-0.11776190996170044,
0.11724208295345306,
0.12978769838809967,
0.389065146446228,
0.5564422011375427,
-0.0019525960087776184,
-0.2580704092979431,
0.031041376292705536,
-0.4754715859889984,
0.19635939598083496,
-0.21033266186714172,
0.11761735379695892,
-0.0757770910859108,
0.20470044016838074,
0.1700727790594101,
0.39311498403549194,
0.1445557326078415,
-0.28797826170921326,
-0.10092367231845856,
0.19574348628520966,
-0.25716426968574524,
-0.1369859129190445,
-0.20446552336215973,
-0.07216291129589081,
0.2450331747531891,
-0.3888799846172333,
-0.0739859938621521,
-0.027478504925966263,
0.14432188868522644,
-0.07223322987556458,
-0.43118929862976074,
0.22505390644073486,
0.13902059197425842,
0.7400192618370056,
0.3751417398452759,
0.22019268572330475,
-0.21221482753753662,
-0.1634574830532074,
-0.15549378097057343,
-0.1684451848268509,
0.036228738725185394,
0.0005240365862846375,
0.06529311090707779,
0.1398710012435913,
-0.20894043147563934,
-0.14072075486183167,
-0.4232511520385742,
-0.17884543538093567,
-0.17545603215694427,
-0.08009246736764908,
-0.1881542056798935,
0.07805784791707993,
-0.16223159432411194,
0.005746190436184406,
-0.05869843810796738,
0.5002332329750061,
-0.3014855682849884,
0.30193012952804565,
-0.19423317909240723,
-0.4128889739513397,
0.590125322341919,
-0.40912705659866333,
-0.34970828890800476,
-0.08457282185554504,
0.3347123861312866,
-0.3761083483695984,
-0.2019043117761612,
-0.38284197449684143,
-0.25132420659065247,
0.37954509258270264,
-0.07829896360635757,
-0.19901211559772491,
-0.05389599874615669,
-0.004737691022455692,
-0.01438063383102417,
-0.05519016459584236,
0.40118101239204407,
0.06552717089653015,
-0.06954140961170197,
0.13794945180416107,
-0.1063961386680603
] |
https://github.com/huggingface/datasets/issues/4506 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results | This has been fixed in https://github.com/huggingface/datasets/pull/4516, we will do a new release soon to include the fix :) | ## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
| 18 | Failure to hash (and cache) a `.map(...)` (almost always) - using this method can produce incorrect results
## Describe the bug
Sometimes I get messages about not being able to hash a method:
`Parameter 'function'=<function StupidDataModule._separate_speaker_id_from_dialogue at 0x7f1b27180d30> of the transform datasets.arrow_dataset.Dataset.
_map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
Whilst the function looks like this:
```python
@staticmethod
def _separate_speaker_id_from_dialogue(example: arrow_dataset.Example):
speaker_id, dialogue = tuple(zip(*(example["dialogue"])))
example["speaker_id"] = speaker_id
example["dialogue"] = dialogue
return example
```
This is the first step in my preprocessing pipeline, but sometimes the message about failure to hash is not appearing on the first step, but then appears on a later step.
This error is sometimes causing a failure to use cached data, instead of re-running all steps again.
## Steps to reproduce the bug
```python
import copy
import datasets
from datasets import arrow_dataset
def main():
dataset = datasets.load_dataset("blended_skill_talk")
res = dataset.map(method)
print(res)
def method(example: arrow_dataset.Example):
example['previous_utterance_copy'] = copy.deepcopy(example['previous_utterance'])
return example
if __name__ == '__main__':
main()
```
Run with:
```
python -m reproduce_error
```
## Expected results
Dataset is mapped and cached correctly.
## Actual results
The code outputs this at some point:
`Parameter 'function'=<function method at 0x7faa83d2a160> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.`
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Ubuntu 20.04.3
- Python version: 3.9.12
- PyArrow version: 8.0.0
- Datasets version: 2.3.1
This has been fixed in https://github.com/huggingface/datasets/pull/4516, we will do a new release soon to include the fix :) | [
0.10672178864479065,
0.02344939112663269,
0.008314356207847595,
-0.041032254695892334,
0.2454584389925003,
0.06037779897451401,
0.33440572023391724,
0.32415586709976196,
-0.10414811968803406,
0.049883536994457245,
0.278200626373291,
0.43940889835357666,
-0.22675356268882751,
-0.4884522557258606,
0.023868151009082794,
-0.04346679896116257,
0.011115819215774536,
-0.030841901898384094,
-0.060910746455192566,
-0.1307050585746765,
-0.2952660024166107,
0.09226478636264801,
-0.22410058975219727,
0.15662947297096252,
-0.403685063123703,
-0.19215935468673706,
0.09778088331222534,
0.09054307639598846,
0.10707338154315948,
-0.24282513558864594,
0.19910947978496552,
-0.1409236639738083,
-0.37319061160087585,
0.44022077322006226,
-0.00011341904610162601,
0.025860078632831573,
0.3562939763069153,
-0.20444242656230927,
-0.21711738407611847,
-0.220667764544487,
-0.33816924691200256,
-0.0019631879404187202,
0.009327518753707409,
-0.17839884757995605,
0.07954619079828262,
0.06933296471834183,
-0.0040088798850774765,
-0.5810602903366089,
0.42709124088287354,
0.1785760372877121,
0.18747195601463318,
-0.017387328669428825,
0.10517370700836182,
0.01684148609638214,
0.2805146276950836,
-0.06898187100887299,
-0.18444226682186127,
0.30907538533210754,
0.0027881115674972534,
0.07571689039468765,
-0.1500914990901947,
0.41446638107299805,
-0.11734826862812042,
0.07049286365509033,
0.06464432924985886,
0.000574890524148941,
0.1712941974401474,
-0.38897982239723206,
0.2322397530078888,
0.04791931435465813,
-0.07519788295030594,
-0.17827856540679932,
-0.3173028528690338,
-0.15851497650146484,
-0.2320987582206726,
-0.015932023525238037,
0.21504056453704834,
-0.18546085059642792,
-0.06411004066467285,
0.13230004906654358,
-0.5101627111434937,
-0.06389985233545303,
0.2161412537097931,
0.2309395968914032,
0.18349507451057434,
-0.21301710605621338,
-0.07444863766431808,
0.18340086936950684,
0.20272935926914215,
-0.2837027311325073,
0.14266979694366455,
-0.21910230815410614,
-0.09080250561237335,
0.3423565924167633,
-0.08932571113109589,
0.03193017840385437,
0.3433915972709656,
-0.19976800680160522,
0.22685331106185913,
0.0060284435749053955,
0.23794592916965485,
0.0998825803399086,
0.005378800444304943,
0.22224414348602295,
0.12507981061935425,
0.22549185156822205,
-0.02804197371006012,
0.3085099160671234,
0.10537084937095642,
-0.26930293440818787,
-0.2528292238712311,
0.04074417054653168,
0.2230495661497116,
-0.3017033338546753,
0.6913601160049438,
0.11981599777936935,
0.18125854432582855,
-0.12523804605007172,
0.011655932292342186,
0.1865127682685852,
-0.6204096078872681,
-0.14724254608154297,
-0.011624864302575588,
0.04529820382595062,
0.09119091928005219,
0.030384497717022896,
0.22832123935222626,
0.10893236845731735,
0.13735370337963104,
0.18111953139305115,
-0.24953298270702362,
-0.11615042388439178,
-0.39167919754981995,
0.37464284896850586,
0.09377627074718475,
-0.1054489016532898,
0.117457814514637,
0.10354968905448914,
0.28896385431289673,
-0.15122389793395996,
0.026457397267222404,
-0.059130895882844925,
0.5586838126182556,
0.07615499198436737,
-0.1517760157585144,
0.3664364814758301,
0.19900409877300262,
0.0756688266992569,
-0.12372090667486191,
0.029190849512815475,
-0.33316248655319214,
-0.3998660743236542,
0.44667142629623413,
0.16250231862068176,
-0.04268821328878403,
0.37178316712379456,
-0.07728249579668045,
0.11293236911296844,
0.43437162041664124,
-0.2751823663711548,
0.06768696010112762,
-0.10625456273555756,
-0.0929783284664154,
-0.38930362462997437,
0.19455301761627197,
0.40345239639282227,
0.21297335624694824,
0.04354441165924072,
-0.1454620212316513,
0.25654056668281555,
0.09008653461933136,
0.23415204882621765,
-0.2847282886505127,
0.23082232475280762,
-0.21696314215660095,
0.3403434753417969,
0.41557154059410095,
-0.003938879817724228,
-0.5698850750923157,
0.39545050263404846,
0.02627313882112503,
0.2425411492586136,
-0.1776411235332489,
-0.2147633582353592,
0.15156090259552002,
-0.33617159724235535,
0.5074620246887207,
0.04372455179691315,
-0.0465686172246933,
-0.028158510103821754,
-0.314063161611557,
-0.11543777585029602,
-0.051437877118587494,
-0.19368577003479004,
0.058775559067726135,
0.15708708763122559,
-0.04724825173616409,
0.06364474445581436,
0.06677944958209991,
-0.06811381876468658,
0.2009880095720291,
0.05493782460689545,
0.13846692442893982,
-0.35711783170700073,
0.025845225900411606,
-0.18843844532966614,
-0.31130945682525635,
0.14959803223609924,
0.08101463317871094,
-0.3353870213031769,
-0.17115651071071625,
-0.0258566252887249,
0.011598300188779831,
-0.168175607919693,
-0.22188378870487213,
-0.048807669430971146,
0.11028918623924255,
-0.059260159730911255,
0.20357953011989594,
-0.0869295597076416,
-0.12905792891979218,
0.03855857998132706,
0.040540993213653564,
-0.211253821849823,
-0.18231701850891113,
0.1054127961397171,
0.00723804347217083,
-0.30855321884155273,
-0.2560783326625824,
-0.014674626290798187,
0.3425849676132202,
0.011964265257120132,
-0.36056509613990784,
0.23684287071228027,
-0.11085351556539536,
-0.008332498371601105,
-0.29256659746170044,
0.42337629199028015,
-0.18478649854660034,
-0.38881391286849976,
0.12562084197998047,
0.32617640495300293,
0.0635872557759285,
-0.1365431249141693,
0.18205276131629944,
0.18379580974578857,
0.03765876591205597,
0.22324571013450623,
-0.15121692419052124,
0.06888851523399353,
0.29285407066345215,
-0.04677934572100639,
-0.26739081740379333,
-0.37898558378219604,
-0.06266598403453827,
-0.10238543152809143,
0.5523214936256409,
0.13022978603839874,
0.008248485624790192,
0.021434038877487183,
0.48775672912597656,
0.01935536041855812,
0.37541866302490234,
0.05874386802315712,
-0.09179604798555374,
-0.2270563542842865,
-0.21893370151519775,
0.12641103565692902,
0.31858062744140625,
-0.010816228576004505,
-0.0016771815717220306,
-0.019293496385216713,
-0.14102643728256226,
-0.10947708785533905,
0.09153829514980316,
-0.11903862655162811,
0.34869566559791565,
0.3594934046268463,
0.1741376370191574,
0.17378146946430206,
-0.014720190316438675,
-0.07009109854698181,
0.13719868659973145,
-0.06673841178417206,
-0.26903560757637024,
0.01773456670343876,
-0.3350536525249481,
0.24062436819076538,
-0.00864360947161913,
-0.39222022891044617,
0.031968168914318085,
-0.3352312743663788,
0.09323108196258545,
0.16093692183494568,
-0.28832170367240906,
0.3921137750148773,
-0.028058229014277458,
-0.013962805271148682,
0.05886136740446091,
-0.4205983281135559,
-0.27142322063446045,
-0.23006662726402283,
-0.143924742937088,
-0.048039019107818604,
-0.059607405215501785,
-0.39568787813186646,
0.138894721865654,
-0.08225443214178085,
-0.18680791556835175,
-0.37096384167671204,
-0.007582530379295349,
0.12315261363983154,
-0.10258223116397858,
0.23297525942325592,
0.020068690180778503,
-0.02276402711868286,
-0.14684152603149414,
-0.13326022028923035,
0.38052263855934143,
-0.40658771991729736,
-0.08783938735723495,
0.18743778765201569,
-0.03546365723013878,
-0.1447155624628067,
-0.15022414922714233,
-0.19003930687904358,
-0.025915006175637245,
-0.32444801926612854,
0.1364569216966629,
-0.5487316846847534,
0.020902063697576523,
0.2624354064464569,
0.17074072360992432,
0.05113760754466057,
-0.03364056348800659,
0.10815069079399109,
-0.4462893605232239,
-0.19726811349391937,
0.48771932721138,
-0.0482192300260067,
-0.026207726448774338,
-0.08760789781808853,
-0.24788279831409454,
0.09400948882102966,
0.5941733717918396,
-0.26399552822113037,
-0.17867058515548706,
-0.1435656100511551,
0.18192002177238464,
-0.12469547986984253,
0.0723356232047081,
0.3590698838233948,
0.21925108134746552,
-0.06752094626426697,
-0.24808785319328308,
-0.37834033370018005,
0.042670730501413345,
0.2657923400402069,
0.31878697872161865,
0.339225172996521,
0.3653058707714081,
0.055731844156980515,
1.0950074195861816,
0.27663442492485046,
-0.2788728177547455,
0.057804908603429794,
-0.06334754079580307,
0.050309404730796814,
-0.06594247370958328,
-0.31974929571151733,
-0.19707068800926208,
-0.15556633472442627,
-0.30353844165802,
-0.12993207573890686,
-0.038176510483026505,
-0.44883328676223755,
-0.10250633955001831,
0.004282291978597641,
-0.5498935580253601,
-0.5066492557525635,
0.38415321707725525,
-0.6594849824905396,
0.21803608536720276,
-0.0039604660123586655,
0.259962797164917,
-0.08913251757621765,
-0.007002220489084721,
0.20186010003089905,
-0.1478119045495987,
0.5546920299530029,
-0.06350085884332657,
0.10882890224456787,
-0.05048989877104759,
-0.0713808611035347,
0.3245687484741211,
0.14680930972099304,
0.39519190788269043,
-0.2778644263744354,
-0.23660549521446228,
-0.3108753561973572,
0.10367527604103088,
0.21135392785072327,
-0.534941554069519,
0.05378393828868866,
0.0988907516002655,
-0.24165679514408112,
-0.27807867527008057,
-0.06267614662647247,
-0.06710448116064072,
0.6168242692947388,
0.10974553227424622,
0.0989309698343277,
-0.3072068691253662,
0.16755253076553345,
-0.12685394287109375,
0.16267512738704681,
-0.009410608559846878,
0.002681613899767399,
-0.10184827446937561,
-0.08789880573749542,
-0.2798585593700409,
0.03248275816440582,
0.2518576383590698,
-0.2553686201572418,
0.17729395627975464,
-0.08578501641750336,
0.1374814212322235,
0.05449763685464859,
-0.011012755334377289,
0.10165515542030334,
0.36731791496276855,
-0.10278645902872086,
0.3102349638938904,
0.11208610236644745,
0.14941081404685974,
-0.15556712448596954,
0.6105509400367737,
-0.05508286878466606,
-0.07477045059204102,
-0.0613456666469574,
0.0753725916147232,
0.17703640460968018,
0.545122504234314,
-0.28186386823654175,
-0.04576700180768967,
-0.032282207161188126,
0.16824904084205627,
-0.05560235306620598,
-0.195621058344841,
0.44407832622528076,
-0.1577320694923401,
-0.20198151469230652,
-0.3905997574329376,
0.5154627561569214,
0.3704952299594879,
-0.22074709832668304,
0.7332896590232849,
-0.2675744891166687,
-0.2885895073413849,
0.444863498210907,
0.060200683772563934,
1.121077299118042,
0.12281181663274765,
0.006543461233377457,
-0.30641254782676697,
0.1591850370168686,
-0.03261618688702583,
0.17723225057125092,
0.15544608235359192,
-0.21069231629371643,
-0.04236805811524391,
0.05984931439161301,
-0.18225619196891785,
-0.16315814852714539,
0.24551507830619812,
-0.26925069093704224,
0.2202603816986084,
-0.3145027458667755,
0.2913617193698883,
0.035656049847602844,
-0.21430926024913788,
-0.09019854664802551,
-0.2130672037601471,
-0.16262997686862946,
0.14913561940193176,
0.2448274940252304,
0.05870463326573372,
0.0072253793478012085,
-0.003677097149193287,
-0.1219896525144577,
-0.2751725912094116,
-0.3765559196472168,
0.36354881525039673,
-0.38105520606040955,
0.2893524169921875,
0.011804338544607162,
0.04974846541881561,
-0.07383056730031967,
-0.019354481250047684,
0.024500902742147446,
0.20080271363258362,
-0.12788528203964233,
0.026691293343901634,
0.4780782461166382,
0.30602777004241943,
0.02888433448970318,
-0.01942325383424759,
0.4362160265445709,
0.12196104973554611,
-0.029859349131584167,
-0.009070917963981628,
-0.28844723105430603,
-0.3919355869293213,
-0.5875298380851746,
0.10671087354421616,
-0.04944045841693878,
-0.22006787359714508,
-0.1286449432373047,
0.12082523107528687,
-0.12341630458831787,
-0.028316065669059753,
0.1477459818124771,
0.30926406383514404,
-0.144157275557518,
0.4693050682544708,
-0.0066106319427490234,
-0.23819060623645782,
0.2397845834493637,
0.264949768781662,
-0.2365322709083557,
-0.08623246848583221,
0.23264159262180328,
-0.30993059277534485,
-0.16008606553077698,
-0.1618918776512146,
-0.14843720197677612,
-0.05047139897942543,
-0.34749725461006165,
0.2411728948354721,
-0.2873571515083313,
0.09375268220901489,
-0.0028823665343225002,
0.029928110539913177,
0.2591094374656677,
0.20125585794448853,
-0.23957309126853943,
-0.279718279838562,
-0.11726868152618408,
0.22633519768714905,
0.14091114699840546,
0.25850242376327515,
-0.26606398820877075,
-0.016896378248929977,
0.028694557026028633,
0.3573027551174164,
-0.32508742809295654,
0.02900615893304348,
0.12603849172592163,
0.25007936358451843,
-0.0004295334219932556,
0.19445282220840454,
0.21474304795265198,
-0.12522825598716736,
0.09510958939790726,
0.2954009175300598,
-0.3408240079879761,
-0.1499755084514618,
-0.18493185937404633,
0.153611958026886,
0.0960521325469017,
-0.004905602894723415,
0.01908329874277115,
-0.15882188081741333,
0.08352717757225037,
-0.38131678104400635,
0.14442899823188782,
0.4542689025402069,
0.08963750302791595,
0.13396434485912323,
0.21403251588344574,
0.013384167104959488,
-0.14347100257873535,
0.051773250102996826,
-0.24224308133125305,
0.18178802728652954,
-0.19912150502204895,
-0.0006549805402755737,
0.04842625930905342,
-0.049424052238464355,
-0.06631289422512054,
-0.1244044080376625,
0.03612279146909714,
0.0848609060049057,
0.3314950168132782,
-0.1483912318944931,
0.033614885061979294,
0.18031617999076843,
0.2627096176147461,
0.3401769995689392,
-0.3613581955432892,
-0.11899951100349426,
0.0034463410265743732,
0.15623527765274048,
0.004015136510133743,
-0.05186860263347626,
0.12740279734134674,
0.1737811118364334,
0.02064712718129158,
0.08647467941045761,
-0.06569952517747879,
-0.16146054863929749,
0.03916051611304283,
-0.02919521927833557,
0.19459004700183868,
-0.5494240522384644,
0.043733496218919754,
0.1894075572490692,
-0.02470315992832184,
0.18253132700920105,
0.361465185880661,
-0.17430713772773743,
0.2527831792831421,
0.22039900720119476,
0.005803808569908142,
0.31866857409477234,
0.10268634557723999,
0.10864078998565674,
-0.01372334361076355,
-0.17353224754333496,
0.1423761397600174,
0.224227175116539,
-0.24820071458816528,
0.2787747383117676,
0.03871200978755951,
0.1530877947807312,
-0.09099743515253067,
-0.07212432473897934,
0.00016506202518939972,
0.20406830310821533,
-0.1327466070652008,
0.04663532227277756,
0.25987479090690613,
-0.10128381103277206,
-0.38612088561058044,
-0.16762199997901917,
-0.052770551294088364,
0.12094563990831375,
1.1269623041152954,
0.3190651535987854,
0.036946851760149,
0.07448966801166534,
-0.1697850525379181,
0.03936902806162834,
0.5396586060523987,
-0.3392516076564789,
0.2798502445220947,
-0.04264640808105469,
-0.2931971251964569,
0.07972061634063721,
0.35562217235565186,
0.44002479314804077,
0.42510151863098145,
-0.1851024180650711,
0.2950836718082428,
-0.037018291652202606,
-0.05912918597459793,
-0.04560313746333122,
0.6426827311515808,
0.03151564300060272,
-0.277556449174881,
0.14610764384269714,
0.1371355652809143,
-0.17771264910697937,
0.3425386846065521,
-0.14309097826480865,
0.4063837230205536,
-0.05130922049283981,
0.644219160079956,
-0.03915009647607803,
-0.011288542300462723,
0.012720894068479538,
0.023795492947101593,
-0.3251144587993622,
-0.4672824442386627,
0.3834061920642853,
-0.16726753115653992,
0.21782559156417847,
-0.11776190996170044,
0.11724208295345306,
0.12978769838809967,
0.389065146446228,
0.5564422011375427,
-0.0019525960087776184,
-0.2580704092979431,
0.031041376292705536,
-0.4754715859889984,
0.19635939598083496,
-0.21033266186714172,
0.11761735379695892,
-0.0757770910859108,
0.20470044016838074,
0.1700727790594101,
0.39311498403549194,
0.1445557326078415,
-0.28797826170921326,
-0.10092367231845856,
0.19574348628520966,
-0.25716426968574524,
-0.1369859129190445,
-0.20446552336215973,
-0.07216291129589081,
0.2450331747531891,
-0.3888799846172333,
-0.0739859938621521,
-0.027478504925966263,
0.14432188868522644,
-0.07223322987556458,
-0.43118929862976074,
0.22505390644073486,
0.13902059197425842,
0.7400192618370056,
0.3751417398452759,
0.22019268572330475,
-0.21221482753753662,
-0.1634574830532074,
-0.15549378097057343,
-0.1684451848268509,
0.036228738725185394,
0.0005240365862846375,
0.06529311090707779,
0.1398710012435913,
-0.20894043147563934,
-0.14072075486183167,
-0.4232511520385742,
-0.17884543538093567,
-0.17545603215694427,
-0.08009246736764908,
-0.1881542056798935,
0.07805784791707993,
-0.16223159432411194,
0.005746190436184406,
-0.05869843810796738,
0.5002332329750061,
-0.3014855682849884,
0.30193012952804565,
-0.19423317909240723,
-0.4128889739513397,
0.590125322341919,
-0.40912705659866333,
-0.34970828890800476,
-0.08457282185554504,
0.3347123861312866,
-0.3761083483695984,
-0.2019043117761612,
-0.38284197449684143,
-0.25132420659065247,
0.37954509258270264,
-0.07829896360635757,
-0.19901211559772491,
-0.05389599874615669,
-0.004737691022455692,
-0.01438063383102417,
-0.05519016459584236,
0.40118101239204407,
0.06552717089653015,
-0.06954140961170197,
0.13794945180416107,
-0.1063961386680603
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | would you like to give it a try, @dgrnd4? (maybe with the help of the dataset author?) | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 17 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
would you like to give it a try, @dgrnd4? (maybe with the help of the dataset author?) | [
-0.12982690334320068,
-0.02184317260980606,
-0.26575279235839844,
0.05526488646864891,
0.33157873153686523,
0.19605645537376404,
0.2535150945186615,
0.05323366820812225,
-0.025000901892781258,
0.030048981308937073,
-0.09646065533161163,
0.20942679047584534,
-0.4501248002052307,
0.14420560002326965,
0.1238410696387291,
-0.24971935153007507,
0.007208190858364105,
-0.01027514785528183,
0.1261901557445526,
-0.2802104353904724,
-0.27736788988113403,
-0.12692824006080627,
0.035701677203178406,
-0.38446974754333496,
-0.0872596800327301,
-0.09484083950519562,
-0.3569439947605133,
0.2133784294128418,
-0.31942540407180786,
-0.35493597388267517,
-0.02681525982916355,
0.10766719281673431,
0.028814788907766342,
0.44269683957099915,
-0.00009989705722546205,
-0.06535709649324417,
0.10920178145170212,
0.07301655411720276,
0.22415663301944733,
-0.04894323647022247,
-0.10318133234977722,
-0.3360165059566498,
-0.3917476236820221,
-0.3048877716064453,
-0.14662998914718628,
0.049100346863269806,
0.25520455837249756,
0.05650121718645096,
0.26988857984542847,
0.12926152348518372,
0.3071550130844116,
-0.13714201748371124,
0.08201999962329865,
-0.09756626933813095,
0.17244495451450348,
0.2603963613510132,
-0.20815768837928772,
0.37365564703941345,
0.28588008880615234,
0.08353529870510101,
0.07024720311164856,
0.3387356102466583,
0.15610510110855103,
-0.21395617723464966,
0.3340572714805603,
0.07450569421052933,
0.08618064969778061,
-0.30686014890670776,
-0.0501994714140892,
0.1862899661064148,
0.37056007981300354,
0.11627857387065887,
-0.2495361864566803,
-0.23635300993919373,
0.04112939164042473,
-0.2150902897119522,
-0.11265934258699417,
0.41821765899658203,
0.055271875113248825,
0.023494485765695572,
-0.4471624195575714,
-0.1305195689201355,
-0.4334799349308014,
0.17798055708408356,
-0.21964029967784882,
0.20252089202404022,
-0.03867689147591591,
-0.018787093460559845,
0.07746715098619461,
0.1840156465768814,
-0.1735093742609024,
-0.03952883183956146,
0.04750095680356026,
0.21635864675045013,
-0.22618375718593597,
-0.2380172461271286,
0.07347963750362396,
0.15373267233371735,
0.3239336609840393,
0.08698888123035431,
0.17578113079071045,
-0.06801972538232803,
-0.017521124333143234,
0.007092133164405823,
0.16323833167552948,
-0.052966151386499405,
-0.16688978672027588,
-0.037041835486888885,
0.05599735677242279,
0.016017882153391838,
-0.1686272919178009,
0.117132768034935,
-0.042871326208114624,
-0.09201861917972565,
-0.08698420226573944,
-0.38655033707618713,
0.03242592141032219,
-0.023093830794095993,
-0.024384096264839172,
-0.05429384112358093,
0.13091936707496643,
-0.0711568146944046,
-0.08802014589309692,
0.41952693462371826,
0.13937687873840332,
-0.07516741752624512,
-0.015805719420313835,
0.22623413801193237,
0.1352504938840866,
-0.05225076526403427,
-0.2397281527519226,
0.059700947254896164,
-0.2831788659095764,
-0.09894650429487228,
0.12546668946743011,
-0.1232164055109024,
-0.0016251751221716404,
-0.13812749087810516,
-0.05834914743900299,
0.2995220422744751,
-0.00854507926851511,
-0.16708983480930328,
0.2855987548828125,
0.012917935848236084,
-0.15692360699176788,
-0.19972921907901764,
0.026332877576351166,
0.09615202248096466,
-0.2398039996623993,
-0.05220309644937515,
-0.18734607100486755,
0.04294399544596672,
-0.5237590670585632,
0.29649582505226135,
-0.10764871537685394,
-0.3206384778022766,
-0.21096327900886536,
0.4873115122318268,
-0.09144248813390732,
0.30043718218803406,
0.07169567048549652,
0.006281577050685883,
-0.33904528617858887,
-0.25634920597076416,
-0.05947432667016983,
0.12969455122947693,
-0.28706517815589905,
-0.08177472651004791,
-0.26980289816856384,
0.04631040617823601,
0.05884752795100212,
0.1331525593996048,
0.016451004892587662,
0.29398584365844727,
-0.10884567350149155,
0.16957704722881317,
0.18986165523529053,
-0.20619700849056244,
-0.2839895784854889,
0.09935273975133896,
-0.15099094808101654,
0.022522656247019768,
0.08262711763381958,
0.3991966247558594,
0.20669162273406982,
-0.07376333326101303,
-0.07294611632823944,
0.3757776618003845,
-0.14467129111289978,
-0.1906445026397705,
-0.14228717982769012,
-0.19199056923389435,
-0.01467091217637062,
0.3854229152202606,
0.2208288013935089,
-0.19496190547943115,
0.3510536551475525,
-0.21422673761844635,
0.1764139086008072,
-0.3109064996242523,
-0.05497562885284424,
0.10797905921936035,
0.5354101657867432,
0.3254970908164978,
-0.05549033731222153,
-0.13514426350593567,
-0.027006737887859344,
0.11475638300180435,
0.2498164176940918,
0.30904385447502136,
0.10251989960670471,
-0.20364193618297577,
-0.15599563717842102,
-0.1115683913230896,
-0.20558233559131622,
-0.12622343003749847,
0.28008782863616943,
-0.21004968881607056,
-0.005998892709612846,
0.03896934166550636,
0.016840655356645584,
0.23799283802509308,
-0.3899843990802765,
0.22851693630218506,
0.03661093860864639,
0.43900245428085327,
-0.1423661708831787,
-0.08772806078195572,
-0.10183829069137573,
0.08773384243249893,
-0.30288833379745483,
-0.15034903585910797,
0.17437118291854858,
0.1752152442932129,
-0.24938757717609406,
-0.16457168757915497,
0.43138402700424194,
0.30712592601776123,
0.22660616040229797,
-0.5389764904975891,
0.10369329154491425,
-0.2514123022556305,
0.05074260011315346,
-0.0491987019777298,
-0.38857632875442505,
0.18639427423477173,
0.107355996966362,
0.02950151264667511,
-0.03237917274236679,
0.044701628386974335,
0.022156061604619026,
-0.14162564277648926,
0.008397703990340233,
0.11234652996063232,
0.31155285239219666,
-0.14468467235565186,
-0.013054048642516136,
-0.16902285814285278,
-0.28554433584213257,
0.15770629048347473,
0.14368021488189697,
-0.08326821029186249,
0.01982760801911354,
0.22127988934516907,
-0.10491595417261124,
0.19211304187774658,
0.06134467571973801,
0.19150666892528534,
0.1769821047782898,
0.411066472530365,
-0.09472382068634033,
-0.011487679556012154,
-0.08456462621688843,
0.08198542147874832,
0.010128848254680634,
0.08329083770513535,
0.10644673556089401,
-0.14025583863258362,
0.4167346656322479,
0.12568819522857666,
-0.3800366222858429,
-0.1084742397069931,
0.022974906489253044,
-0.05893310159444809,
-0.08093132823705673,
-0.05436365306377411,
0.2146534025669098,
-0.37038862705230713,
-0.0428527295589447,
0.3689419627189636,
-0.21343356370925903,
-0.0917452722787857,
0.06334763765335083,
-0.1238367110490799,
0.015110887587070465,
0.10718447715044022,
-0.4163813292980194,
0.612600564956665,
-0.03205438330769539,
-0.1355382353067398,
0.1802767813205719,
0.014795370399951935,
0.04212848097085953,
0.280493825674057,
0.3027501702308655,
-0.15469108521938324,
0.5917600393295288,
-0.03141380846500397,
0.2509411573410034,
-0.36108866333961487,
-0.8593658804893494,
-0.03422059863805771,
-0.289961576461792,
0.23783479630947113,
0.23397620022296906,
0.10555732250213623,
-0.1951037347316742,
-0.23030884563922882,
0.14693470299243927,
-0.148246169090271,
-0.20080383121967316,
-0.14054346084594727,
-0.06965988874435425,
0.005483559798449278,
-0.12603266537189484,
-0.1813136637210846,
-0.3030511438846588,
-0.18557541072368622,
0.33713459968566895,
0.29813826084136963,
-0.00908852368593216,
0.3072406053543091,
0.2505911886692047,
-0.04742616415023804,
-0.14187881350517273,
-0.06511781364679337,
-0.16249608993530273,
-0.22711317241191864,
0.3298191726207733,
-0.13645242154598236,
-0.3833734393119812,
0.002275567501783371,
-0.21191126108169556,
0.3156296908855438,
-0.042601387947797775,
-0.5729222297668457,
-0.25007063150405884,
-0.11739762127399445,
0.22678950428962708,
0.10918033868074417,
0.0008911173790693283,
0.11377342790365219,
-0.11705546826124191,
-0.22511932253837585,
-0.20147821307182312,
-0.0350286141037941,
0.2797311842441559,
0.16120904684066772,
0.28963759541511536,
-0.13341501355171204,
0.1863650381565094,
0.1879948079586029,
0.5029768943786621,
-0.185382679104805,
-0.24281953275203705,
0.385974645614624,
-0.07326963543891907,
0.22961468994617462,
0.05557415634393692,
-0.3938754200935364,
0.5307556986808777,
0.02838798612356186,
0.03578415885567665,
0.199163019657135,
0.17730331420898438,
-0.4185751974582672,
0.14624398946762085,
0.054384056478738785,
-0.3276650309562683,
0.029933195561170578,
0.2488897144794464,
0.2046046108007431,
0.08223388344049454,
-0.09898406267166138,
-0.3285283148288727,
-0.30308541655540466,
-0.23729240894317627,
0.0050162458792328835,
0.2729727625846863,
0.058970484882593155,
-0.22134040296077728,
-0.2617632746696472,
0.13483402132987976,
-0.3438558280467987,
0.1735956370830536,
0.020718954503536224,
-0.2109999656677246,
-0.29947346448898315,
0.08415423333644867,
0.08039791136980057,
-0.038998812437057495,
0.7309396266937256,
-0.3478392958641052,
-0.1417752355337143,
0.20249998569488525,
0.02162349224090576,
-0.14912556111812592,
0.09356555342674255,
-0.1826452910900116,
-0.2671419680118561,
0.1601000428199768,
0.1365017145872116,
-0.18606135249137878,
0.2264355570077896,
0.40193599462509155,
-0.09387403726577759,
-0.1932927370071411,
-0.08720357716083527,
-0.05238071456551552,
-0.23083677887916565,
-0.04762636497616768,
0.02020128071308136,
-0.05933785438537598,
0.04995070397853851,
0.1286822408437729,
-0.14903320372104645,
-0.1681065857410431,
0.027363844215869904,
0.2163267582654953,
-0.07710990309715271,
-0.09380821883678436,
0.3087238371372223,
0.24950385093688965,
-0.07433847337961197,
0.08653242886066437,
0.3044678866863251,
0.47460898756980896,
-0.2773860991001129,
-0.26801425218582153,
0.04584217444062233,
-0.23800797760486603,
0.3121839761734009,
0.25802600383758545,
0.2813356816768646,
-0.09590006619691849,
-0.03571648895740509,
0.1774710714817047,
-0.42831191420555115,
0.38937893509864807,
0.41831734776496887,
-0.036841366440057755,
-0.2226838916540146,
-0.4153278172016144,
0.4578019678592682,
0.16310101747512817,
-0.021109119057655334,
0.11068502068519592,
0.5174819231033325,
-0.3040251135826111,
0.17991869151592255,
0.4318612813949585,
1.036860704421997,
-0.28675299882888794,
0.1633494347333908,
0.11775372177362442,
-0.19965431094169617,
0.2957119643688202,
0.05794146656990051,
0.07959364354610443,
-0.07849469780921936,
-0.28337740898132324,
0.019172878935933113,
-0.13134686648845673,
0.16331547498703003,
0.35756194591522217,
-0.03909497335553169,
-0.10586205869913101,
0.010878875851631165,
0.157420814037323,
-0.05995583534240723,
0.2037813663482666,
0.022874491289258003,
-0.22044220566749573,
-0.03121912106871605,
0.356535404920578,
0.2674173414707184,
-0.15323898196220398,
-0.17988643050193787,
-0.23189902305603027,
-0.3158343732357025,
-0.005188018083572388,
-0.169897198677063,
-0.17384737730026245,
-0.09677400439977646,
-0.04151631146669388,
-0.019679412245750427,
-0.449626088142395,
0.25760647654533386,
0.061732154339551926,
0.15692371129989624,
-0.12960487604141235,
-0.1511797308921814,
0.32516270875930786,
0.011161811649799347,
-0.08646362274885178,
0.11896834522485733,
-0.20120257139205933,
0.23902912437915802,
-0.06320805102586746,
-0.046181872487068176,
0.029601994901895523,
0.24431928992271423,
-0.4346088767051697,
-0.21463993191719055,
-0.03243190050125122,
0.0812542587518692,
-0.2705492377281189,
-0.008174088783562183,
0.16042499244213104,
-0.021351788192987442,
-0.00960547849535942,
0.24913103878498077,
0.12216999381780624,
0.21174298226833344,
0.0819350853562355,
0.1595931202173233,
-0.08628275245428085,
-0.06190384551882744,
0.10700440406799316,
0.2469729483127594,
-0.10331273823976517,
0.2241765707731247,
-0.10503935813903809,
-0.07637602090835571,
-0.2739924490451813,
-0.012232556939125061,
0.28825047612190247,
-0.38863450288772583,
-0.034352369606494904,
0.10076334327459335,
0.006168752908706665,
-0.035160887986421585,
0.017627213150262833,
0.2600319981575012,
-0.18579024076461792,
0.00611540675163269,
-0.10087282210588455,
-0.07072434574365616,
0.2399023324251175,
-0.2611623704433441,
0.38642436265945435,
-0.46256667375564575,
0.20974400639533997,
0.07473157346248627,
0.028545919805765152,
-0.4834921658039093,
0.1608155220746994,
-0.10835780948400497,
-0.0997818112373352,
0.14567379653453827,
0.010572429746389389,
-0.11484865099191666,
-0.2194543480873108,
0.2429400384426117,
-0.06509687006473541,
-0.177220419049263,
-0.32778307795524597,
0.04467184469103813,
0.06990170478820801,
0.09315885603427887,
0.011096268892288208,
0.3357025682926178,
0.023153401911258698,
-0.22887077927589417,
0.06122058629989624,
0.010402444750070572,
-0.18647721409797668,
-0.05326145142316818,
-0.06522075831890106,
0.05848126858472824,
0.0017332732677459717,
0.2994002103805542,
0.04798267036676407,
-0.07897280156612396,
0.426230251789093,
0.2847180962562561,
0.034668147563934326,
0.03221296891570091,
-0.0010999515652656555,
0.09521978348493576,
0.2545509338378906,
-0.04714110493659973,
-0.02896071970462799,
0.40122249722480774,
-0.03751067817211151,
-0.009759325534105301,
0.4797607660293579,
0.2890057861804962,
-0.008459717035293579,
-0.5218650102615356,
0.06849940121173859,
0.16404405236244202,
0.3923790156841278,
-0.43311768770217896,
-0.08835402876138687,
-0.03861287981271744,
-0.15735049545764923,
0.14970318973064423,
0.17798691987991333,
0.24199017882347107,
0.27029791474342346,
-0.40910518169403076,
0.0988193154335022,
0.6844418048858643,
0.14206211268901825,
0.14272822439670563,
0.2910236120223999,
-0.0767575353384018,
-0.04514051601290703,
0.254105806350708,
0.27200189232826233,
0.16226157546043396,
0.2609087824821472,
0.017124749720096588,
0.45195743441581726,
-0.11435016244649887,
0.06248234584927559,
0.3599521815776825,
0.07982073724269867,
0.1260945051908493,
0.33072108030319214,
0.13507385551929474,
0.3143081068992615,
-0.030065521597862244,
0.1957908719778061,
-0.02885366976261139,
-0.4909527003765106,
-0.12833546102046967,
0.2691725194454193,
0.13125130534172058,
0.21849116683006287,
-0.27953606843948364,
-0.16780070960521698,
-0.1916784942150116,
-0.008789923042058945,
0.03541724383831024,
-0.5261209607124329,
0.2407994419336319,
-0.04549724608659744,
-0.2064974159002304,
-0.15084156394004822,
-0.15847095847129822,
0.08469057828187943,
0.37587377429008484,
-0.14330002665519714,
0.11133265495300293,
0.1453137993812561,
-0.14223122596740723,
0.49669572710990906,
0.581585168838501,
0.29406851530075073,
0.0055845435708761215,
0.2244962453842163,
0.08633047342300415,
-0.11323392391204834,
-0.05020371079444885,
-0.0891932025551796,
0.10111445933580399,
0.07952191680669785,
0.057231102138757706,
0.16555313766002655,
0.24945801496505737,
-0.2724323570728302,
0.07839910686016083,
0.13548514246940613,
0.10127168893814087,
-0.23908349871635437,
-0.08955799788236618,
-0.09142464399337769,
-0.02022441104054451,
-0.2457728087902069,
0.016833581030368805,
-0.25184738636016846,
-0.09922853112220764,
0.12651582062244415,
-0.15286624431610107,
0.05973733216524124,
0.010812911204993725,
0.1430336982011795,
-0.05687240883708,
0.34474849700927734,
0.191417396068573,
0.24089905619621277,
-0.14962109923362732,
-0.33754104375839233,
-0.6752376556396484,
-0.05749586969614029,
-0.23486977815628052,
-0.3619365096092224,
-0.10128757357597351,
0.21674606204032898,
0.17284941673278809,
-0.04453030228614807,
0.2961112856864929,
-0.19149762392044067,
0.0571625679731369,
0.19015094637870789,
-0.3461121916770935,
0.04390740022063255,
0.21672330796718597,
0.15497662127017975,
-0.0778471827507019,
0.018254153430461884,
0.18378092348575592,
-0.10636813193559647,
0.19087228178977966,
0.028986070305109024,
0.11484558880329132,
-0.24813610315322876,
-0.3014620840549469,
0.38851383328437805,
-0.08679721504449844,
0.31648367643356323,
-0.14656928181648254,
-0.13859553635120392,
-0.19211602210998535,
-0.16707928478717804,
-0.33506637811660767,
0.020577166229486465,
0.23156338930130005,
0.46803683042526245,
-0.04542790353298187,
-0.14498010277748108,
0.2529941201210022,
0.19081704318523407,
0.11889207363128662,
0.03493943065404892,
-0.3561456799507141,
0.10844498127698898,
0.06956995278596878,
-0.08609580993652344,
0.04298610985279083,
0.210285484790802,
0.014571670442819595,
-0.14065875113010406,
-0.1404770016670227,
-0.604734480381012,
0.3866536319255829,
-0.4465962052345276,
-0.06894517689943314,
-0.20770111680030823,
0.0044596269726753235,
-0.029455795884132385,
0.3667858839035034,
-0.5105119347572327,
-0.029342152178287506,
0.3063106834888458,
0.06332431733608246,
-0.1976945549249649,
0.5300605297088623,
0.26676613092422485,
-0.2236194610595703,
-0.0089254230260849,
-0.22291898727416992,
-0.39607736468315125,
-0.13459907472133636,
0.03233407810330391,
-0.1922042965888977
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | @julien-c i am sorry but I have no idea about how it works: can I add the dataset by myself, following "instructions to add a new dataset"?
Can I add a dataset even if it's not mine? (it's public in the link that I wrote on the post)
| ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 48 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
@julien-c i am sorry but I have no idea about how it works: can I add the dataset by myself, following "instructions to add a new dataset"?
Can I add a dataset even if it's not mine? (it's public in the link that I wrote on the post)
| [
0.08427636325359344,
-0.12082664668560028,
-0.15506309270858765,
0.1512756049633026,
0.045617736876010895,
0.33660900592803955,
0.18082308769226074,
-0.31590980291366577,
0.04788215085864067,
0.019760869443416595,
-0.15998469293117523,
0.044231925159692764,
-0.32589292526245117,
0.06469511985778809,
0.24615301191806793,
0.043840520083904266,
-0.00723874568939209,
-0.1340017467737198,
0.18474602699279785,
-0.3617447018623352,
-0.29785406589508057,
-0.2570963501930237,
0.09456773102283478,
-0.4307650327682495,
-0.11826766282320023,
-0.2602827548980713,
-0.33966395258903503,
0.21303081512451172,
-0.36857011914253235,
-0.3268800377845764,
0.09934407472610474,
0.18733683228492737,
0.00005881302058696747,
0.5497612357139587,
-0.00011102911230409518,
-0.06273365020751953,
0.0016458407044410706,
-0.037985995411872864,
0.17406629025936127,
-0.11599545180797577,
-0.38088458776474,
-0.35384470224380493,
-0.34626179933547974,
-0.24298229813575745,
-0.031370989978313446,
0.00042125023901462555,
0.2898777723312378,
0.003270331770181656,
0.2226572334766388,
0.3720800280570984,
0.2286994457244873,
-0.08795898407697678,
0.18733690679073334,
-0.249602273106575,
0.14252841472625732,
0.2223522812128067,
0.03460507094860077,
0.414954274892807,
0.0831947773694992,
0.3054015338420868,
0.3211725950241089,
0.05688336119055748,
0.1597740203142166,
-0.13736383616924286,
0.5598915815353394,
0.12634262442588806,
0.12885481119155884,
-0.546404242515564,
-0.09283291548490524,
0.17538949847221375,
0.6599578857421875,
0.04820786416530609,
-0.23438836634159088,
-0.16475073993206024,
0.15575610101222992,
-0.14724262058734894,
0.04658016562461853,
0.48863908648490906,
0.14218828082084656,
0.011080987751483917,
-0.4343801736831665,
-0.2588593661785126,
-0.42270514369010925,
0.22702056169509888,
-0.1589866578578949,
0.190317302942276,
-0.07254638522863388,
0.09075400978326797,
0.01850951835513115,
0.2822801470756531,
-0.1457461565732956,
-0.15527747571468353,
-0.001822344958782196,
0.4032886028289795,
-0.15653382241725922,
-0.18714050948619843,
-0.002815648913383484,
0.21608784794807434,
0.32951024174690247,
0.11291538178920746,
0.07703651487827301,
-0.18754589557647705,
-0.2896101772785187,
0.04879035800695419,
0.21082960069179535,
-0.05325990915298462,
-0.24500414729118347,
-0.012581308372318745,
-0.052881017327308655,
-0.1364501416683197,
-0.15342967212200165,
-0.02241278812289238,
0.014712906442582607,
0.0008036294020712376,
-0.18101249635219574,
-0.40693965554237366,
0.24905021488666534,
-0.015690065920352936,
0.013078315183520317,
0.023849140852689743,
0.1719081997871399,
-0.24510687589645386,
-0.02587326243519783,
0.34618011116981506,
-0.005039270967245102,
-0.3083159029483795,
-0.13717228174209595,
0.1324710249900818,
0.14471980929374695,
-0.10612420737743378,
-0.19385600090026855,
0.18579038977622986,
-0.04745518043637276,
0.008469770662486553,
0.03897145763039589,
-0.18514776229858398,
0.04729584604501724,
0.03841284662485123,
-0.03947148472070694,
0.24952086806297302,
-0.038111113011837006,
-0.1543232500553131,
0.24651587009429932,
0.1270584613084793,
0.05315389856696129,
0.05218666046857834,
-0.14647378027439117,
0.03670569509267807,
-0.2512636184692383,
0.10600464046001434,
-0.2618458569049835,
-0.10761880874633789,
-0.5494792461395264,
0.20923256874084473,
-0.14207199215888977,
-0.3192497491836548,
-0.2271360158920288,
0.40939629077911377,
-0.16171294450759888,
0.24179816246032715,
0.1672751009464264,
0.17344705760478973,
-0.22161653637886047,
-0.39752787351608276,
-0.03864732384681702,
0.2267085313796997,
-0.49705958366394043,
0.03729365020990372,
-0.3119179308414459,
-0.07409724593162537,
0.0356617197394371,
0.009327985346317291,
-0.11940383911132812,
0.4896935820579529,
-0.11923602968454361,
0.06896848976612091,
0.3620659112930298,
-0.09710022807121277,
-0.39361870288848877,
-0.10290779173374176,
-0.11007504165172577,
0.0059296730905771255,
0.02670489251613617,
0.5897966027259827,
0.17052333056926727,
-0.02600185014307499,
-0.14626441895961761,
0.4738171696662903,
-0.06525226682424545,
-0.4523636996746063,
-0.0674101784825325,
-0.1600143164396286,
-0.11366808414459229,
0.14233306050300598,
0.18499891459941864,
0.004516318440437317,
0.5035951733589172,
-0.20860977470874786,
-0.02600744366645813,
-0.18131309747695923,
-0.10985958576202393,
0.22722074389457703,
0.6325749158859253,
0.4838753938674927,
-0.01642821729183197,
-0.104057177901268,
-0.15405955910682678,
0.21553340554237366,
0.14280080795288086,
0.21679404377937317,
0.19897329807281494,
-0.15818911790847778,
-0.20897334814071655,
-0.2679838240146637,
-0.33323976397514343,
-0.14723026752471924,
0.1141914576292038,
0.032096460461616516,
0.09436684846878052,
-0.14149390161037445,
-0.261470228433609,
0.27981868386268616,
-0.4222712814807892,
0.1918846219778061,
-0.23818545043468475,
0.21327339112758636,
-0.03652653843164444,
0.02188805118203163,
-0.3151090443134308,
0.009381823241710663,
-0.12610432505607605,
-0.10211525112390518,
0.2346906065940857,
0.32537928223609924,
-0.3229697346687317,
-0.16125236451625824,
0.2806450426578522,
0.2378939837217331,
0.20426104962825775,
-0.572201669216156,
0.12014056742191315,
-0.2769657075405121,
0.20516744256019592,
-0.14878372848033905,
-0.33489513397216797,
0.05198058485984802,
-0.04799608513712883,
0.050320446491241455,
-0.006832554936408997,
-0.12011595815420151,
0.006971122696995735,
-0.0939401164650917,
-0.032137613743543625,
0.1440982222557068,
0.1598614901304245,
-0.08442078530788422,
0.14274682104587555,
-0.11762596666812897,
-0.21662016212940216,
0.060968659818172455,
0.07648050040006638,
-0.12439276278018951,
-0.06176421791315079,
0.13793456554412842,
-0.15205049514770508,
0.289247065782547,
-0.02977151982486248,
0.21691517531871796,
0.3068585693836212,
0.3730884790420532,
0.027508459985256195,
0.02145243063569069,
-0.174990713596344,
0.11877597868442535,
-0.042393334209918976,
0.1684279590845108,
0.03965653479099274,
-0.21938464045524597,
0.24090245366096497,
0.2186385691165924,
-0.19144955277442932,
0.05940379574894905,
-0.03687962889671326,
0.031668610870838165,
-0.30037713050842285,
-0.010504700243473053,
0.16996172070503235,
-0.3209850788116455,
-0.1801057755947113,
0.2852531373500824,
-0.27832943201065063,
-0.050840750336647034,
-0.10309794545173645,
-0.23157727718353271,
0.1915457844734192,
-0.028153320774435997,
-0.2954303026199341,
0.5849570035934448,
-0.27131420373916626,
-0.17184270918369293,
0.3116648495197296,
0.09627043455839157,
-0.023236170411109924,
0.21243734657764435,
0.2950218617916107,
-0.1486550122499466,
0.6369422674179077,
0.003321617841720581,
0.18383555114269257,
-0.33052581548690796,
-0.7498056292533875,
-0.03849580138921738,
-0.24744181334972382,
0.3515658974647522,
0.10810951888561249,
0.25756415724754333,
-0.0029039643704891205,
-0.23467671871185303,
0.046583786606788635,
-0.07793446630239487,
-0.23317956924438477,
-0.3308752179145813,
-0.05443557724356651,
-0.0430716946721077,
-0.12913674116134644,
-0.1530921757221222,
-0.3997129797935486,
-0.018493350595235825,
0.3303341865539551,
0.454172283411026,
0.06257674098014832,
0.3097131848335266,
0.0748218297958374,
0.12794309854507446,
0.01429265271872282,
0.02117650769650936,
-0.201033353805542,
-0.26552584767341614,
0.509129524230957,
-0.11433140188455582,
-0.37533050775527954,
0.4488411843776703,
-0.2323502153158188,
0.25111308693885803,
-0.029715757817029953,
-0.538743793964386,
-0.12662018835544586,
-0.17393755912780762,
0.28880247473716736,
0.12453094869852066,
0.3687068521976471,
0.24696147441864014,
-0.24372859299182892,
-0.0943588837981224,
-0.2407664954662323,
-0.16168628633022308,
0.16165825724601746,
0.2330324947834015,
0.41702795028686523,
0.11279862374067307,
0.40709295868873596,
-0.0905294120311737,
0.6897380352020264,
-0.02047956921160221,
-0.24762602150440216,
0.37446168065071106,
-0.13886669278144836,
0.455640971660614,
0.035895537585020065,
-0.42703574895858765,
0.34607329964637756,
0.05863942950963974,
-0.01060304045677185,
0.13396935164928436,
0.05539460480213165,
-0.21969762444496155,
-0.014507465064525604,
0.0013563856482505798,
-0.49384427070617676,
0.18830925226211548,
0.0913211852312088,
0.1619502305984497,
0.1299721598625183,
-0.13272947072982788,
-0.4053351879119873,
-0.34437456727027893,
-0.28370821475982666,
-0.02417878620326519,
0.36480021476745605,
0.09902002662420273,
-0.15130087733268738,
-0.4162289798259735,
0.13864891231060028,
-0.30910012125968933,
0.2872617840766907,
-0.18407972157001495,
-0.2182369977235794,
-0.13437014818191528,
0.19839388132095337,
0.2737717032432556,
-0.07194828987121582,
0.6910889744758606,
-0.4126759469509125,
-0.4023545980453491,
0.07162174582481384,
0.23125141859054565,
-0.0740312859416008,
0.12064360082149506,
-0.1987091451883316,
-0.10156921297311783,
0.0383971631526947,
0.0028662458062171936,
-0.19886259734630585,
0.3531131148338318,
0.41426676511764526,
-0.0314214825630188,
-0.295585572719574,
-0.1402628868818283,
-0.1323668360710144,
-0.41924622654914856,
-0.06969919800758362,
-0.051274992525577545,
-0.07933209836483002,
-0.06246811896562576,
0.24597926437854767,
0.0009572878479957581,
-0.2040558159351349,
0.031233269721269608,
0.3405822217464447,
-0.20232385396957397,
-0.045274652540683746,
0.6294144988059998,
0.1554718315601349,
0.15807515382766724,
0.07085810601711273,
0.27775436639785767,
0.6702330708503723,
-0.2856617271900177,
-0.22979164123535156,
-0.06421434134244919,
-0.09973900765180588,
0.48438969254493713,
0.34390994906425476,
0.4154765009880066,
0.09094471484422684,
0.1370897889137268,
-0.04529624432325363,
-0.3558129370212555,
0.37714147567749023,
0.37797924876213074,
-0.13935744762420654,
-0.3567371964454651,
-0.6055156588554382,
0.5350520014762878,
0.2533476948738098,
-0.04036882147192955,
0.10290305316448212,
0.5931981801986694,
-0.3034926652908325,
-0.11528832465410233,
0.36720046401023865,
1.2782777547836304,
-0.14579012989997864,
0.1109057366847992,
-0.0764954537153244,
-0.2375747412443161,
0.453564316034317,
-0.0775056928396225,
-0.024757198989391327,
0.0016844533383846283,
-0.23155303299427032,
-0.17481239140033722,
-0.21590827405452728,
0.22141635417938232,
0.3070189952850342,
0.08386851847171783,
0.04805118590593338,
-0.10835550725460052,
0.2431386560201645,
0.017959412187337875,
0.28356844186782837,
0.06554827094078064,
-0.07114960253238678,
0.042175065726041794,
0.2616974413394928,
0.23429137468338013,
-0.00980222225189209,
-0.21300733089447021,
-0.2321816086769104,
-0.25255584716796875,
-0.135024756193161,
-0.19249793887138367,
-0.22148439288139343,
-0.1898900270462036,
-0.23002180457115173,
-0.07995478808879852,
-0.3864302635192871,
0.3086971640586853,
0.06154488027095795,
0.3179963231086731,
-0.1400773674249649,
-0.10220924019813538,
0.2468230277299881,
0.015994157642126083,
-0.048440802842378616,
0.05822955444455147,
-0.12450741231441498,
0.12575779855251312,
-0.04432646557688713,
-0.14771060645580292,
0.3397945463657379,
0.06307463347911835,
-0.5173260569572449,
-0.38185131549835205,
0.1137140765786171,
0.05381615087389946,
-0.16229532659053802,
-0.19514748454093933,
0.3085092008113861,
0.1109529584646225,
-0.009188808500766754,
0.13968178629875183,
0.15593498945236206,
0.0631663054227829,
0.17132870852947235,
-0.1389104127883911,
-0.12734360992908478,
-0.1977696269750595,
0.120790995657444,
0.32517048716545105,
-0.166122168302536,
0.30491507053375244,
-0.18726752698421478,
-0.03584098443388939,
-0.06086702644824982,
0.011337421834468842,
0.30152300000190735,
-0.3062129616737366,
-0.24472446739673615,
0.09760160744190216,
0.27215003967285156,
-0.04651675000786781,
0.07890678942203522,
0.282864511013031,
-0.026660248637199402,
-0.15053734183311462,
-0.05667554587125778,
-0.08837438374757767,
0.09848229587078094,
-0.2038506418466568,
0.42384061217308044,
-0.29679441452026367,
0.04791056364774704,
0.1459038257598877,
0.35555902123451233,
-0.3762294054031372,
0.10568161308765411,
-0.09178061783313751,
0.002235887572169304,
0.2973187565803528,
0.21862083673477173,
-0.17052875459194183,
-0.3390743136405945,
0.11251476407051086,
-0.027432013303041458,
-0.10634379833936691,
-0.2024310827255249,
0.06903442740440369,
0.14597144722938538,
0.1938374936580658,
-0.020954355597496033,
0.09333997219800949,
-0.20334745943546295,
-0.13840356469154358,
0.20374494791030884,
0.010492987930774689,
-0.2191062569618225,
0.007076568901538849,
-0.11998449265956879,
0.1590479016304016,
0.08553561568260193,
-0.006462685763835907,
0.1374897062778473,
0.043798308819532394,
0.43972349166870117,
0.3563220798969269,
-0.006600327789783478,
-0.006022661924362183,
0.06249208748340607,
-0.06165432184934616,
0.18310846388339996,
0.20253705978393555,
-0.03087608516216278,
0.21961021423339844,
-0.19394133985042572,
0.13361294567584991,
0.3210049271583557,
0.17479701340198517,
0.012605320662260056,
-0.3975823223590851,
0.10292676836252213,
0.2444101870059967,
0.21527478098869324,
-0.3447580635547638,
0.09665000438690186,
0.13315421342849731,
-0.03744378685951233,
0.0688968151807785,
0.3117288053035736,
0.25508207082748413,
0.49284547567367554,
-0.3392466902732849,
0.10707961767911911,
0.5352889895439148,
0.26876237988471985,
0.2472297102212906,
0.2469630241394043,
-0.13059665262699127,
-0.08221518993377686,
0.33198073506355286,
0.4485201835632324,
0.02888762205839157,
0.2836742103099823,
-0.004455797374248505,
0.33541494607925415,
-0.11914771050214767,
-0.0995248407125473,
0.43784359097480774,
-0.2239379733800888,
0.22383229434490204,
0.15932926535606384,
0.30455589294433594,
0.1758980005979538,
0.040195200592279434,
0.1264474242925644,
-0.12205562740564346,
-0.4505121111869812,
-0.05312180891633034,
0.2924915552139282,
0.20197486877441406,
0.241152822971344,
-0.4102274775505066,
-0.31778714060783386,
-0.06644132733345032,
-0.010708613321185112,
0.13099102675914764,
-0.7470884919166565,
0.16277891397476196,
-0.18847288191318512,
-0.29323017597198486,
-0.04936317354440689,
-0.08353493362665176,
0.06751338392496109,
0.16538730263710022,
-0.026043392717838287,
0.280456006526947,
-0.01596163958311081,
-0.0280025452375412,
0.4744207262992859,
0.47376635670661926,
0.21190789341926575,
0.0916726291179657,
0.24799208343029022,
0.27427127957344055,
0.08197720348834991,
-0.15946783125400543,
0.08613874018192291,
0.16439303755760193,
-0.07143819332122803,
-0.19615226984024048,
-0.026417013257741928,
0.17120061814785004,
-0.18167273700237274,
0.13700240850448608,
0.007148817181587219,
0.18494577705860138,
-0.4970596730709076,
0.007973767817020416,
-0.25525736808776855,
-0.1076420247554779,
-0.11909137666225433,
0.031227268278598785,
-0.3563263714313507,
-0.1304469257593155,
0.2145835906267166,
-0.07814708352088928,
-0.007478886283934116,
0.06911502033472061,
0.06817799061536789,
-0.2076559066772461,
0.4324587285518646,
0.463377982378006,
0.2181885838508606,
-0.14476577937602997,
-0.21099798381328583,
-0.731875479221344,
-0.049364157021045685,
-0.30773305892944336,
-0.36238062381744385,
-0.16957537829875946,
0.1812480390071869,
0.23556286096572876,
-0.07002748548984528,
0.4248485565185547,
-0.2834780216217041,
0.05540502816438675,
0.20629703998565674,
-0.1703529804944992,
-0.09338018298149109,
0.028054658323526382,
0.16128063201904297,
-0.17429929971694946,
0.10568114370107651,
0.1664055734872818,
-0.0783122256398201,
0.06457506120204926,
0.021477440372109413,
0.10359357297420502,
-0.07293523848056793,
-0.22258546948432922,
0.45666593313217163,
-0.14916668832302094,
0.48004820942878723,
-0.06429629772901535,
0.03486905246973038,
-0.22408610582351685,
-0.03167744725942612,
-0.21539077162742615,
0.1544548124074936,
0.18766522407531738,
0.3687381446361542,
-0.15611985325813293,
-0.10009987652301788,
0.11656521260738373,
0.1503254920244217,
0.04620801657438278,
0.010400650091469288,
-0.1854775995016098,
-0.04016725718975067,
-0.2916755974292755,
-0.08006209135055542,
0.3652642071247101,
0.12971308827400208,
0.05839373543858528,
-0.12389327585697174,
-0.18913844227790833,
-0.3503030240535736,
0.36879879236221313,
-0.4690532982349396,
0.055191006511449814,
-0.29593098163604736,
-0.008245758712291718,
0.1099153459072113,
0.17078813910484314,
-0.4698792099952698,
-0.017845772206783295,
0.448740690946579,
-0.1785188615322113,
-0.06453180313110352,
0.42542174458503723,
0.17511673271656036,
-0.16885687410831451,
-0.01770707033574581,
-0.17607218027114868,
-0.38005155324935913,
-0.10752309858798981,
0.02384219691157341,
-0.12216918915510178
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | Hi! The [ADD NEW DATASET](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md) instructions are indeed the best place to start. It's also perfectly fine to add a dataset if it's public, even if it's not yours. Let me know if you need some additional pointers. | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 38 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Hi! The [ADD NEW DATASET](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md) instructions are indeed the best place to start. It's also perfectly fine to add a dataset if it's public, even if it's not yours. Let me know if you need some additional pointers. | [
-0.12172883749008179,
-0.15024302899837494,
-0.256136417388916,
0.09812013804912567,
0.25901880860328674,
0.13260456919670105,
0.21233467757701874,
0.00907139666378498,
-0.04137581214308739,
0.06831177324056625,
-0.18167166411876678,
0.15071354806423187,
-0.3092351257801056,
0.15502028167247772,
0.1148710623383522,
-0.25081372261047363,
0.023749008774757385,
-0.040628910064697266,
0.0185900516808033,
-0.29922226071357727,
-0.28937089443206787,
-0.027934079989790916,
0.09322774410247803,
-0.35176801681518555,
-0.12239295989274979,
-0.19301488995552063,
-0.3338949680328369,
0.3141009211540222,
-0.23721195757389069,
-0.3285597860813141,
-0.0758245661854744,
0.1077059954404831,
-0.0015090862289071083,
0.4192919135093689,
-0.00009932855027727783,
-0.11194592714309692,
0.038025420159101486,
0.014287913218140602,
0.18060822784900665,
-0.028267264366149902,
-0.0316510945558548,
-0.3054218590259552,
-0.28954243659973145,
-0.2818259596824646,
-0.17086398601531982,
0.0261075422167778,
0.30660131573677063,
0.15708613395690918,
0.39104002714157104,
0.13532854616641998,
0.3149335980415344,
-0.021099161356687546,
0.1342628002166748,
-0.1608809530735016,
0.10168289393186569,
0.26735782623291016,
-0.14140011370182037,
0.3532697260379791,
0.246263787150383,
0.10593855381011963,
0.025134436786174774,
0.41676098108291626,
0.17759932577610016,
-0.11337542533874512,
0.3462243974208832,
0.09599630534648895,
0.03920953720808029,
-0.36272138357162476,
-0.018646396696567535,
0.2028222382068634,
0.26992592215538025,
0.032315943390131,
-0.24793940782546997,
-0.2749822735786438,
0.044653378427028656,
-0.18222792446613312,
-0.06028243154287338,
0.44224271178245544,
0.02070232480764389,
0.05453288555145264,
-0.40695664286613464,
-0.07789184153079987,
-0.36506325006484985,
0.14913727343082428,
-0.15665003657341003,
0.08700917661190033,
-0.11082642525434494,
-0.06470722705125809,
0.09735096991062164,
0.07703517377376556,
-0.3274287283420563,
0.010554591193795204,
0.1435626894235611,
0.14443248510360718,
-0.08527688682079315,
-0.15056541562080383,
0.047694720327854156,
0.19606611132621765,
0.3761173486709595,
0.10140301287174225,
0.20002210140228271,
-0.016270246356725693,
-0.009958460927009583,
0.10577638447284698,
0.1189877837896347,
-0.08550876379013062,
-0.21497049927711487,
-0.07466746121644974,
0.06438949704170227,
0.09530619531869888,
-0.18149098753929138,
0.11660327017307281,
-0.011335346847772598,
-0.043243251740932465,
-0.12156321108341217,
-0.4045233726501465,
-0.017225708812475204,
-0.041170209646224976,
-0.06347280740737915,
-0.07636858522891998,
0.17900043725967407,
-0.004458143375813961,
-0.09438072890043259,
0.4526952803134918,
0.08048691600561142,
-0.10351649671792984,
-0.03899672254920006,
0.19345451891422272,
0.051374681293964386,
-0.07564835995435715,
-0.2461063414812088,
0.04324846342206001,
-0.2633480727672577,
0.04337760806083679,
0.11798122525215149,
-0.1966976523399353,
0.15652641654014587,
-0.14977312088012695,
-0.05992080271244049,
0.2621918022632599,
0.022184239700436592,
-0.11527884006500244,
0.3133566081523895,
0.05692578852176666,
-0.09347715973854065,
-0.2328588366508484,
0.03930159658193588,
0.05742058902978897,
-0.29476863145828247,
-0.17738187313079834,
-0.2169571816921234,
0.00580960139632225,
-0.4737684726715088,
0.29410287737846375,
-0.08889256417751312,
-0.25034138560295105,
-0.09432487934827805,
0.49249356985092163,
-0.14125043153762817,
0.24563202261924744,
0.03207910805940628,
0.11942332237958908,
-0.2739039361476898,
-0.27198901772499084,
0.002097737044095993,
0.21146416664123535,
-0.12907113134860992,
-0.1614111065864563,
-0.13701528310775757,
0.010836964473128319,
-0.043381594121456146,
0.13659968972206116,
0.020845459774136543,
0.26596981287002563,
-0.14137278497219086,
0.11282847821712494,
0.11866061389446259,
-0.19740553200244904,
-0.2878524959087372,
0.04705143719911575,
-0.19072860479354858,
0.006366530433297157,
0.06309308111667633,
0.4191930890083313,
0.134357288479805,
-0.08215197920799255,
-0.102995365858078,
0.3951348662376404,
-0.18478749692440033,
-0.10198835283517838,
-0.10147109627723694,
-0.19171704351902008,
-0.1823713332414627,
0.35122621059417725,
0.16584420204162598,
-0.18195965886116028,
0.32251498103141785,
-0.17457927763462067,
0.09849628806114197,
-0.3067208230495453,
-0.04751087725162506,
0.19027559459209442,
0.4793400764465332,
0.3727033734321594,
-0.10128520429134369,
-0.15313027799129486,
-0.12929010391235352,
0.048036038875579834,
0.14859621226787567,
0.2668900489807129,
0.030021123588085175,
-0.24650612473487854,
-0.17051437497138977,
-0.1419609636068344,
-0.14585648477077484,
-0.1361846923828125,
0.29023081064224243,
-0.12418453395366669,
0.08251917362213135,
0.053994882851839066,
0.040313880890607834,
0.27145934104919434,
-0.3474673926830292,
0.3030252754688263,
-0.04487968981266022,
0.3484649658203125,
-0.12676623463630676,
-0.10915866494178772,
0.030151300132274628,
0.04392223805189133,
-0.3098158538341522,
-0.16267290711402893,
0.20140576362609863,
0.29445457458496094,
-0.2144453078508377,
-0.0693863183259964,
0.44089263677597046,
0.35558226704597473,
0.21810941398143768,
-0.5348151326179504,
0.04650381579995155,
-0.18997405469417572,
0.011821565218269825,
0.06330417841672897,
-0.4092835783958435,
0.22982412576675415,
0.13922297954559326,
-0.026059240102767944,
0.05899158865213394,
0.04197254031896591,
0.008205665275454521,
-0.10359080880880356,
0.0005731973797082901,
0.03347118943929672,
0.2609200179576874,
-0.15842027962207794,
0.06515498459339142,
-0.05474814772605896,
-0.3057832419872284,
0.14679381251335144,
0.19422732293605804,
-0.08355599641799927,
0.11343447864055634,
0.2504488229751587,
-0.13295099139213562,
0.19913160800933838,
0.08715041726827621,
0.10952036082744598,
0.11483972519636154,
0.4458799958229065,
-0.06464584171772003,
0.0004138574004173279,
-0.12608590722084045,
0.0224347785115242,
0.008295893669128418,
0.09084202349185944,
0.09378677606582642,
-0.23350340127944946,
0.3305254280567169,
0.08612015843391418,
-0.40800580382347107,
-0.10655339062213898,
-0.17130663990974426,
-0.0889740064740181,
-0.04188559576869011,
-0.041584908962249756,
0.22038309276103973,
-0.3416471779346466,
-0.06858649104833603,
0.33516156673431396,
-0.21622894704341888,
-0.031583040952682495,
0.0700189471244812,
-0.05141112580895424,
-0.028685184195637703,
0.09720521420240402,
-0.357022762298584,
0.5594071745872498,
-0.050171419978141785,
-0.06725777685642242,
0.16453202068805695,
0.05180507153272629,
0.015084225684404373,
0.2864495515823364,
0.26404035091400146,
-0.10725737363100052,
0.5997527837753296,
-0.13382145762443542,
0.29891425371170044,
-0.3556203842163086,
-0.897287130355835,
0.06373448669910431,
-0.28793269395828247,
0.18871788680553436,
0.22303850948810577,
0.1239514946937561,
-0.2310069352388382,
-0.2542121708393097,
0.17052757740020752,
-0.19120435416698456,
-0.18733875453472137,
-0.1602087765932083,
-0.11980490386486053,
0.004476944450289011,
-0.14480002224445343,
-0.18374398350715637,
-0.2577328085899353,
-0.26154381036758423,
0.4005473852157593,
0.29330071806907654,
0.043231070041656494,
0.32440856099128723,
0.2554556429386139,
0.03541073203086853,
-0.2760355472564697,
0.10585252940654755,
-0.12093452364206314,
-0.2528451681137085,
0.29233232140541077,
-0.24558772146701813,
-0.3608624339103699,
-0.026736317202448845,
-0.28679579496383667,
0.32708168029785156,
-0.04847262054681778,
-0.5766148567199707,
-0.31040287017822266,
-0.15234699845314026,
0.23561319708824158,
0.1067289263010025,
0.10607694834470749,
0.14845657348632812,
-0.06123163178563118,
-0.28324612975120544,
-0.18682646751403809,
-0.03453809767961502,
0.22283625602722168,
0.03035961091518402,
0.231463223695755,
-0.14233997464179993,
0.1294642984867096,
0.14070239663124084,
0.4994995594024658,
-0.08691579103469849,
-0.2936767041683197,
0.3789217174053192,
-0.040168605744838715,
0.26749947667121887,
0.04582861065864563,
-0.2720368206501007,
0.4559449255466461,
0.07296172529459,
0.11236964166164398,
0.3188995122909546,
0.24030530452728271,
-0.2761392593383789,
0.08686107397079468,
0.04168788716197014,
-0.48366793990135193,
-0.028689119964838028,
0.2172793298959732,
0.3241542875766754,
0.13196033239364624,
-0.16981840133666992,
-0.33279913663864136,
-0.2986338138580322,
-0.17203274369239807,
0.0018656598404049873,
0.32189232110977173,
-0.007813401520252228,
-0.1599240005016327,
-0.29487842321395874,
0.14313305914402008,
-0.276581734418869,
0.2115342617034912,
0.05089990422129631,
-0.29870492219924927,
-0.3441438674926758,
0.019795559346675873,
0.017516694962978363,
-0.06198906525969505,
0.6483752131462097,
-0.21875177323818207,
-0.16329436004161835,
0.038790181279182434,
-0.09515155106782913,
-0.16547633707523346,
0.18715666234493256,
-0.20977017283439636,
-0.23523135483264923,
0.16752338409423828,
0.22143633663654327,
-0.30301204323768616,
0.08877576142549515,
0.3845975995063782,
-0.1272011250257492,
-0.16432024538516998,
-0.030196387320756912,
-0.10561328381299973,
-0.32854822278022766,
-0.09412766247987747,
0.05743173509836197,
-0.10254563391208649,
0.022189099341630936,
0.1315089613199234,
-0.17461083829402924,
-0.12772788107395172,
-0.03628184273838997,
0.21496126055717468,
-0.009024850092828274,
-0.01883867383003235,
0.32079192996025085,
0.1612260490655899,
-0.006166078150272369,
0.15628519654273987,
0.32962095737457275,
0.49873170256614685,
-0.2555186152458191,
-0.25146132707595825,
0.021805211901664734,
-0.12539887428283691,
0.27780091762542725,
0.29302531480789185,
0.2909948229789734,
-0.06636335700750351,
0.05384417623281479,
0.2263251543045044,
-0.4490497410297394,
0.3807624578475952,
0.4038524031639099,
-0.06439188122749329,
-0.15092012286186218,
-0.3085133135318756,
0.46567800641059875,
0.16029074788093567,
-0.024831056594848633,
0.08508497476577759,
0.5254337191581726,
-0.2639402151107788,
0.13959021866321564,
0.4339921772480011,
1.0312978029251099,
-0.3451758027076721,
0.23870843648910522,
0.20434746146202087,
-0.19619324803352356,
0.34581583738327026,
0.10455825924873352,
0.02139967307448387,
0.009645979851484299,
-0.29819929599761963,
0.04226699471473694,
-0.12612462043762207,
0.14177250862121582,
0.28360217809677124,
-0.056490276008844376,
-0.03771991282701492,
0.053984105587005615,
0.16896721720695496,
-0.05973855406045914,
0.20389243960380554,
-0.06461403518915176,
-0.30898940563201904,
-0.19444459676742554,
0.351042240858078,
0.2238750010728836,
-0.07827897369861603,
-0.16022706031799316,
-0.23117785155773163,
-0.2882223129272461,
-0.00868917815387249,
-0.055875007063150406,
-0.1822260320186615,
-0.1465543657541275,
-0.0474371537566185,
0.035891711711883545,
-0.34229862689971924,
0.11195294559001923,
0.14471161365509033,
0.20563647150993347,
-0.08814500272274017,
-0.19497643411159515,
0.3224670886993408,
-0.07032644003629684,
-0.14688289165496826,
0.03472616523504257,
-0.09783853590488434,
0.24394236505031586,
-0.1127428337931633,
0.009832672774791718,
0.03330128639936447,
0.2579740881919861,
-0.30322039127349854,
-0.21337994933128357,
-0.1013798862695694,
0.007662232965230942,
-0.21783454716205597,
0.019150206819176674,
0.09347136318683624,
-0.1285478174686432,
-0.010938942432403564,
0.24227213859558105,
0.11019539833068848,
0.22630733251571655,
-0.007338948547840118,
0.2321818321943283,
-0.06802667677402496,
-0.1254274547100067,
0.1309354603290558,
0.18806207180023193,
-0.13916781544685364,
0.2113732397556305,
-0.08708591759204865,
-0.023669064044952393,
-0.29045891761779785,
-0.0527762807905674,
0.3221072852611542,
-0.39922264218330383,
-0.024279266595840454,
0.14383430778980255,
-0.0932464450597763,
-0.08360329270362854,
0.08505982160568237,
0.318523645401001,
-0.23001256585121155,
0.003941811621189117,
-0.02415774017572403,
-0.20300346612930298,
0.3489346504211426,
-0.16445446014404297,
0.3990069329738617,
-0.37815213203430176,
0.18968094885349274,
0.07323618233203888,
0.11887706816196442,
-0.5052881240844727,
0.11893391609191895,
-0.1577078402042389,
-0.1288377046585083,
0.15790395438671112,
-0.00048245489597320557,
-0.006250150501728058,
-0.11139129102230072,
0.24698472023010254,
-0.04544331878423691,
-0.23851585388183594,
-0.337137907743454,
-0.014505540020763874,
0.06597709655761719,
0.017914362251758575,
-0.01757921278476715,
0.32335805892944336,
0.08589749783277512,
-0.16748620569705963,
-0.016718648374080658,
0.09071780741214752,
-0.17907807230949402,
0.011935502290725708,
-0.07106882333755493,
0.03137651085853577,
0.013527147471904755,
0.3733515739440918,
-0.02887102961540222,
-0.10062894225120544,
0.3617096543312073,
0.23410460352897644,
-0.056378722190856934,
-0.028927860781550407,
-0.11031512916088104,
0.1256810575723648,
0.23668929934501648,
0.11606808006763458,
-0.107883520424366,
0.337236225605011,
0.05575842410326004,
-0.08948417007923126,
0.4221888482570648,
0.3012976050376892,
-0.15539079904556274,
-0.43761229515075684,
0.1556166559457779,
0.1442035734653473,
0.4078928530216217,
-0.3838619589805603,
-0.02138686552643776,
-0.014268744736909866,
-0.1712912619113922,
0.2030976116657257,
0.2525312900543213,
0.2188531458377838,
0.30104708671569824,
-0.3384038805961609,
0.09152889996767044,
0.6004332304000854,
0.15733791887760162,
0.09177467226982117,
0.2261512726545334,
0.007956486195325851,
0.011430926620960236,
0.279671311378479,
0.3064814805984497,
0.27836087346076965,
0.17076005041599274,
-0.021860703825950623,
0.5051055550575256,
-0.23297744989395142,
0.10439030826091766,
0.4528440535068512,
0.056472454220056534,
0.07524700462818146,
0.2874222695827484,
0.1566929817199707,
0.3502217233181,
-0.1652979850769043,
0.33091461658477783,
-0.09341125190258026,
-0.5139422416687012,
-0.16741575300693512,
0.24165916442871094,
0.14092639088630676,
0.1332186609506607,
-0.2577388286590576,
-0.17342478036880493,
-0.16746455430984497,
-0.016911737620830536,
0.09406474232673645,
-0.5860429406166077,
0.26051580905914307,
-0.08398638665676117,
-0.1258171647787094,
-0.1871439665555954,
-0.18916776776313782,
0.12989667057991028,
0.38678815960884094,
-0.05406849831342697,
0.1932840794324875,
0.15782952308654785,
-0.17640122771263123,
0.44061997532844543,
0.6294917464256287,
0.30626198649406433,
-0.005355082452297211,
0.20971466600894928,
0.090827576816082,
-0.06753583252429962,
-0.07077120989561081,
-0.1448291689157486,
0.0012278519570827484,
0.06823592633008957,
0.04659225791692734,
0.11508974432945251,
0.2824404835700989,
-0.3246867060661316,
-0.026838432997465134,
-0.011732678860425949,
0.06865993142127991,
-0.1724126636981964,
-0.10848095268011093,
-0.20105212926864624,
-0.009920254349708557,
-0.22058919072151184,
0.02069409191608429,
-0.42022818326950073,
-0.04449360817670822,
0.06426846981048584,
-0.20193594694137573,
0.048633068799972534,
0.018235385417938232,
0.13627839088439941,
0.016198506578803062,
0.41371047496795654,
0.21407760679721832,
0.3045605719089508,
-0.14192749559879303,
-0.3827579617500305,
-0.6373828649520874,
0.03882472962141037,
-0.15721099078655243,
-0.33034825325012207,
-0.09309817850589752,
0.18794339895248413,
0.11747059971094131,
-0.035979099571704865,
0.19875985383987427,
-0.25145062804222107,
0.08082934468984604,
0.11326739192008972,
-0.34926778078079224,
0.05241739749908447,
0.11996380239725113,
0.07042296975851059,
0.004114817827939987,
0.04921407252550125,
0.21015870571136475,
-0.1612340211868286,
0.20213329792022705,
0.014431312680244446,
0.21630024909973145,
-0.29646429419517517,
-0.3464130163192749,
0.3651932179927826,
-0.04334895312786102,
0.2556162476539612,
-0.2158653736114502,
-0.2915845215320587,
-0.14130619168281555,
-0.21808786690235138,
-0.3037533164024353,
0.06720010191202164,
0.22635656595230103,
0.5252439975738525,
-0.07212716341018677,
-0.2096041589975357,
0.22443775832653046,
0.2583332657814026,
0.20497550070285797,
0.021379942074418068,
-0.19275963306427002,
0.07556856423616409,
0.08707714825868607,
-0.15093833208084106,
0.14559981226921082,
0.3331703543663025,
0.016318853944540024,
-0.1161818578839302,
-0.08733534067869186,
-0.59958815574646,
0.459763765335083,
-0.46848466992378235,
-0.010970333591103554,
-0.1361488699913025,
0.03855537623167038,
0.029852166771888733,
0.26349836587905884,
-0.4723894000053406,
0.0795329287648201,
0.24310246109962463,
0.08364087343215942,
-0.2954865097999573,
0.5229557752609253,
0.1555173546075821,
-0.3194599747657776,
-0.019267551600933075,
-0.11737139523029327,
-0.33831021189689636,
-0.16959838569164276,
0.09700056910514832,
-0.1779763251543045
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | @khushmeeet this is the [link](https://huggingface.co/datasets/dgrnd4/stanford_dog_dataset) where I added the dataset already. If you can I would ask you to do this:
1) The dataset it's all in TRAINING SET: can you please divide it in Training,Test and Validation Set? If you can for each class, take the 80% for the Training set and the 10% for Test and 10% Validation
2) The images has different size, can you please resize all the images in 224,224,3? Look even at the last dimension "3" because some images has dimension 4!
Thank you!! | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 90 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
@khushmeeet this is the [link](https://huggingface.co/datasets/dgrnd4/stanford_dog_dataset) where I added the dataset already. If you can I would ask you to do this:
1) The dataset it's all in TRAINING SET: can you please divide it in Training,Test and Validation Set? If you can for each class, take the 80% for the Training set and the 10% for Test and 10% Validation
2) The images has different size, can you please resize all the images in 224,224,3? Look even at the last dimension "3" because some images has dimension 4!
Thank you!! | [
-0.07577362656593323,
-0.18577826023101807,
-0.29640257358551025,
0.2010549157857895,
0.2948474884033203,
0.2695193588733673,
0.10719704627990723,
0.1294497549533844,
-0.08582490682601929,
0.06191099435091019,
-0.17495477199554443,
0.09391450136899948,
-0.28657326102256775,
0.1928495168685913,
0.03321051225066185,
-0.3350590765476227,
-0.04457133263349533,
0.03745575249195099,
-0.004119366407394409,
-0.232428178191185,
-0.2849676012992859,
-0.07332552224397659,
0.009387686848640442,
-0.3680688738822937,
-0.21093842387199402,
-0.18341515958309174,
-0.4651900827884674,
0.22342342138290405,
-0.32740145921707153,
-0.3660571575164795,
-0.11458485573530197,
0.09024625271558762,
0.09856312721967697,
0.4064169228076935,
-0.000101672594610136,
-0.1089174747467041,
0.011723384261131287,
0.000995837152004242,
0.24470239877700806,
-0.045720770955085754,
-0.10221445560455322,
-0.4102703332901001,
-0.3437686264514923,
-0.26700541377067566,
-0.14710694551467896,
-0.10010934621095657,
0.12822294235229492,
0.20272710919380188,
0.4915267825126648,
0.2384786158800125,
0.3034823536872864,
-0.1479678452014923,
0.18790166079998016,
-0.062311235815286636,
0.08495387434959412,
0.18218854069709778,
-0.0864698514342308,
0.4027487337589264,
0.22007709741592407,
0.13986019790172577,
0.13412989675998688,
0.385140061378479,
0.21866710484027863,
-0.23452283442020416,
0.3143143355846405,
-0.032668337225914,
0.14380967617034912,
-0.40435895323753357,
-0.0156831294298172,
0.1733783334493637,
0.30923712253570557,
0.1361183226108551,
-0.2952266335487366,
-0.2853553891181946,
0.031868841499090195,
-0.26198482513427734,
-0.07165396958589554,
0.46848228573799133,
0.09206900000572205,
-0.059768225997686386,
-0.5364285111427307,
-0.07848557829856873,
-0.44971561431884766,
0.2203138917684555,
-0.1253678798675537,
0.0782359316945076,
-0.0920400470495224,
-0.03396323323249817,
0.08446304500102997,
0.10527479648590088,
-0.18436069786548615,
-0.10326370596885681,
0.1444934755563736,
0.20184163749217987,
-0.2707909047603607,
-0.23700641095638275,
-0.09076515585184097,
0.16679242253303528,
0.3388984501361847,
0.09820263087749481,
0.13015176355838776,
-0.19591042399406433,
0.03972103074193001,
0.03876549005508423,
0.14358490705490112,
0.11571258306503296,
-0.2309998869895935,
0.04590054973959923,
-0.10888619720935822,
0.10367589443922043,
-0.14173032343387604,
0.1018848866224289,
-0.08813181519508362,
-0.24454450607299805,
-0.1538824439048767,
-0.24944257736206055,
0.02218666672706604,
-0.0009693726897239685,
0.05586548149585724,
-0.022084243595600128,
0.0851440504193306,
-0.08500876277685165,
-0.07345219701528549,
0.4623778164386749,
0.02914702147245407,
-0.10017184168100357,
-0.13159935176372528,
0.2862241864204407,
0.09212704002857208,
0.003917462192475796,
-0.2548222839832306,
0.14068737626075745,
-0.2754836082458496,
-0.054223328828811646,
0.10177008807659149,
-0.17187799513339996,
0.10233696550130844,
-0.002796817570924759,
-0.11698773503303528,
0.16707350313663483,
-0.045551881194114685,
-0.2790853977203369,
0.26963773369789124,
0.033134348690509796,
-0.037334639579057693,
-0.2793518006801605,
-0.05025666579604149,
0.15509101748466492,
-0.2575463056564331,
-0.024392247200012207,
-0.252250999212265,
0.04387955740094185,
-0.3570845127105713,
0.2848415970802307,
-0.046264342963695526,
-0.20897738635540009,
-0.1938462257385254,
0.3973090946674347,
-0.05608931928873062,
0.35064247250556946,
0.08542773872613907,
-0.061478324234485626,
-0.24128353595733643,
-0.27292579412460327,
0.03038935922086239,
0.12369593232870102,
-0.27586430311203003,
-0.024191875010728836,
-0.1230873167514801,
0.017052460461854935,
0.11487326771020889,
0.21485279500484467,
0.11743271350860596,
0.3014787435531616,
-0.11904355138540268,
0.18677516281604767,
0.19122982025146484,
-0.15165026485919952,
-0.30573567748069763,
0.09468161314725876,
-0.09080038964748383,
0.02849595807492733,
0.05106288939714432,
0.2733920216560364,
0.2050943374633789,
-0.04983130842447281,
-0.1139504462480545,
0.3286222815513611,
-0.22792327404022217,
-0.17957067489624023,
-0.17188221216201782,
-0.17562627792358398,
-0.005449023097753525,
0.39383721351623535,
0.23320196568965912,
-0.25409895181655884,
0.20886357128620148,
-0.2321874499320984,
0.1259641945362091,
-0.30926141142845154,
-0.049965932965278625,
0.14993494749069214,
0.38492998480796814,
0.30675238370895386,
-0.0666360929608345,
-0.1616746187210083,
-0.08536108583211899,
0.12539997696876526,
0.12138772010803223,
0.1923750936985016,
0.1974422186613083,
-0.07353634387254715,
-0.32017573714256287,
-0.25663837790489197,
-0.305325448513031,
-0.16672568023204803,
0.25778889656066895,
-0.17461958527565002,
0.22104811668395996,
-0.07278571277856827,
0.041037704795598984,
0.255511611700058,
-0.45647132396698,
0.2506641447544098,
-0.04528913274407387,
0.3556423783302307,
-0.18916055560112,
-0.11035607010126114,
-0.05298307538032532,
0.06310537457466125,
-0.16038784384727478,
-0.20283357799053192,
0.05993964523077011,
0.26530757546424866,
-0.17767231166362762,
-0.1967407613992691,
0.31327784061431885,
0.30908215045928955,
0.2654195725917816,
-0.44482287764549255,
0.09521912038326263,
-0.2975524067878723,
-0.02781406044960022,
-0.019169550389051437,
-0.2977803349494934,
0.2129480540752411,
-0.04058903828263283,
0.04993820935487747,
0.027882546186447144,
-0.05043962597846985,
-0.039238691329956055,
-0.18407100439071655,
0.05088987946510315,
0.0692029744386673,
0.22132577002048492,
-0.15284423530101776,
0.05391257628798485,
-0.17052079737186432,
-0.2377215325832367,
0.0010619685053825378,
0.15215171873569489,
-0.03777773305773735,
-0.08124496787786484,
0.22843313217163086,
-0.09604651480913162,
0.2359154224395752,
0.021674146875739098,
0.252888947725296,
0.1701439917087555,
0.4525708556175232,
-0.09181572496891022,
0.09685630351305008,
-0.07244311273097992,
0.07160281389951706,
0.06010616943240166,
0.06185867637395859,
0.14985910058021545,
-0.04657432436943054,
0.24545344710350037,
0.15925154089927673,
-0.2789269685745239,
-0.053686805069446564,
0.02382752113044262,
-0.010590188205242157,
-0.10585787892341614,
-0.1562119871377945,
0.17544911801815033,
-0.32676246762275696,
-0.087676502764225,
0.3212708830833435,
-0.23505043983459473,
0.06770751625299454,
0.1157527044415474,
-0.17382411658763885,
0.03685322776436806,
0.11920242011547089,
-0.3626936972141266,
0.5389920473098755,
-0.008792910724878311,
-0.04288328438997269,
0.16205644607543945,
0.16305780410766602,
-0.045536719262599945,
0.2736560106277466,
0.30355340242385864,
-0.11264248192310333,
0.6376590132713318,
-0.14073900878429413,
0.16063974797725677,
-0.2357330620288849,
-0.7725817561149597,
-0.07081755250692368,
-0.33201879262924194,
0.23028476536273956,
0.11431854218244553,
0.1675027310848236,
-0.1918569654226303,
-0.173944890499115,
0.21281501650810242,
0.009705616161227226,
-0.25038304924964905,
-0.202247753739357,
-0.07186431437730789,
-0.009609204716980457,
-0.04261362925171852,
-0.2848074436187744,
-0.2923547923564911,
-0.23967570066452026,
0.3719823956489563,
0.2802894115447998,
0.09976131469011307,
0.2717413604259491,
0.30606770515441895,
-0.0462980717420578,
-0.217897430062294,
0.12459362298250198,
-0.13000169396400452,
-0.2377663254737854,
0.2781389355659485,
-0.1258576512336731,
-0.39395925402641296,
0.036209624260663986,
-0.20227999985218048,
0.3827565014362335,
0.007130923680961132,
-0.5618835091590881,
-0.30810457468032837,
-0.1910071223974228,
0.10579496622085571,
0.0015491098165512085,
0.06530120223760605,
0.17116449773311615,
-0.20174866914749146,
-0.19750966131687164,
-0.1718180775642395,
0.013969674706459045,
0.16106513142585754,
0.14839842915534973,
0.33819952607154846,
-0.17389720678329468,
0.23379552364349365,
0.16666778922080994,
0.5358226895332336,
0.06756852567195892,
-0.24010126292705536,
0.3720703721046448,
-0.05811665207147598,
0.1487123966217041,
0.0008240416646003723,
-0.39020395278930664,
0.5356946587562561,
0.04865912348031998,
0.08210278302431107,
0.24289658665657043,
0.1195540800690651,
-0.2148021161556244,
0.12299205362796783,
-0.08784802258014679,
-0.43713992834091187,
0.062007974833250046,
0.3476579487323761,
0.08550874888896942,
0.19955496490001678,
-0.23489508032798767,
-0.3039420247077942,
-0.26730799674987793,
-0.16307052969932556,
-0.08397045731544495,
0.2534678280353546,
0.01685056835412979,
-0.11173555254936218,
-0.3185507357120514,
0.03079218976199627,
-0.21386608481407166,
0.29167628288269043,
0.061287060379981995,
-0.11244262754917145,
-0.265202134847641,
0.17975381016731262,
0.06938260793685913,
-0.02338581718504429,
0.7619909048080444,
-0.2716657221317291,
-0.20807339251041412,
0.10349944233894348,
-0.07831194996833801,
-0.16059128940105438,
0.09198024868965149,
-0.12017278373241425,
-0.30082201957702637,
0.20525813102722168,
0.3043051064014435,
-0.157199889421463,
0.02763013169169426,
0.36420366168022156,
0.007818988524377346,
-0.14460791647434235,
-0.11925654113292694,
-0.10753770172595978,
-0.2301933765411377,
-0.10442081838846207,
0.16812989115715027,
-0.07888074219226837,
0.08190786838531494,
0.11098522692918777,
-0.23937657475471497,
-0.1256513148546219,
-0.09262359142303467,
0.18754231929779053,
0.015966758131980896,
0.02196512743830681,
0.31938672065734863,
0.20819467306137085,
0.057186320424079895,
0.1534390151500702,
0.3830346465110779,
0.483974814414978,
-0.27850106358528137,
-0.2464304268360138,
0.0172097310423851,
-0.05552280694246292,
0.3449471890926361,
0.2067335844039917,
0.2593247890472412,
-0.21411094069480896,
-0.07839085161685944,
0.27166712284088135,
-0.4192682206630707,
0.45562848448753357,
0.4733581840991974,
-0.10336412489414215,
-0.2037256807088852,
-0.33956027030944824,
0.437355637550354,
0.18885082006454468,
0.07089518010616302,
0.08291153609752655,
0.5420815348625183,
-0.2827727496623993,
0.10425812751054764,
0.46440714597702026,
1.0585286617279053,
-0.23392896354198456,
0.009262464940547943,
0.07417993247509003,
-0.22937926650047302,
0.24571657180786133,
0.04287634789943695,
0.09059348702430725,
-0.025225456804037094,
-0.29370373487472534,
0.03733142465353012,
-0.17783229053020477,
0.21919021010398865,
0.3622601628303528,
-0.09329932928085327,
0.049827247858047485,
0.010450072586536407,
0.041104063391685486,
-0.1764489710330963,
0.27414852380752563,
-0.08103284239768982,
-0.21262133121490479,
-0.059579990804195404,
0.3444835841655731,
0.19492100179195404,
-0.08545535802841187,
-0.1294384002685547,
-0.14057286083698273,
-0.3156488835811615,
-0.06858190894126892,
-0.13175426423549652,
-0.13312862813472748,
-0.3280564248561859,
-0.10416671633720398,
-0.06429922580718994,
-0.3773098587989807,
0.2588180899620056,
0.17735834419727325,
0.10617223381996155,
-0.0673060268163681,
-0.09960363805294037,
0.32775840163230896,
0.015883490443229675,
-0.09413965791463852,
0.006817016750574112,
-0.17687773704528809,
0.2308925837278366,
-0.14008870720863342,
-0.016481980681419373,
-0.04464808851480484,
0.18032634258270264,
-0.2032601684331894,
-0.24315893650054932,
-0.05237898230552673,
0.060604605823755264,
-0.3762331008911133,
-0.06415785104036331,
-0.03248143941164017,
-0.020278608426451683,
0.003988321870565414,
0.26609495282173157,
-0.044688910245895386,
0.1838528960943222,
0.20725029706954956,
0.20064066350460052,
-0.09826695919036865,
-0.058208223432302475,
0.03660145774483681,
0.24549251794815063,
-0.15420499444007874,
0.37521493434906006,
-0.15320304036140442,
-0.017476815730333328,
-0.280720591545105,
-0.005946960300207138,
0.3414600193500519,
-0.316864550113678,
-0.011245599947869778,
0.07019199430942535,
0.022492215037345886,
-0.08217940479516983,
0.04125872626900673,
0.4009721875190735,
-0.16101694107055664,
0.1459021270275116,
-0.07737928628921509,
-0.1875634640455246,
0.2133801430463791,
-0.10071974992752075,
0.4641546607017517,
-0.44880807399749756,
0.2634233236312866,
0.04597347974777222,
0.2795812785625458,
-0.45426318049430847,
0.15303175151348114,
-0.22835206985473633,
-0.01904570683836937,
0.14525198936462402,
-0.046195074915885925,
-0.09936390072107315,
-0.1337253898382187,
0.21778331696987152,
0.032115742564201355,
-0.28594595193862915,
-0.34282296895980835,
0.045352715998888016,
0.06375101208686829,
0.13161513209342957,
0.0019807377830147743,
0.2829691767692566,
0.0017181076109409332,
-0.19060547649860382,
0.005118785426020622,
0.06340292096138,
-0.2917385399341583,
-0.03551899641752243,
-0.05761145427823067,
0.061058465391397476,
-0.04537910223007202,
0.26796090602874756,
-0.04228918254375458,
-0.07587848603725433,
0.3942573070526123,
0.3489246070384979,
0.021831316873431206,
0.10553963482379913,
-0.10506957769393921,
-0.04486844316124916,
0.15172970294952393,
0.044385433197021484,
-0.18873172998428345,
0.32983773946762085,
0.038539133965969086,
0.0022128932178020477,
0.4132198989391327,
0.30349087715148926,
0.07766535133123398,
-0.3982487916946411,
0.16198231279850006,
0.14442437887191772,
0.3802807927131653,
-0.4061174690723419,
0.09603958576917648,
-0.008623622357845306,
-0.12763483822345734,
0.14777471125125885,
0.15081274509429932,
0.19899046421051025,
0.35224854946136475,
-0.35741281509399414,
0.10304293036460876,
0.5551720261573792,
0.15523260831832886,
0.2116616666316986,
0.3599027991294861,
-0.12871436774730682,
-0.07914932072162628,
0.296824187040329,
0.2349092662334442,
0.054273881018161774,
0.11446583271026611,
-0.06210973113775253,
0.5252830386161804,
-0.29373276233673096,
0.049911268055438995,
0.3720388114452362,
-0.051626600325107574,
0.09346817433834076,
0.3481653928756714,
0.11379373073577881,
0.2939898669719696,
-0.10466630756855011,
0.22965148091316223,
-0.008295168168842793,
-0.6117748618125916,
-0.15433283150196075,
0.29480478167533875,
0.05207780376076698,
0.2548538148403168,
-0.35769885778427124,
-0.23647502064704895,
-0.25708818435668945,
-0.008424965664744377,
0.017380695790052414,
-0.5979874730110168,
0.25877436995506287,
-0.025653809309005737,
-0.3106451630592346,
-0.14120610058307648,
-0.21816867589950562,
0.2403794229030609,
0.30757585167884827,
-0.21046091616153717,
0.22171641886234283,
0.27785414457321167,
-0.21733352541923523,
0.3245588541030884,
0.5399932861328125,
0.35906776785850525,
0.02799157239496708,
0.2394767850637436,
0.06541021913290024,
0.02693076804280281,
-0.07018480449914932,
0.06966835260391235,
0.12295271456241608,
0.13925275206565857,
0.10771554708480835,
0.17387954890727997,
0.2308562695980072,
-0.26707538962364197,
0.04145089164376259,
-0.03411797806620598,
0.04488189518451691,
-0.2640334665775299,
-0.036571525037288666,
-0.055039674043655396,
-0.04068954661488533,
-0.257352739572525,
-0.09803763777017593,
-0.3852299749851227,
0.013900169171392918,
0.0770399272441864,
-0.18919645249843597,
0.043933577835559845,
0.012614167295396328,
0.1324654519557953,
-0.1131695806980133,
0.4357883334159851,
0.31217360496520996,
0.1851823925971985,
-0.24536490440368652,
-0.3812720775604248,
-0.5311148166656494,
-0.10606091469526291,
-0.24402743577957153,
-0.2953881323337555,
0.01192736066877842,
0.23274202644824982,
0.11123542487621307,
-0.08993786573410034,
0.30411845445632935,
-0.17581062018871307,
0.10885374993085861,
0.220582515001297,
-0.3459436297416687,
0.1594093292951584,
0.14315202832221985,
0.14320237934589386,
0.0039452724158763885,
0.012127697467803955,
0.22002872824668884,
-0.07526664435863495,
0.11603531986474991,
0.07746517658233643,
0.24705186486244202,
-0.20388247072696686,
-0.26414549350738525,
0.30898234248161316,
0.01870911568403244,
0.46324753761291504,
-0.17493540048599243,
-0.10910066962242126,
-0.12026689946651459,
-0.08360113203525543,
-0.3394078314304352,
0.06931161880493164,
0.3214789032936096,
0.5780912637710571,
-0.07836084067821503,
-0.2501152455806732,
0.16449755430221558,
0.18139594793319702,
0.10063494741916656,
-0.117978036403656,
-0.200063556432724,
-0.01486336998641491,
0.1498211920261383,
-0.12465463578701019,
0.22900845110416412,
0.24685493111610413,
-0.008160196244716644,
-0.1016419529914856,
-0.2472778856754303,
-0.5657375454902649,
0.3972567319869995,
-0.4000933766365051,
-0.08771458268165588,
-0.1431642472743988,
0.031161591410636902,
0.049986034631729126,
0.30985090136528015,
-0.440093457698822,
-0.019433729350566864,
0.3471948802471161,
0.026313260197639465,
-0.09089463949203491,
0.620461642742157,
0.26854944229125977,
-0.18730130791664124,
0.09551677107810974,
-0.17215710878372192,
-0.3513440489768982,
-0.1926465928554535,
0.013908330351114273,
-0.26729816198349
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | Hi @khushmeeet! Thanks for the interest. You can self-assign the issue by commenting `#self-assign` on it.
Also, I think we can skip @dgrnd4's steps as we try to avoid any custom processing on top of raw data. One can later copy the script and override `_post_process` in it to perform such processing on the generated dataset. | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 56 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Hi @khushmeeet! Thanks for the interest. You can self-assign the issue by commenting `#self-assign` on it.
Also, I think we can skip @dgrnd4's steps as we try to avoid any custom processing on top of raw data. One can later copy the script and override `_post_process` in it to perform such processing on the generated dataset. | [
-0.1389414221048355,
0.02761271595954895,
-0.236250102519989,
-0.057336024940013885,
0.3817545175552368,
0.14256751537322998,
0.25735872983932495,
0.23157717287540436,
0.07796628773212433,
0.07889313995838165,
0.0585329532623291,
0.2988729178905487,
-0.2866286039352417,
0.28567075729370117,
0.15717175602912903,
-0.10415416955947876,
-0.06778449565172195,
0.08253659307956696,
0.09682576358318329,
-0.26780784130096436,
-0.49329614639282227,
-0.009996259585022926,
0.10516802966594696,
-0.36206579208374023,
-0.1880757063627243,
-0.14249016344547272,
-0.16927661001682281,
0.315733939409256,
-0.22368718683719635,
-0.4246850609779358,
-0.12931498885154724,
0.16114579141139984,
-0.10026820003986359,
0.3571554720401764,
-0.00009836450772127137,
-0.031910598278045654,
0.10559657216072083,
-0.004925256595015526,
0.13905349373817444,
0.03470546007156372,
-0.06454983353614807,
-0.31172215938568115,
-0.2874320149421692,
-0.3375728130340576,
-0.15047472715377808,
-0.0704081580042839,
0.28545525670051575,
-0.009126745164394379,
0.3079960346221924,
0.1285422146320343,
0.31747379899024963,
-0.14427945017814636,
0.02514376863837242,
-0.08890153467655182,
0.14168515801429749,
0.23899437487125397,
-0.10812762379646301,
0.2563517391681671,
0.22929628193378448,
0.04971339553594589,
0.012557759881019592,
0.33967873454093933,
0.05530586838722229,
-0.1783381849527359,
0.3245117664337158,
0.10607049614191055,
0.08867329359054565,
-0.3887992203235626,
0.09146883338689804,
0.13266035914421082,
0.15440301597118378,
-0.01933123916387558,
-0.27139368653297424,
-0.2724290192127228,
-0.000596791272982955,
-0.40358906984329224,
-0.03661486506462097,
0.45536425709724426,
-0.0037795957177877426,
0.07435554265975952,
-0.38155439496040344,
-0.06383798271417618,
-0.43284109234809875,
0.10487692803144455,
-0.03752503544092178,
0.11612379550933838,
-0.019885007292032242,
-0.005799412727355957,
0.08668540418148041,
0.2282264232635498,
-0.14738762378692627,
-0.11578300595283508,
0.06774108856916428,
0.13212020695209503,
-0.19216345250606537,
-0.17483195662498474,
-0.006708547472953796,
0.07478328049182892,
0.30679047107696533,
0.1550816297531128,
0.17833639681339264,
0.03713148832321167,
0.06151862069964409,
0.05354875326156616,
0.03900699317455292,
0.030892029404640198,
-0.2303147315979004,
-0.07540422677993774,
0.1293678730726242,
0.03320673853158951,
-0.1808435320854187,
0.08006039261817932,
0.01773909106850624,
-0.1472856104373932,
-0.044410306960344315,
-0.17487317323684692,
0.04804331064224243,
0.047753456979990005,
-0.1091502234339714,
0.08291754871606827,
0.25935637950897217,
-0.018029125407338142,
-0.17511507868766785,
0.5274169445037842,
0.11942292749881744,
-0.034433916211128235,
0.10702519118785858,
0.26466357707977295,
0.02075892500579357,
-0.08106756210327148,
-0.22030887007713318,
0.12738758325576782,
-0.2905814051628113,
-0.02115917019546032,
0.13349854946136475,
0.009421826340258121,
0.07914073765277863,
-0.06964817643165588,
-0.08810429275035858,
0.1914302259683609,
0.14853502810001373,
-0.23200848698616028,
0.42068228125572205,
0.13942919671535492,
0.09920044243335724,
-0.1032581478357315,
-0.006853945553302765,
0.09715476632118225,
-0.20534177124500275,
0.09731805324554443,
-0.226042240858078,
-0.001862313598394394,
-0.46024930477142334,
0.3083130121231079,
-0.057712528854608536,
-0.27646005153656006,
-0.1536327600479126,
0.32630500197410583,
0.048408687114715576,
0.2797487676143646,
-0.014181248843669891,
0.0213034488260746,
-0.3986019492149353,
-0.3340142071247101,
-0.039259202778339386,
0.17561790347099304,
-0.37183400988578796,
-0.007143929600715637,
-0.24739797413349152,
-0.031650181859731674,
0.21413394808769226,
0.1482810378074646,
0.08472928404808044,
0.40311238169670105,
-0.1474161595106125,
0.12444207072257996,
0.08717858046293259,
-0.16613374650478363,
-0.281402587890625,
0.12247516959905624,
-0.25748223066329956,
0.12882265448570251,
0.1109500303864479,
0.37913569808006287,
0.1896899789571762,
-0.05739457160234451,
-0.1438589096069336,
0.40232259035110474,
-0.08988197147846222,
-0.07495564967393875,
-0.16077637672424316,
-0.1713581085205078,
-0.09173187613487244,
0.3467888832092285,
0.2869766354560852,
-0.06077399104833603,
0.19868752360343933,
-0.3162831962108612,
0.1344211995601654,
-0.3591541647911072,
0.09323900938034058,
0.14967378973960876,
0.47970423102378845,
0.3386947512626648,
0.01960902288556099,
-0.1368350386619568,
-0.061513327062129974,
0.12701156735420227,
0.13142098486423492,
0.26251572370529175,
-0.0478084534406662,
-0.2836863100528717,
-0.2246817648410797,
-0.08041545003652573,
-0.24520643055438995,
-0.162859708070755,
0.27124252915382385,
-0.07436122000217438,
-0.039981409907341,
-0.06958113610744476,
-0.0013255849480628967,
0.32438623905181885,
-0.3825914263725281,
0.21403063833713531,
-0.024466104805469513,
0.32765886187553406,
-0.1515665203332901,
-0.26730188727378845,
-0.04452834278345108,
0.04098639264702797,
-0.23338904976844788,
-0.1110074445605278,
0.11110758781433105,
0.2510950267314911,
-0.04965822398662567,
-0.13295134902000427,
0.36349570751190186,
0.2370280623435974,
0.050596512854099274,
-0.37435200810432434,
-0.02224995382130146,
-0.1995915174484253,
0.07947744429111481,
-0.03109385445713997,
-0.30575817823410034,
0.26435020565986633,
0.012848060578107834,
-0.011621691286563873,
0.020325414836406708,
-0.03724180534482002,
0.058477044105529785,
-0.21177396178245544,
0.11770793050527573,
-0.021300610154867172,
0.1760871708393097,
-0.037124037742614746,
-0.01760232262313366,
-0.18714749813079834,
-0.30070173740386963,
0.16424359381198883,
0.25537773966789246,
-0.07945248484611511,
0.09162640571594238,
0.270195871591568,
-0.0585353747010231,
0.219611257314682,
-0.02160363458096981,
0.2701784670352936,
0.17501488327980042,
0.4388292133808136,
-0.19428002834320068,
0.1054362878203392,
-0.0034144343808293343,
0.021904829889535904,
0.0986042320728302,
0.15301114320755005,
0.15163274109363556,
-0.06343302130699158,
0.40028828382492065,
0.05374867841601372,
-0.36919066309928894,
-0.030209671705961227,
-0.026328733190894127,
-0.07164105027914047,
-0.17566776275634766,
-0.10243505984544754,
0.09295740723609924,
-0.19672653079032898,
-0.09060095250606537,
0.4166982173919678,
-0.13413351774215698,
-0.04416859149932861,
0.09981314092874527,
-0.027249958366155624,
-0.13976970314979553,
0.17872779071331024,
-0.3496841788291931,
0.5488089323043823,
0.0629064068198204,
-0.2140314131975174,
0.1590753048658371,
-0.010168753564357758,
0.035017699003219604,
0.2465709149837494,
0.2632034718990326,
-0.13040435314178467,
0.6277565956115723,
-0.1267746537923813,
0.20242665708065033,
-0.23720765113830566,
-0.7600222229957581,
0.06679818034172058,
-0.2626038193702698,
0.2593497633934021,
0.1634964495897293,
0.1555529087781906,
-0.04268756881356239,
-0.275417298078537,
0.16554901003837585,
-0.19393835961818695,
-0.2360755354166031,
-0.13067726790905,
-0.10294707864522934,
-0.02586343139410019,
-0.220127135515213,
-0.268461138010025,
-0.15992878377437592,
-0.24309968948364258,
0.2895967364311218,
0.3723524212837219,
0.20175133645534515,
0.22150984406471252,
0.24126622080802917,
-0.1437750607728958,
-0.18183819949626923,
0.0076814079657197,
-0.2464226484298706,
-0.2774219512939453,
0.3648236393928528,
-0.2062060683965683,
-0.40371668338775635,
0.03606478497385979,
-0.292513370513916,
0.26367583870887756,
0.0457247719168663,
-0.48738449811935425,
-0.26830652356147766,
-0.14727355539798737,
0.22944191098213196,
-0.021385610103607178,
-0.050728850066661835,
0.1799476444721222,
-0.014716781675815582,
-0.26483482122421265,
-0.34620407223701477,
-0.042890794575214386,
0.3325715959072113,
0.00009755045175552368,
0.15660491585731506,
-0.12286696583032608,
0.27529627084732056,
0.20193973183631897,
0.5578510165214539,
-0.26548755168914795,
-0.23265422880649567,
0.46083998680114746,
-0.14903993904590607,
0.25763610005378723,
-0.004785411059856415,
-0.33547982573509216,
0.33144983649253845,
0.01301872730255127,
0.05789191275835037,
0.30850377678871155,
0.0905548632144928,
-0.34111589193344116,
0.13006627559661865,
0.16350823640823364,
-0.502586305141449,
-0.04488832503557205,
0.29206395149230957,
0.329996794462204,
0.1453879177570343,
-0.07892075926065445,
-0.1978965699672699,
-0.3898680806159973,
-0.1865529716014862,
0.011842213571071625,
0.19537067413330078,
0.0979745164513588,
-0.2652663588523865,
-0.28622910380363464,
0.11679267138242722,
-0.31957289576530457,
0.26100942492485046,
0.0366729311645031,
-0.17778244614601135,
-0.27916887402534485,
-0.05385511368513107,
0.10638043284416199,
-0.17947952449321747,
0.7661768794059753,
-0.37417811155319214,
-0.06714146584272385,
0.08651365339756012,
-0.06600090116262436,
-0.1517675817012787,
0.16939319670200348,
-0.18247896432876587,
-0.17249713838100433,
0.2460237294435501,
0.079386867582798,
-0.2250710129737854,
0.1402907371520996,
0.3856571316719055,
-0.0967317745089531,
-0.21515235304832458,
-0.12015431374311447,
-0.21342724561691284,
-0.3446464538574219,
-0.17727988958358765,
0.013106197118759155,
-0.026179663836956024,
0.051708709448575974,
0.05215752124786377,
-0.22683462500572205,
-0.12743721902370453,
-0.005842277780175209,
0.20197615027427673,
-0.05349456146359444,
-0.022687502205371857,
0.19058501720428467,
0.1959681510925293,
-0.1162678450345993,
0.11611902713775635,
0.3682025074958801,
0.5062742233276367,
-0.2558068335056305,
-0.3050878942012787,
0.043261319398880005,
-0.2715509235858917,
0.37624016404151917,
0.31751561164855957,
0.185256227850914,
-0.12374008446931839,
-0.07515573501586914,
0.13119950890541077,
-0.43993231654167175,
0.45414406061172485,
0.4396944046020508,
-0.1535423994064331,
-0.1575314700603485,
-0.4581027925014496,
0.38539832830429077,
0.14047425985336304,
-0.03126911446452141,
0.08366405963897705,
0.38216543197631836,
-0.33196839690208435,
0.31695979833602905,
0.42513176798820496,
1.0500094890594482,
-0.31699520349502563,
0.1281517893075943,
0.1112401932477951,
-0.20185405015945435,
0.25834816694259644,
0.059336014091968536,
0.0999070480465889,
-0.1847800761461258,
-0.26736241579055786,
0.04178807884454727,
-0.11405748128890991,
0.16201813519001007,
0.3928108215332031,
0.010739918798208237,
-0.017658965662121773,
-0.029697280377149582,
0.0647059753537178,
0.00040082354098558426,
0.2873995006084442,
0.008406929671764374,
-0.3835810422897339,
0.001963922753930092,
0.32532262802124023,
0.18242566287517548,
-0.14567695558071136,
-0.19278410077095032,
-0.22472110390663147,
-0.29692038893699646,
-0.08862532675266266,
-0.01031889021396637,
-0.04304897040128708,
-0.08983856439590454,
-0.10560253262519836,
-0.11131985485553741,
-0.3450513482093811,
0.0646008551120758,
0.07956995069980621,
0.1714390218257904,
0.007248472422361374,
-0.03761909157037735,
0.3660557270050049,
0.036151621490716934,
0.024104392156004906,
0.08545561879873276,
-0.11951642483472824,
0.26569220423698425,
-0.17135918140411377,
-0.09933096915483475,
-0.06604602187871933,
0.2234938144683838,
-0.31493037939071655,
-0.11217009276151657,
-0.08901643753051758,
0.12340977787971497,
-0.2658437490463257,
-0.17418283224105835,
0.04794006794691086,
-0.04448030889034271,
-0.1188230961561203,
0.26236966252326965,
0.02605002373456955,
0.13879245519638062,
0.1598799228668213,
0.08395838737487793,
-0.15491321682929993,
-0.1166573166847229,
0.08522116392850876,
0.28876715898513794,
-0.038210462778806686,
0.35394659638404846,
-0.07032936066389084,
-0.08365978300571442,
-0.3176150918006897,
-0.10477210581302643,
0.2145347148180008,
-0.4602481424808502,
0.11829102039337158,
0.16250841319561005,
-0.1101698949933052,
-0.10505770891904831,
0.030816353857517242,
0.09832321107387543,
-0.15791159868240356,
0.016264010220766068,
-0.10594429075717926,
-0.18461835384368896,
0.17579132318496704,
-0.13796226680278778,
0.3906477689743042,
-0.23769253492355347,
0.37262073159217834,
-0.030357137322425842,
0.06376926600933075,
-0.5085134506225586,
0.03389872610569,
-0.12207195907831192,
-0.0303250253200531,
0.12452107667922974,
0.011615168303251266,
-0.08630817383527756,
-0.12369397282600403,
0.2585267722606659,
0.007675744593143463,
-0.18457143008708954,
-0.3491886854171753,
0.004647852852940559,
0.07217910885810852,
-0.018911253660917282,
0.05153101682662964,
0.33588165044784546,
0.003812851384282112,
-0.299682080745697,
-0.01547134667634964,
0.20676885545253754,
-0.17470359802246094,
-0.13170437514781952,
0.013294036500155926,
0.06554508209228516,
0.0587603896856308,
0.3411993384361267,
-0.07533829659223557,
-0.2398451566696167,
0.4246271848678589,
0.19891387224197388,
0.016609886661171913,
-0.027316289022564888,
-0.018799517303705215,
0.24093778431415558,
0.0451214425265789,
0.14520135521888733,
0.0033561140298843384,
0.38793888688087463,
-0.08324655890464783,
-0.1365819275379181,
0.4197499752044678,
0.32102400064468384,
-0.03211589902639389,
-0.4590177536010742,
-0.02965853549540043,
0.1755635142326355,
0.39399251341819763,
-0.4474228620529175,
0.07605525851249695,
0.03932438790798187,
-0.19484366476535797,
0.17717310786247253,
0.23706045746803284,
0.2847493886947632,
0.29946082830429077,
-0.3587337136268616,
0.13580664992332458,
0.63254714012146,
0.037036094814538956,
0.07305993139743805,
0.2179635763168335,
-0.06608105450868607,
0.026952479034662247,
0.2367885857820511,
0.2546394169330597,
0.0983777567744255,
0.3150666356086731,
0.13757149875164032,
0.507502019405365,
-0.007882010191679,
0.004754684865474701,
0.2819761335849762,
-0.11520799994468689,
0.11186102032661438,
0.2639424800872803,
0.13225796818733215,
0.4599078595638275,
0.06478696316480637,
0.17435486614704132,
0.011681420728564262,
-0.40347716212272644,
-0.16031090915203094,
0.34932151436805725,
-0.012821555137634277,
0.17560912668704987,
-0.341584712266922,
-0.0860387310385704,
-0.15955010056495667,
-0.009876873344182968,
0.054535698145627975,
-0.4024752378463745,
0.21912236511707306,
-0.07145792245864868,
-0.2343681901693344,
-0.03141398727893829,
-0.20841896533966064,
-0.004409778863191605,
0.43187862634658813,
-0.1650594025850296,
0.12417234480381012,
0.20668429136276245,
-0.09351029992103577,
0.4457888901233673,
0.5432645678520203,
0.3261014521121979,
0.1609247326850891,
0.11621187627315521,
-0.002200365997850895,
-0.0871492475271225,
-0.06709268689155579,
-0.16403113305568695,
0.2031112164258957,
0.10591357946395874,
0.24316012859344482,
0.22607214748859406,
0.24570977687835693,
-0.29817670583724976,
-0.1234615296125412,
0.2246847301721573,
0.1909756362438202,
-0.14457014203071594,
0.07361850142478943,
-0.014062255620956421,
-0.12123535573482513,
-0.28737571835517883,
-0.01791203022003174,
-0.31630927324295044,
-0.1585279405117035,
0.14969268441200256,
-0.1618550568819046,
0.03499492257833481,
-0.09564810246229172,
0.14607900381088257,
-0.11338093876838684,
0.46994084119796753,
0.08719470351934433,
0.09035047143697739,
-0.13814091682434082,
-0.2809673547744751,
-0.5762762427330017,
0.05143476650118828,
-0.2897132635116577,
-0.4095671772956848,
-0.1031666249036789,
0.14319464564323425,
0.13718150556087494,
-0.0937574952840805,
0.2032979130744934,
-0.22542797029018402,
0.05503761023283005,
0.2726827561855316,
-0.3915330469608307,
0.09410244971513748,
0.07129517197608948,
0.005266848020255566,
-0.02948625572025776,
-0.11310645937919617,
0.1006036251783371,
-0.10474712401628494,
0.23319223523139954,
0.07999911904335022,
0.04627140611410141,
-0.20596718788146973,
-0.383716344833374,
0.5541689395904541,
0.020224876701831818,
0.3880666196346283,
-0.3813924193382263,
-0.14876942336559296,
-0.1482428014278412,
-0.19665531814098358,
-0.4162382185459137,
0.12010876089334488,
0.30148810148239136,
0.5041196346282959,
0.04465923458337784,
-0.12063305079936981,
0.18188834190368652,
0.23277287185192108,
0.01218343898653984,
0.018041087314486504,
-0.3240906000137329,
0.15381082892417908,
0.06705038994550705,
-0.037908997386693954,
0.11421170830726624,
0.2354925572872162,
0.04839134216308594,
-0.0564856082201004,
-0.309307724237442,
-0.6136006712913513,
0.45199477672576904,
-0.4394471049308777,
-0.2331169992685318,
-0.1781233251094818,
0.11935830116271973,
-0.10736050456762314,
0.32747891545295715,
-0.3829663097858429,
0.052007220685482025,
0.1987408548593521,
0.16344457864761353,
-0.2140445113182068,
0.5442830920219421,
-0.02670203149318695,
-0.2460511177778244,
0.031194549053907394,
-0.1456122100353241,
-0.2327597439289093,
-0.15547342598438263,
-0.07949164509773254,
-0.25002631545066833
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | Thanks @mariosasko
@dgrnd4 As dataset is there on Hub, and preprocessing is not recommended. I am not sure if there is any other task to do. However, I can't seem to find relevant `.py` files for this dataset in GitHub repo. | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 41 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Thanks @mariosasko
@dgrnd4 As dataset is there on Hub, and preprocessing is not recommended. I am not sure if there is any other task to do. However, I can't seem to find relevant `.py` files for this dataset in GitHub repo. | [
-0.07234163582324982,
-0.032903194427490234,
-0.19228975474834442,
0.013616308569908142,
0.3984454274177551,
0.3349185883998871,
0.18423841893672943,
0.17232801020145416,
-0.005711143836379051,
0.02213815599679947,
-0.027520904317498207,
0.247980535030365,
-0.425009161233902,
0.22979290783405304,
0.2944331169128418,
-0.16269288957118988,
0.1060234010219574,
0.02757454663515091,
0.20889121294021606,
-0.2918524742126465,
-0.315538227558136,
-0.01184321753680706,
0.04097840189933777,
-0.3337422013282776,
-0.052960727363824844,
-0.13180993497371674,
-0.399187833070755,
0.2158166468143463,
-0.26361775398254395,
-0.5025438070297241,
0.17701934278011322,
0.1652577668428421,
0.08603104203939438,
0.4422075152397156,
-0.00010932124132523313,
0.020853951573371887,
0.09338921308517456,
-0.05740725249052048,
0.22038255631923676,
-0.13338156044483185,
-0.04772428423166275,
-0.5454812049865723,
-0.23876501619815826,
-0.2681816518306732,
-0.16561666131019592,
0.05666181445121765,
0.2620128393173218,
0.17651580274105072,
0.2992096543312073,
0.3124449849128723,
0.21357157826423645,
-0.09834389388561249,
0.20662684738636017,
-0.08427111059427261,
0.26388487219810486,
0.20040687918663025,
-0.1357438564300537,
0.40496259927749634,
0.42557311058044434,
0.1203233003616333,
0.2774598002433777,
0.29061323404312134,
0.15008574724197388,
-0.2470981329679489,
0.38532307744026184,
0.041043177247047424,
0.12739714980125427,
-0.4514891803264618,
-0.0344604030251503,
0.1625579297542572,
0.3679214417934418,
-0.07965607196092606,
-0.2942357063293457,
-0.21564388275146484,
0.08248328417539597,
-0.2737966775894165,
-0.13532903790473938,
0.5696921348571777,
0.03978981077671051,
0.06098122149705887,
-0.3933259844779968,
-0.30737006664276123,
-0.494651734828949,
0.30478471517562866,
-0.01697029173374176,
0.21843326091766357,
-0.013420780189335346,
0.019080504775047302,
-0.016063492745161057,
0.23192104697227478,
-0.17719097435474396,
-0.07467138767242432,
0.10042606294155121,
0.36210134625434875,
-0.2364269644021988,
-0.24520497024059296,
-0.009008541703224182,
0.030396927148103714,
0.3136933743953705,
0.10413436591625214,
0.007264501415193081,
-0.16114526987075806,
-0.010158085264265537,
-0.0055886246263980865,
0.13553623855113983,
0.01399850845336914,
-0.24257484078407288,
0.08571179956197739,
0.13578273355960846,
0.0031829429790377617,
-0.10296794772148132,
0.06128224357962608,
-0.20384514331817627,
-0.04268316179513931,
-0.026270266622304916,
-0.33439597487449646,
0.18197090923786163,
-0.03755452111363411,
0.10195716470479965,
-0.08773234486579895,
0.20819354057312012,
-0.035126883536577225,
-0.12960819900035858,
0.39445796608924866,
0.07971569150686264,
-0.13546180725097656,
-0.11132898926734924,
0.3859862685203552,
0.08328767120838165,
0.13330163061618805,
-0.17830052971839905,
0.22247152030467987,
-0.1465165913105011,
-0.15950612723827362,
0.14310093224048615,
-0.31663331389427185,
0.16550640761852264,
-0.11581390351057053,
-0.09982183575630188,
0.1722158044576645,
0.09324715286493301,
-0.05666932836174965,
0.25015419721603394,
0.24869440495967865,
-0.08745020627975464,
-0.1557464450597763,
-0.007497269660234451,
0.1097370982170105,
-0.2794356346130371,
0.03438792750239372,
-0.3866135776042938,
-0.13024422526359558,
-0.5033887028694153,
0.18255330622196198,
-0.2650376558303833,
-0.28728005290031433,
-0.3563668131828308,
0.33631348609924316,
-0.043115101754665375,
0.219638854265213,
0.035866037011146545,
-0.11820045113563538,
-0.16617223620414734,
-0.3821553885936737,
0.05686016380786896,
0.20347464084625244,
-0.2318686991930008,
-0.18449819087982178,
-0.26714619994163513,
0.03920599818229675,
0.10459568351507187,
0.03600982204079628,
0.0170686524361372,
0.3255676031112671,
-0.10008248686790466,
0.06564110517501831,
0.22704929113388062,
-0.44538477063179016,
-0.332809180021286,
0.03196742758154869,
-0.11976664513349533,
0.04466008394956589,
0.11168079823255539,
0.44927582144737244,
0.17156898975372314,
-0.06246307119727135,
-0.18328112363815308,
0.4351857900619507,
-0.1972409188747406,
-0.2214484065771103,
-0.027813028544187546,
-0.20492447912693024,
-0.06665258854627609,
0.5115936994552612,
0.41136330366134644,
-0.23096132278442383,
0.307273805141449,
-0.2655254304409027,
0.16277959942817688,
-0.24924474954605103,
-0.02766210399568081,
0.1586180031299591,
0.6056903004646301,
0.43146878480911255,
0.04253021627664566,
-0.19422179460525513,
0.053267259150743484,
0.21323662996292114,
0.1487855762243271,
0.27385643124580383,
-0.14854222536087036,
-0.1842234581708908,
-0.13041150569915771,
-0.12235666066408157,
-0.4552132785320282,
-0.23532068729400635,
0.11877270042896271,
-0.27806293964385986,
0.21772322058677673,
0.08103564381599426,
-0.05487189441919327,
0.20824028551578522,
-0.4542115330696106,
0.3214825689792633,
-0.09907728433609009,
0.4480803608894348,
-0.0526345893740654,
-0.1357051581144333,
-0.06784334778785706,
0.2564469873905182,
-0.30703094601631165,
-0.25797632336616516,
0.15714600682258606,
0.1626279652118683,
-0.09889252483844757,
-0.19573767483234406,
0.5797709822654724,
0.3298411965370178,
0.202433243393898,
-0.6039533019065857,
0.2004314363002777,
-0.1923590451478958,
0.018832124769687653,
-0.09320028871297836,
-0.32071828842163086,
0.2163061797618866,
0.10977223515510559,
0.05680307745933533,
0.01863975077867508,
0.07633694261312485,
0.08608509600162506,
-0.05763570964336395,
-0.017887895926833153,
0.23865294456481934,
0.13138823211193085,
-0.08743312954902649,
0.09874191880226135,
-0.2549395263195038,
-0.3156006634235382,
0.15979769825935364,
0.24418380856513977,
-0.17953531444072723,
0.07256850600242615,
0.3121037781238556,
-0.22191354632377625,
0.18615904450416565,
-0.036287665367126465,
0.21690602600574493,
0.09604614973068237,
0.31480419635772705,
-0.30459699034690857,
0.04928973317146301,
-0.028999339789152145,
0.1205359697341919,
-0.020094074308872223,
0.25537407398223877,
0.0762595534324646,
-0.20247837901115417,
0.35233452916145325,
0.06174643337726593,
-0.28169140219688416,
-0.09985758364200592,
-0.012283232063055038,
-0.044064708054065704,
-0.06725238263607025,
-0.08274025470018387,
0.191959410905838,
-0.3073393404483795,
-0.12204231321811676,
0.33352598547935486,
-0.26299214363098145,
-0.07426575571298599,
0.011049114167690277,
-0.270620733499527,
0.18290245532989502,
0.16743217408657074,
-0.2905693054199219,
0.4854925274848938,
0.009163321927189827,
-0.290742427110672,
0.2941964566707611,
-0.08390488475561142,
0.042257796972990036,
0.17008741199970245,
0.23828713595867157,
-0.22467166185379028,
0.5673710107803345,
-0.19122037291526794,
0.28876417875289917,
-0.3445550799369812,
-0.8257458806037903,
-0.09835749864578247,
-0.3708800673484802,
0.2633857727050781,
0.22845393419265747,
0.15080736577510834,
-0.006999097764492035,
-0.1532365083694458,
0.1059931069612503,
-0.13319674134254456,
-0.1246459111571312,
-0.02335268072783947,
-0.20630407333374023,
-0.04765265807509422,
0.037613872438669205,
-0.2378547489643097,
-0.5667046308517456,
-0.1455819308757782,
0.3786710500717163,
0.38400667905807495,
0.07849480956792831,
0.2788960039615631,
0.2158755660057068,
-0.10063204914331436,
-0.18649965524673462,
-0.03184331953525543,
0.06406428664922714,
-0.29300621151924133,
0.4026569426059723,
-0.09704510122537613,
-0.36953529715538025,
0.21103927493095398,
-0.27151623368263245,
0.26813989877700806,
-0.060884952545166016,
-0.6182946562767029,
-0.21622170507907867,
-0.17393799126148224,
0.35268351435661316,
0.17312277853488922,
0.14450763165950775,
0.11991813778877258,
-0.12729443609714508,
-0.06124461442232132,
-0.20446550846099854,
-0.08637414872646332,
0.17641477286815643,
0.2322092056274414,
0.2576999068260193,
-0.10648118704557419,
0.2958868443965912,
0.03758714720606804,
0.7371537685394287,
-0.0248884204775095,
-0.11140209436416626,
0.31311023235321045,
-0.12995575368404388,
0.2938746213912964,
0.013210639357566833,
-0.3562411367893219,
0.46766138076782227,
0.016036465764045715,
0.05958505719900131,
0.20696869492530823,
0.31641465425491333,
-0.27497944235801697,
0.0934266597032547,
-0.0906759649515152,
-0.4100305140018463,
0.08631761372089386,
0.20280522108078003,
0.12324709445238113,
0.16599899530410767,
-0.1876106858253479,
-0.32177528738975525,
-0.3998355269432068,
-0.28114402294158936,
0.052833717316389084,
0.4984707832336426,
-0.026517711579799652,
-0.03695852309465408,
-0.19182738661766052,
-0.17157502472400665,
-0.35338476300239563,
0.15042833983898163,
0.0035763138439506292,
-0.15751726925373077,
-0.20596137642860413,
0.17137503623962402,
0.05267573893070221,
-0.044445719569921494,
0.6536839604377747,
-0.383291095495224,
-0.15269829332828522,
0.2110455483198166,
-0.09055015444755554,
-0.08538063615560532,
-0.062004320323467255,
-0.13585372269153595,
-0.0988447293639183,
0.14755429327487946,
0.17703646421432495,
-0.1137070432305336,
0.1355915069580078,
0.4424806535243988,
0.002114443574100733,
-0.2834987938404083,
-0.04511205106973648,
-0.09783816337585449,
-0.42506691813468933,
-0.1501794308423996,
-0.05890902131795883,
-0.07103436440229416,
0.0026198909617960453,
0.13818863034248352,
-0.17501375079154968,
-0.08832021057605743,
0.014321792870759964,
0.18894994258880615,
-0.10058937966823578,
-0.04747254028916359,
0.3330515921115875,
0.2238590121269226,
-0.08788618445396423,
-0.12982673943042755,
0.43187031149864197,
0.5336540937423706,
-0.23975250124931335,
-0.4067293703556061,
-0.07805473357439041,
-0.30141788721084595,
0.3933635950088501,
0.15652576088905334,
0.17038215696811676,
0.03762981295585632,
-0.051437899470329285,
0.13612599670886993,
-0.39589396119117737,
0.3433770537376404,
0.46988552808761597,
0.06490243971347809,
-0.3833034932613373,
-0.5907806754112244,
0.44885605573654175,
0.15597009658813477,
0.08882524073123932,
0.15202121436595917,
0.43992936611175537,
-0.2016151249408722,
0.2824106812477112,
0.24100834131240845,
0.9883924126625061,
-0.3494107723236084,
0.061773184686899185,
0.14099976420402527,
-0.20251618325710297,
0.29787835478782654,
-0.05931458994746208,
0.07054043561220169,
-0.08047889918088913,
-0.1917315125465393,
0.012347357347607613,
-0.21726347506046295,
0.220533549785614,
0.24151451885700226,
-0.01426011323928833,
0.10453788191080093,
-0.08181387931108475,
0.17481184005737305,
-0.0636664479970932,
0.2632375657558441,
0.054177820682525635,
-0.2015312761068344,
-0.07449450343847275,
0.25256669521331787,
0.2176513969898224,
0.02287207543849945,
-0.1935795545578003,
-0.2899633049964905,
-0.39270415902137756,
0.050445884466171265,
-0.258197158575058,
-0.139471635222435,
0.04948112368583679,
0.06241892650723457,
-0.0894366055727005,
-0.4457107186317444,
0.21900787949562073,
0.13407450914382935,
0.31679895520210266,
-0.039412062615156174,
-0.2331126630306244,
0.3264993131160736,
-0.020179055631160736,
-0.2385113537311554,
0.14823304116725922,
-0.04511099308729172,
0.2427242398262024,
-0.1299685686826706,
-0.12350650131702423,
0.07995902746915817,
0.1552867591381073,
-0.42628270387649536,
-0.14901144802570343,
-0.18018190562725067,
0.03190075233578682,
-0.14503084123134613,
-0.04076242074370384,
0.08667923510074615,
-0.05043811351060867,
-0.13356958329677582,
0.1624774932861328,
0.28447896242141724,
0.1036326140165329,
0.13729062676429749,
-0.013890493661165237,
-0.1087227538228035,
-0.1340004950761795,
-0.09379766136407852,
0.3278995454311371,
-0.10139969736337662,
0.34585505723953247,
0.05931851640343666,
0.03822904825210571,
-0.18199679255485535,
0.011264875531196594,
0.29264557361602783,
-0.3798578679561615,
0.005652622785419226,
0.13937383890151978,
0.11529289186000824,
-0.116084985435009,
-0.0031374432146549225,
0.1899614781141281,
-0.2547783851623535,
-0.08455388247966766,
-0.20043545961380005,
-0.1638004034757614,
0.1335276961326599,
-0.14814788103103638,
0.29718950390815735,
-0.37537145614624023,
0.1667288988828659,
0.13675399124622345,
0.07901762425899506,
-0.3543581962585449,
0.1768474578857422,
-0.24691905081272125,
-0.08648843318223953,
0.07260526716709137,
0.11696412414312363,
0.011044696904718876,
-0.2053479701280594,
0.09735076874494553,
-0.31180238723754883,
-0.19636304676532745,
-0.20457786321640015,
0.08585569262504578,
0.12326931953430176,
-0.04728980362415314,
0.13669516146183014,
0.30560529232025146,
-0.06618578732013702,
-0.23143494129180908,
0.05047539994120598,
0.08954310417175293,
-0.15844759345054626,
-0.04465401917695999,
0.03915506973862648,
0.20517851412296295,
-0.1630585789680481,
0.3084803819656372,
0.09709608554840088,
-0.12064403295516968,
0.42210787534713745,
0.3053570091724396,
0.06364648789167404,
0.02221420593559742,
-0.054533034563064575,
0.04329659044742584,
0.22756212949752808,
-0.11428692936897278,
-0.07262485474348068,
0.4797140955924988,
-0.12969370186328888,
0.10764633119106293,
0.3921203017234802,
0.1847294270992279,
-0.022680573165416718,
-0.4825288653373718,
0.23126886785030365,
0.05953925848007202,
0.24218155443668365,
-0.4422230124473572,
-0.053172312676906586,
-0.0021866541355848312,
-0.15843628346920013,
0.09619469940662384,
0.2604839503765106,
0.34024080634117126,
0.4052107036113739,
-0.3693726062774658,
0.20342519879341125,
0.7777654528617859,
0.1931816190481186,
0.2536124289035797,
0.3488738536834717,
0.11999131739139557,
0.025374162942171097,
0.15726806223392487,
0.40909451246261597,
0.07800908386707306,
0.24558478593826294,
-0.0006034597754478455,
0.4616492986679077,
-0.01643246039748192,
-0.12034620344638824,
0.33883702754974365,
-0.04856373369693756,
0.05565184727311134,
0.2038545459508896,
0.11936382204294205,
0.19203731417655945,
-0.01991906762123108,
0.3669806122779846,
-0.008533366955816746,
-0.4490792453289032,
-0.14887383580207825,
0.38495177030563354,
0.13538162410259247,
0.2521977722644806,
-0.15353453159332275,
-0.1579330712556839,
-0.08508426696062088,
-0.005168303847312927,
0.111651211977005,
-0.6125273704528809,
0.1104101836681366,
-0.0755217969417572,
-0.2633069157600403,
-0.10846006870269775,
-0.0045547522604465485,
0.10376740992069244,
0.37611523270606995,
-0.09000325202941895,
0.08338665962219238,
0.1502894163131714,
-0.19799914956092834,
0.38242629170417786,
0.487883597612381,
0.45726895332336426,
-0.0025357939302921295,
0.1455400437116623,
0.22918078303337097,
0.02187623828649521,
-0.10730627924203873,
0.08306887745857239,
0.118921659886837,
-0.052272483706474304,
0.26365941762924194,
0.03202928602695465,
0.18782074749469757,
-0.1608589142560959,
0.0658733993768692,
0.00571831688284874,
0.047430284321308136,
-0.14502476155757904,
0.12158376723527908,
-0.14530983567237854,
-0.1742456555366516,
-0.37476152181625366,
0.13343201577663422,
-0.34681326150894165,
-0.0800478607416153,
0.29107725620269775,
0.0004755833651870489,
-0.09839928150177002,
-0.06183881312608719,
0.08299240469932556,
-0.14334912598133087,
0.39409103989601135,
0.35059669613838196,
0.3201037347316742,
-0.22895720601081848,
-0.3406449854373932,
-0.5386961698532104,
-0.09990476816892624,
-0.4038151800632477,
-0.5451471209526062,
0.04405299574136734,
0.09413499385118484,
0.15413637459278107,
-0.10004596412181854,
0.31781303882598877,
-0.22551938891410828,
0.09396474063396454,
0.10150407999753952,
-0.3376524746417999,
-0.0672653466463089,
0.13231271505355835,
0.1906178742647171,
-0.0726521760225296,
0.09018901735544205,
0.1590079665184021,
-0.1693495362997055,
0.053052835166454315,
0.012059392407536507,
0.16590680181980133,
-0.06867571175098419,
-0.48271843791007996,
0.3819049000740051,
-0.17663288116455078,
0.33349770307540894,
-0.12274909019470215,
-0.11523393541574478,
-0.15391162037849426,
-0.22259622812271118,
-0.26569950580596924,
0.0587296336889267,
0.021251460537314415,
0.3985315263271332,
-0.09316621720790863,
-0.2114892154932022,
0.15647077560424805,
0.15202493965625763,
0.022510714828968048,
-0.012608727440237999,
-0.2533376216888428,
0.08572777360677719,
-0.001321684569120407,
-0.014029139652848244,
0.32729876041412354,
0.1274251639842987,
-0.031529031693935394,
-0.11837708950042725,
-0.09733159095048904,
-0.5547969937324524,
0.39085444808006287,
-0.521159827709198,
-0.1336439549922943,
-0.22072358429431915,
0.0054216086864471436,
-0.1603071689605713,
0.389358252286911,
-0.528468906879425,
0.162069171667099,
0.3275153338909149,
0.1917540431022644,
-0.33664098381996155,
0.5412383675575256,
0.1931871771812439,
-0.14667892456054688,
0.1289573758840561,
-0.23820897936820984,
-0.4875398576259613,
-0.06654932349920273,
-0.07101725041866302,
-0.20978586375713348
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | @khushmeeet @mariosasko The point is that the images must be processed and must have the same size in order to can be used for things for example "Training". | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 28 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
@khushmeeet @mariosasko The point is that the images must be processed and must have the same size in order to can be used for things for example "Training". | [
-0.2149370163679123,
-0.10248972475528717,
-0.27574843168258667,
0.14668580889701843,
0.31519389152526855,
0.1649947166442871,
0.281547874212265,
0.14766480028629303,
-0.06717328727245331,
0.16918781399726868,
-0.1325804889202118,
0.143001988530159,
-0.27342158555984497,
0.21938049793243408,
0.032571904361248016,
-0.23922035098075867,
-0.056361936032772064,
0.10353948175907135,
0.029268618673086166,
-0.2734278738498688,
-0.2741508483886719,
-0.06937990337610245,
0.12319992482662201,
-0.4364020824432373,
-0.16376087069511414,
-0.03300791233778,
-0.3858797252178192,
0.12905099987983704,
-0.2677081525325775,
-0.3065384328365326,
-0.054323840886354446,
0.033919379115104675,
0.019748907536268234,
0.44109436869621277,
-0.00009979695460060611,
-0.038591839373111725,
0.10711836814880371,
0.03853807598352432,
0.21811357140541077,
-0.08163566887378693,
-0.06370945274829865,
-0.44027966260910034,
-0.4013335406780243,
-0.332034707069397,
-0.1426945924758911,
-0.005956634879112244,
0.24679960310459137,
0.08383741974830627,
0.38708215951919556,
0.09163499623537064,
0.3068966269493103,
-0.10010604560375214,
0.08247311413288116,
-0.16847342252731323,
0.07984181493520737,
0.2266913801431656,
-0.054815515875816345,
0.40256327390670776,
0.26002976298332214,
0.21358291804790497,
0.13556401431560516,
0.2967122793197632,
0.14270778000354767,
-0.11282201111316681,
0.23492738604545593,
0.009859692305326462,
0.15053918957710266,
-0.3189617991447449,
0.04444550722837448,
0.1999807357788086,
0.2746805250644684,
0.1003168523311615,
-0.2089167833328247,
-0.2796357572078705,
0.018355220556259155,
-0.2829710841178894,
-0.11868121474981308,
0.4939550459384918,
0.10993020236492157,
-0.032181400805711746,
-0.5083215236663818,
-0.06537561863660812,
-0.373456746339798,
0.19566810131072998,
-0.19232575595378876,
0.006570376455783844,
-0.035504814237356186,
-0.012805871665477753,
-0.023483779281377792,
0.19755885004997253,
-0.1890501230955124,
-0.05777072161436081,
0.15638910233974457,
0.15175512433052063,
-0.21699000895023346,
-0.25174587965011597,
-0.11350379139184952,
0.07188362628221512,
0.33016830682754517,
0.014650225639343262,
0.12944120168685913,
-0.193627268075943,
0.03184957057237625,
0.06906333565711975,
0.09178401529788971,
0.04851329326629639,
-0.2889555096626282,
-0.04854968190193176,
0.03763200342655182,
0.012001125141978264,
-0.3205336928367615,
0.09269756078720093,
-0.039135418832302094,
-0.1321239471435547,
-0.13994529843330383,
-0.3897736370563507,
0.03464607149362564,
0.007084216922521591,
-0.0013277586549520493,
0.012711173854768276,
0.13630536198616028,
-0.04327240586280823,
-0.2571074366569519,
0.3658186197280884,
0.12620386481285095,
0.015100838616490364,
-0.0025082044303417206,
0.21318070590496063,
0.0743674635887146,
-0.11429239064455032,
-0.26175656914711,
0.021310437470674515,
-0.20920968055725098,
-0.05715201050043106,
0.030776496976614,
-0.14294447004795074,
0.14753079414367676,
-0.04810842499136925,
-0.1441868543624878,
0.2808671295642853,
0.11914719641208649,
-0.242925226688385,
0.27008214592933655,
0.052608031779527664,
0.02040858194231987,
-0.20966114103794098,
-0.03850165382027626,
0.16465184092521667,
-0.30517107248306274,
0.012947436422109604,
-0.2639507055282593,
0.05377176031470299,
-0.3933663070201874,
0.29302138090133667,
-0.052866533398628235,
-0.1934025138616562,
-0.17356133460998535,
0.4161478579044342,
-0.08042139559984207,
0.1975409984588623,
0.0020173341035842896,
-0.019147880375385284,
-0.4086443781852722,
-0.2652469277381897,
-0.05714409798383713,
0.09306299686431885,
-0.32754459977149963,
-0.08663152158260345,
-0.20736812055110931,
0.10192336142063141,
0.05040067434310913,
0.3036305010318756,
-0.016071291640400887,
0.23377177119255066,
-0.14753404259681702,
0.11366865038871765,
0.15376166999340057,
-0.18419158458709717,
-0.3859623074531555,
0.14571940898895264,
-0.20580457150936127,
-0.007510678842663765,
0.09902036190032959,
0.37010207772254944,
0.27405011653900146,
-0.045988038182258606,
-0.10048156976699829,
0.39577412605285645,
-0.24234288930892944,
-0.16339029371738434,
-0.15329504013061523,
-0.31996801495552063,
-0.0893402099609375,
0.23501868546009064,
0.19403836131095886,
-0.23121410608291626,
0.32355746626853943,
-0.18120959401130676,
0.1045432761311531,
-0.36102089285850525,
-0.00782008282840252,
0.10775601863861084,
0.4039345383644104,
0.275312215089798,
-0.08268552273511887,
-0.1134723350405693,
0.02639222890138626,
0.11800453811883926,
0.1088055670261383,
0.20589019358158112,
0.28575730323791504,
-0.2380593866109848,
-0.15633389353752136,
-0.25406894087791443,
-0.14996442198753357,
-0.16128762066364288,
0.23798635601997375,
-0.13271459937095642,
0.15372999012470245,
0.0232466422021389,
0.03760388866066933,
0.2840996980667114,
-0.43452584743499756,
0.1490921676158905,
0.01389184221625328,
0.4104941785335541,
-0.19129164516925812,
-0.15737761557102203,
-0.0239713191986084,
-0.020820416510105133,
-0.311614990234375,
-0.10303318500518799,
0.12729699909687042,
0.14787045121192932,
-0.1848437786102295,
-0.13386957347393036,
0.3595181405544281,
0.2875451147556305,
0.2364332526922226,
-0.3898656368255615,
0.18043392896652222,
-0.277494341135025,
0.020344629883766174,
-0.005909774452447891,
-0.326166033744812,
0.17348116636276245,
0.18506252765655518,
0.0015963315963745117,
0.09143051505088806,
-0.022270185872912407,
-0.04170185327529907,
-0.1408764272928238,
0.10132861882448196,
0.09398980438709259,
0.27438390254974365,
-0.07662563025951385,
-0.006324121728539467,
-0.04962482303380966,
-0.3024798631668091,
0.0880662128329277,
0.2850123941898346,
-0.006265977397561073,
0.02937978133559227,
0.22413009405136108,
-0.15547317266464233,
0.1858517825603485,
0.0007205810397863388,
0.22648833692073822,
0.22623132169246674,
0.4749312400817871,
-0.06921401619911194,
0.05710271745920181,
-0.05056082829833031,
0.01846369355916977,
0.022011175751686096,
0.04141613468527794,
0.14891083538532257,
-0.08902949839830399,
0.38863682746887207,
0.13710139691829681,
-0.33899518847465515,
-0.018199769780039787,
0.026348697021603584,
-0.10018245130777359,
-0.00512000173330307,
-0.11228952556848526,
0.18805289268493652,
-0.30670976638793945,
-0.22061048448085785,
0.460659921169281,
-0.19279079139232635,
0.05862332135438919,
0.0742298811674118,
-0.04858451709151268,
0.0932641327381134,
0.11057524383068085,
-0.4172619581222534,
0.6449406147003174,
-0.04054219275712967,
-0.12920165061950684,
0.23292845487594604,
0.10057248175144196,
-0.09295108169317245,
0.29297512769699097,
0.26807987689971924,
-0.22652564942836761,
0.5848754048347473,
-0.09147946536540985,
0.23733548820018768,
-0.3073744475841522,
-0.8572617173194885,
-0.02416045218706131,
-0.22738023102283478,
0.20330551266670227,
0.15483513474464417,
0.13328319787979126,
-0.1357543170452118,
-0.2484491914510727,
0.20958149433135986,
-0.24426397681236267,
-0.2759615480899811,
-0.20554523169994354,
-0.07128652930259705,
0.007435137871652842,
-0.09904177486896515,
-0.2315044105052948,
-0.23779349029064178,
-0.23418261110782623,
0.34350812435150146,
0.25287410616874695,
0.03239397332072258,
0.25053083896636963,
0.36559534072875977,
-0.09692700952291489,
-0.18737809360027313,
0.07242406904697418,
-0.17701217532157898,
-0.25632432103157043,
0.25997698307037354,
-0.1821860373020172,
-0.3673096001148224,
-0.04808569699525833,
-0.22689084708690643,
0.38255125284194946,
0.04843386262655258,
-0.619447648525238,
-0.33245858550071716,
-0.20442546904087067,
0.13418231904506683,
0.10275968909263611,
0.055296141654253006,
0.09901171922683716,
-0.20981816947460175,
-0.2362174093723297,
-0.18349435925483704,
-0.0384054109454155,
0.23035481572151184,
0.18596938252449036,
0.2786736786365509,
-0.1265520453453064,
0.21859696507453918,
0.16802462935447693,
0.5749303698539734,
-0.02944878488779068,
-0.25074928998947144,
0.40676167607307434,
-0.0693124532699585,
0.2333584874868393,
-0.08827761560678482,
-0.2734431326389313,
0.5504515171051025,
0.053847961127758026,
-0.015324343927204609,
0.22815890610218048,
0.11830241233110428,
-0.372385174036026,
0.17383599281311035,
-0.06600265204906464,
-0.35091328620910645,
0.057195033878088,
0.25592610239982605,
0.28634387254714966,
0.15727469325065613,
-0.1345396637916565,
-0.3141644597053528,
-0.2885584235191345,
-0.16620588302612305,
-0.04163471609354019,
0.22339293360710144,
-0.08362113684415817,
-0.16017280519008636,
-0.2511788010597229,
0.06984960287809372,
-0.28321075439453125,
0.31943726539611816,
0.04857481271028519,
-0.18628616631031036,
-0.2551143765449524,
0.032118961215019226,
0.011578410863876343,
-0.12355557829141617,
0.7313815355300903,
-0.25494250655174255,
-0.24880589544773102,
0.09332801401615143,
-0.05297800526022911,
-0.16954387724399567,
0.13320252299308777,
-0.04624570161104202,
-0.3328488767147064,
0.2481483519077301,
0.19008231163024902,
-0.14320315420627594,
0.1695152223110199,
0.4184991121292114,
0.031171172857284546,
-0.18887464702129364,
-0.045332398265600204,
-0.11140210926532745,
-0.20320549607276917,
-0.15962523221969604,
0.02604636549949646,
-0.19727970659732819,
-0.011929310858249664,
0.12916915118694305,
-0.18606527149677277,
-0.24196173250675201,
-0.09678297489881516,
0.2067226618528366,
0.013342736288905144,
-0.014489680528640747,
0.25721338391304016,
0.3061380982398987,
-0.0288749560713768,
0.18067270517349243,
0.32789862155914307,
0.5133344531059265,
-0.3037135899066925,
-0.2211170494556427,
0.07461676001548767,
-0.1407143920660019,
0.2698516845703125,
0.31029269099235535,
0.31633514165878296,
-0.13273558020591736,
-0.0358220674097538,
0.13653548061847687,
-0.4044952094554901,
0.4016844630241394,
0.44505423307418823,
-0.10050880908966064,
-0.21026648581027985,
-0.394322007894516,
0.39719414710998535,
0.2986019551753998,
0.0920402854681015,
0.1190209910273552,
0.41417932510375977,
-0.2007034868001938,
0.13529764115810394,
0.3654641807079315,
1.006951928138733,
-0.2985078692436218,
0.2015901356935501,
0.09677033126354218,
-0.2097712755203247,
0.24330195784568787,
0.06169304996728897,
0.08446776121854782,
-0.02802346646785736,
-0.32082030177116394,
0.06208591163158417,
-0.15396162867546082,
0.14095251262187958,
0.3336043357849121,
0.03391069546341896,
0.031163671985268593,
0.09976384043693542,
0.11173853278160095,
-0.165544793009758,
0.2910611629486084,
-0.07673278450965881,
-0.15461641550064087,
0.031411029398441315,
0.33552679419517517,
0.23404595255851746,
-0.07514305412769318,
-0.11638163030147552,
-0.16960136592388153,
-0.3198043704032898,
-0.05854260176420212,
-0.038616109639406204,
-0.13458693027496338,
-0.1309119164943695,
0.04135855287313461,
-0.1082305759191513,
-0.41266918182373047,
0.1737208515405655,
0.061567068099975586,
0.11807405948638916,
-0.08183667063713074,
-0.08689136803150177,
0.3301057815551758,
0.037705060094594955,
-0.08641859889030457,
0.06686824560165405,
-0.2686895728111267,
0.20874294638633728,
-0.10781394690275192,
0.041530124843120575,
0.08427943289279938,
0.2862241864204407,
-0.2807643413543701,
-0.22565492987632751,
-0.05004104971885681,
0.08773018419742584,
-0.24396629631519318,
-0.06424516439437866,
0.12323363870382309,
-0.051964327692985535,
-0.01736939325928688,
0.23708461225032806,
-0.016718141734600067,
0.23161403834819794,
0.14265239238739014,
0.16408030688762665,
-0.12649482488632202,
-0.10394823551177979,
0.06431201845407486,
0.3748185634613037,
-0.09403352439403534,
0.25864773988723755,
-0.23776133358478546,
0.03289184719324112,
-0.2334100902080536,
0.013786561787128448,
0.25285112857818604,
-0.3916069269180298,
0.031078729778528214,
0.02320212870836258,
0.0046672523021698,
-0.06623748689889908,
0.03841482102870941,
0.31306105852127075,
-0.12230270355939865,
0.023433510214090347,
0.012551121413707733,
-0.21332669258117676,
0.22708961367607117,
-0.14288373291492462,
0.5569247603416443,
-0.33923444151878357,
0.2697931230068207,
-0.04134484380483627,
0.1415855586528778,
-0.462833970785141,
0.2367764711380005,
-0.07027878612279892,
-0.0378294512629509,
0.07192350178956985,
-0.022995904088020325,
-0.09457318484783173,
-0.15697690844535828,
0.19059576094150543,
-0.019121486693620682,
-0.22473599016666412,
-0.3241860568523407,
0.018481940031051636,
0.07067759335041046,
0.047032155096530914,
0.10009145736694336,
0.2905961871147156,
-0.03590020537376404,
-0.12896202504634857,
0.047516465187072754,
0.08539687097072601,
-0.23086169362068176,
-0.11707936227321625,
-0.1477687805891037,
0.05705318599939346,
-0.08762941509485245,
0.301358163356781,
0.06160921975970268,
-0.10240955650806427,
0.3940374255180359,
0.2944866716861725,
0.03544912114739418,
0.08355596661567688,
-0.006384260952472687,
0.0026648975908756256,
0.1275256723165512,
0.024040624499320984,
-0.16142165660858154,
0.29378849267959595,
0.035568028688430786,
-0.08361343294382095,
0.4661097824573517,
0.2484469711780548,
0.039211615920066833,
-0.4469510316848755,
0.05045231431722641,
0.15728676319122314,
0.3972543478012085,
-0.42873746156692505,
0.08920618146657944,
-0.0011773556470870972,
-0.12394293397665024,
0.13584186136722565,
0.21555854380130768,
0.333993524312973,
0.39596834778785706,
-0.43721193075180054,
0.11693664640188217,
0.5812309980392456,
0.10404568910598755,
0.1933630257844925,
0.3086278736591339,
0.11036078631877899,
-0.020857539027929306,
0.24355551600456238,
0.301392525434494,
0.1946938931941986,
0.18741938471794128,
-0.04359468072652817,
0.5200604796409607,
-0.17918160557746887,
0.03471492975950241,
0.40060219168663025,
0.06254392862319946,
0.06946501135826111,
0.2934156358242035,
0.10234469175338745,
0.36288994550704956,
-0.029465623199939728,
0.1029609814286232,
-0.00006921123713254929,
-0.5446513891220093,
-0.20456166565418243,
0.3225972056388855,
0.060320645570755005,
0.20374570786952972,
-0.270969033241272,
-0.20589381456375122,
-0.15699268877506256,
0.06713280081748962,
0.0634605810046196,
-0.45676547288894653,
0.2839856445789337,
0.005810156464576721,
-0.25868719816207886,
-0.15077224373817444,
-0.1676805317401886,
0.2326856553554535,
0.34248462319374084,
-0.16253043711185455,
0.16830940544605255,
0.18726356327533722,
-0.27226927876472473,
0.44787654280662537,
0.6340876817703247,
0.3818182349205017,
-0.0029626265168190002,
0.21698927879333496,
0.05635043978691101,
-0.014231141656637192,
-0.06056783348321915,
-0.14126992225646973,
-0.014498163014650345,
0.1257985234260559,
0.010757289826869965,
0.16924099624156952,
0.25981786847114563,
-0.29435282945632935,
0.015947138890624046,
-0.0033547095954418182,
0.025462811812758446,
-0.34825295209884644,
-0.009955376386642456,
-0.08448618650436401,
0.07300203293561935,
-0.3092053234577179,
0.013984978199005127,
-0.40278902649879456,
0.017414338886737823,
0.1277577430009842,
-0.13855966925621033,
0.03980758413672447,
0.0014197900891304016,
0.12704850733280182,
-0.13616377115249634,
0.30257102847099304,
0.24317866563796997,
0.16967783868312836,
-0.16354326903820038,
-0.32939577102661133,
-0.5814248919487,
0.017279326915740967,
-0.37711843848228455,
-0.28861328959465027,
-0.14395318925380707,
0.3500375747680664,
0.08163183182477951,
-0.08455808460712433,
0.35701829195022583,
-0.14971180260181427,
-0.00029677338898181915,
0.2219068855047226,
-0.3364887833595276,
0.040163662284612656,
0.18824902176856995,
0.019946256652474403,
0.02085866406559944,
-0.06322246044874191,
0.1995270997285843,
-0.11231046915054321,
0.1413699984550476,
0.06183142215013504,
0.1762230098247528,
-0.15540780127048492,
-0.31318360567092896,
0.35979583859443665,
-0.04421909153461456,
0.33680933713912964,
-0.18631598353385925,
-0.1948082149028778,
-0.1672278642654419,
-0.15019068121910095,
-0.4077419340610504,
0.01645813137292862,
0.25697654485702515,
0.4567725956439972,
-0.17213131487369537,
-0.12945616245269775,
0.2593313157558441,
0.14855115115642548,
0.1224319189786911,
-0.02650647610425949,
-0.18695496022701263,
-0.0016036136075854301,
0.055392853915691376,
-0.05030772089958191,
0.16246236860752106,
0.33872556686401367,
0.04208347573876381,
-0.17769256234169006,
-0.17109334468841553,
-0.5678600072860718,
0.39414089918136597,
-0.42079639434814453,
-0.06846807897090912,
-0.2923460602760315,
-0.00511111319065094,
-0.05692378431558609,
0.38832658529281616,
-0.4083784520626068,
0.0030710920691490173,
0.3494686484336853,
0.08772064745426178,
-0.13342121243476868,
0.56069016456604,
0.2561182975769043,
-0.20021595060825348,
0.027991417795419693,
-0.1885162591934204,
-0.4249022603034973,
-0.2533331513404846,
0.04618416354060173,
-0.23523029685020447
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | @dgrnd4 Yes, but this can be done after loading (`map` to resize images and `train_test_split` to create extra splits)
@khushmeeet The linked version is implemented as a no-code dataset and is generated directly from the ZIP archive, but our "GitHub" datasets (these are datasets without a user/org namespace on the Hub) need a generation script, and you can find one [here](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/image_classification/stanford_dogs.py). `datasets` started as a fork of TFDS, so we share similar script structure, which makes it trivial to adapt it. | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 81 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
@dgrnd4 Yes, but this can be done after loading (`map` to resize images and `train_test_split` to create extra splits)
@khushmeeet The linked version is implemented as a no-code dataset and is generated directly from the ZIP archive, but our "GitHub" datasets (these are datasets without a user/org namespace on the Hub) need a generation script, and you can find one [here](https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/image_classification/stanford_dogs.py). `datasets` started as a fork of TFDS, so we share similar script structure, which makes it trivial to adapt it. | [
-0.28047019243240356,
-0.03134824335575104,
-0.23792597651481628,
-0.0007146522402763367,
0.3346448540687561,
0.20852002501487732,
0.3596326410770416,
0.26991406083106995,
0.026867929846048355,
0.16869819164276123,
-0.04397056996822357,
0.23781660199165344,
-0.3617058992385864,
0.16934165358543396,
0.14935897290706635,
-0.1495930403470993,
-0.07600695639848709,
0.06798192858695984,
-0.04606763273477554,
-0.30037200450897217,
-0.2789865732192993,
-0.07713860273361206,
0.05384363234043121,
-0.3847699761390686,
-0.08392855525016785,
-0.024695293977856636,
-0.261040061712265,
0.10482192784547806,
-0.11191517859697342,
-0.20510973036289215,
-0.0006040316075086594,
0.04819866269826889,
-0.05181913822889328,
0.5284253358840942,
-0.00009846592729445547,
0.05538126826286316,
0.08083222061395645,
0.02649768628180027,
0.12145356833934784,
-0.08124950528144836,
-0.03517359122633934,
-0.3660721480846405,
-0.3241044878959656,
-0.3924468457698822,
-0.2020525336265564,
0.03229496628046036,
0.33163002133369446,
0.07812203466892242,
0.40299534797668457,
0.2810385823249817,
0.32584279775619507,
0.0745808407664299,
0.054334063082933426,
-0.048231761902570724,
0.1825038492679596,
0.1724313497543335,
-0.20521734654903412,
0.2459474503993988,
0.1492893397808075,
0.02672119252383709,
0.0034958943724632263,
0.32498908042907715,
0.2036794126033783,
-0.11534339189529419,
0.3585793972015381,
0.15644396841526031,
0.10701382160186768,
-0.36175796389579773,
-0.02405637502670288,
0.34842032194137573,
0.2097889482975006,
-0.017856955528259277,
-0.30371859669685364,
-0.335254430770874,
0.027869433164596558,
-0.3838619887828827,
-0.07189077883958817,
0.34907934069633484,
-0.028734318912029266,
0.05121708661317825,
-0.42514660954475403,
-0.11149165779352188,
-0.3745053708553314,
0.17854341864585876,
-0.23511144518852234,
0.20526480674743652,
0.0011053546331822872,
-0.01899036020040512,
0.033671505749225616,
0.13569948077201843,
-0.07921861857175827,
-0.0889120101928711,
0.20329540967941284,
0.18163801729679108,
-0.32844752073287964,
-0.2453436255455017,
0.07085279375314713,
-0.19340673089027405,
0.2155153453350067,
0.04809091240167618,
0.10773421078920364,
-0.04352559894323349,
-0.08215714246034622,
0.0328793078660965,
0.016856886446475983,
0.0405273400247097,
-0.2629129886627197,
0.07430606335401535,
0.14336423575878143,
-0.0558810792863369,
-0.1698731631040573,
0.12063798308372498,
-0.07873329520225525,
-0.14021871984004974,
-0.11072535812854767,
-0.2158181369304657,
-0.028975222259759903,
0.24306657910346985,
-0.11052585393190384,
-0.05064591020345688,
0.16875025629997253,
-0.02882799133658409,
-0.121921606361866,
0.3744148910045624,
-0.00176081748213619,
0.005282377824187279,
0.010290920734405518,
0.14190462231636047,
-0.05081138759851456,
-0.006575849372893572,
-0.3393819034099579,
0.14941595494747162,
-0.17742687463760376,
-0.049977369606494904,
0.05303391441702843,
-0.07607784867286682,
0.06863360106945038,
-0.17641858756542206,
-0.02870137244462967,
0.3264276385307312,
0.11777357757091522,
-0.18625709414482117,
0.25936463475227356,
0.1915120631456375,
-0.0009487941861152649,
-0.1939583569765091,
0.022033344954252243,
0.0828937441110611,
-0.20871710777282715,
0.06448862701654434,
-0.2470085322856903,
-0.0631604716181755,
-0.3882583975791931,
0.31420591473579407,
-0.15103334188461304,
-0.24058446288108826,
-0.24238166213035583,
0.45073243975639343,
0.09711581468582153,
0.3336576223373413,
0.021541506052017212,
-0.07722573727369308,
-0.42715582251548767,
-0.2765059471130371,
0.10068363696336746,
0.17000040411949158,
-0.3739378750324249,
-0.12162066996097565,
-0.2397119700908661,
0.01947803422808647,
-0.01517941802740097,
0.13362975418567657,
-0.0467824786901474,
0.3196913003921509,
-0.11316703259944916,
0.1549604833126068,
0.2587013244628906,
-0.27438682317733765,
-0.19986167550086975,
0.15636996924877167,
-0.1937909573316574,
0.031472206115722656,
0.03529193997383118,
0.2863262891769409,
0.2813408374786377,
-0.06735677272081375,
-0.08253653347492218,
0.38681864738464355,
-0.1838959902524948,
-0.09838997572660446,
-0.08754990994930267,
-0.28398242592811584,
-0.034920573234558105,
0.40447720885276794,
0.3849547207355499,
-0.16439181566238403,
0.1440153568983078,
-0.13578787446022034,
0.20236405730247498,
-0.27222496271133423,
-0.02247638814151287,
0.10980001091957092,
0.41480791568756104,
0.2787439227104187,
-0.0171671025454998,
-0.19762107729911804,
-0.16483619809150696,
0.20849674940109253,
0.2633708715438843,
0.2444259077310562,
0.14091305434703827,
-0.1583658754825592,
-0.04739445447921753,
-0.11456460505723953,
-0.1418837010860443,
-0.10492618381977081,
0.29092326760292053,
-0.1852603554725647,
0.012544970959424973,
-0.048237092792987823,
-0.12413491308689117,
0.1548704206943512,
-0.4961642920970917,
0.17798325419425964,
-0.09229719638824463,
0.4570576250553131,
-0.06770491600036621,
-0.10666848719120026,
-0.09172581136226654,
0.09679938852787018,
-0.35095295310020447,
-0.31788793206214905,
0.09823187440633774,
0.27785563468933105,
-0.20239105820655823,
-0.08550205826759338,
0.24355894327163696,
0.41889339685440063,
0.19205932319164276,
-0.38659200072288513,
-0.08787426352500916,
-0.2131556272506714,
-0.11318811774253845,
-0.08859653770923615,
-0.2754805386066437,
0.20375221967697144,
0.12480084598064423,
0.04911210387945175,
0.06266229599714279,
-0.004666440188884735,
0.037323541939258575,
-0.15031948685646057,
0.019632475450634956,
0.046890974044799805,
0.07415291666984558,
-0.10295584797859192,
0.04696289077401161,
-0.10650205612182617,
-0.260949045419693,
0.16122978925704956,
0.44344717264175415,
-0.11283396184444427,
0.0637563019990921,
0.3195003867149353,
-0.0701584592461586,
0.19651752710342407,
-0.09834381937980652,
0.2513394355773926,
0.24600189924240112,
0.3622521758079529,
-0.07475543022155762,
0.07291177660226822,
-0.033437374979257584,
-0.04522047936916351,
0.08640866726636887,
0.11700001358985901,
0.1309867650270462,
-0.03896275907754898,
0.32196691632270813,
0.09775545448064804,
-0.33632874488830566,
-0.10892568528652191,
0.13386569917201996,
0.07434997707605362,
-0.13847582042217255,
-0.09734717756509781,
0.05250567942857742,
-0.2845608592033386,
-0.006552456878125668,
0.48302775621414185,
-0.09175772964954376,
-0.08187836408615112,
0.0944332629442215,
-0.022669021040201187,
-0.03918418660759926,
0.2545785903930664,
-0.28533610701560974,
0.437644898891449,
0.06458165496587753,
-0.12464747577905655,
0.16946250200271606,
0.03623802587389946,
-0.0018891356885433197,
0.2964746356010437,
0.3078962564468384,
-0.26586100459098816,
0.5131580233573914,
-0.013496523723006248,
0.1559714823961258,
-0.28584927320480347,
-0.7581984996795654,
0.09302232414484024,
-0.38585716485977173,
0.14262086153030396,
0.25497931241989136,
0.16527703404426575,
-0.15116171538829803,
-0.25884416699409485,
0.14150068163871765,
-0.1775227040052414,
-0.20581674575805664,
-0.17925220727920532,
-0.10678074508905411,
-0.011975521221756935,
-0.2059691846370697,
-0.34732508659362793,
-0.24097897112369537,
-0.27269217371940613,
0.2417840212583542,
0.2722419798374176,
0.11387346684932709,
0.4504299461841583,
0.28201329708099365,
-0.021440304815769196,
-0.028457237407565117,
-0.13472945988178253,
-0.16725124418735504,
-0.2924876809120178,
0.3565540313720703,
-0.23606353998184204,
-0.36836352944374084,
0.013619627803564072,
-0.2771678566932678,
0.39319169521331787,
0.026144377887248993,
-0.5888370871543884,
-0.3149334490299225,
-0.20302161574363708,
0.25947844982147217,
-0.006806924939155579,
-0.019643427804112434,
0.1591293066740036,
-0.1451476663351059,
-0.24778778851032257,
-0.24896270036697388,
0.028097469359636307,
0.2546219825744629,
0.151120126247406,
0.14335985481739044,
-0.11519976705312729,
0.2991442382335663,
0.24390959739685059,
0.6626129150390625,
-0.17395949363708496,
-0.31584492325782776,
0.21991170942783356,
-0.22530409693717957,
0.240158811211586,
-0.008506841957569122,
-0.2504255473613739,
0.5140584111213684,
0.08708996325731277,
0.07473760098218918,
0.30027663707733154,
0.08166341483592987,
-0.2880677580833435,
0.13654634356498718,
0.18324467539787292,
-0.28495368361473083,
-0.08722993731498718,
0.27725183963775635,
0.09980276226997375,
0.06074974313378334,
-0.11050304770469666,
-0.13401846587657928,
-0.40976616740226746,
-0.16863051056861877,
-0.009825345128774643,
0.1925462782382965,
0.12067370116710663,
-0.18403908610343933,
-0.19307875633239746,
0.09477893263101578,
-0.29919472336769104,
0.1096171885728836,
0.018796542659401894,
-0.25610804557800293,
-0.24709363281726837,
0.0398961678147316,
-0.011518687009811401,
-0.11517374962568283,
0.7690163254737854,
-0.34337562322616577,
-0.11890889704227448,
0.1526886224746704,
-0.08228854835033417,
-0.16588996350765228,
0.06039601191878319,
-0.15226121246814728,
-0.29913511872291565,
0.14535373449325562,
0.2287895232439041,
-0.2258489727973938,
0.0028794880490750074,
0.43343648314476013,
-0.139757439494133,
-0.18242724239826202,
-0.17304620146751404,
-0.11797188222408295,
-0.3058144748210907,
-0.09294062852859497,
-0.02999281883239746,
-0.018347539007663727,
-0.02736591547727585,
-0.024409716948866844,
-0.21937096118927002,
-0.06986039876937866,
-0.14664466679096222,
0.18991652131080627,
-0.03376904875040054,
-0.11715114861726761,
0.32543712854385376,
0.2335628867149353,
-0.06660225242376328,
-0.05224151909351349,
0.24863684177398682,
0.41569802165031433,
-0.2108144760131836,
-0.4038291871547699,
0.0869491845369339,
-0.16258873045444489,
0.22170987725257874,
0.27434778213500977,
0.1057814434170723,
-0.09463440626859665,
-0.11094814538955688,
0.27612143754959106,
-0.3375069200992584,
0.5191017985343933,
0.46740633249282837,
-0.09343095123767853,
-0.1642579287290573,
-0.5219549536705017,
0.45961710810661316,
0.13168320059776306,
0.06356599926948547,
0.20714344084262848,
0.27476489543914795,
-0.3602256178855896,
0.19068700075149536,
0.3635930120944977,
0.921133816242218,
-0.3551444411277771,
0.10348782688379288,
0.3247905969619751,
-0.01411018893122673,
0.45685461163520813,
-0.1674995720386505,
0.07746480405330658,
-0.11753296852111816,
-0.3746626377105713,
0.0019090287387371063,
-0.0998481884598732,
0.08519299328327179,
0.3583402633666992,
0.04338223114609718,
0.005238398909568787,
0.0023495182394981384,
0.23599554598331451,
-0.013933252543210983,
0.2795265316963196,
0.02446145936846733,
-0.32706671953201294,
-0.05694153904914856,
0.3617202043533325,
0.23740538954734802,
-0.11941806972026825,
-0.11247289925813675,
-0.22180373966693878,
-0.2074778974056244,
0.019262246787548065,
-0.16419515013694763,
-0.0655105710029602,
-0.17497585713863373,
0.07514739036560059,
-0.0011376366019248962,
-0.3220282793045044,
0.1517101526260376,
0.16001056134700775,
0.27863115072250366,
-0.031886663287878036,
-0.06288236379623413,
0.37972745299339294,
0.006875090301036835,
0.03282715007662773,
0.09684904664754868,
-0.15671667456626892,
0.34783628582954407,
-0.08323873579502106,
-0.02473551779985428,
0.05872175842523575,
0.20288453996181488,
-0.3496268391609192,
-0.16026107966899872,
-0.10576118528842926,
0.07398149371147156,
-0.16559186577796936,
-0.011348329484462738,
0.11121130734682083,
-0.20783114433288574,
0.016200128942728043,
0.2709417939186096,
0.01538778841495514,
0.1405060589313507,
0.14429739117622375,
0.04406600445508957,
-0.11967067420482635,
-0.06755192577838898,
0.03682621195912361,
0.31189221143722534,
-0.020553333684802055,
0.29149845242500305,
-0.0005524568259716034,
-0.018298741430044174,
-0.2755197584629059,
-0.04364407807588577,
0.3904520273208618,
-0.34640002250671387,
0.014626648277044296,
0.1590091735124588,
0.015707463026046753,
0.008166697807610035,
0.04905429482460022,
0.0761212408542633,
-0.03900803625583649,
-0.10587769001722336,
-0.023066755384206772,
-0.09706930071115494,
0.13591083884239197,
-0.16810937225818634,
0.41384613513946533,
-0.31911027431488037,
0.43078377842903137,
-0.02541647106409073,
0.06478777527809143,
-0.4983031451702118,
0.04158569872379303,
-0.09548276662826538,
-0.050047583878040314,
0.05273012816905975,
0.010399412363767624,
0.01689334772527218,
-0.16942131519317627,
0.24490490555763245,
0.025322705507278442,
-0.2670753002166748,
-0.36121445894241333,
-0.0219810102134943,
0.04684805870056152,
0.11175825446844101,
-0.024143418297171593,
0.2723580598831177,
0.11757519841194153,
-0.33621442317962646,
-0.06333101540803909,
0.1968083530664444,
-0.17284125089645386,
-0.10537190735340118,
0.04602634161710739,
0.061053890734910965,
0.0886756032705307,
0.32988446950912476,
-0.08521049469709396,
-0.06585617363452911,
0.5119205713272095,
0.173928901553154,
0.11258286982774734,
0.091695636510849,
-0.01800147444009781,
-0.04154873266816139,
0.12508122622966766,
-0.03634282946586609,
-0.021857239305973053,
0.40028175711631775,
-0.05990254878997803,
-0.09663312137126923,
0.33493074774742126,
0.2797148823738098,
-0.023847252130508423,
-0.4472481906414032,
0.018446465954184532,
0.097639299929142,
0.39440277218818665,
-0.36414411664009094,
0.030540084466338158,
-0.05750752612948418,
-0.07545926421880722,
0.3031452000141144,
0.1852724403142929,
0.1328447312116623,
0.31009891629219055,
-0.3105958104133606,
0.08003417402505875,
0.6276924014091492,
-0.11267048120498657,
0.18221354484558105,
0.38515332341194153,
-0.09784270823001862,
-0.0037105828523635864,
0.08708231896162033,
0.13362467288970947,
0.14099746942520142,
0.3107278347015381,
0.08535336703062057,
0.4988706111907959,
-0.06334251165390015,
-0.10332490503787994,
0.43318140506744385,
-0.10545596480369568,
0.017577247694134712,
0.23321691155433655,
-0.013519175350666046,
0.4042713940143585,
-0.08119699358940125,
0.12070803344249725,
-0.021497122943401337,
-0.4209999740123749,
-0.19599777460098267,
0.27784842252731323,
0.07526669651269913,
0.19442738592624664,
-0.28317397832870483,
0.004334643483161926,
-0.16147944331169128,
0.008725102990865707,
0.0660146102309227,
-0.4952129125595093,
0.10121488571166992,
-0.023232728242874146,
-0.2270273119211197,
0.03575749322772026,
-0.0771712064743042,
0.014551142230629921,
0.37536051869392395,
-0.06029440835118294,
0.16461442410945892,
0.2012653946876526,
-0.11734700202941895,
0.21154673397541046,
0.41964948177337646,
0.2130674123764038,
-0.009984984993934631,
0.20260800421237946,
0.11055679619312286,
-0.05552021041512489,
-0.05603380501270294,
-0.08511563390493393,
0.04848305135965347,
-0.012126371264457703,
0.07374819368124008,
0.19255268573760986,
0.2811041474342346,
-0.2828265428543091,
0.07746236026287079,
0.09024083614349365,
0.01069609448313713,
-0.3222278952598572,
0.08432255685329437,
-0.04390845447778702,
-0.018771309405565262,
-0.25510480999946594,
0.02870018035173416,
-0.30319324135780334,
-0.16787013411521912,
0.2510148286819458,
-0.15090766549110413,
0.11649728566408157,
-0.043311405926942825,
0.14620515704154968,
-0.1802990436553955,
0.49076470732688904,
0.12223473191261292,
0.1828399896621704,
-0.13077910244464874,
-0.13555656373500824,
-0.5126267671585083,
0.04050686955451965,
-0.23466211557388306,
-0.2133316993713379,
-0.10123389959335327,
0.2733665704727173,
0.12267500162124634,
-0.05740310996770859,
0.19525088369846344,
-0.3067473769187927,
0.057403042912483215,
0.18938572704792023,
-0.3329504430294037,
-0.05062161758542061,
-0.14432434737682343,
0.09960281103849411,
0.0235506072640419,
-0.05051686242222786,
0.16628697514533997,
-0.1749347299337387,
0.17099347710609436,
0.019390780478715897,
0.16008354723453522,
0.015908148139715195,
-0.3176291286945343,
0.3446621000766754,
-0.08160556107759476,
0.3093739449977875,
-0.20896682143211365,
-0.09479805827140808,
-0.1631145179271698,
-0.1627291887998581,
-0.48299381136894226,
0.11916954070329666,
0.0956372320652008,
0.423308789730072,
0.05070110410451889,
-0.24024136364459991,
0.1534523218870163,
0.16145209968090057,
0.1530231088399887,
-0.054977692663669586,
-0.22662131488323212,
0.13919810950756073,
0.09478820115327835,
0.03485950082540512,
0.186392143368721,
0.3186021149158478,
-0.07870055735111237,
-0.12202675640583038,
-0.18554610013961792,
-0.6212899684906006,
0.3985240161418915,
-0.5038984417915344,
-0.11327233910560608,
-0.23573774099349976,
0.03620554506778717,
0.017302632331848145,
0.33047914505004883,
-0.4887535870075226,
0.03879673033952713,
0.33437061309814453,
0.06439618766307831,
-0.26454874873161316,
0.47426533699035645,
0.23725920915603638,
-0.11421580612659454,
-0.016241133213043213,
-0.1739896982908249,
-0.3397389054298401,
-0.18806658685207367,
0.05414042994379997,
-0.26604318618774414
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | @mariosasko The point is that if I use something like this:
x_train, x_test = train_test_split(dataset, test_size=0.1)
to get Train 90% and Test 10%, and then to get the Validation Set (10% of the whole 100%):
```
train_ratio = 0.80
validation_ratio = 0.10
test_ratio = 0.10
x_train, x_test, y_train, y_test = train_test_split(dataX, dataY, test_size=1 - train_ratio)
x_val, x_test, y_val, y_test = train_test_split(x_test, y_test, test_size=test_ratio/(test_ratio + validation_ratio))
```
The point is that the structure of the data is:
```
DatasetDict({
train: Dataset({
features: ['image', 'label'],
num_rows: 20580
})
})
```
So how to extract images and labels?
EDIT --> Split of the dataset in Train-Test-Validation:
```
import datasets
from datasets.dataset_dict import DatasetDict
from datasets import Dataset
percentage_divison_test = int(len(dataset['train'])/100 *10) # 10% --> 2058
percentage_divison_validation = int(len(dataset['train'])/100 *20) # 20% --> 4116
dataset_ = datasets.DatasetDict({"train": Dataset.from_dict({
'image': dataset['train'][0 : len(dataset['train']) ]['image'],
'labels': dataset['train'][0 : len(dataset['train']) ]['label'] }),
"test": Dataset.from_dict({ #20580-4116 (validation) ,20580-2058 (test)
'image': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['image'],
'labels': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['label'] }),
"validation": Dataset.from_dict({ # 20580-2058 (test)
'image': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['image'],
'labels': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['label'] }),
})
``` | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 188 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
@mariosasko The point is that if I use something like this:
x_train, x_test = train_test_split(dataset, test_size=0.1)
to get Train 90% and Test 10%, and then to get the Validation Set (10% of the whole 100%):
```
train_ratio = 0.80
validation_ratio = 0.10
test_ratio = 0.10
x_train, x_test, y_train, y_test = train_test_split(dataX, dataY, test_size=1 - train_ratio)
x_val, x_test, y_val, y_test = train_test_split(x_test, y_test, test_size=test_ratio/(test_ratio + validation_ratio))
```
The point is that the structure of the data is:
```
DatasetDict({
train: Dataset({
features: ['image', 'label'],
num_rows: 20580
})
})
```
So how to extract images and labels?
EDIT --> Split of the dataset in Train-Test-Validation:
```
import datasets
from datasets.dataset_dict import DatasetDict
from datasets import Dataset
percentage_divison_test = int(len(dataset['train'])/100 *10) # 10% --> 2058
percentage_divison_validation = int(len(dataset['train'])/100 *20) # 20% --> 4116
dataset_ = datasets.DatasetDict({"train": Dataset.from_dict({
'image': dataset['train'][0 : len(dataset['train']) ]['image'],
'labels': dataset['train'][0 : len(dataset['train']) ]['label'] }),
"test": Dataset.from_dict({ #20580-4116 (validation) ,20580-2058 (test)
'image': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['image'],
'labels': dataset['train'][len(dataset['train']) - percentage_divison_validation : len(dataset['train']) - percentage_divison_test]['label'] }),
"validation": Dataset.from_dict({ # 20580-2058 (test)
'image': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['image'],
'labels': dataset['train'][len(dataset['train']) - percentage_divison_test : len(dataset['train'])]['label'] }),
})
``` | [
-0.04853156581521034,
0.04088391363620758,
-0.23490816354751587,
0.2604948878288269,
0.2773860692977905,
0.2617972493171692,
0.09477178752422333,
0.24227535724639893,
-0.07477828860282898,
0.21417784690856934,
-0.23354315757751465,
0.11394212394952774,
-0.2905992865562439,
0.15919646620750427,
-0.013997773639857769,
-0.2653309404850006,
-0.21857768297195435,
0.10883009433746338,
0.27272698283195496,
-0.2632555663585663,
-0.14713139832019806,
-0.10172782093286514,
0.016546398401260376,
-0.16950125992298126,
-0.2640286684036255,
-0.3113909363746643,
-0.22711965441703796,
0.12555357813835144,
-0.44017988443374634,
-0.3095453381538391,
0.021639695391058922,
-0.05327615514397621,
-0.008934363722801208,
0.3332473933696747,
-0.00010995577758876607,
-0.011756464838981628,
0.015088073909282684,
-0.03518408536911011,
0.18950872123241425,
-0.0668930858373642,
-0.21199539303779602,
-0.34621894359588623,
-0.3725983202457428,
-0.4250931441783905,
-0.11400988698005676,
-0.07052535563707352,
0.13338857889175415,
0.07812398672103882,
0.5445631146430969,
0.42322400212287903,
0.20051921904087067,
-0.002650108188390732,
-0.020510084927082062,
-0.04679334908723831,
0.09642288088798523,
0.11985736340284348,
-0.04831031709909439,
0.403610497713089,
0.06040547043085098,
0.14681677520275116,
0.11218883097171783,
0.5610813498497009,
0.27418145537376404,
-0.11321607232093811,
0.09106718003749847,
0.27879881858825684,
-0.047116756439208984,
-0.42067351937294006,
-0.053457215428352356,
0.3203624188899994,
0.2428779900074005,
0.14776960015296936,
-0.39638733863830566,
-0.3642573356628418,
-0.05972151830792427,
-0.430793821811676,
-0.14374396204948425,
0.446300208568573,
0.06026124581694603,
0.19542402029037476,
-0.6087400913238525,
-0.1545882374048233,
-0.4385696351528168,
0.18567049503326416,
-0.2362188845872879,
0.15463265776634216,
0.03257037699222565,
0.08073164522647858,
0.2297728955745697,
0.36837464570999146,
-0.1079026609659195,
-0.2810501456260681,
0.12924854457378387,
0.2555740773677826,
-0.16178151965141296,
-0.14125940203666687,
-0.08396867662668228,
-0.0749160423874855,
0.23754486441612244,
0.13009217381477356,
0.04271696135401726,
-0.08044937998056412,
-0.08413325995206833,
0.08116275072097778,
0.1556277573108673,
0.11096175014972687,
-0.15633532404899597,
0.39357930421829224,
-0.04963783174753189,
0.03248870000243187,
-0.15728841722011566,
-0.054862916469573975,
-0.024479921907186508,
-0.04291678965091705,
0.11282838881015778,
-0.10194230079650879,
0.048923030495643616,
0.016926277428865433,
-0.15370412170886993,
-0.08096518367528915,
-0.025935586541891098,
-0.13651727139949799,
-0.007299852557480335,
0.2927197515964508,
0.05177898705005646,
-0.014873672276735306,
-0.19889143109321594,
0.23369762301445007,
0.019825102761387825,
-0.07174421846866608,
-0.2831687331199646,
0.3073742687702179,
-0.344028502702713,
-0.14585858583450317,
0.07916226983070374,
-0.11264103651046753,
0.20275039970874786,
-0.15180127322673798,
-0.09292218089103699,
0.07817791402339935,
0.008511818945407867,
-0.49320361018180847,
0.5224000811576843,
0.17342330515384674,
0.01754411682486534,
-0.08676262944936752,
-0.07982650399208069,
-0.07099536061286926,
-0.23741015791893005,
-0.19607874751091003,
-0.3089156448841095,
-0.08796938508749008,
-0.19718505442142487,
0.24244950711727142,
-0.21091704070568085,
-0.035364337265491486,
-0.34965044260025024,
0.34860309958457947,
0.18142282962799072,
0.443852037191391,
-0.013754680752754211,
-0.09513919055461884,
-0.3329600989818573,
-0.10581488162279129,
0.21422412991523743,
0.11634597927331924,
-0.4114468991756439,
-0.06561840325593948,
-0.06633540987968445,
-0.07461614906787872,
0.22640326619148254,
0.30745255947113037,
0.023322129622101784,
0.5851590037345886,
-0.07612215727567673,
0.30178481340408325,
0.3504485487937927,
-0.3297545611858368,
-0.3460441827774048,
0.044416192919015884,
-0.17755204439163208,
0.15118904411792755,
0.11802126467227936,
0.15469606220722198,
0.3341341018676758,
0.1969686895608902,
-0.13754244148731232,
0.41694116592407227,
-0.29252851009368896,
-0.3590831458568573,
-0.029997490346431732,
-0.08985711634159088,
-0.12172576785087585,
0.24760331213474274,
0.4368618428707123,
-0.11375635117292404,
0.1958867460489273,
-0.11030960828065872,
0.3220190107822418,
-0.31843626499176025,
0.012409578077495098,
0.1672961413860321,
0.45558473467826843,
0.1264321208000183,
-0.11178157478570938,
-0.33263951539993286,
0.12154512852430344,
0.3081132769584656,
0.2391265630722046,
0.06593478471040726,
0.06546778976917267,
-0.11953932046890259,
-0.4267180860042572,
-0.038326092064380646,
-0.3534225821495056,
-0.2114843726158142,
0.1526399552822113,
-0.27909451723098755,
0.16173703968524933,
-0.05118515342473984,
-0.023497799411416054,
0.24575330317020416,
-0.31171655654907227,
0.27970585227012634,
-0.12371887266635895,
0.4095701575279236,
-0.10936684161424637,
-0.07947888970375061,
-0.14931610226631165,
0.17609861493110657,
-0.182854562997818,
-0.16193905472755432,
0.1798817217350006,
0.27559131383895874,
0.1584879755973816,
-0.20303411781787872,
0.04489900916814804,
0.24298791587352753,
0.19871903955936432,
-0.4004925787448883,
-0.06409309804439545,
-0.4259892404079437,
0.014765278436243534,
0.0787656232714653,
-0.2574477791786194,
0.21710366010665894,
0.11762331426143646,
0.1633005142211914,
0.06545086205005646,
0.1366163045167923,
0.07947354763746262,
-0.2858905792236328,
-0.01256762444972992,
-0.08541622012853622,
0.022955074906349182,
-0.35325178503990173,
-0.1321767270565033,
-0.28160879015922546,
-0.2644961476325989,
0.04601650312542915,
0.4466196894645691,
-0.042424339801073074,
-0.17976024746894836,
0.04568043351173401,
-0.06410222500562668,
0.1381790041923523,
0.036044858396053314,
0.282085657119751,
0.21904009580612183,
0.35332992672920227,
0.05385693907737732,
0.1598891168832779,
-0.14032170176506042,
0.17203694581985474,
0.12342832237482071,
0.35717183351516724,
0.1573246568441391,
-0.0740019753575325,
0.09771949797868729,
0.24153828620910645,
-0.13406357169151306,
-0.22352151572704315,
0.014895875006914139,
-0.06001090258359909,
-0.29610633850097656,
0.0831729844212532,
-0.08915978670120239,
-0.17912229895591736,
-0.28416070342063904,
0.40910208225250244,
0.08811823278665543,
-0.12876804172992706,
0.05463246628642082,
-0.15361237525939941,
-0.12468871474266052,
0.09407542645931244,
-0.4577796459197998,
0.22969657182693481,
0.08279581367969513,
-0.11768294125795364,
0.2695885896682739,
-0.0610823817551136,
-0.06843405216932297,
0.16619184613227844,
0.14516355097293854,
0.04931909963488579,
0.5617074966430664,
-0.1964837908744812,
0.09266381710767746,
-0.1751655638217926,
-0.7459672689437866,
0.2693120837211609,
-0.2801162004470825,
0.21226929128170013,
0.2707133889198303,
0.03484360873699188,
-0.1400190144777298,
-0.3569849729537964,
0.08157343417406082,
0.04614647477865219,
-0.23520609736442566,
-0.022309761494398117,
0.006754527799785137,
-0.1275479942560196,
-0.059570539742708206,
-0.4131203591823578,
-0.31817829608917236,
-0.11465917527675629,
0.18950720131397247,
0.19348198175430298,
0.12811553478240967,
0.5899308919906616,
0.2600994408130646,
-0.05767820402979851,
-0.20463255047798157,
0.02860339544713497,
-0.2136889100074768,
-0.1463567167520523,
0.32585257291793823,
-0.07676664739847183,
-0.35648220777511597,
0.024569477885961533,
-0.26396751403808594,
0.2251548022031784,
0.2117176055908203,
-0.4172896146774292,
-0.3102397322654724,
-0.11272916197776794,
0.16364595293998718,
-0.045345649123191833,
0.08213381469249725,
0.09811072051525116,
-0.18637049198150635,
-0.12713252007961273,
-0.17851883172988892,
0.07682181894779205,
0.522405207157135,
0.08560429513454437,
0.2797242999076843,
-0.21149474382400513,
0.15692058205604553,
0.3563196361064911,
0.6146373748779297,
-0.009749487042427063,
-0.16030406951904297,
0.11651630699634552,
-0.09319358319044113,
0.21887537837028503,
0.13352693617343903,
-0.39859047532081604,
0.40427225828170776,
-0.049355074763298035,
0.0013571903109550476,
0.10451986640691757,
-0.06475038081407547,
0.003779190592467785,
0.09166193008422852,
0.22628256678581238,
-0.3467445373535156,
-0.11089999973773956,
0.27424585819244385,
-0.08337746560573578,
0.18472906947135925,
0.06653225421905518,
0.022497564554214478,
-0.16844016313552856,
-0.018296394497156143,
-0.07660847902297974,
0.0018487274646759033,
0.009648807346820831,
-0.20159021019935608,
-0.582015872001648,
0.08312497287988663,
-0.24876582622528076,
0.2423257827758789,
0.09172132611274719,
-0.15504136681556702,
-0.05065348371863365,
0.011397171765565872,
0.14314940571784973,
0.03074374981224537,
0.6672778725624084,
-0.20480993390083313,
0.042025115340948105,
-0.004951652139425278,
-0.16064059734344482,
-0.06609846651554108,
-0.04277656227350235,
-0.38020628690719604,
-0.3075356185436249,
0.3268589377403259,
0.44537368416786194,
-0.4213640093803406,
-0.055256303399801254,
0.4670543670654297,
0.06685987859964371,
-0.24761450290679932,
0.05098211020231247,
-0.05751608684659004,
-0.32061144709587097,
0.11501513421535492,
0.15632674098014832,
0.0861160084605217,
0.3587646186351776,
0.06123260408639908,
-0.09448529779911041,
-0.1399138867855072,
0.05765526741743088,
0.3114693760871887,
0.05066933110356331,
0.15714699029922485,
0.05025193467736244,
0.14761751890182495,
0.13896772265434265,
0.1144055649638176,
0.3329141438007355,
0.5249263048171997,
-0.4585076868534088,
-0.3629150688648224,
0.07740090787410736,
-0.26101842522621155,
0.35146257281303406,
0.29205068945884705,
0.1898413747549057,
-0.2134859263896942,
0.0892515629529953,
0.22407807409763336,
-0.42148637771606445,
0.6497877836227417,
0.27283143997192383,
-0.08073864877223969,
-0.28753456473350525,
-0.34650084376335144,
0.22549855709075928,
0.213425412774086,
-0.08843094110488892,
0.108321413397789,
0.3573434352874756,
-0.4954797625541687,
0.14708177745342255,
0.3890196681022644,
0.9519084095954895,
-0.05461104214191437,
-0.005399912595748901,
0.21463412046432495,
-0.26991260051727295,
0.3804324269294739,
-0.10017535090446472,
0.06386211514472961,
-0.13603296875953674,
-0.5650345087051392,
-0.051829829812049866,
-0.16903753578662872,
0.07143618911504745,
0.3675650954246521,
0.10541372001171112,
0.23345892131328583,
-0.09226009249687195,
0.3152914047241211,
0.04318253695964813,
0.3321981132030487,
0.013806605711579323,
-0.1701297014951706,
0.019479937851428986,
0.1953658014535904,
0.15963008999824524,
-0.09346213936805725,
-0.038000550121068954,
-0.2580169439315796,
-0.45580732822418213,
-0.15005776286125183,
-0.1266806423664093,
-0.0489402711391449,
-0.3045828342437744,
0.13195091485977173,
0.03129357472062111,
-0.41505032777786255,
0.04672861471772194,
0.057240452617406845,
0.19847619533538818,
0.008486274629831314,
-0.08761212974786758,
0.305029958486557,
0.06709163635969162,
0.09041351079940796,
0.23436297476291656,
-0.3429335653781891,
0.35765594244003296,
-0.09739269316196442,
-0.08050088584423065,
0.031394731253385544,
0.023831665515899658,
-0.17962828278541565,
-0.003453463315963745,
-0.0009067952632904053,
0.08672843873500824,
-0.3512710630893707,
-0.17710287868976593,
0.019336625933647156,
0.10351882874965668,
-0.17368674278259277,
0.14641158282756805,
0.06711744517087936,
-0.10803350806236267,
0.37987881898880005,
-0.033617693930864334,
-0.08655998855829239,
-0.06793119013309479,
0.07846711575984955,
0.18355906009674072,
-0.028683524578809738,
0.38428252935409546,
-0.2776939868927002,
-0.056353479623794556,
-0.19035112857818604,
0.06849900633096695,
0.5849426984786987,
-0.4881843030452728,
-0.009172904305160046,
-0.09739606082439423,
-0.08813321590423584,
-0.12714089453220367,
0.10814927518367767,
0.2980896830558777,
-0.16535767912864685,
-0.1772322952747345,
-0.2871270775794983,
-0.07510194927453995,
0.36540913581848145,
-0.20519624650478363,
0.3078784942626953,
-0.3081783950328827,
0.4694220721721649,
-0.17464128136634827,
0.3075461983680725,
-0.3883536458015442,
0.06500300765037537,
-0.24263827502727509,
0.16149553656578064,
0.038212887942790985,
-0.07439673691987991,
0.07715287059545517,
-0.3076249659061432,
0.13870923221111298,
0.0671805888414383,
-0.23970124125480652,
-0.2846602499485016,
-0.17107965052127838,
0.10211826115846634,
-0.06138230860233307,
0.059420421719551086,
0.29472973942756653,
0.07870394736528397,
-0.21174170076847076,
0.0053667365573346615,
0.028066877275705338,
-0.11539680510759354,
0.0787738710641861,
0.08481671661138535,
-0.036761511117219925,
0.20239779353141785,
0.10485267639160156,
-0.011026553809642792,
-0.39050915837287903,
0.406294584274292,
0.32270121574401855,
0.20593544840812683,
0.045591723173856735,
-0.1272798478603363,
-0.17084354162216187,
0.002324216067790985,
0.06859984248876572,
-0.1540798544883728,
0.36148643493652344,
0.10537310689687729,
0.0715188980102539,
0.3614892065525055,
0.37213101983070374,
0.3106248378753662,
-0.31044504046440125,
-0.018221579492092133,
-0.013058094307780266,
0.3350626230239868,
-0.34620150923728943,
-0.04632735624909401,
-0.059285420924425125,
-0.16548888385295868,
0.08528801798820496,
0.3150404095649719,
0.19893908500671387,
0.4405288100242615,
-0.3557325601577759,
0.07583881169557571,
0.5921640992164612,
0.15572556853294373,
0.2430552840232849,
0.6101970672607422,
-0.1398697942495346,
-0.005204115062952042,
0.2552080452442169,
0.11918678879737854,
0.17145881056785583,
0.09597226232290268,
-0.022796012461185455,
0.6003286838531494,
-0.07950019091367722,
-0.019574221223592758,
0.3550320863723755,
-0.09606379270553589,
-0.18373171985149384,
0.1347542107105255,
0.01725676655769348,
0.3033686578273773,
-0.2527764141559601,
0.22216331958770752,
-0.02054644748568535,
-0.4200532138347626,
-0.0558585599064827,
0.3925415277481079,
0.2367839217185974,
0.23813316226005554,
-0.45639345049858093,
-0.10366784036159515,
-0.2770411968231201,
-0.04029173031449318,
0.18256647884845734,
-0.48116225004196167,
0.15597891807556152,
-0.14072158932685852,
-0.36159366369247437,
-0.11852473020553589,
-0.21133854985237122,
0.12059985846281052,
0.18861141800880432,
-0.300106018781662,
0.1720685213804245,
0.2151431143283844,
0.031556371599435806,
0.31379204988479614,
0.4064972698688507,
0.282075434923172,
-0.09858711063861847,
0.2129882425069809,
-0.09323379397392273,
0.06773052364587784,
-0.19012390077114105,
0.024655625224113464,
0.141433984041214,
0.17924296855926514,
-0.024193979799747467,
0.42470431327819824,
0.18248490989208221,
-0.22205278277397156,
0.028668824583292007,
0.11773845553398132,
-0.024207521229982376,
-0.29158762097358704,
0.2577431797981262,
0.2792207598686218,
-0.08841205388307571,
-0.07361917197704315,
-0.19235560297966003,
-0.13037820160388947,
0.009963798336684704,
0.07104909420013428,
-0.25640836358070374,
0.13924628496170044,
0.1147330105304718,
0.09574122726917267,
-0.17561452090740204,
0.30360400676727295,
0.288648784160614,
0.17024806141853333,
-0.4055410921573639,
-0.0768861472606659,
-0.46653327345848083,
-0.16112613677978516,
-0.16883523762226105,
-0.6096224784851074,
-0.0015216171741485596,
0.32313910126686096,
0.0418684147298336,
-0.03032734990119934,
0.18787789344787598,
-0.14181140065193176,
0.05824647098779678,
0.18158617615699768,
-0.43920624256134033,
0.06769006699323654,
0.08216085284948349,
0.14915059506893158,
-0.0018329452723264694,
-0.2073741853237152,
0.18386684358119965,
-0.023598777130246162,
-0.0053908973932266235,
0.11618073284626007,
0.002755478024482727,
0.0291697159409523,
-0.20405828952789307,
0.36872926354408264,
0.05013653635978699,
0.3342995047569275,
-0.14483243227005005,
0.0007164999842643738,
-0.21727916598320007,
0.021275576204061508,
-0.3640780448913574,
0.1521872580051422,
0.2465517222881317,
0.6584932804107666,
-0.01285850815474987,
-0.06492139399051666,
0.06297975033521652,
0.3151845335960388,
0.17756427824497223,
-0.2560475170612335,
-0.2737649977207184,
0.09326066821813583,
-0.06145463138818741,
0.06255587190389633,
0.43392306566238403,
0.25418880581855774,
-0.11295391619205475,
-0.013487139716744423,
-0.1653846651315689,
-0.6626907587051392,
0.3734132647514343,
-0.27111294865608215,
-0.13206890225410461,
-0.11814005672931671,
0.16725842654705048,
0.2858818769454956,
0.17941080033779144,
-0.5783841609954834,
-0.17053823173046112,
0.48004016280174255,
-0.1571575403213501,
-0.2883228659629822,
0.41681674122810364,
0.4319155812263489,
-0.13614287972450256,
0.15405599772930145,
-0.08807086944580078,
-0.2573675811290741,
-0.3891357183456421,
-0.07121694087982178,
-0.32050663232803345
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | @mariosasko in order to resize images I'm trying this method:
```
for i in range(0,len(dataset['train'])): #len(dataset['train'])
ex = dataset['train'][i] #i
image = ex['image']
image = image.convert("RGB") # <class 'PIL.Image.Image'> <PIL.Image.Image image mode=RGB size=500x333 at 0x7F84F1948150>
image_resized = image.resize(size_to_resize) # <PIL.Image.Image image mode=RGB size=224x224 at 0x7F84F17885D0>
dataset['train'][i]['image'] = image_resized
```
Because the DatasetDict is formed by arrows that are immutable, the changing assignment in the last line of code, doesn't work!
Do you have any idea in order to get a valid result? | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 82 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
@mariosasko in order to resize images I'm trying this method:
```
for i in range(0,len(dataset['train'])): #len(dataset['train'])
ex = dataset['train'][i] #i
image = ex['image']
image = image.convert("RGB") # <class 'PIL.Image.Image'> <PIL.Image.Image image mode=RGB size=500x333 at 0x7F84F1948150>
image_resized = image.resize(size_to_resize) # <PIL.Image.Image image mode=RGB size=224x224 at 0x7F84F17885D0>
dataset['train'][i]['image'] = image_resized
```
Because the DatasetDict is formed by arrows that are immutable, the changing assignment in the last line of code, doesn't work!
Do you have any idea in order to get a valid result? | [
0.071012943983078,
0.08556994795799255,
-0.19832843542099,
-0.02605009824037552,
0.5032886862754822,
0.08034733682870865,
0.32811617851257324,
0.0018623340874910355,
0.02315497398376465,
0.24949143826961517,
-0.15840865671634674,
0.41953423619270325,
-0.16828472912311554,
-0.0021450016647577286,
-0.03730462118983269,
-0.1927458792924881,
0.005767419934272766,
0.025853104889392853,
-0.11827161908149719,
-0.21596534550189972,
-0.3467806875705719,
-0.05230724811553955,
-0.1260686218738556,
-0.3398597240447998,
-0.19040268659591675,
-0.11757389456033707,
-0.4439365565776825,
-0.03325539827346802,
-0.2515805661678314,
-0.270951509475708,
-0.046760447323322296,
0.36869460344314575,
-0.11281833797693253,
0.3234331011772156,
-0.0001144375346484594,
-0.006513036787509918,
0.08190248161554337,
-0.07324505597352982,
0.04524402692914009,
-0.07990765571594238,
-0.053290627896785736,
-0.45798707008361816,
-0.22358952462673187,
-0.33455097675323486,
0.014424361288547516,
0.05110820755362511,
0.21049515902996063,
-0.10461175441741943,
0.43413877487182617,
0.15924222767353058,
0.19346299767494202,
-0.2550116181373596,
0.34787052869796753,
-0.07974017411470413,
0.16323718428611755,
0.173997163772583,
0.1548832654953003,
0.43359795212745667,
0.04267343506217003,
0.34046050906181335,
0.15888208150863647,
0.3166998624801636,
0.05234554409980774,
-0.2524336576461792,
0.4456471800804138,
0.04799665883183479,
0.21206218004226685,
-0.30680039525032043,
-0.017386052757501602,
0.015471722930669785,
0.39337489008903503,
-0.019138239324092865,
-0.45831817388534546,
-0.21661686897277832,
0.05453046038746834,
-0.22374442219734192,
-0.18711349368095398,
0.40599769353866577,
0.24918648600578308,
-0.11692555248737335,
-0.6540142297744751,
-0.19646991789340973,
-0.37848687171936035,
0.3666495680809021,
-0.17670738697052002,
0.04309925064444542,
0.014347206801176071,
0.29941847920417786,
0.009238582104444504,
0.013060098513960838,
-0.03971787914633751,
-0.06469382345676422,
0.09997731447219849,
0.12391965091228485,
-0.3393103778362274,
0.07171592116355896,
-0.26255157589912415,
-0.010984599590301514,
0.17147734761238098,
0.17731241881847382,
0.22280244529247284,
-0.1707812249660492,
0.10204575955867767,
0.030378378927707672,
-0.049015965312719345,
0.3216623365879059,
-0.2685965597629547,
0.363892138004303,
-0.19893284142017365,
0.02220340259373188,
-0.22914829850196838,
0.026065945625305176,
-0.1634683609008789,
-0.4614267945289612,
0.21400202810764313,
-0.10150100290775299,
0.04598437249660492,
0.20914369821548462,
-0.12673239409923553,
-0.07312984764575958,
0.010383516550064087,
-0.02467922866344452,
-0.04759790748357773,
0.33933064341545105,
0.13408011198043823,
-0.008049804717302322,
0.26815861463546753,
0.43360549211502075,
0.036482855677604675,
0.033792704343795776,
-0.2077678143978119,
0.15548807382583618,
-0.36110660433769226,
-0.21348734200000763,
-0.056414082646369934,
0.07094123959541321,
-0.004194274544715881,
-0.14169180393218994,
-0.0002974197268486023,
-0.06356531381607056,
-0.31597602367401123,
-0.22027207911014557,
0.4481268525123596,
-0.05238105729222298,
-0.2777939736843109,
-0.176150381565094,
-0.1403958648443222,
-0.010076180100440979,
-0.1045835092663765,
0.17752008140087128,
-0.25910624861717224,
0.18038244545459747,
-0.32333797216415405,
0.14169542491436005,
0.0928838849067688,
-0.11545310914516449,
-0.3490898311138153,
0.44972193241119385,
0.2610677480697632,
0.3864271342754364,
0.2636418044567108,
-0.29503804445266724,
-0.1832539290189743,
-0.248153954744339,
0.23152455687522888,
0.21197649836540222,
-0.3617733418941498,
-0.025661416351795197,
-0.08046644181013107,
0.12020160257816315,
0.2542606592178345,
0.19982373714447021,
0.10830168426036835,
0.3252438008785248,
-0.10967553406953812,
0.021354839205741882,
0.2591821849346161,
-0.13613365590572357,
-0.5805715918540955,
-0.18003828823566437,
-0.09608779102563858,
-0.15087221562862396,
0.01997823268175125,
0.292089581489563,
0.23523646593093872,
0.02479838952422142,
-0.20357173681259155,
0.19721677899360657,
-0.06044547259807587,
-0.21593250334262848,
-0.1519472599029541,
-0.22941848635673523,
0.07369279116392136,
0.0975307822227478,
0.3408645689487457,
-0.04314739257097244,
0.225303053855896,
-0.08220549672842026,
0.2041987180709839,
-0.30762040615081787,
0.2616279721260071,
0.06532928347587585,
0.29813212156295776,
0.344540536403656,
-0.04750318080186844,
0.012049514800310135,
0.04447019100189209,
0.15701225399971008,
0.09435877948999405,
0.07681069523096085,
0.11081206798553467,
-0.03548377379775047,
-0.281364768743515,
-0.055754758417606354,
-0.2843326926231384,
-0.003019023686647415,
0.12516815960407257,
-0.16309498250484467,
0.2539921998977661,
-0.15918192267417908,
0.077676922082901,
0.16043831408023834,
-0.5126748085021973,
0.2924336791038513,
-0.19128775596618652,
0.45172035694122314,
0.03492851182818413,
-0.09104391187429428,
-0.3742111623287201,
0.05908969044685364,
-0.07660756260156631,
-0.23097781836986542,
-0.08292847126722336,
0.39229536056518555,
-0.1527479737997055,
-0.04365614056587219,
0.005402017384767532,
0.06096050888299942,
0.048660583794116974,
-0.5507869124412537,
0.2470051348209381,
-0.21876834332942963,
0.11568833142518997,
0.009680621325969696,
-0.2346946895122528,
0.12243065983057022,
-0.1790606677532196,
0.2817417085170746,
-0.2363547682762146,
-0.01398269273340702,
-0.09813916683197021,
-0.07497359067201614,
-0.17699502408504486,
-0.05047822371125221,
-0.17003929615020752,
0.026364171877503395,
0.09296382963657379,
-0.20452488958835602,
-0.23425883054733276,
0.056381888687610626,
0.2468426674604416,
-0.0038059279322624207,
-0.2084011435508728,
0.3746851086616516,
-0.11123359948396683,
0.3012971878051758,
-0.09321287274360657,
0.319381982088089,
0.09039771556854248,
0.3758562207221985,
0.018870726227760315,
0.1512506753206253,
-0.13121110200881958,
0.15384311974048615,
0.24424949288368225,
0.21551287174224854,
0.3151170313358307,
0.10664071142673492,
0.27558767795562744,
0.03936759755015373,
-0.2488442361354828,
-0.0905177891254425,
0.08519711345434189,
0.09696974605321884,
-0.2550080120563507,
-0.04555299133062363,
0.0921529084444046,
-0.277797669172287,
-0.25676706433296204,
0.2905307710170746,
-0.1711546778678894,
-0.14721417427062988,
-0.11809495091438293,
-0.022983219474554062,
0.11754676699638367,
0.06403256952762604,
-0.25176802277565,
0.29475137591362,
0.10576826333999634,
-0.17560894787311554,
0.13535088300704956,
0.21435962617397308,
-0.2026675045490265,
0.02395040914416313,
0.28439998626708984,
-0.4170144200325012,
0.3303743898868561,
-0.30265599489212036,
0.1845296025276184,
-0.3506600260734558,
-0.6183497309684753,
-0.08641421794891357,
-0.2884937524795532,
0.20331643521785736,
0.23114439845085144,
0.06818782538175583,
-0.38607221841812134,
-0.08024781942367554,
0.3118263781070709,
-0.010255076922476292,
-0.1655053198337555,
-0.15384331345558167,
-0.10602658987045288,
-0.0850866287946701,
-0.13668502867221832,
-0.32008031010627747,
-0.2954121530056,
-0.1783742904663086,
0.5394272208213806,
0.22232334315776825,
0.10495263338088989,
0.37443098425865173,
0.5883516073226929,
-0.0515456348657608,
0.01969648152589798,
0.1602112501859665,
-0.14742696285247803,
-0.15375231206417084,
0.30845099687576294,
0.16769322752952576,
-0.3612198531627655,
0.00635061040520668,
-0.33976274728775024,
0.3837611675262451,
0.312034547328949,
-0.42392659187316895,
-0.12093167752027512,
-0.12874890863895416,
0.05568931624293327,
-0.06386708468198776,
0.3308154046535492,
0.010881759226322174,
-0.2608673572540283,
-0.12951894104480743,
-0.11679437756538391,
-0.2919168174266815,
0.3268381953239441,
0.2833714783191681,
0.2739170491695404,
-0.03732864558696747,
0.3453754186630249,
0.11740618944168091,
0.3596951961517334,
-0.0069753993302583694,
-0.30019670724868774,
0.39366409182548523,
-0.2415081262588501,
0.20699885487556458,
-0.011172965168952942,
-0.3473021984100342,
0.5196135640144348,
0.04040972888469696,
-0.13896095752716064,
-0.0605597198009491,
-0.03270342946052551,
-0.2719310522079468,
0.342546671628952,
0.1400739550590515,
-0.5535655617713928,
-0.16667453944683075,
0.2774965465068817,
-0.10265617072582245,
-0.006946578621864319,
-0.13286156952381134,
-0.15199917554855347,
-0.4664548635482788,
-0.26061758399009705,
-0.023985236883163452,
0.09751168638467789,
-0.060537584125995636,
0.03657548502087593,
-0.28705263137817383,
-0.03656693920493126,
-0.2714906632900238,
0.43464845418930054,
-0.10028634965419769,
0.1510804146528244,
0.0897689014673233,
0.010887544602155685,
0.1907474547624588,
-0.08595122396945953,
0.9828903079032898,
-0.1721850037574768,
-0.2793523073196411,
0.12654143571853638,
0.043467290699481964,
-0.35158926248550415,
-0.16764605045318604,
-0.05424465984106064,
-0.17749112844467163,
-0.005441751331090927,
0.3828080892562866,
-0.281147301197052,
0.0948464572429657,
0.1842428594827652,
0.12889429926872253,
-0.20728586614131927,
-0.044627610594034195,
-0.26623618602752686,
-0.28245246410369873,
-0.25219812989234924,
0.12132860720157623,
-0.03474213182926178,
0.18190449476242065,
0.07751327753067017,
-0.02510872855782509,
-0.32270538806915283,
-0.2034570574760437,
0.20078235864639282,
-0.1305312216281891,
0.2714187502861023,
0.40556100010871887,
-0.09643986821174622,
0.04037938639521599,
0.13813918828964233,
0.38357311487197876,
0.5260604619979858,
-0.39078399538993835,
-0.20121073722839355,
0.09139755368232727,
-0.139517679810524,
0.4914732873439789,
0.25428467988967896,
0.26389482617378235,
-0.33642715215682983,
0.10313663631677628,
0.2744147479534149,
-0.2783810496330261,
0.46783682703971863,
0.47879558801651,
0.008700371719896793,
-0.29469627141952515,
-0.7042588591575623,
0.3404262661933899,
0.17453107237815857,
0.002574346959590912,
0.3675137758255005,
0.4949796795845032,
-0.3847105801105499,
0.2141650915145874,
0.726883053779602,
1.129934310913086,
-0.3878853917121887,
0.07198625057935715,
0.051838576793670654,
-0.25300025939941406,
0.38228580355644226,
0.2364727407693863,
0.24841640889644623,
-0.14866065979003906,
-0.004765820689499378,
-0.014551689848303795,
-0.18642520904541016,
-0.02268712967634201,
0.41636109352111816,
-0.13833117485046387,
0.11472725123167038,
-0.18570858240127563,
-0.1382923424243927,
-0.08608975261449814,
0.0075291357934474945,
-0.20292595028877258,
-0.26437947154045105,
0.059963591396808624,
0.1818685084581375,
0.12161075323820114,
-0.26020097732543945,
0.06469843536615372,
-0.03624742478132248,
-0.5381214022636414,
0.049038276076316833,
-0.0720326378941536,
0.015448343008756638,
-0.39582303166389465,
-0.07956667244434357,
0.024611929431557655,
-0.3235098421573639,
0.15123337507247925,
0.15835651755332947,
0.1450394243001938,
-0.05320410802960396,
0.2866959273815155,
0.07607898116111755,
0.09993652999401093,
0.213709756731987,
0.019350312650203705,
-0.3255126476287842,
0.3014393746852875,
0.14872175455093384,
-0.10044901818037033,
-0.08541486412286758,
0.2172863483428955,
-0.26962435245513916,
-0.2345975935459137,
-0.14998719096183777,
0.37628084421157837,
-0.2559816539287567,
-0.04422582685947418,
0.036859799176454544,
-0.07950663566589355,
-0.07517397403717041,
0.09237082302570343,
-0.004156880080699921,
0.1743880659341812,
0.31601476669311523,
0.22285330295562744,
-0.3532136380672455,
0.019817166030406952,
0.2649717926979065,
0.2742430567741394,
0.02536524087190628,
0.5124938488006592,
-0.3810969591140747,
0.051734112203121185,
-0.08418048918247223,
-0.07477615773677826,
0.29930904507637024,
-0.5169357061386108,
0.1784760057926178,
-0.16478458046913147,
0.11282698810100555,
-0.013910994865000248,
-0.0025965161621570587,
0.2500314712524414,
0.07790891826152802,
0.01194615289568901,
-0.12157945334911346,
-0.3364873230457306,
0.1810523122549057,
-0.11220219731330872,
0.5011724233627319,
-0.26582446694374084,
0.21148669719696045,
-0.022556761279702187,
-0.17055469751358032,
-0.286297082901001,
0.0821690484881401,
-0.0476808026432991,
0.012691430747509003,
-0.0717344805598259,
0.08761931955814362,
-0.24994422495365143,
-0.15786506235599518,
0.12521323561668396,
0.1066317930817604,
-0.14980120956897736,
-0.22485893964767456,
-0.15245909988880157,
0.1254677176475525,
0.13207006454467773,
0.15044330060482025,
0.1395460069179535,
-0.11741939187049866,
-0.10129690170288086,
-0.2178412824869156,
0.0969262421131134,
-0.10319249331951141,
-0.21781976521015167,
0.12812365591526031,
0.08639445900917053,
-0.03804263472557068,
0.36813533306121826,
-0.20592978596687317,
-0.10497705638408661,
0.24190481007099152,
0.3781486451625824,
0.3428651988506317,
0.25059759616851807,
0.015705645084381104,
-0.2700077295303345,
0.08178479224443436,
0.11719328165054321,
-0.21014633774757385,
0.20853719115257263,
-0.07000458240509033,
0.06959815323352814,
0.20798644423484802,
0.34490638971328735,
0.3262195587158203,
-0.19261261820793152,
-0.2923216223716736,
0.09072864055633545,
0.22210827469825745,
-0.30748385190963745,
0.20726028084754944,
0.07463483512401581,
-0.09127883613109589,
0.0956544578075409,
0.2577683925628662,
0.2631787955760956,
0.1866278052330017,
-0.7248126864433289,
0.049084052443504333,
0.5802717804908752,
0.012553269974887371,
0.19033992290496826,
0.47577929496765137,
-0.11613108217716217,
0.11776793003082275,
0.4654291272163391,
0.302482932806015,
0.14607974886894226,
0.24855192005634308,
0.1358634978532791,
0.5791316032409668,
-0.13543501496315002,
0.13274915516376495,
0.1340496987104416,
-0.08123578876256943,
0.17980343103408813,
0.2496337592601776,
0.14229072630405426,
0.4146062433719635,
-0.059740886092185974,
0.2768722176551819,
0.06401408463716507,
-0.6606864333152771,
0.047417111694812775,
0.3304738700389862,
-0.0599215105175972,
0.02382631227374077,
-0.5645884275436401,
-0.27141672372817993,
-0.26196175813674927,
-0.07001026719808578,
0.03693757206201553,
-0.5490832924842834,
0.4613610506057739,
-0.015225768089294434,
-0.2461264580488205,
-0.3468066453933716,
-0.2373935580253601,
0.03471842408180237,
0.26302552223205566,
-0.22731417417526245,
0.206496462225914,
0.3590501546859741,
-0.03534063696861267,
0.4953364431858063,
0.4614449143409729,
0.3201257288455963,
0.3125600218772888,
0.26982438564300537,
-0.05835317447781563,
0.21800848841667175,
-0.07389043271541595,
-0.08871720731258392,
0.09209328144788742,
0.12754836678504944,
-0.11971183121204376,
0.1586984097957611,
0.13080668449401855,
-0.1102205365896225,
-0.009819332510232925,
-0.017370756715536118,
0.1387738585472107,
-0.21231335401535034,
0.0130363330245018,
-0.04758105427026749,
-0.13257893919944763,
-0.08983928710222244,
-0.2599251866340637,
-0.42708155512809753,
-0.11889700591564178,
0.24590659141540527,
-0.36637797951698303,
0.0754711702466011,
0.03796803951263428,
0.06444632261991501,
0.0930289626121521,
0.31836819648742676,
0.3672962486743927,
0.23040267825126648,
-0.20532898604869843,
-0.17536647617816925,
-0.548735499382019,
0.012402579188346863,
0.040281638503074646,
-0.366050660610199,
-0.07038695365190506,
0.3488008677959442,
0.06359727680683136,
-0.2386610060930252,
0.5604206323623657,
-0.2561910152435303,
0.06461986154317856,
0.36553755402565,
-0.1273578405380249,
0.005319621413946152,
0.3623417615890503,
0.21174292266368866,
0.1584014743566513,
-0.15742331743240356,
-0.008039001375436783,
-0.1331147700548172,
-0.022603223100304604,
0.048570238053798676,
0.3291122019290924,
-0.06422238796949387,
-0.15402404963970184,
0.3764038681983948,
0.04802530258893967,
0.3824634850025177,
-0.18713155388832092,
-0.14804226160049438,
-0.289671927690506,
-0.032276879996061325,
-0.5024531483650208,
0.13642571866512299,
-0.008819576352834702,
0.5675793886184692,
-0.05628938227891922,
-0.16962194442749023,
0.18279919028282166,
0.03719243034720421,
0.27075350284576416,
-0.10224183648824692,
-0.3890381157398224,
0.08916576206684113,
-0.1297004222869873,
-0.10756620764732361,
0.11019827425479889,
0.3011869788169861,
0.2504727840423584,
0.24555765092372894,
-0.24446330964565277,
-0.5198724269866943,
0.5213674306869507,
-0.5110285878181458,
-0.28388991951942444,
-0.07339376956224442,
-0.1392117142677307,
0.041647590696811676,
0.21868745982646942,
-0.4283863604068756,
0.01787247508764267,
0.40564537048339844,
-0.09619966894388199,
-0.12775427103042603,
0.47375792264938354,
0.013562878593802452,
-0.03232609108090401,
0.030075814574956894,
-0.009341418743133545,
-0.3568384051322937,
-0.12463749945163727,
-0.07741599529981613,
-0.38117027282714844
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | I have raised PR for adding stanford-dog dataset. I have not added any data preprocessing code. Only dataset generation script is there. Let me know any changes required, or anything to add to README. | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 34 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
I have raised PR for adding stanford-dog dataset. I have not added any data preprocessing code. Only dataset generation script is there. Let me know any changes required, or anything to add to README. | [
-0.14530375599861145,
-0.08699163794517517,
-0.13207146525382996,
0.005853027105331421,
0.36713820695877075,
0.2498159408569336,
0.056138232350349426,
0.026251953095197678,
-0.01628139242529869,
0.012564361095428467,
0.053610511124134064,
0.27112671732902527,
-0.36588555574417114,
0.2129841446876526,
0.28678619861602783,
-0.1833333522081375,
0.12883642315864563,
-0.0246192067861557,
0.2813936769962311,
-0.24362823367118835,
-0.41977038979530334,
-0.08830872923135757,
0.003240741789340973,
-0.5051952004432678,
-0.13307860493659973,
-0.08904441446065903,
-0.4086597263813019,
0.24143165349960327,
-0.24053429067134857,
-0.5853854417800903,
-0.049283336848020554,
0.11945001780986786,
0.10311833024024963,
0.42681804299354553,
-0.00011092440399806947,
-0.09525792300701141,
0.13509173691272736,
0.02547461725771427,
0.2558380961418152,
-0.09801481664180756,
-0.11022277176380157,
-0.47941628098487854,
-0.29487118124961853,
-0.13300472497940063,
-0.19487887620925903,
-0.06090877577662468,
0.1940513700246811,
0.09194974601268768,
0.22851040959358215,
0.3503144085407257,
0.19875185191631317,
-0.18227696418762207,
0.24418579041957855,
-0.17010514438152313,
0.12040437757968903,
0.26322340965270996,
-0.22378668189048767,
0.2996859550476074,
0.3707650303840637,
0.1636376827955246,
0.12112601846456528,
0.1355591118335724,
0.23465704917907715,
-0.15868274867534637,
0.42654985189437866,
0.12198653072118759,
0.07846596837043762,
-0.458271861076355,
0.012431241571903229,
0.19964522123336792,
0.5166502594947815,
-0.05875588208436966,
-0.2955789864063263,
-0.18665379285812378,
0.164525106549263,
-0.4556615352630615,
0.033625345677137375,
0.5023210048675537,
0.041529152542352676,
0.030668100342154503,
-0.4524646997451782,
-0.18707528710365295,
-0.4390846788883209,
0.13999122381210327,
0.01743246614933014,
0.15685796737670898,
-0.013550915755331516,
0.010581471025943756,
0.09383981674909592,
0.25568318367004395,
-0.09769204258918762,
-0.061274416744709015,
-0.04659121856093407,
0.2546756863594055,
-0.23190926015377045,
-0.24773411452770233,
0.011716645210981369,
0.1187797486782074,
0.32201147079467773,
0.153290256857872,
0.013128168880939484,
-0.18418243527412415,
0.08406803756952286,
-0.09240934997797012,
0.1357676088809967,
-0.0453282855451107,
-0.25163307785987854,
0.04506919905543327,
0.10700488835573196,
-0.004757284186780453,
0.04368643835186958,
0.0360444150865078,
0.026994887739419937,
-0.07417038828134537,
-0.07026254385709763,
-0.4038003981113434,
0.1831548660993576,
-0.047816839069128036,
0.06723260134458542,
-0.04023348167538643,
0.1601237952709198,
-0.19034045934677124,
-0.17013810575008392,
0.40099525451660156,
0.13258598744869232,
-0.06374755501747131,
-0.059974826872348785,
0.37839215993881226,
0.13265472650527954,
-0.055802274495363235,
-0.17442858219146729,
0.1806027889251709,
-0.23901638388633728,
0.0833088606595993,
0.191918283700943,
-0.08999894559383392,
0.0008188644424080849,
0.012418384663760662,
-0.17581261694431305,
0.18273411691188812,
-0.019601652398705482,
-0.08344011008739471,
0.33199846744537354,
0.14004230499267578,
-0.008694935590028763,
-0.22312025725841522,
-0.11203061044216156,
0.11199818551540375,
-0.21558168530464172,
0.08852143585681915,
-0.29779669642448425,
-0.135665163397789,
-0.6434093713760376,
0.1675969958305359,
-0.2187172770500183,
-0.31721484661102295,
-0.23064926266670227,
0.516202449798584,
0.02018507570028305,
0.3021999001502991,
0.09919441491365433,
0.08863740414381027,
-0.44392290711402893,
-0.3068714141845703,
0.02698412723839283,
0.3144853115081787,
-0.36730366945266724,
0.02628716081380844,
-0.23390346765518188,
0.06053372472524643,
0.13496637344360352,
0.04037545248866081,
0.0653224065899849,
0.31922078132629395,
-0.12653134763240814,
-0.04735638201236725,
0.1949842870235443,
-0.17711688578128815,
-0.31194940209388733,
0.059751465916633606,
-0.1748117208480835,
-0.047631967812776566,
0.20226603746414185,
0.37850022315979004,
0.030639031901955605,
-0.12401840090751648,
-0.12788067758083344,
0.31045830249786377,
-0.20136907696723938,
-0.17475526034832,
-0.12448148429393768,
-0.14382439851760864,
-0.10265037417411804,
0.3816981911659241,
0.3146510124206543,
-0.047129906713962555,
0.37687861919403076,
-0.27476340532302856,
0.04343951493501663,
-0.24775993824005127,
0.00670548714697361,
0.2607541084289551,
0.6556793451309204,
0.40162843465805054,
0.0025313906371593475,
-0.0524192675948143,
0.03422579541802406,
0.17780685424804688,
0.2248222529888153,
0.3067592680454254,
0.10921400785446167,
-0.17059719562530518,
-0.14119863510131836,
-0.09355778992176056,
-0.333252489566803,
-0.28139322996139526,
0.08137032389640808,
-0.12326914072036743,
0.22149989008903503,
0.05708381161093712,
-0.07222415506839752,
0.18421487510204315,
-0.35456037521362305,
0.26730436086654663,
-0.1428954005241394,
0.4220605492591858,
-0.13893163204193115,
-0.25670570135116577,
-0.010882362723350525,
0.23068201541900635,
-0.2883511483669281,
-0.15463809669017792,
0.08698724210262299,
0.24049413204193115,
-0.13752241432666779,
-0.23937095701694489,
0.5387219786643982,
0.24326607584953308,
0.23245620727539062,
-0.6131505966186523,
0.14130505919456482,
-0.3681294918060303,
0.005846977233886719,
-0.04543417692184448,
-0.41047897934913635,
0.09044413268566132,
0.05443461239337921,
-0.07578486949205399,
-0.08613324165344238,
0.007621072232723236,
0.0595330148935318,
-0.14668916165828705,
0.10678599029779434,
0.13360396027565002,
0.1806790977716446,
-0.13506165146827698,
0.08789503574371338,
-0.2638798952102661,
-0.2969091534614563,
0.10133187472820282,
0.265227735042572,
-0.11230222880840302,
-0.04836340248584747,
0.39446693658828735,
-0.10140103846788406,
0.08297427743673325,
-0.04707363247871399,
0.19464920461177826,
0.2708067297935486,
0.3968881368637085,
-0.25004127621650696,
0.08436022698879242,
0.05782106891274452,
0.07766356319189072,
-0.017086751759052277,
0.13364559412002563,
-0.0010434576543048024,
-0.16206324100494385,
0.38124001026153564,
0.17827719449996948,
-0.3331979215145111,
-0.06125255674123764,
0.09358059614896774,
0.09666571766138077,
-0.2181503027677536,
-0.24260525405406952,
0.26969432830810547,
-0.2319037914276123,
-0.0749427005648613,
0.5087822079658508,
-0.17164239287376404,
-0.024814244359731674,
-0.03460516780614853,
-0.16203519701957703,
0.25217878818511963,
0.14607365429401398,
-0.35706302523612976,
0.49622857570648193,
-0.045652590692043304,
-0.2086753249168396,
0.11383366584777832,
0.12869225442409515,
0.01957574672996998,
0.18067839741706848,
0.30474793910980225,
-0.15066008269786835,
0.6377806663513184,
-0.08308181166648865,
0.3353985548019409,
-0.41683429479599,
-0.8538703322410583,
-0.01851552724838257,
-0.34813010692596436,
0.32022079825401306,
0.2549014091491699,
0.012938879430294037,
-0.05479563772678375,
-0.22606106102466583,
0.13605807721614838,
-0.1588873565196991,
-0.22715124487876892,
-0.005716028623282909,
-0.18111757934093475,
-0.1158401146531105,
-0.070670947432518,
-0.24646547436714172,
-0.25009846687316895,
-0.176412433385849,
0.37610816955566406,
0.4079897105693817,
-0.05788036435842514,
0.19810906052589417,
0.28860408067703247,
-0.08832243829965591,
-0.1357947587966919,
-0.14395911991596222,
-0.1330428421497345,
-0.25542864203453064,
0.4101620018482208,
-0.16891102492809296,
-0.47365084290504456,
0.23049843311309814,
-0.22339965403079987,
0.1882897913455963,
-0.06812818348407745,
-0.6557044386863708,
-0.2406366467475891,
-0.17667639255523682,
0.368649959564209,
0.14879615604877472,
0.08952945470809937,
0.22979411482810974,
-0.0684075802564621,
-0.12318367511034012,
-0.19008705019950867,
-0.2189347743988037,
0.20550866425037384,
0.10698891431093216,
0.39245209097862244,
-0.006001945585012436,
0.35411596298217773,
0.08988252282142639,
0.6920291185379028,
-0.045133113861083984,
-0.21591083705425262,
0.5199636220932007,
-0.19310536980628967,
0.39605656266212463,
-0.004170499742031097,
-0.3444115221500397,
0.5819851756095886,
0.05439399927854538,
0.1566472351551056,
0.22621017694473267,
0.19017738103866577,
-0.29429835081100464,
0.06563879549503326,
0.06316305696964264,
-0.30745235085487366,
0.08341778814792633,
0.22730688750743866,
0.06807715445756912,
0.1659248173236847,
-0.2103596180677414,
-0.2922969460487366,
-0.3836688995361328,
-0.3660117983818054,
-0.08128984272480011,
0.28873908519744873,
0.02601008117198944,
-0.07873710989952087,
-0.32532986998558044,
0.10466387867927551,
-0.4935169219970703,
0.22626715898513794,
-0.02750740386545658,
-0.0935947597026825,
-0.3404174745082855,
0.12736642360687256,
0.11910199373960495,
-0.0567949153482914,
0.7123443484306335,
-0.5330644249916077,
-0.20341856777668,
0.09616175293922424,
0.01859002560377121,
0.01768583245575428,
0.10641804337501526,
-0.18919256329536438,
-0.19653941690921783,
0.10339617729187012,
0.11254570633172989,
-0.12259325385093689,
0.18729408085346222,
0.49713441729545593,
-0.13871951401233673,
-0.17456316947937012,
-0.2390601933002472,
-0.2081483006477356,
-0.4305488169193268,
-0.12886065244674683,
0.07516340911388397,
-0.1243285983800888,
-0.003208550624549389,
0.09293823689222336,
-0.2062481939792633,
-0.12053683400154114,
-0.05582781136035919,
0.19203490018844604,
-0.12629421055316925,
-0.04290051758289337,
0.37699127197265625,
0.3676714599132538,
-0.07668425887823105,
-0.04075416922569275,
0.5057276487350464,
0.4774903655052185,
-0.36758726835250854,
-0.49752265214920044,
0.12868721783161163,
-0.33531755208969116,
0.4474760890007019,
0.1741388440132141,
0.24854020774364471,
-0.03929533809423447,
-0.02224572002887726,
0.20040635764598846,
-0.34801602363586426,
0.3335830271244049,
0.4953934848308563,
-0.04303987696766853,
-0.44069787859916687,
-0.506544291973114,
0.4453047215938568,
0.2815288007259369,
0.029461510479450226,
0.10160613805055618,
0.5819395780563354,
-0.24947862327098846,
0.09099164605140686,
0.3787599503993988,
1.0115710496902466,
-0.35418879985809326,
-0.08748242259025574,
0.11780683696269989,
-0.27936744689941406,
0.3983801305294037,
-0.012190215289592743,
0.060045573860406876,
-0.07624971866607666,
-0.25362497568130493,
-0.003313206136226654,
-0.1920044869184494,
0.24283981323242188,
0.24815578758716583,
-0.14208300411701202,
0.04459661245346069,
-0.03078887239098549,
-0.0010320693254470825,
0.028535963967442513,
0.4836527109146118,
-0.0031305700540542603,
-0.3029589056968689,
0.024713441729545593,
0.24275082349777222,
0.13566315174102783,
-0.10272842645645142,
-0.10460657626390457,
-0.3113287687301636,
-0.3266869783401489,
-0.07732458412647247,
-0.2203945368528366,
-0.1478850245475769,
-0.0387815423309803,
-0.14880749583244324,
0.0014869309961795807,
-0.4559391736984253,
0.44727960228919983,
0.25168296694755554,
0.35272616147994995,
-0.13310560584068298,
-0.23647668957710266,
0.33927151560783386,
-0.06409797817468643,
-0.15729832649230957,
0.10510417819023132,
-0.16991998255252838,
0.1966162770986557,
-0.06580642610788345,
-0.1918734908103943,
0.08914677798748016,
0.10898631811141968,
-0.3536037802696228,
-0.23569253087043762,
-0.08195333182811737,
0.0594949908554554,
-0.2532541751861572,
0.013161836192011833,
0.14406131207942963,
-0.011966606602072716,
-0.07812623679637909,
0.16088254749774933,
0.14112582802772522,
0.11145823448896408,
0.08215855062007904,
0.08441072702407837,
-0.10571245104074478,
-0.16142557561397552,
-0.019014425575733185,
0.2070435881614685,
-0.10674446076154709,
0.20811279118061066,
0.0029939040541648865,
0.01157517358660698,
-0.13342460989952087,
-0.016488630324602127,
0.4002501666545868,
-0.43630051612854004,
-0.10395565629005432,
0.23596234619617462,
0.1250935047864914,
0.07341045886278152,
-0.007247064262628555,
0.13229337334632874,
-0.19020986557006836,
0.09852999448776245,
-0.026552099734544754,
-0.18036450445652008,
0.06102811545133591,
-0.28624457120895386,
0.2910528779029846,
-0.37746357917785645,
0.30457285046577454,
0.1643407940864563,
0.1859055757522583,
-0.3557949662208557,
0.038028717041015625,
-0.15875661373138428,
-0.08605122566223145,
0.13376066088676453,
-0.023653633892536163,
-0.10711611062288284,
-0.2684154510498047,
0.1104678064584732,
-0.1061549037694931,
-0.23035432398319244,
-0.15022101998329163,
0.12488052248954773,
0.12591615319252014,
0.02233753353357315,
0.047454118728637695,
0.13321702182292938,
-0.01911243051290512,
-0.31359994411468506,
0.043556518852710724,
-0.017144840210676193,
-0.19998353719711304,
-0.16009223461151123,
-0.12080741673707962,
0.09914856404066086,
-0.034847408533096313,
0.3348829746246338,
0.024549013003706932,
-0.14041489362716675,
0.5251632332801819,
0.2432199865579605,
0.12872019410133362,
0.02668495662510395,
0.05960780382156372,
0.021938415244221687,
0.20923921465873718,
0.08786199241876602,
-0.0266135074198246,
0.35358381271362305,
-0.16063377261161804,
0.007255181670188904,
0.34996265172958374,
0.1793961375951767,
0.010172005742788315,
-0.4783552289009094,
0.15566058456897736,
0.1409742534160614,
0.2505672872066498,
-0.4490903615951538,
0.020943406969308853,
0.07137896865606308,
-0.06742005795240402,
0.057102713733911514,
0.25655874609947205,
0.3988783657550812,
0.3323974013328552,
-0.3231325149536133,
0.16714388132095337,
0.7990973591804504,
0.02279958501458168,
0.11079320311546326,
0.255179226398468,
-0.09798838943243027,
0.04883265495300293,
0.3197602927684784,
0.43375080823898315,
0.003108680248260498,
0.2544664144515991,
0.07781873643398285,
0.47920525074005127,
-0.07931536436080933,
0.03724033385515213,
0.28474798798561096,
-0.1514471024274826,
0.22615714371204376,
0.223428875207901,
0.078645721077919,
0.19338151812553406,
0.03707057982683182,
0.2762259244918823,
-0.018791645765304565,
-0.41617274284362793,
-0.23626801371574402,
0.24282696843147278,
0.17963603138923645,
0.33843061327934265,
-0.14048004150390625,
-0.025530528277158737,
-0.1284632533788681,
0.023177742958068848,
0.17352622747421265,
-0.5626450777053833,
0.271378755569458,
-0.06540650129318237,
-0.2709812521934509,
-0.11489340662956238,
-0.10094986110925674,
0.12911805510520935,
0.31914493441581726,
-0.13140632212162018,
0.2080860137939453,
0.08761487901210785,
-0.26204538345336914,
0.4469103217124939,
0.4385589063167572,
0.4243924021720886,
0.09201037138700485,
0.25650113821029663,
0.1591477245092392,
0.013772964477539062,
-0.10222363471984863,
0.08200797438621521,
0.28681114315986633,
0.1291278749704361,
0.20502474904060364,
0.02771691605448723,
0.14129891991615295,
-0.15018807351589203,
0.04228007420897484,
0.03698370233178139,
0.22105661034584045,
-0.22927236557006836,
0.035881489515304565,
-0.12407995760440826,
-0.14284175634384155,
-0.2701677083969116,
0.0754527673125267,
-0.2419286072254181,
0.0809951052069664,
0.18887312710285187,
-0.11067988723516464,
-0.1343548446893692,
-0.10525757074356079,
0.07636292278766632,
0.0034680403769016266,
0.2788277864456177,
0.26043516397476196,
0.17923468351364136,
-0.1417943388223648,
-0.28495699167251587,
-0.636757493019104,
-0.1215856745839119,
-0.19839684665203094,
-0.3157081604003906,
-0.12542077898979187,
0.15236671268939972,
0.10022259503602982,
-0.11194951832294464,
0.20924057066440582,
-0.1976144015789032,
0.06584780663251877,
0.2704836130142212,
-0.2920975983142853,
-0.024375993758440018,
0.12257033586502075,
0.22900089621543884,
-0.07576936483383179,
0.13082563877105713,
0.18342891335487366,
-0.04416395723819733,
0.04067584127187729,
-0.133156418800354,
0.15907488763332367,
-0.15002089738845825,
-0.3029387891292572,
0.40398919582366943,
-0.02588118053972721,
0.48357340693473816,
-0.19107657670974731,
-0.04529841989278793,
-0.2209404706954956,
-0.1799403429031372,
-0.3195425868034363,
0.07271040976047516,
0.22735705971717834,
0.37821778655052185,
-0.0790906772017479,
-0.2383906990289688,
0.17574083805084229,
0.22238384187221527,
0.011765211820602417,
0.07103168964385986,
-0.419750839471817,
0.1205223873257637,
0.06760232895612717,
0.021242376416921616,
0.2842443883419037,
0.08336992561817169,
0.04302716255187988,
-0.09946504235267639,
-0.12891650199890137,
-0.5379427075386047,
0.38462117314338684,
-0.4499063789844513,
-0.037532173097133636,
-0.2168271541595459,
0.014950670301914215,
-0.0465150848031044,
0.2113172560930252,
-0.5107062458992004,
0.014566905796527863,
0.3063628375530243,
0.09975224733352661,
-0.2833559811115265,
0.6269772052764893,
0.07193072140216827,
-0.11046712100505829,
0.03477687016129494,
-0.1282593309879303,
-0.47356078028678894,
-0.08697912096977234,
0.06059492006897926,
-0.14816752076148987
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | Is this issue still open, i am new to open source thus want to take this one as my start. | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 20 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Is this issue still open, i am new to open source thus want to take this one as my start. | [
-0.12723146378993988,
-0.025075674057006836,
-0.17746062576770782,
0.1357826292514801,
0.24956050515174866,
0.06755302101373672,
0.24362221360206604,
-0.07059194147586823,
-0.14677967131137848,
-0.014682725071907043,
-0.0788627564907074,
0.1004960685968399,
-0.34198376536369324,
0.20703056454658508,
-0.005711616016924381,
-0.08475883305072784,
0.06722754240036011,
-0.05823543667793274,
0.21030205488204956,
-0.38223540782928467,
-0.434174120426178,
-0.06588254123926163,
-0.08192209899425507,
-0.31528228521347046,
-0.05812400206923485,
-0.22671562433242798,
-0.38397693634033203,
-0.011273734271526337,
-0.4038715660572052,
-0.4366864860057831,
0.007957713678479195,
0.08862732350826263,
-0.00396453682333231,
0.5594335198402405,
-0.0001113418911700137,
-0.08576152473688126,
0.14860740303993225,
0.10858131945133209,
0.11072440445423126,
-0.15224604308605194,
-0.19307002425193787,
-0.3233495056629181,
-0.2642739713191986,
-0.22199973464012146,
-0.11225662380456924,
-0.010665754787623882,
0.2985612452030182,
-0.09221692383289337,
0.24674144387245178,
0.19426488876342773,
0.2362193465232849,
-0.1712772101163864,
0.34360337257385254,
-0.18540515005588531,
0.19171345233917236,
0.2522333562374115,
-0.19556505978107452,
0.4044012427330017,
0.3432035744190216,
0.25295913219451904,
0.25551721453666687,
0.23846013844013214,
0.16093245148658752,
-0.1608976274728775,
0.3764941394329071,
0.0011263694614171982,
0.139787495136261,
-0.276091605424881,
0.09042707085609436,
0.33309680223464966,
0.6520015001296997,
0.20758002996444702,
-0.44140389561653137,
-0.10411838442087173,
0.019569534808397293,
-0.26698076725006104,
0.06818418949842453,
0.7078219056129456,
0.15929514169692993,
0.11327825486660004,
-0.3468233048915863,
-0.529280960559845,
-0.3156393766403198,
0.33847683668136597,
-0.2932851016521454,
0.26565372943878174,
-0.03562857210636139,
0.028609134256839752,
0.16024932265281677,
0.12476733326911926,
-0.14760521054267883,
0.04176636412739754,
0.05173460394144058,
0.3120002746582031,
-0.22869522869586945,
-0.12160597741603851,
-0.010571286082267761,
0.02578367292881012,
0.253383606672287,
0.012578139081597328,
-0.00927120354026556,
-0.1794309914112091,
-0.2212793081998825,
0.06270584464073181,
0.32996129989624023,
-0.04958806559443474,
-0.3706734776496887,
0.09165097773075104,
0.2590474486351013,
-0.06652837246656418,
-0.07546838372945786,
0.05978565663099289,
-0.11422321200370789,
-0.20187066495418549,
-0.181085005402565,
-0.28895485401153564,
0.3945378065109253,
-0.06157703697681427,
0.07704047113656998,
-0.15913037955760956,
0.12193547934293747,
-0.1435685157775879,
-0.09596013277769089,
0.3290345370769501,
0.14939498901367188,
-0.14479202032089233,
0.10761357843875885,
0.3132151961326599,
0.09363147616386414,
-0.07986344397068024,
-0.11822444945573807,
0.01171034574508667,
-0.23375332355499268,
-0.15946628153324127,
0.06100824847817421,
-0.23218074440956116,
-0.12237703800201416,
-0.03676503151655197,
-0.05289655923843384,
0.16673049330711365,
-0.0772562101483345,
-0.1493833363056183,
0.25284701585769653,
0.06402954459190369,
-0.2291802018880844,
-0.06631284952163696,
-0.02311057224869728,
0.09048405289649963,
-0.15682561695575714,
0.07127483934164047,
-0.38938215374946594,
-0.005614273250102997,
-0.7887875437736511,
0.17429791390895844,
-0.12420996278524399,
-0.1766456663608551,
-0.16034162044525146,
0.31660568714141846,
-0.07722552865743637,
0.14615777134895325,
0.05286577716469765,
0.08333851397037506,
-0.3869907855987549,
-0.30031660199165344,
-0.029048647731542587,
0.2452574223279953,
-0.22992047667503357,
0.06993202865123749,
-0.2601337134838104,
0.1938534826040268,
0.05935255438089371,
0.17245957255363464,
-0.07598771899938583,
0.19258353114128113,
-0.27148377895355225,
-0.11596591770648956,
0.13931147754192352,
-0.32206854224205017,
-0.39361029863357544,
0.04449666291475296,
-0.14363056421279907,
-0.2357710897922516,
0.1771087944507599,
0.32283905148506165,
0.14024780690670013,
-0.03728518635034561,
-0.12800654768943787,
0.29172801971435547,
-0.047791123390197754,
-0.25039270520210266,
-0.2548026740550995,
-0.20809122920036316,
-0.0988975465297699,
0.22335627675056458,
0.23761267960071564,
-0.11371781677007675,
0.3533616065979004,
-0.13274435698986053,
0.08722240477800369,
-0.24612468481063843,
-0.061085522174835205,
0.17099136114120483,
0.7696498036384583,
0.31353792548179626,
-0.008690916001796722,
-0.03219916671514511,
-0.007502667605876923,
0.04858732223510742,
0.11523918807506561,
0.20346400141716003,
0.17803002893924713,
-0.1637837439775467,
-0.06972358375787735,
-0.08499156683683395,
-0.2394288033246994,
-0.10055741667747498,
0.11526286602020264,
-0.1123909056186676,
-0.15548308193683624,
0.07765725255012512,
-0.12087815999984741,
0.2512061595916748,
-0.4180091619491577,
0.21772965788841248,
-0.007354032248258591,
0.44403037428855896,
-0.12572410702705383,
-0.11229006201028824,
0.015303738415241241,
0.012202095240354538,
-0.12102942913770676,
-0.2542210817337036,
0.04037610441446304,
0.264469712972641,
-0.23320133984088898,
-0.15393595397472382,
0.40213608741760254,
0.37257257103919983,
0.25387123227119446,
-0.627032995223999,
-0.003978254273533821,
-0.22271476686000824,
-0.016118180006742477,
-0.016120970249176025,
-0.30189889669418335,
0.050282180309295654,
0.05371832102537155,
-0.09697975963354111,
0.026974812150001526,
0.1376984864473343,
0.05642016977071762,
-0.28250983357429504,
-0.04143188148736954,
0.15735840797424316,
0.28091809153556824,
-0.06863389909267426,
0.037595052272081375,
-0.12322986125946045,
-0.24122847616672516,
-0.14941748976707458,
0.33275577425956726,
0.008426960557699203,
0.13062618672847748,
0.3603442311286926,
-0.015607938170433044,
0.28159719705581665,
-0.005085820332169533,
0.09882007539272308,
0.2812807559967041,
0.3338010311126709,
-0.24799570441246033,
-0.009576892480254173,
0.043841246515512466,
0.16486336290836334,
0.050739966332912445,
0.2588104009628296,
0.14293333888053894,
-0.08992228657007217,
0.45061036944389343,
0.11012862622737885,
-0.21039047837257385,
0.08859872817993164,
0.0727597326040268,
-0.08780113607645035,
-0.14614734053611755,
-0.1160157322883606,
0.1128125786781311,
-0.0908762514591217,
-0.08207380771636963,
0.46526700258255005,
-0.25828221440315247,
-0.008897684514522552,
0.002166280522942543,
-0.06126152351498604,
0.13680431246757507,
0.14901767671108246,
-0.38682255148887634,
0.6489247679710388,
-0.22417190670967102,
-0.04321298748254776,
0.27067098021507263,
-0.03996317461133003,
-0.07595756649971008,
0.11754196882247925,
0.41905125975608826,
-0.36691418290138245,
0.6657752990722656,
-0.044547729194164276,
0.34246766567230225,
-0.5122650861740112,
-0.8566833734512329,
-0.0992927998304367,
-0.06431100517511368,
0.2750186324119568,
0.24222323298454285,
0.07841598987579346,
-0.28120625019073486,
-0.23023943603038788,
0.1591676026582718,
-0.2566477656364441,
-0.25186407566070557,
-0.13669487833976746,
-0.06778646260499954,
-0.005652598571032286,
-0.019510885700583458,
-0.21434873342514038,
-0.3511289358139038,
-0.29979828000068665,
0.34717339277267456,
0.16272294521331787,
0.040830932557582855,
0.41620293259620667,
0.07934053987264633,
-0.18826709687709808,
0.020462658256292343,
-0.09956751763820648,
-0.1622416377067566,
-0.1116320788860321,
0.25684499740600586,
-0.11092285066843033,
-0.5716646313667297,
0.25470104813575745,
-0.18973517417907715,
0.30746549367904663,
0.009541545063257217,
-0.5959734320640564,
-0.10174372047185898,
-0.008489986881613731,
0.19503134489059448,
0.05905448645353317,
0.018540995195508003,
0.27040553092956543,
-0.12254131585359573,
-0.15705566108226776,
-0.29021069407463074,
-0.1612987369298935,
0.18240998685359955,
0.23436599969863892,
0.3838920593261719,
0.12607082724571228,
0.17859047651290894,
0.12778083980083466,
0.5718813538551331,
-0.0784016102552414,
-0.16292031109333038,
0.448055237531662,
-0.01545526273548603,
0.3838171362876892,
-0.0024156197905540466,
-0.48242419958114624,
0.36514052748680115,
0.013356432318687439,
-0.05517808347940445,
0.1508883684873581,
0.251748651266098,
-0.3225555121898651,
-0.035676728934049606,
0.16344453394412994,
-0.46896055340766907,
0.04242834076285362,
0.09692364931106567,
0.04552605375647545,
0.2756164073944092,
-0.03353555127978325,
-0.3020830750465393,
-0.4730357825756073,
-0.20435994863510132,
0.0718366950750351,
0.42813247442245483,
0.17727622389793396,
-0.33784082531929016,
-0.30159592628479004,
0.041110195219516754,
-0.22321924567222595,
0.20121796429157257,
-0.2007741779088974,
0.05889806151390076,
-0.27393200993537903,
0.25392380356788635,
0.24786719679832458,
-0.09370123594999313,
0.7642983794212341,
-0.31091737747192383,
-0.27669960260391235,
0.29061391949653625,
0.17985913157463074,
0.027435095980763435,
0.027174431830644608,
-0.0642254501581192,
-0.2464400827884674,
0.3136458694934845,
0.06870891153812408,
-0.3022845685482025,
0.18629783391952515,
0.45960983633995056,
-0.18510450422763824,
-0.258211225271225,
-0.17120489478111267,
-0.1609647423028946,
-0.26588061451911926,
0.023375773802399635,
-0.22641083598136902,
0.0029921289533376694,
0.01135692186653614,
0.23013022541999817,
-0.05819305405020714,
-0.2925305962562561,
-0.05778198316693306,
0.24350447952747345,
-0.37584760785102844,
0.05525128170847893,
0.5138986706733704,
0.31566277146339417,
0.019045326858758926,
0.13382670283317566,
0.3550950288772583,
0.5394899845123291,
-0.2324112057685852,
-0.306104838848114,
0.18132182955741882,
-0.21767708659172058,
0.3362782895565033,
0.2523399293422699,
0.3278011083602905,
-0.06622577458620071,
0.008395226672291756,
0.08456915616989136,
-0.3609900176525116,
0.3030607998371124,
0.488820880651474,
-0.050663478672504425,
-0.35930463671684265,
-0.45338717103004456,
0.32553771138191223,
0.20236684381961823,
-0.20000098645687103,
0.44050222635269165,
0.49639803171157837,
-0.10627327859401703,
0.16879408061504364,
0.2442847490310669,
1.1963077783584595,
-0.4627082347869873,
0.002171095460653305,
0.07228157669305801,
-0.4212470054626465,
0.24948541820049286,
0.029892943799495697,
0.07812194526195526,
0.013531792908906937,
-0.15869243443012238,
-0.0073795802891254425,
-0.2565162479877472,
0.20675888657569885,
0.1412721574306488,
-0.00182444229722023,
-0.08652833849191666,
-0.025151856243610382,
0.17675837874412537,
0.01767677441239357,
0.41928282380104065,
0.20844826102256775,
-0.047454167157411575,
-0.036803048104047775,
0.21870458126068115,
0.2546182870864868,
0.0443110391497612,
-0.2271347939968109,
-0.3638955354690552,
-0.3536042273044586,
-0.045086801052093506,
-0.24945755302906036,
-0.2078525424003601,
0.005458324681967497,
0.0575655996799469,
0.11685934662818909,
-0.4196041226387024,
0.44128283858299255,
0.20840579271316528,
0.36459487676620483,
-0.09239570796489716,
-0.19405455887317657,
0.3618841767311096,
-0.014971524477005005,
-0.226346954703331,
0.09238892048597336,
-0.05851375311613083,
0.15680968761444092,
-0.07333557307720184,
-0.17380794882774353,
0.3424008786678314,
0.11402934789657593,
-0.4544519782066345,
-0.27679044008255005,
-0.043599411845207214,
0.2478308379650116,
-0.30968809127807617,
0.06938596069812775,
0.09732729196548462,
0.022230833768844604,
-0.040218476206064224,
0.139811709523201,
0.21896147727966309,
0.22111530601978302,
-0.048580318689346313,
0.26878005266189575,
-0.14518606662750244,
-0.07407748699188232,
0.1166648268699646,
0.3850660026073456,
-0.1097305491566658,
0.4224105775356293,
-0.14659863710403442,
0.042823269963264465,
-0.07863053679466248,
0.1541692316532135,
0.1210673376917839,
-0.47492581605911255,
-0.07613181322813034,
0.1718662530183792,
0.03918406367301941,
-0.02993069589138031,
0.06434513628482819,
0.21050570905208588,
-0.022191636264324188,
-0.024071142077445984,
-0.11495067179203033,
-0.16944175958633423,
0.1535865217447281,
-0.5004775524139404,
0.23836101591587067,
-0.37269327044487,
0.15064707398414612,
0.08086182177066803,
0.06628351658582687,
-0.3626556396484375,
0.15797685086727142,
-0.24512571096420288,
-0.1465751975774765,
0.19832903146743774,
-0.12696844339370728,
-0.1888631284236908,
-0.31934499740600586,
0.10952073335647583,
-0.22514890134334564,
-0.2576746344566345,
-0.16530022025108337,
0.1661112755537033,
0.1463201940059662,
0.07665231823921204,
0.0036457120440900326,
0.16202057898044586,
-0.27438104152679443,
-0.19530293345451355,
0.2621169686317444,
-0.12873050570487976,
-0.10374278575181961,
-0.07194197177886963,
-0.2100471407175064,
-0.0631219893693924,
0.020615797489881516,
0.2955339550971985,
0.1364045888185501,
-0.017286688089370728,
0.47599005699157715,
0.14836904406547546,
0.06520245969295502,
0.1735362410545349,
-0.005706183612346649,
-0.23691950738430023,
0.12733778357505798,
-0.15322783589363098,
-0.0073005929589271545,
0.5553807616233826,
-0.22572527825832367,
0.18020041286945343,
0.40650585293769836,
0.15492664277553558,
-0.11321258544921875,
-0.45710834860801697,
0.21394138038158417,
0.2029377520084381,
0.2545982003211975,
-0.4279552698135376,
-0.02922176755964756,
0.07509325444698334,
0.07208246737718582,
-0.007641136646270752,
0.06990283727645874,
0.39558202028274536,
0.22672241926193237,
-0.32113319635391235,
0.22117292881011963,
0.6176108121871948,
0.12320086359977722,
0.25524014234542847,
0.33400431275367737,
-0.04986133426427841,
-0.03713670000433922,
0.36248287558555603,
0.4434188902378082,
0.06504341959953308,
0.12839089334011078,
0.009583555161952972,
0.3855244219303131,
-0.03647938370704651,
0.09041185677051544,
0.4239555299282074,
-0.11913047730922699,
0.13414490222930908,
0.26736271381378174,
0.24834603071212769,
0.18605254590511322,
-0.13920487463474274,
0.12354008853435516,
-0.01273087877780199,
-0.46796491742134094,
-0.14686767756938934,
0.3538116216659546,
0.1521018147468567,
0.223489910364151,
-0.2355167269706726,
-0.07013078778982162,
-0.007607638835906982,
-0.020556610077619553,
0.12249709665775299,
-0.4194294214248657,
0.08401273190975189,
0.04971113055944443,
-0.19982962310314178,
0.061323992908000946,
-0.10412699729204178,
0.10962700098752975,
0.39355677366256714,
-0.23465906083583832,
0.25633975863456726,
-0.053337112069129944,
-0.04238457977771759,
0.539320170879364,
0.7535555958747864,
0.38233667612075806,
0.17141754925251007,
0.18059760332107544,
0.19728823006153107,
-0.05050666257739067,
-0.008594999089837074,
0.0803382471203804,
0.2377433478832245,
0.09800255298614502,
0.23848795890808105,
-0.009036581963300705,
0.15519976615905762,
-0.18481765687465668,
0.19789686799049377,
-0.1653084009885788,
0.11717313528060913,
-0.3673829138278961,
-0.17324680089950562,
-0.262018620967865,
-0.21292933821678162,
-0.2103828340768814,
0.001850612461566925,
-0.10587798058986664,
-0.009875102899968624,
0.10421614348888397,
-0.19180431962013245,
0.009242422878742218,
0.02139519527554512,
0.0827614814043045,
-0.11788508296012878,
0.12569467723369598,
0.3046149015426636,
0.24706441164016724,
-0.21018466353416443,
-0.43239903450012207,
-0.6115103363990784,
0.07587957382202148,
-0.23072966933250427,
-0.36603227257728577,
-0.07076505571603775,
0.23288799822330475,
0.2820899486541748,
-0.18000060319900513,
0.2848578095436096,
-0.36548081040382385,
-0.08476541191339493,
0.25897571444511414,
-0.38558435440063477,
0.027499567717313766,
0.24539020657539368,
0.19650213420391083,
-0.1325080394744873,
0.07402853667736053,
0.2802569270133972,
-0.19489601254463196,
0.03977171331644058,
0.07970690727233887,
0.14305497705936432,
-0.17992252111434937,
-0.2577814757823944,
0.43035241961479187,
-0.0459262877702713,
0.3715413212776184,
-0.06737890839576721,
-0.06452034413814545,
-0.24438989162445068,
-0.3229747712612152,
-0.07499203085899353,
0.06637509912252426,
0.1632698029279709,
0.33448052406311035,
-0.1823475956916809,
-0.22009919583797455,
0.08833262324333191,
0.17841066420078278,
-0.12425359338521957,
0.08705590665340424,
-0.3174264430999756,
0.0675632655620575,
0.006641007959842682,
-0.10700438916683197,
0.3829573392868042,
0.08381178230047226,
-0.05366027355194092,
-0.18746082484722137,
-0.14356371760368347,
-0.4653051197528839,
0.4628969132900238,
-0.5885606408119202,
0.0859881192445755,
-0.24934299290180206,
0.10514704883098602,
-0.0012699887156486511,
0.28955724835395813,
-0.44968560338020325,
-0.060580380260944366,
0.41421663761138916,
0.17588642239570618,
-0.12789618968963623,
0.35260140895843506,
0.2684043049812317,
-0.19568724930286407,
0.12658295035362244,
-0.08220435678958893,
-0.5521867871284485,
-0.1891554892063141,
0.03657111898064613,
-0.015114158391952515
] |
https://github.com/huggingface/datasets/issues/4504 | Can you please add the Stanford dog dataset? | @zutarich This issue should have been closed since the dataset in question is available on the Hub [here](https://huggingface.co/datasets/dgrnd4/stanford_dog_dataset). | ## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 18 | Can you please add the Stanford dog dataset?
## Adding a Dataset
- **Name:** *Stanford dog dataset*
- **Description:** *The dataset is about 120 classes for a total of 20.580 images. You can find the dataset here http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Paper:** *http://vision.stanford.edu/aditya86/ImageNetDogs/*
- **Data:** *[link to the Github repository or current dataset location](http://vision.stanford.edu/aditya86/ImageNetDogs/)*
- **Motivation:** *The dataset has been built using images and annotation from ImageNet for the task of fine-grained image categorization. It is useful for fine-grain purpose *
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
@zutarich This issue should have been closed since the dataset in question is available on the Hub [here](https://huggingface.co/datasets/dgrnd4/stanford_dog_dataset). | [
-0.06610347330570221,
-0.16350549459457397,
-0.2129981368780136,
0.13738146424293518,
0.35532766580581665,
0.17979979515075684,
0.26349377632141113,
0.04641661420464516,
-0.050476931035518646,
0.13695375621318817,
-0.12249834090471268,
0.16249635815620422,
-0.27745142579078674,
0.10823237150907516,
0.04073886573314667,
-0.1659056842327118,
-0.03424527496099472,
-0.016443029046058655,
0.06534815579652786,
-0.20925970375537872,
-0.30184540152549744,
0.05640760064125061,
0.03624831885099411,
-0.3246856927871704,
-0.23150113224983215,
-0.10387789458036423,
-0.2762655019760132,
0.23038136959075928,
-0.2755076587200165,
-0.3663526177406311,
0.1272006779909134,
-0.011626362800598145,
-0.12068921327590942,
0.32046306133270264,
-0.0001015422458294779,
0.04114008694887161,
0.1502234935760498,
0.061172500252723694,
0.09613291919231415,
-0.03540793061256409,
-0.0808587372303009,
-0.28481772541999817,
-0.30548810958862305,
-0.2372727394104004,
-0.13794288039207458,
0.06724341213703156,
0.23024064302444458,
0.11426806449890137,
0.3092195391654968,
0.20277322828769684,
0.3344796597957611,
0.054575152695178986,
0.1784297227859497,
-0.2554910182952881,
0.054955482482910156,
0.16101565957069397,
-0.19357368350028992,
0.4301034212112427,
0.3147315979003906,
0.14328902959823608,
0.012474127113819122,
0.39078572392463684,
0.16858111321926117,
-0.12915974855422974,
0.29805463552474976,
0.0009651267901062965,
0.07047148793935776,
-0.2942988872528076,
0.11845787614583969,
0.19343748688697815,
0.26697587966918945,
0.12234672904014587,
-0.213091179728508,
-0.25196924805641174,
0.06418745964765549,
-0.1631884127855301,
0.05041564255952835,
0.41503992676734924,
0.045521292835474014,
0.07733824104070663,
-0.45855018496513367,
-0.18159203231334686,
-0.3787023425102234,
0.1810477077960968,
-0.1913333684206009,
0.13785919547080994,
-0.09943182021379471,
0.041175827383995056,
0.05170223489403725,
0.1788601279258728,
-0.16605326533317566,
0.06625758856534958,
0.05362076312303543,
0.1301434189081192,
-0.1941349357366562,
-0.19500963389873505,
0.06737799197435379,
0.18379104137420654,
0.33298423886299133,
0.049555640667676926,
0.1051211729645729,
-0.12413757294416428,
-0.003678159322589636,
0.03975591063499451,
0.12905441224575043,
0.05351315066218376,
-0.18496042490005493,
-0.08736458420753479,
0.15332849323749542,
0.11981065571308136,
-0.11193524301052094,
0.07890181988477707,
-0.02105845883488655,
-0.08586201071739197,
-0.16635507345199585,
-0.35380691289901733,
0.15589489042758942,
-0.004301302134990692,
-0.10903449356555939,
-0.03310101851820946,
0.1500689685344696,
0.030311590060591698,
-0.10327008366584778,
0.4150066375732422,
0.166738823056221,
-0.10476205497980118,
-0.02414194494485855,
0.21564650535583496,
0.06285019963979721,
-0.04187287762761116,
-0.2765679359436035,
0.08251061290502548,
-0.26482728123664856,
-0.022653764113783836,
0.1399487853050232,
-0.18614572286605835,
0.1286124736070633,
-0.10620497167110443,
-0.05563158541917801,
0.20104798674583435,
-0.11385634541511536,
-0.14901278913021088,
0.22924113273620605,
0.19689951837062836,
-0.09142269194126129,
-0.04648461565375328,
0.08182354271411896,
0.05058334022760391,
-0.1845012903213501,
-0.07836393266916275,
-0.3379104733467102,
-0.11821386218070984,
-0.5501718521118164,
0.29655978083610535,
-0.09046602994203568,
-0.2225438356399536,
-0.18538817763328552,
0.3731178641319275,
-0.10825652629137039,
0.24018868803977966,
0.04602230340242386,
0.0922449380159378,
-0.3824473023414612,
-0.2568782866001129,
-0.0410943441092968,
0.16769221425056458,
-0.16083714365959167,
-0.08319753408432007,
-0.21937264502048492,
0.02975311689078808,
0.043119944632053375,
0.22937093675136566,
-0.08681211620569229,
0.2518593966960907,
-0.29017767310142517,
0.1332027018070221,
0.031131885945796967,
-0.3174380660057068,
-0.40926897525787354,
0.04368176311254501,
-0.27422934770584106,
0.00953596644103527,
0.03453022241592407,
0.3275730013847351,
0.10640041530132294,
-0.10303029417991638,
-0.027683869004249573,
0.2643358111381531,
-0.11007325351238251,
-0.17152954638004303,
-0.1654335856437683,
-0.2462099939584732,
-0.13966937363147736,
0.3336045444011688,
0.20971548557281494,
-0.10030180960893631,
0.3417324721813202,
-0.08103098720312119,
0.12498466670513153,
-0.2409307062625885,
-0.018425313755869865,
0.24673564732074738,
0.4890737533569336,
0.33686363697052,
-0.022978389635682106,
-0.11926905065774918,
-0.12769338488578796,
0.1639494001865387,
0.1172618716955185,
0.33903586864471436,
0.019155412912368774,
-0.2314477562904358,
-0.2843269407749176,
-0.14243558049201965,
-0.24520976841449738,
-0.2532826364040375,
0.282483845949173,
-0.2259863018989563,
-0.0025326143950223923,
0.06612388789653778,
0.056166667491197586,
0.2995965778827667,
-0.39009222388267517,
0.21488353610038757,
-0.06479251384735107,
0.3632245659828186,
-0.2116020768880844,
-0.14695779979228973,
-0.023160941898822784,
0.005476929247379303,
-0.18844079971313477,
-0.16152113676071167,
0.06835536658763885,
0.2778480052947998,
-0.2666259706020355,
-0.10125546157360077,
0.4335131347179413,
0.24251440167427063,
0.23071403801441193,
-0.5586366653442383,
-0.03832467645406723,
-0.19863459467887878,
0.022117942571640015,
-0.009298980236053467,
-0.3219394385814667,
0.15031705796718597,
0.06830143928527832,
-0.03651817888021469,
0.039032600820064545,
0.08905478566884995,
0.1532880812883377,
-0.16427390277385712,
0.06797371059656143,
0.04099684953689575,
0.2130676954984665,
-0.08847580850124359,
0.0187888965010643,
-0.10238400101661682,
-0.24772821366786957,
0.06367883086204529,
0.264953076839447,
0.021335981786251068,
0.055802855640649796,
0.29654186964035034,
-0.19137480854988098,
0.20025762915611267,
0.10912412405014038,
0.14520083367824554,
0.27034831047058105,
0.40188127756118774,
-0.06452861428260803,
0.08252882957458496,
-0.06912171095609665,
-0.010083596222102642,
0.09020498394966125,
0.14896760880947113,
0.12716107070446014,
-0.10360603779554367,
0.4897490441799164,
0.055771127343177795,
-0.5310342311859131,
-0.025162652134895325,
-0.04964103549718857,
-0.058657094836235046,
-0.14548465609550476,
-0.11341673880815506,
0.09387848526239395,
-0.30723094940185547,
-0.013720580376684666,
0.33339163661003113,
-0.2694055438041687,
-0.09055297076702118,
0.1368129551410675,
0.026658326387405396,
-0.029512204229831696,
0.14048020541667938,
-0.3269605338573456,
0.5429571270942688,
-0.05164579302072525,
-0.005040861666202545,
0.13012370467185974,
0.08862102031707764,
-0.023605890572071075,
0.25403058528900146,
0.2298969328403473,
-0.1963183432817459,
0.6315525770187378,
-0.062050700187683105,
0.25976723432540894,
-0.44095638394355774,
-0.884124219417572,
0.013813789933919907,
-0.2835121154785156,
0.24826322495937347,
0.267822265625,
0.20570805668830872,
-0.24089020490646362,
-0.27384528517723083,
0.23530401289463043,
-0.14382317662239075,
-0.21127305924892426,
-0.08595648407936096,
-0.0976734459400177,
0.05785263329744339,
-0.13515086472034454,
-0.19127702713012695,
-0.19286756217479706,
-0.28888675570487976,
0.32251375913619995,
0.18323944509029388,
0.04189295321702957,
0.368797242641449,
0.22838081419467926,
-0.05384312942624092,
-0.24469387531280518,
-0.06419436633586884,
-0.26992860436439514,
-0.22396226227283478,
0.30475756525993347,
-0.1399817317724228,
-0.4614271819591522,
0.12906688451766968,
-0.14500188827514648,
0.34499993920326233,
-0.05805373191833496,
-0.582581102848053,
-0.3213050067424774,
-0.1262817531824112,
0.1774435192346573,
0.07174508273601532,
-0.03197892755270004,
0.23496095836162567,
-0.1787220537662506,
-0.2694042921066284,
-0.20800045132637024,
-0.04704833775758743,
0.21948644518852234,
0.09135439246892929,
0.22833120822906494,
-0.19185009598731995,
0.17832443118095398,
0.2668975591659546,
0.46408724784851074,
-0.02608858421444893,
-0.13162031769752502,
0.46807247400283813,
-0.09817170351743698,
0.35949960350990295,
-0.07616754621267319,
-0.39768558740615845,
0.43901240825653076,
-0.007697150111198425,
0.08622416108846664,
0.28278011083602905,
0.18763414025306702,
-0.23451706767082214,
0.1016816645860672,
-0.007862070575356483,
-0.35014936327934265,
-0.04651455581188202,
0.16600461304187775,
0.2647264003753662,
0.12459185719490051,
-0.04316526651382446,
-0.27097830176353455,
-0.27584365010261536,
-0.1790391206741333,
0.07285459339618683,
0.31551745533943176,
0.01755453646183014,
-0.22475536167621613,
-0.2899966835975647,
0.06747594475746155,
-0.3627825379371643,
0.1821495145559311,
-0.05061236768960953,
-0.058289654552936554,
-0.35882848501205444,
0.09050416201353073,
0.18862327933311462,
-0.027306552976369858,
0.7548815011978149,
-0.29310914874076843,
-0.12189751863479614,
0.15458032488822937,
-0.01313786394894123,
-0.23777952790260315,
0.12484736740589142,
-0.15965582430362701,
-0.10471241921186447,
0.23337098956108093,
0.2550837993621826,
-0.23682600259780884,
0.14308154582977295,
0.37680137157440186,
-0.17794765532016754,
-0.20234067738056183,
-0.1320858746767044,
-0.1755029410123825,
-0.2910572290420532,
-0.12178212404251099,
-0.041349656879901886,
0.04031313210725784,
0.044444892555475235,
0.1664561629295349,
-0.22195234894752502,
-0.10635702311992645,
-0.043639279901981354,
0.15333448350429535,
-0.151683509349823,
-0.06005936115980148,
0.353120356798172,
0.23683255910873413,
-0.012300893664360046,
0.1580066680908203,
0.28995391726493835,
0.5825524926185608,
-0.17516641318798065,
-0.2946225106716156,
0.08037377893924713,
-0.14968611299991608,
0.20868024230003357,
0.3289235532283783,
0.22183413803577423,
-0.08369914442300797,
0.04192202538251877,
0.23875264823436737,
-0.4006015360355377,
0.39021575450897217,
0.4668157696723938,
-0.12245816737413406,
-0.19912095367908478,
-0.20387627184391022,
0.3619445860385895,
0.12984341382980347,
-0.03911649063229561,
0.23445037007331848,
0.6293227076530457,
-0.2813335657119751,
0.13140596449375153,
0.2842191159725189,
1.0693819522857666,
-0.2786629796028137,
0.11124277859926224,
0.16368591785430908,
-0.220222607254982,
0.3873020112514496,
0.13572613894939423,
0.10792381316423416,
-0.04834804683923721,
-0.2728230655193329,
0.06213337928056717,
-0.11667321622371674,
0.14053674042224884,
0.237221822142601,
0.013771530240774155,
-0.09110057353973389,
0.012291230261325836,
0.2096078246831894,
-0.06373804062604904,
0.23094168305397034,
-0.1649869680404663,
-0.21844995021820068,
-0.09475527703762054,
0.36098533868789673,
0.2540763020515442,
0.022771302610635757,
-0.18186962604522705,
-0.21227097511291504,
-0.31340232491493225,
-0.15300744771957397,
-0.17781352996826172,
-0.1470767855644226,
-0.09934079647064209,
0.0068604592233896255,
0.041423916816711426,
-0.2576438784599304,
0.22632010281085968,
0.09467098116874695,
0.25677719712257385,
-0.0960162878036499,
-0.27638718485832214,
0.42609068751335144,
-0.07367684692144394,
-0.17404457926750183,
0.07101955264806747,
-0.13025937974452972,
0.1759297102689743,
-0.14202040433883667,
0.007879562675952911,
0.053715579211711884,
0.16899453103542328,
-0.3471861481666565,
-0.2950144410133362,
-0.0009804293513298035,
-0.031357407569885254,
-0.3367237150669098,
-0.00564957782626152,
-0.01673881709575653,
-0.009250005707144737,
-0.13099226355552673,
0.2515339255332947,
0.08889941871166229,
0.21077992022037506,
-0.012951523065567017,
0.18417561054229736,
-0.10763590037822723,
-0.0703006386756897,
0.2220645248889923,
0.23275437951087952,
-0.14073175191879272,
0.31683969497680664,
-0.11146564781665802,
-0.07539598643779755,
-0.24935400485992432,
-0.051181610673666,
0.2573259472846985,
-0.5357478857040405,
0.07768387347459793,
0.15534302592277527,
-0.021606341004371643,
-0.06286919116973877,
0.07466930896043777,
0.22986425459384918,
-0.17183247208595276,
-0.03711716830730438,
-0.09913673996925354,
-0.24046596884727478,
0.2496911883354187,
-0.26562249660491943,
0.35231542587280273,
-0.3591206669807434,
0.27254605293273926,
0.10533745586872101,
0.057742856442928314,
-0.48896244168281555,
0.1833890825510025,
-0.2655978798866272,
-0.07853230834007263,
0.11901523172855377,
-0.06668617576360703,
0.053901705890893936,
-0.190939262509346,
0.2417171597480774,
-0.055045925080776215,
-0.21153949201107025,
-0.31327512860298157,
0.049415308982133865,
0.07832267135381699,
0.10511115938425064,
0.02673119120299816,
0.23989056050777435,
-0.079552561044693,
-0.22683316469192505,
0.125940203666687,
0.11398479342460632,
-0.0277569442987442,
-0.04177061468362808,
-0.14971138536930084,
0.05509238690137863,
0.013937409967184067,
0.33029836416244507,
-0.04203498363494873,
-0.09345225989818573,
0.41039013862609863,
0.17921240627765656,
-0.026446156203746796,
-0.017498070374131203,
-0.058857567608356476,
0.04900562763214111,
0.21533045172691345,
0.006343275308609009,
-0.02783094346523285,
0.44016289710998535,
-0.05676140636205673,
-0.061906784772872925,
0.4276708662509918,
0.2802373170852661,
-0.14014293253421783,
-0.49441051483154297,
0.0788494348526001,
0.14081525802612305,
0.38813677430152893,
-0.4541482627391815,
-0.12862102687358856,
0.020783016458153725,
-0.12532468140125275,
0.09666937589645386,
0.11248023808002472,
0.2894108295440674,
0.27037668228149414,
-0.25005972385406494,
0.14683377742767334,
0.6967599391937256,
0.10082504898309708,
0.011500868014991283,
0.2547989785671234,
-0.10568977892398834,
-0.05839568004012108,
0.31760892271995544,
0.21348118782043457,
0.22975759208202362,
0.26892122626304626,
0.009736493229866028,
0.4976794421672821,
-0.1685379445552826,
0.05383065715432167,
0.45805904269218445,
0.0106210857629776,
0.033259838819503784,
0.22517062723636627,
0.13728705048561096,
0.23066917061805725,
-0.09189115464687347,
0.2589452266693115,
-0.07718904316425323,
-0.4488873779773712,
-0.21351642906665802,
0.26130858063697815,
-0.021661482751369476,
0.2131211906671524,
-0.2762550711631775,
-0.1490265429019928,
-0.15076252818107605,
0.04790237173438072,
0.06031505763530731,
-0.43078815937042236,
0.24390602111816406,
-0.11398249864578247,
-0.31780993938446045,
-0.15119843184947968,
-0.23448070883750916,
0.12566101551055908,
0.3204365074634552,
-0.12001416087150574,
0.19336342811584473,
0.16235169768333435,
-0.13894213736057281,
0.458220899105072,
0.6519602537155151,
0.3577350080013275,
-0.008111674338579178,
0.31863459944725037,
0.05830429121851921,
-0.008813494816422462,
-0.05633767321705818,
-0.11589497327804565,
0.1840476393699646,
0.15064486861228943,
0.1869802474975586,
0.1124771237373352,
0.25457999110221863,
-0.2956119775772095,
-0.02617247775197029,
-0.009102333337068558,
0.1623457819223404,
-0.22637519240379333,
-0.08126241713762283,
-0.27354180812835693,
-0.05258536338806152,
-0.2686907947063446,
0.03871385380625725,
-0.2732985019683838,
0.03360748291015625,
0.10485589504241943,
-0.20655383169651031,
0.06681307405233383,
-0.10518082976341248,
0.13970054686069489,
-0.08839023113250732,
0.3967937231063843,
0.2255125790834427,
0.1467941701412201,
-0.13676011562347412,
-0.4094533324241638,
-0.7151962518692017,
0.0643269419670105,
-0.2208099365234375,
-0.23438340425491333,
-0.049213308840990067,
0.15050335228443146,
0.10981697589159012,
-0.12779738008975983,
0.307308554649353,
-0.18190139532089233,
0.07596394419670105,
0.12710648775100708,
-0.30396854877471924,
0.07630856335163116,
0.2106923758983612,
0.010895888321101665,
-0.027175869792699814,
-0.017606031149625778,
0.33046314120292664,
-0.049069538712501526,
0.18324226140975952,
0.0465640053153038,
0.16102023422718048,
-0.2540518641471863,
-0.27429506182670593,
0.43512845039367676,
0.035465311259031296,
0.30708593130111694,
-0.19231435656547546,
-0.14964130520820618,
-0.2462555468082428,
-0.2558731734752655,
-0.2858077585697174,
0.03705504164099693,
0.23840457201004028,
0.4758012592792511,
-0.05622493475675583,
-0.23779581487178802,
0.18217237293720245,
0.2423638254404068,
0.05471084266901016,
0.08290370553731918,
-0.3897610902786255,
0.20746155083179474,
-0.03704053908586502,
0.028034960851073265,
0.13248015940189362,
0.2409331500530243,
0.039813779294490814,
-0.16308125853538513,
-0.1861131638288498,
-0.6838979721069336,
0.49738815426826477,
-0.4422747492790222,
-0.12726439535617828,
-0.12169208377599716,
0.08868986368179321,
0.04670315980911255,
0.25451135635375977,
-0.5185887813568115,
-0.023274995386600494,
0.31144776940345764,
0.11757064610719681,
-0.25048863887786865,
0.504941463470459,
0.0855698436498642,
-0.2629987597465515,
0.05851254239678383,
-0.1195719987154007,
-0.29252272844314575,
-0.18498292565345764,
0.13362562656402588,
-0.17463023960590363
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | Hi @cccntu you're right, as when `batch_examples={}` the current if-statement won't be triggered as the condition won't be satisfied, I'll prepare a PR to address it as well as add the regression tests so that this issue is handled properly. | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 40 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
Hi @cccntu you're right, as when `batch_examples={}` the current if-statement won't be triggered as the condition won't be satisfied, I'll prepare a PR to address it as well as add the regression tests so that this issue is handled properly. | [
-0.12480945885181427,
-0.17950332164764404,
-0.13585320115089417,
0.3129453659057617,
-0.39193952083587646,
-0.37311267852783203,
0.25738805532455444,
0.24794600903987885,
-0.030070852488279343,
0.1524513214826584,
0.7762278914451599,
0.34563717246055603,
-0.29168418049812317,
-0.0042254626750946045,
-0.11736811697483063,
-0.011189255863428116,
0.24303573369979858,
0.4399155378341675,
0.1552925705909729,
-0.005139574408531189,
-0.2918039560317993,
0.3094947636127472,
-0.5800380110740662,
0.24941928684711456,
-0.018835699185729027,
-0.1335637867450714,
0.19982343912124634,
-0.01556580513715744,
-0.1384008377790451,
-0.261261522769928,
0.023937707766890526,
0.17615078389644623,
0.04919291287660599,
0.08896780759096146,
-0.00012041823356412351,
-0.08060194551944733,
0.2204182893037796,
-0.033645790070295334,
0.008923562243580818,
-0.2710556387901306,
-0.10389228165149689,
0.1466057151556015,
-0.014427185989916325,
-0.25484341382980347,
0.25891679525375366,
-0.20404917001724243,
-0.0728958249092102,
-0.2694818377494812,
0.42620062828063965,
0.2386959344148636,
0.1328621357679367,
0.1959245651960373,
0.15029151737689972,
0.28795138001441956,
0.5529860258102417,
0.4127475619316101,
-0.0911196917295456,
0.1443450152873993,
0.17192447185516357,
-0.09373191744089127,
-0.0038301795721054077,
0.46343982219696045,
0.10236681997776031,
0.11006513237953186,
0.14834871888160706,
0.31328606605529785,
0.24600985646247864,
-0.21026551723480225,
-0.08172351121902466,
0.1753612905740738,
0.22948524355888367,
-0.163313090801239,
-0.283016175031662,
-0.16257505118846893,
-0.09617206454277039,
-0.5086462497711182,
0.3998897075653076,
-0.03223588317632675,
-0.355685293674469,
-0.04066350683569908,
0.20543141663074493,
0.0400085486471653,
-0.2134636640548706,
0.009440649300813675,
0.07836504280567169,
0.3736170530319214,
-0.16201715171337128,
0.17379772663116455,
0.10298031568527222,
0.1862369179725647,
0.5547454357147217,
-0.14726972579956055,
-0.6149206757545471,
0.2144392877817154,
-0.16709285974502563,
-0.00039255619049072266,
-0.014338240027427673,
0.02918340265750885,
-0.07524119317531586,
0.3428736925125122,
0.41112473607063293,
-0.07746066153049469,
0.2258962094783783,
-0.08557217568159103,
0.15843631327152252,
0.0006050998345017433,
0.3666670322418213,
0.4172763228416443,
0.06050855666399002,
0.0847611352801323,
-0.060392409563064575,
-0.15781360864639282,
-0.18384799361228943,
-0.5457600951194763,
0.6663516759872437,
0.0564611479640007,
0.16707853972911835,
-0.030061805620789528,
-0.2675201892852783,
0.25065070390701294,
-0.5815935134887695,
-0.21109040081501007,
0.05853613093495369,
0.032998815178871155,
0.05992138758301735,
0.19185015559196472,
0.26397210359573364,
0.26221245527267456,
0.055863551795482635,
0.22607433795928955,
0.02994735911488533,
-0.2638202905654907,
-0.2423013299703598,
-0.14304208755493164,
-0.15040183067321777,
0.04469974711537361,
0.20462338626384735,
0.20068076252937317,
0.09162630140781403,
-0.3987680673599243,
0.15182450413703918,
-0.2632627487182617,
0.2835615277290344,
0.08446314930915833,
-0.31998616456985474,
0.01889118365943432,
-0.020241986960172653,
-0.16445262730121613,
0.0924801155924797,
0.5110885500907898,
-0.11550580710172653,
0.06262470781803131,
-0.13284720480442047,
0.1623334288597107,
-0.2104300856590271,
0.11104699224233627,
-0.5578680038452148,
-0.1292845457792282,
0.3215577304363251,
-0.007481176406145096,
0.48539578914642334,
-0.17008450627326965,
0.1559707522392273,
-0.17468078434467316,
0.05037958174943924,
0.47796905040740967,
-0.4814177453517914,
0.21533998847007751,
-0.05935167148709297,
0.06231795623898506,
0.039654891937971115,
0.2136838734149933,
-0.30169734358787537,
0.4532034695148468,
-0.5266818404197693,
-0.0016036853194236755,
0.6288175582885742,
-0.11064855754375458,
0.26799502968788147,
0.38087669014930725,
-0.30600494146347046,
0.03016624040901661,
0.28778529167175293,
0.05148486793041229,
-0.11520475149154663,
-0.07291188836097717,
-0.16878315806388855,
-0.18017247319221497,
0.11518172174692154,
0.0013776477426290512,
-0.19513638317584991,
0.0014659538865089417,
0.05330409109592438,
-0.2068851739168167,
0.25805366039276123,
-0.023943379521369934,
-0.19110563397407532,
-0.46473437547683716,
0.5002337098121643,
-0.16780546307563782,
0.11611656844615936,
-0.17705194652080536,
0.5396378040313721,
-0.08502165973186493,
0.13819216191768646,
-0.10871083289384842,
-0.12528583407402039,
-0.02701909840106964,
-0.6174269914627075,
-0.2852536141872406,
0.05090535059571266,
0.0054330602288246155,
-0.031916312873363495,
0.2566656172275543,
-0.10446935892105103,
0.2038668841123581,
0.06457079201936722,
-0.17720207571983337,
-0.08814431726932526,
-0.028923166915774345,
-0.2972480058670044,
0.010715816169977188,
-0.1857409030199051,
0.05887431651353836,
-0.07355432212352753,
0.030083900317549706,
0.007164614275097847,
-0.14278395473957062,
-0.19711142778396606,
0.03326442837715149,
0.08722765743732452,
0.023909257724881172,
-0.03706828132271767,
0.40377217531204224,
-0.0889187604188919,
0.1473959982395172,
-0.3394719660282135,
-0.4085195064544678,
-0.03180878609418869,
-0.19022543728351593,
0.1682104915380478,
0.1327919214963913,
0.35910773277282715,
-0.06012561917304993,
0.04791376367211342,
0.3598773777484894,
-0.05199890956282616,
0.42546960711479187,
-0.08175128698348999,
-0.1698714643716812,
-0.3041713535785675,
-0.005856949836015701,
-0.15953339636325836,
-0.20981904864311218,
0.4300495982170105,
-0.08256854116916656,
0.2278342992067337,
0.19251495599746704,
-0.360899955034256,
0.020472265779972076,
0.08069892227649689,
0.06421703100204468,
0.09312102198600769,
0.09372915327548981,
0.039113860577344894,
0.12556329369544983,
-0.10314571857452393,
0.1059098094701767,
0.4406265616416931,
0.1290118545293808,
-0.34649229049682617,
-0.24515298008918762,
0.23379482328891754,
-0.4066995084285736,
0.5180386900901794,
-0.019339248538017273,
0.2789143919944763,
0.08268388360738754,
-0.1055152639746666,
-0.04374662786722183,
-0.0541941300034523,
-0.17893165349960327,
0.0683198943734169,
-0.1663753092288971,
-0.5216745138168335,
0.1564289778470993,
0.061496227979660034,
0.16107195615768433,
-0.6031196117401123,
-0.16632568836212158,
-0.09668383002281189,
-0.15007764101028442,
0.0905044674873352,
-0.029276598244905472,
-0.22958588600158691,
-0.36449548602104187,
-0.34147390723228455,
0.0032728761434555054,
-0.19362984597682953,
-0.1915079951286316,
-0.011223327368497849,
-0.1895628124475479,
-0.25236639380455017,
0.056739430874586105,
0.03398849442601204,
0.29725199937820435,
0.24742145836353302,
0.06938014179468155,
-0.14721105992794037,
-0.15174803137779236,
-0.04176271706819534,
-0.0743461400270462,
-0.19165284931659698,
0.006552662700414658,
0.22241070866584778,
0.031119652092456818,
0.10209481418132782,
-0.21115519106388092,
-0.022417258471250534,
-0.04525643587112427,
-0.1830311268568039,
0.19382573664188385,
0.3285979628562927,
-0.05673089250922203,
-0.2821245789527893,
-0.02921328693628311,
0.1291656345129013,
-0.1533718705177307,
0.1979323774576187,
0.1828954815864563,
0.2109045535326004,
0.32029327750205994,
0.27668964862823486,
0.01380139123648405,
-0.08863817900419235,
-0.216574564576149,
0.1686386913061142,
-0.06650780141353607,
0.2111169397830963,
0.06633928418159485,
-0.18616044521331787,
-0.11915521323680878,
-0.03715746849775314,
-0.12011949717998505,
0.05327935144305229,
-0.2793580889701843,
0.11369598656892776,
-0.09177300333976746,
-0.01922767050564289,
-0.25823548436164856,
0.2384975552558899,
0.26381903886795044,
0.23201359808444977,
-0.17265893518924713,
-0.23529058694839478,
0.06308548152446747,
0.7010570168495178,
-0.41740328073501587,
0.037652380764484406,
0.20249006152153015,
0.2535099983215332,
-0.3545016348361969,
0.7002885937690735,
0.29170385003089905,
-0.05175403878092766,
0.17590796947479248,
-0.03882567584514618,
0.11934829503297806,
0.16522924602031708,
0.02237045206129551,
0.05245465785264969,
0.25230225920677185,
-0.12771037220954895,
-0.08618035912513733,
-0.200630784034729,
0.035580750554800034,
-0.05207822099328041,
0.07520337402820587,
-0.11535497009754181,
-0.316445916891098,
0.4052836298942566,
-0.6828279495239258,
0.02439713478088379,
-0.2925335466861725,
0.05731308460235596,
-0.12121017277240753,
-0.01252300851047039,
-0.17410801351070404,
-0.12297962605953217,
0.5058841109275818,
-0.2483217418193817,
-0.17526482045650482,
-0.08183585107326508,
-0.09068290144205093,
0.22167909145355225,
0.20855166018009186,
0.30696770548820496,
0.2332630306482315,
-0.14764752984046936,
0.05765227600932121,
-0.19283118844032288,
0.5712798833847046,
0.03850986808538437,
-0.044116683304309845,
-0.024831723421812057,
0.4942014813423157,
-0.24097861349582672,
-0.14649346470832825,
-0.4682192802429199,
0.4117901921272278,
-0.20230142772197723,
-0.0905226469039917,
-0.00954892486333847,
-0.12631575763225555,
0.33825626969337463,
-0.12205764651298523,
-0.09611518681049347,
-0.5064096450805664,
-0.535550057888031,
0.25954458117485046,
-0.0813017189502716,
0.21787452697753906,
0.32804185152053833,
0.10030373930931091,
-0.22920885682106018,
-0.28020769357681274,
-0.1021985337138176,
0.008990254253149033,
-0.11579872667789459,
-0.19449105858802795,
0.2709890902042389,
-0.5173294544219971,
-0.11436554789543152,
-0.14635194838047028,
-0.12861603498458862,
0.2818238437175751,
0.08929411321878433,
0.0904703363776207,
0.060537196695804596,
-0.13938698172569275,
-0.2860677242279053,
0.5360122919082642,
0.279280424118042,
-0.3300829529762268,
0.3934858739376068,
0.378083735704422,
0.278258740901947,
-0.06068902090191841,
-0.35898321866989136,
0.36341598629951477,
0.14960412681102753,
-0.21955670416355133,
0.04406902194023132,
0.5871080756187439,
0.08769695460796356,
0.015317372977733612,
0.4807990789413452,
0.46884971857070923,
-0.44794872403144836,
0.3796067237854004,
0.15003076195716858,
0.760797917842865,
0.3521087169647217,
-0.04819784685969353,
0.06469417363405228,
-0.3281106948852539,
0.30118271708488464,
0.21223627030849457,
0.13117700815200806,
-0.3200908899307251,
0.31973162293434143,
-0.03217543289065361,
-0.19151200354099274,
0.1712189018726349,
0.14809727668762207,
-0.2101365625858307,
0.12063661217689514,
-0.2827374041080475,
0.15475602447986603,
-0.15049655735492706,
-0.051703404635190964,
-0.23413333296775818,
-0.14796476066112518,
-0.039614126086235046,
-0.010848883539438248,
0.1507393717765808,
-0.036991436034440994,
-0.178268700838089,
-0.4045787453651428,
-0.22243747115135193,
-0.2949221134185791,
-0.40615183115005493,
-0.023781970143318176,
-0.6266693472862244,
-0.29184067249298096,
0.2987465560436249,
-0.4452151656150818,
0.23148128390312195,
-0.05107441172003746,
0.24773117899894714,
0.21845215559005737,
-0.005353676155209541,
-0.15817934274673462,
0.4040173888206482,
0.1167294904589653,
0.026940755546092987,
-0.1322050541639328,
0.10715974867343903,
0.0308087095618248,
-0.24994835257530212,
-0.06932120770215988,
-0.37582823634147644,
-0.15316617488861084,
0.2493651807308197,
0.4496328830718994,
0.14084431529045105,
-0.06551570445299149,
0.0045128390192985535,
0.023273970931768417,
-0.050627440214157104,
-0.05963407829403877,
0.09236586093902588,
0.2454521507024765,
-0.0554470457136631,
0.0896495059132576,
-0.3235693871974945,
-0.265688419342041,
-0.045619260519742966,
-0.12927550077438354,
-0.08136536180973053,
0.012109238654375076,
0.47342002391815186,
-0.0691719502210617,
0.1191331148147583,
-0.23138287663459778,
0.1409732699394226,
0.35214152932167053,
-0.967538058757782,
0.33963459730148315,
0.13341444730758667,
-0.09560093283653259,
0.13395971059799194,
0.528207540512085,
0.15282461047172546,
0.3114817142486572,
-0.29665902256965637,
-0.18334615230560303,
-0.16277459263801575,
0.1381843239068985,
-0.192995086312294,
0.17016316950321198,
-0.2684447467327118,
-0.0590398795902729,
0.2189815640449524,
-0.11535988748073578,
-0.2973693013191223,
-0.13386084139347076,
-0.0951036587357521,
0.19190841913223267,
-0.3429219424724579,
0.09774833917617798,
-0.058006711304187775,
0.10531699657440186,
0.026895826682448387,
0.22536827623844147,
-0.0457475483417511,
-0.18671724200248718,
-0.055447377264499664,
0.11263423413038254,
0.13469891250133514,
-0.347064733505249,
-0.01842939853668213,
-0.07898076623678207,
-0.03388869762420654,
-0.021615218371152878,
-0.020427197217941284,
-0.1617361605167389,
0.016841355711221695,
-0.11043374985456467,
0.0715923085808754,
0.16659092903137207,
-0.4037625193595886,
0.2234717309474945,
-0.12535615265369415,
-0.03992895781993866,
-0.28031212091445923,
0.19920392334461212,
-0.05841899290680885,
0.024581000208854675,
0.17371615767478943,
0.09711933135986328,
0.12624181807041168,
0.10844307392835617,
-0.0075378939509391785,
-0.43002426624298096,
-0.39587369561195374,
-0.05390527471899986,
0.41273126006126404,
0.4919307231903076,
-0.0019897830206900835,
-0.08612418174743652,
-0.12194802612066269,
0.15550833940505981,
-0.1722315400838852,
0.17415745556354523,
-0.3190605640411377,
0.05429351329803467,
0.12191484868526459,
0.4908406436443329,
0.05607454851269722,
-0.39614787697792053,
0.11836588382720947,
0.14843076467514038,
-0.11348085850477219,
-0.19428636133670807,
-0.08018355071544647,
0.16040803492069244,
0.10349525511264801,
0.1532304883003235,
0.3438543379306793,
-0.04800381883978844,
0.3086823523044586,
-0.03208378702402115,
0.14096516370773315,
0.09537819027900696,
0.5546755194664001,
0.10967713594436646,
0.15735438466072083,
-0.11949306726455688,
0.02253379486501217,
0.10741941630840302,
-0.02857021987438202,
0.13013285398483276,
0.26897501945495605,
0.27898770570755005,
0.08800631016492844,
0.02827000617980957,
-0.16044601798057556,
-0.2968159317970276,
-0.2638387084007263,
-0.11192892491817474,
-0.39664170145988464,
-0.11731056123971939,
-0.19712087512016296,
-0.33223026990890503,
-0.06102616712450981,
-0.021358788013458252,
0.03689439594745636,
0.22935882210731506,
-0.024356074631214142,
-0.1898946464061737,
-0.07368867099285126,
0.26380813121795654,
0.24209243059158325,
-0.3696988523006439,
0.2633921205997467,
0.3007694482803345,
-0.13992175459861755,
0.21355687081813812,
0.6885877847671509,
0.5452268123626709,
0.6089100241661072,
0.09427210688591003,
0.011325154453516006,
0.2298908233642578,
-0.1056269109249115,
-0.03789021819829941,
0.17127756774425507,
0.24118061363697052,
0.17937064170837402,
0.09413644671440125,
0.16335637867450714,
-0.06902235001325607,
0.38102179765701294,
0.35832908749580383,
0.11980307102203369,
-0.24925704300403595,
0.146662175655365,
-0.12155206501483917,
-0.21745887398719788,
-0.3537157475948334,
-0.030255340039730072,
-0.2626783549785614,
0.1523340940475464,
0.19083237648010254,
-0.22513048350811005,
-0.02843736857175827,
-0.1074189767241478,
0.06815720349550247,
0.19104242324829102,
0.37187811732292175,
0.3834739923477173,
0.42173701524734497,
-0.5027292370796204,
0.14504294097423553,
-0.4127245545387268,
-0.01649767905473709,
-0.17629055678844452,
0.4070547819137573,
0.17253239452838898,
0.23632963001728058,
-0.020644433796405792,
-0.00446576252579689,
0.32212355732917786,
0.5064787268638611,
-0.14682431519031525,
0.41570091247558594,
-0.20730561017990112,
0.10942047834396362,
0.4826968312263489,
-0.26563766598701477,
0.14492200314998627,
-0.371600866317749,
0.18554264307022095,
-0.30554860830307007,
0.045491814613342285,
0.10964450240135193,
-0.06102094054222107,
0.24645352363586426,
-0.03959505259990692,
0.3949287533760071,
0.12019629031419754,
-0.006788536906242371,
0.1252504587173462,
0.015411032363772392,
-0.2895192503929138,
0.09627062827348709,
-0.3756695091724396,
0.10581664741039276,
0.46981677412986755,
0.13223418593406677,
-0.20373134315013885,
-0.12395079433917999,
-0.05936352163553238,
-0.14599452912807465,
0.010464590042829514,
-0.08177263289690018,
-0.42975980043411255,
-0.06470204889774323,
-0.2286059558391571,
-0.005573446396738291,
0.1754196584224701,
-0.11220721155405045,
0.004043292254209518,
0.027052773162722588,
-0.5451881885528564,
-0.4274107813835144,
0.12790849804878235,
-0.41488900780677795,
0.03285636007785797,
0.18719150125980377,
0.5723746418952942,
0.5981380939483643,
-0.3166382908821106,
-0.802703320980072,
-0.09041790664196014,
0.3369760811328888,
-0.07757534831762314,
0.11255832016468048,
-0.15097621083259583,
-0.11707796156406403,
0.1630500704050064,
0.027223195880651474,
0.18126748502254486,
0.061734214425086975,
0.09903159737586975,
0.14964406192302704,
-0.4478626251220703
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | Hi @alvarobartt ,
Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think. | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 35 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
Hi @alvarobartt ,
Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think. | [
-0.09734825789928436,
-0.1500798910856247,
-0.06967028975486755,
0.26273229718208313,
-0.4199848175048828,
-0.3879684507846832,
0.4252557158470154,
0.2011992186307907,
-0.16761356592178345,
0.35478317737579346,
0.8012019395828247,
0.17099955677986145,
-0.256452739238739,
-0.12325994670391083,
-0.13305975496768951,
0.015056204050779343,
0.17895138263702393,
0.4521966278553009,
0.11140438914299011,
-0.09615056216716766,
-0.3218819499015808,
0.30298247933387756,
-0.5702919960021973,
0.27356112003326416,
-0.13938085734844208,
-0.1158217117190361,
0.07946930080652237,
-0.004821784794330597,
0.07185587286949158,
-0.16145016252994537,
-0.07531464844942093,
-0.05703721567988396,
-0.17407703399658203,
0.27235904335975647,
-0.00012576532026287168,
0.027627207338809967,
0.4158371090888977,
-0.047952525317668915,
-0.14515487849712372,
-0.32246047258377075,
-0.14111849665641785,
0.07118445634841919,
-0.06834515184164047,
-0.11640302836894989,
0.4058808982372284,
-0.07083220779895782,
-0.002530490979552269,
-0.3292262554168701,
0.36198604106903076,
0.2522428333759308,
0.07528872787952423,
0.22641851007938385,
-0.07841597497463226,
0.1546728014945984,
0.5486476421356201,
0.40900641679763794,
-0.12371896952390671,
-0.02280113846063614,
0.09983451664447784,
-0.11078982800245285,
0.06775520741939545,
0.5589171051979065,
0.029137777164578438,
0.18473713099956512,
0.08770522475242615,
0.21231266856193542,
0.3674261271953583,
-0.273084431886673,
0.14888659119606018,
0.2611802816390991,
0.17659717798233032,
0.03343780338764191,
-0.12385236471891403,
-0.3282868564128876,
-0.0820017084479332,
-0.42671000957489014,
0.20753291249275208,
0.2473316788673401,
-0.305663526058197,
-0.10923656821250916,
0.196708083152771,
0.03568727523088455,
-0.17322275042533875,
-0.018102973699569702,
0.19656968116760254,
0.36554327607154846,
-0.21007686853408813,
0.21242019534111023,
0.12656614184379578,
0.22819137573242188,
0.5368657112121582,
-0.2536136507987976,
-0.47391948103904724,
0.22493302822113037,
0.0007673390209674835,
0.17005571722984314,
0.08206039667129517,
-0.024951979517936707,
-0.15323810279369354,
0.22774451971054077,
0.15875834226608276,
-0.11965281516313553,
0.21538038551807404,
0.03787919878959656,
0.25726085901260376,
-0.15248847007751465,
0.4217129051685333,
0.33940449357032776,
-0.056916214525699615,
-0.05939837545156479,
0.03649861738085747,
-0.18952763080596924,
-0.22461029887199402,
-0.45651817321777344,
0.5073358416557312,
-0.009589085355401039,
0.16236887872219086,
0.1106356680393219,
-0.3488112688064575,
0.09095265716314316,
-0.43415507674217224,
-0.12365072965621948,
-0.030029959976673126,
0.2801811993122101,
-0.04023948311805725,
0.2560781240463257,
0.2266717404127121,
0.18987230956554413,
-0.03633468970656395,
0.15187381207942963,
-0.06958145648241043,
-0.29965656995773315,
-0.24002881348133087,
-0.1626625508069992,
-0.26129135489463806,
0.057779185473918915,
0.32274115085601807,
0.1542639434337616,
0.22624079883098602,
-0.3316535949707031,
0.32863861322402954,
-0.3280266225337982,
0.33284467458724976,
0.11865176260471344,
-0.11047373712062836,
0.1242692694067955,
-0.08233137428760529,
0.012212879955768585,
0.12225117534399033,
0.4687521755695343,
-0.34404081106185913,
-0.1045512706041336,
-0.3149782717227936,
0.09604352712631226,
-0.13368290662765503,
0.27682745456695557,
-0.47335919737815857,
-0.23717369139194489,
0.3031606078147888,
-0.03631716966629028,
0.40675219893455505,
-0.11021585762500763,
0.10376447439193726,
-0.2861919701099396,
-0.17620660364627838,
0.5425682663917542,
-0.33699682354927063,
0.08076027035713196,
-0.15308095514774323,
0.16656255722045898,
0.09506071358919144,
0.25071603059768677,
-0.25529417395591736,
0.3506745994091034,
-0.4780161678791046,
0.1456947922706604,
0.6174585819244385,
-0.16224846243858337,
0.27860739827156067,
0.49063295125961304,
-0.11947999894618988,
-0.03581267595291138,
0.24967101216316223,
-0.080844447016716,
0.1325930953025818,
-0.06967537850141525,
-0.07578298449516296,
-0.044929035007953644,
-0.026902226731181145,
0.02672439254820347,
-0.20475344359874725,
0.038700513541698456,
-0.05240781605243683,
-0.2600979506969452,
0.21965759992599487,
-0.10590334981679916,
-0.28304219245910645,
-0.5146318674087524,
0.42905980348587036,
-0.12074847519397736,
0.21975307166576385,
0.02596244215965271,
0.5172457695007324,
0.005299746990203857,
0.20169223845005035,
0.05487361550331116,
-0.16737481951713562,
-0.1327035278081894,
-0.5488502979278564,
-0.2954699397087097,
0.04819882661104202,
-0.04113117605447769,
0.06202147156000137,
0.1672588735818863,
-0.1905302256345749,
0.2778211236000061,
-0.02865462377667427,
-0.08664996922016144,
-0.2223198413848877,
0.035480041056871414,
-0.19405844807624817,
-0.014293089509010315,
-0.18976223468780518,
0.022068094462156296,
-0.08742861449718475,
0.00028931163251399994,
0.17778444290161133,
-0.2412635087966919,
-0.27799779176712036,
-0.005462646484375,
0.16520383954048157,
-0.06022486463189125,
-0.0192851722240448,
0.4185555875301361,
-0.02415347285568714,
0.15357863903045654,
-0.4464219808578491,
-0.42544203996658325,
-0.05130933225154877,
-0.09058524668216705,
0.21926827728748322,
0.11606387794017792,
0.3914942741394043,
-0.1934395134449005,
-0.014429621398448944,
0.3615344166755676,
-0.04962516203522682,
0.3669365346431732,
-0.0351158007979393,
-0.06256216764450073,
-0.32041165232658386,
0.09193766117095947,
-0.18205636739730835,
-0.08534770458936691,
0.3416958451271057,
-0.1746068000793457,
0.30221027135849,
0.17067959904670715,
-0.3818320333957672,
-0.00801093876361847,
0.20957650244235992,
0.016268223524093628,
0.20488682389259338,
0.0786590427160263,
-0.056966207921504974,
0.08916494250297546,
-0.096384197473526,
0.1067194789648056,
0.5495837926864624,
0.041669849306344986,
-0.24393358826637268,
-0.3503844738006592,
0.3577191233634949,
-0.33947473764419556,
0.4532791078090668,
-0.004954606294631958,
0.3537612557411194,
-0.031806014478206635,
-0.3231724202632904,
-0.004644193686544895,
-0.019087880849838257,
-0.2560880482196808,
0.07137651741504669,
-0.10183575004339218,
-0.4653010964393616,
0.1703469604253769,
0.14252731204032898,
0.12262260168790817,
-0.5211246609687805,
-0.13224168121814728,
-0.09591028094291687,
-0.25641393661499023,
-0.02573845535516739,
-0.007807642221450806,
-0.3237164616584778,
-0.366274356842041,
-0.2920438051223755,
0.15406103432178497,
-0.12450728565454483,
-0.027733149006962776,
-0.09508539736270905,
-0.14988765120506287,
-0.27078142762184143,
-0.04021991044282913,
0.08309586346149445,
0.311654657125473,
0.18053419888019562,
0.1457921415567398,
-0.10535599291324615,
-0.03029528446495533,
0.06175271421670914,
-0.04367494583129883,
-0.18509741127490997,
-0.041384413838386536,
0.22674928605556488,
0.19093194603919983,
-0.0002886578440666199,
-0.10675383359193802,
-0.03135327249765396,
-0.21238529682159424,
-0.11538045108318329,
0.1438111811876297,
0.22119547426700592,
-0.07034824043512344,
-0.3823406398296356,
0.0613492950797081,
0.0076242489740252495,
-0.10916703939437866,
0.21073435246944427,
0.07881107926368713,
0.2202778458595276,
0.19834622740745544,
0.26427116990089417,
0.010041330941021442,
-0.028399774804711342,
-0.3762025237083435,
0.19761952757835388,
-0.23206059634685516,
0.1822342574596405,
-0.14602792263031006,
-0.14323320984840393,
-0.040281906723976135,
-0.002265237271785736,
-0.00930064171552658,
-0.06479281187057495,
-0.26698529720306396,
0.10812480002641678,
-0.0475190132856369,
-0.1452409029006958,
-0.256507009267807,
0.3378717601299286,
0.23721018433570862,
0.20617328584194183,
-0.10001614689826965,
-0.29765942692756653,
-0.11867274343967438,
0.6425873041152954,
-0.2929644286632538,
0.10542335361242294,
0.10965476930141449,
0.21397337317466736,
-0.1951896697282791,
0.8325462341308594,
0.2759058177471161,
0.01714497059583664,
0.17136649787425995,
0.0444803386926651,
0.24267719686031342,
0.27922093868255615,
0.15089622139930725,
0.13429684937000275,
0.23193460702896118,
-0.09962556511163712,
-0.08305723965167999,
-0.17279359698295593,
-0.022971874102950096,
0.1099889874458313,
-0.05785141885280609,
-0.35253432393074036,
-0.17705926299095154,
0.5474681258201599,
-0.7941610217094421,
-0.09260150045156479,
-0.26962903141975403,
0.05005817115306854,
-0.27921533584594727,
0.01956985332071781,
-0.16237401962280273,
-0.24429826438426971,
0.6065593361854553,
-0.25294286012649536,
0.011644206941127777,
-0.020606480538845062,
-0.15427029132843018,
0.2981885075569153,
0.1418904811143875,
0.16501757502555847,
0.3016938269138336,
-0.0781063660979271,
0.06202304735779762,
0.0025340700522065163,
0.6505600810050964,
0.02024104818701744,
-0.17738910019397736,
-0.059288155287504196,
0.3954388499259949,
-0.33854347467422485,
-0.1182650476694107,
-0.46281054615974426,
0.4401199221611023,
-0.12039892375469208,
-0.12280905246734619,
-0.0964994728565216,
-0.1655639111995697,
0.2986558675765991,
-0.16928324103355408,
-0.14060625433921814,
-0.29600149393081665,
-0.5233045220375061,
0.08764148503541946,
0.04897236078977585,
0.24617242813110352,
0.330063134431839,
0.10944247990846634,
-0.25963032245635986,
-0.2106143981218338,
-0.06216243654489517,
0.02793542668223381,
0.027746811509132385,
-0.3294498324394226,
0.315166175365448,
-0.45629361271858215,
-0.22991108894348145,
-0.0542898029088974,
-0.05932887643575668,
0.2784641981124878,
0.1329357773065567,
0.026714270934462547,
-0.05523833632469177,
0.003032708540558815,
-0.2983434796333313,
0.631787896156311,
0.44827497005462646,
-0.129472017288208,
0.33725738525390625,
0.304490327835083,
0.2772892713546753,
0.2025367170572281,
-0.402749627828598,
0.3529853820800781,
0.07429242879152298,
-0.19284383952617645,
0.013718033209443092,
0.38655781745910645,
0.0600852407515049,
0.145247682929039,
0.7163524031639099,
0.3514304757118225,
-0.24778760969638824,
0.4668481945991516,
0.10011738538742065,
0.8564221262931824,
0.37403637170791626,
-0.011016886681318283,
0.22443196177482605,
-0.10979247093200684,
0.1888420283794403,
0.14694364368915558,
0.07510779798030853,
-0.2558944523334503,
0.2765001952648163,
0.01948186568915844,
-0.17980341613292694,
0.15629710257053375,
0.19641980528831482,
-0.1656157523393631,
0.09084954112768173,
-0.32506614923477173,
0.16884064674377441,
-0.2735355794429779,
-0.17047634720802307,
-0.3373618423938751,
-0.05513840541243553,
-0.04522053897380829,
-0.035088371485471725,
0.23609194159507751,
-0.04149990156292915,
-0.24350592494010925,
-0.4204295873641968,
-0.07920723408460617,
-0.2354443520307541,
-0.31871533393859863,
0.10911674052476883,
-0.5483144521713257,
-0.26618558168411255,
0.4819863438606262,
-0.2639266848564148,
0.19210878014564514,
-0.07584278285503387,
0.20065009593963623,
-0.024450648576021194,
0.053422488272190094,
0.021351594477891922,
0.26166653633117676,
0.12528860569000244,
0.024223988875746727,
-0.06902969628572464,
0.10212802141904831,
0.026252396404743195,
-0.28007593750953674,
0.15764427185058594,
-0.3525090515613556,
-0.3167371153831482,
0.19251376390457153,
0.5218543410301208,
0.016444474458694458,
-0.019501302391290665,
-0.260387122631073,
0.049806032329797745,
-0.060618266463279724,
0.04964182898402214,
0.02677466720342636,
0.3973310589790344,
-0.17107313871383667,
0.09774312376976013,
-0.3251631259918213,
-0.35644930601119995,
0.03419237956404686,
-0.24651232361793518,
0.01742701604962349,
-0.08103039860725403,
0.5060550570487976,
-0.07681497186422348,
0.16165196895599365,
-0.13600079715251923,
0.22319698333740234,
0.40483593940734863,
-0.9465889930725098,
0.45004087686538696,
0.04095737636089325,
-0.04359123855829239,
0.17086832225322723,
0.43761101365089417,
-0.06562468409538269,
0.4253731667995453,
-0.4510255455970764,
-0.15764419734477997,
0.09821716696023941,
0.177761048078537,
-0.1949060708284378,
0.14818942546844482,
-0.3174748122692108,
-0.03026319295167923,
0.34919726848602295,
-0.08502477407455444,
-0.22258318960666656,
0.030236706137657166,
-0.16994737088680267,
0.27315786480903625,
-0.2784525752067566,
0.129032701253891,
0.0426059365272522,
0.11257930099964142,
-0.09060575067996979,
0.3138216733932495,
-0.0900760069489479,
-0.13242417573928833,
-0.0794944018125534,
0.1662643849849701,
0.06355416029691696,
-0.18410685658454895,
-0.023434262722730637,
-0.054610226303339005,
-0.025322921574115753,
-0.0007511815056204796,
0.08303497731685638,
-0.2028900384902954,
-0.14641782641410828,
0.07204513996839523,
0.17873676121234894,
0.2337324321269989,
-0.27922022342681885,
0.2606177031993866,
-0.15540996193885803,
0.01924128830432892,
-0.3573550283908844,
0.23225533962249756,
0.1776476949453354,
-0.0175374373793602,
0.20866702497005463,
-0.035907670855522156,
0.08597047626972198,
0.12863174080848694,
0.0296443160623312,
-0.42219239473342896,
-0.20418904721736908,
-0.18707352876663208,
0.15684925019741058,
0.45517459511756897,
-0.06487765163183212,
-0.02950594387948513,
-0.08435443788766861,
0.11037320643663406,
0.0022844262421131134,
0.142782524228096,
-0.31801512837409973,
0.363482803106308,
-0.034253280609846115,
0.34402793645858765,
-0.023038111627101898,
-0.3331630229949951,
0.12943032383918762,
0.15658408403396606,
-0.20989353954792023,
-0.35000401735305786,
0.009441586211323738,
0.21491512656211853,
0.024666104465723038,
0.2025763839483261,
0.24328924715518951,
-0.006089232861995697,
0.32683128118515015,
0.05140054225921631,
0.259872704744339,
0.33801257610321045,
0.5842450857162476,
-0.12961441278457642,
0.17578378319740295,
-0.36785903573036194,
-0.0967227965593338,
0.14691205322742462,
-0.17917296290397644,
0.26568377017974854,
0.21706832945346832,
0.22569024562835693,
0.013745401985943317,
-0.07130102813243866,
-0.12338174879550934,
-0.2196706086397171,
-0.3205870985984802,
-0.10389000177383423,
-0.4228569269180298,
-0.031067166477441788,
-0.1114695742726326,
-0.32448476552963257,
0.03608567267656326,
-0.01166505366563797,
0.23317816853523254,
0.1681327521800995,
-0.05755878984928131,
0.06385035812854767,
-0.22344592213630676,
0.21918216347694397,
0.2444244921207428,
-0.3256172835826874,
0.055900316685438156,
0.1592455804347992,
-0.0726342648267746,
0.08836216479539871,
0.6722076535224915,
0.6106930375099182,
0.5759841203689575,
0.051798027008771896,
0.05205840244889259,
0.29049983620643616,
-0.11553274095058441,
-0.12413337826728821,
0.2272435873746872,
0.28444916009902954,
0.084114208817482,
0.008769437670707703,
0.12400700151920319,
-0.04778324067592621,
0.335470587015152,
0.2631800174713135,
0.0814300924539566,
-0.29470232129096985,
0.07368505001068115,
-0.36072394251823425,
-0.25549787282943726,
-0.5086344480514526,
-0.045692674815654755,
-0.22937414050102234,
0.10076083987951279,
0.39057764410972595,
-0.30013197660446167,
-0.06423705816268921,
-0.2336217314004898,
0.029597077518701553,
0.10611622035503387,
0.4110596477985382,
0.46859604120254517,
0.3884667158126831,
-0.49541807174682617,
0.026283368468284607,
-0.323586106300354,
0.11120551079511642,
-0.41437917947769165,
0.42631828784942627,
0.17349527776241302,
0.4381454586982727,
-0.02128130942583084,
-0.13919179141521454,
0.25869596004486084,
0.5555837750434875,
-0.16799293458461761,
0.4603743553161621,
-0.273820161819458,
0.1006510853767395,
0.286620557308197,
-0.22006991505622864,
0.23723441362380981,
-0.4234274923801422,
0.0659099817276001,
-0.27995365858078003,
-0.028376469388604164,
0.0895240530371666,
-0.1427137851715088,
0.20033025741577148,
0.06198111176490784,
0.3180736005306244,
0.06117555499076843,
-0.11937731504440308,
0.1397865116596222,
-0.10424693673849106,
-0.22682946920394897,
0.177626833319664,
-0.2217216044664383,
0.044683314859867096,
0.4705657362937927,
0.021674744784832,
-0.19321207702159882,
0.10974051058292389,
-0.07837275415658951,
-0.1011628806591034,
0.013388518244028091,
0.1905878186225891,
-0.285261332988739,
0.08044327050447464,
-0.4161696434020996,
0.13362205028533936,
0.19201840460300446,
-0.1279611587524414,
-0.047476209700107574,
-0.1533500850200653,
-0.4232251048088074,
-0.14328186213970184,
0.03182777762413025,
-0.5372807383537292,
-0.1661314070224762,
-0.09180833399295807,
0.5516861081123352,
0.40719151496887207,
-0.428122878074646,
-0.8393715023994446,
-0.14005951583385468,
0.26833680272102356,
0.033678945153951645,
0.007129162549972534,
-0.26370128989219666,
-0.0017621302977204323,
0.09691767394542694,
0.05416880175471306,
0.19102606177330017,
0.09993185847997665,
-0.0036462564021348953,
0.29432201385498047,
-0.547426700592041
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | > Hi @alvarobartt , Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think.
So it depends on how you're actually chunking the data as if you're not handling empty chunks `batch_examples={}` or `batch_examples=None`, you may end up running into this issue. So you could check the chunks before you actually call `ArrowWriter.write_batch`, but anyway the fix you proposed I think improves the logic of `write_batch` to avoid running into these issues. | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 94 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
> Hi @alvarobartt , Thanks for answering. Do you know when and why an empty batch is passed to this function? This only happened to me when processing with multiple workers, while chunking examples, I think.
So it depends on how you're actually chunking the data as if you're not handling empty chunks `batch_examples={}` or `batch_examples=None`, you may end up running into this issue. So you could check the chunks before you actually call `ArrowWriter.write_batch`, but anyway the fix you proposed I think improves the logic of `write_batch` to avoid running into these issues. | [
-0.17684607207775116,
-0.07852309197187424,
-0.07085539400577545,
0.22444646060466766,
-0.24380652606487274,
-0.29227858781814575,
0.4010692536830902,
0.3219434916973114,
-0.1609073430299759,
0.1594407856464386,
0.6263853311538696,
0.23006677627563477,
-0.25662946701049805,
0.059854522347450256,
-0.07643217593431473,
-0.03785431385040283,
0.13918322324752808,
0.2864987850189209,
0.10091159492731094,
-0.0696186050772667,
-0.2509841024875641,
0.1908421665430069,
-0.4116276502609253,
0.2513437271118164,
-0.21074843406677246,
-0.17800697684288025,
0.07210469245910645,
0.01895664632320404,
0.04419267177581787,
-0.2509048283100128,
-0.024336671456694603,
-0.004950027912855148,
0.006193643435835838,
0.2746204137802124,
-0.0001141770844697021,
-0.0201798677444458,
0.4060547947883606,
-0.040248386561870575,
-0.1362200677394867,
-0.16538111865520477,
-0.01920805126428604,
-0.034777045249938965,
-0.06701214611530304,
-0.18119359016418457,
0.3875822424888611,
-0.20172183215618134,
0.025880955159664154,
-0.2625502347946167,
0.4361998438835144,
0.15819525718688965,
0.20617635548114777,
0.17765265703201294,
0.02814420685172081,
0.19152848422527313,
0.5095956921577454,
0.46629267930984497,
-0.15366078913211823,
0.018989188596606255,
0.08469241112470627,
-0.11433614790439606,
-0.014671429991722107,
0.4580095410346985,
0.02850240282714367,
0.14500276744365692,
0.08957245945930481,
0.23782598972320557,
0.2670174241065979,
-0.28668075799942017,
0.0458294041454792,
0.27331653237342834,
0.2933643162250519,
-0.1608060896396637,
-0.2987726032733917,
-0.3424835205078125,
-0.07671388238668442,
-0.4514164626598358,
0.2533174455165863,
0.35624754428863525,
-0.3048417568206787,
-0.03164397552609444,
0.15657681226730347,
0.057866837829351425,
-0.11408046633005142,
-0.05937008559703827,
0.35174131393432617,
0.16904519498348236,
-0.19665725529193878,
0.1435912847518921,
0.10399188101291656,
0.2063787579536438,
0.5586977601051331,
-0.1815706044435501,
-0.5520862340927124,
0.2763661742210388,
-0.1284089982509613,
0.10010716319084167,
-0.06463191658258438,
0.020452339202165604,
-0.04416454955935478,
0.19473384320735931,
0.21873778104782104,
-0.06659035384654999,
0.1523328274488449,
-0.004411432892084122,
0.27682557702064514,
-0.10966822504997253,
0.4055129587650299,
0.33049091696739197,
-0.037937894463539124,
0.025297168642282486,
0.0985540896654129,
-0.19231510162353516,
-0.1091596856713295,
-0.5061964988708496,
0.4952811002731323,
-0.001988578587770462,
0.21068184077739716,
0.06935553252696991,
-0.19114767014980316,
0.07760929316282272,
-0.30663207173347473,
-0.09333789348602295,
-0.12892934679985046,
0.2631213366985321,
-0.030464056879281998,
0.1925051510334015,
0.2379787415266037,
0.15696261823177338,
-0.07113911211490631,
0.15958528220653534,
-0.09536632150411606,
-0.29270780086517334,
-0.17141671478748322,
-0.1015491783618927,
-0.11975519359111786,
0.012693686410784721,
0.2065226286649704,
0.2583828270435333,
0.11422698199748993,
-0.32070815563201904,
0.3299054205417633,
-0.2356886863708496,
0.22345054149627686,
0.039378002285957336,
-0.05324765294790268,
0.19629156589508057,
-0.14030671119689941,
0.07802210748195648,
0.04885262995958328,
0.3896554410457611,
-0.3966420590877533,
-0.07117260247468948,
-0.29273366928100586,
0.1927517056465149,
-0.09453247487545013,
0.1494128406047821,
-0.504142165184021,
-0.2840767502784729,
0.3207074701786041,
-0.006916027516126633,
0.3957138955593109,
-0.06738059222698212,
0.09646117687225342,
-0.34505677223205566,
-0.11080086976289749,
0.47921299934387207,
-0.23805023729801178,
0.11073245108127594,
-0.16340968012809753,
0.13905104994773865,
0.19672691822052002,
0.2811914384365082,
-0.24158836901187897,
0.3033725619316101,
-0.40521305799484253,
0.15488877892494202,
0.5392295122146606,
-0.15920832753181458,
0.18396064639091492,
0.47837287187576294,
-0.13131161034107208,
-0.0616559237241745,
0.1802586317062378,
-0.019140789285302162,
0.20775815844535828,
-0.17253513634204865,
-0.06886450946331024,
0.0735885500907898,
0.0078124478459358215,
0.12849992513656616,
-0.2847445011138916,
-0.11740512400865555,
-0.2572569251060486,
-0.17299067974090576,
0.036867350339889526,
-0.20946267247200012,
-0.11699873954057693,
-0.6206998825073242,
0.4748367965221405,
-0.1792052835226059,
0.34472164511680603,
0.0934775248169899,
0.48272982239723206,
-0.04989699274301529,
0.15018826723098755,
0.06329917162656784,
-0.305558443069458,
-0.06932669878005981,
-0.4580293297767639,
-0.28796136379241943,
0.03075607866048813,
-0.13702917098999023,
0.12889364361763,
0.07921412587165833,
-0.1504313349723816,
0.18695655465126038,
0.08560814708471298,
-0.15060432255268097,
-0.20536473393440247,
0.005418170243501663,
-0.15118376910686493,
0.014619081281125546,
-0.06861536204814911,
0.09700068086385727,
-0.15131962299346924,
-0.04316417872905731,
0.15315485000610352,
-0.2825089395046234,
-0.17878970503807068,
0.024660345166921616,
0.09801656752824783,
-0.07062295824289322,
-0.08817776292562485,
0.42985060811042786,
-0.18547838926315308,
0.2801664471626282,
-0.3704838454723358,
-0.3311299681663513,
-0.0672488659620285,
-0.1444098949432373,
0.24329820275306702,
0.04104381054639816,
0.3188876211643219,
-0.15618152916431427,
-0.07397302240133286,
0.4520159363746643,
-0.15376192331314087,
0.2920645475387573,
-0.10183870792388916,
0.011918744072318077,
-0.23810504376888275,
0.014740172773599625,
-0.040754303336143494,
-0.08910110592842102,
0.38178884983062744,
-0.15030743181705475,
0.21539117395877838,
0.09929503500461578,
-0.279758095741272,
0.022413626313209534,
0.2166062295436859,
0.05722479894757271,
0.15641313791275024,
0.09566124528646469,
-0.10743962973356247,
0.16029837727546692,
-0.043041378259658813,
0.22822602093219757,
0.4603379964828491,
0.13194580376148224,
-0.1966158151626587,
-0.27641430497169495,
0.36225488781929016,
-0.32395094633102417,
0.40200793743133545,
-0.17626740038394928,
0.24868351221084595,
-0.058530472218990326,
-0.13279184699058533,
0.02471282333135605,
-0.021620340645313263,
-0.10031062364578247,
0.06954436749219894,
-0.08607155829668045,
-0.37475326657295227,
0.12347913533449173,
0.10597652196884155,
0.0783214420080185,
-0.5533249378204346,
-0.1785762757062912,
-0.08558186888694763,
-0.22978445887565613,
-0.043497465550899506,
-0.011373363435268402,
-0.3949776291847229,
-0.298483282327652,
-0.264855295419693,
0.15529188513755798,
-0.15681904554367065,
-0.011074492707848549,
-0.08002709597349167,
-0.22551719844341278,
-0.22480762004852295,
0.052325014024972916,
0.14928391575813293,
0.3358233571052551,
0.29041361808776855,
0.12166892737150192,
-0.15370149910449982,
-0.07657685875892639,
0.10028260201215744,
-0.09530569612979889,
-0.20377613604068756,
-0.10496670752763748,
0.11261558532714844,
0.12929777801036835,
0.015433579683303833,
-0.16646771132946014,
-0.015466200187802315,
-0.33299362659454346,
-0.11446784436702728,
0.1332278847694397,
0.29355573654174805,
0.008458620868623257,
-0.34905651211738586,
0.05133809149265289,
-0.054035037755966187,
-0.2727099061012268,
0.38010066747665405,
0.11939355731010437,
0.24252256751060486,
0.19383294880390167,
0.23596730828285217,
0.010499618947505951,
-0.04699011519551277,
-0.36014753580093384,
0.21367502212524414,
-0.1968027949333191,
0.23984889686107635,
-0.16685059666633606,
-0.27259260416030884,
0.0266764797270298,
0.024394117295742035,
-0.08070017397403717,
-0.00010929536074399948,
-0.23261316120624542,
0.1779342144727707,
-0.18242031335830688,
-0.04619750753045082,
-0.2530466616153717,
0.3767029047012329,
0.2197577804327011,
0.15754249691963196,
-0.1469208002090454,
-0.2504757344722748,
-0.04135384038090706,
0.5521421432495117,
-0.24360615015029907,
0.0772014781832695,
-0.008365664631128311,
0.2860924005508423,
-0.20666156709194183,
0.7551735639572144,
0.2982521057128906,
-0.04202013835310936,
0.21787798404693604,
0.06627358496189117,
0.24196290969848633,
0.21737122535705566,
0.09865855425596237,
0.19229111075401306,
0.04476769268512726,
-0.1484488546848297,
-0.12445977330207825,
-0.16416841745376587,
0.010359710082411766,
0.13615965843200684,
-0.04516046866774559,
-0.2825125753879547,
-0.31714504957199097,
0.5331299304962158,
-0.6426250338554382,
-0.0650138184428215,
-0.31428638100624084,
0.00815640389919281,
-0.30432936549186707,
-0.06487974524497986,
-0.04479252174496651,
-0.20301596820354462,
0.5489509105682373,
-0.2264459878206253,
-0.017284832894802094,
0.11600758135318756,
-0.3357701897621155,
0.30985426902770996,
0.05836450308561325,
0.2080216258764267,
0.2294621616601944,
-0.06991270184516907,
0.07173086702823639,
-0.021244581788778305,
0.5387794375419617,
0.006591027602553368,
-0.18069644272327423,
-0.05888762325048447,
0.4736924171447754,
-0.45096442103385925,
-0.13898631930351257,
-0.4058634340763092,
0.5496107935905457,
-0.08639097213745117,
-0.13158923387527466,
-0.1669413149356842,
-0.09797076880931854,
0.2412133812904358,
-0.05091755837202072,
-0.15538783371448517,
-0.3203580677509308,
-0.41496577858924866,
0.02233218401670456,
-0.07077944278717041,
0.18005292117595673,
0.3717767298221588,
0.09303417056798935,
-0.3677220940589905,
-0.15964356064796448,
-0.09693408757448196,
0.049827270209789276,
-0.04630593955516815,
-0.3165889382362366,
0.35807982087135315,
-0.454574853181839,
-0.06600972265005112,
-0.036342062056064606,
-0.013617381453514099,
0.31472864747047424,
0.24965441226959229,
0.0047759078443050385,
-0.05708472430706024,
-0.058512263000011444,
-0.3546083867549896,
0.5442634224891663,
0.4057919681072235,
-0.08730953931808472,
0.34048697352409363,
0.24976998567581177,
0.2063588947057724,
-0.012693152762949467,
-0.3758564293384552,
0.31047794222831726,
0.07789849489927292,
-0.26095664501190186,
0.017349733039736748,
0.5790979266166687,
0.04155897721648216,
0.13106149435043335,
0.7072087526321411,
0.27779102325439453,
-0.3254877030849457,
0.5864349603652954,
0.17364951968193054,
0.7962003350257874,
0.28356748819351196,
0.04273732751607895,
0.095713309943676,
-0.26903462409973145,
0.29734501242637634,
0.17905595898628235,
0.11603827029466629,
-0.39811229705810547,
0.20311318337917328,
0.1328151375055313,
-0.12988276779651642,
0.0891963467001915,
0.13174408674240112,
-0.20339736342430115,
0.035200607031583786,
-0.29670634865760803,
0.1063610166311264,
-0.332347571849823,
-0.09404774010181427,
-0.42367151379585266,
-0.27122652530670166,
-0.013520501554012299,
0.0781455934047699,
0.17335012555122375,
-0.14158689975738525,
-0.16096585988998413,
-0.49140310287475586,
-0.07920805364847183,
-0.17970936000347137,
-0.35153740644454956,
0.1319449245929718,
-0.49823352694511414,
-0.2684308886528015,
0.37521061301231384,
-0.29531165957450867,
0.2462400197982788,
-0.19221557676792145,
0.35850709676742554,
-0.03581288829445839,
-0.046901069581508636,
-0.06216562166810036,
0.20719313621520996,
0.1601070761680603,
-0.01204272173345089,
-0.1179271787405014,
0.006953457370400429,
0.06610135734081268,
-0.2239849865436554,
0.06817685812711716,
-0.20969900488853455,
-0.2627769708633423,
0.32142332196235657,
0.35760778188705444,
-0.09466861188411713,
-0.13776147365570068,
-0.17361538112163544,
-0.043749913573265076,
-0.12098434567451477,
-0.021197989583015442,
0.15093153715133667,
0.346599817276001,
-0.198062464594841,
0.10059063136577606,
-0.27451229095458984,
-0.2413034737110138,
0.011334100738167763,
-0.07005853205919266,
0.009425992146134377,
-0.008546119555830956,
0.536819577217102,
0.03380900248885155,
0.10219535231590271,
-0.21362650394439697,
0.17088252305984497,
0.3863346576690674,
-0.8997262120246887,
0.3676741421222687,
-0.012956072576344013,
0.016800522804260254,
0.09838804602622986,
0.3456730842590332,
-0.07859925925731659,
0.30673956871032715,
-0.3866070806980133,
-0.14155983924865723,
-0.09485072642564774,
0.17689403891563416,
-0.1453797072172165,
0.1879543513059616,
-0.32465726137161255,
-0.010480649769306183,
0.26278313994407654,
0.12152102589607239,
-0.3378635346889496,
0.03626542538404465,
-0.04750505089759827,
0.20478591322898865,
-0.20027567446231842,
0.07408053427934647,
0.053462762385606766,
0.06995557248592377,
-0.006272029131650925,
0.3705183267593384,
-0.10975855588912964,
-0.22832927107810974,
-0.09167203307151794,
0.10413634777069092,
0.012517898343503475,
-0.2260694056749344,
-0.02761031687259674,
-0.11511123925447464,
-0.013363748788833618,
-0.0734892264008522,
0.04744881018996239,
-0.20718318223953247,
-0.1812518686056137,
0.06776179373264313,
0.2832641303539276,
0.27908486127853394,
-0.24976035952568054,
0.22227555513381958,
-0.18504664301872253,
0.04981230944395065,
-0.3531208336353302,
0.159816712141037,
0.15615738928318024,
0.0335882231593132,
0.23684394359588623,
-0.09490744024515152,
0.12652243673801422,
0.17324572801589966,
0.01626584678888321,
-0.41316288709640503,
-0.2504376769065857,
-0.046894483268260956,
0.2761938273906708,
0.4604991674423218,
-0.10155816376209259,
-0.04258384183049202,
0.008571124635636806,
0.21518346667289734,
0.001344885677099228,
0.08436815440654755,
-0.2080674022436142,
0.20754662156105042,
-0.0446414090692997,
0.3061859905719757,
0.042676690965890884,
-0.3899432122707367,
-0.012103185057640076,
0.21943694353103638,
-0.1868361234664917,
-0.37044453620910645,
0.07355840504169464,
0.22303840517997742,
0.0690058171749115,
0.07827288657426834,
0.3139640688896179,
-0.067597895860672,
0.41769105195999146,
0.07900028675794601,
0.20863670110702515,
0.28289881348609924,
0.5555379390716553,
-0.12092429399490356,
0.07245445251464844,
-0.45110979676246643,
-0.0007787533104419708,
0.0005198270082473755,
-0.05857108533382416,
0.2905978560447693,
0.2142481803894043,
0.3322368562221527,
-0.049214769154787064,
-0.0988260880112648,
-0.1828334927558899,
-0.18220381438732147,
-0.28510263562202454,
-0.0753912478685379,
-0.3369397521018982,
-0.05486512929201126,
-0.06259308755397797,
-0.29264819622039795,
-0.08604465425014496,
0.03022664040327072,
0.2977728247642517,
0.23298943042755127,
-0.07722246646881104,
-0.03608664125204086,
-0.20470786094665527,
0.24686357378959656,
0.3743247389793396,
-0.3053808808326721,
0.04309646785259247,
0.13329078257083893,
-0.1506354957818985,
-0.037439975887537,
0.6600720286369324,
0.5701870322227478,
0.540673017501831,
-0.0042121876031160355,
0.16262008249759674,
0.20744016766548157,
-0.03315993398427963,
-0.06758862733840942,
0.23605477809906006,
0.26103734970092773,
0.035122454166412354,
-0.011610913090407848,
0.21097509562969208,
-0.12614990770816803,
0.2421591877937317,
0.17948360741138458,
0.014962161891162395,
-0.18561068177223206,
0.14170052111148834,
-0.2733045518398285,
-0.333701491355896,
-0.48984643816947937,
-0.07423926144838333,
-0.12245094776153564,
0.09145409613847733,
0.49864476919174194,
-0.33006876707077026,
-0.024778343737125397,
-0.24972307682037354,
0.0878683403134346,
0.05622411146759987,
0.5584291219711304,
0.4685346782207489,
0.2789185345172882,
-0.4155217707157135,
0.09861941635608673,
-0.33805370330810547,
0.06251882016658783,
-0.4546512961387634,
0.3213350474834442,
0.1916871964931488,
0.3250420093536377,
-0.007806532084941864,
-0.1161840409040451,
0.19856682419776917,
0.5732539296150208,
-0.12672318518161774,
0.4023247957229614,
-0.3079223334789276,
0.060967035591602325,
0.2618497610092163,
-0.22027507424354553,
0.2173381894826889,
-0.49968695640563965,
0.24696628749370575,
-0.18952244520187378,
0.07498664408922195,
0.08766761422157288,
-0.1122952252626419,
0.2210187017917633,
-0.1316039264202118,
0.3370794951915741,
0.139187291264534,
-0.2105180323123932,
0.08512155711650848,
-0.09594245254993439,
-0.35064205527305603,
0.04514063522219658,
-0.23416665196418762,
0.01694779470562935,
0.4170418977737427,
0.10897667706012726,
-0.18389053642749786,
0.04276205226778984,
-0.2477836161851883,
-0.009107044897973537,
-0.06138564646244049,
0.16284343600273132,
-0.1802583783864975,
0.07855384051799774,
-0.27188605070114136,
0.10328067094087601,
0.2095886468887329,
-0.02514515072107315,
-0.08408430218696594,
-0.044482216238975525,
-0.4517124891281128,
-0.268100768327713,
0.16417261958122253,
-0.5331159234046936,
-0.1460983008146286,
0.06427711993455887,
0.6332406997680664,
0.4049651622772217,
-0.3174325227737427,
-0.8041150569915771,
-0.04538225382566452,
0.22063572704792023,
-0.038500674068927765,
0.06963005661964417,
-0.1350659728050232,
-0.018470194190740585,
0.11481790244579315,
0.08642417192459106,
0.31448644399642944,
0.12803277373313904,
-0.008948229253292084,
0.20197203755378723,
-0.46967923641204834
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | Thanks, I added a if-print and I found it does return an empty examples in the chunking function that is passed to `.map()`. | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 23 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
Thanks, I added a if-print and I found it does return an empty examples in the chunking function that is passed to `.map()`. | [
-0.02882998064160347,
-0.23289898037910461,
-0.07871413975954056,
0.385270893573761,
-0.3537974953651428,
-0.2756931483745575,
0.2524556517601013,
0.3592056334018707,
-0.1052880585193634,
0.22964051365852356,
0.5770529508590698,
0.2991335988044739,
-0.3447277545928955,
-0.0568801686167717,
-0.13789978623390198,
-0.07732202112674713,
0.18925490975379944,
0.44770145416259766,
0.1379876285791397,
-0.09950849413871765,
-0.25462913513183594,
0.3571879267692566,
-0.5734080076217651,
0.2547750473022461,
-0.039943188428878784,
-0.1381155550479889,
0.1135144978761673,
-0.08854829519987106,
-0.08180774003267288,
-0.27369076013565063,
-0.11158040910959244,
-0.07074755430221558,
-0.12828879058361053,
0.1172160878777504,
-0.00012477113341446966,
-0.03314564377069473,
0.31432485580444336,
-0.114194355905056,
0.008437145501375198,
-0.23930908739566803,
-0.048945870250463486,
0.07019662857055664,
-0.12229679524898529,
-0.20825624465942383,
0.3000105917453766,
-0.1286001056432724,
0.015380379743874073,
-0.28643345832824707,
0.3896961212158203,
0.21550245583057404,
0.09045761823654175,
0.10412538796663284,
0.004648350179195404,
0.26804670691490173,
0.7451632022857666,
0.48496776819229126,
-0.11006249487400055,
0.02412511594593525,
0.14333736896514893,
-0.1179545670747757,
-0.003145448863506317,
0.5666218400001526,
0.12101894617080688,
0.10499413311481476,
0.07158377766609192,
0.36024755239486694,
0.1823693811893463,
-0.2498922049999237,
0.08057592809200287,
0.28424596786499023,
0.18023690581321716,
0.008250556886196136,
-0.23633240163326263,
-0.29984214901924133,
-0.2065645009279251,
-0.29710879921913147,
0.2599483132362366,
0.2547959089279175,
-0.37402376532554626,
-0.035597655922174454,
0.046836160123348236,
-0.03783030062913895,
-0.10391558706760406,
0.0028063952922821045,
0.19577226042747498,
0.3531496524810791,
-0.18435025215148926,
0.23463717103004456,
0.14326362311840057,
0.18241335451602936,
0.30903470516204834,
-0.18546350300312042,
-0.6106497645378113,
0.26977911591529846,
-0.03797191008925438,
0.014006517827510834,
0.12774507701396942,
0.04217031970620155,
-0.04205514118075371,
0.1525663137435913,
0.3099593222141266,
-0.04511367529630661,
0.11892446875572205,
-0.012710541486740112,
0.21851347386837006,
-0.23700949549674988,
0.5131231546401978,
0.5432275533676147,
-0.1426486223936081,
0.04605470970273018,
0.10590009391307831,
-0.19913804531097412,
-0.04838674142956734,
-0.4318186938762665,
0.40361449122428894,
0.015342067927122116,
0.16052144765853882,
0.04361937567591667,
-0.16754566133022308,
0.21637216210365295,
-0.4836575388908386,
-0.16125646233558655,
-0.060275036841630936,
0.16619163751602173,
0.0012111668474972248,
0.14657440781593323,
0.1504175364971161,
0.2133176028728485,
-0.07464422285556793,
0.18226593732833862,
-0.032712746411561966,
-0.17980369925498962,
-0.2606355845928192,
-0.213578999042511,
-0.18831753730773926,
0.11023624241352081,
0.2544640600681305,
0.16703757643699646,
0.1311505138874054,
-0.26541194319725037,
0.1569480448961258,
-0.2898734211921692,
0.44313672184944153,
0.045341797173023224,
-0.2505702078342438,
0.13925938308238983,
-0.0006134584546089172,
0.010439068078994751,
-0.02340611070394516,
0.474287748336792,
-0.31968602538108826,
0.02024592086672783,
-0.19278696179389954,
0.10899927467107773,
-0.033892251551151276,
0.33249637484550476,
-0.48116031289100647,
-0.15681850910186768,
0.3730267286300659,
-0.13358500599861145,
0.4188426733016968,
-0.10697691142559052,
0.051429133862257004,
-0.33149033784866333,
0.025028718635439873,
0.5232051610946655,
-0.411887526512146,
0.03682245314121246,
-0.09015930444002151,
0.15142124891281128,
0.1473378688097,
0.31554338335990906,
-0.23283575475215912,
0.34959039092063904,
-0.5738565921783447,
0.17893071472644806,
0.7057136297225952,
-0.16825522482395172,
0.16738644242286682,
0.4727333188056946,
-0.1231316477060318,
-0.06079968065023422,
0.1735486388206482,
-0.06948858499526978,
0.20450258255004883,
0.011590156704187393,
-0.0703645795583725,
-0.1918719857931137,
-0.011729365214705467,
0.06583575159311295,
-0.2117195874452591,
-0.052607886493206024,
-0.03555602580308914,
-0.34120264649391174,
0.16510556638240814,
-0.12578651309013367,
-0.130103200674057,
-0.5916053652763367,
0.4850315451622009,
-0.11542418599128723,
0.33287569880485535,
0.004401404410600662,
0.5166096091270447,
-0.15255741775035858,
0.1433785855770111,
-0.1062416359782219,
-0.14917400479316711,
-0.007679391652345657,
-0.6558430194854736,
-0.25271764397621155,
-0.039817243814468384,
-0.0017371885478496552,
0.038285091519355774,
0.15984025597572327,
-0.08756949007511139,
0.14366789162158966,
0.007449239492416382,
-0.25273221731185913,
-0.04312628135085106,
0.010149683803319931,
-0.20301738381385803,
-0.142006978392601,
-0.0513312891125679,
0.057563379406929016,
-0.27206313610076904,
0.0808049738407135,
0.08368987590074539,
-0.2173444926738739,
-0.29012513160705566,
0.004248522222042084,
0.05913054570555687,
-0.09911644458770752,
0.02106105536222458,
0.36489665508270264,
-0.008616430684924126,
0.10895169526338577,
-0.3389914035797119,
-0.516973614692688,
0.015622956678271294,
-0.24032250046730042,
0.2631836235523224,
-0.011994842439889908,
0.3113030195236206,
-0.18742111325263977,
-0.14192664623260498,
0.38079196214675903,
-0.09235553443431854,
0.39092040061950684,
-0.11448722332715988,
-0.03880023956298828,
-0.24342158436775208,
0.042233843356370926,
-0.10648759454488754,
-0.33072561025619507,
0.36556366086006165,
-0.05961012467741966,
0.20701928436756134,
0.09934605658054352,
-0.08569205552339554,
0.010787829756736755,
0.24189433455467224,
0.024071719497442245,
0.00557207316160202,
0.14685508608818054,
-0.10239622741937637,
0.09997466951608658,
-0.06347672641277313,
0.18030193448066711,
0.45836931467056274,
0.08700365573167801,
-0.07209336757659912,
-0.3186613917350769,
0.3996388018131256,
-0.3197168707847595,
0.4954347312450409,
-0.0562552809715271,
0.10929926484823227,
0.0077513158321380615,
-0.16763165593147278,
-0.03790176659822464,
-0.018392235040664673,
-0.051839862018823624,
0.0788051038980484,
-0.15292304754257202,
-0.39137187600135803,
0.11052411049604416,
0.08949390053749084,
0.16471463441848755,
-0.48518601059913635,
-0.2726750075817108,
-0.15742455422878265,
-0.3726337254047394,
0.078086256980896,
-0.05367705598473549,
-0.33307209610939026,
-0.24683119356632233,
-0.11465400457382202,
0.04805156588554382,
-0.023760098963975906,
-0.13097061216831207,
-0.03558749333024025,
-0.27016332745552063,
-0.2788846790790558,
0.016539838165044785,
-0.05296232923865318,
0.2968772053718567,
0.24775032699108124,
-0.07985435426235199,
-0.17092667520046234,
-0.08597861230373383,
0.004349499940872192,
-0.005099672824144363,
-0.21649546921253204,
-0.05427706986665726,
0.32688218355178833,
0.11690428853034973,
0.029699750244617462,
-0.06242818385362625,
0.14161497354507446,
-0.2429995983839035,
-0.26314952969551086,
0.23412445187568665,
0.3992592394351959,
-0.0330895371735096,
-0.33513277769088745,
0.07154165208339691,
0.09361641854047775,
-0.1788131445646286,
0.2743193507194519,
0.2626984715461731,
0.30863577127456665,
0.11582500487565994,
0.32846856117248535,
0.09224611520767212,
-0.12477964162826538,
-0.35097646713256836,
0.15483011305332184,
-0.17614084482192993,
0.3094114065170288,
-0.06569604575634003,
-0.14053770899772644,
0.033290471881628036,
-0.020444124937057495,
-0.055280763655900955,
-0.015687236562371254,
-0.308104932308197,
0.20028376579284668,
-0.11148075759410858,
-0.05834965407848358,
-0.224380761384964,
0.4557127356529236,
0.2782997488975525,
0.2696646749973297,
-0.06121297925710678,
-0.2362305223941803,
-0.06849582493305206,
0.6535754203796387,
-0.22121131420135498,
0.10128363221883774,
0.19921118021011353,
0.3580579459667206,
-0.19452248513698578,
0.8223971724510193,
0.5251838564872742,
0.022038979455828667,
0.1934419423341751,
0.014684746973216534,
0.22479978203773499,
0.12764927744865417,
0.06501058489084244,
0.2002292424440384,
0.24065539240837097,
-0.15735989809036255,
-0.03939402103424072,
-0.05870719999074936,
-0.0639198049902916,
0.09425437450408936,
0.12774664163589478,
-0.25035524368286133,
-0.3804568946361542,
0.5600346326828003,
-0.8966813683509827,
-0.23099219799041748,
-0.3593924045562744,
0.018267326056957245,
-0.31215688586235046,
-0.0717180147767067,
-0.08436939120292664,
-0.2806345820426941,
0.6671820282936096,
-0.30684906244277954,
-0.09427404403686523,
0.09723255038261414,
-0.29802244901657104,
0.31458044052124023,
0.18649233877658844,
0.12464797496795654,
0.14899802207946777,
-0.20668482780456543,
0.04096142575144768,
-0.0291677787899971,
0.6725887656211853,
-0.01654321514070034,
-0.09015889465808868,
-0.1076754778623581,
0.4721142053604126,
-0.32237768173217773,
-0.16566279530525208,
-0.4941421151161194,
0.5157603025436401,
-0.10752043128013611,
0.02684524655342102,
-0.19668003916740417,
0.02418326586484909,
0.22935068607330322,
-0.09840965270996094,
-0.11915121972560883,
-0.29087701439857483,
-0.44073793292045593,
0.2543282210826874,
-0.10067488253116608,
0.12261566519737244,
0.39955681562423706,
0.07745493948459625,
-0.11211500316858292,
-0.3152187764644623,
0.045043446123600006,
-0.01943589188158512,
-0.005008824169635773,
-0.2627120614051819,
0.38111546635627747,
-0.48186859488487244,
-0.19896508753299713,
-0.10895733535289764,
0.000060189515352249146,
0.22578202188014984,
0.2920994758605957,
0.04113423079252243,
0.09118976444005966,
-0.08111559599637985,
-0.30767226219177246,
0.5412859916687012,
0.2590041756629944,
-0.12867935001850128,
0.22861233353614807,
0.2852981388568878,
0.35647791624069214,
-0.009851996786892414,
-0.33366110920906067,
0.25746020674705505,
0.1414857655763626,
-0.24377284944057465,
0.13871392607688904,
0.4753303527832031,
0.007761556655168533,
0.041029274463653564,
0.7557947635650635,
0.42760348320007324,
-0.39427420496940613,
0.526129424571991,
0.12618276476860046,
0.7816653847694397,
0.25590723752975464,
-0.004122268408536911,
0.07238274812698364,
-0.2892073392868042,
0.33140167593955994,
0.13347429037094116,
0.09011073410511017,
-0.3536187410354614,
0.23158806562423706,
-0.05670570209622383,
-0.13894182443618774,
0.1281275451183319,
0.28449904918670654,
-0.22856095433235168,
0.07157595455646515,
-0.2524227797985077,
0.4055567681789398,
-0.27692660689353943,
-0.31975674629211426,
-0.2024802565574646,
-0.16578328609466553,
-0.001765212044119835,
-0.03289571776986122,
0.16943508386611938,
-0.05321084335446358,
-0.1126028299331665,
-0.3712237477302551,
-0.22459474205970764,
-0.26903778314590454,
-0.41923969984054565,
0.057301826775074005,
-0.5647376775741577,
-0.2885743975639343,
0.43442901968955994,
-0.31052327156066895,
0.18113774061203003,
0.08200284838676453,
0.12055210024118423,
0.09704416990280151,
-0.054221831262111664,
-0.13097356259822845,
0.32166948914527893,
0.18039725720882416,
0.06361488252878189,
-0.06977687031030655,
0.039691098034381866,
0.09064695984125137,
-0.21200250089168549,
0.19276773929595947,
-0.3564249575138092,
-0.21112850308418274,
0.24579483270645142,
0.43893229961395264,
0.02756529115140438,
-0.19187702238559723,
-0.1863112449645996,
-0.11045794188976288,
-0.1136966347694397,
0.02412969246506691,
0.022398099303245544,
0.32926511764526367,
-0.20829075574874878,
0.03735712170600891,
-0.14714622497558594,
-0.2662261128425598,
0.010302912443876266,
-0.08266904205083847,
-0.11625239998102188,
-0.03891627490520477,
0.42049452662467957,
-0.03710241988301277,
0.07721041142940521,
-0.19268620014190674,
0.23858961462974548,
0.2785192131996155,
-0.8490610122680664,
0.30174461007118225,
0.014888841658830643,
-0.08048534393310547,
0.15895377099514008,
0.2536523938179016,
0.1537962108850479,
0.3765698969364166,
-0.3429548144340515,
-0.23227429389953613,
-0.24496926367282867,
0.239393949508667,
-0.2224423736333847,
0.1616460680961609,
-0.3732078969478607,
-0.10542626678943634,
0.2487224042415619,
0.1347178816795349,
-0.24359789490699768,
0.08635206520557404,
-0.0918501764535904,
0.30540212988853455,
-0.28690192103385925,
0.12460991740226746,
-0.06824727356433868,
0.07156996428966522,
-0.07719516009092331,
0.28524237871170044,
-0.16776619851589203,
-0.11076381057500839,
-0.058439526706933975,
0.13294540345668793,
0.11684399098157883,
-0.31625986099243164,
-0.014815433882176876,
-0.0011362899094820023,
-0.04273473843932152,
-0.19753985106945038,
0.025650303810834885,
-0.3031854033470154,
-0.0816602110862732,
0.15959547460079193,
0.36005741357803345,
0.08005885034799576,
-0.357985258102417,
0.2572331428527832,
-0.21389812231063843,
0.10631301999092102,
-0.36746981739997864,
0.1421808898448944,
0.09242155402898788,
-0.044102683663368225,
0.1146734282374382,
0.08587615191936493,
0.07830686867237091,
0.03511488437652588,
0.11897657811641693,
-0.39473921060562134,
-0.22306771576404572,
-0.06364119052886963,
0.41559863090515137,
0.4189486801624298,
-0.04082580655813217,
-0.01801653951406479,
-0.07344522327184677,
0.13013045489788055,
-0.08298669010400772,
0.08486878126859665,
-0.012189095839858055,
0.27019137144088745,
0.06291015446186066,
0.39973485469818115,
-0.09901944547891617,
-0.4494881331920624,
0.09031406044960022,
0.17356255650520325,
-0.16353552043437958,
-0.3154751658439636,
0.08202466368675232,
0.35639217495918274,
0.008385803550481796,
0.16770565509796143,
0.2997777760028839,
-0.14583763480186462,
0.3865620493888855,
0.11630730330944061,
0.21075439453125,
0.2595055401325226,
0.49529829621315,
0.036762211471796036,
0.12957890331745148,
-0.35889557003974915,
-0.09238973259925842,
0.23698756098747253,
-0.021445706486701965,
0.30536696314811707,
0.3640425503253937,
0.23333382606506348,
0.0013004448264837265,
-0.14697091281414032,
-0.180507630109787,
-0.16864708065986633,
-0.3293240964412689,
-0.15027636289596558,
-0.31361648440361023,
-0.19268059730529785,
-0.13878270983695984,
-0.2455587238073349,
0.0038614198565483093,
-0.06931076943874359,
0.45494145154953003,
0.18329250812530518,
0.0045919716358184814,
-0.05458114296197891,
-0.1779622733592987,
0.060162827372550964,
0.3622184097766876,
-0.4670681655406952,
0.18456730246543884,
0.10571128129959106,
-0.07963788509368896,
0.08310562372207642,
0.47913166880607605,
0.5355881452560425,
0.6090486645698547,
0.0001417025923728943,
0.08452390879392624,
0.24101433157920837,
-0.10261386632919312,
-0.14598003029823303,
0.3389693796634674,
0.1880437135696411,
0.04137086868286133,
0.1046583354473114,
0.11902360618114471,
-0.06605198234319687,
0.2857034206390381,
0.21084760129451752,
0.10794307291507721,
-0.17587481439113617,
0.12080524116754532,
-0.29493945837020874,
-0.3026656210422516,
-0.3563549816608429,
-0.15054446458816528,
-0.2102297842502594,
0.007445046678185463,
0.24416574835777283,
-0.3817392885684967,
0.047118671238422394,
-0.10929808765649796,
0.04014286771416664,
0.08122570812702179,
0.3943924903869629,
0.5705015659332275,
0.1807595193386078,
-0.5424560904502869,
0.09982317686080933,
-0.24961909651756287,
-0.008222922682762146,
-0.3607499599456787,
0.3512818515300751,
0.1661844700574875,
0.35277047753334045,
0.11011746525764465,
0.028726698830723763,
0.21372774243354797,
0.5843627452850342,
-0.2102280855178833,
0.4806693196296692,
-0.2638663649559021,
0.0005717091262340546,
0.2508724331855774,
-0.14353184401988983,
0.20933614671230316,
-0.3950116038322449,
0.23106488585472107,
-0.22071433067321777,
-0.015465609729290009,
0.10519079864025116,
-0.0607893131673336,
0.24430552124977112,
-0.09666022658348083,
0.26314017176628113,
0.24950791895389557,
-0.17654970288276672,
0.031380511820316315,
-0.13141889870166779,
-0.20810335874557495,
0.0944303497672081,
-0.16953741014003754,
0.16950996220111847,
0.37847769260406494,
0.1854013353586197,
-0.23192240297794342,
0.0003048740327358246,
-0.11956849694252014,
-0.15970027446746826,
0.02161557972431183,
0.0769508108496666,
-0.31381678581237793,
0.06102877855300903,
-0.31538036465644836,
0.029887540265917778,
0.21121452748775482,
-0.007199473679065704,
-0.02933546155691147,
-0.08372761309146881,
-0.3657849431037903,
-0.30615532398223877,
0.08524777740240097,
-0.5335213541984558,
-0.08737689256668091,
0.25716206431388855,
0.4282374382019043,
0.48852458596229553,
-0.4126746654510498,
-0.9805622696876526,
-0.1504012495279312,
0.3208359181880951,
-0.14994633197784424,
0.13040399551391602,
-0.2455717921257019,
0.004646860063076019,
0.06870213150978088,
0.03681285306811333,
0.3348551392555237,
0.09283800423145294,
0.004000755026936531,
0.21462756395339966,
-0.519692599773407
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | Hi ! We consider an empty batch to look like this:
```python
empty_batch = {
"column_1": [],
"column_2": [],
...
}
```
While `{}` corresponds to a batch with no columns.
Therefore calling this code should fail, because the two batches don't have the same columns:
```python
writer.write_batch({"a": [1, 2, 3]})
writer.write_batch({})
```
If you want to write an empty batch, you should do this instead:
```python
writer.write_batch({"a": [1, 2, 3]})
writer.write_batch({"a": []})
``` | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 74 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
Hi ! We consider an empty batch to look like this:
```python
empty_batch = {
"column_1": [],
"column_2": [],
...
}
```
While `{}` corresponds to a batch with no columns.
Therefore calling this code should fail, because the two batches don't have the same columns:
```python
writer.write_batch({"a": [1, 2, 3]})
writer.write_batch({})
```
If you want to write an empty batch, you should do this instead:
```python
writer.write_batch({"a": [1, 2, 3]})
writer.write_batch({"a": []})
``` | [
-0.07702673971652985,
-0.060662977397441864,
-0.11207488179206848,
0.21322551369667053,
-0.26052290201187134,
-0.09497606009244919,
0.43844541907310486,
0.23383910953998566,
-0.013233703561127186,
0.1725667119026184,
0.5886095762252808,
0.139727383852005,
-0.278473436832428,
-0.04112795367836952,
-0.12361963093280792,
-0.10534434020519257,
0.19979330897331238,
0.4303852617740631,
0.14239376783370972,
-0.03446481376886368,
-0.3093259632587433,
0.2177983820438385,
-0.5761728286743164,
0.2662753462791443,
0.011728589423000813,
-0.14683805406093597,
0.02684110961854458,
-0.11755193024873734,
-0.04073208570480347,
-0.18229986727237701,
0.029945066198706627,
-0.03299522027373314,
0.04654970020055771,
0.30409446358680725,
-0.00011826660193037242,
0.008373305201530457,
0.2124878615140915,
-0.000014049932360649109,
-0.0618397481739521,
-0.21186964213848114,
-0.08526760339736938,
0.03261391818523407,
-0.03133174777030945,
-0.29556888341903687,
0.32840070128440857,
-0.33394744992256165,
-0.07456016540527344,
-0.3482345938682556,
0.3167315125465393,
0.17502343654632568,
0.174113929271698,
0.30110877752304077,
0.07354164123535156,
0.20676471292972565,
0.537304699420929,
0.32206928730010986,
-0.11773255467414856,
0.08725444972515106,
0.1415465623140335,
-0.18331697583198547,
0.18743851780891418,
0.4705953001976013,
-0.05967645347118378,
0.07997223734855652,
0.0656559094786644,
0.4147531986236572,
0.3649173080921173,
-0.24207499623298645,
0.035107698291540146,
0.18905285000801086,
0.2989042401313782,
-0.23691681027412415,
-0.28894779086112976,
-0.19130674004554749,
-0.10371854901313782,
-0.6314530372619629,
0.12906117737293243,
0.24780318140983582,
-0.28413039445877075,
-0.08465221524238586,
0.17218230664730072,
-0.005463644862174988,
-0.17939455807209015,
-0.019657745957374573,
0.15448442101478577,
0.3656550347805023,
-0.03608647733926773,
0.16818737983703613,
-0.12711182236671448,
0.22928783297538757,
0.5536242127418518,
-0.25456199049949646,
-0.5175331234931946,
0.3456194996833801,
-0.20495669543743134,
-0.00891844555735588,
-0.07069758325815201,
-0.09302625805139542,
-0.1979866623878479,
0.295478880405426,
0.34580379724502563,
-0.2151777744293213,
0.30042970180511475,
-0.018460065126419067,
0.24461209774017334,
0.0561530776321888,
0.27445530891418457,
0.5137808918952942,
-0.0805598795413971,
-0.016296882182359695,
0.04688909277319908,
-0.2217041254043579,
-0.11757785081863403,
-0.44166243076324463,
0.7057982683181763,
0.051672112196683884,
0.2520313858985901,
0.10166588425636292,
-0.2891087830066681,
0.21445591747760773,
-0.4148659110069275,
-0.17758266627788544,
-0.17187297344207764,
0.09601148217916489,
0.09962808340787888,
0.1953272819519043,
0.24857647716999054,
0.202931210398674,
-0.026407456025481224,
0.23323403298854828,
-0.08207421004772186,
-0.13876958191394806,
-0.18177904188632965,
-0.21954412758350372,
-0.2292046695947647,
0.17115411162376404,
0.2847898006439209,
0.2399648278951645,
0.039711154997348785,
-0.21822693943977356,
0.2646380662918091,
-0.2955538332462311,
0.17749789357185364,
0.13132904469966888,
0.0014400146901607513,
0.15621720254421234,
0.029356157407164574,
-0.10478666424751282,
0.04515483230352402,
0.4918639659881592,
-0.2737607955932617,
-0.022206183522939682,
-0.24382881820201874,
0.18677102029323578,
-0.03967338055372238,
0.15496990084648132,
-0.5394615530967712,
-0.303631454706192,
0.3098641633987427,
-0.09770806133747101,
0.48022326827049255,
-0.13433393836021423,
0.2159167230129242,
-0.2999027669429779,
-0.14571595191955566,
0.40579521656036377,
-0.5614058375358582,
0.23062551021575928,
-0.0030042575672268867,
0.18200749158859253,
0.1283387839794159,
0.20367196202278137,
-0.24524612724781036,
0.4124450087547302,
-0.4192172884941101,
-0.031996797770261765,
0.6436977982521057,
-0.2482484132051468,
0.3217281103134155,
0.3417493999004364,
-0.12257661670446396,
-0.01466151513159275,
0.1943380981683731,
0.07806161791086197,
0.06170349568128586,
-0.0931263267993927,
0.0016801059246063232,
-0.09905576705932617,
-0.056886300444602966,
0.055472441017627716,
-0.1435731202363968,
-0.06438863277435303,
-0.06747358292341232,
-0.24145351350307465,
0.09777308255434036,
-0.07111550122499466,
-0.18085795640945435,
-0.460022509098053,
0.43256059288978577,
-0.23175373673439026,
0.22898946702480316,
0.11867758631706238,
0.597337007522583,
0.0281280055642128,
0.06776967644691467,
0.009670447558164597,
-0.370231568813324,
-0.06859558075666428,
-0.3812766969203949,
-0.2559475600719452,
0.04812625050544739,
-0.106471948325634,
0.044202156364917755,
0.10036887973546982,
-0.13798421621322632,
0.16956408321857452,
0.07427031546831131,
-0.29962480068206787,
-0.11955167353153229,
-0.0186334066092968,
-0.27940547466278076,
-0.04402580112218857,
-0.11305637657642365,
0.12515415251255035,
-0.20859749615192413,
0.06434279680252075,
-0.0003510955721139908,
-0.1984965056180954,
-0.11485575884580612,
0.02262597531080246,
0.10311465710401535,
-0.01675857976078987,
0.0225592739880085,
0.36352911591529846,
-0.1660480797290802,
0.1852383315563202,
-0.4665919244289398,
-0.25962328910827637,
-0.04530428349971771,
-0.007012341171503067,
0.12616929411888123,
0.06722144782543182,
0.4297892451286316,
-0.0853675901889801,
-0.04054637998342514,
0.39324653148651123,
-0.1306363046169281,
0.41545209288597107,
0.013344891369342804,
-0.0724327340722084,
-0.32524168491363525,
0.053936753422021866,
-0.1349717080593109,
-0.2326681911945343,
0.3813975155353546,
-0.07868839800357819,
0.18554739654064178,
0.19423189759254456,
-0.2838580906391144,
0.0458403043448925,
0.13483202457427979,
0.0897931307554245,
0.09204660356044769,
-0.005549166351556778,
-0.03786294162273407,
0.22725272178649902,
-0.10490772128105164,
0.1613808274269104,
0.5395269393920898,
0.12798558175563812,
-0.299808144569397,
-0.14977122843265533,
0.1960427165031433,
-0.34410396218299866,
0.45332199335098267,
-0.03654400259256363,
0.2438502013683319,
0.03283723443746567,
-0.12479693442583084,
-0.0036620544269680977,
0.03536072373390198,
-0.1644686460494995,
0.1073143482208252,
-0.03078548051416874,
-0.36502182483673096,
0.18184109032154083,
0.1418835073709488,
0.18790864944458008,
-0.49154287576675415,
-0.21408113837242126,
0.07322140038013458,
-0.3119019567966461,
0.0020079128444194794,
-0.0041079893708229065,
-0.36771106719970703,
-0.4228969216346741,
-0.48283281922340393,
-0.01844555139541626,
-0.04560988396406174,
-0.17079541087150574,
0.06119178980588913,
-0.3008463382720947,
-0.22420856356620789,
0.0595121867954731,
0.04895199090242386,
0.2663135826587677,
0.30058398842811584,
0.11438196152448654,
-0.12986677885055542,
-0.13820171356201172,
-0.028603922575712204,
-0.04647856205701828,
-0.2558916211128235,
-0.0906035453081131,
0.17055699229240417,
0.17149892449378967,
-0.08253582566976547,
-0.24887529015541077,
0.04599409177899361,
-0.14916476607322693,
-0.1861514300107956,
0.15094174444675446,
0.365023136138916,
-0.08271632343530655,
-0.32018983364105225,
-0.09603922814130783,
0.052994504570961,
-0.18011464178562164,
0.060199569910764694,
0.06977537274360657,
0.25259000062942505,
0.19087426364421844,
0.24062246084213257,
-0.05444281920790672,
0.04757000133395195,
-0.3131701648235321,
0.22761158645153046,
-0.07867149263620377,
0.24510525166988373,
-0.15882958471775055,
-0.16710048913955688,
0.03504794463515282,
-0.08258651196956635,
0.0017003975808620453,
-0.03939395770430565,
-0.24503439664840698,
-0.009410828351974487,
-0.19888532161712646,
-0.09188252687454224,
-0.208539217710495,
0.3485712707042694,
0.2258313149213791,
0.24236969649791718,
-0.1342007964849472,
-0.12362804263830185,
0.11606287956237793,
0.5232929587364197,
-0.3246687948703766,
-0.12109649926424026,
0.05310200899839401,
0.34956079721450806,
-0.4246404767036438,
0.6044308543205261,
0.35550713539123535,
0.0123392753303051,
0.2168136090040207,
-0.04823864996433258,
0.2637256383895874,
0.09673724323511124,
0.0442417711019516,
-0.022666795179247856,
0.2267438769340515,
-0.2483001947402954,
-0.11957715451717377,
-0.2720281183719635,
0.028937645256519318,
0.04961095750331879,
0.17628692090511322,
-0.2720615863800049,
-0.2707200348377228,
0.4060375988483429,
-0.6992972493171692,
-0.01289551705121994,
-0.27931922674179077,
0.039543718099594116,
-0.24225814640522003,
-0.053696438670158386,
-0.11082963645458221,
-0.18548886477947235,
0.3871157467365265,
-0.26411035656929016,
-0.18318304419517517,
-0.1485596001148224,
-0.3185422420501709,
0.29136353731155396,
0.14610232412815094,
0.37354353070259094,
0.34399452805519104,
-0.11041354387998581,
-0.01892026513814926,
-0.026554154232144356,
0.5724655389785767,
-0.08744074404239655,
-0.27219241857528687,
0.020052872598171234,
0.5180655717849731,
-0.46232932806015015,
-0.21097885072231293,
-0.5133651494979858,
0.27851372957229614,
-0.2709595859050751,
-0.027738705277442932,
-0.18022394180297852,
-0.0615982823073864,
0.3692379295825958,
-0.032518815249204636,
-0.20532968640327454,
-0.3587021231651306,
-0.5449581742286682,
0.04880494624376297,
-0.0171743743121624,
-0.018471308052539825,
0.32510897517204285,
0.12115620821714401,
-0.33506789803504944,
-0.08471286296844482,
-0.09677174687385559,
0.03046787530183792,
0.045106224715709686,
-0.2233014702796936,
0.4167899787425995,
-0.4254724681377411,
-0.008123224601149559,
-0.18401606380939484,
-0.08331805467605591,
0.19129452109336853,
0.2373727262020111,
-0.025578316301107407,
-0.05911560356616974,
-0.03044278174638748,
-0.2916318476200104,
0.5205038189888,
0.2900731563568115,
-0.1020912155508995,
0.4115288555622101,
0.07547560334205627,
0.1824173629283905,
0.12214770913124084,
-0.5344900488853455,
0.3771325945854187,
0.08760588616132736,
-0.2401040643453598,
-0.08477260172367096,
0.48186224699020386,
0.1851385235786438,
0.1280706822872162,
0.677078902721405,
0.4553699493408203,
-0.3262666165828705,
0.494792640209198,
0.02834608033299446,
0.7671478986740112,
0.3604236841201782,
0.13318948447704315,
0.2640520930290222,
-0.3089064359664917,
0.26967963576316833,
0.27069151401519775,
0.120378777384758,
-0.3025602102279663,
0.1991858333349228,
0.00023393705487251282,
-0.18758055567741394,
0.19205880165100098,
0.08147457242012024,
-0.14918312430381775,
0.2803715765476227,
-0.3927538990974426,
0.24100109934806824,
-0.25164908170700073,
-0.20860555768013,
-0.2719251215457916,
-0.01279653050005436,
-0.0174800343811512,
-0.004772618412971497,
0.2784891128540039,
-0.10339722037315369,
-0.2537899613380432,
-0.25791507959365845,
-0.19601847231388092,
-0.22844381630420685,
-0.28496068716049194,
-0.0015079323202371597,
-0.31378740072250366,
-0.16734185814857483,
0.3338569104671478,
-0.4293997883796692,
0.1409633904695511,
-0.02031511440873146,
0.363524854183197,
0.0949316918849945,
0.009906614199280739,
-0.13771076500415802,
0.4198193848133087,
0.1565719097852707,
-0.031700678169727325,
-0.19695594906806946,
0.01296924240887165,
0.11641997843980789,
-0.22899499535560608,
0.2756320536136627,
-0.299001008272171,
-0.24161316454410553,
0.1309123933315277,
0.4338586926460266,
0.11470966041088104,
-0.11293356865644455,
-0.2850439250469208,
0.079478919506073,
-0.09192276000976562,
-0.06589861959218979,
0.079212486743927,
0.15278294682502747,
-0.08783145248889923,
0.11163151264190674,
-0.321529746055603,
-0.24567970633506775,
0.0010235533118247986,
-0.09763077646493912,
0.12032334506511688,
-0.000015638768672943115,
0.6605993509292603,
-0.09545806050300598,
0.09975814819335938,
-0.19049233198165894,
0.20009788870811462,
0.4721885621547699,
-0.7884318232536316,
0.3224601745605469,
0.0002919647376984358,
0.09264232218265533,
0.196029931306839,
0.5638445615768433,
0.08557292819023132,
0.3403722047805786,
-0.2530971169471741,
-0.09128258377313614,
-0.05036383122205734,
0.2667175233364105,
0.09675323218107224,
0.2262474000453949,
-0.2935616970062256,
-0.05945205315947533,
0.12091745436191559,
-0.11062173545360565,
-0.3011927902698517,
-0.017305739223957062,
-0.09583520144224167,
0.2001398503780365,
-0.15693575143814087,
0.0876859724521637,
-0.030891763046383858,
0.021578235551714897,
0.06924494355916977,
0.23404304683208466,
-0.012586886063218117,
-0.20771923661231995,
-0.06917959451675415,
0.09603855013847351,
0.05452322959899902,
-0.20800073444843292,
0.05228806659579277,
-0.17758232355117798,
-0.043614085763692856,
-0.003617416135966778,
0.0397716723382473,
-0.0406513437628746,
-0.05913005769252777,
-0.044710755348205566,
0.14329303801059723,
0.2407175600528717,
-0.4168846011161804,
0.19629991054534912,
-0.24075403809547424,
-0.05118589103221893,
-0.15142345428466797,
0.14597409963607788,
0.16547273099422455,
0.11076198518276215,
0.18418356776237488,
0.00144302099943161,
0.010278485715389252,
0.11439305543899536,
0.03792398422956467,
-0.47356629371643066,
-0.2507331967353821,
-0.1028149276971817,
0.2896021902561188,
0.40158557891845703,
-0.10082492232322693,
-0.0837559923529625,
-0.03658509626984596,
0.21045635640621185,
-0.20593588054180145,
0.1600342094898224,
-0.3816683888435364,
0.2613005042076111,
0.10865361988544464,
0.4227440059185028,
-0.06740673631429672,
-0.2979307770729065,
-0.022022485733032227,
0.21739184856414795,
0.012498571537435055,
-0.23475752770900726,
0.03479781001806259,
0.32505011558532715,
0.16411548852920532,
0.1665869653224945,
0.27731549739837646,
-0.0814523696899414,
0.22943411767482758,
-0.0118294358253479,
0.08591845631599426,
0.20509693026542664,
0.6037735939025879,
-0.009708594530820847,
0.006943553686141968,
-0.26792293787002563,
0.027632441371679306,
-0.01975378394126892,
-0.013346701860427856,
0.27205467224121094,
0.2909902334213257,
0.14714892208576202,
0.04323957860469818,
-0.025932803750038147,
-0.0733223408460617,
-0.23934663832187653,
-0.25829488039016724,
-0.14241990447044373,
-0.45801082253456116,
-0.14425112307071686,
0.06597267091274261,
-0.289151668548584,
-0.048956599086523056,
-0.07268516719341278,
0.13991467654705048,
0.12164494395256042,
-0.035872265696525574,
-0.13234873116016388,
0.012882355600595474,
0.2587984800338745,
0.2579570412635803,
-0.21530543267726898,
0.2331809401512146,
0.2992915213108063,
-0.217209130525589,
0.1369611769914627,
0.7143287658691406,
0.45660024881362915,
0.5550781488418579,
0.22502624988555908,
0.07408609986305237,
0.24644304811954498,
-0.16657784581184387,
0.01898004114627838,
0.14978130161762238,
0.23027850687503815,
0.012320481240749359,
0.05222577229142189,
0.21606649458408356,
-0.13576285541057587,
0.39655542373657227,
0.26116377115249634,
0.10806837677955627,
-0.22240754961967468,
0.22853612899780273,
-0.2533918619155884,
-0.348143994808197,
-0.34686848521232605,
-0.04534325748682022,
-0.30857428908348083,
0.02912241593003273,
0.2812664210796356,
-0.20055808126926422,
-0.026062678545713425,
-0.140782430768013,
0.07572121918201447,
0.10072758793830872,
0.34542882442474365,
0.5542590618133545,
0.18863099813461304,
-0.5737569332122803,
0.07982480525970459,
-0.4228196144104004,
0.039891377091407776,
-0.4754669666290283,
0.18870653212070465,
0.09584689885377884,
0.3781239688396454,
0.02594495564699173,
-0.016621794551610947,
0.2936379015445709,
0.6226991415023804,
-0.37823495268821716,
0.5640497207641602,
-0.361591100692749,
0.03795013576745987,
0.4052581191062927,
-0.20331697165966034,
0.06942165642976761,
-0.4856110215187073,
0.22111131250858307,
-0.15917183458805084,
0.04290459305047989,
0.08309352397918701,
0.03316617012023926,
0.3152211308479309,
0.046604230999946594,
0.31250032782554626,
0.00994466245174408,
-0.15808641910552979,
0.14570465683937073,
-0.1584213823080063,
-0.22899538278579712,
0.11849232763051987,
-0.2631900906562805,
0.0365535169839859,
0.4638991951942444,
0.1179526299238205,
-0.21436090767383575,
-0.09811985492706299,
-0.03695134073495865,
-0.10599388927221298,
-0.051259685307741165,
-0.05573100969195366,
-0.3574165403842926,
0.16497521102428436,
-0.22847387194633484,
0.03464987501502037,
0.11135707050561905,
-0.09401250630617142,
-0.028533339500427246,
0.10387983918190002,
-0.4278178811073303,
-0.34335827827453613,
0.217659592628479,
-0.5906129479408264,
-0.14015616476535797,
0.10863492637872696,
0.4846838414669037,
0.4317340552806854,
-0.28788483142852783,
-0.6217117309570312,
0.014558292925357819,
0.2979925572872162,
-0.16199493408203125,
0.11870837211608887,
-0.11155840754508972,
-0.1321600377559662,
0.09988009929656982,
0.026025142520666122,
0.1809903383255005,
0.01977488212287426,
-0.07811623066663742,
0.07252223789691925,
-0.4082963466644287
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using `if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...`?
Updating the regressions tests with an empty batch formatted as `{"col_1": [], "col_2": []}` instead of `{}` works fine with the current if, and also with the one proposed by @cccntu. | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 58 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using `if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...`?
Updating the regressions tests with an empty batch formatted as `{"col_1": [], "col_2": []}` instead of `{}` works fine with the current if, and also with the one proposed by @cccntu. | [
-0.08192890882492065,
-0.09121504426002502,
-0.1058342456817627,
0.10733091831207275,
-0.5200847387313843,
-0.2911529242992401,
0.41263827681541443,
0.2771487236022949,
-0.050778746604919434,
0.09768649935722351,
0.6894097328186035,
0.20096954703330994,
-0.2975051999092102,
-0.05315322428941727,
-0.024012144654989243,
0.07307273894548416,
0.24166089296340942,
0.4648931920528412,
0.09921412914991379,
0.039861880242824554,
-0.3164398670196533,
0.2714770436286926,
-0.5746025443077087,
0.13340550661087036,
0.02019648067653179,
-0.1391514241695404,
0.08500158786773682,
-0.009668640792369843,
-0.11676105111837387,
-0.3643224835395813,
0.039462730288505554,
0.19616317749023438,
0.014331351965665817,
0.08400888741016388,
-0.00012393771612551063,
-0.1228376179933548,
0.26920396089553833,
-0.08423490077257156,
-0.07085774093866348,
-0.13476477563381195,
-0.04719878360629082,
0.08627051115036011,
-0.06529882550239563,
-0.15488798916339874,
0.341172456741333,
-0.22271305322647095,
-0.08922632783651352,
-0.2685580849647522,
0.2592574954032898,
0.2607158124446869,
0.09875096380710602,
0.29260706901550293,
-0.012880414724349976,
0.25026896595954895,
0.6796178817749023,
0.22615744173526764,
-0.08730322122573853,
0.2538672983646393,
0.22274596989154816,
-0.027674464508891106,
-0.04009108990430832,
0.5529028177261353,
0.10814812779426575,
0.0732778012752533,
0.10460776090621948,
0.23006318509578705,
0.36689072847366333,
-0.14344479143619537,
-0.14046376943588257,
0.20339897274971008,
0.24970483779907227,
-0.03932175040245056,
-0.30270087718963623,
-0.2695690989494324,
-0.1449407935142517,
-0.6030771732330322,
0.2206980586051941,
-0.06404925882816315,
-0.20383839309215546,
-0.1262672394514084,
0.12128292769193649,
-0.052853766828775406,
-0.24080725014209747,
-0.00894966721534729,
-0.12575790286064148,
0.28729748725891113,
-0.14041030406951904,
0.16172289848327637,
0.027509573847055435,
0.12316818535327911,
0.45935359597206116,
-0.17957672476768494,
-0.7086740136146545,
0.11354479938745499,
-0.16652865707874298,
-0.0604146383702755,
0.04319196939468384,
-0.11899235099554062,
-0.07402770221233368,
0.3792341947555542,
0.3526698052883148,
-0.14375832676887512,
0.3785015642642975,
-0.17179465293884277,
0.17575977742671967,
0.1604565531015396,
0.4658716320991516,
0.2199324518442154,
0.16408677399158478,
0.16801194846630096,
0.14453855156898499,
-0.15051710605621338,
-0.1014125719666481,
-0.5675040483474731,
0.4588591456413269,
0.09157465398311615,
0.2811276316642761,
-0.08171768486499786,
-0.3706616163253784,
0.2747548818588257,
-0.6204559803009033,
-0.24627575278282166,
0.02014794573187828,
0.06748388707637787,
0.12394517660140991,
0.30619949102401733,
0.24173016846179962,
0.19291318953037262,
0.02476508729159832,
0.13233232498168945,
-0.011992521584033966,
-0.24228455126285553,
-0.2457907348871231,
-0.10243471711874008,
-0.13921581208705902,
0.025203734636306763,
0.2115982174873352,
0.1507505476474762,
0.20837686955928802,
-0.38312622904777527,
0.10165771842002869,
-0.2629354000091553,
0.3630060851573944,
0.1233624517917633,
-0.3007822036743164,
0.08847280591726303,
-0.09879328310489655,
-0.2335958033800125,
0.12580162286758423,
0.5283563733100891,
-0.12896817922592163,
0.021409321576356888,
-0.07232097536325455,
0.11923817545175552,
-0.17739491164684296,
0.16035792231559753,
-0.5831006169319153,
-0.04591352120041847,
0.1636890470981598,
-0.06717395037412643,
0.4549742639064789,
-0.17653244733810425,
0.23435178399085999,
-0.1737259030342102,
0.05355880409479141,
0.505827009677887,
-0.5102289319038391,
0.19166556000709534,
0.11150652915239334,
0.1726512610912323,
-0.07943464070558548,
0.2924068570137024,
-0.3359646499156952,
0.4760858416557312,
-0.44893011450767517,
-0.022638067603111267,
0.5588778853416443,
-0.17312638461589813,
0.31407201290130615,
0.4238807260990143,
-0.14113765954971313,
-0.031190335750579834,
0.19062918424606323,
-0.02714054472744465,
0.019365940243005753,
-0.1529703438282013,
-0.2363274097442627,
-0.2511279582977295,
0.04928135499358177,
0.04538580775260925,
-0.210352823138237,
0.022784193977713585,
0.18553772568702698,
-0.2435186505317688,
0.3566780388355255,
-0.11176072806119919,
-0.2840399444103241,
-0.4262566566467285,
0.5307961702346802,
-0.22250625491142273,
0.10595834255218506,
-0.1716950684785843,
0.6006984114646912,
-0.1678597778081894,
0.11085966974496841,
-0.06216235086321831,
-0.3582172989845276,
-0.0023474954068660736,
-0.5613054037094116,
-0.292093425989151,
0.11184395104646683,
-0.0012087710201740265,
-0.08108492195606232,
0.20922182500362396,
0.037631332874298096,
0.15735049545764923,
-0.01091013289988041,
-0.20103991031646729,
-0.01166030578315258,
-0.03421316668391228,
-0.2584336996078491,
0.002063891850411892,
-0.17555713653564453,
0.06625363230705261,
-0.21614108979701996,
0.08399368077516556,
0.07361823320388794,
-0.19216230511665344,
-0.2581327557563782,
-0.06754296272993088,
0.05921231582760811,
-0.11842076480388641,
-0.01566218212246895,
0.5167941451072693,
-0.053772225975990295,
0.06958487629890442,
-0.28735417127609253,
-0.4284651279449463,
0.0848003625869751,
0.037495825439691544,
0.13176432251930237,
0.0654202401638031,
0.3231228291988373,
0.06871017068624496,
-0.07163671404123306,
0.4027705788612366,
-0.047766994684934616,
0.39115193486213684,
-0.07078325003385544,
-0.1798313707113266,
-0.3408390283584595,
-0.03084552101790905,
-0.372639000415802,
-0.1183558851480484,
0.3284151554107666,
-0.08579736948013306,
0.17740722000598907,
0.1110592633485794,
-0.36534714698791504,
-0.03590976446866989,
-0.056692060083150864,
-0.041465528309345245,
-0.09466897696256638,
-0.050737179815769196,
-0.005768775939941406,
0.12985369563102722,
-0.02015664614737034,
0.10449542105197906,
0.4274798631668091,
0.06593143194913864,
-0.33356037735939026,
-0.30971336364746094,
0.30980992317199707,
-0.3698594272136688,
0.49407386779785156,
0.08825390785932541,
0.2815569043159485,
0.07217969745397568,
-0.08295643329620361,
-0.027236569672822952,
-0.0013342276215553284,
-0.12965619564056396,
0.06297974288463593,
-0.1448509842157364,
-0.4988032281398773,
0.12265480309724808,
0.062250733375549316,
0.1160750612616539,
-0.5796483755111694,
-0.1817389577627182,
-0.07604634761810303,
-0.22138065099716187,
0.11672323197126389,
-0.11136646568775177,
-0.41658666729927063,
-0.2277887910604477,
-0.28778770565986633,
0.1248837485909462,
-0.18990248441696167,
-0.05369112640619278,
0.0050083547830581665,
-0.13170820474624634,
-0.22741729021072388,
0.03783606365323067,
-0.05687273293733597,
0.24863120913505554,
0.26168787479400635,
0.02217313088476658,
-0.1075623407959938,
-0.1989474594593048,
-0.09842231869697571,
-0.022912494838237762,
-0.21466653048992157,
0.06949981302022934,
0.2510409951210022,
0.07316013425588608,
-0.01732475310564041,
-0.15753619372844696,
-0.020670762285590172,
-0.17141835391521454,
-0.1067613959312439,
0.06821312755346298,
0.3356875479221344,
-0.07546138018369675,
-0.29435887932777405,
-0.17075258493423462,
0.1921587735414505,
-0.07334698736667633,
0.0524078905582428,
0.08229738473892212,
0.13976344466209412,
0.2237333059310913,
0.2580280005931854,
-0.0083179771900177,
-0.05937431380152702,
-0.41496309638023376,
0.21346382796764374,
0.03395053371787071,
0.20230326056480408,
0.04386334866285324,
-0.17657552659511566,
-0.06746174395084381,
0.04780678451061249,
-0.306623250246048,
0.06263746321201324,
-0.35160940885543823,
-0.02166416496038437,
-0.0006714966148138046,
-0.022710122168064117,
-0.20105063915252686,
0.1639363020658493,
0.33557045459747314,
0.12436432391405106,
-0.09634570777416229,
-0.2105974555015564,
-0.07505404949188232,
0.5756030678749084,
-0.31968364119529724,
-0.042221151292324066,
0.09169011563062668,
0.2692786455154419,
-0.30380871891975403,
0.7714034914970398,
0.3321498930454254,
-0.025942262262105942,
0.007856961339712143,
0.08194608986377716,
0.27534106373786926,
0.18676038086414337,
0.09153769165277481,
0.08304205536842346,
0.3180883526802063,
-0.1747659593820572,
0.057892702519893646,
-0.24077117443084717,
-0.024993760511279106,
-0.0025792568922042847,
0.15747573971748352,
0.0014448687434196472,
-0.3278912305831909,
0.5671859383583069,
-0.7235870957374573,
0.049216724932193756,
-0.19302181899547577,
0.06478158384561539,
-0.12381404638290405,
-0.08364226669073105,
-0.1980312019586563,
-0.11820609867572784,
0.47747087478637695,
-0.23713664710521698,
-0.1260167360305786,
-0.0518072210252285,
-0.29069390892982483,
0.28651493787765503,
0.17563579976558685,
0.3088354468345642,
0.43168753385543823,
-0.20456042885780334,
-0.02207445353269577,
-0.20044922828674316,
0.3837869167327881,
0.11277274042367935,
-0.15335822105407715,
-0.07060185074806213,
0.42129236459732056,
-0.2660018801689148,
-0.2797546982765198,
-0.5669062733650208,
0.4019472599029541,
-0.0867624431848526,
0.08543181419372559,
-0.06345067173242569,
-0.2034778594970703,
0.35722097754478455,
-0.10294657945632935,
-0.10492012649774551,
-0.3491206467151642,
-0.507058322429657,
0.17017409205436707,
-0.07296934723854065,
0.29427897930145264,
0.40502169728279114,
-0.005324848461896181,
-0.25705277919769287,
-0.21352900564670563,
-0.06711001694202423,
0.0880328118801117,
0.005074143409729004,
-0.12979288399219513,
0.2560952305793762,
-0.3715223968029022,
-0.07892853021621704,
-0.19551390409469604,
0.08124192804098129,
0.402891606092453,
-0.00420982763171196,
0.010110247880220413,
0.07609503716230392,
-0.06317882239818573,
-0.24179662764072418,
0.6537134051322937,
0.4498761296272278,
-0.30867519974708557,
0.30789920687675476,
0.2536957263946533,
0.2441185563802719,
-0.01043879333883524,
-0.3799814283847809,
0.4002755582332611,
0.1535402089357376,
-0.07560967653989792,
0.1918114274740219,
0.47235891222953796,
0.09162689745426178,
-0.06983882933855057,
0.3288663327693939,
0.44552934169769287,
-0.41594675183296204,
0.41912686824798584,
0.1513565480709076,
0.7291858196258545,
0.39788758754730225,
0.049392662942409515,
0.18740728497505188,
-0.1746675670146942,
0.2484433501958847,
0.27760618925094604,
0.14749886095523834,
-0.3422253727912903,
0.3293314278125763,
0.06097368896007538,
-0.16698959469795227,
0.2361164093017578,
0.053225837647914886,
-0.24723154306411743,
0.24009549617767334,
-0.12574885785579681,
0.3133529722690582,
-0.19809462130069733,
-0.14518125355243683,
-0.10751570016145706,
-0.036748919636011124,
-0.031160667538642883,
-0.05302579700946808,
0.1580062210559845,
-0.21254177391529083,
-0.23666810989379883,
-0.30851274728775024,
-0.1730521321296692,
-0.2717238664627075,
-0.31377488374710083,
-0.12338469922542572,
-0.5809738636016846,
-0.264279305934906,
0.2942800223827362,
-0.4941718578338623,
0.1474119871854782,
0.050250351428985596,
0.16319844126701355,
0.22197212278842926,
0.10874149203300476,
-0.13740195333957672,
0.3510649502277374,
0.1321173906326294,
-0.02063065767288208,
-0.11026758700609207,
0.06378963589668274,
0.07893925160169601,
-0.2303602695465088,
0.008103620260953903,
-0.4132230877876282,
-0.134740948677063,
0.24985778331756592,
0.489840567111969,
0.013057854026556015,
-0.21964800357818604,
-0.0054986197501420975,
0.12604090571403503,
0.05022834613919258,
-0.10625827312469482,
0.03547550365328789,
0.32147282361984253,
0.003930281847715378,
0.13822311162948608,
-0.23204191029071808,
-0.30788350105285645,
-0.005396757274866104,
-0.26586613059043884,
-0.07530851662158966,
-0.01155465841293335,
0.49618080258369446,
-0.14439384639263153,
0.09024772047996521,
-0.16990095376968384,
0.21527692675590515,
0.27993085980415344,
-1.0087201595306396,
0.4946219027042389,
0.12898296117782593,
-0.05308148264884949,
0.12443450093269348,
0.589457631111145,
0.24149300158023834,
0.283934086561203,
-0.27458614110946655,
-0.07735156267881393,
-0.014775723218917847,
0.24233628809452057,
-0.009880423545837402,
0.260104238986969,
-0.2503446638584137,
-0.20015761256217957,
0.09138792753219604,
-0.11693745851516724,
-0.268214613199234,
-0.05503424257040024,
-0.10594432055950165,
0.3228829801082611,
-0.4404504597187042,
0.0995500236749649,
-0.03799943998456001,
-0.022600872442126274,
-0.05108877271413803,
0.12231162190437317,
-0.09299449622631073,
-0.15371987223625183,
-0.05906234309077263,
0.13958625495433807,
0.11377932876348495,
-0.2887415289878845,
0.04294631630182266,
-0.03878318518400192,
0.09727714955806732,
-0.0331328883767128,
0.06938545405864716,
-0.17979151010513306,
0.043954167515039444,
-0.021985594183206558,
0.17612235248088837,
0.16685789823532104,
-0.3396662473678589,
0.3903028964996338,
-0.07282282412052155,
0.0344461128115654,
-0.2991557717323303,
0.3243919014930725,
-0.015697864815592766,
-0.02657807618379593,
0.20768848061561584,
0.15255305171012878,
0.12582072615623474,
0.17081615328788757,
-0.09271460026502609,
-0.4755292534828186,
-0.44447410106658936,
-0.037903882563114166,
0.3606187403202057,
0.5881568789482117,
-0.03871132433414459,
-0.16425181925296783,
-0.10835813730955124,
0.1265459805727005,
-0.1197671964764595,
0.2980595827102661,
-0.22534801065921783,
0.10183589160442352,
0.16729485988616943,
0.4467504322528839,
0.21313250064849854,
-0.4456237852573395,
0.25952714681625366,
0.15182965993881226,
-0.1127932071685791,
-0.07060728222131729,
-0.07678493857383728,
0.12709279358386993,
0.05715109035372734,
0.13486546277999878,
0.2800537645816803,
-0.040280524641275406,
0.2662675380706787,
-0.25251513719558716,
0.16950395703315735,
0.02265135571360588,
0.5846813321113586,
0.05969196930527687,
0.031715042889118195,
-0.08959433436393738,
0.033530786633491516,
0.10388799011707306,
-0.05083128809928894,
0.1450454294681549,
0.38343170285224915,
0.3904893696308136,
0.09354212135076523,
-0.09378232806921005,
-0.11247213184833527,
-0.2925144135951996,
-0.28264233469963074,
-0.2419758141040802,
-0.47083303332328796,
-0.07442847639322281,
-0.24643197655677795,
-0.2012464553117752,
-0.10044318437576294,
-0.061619699001312256,
0.07844029366970062,
0.23435300588607788,
0.003283880650997162,
-0.12743975222110748,
-0.04965801537036896,
0.09234592318534851,
0.262938529253006,
-0.292070209980011,
0.24470649659633636,
0.28594091534614563,
-0.0649217963218689,
0.2871589660644531,
0.7433620095252991,
0.5021682381629944,
0.42982548475265503,
0.12552502751350403,
0.04060740023851395,
0.2379380762577057,
-0.08913750946521759,
-0.004632364027202129,
0.1057518795132637,
0.2153627574443817,
0.1066659688949585,
0.20433028042316437,
0.1306910663843155,
-0.065415158867836,
0.4713916480541229,
0.17173540592193604,
0.0020133033394813538,
-0.22816549241542816,
0.12267331779003143,
-0.16569244861602783,
-0.21007081866264343,
-0.3474399745464325,
-0.08222930878400803,
-0.1535809338092804,
0.20290304720401764,
0.21267561614513397,
-0.32130616903305054,
-0.047998301684856415,
-0.058089181780815125,
0.04957309365272522,
0.16084055602550507,
0.39946606755256653,
0.44339725375175476,
0.4241775572299957,
-0.5160854458808899,
0.09187698364257812,
-0.41445252299308777,
0.013574279844760895,
-0.19180414080619812,
0.4616352319717407,
0.1644344925880432,
0.35760995745658875,
0.09589418023824692,
-0.045974165201187134,
0.3477834463119507,
0.3635196387767792,
-0.2553265690803528,
0.38715240359306335,
-0.3510754704475403,
0.26306968927383423,
0.4443647265434265,
-0.20759816467761993,
0.2185405045747757,
-0.27538004517555237,
0.15487822890281677,
-0.10505414754152298,
-0.05385645478963852,
0.15499761700630188,
-0.05734848976135254,
0.3840293288230896,
-0.09911349415779114,
0.3993322253227234,
0.11189576238393784,
-0.02795158326625824,
0.17736008763313293,
-0.1485300213098526,
-0.2606179118156433,
0.11841249465942383,
-0.3244227468967438,
0.05364543944597244,
0.4033636450767517,
0.1406397521495819,
-0.1670096069574356,
-0.06532032787799835,
0.0775856301188469,
0.010064436122775078,
0.04899247735738754,
-0.1401580572128296,
-0.3889056444168091,
-0.03726734220981598,
-0.3139677345752716,
-0.040422577410936356,
0.20789483189582825,
0.006172489374876022,
-0.08152115345001221,
0.05270247906446457,
-0.5192818641662598,
-0.40093162655830383,
0.1414363831281662,
-0.4025512933731079,
0.08428558707237244,
0.08677125722169876,
0.5277364253997803,
0.6492516994476318,
-0.23322337865829468,
-0.8090509176254272,
-0.12277795374393463,
0.2616391181945801,
0.0053515322506427765,
0.03670346364378929,
-0.15539909899234772,
-0.09861324727535248,
0.049995098263025284,
-0.0017670989036560059,
0.3160533905029297,
0.06394010782241821,
-0.004568709060549736,
-0.020828265696763992,
-0.5366736650466919
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | > Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...?
There's a check later in the code that makes sure that the columns are the right ones, so I don't think we need to check for `{}` here
In particular the check `if not batch_examples or len(next(iter(batch_examples.values()))) == 0:` doesn't raise an error while it should, that why the old `if` is fine IMO
> Updating the regressions tests with an empty batch formatted as {"col_1": [], "col_2": []} instead of {} works fine with the current if, and also with the one proposed by @cccntu.
Cool ! If you want you can update your PR to add the regression tests, to make sure that `{"col_1": [], "col_2": []}` works but not `{}` | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 141 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
> Makes sense, then the if-statement should remain the same or is it better to handle both cases separately using if not batch_examples or len(next(iter(batch_examples.values()))) == 0: ...?
There's a check later in the code that makes sure that the columns are the right ones, so I don't think we need to check for `{}` here
In particular the check `if not batch_examples or len(next(iter(batch_examples.values()))) == 0:` doesn't raise an error while it should, that why the old `if` is fine IMO
> Updating the regressions tests with an empty batch formatted as {"col_1": [], "col_2": []} instead of {} works fine with the current if, and also with the one proposed by @cccntu.
Cool ! If you want you can update your PR to add the regression tests, to make sure that `{"col_1": [], "col_2": []}` works but not `{}` | [
-0.10326462984085083,
-0.06579649448394775,
-0.1186390370130539,
0.10876263678073883,
-0.3907516598701477,
-0.2757003903388977,
0.4332886338233948,
0.2744450271129608,
0.021547142416238785,
0.09205905348062515,
0.6777893900871277,
0.1979449987411499,
-0.2900208532810211,
-0.003341689705848694,
0.04579171538352966,
0.025040004402399063,
0.24712547659873962,
0.49401047825813293,
0.1125626266002655,
0.059289395809173584,
-0.3861008584499359,
0.2567720115184784,
-0.5598731637001038,
0.1930951476097107,
-0.009751789271831512,
-0.14730821549892426,
0.06877683103084564,
0.02038756012916565,
-0.20975658297538757,
-0.2884787619113922,
-0.024250781163573265,
0.12902553379535675,
0.04089513421058655,
0.046951621770858765,
-0.00012239172065164894,
-0.07866093516349792,
0.2235768437385559,
-0.08673971891403198,
-0.07643492519855499,
-0.22939972579479218,
0.016136914491653442,
0.036615654826164246,
-0.02361798658967018,
-0.20254819095134735,
0.3402644395828247,
-0.2937294542789459,
-0.1746312975883484,
-0.25698861479759216,
0.17246508598327637,
0.25712546706199646,
0.1285458505153656,
0.3391498327255249,
0.047290828078985214,
0.229388028383255,
0.673927903175354,
0.214241161942482,
-0.10420957207679749,
0.25275659561157227,
0.19135069847106934,
-0.06334355473518372,
0.07598739862442017,
0.4928605258464813,
0.06271033734083176,
0.16279810667037964,
0.11440921574831009,
0.25153180956840515,
0.36186304688453674,
-0.17485465109348297,
-0.16217488050460815,
0.21293628215789795,
0.32765838503837585,
-0.05889143794775009,
-0.24894794821739197,
-0.17295166850090027,
-0.10046004503965378,
-0.6786349415779114,
0.2642432153224945,
-0.005123885348439217,
-0.18359573185443878,
-0.08318392932415009,
0.05648913234472275,
-0.06746741384267807,
-0.23333261907100677,
0.03018582984805107,
-0.11843409389257431,
0.27675771713256836,
-0.1781262755393982,
0.1264772117137909,
0.08958467841148376,
0.13288238644599915,
0.44381704926490784,
-0.23678693175315857,
-0.6977678537368774,
0.15847578644752502,
-0.1218949556350708,
-0.10949386656284332,
-0.0367363765835762,
-0.13115671277046204,
-0.053656015545129776,
0.45622122287750244,
0.3043902814388275,
-0.15470543503761292,
0.3496361970901489,
-0.15039858222007751,
0.13895149528980255,
0.23634029924869537,
0.4267018139362335,
0.2517355978488922,
0.15994814038276672,
0.17583414912223816,
0.15327155590057373,
-0.18412747979164124,
-0.06378167867660522,
-0.523827314376831,
0.485254168510437,
0.12033188343048096,
0.270311176776886,
-0.09871752560138702,
-0.346564918756485,
0.28142082691192627,
-0.5562572479248047,
-0.28692176938056946,
0.028558891266584396,
0.14271336793899536,
0.12644492089748383,
0.3326100707054138,
0.2866387963294983,
0.1662743240594864,
0.07764386385679245,
0.19861167669296265,
-0.014123929664492607,
-0.1659896820783615,
-0.18163667619228363,
-0.08931226283311844,
-0.1344134360551834,
0.061570752412080765,
0.24748313426971436,
0.147966668009758,
0.2345048487186432,
-0.47583210468292236,
0.08314798772335052,
-0.3231663703918457,
0.37944069504737854,
0.18063053488731384,
-0.3518860638141632,
0.02992824651300907,
-0.04611789807677269,
-0.31335002183914185,
0.10354349762201309,
0.46754032373428345,
-0.16073647141456604,
-0.022727787494659424,
-0.07099061459302902,
0.1350613385438919,
-0.20148342847824097,
0.1027466356754303,
-0.6140683889389038,
-0.12105658650398254,
0.12489885091781616,
-0.06785859167575836,
0.4033278226852417,
-0.11090219020843506,
0.2971195578575134,
-0.1677250862121582,
0.03183196485042572,
0.38742250204086304,
-0.5270083546638489,
0.2092728316783905,
0.1287829577922821,
0.169679194688797,
-0.029565073549747467,
0.2572859823703766,
-0.3303506374359131,
0.493125319480896,
-0.4190489947795868,
-0.11595147848129272,
0.5539790987968445,
-0.12297442555427551,
0.39451780915260315,
0.42856958508491516,
-0.12031196057796478,
-0.047211457043886185,
0.1761530637741089,
-0.02794649638235569,
0.017254533246159554,
-0.14057907462120056,
-0.24604806303977966,
-0.2214500904083252,
0.11048191785812378,
0.0907878428697586,
-0.16163930296897888,
-0.0056172385811805725,
0.17107674479484558,
-0.2667815685272217,
0.26641905307769775,
-0.03827061504125595,
-0.2822110056877136,
-0.4394739270210266,
0.47475868463516235,
-0.2613331973552704,
0.009179147891700268,
-0.15171873569488525,
0.6427829265594482,
-0.18635745346546173,
0.10133052617311478,
-0.11760060489177704,
-0.42562487721443176,
-0.03539459407329559,
-0.403771311044693,
-0.2658602297306061,
0.09859684109687805,
-0.002164110541343689,
-0.09378115087747574,
0.2018076628446579,
0.046583689749240875,
0.19956780970096588,
0.010904617607593536,
-0.2244994044303894,
-0.029190221801400185,
-0.04046327620744705,
-0.3035014867782593,
-0.0763409361243248,
-0.20947395265102386,
0.09859874844551086,
-0.14286671578884125,
0.11543191969394684,
0.023905424401164055,
-0.13859309256076813,
-0.24073034524917603,
-0.011575490236282349,
0.028737220913171768,
-0.14963367581367493,
-0.013658562675118446,
0.5427968502044678,
-0.04747815802693367,
0.06321991980075836,
-0.3471401333808899,
-0.3839867115020752,
0.10281972587108612,
0.0659923404455185,
0.0775810033082962,
-0.019838273525238037,
0.3575652241706848,
0.03700657933950424,
-0.02628394216299057,
0.409842848777771,
-0.03836340084671974,
0.39138245582580566,
-0.05775880068540573,
-0.16844569146633148,
-0.313596248626709,
-0.025337811559438705,
-0.3025358319282532,
-0.1429692953824997,
0.35349389910697937,
-0.05915695056319237,
0.11877502501010895,
0.1459178924560547,
-0.38925883173942566,
-0.11030245572328568,
-0.01969284936785698,
-0.07022690773010254,
-0.041343800723552704,
-0.08491278439760208,
0.02327713742852211,
0.15268301963806152,
-0.03533722460269928,
0.1157895028591156,
0.493299663066864,
0.08386446535587311,
-0.4030197560787201,
-0.31015080213546753,
0.19397127628326416,
-0.38043785095214844,
0.5499914884567261,
0.11535515636205673,
0.32778045535087585,
0.03504600375890732,
-0.12928885221481323,
-0.08424107730388641,
-0.06615033000707626,
-0.08655084669589996,
0.09598653018474579,
-0.06178899109363556,
-0.517126202583313,
0.06133255362510681,
0.0062406789511442184,
0.17614948749542236,
-0.5470095276832581,
-0.19122754037380219,
-0.07411684095859528,
-0.1901671141386032,
0.10699792951345444,
-0.16957888007164001,
-0.41644152998924255,
-0.27072933316230774,
-0.28580451011657715,
0.10339812934398651,
-0.25481608510017395,
-0.07120472192764282,
-0.04569803550839424,
-0.22328349947929382,
-0.15777310729026794,
0.04227684810757637,
0.020616892725229263,
0.20191636681556702,
0.2512569725513458,
0.017126573249697685,
-0.14838339388370514,
-0.20161011815071106,
-0.08506126701831818,
-0.024122677743434906,
-0.18431763350963593,
0.024611132219433784,
0.2279587686061859,
0.1412053257226944,
0.08139254152774811,
-0.22710977494716644,
-0.012221303768455982,
-0.14205382764339447,
-0.15334665775299072,
0.1590125560760498,
0.3162282109260559,
-0.07802039384841919,
-0.2810940742492676,
-0.2680589556694031,
0.1460728794336319,
-0.07389996945858002,
0.07217539846897125,
0.12994180619716644,
0.11559820175170898,
0.18898017704486847,
0.30251505970954895,
-0.032506659626960754,
-0.0676162987947464,
-0.30834120512008667,
0.1692112237215042,
0.056418199092149734,
0.212304025888443,
0.041448988020420074,
-0.20402786135673523,
-0.06213941425085068,
0.04240136593580246,
-0.35773733258247375,
0.010494912043213844,
-0.3241431713104248,
-0.10276475548744202,
-0.06314500421285629,
-0.08832768350839615,
-0.1427769958972931,
0.16666851937770844,
0.3155999779701233,
0.12916217744350433,
-0.10991914570331573,
-0.163490891456604,
-0.07443521916866302,
0.49994707107543945,
-0.27475419640541077,
-0.023900218307971954,
0.09712629020214081,
0.38004231452941895,
-0.3870036005973816,
0.6960156559944153,
0.26139336824417114,
-0.11483170092105865,
0.05555493384599686,
-0.012741932645440102,
0.34804296493530273,
0.12848933041095734,
0.04058193415403366,
0.08265982568264008,
0.25062400102615356,
-0.1264679729938507,
0.009073033928871155,
-0.3046889901161194,
-0.08701924979686737,
-0.04821760207414627,
0.28156325221061707,
-0.05823351442813873,
-0.227914497256279,
0.5446419715881348,
-0.6333922147750854,
0.023772481828927994,
-0.15303003787994385,
0.04249560832977295,
-0.14601559937000275,
-0.10841444134712219,
-0.1549488753080368,
-0.09876920282840729,
0.44550326466560364,
-0.312317430973053,
-0.1863170713186264,
-0.14659982919692993,
-0.21513748168945312,
0.3316025733947754,
0.18539568781852722,
0.31924960017204285,
0.38813212513923645,
-0.21255117654800415,
-0.007944248616695404,
-0.1745307445526123,
0.378106951713562,
0.06307695806026459,
-0.2932647466659546,
-0.05058716610074043,
0.4376753270626068,
-0.29178130626678467,
-0.25028195977211,
-0.5964365601539612,
0.3119018077850342,
-0.1002047210931778,
0.266959011554718,
-0.09545930474996567,
-0.18501685559749603,
0.474735826253891,
-0.03180146962404251,
-0.10320340096950531,
-0.3787594437599182,
-0.5209085941314697,
0.16635632514953613,
-0.0761415958404541,
0.28215810656547546,
0.34801334142684937,
0.05364327132701874,
-0.3002929985523224,
-0.2197110801935196,
0.003133825957775116,
0.09033478796482086,
-0.021523229777812958,
-0.08799900114536285,
0.27897241711616516,
-0.3741436302661896,
-0.10643304884433746,
-0.21891072392463684,
0.07674452662467957,
0.39444655179977417,
0.013229262083768845,
-0.05068003013730049,
0.12099337577819824,
-0.0493723526597023,
-0.2403806746006012,
0.6711662411689758,
0.39062178134918213,
-0.29564377665519714,
0.331721693277359,
0.18265891075134277,
0.23295636475086212,
-0.04579131677746773,
-0.45592501759529114,
0.3995574414730072,
0.15282393991947174,
0.02030538022518158,
0.1411423534154892,
0.5092364549636841,
0.12608599662780762,
-0.06816291809082031,
0.32806387543678284,
0.40754997730255127,
-0.3523024022579193,
0.4521512985229492,
0.1597663164138794,
0.7222095727920532,
0.37007224559783936,
-0.004326492547988892,
0.17889180779457092,
-0.21895398199558258,
0.2989329695701599,
0.16064037382602692,
0.11169640719890594,
-0.33335116505622864,
0.21796922385692596,
0.05159856379032135,
-0.23132090270519257,
0.29688870906829834,
0.06651580333709717,
-0.24014876782894135,
0.2579806447029114,
-0.1303698867559433,
0.35920196771621704,
-0.1910775899887085,
-0.12212060391902924,
-0.13172368705272675,
-0.03133605048060417,
-0.0028838180005550385,
-0.04086117446422577,
0.13274267315864563,
-0.25030869245529175,
-0.2506459653377533,
-0.19956989586353302,
-0.17313888669013977,
-0.28882133960723877,
-0.27990978956222534,
-0.13484516739845276,
-0.5780450105667114,
-0.2560936212539673,
0.3404545783996582,
-0.49003010988235474,
0.16214056313037872,
0.06565270572900772,
0.1834114044904709,
0.22309182584285736,
0.12286937981843948,
-0.15462446212768555,
0.3938387632369995,
0.18006397783756256,
-0.059827543795108795,
-0.115247443318367,
0.023811647668480873,
0.09997118264436722,
-0.2403971254825592,
0.042767852544784546,
-0.41906070709228516,
-0.12262528389692307,
0.21947607398033142,
0.48786628246307373,
-0.007915474474430084,
-0.17624859511852264,
-0.07571302354335785,
0.14883936941623688,
0.05242637172341347,
-0.1324494630098343,
0.06317128241062164,
0.2642853558063507,
-0.030050430446863174,
0.18291673064231873,
-0.23196442425251007,
-0.3310503363609314,
-0.006133172661066055,
-0.2609935700893402,
-0.0595797523856163,
0.03843469172716141,
0.5035845637321472,
-0.1482638269662857,
0.034148283302783966,
-0.2147330939769745,
0.22619923949241638,
0.3281778395175934,
-1.0081303119659424,
0.47165447473526,
0.12838242948055267,
-0.07382361590862274,
0.05821295082569122,
0.5692749619483948,
0.2721501588821411,
0.305271714925766,
-0.27222034335136414,
-0.11248843371868134,
-0.02422511577606201,
0.25708624720573425,
0.03181843087077141,
0.2819119691848755,
-0.24283429980278015,
-0.20176728069782257,
0.11392568051815033,
-0.05949728190898895,
-0.2736847400665283,
-0.031922563910484314,
-0.1326581835746765,
0.3050270080566406,
-0.37881144881248474,
0.10371467471122742,
-0.02858045883476734,
-0.07161323726177216,
-0.009096627123653889,
0.14661073684692383,
-0.029289789497852325,
-0.18105894327163696,
-0.015176434069871902,
0.1268826127052307,
0.06674003601074219,
-0.24077387154102325,
-0.012206016108393669,
-0.06260056793689728,
0.06708340346813202,
-0.02967912331223488,
0.0044389758259058,
-0.2787341773509979,
0.040263351052999496,
-0.0638570562005043,
0.1929699182510376,
0.08076272904872894,
-0.3268982768058777,
0.35680198669433594,
-0.17377886176109314,
0.07106965780258179,
-0.2670833170413971,
0.2837812602519989,
0.013559405691921711,
-0.01952720433473587,
0.20489287376403809,
0.11183339357376099,
0.0599859394133091,
0.13123196363449097,
-0.04314202070236206,
-0.4356239438056946,
-0.41180330514907837,
-0.057880792766809464,
0.38545721769332886,
0.5485873818397522,
-0.040178366005420685,
-0.13749629259109497,
-0.04142571985721588,
0.15541325509548187,
-0.18562014400959015,
0.23693621158599854,
-0.18088163435459137,
0.21866951882839203,
0.17591990530490875,
0.4762880206108093,
0.2012529969215393,
-0.3807811141014099,
0.2594875693321228,
0.13405942916870117,
-0.01467388030141592,
-0.06078573316335678,
-0.11666777729988098,
0.07511279731988907,
0.08747957646846771,
0.12787438929080963,
0.28135913610458374,
-0.03728218004107475,
0.2394685447216034,
-0.3294793963432312,
0.19824600219726562,
-0.06741182506084442,
0.6159628033638,
0.1338743269443512,
0.042890727519989014,
-0.09068246185779572,
0.07657918334007263,
0.05154978483915329,
-0.09563443064689636,
0.12216463685035706,
0.3635009229183197,
0.3942025899887085,
0.09850805252790451,
-0.05973527953028679,
-0.13716861605644226,
-0.2488115280866623,
-0.24109622836112976,
-0.1784665435552597,
-0.5317642688751221,
-0.09766172617673874,
-0.22369341552257538,
-0.22920680046081543,
-0.044074978679418564,
-0.05798841267824173,
0.14266687631607056,
0.21994318068027496,
0.006115429103374481,
-0.16182176768779755,
-0.006572406738996506,
0.08623014390468597,
0.2387143075466156,
-0.30869513750076294,
0.29152777791023254,
0.27577924728393555,
-0.049846068024635315,
0.2697831690311432,
0.8027989268302917,
0.5177195072174072,
0.447811096906662,
0.17707984149456024,
0.04354433715343475,
0.24288104474544525,
-0.1114434078335762,
0.04488181322813034,
0.15505680441856384,
0.23869271576404572,
0.1746380478143692,
0.17272503674030304,
0.18658232688903809,
-0.06758874654769897,
0.4032512903213501,
0.19179220497608185,
0.04353714734315872,
-0.19523383677005768,
0.18323779106140137,
-0.13986971974372864,
-0.3013627231121063,
-0.35669606924057007,
-0.10093701630830765,
-0.1615045666694641,
0.24515974521636963,
0.20219165086746216,
-0.2933388948440552,
-0.02392985112965107,
-0.013361485674977303,
0.06024659425020218,
0.1856907606124878,
0.3864167630672455,
0.41869357228279114,
0.34357768297195435,
-0.5343378782272339,
0.05960167944431305,
-0.44689539074897766,
-0.02012748271226883,
-0.24808895587921143,
0.4032987654209137,
0.1970023363828659,
0.36404848098754883,
0.18388237059116364,
-0.04172300547361374,
0.30624333024024963,
0.42211785912513733,
-0.2507612705230713,
0.3495696187019348,
-0.4031859040260315,
0.23334848880767822,
0.4703231453895569,
-0.2241659164428711,
0.18216124176979065,
-0.25892385840415955,
0.16401290893554688,
-0.03926050662994385,
-0.06583806872367859,
0.14059367775917053,
0.02045012265443802,
0.3298409879207611,
-0.06322832405567169,
0.36875250935554504,
0.062160640954971313,
0.01665329933166504,
0.21954098343849182,
-0.06647057086229324,
-0.18760249018669128,
0.0931989997625351,
-0.27605679631233215,
0.07518312335014343,
0.44463789463043213,
0.07474562525749207,
-0.12738151848316193,
-0.07317550480365753,
0.039842475205659866,
-0.011402595788240433,
-0.04419815167784691,
-0.12218315899372101,
-0.42528608441352844,
-0.07943658530712128,
-0.2747495770454407,
-0.1132228821516037,
0.2133251279592514,
-0.005735188722610474,
-0.1055067926645279,
0.06042539328336716,
-0.4169812798500061,
-0.43973690271377563,
0.17910437285900116,
-0.2981206178665161,
0.06109878793358803,
0.18269099295139313,
0.520580530166626,
0.6310164928436279,
-0.21163444221019745,
-0.7432762384414673,
-0.1138065978884697,
0.2879389226436615,
-0.046426258981227875,
0.03775971010327339,
-0.11649189889431,
-0.10850483179092407,
0.10822457075119019,
-0.0235116146504879,
0.2333056479692459,
0.042250677943229675,
-0.05351083725690842,
-0.10498616099357605,
-0.5092985033988953
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | Great thanks for the response! So I'll just add that regression test and remove the current if-statement. | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 17 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
Great thanks for the response! So I'll just add that regression test and remove the current if-statement. | [
-0.097380630671978,
-0.20760247111320496,
-0.13539300858974457,
0.1912723332643509,
-0.3743368983268738,
-0.2949843108654022,
0.37354913353919983,
0.26020359992980957,
0.0011964943259954453,
0.10691031813621521,
0.7534400820732117,
0.29630473256111145,
-0.3206688463687897,
-0.0292243342846632,
0.0010184086859226227,
-0.005792476236820221,
0.21904686093330383,
0.46007534861564636,
0.125412255525589,
0.03770502656698227,
-0.22223946452140808,
0.2934417128562927,
-0.5157431364059448,
0.30402258038520813,
-0.09000488370656967,
-0.21464736759662628,
0.13340218365192413,
0.01702839508652687,
-0.15305675566196442,
-0.2927837669849396,
0.06954729557037354,
0.16252753138542175,
-0.07694605737924576,
0.1899806559085846,
-0.00012082988541806117,
-0.10849767923355103,
0.278073251247406,
-0.014132952317595482,
-0.011886251159012318,
-0.1685773879289627,
-0.04316205903887749,
0.2033620923757553,
0.001073859166353941,
-0.2062382847070694,
0.3064531683921814,
-0.13348305225372314,
-0.1203991174697876,
-0.241521954536438,
0.3870367407798767,
0.24578747153282166,
0.14764811098575592,
0.1816743016242981,
0.04942777380347252,
0.20196011662483215,
0.6294549703598022,
0.39053964614868164,
-0.1286877989768982,
0.26838839054107666,
0.14653053879737854,
-0.1000426784157753,
-0.001028493046760559,
0.5254905819892883,
0.14095820486545563,
0.1970711499452591,
0.16272646188735962,
0.24554841220378876,
0.29498329758644104,
-0.12917296588420868,
-0.13885802030563354,
0.2852490544319153,
0.28606316447257996,
-0.1533915102481842,
-0.23790664970874786,
-0.16317573189735413,
-0.0862656757235527,
-0.5918668508529663,
0.2890639305114746,
-0.031224707141518593,
-0.35256925225257874,
-0.0530068464577198,
0.20767375826835632,
-0.0685463696718216,
-0.24272233247756958,
-0.03032022714614868,
-0.0039002373814582825,
0.35418155789375305,
-0.13915154337882996,
0.13079571723937988,
0.16546568274497986,
0.18105579912662506,
0.4491388201713562,
-0.000969594344496727,
-0.6735076308250427,
0.16211768984794617,
-0.15278629958629608,
-0.07470604032278061,
0.026086103171110153,
-0.03618080914020538,
-0.02399047464132309,
0.3844084143638611,
0.3598480820655823,
-0.13590365648269653,
0.27178165316581726,
-0.13714221119880676,
0.18057873845100403,
0.17963866889476776,
0.33632519841194153,
0.29366496205329895,
0.17304883897304535,
0.12388913333415985,
0.05315297469496727,
-0.1868537962436676,
-0.11681557446718216,
-0.5533450245857239,
0.5426440238952637,
0.08410584181547165,
0.27745604515075684,
-0.11600726842880249,
-0.377951979637146,
0.22018256783485413,
-0.6469946503639221,
-0.19828668236732483,
0.061409931629896164,
0.21133601665496826,
0.10749409347772598,
0.1723511815071106,
0.30285215377807617,
0.22929103672504425,
0.0013677701354026794,
0.1861051470041275,
-0.015069954097270966,
-0.16417376697063446,
-0.26639771461486816,
-0.1524791419506073,
-0.18060368299484253,
0.037050239741802216,
0.16448232531547546,
0.15832014381885529,
0.23885685205459595,
-0.4126320481300354,
0.14679521322250366,
-0.1958664357662201,
0.2799997925758362,
0.0418233685195446,
-0.34218811988830566,
0.0009594447910785675,
-0.03537757322192192,
-0.31539851427078247,
0.05298883467912674,
0.38805317878723145,
-0.08833552151918411,
-0.007745116949081421,
-0.16467855870723724,
0.16189731657505035,
-0.15670868754386902,
0.09197236597537994,
-0.5139912366867065,
-0.13164958357810974,
0.18426468968391418,
0.02155611291527748,
0.43762585520744324,
-0.07450323551893234,
0.20939549803733826,
-0.13342958688735962,
0.059815071523189545,
0.49467337131500244,
-0.44434991478919983,
0.18516720831394196,
-0.024620024487376213,
0.09579731523990631,
0.0052355751395225525,
0.29933932423591614,
-0.2567283511161804,
0.49874165654182434,
-0.5149649977684021,
0.032289400696754456,
0.6147641539573669,
-0.11519145965576172,
0.2557760775089264,
0.43682146072387695,
-0.2672874927520752,
-0.06549260020256042,
0.2258126139640808,
-0.033118512481451035,
-0.15119491517543793,
-0.07178391516208649,
-0.17828145623207092,
-0.2177157700061798,
0.07963678985834122,
0.07906880974769592,
-0.2513578236103058,
0.02210126630961895,
0.16457757353782654,
-0.22619035840034485,
0.23237645626068115,
-0.14252230525016785,
-0.2308693826198578,
-0.42986828088760376,
0.5616167783737183,
-0.2581203579902649,
0.043640099465847015,
-0.1411985158920288,
0.6699607372283936,
-0.16154198348522186,
0.09238183498382568,
-0.1676650047302246,
-0.13196119666099548,
-0.06360621750354767,
-0.5369497537612915,
-0.18357524275779724,
0.09821024537086487,
-0.04831600934267044,
-0.15630903840065002,
0.2982124090194702,
-0.07248467206954956,
0.1853431910276413,
0.0760234072804451,
-0.2419584095478058,
-0.1125207245349884,
0.037855442613363266,
-0.16856598854064941,
0.02490418404340744,
-0.1592484414577484,
0.035291772335767746,
-0.2032865583896637,
0.12998102605342865,
-0.03869841992855072,
-0.18256284296512604,
-0.2223927080631256,
0.04011426866054535,
0.04687017947435379,
-0.08993509411811829,
-0.07598533481359482,
0.44872361421585083,
-0.12354251742362976,
0.09132874011993408,
-0.22868624329566956,
-0.4252192974090576,
0.06578826159238815,
-0.1772572249174118,
0.13955603539943695,
0.19173291325569153,
0.2744002938270569,
0.011066272854804993,
-0.020294003188610077,
0.34714239835739136,
-0.02103712409734726,
0.3248244822025299,
-0.11336544901132584,
-0.06068871170282364,
-0.2292855978012085,
-0.03164947032928467,
-0.22628311812877655,
-0.12945780158042908,
0.5782141089439392,
-0.14792615175247192,
0.09883853793144226,
0.055540427565574646,
-0.3235943019390106,
-0.026375792920589447,
-0.006334263831377029,
-0.019678670912981033,
0.13324657082557678,
-0.0277690589427948,
-0.017334632575511932,
0.10329694300889969,
-0.053715795278549194,
0.17694424092769623,
0.4375876784324646,
0.10174652934074402,
-0.32205066084861755,
-0.25664252042770386,
0.20312994718551636,
-0.32335010170936584,
0.4769345819950104,
-0.021045058965682983,
0.2392250895500183,
0.014393039047718048,
-0.10199029743671417,
-0.08492828905582428,
-0.0723743736743927,
-0.22711028158664703,
0.013914180919528008,
-0.04554973542690277,
-0.5799258947372437,
0.1605876237154007,
0.04451996088027954,
0.14439982175827026,
-0.561829686164856,
-0.2578147053718567,
-0.11939965188503265,
-0.1982375681400299,
0.1178794577717781,
-0.12248419225215912,
-0.33254554867744446,
-0.2655577063560486,
-0.32078152894973755,
0.09805496782064438,
-0.18783150613307953,
-0.08877668529748917,
-0.09377938508987427,
-0.20948143303394318,
-0.2424313724040985,
0.06910444796085358,
0.02017749473452568,
0.38853704929351807,
0.3576584756374359,
0.0271818358451128,
-0.12521496415138245,
-0.10598038136959076,
-0.11039360612630844,
-0.02865757793188095,
-0.2087520956993103,
0.13133470714092255,
0.28306981921195984,
0.081020787358284,
0.03281007707118988,
-0.15162433683872223,
0.005052226595580578,
-0.20716482400894165,
-0.18001210689544678,
0.21559426188468933,
0.32756727933883667,
-0.09330631047487259,
-0.2723807096481323,
-0.10044356435537338,
0.16315674781799316,
-0.08426707983016968,
0.2333756983280182,
0.15549111366271973,
0.14383715391159058,
0.3213440179824829,
0.263773649930954,
0.057616714388132095,
-0.06211142614483833,
-0.2736940085887909,
0.1266924887895584,
0.049822140485048294,
0.17321646213531494,
0.04719541221857071,
-0.23399873077869415,
-0.04789857566356659,
-0.007808910682797432,
-0.2594563066959381,
-0.0698089450597763,
-0.3288729190826416,
-0.026377763599157333,
-0.022046400234103203,
-0.05282960087060928,
-0.2519509494304657,
0.17595425248146057,
0.294482946395874,
0.19705724716186523,
-0.13864274322986603,
-0.1643492579460144,
-0.0874510258436203,
0.5852726697921753,
-0.363949179649353,
0.027026720345020294,
0.05799400806427002,
0.3034139573574066,
-0.3609130382537842,
0.6296529769897461,
0.3069080114364624,
-0.02682105079293251,
0.09658278524875641,
-0.06426041573286057,
0.17407649755477905,
0.22337031364440918,
-0.02870030328631401,
0.10720108449459076,
0.2703728675842285,
-0.1959793120622635,
-0.06584300100803375,
-0.21660342812538147,
-0.031015025451779366,
0.01292543113231659,
0.12506891787052155,
0.043322429060935974,
-0.2854807376861572,
0.453568696975708,
-0.6615051031112671,
-0.05427592247724533,
-0.2693402171134949,
0.046838633716106415,
-0.159577414393425,
-0.0357503667473793,
-0.08992558717727661,
-0.1188344806432724,
0.41740185022354126,
-0.31699496507644653,
-0.1678977757692337,
-0.10378213971853256,
-0.21538403630256653,
0.29201167821884155,
0.14106570184230804,
0.2677699327468872,
0.25438210368156433,
-0.16815757751464844,
0.011143602430820465,
-0.19897791743278503,
0.4880381226539612,
0.138942152261734,
-0.06228580325841904,
-0.04168568551540375,
0.4664965867996216,
-0.2974017560482025,
-0.17277660965919495,
-0.5685357451438904,
0.4262370765209198,
-0.06501436233520508,
-0.03846810758113861,
-0.049363382160663605,
-0.1259576827287674,
0.42060181498527527,
-0.17431117594242096,
-0.11507569253444672,
-0.44192594289779663,
-0.5779653191566467,
0.14430275559425354,
-0.07881086319684982,
0.3594881594181061,
0.37635496258735657,
0.056032463908195496,
-0.17989203333854675,
-0.2839930057525635,
-0.026915205642580986,
0.06864617764949799,
-0.016295991837978363,
-0.1380063146352768,
0.334808349609375,
-0.4965119957923889,
-0.18210279941558838,
-0.2008924037218094,
0.04825771600008011,
0.22975628077983856,
0.11835944652557373,
0.06562396883964539,
0.14024972915649414,
-0.12965261936187744,
-0.2853817343711853,
0.6224983930587769,
0.2995525300502777,
-0.3433893918991089,
0.33751386404037476,
0.2797360122203827,
0.27299025654792786,
-0.080891452729702,
-0.3339807987213135,
0.41534268856048584,
0.19437092542648315,
-0.002627146430313587,
0.1817133128643036,
0.5412498116493225,
0.028572920709848404,
-0.038220226764678955,
0.3836585283279419,
0.4065936207771301,
-0.3670802414417267,
0.4119111895561218,
0.17120948433876038,
0.8066138625144958,
0.3514125347137451,
-0.02843780443072319,
0.15754404664039612,
-0.2107640951871872,
0.27166178822517395,
0.20245836675167084,
0.13373225927352905,
-0.33257707953453064,
0.2554529309272766,
0.03145687282085419,
-0.16331884264945984,
0.17527806758880615,
-0.040961623191833496,
-0.2849101722240448,
0.1280137300491333,
-0.14067208766937256,
0.27461299300193787,
-0.1819697916507721,
-0.1391371637582779,
-0.18692055344581604,
-0.052399467676877975,
-0.10551346093416214,
-0.0006821099668741226,
0.15595261752605438,
-0.17522545158863068,
-0.22012248635292053,
-0.33663713932037354,
-0.25854209065437317,
-0.3162503242492676,
-0.40399789810180664,
-0.08531351387500763,
-0.6370210647583008,
-0.27973175048828125,
0.32998618483543396,
-0.49233943223953247,
0.2632494568824768,
-0.0365704782307148,
0.12915582954883575,
0.19165527820587158,
-0.061663441359996796,
-0.16779553890228271,
0.2905541956424713,
0.10735975205898285,
0.0592632032930851,
-0.0572885200381279,
0.05671239271759987,
-0.023979753255844116,
-0.3088057041168213,
0.00742030143737793,
-0.2923482060432434,
-0.1768103688955307,
0.2924903929233551,
0.44052064418792725,
0.006792757660150528,
-0.1724589467048645,
0.021103475242853165,
0.03678320720791817,
-0.004206173121929169,
-0.08249128609895706,
0.09197632968425751,
0.34752094745635986,
-0.19103360176086426,
0.07729943841695786,
-0.19337591528892517,
-0.2959335446357727,
-0.006324268877506256,
-0.2268262803554535,
-0.13005951046943665,
0.10564158856868744,
0.4774906039237976,
-0.018554989248514175,
0.14368543028831482,
-0.2545701861381531,
0.11509845405817032,
0.35872337222099304,
-0.9912853837013245,
0.37917429208755493,
0.07037635147571564,
-0.15477494895458221,
0.04693308100104332,
0.49564188718795776,
0.2496599406003952,
0.3299133777618408,
-0.32325074076652527,
-0.1720113307237625,
-0.12864916026592255,
0.14562736451625824,
-0.09594111144542694,
0.23787599802017212,
-0.36168238520622253,
-0.1258823275566101,
0.16432785987854004,
-0.04518810659646988,
-0.3177165985107422,
-0.1253010779619217,
-0.1389867663383484,
0.16287043690681458,
-0.3516083061695099,
0.032878026366233826,
0.019673798233270645,
0.038159191608428955,
0.037554770708084106,
0.19914071261882782,
-0.09274808317422867,
-0.20614585280418396,
-0.023524735122919083,
0.09565930813550949,
0.05882083997130394,
-0.31500348448753357,
0.0616367943584919,
0.029054250568151474,
0.023553363978862762,
-0.03778020292520523,
-0.015000095590949059,
-0.2664402425289154,
0.03771783411502838,
-0.0016894564032554626,
0.2326427549123764,
0.04087068513035774,
-0.38274019956588745,
0.23784968256950378,
-0.07932834327220917,
-0.023530855774879456,
-0.31944647431373596,
0.2085808366537094,
-0.04485688731074333,
-0.015776589512825012,
0.18023303151130676,
0.145048588514328,
0.10343997925519943,
0.1590847373008728,
-0.05802763253450394,
-0.48479682207107544,
-0.4401679039001465,
0.011952031403779984,
0.45051002502441406,
0.5446569919586182,
-0.07185634225606918,
0.019310353323817253,
-0.13064947724342346,
0.183515265583992,
-0.18350952863693237,
0.23399502038955688,
-0.16054433584213257,
0.09434951841831207,
0.11115555465221405,
0.4568617641925812,
0.1012214720249176,
-0.4216003715991974,
0.20094037055969238,
0.15867799520492554,
-0.1436557024717331,
-0.1664288192987442,
-0.11814193427562714,
0.1250040978193283,
-0.006297320127487183,
0.12899616360664368,
0.3282499611377716,
-0.040244538336992264,
0.3381349444389343,
-0.12441806495189667,
0.1720053255558014,
-0.03003322146832943,
0.4582849144935608,
0.12252777814865112,
0.06116672605276108,
0.00886480137705803,
0.025257674977183342,
0.1473732888698578,
-0.007091790437698364,
0.18182672560214996,
0.2990250289440155,
0.4039627015590668,
0.05868696793913841,
-0.041018564254045486,
-0.2351355254650116,
-0.2793039381504059,
-0.246984601020813,
-0.17437082529067993,
-0.38038212060928345,
-0.07193924486637115,
-0.2379773110151291,
-0.3114106357097626,
-0.04859982058405876,
-0.023886658251285553,
0.009877942502498627,
0.24100659787654877,
-0.030076824128627777,
-0.1481560319662094,
-0.02893829345703125,
0.19054833054542542,
0.27079251408576965,
-0.38085222244262695,
0.2499392032623291,
0.26713430881500244,
-0.06741400063037872,
0.14793361723423004,
0.7233831882476807,
0.5791097283363342,
0.49424606561660767,
0.06279602646827698,
0.043616145849227905,
0.17504429817199707,
-0.09443702548742294,
0.005371294915676117,
0.15552449226379395,
0.29391759634017944,
0.197844997048378,
0.13774418830871582,
0.16754576563835144,
-0.09805040806531906,
0.44193193316459656,
0.22405371069908142,
0.07144923508167267,
-0.20114949345588684,
0.21656669676303864,
-0.19851341843605042,
-0.2867540717124939,
-0.47277769446372986,
-0.09784673899412155,
-0.23935455083847046,
0.2626553773880005,
0.22301481664180756,
-0.28547894954681396,
-0.028263702988624573,
-0.16317634284496307,
0.0714658796787262,
0.13773378729820251,
0.40541359782218933,
0.3580849766731262,
0.5348398685455322,
-0.4731362760066986,
0.11925363540649414,
-0.4017358720302582,
0.09717299044132233,
-0.2343873679637909,
0.33256152272224426,
0.21906448900699615,
0.3079726994037628,
0.07834906131029129,
-0.08847586810588837,
0.4011267423629761,
0.4300845265388489,
-0.14737023413181305,
0.38916200399398804,
-0.3090018332004547,
0.1465175896883011,
0.43006592988967896,
-0.25232598185539246,
0.24725061655044556,
-0.28621160984039307,
0.13213728368282318,
-0.14661745727062225,
-0.004790462553501129,
0.16612768173217773,
-0.014537356793880463,
0.2097320705652237,
-0.08076125383377075,
0.3864099979400635,
0.09838555008172989,
0.0439487025141716,
0.1375441551208496,
-0.048771485686302185,
-0.2940378189086914,
0.0732298269867897,
-0.3112202286720276,
0.0794529914855957,
0.4609498083591461,
0.09761273860931396,
-0.16387051343917847,
-0.09200374782085419,
-0.05194583535194397,
0.06810303777456284,
0.09180112183094025,
-0.16728854179382324,
-0.41015055775642395,
-0.06576821953058243,
-0.2244933545589447,
-0.054849572479724884,
0.16060370206832886,
-0.057493045926094055,
-0.08828367292881012,
0.045071057975292206,
-0.42579126358032227,
-0.3933452069759369,
0.19485314190387726,
-0.3706108331680298,
0.07660737633705139,
0.1860591024160385,
0.6281498670578003,
0.6488659977912903,
-0.3552020192146301,
-0.8206273317337036,
-0.11597602814435959,
0.2564792037010193,
0.005328409373760223,
0.07613532245159149,
-0.06923195719718933,
-0.06682482361793518,
0.15042836964130402,
0.0681801289319992,
0.34177106618881226,
0.026477335020899773,
0.08577177673578262,
0.1315520703792572,
-0.4763367772102356
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | Hi @lhoestq ,
Thanks for your explanation. Now I get it that `{}` means the columns are different. But wouldn't it be nice if the code can ignore it, like it ignores `{"a": []}`?
---
BTW,
> There's a check later in the code that makes sure that the columns are the right ones, so I don't think we need to check for {} here
I remember the error happens around here:
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L506-L507
The error says something like `arrays` and `schema` doesn't have the same length. And it's not very clear I passed a `{}`.
edit: actual error message
```
File "site-packages/datasets/arrow_writer.py", line 595, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3557, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 1401, in pyarrow.lib._sanitize_arrays
ValueError: Schema and number of arrays unequal
``` | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 130 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
Hi @lhoestq ,
Thanks for your explanation. Now I get it that `{}` means the columns are different. But wouldn't it be nice if the code can ignore it, like it ignores `{"a": []}`?
---
BTW,
> There's a check later in the code that makes sure that the columns are the right ones, so I don't think we need to check for {} here
I remember the error happens around here:
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L506-L507
The error says something like `arrays` and `schema` doesn't have the same length. And it's not very clear I passed a `{}`.
edit: actual error message
```
File "site-packages/datasets/arrow_writer.py", line 595, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3557, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 1401, in pyarrow.lib._sanitize_arrays
ValueError: Schema and number of arrays unequal
``` | [
-0.044797539710998535,
-0.03950556367635727,
-0.12906379997730255,
0.3717550039291382,
-0.12446045875549316,
-0.13376332819461823,
0.31636980175971985,
0.230211079120636,
-0.11289307475090027,
0.15248221158981323,
0.5265920162200928,
0.26466530561447144,
-0.13810232281684875,
0.0021484829485416412,
0.02460174635052681,
-0.10088048875331879,
0.25846266746520996,
0.43373075127601624,
0.2140159010887146,
0.03900700807571411,
-0.3004481792449951,
0.1153712347149849,
-0.4115590453147888,
0.36889731884002686,
0.005789231508970261,
-0.003598703071475029,
-0.022189859300851822,
-0.1775175929069519,
-0.2037726193666458,
-0.325393408536911,
-0.05243091285228729,
0.02510649338364601,
-0.08201868832111359,
0.09778458625078201,
-0.00012512656394392252,
0.12223358452320099,
0.1924436092376709,
-0.054378949105739594,
0.08352796733379364,
-0.04676461219787598,
0.051718078553676605,
0.06970521807670593,
-0.051221348345279694,
-0.2841426134109497,
0.30013135075569153,
-0.34342166781425476,
-0.22679801285266876,
-0.15070196986198425,
0.14835688471794128,
0.16420018672943115,
0.1330040544271469,
0.1902075558900833,
0.22140668332576752,
0.31895777583122253,
0.6487272381782532,
0.2827439308166504,
-0.07122743874788284,
0.24080942571163177,
0.07186225801706314,
-0.06859137117862701,
0.16589468717575073,
0.26838791370391846,
-0.19693665206432343,
0.1038760393857956,
0.26907670497894287,
0.25348860025405884,
0.28969424962997437,
0.003677729517221451,
-0.021156098693609238,
0.17219635844230652,
0.3488523066043854,
-0.2336241602897644,
-0.2205570638179779,
-0.1819881945848465,
-0.058823294937610626,
-0.5694108009338379,
0.23861634731292725,
0.24574308097362518,
-0.23317377269268036,
-0.0027211233973503113,
-0.10836846381425858,
-0.007567640393972397,
-0.23968274891376495,
-0.006217248737812042,
0.04702790081501007,
0.23042097687721252,
0.010385670699179173,
0.2780831754207611,
-0.039499904960393906,
0.27436354756355286,
0.5935248732566833,
-0.27047356963157654,
-0.42543813586235046,
0.277392715215683,
-0.13405941426753998,
0.002366352826356888,
-0.21067115664482117,
-0.18496888875961304,
-0.004775712266564369,
0.2378835380077362,
0.41008439660072327,
-0.20023071765899658,
0.24910753965377808,
0.051390308886766434,
0.16004353761672974,
0.11253386735916138,
0.28096315264701843,
0.4037375748157501,
-0.08227822184562683,
0.0708027184009552,
0.00015552714467048645,
-0.1527852714061737,
0.06922294944524765,
-0.4183003902435303,
0.5511454343795776,
0.038488589227199554,
0.16884185373783112,
0.06406441330909729,
-0.3505011200904846,
0.12608486413955688,
-0.5620929598808289,
-0.31877806782722473,
-0.0070391325280070305,
0.15106847882270813,
0.18250413239002228,
0.2136317491531372,
0.17392577230930328,
0.19811230897903442,
0.07918989658355713,
0.16874122619628906,
-0.05804404988884926,
-0.1167009025812149,
-0.1090589314699173,
-0.01578179933130741,
-0.24336504936218262,
0.13095644116401672,
0.22791960835456848,
0.1304789036512375,
0.01976270228624344,
-0.27215200662612915,
-0.01851167343556881,
-0.34352007508277893,
0.2541073262691498,
0.22758175432682037,
-0.15770746767520905,
0.04377414286136627,
-0.01997429132461548,
-0.23894309997558594,
-0.06597301363945007,
0.5554843544960022,
-0.28526464104652405,
-0.05930021405220032,
-0.17846854031085968,
0.09766305238008499,
-0.1872006356716156,
0.06586522608995438,
-0.6453282833099365,
-0.36962875723838806,
0.45854243636131287,
-0.19022229313850403,
0.542792797088623,
-0.1266302764415741,
0.2247874140739441,
-0.3859022557735443,
-0.04732108861207962,
0.26483380794525146,
-0.6693643927574158,
0.2667159140110016,
0.15523304045200348,
0.08184665441513062,
0.13675270974636078,
0.2962828576564789,
-0.2331748753786087,
0.47242310643196106,
-0.3987859785556793,
0.21400026977062225,
0.4532470405101776,
0.012395065277814865,
0.23950061202049255,
0.24759867787361145,
-0.04318865388631821,
-0.11734063923358917,
0.32779401540756226,
0.0061925966292619705,
0.024711942300200462,
-0.007334346417337656,
-0.10746623575687408,
-0.06723921746015549,
0.0398249551653862,
0.022104138508439064,
-0.16658994555473328,
-0.21839620172977448,
-0.09762457013130188,
-0.23678487539291382,
-0.0922248363494873,
-0.04063529521226883,
-0.06468426436185837,
-0.5544207096099854,
0.4317646622657776,
-0.2583343982696533,
0.02945595420897007,
0.03632752597332001,
0.4899294674396515,
0.061290498822927475,
0.07851143926382065,
-0.09793726354837418,
-0.32055455446243286,
-0.06567338854074478,
-0.3603099286556244,
-0.37988176941871643,
-0.016849204897880554,
-0.19243350625038147,
-0.07188336551189423,
0.23134227097034454,
-0.12395741045475006,
0.29246798157691956,
0.013916317373514175,
-0.2846122980117798,
0.030326228588819504,
-0.10694806277751923,
-0.1627482920885086,
-0.2340603470802307,
-0.15019777417182922,
0.10782299190759659,
-0.15528278052806854,
0.14183534681797028,
-0.18653583526611328,
-0.18213103711605072,
-0.11693299561738968,
0.07270415127277374,
0.11455933749675751,
-0.013189570978283882,
-0.003797655925154686,
0.5226964354515076,
-0.09581883996725082,
0.19069254398345947,
-0.5476874709129333,
-0.06527778506278992,
0.0073501188308000565,
-0.03576140105724335,
0.21299391984939575,
-0.06652243435382843,
0.3526988923549652,
-0.11516208946704865,
0.13392657041549683,
0.31276875734329224,
-0.07611039280891418,
0.4671109914779663,
0.03523324429988861,
-0.15078265964984894,
-0.16934801638126373,
0.1567607820034027,
-0.017019500955939293,
-0.1679200530052185,
0.39385926723480225,
0.015979742631316185,
0.12113991379737854,
0.3182838559150696,
-0.27903860807418823,
-0.004165187478065491,
0.27173101902008057,
-0.010056113824248314,
0.030986204743385315,
-0.032137587666511536,
0.06529641151428223,
0.16346964240074158,
-0.06218902766704559,
0.032290007919073105,
0.5576929450035095,
0.160039484500885,
-0.38588711619377136,
-0.14764580130577087,
0.06260985136032104,
-0.3845246136188507,
0.47517213225364685,
0.07091955095529556,
0.3311002552509308,
0.058043740689754486,
-0.08571077883243561,
-0.058001551777124405,
-0.07309980690479279,
-0.03085169941186905,
0.08912567794322968,
-0.0539386048913002,
-0.49366259574890137,
0.3184807598590851,
-0.02856319211423397,
0.1560194492340088,
-0.6062089800834656,
-0.2948935925960541,
-0.1682828813791275,
-0.24383613467216492,
0.07935810089111328,
0.0030584074556827545,
-0.37896615266799927,
-0.24826090037822723,
-0.4364049732685089,
0.04042515158653259,
-0.1482948213815689,
-0.20189303159713745,
-0.029616689309477806,
-0.19275806844234467,
-0.22444960474967957,
-0.03799113258719444,
0.14065800607204437,
0.19862405955791473,
0.2852673828601837,
0.08060647547245026,
-0.06895193457603455,
-0.17532208561897278,
-0.19817250967025757,
-0.007062721997499466,
-0.1574854552745819,
-0.13201779127120972,
0.22003701329231262,
0.2266685664653778,
0.16198109090328217,
-0.3185878098011017,
0.09713886678218842,
-0.10499609261751175,
-0.2247326523065567,
0.18684308230876923,
0.34076187014579773,
-0.09658593684434891,
-0.23746518790721893,
-0.06941460818052292,
0.11916805803775787,
-0.18578508496284485,
0.1555337756872177,
0.04398873820900917,
0.2968449592590332,
0.12205898016691208,
0.2740795612335205,
0.00199302239343524,
-0.1745404601097107,
-0.20359809696674347,
0.13965249061584473,
0.08394396305084229,
0.17908240854740143,
-0.0419003963470459,
-0.1156819611787796,
-0.09525144100189209,
0.0004062838852405548,
-0.023159775882959366,
0.01716030016541481,
-0.2686018943786621,
-0.06216590479016304,
-0.2695469260215759,
-0.2087237685918808,
-0.20586752891540527,
0.19899533689022064,
0.28995805978775024,
0.1581716537475586,
-0.06447164714336395,
-0.10808444023132324,
-0.08981756865978241,
0.4024680554866791,
-0.2608622610569,
-0.0579272136092186,
0.059122782200574875,
0.38281434774398804,
-0.3907177150249481,
0.6877737045288086,
0.14280854165554047,
-0.005992364138364792,
0.33775147795677185,
-0.25391626358032227,
0.22429373860359192,
0.07752376049757004,
0.1726965308189392,
-0.0037910209503024817,
0.08821266889572144,
-0.3062817454338074,
0.02597183734178543,
-0.3328889012336731,
-0.08588459342718124,
0.11272141337394714,
0.10857810080051422,
-0.21700313687324524,
-0.24474462866783142,
0.4406655728816986,
-0.5963496565818787,
-0.011166945099830627,
-0.18292398750782013,
0.11773212999105453,
-0.1585872322320938,
-0.23418226838111877,
-0.11658179759979248,
-0.2528732419013977,
0.2773788273334503,
-0.20993246138095856,
-0.3792269825935364,
-0.49957728385925293,
-0.10556787997484207,
0.45170652866363525,
0.2703061103820801,
0.44969919323921204,
0.29286351799964905,
-0.2360304892063141,
0.18037407100200653,
-0.1727159470319748,
0.6458582282066345,
0.0324484258890152,
-0.28172218799591064,
-0.09025262296199799,
0.71988445520401,
-0.48119935393333435,
-0.38598382472991943,
-0.36990123987197876,
0.2566286027431488,
-0.2628996968269348,
0.06282519549131393,
-0.24439483880996704,
-0.02832956239581108,
0.4579862356185913,
0.10476654022932053,
-0.09215977042913437,
-0.36528775095939636,
-0.5947378277778625,
-0.02266436628997326,
-0.11036469787359238,
0.06982611864805222,
0.3010791540145874,
0.2541438639163971,
-0.3152921497821808,
-0.23288440704345703,
-0.023198934271931648,
0.0021485909819602966,
-0.06848835945129395,
-0.012970218434929848,
0.3270591199398041,
-0.5097648501396179,
-0.16079485416412354,
-0.19243775308132172,
-0.11252434551715851,
0.3529820144176483,
0.2437468320131302,
-0.03231820836663246,
0.028475351631641388,
-0.0722396969795227,
-0.4483116567134857,
0.59232097864151,
0.32636478543281555,
-0.10525862127542496,
0.3985501825809479,
0.15402616560459137,
0.10586971044540405,
0.054884783923625946,
-0.6519646644592285,
0.35957852005958557,
-0.007734681945294142,
-0.08859865367412567,
-0.030345452949404716,
0.6704127192497253,
0.3493996858596802,
0.08763933181762695,
0.3786869943141937,
0.5494608879089355,
-0.3285640776157379,
0.5173193216323853,
0.18416866660118103,
0.9901800155639648,
0.27029407024383545,
0.11285214126110077,
0.21536576747894287,
-0.4378623366355896,
0.12115352600812912,
0.0779649093747139,
0.17332938313484192,
-0.3691805601119995,
0.09220714867115021,
-0.0915645956993103,
-0.3688918352127075,
0.2592392861843109,
0.2641620934009552,
-0.0455772690474987,
0.23246100544929504,
-0.4603690505027771,
0.4322013556957245,
-0.17331059277057648,
-0.16413024067878723,
-0.3110692501068115,
0.08609123528003693,
-0.02632022649049759,
-0.10751797258853912,
0.11582338809967041,
-0.24743124842643738,
-0.148691326379776,
-0.20788629353046417,
-0.2150842249393463,
-0.4606640934944153,
-0.3513806462287903,
-0.06691975891590118,
-0.39591893553733826,
-0.1974620223045349,
0.356866717338562,
-0.37782490253448486,
0.11371512711048126,
0.016386572271585464,
0.07949630916118622,
-0.024029288440942764,
0.11898383498191833,
-0.10892067849636078,
0.4710206687450409,
0.11876180022954941,
-0.07244740426540375,
-0.11606553941965103,
-0.003926264122128487,
0.10280442982912064,
-0.13264749944210052,
0.1412857472896576,
-0.28877416253089905,
-0.39547479152679443,
0.016758158802986145,
0.46616804599761963,
0.2003248631954193,
-0.13189731538295746,
-0.14056721329689026,
-0.20933547616004944,
-0.030386678874492645,
-0.061480700969696045,
0.01497984491288662,
0.012374266982078552,
-0.013837302103638649,
0.2605912387371063,
-0.2416008859872818,
-0.3014220893383026,
0.011414449661970139,
-0.10276361554861069,
0.16955018043518066,
0.040021345019340515,
0.7563891410827637,
-0.232390359044075,
0.04177074134349823,
-0.09058989584445953,
0.10031919926404953,
0.40258049964904785,
-0.9415070414543152,
0.1307191550731659,
-0.041724808514118195,
0.08239345252513885,
0.07603432238101959,
0.43112891912460327,
0.24095937609672546,
0.4620239734649658,
-0.3343670666217804,
-0.2647758722305298,
0.06625999510288239,
0.35641753673553467,
0.12104098498821259,
0.22217436134815216,
-0.16834253072738647,
0.0670708566904068,
0.0871998593211174,
0.015860404819250107,
-0.20671668648719788,
-0.11616038531064987,
-0.2156161069869995,
0.18915197253227234,
-0.132589191198349,
0.23285973072052002,
-0.16471651196479797,
-0.15476062893867493,
-0.005122734233736992,
0.17929638922214508,
0.016589760780334473,
-0.11090759932994843,
0.027794554829597473,
0.16464586555957794,
0.14350077509880066,
-0.08387168496847153,
-0.007340307347476482,
-0.15490566194057465,
0.08721572160720825,
0.09352374821901321,
-0.018570033833384514,
-0.15087714791297913,
-0.01592715084552765,
-0.08422823995351791,
0.22888696193695068,
0.2440590262413025,
-0.46398836374282837,
0.20362699031829834,
-0.38810014724731445,
0.09708535671234131,
-0.12089429795742035,
0.20326006412506104,
0.05730479583144188,
0.040132440626621246,
0.19604574143886566,
0.06662613153457642,
0.010936714708805084,
0.12555374205112457,
-0.024910546839237213,
-0.3840257525444031,
-0.22663602232933044,
-0.08060476928949356,
0.3606760799884796,
0.5439015626907349,
-0.13219711184501648,
-0.2201264202594757,
0.026996541768312454,
0.10335465520620346,
-0.22726306319236755,
-0.06142902001738548,
-0.25178372859954834,
0.12738613784313202,
-0.029366031289100647,
0.459881454706192,
0.16071514785289764,
-0.2559904456138611,
-0.01860949397087097,
0.20552656054496765,
0.1628141701221466,
-0.0698661059141159,
-0.11074502766132355,
0.48700496554374695,
0.05110308155417442,
0.11083056032657623,
0.43457040190696716,
-0.036115359514951706,
0.2583858072757721,
0.024165049195289612,
0.0749722272157669,
0.1640218198299408,
0.41291922330856323,
-0.012891214340925217,
0.14693590998649597,
-0.10011647641658783,
-0.09911231696605682,
0.07276014983654022,
-0.0006238147616386414,
0.08478690683841705,
0.23501908779144287,
0.32312923669815063,
0.20169886946678162,
-0.05453198030591011,
-0.09914395213127136,
-0.1749211549758911,
-0.10482024401426315,
0.06577685475349426,
-0.5078105926513672,
-0.07443788647651672,
-0.04363539442420006,
-0.35588833689689636,
-0.08709530532360077,
-0.060799941420555115,
0.3749333918094635,
0.052488021552562714,
-0.06264343857765198,
-0.1399274468421936,
0.15636685490608215,
0.13673406839370728,
0.17719095945358276,
-0.30900707840919495,
0.3248569667339325,
0.23279979825019836,
-0.220900297164917,
0.32742246985435486,
0.619101881980896,
0.6014116406440735,
0.5607655644416809,
0.27436164021492004,
-0.037043794989585876,
0.04195043072104454,
-0.07255253195762634,
0.09729825705289841,
0.15659867227077484,
0.2951418459415436,
0.02601923793554306,
0.04037680849432945,
0.12608058750629425,
-0.0012142723426222801,
0.21870043873786926,
0.3066268265247345,
0.2536252737045288,
-0.23648673295974731,
0.37473782896995544,
-0.21212062239646912,
-0.4680130183696747,
-0.17873932421207428,
-0.10730809718370438,
-0.3011977970600128,
0.13827219605445862,
0.1346016675233841,
-0.14395827054977417,
0.04346468672156334,
-0.022996138781309128,
0.026768852025270462,
0.2270956039428711,
0.42182835936546326,
0.535864531993866,
0.23213285207748413,
-0.3973175883293152,
0.11401931941509247,
-0.5300096273422241,
-0.05488503724336624,
-0.39973464608192444,
0.2743970453739166,
0.26710614562034607,
0.32803159952163696,
0.18457411229610443,
-0.07869075238704681,
0.3110131621360779,
0.6908102631568909,
-0.44676753878593445,
0.5007969737052917,
-0.1823948472738266,
-0.03856775537133217,
0.3876814842224121,
-0.28516101837158203,
0.005219161510467529,
-0.4087114930152893,
0.4171909689903259,
-0.1993996500968933,
-0.08973493427038193,
-0.002124723047018051,
0.18901678919792175,
0.362015038728714,
0.13257315754890442,
0.23876793682575226,
-0.05427686125040054,
0.17592419683933258,
0.20756790041923523,
0.053767018020153046,
-0.09776051342487335,
0.04520957171916962,
-0.3863225281238556,
0.2264534831047058,
0.333622545003891,
-0.11476509273052216,
-0.21826794743537903,
-0.14819282293319702,
-0.06456415355205536,
0.09751995652914047,
-0.20186157524585724,
-0.017914483323693275,
-0.3544580638408661,
-0.02659251168370247,
-0.23460716009140015,
-0.0027374422643333673,
0.15524685382843018,
-0.25850483775138855,
0.08474182337522507,
0.06159697473049164,
-0.4303573966026306,
-0.48300787806510925,
0.3383128046989441,
-0.3029226064682007,
-0.11969058215618134,
0.2639003098011017,
0.469951868057251,
0.40304267406463623,
-0.22715578973293304,
-0.6046953201293945,
-0.11473292112350464,
0.4241373836994171,
-0.11940065771341324,
0.1519721895456314,
-0.05790729448199272,
-0.053621288388967514,
0.16272258758544922,
-0.050710760056972504,
0.08893837034702301,
-0.09800983220338821,
-0.10073341429233551,
-0.036434806883335114,
-0.4556781053543091
] |
https://github.com/huggingface/datasets/issues/4502 | Logic bug in arrow_writer? | > But wouldn't it be nice if the code can ignore it, like it ignores {"a": []}?
I think it would make things confusing because it doesn't follow our definition of a batch: "the columns of a batch = the keys of the dict". It would probably break certain behaviors as well. For example if you remove all the columns of a dataset (using `.remove_colums(...)` or `.map(..., remove_columns=...)`), the writer has to write 0 columns, and currently the only way to tell the writer to do so using `write_batch` is to pass `{}`.
> The error says something like arrays and schema doesn't have the same length. And it's not very clear I passed a {}.
Yea the message can actually be improved indeed, it's definitely not clear. Maybe we can add a line right before the call `pa.Table.from_arrays` to make sure the keys of the batch match the field names of the schema | https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq | 154 | Logic bug in arrow_writer?
https://github.com/huggingface/datasets/blob/88a902d6474fae8d793542d57a4f3b0d187f3c5b/src/datasets/arrow_writer.py#L475-L488
I got some error, and I found it's caused by `batch_examples` being `{}`. I wonder if the code should be as follows:
```
- if batch_examples and len(next(iter(batch_examples.values()))) == 0:
+ if not batch_examples or len(next(iter(batch_examples.values()))) == 0:
return
```
@lhoestq
> But wouldn't it be nice if the code can ignore it, like it ignores {"a": []}?
I think it would make things confusing because it doesn't follow our definition of a batch: "the columns of a batch = the keys of the dict". It would probably break certain behaviors as well. For example if you remove all the columns of a dataset (using `.remove_colums(...)` or `.map(..., remove_columns=...)`), the writer has to write 0 columns, and currently the only way to tell the writer to do so using `write_batch` is to pass `{}`.
> The error says something like arrays and schema doesn't have the same length. And it's not very clear I passed a {}.
Yea the message can actually be improved indeed, it's definitely not clear. Maybe we can add a line right before the call `pa.Table.from_arrays` to make sure the keys of the batch match the field names of the schema | [
-0.16384296119213104,
0.0012407675385475159,
-0.11076225340366364,
0.2590092122554779,
-0.15944330394268036,
-0.14531826972961426,
0.23462404310703278,
0.1775006502866745,
0.06671126186847687,
0.09348008036613464,
0.6439661979675293,
0.2104954719543457,
-0.3761604428291321,
0.10919278115034103,
-0.08258020877838135,
0.029047198593616486,
0.22295968234539032,
0.28142744302749634,
0.20979544520378113,
0.016675293445587158,
-0.285564124584198,
0.09522847086191177,
-0.3442878723144531,
0.3216015696525574,
0.0006814941298216581,
-0.1957695484161377,
0.07561293989419937,
-0.1405409276485443,
-0.1915707290172577,
-0.2377147227525711,
-0.08297792822122574,
0.102385014295578,
-0.03123163990676403,
0.11259457468986511,
-0.00012265826808288693,
0.05227130651473999,
0.27441006898880005,
-0.1119544729590416,
-0.03704823553562164,
-0.048261165618896484,
-0.19855642318725586,
0.0029315268620848656,
-0.09366274625062943,
-0.24258986115455627,
0.31688570976257324,
-0.17677155137062073,
-0.15481218695640564,
-0.37810152769088745,
0.2025846540927887,
0.1890786737203598,
0.14264130592346191,
0.09657525271177292,
0.07905475795269012,
0.35460978746414185,
0.6873242259025574,
0.5089920163154602,
-0.18814228475093842,
-0.039024412631988525,
0.16673317551612854,
-0.0944632813334465,
0.04214678704738617,
0.37146833539009094,
-0.1854604184627533,
-0.09350927174091339,
0.31807243824005127,
0.2119227796792984,
0.3889342248439789,
-0.0808807909488678,
0.052998267114162445,
0.12380539625883102,
0.33165693283081055,
-0.18259820342063904,
-0.34316742420196533,
-0.29862403869628906,
-0.13096386194229126,
-0.5190861225128174,
0.14659757912158966,
0.1790233552455902,
-0.29958516359329224,
-0.000969182699918747,
-0.08611364662647247,
-0.07110295444726944,
-0.2208283692598343,
-0.11194570362567902,
0.19572603702545166,
0.17546573281288147,
0.045005250722169876,
0.18011178076267242,
-0.06231686845421791,
0.11204539984464645,
0.6360087990760803,
-0.2004440277814865,
-0.5542294383049011,
0.39527273178100586,
-0.16585324704647064,
-0.03742755949497223,
-0.1016436442732811,
-0.09378359466791153,
0.031359750777482986,
0.22741836309432983,
0.32861217856407166,
-0.08909894526004791,
0.22183898091316223,
0.06276886910200119,
0.3150148093700409,
0.05687803402543068,
0.4789904057979584,
0.41762176156044006,
-0.07647287845611572,
-0.009762005880475044,
0.1815449297428131,
-0.08868766576051712,
-0.01859777420759201,
-0.3628155291080475,
0.46553996205329895,
0.0590544119477272,
0.153667151927948,
0.030179236084222794,
-0.23515135049819946,
0.22652800381183624,
-0.3952897787094116,
-0.23166149854660034,
-0.06186078116297722,
0.12541505694389343,
0.23971760272979736,
0.28856465220451355,
0.14754988253116608,
0.19358868896961212,
0.045616231858730316,
0.2253764569759369,
-0.10034854710102081,
-0.22283418476581573,
-0.1399439126253128,
-0.04841519147157669,
-0.1857597380876541,
0.33605432510375977,
0.22350236773490906,
0.04979434609413147,
0.0043218135833740234,
-0.15291473269462585,
0.06699283421039581,
-0.342719167470932,
0.25819358229637146,
0.2770519256591797,
-0.2532186210155487,
0.1249050572514534,
-0.03965276852250099,
-0.13959532976150513,
-0.07039138674736023,
0.620067298412323,
-0.2845095992088318,
-0.0404946394264698,
-0.1766616404056549,
0.09552600234746933,
-0.17944860458374023,
0.11107317358255386,
-0.8082782626152039,
-0.24687926471233368,
0.3493993878364563,
-0.017558956518769264,
0.4614163935184479,
-0.1531362533569336,
0.2273871898651123,
-0.32218486070632935,
0.0029739011079072952,
0.3096023201942444,
-0.6461997628211975,
0.17855297029018402,
0.21101497113704681,
0.02169065922498703,
0.16570428013801575,
0.2946734130382538,
-0.11450172960758209,
0.526526689529419,
-0.32238492369651794,
0.06653931736946106,
0.428195595741272,
-0.13794931769371033,
0.22652572393417358,
0.2908598482608795,
-0.010702233761548996,
-0.06301430612802505,
0.2790696322917938,
0.06209557503461838,
0.2155490219593048,
-0.06139576435089111,
-0.030953258275985718,
-0.021401535719633102,
-0.11443272233009338,
0.052622050046920776,
-0.1760241538286209,
-0.24370606243610382,
-0.18642877042293549,
-0.18829627335071564,
-0.0017489679157733917,
-0.034134626388549805,
-0.11367353051900864,
-0.49978795647621155,
0.4674118459224701,
-0.15854908525943756,
0.2063310593366623,
0.04012090340256691,
0.5830690860748291,
0.08670876175165176,
0.09351038187742233,
-0.027705680578947067,
-0.38060078024864197,
-0.03568318113684654,
-0.34520286321640015,
-0.37986308336257935,
-0.06426763534545898,
-0.18464243412017822,
-0.008408458903431892,
0.2761755585670471,
-0.09378166496753693,
0.23660866916179657,
-0.007703414186835289,
-0.43839308619499207,
-0.0925552248954773,
-0.06964968144893646,
-0.147470161318779,
-0.2733721137046814,
-0.076215960085392,
0.09409790486097336,
-0.1722448170185089,
-0.14459757506847382,
-0.0706157386302948,
-0.19802209734916687,
-0.18253391981124878,
0.1591513603925705,
0.04317796975374222,
0.002265377901494503,
0.019151166081428528,
0.41738563776016235,
0.03659941628575325,
0.043262287974357605,
-0.4321223795413971,
0.03870159387588501,
-0.11689407378435135,
-0.018058795481920242,
0.23971910774707794,
-0.13443204760551453,
0.2942222058773041,
-0.18534454703330994,
-0.07412906736135483,
0.32502198219299316,
-0.1110604852437973,
0.5204489827156067,
-0.04928797855973244,
-0.0625319853425026,
-0.1359657347202301,
0.1802409589290619,
-0.10119033604860306,
-0.18312989175319672,
0.2509758174419403,
-0.058932822197675705,
0.08253872394561768,
0.19632387161254883,
-0.14516359567642212,
0.027262859046459198,
0.20506088435649872,
0.006890986114740372,
0.03733797371387482,
0.07313968986272812,
0.053479209542274475,
0.1781061589717865,
0.0040893834084272385,
0.12450693547725677,
0.3566848635673523,
0.16280554234981537,
-0.36249929666519165,
-0.2325100302696228,
0.23513224720954895,
-0.29602718353271484,
0.4116687476634979,
0.08736810833215714,
0.28826776146888733,
-0.032917290925979614,
-0.14523644745349884,
-0.021169938147068024,
0.06841297447681427,
-0.17665068805217743,
-0.00546544324606657,
-0.014660177752375603,
-0.4299633502960205,
0.21147912740707397,
0.11266487836837769,
0.23036572337150574,
-0.4460453689098358,
-0.1289246529340744,
-0.040367353707551956,
-0.3532525897026062,
0.09320861101150513,
0.005624596029520035,
-0.5216542482376099,
-0.18905246257781982,
-0.46467143297195435,
0.12425394356250763,
-0.0927964374423027,
-0.1327091008424759,
-0.057619694620370865,
-0.3861600458621979,
-0.1651896834373474,
-0.015583062544465065,
0.11577290296554565,
0.13858336210250854,
0.34625759720802307,
0.2094254493713379,
-0.017230242490768433,
-0.16410693526268005,
-0.032035570591688156,
0.0032408572733402252,
-0.21794717013835907,
-0.21974359452724457,
0.24779239296913147,
0.2660542130470276,
0.1193905919790268,
-0.28202158212661743,
0.016819115728139877,
-0.19292595982551575,
-0.2154669612646103,
0.14026106894016266,
0.3405713737010956,
-0.035410501062870026,
-0.281076043844223,
0.057539649307727814,
0.03594467416405678,
-0.21752379834651947,
0.20574034750461578,
0.020329903811216354,
0.2783657908439636,
0.3052815794944763,
0.19761335849761963,
0.005162476561963558,
-0.16149583458900452,
-0.3614861071109772,
0.2626386880874634,
-0.02928800880908966,
0.15172308683395386,
-0.04471225291490555,
-0.06924621760845184,
0.033572856336832047,
0.00045279040932655334,
-0.03979570046067238,
0.0646200031042099,
-0.2557947039604187,
0.07853014767169952,
-0.1803116798400879,
-0.17217661440372467,
-0.2063266932964325,
0.15794192254543304,
0.2857569456100464,
0.2686493694782257,
-0.0837944820523262,
-0.1340351402759552,
-0.04041945934295654,
0.4873461127281189,
-0.3300182521343231,
-0.06215711683034897,
-0.016050513833761215,
0.42541900277137756,
-0.36166757345199585,
0.7493216395378113,
0.11328589916229248,
0.10676796734333038,
0.12360359728336334,
-0.09984192997217178,
0.24684502184391022,
0.05657680705189705,
0.2019667625427246,
-0.012414053082466125,
0.13343894481658936,
-0.44191598892211914,
-0.08316302299499512,
-0.22168079018592834,
-0.04308392107486725,
0.25775766372680664,
0.1633150577545166,
-0.12211932241916656,
-0.3219573199748993,
0.5438945293426514,
-0.9240612983703613,
-0.05791494995355606,
-0.26423513889312744,
0.1512589156627655,
-0.11914557218551636,
-0.1821601390838623,
-0.10405169427394867,
-0.31189048290252686,
0.3425271213054657,
-0.1959395557641983,
-0.3725968599319458,
-0.3128948509693146,
-0.33060699701309204,
0.29482489824295044,
0.11146564036607742,
0.4783865213394165,
0.2783282399177551,
-0.21283799409866333,
0.07043509930372238,
-0.026685379445552826,
0.7068130970001221,
-0.1050061509013176,
-0.23370279371738434,
-0.0030103251338005066,
0.6868987679481506,
-0.4821905493736267,
-0.33212047815322876,
-0.4089530408382416,
0.440606027841568,
-0.2713640332221985,
-0.006565265357494354,
-0.2363729476928711,
-0.02828456088900566,
0.3533782362937927,
-0.020299991592764854,
-0.10908329486846924,
-0.19839821755886078,
-0.4543728232383728,
-0.049022775143384933,
-0.1031239703297615,
0.1539950966835022,
0.483303040266037,
0.12780936062335968,
-0.3447159230709076,
-0.23027931153774261,
-0.1298125982284546,
0.04426974803209305,
-0.004247844219207764,
-0.0916714072227478,
0.34904706478118896,
-0.4037986993789673,
-0.041377753019332886,
-0.16037283837795258,
-0.0010477416217327118,
0.395852267742157,
0.1817268431186676,
-0.08620455861091614,
0.041311752051115036,
-0.023700222373008728,
-0.5039184093475342,
0.6412809491157532,
0.30072522163391113,
-0.08780010789632797,
0.41351959109306335,
0.14965590834617615,
0.1022263914346695,
-0.05021648108959198,
-0.5475292205810547,
0.24348215758800507,
-0.0027426895685493946,
-0.2500970959663391,
-0.13973860442638397,
0.5256195068359375,
0.24880452454090118,
0.02350393682718277,
0.3743702173233032,
0.5077542662620544,
-0.38096803426742554,
0.793552815914154,
0.18094584345817566,
0.8956314921379089,
0.188639298081398,
0.14096134901046753,
0.00042734295129776,
-0.23981423676013947,
0.19366294145584106,
0.16017399728298187,
0.06177019327878952,
-0.3815765976905823,
0.24480313062667847,
0.010650618001818657,
-0.27364835143089294,
0.24244746565818787,
0.40701818466186523,
-0.08276426792144775,
0.19822704792022705,
-0.3506848216056824,
0.3537934422492981,
-0.2364102602005005,
-0.23713576793670654,
-0.15428565442562103,
-0.09943628311157227,
0.04648469761013985,
-0.054724402725696564,
0.2078629732131958,
-0.3755159378051758,
-0.13238464295864105,
-0.20425045490264893,
-0.19376958906650543,
-0.4147719144821167,
-0.35626494884490967,
-0.07091821730136871,
-0.44151976704597473,
-0.11467744410037994,
0.29385247826576233,
-0.3589223623275757,
0.22038590908050537,
0.029239226132631302,
0.20287244021892548,
0.056448668241500854,
0.028708040714263916,
-0.04766217991709709,
0.42922869324684143,
0.2022343873977661,
-0.012361050583422184,
-0.1689942330121994,
-0.09541501104831696,
0.19342491030693054,
-0.10754384845495224,
0.11192837357521057,
-0.336182177066803,
-0.3572944402694702,
0.004033103585243225,
0.40373480319976807,
0.18333998322486877,
-0.15396921336650848,
-0.22629523277282715,
-0.17671051621437073,
-0.00013959407806396484,
-0.04239581152796745,
0.029559899121522903,
0.2142251580953598,
0.03195587173104286,
0.33230212330818176,
-0.3541046679019928,
-0.2582000494003296,
0.10644523799419403,
-0.1478923261165619,
0.10152983665466309,
-0.13475392758846283,
0.7591267824172974,
-0.1877257078886032,
0.023588303476572037,
-0.1776789426803589,
0.2077740728855133,
0.42739763855934143,
-0.8440974354743958,
0.2244691550731659,
0.044210974127054214,
-0.12584327161312103,
0.19648614525794983,
0.49849048256874084,
0.08111277967691422,
0.2746213674545288,
-0.34155383706092834,
-0.1280369907617569,
-0.08091285079717636,
0.41283804178237915,
0.03673072159290314,
0.29085662961006165,
-0.2853948175907135,
-0.07893800735473633,
0.003865320235490799,
0.01577359437942505,
-0.2422659695148468,
-0.30025482177734375,
-0.2599916160106659,
0.18665868043899536,
-0.18391329050064087,
0.3321436047554016,
-0.06520581245422363,
-0.2083723545074463,
-0.07263810187578201,
0.0754471942782402,
0.022938665002584457,
-0.11810742318630219,
-0.0016513429582118988,
0.1451963633298874,
0.1313720941543579,
0.026555463671684265,
0.0009930678643286228,
-0.11370182782411575,
-0.01127617061138153,
0.01594926416873932,
0.02625870332121849,
-0.0017180182039737701,
0.010487768799066544,
0.06695730239152908,
0.27038612961769104,
0.3897327780723572,
-0.34710830450057983,
0.1920127421617508,
-0.2843031585216522,
0.13984867930412292,
-0.19041235744953156,
0.1888676881790161,
0.17623305320739746,
0.025628678500652313,
0.29337403178215027,
0.09413222968578339,
0.0899582952260971,
0.24595341086387634,
-0.02553422749042511,
-0.3011319637298584,
-0.2477298229932785,
0.08085273206233978,
0.24912604689598083,
0.3955424427986145,
-0.11096746474504471,
-0.32722291350364685,
0.04996206983923912,
0.15492914617061615,
-0.1487603485584259,
-0.01715819537639618,
-0.2450627088546753,
0.047315433621406555,
-0.00470447912812233,
0.44584566354751587,
0.07443340122699738,
-0.276915967464447,
-0.014004319906234741,
0.18717700242996216,
0.17146502435207367,
-0.16605444252490997,
0.03780151903629303,
0.3644985258579254,
0.03126021847128868,
0.05173564702272415,
0.2760527431964874,
-0.10795433819293976,
0.38396957516670227,
0.22621068358421326,
0.19719305634498596,
0.35132527351379395,
0.5401954650878906,
0.07425350695848465,
0.07962249219417572,
-0.2615433633327484,
-0.011970806866884232,
-0.06603305041790009,
-0.009652592241764069,
0.21837079524993896,
0.18828710913658142,
0.19029025733470917,
0.18768887221813202,
-0.0576607920229435,
-0.01755654253065586,
-0.34485313296318054,
-0.19595900177955627,
-0.06595693528652191,
-0.4704165458679199,
-0.05588056892156601,
0.07163482904434204,
-0.47662755846977234,
-0.15718518197536469,
-0.030088350176811218,
0.19377587735652924,
0.026725567877292633,
0.034019019454717636,
-0.043314091861248016,
0.1236853078007698,
0.07651414722204208,
0.2476140260696411,
-0.21929101645946503,
0.16255417466163635,
0.05816197395324707,
-0.17934495210647583,
0.3031260371208191,
0.6442707777023315,
0.4049421548843384,
0.6622430682182312,
0.18144330382347107,
0.07172401249408722,
0.024685576558113098,
-0.10685007274150848,
-0.0949615091085434,
0.22756865620613098,
0.15338000655174255,
-0.10795141756534576,
0.03251129016280174,
0.10907914489507675,
0.010557536967098713,
0.20454926788806915,
0.2866204082965851,
0.10874941945075989,
0.005024361424148083,
0.39126911759376526,
-0.10932983458042145,
-0.4524804651737213,
-0.13010647892951965,
-0.037692613899707794,
-0.08424371480941772,
-0.07226449251174927,
0.23067577183246613,
-0.258298397064209,
0.0531594380736351,
-0.10010722279548645,
0.04275209456682205,
0.19244754314422607,
0.554096519947052,
0.5313078165054321,
0.27345511317253113,
-0.43609514832496643,
0.22124068439006805,
-0.4489803612232208,
-0.1240328922867775,
-0.42428162693977356,
0.27204111218452454,
0.30653995275497437,
0.3607206642627716,
0.1643286496400833,
-0.1214495450258255,
0.15713170170783997,
0.6685217022895813,
-0.4589192569255829,
0.4157397150993347,
-0.23329420387744904,
-0.05270286276936531,
0.33637022972106934,
-0.19706971943378448,
0.08910196274518967,
-0.45525074005126953,
0.4068922996520996,
0.026715245097875595,
-0.065770223736763,
-0.08023912459611893,
0.09034928679466248,
0.32620969414711,
0.06636356562376022,
0.17977571487426758,
0.020431846380233765,
-0.03470541536808014,
0.17628589272499084,
-0.07662469148635864,
-0.27444562315940857,
-0.06556916236877441,
-0.4283907413482666,
0.08073102682828903,
0.33290165662765503,
-0.0011261291801929474,
-0.25954100489616394,
-0.15207718312740326,
-0.041103214025497437,
-0.017652930691838264,
-0.13047292828559875,
0.02771684154868126,
-0.45607128739356995,
0.14707615971565247,
-0.2561143934726715,
0.1529591828584671,
0.02645488828420639,
-0.2733440399169922,
0.016161032021045685,
0.14518730342388153,
-0.3782210946083069,
-0.3494857847690582,
0.20148494839668274,
-0.24126526713371277,
-0.13558709621429443,
0.19260527193546295,
0.5035654306411743,
0.17452552914619446,
-0.26593729853630066,
-0.6358745098114014,
-0.11151131987571716,
0.2904479503631592,
-0.04105151444673538,
0.1612217128276825,
-0.07346746325492859,
-0.024691905826330185,
0.10941444337368011,
-0.06034362316131592,
0.21845398843288422,
-0.04354344308376312,
0.024667685851454735,
0.018230102956295013,
-0.42057591676712036
] |
https://github.com/huggingface/datasets/issues/4498 | WER and CER > 1 | WER can have values bigger than 1.0, this is expected when there are too many insertions
From [wikipedia](https://en.wikipedia.org/wiki/Word_error_rate):
> Note that since N is the number of words in the reference, the word error rate can be larger than 1.0 | ## Describe the bug
It seems that in some cases in which the `prediction` is longer than the `reference` we may have word/character error rate higher than 1 which is a bit odd.
If it's a real bug I think I can solve it with a PR changing [this](https://github.com/huggingface/datasets/blob/master/metrics/wer/wer.py#L105) line to
```python
return min(incorrect / total, 1.0)
```
## Steps to reproduce the bug
```python
from datasets import load_metric
wer = load_metric("wer")
wer_value = wer.compute(predictions=["Hi World vka"], references=["Hello"])
print(wer_value)
```
## Expected results
```
1.0
```
## Actual results
```
3.0
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.0
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5 | 40 | WER and CER > 1
## Describe the bug
It seems that in some cases in which the `prediction` is longer than the `reference` we may have word/character error rate higher than 1 which is a bit odd.
If it's a real bug I think I can solve it with a PR changing [this](https://github.com/huggingface/datasets/blob/master/metrics/wer/wer.py#L105) line to
```python
return min(incorrect / total, 1.0)
```
## Steps to reproduce the bug
```python
from datasets import load_metric
wer = load_metric("wer")
wer_value = wer.compute(predictions=["Hi World vka"], references=["Hello"])
print(wer_value)
```
## Expected results
```
1.0
```
## Actual results
```
3.0
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.3.0
- Platform: Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.7.13
- PyArrow version: 6.0.1
- Pandas version: 1.3.5
WER can have values bigger than 1.0, this is expected when there are too many insertions
From [wikipedia](https://en.wikipedia.org/wiki/Word_error_rate):
> Note that since N is the number of words in the reference, the word error rate can be larger than 1.0 | [
0.08050602674484253,
-0.24610258638858795,
0.013707701116800308,
0.11002663522958755,
0.34324967861175537,
-0.032203178852796555,
-0.007795404642820358,
0.29825055599212646,
-0.2060740739107132,
0.4188823103904724,
0.07657532393932343,
-0.18652565777301788,
0.18944966793060303,
-0.08954507857561111,
-0.24733608961105347,
-0.2336430549621582,
-0.00822807103395462,
0.12931810319423676,
0.011661730706691742,
-0.08757773041725159,
-0.13683931529521942,
0.04591552913188934,
-0.2083195298910141,
0.2944399118423462,
-0.48834457993507385,
-0.11393926292657852,
-0.14508207142353058,
-0.006789207458496094,
-0.2205066978931427,
-0.3903885781764984,
0.22759462893009186,
-0.12117791175842285,
-0.021234504878520966,
0.399962842464447,
-0.0001087444688891992,
-0.2691156566143036,
0.46496474742889404,
-0.01730233058333397,
-0.19103194773197174,
-0.4466831684112549,
0.12151289731264114,
-0.27512866258621216,
0.07331319898366928,
-0.19347746670246124,
0.12681713700294495,
-0.2917756736278534,
0.00869392603635788,
0.04771771281957626,
-0.008060738444328308,
0.20893944799900055,
0.30029699206352234,
0.2934204041957855,
0.0067724063992500305,
-0.08193354308605194,
0.17888674139976501,
-0.23225273191928864,
0.025524919852614403,
0.28818729519844055,
0.010584831237792969,
-0.11569028347730637,
-0.32600605487823486,
0.35663866996765137,
0.12783744931221008,
0.03851412236690521,
0.33159124851226807,
0.3089762032032013,
0.028479427099227905,
-0.40082621574401855,
0.03159002959728241,
0.23944765329360962,
0.2911631762981415,
-0.17615947127342224,
-0.3116593062877655,
-0.011998891830444336,
0.08585519343614578,
-0.28417572379112244,
0.3043462336063385,
0.014273356646299362,
-0.41192400455474854,
0.021933963522315025,
-0.11621326208114624,
0.08300171792507172,
-0.31493449211120605,
0.026989702135324478,
-0.19799478352069855,
0.4466160833835602,
-0.00457384716719389,
-0.0389418825507164,
0.22269117832183838,
-0.08890925347805023,
0.04657978191971779,
-0.16702698171138763,
0.04478105902671814,
-0.013730348087847233,
-0.5145483016967773,
-0.13340766727924347,
0.0006886273622512817,
0.3891541063785553,
0.20069444179534912,
-0.16554716229438782,
0.2916859984397888,
-0.010332856327295303,
0.06337974220514297,
0.01938128098845482,
0.2602906823158264,
0.41845938563346863,
-0.0848846361041069,
0.12300800532102585,
0.3734323978424072,
0.20201987028121948,
-0.03203088045120239,
0.04213810712099075,
0.34196004271507263,
-0.3045138716697693,
0.3017340302467346,
-0.10765621811151505,
-0.04219301789999008,
-0.4258060157299042,
-0.4745177626609802,
0.40499037504196167,
-0.17172223329544067,
0.10076748579740524,
-0.039281412959098816,
0.32174447178840637,
-0.21151918172836304,
0.5166975855827332,
0.1275855004787445,
-0.14476850628852844,
-0.0949191153049469,
-0.18026255071163177,
-0.1834452599287033,
0.10942590236663818,
-0.4202938675880432,
0.023457694798707962,
-0.04383701831102371,
-0.09237803518772125,
0.16989122331142426,
-0.052334848791360855,
0.5876761674880981,
-0.41911664605140686,
-0.08271758258342743,
-0.44807878136634827,
0.24369171261787415,
0.18901653587818146,
-0.3066370189189911,
0.05137590318918228,
-0.068503737449646,
-0.29055100679397583,
-0.025477737188339233,
0.10559318959712982,
0.006518211215734482,
0.10954920947551727,
-0.06804284453392029,
0.26513078808784485,
-0.19371208548545837,
0.025739166885614395,
-0.03276161104440689,
0.2868223190307617,
0.24237656593322754,
0.12063419818878174,
-0.13085001707077026,
0.02966448850929737,
-0.5116454362869263,
-0.060871969908475876,
0.2953100800514221,
0.12357676029205322,
-0.3357452154159546,
-0.017853375524282455,
0.4901508092880249,
0.06805019825696945,
0.1397871971130371,
0.3727266788482666,
0.13667623698711395,
0.10465455055236816,
-0.0658370703458786,
0.24988524615764618,
0.21357378363609314,
-0.4347449839115143,
-0.4151168465614319,
0.18330594897270203,
-0.13177263736724854,
-0.1265334188938141,
0.011389151215553284,
0.044560447335243225,
0.30230802297592163,
0.10865646600723267,
0.2984520196914673,
0.09258267283439636,
-0.016836555674672127,
-0.0025894716382026672,
-0.6077645421028137,
-0.1503213495016098,
-0.036459632217884064,
-0.17211268842220306,
0.1853085607290268,
-0.10471933335065842,
0.010748498141765594,
-0.14133942127227783,
0.3785911500453949,
-0.22378137707710266,
0.030487075448036194,
0.31065815687179565,
0.1616552323102951,
-0.2761579155921936,
0.35153672099113464,
-0.17504087090492249,
-0.10099995881319046,
0.11247467249631882,
-0.2877337634563446,
0.3581300377845764,
0.13823191821575165,
-0.12561029195785522,
-0.3607954978942871,
0.06354857236146927,
0.07083258777856827,
-0.025437582284212112,
0.2602565586566925,
-0.11841820180416107,
0.07886596024036407,
0.008374914526939392,
0.07688596844673157,
-0.026827944442629814,
-0.3024119436740875,
0.046117160469293594,
-0.07594451308250427,
0.19448721408843994,
-0.30463922023773193,
-0.16881956160068512,
0.20162706077098846,
0.181172177195549,
0.137200266122818,
0.15909774601459503,
-0.23722141981124878,
0.22610297799110413,
-0.3558536767959595,
0.3471077084541321,
-0.12457302957773209,
0.07788343727588654,
0.031445976346731186,
-0.40160614252090454,
0.015767820179462433,
0.1781751960515976,
0.24694901704788208,
-0.007312566041946411,
-0.1689024567604065,
0.1987777203321457,
0.17236243188381195,
0.3003508448600769,
-0.12048579752445221,
0.10378815978765488,
0.2529480457305908,
0.022365305572748184,
-0.2468733787536621,
-0.3635096549987793,
0.29236507415771484,
-0.058315079659223557,
-0.0010605975985527039,
0.02715374529361725,
0.029649637639522552,
-0.09814692288637161,
0.3269922733306885,
-0.05142597481608391,
0.05611187219619751,
0.3318212032318115,
-0.2016914188861847,
-0.2857152819633484,
-0.16080574691295624,
0.0678112804889679,
0.1960863471031189,
0.24673320353031158,
0.00393831729888916,
-0.010770415887236595,
-0.21534550189971924,
-0.04277630150318146,
0.16512152552604675,
0.2990201711654663,
-0.006808516103774309,
0.2285042405128479,
0.5445172190666199,
0.02503645047545433,
-0.32434460520744324,
-0.257803738117218,
-0.24288234114646912,
0.2500244379043579,
-0.30117401480674744,
0.16920611262321472,
0.09982664883136749,
0.007985774427652359,
-0.20285873115062714,
-0.10352461040019989,
-0.03824001923203468,
-0.4608018696308136,
0.003954155370593071,
0.03816099837422371,
-0.07887353003025055,
0.12549488246440887,
0.05730364844202995,
0.17207829654216766,
-0.02840558998286724,
0.48554956912994385,
-0.20999056100845337,
0.046165164560079575,
-0.25489023327827454,
0.09161828458309174,
-0.0006822012364864349,
-0.04522377997636795,
0.2443315088748932,
-0.11546003073453903,
-0.11628731340169907,
-0.1394888311624527,
-0.6410321593284607,
0.11854466050863266,
-0.06460470706224442,
0.4294888973236084,
0.13121460378170013,
-0.09799575805664062,
-0.03709984943270683,
0.03255772218108177,
0.09161972254514694,
-0.10844890773296356,
-0.13222931325435638,
0.2031661421060562,
-0.15738651156425476,
0.08927541971206665,
-0.11488932371139526,
-0.21314272284507751,
-0.13931502401828766,
-0.07159696519374847,
-0.16983741521835327,
0.21371138095855713,
0.04162372648715973,
0.048191774636507034,
0.1384936273097992,
0.024846769869327545,
-0.060268107801675797,
0.12420603632926941,
-0.18531234562397003,
-0.19928161799907684,
0.3873724639415741,
0.06575506925582886,
-0.5652129650115967,
-0.2151929885149002,
-0.21609628200531006,
0.18874573707580566,
-0.08830026537179947,
-0.30093276500701904,
-0.30449673533439636,
-0.2112313061952591,
0.11124773323535919,
-0.02186904102563858,
0.032620832324028015,
0.08589766174554825,
0.12135904282331467,
-0.25895464420318604,
-0.12026737630367279,
-0.17274153232574463,
-0.011377774178981781,
-0.03969411551952362,
-0.12313836067914963,
-0.20070123672485352,
0.24562913179397583,
0.2100134789943695,
0.24598948657512665,
0.3810386657714844,
-0.28748762607574463,
0.12261658906936646,
0.07504444569349289,
0.13935337960720062,
-0.13072043657302856,
-0.03771097958087921,
0.11955901235342026,
-0.1827632486820221,
-0.10421827435493469,
0.4082701802253723,
0.027241729199886322,
-0.18569746613502502,
-0.10750634223222733,
-0.1437932550907135,
0.05983376502990723,
-0.14778368175029755,
-0.11860650777816772,
-0.16739831864833832,
0.19537627696990967,
0.30878591537475586,
0.15383511781692505,
-0.042368657886981964,
-0.3513393700122833,
0.003432057797908783,
-0.29038941860198975,
-0.1483922302722931,
-0.24163569509983063,
-0.08689407259225845,
-0.042185235768556595,
-0.606783926486969,
0.12585195899009705,
0.3055725395679474,
0.16658549010753632,
0.2563158869743347,
0.18259555101394653,
0.10209441930055618,
-0.03395281732082367,
0.2402009814977646,
0.09614143520593643,
-0.01492844894528389,
-0.18567553162574768,
0.11901050806045532,
-0.22656755149364471,
0.14689619839191437,
-0.3397286534309387,
0.09320185333490372,
0.2073269635438919,
0.4303171932697296,
-0.19131550192832947,
0.14519304037094116,
0.3408050239086151,
0.43586039543151855,
-0.12603920698165894,
-0.30440554022789,
-0.24686190485954285,
-0.10440069437026978,
0.0017530173063278198,
0.12039428949356079,
0.019918592646718025,
0.08404607325792313,
-0.19938211143016815,
-0.22102437913417816,
0.1489243507385254,
-0.1526024341583252,
0.27277448773384094,
0.19714803993701935,
0.1287538856267929,
-0.28811734914779663,
0.18666277825832367,
0.03789612278342247,
0.09282630681991577,
-0.012729765847325325,
0.2868800759315491,
-0.01786515861749649,
-0.3452238142490387,
-0.13743257522583008,
-0.1158682256937027,
0.029097869992256165,
0.21370704472064972,
-0.2303965538740158,
0.06432902812957764,
0.12963855266571045,
0.43262189626693726,
-0.27415964007377625,
-0.055746495723724365,
0.2593190371990204,
0.4045630395412445,
-0.29528921842575073,
0.1514490246772766,
0.5242990255355835,
0.14901819825172424,
-0.21563978493213654,
0.12605516612529755,
0.1725221872329712,
-0.2516709566116333,
0.4341607689857483,
0.10148493200540543,
1.107168197631836,
0.019773125648498535,
0.05399222671985626,
0.17672500014305115,
-0.013393808156251907,
0.4115339517593384,
0.06401018053293228,
0.0698661208152771,
-0.40656521916389465,
-0.3600350022315979,
0.06414391845464706,
-0.047380417585372925,
-0.09636013954877853,
-0.08414718508720398,
-0.3177793025970459,
0.4211653172969818,
-0.10316003113985062,
-0.17026716470718384,
0.33334580063819885,
0.1815187782049179,
0.034609392285346985,
-0.2022256702184677,
-0.1857156604528427,
0.15124279260635376,
0.11688275635242462,
-0.010661520063877106,
-0.066828653216362,
0.23848474025726318,
-0.03888335078954697,
-0.4167003035545349,
-0.4110170006752014,
0.10637945681810379,
-0.2859143614768982,
-0.011796876788139343,
0.08303382992744446,
-0.23761366307735443,
0.055201929062604904,
0.5443896055221558,
0.43568748235702515,
0.3970925509929657,
-0.20677699148654938,
0.1800014078617096,
-0.04302123188972473,
0.18273721635341644,
0.24461108446121216,
-0.10613399744033813,
0.19546771049499512,
-0.13372871279716492,
-0.5465572476387024,
0.0344482883810997,
0.13970422744750977,
0.06264414638280869,
-0.0005345344543457031,
-0.06700858473777771,
-0.09963671863079071,
-0.06047271564602852,
0.13485901057720184,
-0.21370133757591248,
-0.0783681720495224,
-0.37444251775741577,
0.207144096493721,
0.2652651369571686,
-0.17206619679927826,
0.33537957072257996,
0.35954174399375916,
-0.2820080518722534,
-0.17130915820598602,
0.39274364709854126,
0.22498801350593567,
0.06852269172668457,
0.5247111320495605,
0.059820402413606644,
-0.2940549850463867,
-0.19309386610984802,
-0.261220782995224,
-0.22440966963768005,
-0.38779789209365845,
0.12505002319812775,
0.15769235789775848,
0.025986671447753906,
-0.4726029336452484,
0.6253723502159119,
0.11881600320339203,
0.1495417356491089,
0.008374519646167755,
-0.3543073832988739,
-0.3335079252719879,
0.1347842812538147,
-0.0634344071149826,
-0.050366390496492386,
-0.13183733820915222,
-0.01605403423309326,
-0.07399779558181763,
0.1849493831396103,
-0.37452277541160583,
-0.17252527177333832,
-0.5546265244483948,
0.16288204491138458,
0.17009255290031433,
0.017251498997211456,
0.1473710983991623,
0.09477181732654572,
0.2182556688785553,
0.5029649138450623,
0.21884126961231232,
-0.27136939764022827,
-0.1625305563211441,
0.07963870465755463,
0.05688890814781189,
-0.10914137959480286,
0.03195149078965187,
0.2444481998682022,
-0.038679320365190506,
-0.3758138418197632,
-0.07454481720924377,
0.4566812217235565,
0.21262341737747192,
0.3161162734031677,
-0.02161596342921257,
0.23957064747810364,
0.3436537981033325,
0.048821430653333664,
-0.09746710956096649,
0.009979650378227234,
-0.021363263949751854,
0.20015746355056763,
0.09770097583532333,
-0.13701018691062927,
-0.2631970942020416,
0.1707998663187027,
-0.12895222008228302,
0.16386708617210388,
0.16423079371452332,
-0.2125379592180252,
-0.19931507110595703,
0.3962697684764862,
0.4615514874458313,
0.18027420341968536,
-0.25422072410583496,
-0.16620968282222748,
0.03956703841686249,
0.3382432460784912,
-0.38542795181274414,
-0.1637439727783203,
-0.14562317728996277,
0.049609240144491196,
0.20750361680984497,
0.13591599464416504,
0.12897630035877228,
-0.24858435988426208,
0.002033054828643799,
-0.02170548215508461,
-0.0446329265832901,
-0.3311520218849182,
-0.10715651512145996,
-0.19116045534610748,
0.2673582434654236,
0.041643016040325165,
0.19098153710365295,
-0.2115718275308609,
0.30135682225227356,
0.38377463817596436,
-0.03799660503864288,
0.40304329991340637,
-0.24538597464561462,
0.24557814002037048,
-0.08848004788160324,
-0.133165642619133,
0.41109007596969604,
0.15901117026805878,
-0.09386824071407318,
-0.07002293318510056,
0.024715684354305267,
0.19247016310691833,
0.2961663603782654,
0.10048132389783859,
-0.2940070331096649,
-0.16534699499607086,
-0.0850517600774765,
-0.35129305720329285,
-0.003783799707889557,
-0.33626943826675415,
0.1266031563282013,
-0.04188141971826553,
0.08579432219266891,
0.17126506567001343,
0.3471906781196594,
0.00022383779287338257,
-0.15205639600753784,
-0.12254783511161804,
0.17602312564849854,
0.18433421850204468,
0.2944753170013428,
-0.2230301946401596,
0.22577151656150818,
0.1727999746799469,
0.3086073398590088,
0.034282177686691284,
0.41330695152282715,
0.4326350688934326,
0.4864828586578369,
-0.051003437489271164,
0.06437595933675766,
-0.22268332540988922,
-0.21524114906787872,
-0.1578914076089859,
0.2288992553949356,
-0.01795152574777603,
-0.1297825574874878,
0.5225095152854919,
0.14643539488315582,
-0.32545503973960876,
0.13056308031082153,
0.10026952624320984,
0.12746688723564148,
-0.41043490171432495,
0.2662859559059143,
-0.02525462582707405,
-0.20305988192558289,
-0.22458413243293762,
-0.0322902575135231,
-0.16446341574192047,
0.1546638011932373,
0.159493088722229,
-0.14573070406913757,
-0.007093898020684719,
-0.30526959896087646,
0.13179293274879456,
-0.11407756805419922,
0.5440986156463623,
0.23735958337783813,
0.3263414800167084,
-0.2827845513820648,
0.03597453236579895,
-0.31898802518844604,
0.3174832761287689,
-0.017381977289915085,
0.2505388557910919,
-0.08082501590251923,
0.18012435734272003,
-0.2898556888103485,
0.028584161773324013,
0.26619863510131836,
0.08804189413785934,
-0.30534884333610535,
0.02843417041003704,
-0.42165544629096985,
-0.2483334094285965,
-0.33254969120025635,
-0.2507950961589813,
0.1863406002521515,
-0.44072192907333374,
-0.06370177865028381,
-0.27571865916252136,
0.14985740184783936,
-0.10278178751468658,
0.06961528956890106,
0.02714032307267189,
0.4788978099822998,
0.37962374091148376,
0.46237829327583313,
0.4777957499027252,
-0.18565255403518677,
-0.20366941392421722,
-0.11797106266021729,
-0.0923754870891571,
-0.40551039576530457,
0.2263641357421875,
0.17763985693454742,
0.25198623538017273,
-0.0704631581902504,
-0.21135438978672028,
0.03555001690983772,
0.30477842688560486,
0.12004420161247253,
-0.110847607254982,
-0.2185206413269043,
0.22940906882286072,
-0.06325437128543854,
0.10843183845281601,
0.001246175728738308,
0.1868084967136383,
0.011557698249816895,
0.24210266768932343,
-0.09062914550304413,
-0.5850505232810974,
0.43280351161956787,
-0.15739040076732635,
-0.07721413671970367,
-0.1780807375907898,
0.3341697156429291,
0.12125357985496521,
-0.4060642123222351,
-0.840865969657898,
-0.028280682861804962,
0.426573246717453,
0.2647206485271454,
-0.3966725170612335,
0.04262029379606247,
-0.0900818407535553,
0.18844623863697052,
-0.06533625721931458,
0.3596568703651428,
0.10881711542606354,
-0.16221360862255096,
0.004460033029317856,
-0.3652440905570984
] |
https://github.com/huggingface/datasets/issues/4491 | Dataset Viewer issue for Pavithree/test | This issue can be resolved according to this post https://stackoverflow.com/questions/70566660/parquet-with-null-columns-on-pyarrow. It looks like first data entry in the json file must not have any null values as pyarrow uses this first file to infer schema for entire dataset. | ### Link
https://huggingface.co/datasets/Pavithree/test
### Description
I have extracted the subset of original eli5 dataset found at hugging face. However, while loading the dataset It throws ArrowNotImplementedError: Unsupported cast from string to null using function cast_null error. Is there anything missing from my end? Kindly help.
### Owner
_No response_ | 38 | Dataset Viewer issue for Pavithree/test
### Link
https://huggingface.co/datasets/Pavithree/test
### Description
I have extracted the subset of original eli5 dataset found at hugging face. However, while loading the dataset It throws ArrowNotImplementedError: Unsupported cast from string to null using function cast_null error. Is there anything missing from my end? Kindly help.
### Owner
_No response_
This issue can be resolved according to this post https://stackoverflow.com/questions/70566660/parquet-with-null-columns-on-pyarrow. It looks like first data entry in the json file must not have any null values as pyarrow uses this first file to infer schema for entire dataset. | [
-0.20974165201187134,
-0.019854888319969177,
0.07286107540130615,
0.5056530237197876,
0.2623708248138428,
0.0765271857380867,
-0.14816786348819733,
0.09210750460624695,
-0.2811114192008972,
0.016643308103084564,
0.038595207035541534,
0.3998318314552307,
0.05336083471775055,
-0.03792261332273483,
-0.005043006502091885,
-0.08681917190551758,
0.02556079626083374,
0.40961864590644836,
0.02909233048558235,
0.061192095279693604,
-0.19556662440299988,
0.07298610359430313,
-0.3497968912124634,
0.1307889223098755,
0.05654780566692352,
0.18640951812267303,
-0.04026303440332413,
0.2886134088039398,
-0.2490152269601822,
-0.4686228334903717,
0.15945638716220856,
-0.1717323362827301,
0.06028676778078079,
0.2969326674938202,
-0.0001288478815695271,
0.12231720983982086,
0.30537357926368713,
-0.007679680362343788,
-0.03419388458132744,
-0.2568952441215515,
0.12734615802764893,
-0.08622940629720688,
0.4986598491668701,
-0.2650638222694397,
-0.2651987075805664,
-0.4315554201602936,
0.1711292862892151,
-0.07787137478590012,
0.2832385003566742,
0.10148698836565018,
-0.0004816390573978424,
0.32539793848991394,
-0.00582856684923172,
0.28566616773605347,
0.35438862442970276,
0.2110980898141861,
-0.07434377819299698,
0.22244639694690704,
0.1599402129650116,
0.10785690695047379,
-0.18947800993919373,
0.19912593066692352,
-0.08206943422555923,
-0.07603633403778076,
0.28776636719703674,
0.17639359831809998,
0.050759829580783844,
-0.33533209562301636,
0.08351633697748184,
0.1377842277288437,
0.41976356506347656,
-0.3407575190067291,
-0.20668508112430573,
-0.1650811731815338,
0.11271213740110397,
-0.021603615954518318,
0.13255994021892548,
0.3952159583568573,
-0.1127089411020279,
0.21574999392032623,
-0.22014422714710236,
-0.07944092899560928,
-0.4075702428817749,
0.07280368357896805,
-0.18372204899787903,
0.09773879498243332,
0.02854488417506218,
0.17594444751739502,
0.12813423573970795,
-0.2620319128036499,
-0.007996703498065472,
-0.1059412956237793,
-0.05509326979517937,
0.07805326581001282,
-0.16896818578243256,
-0.04891891032457352,
0.0707458108663559,
0.21881332993507385,
0.15906807780265808,
0.14810851216316223,
-0.1567562371492386,
0.21227231621742249,
0.08828559517860413,
0.08484745025634766,
0.6051421761512756,
-0.26812729239463806,
-0.06878861039876938,
0.2205350399017334,
-0.0221293643116951,
0.2032802551984787,
-0.005282621830701828,
0.0007333122193813324,
0.05794675275683403,
0.008211780339479446,
-0.17169667780399323,
-0.27843788266181946,
0.39886218309402466,
-0.4126158654689789,
-0.12244433164596558,
0.17866823077201843,
-0.6356733441352844,
0.045052722096443176,
0.1685907244682312,
0.5674041509628296,
0.13243970274925232,
0.11214277148246765,
-0.06840463727712631,
0.39482516050338745,
-0.27076947689056396,
-0.5556486248970032,
-0.10871943831443787,
0.032570742070674896,
-0.07258329540491104,
-0.23430033028125763,
0.11228041350841522,
-0.3546028733253479,
0.16572105884552002,
-0.04443050175905228,
-0.14611373841762543,
0.05249003320932388,
0.10225685685873032,
-0.2231796532869339,
-0.020250946283340454,
0.3494816720485687,
0.09219035506248474,
-0.03803801164031029,
0.0899977833032608,
0.037319116294384,
-0.08206314593553543,
0.47214195132255554,
0.02702316641807556,
-0.0928393006324768,
-0.13593876361846924,
-0.005931221880018711,
-0.47301971912384033,
-0.06727566570043564,
-0.2659197747707367,
0.07336896657943726,
-0.2359217405319214,
-0.2167065441608429,
-0.008881054818630219,
-0.2081725150346756,
0.13047978281974792,
-0.210959330201149,
0.3477049767971039,
0.48707765340805054,
-0.4658861756324768,
-0.03869372606277466,
-0.23213449120521545,
-0.4329683482646942,
-0.055586643517017365,
0.1973489224910736,
-0.11984550952911377,
-0.03689083456993103,
-0.15760481357574463,
0.4619292616844177,
0.4671765863895416,
0.040839750319719315,
-0.3577461540699005,
0.2435520440340042,
-0.20847925543785095,
0.18458420038223267,
0.040297042578458786,
-0.03212716057896614,
0.06476278603076935,
0.137892484664917,
-0.3306637406349182,
0.07050982117652893,
-0.0781145691871643,
0.08596240729093552,
-0.22747933864593506,
-0.1116190254688263,
0.3182210326194763,
0.4017075300216675,
-0.030991580337285995,
-0.07490887492895126,
0.14763213694095612,
-0.42441004514694214,
0.2508585453033447,
-0.3494548797607422,
0.26990699768066406,
0.3172009587287903,
0.380935937166214,
0.05881999060511589,
0.2085018754005432,
0.02831505984067917,
-0.5067383050918579,
0.035618312656879425,
-0.013093484565615654,
-0.12492094933986664,
-0.37755823135375977,
-0.06458662450313568,
-0.1451128125190735,
0.27125275135040283,
-0.27773594856262207,
0.05205226689577103,
-0.04059809446334839,
0.05384974181652069,
-0.05189584940671921,
0.18602386116981506,
-0.24467290937900543,
-0.22440041601657867,
-0.18552827835083008,
0.2710563838481903,
-0.1054093986749649,
0.5994074940681458,
0.009376373142004013,
-0.22386534512043,
0.022717833518981934,
0.041284043341875076,
0.16806110739707947,
-0.27306845784187317,
0.1785498857498169,
0.22115543484687805,
0.31893983483314514,
0.06677023321390152,
-0.19338437914848328,
-0.09055693447589874,
0.08402012288570404,
-0.7848564982414246,
0.10004615038633347,
0.18591783940792084,
0.052479445934295654,
0.1117512509226799,
-0.32407504320144653,
0.4143592119216919,
0.004608239978551865,
0.18157991766929626,
-0.005972906947135925,
-0.07564695179462433,
0.181051567196846,
0.02361084148287773,
0.019334105774760246,
-0.2710492014884949,
0.21617905795574188,
0.20543451607227325,
0.33774811029434204,
0.06462094187736511,
-0.603182315826416,
0.0011429786682128906,
0.05947890505194664,
-0.1185653805732727,
0.022660087794065475,
0.16082924604415894,
-0.3293193280696869,
-0.12377247214317322,
0.2288920283317566,
-0.2513832747936249,
0.11981599032878876,
0.1312582790851593,
0.008018642663955688,
0.21238963305950165,
0.12316614389419556,
0.10578089207410812,
0.17866545915603638,
0.2227664589881897,
0.14873790740966797,
0.03574543446302414,
0.11222992837429047,
-0.07475639134645462,
-0.3350762724876404,
0.01625782996416092,
0.23376619815826416,
0.30114641785621643,
-0.48384979367256165,
-0.11990291625261307,
-0.28480690717697144,
-0.3805322051048279,
-0.0041152602061629295,
-0.05345085263252258,
-0.12119241058826447,
-0.16963759064674377,
-0.1131441593170166,
0.3065032362937927,
-0.2724302113056183,
0.06603322923183441,
-0.6006501913070679,
-0.1736270636320114,
-0.019471818581223488,
-0.2509323060512543,
-0.4031541347503662,
-0.2801204025745392,
-0.26375725865364075,
-0.04731568694114685,
0.2858720123767853,
0.2288256585597992,
-0.25123852491378784,
0.038056179881095886,
0.09239393472671509,
-0.5241804122924805,
-0.4855486750602722,
0.2255261391401291,
-0.2887765169143677,
0.21124768257141113,
0.11512473970651627,
0.16172760725021362,
-0.02172430045902729,
-0.1310819834470749,
0.15515385568141937,
-0.01400881540030241,
-0.3759421706199646,
0.22167997062206268,
-0.009801074862480164,
0.03254401683807373,
-0.10818563401699066,
-0.23532748222351074,
0.14302852749824524,
-0.022086793556809425,
0.25303012132644653,
0.12036760151386261,
-0.08299414813518524,
-0.37923240661621094,
0.046158019453287125,
0.035381969064474106,
-0.23372586071491241,
-0.0601307675242424,
0.1204594075679779,
0.10106673836708069,
0.38727647066116333,
-0.12871862947940826,
-0.28075745701789856,
0.4299996495246887,
-0.24766500294208527,
-0.023220304399728775,
0.15217669308185577,
-0.5034199953079224,
0.028446774929761887,
0.2149827927350998,
0.018155932426452637,
-0.12488938868045807,
-0.37749502062797546,
0.3045310378074646,
0.05471280589699745,
0.20558573305606842,
-0.0655532106757164,
-0.2853401005268097,
-0.08292130380868912,
0.23527970910072327,
0.11595477908849716,
-0.022052496671676636,
0.537260115146637,
-0.08928918838500977,
0.34235358238220215,
0.21074768900871277,
0.19007638096809387,
0.4733739197254181,
-0.28837862610816956,
0.2398550659418106,
-0.06817767769098282,
0.12559980154037476,
-0.0552399568259716,
0.2882663607597351,
-0.019775589928030968,
0.3518999218940735,
-0.030348628759384155,
-0.40291646122932434,
-0.06242328882217407,
-0.29359912872314453,
-0.5558800101280212,
-0.12748120725154877,
-0.08833849430084229,
-0.04949402064085007,
0.09589967876672745,
-0.01460043154656887,
0.304449200630188,
0.16244734823703766,
-0.143342524766922,
0.030511654913425446,
0.11981546133756638,
0.2832987606525421,
-0.04710664972662926,
-0.14222903549671173,
0.2925962209701538,
-0.029831930994987488,
0.30922308564186096,
0.00618000328540802,
0.03756771609187126,
0.08542108535766602,
-0.1883653998374939,
0.4048537015914917,
-0.27571725845336914,
0.6667044758796692,
-0.12513449788093567,
0.25166791677474976,
0.13959169387817383,
-0.1329699158668518,
-0.580146074295044,
0.05583784356713295,
-0.0657539814710617,
-0.15870466828346252,
-0.015365060418844223,
0.11289145052433014,
-0.570573627948761,
-0.18516069650650024,
0.503697395324707,
0.1155475303530693,
-0.03495662659406662,
0.06275723874568939,
-0.19584524631500244,
-0.13851162791252136,
0.025961989536881447,
0.03741979971528053,
-0.17537732422351837,
0.31243932247161865,
0.13509586453437805,
0.37116605043411255,
-0.1451048105955124,
-0.17177850008010864,
-0.2111346572637558,
0.36758947372436523,
0.5450537800788879,
-0.3978348672389984,
0.38147202134132385,
0.3382267355918884,
0.11141480505466461,
0.38417065143585205,
0.8291010856628418,
0.47104939818382263,
-0.8588269948959351,
0.3297445774078369,
0.15019506216049194,
0.4485604166984558,
-0.07856854796409607,
0.11907883733510971,
-0.015109159052371979,
0.11302933841943741,
-0.004179075360298157,
0.12256546318531036,
-0.2177472859621048,
0.3882542848587036,
-0.1886402666568756,
-0.18912704288959503,
0.08418390154838562,
0.38913342356681824,
-0.23228366672992706,
0.06802807748317719,
-0.303234338760376,
0.6678386330604553,
0.03409950062632561,
0.3450332283973694,
0.3674198389053345,
0.9132238626480103,
0.0433763787150383,
0.09173464775085449,
0.5735960602760315,
-0.4365043044090271,
0.41735750436782837,
-0.31977182626724243,
0.07538382709026337,
-0.6399072408676147,
0.01450091227889061,
-0.1564456820487976,
-0.22911468148231506,
0.15086019039154053,
0.20492690801620483,
-0.1456710398197174,
-0.05209973081946373,
0.09544694423675537,
0.3367796242237091,
0.09940410405397415,
0.1360054612159729,
0.16113677620887756,
-0.004441794008016586,
-0.0657978504896164,
-0.04400913789868355,
-0.20232944190502167,
-0.04398675635457039,
-0.03130069002509117,
-0.11258867383003235,
-0.1835322380065918,
-0.06665349006652832,
-0.16775763034820557,
0.42958372831344604,
-0.07793300598859787,
-0.22169625759124756,
0.3106078803539276,
-0.5539862513542175,
0.256215900182724,
0.445082426071167,
-0.21858756244182587,
-0.2784923315048218,
-0.2888878285884857,
0.3710373044013977,
-0.182342529296875,
-0.08101947605609894,
0.1790115386247635,
0.031467605382204056,
0.06919340789318085,
-0.08270199596881866,
-0.24431759119033813,
0.09335699677467346,
-0.2934475839138031,
-0.19550080597400665,
0.00028730928897857666,
0.08909066766500473,
-0.09628669917583466,
-0.34642505645751953,
-0.2044908106327057,
-0.08780395984649658,
0.3372243642807007,
0.0318886823952198,
-0.044524867087602615,
0.06411004811525345,
0.029654700309038162,
-0.23601797223091125,
0.007275748997926712,
-0.32658815383911133,
-0.08740507066249847,
0.34811294078826904,
-0.15045711398124695,
-0.05056515708565712,
0.5410282611846924,
0.27753889560699463,
-0.22731226682662964,
-0.08337214589118958,
-0.05629745498299599,
0.31612375378608704,
-0.3609471023082733,
-0.08652055263519287,
0.06101344898343086,
0.2370602935552597,
0.24270878732204437,
0.27488547563552856,
0.04850034415721893,
-0.10741368681192398,
-0.15726929903030396,
-0.3100731372833252,
-0.24784483015537262,
0.4158130884170532,
0.03463691473007202,
0.0378231555223465,
0.10267280787229538,
0.06932060420513153,
0.14761771261692047,
-0.2885390520095825,
-0.09665471315383911,
0.1941009759902954,
-0.038849398493766785,
0.18152567744255066,
0.1370542049407959,
0.0689050704240799,
-0.005037939175963402,
-0.05848165974020958,
0.03272546827793121,
0.1222781091928482,
-0.12756302952766418,
0.06327813863754272,
0.10808007419109344,
0.20887252688407898,
0.26509857177734375,
-0.07803230732679367,
-0.11919483542442322,
-0.13424760103225708,
-0.1869625300168991,
-0.013128772377967834,
0.06890963017940521,
-0.17123368382453918,
-0.0525033175945282,
-0.06640026718378067,
0.42453619837760925,
-0.12116777151823044,
-0.7469140887260437,
0.010354166850447655,
-0.08147017657756805,
0.25094765424728394,
-0.06652073562145233,
0.1211700439453125,
-0.16220182180404663,
0.0020941123366355896,
0.21081101894378662,
0.2068033218383789,
0.1745571792125702,
-0.09052800387144089,
0.3388410210609436,
-0.24864165484905243,
0.14807410538196564,
-0.23562407493591309,
0.4834922254085541,
0.4322849214076996,
-0.07125433534383774,
-0.051433265209198,
0.3676402270793915,
0.025209803134202957,
-0.3736457824707031,
-0.10494652390480042,
0.5912640690803528,
0.06226839870214462,
-0.1424245834350586,
0.06179061159491539,
-0.1966412216424942,
0.3049270212650299,
0.3286008834838867,
0.13923698663711548,
0.5686710476875305,
0.028156928718090057,
0.11282305419445038,
0.2810584008693695,
-0.2983275353908539,
0.037371814250946045,
0.28062501549720764,
0.3487884998321533,
0.3465539515018463,
0.30359289050102234,
-0.27100563049316406,
0.037951868027448654,
-0.16873949766159058,
0.1484469324350357,
0.0331437885761261,
-0.4167109429836273,
-0.14504627883434296,
0.20209631323814392,
0.18588194251060486,
-0.036431118845939636,
0.0046958327293396,
0.24850082397460938,
0.5096655488014221,
-0.1206049770116806,
-0.3411233127117157,
0.3173671364784241,
-0.20413994789123535,
0.12676511704921722,
-0.3750964403152466,
-0.24689194560050964,
0.040079258382320404,
0.3109280467033386,
-0.19273771345615387,
-0.3296080231666565,
0.13113848865032196,
0.34527021646499634,
-0.12936769425868988,
-0.2595127522945404,
0.2052428424358368,
0.06307388842105865,
0.01522071659564972,
-0.1773461550474167,
0.3571864664554596,
0.20588290691375732,
-0.10425689816474915,
0.1497095674276352,
0.08568742126226425,
0.2800830602645874,
0.053223617374897,
-0.2752076983451843,
-0.11550968140363693,
0.04879714548587799,
-0.0654064491391182,
0.11710736155509949,
0.0899481326341629,
0.19442567229270935,
0.438037246465683,
0.2807527780532837,
-0.059470273554325104,
-0.014129457995295525,
0.017639385536313057,
0.2051769196987152,
0.3605399429798126,
-0.2775222063064575,
-0.21508678793907166,
-0.13235890865325928,
-0.32294538617134094,
-0.06247090548276901,
-0.43496498465538025,
-0.17536234855651855,
-0.027963336557149887,
-0.1747349351644516,
0.17962487041950226,
-0.1264215111732483,
0.10477849096059799,
-0.03859550505876541,
0.2411513328552246,
0.24306845664978027,
0.49329185485839844,
-0.10806798189878464,
-0.3286270797252655,
-0.35419970750808716,
-0.7364090085029602,
0.3400721549987793,
-0.14736025035381317,
-0.3213193118572235,
0.506773829460144,
0.2574689984321594,
-0.0000507161021232605,
0.16228818893432617,
0.0772811770439148,
0.5785731077194214,
-0.12055151909589767,
0.5050146579742432,
-0.14839375019073486,
-0.12675514817237854,
0.30036965012550354,
-0.1478898525238037,
-0.2219649702310562,
-0.11510620266199112,
0.26340794563293457,
-0.05181434005498886,
-0.1526055634021759,
0.2249728888273239,
-0.00991465151309967,
-0.17626827955245972,
-0.3578811585903168,
0.3505430519580841,
-0.23655018210411072,
0.407939076423645,
0.108795665204525,
0.13383014500141144,
-0.1024332344532013,
-0.31023067235946655,
-0.23740674555301666,
0.5008416175842285,
-0.059000615030527115,
0.4376586675643921,
-0.06915495544672012,
0.016125191003084183,
-0.2109929621219635,
-0.24999774992465973,
-0.07068747282028198,
0.266063392162323,
-0.22864103317260742,
0.3291131258010864,
-0.16566883027553558,
0.22277586162090302,
-0.09250596165657043,
-0.19249168038368225,
0.11381333321332932,
0.06242894381284714,
-0.4471445679664612,
-0.10942153632640839,
0.385743111371994,
-0.5398789048194885,
0.022729676216840744,
0.08993658423423767,
-0.027249500155448914,
0.13641105592250824,
-0.3668042719364166,
-0.34253591299057007,
0.09491506963968277,
0.41619938611984253,
-0.1569393277168274,
-0.10080458223819733,
-0.1765582114458084,
0.04207679256796837,
-0.1587141454219818,
-0.15238435566425323,
0.4187154471874237,
0.1707633137702942,
-0.06067553907632828,
-0.12250363826751709,
-0.14210593700408936
] |
https://github.com/huggingface/datasets/issues/4490 | Use `torch.nested_tensor` for arrays of varying length in torch formatter | Currently, we return a list of Torch tensors if their shapes don't match. If they do, we consolidate them into a single Torch tensor. | Use `torch.nested_tensor` for arrays of varying length in `TorchFormatter`.
The PyTorch API of nested tensors is in the prototype stage, so wait for it to become more mature. | 24 | Use `torch.nested_tensor` for arrays of varying length in torch formatter
Use `torch.nested_tensor` for arrays of varying length in `TorchFormatter`.
The PyTorch API of nested tensors is in the prototype stage, so wait for it to become more mature.
Currently, we return a list of Torch tensors if their shapes don't match. If they do, we consolidate them into a single Torch tensor. | [
-0.2889707386493683,
-0.8526350259780884,
-0.14302437007427216,
0.3550807237625122,
-0.11105459928512573,
-0.1379697471857071,
0.7188710570335388,
0.3091636300086975,
0.10368740558624268,
0.28996431827545166,
-0.05615556240081787,
-0.058852799236774445,
-0.145664244890213,
-0.09064019471406937,
-0.11031273007392883,
-0.39255332946777344,
-0.04167354851961136,
0.15543973445892334,
-0.03314817696809769,
0.12865528464317322,
-0.013000383973121643,
0.010502675548195839,
0.08248975872993469,
-0.12556855380535126,
-0.21530723571777344,
0.06598395854234695,
-0.09625182300806046,
-0.20347607135772705,
0.21172566711902618,
-0.046156302094459534,
0.468124657869339,
-0.017037861049175262,
0.010316597297787666,
0.4750814735889435,
-0.00010380517051089555,
0.10653308033943176,
0.014812666922807693,
-0.10878374427556992,
0.2366340458393097,
0.022874563932418823,
0.7989656925201416,
-0.216383695602417,
-0.08670351654291153,
-0.3989386260509491,
-0.13126102089881897,
-0.263618528842926,
0.08853156864643097,
-0.21748900413513184,
0.02473071962594986,
0.060458023101091385,
0.2730494439601898,
0.38949063420295715,
0.05870969220995903,
-0.03723970800638199,
0.10373421013355255,
-0.009828545153141022,
-0.0020047705620527267,
-0.20486758649349213,
0.04574305936694145,
0.25145941972732544,
-0.1807657778263092,
0.15482807159423828,
-0.2644095718860626,
0.18390607833862305,
0.27012568712234497,
-0.1130797266960144,
-0.3328830897808075,
-0.1786825805902481,
-0.09156068414449692,
0.5035391449928284,
0.056837309151887894,
-0.22593733668327332,
-0.006165679544210434,
-0.26763901114463806,
-0.11437561362981796,
0.03115268237888813,
-0.03810819238424301,
0.26397210359573364,
0.08655776083469391,
-0.14794424176216125,
-0.07110191136598587,
0.2423432618379593,
-0.33538421988487244,
0.12397423386573792,
-0.12721890211105347,
0.1048179492354393,
0.07136884331703186,
0.18694114685058594,
-0.08616529405117035,
-0.25097906589508057,
0.311431348323822,
-0.06175050884485245,
0.2918832302093506,
-0.05994490161538124,
0.05842462554574013,
-0.07373913377523422,
-0.25391122698783875,
-0.8922620415687561,
0.03570453077554703,
-0.14214390516281128,
0.4845748543739319,
0.25930288434028625,
0.25781840085983276,
0.29460984468460083,
-0.27407991886138916,
0.06090610846877098,
0.13293254375457764,
0.07285255193710327,
0.05754335597157478,
-0.15940137207508087,
-0.012244688346982002,
0.09021982550621033,
0.07045143097639084,
-0.26953837275505066,
-0.23059262335300446,
0.015203243121504784,
-0.023197174072265625,
0.2510783076286316,
-0.1509113758802414,
-0.11527784913778305,
-0.2665703594684601,
-0.08660702407360077,
0.18958526849746704,
0.13593930006027222,
-0.2593461871147156,
0.4047861099243164,
0.2620159387588501,
-0.0849066898226738,
0.12633486092090607,
0.2841144800186157,
-0.1521253138780594,
0.19850054383277893,
0.07848374545574188,
0.02628059685230255,
0.09135252237319946,
-0.072209432721138,
0.1528196632862091,
0.03487925976514816,
0.5298583507537842,
0.2139195203781128,
-0.05936724692583084,
-0.06582469493150711,
0.54104083776474,
-0.04606161639094353,
0.021739397197961807,
-0.3229919672012329,
-0.12329444289207458,
0.3869859576225281,
-0.27011075615882874,
0.09416702389717102,
-0.3087686598300934,
-0.23284293711185455,
-0.22178049385547638,
0.2591768205165863,
-0.11492951214313507,
0.16594797372817993,
0.32130011916160583,
0.10455746948719025,
0.4398600459098816,
-0.03888348862528801,
0.1436547338962555,
-0.2603996992111206,
-0.2583734393119812,
-0.2552984356880188,
0.005455708131194115,
-0.3765694499015808,
-0.057731833308935165,
-0.2242172211408615,
0.19345137476921082,
0.1334579735994339,
0.01298193633556366,
0.2501554489135742,
-0.15192033350467682,
-0.0743098184466362,
-0.23105290532112122,
0.20374463498592377,
0.11421803385019302,
-0.27648669481277466,
0.005367673467844725,
-0.08963887393474579,
0.1139724850654602,
-0.026121661067008972,
0.24661210179328918,
0.20066073536872864,
0.18822051584720612,
-0.04893491044640541,
0.10248196870088577,
0.19634538888931274,
0.0882200375199318,
-0.03832188993692398,
-0.12146618962287903,
-0.00912205595523119,
0.23515819013118744,
0.05946611985564232,
0.11820840835571289,
-0.47318142652511597,
-0.41150927543640137,
0.14587512612342834,
0.07193966209888458,
-0.1453131139278412,
-0.17703059315681458,
0.09675740450620651,
-0.13262780010700226,
-0.0960732251405716,
0.09677927196025848,
-0.26252710819244385,
-0.35392075777053833,
0.13386723399162292,
-0.44109606742858887,
-0.05333308130502701,
0.21790525317192078,
-0.1334322690963745,
0.19951161742210388,
-0.027922924607992172,
0.172886461019516,
0.14789608120918274,
0.23869314789772034,
0.09290989488363266,
0.14800629019737244,
-0.3914386034011841,
-0.11653929948806763,
-0.09150395542383194,
-0.07650250196456909,
-0.02675401233136654,
-0.18625353276729584,
0.16078127920627594,
-0.03747677803039551,
-0.11564120650291443,
0.08649380505084991,
0.22740185260772705,
0.0839441642165184,
-0.011249048635363579,
0.15529415011405945,
0.14854148030281067,
-0.2001233994960785,
-0.41654253005981445,
-0.5245398879051208,
0.023461028933525085,
0.29602229595184326,
-0.11951054632663727,
-0.04203150421380997,
0.1479792445898056,
-0.15634173154830933,
-0.03739100694656372,
0.09946615993976593,
0.4579266309738159,
0.2767249643802643,
0.2676505744457245,
-0.11214591562747955,
-0.21639475226402283,
-0.2509099245071411,
0.09447231888771057,
-0.10243086516857147,
-0.07541123032569885,
0.04764536768198013,
-0.1941685527563095,
0.14458675682544708,
0.10237450152635574,
-0.4281916618347168,
0.14681994915008545,
0.3291775584220886,
0.1243574470281601,
-0.03932823985815048,
0.14166784286499023,
-0.038337066769599915,
0.22148379683494568,
-0.0037139859050512314,
-0.4502251446247101,
-0.006981879472732544,
0.30792608857154846,
0.08081619441509247,
-0.1302180290222168,
-0.3632974326610565,
-0.238304004073143,
0.03581515699625015,
0.07734064757823944,
-0.0882333517074585,
0.14667493104934692,
0.1874166578054428,
-0.20247556269168854,
-0.15801778435707092,
-0.06369782239198685,
-0.2682804465293884,
-0.1949005126953125,
0.016412775963544846,
0.15733328461647034,
-0.07539230585098267,
-0.16885551810264587,
-0.43281397223472595,
-0.26358991861343384,
-0.19928938150405884,
0.06631253659725189,
0.23176711797714233,
0.22301658987998962,
-0.23680146038532257,
0.261866956949234,
0.35319042205810547,
0.08775898814201355,
0.2971429228782654,
-0.14187388122081757,
0.04782967269420624,
0.1367449164390564,
0.034895721822977066,
0.18091914057731628,
0.02713152766227722,
-0.3761822283267975,
0.30288639664649963,
0.19924108684062958,
0.07772206515073776,
-0.13181622326374054,
-0.32355883717536926,
0.15460997819900513,
0.0571836493909359,
-0.5742774605751038,
0.1322622299194336,
0.052327074110507965,
0.11310991644859314,
-0.5410863161087036,
0.21631178259849548,
-0.07864025235176086,
-0.007985798642039299,
0.09521481394767761,
-0.042279068380594254,
-0.017266882583498955,
-0.19879506528377533,
-0.3118443787097931,
-0.04111430048942566,
-0.4122198522090912,
0.04548770189285278,
-0.11059342324733734,
0.3552476167678833,
-0.1701808124780655,
0.20931245386600494,
-0.018472343683242798,
0.13073128461837769,
0.2544534206390381,
0.05408545583486557,
-0.058749303221702576,
0.29581722617149353,
-0.21836750209331512,
-0.13874579966068268,
-0.16248475015163422,
-0.2699376940727234,
0.1746998280286789,
0.2639557719230652,
-0.1770097315311432,
-0.2623610496520996,
0.10296384245157242,
-0.1332121193408966,
0.19544728100299835,
-0.29115208983421326,
0.25671058893203735,
-0.006473090033978224,
-0.1135563924908638,
0.05810662358999252,
0.11809560656547546,
0.22978460788726807,
-0.18372642993927002,
0.18152645230293274,
-0.06105495244264603,
-0.09323254972696304,
0.20150820910930634,
0.5007340908050537,
0.013449262827634811,
-0.6013129353523254,
-0.2192671298980713,
-0.12646101415157318,
-0.005011569708585739,
0.13677246868610382,
-0.1697835624217987,
0.16709306836128235,
0.0393420085310936,
0.06634451448917389,
0.1445353478193283,
-0.3560546040534973,
-0.347400963306427,
0.057902947068214417,
0.2767537236213684,
0.24935972690582275,
-0.1621929109096527,
0.3836176097393036,
-0.18355566263198853,
0.22072574496269226,
-0.31381189823150635,
0.08818527311086655,
-0.14330539107322693,
-0.10795902460813522,
-0.00846976786851883,
-0.24532051384449005,
-0.05311184376478195,
0.11751183867454529,
-0.24319176375865936,
-0.3719448447227478,
-0.08526060730218887,
0.5653473138809204,
0.38068482279777527,
0.1290861964225769,
0.0670175850391388,
-0.302035391330719,
-0.1937646120786667,
-0.08767641335725784,
0.17018209397792816,
0.25575461983680725,
-0.3376901149749756,
0.24617913365364075,
-0.22676429152488708,
-0.7233571410179138,
-0.1312425285577774,
0.24324896931648254,
-0.020639052614569664,
0.038728706538677216,
0.4403340518474579,
-0.45131370425224304,
0.009781165048480034,
0.18975991010665894,
0.3358270823955536,
-0.19322729110717773,
-0.18600156903266907,
-0.26896926760673523,
-0.21383044123649597,
-0.06266428530216217,
0.0024452582001686096,
0.09778041392564774,
0.3251272141933441,
0.052117183804512024,
-0.37787356972694397,
-0.2304091602563858,
-0.38261160254478455,
0.1407533586025238,
-0.057863134890794754,
0.26977112889289856,
-0.26924464106559753,
0.048976194113492966,
0.043020445853471756,
0.5011133551597595,
0.36249467730522156,
-0.08210650086402893,
-0.23900768160820007,
0.12000858783721924,
0.09350676089525223,
0.14759697020053864,
0.10492125898599625,
0.07011652737855911,
0.10721703618764877,
0.3023945987224579,
-0.16525688767433167,
0.1532747447490692,
-0.08661624044179916,
0.3574998080730438,
-0.1419898122549057,
-0.05000677332282066,
-0.21009142696857452,
-0.3201792538166046,
0.08037323504686356,
0.2830590605735779,
0.22705493867397308,
0.24461661279201508,
-0.6651251912117004,
-0.16632427275180817,
0.06128621846437454,
0.1931917369365692,
0.5838688611984253,
0.04155796393752098,
0.14585207402706146,
0.30012646317481995,
-0.07677224278450012,
-0.05249512195587158,
-0.3074542284011841,
0.28914034366607666,
-0.4635891318321228,
-0.1453534960746765,
-0.02353273332118988,
-0.18407326936721802,
-0.24707362055778503,
0.14660391211509705,
-0.08507601916790009,
0.04523957520723343,
0.131655752658844,
0.3668473958969116,
-0.3250354826450348,
0.10709500312805176,
-0.12867631018161774,
-0.334703266620636,
0.13707762956619263,
0.15460075438022614,
-0.16661569476127625,
0.005017183721065521,
-0.04261982440948486,
-0.020608775317668915,
0.1999724805355072,
-0.30435478687286377,
-0.06791417300701141,
-0.11538491398096085,
-0.2919583320617676,
0.28031259775161743,
0.09975037723779678,
-0.601775586605072,
-0.3335488736629486,
0.323977530002594,
-0.04820680618286133,
-0.29318511486053467,
0.10822510719299316,
0.015825331211090088,
-0.016622774302959442,
-0.3492410480976105,
-0.39366987347602844,
-0.23659880459308624,
0.2501836121082306,
-0.10583481192588806,
0.13257285952568054,
0.3334546983242035,
0.30515962839126587,
-0.023717643693089485,
-0.15447260439395905,
0.341341495513916,
-0.05449242889881134,
-0.00863693654537201,
-0.04133934527635574,
0.028148513287305832,
-0.13823610544204712,
0.02600272372364998,
0.20725388824939728,
-0.05966903269290924,
-0.1722714751958847,
0.07415447384119034,
0.02507658861577511,
-0.11344923079013824,
-0.048399489372968674,
0.19802641868591309,
0.29422301054000854,
-0.017945878207683563,
-0.010293211787939072,
0.15583942830562592,
-0.15314723551273346,
-0.15775877237319946,
0.0010806620121002197,
0.28973475098609924,
-0.2158198058605194,
0.23331187665462494,
-0.10611576586961746,
-0.1498742401599884,
-0.2073662430047989,
0.028666693717241287,
0.1808171272277832,
0.21188345551490784,
-0.10910183936357498,
0.3677436411380768,
-0.4918440878391266,
0.04384999722242355,
0.1105671226978302,
0.6971136331558228,
0.15709900856018066,
0.2767605185508728,
-0.16603025794029236,
0.13583588600158691,
-0.4122340679168701,
-0.11052755266427994,
0.02436804585158825,
0.06587789952754974,
-0.3281618356704712,
-0.07911223918199539,
-0.009749704971909523,
0.008807161822915077,
0.10838206112384796,
0.3149714469909668,
-0.15650826692581177,
-0.2328607738018036,
-0.015872059389948845,
0.029247671365737915,
-0.012971457093954086,
0.2324831187725067,
-0.05510072037577629,
-0.06807965040206909,
0.19230413436889648,
-0.16031332314014435,
0.17028839886188507,
0.26874223351478577,
-0.047203078866004944,
0.24204932153224945,
-0.1948135942220688,
-0.0173637717962265,
0.05075053125619888,
-0.0546581894159317,
0.1053180918097496,
0.28226447105407715,
0.18970096111297607,
0.031312622129917145,
-0.21038712561130524,
-0.09036855399608612,
0.45680299401283264,
0.09877334535121918,
0.0740816667675972,
-0.09630001336336136,
-0.0529530867934227,
0.06325753778219223,
-0.3493027091026306,
-0.12674622237682343,
0.17570927739143372,
0.022081583738327026,
-0.28080812096595764,
0.13912908732891083,
-0.17995333671569824,
0.30956006050109863,
-0.163126602768898,
-0.036822106689214706,
-0.10410639643669128,
0.05246410518884659,
0.2512727379798889,
0.2576790153980255,
0.19902774691581726,
0.057542264461517334,
0.05641457438468933,
0.23990947008132935,
0.13992659747600555,
-0.211493581533432,
0.11410509049892426,
0.21749040484428406,
0.10364799201488495,
0.013010241091251373,
0.4044509828090668,
0.019440211355686188,
0.5765067934989929,
0.03665164113044739,
0.22664856910705566,
0.574336051940918,
0.34461280703544617,
-0.2684590518474579,
0.44858476519584656,
0.3140158951282501,
-0.4382668733596802,
0.0020676851272583008,
0.346747487783432,
0.2140199840068817,
0.16426120698451996,
0.2872661054134369,
-0.07943322509527206,
-0.4901842176914215,
0.07016652077436447,
0.15845459699630737,
-0.07606355100870132,
0.1200188547372818,
-0.2161235213279724,
0.035979263484478,
0.033499762415885925,
-0.07481162995100021,
0.3154934346675873,
-0.07001706957817078,
0.1387626826763153,
0.019257109612226486,
-0.08430412411689758,
0.38232743740081787,
0.04691088944673538,
0.396236777305603,
0.06979010999202728,
-0.003677159547805786,
0.056992918252944946,
0.6031116843223572,
-0.18720373511314392,
0.0661889910697937,
0.0975772961974144,
0.20618557929992676,
-0.2101680487394333,
-0.3503904640674591,
0.04373850300908089,
-0.1568867564201355,
-0.0020100586116313934,
-0.11253278702497482,
-0.14005011320114136,
-0.05549010634422302,
-0.28558579087257385,
0.3448837101459503,
0.2732250988483429,
-0.22942404448986053,
0.34668365120887756,
-0.15855683386325836,
0.04633849859237671,
-0.0848919004201889,
0.20685668289661407,
-0.1906283050775528,
-0.1512497365474701,
-0.13745565712451935,
-0.11220856755971909,
-0.39777904748916626,
-0.0813094824552536,
0.4981118440628052,
0.10578615218400955,
0.1197461262345314,
0.07191804051399231,
0.11728709936141968,
0.1382680982351303,
0.4679497480392456,
-0.12815739214420319,
0.2995052933692932,
0.10402149707078934,
-0.06127306446433067,
-0.04891820624470711,
0.13983863592147827,
-0.21208548545837402,
0.19484470784664154,
-0.13787543773651123,
0.07100137323141098,
0.18794062733650208,
-0.1532461792230606,
0.28385573625564575,
-0.24595001339912415,
0.17427685856819153,
0.10995828360319138,
-0.35994186997413635,
-0.0022872276604175568,
0.061958685517311096,
-0.09489738196134567,
0.4746119976043701,
-0.1948639452457428,
-0.13533397018909454,
0.09918516129255295,
0.217972993850708,
-0.1894015222787857,
0.09821593761444092,
0.1613968312740326,
-0.04698466509580612,
0.12975621223449707,
-0.10209140926599503,
0.3081502914428711,
-0.13075724244117737,
0.09403526037931442,
0.3213121294975281,
0.036005180329084396,
-0.16670368611812592,
0.15538793802261353,
0.1664661318063736,
0.33743932843208313,
-0.10172759741544724,
-0.32870522141456604,
-0.0028959312476217747,
0.4484332501888275,
0.16442735493183136,
-0.35582104325294495,
0.04649004340171814,
0.1818038672208786,
-0.2582736611366272,
0.012309161014854908,
-0.07406407594680786,
0.43945759534835815,
0.189438134431839,
-0.09216484427452087,
0.016432330012321472,
-0.46418556571006775,
0.5485109090805054,
0.010557669214904308,
-0.3323575258255005,
0.09228880703449249,
-0.053776130080223083,
0.26277822256088257,
0.5235835909843445,
-0.49135515093803406,
-0.20350390672683716,
0.16026614606380463,
-0.10838203877210617,
-0.08151647448539734,
-0.19902314245700836,
0.2318888008594513,
-0.09984813630580902,
-0.19409839808940887,
0.2411339282989502,
0.26722875237464905,
-0.3808152377605438,
-0.22320614755153656,
-0.2617545425891876
] |
https://github.com/huggingface/datasets/issues/4483 | Dataset.map throws pyarrow.lib.ArrowNotImplementedError when converting from list of empty lists | Hi @sanderland ! Thanks for reporting :) This is a bug, I opened a PR to fix it. We'll do a new release soon
In the meantime you can fix it by specifying in advance that the "label" are integers:
```python
import numpy as np
ds = Dataset.from_dict(
{
"text": ["the lazy dog jumps over the quick fox", "another sentence"],
"label": [[], []],
}
)
# explicitly say that the "label" type is int64, even though it contains only null values
ds = ds.cast_column("label", Sequence(Value("int64")))
def mapper(features):
features['label'] = [
[0,0,0] for l in features['label']
]
return features
ds_mapped = ds.map(mapper,batched=True)
``` | ## Describe the bug
Dataset.map throws pyarrow.lib.ArrowNotImplementedError: Unsupported cast from int64 to null using function cast_null when converting from a type of 'empty lists' to 'lists with some type'.
This appears to be due to the interaction of arrow internals and some assumptions made by datasets.
The bug appeared when binarizing some labels, and then adding a dataset which had all these labels absent (to force the model to not label empty strings such with anything)
Particularly the fact that this only happens in batched mode is strange.
## Steps to reproduce the bug
```python
import numpy as np
ds = Dataset.from_dict(
{
"text": ["the lazy dog jumps over the quick fox", "another sentence"],
"label": [[], []],
}
)
def mapper(features):
features['label'] = [
[0,0,0] for l in features['label']
]
return features
ds_mapped = ds.map(mapper,batched=True)
```
## Expected results
Not crashing
## Actual results
```
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2346: in map
return self._map_single(
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:532: in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:499: in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/fingerprint.py:458: in wrapper
out = func(self, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2751: in _map_single
writer.write_batch(batch)
../.venv/lib/python3.8/site-packages/datasets/arrow_writer.py:503: in write_batch
arrays.append(pa.array(typed_sequence))
pyarrow/array.pxi:230: in pyarrow.lib.array
???
pyarrow/array.pxi:110: in pyarrow.lib._handle_arrow_array_protocol
???
../.venv/lib/python3.8/site-packages/datasets/arrow_writer.py:198: in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
../.venv/lib/python3.8/site-packages/datasets/table.py:1675: in wrapper
return func(array, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/table.py:1812: in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
../.venv/lib/python3.8/site-packages/datasets/table.py:1675: in wrapper
return func(array, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/table.py:1843: in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
../.venv/lib/python3.8/site-packages/datasets/table.py:1675: in wrapper
return func(array, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/table.py:1752: in array_cast
return array.cast(pa_type)
pyarrow/array.pxi:915: in pyarrow.lib.Array.cast
???
../.venv/lib/python3.8/site-packages/pyarrow/compute.py:376: in cast
return call_function("cast", [arr], options)
pyarrow/_compute.pyx:542: in pyarrow._compute.call_function
???
pyarrow/_compute.pyx:341: in pyarrow._compute.Function.call
???
pyarrow/error.pxi:144: in pyarrow.lib.pyarrow_internal_check_status
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pyarrow.lib.ArrowNotImplementedError: Unsupported cast from int64 to null using function cast_null
pyarrow/error.pxi:121: ArrowNotImplementedError
```
## Workarounds
* Not using batched=True
* Using an np.array([],dtype=float) or similar instead of [] in the input
* Naming the output column differently from the input column
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.2.2
- Platform: Ubuntu
- Python version: 3.8
- PyArrow version: 8.0.0
| 102 | Dataset.map throws pyarrow.lib.ArrowNotImplementedError when converting from list of empty lists
## Describe the bug
Dataset.map throws pyarrow.lib.ArrowNotImplementedError: Unsupported cast from int64 to null using function cast_null when converting from a type of 'empty lists' to 'lists with some type'.
This appears to be due to the interaction of arrow internals and some assumptions made by datasets.
The bug appeared when binarizing some labels, and then adding a dataset which had all these labels absent (to force the model to not label empty strings such with anything)
Particularly the fact that this only happens in batched mode is strange.
## Steps to reproduce the bug
```python
import numpy as np
ds = Dataset.from_dict(
{
"text": ["the lazy dog jumps over the quick fox", "another sentence"],
"label": [[], []],
}
)
def mapper(features):
features['label'] = [
[0,0,0] for l in features['label']
]
return features
ds_mapped = ds.map(mapper,batched=True)
```
## Expected results
Not crashing
## Actual results
```
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2346: in map
return self._map_single(
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:532: in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:499: in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/fingerprint.py:458: in wrapper
out = func(self, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/arrow_dataset.py:2751: in _map_single
writer.write_batch(batch)
../.venv/lib/python3.8/site-packages/datasets/arrow_writer.py:503: in write_batch
arrays.append(pa.array(typed_sequence))
pyarrow/array.pxi:230: in pyarrow.lib.array
???
pyarrow/array.pxi:110: in pyarrow.lib._handle_arrow_array_protocol
???
../.venv/lib/python3.8/site-packages/datasets/arrow_writer.py:198: in __arrow_array__
out = cast_array_to_feature(out, type, allow_number_to_str=not self.trying_type)
../.venv/lib/python3.8/site-packages/datasets/table.py:1675: in wrapper
return func(array, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/table.py:1812: in cast_array_to_feature
casted_values = _c(array.values, feature.feature)
../.venv/lib/python3.8/site-packages/datasets/table.py:1675: in wrapper
return func(array, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/table.py:1843: in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
../.venv/lib/python3.8/site-packages/datasets/table.py:1675: in wrapper
return func(array, *args, **kwargs)
../.venv/lib/python3.8/site-packages/datasets/table.py:1752: in array_cast
return array.cast(pa_type)
pyarrow/array.pxi:915: in pyarrow.lib.Array.cast
???
../.venv/lib/python3.8/site-packages/pyarrow/compute.py:376: in cast
return call_function("cast", [arr], options)
pyarrow/_compute.pyx:542: in pyarrow._compute.call_function
???
pyarrow/_compute.pyx:341: in pyarrow._compute.Function.call
???
pyarrow/error.pxi:144: in pyarrow.lib.pyarrow_internal_check_status
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pyarrow.lib.ArrowNotImplementedError: Unsupported cast from int64 to null using function cast_null
pyarrow/error.pxi:121: ArrowNotImplementedError
```
## Workarounds
* Not using batched=True
* Using an np.array([],dtype=float) or similar instead of [] in the input
* Naming the output column differently from the input column
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.2.2
- Platform: Ubuntu
- Python version: 3.8
- PyArrow version: 8.0.0
Hi @sanderland ! Thanks for reporting :) This is a bug, I opened a PR to fix it. We'll do a new release soon
In the meantime you can fix it by specifying in advance that the "label" are integers:
```python
import numpy as np
ds = Dataset.from_dict(
{
"text": ["the lazy dog jumps over the quick fox", "another sentence"],
"label": [[], []],
}
)
# explicitly say that the "label" type is int64, even though it contains only null values
ds = ds.cast_column("label", Sequence(Value("int64")))
def mapper(features):
features['label'] = [
[0,0,0] for l in features['label']
]
return features
ds_mapped = ds.map(mapper,batched=True)
``` | [
-0.30657368898391724,
0.06802217662334442,
0.04475703462958336,
0.33611345291137695,
0.4247973561286926,
0.17650875449180603,
0.4541992247104645,
0.2517310380935669,
0.07251892983913422,
0.04165443032979965,
-0.12167252600193024,
0.640252947807312,
-0.295364111661911,
-0.47698280215263367,
-0.16588038206100464,
-0.13767080008983612,
0.20757746696472168,
0.27907371520996094,
-0.020980849862098694,
-0.014724493026733398,
-0.36214742064476013,
-0.04244440793991089,
-0.5635046362876892,
0.057712286710739136,
-0.022378869354724884,
-0.11648698896169662,
-0.09186697751283646,
-0.06624651700258255,
0.07621409744024277,
-0.4734148383140564,
-0.036500126123428345,
-0.28282105922698975,
-0.18476857244968414,
0.49780020117759705,
-0.0001210518748848699,
0.15702687203884125,
0.32929372787475586,
0.10808561742305756,
-0.2627018988132477,
-0.029958665370941162,
-0.2342010736465454,
-0.19158528745174408,
0.10011118650436401,
-0.29352372884750366,
0.22495365142822266,
-0.2740451395511627,
-0.09712149202823639,
-0.2700687050819397,
-0.14317728579044342,
0.1351090669631958,
0.10472160577774048,
0.680017352104187,
-0.11961346864700317,
-0.0044724466279149055,
0.37959280610084534,
0.08638821542263031,
-0.14013507962226868,
0.07060446590185165,
0.2870872914791107,
-0.09180821478366852,
-0.13232135772705078,
0.32927581667900085,
-0.4646834433078766,
-0.17889924347400665,
0.0728038102388382,
-0.028825055807828903,
0.3263711631298065,
-0.4516792297363281,
-0.09173711389303207,
0.24969524145126343,
0.10272077471017838,
-0.28537166118621826,
-0.3045257031917572,
-0.39971867203712463,
0.03621811047196388,
-0.14662593603134155,
-0.21539294719696045,
0.20957626402378082,
-0.26366549730300903,
0.04274421185255051,
-0.22499921917915344,
0.3197179436683655,
-0.0893920511007309,
0.10568208992481232,
-0.03878401219844818,
0.4727499485015869,
0.1435137689113617,
0.1638050079345703,
0.12438076734542847,
-0.2066119909286499,
0.05026760697364807,
-0.48452091217041016,
-0.22956520318984985,
0.1370122730731964,
-0.041975174099206924,
-0.08724913001060486,
0.05013437941670418,
0.05829159542918205,
0.14552024006843567,
-0.2281637042760849,
0.05282989889383316,
0.06006452441215515,
0.21759894490242004,
0.14664818346500397,
0.4083596467971802,
-0.06065288931131363,
0.14290344715118408,
0.3347508907318115,
-0.014301851391792297,
-0.006211376283317804,
0.12897376716136932,
0.23148834705352783,
-0.006837652996182442,
-0.04784515127539635,
0.31130674481391907,
0.07224691659212112,
0.3489081859588623,
-0.08360109478235245,
-0.38603904843330383,
-0.03816898539662361,
-0.5077298879623413,
0.17546480894088745,
0.14477156102657318,
0.2087220847606659,
-0.059904102236032486,
0.2666318118572235,
-0.05470286309719086,
0.2465938925743103,
-0.04389137774705887,
-0.3370068669319153,
-0.15163490176200867,
-0.2663899064064026,
-0.21124140918254852,
-0.3991028070449829,
-0.05974316596984863,
0.03574557602405548,
0.1998852640390396,
0.05404611676931381,
-0.19900067150592804,
0.15506146848201752,
0.028035325929522514,
-0.2608112692832947,
0.28988590836524963,
0.26419416069984436,
-0.08236373960971832,
0.1766481250524521,
0.22279740869998932,
-0.05954902246594429,
-0.007262244820594788,
0.5424249172210693,
-0.15036118030548096,
-0.04970581829547882,
-0.26740995049476624,
0.11791946738958359,
-0.13583829998970032,
-0.013566184788942337,
-0.029070071876049042,
0.2148716300725937,
0.29323887825012207,
-0.04829135909676552,
0.21770474314689636,
-0.3870166540145874,
0.06262834370136261,
-0.4174553453922272,
-0.11265936493873596,
0.518646776676178,
-0.6114172339439392,
0.014663875102996826,
-0.24142031371593475,
-0.29856154322624207,
0.09841439872980118,
0.3751799464225769,
-0.23217320442199707,
0.16278856992721558,
-0.2419854700565338,
0.4928706884384155,
0.26844242215156555,
0.0032415203750133514,
-0.30090993642807007,
0.15091297030448914,
-0.0108368881046772,
0.12759828567504883,
-0.25916212797164917,
0.28965839743614197,
-0.0005691209807991982,
-0.24356526136398315,
0.05183311924338341,
0.10613957047462463,
-0.24007469415664673,
0.1618177890777588,
-0.2677733600139618,
-0.044472385197877884,
0.4041597843170166,
0.06545670330524445,
0.04399055242538452,
0.02295464277267456,
0.018882639706134796,
-0.18949700891971588,
0.13575699925422668,
-0.4252474009990692,
0.18001623451709747,
0.2529851198196411,
0.3373660743236542,
-0.11922231316566467,
-0.026831554248929024,
-0.07901882380247116,
-0.7607770562171936,
0.10712606459856033,
-0.15941131114959717,
0.17277076840400696,
-0.43129247426986694,
-0.31371498107910156,
0.2390792965888977,
0.31028327345848083,
-0.23477916419506073,
0.17987367510795593,
0.0894625186920166,
-0.046724833548069,
-0.1140555739402771,
-0.08352679014205933,
-0.026202894747257233,
-0.4478793740272522,
-0.03285190835595131,
0.2550671100616455,
-0.15625013411045074,
0.2157784402370453,
0.0763791874051094,
-0.2890682518482208,
-0.36513468623161316,
0.15522919595241547,
0.144523024559021,
0.004201108124107122,
-0.0637643039226532,
0.3469288647174835,
-0.11437427997589111,
-0.0666525810956955,
-0.34331750869750977,
-0.005733609199523926,
-0.003911364823579788,
-0.2797781229019165,
0.1371627002954483,
0.405868798494339,
0.30169254541397095,
-0.1583859920501709,
-0.03270835429430008,
0.41609036922454834,
0.14603731036186218,
0.3193502128124237,
-0.16759416460990906,
0.1516786515712738,
-0.01356290653347969,
-0.014747362583875656,
-0.09952422231435776,
-0.2267807126045227,
-0.06378056108951569,
-0.00528888963162899,
0.30788254737854004,
0.1942754089832306,
-0.23634985089302063,
0.17344696819782257,
0.3073098659515381,
-0.1271650344133377,
0.2780066430568695,
-0.031476691365242004,
-0.5005958080291748,
0.09922411292791367,
0.2770296335220337,
-0.08151458948850632,
0.3380502462387085,
0.2008240520954132,
0.0029250048100948334,
-0.014302371069788933,
0.026613283902406693,
-0.008116498589515686,
0.4321247935295105,
0.3649901747703552,
0.35550153255462646,
0.00008689612150192261,
0.20815235376358032,
-0.0726136714220047,
-0.16780754923820496,
-0.2764435112476349,
0.04483320564031601,
0.16429848968982697,
-0.34481319785118103,
0.06597631424665451,
-0.18923893570899963,
-0.001581735908985138,
0.013210885226726532,
-0.2067715972661972,
-0.09287811815738678,
-0.42733365297317505,
-0.24130727350711823,
-0.018113989382982254,
-0.37597545981407166,
0.2453080415725708,
-0.3667534291744232,
-0.18268327414989471,
0.2532457709312439,
-0.4034423530101776,
-0.16712576150894165,
-0.220484659075737,
-0.30437129735946655,
-0.015320844948291779,
0.4093465805053711,
-0.29367074370384216,
-0.023726513609290123,
0.14578785002231598,
-0.14759127795696259,
-0.09799216687679291,
-0.2981470823287964,
0.08521708846092224,
-0.41397351026535034,
0.04801879823207855,
0.278415322303772,
0.10132518410682678,
-0.28472599387168884,
0.03405551612377167,
0.31459060311317444,
0.049068473279476166,
-0.26227283477783203,
0.13305118680000305,
-0.038865827023983,
-0.08036299794912338,
-0.31204158067703247,
0.007095761597156525,
-0.1281271129846573,
-0.12890036404132843,
0.0802733451128006,
-0.16802692413330078,
0.11890076100826263,
0.2043575942516327,
0.45794349908828735,
0.4321483075618744,
-0.14770211279392242,
-0.49891844391822815,
0.29896774888038635,
0.3377378284931183,
0.4653623402118683,
0.08784791827201843,
-0.05017200484871864,
0.0010795816779136658,
-0.3749934434890747,
-0.04493497684597969,
0.23577117919921875,
-0.253415048122406,
0.13805179297924042,
-0.11268928647041321,
0.7195671796798706,
0.014914402738213539,
-0.032588422298431396,
0.2232174277305603,
0.4415045380592346,
0.006126338616013527,
-0.1151086688041687,
-0.14249013364315033,
0.10816217213869095,
-0.2769342362880707,
0.08286404609680176,
-0.028431124985218048,
0.2997344434261322,
0.04719625040888786,
0.5165460705757141,
0.07606016099452972,
-0.3404809832572937,
0.14854539930820465,
-0.1041608527302742,
0.1509256362915039,
0.10848401486873627,
-0.19876664876937866,
-0.107777439057827,
0.12859810888767242,
-0.10469522327184677,
0.1330585926771164,
-0.23892050981521606,
-0.6011685729026794,
0.0934576541185379,
-0.07254546135663986,
-0.3488839864730835,
-0.13274428248405457,
0.283430278301239,
-0.2395753562450409,
0.057995762676000595,
-0.03323465958237648,
0.14180344343185425,
-0.14747779071331024,
-0.23731949925422668,
0.17898154258728027,
-0.27874571084976196,
0.05489974096417427,
-0.23731344938278198,
-0.23181432485580444,
-0.004843061789870262,
-0.13646599650382996,
0.41348862648010254,
0.1567695438861847,
0.16937550902366638,
0.2560907006263733,
-0.23324695229530334,
-0.0995345264673233,
0.020383767783641815,
0.6809796690940857,
-0.2864376902580261,
-0.060122497379779816,
0.20177367329597473,
0.3639053702354431,
-0.5174256563186646,
-0.040595121681690216,
-0.4432976245880127,
0.22271734476089478,
0.23370832204818726,
0.234480619430542,
-0.3994591236114502,
0.00793201383203268,
0.2997012138366699,
0.2499433308839798,
0.02224918082356453,
0.110459104180336,
-0.18022294342517853,
-0.1435868740081787,
0.0700686052441597,
0.19571012258529663,
0.15078353881835938,
0.22982455790042877,
-0.056975699961185455,
-0.11604607105255127,
-0.29952776432037354,
0.09425155818462372,
0.08922675997018814,
0.11043378710746765,
0.4823446571826935,
-0.20149973034858704,
0.077304407954216,
-0.4025377333164215,
0.1540786623954773,
0.40581661462783813,
0.4960836172103882,
-0.2564148008823395,
-0.5113106369972229,
0.060610540211200714,
0.0795067623257637,
0.5171913504600525,
0.25683340430259705,
0.06385208666324615,
0.08760689944028854,
0.1440068930387497,
0.20209495723247528,
0.18988490104675293,
-0.2779066562652588,
0.37565284967422485,
0.04800239950418472,
-0.31242063641548157,
0.016074983403086662,
0.25434204936027527,
0.06264948844909668,
0.13641904294490814,
0.31356340646743774,
0.14570242166519165,
-0.2539932429790497,
0.5600168108940125,
0.3969169557094574,
0.9266276955604553,
0.13581466674804688,
0.10766761004924774,
0.6592326760292053,
0.08813624083995819,
0.3356480598449707,
0.5389768481254578,
0.12390018254518509,
-0.4960821568965912,
0.27183961868286133,
0.08569001406431198,
-0.09183541685342789,
0.22387734055519104,
0.41245025396347046,
-0.2981400787830353,
0.18082408607006073,
-0.21595808863639832,
0.4651370942592621,
0.09406140446662903,
-0.3021624684333801,
0.14862830936908722,
-0.3644113838672638,
-0.30120134353637695,
0.06151729077100754,
-0.012877300381660461,
-0.1316601037979126,
-0.03703920543193817,
-0.36725276708602905,
-0.23294301331043243,
-0.04395213723182678,
-0.028371691703796387,
0.32366421818733215,
-0.437748521566391,
-0.024531647562980652,
0.2522394359111786,
-0.1147051751613617,
0.06671799719333649,
0.288376122713089,
-0.005620449781417847,
0.14965923130512238,
-0.017181186005473137,
0.014335118234157562,
0.30877578258514404,
0.2141159474849701,
0.23961538076400757,
-0.24250730872154236,
0.2947697639465332,
0.14310014247894287,
-0.2307201772928238,
0.14840757846832275,
-0.44819319248199463,
-0.06704208254814148,
0.10966578125953674,
0.06279648095369339,
0.12725141644477844,
-0.22320981323719025,
-0.33181995153427124,
-0.033800624310970306,
0.062240127474069595,
-0.17587654292583466,
0.014544659294188023,
-0.04699314385652542,
-0.12843376398086548,
0.17843908071517944,
-0.1755780428647995,
-0.17295433580875397,
0.0023868754506111145,
0.275747686624527,
0.12794139981269836,
0.023540601134300232,
0.48917365074157715,
0.10755644738674164,
-0.13766255974769592,
-0.22979453206062317,
0.15768545866012573,
0.26863622665405273,
-0.7647883892059326,
0.34930717945098877,
-0.10546499490737915,
-0.007266625761985779,
-0.0026562127750366926,
0.18317833542823792,
-0.050569236278533936,
0.33108386397361755,
-0.34103071689605713,
-0.07113608717918396,
-0.3646467924118042,
0.18920442461967468,
0.2527434527873993,
0.17030158638954163,
-0.04381739720702171,
-0.023004256188869476,
0.08246826380491257,
-0.2816021740436554,
-0.24068410694599152,
0.06691575050354004,
-0.12018206715583801,
0.34416133165359497,
-0.1559346318244934,
0.07262136787176132,
0.09502337127923965,
-0.0022329697385430336,
0.11515828967094421,
0.20415960252285004,
0.0015978282317519188,
-0.13965949416160583,
0.017750784754753113,
0.16676343977451324,
0.14018654823303223,
-0.15075744688510895,
0.1553952693939209,
-0.18476876616477966,
-0.04440758004784584,
-0.20094233751296997,
0.11645142734050751,
0.09627511352300644,
-0.12620913982391357,
-0.04518095776438713,
0.38176849484443665,
0.3948392868041992,
-0.1880062222480774,
0.1714908927679062,
-0.3552543818950653,
-0.024022385478019714,
-0.019234275445342064,
0.3298495411872864,
0.10556486248970032,
-0.046363819390535355,
0.11863645166158676,
0.0036238133907318115,
0.11608549952507019,
0.07224351167678833,
0.37500306963920593,
-0.5672149658203125,
-0.3275626003742218,
0.02404763549566269,
0.14661628007888794,
0.1875927597284317,
-0.3123384714126587,
-0.20846858620643616,
0.2750778794288635,
0.14546294510364532,
-0.29677778482437134,
0.0672813355922699,
0.21658366918563843,
0.09270762652158737,
0.14768174290657043,
0.36986011266708374,
-0.024568507447838783,
-0.15674550831317902,
0.07167412340641022,
0.07172295451164246,
0.20254845917224884,
0.15470731258392334,
0.03504668176174164,
0.6880677938461304,
0.11075620353221893,
0.024897567927837372,
0.2859908938407898,
-0.10697998106479645,
0.24606814980506897,
0.17925462126731873,
-0.16332396864891052,
0.3862650692462921,
0.18771019577980042,
-0.1341848522424698,
0.09634283185005188,
-0.23530259728431702,
0.12271367013454437,
0.2954293489456177,
0.061001021414995193,
0.27500200271606445,
0.1727123260498047,
0.32890480756759644,
-0.24766315519809723,
-0.4391763508319855,
0.029121851548552513,
0.2136402428150177,
-0.5260058045387268,
-0.033499471843242645,
-0.4533486068248749,
-0.14934492111206055,
-0.011186525225639343,
-0.1268203854560852,
-0.11310859024524689,
-0.23889224231243134,
0.3325740694999695,
0.0691223070025444,
0.029327992349863052,
-0.20404186844825745,
-0.08002185076475143,
0.3940209448337555,
0.22796911001205444,
-0.19129745662212372,
0.2070172280073166,
0.32396870851516724,
-0.12678688764572144,
-0.10987038910388947,
0.460493803024292,
0.4640674889087677,
0.4125649929046631,
-0.16969633102416992,
-0.0715160071849823,
0.18266095221042633,
-0.22627511620521545,
0.024268783628940582,
0.07060784101486206,
-0.026280954480171204,
0.19616682827472687,
0.2932754456996918,
0.0270043034106493,
-0.1327027529478073,
0.10470578819513321,
0.026649702340364456,
0.19276437163352966,
0.14811570942401886,
0.11382868140935898,
-0.13579431176185608,
-0.3972746729850769,
-0.07715603709220886,
-0.31321966648101807,
-0.16550368070602417,
-0.17783886194229126,
0.5522090196609497,
-0.14410115778446198,
0.09019438922405243,
-0.059206996113061905,
0.04944782704114914,
0.06083371862769127,
0.2049492448568344,
0.377750039100647,
-0.09115361422300339,
-0.37077292799949646,
0.05650927126407623,
-0.5830762386322021,
0.3232600688934326,
-0.3011023998260498,
0.012527359649538994,
0.03377855569124222,
0.20382918417453766,
0.06389455497264862,
0.10011506080627441,
0.1062324196100235,
0.07755530625581741,
0.2739686965942383,
0.42018237709999084,
-0.2738989591598511,
-0.011677499860525131,
0.06710217893123627,
-0.13045533001422882,
0.1050708144903183,
-0.48917534947395325,
0.09588396549224854,
-0.08438282459974289,
0.002884022891521454,
-0.07002332806587219,
-0.03067554533481598,
0.09407036006450653,
0.15577387809753418,
0.4137144684791565,
0.07097090780735016,
0.14361581206321716,
0.05436461418867111,
-0.3231852054595947,
-0.10819736123085022,
0.013913702219724655,
-0.16545554995536804,
0.18821707367897034,
0.1763978749513626,
0.40713921189308167,
-0.08805648982524872,
0.2393709123134613,
-0.12984879314899445,
-0.23433974385261536,
0.13615502417087555,
0.20362314581871033,
-0.21806851029396057,
0.43533650040626526,
-0.4416888654232025,
0.1601601094007492,
0.023008406162261963,
-0.07237862795591354,
0.3157654106616974,
0.16994482278823853,
-0.42532962560653687,
-0.41940996050834656,
0.49150121212005615,
-0.6530722379684448,
-0.26358234882354736,
0.0014126147143542767,
0.014588072896003723,
0.07606147229671478,
-0.2930276095867157,
-0.5971977710723877,
-0.23464739322662354,
0.4017391502857208,
-0.10413654893636703,
-0.19380192458629608,
-0.23107361793518066,
-0.13725338876247406,
0.11338825523853302,
-0.24878530204296112,
0.07593899965286255,
-0.006725870072841644,
-0.29255032539367676,
0.15506841242313385,
-0.3579899072647095
] |
https://github.com/huggingface/datasets/issues/4480 | Bigbench tensorflow GPU dependency | Thanks for reporting ! :) cc @andersjohanandreassen can you take a look at this ?
Also @cceyda feel free to open an issue at [BIG-Bench](https://github.com/google/BIG-bench) as well regarding the `AttributeError` | ## Describe the bug
Loading bigbech
```py
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
tries to use gpu and fails with OOM with the following error
```
Downloading and preparing dataset bigbench/swedish_to_german_proverbs (download: Unknown size, generated: 68.92 KiB, post-processed: Unknown size, total: 68.92 KiB) to /home/ceyda/.cache/huggingface/datasets/bigbench/swedish_to_german_proverbs/1.0.0/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0...
Generating default split: 0%| | 0/72 [00:00<?, ? examples/s]2022-06-13 14:11:04.154469: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-06-13 14:11:05.133600: F tensorflow/core/platform/statusor.cc:33] Attempting to fetch value instead of handling error INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 3: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 25396838400
Aborted (core dumped)
```
I think this is because bigbench dependency (below) installs tensorflow (GPU version) and dataloading tries to use GPU as default.
`pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz`
while just doing 'pip install bigbench' results in following error
```
File "/home/ceyda/.local/lib/python3.7/site-packages/datasets/load.py", line 109, in import_main_class
module = importlib.import_module(module_path)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 118, in <module>
class Bigbench(datasets.GeneratorBasedBuilder):
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 127, in Bigbench
BigBenchConfig(name=name, version=datasets.Version("1.0.0")) for name in bb_utils.get_all_json_task_names()
AttributeError: module 'bigbench.api.util' has no attribute 'get_all_json_task_names'
```
## Steps to avoid the bug
Not ideal but can solve with (since I don't really use tensorflow elsewhere)
`pip uninstall tensorflow`
`pip install tensorflow-cpu`
## Environment info
- datasets @ master
- Python version: 3.7
| 30 | Bigbench tensorflow GPU dependency
## Describe the bug
Loading bigbech
```py
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
tries to use gpu and fails with OOM with the following error
```
Downloading and preparing dataset bigbench/swedish_to_german_proverbs (download: Unknown size, generated: 68.92 KiB, post-processed: Unknown size, total: 68.92 KiB) to /home/ceyda/.cache/huggingface/datasets/bigbench/swedish_to_german_proverbs/1.0.0/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0...
Generating default split: 0%| | 0/72 [00:00<?, ? examples/s]2022-06-13 14:11:04.154469: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-06-13 14:11:05.133600: F tensorflow/core/platform/statusor.cc:33] Attempting to fetch value instead of handling error INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 3: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 25396838400
Aborted (core dumped)
```
I think this is because bigbench dependency (below) installs tensorflow (GPU version) and dataloading tries to use GPU as default.
`pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz`
while just doing 'pip install bigbench' results in following error
```
File "/home/ceyda/.local/lib/python3.7/site-packages/datasets/load.py", line 109, in import_main_class
module = importlib.import_module(module_path)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 118, in <module>
class Bigbench(datasets.GeneratorBasedBuilder):
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 127, in Bigbench
BigBenchConfig(name=name, version=datasets.Version("1.0.0")) for name in bb_utils.get_all_json_task_names()
AttributeError: module 'bigbench.api.util' has no attribute 'get_all_json_task_names'
```
## Steps to avoid the bug
Not ideal but can solve with (since I don't really use tensorflow elsewhere)
`pip uninstall tensorflow`
`pip install tensorflow-cpu`
## Environment info
- datasets @ master
- Python version: 3.7
Thanks for reporting ! :) cc @andersjohanandreassen can you take a look at this ?
Also @cceyda feel free to open an issue at [BIG-Bench](https://github.com/google/BIG-bench) as well regarding the `AttributeError` | [
-0.2978525459766388,
-0.26817411184310913,
-0.07095292210578918,
0.27338606119155884,
0.11652650684118271,
-0.19607090950012207,
0.18151375651359558,
0.31028833985328674,
0.41639018058776855,
0.09090413898229599,
0.4150956869125366,
0.24147586524486542,
0.17177844047546387,
0.19702059030532837,
0.049180176109075546,
-0.09048743546009064,
0.025415629148483276,
0.20439815521240234,
-0.3586907684803009,
-0.20045575499534607,
-0.25720953941345215,
0.14879660308361053,
-0.1773633360862732,
0.11959225684404373,
-0.20931211113929749,
-0.11506197601556778,
0.1706707626581192,
0.04776926711201668,
-0.20709891617298126,
0.09262877702713013,
0.11968474090099335,
-0.17174501717090607,
0.0018240436911582947,
0.5643149018287659,
-0.00011159082350786775,
-0.10134610533714294,
-0.04936058819293976,
-0.057393014430999756,
0.08624926209449768,
-0.32906073331832886,
-0.12473932653665543,
-0.40793588757514954,
-0.19566945731639862,
-0.2049553394317627,
0.1057611033320427,
-0.2820264995098114,
0.08897575736045837,
-0.24833117425441742,
0.22853554785251617,
0.4700741767883301,
0.1560889333486557,
0.0579998716711998,
0.04398765787482262,
-0.17041420936584473,
0.07842971384525299,
-0.09241318702697754,
-0.1305903047323227,
0.37825462222099304,
0.25345706939697266,
-0.2873881757259369,
-0.18301403522491455,
0.23757876455783844,
0.07404796779155731,
0.05642802640795708,
-0.09877970069646835,
-0.07103510200977325,
0.42442673444747925,
-0.49152424931526184,
0.15796802937984467,
0.07330388575792313,
-0.0708698108792305,
-0.2037331461906433,
-0.18026161193847656,
-0.13835425674915314,
0.10159088671207428,
-0.4721689522266388,
0.3868112564086914,
0.40875744819641113,
-0.3095889091491699,
0.12285442650318146,
0.18048281967639923,
-0.2498025894165039,
-0.18578137457370758,
0.22711080312728882,
-0.2544079124927521,
0.37240228056907654,
0.04145702347159386,
0.11372129619121552,
0.01481550931930542,
0.1165640726685524,
0.04622700810432434,
-0.05443456023931503,
0.031086359173059464,
-0.04926219582557678,
-0.3816725015640259,
0.013495668768882751,
-0.018298551440238953,
-0.29741162061691284,
0.13016724586486816,
0.19654348492622375,
0.18692687153816223,
0.18866580724716187,
-0.15230417251586914,
0.08498573303222656,
-0.021847758442163467,
0.42930370569229126,
-0.2958287298679352,
-0.21750755608081818,
0.3280932903289795,
0.1820874959230423,
0.043388884514570236,
0.17612376809120178,
-0.0748131200671196,
-0.30569371581077576,
-0.2524651885032654,
-0.10224995762109756,
0.4987866282463074,
-0.19874504208564758,
-0.42466169595718384,
0.23077645897865295,
-0.15118171274662018,
0.22923824191093445,
0.17370811104774475,
0.43406954407691956,
-0.2833150625228882,
0.5174933671951294,
0.19728676974773407,
0.196671724319458,
-0.16064128279685974,
-0.2951120138168335,
-0.06391339004039764,
-0.002583790570497513,
0.00013250485062599182,
0.0631430521607399,
0.055705476552248,
-0.20769867300987244,
0.47197645902633667,
0.32141372561454773,
0.29075145721435547,
-0.4080052077770233,
0.20918172597885132,
-0.29775944352149963,
0.003668457269668579,
0.2357083112001419,
-0.16598646342754364,
0.03154604136943817,
0.2880193591117859,
0.09469600021839142,
0.10280326753854752,
0.12320481240749359,
-0.14011797308921814,
-0.3067120909690857,
-0.2651575207710266,
0.2123563438653946,
-0.0037247315049171448,
0.13087673485279083,
-0.3174832761287689,
0.05986819043755531,
0.16747304797172546,
0.10813595354557037,
0.07554697245359421,
-0.29111045598983765,
-0.21589869260787964,
-0.06426691263914108,
0.16118310391902924,
-0.13349400460720062,
-0.12247401475906372,
-0.15954922139644623,
0.39191770553588867,
-0.07702645659446716,
0.1262359321117401,
0.3271734118461609,
-0.2263510525226593,
0.11950312554836273,
-0.09345367550849915,
-0.5156657099723816,
0.33847570419311523,
-0.21732686460018158,
-0.8058139085769653,
0.22448797523975372,
-0.3376767635345459,
0.11399691551923752,
0.17608347535133362,
0.14493021368980408,
0.12228673696517944,
0.15113294124603271,
0.27687403559684753,
0.4289814829826355,
0.001959696412086487,
0.03895863890647888,
-0.30960068106651306,
-0.33695507049560547,
-0.2246938794851303,
0.252631276845932,
0.4612511098384857,
0.21391186118125916,
-0.15809151530265808,
0.05236351490020752,
0.29279056191444397,
-0.019621189683675766,
-0.08450635522603989,
0.06587056070566177,
0.4673035442829132,
-0.3600335121154785,
0.1082238107919693,
0.14331522583961487,
-0.19948303699493408,
0.15203812718391418,
-0.17942339181900024,
0.2122887670993805,
-0.0551835298538208,
-0.056391097605228424,
-0.07877947390079498,
0.15694165229797363,
0.010235197842121124,
-0.03767738118767738,
0.044757962226867676,
0.19840484857559204,
-0.12563538551330566,
-0.09518623352050781,
-0.17323830723762512,
0.48206380009651184,
-0.514723539352417,
0.06319941580295563,
0.09826353192329407,
0.061551474034786224,
-0.11265064030885696,
-0.14096854627132416,
0.04417049139738083,
-0.003259889781475067,
0.0032061338424682617,
-0.17952574789524078,
-0.17863729596138,
0.27926698327064514,
-0.0968216061592102,
-0.10362705588340759,
-0.3845274746417999,
0.29045307636260986,
0.39839237928390503,
-0.2345144897699356,
0.15976980328559875,
0.09962329268455505,
0.07153759896755219,
-0.1582641899585724,
0.19252365827560425,
0.33378592133522034,
0.2406284362077713,
0.11273159831762314,
-0.04740336537361145,
0.05459560453891754,
0.23717570304870605,
-0.10468235611915588,
0.017802255228161812,
-0.06495960801839828,
0.3957000970840454,
0.08946467936038971,
0.1933106780052185,
-0.09712345898151398,
-0.38570457696914673,
-0.13042309880256653,
0.5529273748397827,
0.20092745125293732,
0.26478898525238037,
-0.037912748754024506,
-0.11921193450689316,
-0.00911899097263813,
0.11126348376274109,
-0.14445769786834717,
0.5305057168006897,
0.04636899009346962,
-0.21101301908493042,
0.1750146895647049,
0.02723010629415512,
-0.10990878194570541,
0.07273854315280914,
0.07994642108678818,
0.30007538199424744,
-0.1216975525021553,
0.27288538217544556,
-0.10092375427484512,
0.046557724475860596,
0.07446718215942383,
0.3447238802909851,
0.1320357769727707,
-0.2136489599943161,
0.1797022819519043,
-0.0016827881336212158,
0.1190614327788353,
-0.2342870831489563,
0.07003457099199295,
-0.18363870680332184,
0.1307935118675232,
-0.0899117961525917,
0.5406391620635986,
0.22057119011878967,
0.30551090836524963,
0.26793497800827026,
0.3790443241596222,
0.0006521102041006088,
-0.3092452585697174,
0.13888400793075562,
-0.14063571393489838,
-0.24092569947242737,
0.03579723462462425,
0.3945968747138977,
-0.1577591598033905,
0.3326013684272766,
0.14782977104187012,
-0.2542077302932739,
-0.4130055010318756,
-0.18860286474227905,
0.13696661591529846,
-0.1052209883928299,
0.32032302021980286,
-0.020230568945407867,
0.06041457876563072,
0.20828542113304138,
-0.0345449261367321,
-0.07133569568395615,
-0.2549625635147095,
0.03012586571276188,
-0.14839597046375275,
-0.3336338698863983,
-0.0053336843848228455,
-0.19476419687271118,
-0.23039039969444275,
-0.11073211580514908,
-0.35884377360343933,
0.14343544840812683,
0.1541004180908203,
0.2591988146305084,
-0.12153153866529465,
0.3472854197025299,
0.24216552078723907,
0.47444820404052734,
0.18549929559230804,
-0.1466166228055954,
-0.29508176445961,
-0.04068061336874962,
-0.10817066580057144,
-0.4781765043735504,
0.07388682663440704,
0.05059991776943207,
0.44548848271369934,
0.046357203274965286,
-0.6878344416618347,
-0.04697687178850174,
-0.11059518158435822,
0.2113800346851349,
-0.23378732800483704,
-0.23857267200946808,
0.2347158044576645,
-0.24489179253578186,
-0.012738266959786415,
-0.2038482427597046,
-0.1789734661579132,
0.11765676736831665,
-0.009535755962133408,
0.4239046573638916,
0.19269371032714844,
0.4473213255405426,
0.3900439143180847,
0.6421478390693665,
0.007032101973891258,
-0.42495614290237427,
0.14574554562568665,
0.05645231157541275,
0.07819108664989471,
-0.09805762022733688,
-0.2466174215078354,
-0.12172538787126541,
-0.2139187455177307,
0.10430608689785004,
0.011067986488342285,
-0.33592841029167175,
-0.16405892372131348,
-0.19117745757102966,
0.03937452659010887,
0.03547229617834091,
-0.025728626176714897,
0.12976539134979248,
-0.3722219467163086,
-0.06872718781232834,
0.012046024203300476,
0.06420927494764328,
-0.3005940020084381,
0.19470396637916565,
0.20839408040046692,
-0.1674734503030777,
-0.21516162157058716,
-0.07158420979976654,
-0.21007908880710602,
-0.1691400110721588,
-0.22356244921684265,
0.2539602518081665,
-0.16179011762142181,
0.24294163286685944,
0.017231736332178116,
0.11801367253065109,
0.07026150077581406,
-0.18692195415496826,
0.4715123176574707,
0.25667527318000793,
-0.08515280485153198,
-0.04795525595545769,
-0.23489272594451904,
-0.2662180960178375,
-0.035030629485845566,
-0.20547665655612946,
0.21616530418395996,
0.44712135195732117,
0.2877715826034546,
-0.22707420587539673,
-0.22607682645320892,
0.1971055567264557,
-0.1503215730190277,
-0.08969083428382874,
-0.13727304339408875,
-0.22927670180797577,
-0.31307804584503174,
-0.18631453812122345,
0.20788684487342834,
0.04835212230682373,
0.18316513299942017,
-0.22515439987182617,
0.24033083021640778,
-0.2736169397830963,
-0.014010200276970863,
0.10435385257005692,
-0.040190670639276505,
-0.03020073100924492,
-0.09700825065374374,
0.07848404347896576,
-0.24987247586250305,
0.22749124467372894,
0.3605533838272095,
0.37624987959861755,
0.3320038318634033,
-0.314296692609787,
0.24371543526649475,
0.2766832113265991,
0.23937678337097168,
0.37946441769599915,
-0.1933271437883377,
-0.03013046830892563,
0.02086062729358673,
0.08967094868421555,
-0.16231019794940948,
0.6780010461807251,
0.43822532892227173,
0.19377663731575012,
-0.4094429314136505,
-0.14926861226558685,
0.7318353056907654,
0.11334781348705292,
-0.18067041039466858,
0.6362980604171753,
-0.08356228470802307,
-0.37308645248413086,
0.22659359872341156,
0.1115599125623703,
0.7767831087112427,
0.03980318084359169,
-0.027457240968942642,
0.46009963750839233,
-0.031373314559459686,
0.514549732208252,
-0.21367967128753662,
0.27258574962615967,
-0.2324061393737793,
-0.5356913805007935,
-0.0010426342487335205,
-0.26027894020080566,
0.34395718574523926,
-0.15044249594211578,
-0.22484710812568665,
0.12623804807662964,
0.14268551766872406,
0.10788628458976746,
0.279628187417984,
0.4294620156288147,
-0.18740785121917725,
-0.39465516805648804,
-0.26714229583740234,
0.09722189605236053,
-0.1305055320262909,
0.2892015278339386,
-0.22391527891159058,
-0.11114200949668884,
-0.042193248867988586,
-0.14795377850532532,
-0.32037824392318726,
0.16587042808532715,
-0.6732578277587891,
0.2368549108505249,
-0.3649909198284149,
-0.13392367959022522,
0.16278128325939178,
0.07553769648075104,
0.30127254128456116,
0.15280885994434357,
-0.16859282553195953,
0.20109033584594727,
0.26983845233917236,
-0.05442236363887787,
0.42037662863731384,
-0.09431097656488419,
0.4340197443962097,
-0.21718209981918335,
-0.11404373496770859,
0.32360315322875977,
-0.15515805780887604,
0.09789340198040009,
0.10487744212150574,
-0.216990664601326,
-0.2149166613817215,
0.038099028170108795,
-0.5245623588562012,
0.12457606196403503,
-0.031292498111724854,
-0.16311229765415192,
0.15569426119327545,
-0.09858445823192596,
-0.2783777415752411,
-0.07592501491308212,
-0.1459702104330063,
-0.4409407675266266,
-0.14680816233158112,
0.41833171248435974,
0.209189772605896,
-0.3658074140548706,
0.4613730311393738,
0.1607571393251419,
0.20766547322273254,
-0.19283825159072876,
-0.19495975971221924,
0.17476631700992584,
-0.22147321701049805,
0.01281564962118864,
-0.1972203552722931,
-0.3956751227378845,
0.016111180186271667,
0.07814222574234009,
0.16668766736984253,
0.04524308443069458,
-0.08979395031929016,
-0.23112112283706665,
-0.43653687834739685,
0.20569266378879547,
-0.3539130985736847,
-0.02120046690106392,
-0.03271716088056564,
0.29202309250831604,
-0.18779918551445007,
0.18980160355567932,
-0.29561641812324524,
0.32817214727401733,
-0.1292448341846466,
0.09488792717456818,
-0.08326933532953262,
0.1670200228691101,
0.23515823483467102,
0.21952539682388306,
0.061002880334854126,
0.2618492841720581,
-0.10073530673980713,
-0.2122821807861328,
-0.08832928538322449,
0.13147999346256256,
0.07050010561943054,
-0.018896516412496567,
0.11588744819164276,
-0.4013354182243347,
-0.11278189718723297,
0.08197488635778427,
0.37444061040878296,
0.23063814640045166,
-0.19813959300518036,
-0.31900760531425476,
0.11901445686817169,
0.3793546259403229,
-0.09954565763473511,
-0.1125650405883789,
-0.20313265919685364,
-0.06014835834503174,
0.1861625760793686,
0.25968262553215027,
0.008543897420167923,
-0.023418325930833817,
-0.39882519841194153,
0.061660222709178925,
0.07245075702667236,
0.06760470569133759,
0.25648191571235657,
-0.37660282850265503,
-0.10194016993045807,
0.15051892399787903,
-0.010991227813065052,
0.10320543497800827,
-0.2462727427482605,
0.07836108654737473,
-0.15528464317321777,
0.2364191710948944,
-0.19011327624320984,
-0.01914667710661888,
0.06882038712501526,
-0.12336886674165726,
0.04228148236870766,
0.48362377285957336,
0.43082210421562195,
0.0502958744764328,
-0.10043467581272125,
0.08233220875263214,
0.03451286256313324,
-0.15302735567092896,
0.2590486407279968,
-0.0014444179832935333,
0.045307982712984085,
0.08441469073295593,
0.13277776539325714,
0.2539620101451874,
0.4060738980770111,
0.3007388710975647,
-0.25660982728004456,
0.295646071434021,
0.21382534503936768,
0.1471385359764099,
0.17475971579551697,
-0.13734300434589386,
-0.48914891481399536,
0.22911258041858673,
-0.41265833377838135,
0.15186724066734314,
-0.270769864320755,
0.11079184710979462,
-0.04502468556165695,
-0.09335769712924957,
-0.37388303875923157,
0.20065051317214966,
-0.22790029644966125,
0.13479137420654297,
-0.23805974423885345,
-0.05977126210927963,
0.11313816905021667,
-0.09597007930278778,
0.0770266205072403,
-0.19481675326824188,
0.16501609981060028,
0.2861839830875397,
-0.28836774826049805,
0.12795771658420563,
-0.43125757575035095,
0.2453123927116394,
0.08051308989524841,
-0.25589126348495483,
0.22716523706912994,
0.08986081182956696,
-0.08911032974720001,
-0.15639004111289978,
0.27682533860206604,
0.4981370270252228,
0.45029765367507935,
-0.22610795497894287,
0.0025445460341870785,
0.042527612298727036,
-0.046850740909576416,
-0.03653554245829582,
0.06206061318516731,
0.3581424951553345,
0.40264278650283813,
-0.0437154546380043,
0.12646040320396423,
-0.17512916028499603,
-0.12049485743045807,
0.19228295981884003,
0.25154197216033936,
-0.32155245542526245,
0.08286316692829132,
-0.19754670560359955,
-0.16807858645915985,
-0.2686665952205658,
0.058454789221286774,
-0.09599334001541138,
-0.11712963879108429,
0.5524492263793945,
-0.06040016934275627,
0.10915803164243698,
0.0689765140414238,
0.07817215472459793,
-0.30016830563545227,
0.39378824830055237,
-0.11639109253883362,
0.29761096835136414,
-0.465150386095047,
-0.1316382735967636,
-0.19056588411331177,
0.31292253732681274,
0.07672756910324097,
0.15351644158363342,
0.08460163325071335,
0.18905796110630035,
0.09369463473558426,
0.018032120540738106,
-0.22820787131786346,
-0.07220927625894547,
0.2641354203224182,
-0.06629958003759384,
-0.5283517241477966,
-0.06115594133734703,
-0.2400379329919815,
0.08212990313768387,
0.2014835774898529,
-0.3653983473777771,
0.00787309929728508,
-0.20443381369113922,
0.0160125270485878,
-0.21197816729545593,
0.06380987167358398,
-0.0006619822233915329,
0.23090186715126038,
0.4811113774776459,
0.048551045358181,
0.29853034019470215,
0.14855611324310303,
-0.22674460709095,
-0.39143118262290955,
-0.3346387445926666,
-0.4480559825897217,
0.5141367316246033,
0.0008883923292160034,
0.35583728551864624,
-0.0736197978258133,
-0.016147945076227188,
-0.20331797003746033,
0.26329535245895386,
0.07630474120378494,
-0.567011833190918,
-0.12252277880907059,
0.14403553307056427,
-0.06431224942207336,
0.22052468359470367,
0.33339232206344604,
0.3965953588485718,
0.03981892764568329,
0.14264866709709167,
-0.5763707160949707,
-0.1923418939113617,
0.2730618417263031,
-0.1571471393108368,
-0.13601738214492798,
-0.14894311130046844,
0.5193384885787964,
0.08836723119020462,
-0.16550245881080627,
-0.5664249062538147,
-0.11722758412361145,
0.17736205458641052,
-0.08778554946184158,
-0.43016284704208374,
-0.03600580245256424,
0.024765094742178917,
0.27015894651412964,
-0.15418341755867004,
0.18545030057430267,
-0.1131296381354332,
-0.49372193217277527,
-0.08876629173755646,
-0.30926769971847534
] |
https://github.com/huggingface/datasets/issues/4480 | Bigbench tensorflow GPU dependency | I'm on vacation for the next week, so won't be able to do much debugging at the moment. Sorry for the inconvenience.
But I did quickly take a look:
**pypi**:
I managed to reproduce the above error with the pypi version begin out of date.
The version on `https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz` should be up to date, but it was my understanding that there was some issue with the pypi upload, so I don't even understand why there is a version [on pypi from April 1](https://pypi.org/project/bigbench/0.0.1/). Perhaps @ethansdyer, who's handling the pypi upload, knows the answer to that?
**OOM error**:
But, I'm unable to reproduce the OOM error in a google colab with GPU enabled.
This is what I ran:
```
!pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz
!pip install datasets
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
The `swedish_to_german_proverbs`task is only 72 examples, so I don't understand what could be causing the OOM error. Loading the task has no effect on the RAM for me. @cceyda Can you confirm that this does not occur in a [colab](https://colab.research.google.com/)?
If the GPU is somehow causing issues on your system, disabling the GPU from TF might be an option too
```
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
```
| ## Describe the bug
Loading bigbech
```py
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
tries to use gpu and fails with OOM with the following error
```
Downloading and preparing dataset bigbench/swedish_to_german_proverbs (download: Unknown size, generated: 68.92 KiB, post-processed: Unknown size, total: 68.92 KiB) to /home/ceyda/.cache/huggingface/datasets/bigbench/swedish_to_german_proverbs/1.0.0/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0...
Generating default split: 0%| | 0/72 [00:00<?, ? examples/s]2022-06-13 14:11:04.154469: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-06-13 14:11:05.133600: F tensorflow/core/platform/statusor.cc:33] Attempting to fetch value instead of handling error INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 3: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 25396838400
Aborted (core dumped)
```
I think this is because bigbench dependency (below) installs tensorflow (GPU version) and dataloading tries to use GPU as default.
`pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz`
while just doing 'pip install bigbench' results in following error
```
File "/home/ceyda/.local/lib/python3.7/site-packages/datasets/load.py", line 109, in import_main_class
module = importlib.import_module(module_path)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 118, in <module>
class Bigbench(datasets.GeneratorBasedBuilder):
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 127, in Bigbench
BigBenchConfig(name=name, version=datasets.Version("1.0.0")) for name in bb_utils.get_all_json_task_names()
AttributeError: module 'bigbench.api.util' has no attribute 'get_all_json_task_names'
```
## Steps to avoid the bug
Not ideal but can solve with (since I don't really use tensorflow elsewhere)
`pip uninstall tensorflow`
`pip install tensorflow-cpu`
## Environment info
- datasets @ master
- Python version: 3.7
| 199 | Bigbench tensorflow GPU dependency
## Describe the bug
Loading bigbech
```py
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
tries to use gpu and fails with OOM with the following error
```
Downloading and preparing dataset bigbench/swedish_to_german_proverbs (download: Unknown size, generated: 68.92 KiB, post-processed: Unknown size, total: 68.92 KiB) to /home/ceyda/.cache/huggingface/datasets/bigbench/swedish_to_german_proverbs/1.0.0/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0...
Generating default split: 0%| | 0/72 [00:00<?, ? examples/s]2022-06-13 14:11:04.154469: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-06-13 14:11:05.133600: F tensorflow/core/platform/statusor.cc:33] Attempting to fetch value instead of handling error INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 3: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 25396838400
Aborted (core dumped)
```
I think this is because bigbench dependency (below) installs tensorflow (GPU version) and dataloading tries to use GPU as default.
`pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz`
while just doing 'pip install bigbench' results in following error
```
File "/home/ceyda/.local/lib/python3.7/site-packages/datasets/load.py", line 109, in import_main_class
module = importlib.import_module(module_path)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 118, in <module>
class Bigbench(datasets.GeneratorBasedBuilder):
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 127, in Bigbench
BigBenchConfig(name=name, version=datasets.Version("1.0.0")) for name in bb_utils.get_all_json_task_names()
AttributeError: module 'bigbench.api.util' has no attribute 'get_all_json_task_names'
```
## Steps to avoid the bug
Not ideal but can solve with (since I don't really use tensorflow elsewhere)
`pip uninstall tensorflow`
`pip install tensorflow-cpu`
## Environment info
- datasets @ master
- Python version: 3.7
I'm on vacation for the next week, so won't be able to do much debugging at the moment. Sorry for the inconvenience.
But I did quickly take a look:
**pypi**:
I managed to reproduce the above error with the pypi version begin out of date.
The version on `https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz` should be up to date, but it was my understanding that there was some issue with the pypi upload, so I don't even understand why there is a version [on pypi from April 1](https://pypi.org/project/bigbench/0.0.1/). Perhaps @ethansdyer, who's handling the pypi upload, knows the answer to that?
**OOM error**:
But, I'm unable to reproduce the OOM error in a google colab with GPU enabled.
This is what I ran:
```
!pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz
!pip install datasets
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
The `swedish_to_german_proverbs`task is only 72 examples, so I don't understand what could be causing the OOM error. Loading the task has no effect on the RAM for me. @cceyda Can you confirm that this does not occur in a [colab](https://colab.research.google.com/)?
If the GPU is somehow causing issues on your system, disabling the GPU from TF might be an option too
```
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
```
| [
-0.2978525459766388,
-0.26817411184310913,
-0.07095292210578918,
0.27338606119155884,
0.11652650684118271,
-0.19607090950012207,
0.18151375651359558,
0.31028833985328674,
0.41639018058776855,
0.09090413898229599,
0.4150956869125366,
0.24147586524486542,
0.17177844047546387,
0.19702059030532837,
0.049180176109075546,
-0.09048743546009064,
0.025415629148483276,
0.20439815521240234,
-0.3586907684803009,
-0.20045575499534607,
-0.25720953941345215,
0.14879660308361053,
-0.1773633360862732,
0.11959225684404373,
-0.20931211113929749,
-0.11506197601556778,
0.1706707626581192,
0.04776926711201668,
-0.20709891617298126,
0.09262877702713013,
0.11968474090099335,
-0.17174501717090607,
0.0018240436911582947,
0.5643149018287659,
-0.00011159082350786775,
-0.10134610533714294,
-0.04936058819293976,
-0.057393014430999756,
0.08624926209449768,
-0.32906073331832886,
-0.12473932653665543,
-0.40793588757514954,
-0.19566945731639862,
-0.2049553394317627,
0.1057611033320427,
-0.2820264995098114,
0.08897575736045837,
-0.24833117425441742,
0.22853554785251617,
0.4700741767883301,
0.1560889333486557,
0.0579998716711998,
0.04398765787482262,
-0.17041420936584473,
0.07842971384525299,
-0.09241318702697754,
-0.1305903047323227,
0.37825462222099304,
0.25345706939697266,
-0.2873881757259369,
-0.18301403522491455,
0.23757876455783844,
0.07404796779155731,
0.05642802640795708,
-0.09877970069646835,
-0.07103510200977325,
0.42442673444747925,
-0.49152424931526184,
0.15796802937984467,
0.07330388575792313,
-0.0708698108792305,
-0.2037331461906433,
-0.18026161193847656,
-0.13835425674915314,
0.10159088671207428,
-0.4721689522266388,
0.3868112564086914,
0.40875744819641113,
-0.3095889091491699,
0.12285442650318146,
0.18048281967639923,
-0.2498025894165039,
-0.18578137457370758,
0.22711080312728882,
-0.2544079124927521,
0.37240228056907654,
0.04145702347159386,
0.11372129619121552,
0.01481550931930542,
0.1165640726685524,
0.04622700810432434,
-0.05443456023931503,
0.031086359173059464,
-0.04926219582557678,
-0.3816725015640259,
0.013495668768882751,
-0.018298551440238953,
-0.29741162061691284,
0.13016724586486816,
0.19654348492622375,
0.18692687153816223,
0.18866580724716187,
-0.15230417251586914,
0.08498573303222656,
-0.021847758442163467,
0.42930370569229126,
-0.2958287298679352,
-0.21750755608081818,
0.3280932903289795,
0.1820874959230423,
0.043388884514570236,
0.17612376809120178,
-0.0748131200671196,
-0.30569371581077576,
-0.2524651885032654,
-0.10224995762109756,
0.4987866282463074,
-0.19874504208564758,
-0.42466169595718384,
0.23077645897865295,
-0.15118171274662018,
0.22923824191093445,
0.17370811104774475,
0.43406954407691956,
-0.2833150625228882,
0.5174933671951294,
0.19728676974773407,
0.196671724319458,
-0.16064128279685974,
-0.2951120138168335,
-0.06391339004039764,
-0.002583790570497513,
0.00013250485062599182,
0.0631430521607399,
0.055705476552248,
-0.20769867300987244,
0.47197645902633667,
0.32141372561454773,
0.29075145721435547,
-0.4080052077770233,
0.20918172597885132,
-0.29775944352149963,
0.003668457269668579,
0.2357083112001419,
-0.16598646342754364,
0.03154604136943817,
0.2880193591117859,
0.09469600021839142,
0.10280326753854752,
0.12320481240749359,
-0.14011797308921814,
-0.3067120909690857,
-0.2651575207710266,
0.2123563438653946,
-0.0037247315049171448,
0.13087673485279083,
-0.3174832761287689,
0.05986819043755531,
0.16747304797172546,
0.10813595354557037,
0.07554697245359421,
-0.29111045598983765,
-0.21589869260787964,
-0.06426691263914108,
0.16118310391902924,
-0.13349400460720062,
-0.12247401475906372,
-0.15954922139644623,
0.39191770553588867,
-0.07702645659446716,
0.1262359321117401,
0.3271734118461609,
-0.2263510525226593,
0.11950312554836273,
-0.09345367550849915,
-0.5156657099723816,
0.33847570419311523,
-0.21732686460018158,
-0.8058139085769653,
0.22448797523975372,
-0.3376767635345459,
0.11399691551923752,
0.17608347535133362,
0.14493021368980408,
0.12228673696517944,
0.15113294124603271,
0.27687403559684753,
0.4289814829826355,
0.001959696412086487,
0.03895863890647888,
-0.30960068106651306,
-0.33695507049560547,
-0.2246938794851303,
0.252631276845932,
0.4612511098384857,
0.21391186118125916,
-0.15809151530265808,
0.05236351490020752,
0.29279056191444397,
-0.019621189683675766,
-0.08450635522603989,
0.06587056070566177,
0.4673035442829132,
-0.3600335121154785,
0.1082238107919693,
0.14331522583961487,
-0.19948303699493408,
0.15203812718391418,
-0.17942339181900024,
0.2122887670993805,
-0.0551835298538208,
-0.056391097605228424,
-0.07877947390079498,
0.15694165229797363,
0.010235197842121124,
-0.03767738118767738,
0.044757962226867676,
0.19840484857559204,
-0.12563538551330566,
-0.09518623352050781,
-0.17323830723762512,
0.48206380009651184,
-0.514723539352417,
0.06319941580295563,
0.09826353192329407,
0.061551474034786224,
-0.11265064030885696,
-0.14096854627132416,
0.04417049139738083,
-0.003259889781475067,
0.0032061338424682617,
-0.17952574789524078,
-0.17863729596138,
0.27926698327064514,
-0.0968216061592102,
-0.10362705588340759,
-0.3845274746417999,
0.29045307636260986,
0.39839237928390503,
-0.2345144897699356,
0.15976980328559875,
0.09962329268455505,
0.07153759896755219,
-0.1582641899585724,
0.19252365827560425,
0.33378592133522034,
0.2406284362077713,
0.11273159831762314,
-0.04740336537361145,
0.05459560453891754,
0.23717570304870605,
-0.10468235611915588,
0.017802255228161812,
-0.06495960801839828,
0.3957000970840454,
0.08946467936038971,
0.1933106780052185,
-0.09712345898151398,
-0.38570457696914673,
-0.13042309880256653,
0.5529273748397827,
0.20092745125293732,
0.26478898525238037,
-0.037912748754024506,
-0.11921193450689316,
-0.00911899097263813,
0.11126348376274109,
-0.14445769786834717,
0.5305057168006897,
0.04636899009346962,
-0.21101301908493042,
0.1750146895647049,
0.02723010629415512,
-0.10990878194570541,
0.07273854315280914,
0.07994642108678818,
0.30007538199424744,
-0.1216975525021553,
0.27288538217544556,
-0.10092375427484512,
0.046557724475860596,
0.07446718215942383,
0.3447238802909851,
0.1320357769727707,
-0.2136489599943161,
0.1797022819519043,
-0.0016827881336212158,
0.1190614327788353,
-0.2342870831489563,
0.07003457099199295,
-0.18363870680332184,
0.1307935118675232,
-0.0899117961525917,
0.5406391620635986,
0.22057119011878967,
0.30551090836524963,
0.26793497800827026,
0.3790443241596222,
0.0006521102041006088,
-0.3092452585697174,
0.13888400793075562,
-0.14063571393489838,
-0.24092569947242737,
0.03579723462462425,
0.3945968747138977,
-0.1577591598033905,
0.3326013684272766,
0.14782977104187012,
-0.2542077302932739,
-0.4130055010318756,
-0.18860286474227905,
0.13696661591529846,
-0.1052209883928299,
0.32032302021980286,
-0.020230568945407867,
0.06041457876563072,
0.20828542113304138,
-0.0345449261367321,
-0.07133569568395615,
-0.2549625635147095,
0.03012586571276188,
-0.14839597046375275,
-0.3336338698863983,
-0.0053336843848228455,
-0.19476419687271118,
-0.23039039969444275,
-0.11073211580514908,
-0.35884377360343933,
0.14343544840812683,
0.1541004180908203,
0.2591988146305084,
-0.12153153866529465,
0.3472854197025299,
0.24216552078723907,
0.47444820404052734,
0.18549929559230804,
-0.1466166228055954,
-0.29508176445961,
-0.04068061336874962,
-0.10817066580057144,
-0.4781765043735504,
0.07388682663440704,
0.05059991776943207,
0.44548848271369934,
0.046357203274965286,
-0.6878344416618347,
-0.04697687178850174,
-0.11059518158435822,
0.2113800346851349,
-0.23378732800483704,
-0.23857267200946808,
0.2347158044576645,
-0.24489179253578186,
-0.012738266959786415,
-0.2038482427597046,
-0.1789734661579132,
0.11765676736831665,
-0.009535755962133408,
0.4239046573638916,
0.19269371032714844,
0.4473213255405426,
0.3900439143180847,
0.6421478390693665,
0.007032101973891258,
-0.42495614290237427,
0.14574554562568665,
0.05645231157541275,
0.07819108664989471,
-0.09805762022733688,
-0.2466174215078354,
-0.12172538787126541,
-0.2139187455177307,
0.10430608689785004,
0.011067986488342285,
-0.33592841029167175,
-0.16405892372131348,
-0.19117745757102966,
0.03937452659010887,
0.03547229617834091,
-0.025728626176714897,
0.12976539134979248,
-0.3722219467163086,
-0.06872718781232834,
0.012046024203300476,
0.06420927494764328,
-0.3005940020084381,
0.19470396637916565,
0.20839408040046692,
-0.1674734503030777,
-0.21516162157058716,
-0.07158420979976654,
-0.21007908880710602,
-0.1691400110721588,
-0.22356244921684265,
0.2539602518081665,
-0.16179011762142181,
0.24294163286685944,
0.017231736332178116,
0.11801367253065109,
0.07026150077581406,
-0.18692195415496826,
0.4715123176574707,
0.25667527318000793,
-0.08515280485153198,
-0.04795525595545769,
-0.23489272594451904,
-0.2662180960178375,
-0.035030629485845566,
-0.20547665655612946,
0.21616530418395996,
0.44712135195732117,
0.2877715826034546,
-0.22707420587539673,
-0.22607682645320892,
0.1971055567264557,
-0.1503215730190277,
-0.08969083428382874,
-0.13727304339408875,
-0.22927670180797577,
-0.31307804584503174,
-0.18631453812122345,
0.20788684487342834,
0.04835212230682373,
0.18316513299942017,
-0.22515439987182617,
0.24033083021640778,
-0.2736169397830963,
-0.014010200276970863,
0.10435385257005692,
-0.040190670639276505,
-0.03020073100924492,
-0.09700825065374374,
0.07848404347896576,
-0.24987247586250305,
0.22749124467372894,
0.3605533838272095,
0.37624987959861755,
0.3320038318634033,
-0.314296692609787,
0.24371543526649475,
0.2766832113265991,
0.23937678337097168,
0.37946441769599915,
-0.1933271437883377,
-0.03013046830892563,
0.02086062729358673,
0.08967094868421555,
-0.16231019794940948,
0.6780010461807251,
0.43822532892227173,
0.19377663731575012,
-0.4094429314136505,
-0.14926861226558685,
0.7318353056907654,
0.11334781348705292,
-0.18067041039466858,
0.6362980604171753,
-0.08356228470802307,
-0.37308645248413086,
0.22659359872341156,
0.1115599125623703,
0.7767831087112427,
0.03980318084359169,
-0.027457240968942642,
0.46009963750839233,
-0.031373314559459686,
0.514549732208252,
-0.21367967128753662,
0.27258574962615967,
-0.2324061393737793,
-0.5356913805007935,
-0.0010426342487335205,
-0.26027894020080566,
0.34395718574523926,
-0.15044249594211578,
-0.22484710812568665,
0.12623804807662964,
0.14268551766872406,
0.10788628458976746,
0.279628187417984,
0.4294620156288147,
-0.18740785121917725,
-0.39465516805648804,
-0.26714229583740234,
0.09722189605236053,
-0.1305055320262909,
0.2892015278339386,
-0.22391527891159058,
-0.11114200949668884,
-0.042193248867988586,
-0.14795377850532532,
-0.32037824392318726,
0.16587042808532715,
-0.6732578277587891,
0.2368549108505249,
-0.3649909198284149,
-0.13392367959022522,
0.16278128325939178,
0.07553769648075104,
0.30127254128456116,
0.15280885994434357,
-0.16859282553195953,
0.20109033584594727,
0.26983845233917236,
-0.05442236363887787,
0.42037662863731384,
-0.09431097656488419,
0.4340197443962097,
-0.21718209981918335,
-0.11404373496770859,
0.32360315322875977,
-0.15515805780887604,
0.09789340198040009,
0.10487744212150574,
-0.216990664601326,
-0.2149166613817215,
0.038099028170108795,
-0.5245623588562012,
0.12457606196403503,
-0.031292498111724854,
-0.16311229765415192,
0.15569426119327545,
-0.09858445823192596,
-0.2783777415752411,
-0.07592501491308212,
-0.1459702104330063,
-0.4409407675266266,
-0.14680816233158112,
0.41833171248435974,
0.209189772605896,
-0.3658074140548706,
0.4613730311393738,
0.1607571393251419,
0.20766547322273254,
-0.19283825159072876,
-0.19495975971221924,
0.17476631700992584,
-0.22147321701049805,
0.01281564962118864,
-0.1972203552722931,
-0.3956751227378845,
0.016111180186271667,
0.07814222574234009,
0.16668766736984253,
0.04524308443069458,
-0.08979395031929016,
-0.23112112283706665,
-0.43653687834739685,
0.20569266378879547,
-0.3539130985736847,
-0.02120046690106392,
-0.03271716088056564,
0.29202309250831604,
-0.18779918551445007,
0.18980160355567932,
-0.29561641812324524,
0.32817214727401733,
-0.1292448341846466,
0.09488792717456818,
-0.08326933532953262,
0.1670200228691101,
0.23515823483467102,
0.21952539682388306,
0.061002880334854126,
0.2618492841720581,
-0.10073530673980713,
-0.2122821807861328,
-0.08832928538322449,
0.13147999346256256,
0.07050010561943054,
-0.018896516412496567,
0.11588744819164276,
-0.4013354182243347,
-0.11278189718723297,
0.08197488635778427,
0.37444061040878296,
0.23063814640045166,
-0.19813959300518036,
-0.31900760531425476,
0.11901445686817169,
0.3793546259403229,
-0.09954565763473511,
-0.1125650405883789,
-0.20313265919685364,
-0.06014835834503174,
0.1861625760793686,
0.25968262553215027,
0.008543897420167923,
-0.023418325930833817,
-0.39882519841194153,
0.061660222709178925,
0.07245075702667236,
0.06760470569133759,
0.25648191571235657,
-0.37660282850265503,
-0.10194016993045807,
0.15051892399787903,
-0.010991227813065052,
0.10320543497800827,
-0.2462727427482605,
0.07836108654737473,
-0.15528464317321777,
0.2364191710948944,
-0.19011327624320984,
-0.01914667710661888,
0.06882038712501526,
-0.12336886674165726,
0.04228148236870766,
0.48362377285957336,
0.43082210421562195,
0.0502958744764328,
-0.10043467581272125,
0.08233220875263214,
0.03451286256313324,
-0.15302735567092896,
0.2590486407279968,
-0.0014444179832935333,
0.045307982712984085,
0.08441469073295593,
0.13277776539325714,
0.2539620101451874,
0.4060738980770111,
0.3007388710975647,
-0.25660982728004456,
0.295646071434021,
0.21382534503936768,
0.1471385359764099,
0.17475971579551697,
-0.13734300434589386,
-0.48914891481399536,
0.22911258041858673,
-0.41265833377838135,
0.15186724066734314,
-0.270769864320755,
0.11079184710979462,
-0.04502468556165695,
-0.09335769712924957,
-0.37388303875923157,
0.20065051317214966,
-0.22790029644966125,
0.13479137420654297,
-0.23805974423885345,
-0.05977126210927963,
0.11313816905021667,
-0.09597007930278778,
0.0770266205072403,
-0.19481675326824188,
0.16501609981060028,
0.2861839830875397,
-0.28836774826049805,
0.12795771658420563,
-0.43125757575035095,
0.2453123927116394,
0.08051308989524841,
-0.25589126348495483,
0.22716523706912994,
0.08986081182956696,
-0.08911032974720001,
-0.15639004111289978,
0.27682533860206604,
0.4981370270252228,
0.45029765367507935,
-0.22610795497894287,
0.0025445460341870785,
0.042527612298727036,
-0.046850740909576416,
-0.03653554245829582,
0.06206061318516731,
0.3581424951553345,
0.40264278650283813,
-0.0437154546380043,
0.12646040320396423,
-0.17512916028499603,
-0.12049485743045807,
0.19228295981884003,
0.25154197216033936,
-0.32155245542526245,
0.08286316692829132,
-0.19754670560359955,
-0.16807858645915985,
-0.2686665952205658,
0.058454789221286774,
-0.09599334001541138,
-0.11712963879108429,
0.5524492263793945,
-0.06040016934275627,
0.10915803164243698,
0.0689765140414238,
0.07817215472459793,
-0.30016830563545227,
0.39378824830055237,
-0.11639109253883362,
0.29761096835136414,
-0.465150386095047,
-0.1316382735967636,
-0.19056588411331177,
0.31292253732681274,
0.07672756910324097,
0.15351644158363342,
0.08460163325071335,
0.18905796110630035,
0.09369463473558426,
0.018032120540738106,
-0.22820787131786346,
-0.07220927625894547,
0.2641354203224182,
-0.06629958003759384,
-0.5283517241477966,
-0.06115594133734703,
-0.2400379329919815,
0.08212990313768387,
0.2014835774898529,
-0.3653983473777771,
0.00787309929728508,
-0.20443381369113922,
0.0160125270485878,
-0.21197816729545593,
0.06380987167358398,
-0.0006619822233915329,
0.23090186715126038,
0.4811113774776459,
0.048551045358181,
0.29853034019470215,
0.14855611324310303,
-0.22674460709095,
-0.39143118262290955,
-0.3346387445926666,
-0.4480559825897217,
0.5141367316246033,
0.0008883923292160034,
0.35583728551864624,
-0.0736197978258133,
-0.016147945076227188,
-0.20331797003746033,
0.26329535245895386,
0.07630474120378494,
-0.567011833190918,
-0.12252277880907059,
0.14403553307056427,
-0.06431224942207336,
0.22052468359470367,
0.33339232206344604,
0.3965953588485718,
0.03981892764568329,
0.14264866709709167,
-0.5763707160949707,
-0.1923418939113617,
0.2730618417263031,
-0.1571471393108368,
-0.13601738214492798,
-0.14894311130046844,
0.5193384885787964,
0.08836723119020462,
-0.16550245881080627,
-0.5664249062538147,
-0.11722758412361145,
0.17736205458641052,
-0.08778554946184158,
-0.43016284704208374,
-0.03600580245256424,
0.024765094742178917,
0.27015894651412964,
-0.15418341755867004,
0.18545030057430267,
-0.1131296381354332,
-0.49372193217277527,
-0.08876629173755646,
-0.30926769971847534
] |
https://github.com/huggingface/datasets/issues/4480 | Bigbench tensorflow GPU dependency | Solved.
Yes it works on colab, and somehow magically on my machine too now. hmm not sure what was wrong before I had used a fresh venv both times with just the dataloading code, and tried multiple times. (maybe just a wrong tensorflow version got mixed up somehow) The tensorflow call seems to come from the bigbench side anyway.
about bigbench pypi version update, I opened an issue over there https://github.com/google/BIG-bench/issues/846
anyway closing this now. If anyone else has the same problem can re-open. | ## Describe the bug
Loading bigbech
```py
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
tries to use gpu and fails with OOM with the following error
```
Downloading and preparing dataset bigbench/swedish_to_german_proverbs (download: Unknown size, generated: 68.92 KiB, post-processed: Unknown size, total: 68.92 KiB) to /home/ceyda/.cache/huggingface/datasets/bigbench/swedish_to_german_proverbs/1.0.0/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0...
Generating default split: 0%| | 0/72 [00:00<?, ? examples/s]2022-06-13 14:11:04.154469: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-06-13 14:11:05.133600: F tensorflow/core/platform/statusor.cc:33] Attempting to fetch value instead of handling error INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 3: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 25396838400
Aborted (core dumped)
```
I think this is because bigbench dependency (below) installs tensorflow (GPU version) and dataloading tries to use GPU as default.
`pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz`
while just doing 'pip install bigbench' results in following error
```
File "/home/ceyda/.local/lib/python3.7/site-packages/datasets/load.py", line 109, in import_main_class
module = importlib.import_module(module_path)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 118, in <module>
class Bigbench(datasets.GeneratorBasedBuilder):
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 127, in Bigbench
BigBenchConfig(name=name, version=datasets.Version("1.0.0")) for name in bb_utils.get_all_json_task_names()
AttributeError: module 'bigbench.api.util' has no attribute 'get_all_json_task_names'
```
## Steps to avoid the bug
Not ideal but can solve with (since I don't really use tensorflow elsewhere)
`pip uninstall tensorflow`
`pip install tensorflow-cpu`
## Environment info
- datasets @ master
- Python version: 3.7
| 84 | Bigbench tensorflow GPU dependency
## Describe the bug
Loading bigbech
```py
from datasets import load_dataset
dataset = load_dataset("bigbench","swedish_to_german_proverbs")
```
tries to use gpu and fails with OOM with the following error
```
Downloading and preparing dataset bigbench/swedish_to_german_proverbs (download: Unknown size, generated: 68.92 KiB, post-processed: Unknown size, total: 68.92 KiB) to /home/ceyda/.cache/huggingface/datasets/bigbench/swedish_to_german_proverbs/1.0.0/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0...
Generating default split: 0%| | 0/72 [00:00<?, ? examples/s]2022-06-13 14:11:04.154469: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-06-13 14:11:05.133600: F tensorflow/core/platform/statusor.cc:33] Attempting to fetch value instead of handling error INTERNAL: failed initializing StreamExecutor for CUDA device ordinal 3: INTERNAL: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 25396838400
Aborted (core dumped)
```
I think this is because bigbench dependency (below) installs tensorflow (GPU version) and dataloading tries to use GPU as default.
`pip install bigbench@https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz`
while just doing 'pip install bigbench' results in following error
```
File "/home/ceyda/.local/lib/python3.7/site-packages/datasets/load.py", line 109, in import_main_class
module = importlib.import_module(module_path)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 118, in <module>
class Bigbench(datasets.GeneratorBasedBuilder):
File "/home/ceyda/.cache/huggingface/modules/datasets_modules/datasets/bigbench/7d2f6e537fa937dfaac8b1c1df782f2055071d3fd8e4f4ae93d28012a354ced0/bigbench.py", line 127, in Bigbench
BigBenchConfig(name=name, version=datasets.Version("1.0.0")) for name in bb_utils.get_all_json_task_names()
AttributeError: module 'bigbench.api.util' has no attribute 'get_all_json_task_names'
```
## Steps to avoid the bug
Not ideal but can solve with (since I don't really use tensorflow elsewhere)
`pip uninstall tensorflow`
`pip install tensorflow-cpu`
## Environment info
- datasets @ master
- Python version: 3.7
Solved.
Yes it works on colab, and somehow magically on my machine too now. hmm not sure what was wrong before I had used a fresh venv both times with just the dataloading code, and tried multiple times. (maybe just a wrong tensorflow version got mixed up somehow) The tensorflow call seems to come from the bigbench side anyway.
about bigbench pypi version update, I opened an issue over there https://github.com/google/BIG-bench/issues/846
anyway closing this now. If anyone else has the same problem can re-open. | [
-0.2978525459766388,
-0.26817411184310913,
-0.07095292210578918,
0.27338606119155884,
0.11652650684118271,
-0.19607090950012207,
0.18151375651359558,
0.31028833985328674,
0.41639018058776855,
0.09090413898229599,
0.4150956869125366,
0.24147586524486542,
0.17177844047546387,
0.19702059030532837,
0.049180176109075546,
-0.09048743546009064,
0.025415629148483276,
0.20439815521240234,
-0.3586907684803009,
-0.20045575499534607,
-0.25720953941345215,
0.14879660308361053,
-0.1773633360862732,
0.11959225684404373,
-0.20931211113929749,
-0.11506197601556778,
0.1706707626581192,
0.04776926711201668,
-0.20709891617298126,
0.09262877702713013,
0.11968474090099335,
-0.17174501717090607,
0.0018240436911582947,
0.5643149018287659,
-0.00011159082350786775,
-0.10134610533714294,
-0.04936058819293976,
-0.057393014430999756,
0.08624926209449768,
-0.32906073331832886,
-0.12473932653665543,
-0.40793588757514954,
-0.19566945731639862,
-0.2049553394317627,
0.1057611033320427,
-0.2820264995098114,
0.08897575736045837,
-0.24833117425441742,
0.22853554785251617,
0.4700741767883301,
0.1560889333486557,
0.0579998716711998,
0.04398765787482262,
-0.17041420936584473,
0.07842971384525299,
-0.09241318702697754,
-0.1305903047323227,
0.37825462222099304,
0.25345706939697266,
-0.2873881757259369,
-0.18301403522491455,
0.23757876455783844,
0.07404796779155731,
0.05642802640795708,
-0.09877970069646835,
-0.07103510200977325,
0.42442673444747925,
-0.49152424931526184,
0.15796802937984467,
0.07330388575792313,
-0.0708698108792305,
-0.2037331461906433,
-0.18026161193847656,
-0.13835425674915314,
0.10159088671207428,
-0.4721689522266388,
0.3868112564086914,
0.40875744819641113,
-0.3095889091491699,
0.12285442650318146,
0.18048281967639923,
-0.2498025894165039,
-0.18578137457370758,
0.22711080312728882,
-0.2544079124927521,
0.37240228056907654,
0.04145702347159386,
0.11372129619121552,
0.01481550931930542,
0.1165640726685524,
0.04622700810432434,
-0.05443456023931503,
0.031086359173059464,
-0.04926219582557678,
-0.3816725015640259,
0.013495668768882751,
-0.018298551440238953,
-0.29741162061691284,
0.13016724586486816,
0.19654348492622375,
0.18692687153816223,
0.18866580724716187,
-0.15230417251586914,
0.08498573303222656,
-0.021847758442163467,
0.42930370569229126,
-0.2958287298679352,
-0.21750755608081818,
0.3280932903289795,
0.1820874959230423,
0.043388884514570236,
0.17612376809120178,
-0.0748131200671196,
-0.30569371581077576,
-0.2524651885032654,
-0.10224995762109756,
0.4987866282463074,
-0.19874504208564758,
-0.42466169595718384,
0.23077645897865295,
-0.15118171274662018,
0.22923824191093445,
0.17370811104774475,
0.43406954407691956,
-0.2833150625228882,
0.5174933671951294,
0.19728676974773407,
0.196671724319458,
-0.16064128279685974,
-0.2951120138168335,
-0.06391339004039764,
-0.002583790570497513,
0.00013250485062599182,
0.0631430521607399,
0.055705476552248,
-0.20769867300987244,
0.47197645902633667,
0.32141372561454773,
0.29075145721435547,
-0.4080052077770233,
0.20918172597885132,
-0.29775944352149963,
0.003668457269668579,
0.2357083112001419,
-0.16598646342754364,
0.03154604136943817,
0.2880193591117859,
0.09469600021839142,
0.10280326753854752,
0.12320481240749359,
-0.14011797308921814,
-0.3067120909690857,
-0.2651575207710266,
0.2123563438653946,
-0.0037247315049171448,
0.13087673485279083,
-0.3174832761287689,
0.05986819043755531,
0.16747304797172546,
0.10813595354557037,
0.07554697245359421,
-0.29111045598983765,
-0.21589869260787964,
-0.06426691263914108,
0.16118310391902924,
-0.13349400460720062,
-0.12247401475906372,
-0.15954922139644623,
0.39191770553588867,
-0.07702645659446716,
0.1262359321117401,
0.3271734118461609,
-0.2263510525226593,
0.11950312554836273,
-0.09345367550849915,
-0.5156657099723816,
0.33847570419311523,
-0.21732686460018158,
-0.8058139085769653,
0.22448797523975372,
-0.3376767635345459,
0.11399691551923752,
0.17608347535133362,
0.14493021368980408,
0.12228673696517944,
0.15113294124603271,
0.27687403559684753,
0.4289814829826355,
0.001959696412086487,
0.03895863890647888,
-0.30960068106651306,
-0.33695507049560547,
-0.2246938794851303,
0.252631276845932,
0.4612511098384857,
0.21391186118125916,
-0.15809151530265808,
0.05236351490020752,
0.29279056191444397,
-0.019621189683675766,
-0.08450635522603989,
0.06587056070566177,
0.4673035442829132,
-0.3600335121154785,
0.1082238107919693,
0.14331522583961487,
-0.19948303699493408,
0.15203812718391418,
-0.17942339181900024,
0.2122887670993805,
-0.0551835298538208,
-0.056391097605228424,
-0.07877947390079498,
0.15694165229797363,
0.010235197842121124,
-0.03767738118767738,
0.044757962226867676,
0.19840484857559204,
-0.12563538551330566,
-0.09518623352050781,
-0.17323830723762512,
0.48206380009651184,
-0.514723539352417,
0.06319941580295563,
0.09826353192329407,
0.061551474034786224,
-0.11265064030885696,
-0.14096854627132416,
0.04417049139738083,
-0.003259889781475067,
0.0032061338424682617,
-0.17952574789524078,
-0.17863729596138,
0.27926698327064514,
-0.0968216061592102,
-0.10362705588340759,
-0.3845274746417999,
0.29045307636260986,
0.39839237928390503,
-0.2345144897699356,
0.15976980328559875,
0.09962329268455505,
0.07153759896755219,
-0.1582641899585724,
0.19252365827560425,
0.33378592133522034,
0.2406284362077713,
0.11273159831762314,
-0.04740336537361145,
0.05459560453891754,
0.23717570304870605,
-0.10468235611915588,
0.017802255228161812,
-0.06495960801839828,
0.3957000970840454,
0.08946467936038971,
0.1933106780052185,
-0.09712345898151398,
-0.38570457696914673,
-0.13042309880256653,
0.5529273748397827,
0.20092745125293732,
0.26478898525238037,
-0.037912748754024506,
-0.11921193450689316,
-0.00911899097263813,
0.11126348376274109,
-0.14445769786834717,
0.5305057168006897,
0.04636899009346962,
-0.21101301908493042,
0.1750146895647049,
0.02723010629415512,
-0.10990878194570541,
0.07273854315280914,
0.07994642108678818,
0.30007538199424744,
-0.1216975525021553,
0.27288538217544556,
-0.10092375427484512,
0.046557724475860596,
0.07446718215942383,
0.3447238802909851,
0.1320357769727707,
-0.2136489599943161,
0.1797022819519043,
-0.0016827881336212158,
0.1190614327788353,
-0.2342870831489563,
0.07003457099199295,
-0.18363870680332184,
0.1307935118675232,
-0.0899117961525917,
0.5406391620635986,
0.22057119011878967,
0.30551090836524963,
0.26793497800827026,
0.3790443241596222,
0.0006521102041006088,
-0.3092452585697174,
0.13888400793075562,
-0.14063571393489838,
-0.24092569947242737,
0.03579723462462425,
0.3945968747138977,
-0.1577591598033905,
0.3326013684272766,
0.14782977104187012,
-0.2542077302932739,
-0.4130055010318756,
-0.18860286474227905,
0.13696661591529846,
-0.1052209883928299,
0.32032302021980286,
-0.020230568945407867,
0.06041457876563072,
0.20828542113304138,
-0.0345449261367321,
-0.07133569568395615,
-0.2549625635147095,
0.03012586571276188,
-0.14839597046375275,
-0.3336338698863983,
-0.0053336843848228455,
-0.19476419687271118,
-0.23039039969444275,
-0.11073211580514908,
-0.35884377360343933,
0.14343544840812683,
0.1541004180908203,
0.2591988146305084,
-0.12153153866529465,
0.3472854197025299,
0.24216552078723907,
0.47444820404052734,
0.18549929559230804,
-0.1466166228055954,
-0.29508176445961,
-0.04068061336874962,
-0.10817066580057144,
-0.4781765043735504,
0.07388682663440704,
0.05059991776943207,
0.44548848271369934,
0.046357203274965286,
-0.6878344416618347,
-0.04697687178850174,
-0.11059518158435822,
0.2113800346851349,
-0.23378732800483704,
-0.23857267200946808,
0.2347158044576645,
-0.24489179253578186,
-0.012738266959786415,
-0.2038482427597046,
-0.1789734661579132,
0.11765676736831665,
-0.009535755962133408,
0.4239046573638916,
0.19269371032714844,
0.4473213255405426,
0.3900439143180847,
0.6421478390693665,
0.007032101973891258,
-0.42495614290237427,
0.14574554562568665,
0.05645231157541275,
0.07819108664989471,
-0.09805762022733688,
-0.2466174215078354,
-0.12172538787126541,
-0.2139187455177307,
0.10430608689785004,
0.011067986488342285,
-0.33592841029167175,
-0.16405892372131348,
-0.19117745757102966,
0.03937452659010887,
0.03547229617834091,
-0.025728626176714897,
0.12976539134979248,
-0.3722219467163086,
-0.06872718781232834,
0.012046024203300476,
0.06420927494764328,
-0.3005940020084381,
0.19470396637916565,
0.20839408040046692,
-0.1674734503030777,
-0.21516162157058716,
-0.07158420979976654,
-0.21007908880710602,
-0.1691400110721588,
-0.22356244921684265,
0.2539602518081665,
-0.16179011762142181,
0.24294163286685944,
0.017231736332178116,
0.11801367253065109,
0.07026150077581406,
-0.18692195415496826,
0.4715123176574707,
0.25667527318000793,
-0.08515280485153198,
-0.04795525595545769,
-0.23489272594451904,
-0.2662180960178375,
-0.035030629485845566,
-0.20547665655612946,
0.21616530418395996,
0.44712135195732117,
0.2877715826034546,
-0.22707420587539673,
-0.22607682645320892,
0.1971055567264557,
-0.1503215730190277,
-0.08969083428382874,
-0.13727304339408875,
-0.22927670180797577,
-0.31307804584503174,
-0.18631453812122345,
0.20788684487342834,
0.04835212230682373,
0.18316513299942017,
-0.22515439987182617,
0.24033083021640778,
-0.2736169397830963,
-0.014010200276970863,
0.10435385257005692,
-0.040190670639276505,
-0.03020073100924492,
-0.09700825065374374,
0.07848404347896576,
-0.24987247586250305,
0.22749124467372894,
0.3605533838272095,
0.37624987959861755,
0.3320038318634033,
-0.314296692609787,
0.24371543526649475,
0.2766832113265991,
0.23937678337097168,
0.37946441769599915,
-0.1933271437883377,
-0.03013046830892563,
0.02086062729358673,
0.08967094868421555,
-0.16231019794940948,
0.6780010461807251,
0.43822532892227173,
0.19377663731575012,
-0.4094429314136505,
-0.14926861226558685,
0.7318353056907654,
0.11334781348705292,
-0.18067041039466858,
0.6362980604171753,
-0.08356228470802307,
-0.37308645248413086,
0.22659359872341156,
0.1115599125623703,
0.7767831087112427,
0.03980318084359169,
-0.027457240968942642,
0.46009963750839233,
-0.031373314559459686,
0.514549732208252,
-0.21367967128753662,
0.27258574962615967,
-0.2324061393737793,
-0.5356913805007935,
-0.0010426342487335205,
-0.26027894020080566,
0.34395718574523926,
-0.15044249594211578,
-0.22484710812568665,
0.12623804807662964,
0.14268551766872406,
0.10788628458976746,
0.279628187417984,
0.4294620156288147,
-0.18740785121917725,
-0.39465516805648804,
-0.26714229583740234,
0.09722189605236053,
-0.1305055320262909,
0.2892015278339386,
-0.22391527891159058,
-0.11114200949668884,
-0.042193248867988586,
-0.14795377850532532,
-0.32037824392318726,
0.16587042808532715,
-0.6732578277587891,
0.2368549108505249,
-0.3649909198284149,
-0.13392367959022522,
0.16278128325939178,
0.07553769648075104,
0.30127254128456116,
0.15280885994434357,
-0.16859282553195953,
0.20109033584594727,
0.26983845233917236,
-0.05442236363887787,
0.42037662863731384,
-0.09431097656488419,
0.4340197443962097,
-0.21718209981918335,
-0.11404373496770859,
0.32360315322875977,
-0.15515805780887604,
0.09789340198040009,
0.10487744212150574,
-0.216990664601326,
-0.2149166613817215,
0.038099028170108795,
-0.5245623588562012,
0.12457606196403503,
-0.031292498111724854,
-0.16311229765415192,
0.15569426119327545,
-0.09858445823192596,
-0.2783777415752411,
-0.07592501491308212,
-0.1459702104330063,
-0.4409407675266266,
-0.14680816233158112,
0.41833171248435974,
0.209189772605896,
-0.3658074140548706,
0.4613730311393738,
0.1607571393251419,
0.20766547322273254,
-0.19283825159072876,
-0.19495975971221924,
0.17476631700992584,
-0.22147321701049805,
0.01281564962118864,
-0.1972203552722931,
-0.3956751227378845,
0.016111180186271667,
0.07814222574234009,
0.16668766736984253,
0.04524308443069458,
-0.08979395031929016,
-0.23112112283706665,
-0.43653687834739685,
0.20569266378879547,
-0.3539130985736847,
-0.02120046690106392,
-0.03271716088056564,
0.29202309250831604,
-0.18779918551445007,
0.18980160355567932,
-0.29561641812324524,
0.32817214727401733,
-0.1292448341846466,
0.09488792717456818,
-0.08326933532953262,
0.1670200228691101,
0.23515823483467102,
0.21952539682388306,
0.061002880334854126,
0.2618492841720581,
-0.10073530673980713,
-0.2122821807861328,
-0.08832928538322449,
0.13147999346256256,
0.07050010561943054,
-0.018896516412496567,
0.11588744819164276,
-0.4013354182243347,
-0.11278189718723297,
0.08197488635778427,
0.37444061040878296,
0.23063814640045166,
-0.19813959300518036,
-0.31900760531425476,
0.11901445686817169,
0.3793546259403229,
-0.09954565763473511,
-0.1125650405883789,
-0.20313265919685364,
-0.06014835834503174,
0.1861625760793686,
0.25968262553215027,
0.008543897420167923,
-0.023418325930833817,
-0.39882519841194153,
0.061660222709178925,
0.07245075702667236,
0.06760470569133759,
0.25648191571235657,
-0.37660282850265503,
-0.10194016993045807,
0.15051892399787903,
-0.010991227813065052,
0.10320543497800827,
-0.2462727427482605,
0.07836108654737473,
-0.15528464317321777,
0.2364191710948944,
-0.19011327624320984,
-0.01914667710661888,
0.06882038712501526,
-0.12336886674165726,
0.04228148236870766,
0.48362377285957336,
0.43082210421562195,
0.0502958744764328,
-0.10043467581272125,
0.08233220875263214,
0.03451286256313324,
-0.15302735567092896,
0.2590486407279968,
-0.0014444179832935333,
0.045307982712984085,
0.08441469073295593,
0.13277776539325714,
0.2539620101451874,
0.4060738980770111,
0.3007388710975647,
-0.25660982728004456,
0.295646071434021,
0.21382534503936768,
0.1471385359764099,
0.17475971579551697,
-0.13734300434589386,
-0.48914891481399536,
0.22911258041858673,
-0.41265833377838135,
0.15186724066734314,
-0.270769864320755,
0.11079184710979462,
-0.04502468556165695,
-0.09335769712924957,
-0.37388303875923157,
0.20065051317214966,
-0.22790029644966125,
0.13479137420654297,
-0.23805974423885345,
-0.05977126210927963,
0.11313816905021667,
-0.09597007930278778,
0.0770266205072403,
-0.19481675326824188,
0.16501609981060028,
0.2861839830875397,
-0.28836774826049805,
0.12795771658420563,
-0.43125757575035095,
0.2453123927116394,
0.08051308989524841,
-0.25589126348495483,
0.22716523706912994,
0.08986081182956696,
-0.08911032974720001,
-0.15639004111289978,
0.27682533860206604,
0.4981370270252228,
0.45029765367507935,
-0.22610795497894287,
0.0025445460341870785,
0.042527612298727036,
-0.046850740909576416,
-0.03653554245829582,
0.06206061318516731,
0.3581424951553345,
0.40264278650283813,
-0.0437154546380043,
0.12646040320396423,
-0.17512916028499603,
-0.12049485743045807,
0.19228295981884003,
0.25154197216033936,
-0.32155245542526245,
0.08286316692829132,
-0.19754670560359955,
-0.16807858645915985,
-0.2686665952205658,
0.058454789221286774,
-0.09599334001541138,
-0.11712963879108429,
0.5524492263793945,
-0.06040016934275627,
0.10915803164243698,
0.0689765140414238,
0.07817215472459793,
-0.30016830563545227,
0.39378824830055237,
-0.11639109253883362,
0.29761096835136414,
-0.465150386095047,
-0.1316382735967636,
-0.19056588411331177,
0.31292253732681274,
0.07672756910324097,
0.15351644158363342,
0.08460163325071335,
0.18905796110630035,
0.09369463473558426,
0.018032120540738106,
-0.22820787131786346,
-0.07220927625894547,
0.2641354203224182,
-0.06629958003759384,
-0.5283517241477966,
-0.06115594133734703,
-0.2400379329919815,
0.08212990313768387,
0.2014835774898529,
-0.3653983473777771,
0.00787309929728508,
-0.20443381369113922,
0.0160125270485878,
-0.21197816729545593,
0.06380987167358398,
-0.0006619822233915329,
0.23090186715126038,
0.4811113774776459,
0.048551045358181,
0.29853034019470215,
0.14855611324310303,
-0.22674460709095,
-0.39143118262290955,
-0.3346387445926666,
-0.4480559825897217,
0.5141367316246033,
0.0008883923292160034,
0.35583728551864624,
-0.0736197978258133,
-0.016147945076227188,
-0.20331797003746033,
0.26329535245895386,
0.07630474120378494,
-0.567011833190918,
-0.12252277880907059,
0.14403553307056427,
-0.06431224942207336,
0.22052468359470367,
0.33339232206344604,
0.3965953588485718,
0.03981892764568329,
0.14264866709709167,
-0.5763707160949707,
-0.1923418939113617,
0.2730618417263031,
-0.1571471393108368,
-0.13601738214492798,
-0.14894311130046844,
0.5193384885787964,
0.08836723119020462,
-0.16550245881080627,
-0.5664249062538147,
-0.11722758412361145,
0.17736205458641052,
-0.08778554946184158,
-0.43016284704208374,
-0.03600580245256424,
0.024765094742178917,
0.27015894651412964,
-0.15418341755867004,
0.18545030057430267,
-0.1131296381354332,
-0.49372193217277527,
-0.08876629173755646,
-0.30926769971847534
] |
https://github.com/huggingface/datasets/issues/4478 | Dataset slow during model training | Hi ! cc @Rocketknight1 maybe you know better ?
I'm not too familiar with `tf.data.experimental.save`. Note that `datasets` uses memory mapping, so depending on your hardware and the disk you are using you can expect performance differences with a dataset loaded in RAM | ## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
| 43 | Dataset slow during model training
## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
Hi ! cc @Rocketknight1 maybe you know better ?
I'm not too familiar with `tf.data.experimental.save`. Note that `datasets` uses memory mapping, so depending on your hardware and the disk you are using you can expect performance differences with a dataset loaded in RAM | [
-0.3647408187389374,
-0.04376630485057831,
-0.051781658083200455,
0.16746309399604797,
0.4417370557785034,
0.3758905231952667,
0.13192279636859894,
0.5064499974250793,
-0.27916309237480164,
-0.0450834184885025,
0.006873017176985741,
0.39136049151420593,
-0.28453540802001953,
-0.07079442590475082,
-0.08689876645803452,
-0.15684649348258972,
0.11042121052742004,
-0.11886776983737946,
-0.0989079475402832,
-0.004865527153015137,
-0.05940268933773041,
-0.1480148285627365,
0.10876086354255676,
0.017722226679325104,
-0.31001996994018555,
-0.1134466752409935,
0.07921766489744186,
-0.041132085025310516,
0.0695480927824974,
-0.25585025548934937,
0.021925324574112892,
-0.11291106045246124,
-0.08243894577026367,
0.37769365310668945,
-0.00011354033631505445,
0.2830536365509033,
0.0016603171825408936,
0.21132545173168182,
-0.27777284383773804,
0.3174874484539032,
0.04907158017158508,
-0.1534266471862793,
-0.1241549551486969,
0.03328103572130203,
-0.24165332317352295,
-0.17905177175998688,
-0.12035471200942993,
-0.15587550401687622,
0.17634464800357819,
0.38618186116218567,
0.2069033980369568,
0.160476416349411,
-0.4111673831939697,
0.10540078580379486,
-0.17679932713508606,
0.3275949954986572,
-0.35568612813949585,
0.13077513873577118,
0.02538730949163437,
-0.18181605637073517,
-0.0038003772497177124,
0.24342463910579681,
-0.01672479324042797,
-0.04647274687886238,
0.3426099717617035,
0.07634057849645615,
-0.17589589953422546,
-0.3136589229106903,
0.09004564583301544,
0.20574820041656494,
0.04314501956105232,
0.02786494977772236,
-0.382047176361084,
-0.47771182656288147,
-0.09372592717409134,
-0.23954519629478455,
0.051005180925130844,
-0.12998391687870026,
0.05427400395274162,
-0.030196037143468857,
-0.4409274160861969,
0.04205135256052017,
0.06821906566619873,
0.14314979314804077,
-0.060143452137708664,
0.04593675956130028,
0.23361630737781525,
0.020483504980802536,
0.18119798600673676,
-0.10117554664611816,
-0.0012954771518707275,
-0.341593474149704,
0.07847853004932404,
0.20121514797210693,
-0.4574773907661438,
0.0002273358404636383,
0.12706027925014496,
-0.10741133242845535,
0.04247679561376572,
-0.20867259800434113,
0.0908508226275444,
0.11662469059228897,
-0.13527467846870422,
-0.2633756101131439,
-0.024413228034973145,
0.05874558910727501,
-0.4084140658378601,
0.279780775308609,
0.14769509434700012,
0.05576474592089653,
-0.214194193482399,
-0.06394003331661224,
0.0036081583239138126,
-0.04840381443500519,
0.204321026802063,
-0.18674370646476746,
0.16912971436977386,
0.008734185248613358,
-0.3945755958557129,
-0.011297549121081829,
-0.16769279539585114,
-0.09654450416564941,
0.05792027711868286,
0.008094057440757751,
-0.29484114050865173,
0.1700621247291565,
-0.07675526291131973,
-0.03518696129322052,
-0.30960139632225037,
-0.007441958412528038,
-0.2699562907218933,
-0.14504513144493103,
-0.3195432126522064,
0.03836149722337723,
-0.13758161664009094,
-0.007248787209391594,
0.01752563938498497,
0.22608248889446259,
-0.05562429130077362,
0.12103331089019775,
0.20431609451770782,
-0.33794111013412476,
-0.0676329955458641,
0.18666402995586395,
-0.47009560465812683,
0.09383463859558105,
0.19704949855804443,
0.24051280319690704,
-0.01100718230009079,
0.09464409947395325,
-0.46250903606414795,
-0.3311881422996521,
0.045293934643268585,
0.13796870410442352,
0.0033272821456193924,
-0.029986605048179626,
-0.5655084252357483,
0.7123626470565796,
0.12492558360099792,
0.003634326159954071,
-0.1478494107723236,
-0.22269241511821747,
-0.6932830214500427,
-0.056065816432237625,
0.24310746788978577,
0.1864217221736908,
-0.45076656341552734,
-0.07341919094324112,
0.14092323184013367,
0.12124569714069366,
0.21632987260818481,
0.4072236120700836,
-0.30090123414993286,
0.35735902190208435,
-0.17417989671230316,
-0.03925244137644768,
0.16551396250724792,
-0.019729051738977432,
-0.4775095582008362,
0.2144935131072998,
-0.3018958866596222,
0.4390661418437958,
-0.11868999153375626,
0.18745063245296478,
0.022830575704574585,
-0.28344741463661194,
0.00021001696586608887,
0.49960213899612427,
-0.08872023969888687,
0.11948021501302719,
-0.26680243015289307,
-0.12693189084529877,
0.18402084708213806,
0.3140494227409363,
-0.02445826306939125,
0.12656402587890625,
0.1483263373374939,
0.16799509525299072,
0.30640482902526855,
-0.37289389967918396,
-0.19316400587558746,
0.23461411893367767,
-0.06630648672580719,
0.03694147989153862,
0.07156673818826675,
0.11754661053419113,
-0.255788117647171,
0.5054358839988708,
0.22255605459213257,
0.08030697703361511,
-0.02320660650730133,
0.019054584205150604,
0.13633942604064941,
-0.15110012888908386,
-0.23695223033428192,
-0.004843477159738541,
0.02497047185897827,
-0.08142432570457458,
-0.09312441945075989,
0.33272305130958557,
0.0381649024784565,
0.4017443060874939,
-0.2882651090621948,
-0.028769681230187416,
-0.2852039337158203,
0.1911483108997345,
0.3526584506034851,
-0.23836280405521393,
-0.14179959893226624,
-0.08790067583322525,
-0.16641750931739807,
-0.1338602751493454,
-0.353346586227417,
0.24615052342414856,
0.11380819976329803,
0.4585370421409607,
-0.20342770218849182,
0.2124374955892563,
0.270781010389328,
-0.21700653433799744,
0.20686814188957214,
0.1335594803094864,
-0.18457812070846558,
-0.1690366268157959,
0.036078065633773804,
0.47911977767944336,
0.23098047077655792,
0.3283066153526306,
-0.005326110869646072,
-0.2921406328678131,
-0.004494290798902512,
0.1756599396467209,
0.19691875576972961,
0.15941455960273743,
0.36353713274002075,
0.007261360064148903,
0.2883606255054474,
0.2143779844045639,
-0.24388256669044495,
0.20339848101139069,
0.3737528622150421,
-0.07319463789463043,
-0.12986671924591064,
0.3533185124397278,
-0.09961185604333878,
-0.24024701118469238,
-0.1929662525653839,
0.14746889472007751,
0.560509443283081,
0.06443322449922562,
0.012254856526851654,
0.04007161036133766,
0.007338918745517731,
-0.15950188040733337,
0.16248475015163422,
0.030656810849905014,
0.3856538236141205,
0.12741625308990479,
0.3744145631790161,
0.18438465893268585,
-0.42059656977653503,
-0.11166621744632721,
0.02007703296840191,
0.4746990203857422,
-0.19371163845062256,
0.33428314328193665,
-0.27232763171195984,
0.1885618269443512,
0.04718151316046715,
0.3330180048942566,
-0.012039102613925934,
-0.13949985802173615,
-0.2559283971786499,
0.005247786641120911,
0.20535439252853394,
-0.07066389173269272,
-0.21776403486728668,
0.007748007774353027,
0.25891321897506714,
0.05113636702299118,
-0.19515641033649445,
-0.058099936693906784,
-0.34780368208885193,
0.04480506852269173,
0.28962498903274536,
-0.20804165303707123,
0.15573403239250183,
0.04164813458919525,
-0.071760393679142,
0.03120766207575798,
-0.449128121137619,
-0.09990163147449493,
-0.25664156675338745,
0.3083757758140564,
-0.024773932993412018,
0.17787645757198334,
-0.11377174407243729,
0.053014107048511505,
0.22928963601589203,
-0.00659804604947567,
-0.19834721088409424,
0.16123303771018982,
-0.19951076805591583,
0.07020354270935059,
0.08288982510566711,
0.005581669509410858,
-0.247634157538414,
0.047074537724256516,
0.11082752048969269,
-0.11224471032619476,
0.009636849164962769,
0.6508384943008423,
0.2198023796081543,
0.17299720644950867,
0.050897128880023956,
0.021607588976621628,
-0.1103799119591713,
-0.47767579555511475,
0.378994882106781,
0.0839560478925705,
-0.2168004959821701,
-0.3401903510093689,
0.09652062505483627,
-0.1479853093624115,
0.22525593638420105,
-0.6422485113143921,
-0.13467584550380707,
-0.4151197671890259,
0.08830825984477997,
-0.3408629298210144,
-0.44412297010421753,
-0.12453040480613708,
-0.016429170966148376,
-0.07746607065200806,
-0.10937854647636414,
0.07258865237236023,
-0.032655589282512665,
0.047966405749320984,
0.1175059974193573,
-0.059709228575229645,
0.5423569679260254,
0.37399259209632874,
0.6829426884651184,
0.06540769338607788,
-0.41378268599510193,
0.07599298655986786,
-0.06067751348018646,
0.013719290494918823,
-0.2405988872051239,
-0.4295036792755127,
0.20688781142234802,
-0.16728612780570984,
-0.0017616674304008484,
-0.05754803121089935,
-0.07831716537475586,
-0.06291718035936356,
0.10501812398433685,
0.1534336805343628,
0.41738519072532654,
-0.034212466329336166,
0.014023511670529842,
-0.317334920167923,
0.38170233368873596,
0.05048534646630287,
0.18128472566604614,
-0.11428152024745941,
-0.12337028235197067,
0.2604063153266907,
-0.16471676528453827,
0.24687331914901733,
-0.2016175389289856,
-0.3615361452102661,
0.03488028421998024,
-0.5283340811729431,
0.10188348591327667,
-0.018858177587389946,
0.1724637746810913,
-0.2222948670387268,
0.26320475339889526,
0.2990264892578125,
0.21861670911312103,
0.6646530628204346,
-0.1932387799024582,
-0.0051904283463954926,
0.022333011031150818,
-0.2758825719356537,
-0.3769177794456482,
-0.1757693588733673,
0.023144137114286423,
-0.11907272785902023,
-0.017797190696001053,
0.7363342642784119,
0.08631346374750137,
-0.38804614543914795,
0.14426711201667786,
0.09381768852472305,
-0.12405984103679657,
0.14691177010536194,
-0.22348834574222565,
-0.21480897068977356,
0.19172720611095428,
0.08012135326862335,
-0.09205285459756851,
-0.09810617566108704,
-0.08579933643341064,
-0.069904625415802,
-0.1648184061050415,
0.17916804552078247,
0.11377324163913727,
0.03180774673819542,
0.10575086623430252,
0.3254680335521698,
0.439555823802948,
0.1791742742061615,
-0.0934743583202362,
0.284373939037323,
0.37683114409446716,
0.04729173332452774,
-0.6036043763160706,
-0.1879514455795288,
0.14307869970798492,
-0.018154673278331757,
0.45043498277664185,
-0.09241718798875809,
0.09989078342914581,
-0.13744041323661804,
0.2325015366077423,
-0.24173954129219055,
0.32526659965515137,
0.7384576797485352,
-0.009279489517211914,
-0.20711694657802582,
-0.3092392086982727,
0.4456075131893158,
0.25580742955207825,
-0.07642540335655212,
-0.0006220601499080658,
-0.2582888603210449,
-0.3060052990913391,
0.22649885714054108,
0.47111788392066956,
0.6351697444915771,
-0.20403285324573517,
0.1872374415397644,
0.2317115068435669,
-0.15500792860984802,
0.17994265258312225,
-0.026899809017777443,
-0.0764138400554657,
-0.12417095899581909,
-0.5130962133407593,
-0.00830647349357605,
-0.18045800924301147,
0.22043028473854065,
0.03290320560336113,
0.05532439425587654,
0.030109794810414314,
-0.2292485386133194,
-0.0444030724465847,
0.019287560135126114,
0.14670278131961823,
0.2711910903453827,
-0.11876222491264343,
-0.18897444009780884,
0.22888973355293274,
-0.22691194713115692,
0.03956620767712593,
0.03196492791175842,
-0.22486215829849243,
-0.3606634736061096,
0.3396947979927063,
-0.1367543488740921,
0.009120497852563858,
-0.3930756449699402,
0.2589051127433777,
-0.0633884072303772,
-0.4486733675003052,
0.15264737606048584,
0.3468887209892273,
0.310763955116272,
-0.03993656858801842,
-0.1057492196559906,
0.31398242712020874,
-0.16449838876724243,
0.34958720207214355,
0.2788248360157013,
-0.5106822848320007,
0.3263813257217407,
0.08082674443721771,
0.015370659530162811,
-0.13523879647254944,
-0.06271237134933472,
-0.02777271717786789,
-0.35159868001937866,
-0.18196795880794525,
0.01788100227713585,
-0.024787601083517075,
-0.3856993317604065,
-0.07233098149299622,
0.17867673933506012,
-0.11960659921169281,
0.14851033687591553,
0.15495681762695312,
0.09821485728025436,
0.2897087037563324,
0.02430455945432186,
-0.45306530594825745,
0.014738905243575573,
0.2967528998851776,
0.0001765228807926178,
0.15752968192100525,
0.5498745441436768,
0.06360484659671783,
-0.1217408999800682,
0.013836141675710678,
0.45008450746536255,
0.45371904969215393,
-0.41812947392463684,
0.15085488557815552,
-0.19236263632774353,
0.31873059272766113,
-0.008098335936665535,
-0.0590854249894619,
-0.07575267553329468,
-0.35995566844940186,
-0.09062711894512177,
0.047108180820941925,
-0.24062158167362213,
0.09516800940036774,
-0.01192454993724823,
0.14058363437652588,
-0.3097100853919983,
0.11680705845355988,
-0.1427503526210785,
0.24506932497024536,
-0.26489636301994324,
0.024597734212875366,
0.16334082186222076,
0.17765094339847565,
0.040566734969615936,
-0.07828932255506516,
0.16445286571979523,
-0.15607129037380219,
0.09512302279472351,
-0.00011583790183067322,
-0.13183876872062683,
-0.21275505423545837,
-0.16637402772903442,
0.11512649059295654,
-0.030438877642154694,
-0.3126417100429535,
-0.007836217060685158,
-0.09545433521270752,
-0.17536748945713043,
-0.12062837183475494,
0.053376954048871994,
0.14103704690933228,
-0.11334636807441711,
-0.013296251185238361,
-0.009733285754919052,
-0.1449732482433319,
0.3976547122001648,
-0.057434871792793274,
-0.40691688656806946,
0.15330874919891357,
0.2741653621196747,
0.059947267174720764,
0.23367823660373688,
-0.24687659740447998,
-0.1783941686153412,
0.05969395861029625,
0.10326240211725235,
-0.0008848123252391815,
0.367503821849823,
-0.4077916741371155,
0.14131489396095276,
0.19809384644031525,
0.14122220873832703,
0.3028584122657776,
-0.19686158001422882,
-0.2804330289363861,
0.05136951431632042,
0.11775564402341843,
0.041850849986076355,
-0.3792490065097809,
0.35873836278915405,
0.050720881670713425,
-0.04394450783729553,
-0.030738092958927155,
0.104827880859375,
0.4251265525817871,
-0.34322333335876465,
0.00014984793961048126,
0.2245575487613678,
-0.11351947486400604,
0.08149231970310211,
0.5401894450187683,
0.21713964641094208,
0.1489720195531845,
0.08647210150957108,
-0.0958380401134491,
-0.0021290257573127747,
0.5435546040534973,
0.17776474356651306,
0.5282435417175293,
-0.07226007431745529,
0.30437010526657104,
0.014677569270133972,
-0.40560832619667053,
-0.04963718727231026,
0.20888680219650269,
-0.6677331328392029,
0.3132484257221222,
0.07468105852603912,
0.11106419563293457,
-0.0980328842997551,
-0.6949125528335571,
0.0028151962906122208,
0.37201759219169617,
-0.1132395789027214,
-0.16124029457569122,
-0.015823395922780037,
0.11288809031248093,
-0.1242261528968811,
0.32903897762298584,
-0.2780906856060028,
0.05281711369752884,
0.14830541610717773,
0.18361490964889526,
0.020846225321292877,
-0.053032152354717255,
-0.2688886523246765,
0.010319599881768227,
0.375169038772583,
0.03799755498766899,
0.14289142191410065,
-0.3114434480667114,
-0.09611664712429047,
0.034420572221279144,
0.39066556096076965,
0.17481182515621185,
0.21877068281173706,
-0.03771611303091049,
0.1216738224029541,
-0.00958341732621193,
-0.06838232278823853,
0.31697675585746765,
0.2443399280309677,
-0.08038142323493958,
0.06652996689081192,
0.09264744818210602,
-0.0008363230153918266,
-0.14598794281482697,
-0.08683204650878906,
-0.1494956761598587,
0.04704836755990982,
-0.5514954924583435,
0.18990382552146912,
-0.1535000205039978,
-0.06915058195590973,
-0.10090148448944092,
0.09884357452392578,
0.022734493017196655,
-0.13805842399597168,
0.6496283411979675,
-0.20686329901218414,
0.06342817842960358,
0.017290670424699783,
0.04272421449422836,
-0.13699720799922943,
0.5864679217338562,
0.2040669322013855,
0.0955943614244461,
-0.30179154872894287,
0.02499474585056305,
-0.3708067238330841,
-0.17189210653305054,
-0.38385331630706787,
0.2801108658313751,
0.2210298478603363,
-0.012314164079725742,
0.01185830682516098,
0.11153904348611832,
0.38726717233657837,
-0.07031667232513428,
0.025615144520998,
0.12681826949119568,
-0.28067949414253235,
0.04774131625890732,
-0.4546021819114685,
0.18110904097557068,
-0.21121665835380554,
-0.22298350930213928,
0.43942806124687195,
0.04528829827904701,
0.009804479777812958,
-0.15581895411014557,
-0.20614314079284668,
-0.05457413196563721,
0.45840007066726685,
0.49489331245422363,
0.14686642587184906,
0.1163720041513443,
0.04942786693572998,
-0.12108278274536133,
-0.15674155950546265,
-0.042414888739585876,
-0.09352967143058777,
0.3994751274585724,
-0.07263340055942535,
0.41131702065467834,
-0.07697279751300812,
-0.2495471090078354,
-0.04923643916845322,
0.14532122015953064,
0.2721770405769348,
-0.39323967695236206,
-0.36247366666793823,
0.14323799312114716,
0.1652245819568634,
0.3044595718383789,
0.18644888699054718,
0.3780202269554138,
0.21739831566810608,
-0.010635415092110634,
-0.3522007465362549,
-0.3335355818271637,
0.37149983644485474,
-0.14567804336547852,
-0.11021643877029419,
0.1722223311662674,
0.019775301218032837,
-0.07350490242242813,
0.1393044888973236,
-0.3916427493095398,
-0.211073637008667,
0.3593246340751648,
-0.06091754883527756,
-0.22147583961486816,
0.4532432556152344,
0.35368573665618896,
0.05046472325921059,
0.009802807122468948,
0.33104926347732544,
-0.22169595956802368,
-0.148225799202919,
0.32958441972732544,
0.04166896641254425
] |
https://github.com/huggingface/datasets/issues/4478 | Dataset slow during model training | Hi @lehrig, I suspect what's happening here is that our `to_tf_dataset()` method has some performance issues when streaming samples. This is usually not a problem, but they become apparent when streaming a vision dataset into a very small vision model, which will need a lot of sample throughput to saturate the GPU.
When you save a `tf.data.Dataset` with `tf.data.experimental.save`, all of the samples from the dataset (which are, in this case, batches of images), are saved to disk. When you load this saved dataset, you're effectively bypassing `to_tf_dataset()` entirely, which alleviates this performance bottleneck.
`to_tf_dataset()` is something we're actively working on overhauling right now - particularly for image datasets, we want to make it possible to access the underlying images with `tf.data` without going through the current layer of indirection with `Arrow`, which should massively improve simplicity and performance.
However, if you just want this to work quickly but without needing your save/load hack, my advice would be to simply load the dataset into memory if it's small enough to fit. Since all your samples have the same dimensions, you can do this simply with:
```
dataset = load_from_disk(prep_data_dir)
dataset = dataset.with_format("numpy")
data_in_memory = dataset[:]
```
Then you can simply do something like:
```
model.fit(data_in_memory["pixel_values"], data_in_memory["labels"])
``` | ## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
| 207 | Dataset slow during model training
## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
Hi @lehrig, I suspect what's happening here is that our `to_tf_dataset()` method has some performance issues when streaming samples. This is usually not a problem, but they become apparent when streaming a vision dataset into a very small vision model, which will need a lot of sample throughput to saturate the GPU.
When you save a `tf.data.Dataset` with `tf.data.experimental.save`, all of the samples from the dataset (which are, in this case, batches of images), are saved to disk. When you load this saved dataset, you're effectively bypassing `to_tf_dataset()` entirely, which alleviates this performance bottleneck.
`to_tf_dataset()` is something we're actively working on overhauling right now - particularly for image datasets, we want to make it possible to access the underlying images with `tf.data` without going through the current layer of indirection with `Arrow`, which should massively improve simplicity and performance.
However, if you just want this to work quickly but without needing your save/load hack, my advice would be to simply load the dataset into memory if it's small enough to fit. Since all your samples have the same dimensions, you can do this simply with:
```
dataset = load_from_disk(prep_data_dir)
dataset = dataset.with_format("numpy")
data_in_memory = dataset[:]
```
Then you can simply do something like:
```
model.fit(data_in_memory["pixel_values"], data_in_memory["labels"])
``` | [
-0.3647408187389374,
-0.04376630485057831,
-0.051781658083200455,
0.16746309399604797,
0.4417370557785034,
0.3758905231952667,
0.13192279636859894,
0.5064499974250793,
-0.27916309237480164,
-0.0450834184885025,
0.006873017176985741,
0.39136049151420593,
-0.28453540802001953,
-0.07079442590475082,
-0.08689876645803452,
-0.15684649348258972,
0.11042121052742004,
-0.11886776983737946,
-0.0989079475402832,
-0.004865527153015137,
-0.05940268933773041,
-0.1480148285627365,
0.10876086354255676,
0.017722226679325104,
-0.31001996994018555,
-0.1134466752409935,
0.07921766489744186,
-0.041132085025310516,
0.0695480927824974,
-0.25585025548934937,
0.021925324574112892,
-0.11291106045246124,
-0.08243894577026367,
0.37769365310668945,
-0.00011354033631505445,
0.2830536365509033,
0.0016603171825408936,
0.21132545173168182,
-0.27777284383773804,
0.3174874484539032,
0.04907158017158508,
-0.1534266471862793,
-0.1241549551486969,
0.03328103572130203,
-0.24165332317352295,
-0.17905177175998688,
-0.12035471200942993,
-0.15587550401687622,
0.17634464800357819,
0.38618186116218567,
0.2069033980369568,
0.160476416349411,
-0.4111673831939697,
0.10540078580379486,
-0.17679932713508606,
0.3275949954986572,
-0.35568612813949585,
0.13077513873577118,
0.02538730949163437,
-0.18181605637073517,
-0.0038003772497177124,
0.24342463910579681,
-0.01672479324042797,
-0.04647274687886238,
0.3426099717617035,
0.07634057849645615,
-0.17589589953422546,
-0.3136589229106903,
0.09004564583301544,
0.20574820041656494,
0.04314501956105232,
0.02786494977772236,
-0.382047176361084,
-0.47771182656288147,
-0.09372592717409134,
-0.23954519629478455,
0.051005180925130844,
-0.12998391687870026,
0.05427400395274162,
-0.030196037143468857,
-0.4409274160861969,
0.04205135256052017,
0.06821906566619873,
0.14314979314804077,
-0.060143452137708664,
0.04593675956130028,
0.23361630737781525,
0.020483504980802536,
0.18119798600673676,
-0.10117554664611816,
-0.0012954771518707275,
-0.341593474149704,
0.07847853004932404,
0.20121514797210693,
-0.4574773907661438,
0.0002273358404636383,
0.12706027925014496,
-0.10741133242845535,
0.04247679561376572,
-0.20867259800434113,
0.0908508226275444,
0.11662469059228897,
-0.13527467846870422,
-0.2633756101131439,
-0.024413228034973145,
0.05874558910727501,
-0.4084140658378601,
0.279780775308609,
0.14769509434700012,
0.05576474592089653,
-0.214194193482399,
-0.06394003331661224,
0.0036081583239138126,
-0.04840381443500519,
0.204321026802063,
-0.18674370646476746,
0.16912971436977386,
0.008734185248613358,
-0.3945755958557129,
-0.011297549121081829,
-0.16769279539585114,
-0.09654450416564941,
0.05792027711868286,
0.008094057440757751,
-0.29484114050865173,
0.1700621247291565,
-0.07675526291131973,
-0.03518696129322052,
-0.30960139632225037,
-0.007441958412528038,
-0.2699562907218933,
-0.14504513144493103,
-0.3195432126522064,
0.03836149722337723,
-0.13758161664009094,
-0.007248787209391594,
0.01752563938498497,
0.22608248889446259,
-0.05562429130077362,
0.12103331089019775,
0.20431609451770782,
-0.33794111013412476,
-0.0676329955458641,
0.18666402995586395,
-0.47009560465812683,
0.09383463859558105,
0.19704949855804443,
0.24051280319690704,
-0.01100718230009079,
0.09464409947395325,
-0.46250903606414795,
-0.3311881422996521,
0.045293934643268585,
0.13796870410442352,
0.0033272821456193924,
-0.029986605048179626,
-0.5655084252357483,
0.7123626470565796,
0.12492558360099792,
0.003634326159954071,
-0.1478494107723236,
-0.22269241511821747,
-0.6932830214500427,
-0.056065816432237625,
0.24310746788978577,
0.1864217221736908,
-0.45076656341552734,
-0.07341919094324112,
0.14092323184013367,
0.12124569714069366,
0.21632987260818481,
0.4072236120700836,
-0.30090123414993286,
0.35735902190208435,
-0.17417989671230316,
-0.03925244137644768,
0.16551396250724792,
-0.019729051738977432,
-0.4775095582008362,
0.2144935131072998,
-0.3018958866596222,
0.4390661418437958,
-0.11868999153375626,
0.18745063245296478,
0.022830575704574585,
-0.28344741463661194,
0.00021001696586608887,
0.49960213899612427,
-0.08872023969888687,
0.11948021501302719,
-0.26680243015289307,
-0.12693189084529877,
0.18402084708213806,
0.3140494227409363,
-0.02445826306939125,
0.12656402587890625,
0.1483263373374939,
0.16799509525299072,
0.30640482902526855,
-0.37289389967918396,
-0.19316400587558746,
0.23461411893367767,
-0.06630648672580719,
0.03694147989153862,
0.07156673818826675,
0.11754661053419113,
-0.255788117647171,
0.5054358839988708,
0.22255605459213257,
0.08030697703361511,
-0.02320660650730133,
0.019054584205150604,
0.13633942604064941,
-0.15110012888908386,
-0.23695223033428192,
-0.004843477159738541,
0.02497047185897827,
-0.08142432570457458,
-0.09312441945075989,
0.33272305130958557,
0.0381649024784565,
0.4017443060874939,
-0.2882651090621948,
-0.028769681230187416,
-0.2852039337158203,
0.1911483108997345,
0.3526584506034851,
-0.23836280405521393,
-0.14179959893226624,
-0.08790067583322525,
-0.16641750931739807,
-0.1338602751493454,
-0.353346586227417,
0.24615052342414856,
0.11380819976329803,
0.4585370421409607,
-0.20342770218849182,
0.2124374955892563,
0.270781010389328,
-0.21700653433799744,
0.20686814188957214,
0.1335594803094864,
-0.18457812070846558,
-0.1690366268157959,
0.036078065633773804,
0.47911977767944336,
0.23098047077655792,
0.3283066153526306,
-0.005326110869646072,
-0.2921406328678131,
-0.004494290798902512,
0.1756599396467209,
0.19691875576972961,
0.15941455960273743,
0.36353713274002075,
0.007261360064148903,
0.2883606255054474,
0.2143779844045639,
-0.24388256669044495,
0.20339848101139069,
0.3737528622150421,
-0.07319463789463043,
-0.12986671924591064,
0.3533185124397278,
-0.09961185604333878,
-0.24024701118469238,
-0.1929662525653839,
0.14746889472007751,
0.560509443283081,
0.06443322449922562,
0.012254856526851654,
0.04007161036133766,
0.007338918745517731,
-0.15950188040733337,
0.16248475015163422,
0.030656810849905014,
0.3856538236141205,
0.12741625308990479,
0.3744145631790161,
0.18438465893268585,
-0.42059656977653503,
-0.11166621744632721,
0.02007703296840191,
0.4746990203857422,
-0.19371163845062256,
0.33428314328193665,
-0.27232763171195984,
0.1885618269443512,
0.04718151316046715,
0.3330180048942566,
-0.012039102613925934,
-0.13949985802173615,
-0.2559283971786499,
0.005247786641120911,
0.20535439252853394,
-0.07066389173269272,
-0.21776403486728668,
0.007748007774353027,
0.25891321897506714,
0.05113636702299118,
-0.19515641033649445,
-0.058099936693906784,
-0.34780368208885193,
0.04480506852269173,
0.28962498903274536,
-0.20804165303707123,
0.15573403239250183,
0.04164813458919525,
-0.071760393679142,
0.03120766207575798,
-0.449128121137619,
-0.09990163147449493,
-0.25664156675338745,
0.3083757758140564,
-0.024773932993412018,
0.17787645757198334,
-0.11377174407243729,
0.053014107048511505,
0.22928963601589203,
-0.00659804604947567,
-0.19834721088409424,
0.16123303771018982,
-0.19951076805591583,
0.07020354270935059,
0.08288982510566711,
0.005581669509410858,
-0.247634157538414,
0.047074537724256516,
0.11082752048969269,
-0.11224471032619476,
0.009636849164962769,
0.6508384943008423,
0.2198023796081543,
0.17299720644950867,
0.050897128880023956,
0.021607588976621628,
-0.1103799119591713,
-0.47767579555511475,
0.378994882106781,
0.0839560478925705,
-0.2168004959821701,
-0.3401903510093689,
0.09652062505483627,
-0.1479853093624115,
0.22525593638420105,
-0.6422485113143921,
-0.13467584550380707,
-0.4151197671890259,
0.08830825984477997,
-0.3408629298210144,
-0.44412297010421753,
-0.12453040480613708,
-0.016429170966148376,
-0.07746607065200806,
-0.10937854647636414,
0.07258865237236023,
-0.032655589282512665,
0.047966405749320984,
0.1175059974193573,
-0.059709228575229645,
0.5423569679260254,
0.37399259209632874,
0.6829426884651184,
0.06540769338607788,
-0.41378268599510193,
0.07599298655986786,
-0.06067751348018646,
0.013719290494918823,
-0.2405988872051239,
-0.4295036792755127,
0.20688781142234802,
-0.16728612780570984,
-0.0017616674304008484,
-0.05754803121089935,
-0.07831716537475586,
-0.06291718035936356,
0.10501812398433685,
0.1534336805343628,
0.41738519072532654,
-0.034212466329336166,
0.014023511670529842,
-0.317334920167923,
0.38170233368873596,
0.05048534646630287,
0.18128472566604614,
-0.11428152024745941,
-0.12337028235197067,
0.2604063153266907,
-0.16471676528453827,
0.24687331914901733,
-0.2016175389289856,
-0.3615361452102661,
0.03488028421998024,
-0.5283340811729431,
0.10188348591327667,
-0.018858177587389946,
0.1724637746810913,
-0.2222948670387268,
0.26320475339889526,
0.2990264892578125,
0.21861670911312103,
0.6646530628204346,
-0.1932387799024582,
-0.0051904283463954926,
0.022333011031150818,
-0.2758825719356537,
-0.3769177794456482,
-0.1757693588733673,
0.023144137114286423,
-0.11907272785902023,
-0.017797190696001053,
0.7363342642784119,
0.08631346374750137,
-0.38804614543914795,
0.14426711201667786,
0.09381768852472305,
-0.12405984103679657,
0.14691177010536194,
-0.22348834574222565,
-0.21480897068977356,
0.19172720611095428,
0.08012135326862335,
-0.09205285459756851,
-0.09810617566108704,
-0.08579933643341064,
-0.069904625415802,
-0.1648184061050415,
0.17916804552078247,
0.11377324163913727,
0.03180774673819542,
0.10575086623430252,
0.3254680335521698,
0.439555823802948,
0.1791742742061615,
-0.0934743583202362,
0.284373939037323,
0.37683114409446716,
0.04729173332452774,
-0.6036043763160706,
-0.1879514455795288,
0.14307869970798492,
-0.018154673278331757,
0.45043498277664185,
-0.09241718798875809,
0.09989078342914581,
-0.13744041323661804,
0.2325015366077423,
-0.24173954129219055,
0.32526659965515137,
0.7384576797485352,
-0.009279489517211914,
-0.20711694657802582,
-0.3092392086982727,
0.4456075131893158,
0.25580742955207825,
-0.07642540335655212,
-0.0006220601499080658,
-0.2582888603210449,
-0.3060052990913391,
0.22649885714054108,
0.47111788392066956,
0.6351697444915771,
-0.20403285324573517,
0.1872374415397644,
0.2317115068435669,
-0.15500792860984802,
0.17994265258312225,
-0.026899809017777443,
-0.0764138400554657,
-0.12417095899581909,
-0.5130962133407593,
-0.00830647349357605,
-0.18045800924301147,
0.22043028473854065,
0.03290320560336113,
0.05532439425587654,
0.030109794810414314,
-0.2292485386133194,
-0.0444030724465847,
0.019287560135126114,
0.14670278131961823,
0.2711910903453827,
-0.11876222491264343,
-0.18897444009780884,
0.22888973355293274,
-0.22691194713115692,
0.03956620767712593,
0.03196492791175842,
-0.22486215829849243,
-0.3606634736061096,
0.3396947979927063,
-0.1367543488740921,
0.009120497852563858,
-0.3930756449699402,
0.2589051127433777,
-0.0633884072303772,
-0.4486733675003052,
0.15264737606048584,
0.3468887209892273,
0.310763955116272,
-0.03993656858801842,
-0.1057492196559906,
0.31398242712020874,
-0.16449838876724243,
0.34958720207214355,
0.2788248360157013,
-0.5106822848320007,
0.3263813257217407,
0.08082674443721771,
0.015370659530162811,
-0.13523879647254944,
-0.06271237134933472,
-0.02777271717786789,
-0.35159868001937866,
-0.18196795880794525,
0.01788100227713585,
-0.024787601083517075,
-0.3856993317604065,
-0.07233098149299622,
0.17867673933506012,
-0.11960659921169281,
0.14851033687591553,
0.15495681762695312,
0.09821485728025436,
0.2897087037563324,
0.02430455945432186,
-0.45306530594825745,
0.014738905243575573,
0.2967528998851776,
0.0001765228807926178,
0.15752968192100525,
0.5498745441436768,
0.06360484659671783,
-0.1217408999800682,
0.013836141675710678,
0.45008450746536255,
0.45371904969215393,
-0.41812947392463684,
0.15085488557815552,
-0.19236263632774353,
0.31873059272766113,
-0.008098335936665535,
-0.0590854249894619,
-0.07575267553329468,
-0.35995566844940186,
-0.09062711894512177,
0.047108180820941925,
-0.24062158167362213,
0.09516800940036774,
-0.01192454993724823,
0.14058363437652588,
-0.3097100853919983,
0.11680705845355988,
-0.1427503526210785,
0.24506932497024536,
-0.26489636301994324,
0.024597734212875366,
0.16334082186222076,
0.17765094339847565,
0.040566734969615936,
-0.07828932255506516,
0.16445286571979523,
-0.15607129037380219,
0.09512302279472351,
-0.00011583790183067322,
-0.13183876872062683,
-0.21275505423545837,
-0.16637402772903442,
0.11512649059295654,
-0.030438877642154694,
-0.3126417100429535,
-0.007836217060685158,
-0.09545433521270752,
-0.17536748945713043,
-0.12062837183475494,
0.053376954048871994,
0.14103704690933228,
-0.11334636807441711,
-0.013296251185238361,
-0.009733285754919052,
-0.1449732482433319,
0.3976547122001648,
-0.057434871792793274,
-0.40691688656806946,
0.15330874919891357,
0.2741653621196747,
0.059947267174720764,
0.23367823660373688,
-0.24687659740447998,
-0.1783941686153412,
0.05969395861029625,
0.10326240211725235,
-0.0008848123252391815,
0.367503821849823,
-0.4077916741371155,
0.14131489396095276,
0.19809384644031525,
0.14122220873832703,
0.3028584122657776,
-0.19686158001422882,
-0.2804330289363861,
0.05136951431632042,
0.11775564402341843,
0.041850849986076355,
-0.3792490065097809,
0.35873836278915405,
0.050720881670713425,
-0.04394450783729553,
-0.030738092958927155,
0.104827880859375,
0.4251265525817871,
-0.34322333335876465,
0.00014984793961048126,
0.2245575487613678,
-0.11351947486400604,
0.08149231970310211,
0.5401894450187683,
0.21713964641094208,
0.1489720195531845,
0.08647210150957108,
-0.0958380401134491,
-0.0021290257573127747,
0.5435546040534973,
0.17776474356651306,
0.5282435417175293,
-0.07226007431745529,
0.30437010526657104,
0.014677569270133972,
-0.40560832619667053,
-0.04963718727231026,
0.20888680219650269,
-0.6677331328392029,
0.3132484257221222,
0.07468105852603912,
0.11106419563293457,
-0.0980328842997551,
-0.6949125528335571,
0.0028151962906122208,
0.37201759219169617,
-0.1132395789027214,
-0.16124029457569122,
-0.015823395922780037,
0.11288809031248093,
-0.1242261528968811,
0.32903897762298584,
-0.2780906856060028,
0.05281711369752884,
0.14830541610717773,
0.18361490964889526,
0.020846225321292877,
-0.053032152354717255,
-0.2688886523246765,
0.010319599881768227,
0.375169038772583,
0.03799755498766899,
0.14289142191410065,
-0.3114434480667114,
-0.09611664712429047,
0.034420572221279144,
0.39066556096076965,
0.17481182515621185,
0.21877068281173706,
-0.03771611303091049,
0.1216738224029541,
-0.00958341732621193,
-0.06838232278823853,
0.31697675585746765,
0.2443399280309677,
-0.08038142323493958,
0.06652996689081192,
0.09264744818210602,
-0.0008363230153918266,
-0.14598794281482697,
-0.08683204650878906,
-0.1494956761598587,
0.04704836755990982,
-0.5514954924583435,
0.18990382552146912,
-0.1535000205039978,
-0.06915058195590973,
-0.10090148448944092,
0.09884357452392578,
0.022734493017196655,
-0.13805842399597168,
0.6496283411979675,
-0.20686329901218414,
0.06342817842960358,
0.017290670424699783,
0.04272421449422836,
-0.13699720799922943,
0.5864679217338562,
0.2040669322013855,
0.0955943614244461,
-0.30179154872894287,
0.02499474585056305,
-0.3708067238330841,
-0.17189210653305054,
-0.38385331630706787,
0.2801108658313751,
0.2210298478603363,
-0.012314164079725742,
0.01185830682516098,
0.11153904348611832,
0.38726717233657837,
-0.07031667232513428,
0.025615144520998,
0.12681826949119568,
-0.28067949414253235,
0.04774131625890732,
-0.4546021819114685,
0.18110904097557068,
-0.21121665835380554,
-0.22298350930213928,
0.43942806124687195,
0.04528829827904701,
0.009804479777812958,
-0.15581895411014557,
-0.20614314079284668,
-0.05457413196563721,
0.45840007066726685,
0.49489331245422363,
0.14686642587184906,
0.1163720041513443,
0.04942786693572998,
-0.12108278274536133,
-0.15674155950546265,
-0.042414888739585876,
-0.09352967143058777,
0.3994751274585724,
-0.07263340055942535,
0.41131702065467834,
-0.07697279751300812,
-0.2495471090078354,
-0.04923643916845322,
0.14532122015953064,
0.2721770405769348,
-0.39323967695236206,
-0.36247366666793823,
0.14323799312114716,
0.1652245819568634,
0.3044595718383789,
0.18644888699054718,
0.3780202269554138,
0.21739831566810608,
-0.010635415092110634,
-0.3522007465362549,
-0.3335355818271637,
0.37149983644485474,
-0.14567804336547852,
-0.11021643877029419,
0.1722223311662674,
0.019775301218032837,
-0.07350490242242813,
0.1393044888973236,
-0.3916427493095398,
-0.211073637008667,
0.3593246340751648,
-0.06091754883527756,
-0.22147583961486816,
0.4532432556152344,
0.35368573665618896,
0.05046472325921059,
0.009802807122468948,
0.33104926347732544,
-0.22169595956802368,
-0.148225799202919,
0.32958441972732544,
0.04166896641254425
] |
https://github.com/huggingface/datasets/issues/4478 | Dataset slow during model training | Thanks for the information!
I have now updated the training code like so:
```
dataset = load_from_disk(prep_data_dir)
train_dataset = dataset["train"][:]
validation_dataset = dataset["dev"][:]
...
model.fit(
train_dataset["pixel_values"],
train_dataset["label"],
epochs=epochs,
validation_data=(
validation_dataset["pixel_values"],
validation_dataset["label"]
),
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
- Creating the in-memory dataset is quite quick
- But: There is now a long wait (~4-5 Minutes) before the training starts (why?)
- And: Training times have improved but the very first epoch leaves me wondering why it takes so long (why?)
**Epoch Breakdown:**
- Epoch 1/10
78s 12s/step - loss: 3.1307 - accuracy: 0.0737 - val_loss: 2.2827 - val_accuracy: 0.1273 - lr: 0.0010
- Epoch 2/10
1s 168ms/step - loss: 2.3616 - accuracy: 0.2350 - val_loss: 2.2679 - val_accuracy: 0.2182 - lr: 0.0010
- Epoch 3/10
1s 189ms/step - loss: 2.0221 - accuracy: 0.3180 - val_loss: 2.2670 - val_accuracy: 0.1818 - lr: 0.0010
- Epoch 4/10
0s 67ms/step - loss: 1.8895 - accuracy: 0.3548 - val_loss: 2.2771 - val_accuracy: 0.1273 - lr: 0.0010
- Epoch 5/10
0s 67ms/step - loss: 1.7846 - accuracy: 0.3963 - val_loss: 2.2860 - val_accuracy: 0.1455 - lr: 0.0010
- Epoch 6/10
0s 65ms/step - loss: 1.5946 - accuracy: 0.4516 - val_loss: 2.2938 - val_accuracy: 0.1636 - lr: 0.0010
- Epoch 7/10
0s 63ms/step - loss: 1.4217 - accuracy: 0.5115 - val_loss: 2.2968 - val_accuracy: 0.2182 - lr: 0.0010
- Epoch 8/10
0s 67ms/step - loss: 1.3089 - accuracy: 0.5438 - val_loss: 2.2842 - val_accuracy: 0.2182 - lr: 0.0010
- Epoch 9/10
1s 184ms/step - loss: 1.2480 - accuracy: 0.5806 - val_loss: 2.2652 - val_accuracy: 0.1818 - lr: 0.0010
- Epoch 10/10
0s 65ms/step - loss: 1.2699 - accuracy: 0.5622 - val_loss: 2.2670 - val_accuracy: 0.2000 - lr: 0.0010
| ## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
| 282 | Dataset slow during model training
## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
Thanks for the information!
I have now updated the training code like so:
```
dataset = load_from_disk(prep_data_dir)
train_dataset = dataset["train"][:]
validation_dataset = dataset["dev"][:]
...
model.fit(
train_dataset["pixel_values"],
train_dataset["label"],
epochs=epochs,
validation_data=(
validation_dataset["pixel_values"],
validation_dataset["label"]
),
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
- Creating the in-memory dataset is quite quick
- But: There is now a long wait (~4-5 Minutes) before the training starts (why?)
- And: Training times have improved but the very first epoch leaves me wondering why it takes so long (why?)
**Epoch Breakdown:**
- Epoch 1/10
78s 12s/step - loss: 3.1307 - accuracy: 0.0737 - val_loss: 2.2827 - val_accuracy: 0.1273 - lr: 0.0010
- Epoch 2/10
1s 168ms/step - loss: 2.3616 - accuracy: 0.2350 - val_loss: 2.2679 - val_accuracy: 0.2182 - lr: 0.0010
- Epoch 3/10
1s 189ms/step - loss: 2.0221 - accuracy: 0.3180 - val_loss: 2.2670 - val_accuracy: 0.1818 - lr: 0.0010
- Epoch 4/10
0s 67ms/step - loss: 1.8895 - accuracy: 0.3548 - val_loss: 2.2771 - val_accuracy: 0.1273 - lr: 0.0010
- Epoch 5/10
0s 67ms/step - loss: 1.7846 - accuracy: 0.3963 - val_loss: 2.2860 - val_accuracy: 0.1455 - lr: 0.0010
- Epoch 6/10
0s 65ms/step - loss: 1.5946 - accuracy: 0.4516 - val_loss: 2.2938 - val_accuracy: 0.1636 - lr: 0.0010
- Epoch 7/10
0s 63ms/step - loss: 1.4217 - accuracy: 0.5115 - val_loss: 2.2968 - val_accuracy: 0.2182 - lr: 0.0010
- Epoch 8/10
0s 67ms/step - loss: 1.3089 - accuracy: 0.5438 - val_loss: 2.2842 - val_accuracy: 0.2182 - lr: 0.0010
- Epoch 9/10
1s 184ms/step - loss: 1.2480 - accuracy: 0.5806 - val_loss: 2.2652 - val_accuracy: 0.1818 - lr: 0.0010
- Epoch 10/10
0s 65ms/step - loss: 1.2699 - accuracy: 0.5622 - val_loss: 2.2670 - val_accuracy: 0.2000 - lr: 0.0010
| [
-0.3647408187389374,
-0.04376630485057831,
-0.051781658083200455,
0.16746309399604797,
0.4417370557785034,
0.3758905231952667,
0.13192279636859894,
0.5064499974250793,
-0.27916309237480164,
-0.0450834184885025,
0.006873017176985741,
0.39136049151420593,
-0.28453540802001953,
-0.07079442590475082,
-0.08689876645803452,
-0.15684649348258972,
0.11042121052742004,
-0.11886776983737946,
-0.0989079475402832,
-0.004865527153015137,
-0.05940268933773041,
-0.1480148285627365,
0.10876086354255676,
0.017722226679325104,
-0.31001996994018555,
-0.1134466752409935,
0.07921766489744186,
-0.041132085025310516,
0.0695480927824974,
-0.25585025548934937,
0.021925324574112892,
-0.11291106045246124,
-0.08243894577026367,
0.37769365310668945,
-0.00011354033631505445,
0.2830536365509033,
0.0016603171825408936,
0.21132545173168182,
-0.27777284383773804,
0.3174874484539032,
0.04907158017158508,
-0.1534266471862793,
-0.1241549551486969,
0.03328103572130203,
-0.24165332317352295,
-0.17905177175998688,
-0.12035471200942993,
-0.15587550401687622,
0.17634464800357819,
0.38618186116218567,
0.2069033980369568,
0.160476416349411,
-0.4111673831939697,
0.10540078580379486,
-0.17679932713508606,
0.3275949954986572,
-0.35568612813949585,
0.13077513873577118,
0.02538730949163437,
-0.18181605637073517,
-0.0038003772497177124,
0.24342463910579681,
-0.01672479324042797,
-0.04647274687886238,
0.3426099717617035,
0.07634057849645615,
-0.17589589953422546,
-0.3136589229106903,
0.09004564583301544,
0.20574820041656494,
0.04314501956105232,
0.02786494977772236,
-0.382047176361084,
-0.47771182656288147,
-0.09372592717409134,
-0.23954519629478455,
0.051005180925130844,
-0.12998391687870026,
0.05427400395274162,
-0.030196037143468857,
-0.4409274160861969,
0.04205135256052017,
0.06821906566619873,
0.14314979314804077,
-0.060143452137708664,
0.04593675956130028,
0.23361630737781525,
0.020483504980802536,
0.18119798600673676,
-0.10117554664611816,
-0.0012954771518707275,
-0.341593474149704,
0.07847853004932404,
0.20121514797210693,
-0.4574773907661438,
0.0002273358404636383,
0.12706027925014496,
-0.10741133242845535,
0.04247679561376572,
-0.20867259800434113,
0.0908508226275444,
0.11662469059228897,
-0.13527467846870422,
-0.2633756101131439,
-0.024413228034973145,
0.05874558910727501,
-0.4084140658378601,
0.279780775308609,
0.14769509434700012,
0.05576474592089653,
-0.214194193482399,
-0.06394003331661224,
0.0036081583239138126,
-0.04840381443500519,
0.204321026802063,
-0.18674370646476746,
0.16912971436977386,
0.008734185248613358,
-0.3945755958557129,
-0.011297549121081829,
-0.16769279539585114,
-0.09654450416564941,
0.05792027711868286,
0.008094057440757751,
-0.29484114050865173,
0.1700621247291565,
-0.07675526291131973,
-0.03518696129322052,
-0.30960139632225037,
-0.007441958412528038,
-0.2699562907218933,
-0.14504513144493103,
-0.3195432126522064,
0.03836149722337723,
-0.13758161664009094,
-0.007248787209391594,
0.01752563938498497,
0.22608248889446259,
-0.05562429130077362,
0.12103331089019775,
0.20431609451770782,
-0.33794111013412476,
-0.0676329955458641,
0.18666402995586395,
-0.47009560465812683,
0.09383463859558105,
0.19704949855804443,
0.24051280319690704,
-0.01100718230009079,
0.09464409947395325,
-0.46250903606414795,
-0.3311881422996521,
0.045293934643268585,
0.13796870410442352,
0.0033272821456193924,
-0.029986605048179626,
-0.5655084252357483,
0.7123626470565796,
0.12492558360099792,
0.003634326159954071,
-0.1478494107723236,
-0.22269241511821747,
-0.6932830214500427,
-0.056065816432237625,
0.24310746788978577,
0.1864217221736908,
-0.45076656341552734,
-0.07341919094324112,
0.14092323184013367,
0.12124569714069366,
0.21632987260818481,
0.4072236120700836,
-0.30090123414993286,
0.35735902190208435,
-0.17417989671230316,
-0.03925244137644768,
0.16551396250724792,
-0.019729051738977432,
-0.4775095582008362,
0.2144935131072998,
-0.3018958866596222,
0.4390661418437958,
-0.11868999153375626,
0.18745063245296478,
0.022830575704574585,
-0.28344741463661194,
0.00021001696586608887,
0.49960213899612427,
-0.08872023969888687,
0.11948021501302719,
-0.26680243015289307,
-0.12693189084529877,
0.18402084708213806,
0.3140494227409363,
-0.02445826306939125,
0.12656402587890625,
0.1483263373374939,
0.16799509525299072,
0.30640482902526855,
-0.37289389967918396,
-0.19316400587558746,
0.23461411893367767,
-0.06630648672580719,
0.03694147989153862,
0.07156673818826675,
0.11754661053419113,
-0.255788117647171,
0.5054358839988708,
0.22255605459213257,
0.08030697703361511,
-0.02320660650730133,
0.019054584205150604,
0.13633942604064941,
-0.15110012888908386,
-0.23695223033428192,
-0.004843477159738541,
0.02497047185897827,
-0.08142432570457458,
-0.09312441945075989,
0.33272305130958557,
0.0381649024784565,
0.4017443060874939,
-0.2882651090621948,
-0.028769681230187416,
-0.2852039337158203,
0.1911483108997345,
0.3526584506034851,
-0.23836280405521393,
-0.14179959893226624,
-0.08790067583322525,
-0.16641750931739807,
-0.1338602751493454,
-0.353346586227417,
0.24615052342414856,
0.11380819976329803,
0.4585370421409607,
-0.20342770218849182,
0.2124374955892563,
0.270781010389328,
-0.21700653433799744,
0.20686814188957214,
0.1335594803094864,
-0.18457812070846558,
-0.1690366268157959,
0.036078065633773804,
0.47911977767944336,
0.23098047077655792,
0.3283066153526306,
-0.005326110869646072,
-0.2921406328678131,
-0.004494290798902512,
0.1756599396467209,
0.19691875576972961,
0.15941455960273743,
0.36353713274002075,
0.007261360064148903,
0.2883606255054474,
0.2143779844045639,
-0.24388256669044495,
0.20339848101139069,
0.3737528622150421,
-0.07319463789463043,
-0.12986671924591064,
0.3533185124397278,
-0.09961185604333878,
-0.24024701118469238,
-0.1929662525653839,
0.14746889472007751,
0.560509443283081,
0.06443322449922562,
0.012254856526851654,
0.04007161036133766,
0.007338918745517731,
-0.15950188040733337,
0.16248475015163422,
0.030656810849905014,
0.3856538236141205,
0.12741625308990479,
0.3744145631790161,
0.18438465893268585,
-0.42059656977653503,
-0.11166621744632721,
0.02007703296840191,
0.4746990203857422,
-0.19371163845062256,
0.33428314328193665,
-0.27232763171195984,
0.1885618269443512,
0.04718151316046715,
0.3330180048942566,
-0.012039102613925934,
-0.13949985802173615,
-0.2559283971786499,
0.005247786641120911,
0.20535439252853394,
-0.07066389173269272,
-0.21776403486728668,
0.007748007774353027,
0.25891321897506714,
0.05113636702299118,
-0.19515641033649445,
-0.058099936693906784,
-0.34780368208885193,
0.04480506852269173,
0.28962498903274536,
-0.20804165303707123,
0.15573403239250183,
0.04164813458919525,
-0.071760393679142,
0.03120766207575798,
-0.449128121137619,
-0.09990163147449493,
-0.25664156675338745,
0.3083757758140564,
-0.024773932993412018,
0.17787645757198334,
-0.11377174407243729,
0.053014107048511505,
0.22928963601589203,
-0.00659804604947567,
-0.19834721088409424,
0.16123303771018982,
-0.19951076805591583,
0.07020354270935059,
0.08288982510566711,
0.005581669509410858,
-0.247634157538414,
0.047074537724256516,
0.11082752048969269,
-0.11224471032619476,
0.009636849164962769,
0.6508384943008423,
0.2198023796081543,
0.17299720644950867,
0.050897128880023956,
0.021607588976621628,
-0.1103799119591713,
-0.47767579555511475,
0.378994882106781,
0.0839560478925705,
-0.2168004959821701,
-0.3401903510093689,
0.09652062505483627,
-0.1479853093624115,
0.22525593638420105,
-0.6422485113143921,
-0.13467584550380707,
-0.4151197671890259,
0.08830825984477997,
-0.3408629298210144,
-0.44412297010421753,
-0.12453040480613708,
-0.016429170966148376,
-0.07746607065200806,
-0.10937854647636414,
0.07258865237236023,
-0.032655589282512665,
0.047966405749320984,
0.1175059974193573,
-0.059709228575229645,
0.5423569679260254,
0.37399259209632874,
0.6829426884651184,
0.06540769338607788,
-0.41378268599510193,
0.07599298655986786,
-0.06067751348018646,
0.013719290494918823,
-0.2405988872051239,
-0.4295036792755127,
0.20688781142234802,
-0.16728612780570984,
-0.0017616674304008484,
-0.05754803121089935,
-0.07831716537475586,
-0.06291718035936356,
0.10501812398433685,
0.1534336805343628,
0.41738519072532654,
-0.034212466329336166,
0.014023511670529842,
-0.317334920167923,
0.38170233368873596,
0.05048534646630287,
0.18128472566604614,
-0.11428152024745941,
-0.12337028235197067,
0.2604063153266907,
-0.16471676528453827,
0.24687331914901733,
-0.2016175389289856,
-0.3615361452102661,
0.03488028421998024,
-0.5283340811729431,
0.10188348591327667,
-0.018858177587389946,
0.1724637746810913,
-0.2222948670387268,
0.26320475339889526,
0.2990264892578125,
0.21861670911312103,
0.6646530628204346,
-0.1932387799024582,
-0.0051904283463954926,
0.022333011031150818,
-0.2758825719356537,
-0.3769177794456482,
-0.1757693588733673,
0.023144137114286423,
-0.11907272785902023,
-0.017797190696001053,
0.7363342642784119,
0.08631346374750137,
-0.38804614543914795,
0.14426711201667786,
0.09381768852472305,
-0.12405984103679657,
0.14691177010536194,
-0.22348834574222565,
-0.21480897068977356,
0.19172720611095428,
0.08012135326862335,
-0.09205285459756851,
-0.09810617566108704,
-0.08579933643341064,
-0.069904625415802,
-0.1648184061050415,
0.17916804552078247,
0.11377324163913727,
0.03180774673819542,
0.10575086623430252,
0.3254680335521698,
0.439555823802948,
0.1791742742061615,
-0.0934743583202362,
0.284373939037323,
0.37683114409446716,
0.04729173332452774,
-0.6036043763160706,
-0.1879514455795288,
0.14307869970798492,
-0.018154673278331757,
0.45043498277664185,
-0.09241718798875809,
0.09989078342914581,
-0.13744041323661804,
0.2325015366077423,
-0.24173954129219055,
0.32526659965515137,
0.7384576797485352,
-0.009279489517211914,
-0.20711694657802582,
-0.3092392086982727,
0.4456075131893158,
0.25580742955207825,
-0.07642540335655212,
-0.0006220601499080658,
-0.2582888603210449,
-0.3060052990913391,
0.22649885714054108,
0.47111788392066956,
0.6351697444915771,
-0.20403285324573517,
0.1872374415397644,
0.2317115068435669,
-0.15500792860984802,
0.17994265258312225,
-0.026899809017777443,
-0.0764138400554657,
-0.12417095899581909,
-0.5130962133407593,
-0.00830647349357605,
-0.18045800924301147,
0.22043028473854065,
0.03290320560336113,
0.05532439425587654,
0.030109794810414314,
-0.2292485386133194,
-0.0444030724465847,
0.019287560135126114,
0.14670278131961823,
0.2711910903453827,
-0.11876222491264343,
-0.18897444009780884,
0.22888973355293274,
-0.22691194713115692,
0.03956620767712593,
0.03196492791175842,
-0.22486215829849243,
-0.3606634736061096,
0.3396947979927063,
-0.1367543488740921,
0.009120497852563858,
-0.3930756449699402,
0.2589051127433777,
-0.0633884072303772,
-0.4486733675003052,
0.15264737606048584,
0.3468887209892273,
0.310763955116272,
-0.03993656858801842,
-0.1057492196559906,
0.31398242712020874,
-0.16449838876724243,
0.34958720207214355,
0.2788248360157013,
-0.5106822848320007,
0.3263813257217407,
0.08082674443721771,
0.015370659530162811,
-0.13523879647254944,
-0.06271237134933472,
-0.02777271717786789,
-0.35159868001937866,
-0.18196795880794525,
0.01788100227713585,
-0.024787601083517075,
-0.3856993317604065,
-0.07233098149299622,
0.17867673933506012,
-0.11960659921169281,
0.14851033687591553,
0.15495681762695312,
0.09821485728025436,
0.2897087037563324,
0.02430455945432186,
-0.45306530594825745,
0.014738905243575573,
0.2967528998851776,
0.0001765228807926178,
0.15752968192100525,
0.5498745441436768,
0.06360484659671783,
-0.1217408999800682,
0.013836141675710678,
0.45008450746536255,
0.45371904969215393,
-0.41812947392463684,
0.15085488557815552,
-0.19236263632774353,
0.31873059272766113,
-0.008098335936665535,
-0.0590854249894619,
-0.07575267553329468,
-0.35995566844940186,
-0.09062711894512177,
0.047108180820941925,
-0.24062158167362213,
0.09516800940036774,
-0.01192454993724823,
0.14058363437652588,
-0.3097100853919983,
0.11680705845355988,
-0.1427503526210785,
0.24506932497024536,
-0.26489636301994324,
0.024597734212875366,
0.16334082186222076,
0.17765094339847565,
0.040566734969615936,
-0.07828932255506516,
0.16445286571979523,
-0.15607129037380219,
0.09512302279472351,
-0.00011583790183067322,
-0.13183876872062683,
-0.21275505423545837,
-0.16637402772903442,
0.11512649059295654,
-0.030438877642154694,
-0.3126417100429535,
-0.007836217060685158,
-0.09545433521270752,
-0.17536748945713043,
-0.12062837183475494,
0.053376954048871994,
0.14103704690933228,
-0.11334636807441711,
-0.013296251185238361,
-0.009733285754919052,
-0.1449732482433319,
0.3976547122001648,
-0.057434871792793274,
-0.40691688656806946,
0.15330874919891357,
0.2741653621196747,
0.059947267174720764,
0.23367823660373688,
-0.24687659740447998,
-0.1783941686153412,
0.05969395861029625,
0.10326240211725235,
-0.0008848123252391815,
0.367503821849823,
-0.4077916741371155,
0.14131489396095276,
0.19809384644031525,
0.14122220873832703,
0.3028584122657776,
-0.19686158001422882,
-0.2804330289363861,
0.05136951431632042,
0.11775564402341843,
0.041850849986076355,
-0.3792490065097809,
0.35873836278915405,
0.050720881670713425,
-0.04394450783729553,
-0.030738092958927155,
0.104827880859375,
0.4251265525817871,
-0.34322333335876465,
0.00014984793961048126,
0.2245575487613678,
-0.11351947486400604,
0.08149231970310211,
0.5401894450187683,
0.21713964641094208,
0.1489720195531845,
0.08647210150957108,
-0.0958380401134491,
-0.0021290257573127747,
0.5435546040534973,
0.17776474356651306,
0.5282435417175293,
-0.07226007431745529,
0.30437010526657104,
0.014677569270133972,
-0.40560832619667053,
-0.04963718727231026,
0.20888680219650269,
-0.6677331328392029,
0.3132484257221222,
0.07468105852603912,
0.11106419563293457,
-0.0980328842997551,
-0.6949125528335571,
0.0028151962906122208,
0.37201759219169617,
-0.1132395789027214,
-0.16124029457569122,
-0.015823395922780037,
0.11288809031248093,
-0.1242261528968811,
0.32903897762298584,
-0.2780906856060028,
0.05281711369752884,
0.14830541610717773,
0.18361490964889526,
0.020846225321292877,
-0.053032152354717255,
-0.2688886523246765,
0.010319599881768227,
0.375169038772583,
0.03799755498766899,
0.14289142191410065,
-0.3114434480667114,
-0.09611664712429047,
0.034420572221279144,
0.39066556096076965,
0.17481182515621185,
0.21877068281173706,
-0.03771611303091049,
0.1216738224029541,
-0.00958341732621193,
-0.06838232278823853,
0.31697675585746765,
0.2443399280309677,
-0.08038142323493958,
0.06652996689081192,
0.09264744818210602,
-0.0008363230153918266,
-0.14598794281482697,
-0.08683204650878906,
-0.1494956761598587,
0.04704836755990982,
-0.5514954924583435,
0.18990382552146912,
-0.1535000205039978,
-0.06915058195590973,
-0.10090148448944092,
0.09884357452392578,
0.022734493017196655,
-0.13805842399597168,
0.6496283411979675,
-0.20686329901218414,
0.06342817842960358,
0.017290670424699783,
0.04272421449422836,
-0.13699720799922943,
0.5864679217338562,
0.2040669322013855,
0.0955943614244461,
-0.30179154872894287,
0.02499474585056305,
-0.3708067238330841,
-0.17189210653305054,
-0.38385331630706787,
0.2801108658313751,
0.2210298478603363,
-0.012314164079725742,
0.01185830682516098,
0.11153904348611832,
0.38726717233657837,
-0.07031667232513428,
0.025615144520998,
0.12681826949119568,
-0.28067949414253235,
0.04774131625890732,
-0.4546021819114685,
0.18110904097557068,
-0.21121665835380554,
-0.22298350930213928,
0.43942806124687195,
0.04528829827904701,
0.009804479777812958,
-0.15581895411014557,
-0.20614314079284668,
-0.05457413196563721,
0.45840007066726685,
0.49489331245422363,
0.14686642587184906,
0.1163720041513443,
0.04942786693572998,
-0.12108278274536133,
-0.15674155950546265,
-0.042414888739585876,
-0.09352967143058777,
0.3994751274585724,
-0.07263340055942535,
0.41131702065467834,
-0.07697279751300812,
-0.2495471090078354,
-0.04923643916845322,
0.14532122015953064,
0.2721770405769348,
-0.39323967695236206,
-0.36247366666793823,
0.14323799312114716,
0.1652245819568634,
0.3044595718383789,
0.18644888699054718,
0.3780202269554138,
0.21739831566810608,
-0.010635415092110634,
-0.3522007465362549,
-0.3335355818271637,
0.37149983644485474,
-0.14567804336547852,
-0.11021643877029419,
0.1722223311662674,
0.019775301218032837,
-0.07350490242242813,
0.1393044888973236,
-0.3916427493095398,
-0.211073637008667,
0.3593246340751648,
-0.06091754883527756,
-0.22147583961486816,
0.4532432556152344,
0.35368573665618896,
0.05046472325921059,
0.009802807122468948,
0.33104926347732544,
-0.22169595956802368,
-0.148225799202919,
0.32958441972732544,
0.04166896641254425
] |
https://github.com/huggingface/datasets/issues/4478 | Dataset slow during model training | Regarding the new long ~5 min. wait introduced by the in-memory dataset update: this might be causing it? https://datascience.stackexchange.com/questions/33364/why-model-fit-generator-in-keras-is-taking-so-much-time-even-before-picking-the
For now, my save/load hack is still more performant, even though having more boiler-plate code :/ | ## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
| 35 | Dataset slow during model training
## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
Regarding the new long ~5 min. wait introduced by the in-memory dataset update: this might be causing it? https://datascience.stackexchange.com/questions/33364/why-model-fit-generator-in-keras-is-taking-so-much-time-even-before-picking-the
For now, my save/load hack is still more performant, even though having more boiler-plate code :/ | [
-0.3647408187389374,
-0.04376630485057831,
-0.051781658083200455,
0.16746309399604797,
0.4417370557785034,
0.3758905231952667,
0.13192279636859894,
0.5064499974250793,
-0.27916309237480164,
-0.0450834184885025,
0.006873017176985741,
0.39136049151420593,
-0.28453540802001953,
-0.07079442590475082,
-0.08689876645803452,
-0.15684649348258972,
0.11042121052742004,
-0.11886776983737946,
-0.0989079475402832,
-0.004865527153015137,
-0.05940268933773041,
-0.1480148285627365,
0.10876086354255676,
0.017722226679325104,
-0.31001996994018555,
-0.1134466752409935,
0.07921766489744186,
-0.041132085025310516,
0.0695480927824974,
-0.25585025548934937,
0.021925324574112892,
-0.11291106045246124,
-0.08243894577026367,
0.37769365310668945,
-0.00011354033631505445,
0.2830536365509033,
0.0016603171825408936,
0.21132545173168182,
-0.27777284383773804,
0.3174874484539032,
0.04907158017158508,
-0.1534266471862793,
-0.1241549551486969,
0.03328103572130203,
-0.24165332317352295,
-0.17905177175998688,
-0.12035471200942993,
-0.15587550401687622,
0.17634464800357819,
0.38618186116218567,
0.2069033980369568,
0.160476416349411,
-0.4111673831939697,
0.10540078580379486,
-0.17679932713508606,
0.3275949954986572,
-0.35568612813949585,
0.13077513873577118,
0.02538730949163437,
-0.18181605637073517,
-0.0038003772497177124,
0.24342463910579681,
-0.01672479324042797,
-0.04647274687886238,
0.3426099717617035,
0.07634057849645615,
-0.17589589953422546,
-0.3136589229106903,
0.09004564583301544,
0.20574820041656494,
0.04314501956105232,
0.02786494977772236,
-0.382047176361084,
-0.47771182656288147,
-0.09372592717409134,
-0.23954519629478455,
0.051005180925130844,
-0.12998391687870026,
0.05427400395274162,
-0.030196037143468857,
-0.4409274160861969,
0.04205135256052017,
0.06821906566619873,
0.14314979314804077,
-0.060143452137708664,
0.04593675956130028,
0.23361630737781525,
0.020483504980802536,
0.18119798600673676,
-0.10117554664611816,
-0.0012954771518707275,
-0.341593474149704,
0.07847853004932404,
0.20121514797210693,
-0.4574773907661438,
0.0002273358404636383,
0.12706027925014496,
-0.10741133242845535,
0.04247679561376572,
-0.20867259800434113,
0.0908508226275444,
0.11662469059228897,
-0.13527467846870422,
-0.2633756101131439,
-0.024413228034973145,
0.05874558910727501,
-0.4084140658378601,
0.279780775308609,
0.14769509434700012,
0.05576474592089653,
-0.214194193482399,
-0.06394003331661224,
0.0036081583239138126,
-0.04840381443500519,
0.204321026802063,
-0.18674370646476746,
0.16912971436977386,
0.008734185248613358,
-0.3945755958557129,
-0.011297549121081829,
-0.16769279539585114,
-0.09654450416564941,
0.05792027711868286,
0.008094057440757751,
-0.29484114050865173,
0.1700621247291565,
-0.07675526291131973,
-0.03518696129322052,
-0.30960139632225037,
-0.007441958412528038,
-0.2699562907218933,
-0.14504513144493103,
-0.3195432126522064,
0.03836149722337723,
-0.13758161664009094,
-0.007248787209391594,
0.01752563938498497,
0.22608248889446259,
-0.05562429130077362,
0.12103331089019775,
0.20431609451770782,
-0.33794111013412476,
-0.0676329955458641,
0.18666402995586395,
-0.47009560465812683,
0.09383463859558105,
0.19704949855804443,
0.24051280319690704,
-0.01100718230009079,
0.09464409947395325,
-0.46250903606414795,
-0.3311881422996521,
0.045293934643268585,
0.13796870410442352,
0.0033272821456193924,
-0.029986605048179626,
-0.5655084252357483,
0.7123626470565796,
0.12492558360099792,
0.003634326159954071,
-0.1478494107723236,
-0.22269241511821747,
-0.6932830214500427,
-0.056065816432237625,
0.24310746788978577,
0.1864217221736908,
-0.45076656341552734,
-0.07341919094324112,
0.14092323184013367,
0.12124569714069366,
0.21632987260818481,
0.4072236120700836,
-0.30090123414993286,
0.35735902190208435,
-0.17417989671230316,
-0.03925244137644768,
0.16551396250724792,
-0.019729051738977432,
-0.4775095582008362,
0.2144935131072998,
-0.3018958866596222,
0.4390661418437958,
-0.11868999153375626,
0.18745063245296478,
0.022830575704574585,
-0.28344741463661194,
0.00021001696586608887,
0.49960213899612427,
-0.08872023969888687,
0.11948021501302719,
-0.26680243015289307,
-0.12693189084529877,
0.18402084708213806,
0.3140494227409363,
-0.02445826306939125,
0.12656402587890625,
0.1483263373374939,
0.16799509525299072,
0.30640482902526855,
-0.37289389967918396,
-0.19316400587558746,
0.23461411893367767,
-0.06630648672580719,
0.03694147989153862,
0.07156673818826675,
0.11754661053419113,
-0.255788117647171,
0.5054358839988708,
0.22255605459213257,
0.08030697703361511,
-0.02320660650730133,
0.019054584205150604,
0.13633942604064941,
-0.15110012888908386,
-0.23695223033428192,
-0.004843477159738541,
0.02497047185897827,
-0.08142432570457458,
-0.09312441945075989,
0.33272305130958557,
0.0381649024784565,
0.4017443060874939,
-0.2882651090621948,
-0.028769681230187416,
-0.2852039337158203,
0.1911483108997345,
0.3526584506034851,
-0.23836280405521393,
-0.14179959893226624,
-0.08790067583322525,
-0.16641750931739807,
-0.1338602751493454,
-0.353346586227417,
0.24615052342414856,
0.11380819976329803,
0.4585370421409607,
-0.20342770218849182,
0.2124374955892563,
0.270781010389328,
-0.21700653433799744,
0.20686814188957214,
0.1335594803094864,
-0.18457812070846558,
-0.1690366268157959,
0.036078065633773804,
0.47911977767944336,
0.23098047077655792,
0.3283066153526306,
-0.005326110869646072,
-0.2921406328678131,
-0.004494290798902512,
0.1756599396467209,
0.19691875576972961,
0.15941455960273743,
0.36353713274002075,
0.007261360064148903,
0.2883606255054474,
0.2143779844045639,
-0.24388256669044495,
0.20339848101139069,
0.3737528622150421,
-0.07319463789463043,
-0.12986671924591064,
0.3533185124397278,
-0.09961185604333878,
-0.24024701118469238,
-0.1929662525653839,
0.14746889472007751,
0.560509443283081,
0.06443322449922562,
0.012254856526851654,
0.04007161036133766,
0.007338918745517731,
-0.15950188040733337,
0.16248475015163422,
0.030656810849905014,
0.3856538236141205,
0.12741625308990479,
0.3744145631790161,
0.18438465893268585,
-0.42059656977653503,
-0.11166621744632721,
0.02007703296840191,
0.4746990203857422,
-0.19371163845062256,
0.33428314328193665,
-0.27232763171195984,
0.1885618269443512,
0.04718151316046715,
0.3330180048942566,
-0.012039102613925934,
-0.13949985802173615,
-0.2559283971786499,
0.005247786641120911,
0.20535439252853394,
-0.07066389173269272,
-0.21776403486728668,
0.007748007774353027,
0.25891321897506714,
0.05113636702299118,
-0.19515641033649445,
-0.058099936693906784,
-0.34780368208885193,
0.04480506852269173,
0.28962498903274536,
-0.20804165303707123,
0.15573403239250183,
0.04164813458919525,
-0.071760393679142,
0.03120766207575798,
-0.449128121137619,
-0.09990163147449493,
-0.25664156675338745,
0.3083757758140564,
-0.024773932993412018,
0.17787645757198334,
-0.11377174407243729,
0.053014107048511505,
0.22928963601589203,
-0.00659804604947567,
-0.19834721088409424,
0.16123303771018982,
-0.19951076805591583,
0.07020354270935059,
0.08288982510566711,
0.005581669509410858,
-0.247634157538414,
0.047074537724256516,
0.11082752048969269,
-0.11224471032619476,
0.009636849164962769,
0.6508384943008423,
0.2198023796081543,
0.17299720644950867,
0.050897128880023956,
0.021607588976621628,
-0.1103799119591713,
-0.47767579555511475,
0.378994882106781,
0.0839560478925705,
-0.2168004959821701,
-0.3401903510093689,
0.09652062505483627,
-0.1479853093624115,
0.22525593638420105,
-0.6422485113143921,
-0.13467584550380707,
-0.4151197671890259,
0.08830825984477997,
-0.3408629298210144,
-0.44412297010421753,
-0.12453040480613708,
-0.016429170966148376,
-0.07746607065200806,
-0.10937854647636414,
0.07258865237236023,
-0.032655589282512665,
0.047966405749320984,
0.1175059974193573,
-0.059709228575229645,
0.5423569679260254,
0.37399259209632874,
0.6829426884651184,
0.06540769338607788,
-0.41378268599510193,
0.07599298655986786,
-0.06067751348018646,
0.013719290494918823,
-0.2405988872051239,
-0.4295036792755127,
0.20688781142234802,
-0.16728612780570984,
-0.0017616674304008484,
-0.05754803121089935,
-0.07831716537475586,
-0.06291718035936356,
0.10501812398433685,
0.1534336805343628,
0.41738519072532654,
-0.034212466329336166,
0.014023511670529842,
-0.317334920167923,
0.38170233368873596,
0.05048534646630287,
0.18128472566604614,
-0.11428152024745941,
-0.12337028235197067,
0.2604063153266907,
-0.16471676528453827,
0.24687331914901733,
-0.2016175389289856,
-0.3615361452102661,
0.03488028421998024,
-0.5283340811729431,
0.10188348591327667,
-0.018858177587389946,
0.1724637746810913,
-0.2222948670387268,
0.26320475339889526,
0.2990264892578125,
0.21861670911312103,
0.6646530628204346,
-0.1932387799024582,
-0.0051904283463954926,
0.022333011031150818,
-0.2758825719356537,
-0.3769177794456482,
-0.1757693588733673,
0.023144137114286423,
-0.11907272785902023,
-0.017797190696001053,
0.7363342642784119,
0.08631346374750137,
-0.38804614543914795,
0.14426711201667786,
0.09381768852472305,
-0.12405984103679657,
0.14691177010536194,
-0.22348834574222565,
-0.21480897068977356,
0.19172720611095428,
0.08012135326862335,
-0.09205285459756851,
-0.09810617566108704,
-0.08579933643341064,
-0.069904625415802,
-0.1648184061050415,
0.17916804552078247,
0.11377324163913727,
0.03180774673819542,
0.10575086623430252,
0.3254680335521698,
0.439555823802948,
0.1791742742061615,
-0.0934743583202362,
0.284373939037323,
0.37683114409446716,
0.04729173332452774,
-0.6036043763160706,
-0.1879514455795288,
0.14307869970798492,
-0.018154673278331757,
0.45043498277664185,
-0.09241718798875809,
0.09989078342914581,
-0.13744041323661804,
0.2325015366077423,
-0.24173954129219055,
0.32526659965515137,
0.7384576797485352,
-0.009279489517211914,
-0.20711694657802582,
-0.3092392086982727,
0.4456075131893158,
0.25580742955207825,
-0.07642540335655212,
-0.0006220601499080658,
-0.2582888603210449,
-0.3060052990913391,
0.22649885714054108,
0.47111788392066956,
0.6351697444915771,
-0.20403285324573517,
0.1872374415397644,
0.2317115068435669,
-0.15500792860984802,
0.17994265258312225,
-0.026899809017777443,
-0.0764138400554657,
-0.12417095899581909,
-0.5130962133407593,
-0.00830647349357605,
-0.18045800924301147,
0.22043028473854065,
0.03290320560336113,
0.05532439425587654,
0.030109794810414314,
-0.2292485386133194,
-0.0444030724465847,
0.019287560135126114,
0.14670278131961823,
0.2711910903453827,
-0.11876222491264343,
-0.18897444009780884,
0.22888973355293274,
-0.22691194713115692,
0.03956620767712593,
0.03196492791175842,
-0.22486215829849243,
-0.3606634736061096,
0.3396947979927063,
-0.1367543488740921,
0.009120497852563858,
-0.3930756449699402,
0.2589051127433777,
-0.0633884072303772,
-0.4486733675003052,
0.15264737606048584,
0.3468887209892273,
0.310763955116272,
-0.03993656858801842,
-0.1057492196559906,
0.31398242712020874,
-0.16449838876724243,
0.34958720207214355,
0.2788248360157013,
-0.5106822848320007,
0.3263813257217407,
0.08082674443721771,
0.015370659530162811,
-0.13523879647254944,
-0.06271237134933472,
-0.02777271717786789,
-0.35159868001937866,
-0.18196795880794525,
0.01788100227713585,
-0.024787601083517075,
-0.3856993317604065,
-0.07233098149299622,
0.17867673933506012,
-0.11960659921169281,
0.14851033687591553,
0.15495681762695312,
0.09821485728025436,
0.2897087037563324,
0.02430455945432186,
-0.45306530594825745,
0.014738905243575573,
0.2967528998851776,
0.0001765228807926178,
0.15752968192100525,
0.5498745441436768,
0.06360484659671783,
-0.1217408999800682,
0.013836141675710678,
0.45008450746536255,
0.45371904969215393,
-0.41812947392463684,
0.15085488557815552,
-0.19236263632774353,
0.31873059272766113,
-0.008098335936665535,
-0.0590854249894619,
-0.07575267553329468,
-0.35995566844940186,
-0.09062711894512177,
0.047108180820941925,
-0.24062158167362213,
0.09516800940036774,
-0.01192454993724823,
0.14058363437652588,
-0.3097100853919983,
0.11680705845355988,
-0.1427503526210785,
0.24506932497024536,
-0.26489636301994324,
0.024597734212875366,
0.16334082186222076,
0.17765094339847565,
0.040566734969615936,
-0.07828932255506516,
0.16445286571979523,
-0.15607129037380219,
0.09512302279472351,
-0.00011583790183067322,
-0.13183876872062683,
-0.21275505423545837,
-0.16637402772903442,
0.11512649059295654,
-0.030438877642154694,
-0.3126417100429535,
-0.007836217060685158,
-0.09545433521270752,
-0.17536748945713043,
-0.12062837183475494,
0.053376954048871994,
0.14103704690933228,
-0.11334636807441711,
-0.013296251185238361,
-0.009733285754919052,
-0.1449732482433319,
0.3976547122001648,
-0.057434871792793274,
-0.40691688656806946,
0.15330874919891357,
0.2741653621196747,
0.059947267174720764,
0.23367823660373688,
-0.24687659740447998,
-0.1783941686153412,
0.05969395861029625,
0.10326240211725235,
-0.0008848123252391815,
0.367503821849823,
-0.4077916741371155,
0.14131489396095276,
0.19809384644031525,
0.14122220873832703,
0.3028584122657776,
-0.19686158001422882,
-0.2804330289363861,
0.05136951431632042,
0.11775564402341843,
0.041850849986076355,
-0.3792490065097809,
0.35873836278915405,
0.050720881670713425,
-0.04394450783729553,
-0.030738092958927155,
0.104827880859375,
0.4251265525817871,
-0.34322333335876465,
0.00014984793961048126,
0.2245575487613678,
-0.11351947486400604,
0.08149231970310211,
0.5401894450187683,
0.21713964641094208,
0.1489720195531845,
0.08647210150957108,
-0.0958380401134491,
-0.0021290257573127747,
0.5435546040534973,
0.17776474356651306,
0.5282435417175293,
-0.07226007431745529,
0.30437010526657104,
0.014677569270133972,
-0.40560832619667053,
-0.04963718727231026,
0.20888680219650269,
-0.6677331328392029,
0.3132484257221222,
0.07468105852603912,
0.11106419563293457,
-0.0980328842997551,
-0.6949125528335571,
0.0028151962906122208,
0.37201759219169617,
-0.1132395789027214,
-0.16124029457569122,
-0.015823395922780037,
0.11288809031248093,
-0.1242261528968811,
0.32903897762298584,
-0.2780906856060028,
0.05281711369752884,
0.14830541610717773,
0.18361490964889526,
0.020846225321292877,
-0.053032152354717255,
-0.2688886523246765,
0.010319599881768227,
0.375169038772583,
0.03799755498766899,
0.14289142191410065,
-0.3114434480667114,
-0.09611664712429047,
0.034420572221279144,
0.39066556096076965,
0.17481182515621185,
0.21877068281173706,
-0.03771611303091049,
0.1216738224029541,
-0.00958341732621193,
-0.06838232278823853,
0.31697675585746765,
0.2443399280309677,
-0.08038142323493958,
0.06652996689081192,
0.09264744818210602,
-0.0008363230153918266,
-0.14598794281482697,
-0.08683204650878906,
-0.1494956761598587,
0.04704836755990982,
-0.5514954924583435,
0.18990382552146912,
-0.1535000205039978,
-0.06915058195590973,
-0.10090148448944092,
0.09884357452392578,
0.022734493017196655,
-0.13805842399597168,
0.6496283411979675,
-0.20686329901218414,
0.06342817842960358,
0.017290670424699783,
0.04272421449422836,
-0.13699720799922943,
0.5864679217338562,
0.2040669322013855,
0.0955943614244461,
-0.30179154872894287,
0.02499474585056305,
-0.3708067238330841,
-0.17189210653305054,
-0.38385331630706787,
0.2801108658313751,
0.2210298478603363,
-0.012314164079725742,
0.01185830682516098,
0.11153904348611832,
0.38726717233657837,
-0.07031667232513428,
0.025615144520998,
0.12681826949119568,
-0.28067949414253235,
0.04774131625890732,
-0.4546021819114685,
0.18110904097557068,
-0.21121665835380554,
-0.22298350930213928,
0.43942806124687195,
0.04528829827904701,
0.009804479777812958,
-0.15581895411014557,
-0.20614314079284668,
-0.05457413196563721,
0.45840007066726685,
0.49489331245422363,
0.14686642587184906,
0.1163720041513443,
0.04942786693572998,
-0.12108278274536133,
-0.15674155950546265,
-0.042414888739585876,
-0.09352967143058777,
0.3994751274585724,
-0.07263340055942535,
0.41131702065467834,
-0.07697279751300812,
-0.2495471090078354,
-0.04923643916845322,
0.14532122015953064,
0.2721770405769348,
-0.39323967695236206,
-0.36247366666793823,
0.14323799312114716,
0.1652245819568634,
0.3044595718383789,
0.18644888699054718,
0.3780202269554138,
0.21739831566810608,
-0.010635415092110634,
-0.3522007465362549,
-0.3335355818271637,
0.37149983644485474,
-0.14567804336547852,
-0.11021643877029419,
0.1722223311662674,
0.019775301218032837,
-0.07350490242242813,
0.1393044888973236,
-0.3916427493095398,
-0.211073637008667,
0.3593246340751648,
-0.06091754883527756,
-0.22147583961486816,
0.4532432556152344,
0.35368573665618896,
0.05046472325921059,
0.009802807122468948,
0.33104926347732544,
-0.22169595956802368,
-0.148225799202919,
0.32958441972732544,
0.04166896641254425
] |
https://github.com/huggingface/datasets/issues/4478 | Dataset slow during model training | That 5 minute wait is quite surprising! I don't have a good explanation for why it's happening, but it can't be an issue with `datasets` or `tf.data` because you're just fitting directly on Numpy arrays at this point. All I can suggest is seeing if you can isolate the issue - for example, does fitting on a smaller dataset containing only 10% of the original data reduce the wait? This might indicate the delay is caused by your data being copied or converted somehow. Alternatively, you could try removing things like callbacks and seeing if you could isolate the issue there. | ## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
| 101 | Dataset slow during model training
## Describe the bug
While migrating towards 🤗 Datasets, I encountered an odd performance degradation: training suddenly slows down dramatically. I train with an image dataset using Keras and execute a `to_tf_dataset` just before training.
First, I have optimized my dataset following https://discuss.huggingface.co/t/solved-image-dataset-seems-slow-for-larger-image-size/10960/6, which actually improved the situation from what I had before but did not completely solve it.
Second, I saved and loaded my dataset using `tf.data.experimental.save` and `tf.data.experimental.load` before training (for which I would have expected no performance change). However, I ended up with the performance I had before tinkering with 🤗 Datasets.
Any idea what's the reason for this and how to speed-up training with 🤗 Datasets?
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
from datasets import load_dataset
import os
dataset_dir = "./dataset"
prep_dataset_dir = "./prepdataset"
model_dir = "./model"
# Load Data
dataset = load_dataset("Lehrig/Monkey-Species-Collection", "downsized")
def read_image_file(example):
with open(example["image"].filename, "rb") as f:
example["image"] = {"bytes": f.read()}
return example
dataset = dataset.map(read_image_file)
dataset.save_to_disk(dataset_dir)
# Preprocess
from datasets import (
Array3D,
DatasetDict,
Features,
load_from_disk,
Sequence,
Value
)
import numpy as np
from transformers import ImageFeatureExtractionMixin
dataset = load_from_disk(dataset_dir)
num_classes = dataset["train"].features["label"].num_classes
one_hot_matrix = np.eye(num_classes)
feature_extractor = ImageFeatureExtractionMixin()
def to_pixels(image):
image = feature_extractor.resize(image, size=size)
image = feature_extractor.to_numpy_array(image, channel_first=False)
image = image / 255.0
return image
def process(examples):
examples["pixel_values"] = [
to_pixels(image) for image in examples["image"]
]
examples["label"] = [
one_hot_matrix[label] for label in examples["label"]
]
return examples
features = Features({
"pixel_values": Array3D(dtype="float32", shape=(size, size, 3)),
"label": Sequence(feature=Value(dtype="int32"), length=num_classes)
})
prep_dataset = dataset.map(
process,
remove_columns=["image"],
batched=True,
batch_size=batch_size,
num_proc=2,
features=features,
)
prep_dataset = prep_dataset.with_format("numpy")
# Split
train_dev_dataset = prep_dataset['test'].train_test_split(
test_size=test_size,
shuffle=True,
seed=seed
)
train_dev_test_dataset = DatasetDict({
'train': train_dev_dataset['train'],
'dev': train_dev_dataset['test'],
'test': prep_dataset['test'],
})
train_dev_test_dataset.save_to_disk(prep_dataset_dir)
# Train Model
import datetime
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.applications import InceptionV3
from tensorflow.keras.layers import Dense, Dropout, GlobalAveragePooling2D, BatchNormalization
from tensorflow.keras.callbacks import ReduceLROnPlateau, ModelCheckpoint, EarlyStopping
from transformers import DefaultDataCollator
dataset = load_from_disk(prep_data_dir)
data_collator = DefaultDataCollator(return_tensors="tf")
train_dataset = dataset["train"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=True,
batch_size=batch_size,
collate_fn=data_collator
)
validation_dataset = dataset["dev"].to_tf_dataset(
columns=['pixel_values'],
label_cols=['label'],
shuffle=False,
batch_size=batch_size,
collate_fn=data_collator
)
print(f'{datetime.datetime.now()} - Saving Data')
tf.data.experimental.save(train_dataset, model_dir+"/train")
tf.data.experimental.save(validation_dataset, model_dir+"/val")
print(f'{datetime.datetime.now()} - Loading Data')
train_dataset = tf.data.experimental.load(model_dir+"/train")
validation_dataset = tf.data.experimental.load(model_dir+"/val")
shape = np.shape(dataset["train"][0]["pixel_values"])
backbone = InceptionV3(
include_top=False,
weights='imagenet',
input_shape=shape
)
for layer in backbone.layers:
layer.trainable = False
model = Sequential()
model.add(backbone)
model.add(GlobalAveragePooling2D())
model.add(Dense(128, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(64, activation='relu'))
model.add(BatchNormalization())
model.add(Dropout(0.3))
model.add(Dense(10, activation='softmax'))
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)
print(model.summary())
earlyStopping = EarlyStopping(
monitor='val_loss',
patience=10,
verbose=0,
mode='min'
)
mcp_save = ModelCheckpoint(
f'{model_dir}/best_model.hdf5',
save_best_only=True,
monitor='val_loss',
mode='min'
)
reduce_lr_loss = ReduceLROnPlateau(
monitor='val_loss',
factor=0.1,
patience=7,
verbose=1,
min_delta=0.0001,
mode='min'
)
hist = model.fit(
train_dataset,
epochs=epochs,
validation_data=validation_dataset,
callbacks=[earlyStopping, mcp_save, reduce_lr_loss]
)
```
## Expected results
Same performance when training without my "save/load hack" or a good explanation/recommendation about the issue.
## Actual results
Performance slower without my "save/load hack".
**Epoch Breakdown (without my "save/load hack"):**
- Epoch 1/10
41s 2s/step - loss: 1.6302 - accuracy: 0.5048 - val_loss: 1.4713 - val_accuracy: 0.3273 - lr: 0.0010
- Epoch 2/10
32s 2s/step - loss: 0.5357 - accuracy: 0.8510 - val_loss: 1.0447 - val_accuracy: 0.5818 - lr: 0.0010
- Epoch 3/10
36s 3s/step - loss: 0.3547 - accuracy: 0.9231 - val_loss: 0.6245 - val_accuracy: 0.7091 - lr: 0.0010
- Epoch 4/10
36s 3s/step - loss: 0.2721 - accuracy: 0.9231 - val_loss: 0.3395 - val_accuracy: 0.9091 - lr: 0.0010
- Epoch 5/10
32s 2s/step - loss: 0.1676 - accuracy: 0.9856 - val_loss: 0.2187 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 6/10
42s 3s/step - loss: 0.2066 - accuracy: 0.9615 - val_loss: 0.1635 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 7/10
32s 2s/step - loss: 0.1814 - accuracy: 0.9423 - val_loss: 0.1418 - val_accuracy: 0.9636 - lr: 0.0010
- Epoch 8/10
32s 2s/step - loss: 0.1301 - accuracy: 0.9856 - val_loss: 0.1388 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 9/10
loss: 0.1102 - accuracy: 0.9856 - val_loss: 0.1185 - val_accuracy: 0.9818 - lr: 0.0010
- Epoch 10/10
32s 2s/step - loss: 0.1013 - accuracy: 0.9808 - val_loss: 0.0978 - val_accuracy: 0.9818 - lr: 0.0010
**Epoch Breakdown (with my "save/load hack"):**
- Epoch 1/10
13s 625ms/step - loss: 3.0478 - accuracy: 0.1146 - val_loss: 2.3061 - val_accuracy: 0.0727 - lr: 0.0010
- Epoch 2/10
0s 80ms/step - loss: 2.3105 - accuracy: 0.2656 - val_loss: 2.3085 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 3/10
0s 77ms/step - loss: 1.8608 - accuracy: 0.3542 - val_loss: 2.3130 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 4/10
1s 98ms/step - loss: 1.8677 - accuracy: 0.3750 - val_loss: 2.3157 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 5/10
1s 204ms/step - loss: 1.5561 - accuracy: 0.4583 - val_loss: 2.3049 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 6/10
1s 210ms/step - loss: 1.4657 - accuracy: 0.4896 - val_loss: 2.2944 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 7/10
1s 205ms/step - loss: 1.4018 - accuracy: 0.5312 - val_loss: 2.2917 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 8/10
1s 207ms/step - loss: 1.2370 - accuracy: 0.5729 - val_loss: 2.2814 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 9/10
1s 214ms/step - loss: 1.1190 - accuracy: 0.6250 - val_loss: 2.2733 - val_accuracy: 0.0909 - lr: 0.0010
- Epoch 10/10
1s 207ms/step - loss: 1.1484 - accuracy: 0.6302 - val_loss: 2.2624 - val_accuracy: 0.0909 - lr: 0.0010
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
- TensorFlow: 2.8.0
- GPU (used during training): Tesla V100-SXM2-32GB
That 5 minute wait is quite surprising! I don't have a good explanation for why it's happening, but it can't be an issue with `datasets` or `tf.data` because you're just fitting directly on Numpy arrays at this point. All I can suggest is seeing if you can isolate the issue - for example, does fitting on a smaller dataset containing only 10% of the original data reduce the wait? This might indicate the delay is caused by your data being copied or converted somehow. Alternatively, you could try removing things like callbacks and seeing if you could isolate the issue there. | [
-0.3647408187389374,
-0.04376630485057831,
-0.051781658083200455,
0.16746309399604797,
0.4417370557785034,
0.3758905231952667,
0.13192279636859894,
0.5064499974250793,
-0.27916309237480164,
-0.0450834184885025,
0.006873017176985741,
0.39136049151420593,
-0.28453540802001953,
-0.07079442590475082,
-0.08689876645803452,
-0.15684649348258972,
0.11042121052742004,
-0.11886776983737946,
-0.0989079475402832,
-0.004865527153015137,
-0.05940268933773041,
-0.1480148285627365,
0.10876086354255676,
0.017722226679325104,
-0.31001996994018555,
-0.1134466752409935,
0.07921766489744186,
-0.041132085025310516,
0.0695480927824974,
-0.25585025548934937,
0.021925324574112892,
-0.11291106045246124,
-0.08243894577026367,
0.37769365310668945,
-0.00011354033631505445,
0.2830536365509033,
0.0016603171825408936,
0.21132545173168182,
-0.27777284383773804,
0.3174874484539032,
0.04907158017158508,
-0.1534266471862793,
-0.1241549551486969,
0.03328103572130203,
-0.24165332317352295,
-0.17905177175998688,
-0.12035471200942993,
-0.15587550401687622,
0.17634464800357819,
0.38618186116218567,
0.2069033980369568,
0.160476416349411,
-0.4111673831939697,
0.10540078580379486,
-0.17679932713508606,
0.3275949954986572,
-0.35568612813949585,
0.13077513873577118,
0.02538730949163437,
-0.18181605637073517,
-0.0038003772497177124,
0.24342463910579681,
-0.01672479324042797,
-0.04647274687886238,
0.3426099717617035,
0.07634057849645615,
-0.17589589953422546,
-0.3136589229106903,
0.09004564583301544,
0.20574820041656494,
0.04314501956105232,
0.02786494977772236,
-0.382047176361084,
-0.47771182656288147,
-0.09372592717409134,
-0.23954519629478455,
0.051005180925130844,
-0.12998391687870026,
0.05427400395274162,
-0.030196037143468857,
-0.4409274160861969,
0.04205135256052017,
0.06821906566619873,
0.14314979314804077,
-0.060143452137708664,
0.04593675956130028,
0.23361630737781525,
0.020483504980802536,
0.18119798600673676,
-0.10117554664611816,
-0.0012954771518707275,
-0.341593474149704,
0.07847853004932404,
0.20121514797210693,
-0.4574773907661438,
0.0002273358404636383,
0.12706027925014496,
-0.10741133242845535,
0.04247679561376572,
-0.20867259800434113,
0.0908508226275444,
0.11662469059228897,
-0.13527467846870422,
-0.2633756101131439,
-0.024413228034973145,
0.05874558910727501,
-0.4084140658378601,
0.279780775308609,
0.14769509434700012,
0.05576474592089653,
-0.214194193482399,
-0.06394003331661224,
0.0036081583239138126,
-0.04840381443500519,
0.204321026802063,
-0.18674370646476746,
0.16912971436977386,
0.008734185248613358,
-0.3945755958557129,
-0.011297549121081829,
-0.16769279539585114,
-0.09654450416564941,
0.05792027711868286,
0.008094057440757751,
-0.29484114050865173,
0.1700621247291565,
-0.07675526291131973,
-0.03518696129322052,
-0.30960139632225037,
-0.007441958412528038,
-0.2699562907218933,
-0.14504513144493103,
-0.3195432126522064,
0.03836149722337723,
-0.13758161664009094,
-0.007248787209391594,
0.01752563938498497,
0.22608248889446259,
-0.05562429130077362,
0.12103331089019775,
0.20431609451770782,
-0.33794111013412476,
-0.0676329955458641,
0.18666402995586395,
-0.47009560465812683,
0.09383463859558105,
0.19704949855804443,
0.24051280319690704,
-0.01100718230009079,
0.09464409947395325,
-0.46250903606414795,
-0.3311881422996521,
0.045293934643268585,
0.13796870410442352,
0.0033272821456193924,
-0.029986605048179626,
-0.5655084252357483,
0.7123626470565796,
0.12492558360099792,
0.003634326159954071,
-0.1478494107723236,
-0.22269241511821747,
-0.6932830214500427,
-0.056065816432237625,
0.24310746788978577,
0.1864217221736908,
-0.45076656341552734,
-0.07341919094324112,
0.14092323184013367,
0.12124569714069366,
0.21632987260818481,
0.4072236120700836,
-0.30090123414993286,
0.35735902190208435,
-0.17417989671230316,
-0.03925244137644768,
0.16551396250724792,
-0.019729051738977432,
-0.4775095582008362,
0.2144935131072998,
-0.3018958866596222,
0.4390661418437958,
-0.11868999153375626,
0.18745063245296478,
0.022830575704574585,
-0.28344741463661194,
0.00021001696586608887,
0.49960213899612427,
-0.08872023969888687,
0.11948021501302719,
-0.26680243015289307,
-0.12693189084529877,
0.18402084708213806,
0.3140494227409363,
-0.02445826306939125,
0.12656402587890625,
0.1483263373374939,
0.16799509525299072,
0.30640482902526855,
-0.37289389967918396,
-0.19316400587558746,
0.23461411893367767,
-0.06630648672580719,
0.03694147989153862,
0.07156673818826675,
0.11754661053419113,
-0.255788117647171,
0.5054358839988708,
0.22255605459213257,
0.08030697703361511,
-0.02320660650730133,
0.019054584205150604,
0.13633942604064941,
-0.15110012888908386,
-0.23695223033428192,
-0.004843477159738541,
0.02497047185897827,
-0.08142432570457458,
-0.09312441945075989,
0.33272305130958557,
0.0381649024784565,
0.4017443060874939,
-0.2882651090621948,
-0.028769681230187416,
-0.2852039337158203,
0.1911483108997345,
0.3526584506034851,
-0.23836280405521393,
-0.14179959893226624,
-0.08790067583322525,
-0.16641750931739807,
-0.1338602751493454,
-0.353346586227417,
0.24615052342414856,
0.11380819976329803,
0.4585370421409607,
-0.20342770218849182,
0.2124374955892563,
0.270781010389328,
-0.21700653433799744,
0.20686814188957214,
0.1335594803094864,
-0.18457812070846558,
-0.1690366268157959,
0.036078065633773804,
0.47911977767944336,
0.23098047077655792,
0.3283066153526306,
-0.005326110869646072,
-0.2921406328678131,
-0.004494290798902512,
0.1756599396467209,
0.19691875576972961,
0.15941455960273743,
0.36353713274002075,
0.007261360064148903,
0.2883606255054474,
0.2143779844045639,
-0.24388256669044495,
0.20339848101139069,
0.3737528622150421,
-0.07319463789463043,
-0.12986671924591064,
0.3533185124397278,
-0.09961185604333878,
-0.24024701118469238,
-0.1929662525653839,
0.14746889472007751,
0.560509443283081,
0.06443322449922562,
0.012254856526851654,
0.04007161036133766,
0.007338918745517731,
-0.15950188040733337,
0.16248475015163422,
0.030656810849905014,
0.3856538236141205,
0.12741625308990479,
0.3744145631790161,
0.18438465893268585,
-0.42059656977653503,
-0.11166621744632721,
0.02007703296840191,
0.4746990203857422,
-0.19371163845062256,
0.33428314328193665,
-0.27232763171195984,
0.1885618269443512,
0.04718151316046715,
0.3330180048942566,
-0.012039102613925934,
-0.13949985802173615,
-0.2559283971786499,
0.005247786641120911,
0.20535439252853394,
-0.07066389173269272,
-0.21776403486728668,
0.007748007774353027,
0.25891321897506714,
0.05113636702299118,
-0.19515641033649445,
-0.058099936693906784,
-0.34780368208885193,
0.04480506852269173,
0.28962498903274536,
-0.20804165303707123,
0.15573403239250183,
0.04164813458919525,
-0.071760393679142,
0.03120766207575798,
-0.449128121137619,
-0.09990163147449493,
-0.25664156675338745,
0.3083757758140564,
-0.024773932993412018,
0.17787645757198334,
-0.11377174407243729,
0.053014107048511505,
0.22928963601589203,
-0.00659804604947567,
-0.19834721088409424,
0.16123303771018982,
-0.19951076805591583,
0.07020354270935059,
0.08288982510566711,
0.005581669509410858,
-0.247634157538414,
0.047074537724256516,
0.11082752048969269,
-0.11224471032619476,
0.009636849164962769,
0.6508384943008423,
0.2198023796081543,
0.17299720644950867,
0.050897128880023956,
0.021607588976621628,
-0.1103799119591713,
-0.47767579555511475,
0.378994882106781,
0.0839560478925705,
-0.2168004959821701,
-0.3401903510093689,
0.09652062505483627,
-0.1479853093624115,
0.22525593638420105,
-0.6422485113143921,
-0.13467584550380707,
-0.4151197671890259,
0.08830825984477997,
-0.3408629298210144,
-0.44412297010421753,
-0.12453040480613708,
-0.016429170966148376,
-0.07746607065200806,
-0.10937854647636414,
0.07258865237236023,
-0.032655589282512665,
0.047966405749320984,
0.1175059974193573,
-0.059709228575229645,
0.5423569679260254,
0.37399259209632874,
0.6829426884651184,
0.06540769338607788,
-0.41378268599510193,
0.07599298655986786,
-0.06067751348018646,
0.013719290494918823,
-0.2405988872051239,
-0.4295036792755127,
0.20688781142234802,
-0.16728612780570984,
-0.0017616674304008484,
-0.05754803121089935,
-0.07831716537475586,
-0.06291718035936356,
0.10501812398433685,
0.1534336805343628,
0.41738519072532654,
-0.034212466329336166,
0.014023511670529842,
-0.317334920167923,
0.38170233368873596,
0.05048534646630287,
0.18128472566604614,
-0.11428152024745941,
-0.12337028235197067,
0.2604063153266907,
-0.16471676528453827,
0.24687331914901733,
-0.2016175389289856,
-0.3615361452102661,
0.03488028421998024,
-0.5283340811729431,
0.10188348591327667,
-0.018858177587389946,
0.1724637746810913,
-0.2222948670387268,
0.26320475339889526,
0.2990264892578125,
0.21861670911312103,
0.6646530628204346,
-0.1932387799024582,
-0.0051904283463954926,
0.022333011031150818,
-0.2758825719356537,
-0.3769177794456482,
-0.1757693588733673,
0.023144137114286423,
-0.11907272785902023,
-0.017797190696001053,
0.7363342642784119,
0.08631346374750137,
-0.38804614543914795,
0.14426711201667786,
0.09381768852472305,
-0.12405984103679657,
0.14691177010536194,
-0.22348834574222565,
-0.21480897068977356,
0.19172720611095428,
0.08012135326862335,
-0.09205285459756851,
-0.09810617566108704,
-0.08579933643341064,
-0.069904625415802,
-0.1648184061050415,
0.17916804552078247,
0.11377324163913727,
0.03180774673819542,
0.10575086623430252,
0.3254680335521698,
0.439555823802948,
0.1791742742061615,
-0.0934743583202362,
0.284373939037323,
0.37683114409446716,
0.04729173332452774,
-0.6036043763160706,
-0.1879514455795288,
0.14307869970798492,
-0.018154673278331757,
0.45043498277664185,
-0.09241718798875809,
0.09989078342914581,
-0.13744041323661804,
0.2325015366077423,
-0.24173954129219055,
0.32526659965515137,
0.7384576797485352,
-0.009279489517211914,
-0.20711694657802582,
-0.3092392086982727,
0.4456075131893158,
0.25580742955207825,
-0.07642540335655212,
-0.0006220601499080658,
-0.2582888603210449,
-0.3060052990913391,
0.22649885714054108,
0.47111788392066956,
0.6351697444915771,
-0.20403285324573517,
0.1872374415397644,
0.2317115068435669,
-0.15500792860984802,
0.17994265258312225,
-0.026899809017777443,
-0.0764138400554657,
-0.12417095899581909,
-0.5130962133407593,
-0.00830647349357605,
-0.18045800924301147,
0.22043028473854065,
0.03290320560336113,
0.05532439425587654,
0.030109794810414314,
-0.2292485386133194,
-0.0444030724465847,
0.019287560135126114,
0.14670278131961823,
0.2711910903453827,
-0.11876222491264343,
-0.18897444009780884,
0.22888973355293274,
-0.22691194713115692,
0.03956620767712593,
0.03196492791175842,
-0.22486215829849243,
-0.3606634736061096,
0.3396947979927063,
-0.1367543488740921,
0.009120497852563858,
-0.3930756449699402,
0.2589051127433777,
-0.0633884072303772,
-0.4486733675003052,
0.15264737606048584,
0.3468887209892273,
0.310763955116272,
-0.03993656858801842,
-0.1057492196559906,
0.31398242712020874,
-0.16449838876724243,
0.34958720207214355,
0.2788248360157013,
-0.5106822848320007,
0.3263813257217407,
0.08082674443721771,
0.015370659530162811,
-0.13523879647254944,
-0.06271237134933472,
-0.02777271717786789,
-0.35159868001937866,
-0.18196795880794525,
0.01788100227713585,
-0.024787601083517075,
-0.3856993317604065,
-0.07233098149299622,
0.17867673933506012,
-0.11960659921169281,
0.14851033687591553,
0.15495681762695312,
0.09821485728025436,
0.2897087037563324,
0.02430455945432186,
-0.45306530594825745,
0.014738905243575573,
0.2967528998851776,
0.0001765228807926178,
0.15752968192100525,
0.5498745441436768,
0.06360484659671783,
-0.1217408999800682,
0.013836141675710678,
0.45008450746536255,
0.45371904969215393,
-0.41812947392463684,
0.15085488557815552,
-0.19236263632774353,
0.31873059272766113,
-0.008098335936665535,
-0.0590854249894619,
-0.07575267553329468,
-0.35995566844940186,
-0.09062711894512177,
0.047108180820941925,
-0.24062158167362213,
0.09516800940036774,
-0.01192454993724823,
0.14058363437652588,
-0.3097100853919983,
0.11680705845355988,
-0.1427503526210785,
0.24506932497024536,
-0.26489636301994324,
0.024597734212875366,
0.16334082186222076,
0.17765094339847565,
0.040566734969615936,
-0.07828932255506516,
0.16445286571979523,
-0.15607129037380219,
0.09512302279472351,
-0.00011583790183067322,
-0.13183876872062683,
-0.21275505423545837,
-0.16637402772903442,
0.11512649059295654,
-0.030438877642154694,
-0.3126417100429535,
-0.007836217060685158,
-0.09545433521270752,
-0.17536748945713043,
-0.12062837183475494,
0.053376954048871994,
0.14103704690933228,
-0.11334636807441711,
-0.013296251185238361,
-0.009733285754919052,
-0.1449732482433319,
0.3976547122001648,
-0.057434871792793274,
-0.40691688656806946,
0.15330874919891357,
0.2741653621196747,
0.059947267174720764,
0.23367823660373688,
-0.24687659740447998,
-0.1783941686153412,
0.05969395861029625,
0.10326240211725235,
-0.0008848123252391815,
0.367503821849823,
-0.4077916741371155,
0.14131489396095276,
0.19809384644031525,
0.14122220873832703,
0.3028584122657776,
-0.19686158001422882,
-0.2804330289363861,
0.05136951431632042,
0.11775564402341843,
0.041850849986076355,
-0.3792490065097809,
0.35873836278915405,
0.050720881670713425,
-0.04394450783729553,
-0.030738092958927155,
0.104827880859375,
0.4251265525817871,
-0.34322333335876465,
0.00014984793961048126,
0.2245575487613678,
-0.11351947486400604,
0.08149231970310211,
0.5401894450187683,
0.21713964641094208,
0.1489720195531845,
0.08647210150957108,
-0.0958380401134491,
-0.0021290257573127747,
0.5435546040534973,
0.17776474356651306,
0.5282435417175293,
-0.07226007431745529,
0.30437010526657104,
0.014677569270133972,
-0.40560832619667053,
-0.04963718727231026,
0.20888680219650269,
-0.6677331328392029,
0.3132484257221222,
0.07468105852603912,
0.11106419563293457,
-0.0980328842997551,
-0.6949125528335571,
0.0028151962906122208,
0.37201759219169617,
-0.1132395789027214,
-0.16124029457569122,
-0.015823395922780037,
0.11288809031248093,
-0.1242261528968811,
0.32903897762298584,
-0.2780906856060028,
0.05281711369752884,
0.14830541610717773,
0.18361490964889526,
0.020846225321292877,
-0.053032152354717255,
-0.2688886523246765,
0.010319599881768227,
0.375169038772583,
0.03799755498766899,
0.14289142191410065,
-0.3114434480667114,
-0.09611664712429047,
0.034420572221279144,
0.39066556096076965,
0.17481182515621185,
0.21877068281173706,
-0.03771611303091049,
0.1216738224029541,
-0.00958341732621193,
-0.06838232278823853,
0.31697675585746765,
0.2443399280309677,
-0.08038142323493958,
0.06652996689081192,
0.09264744818210602,
-0.0008363230153918266,
-0.14598794281482697,
-0.08683204650878906,
-0.1494956761598587,
0.04704836755990982,
-0.5514954924583435,
0.18990382552146912,
-0.1535000205039978,
-0.06915058195590973,
-0.10090148448944092,
0.09884357452392578,
0.022734493017196655,
-0.13805842399597168,
0.6496283411979675,
-0.20686329901218414,
0.06342817842960358,
0.017290670424699783,
0.04272421449422836,
-0.13699720799922943,
0.5864679217338562,
0.2040669322013855,
0.0955943614244461,
-0.30179154872894287,
0.02499474585056305,
-0.3708067238330841,
-0.17189210653305054,
-0.38385331630706787,
0.2801108658313751,
0.2210298478603363,
-0.012314164079725742,
0.01185830682516098,
0.11153904348611832,
0.38726717233657837,
-0.07031667232513428,
0.025615144520998,
0.12681826949119568,
-0.28067949414253235,
0.04774131625890732,
-0.4546021819114685,
0.18110904097557068,
-0.21121665835380554,
-0.22298350930213928,
0.43942806124687195,
0.04528829827904701,
0.009804479777812958,
-0.15581895411014557,
-0.20614314079284668,
-0.05457413196563721,
0.45840007066726685,
0.49489331245422363,
0.14686642587184906,
0.1163720041513443,
0.04942786693572998,
-0.12108278274536133,
-0.15674155950546265,
-0.042414888739585876,
-0.09352967143058777,
0.3994751274585724,
-0.07263340055942535,
0.41131702065467834,
-0.07697279751300812,
-0.2495471090078354,
-0.04923643916845322,
0.14532122015953064,
0.2721770405769348,
-0.39323967695236206,
-0.36247366666793823,
0.14323799312114716,
0.1652245819568634,
0.3044595718383789,
0.18644888699054718,
0.3780202269554138,
0.21739831566810608,
-0.010635415092110634,
-0.3522007465362549,
-0.3335355818271637,
0.37149983644485474,
-0.14567804336547852,
-0.11021643877029419,
0.1722223311662674,
0.019775301218032837,
-0.07350490242242813,
0.1393044888973236,
-0.3916427493095398,
-0.211073637008667,
0.3593246340751648,
-0.06091754883527756,
-0.22147583961486816,
0.4532432556152344,
0.35368573665618896,
0.05046472325921059,
0.009802807122468948,
0.33104926347732544,
-0.22169595956802368,
-0.148225799202919,
0.32958441972732544,
0.04166896641254425
] |
https://github.com/huggingface/datasets/issues/4477 | Dataset Viewer issue for fgrezes/WIESP2022-NER | https://huggingface.co/datasets/fgrezes/WIESP2022-NER
The error:
```
Message: Couldn't find a dataset script at /src/services/worker/fgrezes/WIESP2022-NER/WIESP2022-NER.py or any data file in the same directory. Couldn't find 'fgrezes/WIESP2022-NER' on the Hugging Face Hub either: FileNotFoundError: Unable to resolve any data file that matches ['**test*', '**eval*'] in dataset repository fgrezes/WIESP2022-NER with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
I understand the issue is not related to the dataset viewer in itself, but with the autodetection of the data files without a loading script in the datasets library. cc @lhoestq @albertvillanova @mariosasko | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 152 | Dataset Viewer issue for fgrezes/WIESP2022-NER
### Link
_No response_
### Description
_No response_
### Owner
_No response_
https://huggingface.co/datasets/fgrezes/WIESP2022-NER
The error:
```
Message: Couldn't find a dataset script at /src/services/worker/fgrezes/WIESP2022-NER/WIESP2022-NER.py or any data file in the same directory. Couldn't find 'fgrezes/WIESP2022-NER' on the Hugging Face Hub either: FileNotFoundError: Unable to resolve any data file that matches ['**test*', '**eval*'] in dataset repository fgrezes/WIESP2022-NER with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
I understand the issue is not related to the dataset viewer in itself, but with the autodetection of the data files without a loading script in the datasets library. cc @lhoestq @albertvillanova @mariosasko | [
-0.4396257698535919,
0.3505886197090149,
-0.05238764360547066,
0.16105759143829346,
0.2094472497701645,
0.12234855443239212,
0.11481259763240814,
0.5527941584587097,
0.29441162943840027,
0.2716500759124756,
-0.10764260590076447,
-0.05584201216697693,
0.022150326520204544,
0.37953969836235046,
-0.04034188389778137,
0.17212951183319092,
0.08721005916595459,
0.34015098214149475,
-0.1562708467245102,
0.11240154504776001,
-0.1944752335548401,
0.35696735978126526,
-0.10263793170452118,
0.1389954537153244,
-0.5114546418190002,
0.19611856341362,
-0.1550338864326477,
0.01312723383307457,
-0.13386130332946777,
-0.25725293159484863,
0.20842485129833221,
0.16893836855888367,
0.21650981903076172,
0.5024703741073608,
-0.00011267267109360546,
0.17045143246650696,
0.1682293862104416,
0.04834835231304169,
-0.03353499993681908,
-0.3208826780319214,
0.20330798625946045,
-0.26041144132614136,
0.12003610283136368,
-0.1643720120191574,
-0.11305636167526245,
-0.3216981291770935,
0.2967698872089386,
-0.1536659151315689,
0.11913355439901352,
0.37963369488716125,
0.22685500979423523,
0.030022040009498596,
0.22785674035549164,
-0.2026974856853485,
0.06956014782190323,
0.10692839324474335,
-0.12256349623203278,
-0.26847779750823975,
-0.11448751389980316,
-0.32616496086120605,
-0.12577056884765625,
0.30726921558380127,
0.046180397272109985,
-0.010001145303249359,
0.17255403101444244,
0.013485463336110115,
0.16236048936843872,
-0.3695445954799652,
0.32148444652557373,
0.13879495859146118,
0.3621388077735901,
-0.12922415137290955,
-0.09162051975727081,
-0.22079631686210632,
-0.04053208604454994,
0.3386254608631134,
0.31845569610595703,
0.25345146656036377,
-0.1442485898733139,
0.1486484259366989,
-0.07408977299928665,
-0.00847588013857603,
-0.2502942681312561,
-0.037248119711875916,
-0.20803463459014893,
-0.0028775036334991455,
-0.00323272030800581,
-0.022673800587654114,
0.08411634713411331,
-0.26162850856781006,
-0.06998315453529358,
0.06869356334209442,
-0.08596816658973694,
0.10384106636047363,
-0.42167529463768005,
0.13693232834339142,
0.3919493854045868,
0.3390010595321655,
0.13126134872436523,
0.22880271077156067,
-0.05508007854223251,
0.0069170426577329636,
0.20618154108524323,
0.07550199329853058,
0.2513866722583771,
0.03666435927152634,
0.1532144844532013,
-0.10294093191623688,
0.36207228899002075,
0.3723323941230774,
-0.0023076198995113373,
-0.04094509780406952,
-0.042456336319446564,
-0.4110725522041321,
-0.41649559140205383,
-0.3392188549041748,
0.4331861734390259,
-0.30466535687446594,
-0.24647849798202515,
0.19955620169639587,
0.0024526044726371765,
0.04844789579510689,
0.0002818657085299492,
0.4350670278072357,
-0.11726021021604538,
0.32759687304496765,
0.14241868257522583,
-0.0037002339959144592,
-0.1931847631931305,
-0.05304974690079689,
-0.2572193443775177,
0.028271354734897614,
-0.06876993179321289,
-0.007186995819211006,
0.3281004726886749,
-0.3965388536453247,
0.1674380600452423,
-0.2114279866218567,
0.11362078785896301,
-0.016598744317889214,
-0.1674189418554306,
-0.07854411005973816,
-0.1988440454006195,
0.3792034387588501,
0.15179863572120667,
0.012066038325428963,
0.1350005865097046,
-0.492409348487854,
0.09297508746385574,
0.19183912873268127,
0.015093114227056503,
-0.27990835905075073,
-0.21209029853343964,
0.20067550241947174,
-0.2794841527938843,
-0.016871001571416855,
0.09855489432811737,
0.05221065133810043,
-0.5094671845436096,
-0.5784571766853333,
-0.2209508717060089,
-0.047507502138614655,
0.18430380523204803,
-0.1863451600074768,
0.46886777877807617,
0.4938212037086487,
-0.42249542474746704,
-0.09088779985904694,
-0.162538081407547,
-0.40953606367111206,
-0.1629955768585205,
0.1909227818250656,
0.23173031210899353,
-0.2619764506816864,
-0.525792121887207,
0.3772038221359253,
0.16688328981399536,
-0.17540958523750305,
-0.5723853707313538,
0.24170799553394318,
-0.03161201998591423,
0.09342819452285767,
0.32073062658309937,
0.038067374378442764,
0.024249019101262093,
-0.21884338557720184,
-0.3573228716850281,
-0.07082810252904892,
-0.10244987905025482,
-0.06594109535217285,
-0.035315945744514465,
-0.1852172315120697,
0.3665187954902649,
0.25345295667648315,
0.21656890213489532,
-0.16320174932479858,
0.10640482604503632,
-0.17370663583278656,
0.33281728625297546,
-0.10140272974967957,
-0.04689518362283707,
-0.04289877414703369,
0.4207330346107483,
0.16750654578208923,
0.06069575250148773,
-0.21578997373580933,
-0.468148410320282,
0.10206355899572372,
-0.41387009620666504,
0.20649459958076477,
-0.24342192709445953,
-0.16850963234901428,
-0.23799577355384827,
-0.060560181736946106,
-0.3474184572696686,
-0.37017127871513367,
0.208937868475914,
0.22244514524936676,
0.023291755467653275,
0.40660133957862854,
-0.02403503842651844,
0.22387534379959106,
-0.2261943519115448,
0.03756305202841759,
-0.23536984622478485,
0.4142211079597473,
-0.4223569631576538,
-0.14831854403018951,
0.088939368724823,
0.10752277076244354,
0.32452112436294556,
-0.1115843877196312,
-0.0402807854115963,
0.26115167140960693,
0.11481878906488419,
0.2955097556114197,
0.26112666726112366,
0.28191226720809937,
-0.009218420833349228,
-0.2188243865966797,
0.13862475752830505,
0.32670271396636963,
0.059754081070423126,
-0.04544728249311447,
-0.16304612159729004,
0.12729859352111816,
-0.04556878283619881,
0.34252622723579407,
0.04148879647254944,
0.24299943447113037,
0.2762942910194397,
0.02150731161236763,
0.024422662332654,
-0.2613932490348816,
0.29312896728515625,
0.14740365743637085,
-0.16096115112304688,
0.08348405361175537,
-0.25095099210739136,
0.05656495317816734,
0.3434227406978607,
-0.03230571001768112,
-0.1484285295009613,
0.19549807906150818,
-0.03945542126893997,
-0.14123976230621338,
0.2489539235830307,
0.14061422646045685,
0.15274237096309662,
0.22365747392177582,
-0.16043010354042053,
0.3566879332065582,
0.035669393837451935,
-0.2239997386932373,
0.2177109718322754,
-0.04301904886960983,
0.013717318885028362,
0.4245605766773224,
-0.0422639437019825,
-0.08143076300621033,
-0.3046190142631531,
-0.20714256167411804,
-0.16320641338825226,
0.25282806158065796,
-0.30155161023139954,
-0.251899778842926,
-0.41295143961906433,
-0.4957467019557953,
0.05884409323334694,
0.0786760002374649,
-0.33338382840156555,
-0.45723897218704224,
0.1421697735786438,
0.22167238593101501,
-0.09872554242610931,
0.2090456187725067,
-0.17317087948322296,
0.24193549156188965,
-0.11396704614162445,
0.2913365662097931,
-0.5474679470062256,
-0.18390069901943207,
-0.13656118512153625,
0.06888754665851593,
0.37279990315437317,
-0.10356646031141281,
0.33705538511276245,
-0.479592889547348,
0.2103765904903412,
-0.6396743655204773,
-0.44642171263694763,
0.019928596913814545,
-0.16441220045089722,
0.29022854566574097,
0.19284185767173767,
0.1816011369228363,
0.059210143983364105,
-0.0460769385099411,
0.3003067076206207,
-0.41940441727638245,
-0.11075840145349503,
-0.028011050075292587,
0.0954337865114212,
0.0077041685581207275,
-0.05039764568209648,
-0.3191339373588562,
-0.38619235157966614,
-0.4883228838443756,
0.15826791524887085,
0.1662679761648178,
0.15218518674373627,
0.14094378054141998,
-0.028243038803339005,
0.09897366166114807,
0.00662381574511528,
-0.11058720201253891,
-0.20515936613082886,
-0.1997397243976593,
0.5371298789978027,
-0.2988434135913849,
-0.4845493733882904,
0.4596538841724396,
0.2461630254983902,
0.032667674124240875,
-0.15200018882751465,
-0.5278031826019287,
0.07615668326616287,
0.06179415434598923,
0.036012712866067886,
0.11437173187732697,
0.05197453498840332,
0.3753180503845215,
0.05202639847993851,
-0.045973386615514755,
0.010932128876447678,
-0.19943159818649292,
-0.045965708792209625,
0.01164359599351883,
-0.017676018178462982,
0.00909486599266529,
0.24308562278747559,
0.009506776928901672,
0.1972614824771881,
0.2570553719997406,
0.2163061499595642,
0.4539131820201874,
-0.2541586756706238,
0.4063953757286072,
-0.1378764808177948,
-0.2930338680744171,
0.4598037302494049,
0.10608644783496857,
0.11542229354381561,
0.32641345262527466,
0.0016912193968892097,
0.07157457619905472,
-0.35399341583251953,
-0.1815870702266693,
-0.468757688999176,
-0.1601565182209015,
-0.053331159055233,
0.04901701956987381,
0.1776736080646515,
-0.029140077531337738,
0.007738761603832245,
-0.10656192898750305,
-0.3358449935913086,
0.07901602983474731,
0.285683810710907,
0.22010627388954163,
-0.02234281226992607,
0.005947902798652649,
0.17985787987709045,
-0.3741641342639923,
0.5682436227798462,
-0.005628390237689018,
0.03351886570453644,
-0.3174564242362976,
-0.008176133036613464,
0.16797217726707458,
-0.06151849403977394,
0.9672978520393372,
-0.07684041559696198,
0.024663856253027916,
0.09039413928985596,
-0.18889358639717102,
-0.3805987238883972,
-0.08250097930431366,
-0.04345252737402916,
-0.19389961659908295,
-0.010961353778839111,
0.029293596744537354,
-0.08476363867521286,
-0.40471017360687256,
0.43285074830055237,
0.029583141207695007,
-0.2915894091129303,
-0.18727216124534607,
0.054201338440179825,
-0.21097496151924133,
-0.30714523792266846,
-0.32626858353614807,
-0.17717239260673523,
0.299467533826828,
-0.10599496960639954,
-0.020558638498187065,
-0.13551972806453705,
-0.1301030069589615,
0.12266331166028976,
0.09609200060367584,
0.38242247700691223,
0.043946120887994766,
0.14903342723846436,
0.4166417419910431,
0.4730416536331177,
0.40447798371315,
0.2962324619293213,
0.2796943485736847,
-0.2856493592262268,
0.18086206912994385,
-0.02164979837834835,
0.16757512092590332,
0.21912157535552979,
-0.10220638662576675,
-0.2179833948612213,
-0.06132125109434128,
0.3273444175720215,
-0.2352660894393921,
0.0482255183160305,
0.561455249786377,
0.04285157844424248,
-0.3497512638568878,
-0.3499157130718231,
0.2815818190574646,
0.2569933533668518,
-0.001501716673374176,
0.03456570953130722,
0.5652727484703064,
0.05328940600156784,
-0.12210714817047119,
-0.16624832153320312,
0.7149508595466614,
0.17818859219551086,
0.15396945178508759,
0.33501869440078735,
-0.18326152861118317,
0.4813270568847656,
-0.3837893605232239,
0.11578541249036789,
-0.2814028561115265,
-0.4068155884742737,
-0.2003227025270462,
-0.05046083405613899,
0.442067950963974,
-0.033685460686683655,
-0.05368262156844139,
0.3251460790634155,
-0.012538827955722809,
0.35286396741867065,
0.1124107614159584,
0.21781125664710999,
-0.24122047424316406,
0.04504629969596863,
-0.06365779042243958,
0.18468569219112396,
-0.1652233898639679,
0.17864249646663666,
-0.058446478098630905,
-0.0064443424344062805,
0.029484745115041733,
-0.15106624364852905,
-0.294467031955719,
0.24090632796287537,
-0.15495142340660095,
0.04282283037900925,
0.003917492926120758,
-0.22747188806533813,
0.2397732436656952,
0.618121325969696,
-0.2788180112838745,
0.06750352680683136,
-0.20115570724010468,
0.15919306874275208,
-0.3056955337524414,
-0.11378925293684006,
0.02057262696325779,
0.2292235940694809,
0.19275148212909698,
-0.18313655257225037,
-0.3599517047405243,
-0.0315345898270607,
0.13117128610610962,
0.060958996415138245,
-0.14684025943279266,
-0.17972423136234283,
-0.04213544726371765,
-0.21170386672019958,
-0.26852384209632874,
-0.2466646432876587,
-0.0896359533071518,
-0.16849380731582642,
0.13368597626686096,
-0.13099712133407593,
-0.20114636421203613,
0.01014314591884613,
-0.03427118435502052,
-0.062333591282367706,
-0.10467590391635895,
0.3305598199367523,
-0.28708088397979736,
-0.02525343745946884,
0.5357763767242432,
0.26697248220443726,
-0.285153329372406,
-0.2594321072101593,
-0.0119420625269413,
0.22428074479103088,
-0.40585651993751526,
0.012878090143203735,
0.2510733902454376,
0.014308735728263855,
0.008021150715649128,
0.2534833252429962,
0.13488176465034485,
-0.1054997369647026,
-0.04480142518877983,
-0.422490656375885,
-0.04402404651045799,
0.08984152972698212,
0.07804624736309052,
0.2383771687746048,
-0.014947889372706413,
-0.002636978402733803,
0.1318172961473465,
-0.031637705862522125,
-0.33253467082977295,
0.010806383565068245,
-0.2096467763185501,
-0.15660417079925537,
0.06830382347106934,
0.06901519000530243,
0.12873290479183197,
-0.06825559586286545,
0.1909940540790558,
0.24874025583267212,
-0.25613877177238464,
-0.20189863443374634,
-0.03251033276319504,
0.14779949188232422,
0.17547762393951416,
-0.17521069943904877,
0.009110944345593452,
-0.07479953020811081,
-0.17724353075027466,
-0.06845859438180923,
-0.034977152943611145,
0.16191357374191284,
0.030675340443849564,
0.10703670233488083,
0.15288005769252777,
-0.429092675447464,
0.17491032183170319,
0.16564622521400452,
0.06491680443286896,
0.417380154132843,
-0.12379826605319977,
0.0437675341963768,
-0.04511414095759392,
-0.011750675737857819,
0.012262440286576748,
0.18747544288635254,
-0.08380387723445892,
0.008684800937771797,
0.32645756006240845,
-0.22759775817394257,
-0.07543271780014038,
0.2065185010433197,
0.5029147863388062,
0.24615328013896942,
-0.1789129227399826,
0.008137276396155357,
0.4332059621810913,
0.17819641530513763,
-0.4986255168914795,
0.1850813329219818,
0.5901186466217041,
-0.0063717542216181755,
0.16540512442588806,
0.011003196239471436,
0.10087643563747406,
-0.008811786770820618,
0.17257685959339142,
0.15313443541526794,
0.4076201021671295,
0.04373606666922569,
0.255677193403244,
0.32272541522979736,
-0.04250704124569893,
0.14379319548606873,
0.18874138593673706,
0.11451904475688934,
0.05904190242290497,
0.2167564332485199,
-0.3946991264820099,
-0.05618206411600113,
-0.3320879340171814,
0.3062717914581299,
0.1512756049633026,
-0.45139241218566895,
-0.08252501487731934,
0.03885223716497421,
-0.16357558965682983,
-0.17084980010986328,
-0.1705392301082611,
0.31968075037002563,
-0.09972487390041351,
0.014692692086100578,
-0.3170955181121826,
0.3626927435398102,
-0.1520749032497406,
0.23494194447994232,
-0.24159464240074158,
-0.35418540239334106,
-0.21249140799045563,
0.11273051798343658,
0.13947227597236633,
-0.28779029846191406,
-0.06371261179447174,
0.16826094686985016,
-0.2379096895456314,
-0.12289401888847351,
0.13789325952529907,
-0.1408686339855194,
0.1683911830186844,
-0.021293971687555313,
0.06570068001747131,
0.28397053480148315,
0.21419379115104675,
0.15152515470981598,
0.5945020914077759,
0.5749784708023071,
0.16817478835582733,
-0.18459920585155487,
0.13540314137935638,
-0.0885152667760849,
-0.0917658880352974,
-0.06902946531772614,
0.2665982246398926,
-0.11859361827373505,
-0.031576674431562424,
0.14492106437683105,
0.16846297681331635,
-0.1958436518907547,
-0.057265277951955795,
-0.04114813730120659,
0.18928590416908264,
-0.050830330699682236,
0.44362589716911316,
-0.35274672508239746,
0.11681344360113144,
-0.20871199667453766,
-0.23586168885231018,
-0.5215508341789246,
-0.26326149702072144,
0.2474803626537323,
-0.01647820509970188,
0.021657656878232956,
-0.21512563526630402,
0.10364076495170593,
0.022149929776787758,
0.37423181533813477,
0.2381567358970642,
0.3474087417125702,
-0.17785397171974182,
-0.399627685546875,
-0.7298880815505981,
0.2546955347061157,
0.31547561287879944,
-0.07647623121738434,
0.06727702915668488,
-0.16847549378871918,
-0.10189465433359146,
-0.14618976414203644,
0.4516276717185974,
0.2861805558204651,
0.029878180474042892,
0.1343982070684433,
-0.22024928033351898,
0.1400051862001419,
-0.12393549084663391,
0.0036634840071201324,
0.06561491638422012,
-0.06377685070037842,
0.2110985517501831,
-0.11167500913143158,
0.04205460101366043,
-0.04866683483123779,
0.4352837800979614,
-0.46006351709365845,
-0.48643144965171814,
0.25414788722991943,
0.17143940925598145,
0.4771338701248169,
0.008581716567277908,
0.12714089453220367,
-0.02677285298705101,
-0.14199954271316528,
-0.2055814266204834,
0.24694257974624634,
0.0269046388566494,
0.2828855812549591,
-0.27113810181617737,
-0.44662055373191833,
-0.1778784841299057,
-0.0522649772465229,
-0.10590960085391998,
0.31079548597335815,
-0.22843383252620697,
0.08913715183734894,
-0.1390351951122284,
-0.004597244318574667,
0.2726990878582001,
0.06820374727249146,
-0.05060636252164841,
0.11875046789646149,
-0.2019900679588318,
-0.22919633984565735,
0.6052818298339844,
-0.08117034286260605,
-0.12353892624378204,
-0.07033532857894897,
-0.001761995255947113,
-0.1503225862979889,
-0.07385928183794022,
-0.14594264328479767,
0.16445201635360718,
0.23845674097537994,
0.11639489978551865,
0.05470525100827217,
0.09946808218955994,
-0.4292103946208954,
-0.24089938402175903,
-0.07417808473110199,
-0.16201113164424896,
0.2206869125366211,
-0.05676957219839096,
0.09298579394817352,
-0.03340259939432144
] |
https://github.com/huggingface/datasets/issues/4477 | Dataset Viewer issue for fgrezes/WIESP2022-NER | Apparently it finds `scoring-scripts/compute_seqeval.py` which matches `**eval*`, a regex that detects a test split. We should probably improve the regex because it's not supposed to catch this kind of files. It must also only check for files with supported extensions: txt, csv, png etc. | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 44 | Dataset Viewer issue for fgrezes/WIESP2022-NER
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Apparently it finds `scoring-scripts/compute_seqeval.py` which matches `**eval*`, a regex that detects a test split. We should probably improve the regex because it's not supposed to catch this kind of files. It must also only check for files with supported extensions: txt, csv, png etc. | [
-0.6337704658508301,
0.39804190397262573,
-0.05149029195308685,
0.19421985745429993,
0.1848124861717224,
-0.07042665779590607,
0.18268021941184998,
0.5746141076087952,
0.017154686152935028,
0.12912003695964813,
-0.08567668497562408,
0.025144238024950027,
0.07798018306493759,
0.40540528297424316,
-0.12300083041191101,
0.28096577525138855,
-0.03627046197652817,
0.20940834283828735,
-0.06921733915805817,
0.1376928985118866,
-0.272421658039093,
0.29897162318229675,
-0.344948947429657,
0.306491494178772,
-0.5700045228004456,
0.001173475757241249,
0.005652928724884987,
-0.00499243289232254,
-0.17575888335704803,
-0.3891463577747345,
-0.018151579424738884,
0.039186250418424606,
-0.047234561294317245,
0.5177563428878784,
-0.00010742063022917137,
0.05264780670404434,
0.2658042311668396,
-0.057520218193531036,
0.02899673953652382,
-0.15251894295215607,
0.03837588429450989,
-0.11695867031812668,
0.10362201184034348,
-0.1304894983768463,
0.058573223650455475,
-0.48982709646224976,
0.20011639595031738,
-0.19334562122821808,
0.20753014087677002,
0.6008709073066711,
0.23870781064033508,
-0.13430015742778778,
-0.05661396682262421,
-0.07510899007320404,
0.36613255739212036,
0.002254493534564972,
-0.16473862528800964,
-0.17056095600128174,
-0.1527726799249649,
-0.2741585969924927,
-0.4415987730026245,
0.32056576013565063,
-0.0650305226445198,
-0.03591031953692436,
-0.01053205132484436,
0.07174138724803925,
0.23763078451156616,
-0.46345803141593933,
0.20780593156814575,
0.12895789742469788,
0.3549155592918396,
-0.07170385867357254,
0.05010990798473358,
-0.34864541888237,
-0.11018328368663788,
0.12460553646087646,
0.275838702917099,
0.3413635194301605,
-0.23389673233032227,
0.15632395446300507,
-0.010028712451457977,
0.05099113658070564,
-0.2467561811208725,
-0.1625552922487259,
-0.3027688264846802,
-0.02882135659456253,
0.03524559363722801,
0.06703484058380127,
0.32871177792549133,
0.062138624489307404,
0.02189159020781517,
0.04991981387138367,
-0.17437824606895447,
-0.020123731344938278,
-0.4616858959197998,
0.10709907114505768,
0.05473977327346802,
0.002282276749610901,
0.028229601681232452,
0.5140683650970459,
-0.09407486766576767,
0.15732333064079285,
0.23416277766227722,
0.11615711450576782,
0.2662520706653595,
-0.03498872369527817,
0.30703333020210266,
0.09789951890707016,
0.40046465396881104,
0.2261679321527481,
-0.21787559986114502,
-0.02761460840702057,
0.12523572146892548,
-0.4563617408275604,
-0.1404704451560974,
-0.24406477808952332,
0.20064786076545715,
-0.23595213890075684,
-0.31930896639823914,
0.22806286811828613,
-0.13034430146217346,
-0.15253062546253204,
-0.018491070717573166,
0.4280601143836975,
-0.06627392768859863,
0.08186741173267365,
-0.01679517701268196,
0.1826339066028595,
-0.10315036028623581,
-0.25769945979118347,
-0.19872590899467468,
-0.00271499902009964,
-0.13831382989883423,
-0.06303208321332932,
0.2514615058898926,
-0.2834602892398834,
0.07364041358232498,
-0.09563788771629333,
0.0766676515340805,
-0.2959967851638794,
0.22567883133888245,
-0.15244165062904358,
-0.055585138499736786,
0.3454059362411499,
0.07153542339801788,
-0.06784689426422119,
0.2286514788866043,
-0.4891667366027832,
0.054113246500492096,
0.28737524151802063,
-0.011494368314743042,
-0.1982395052909851,
-0.017425423488020897,
0.2782914936542511,
-0.18743960559368134,
0.04325111210346222,
0.27662393450737,
0.0900709480047226,
-0.36597374081611633,
-0.4413279592990875,
-0.14912140369415283,
-0.059788577258586884,
0.07208502292633057,
-0.18269971013069153,
0.3029159903526306,
0.4275844693183899,
-0.5620486736297607,
-0.023716766387224197,
-0.30584558844566345,
-0.48216572403907776,
0.13644365966320038,
0.22815962135791779,
0.1691688448190689,
-0.12116836756467819,
-0.4149547219276428,
0.8236671090126038,
0.3868233859539032,
0.008847542107105255,
-0.33144375681877136,
0.5814123749732971,
-0.1478087306022644,
-0.12681154906749725,
0.37538328766822815,
0.026131117716431618,
0.2366533875465393,
-0.14161927998065948,
-0.3975188732147217,
0.09636855870485306,
-0.0975060760974884,
-0.019380634650588036,
-0.2919897139072418,
0.004629924893379211,
0.17471107840538025,
0.22205939888954163,
0.3685207664966583,
-0.348042756319046,
0.21776708960533142,
-0.24817699193954468,
0.29261550307273865,
-0.09090286493301392,
-0.07396285235881805,
-0.2823309302330017,
0.4403013288974762,
0.12178651243448257,
0.1617583930492401,
-0.2045229971408844,
-0.16954049468040466,
0.014849148690700531,
-0.34558379650115967,
-0.020764410495758057,
-0.1580228954553604,
-0.28209853172302246,
-0.4253866374492645,
0.13432592153549194,
-0.31659984588623047,
-0.3770269751548767,
0.2623346149921417,
0.0774090588092804,
-0.289451003074646,
0.3508375287055969,
0.012468572705984116,
0.05356013774871826,
-0.12937188148498535,
0.10726103186607361,
0.1791921705007553,
0.17122898995876312,
-0.38105735182762146,
-0.2403089553117752,
0.09902070462703705,
0.004188768565654755,
0.2766779661178589,
0.019222499802708626,
-0.10741304606199265,
0.4944706857204437,
0.3159734904766083,
0.12336179614067078,
0.2922723889350891,
0.15177509188652039,
-0.12840156257152557,
-0.06749381870031357,
0.02044583112001419,
0.2639773190021515,
-0.06432992219924927,
-0.22473955154418945,
-0.23009565472602844,
0.1452859789133072,
-0.21579419076442719,
0.28020498156547546,
-0.07043447345495224,
0.21981169283390045,
0.24812602996826172,
-0.12050570547580719,
0.05675411969423294,
-0.2261679321527481,
0.21273073554039001,
-0.06792367994785309,
-0.2800697386264801,
0.22155168652534485,
-0.18968318402767181,
0.049333859235048294,
0.4306815266609192,
-0.20378755033016205,
-0.024777889251708984,
0.2600914537906647,
0.049769796431064606,
-0.154963880777359,
0.08810440450906754,
0.34714025259017944,
0.2743198573589325,
0.14326629042625427,
0.058226630091667175,
0.2542686462402344,
0.02323717251420021,
-0.41337788105010986,
0.3579762578010559,
0.0697346106171608,
0.07454952597618103,
0.44025519490242004,
-0.09708497673273087,
-0.2561783194541931,
-0.29121801257133484,
-0.07342860847711563,
-0.15227603912353516,
0.1415075957775116,
-0.34562772512435913,
0.04238501191139221,
-0.33401963114738464,
-0.429158478975296,
-0.2382960319519043,
0.3636320233345032,
-0.23220640420913696,
-0.5267207026481628,
0.37222152948379517,
0.17598916590213776,
-0.1621624231338501,
0.3240422010421753,
-0.14670825004577637,
0.4570745825767517,
-0.07079009711742401,
0.18666039407253265,
-0.3559589982032776,
-0.20291759073734283,
-0.29289600253105164,
0.1403302401304245,
0.5606364607810974,
-0.010091579519212246,
0.21349996328353882,
-0.16118957102298737,
0.2326376736164093,
-0.3657112717628479,
-0.336611270904541,
0.1606980413198471,
-0.24937205016613007,
0.5651077032089233,
0.21257776021957397,
-0.08588914573192596,
0.12431913614273071,
-0.15584436058998108,
0.08791156113147736,
-0.35815683007240295,
-0.14806321263313293,
0.13584226369857788,
0.20462554693222046,
0.1686389446258545,
-0.2028464674949646,
-0.497374027967453,
-0.06451459228992462,
-0.35800090432167053,
0.25023701786994934,
0.19159594178199768,
0.059565361589193344,
-0.008202116005122662,
0.041434433311223984,
0.12648554146289825,
0.02137514017522335,
-0.028778856620192528,
-0.2057923525571823,
0.11670070886611938,
0.3744288682937622,
-0.2906441390514374,
-0.46294966340065,
0.391645610332489,
0.18154600262641907,
0.06534866988658905,
-0.049813371151685715,
-0.5482722520828247,
0.22471843659877777,
0.04115696996450424,
0.0031337477266788483,
0.009865783154964447,
-0.17362411320209503,
0.1842857301235199,
0.10398003458976746,
-0.1845923811197281,
-0.1045156866312027,
0.19379538297653198,
0.18759040534496307,
-0.35228678584098816,
-0.14977231621742249,
-0.21157881617546082,
0.1846858263015747,
0.3010222613811493,
0.4452900290489197,
0.0487782247364521,
0.3730667531490326,
0.09327966719865799,
-0.2584141790866852,
0.3473367989063263,
-0.025964118540287018,
-0.12464767694473267,
0.376120924949646,
-0.15328043699264526,
-0.10221929103136063,
0.4431426525115967,
-0.1208316758275032,
-0.0816914439201355,
-0.07249300926923752,
-0.02194157987833023,
-0.2838374972343445,
-0.28705957531929016,
0.1758211851119995,
0.00278376042842865,
0.1356220245361328,
0.04499148204922676,
0.13401636481285095,
0.07338356971740723,
-0.2820991575717926,
-0.06780478358268738,
0.14348840713500977,
0.08884309977293015,
-0.18654297292232513,
0.16226191818714142,
0.3110682964324951,
-0.04868347942829132,
0.3836306929588318,
-0.049320194870233536,
-0.05610600858926773,
-0.25529608130455017,
-0.2541818916797638,
0.32315048575401306,
0.046466004103422165,
0.9282103776931763,
-0.1442410945892334,
-0.12332622706890106,
0.12494850158691406,
0.05357329547405243,
-0.18937446177005768,
-0.05012093111872673,
-0.3450513482093811,
-0.14610353112220764,
0.375792920589447,
0.10825774818658829,
-0.24241071939468384,
-0.2064582258462906,
0.4215007722377777,
-0.038221199065446854,
-0.2321658879518509,
-0.10099469125270844,
-0.05594644322991371,
-0.1120024099946022,
-0.3499048352241516,
0.07579060643911362,
0.10793843120336533,
0.1501043736934662,
-0.29562634229660034,
0.018206819891929626,
-0.23252056539058685,
-0.17191335558891296,
0.18271446228027344,
0.21045763790607452,
0.23792454600334167,
-0.24291278421878815,
0.09012453258037567,
0.11906839162111282,
0.15337401628494263,
0.1284475028514862,
0.17738641798496246,
0.29204362630844116,
-0.1653081178665161,
0.18736115097999573,
-0.4403798580169678,
0.3212401866912842,
0.26171156764030457,
-0.2922312021255493,
-0.04371332377195358,
-0.37120556831359863,
0.2753032445907593,
-0.19756385684013367,
0.16602638363838196,
0.6864751577377319,
-0.07270268350839615,
-0.08869317173957825,
-0.27553969621658325,
0.2900601625442505,
0.21099193394184113,
-0.23811425268650055,
0.08159526437520981,
0.13753095269203186,
0.02279048040509224,
0.1505603790283203,
0.04274161159992218,
0.8001027703285217,
0.04503249377012253,
0.030482392758131027,
0.3609682619571686,
-0.21497006714344025,
0.3367269039154053,
-0.5444074869155884,
0.12374316155910492,
-0.3566168546676636,
-0.5836950540542603,
-0.04873368889093399,
-0.10192295908927917,
0.3989837169647217,
0.19447273015975952,
-0.17652620375156403,
0.18284790217876434,
0.07257720828056335,
0.1322602480649948,
0.1829405277967453,
0.22627341747283936,
-0.0850134789943695,
0.07891504466533661,
0.080784372985363,
0.1668938845396042,
-0.07761141657829285,
-0.07730919122695923,
0.06830079853534698,
-0.05636703222990036,
0.10640521347522736,
-0.06549481302499771,
-0.2912060618400574,
0.24147406220436096,
0.06657449156045914,
0.09072905033826828,
-0.026640858501195908,
-0.10180725902318954,
0.16183538734912872,
0.49003782868385315,
-0.4242386817932129,
0.19835960865020752,
-0.03537844866514206,
0.21301138401031494,
-0.18223071098327637,
0.07030747085809708,
0.20840629935264587,
0.1164361983537674,
0.3441450297832489,
-0.22747814655303955,
-0.3318009376525879,
0.004284173250198364,
0.12615051865577698,
-0.09654378890991211,
0.05641087889671326,
-0.0669579803943634,
-0.1152869164943695,
-0.3581709861755371,
-0.18735823035240173,
-0.28961777687072754,
-0.1288389265537262,
-0.20791712403297424,
0.17591629922389984,
-0.182197704911232,
-0.13110269606113434,
0.251666396856308,
-0.1245795488357544,
-0.18484604358673096,
-0.1428195983171463,
0.10875564068555832,
-0.20920053124427795,
0.05916537344455719,
0.4243350625038147,
0.11409702897071838,
-0.280737042427063,
-0.3890068829059601,
0.04429745674133301,
-0.07483518868684769,
-0.4822656214237213,
0.1290031224489212,
0.09391768276691437,
-0.1156402975320816,
0.1105160191655159,
0.12991748750209808,
0.22409838438034058,
0.009138159453868866,
-0.17465199530124664,
-0.3605721592903137,
0.12869583070278168,
-0.054798901081085205,
0.007850326597690582,
0.10828739404678345,
-0.053151022642850876,
-0.029232624918222427,
0.056338660418987274,
0.1405961513519287,
-0.37651029229164124,
0.09046537429094315,
-0.24910400807857513,
-0.07745298743247986,
-0.07052279263734818,
0.0940263420343399,
0.09230682998895645,
0.03227343037724495,
0.20212487876415253,
0.37935948371887207,
-0.10827435553073883,
-0.22775474190711975,
-0.05841368809342384,
0.1334957778453827,
0.04523526877164841,
0.004552672151476145,
-0.07486023753881454,
0.10621058940887451,
-0.22671416401863098,
-0.04954705014824867,
-0.056043341755867004,
-0.10613106191158295,
-0.04230119287967682,
0.12949317693710327,
0.20740967988967896,
-0.22111475467681885,
0.03486227989196777,
0.058546870946884155,
-0.2631447911262512,
0.4770076870918274,
-0.07894176244735718,
0.11132348328828812,
-0.10357233881950378,
-0.08120245486497879,
0.10661865770816803,
0.15945008397102356,
-0.047052621841430664,
0.16177898645401,
0.4097588360309601,
-0.10838530957698822,
-0.15749810636043549,
0.1342368870973587,
0.5958585739135742,
0.5013958215713501,
-0.10718951374292374,
-0.19926561415195465,
0.2627731263637543,
0.21266938745975494,
-0.39004722237586975,
0.045532237738370895,
0.3273841142654419,
-0.10414357483386993,
0.18543028831481934,
0.16021683812141418,
0.12908123433589935,
0.00035465508699417114,
0.31624841690063477,
0.28154826164245605,
0.30906468629837036,
0.04239210858941078,
0.12997926771640778,
0.3899179697036743,
-0.21362745761871338,
0.18590520322322845,
0.32241642475128174,
-0.1888151317834854,
0.08857378363609314,
0.31213200092315674,
-0.23422503471374512,
0.17988353967666626,
-0.31823617219924927,
0.135298490524292,
-0.032087452709674835,
-0.3278220295906067,
0.0663791373372078,
0.213950514793396,
-0.23124182224273682,
-0.06589052826166153,
0.010962478816509247,
0.3720862865447998,
0.11006814241409302,
-0.0023358305916190147,
-0.2946266829967499,
0.173106387257576,
-0.09218858927488327,
0.14584724605083466,
-0.3066711127758026,
-0.3102792799472809,
-0.44556012749671936,
0.07523415982723236,
0.14606095850467682,
0.04292178899049759,
-0.13157926499843597,
0.2700050473213196,
-0.04693041741847992,
0.06503218412399292,
0.09838438034057617,
-0.3442877233028412,
0.2911626994609833,
-0.28714972734451294,
-0.08301831781864166,
0.18289661407470703,
0.2666109800338745,
0.39239251613616943,
0.2877380847930908,
0.44420304894447327,
0.12137331813573837,
-0.20986124873161316,
-0.22324778139591217,
-0.2751222550868988,
-0.09243251383304596,
-0.09679623693227768,
0.4091615378856659,
-0.08190298080444336,
0.22768425941467285,
0.36605826020240784,
0.17771483957767487,
-0.21632136404514313,
-0.04382451996207237,
0.15518587827682495,
-0.09526339173316956,
-0.31228435039520264,
0.3219965994358063,
-0.02890174463391304,
0.00965707004070282,
-0.3063321113586426,
-0.3948976695537567,
-0.3180052936077118,
-0.10250508040189743,
0.24967440962791443,
-0.1850953847169876,
0.13301539421081543,
-0.2779468595981598,
0.1307869255542755,
0.2097013294696808,
0.5062229633331299,
-0.030721593648195267,
0.18254496157169342,
-0.20893509685993195,
-0.29579758644104004,
-0.8508298993110657,
0.3812752366065979,
0.13857510685920715,
-0.02132090926170349,
0.06401729583740234,
0.01603340543806553,
-0.10596460849046707,
0.09665317088365555,
0.16886280477046967,
0.21632899343967438,
-0.05505892634391785,
0.24298645555973053,
-0.30782705545425415,
-0.023334067314863205,
-0.13581953942775726,
-0.0798979178071022,
-0.0705093964934349,
-0.11864931881427765,
0.36810436844825745,
-0.2672964334487915,
0.1595098078250885,
0.1338944435119629,
-0.11242295801639557,
-0.1117991954088211,
-0.2849217653274536,
0.2261829823255539,
0.17297348380088806,
0.4510975778102875,
-0.13680827617645264,
0.31594371795654297,
-0.08452636003494263,
-0.056800905615091324,
-0.27422696352005005,
0.22862926125526428,
0.14876914024353027,
0.2393629550933838,
-0.16527509689331055,
-0.11451363563537598,
-0.2127964198589325,
0.18110787868499756,
-0.026762763038277626,
0.3084038496017456,
-0.10965485870838165,
-0.03664575144648552,
-0.004264701157808304,
0.06539531797170639,
0.15393662452697754,
0.1425451636314392,
-0.10550455749034882,
0.08257885277271271,
-0.15305209159851074,
-0.4354943335056305,
0.34732213616371155,
-0.2072106897830963,
-0.16127455234527588,
-0.09858060628175735,
0.17798417806625366,
0.06066212058067322,
0.014022039249539375,
-0.07107914239168167,
-0.04744655266404152,
0.28215500712394714,
0.12934863567352295,
0.05473313853144646,
-0.0213700532913208,
-0.26381927728652954,
-0.22428520023822784,
-0.10239878296852112,
-0.09362423419952393,
0.23107320070266724,
-0.06175626069307327,
0.14866577088832855,
-0.16737137734889984
] |
https://github.com/huggingface/datasets/issues/4476 | `to_pandas` doesn't take into account format. | Thanks for opening a discussion :)
Note that you can use `.remove_columns(...)` to keep only the ones you're interested in before calling `.to_pandas()` | **Is your feature request related to a problem? Please describe.**
I have a large dataset that I need to convert part of to pandas to do some further analysis. Calling `to_pandas` directly on it is expensive. So I thought I could simply select the columns that I want and then call `to_pandas`.
**Describe the solution you'd like**
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format(columns=['a', 'b']).to_pandas()
# I would expect `pandas_df` to only include a,b as column.
```
**Describe alternatives you've considered**
I could remove all columns that I don't want? But I don't know all of them in advance.
**Additional context**
I can probably make a PR with some pointers.
| 23 | `to_pandas` doesn't take into account format.
**Is your feature request related to a problem? Please describe.**
I have a large dataset that I need to convert part of to pandas to do some further analysis. Calling `to_pandas` directly on it is expensive. So I thought I could simply select the columns that I want and then call `to_pandas`.
**Describe the solution you'd like**
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format(columns=['a', 'b']).to_pandas()
# I would expect `pandas_df` to only include a,b as column.
```
**Describe alternatives you've considered**
I could remove all columns that I don't want? But I don't know all of them in advance.
**Additional context**
I can probably make a PR with some pointers.
Thanks for opening a discussion :)
Note that you can use `.remove_columns(...)` to keep only the ones you're interested in before calling `.to_pandas()` | [
0.042921606451272964,
-0.19340446591377258,
-0.06355650722980499,
-0.11052922904491425,
0.4232199192047119,
0.28547611832618713,
0.3418155908584595,
0.5453059077262878,
-0.08412414789199829,
0.14698955416679382,
-0.1475684493780136,
0.24611078202724457,
-0.09738370776176453,
0.4628264307975769,
-0.03511510044336319,
-0.38297393918037415,
0.26856210827827454,
0.40522655844688416,
-0.13007672131061554,
0.13589993119239807,
-0.3760130703449249,
-0.21455073356628418,
-0.07557297497987747,
-0.16253100335597992,
-0.08044539391994476,
-0.03370744735002518,
-0.1659332662820816,
-0.020189180970191956,
-0.036025360226631165,
-0.15185968577861786,
0.06059608608484268,
-0.014818459749221802,
0.10513975471258163,
0.2531522512435913,
-0.0001059966889442876,
-0.33182424306869507,
-0.10008420050144196,
-0.024196460843086243,
-0.19305749237537384,
0.03744053840637207,
-0.21082338690757751,
-0.45791518688201904,
0.3904064893722534,
-0.46806544065475464,
-0.18640056252479553,
-0.3815743923187256,
-0.3411438763141632,
0.020524337887763977,
0.09492982923984528,
0.3055018186569214,
0.2677336037158966,
-0.08605832606554031,
0.058473702520132065,
-0.12060467898845673,
-0.20409029722213745,
0.13040724396705627,
-0.01835302636027336,
0.0826227217912674,
0.019116461277008057,
0.09879812598228455,
0.3843158483505249,
0.2502433955669403,
-0.4350198209285736,
-0.14893893897533417,
-0.01079973578453064,
-0.004832346923649311,
0.10725380480289459,
-0.2903234362602234,
0.33216384053230286,
0.2255955934524536,
0.5544637441635132,
-0.18289893865585327,
-0.3167814612388611,
-0.2665620744228363,
0.032029375433921814,
-0.508189857006073,
-0.25630804896354675,
-0.039851777255535126,
0.11520861089229584,
0.2200925648212433,
-0.0559302493929863,
-0.02987062744796276,
-0.12043581902980804,
0.13544504344463348,
-0.41573724150657654,
-0.09971849620342255,
-0.25941750407218933,
-0.10943781584501266,
0.0848269835114479,
0.0346115417778492,
-0.13837076723575592,
-0.23141908645629883,
0.2636549770832062,
0.2336030900478363,
-0.32795366644859314,
-0.39772066473960876,
-0.211818128824234,
-0.24541065096855164,
-0.1891711950302124,
0.1824101358652115,
-0.371163547039032,
-0.07437573373317719,
-0.027629464864730835,
0.06759581714868546,
0.193462073802948,
-0.03952762857079506,
-0.15569069981575012,
0.2389320731163025,
-0.007889792323112488,
-0.01221175491809845,
0.4332299828529358,
-0.14926207065582275,
-0.03953349590301514,
0.0016703405417501926,
0.1173170655965805,
-0.07904761284589767,
0.2483167201280594,
-0.21724268794059753,
-0.33105018734931946,
-0.08391160517930984,
0.1125413104891777,
0.003181386273354292,
-0.17355315387248993,
0.27122652530670166,
-0.08525758981704712,
0.603158175945282,
-0.018400443717837334,
0.1504579484462738,
-0.052064910531044006,
0.25782597064971924,
-0.15282940864562988,
0.5134995579719543,
0.11100606620311737,
-0.35183364152908325,
-0.0603402815759182,
0.06150020286440849,
0.015475930646061897,
0.07260430604219437,
-0.0784548819065094,
0.08821983635425568,
-0.30817362666130066,
-0.3895586133003235,
0.27668440341949463,
0.18471908569335938,
-0.19013603031635284,
0.3604658544063568,
0.23643077909946442,
0.01385912299156189,
-0.3402501940727234,
0.2990878224372864,
0.11807097494602203,
-0.16516058146953583,
-0.22833292186260223,
0.21275092661380768,
-0.1168045625090599,
-0.06209754943847656,
0.029666610062122345,
0.296816885471344,
-0.07246831804513931,
0.12357236444950104,
-0.06840605288743973,
-0.07475100457668304,
-0.058245643973350525,
-0.33077824115753174,
0.176936537027359,
0.2635703980922699,
-0.5474754571914673,
0.15703092515468597,
0.461424320936203,
0.03223709389567375,
0.5070903897285461,
0.08048006892204285,
0.12522265315055847,
-0.17013883590698242,
0.19308136403560638,
-0.3674285411834717,
0.35420507192611694,
0.11262527108192444,
0.016455527395009995,
0.17670586705207825,
-0.12070225924253464,
0.2511550784111023,
0.13966113328933716,
0.10735634714365005,
0.0112005565315485,
-0.038365233689546585,
0.02387785166501999,
0.286559522151947,
-0.06071518361568451,
0.07592655718326569,
0.033764373511075974,
-0.17170383036136627,
0.12857839465141296,
0.11040633916854858,
0.031046388670802116,
0.4630338251590729,
-0.28090620040893555,
-0.03059481456875801,
0.20935535430908203,
-0.12404040992259979,
-0.06447223573923111,
-0.02438199892640114,
0.30525824427604675,
0.11516650021076202,
-0.12607859075069427,
-0.2670249342918396,
0.018121078610420227,
0.09694082289934158,
0.5324941873550415,
-0.20927441120147705,
0.12074177712202072,
-0.2518533766269684,
-0.3642246127128601,
-0.1251182109117508,
0.22125674784183502,
0.12078540027141571,
0.09986060857772827,
-0.24620401859283447,
0.22561386227607727,
0.09644174575805664,
-0.3976137042045593,
-0.022425835952162743,
-0.1338689923286438,
0.09701637923717499,
0.07540211081504822,
-0.1914006918668747,
0.2688393294811249,
-0.14173771440982819,
0.366303414106369,
0.25114136934280396,
0.24809005856513977,
0.12597773969173431,
-0.03285331651568413,
0.019030656665563583,
0.12885506451129913,
0.013905614614486694,
-0.4466092586517334,
0.18514378368854523,
0.18449030816555023,
0.38330593705177307,
-0.25857415795326233,
0.13870523869991302,
0.2790132164955139,
0.14744490385055542,
-0.4612927734851837,
0.2113218903541565,
-0.21941007673740387,
0.3596423268318176,
0.14648930728435516,
0.27488768100738525,
0.2523025572299957,
-0.13326619565486908,
0.21036005020141602,
-0.3902246057987213,
-0.170098215341568,
0.02053951658308506,
-0.2970822751522064,
0.00451372005045414,
-0.6224174499511719,
0.1036580428481102,
0.21070319414138794,
0.017292838543653488,
-0.029632307589054108,
0.05809776112437248,
-0.03764503449201584,
0.11602259427309036,
0.2920979857444763,
-0.12300597131252289,
0.17529559135437012,
0.3573414981365204,
0.012172449380159378,
-0.20360244810581207,
0.012060975655913353,
-0.08055108040571213,
0.20394349098205566,
0.16778773069381714,
-0.10123717784881592,
-0.1471310257911682,
0.04300297796726227,
0.07029125094413757,
-0.019213339313864708,
0.30829259753227234,
-0.14391019940376282,
-0.028175590559840202,
-0.20271120965480804,
-0.00776496808975935,
-0.3675364553928375,
-0.416107714176178,
0.20589056611061096,
-0.18253307044506073,
0.33321747183799744,
-0.27695271372795105,
-0.063040591776371,
0.17011131346225739,
-0.25404396653175354,
-0.035209380090236664,
-0.23733624815940857,
0.13878744840621948,
0.06242729723453522,
-0.30581197142601013,
0.06507980823516846,
0.16317260265350342,
-0.12265651673078537,
0.18399764597415924,
0.030142251402139664,
0.10960021615028381,
0.39816027879714966,
0.06583773344755173,
0.08803405612707138,
-0.012080540880560875,
-0.067742258310318,
0.007855374366044998,
-0.13961480557918549,
-0.009101876989006996,
0.07182763516902924,
0.3276710510253906,
0.03257580101490021,
0.021191198378801346,
0.07085398584604263,
0.07769683748483658,
0.15356269478797913,
0.10026229172945023,
0.12116719782352448,
0.12323390692472458,
0.1796370893716812,
-0.013641618192195892,
-0.11327507346868515,
-0.5035669803619385,
0.21420235931873322,
0.23877273499965668,
0.19554319977760315,
-0.12439287453889847,
0.09684555977582932,
-0.11846349388360977,
0.20613202452659607,
0.23833011090755463,
-0.28193986415863037,
0.20003587007522583,
0.5739613771438599,
-0.005438314750790596,
-0.17832119762897491,
-0.028653724119067192,
0.17033740878105164,
-0.23978298902511597,
0.08536303788423538,
-0.06115243583917618,
-0.5037121772766113,
-0.27272918820381165,
-0.39774689078330994,
-0.004633791744709015,
0.2577369809150696,
0.27248698472976685,
0.09687881916761398,
-0.20098918676376343,
0.23764830827713013,
0.12263183295726776,
-0.05746493488550186,
0.1509346067905426,
-0.18845558166503906,
0.06687551736831665,
0.4257330000400543,
0.0969553291797638,
-0.06632767617702484,
-0.0024810414761304855,
0.06387302279472351,
0.10937650501728058,
-0.0038135629147291183,
0.3145799934864044,
-0.19992181658744812,
-0.4088674485683441,
-0.18127186596393585,
-0.2674933671951294,
0.11045493185520172,
0.2610883116722107,
-0.07692480087280273,
0.05575946718454361,
-0.21866674721240997,
0.11853004992008209,
-0.2164614200592041,
-0.028396625071763992,
0.32811686396598816,
-0.351602166891098,
0.1774693876504898,
-0.06504601985216141,
0.1423613429069519,
-0.12819351255893707,
-0.04890266805887222,
0.04707000404596329,
0.052528418600559235,
0.3470228910446167,
-0.26015323400497437,
-0.26606401801109314,
-0.15133459866046906,
-0.44695383310317993,
0.3715429902076721,
0.060802213847637177,
0.12114972621202469,
0.018440615385770798,
-0.32578468322753906,
-0.025005511939525604,
0.22196424007415771,
0.37522441148757935,
0.017299825325608253,
-0.5985701084136963,
0.26995575428009033,
-0.30756139755249023,
-0.2417624443769455,
0.06330221891403198,
-0.12682600319385529,
0.10192324221134186,
-0.17326593399047852,
0.4044283628463745,
-0.46889200806617737,
-0.14727891981601715,
0.4983040690422058,
0.6177083253860474,
-0.21167415380477905,
-0.13365790247917175,
-0.0357055589556694,
-0.22030222415924072,
-0.09967975318431854,
0.13416564464569092,
0.1981988549232483,
0.19789598882198334,
-0.21849310398101807,
-0.10951870679855347,
-0.23420749604701996,
-0.30168473720550537,
0.5066453218460083,
-0.08185921609401703,
0.04396158084273338,
0.08672305196523666,
0.03762989118695259,
-0.001247406005859375,
0.16202113032341003,
-0.056050799787044525,
0.11083417385816574,
-0.16059406101703644,
-0.1757984757423401,
-0.06375176459550858,
0.02479436993598938,
0.644561767578125,
0.4808356463909149,
-0.08138689398765564,
0.34984341263771057,
-0.5154465436935425,
0.006722979247570038,
-0.31630370020866394,
-0.18246221542358398,
0.11976060271263123,
-0.08185888826847076,
-0.32466715574264526,
-0.5410635471343994,
0.36347800493240356,
0.09989209473133087,
0.08767232298851013,
0.13551700115203857,
0.2670843303203583,
-0.041651174426078796,
0.31025779247283936,
0.08433950692415237,
0.9368604421615601,
-0.08014321327209473,
0.08004813641309738,
0.12394960969686508,
-0.37576138973236084,
0.853684663772583,
0.1840752512216568,
0.17433834075927734,
-0.26285237073898315,
-0.3839779794216156,
-0.07268490642309189,
0.034229692071676254,
0.14992889761924744,
0.11305241286754608,
0.038965899497270584,
0.38006213307380676,
-0.6478986144065857,
0.3067888915538788,
0.28110384941101074,
0.2035423070192337,
0.005500911734998226,
-0.46909844875335693,
-0.5469745993614197,
0.1515294909477234,
0.122585229575634,
-0.30450400710105896,
0.15308842062950134,
-0.0699201375246048,
-0.17358511686325073,
0.037309303879737854,
0.20177061855793,
-0.015077441930770874,
0.02046961709856987,
0.09584733098745346,
-0.2719871699810028,
-0.5597872138023376,
0.06081682816147804,
0.10951206088066101,
0.2753792405128479,
0.3240308463573456,
0.06975869089365005,
-0.1881280243396759,
0.111808642745018,
0.17194287478923798,
-0.02579379640519619,
0.009829099290072918,
0.3497109115123749,
0.031215481460094452,
0.30058717727661133,
0.4925873577594757,
-0.05985086038708687,
-0.06008842587471008,
-0.26954221725463867,
-0.07859735190868378,
0.16650477051734924,
-0.439922034740448,
-0.7427376508712769,
-0.24920865893363953,
0.18370327353477478,
-0.2577205002307892,
0.22242631018161774,
0.08332585543394089,
-0.09977532178163528,
0.3075416088104248,
-0.09375908970832825,
0.1818051040172577,
-0.24928496778011322,
0.09170609712600708,
0.07489384710788727,
-0.024620432406663895,
0.21095885336399078,
-0.04005846381187439,
-0.31347280740737915,
-0.10055669397115707,
-0.0419267863035202,
0.1160794124007225,
-0.12010470032691956,
0.30967748165130615,
0.01271126326173544,
0.05693022906780243,
-0.31401389837265015,
0.06530408561229706,
-0.10850585997104645,
0.055212363600730896,
-0.2753310203552246,
-0.07200151681900024,
-0.16912147402763367,
0.13968271017074585,
0.34524184465408325,
0.2680444121360779,
0.032369762659072876,
0.23945704102516174,
-0.3856683075428009,
-0.009860528632998466,
-0.3758215010166168,
-0.2599892318248749,
-0.271798312664032,
0.21767280995845795,
0.22177667915821075,
0.08017629384994507,
-0.18909423053264618,
-0.03196612745523453,
0.25598788261413574,
0.17293356359004974,
0.3999864161014557,
-0.32978102564811707,
-0.22688040137290955,
0.06903231143951416,
-0.0087253637611866,
-0.1557200402021408,
0.17049916088581085,
-0.0508878156542778,
-0.30907854437828064,
-0.2537520229816437,
-0.06620503216981888,
0.2017124891281128,
-0.07126294076442719,
-0.11054077744483948,
-0.010933998972177505,
-0.18190458416938782,
-0.17798522114753723,
0.051638901233673096,
-0.17192086577415466,
0.1779426634311676,
0.03158195689320564,
0.07118524610996246,
-0.010845568031072617,
-0.08537502586841583,
-0.021983159705996513,
0.13473749160766602,
-0.08193273842334747,
-0.2930063009262085,
0.15353825688362122,
0.09364372491836548,
0.027426432818174362,
0.32184121012687683,
0.2750806510448456,
0.21498411893844604,
-0.09586154669523239,
0.2455291897058487,
0.3634626269340515,
0.3044966161251068,
-0.32579293847084045,
-0.2876836061477661,
-0.01936759427189827,
-0.18966886401176453,
0.1114201694726944,
0.4305015206336975,
0.15005642175674438,
0.10927009582519531,
0.05129285901784897,
-0.12888675928115845,
-0.12977300584316254,
0.028819119557738304,
0.019457992166280746,
0.8205605745315552,
0.34843793511390686,
0.008601061999797821,
0.23829668760299683,
0.30793631076812744,
0.04592074081301689,
-0.06999523937702179,
0.15770429372787476,
0.11122793704271317,
0.1395840048789978,
-0.03722159191966057,
-0.0906103178858757,
-0.3418876826763153,
-0.062358926981687546,
-0.08868539333343506,
-0.05234712362289429,
0.13953158259391785,
-0.10160411894321442,
-0.020508185029029846,
-0.3757031261920929,
0.03305341675877571,
0.08193320035934448,
0.24728745222091675,
-0.018150795251131058,
0.04485378414392471,
0.27223727107048035,
-0.05303873121738434,
-0.10019256919622421,
-0.1662486493587494,
-0.06722438335418701,
-0.37347638607025146,
0.1307544708251953,
-0.1894502490758896,
0.24374930560588837,
0.13490356504917145,
0.06687390804290771,
-0.26472270488739014,
0.47087398171424866,
-0.2257450520992279,
-0.42090028524398804,
-0.04594351351261139,
0.16413484513759613,
-0.021712955087423325,
-0.008814902976155281,
0.11817114055156708,
0.11921533197164536,
-0.012667523697018623,
-0.17811454832553864,
-0.15676255524158478,
-0.2132146954536438,
0.202417254447937,
0.22240234911441803,
0.04975249245762825,
0.30009931325912476,
0.2032874971628189,
0.18211224675178528,
-0.28549253940582275,
0.1154344230890274,
0.07428577542304993,
-0.047151561826467514,
-0.6286578178405762,
0.30249080061912537,
0.4073699116706848,
-0.4263632297515869,
-0.07944153249263763,
-0.0907956138253212,
-0.08641877770423889,
-0.09022531658411026,
0.04721038043498993,
0.07204560935497284,
0.0859014019370079,
0.33155328035354614,
0.16652551293373108,
0.03230273351073265,
-0.16345779597759247,
-0.229497030377388,
0.18263307213783264,
-0.28383246064186096,
-0.07016139477491379,
-0.021379325538873672,
-0.1875256597995758,
0.14197026193141937,
-0.0812903419137001,
0.2751156985759735,
-0.05214425176382065,
0.20810343325138092,
0.06648454070091248,
-0.27660948038101196,
0.09089246392250061,
-0.10694245249032974,
0.37622079253196716,
0.13455107808113098,
-0.2635464668273926,
-0.2430017739534378,
0.08388856798410416,
-0.13899192214012146,
-0.2335425317287445,
0.2563687264919281,
0.04690505564212799,
0.1531876027584076,
-0.09116148203611374,
0.06512713432312012,
0.14647160470485687,
0.34932848811149597,
-0.003161020576953888,
0.17869344353675842,
0.062334585934877396,
-0.06944210827350616,
-0.014028568752110004,
0.2729995548725128,
0.28119957447052,
-0.26014575362205505,
0.3052327334880829,
-0.10124039649963379,
0.25845766067504883,
0.08483804017305374,
-0.016577910631895065,
0.022726645693182945,
0.38712218403816223,
-0.06726154685020447,
-0.03415452316403389,
-0.10000495612621307,
-0.0045470139011740685,
-0.026055853813886642,
-0.11703129857778549,
0.31796038150787354,
0.2587070167064667,
-0.1481865793466568,
0.08233429491519928,
-0.00132046639919281,
-0.2645317614078522,
0.1902979165315628,
-0.2247706800699234,
-0.4500172436237335,
0.05162299424409866,
0.05075789988040924,
0.2847953140735626,
0.234256774187088,
0.1384495198726654,
-0.11822104454040527,
0.2629099190235138,
-0.16894873976707458,
-0.0148579441010952,
0.3192524015903473,
-0.1879800260066986,
-0.044148292392492294,
-0.05367552861571312,
0.1519504189491272,
0.007325675338506699,
0.1509830206632614,
-0.3638140857219696,
-0.3091532588005066
] |
https://github.com/huggingface/datasets/issues/4476 | `to_pandas` doesn't take into account format. | Yes I can do that thank you!
Do you think that conceptually my example should work? If not, I'm happy to close this issue.
If yes, I can start working on it. | **Is your feature request related to a problem? Please describe.**
I have a large dataset that I need to convert part of to pandas to do some further analysis. Calling `to_pandas` directly on it is expensive. So I thought I could simply select the columns that I want and then call `to_pandas`.
**Describe the solution you'd like**
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format(columns=['a', 'b']).to_pandas()
# I would expect `pandas_df` to only include a,b as column.
```
**Describe alternatives you've considered**
I could remove all columns that I don't want? But I don't know all of them in advance.
**Additional context**
I can probably make a PR with some pointers.
| 32 | `to_pandas` doesn't take into account format.
**Is your feature request related to a problem? Please describe.**
I have a large dataset that I need to convert part of to pandas to do some further analysis. Calling `to_pandas` directly on it is expensive. So I thought I could simply select the columns that I want and then call `to_pandas`.
**Describe the solution you'd like**
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format(columns=['a', 'b']).to_pandas()
# I would expect `pandas_df` to only include a,b as column.
```
**Describe alternatives you've considered**
I could remove all columns that I don't want? But I don't know all of them in advance.
**Additional context**
I can probably make a PR with some pointers.
Yes I can do that thank you!
Do you think that conceptually my example should work? If not, I'm happy to close this issue.
If yes, I can start working on it. | [
0.08143512904644012,
-0.22471924126148224,
-0.044288553297519684,
-0.07012303173542023,
0.48298579454421997,
0.2592376470565796,
0.32011792063713074,
0.5277534127235413,
-0.11461843550205231,
0.0853550136089325,
-0.09834136068820953,
0.24285635352134705,
-0.10698223859071732,
0.45728233456611633,
-0.0006968900561332703,
-0.40940555930137634,
0.30583468079566956,
0.42322003841400146,
-0.11909820139408112,
0.12742355465888977,
-0.3510897159576416,
-0.2095094472169876,
-0.08554069697856903,
-0.15629880130290985,
-0.08343686163425446,
-0.05656252056360245,
-0.1856098622083664,
-0.023110106587409973,
-0.06487995386123657,
-0.16306762397289276,
0.07554901391267776,
-0.03974980488419533,
0.08949285745620728,
0.2752492427825928,
-0.0001085173717001453,
-0.32771819829940796,
-0.08291451632976532,
-0.03465380147099495,
-0.15961326658725739,
0.019097499549388885,
-0.20919811725616455,
-0.43188291788101196,
0.39584097266197205,
-0.47703462839126587,
-0.2158668339252472,
-0.36110687255859375,
-0.3590559959411621,
0.02535098046064377,
0.14492027461528778,
0.3198922574520111,
0.2478303760290146,
-0.10269340127706528,
0.08688126504421234,
-0.10562063008546829,
-0.22529089450836182,
0.1740451604127884,
-0.028490904718637466,
0.0993502140045166,
0.08084584772586823,
0.08672866225242615,
0.45026177167892456,
0.22368720173835754,
-0.4102315902709961,
-0.14690494537353516,
0.020681709051132202,
-0.04494335502386093,
0.12768471240997314,
-0.2770392894744873,
0.2981768846511841,
0.20771652460098267,
0.5665867924690247,
-0.1891365945339203,
-0.29709213972091675,
-0.2712760865688324,
-0.000050478847697377205,
-0.48339176177978516,
-0.2606772184371948,
-0.08359022438526154,
0.08258754014968872,
0.21794292330741882,
-0.04036742076277733,
-0.06373114883899689,
-0.11247709393501282,
0.1766270101070404,
-0.4253392815589905,
-0.09786869585514069,
-0.27391526103019714,
-0.09960200637578964,
0.046613700687885284,
0.04551692679524422,
-0.11411470919847488,
-0.20528165996074677,
0.24752697348594666,
0.22270101308822632,
-0.3689451813697815,
-0.4032275974750519,
-0.21815600991249084,
-0.2216935157775879,
-0.19364002346992493,
0.1777646839618683,
-0.3762204349040985,
-0.0876663476228714,
-0.0679665207862854,
0.08060582727193832,
0.23890209197998047,
-0.07241789996623993,
-0.12077248841524124,
0.29155951738357544,
-0.050055764615535736,
-0.0021520224399864674,
0.44206494092941284,
-0.14629215002059937,
-0.06324944645166397,
-0.05830700695514679,
0.11617234349250793,
-0.1176447793841362,
0.25328052043914795,
-0.22052714228630066,
-0.26372000575065613,
-0.07358802109956741,
0.09975402802228928,
0.008345969021320343,
-0.1727290153503418,
0.3026406466960907,
-0.08893237262964249,
0.610666811466217,
-0.013001302257180214,
0.1779979169368744,
-0.012586016207933426,
0.2841162383556366,
-0.15227919816970825,
0.5090662837028503,
0.04902634397149086,
-0.34667497873306274,
-0.0945877879858017,
0.08596518635749817,
0.011874161660671234,
0.07957969605922699,
-0.10732144117355347,
0.09167875349521637,
-0.34700247645378113,
-0.37726205587387085,
0.32170674204826355,
0.19609738886356354,
-0.18528400361537933,
0.38846081495285034,
0.27733081579208374,
-0.010592624545097351,
-0.37273940443992615,
0.35208988189697266,
0.1180998906493187,
-0.14837642014026642,
-0.2137148678302765,
0.17806002497673035,
-0.15479351580142975,
-0.05985208600759506,
0.03106655925512314,
0.31798428297042847,
-0.041533954441547394,
0.05864230915904045,
-0.06937604397535324,
-0.08360466361045837,
-0.07774370908737183,
-0.34629982709884644,
0.20201584696769714,
0.28142350912094116,
-0.547966480255127,
0.14642708003520966,
0.5071843266487122,
0.035697806626558304,
0.5520016551017761,
0.12340125441551208,
0.14509202539920807,
-0.1610003113746643,
0.1729820966720581,
-0.398282527923584,
0.4013735055923462,
0.13480369746685028,
0.02079191617667675,
0.1844865083694458,
-0.15039627254009247,
0.2532123625278473,
0.17359228432178497,
0.08661100268363953,
-0.047160953283309937,
-0.03355822712182999,
0.03409816324710846,
0.3016846179962158,
-0.11827431619167328,
0.06912145018577576,
-0.013286329805850983,
-0.10378929227590561,
0.08817236125469208,
0.0920044332742691,
0.022737694904208183,
0.4866809546947479,
-0.2811150550842285,
-0.01621461845934391,
0.24550870060920715,
-0.11884622275829315,
-0.037474438548088074,
-0.011499010026454926,
0.3207171857357025,
0.07337228953838348,
-0.11368117481470108,
-0.25441110134124756,
0.10828002542257309,
0.09079096466302872,
0.5621687173843384,
-0.23572996258735657,
0.16712896525859833,
-0.21132813394069672,
-0.4308962821960449,
-0.11101125180721283,
0.23026695847511292,
0.11270618438720703,
0.053308553993701935,
-0.2692999541759491,
0.23898160457611084,
0.11845117807388306,
-0.40334537625312805,
-0.040437616407871246,
-0.1647672802209854,
0.08212321251630783,
0.0811721682548523,
-0.17732751369476318,
0.2824508845806122,
-0.13425089418888092,
0.3327946364879608,
0.2561632990837097,
0.251630038022995,
0.14092892408370972,
-0.03227745741605759,
-0.018066391348838806,
0.14970961213111877,
-0.02874179184436798,
-0.44920411705970764,
0.21505942940711975,
0.19902995228767395,
0.3647763729095459,
-0.24122872948646545,
0.11199082434177399,
0.26597607135772705,
0.10261476784944534,
-0.48145362734794617,
0.18893328309059143,
-0.23335112631320953,
0.40556585788726807,
0.15974846482276917,
0.297099232673645,
0.2421417534351349,
-0.12655270099639893,
0.18254093825817108,
-0.3576740622520447,
-0.1506979912519455,
0.015179984271526337,
-0.31354430317878723,
-0.009654907509684563,
-0.6235100626945496,
0.08694745600223541,
0.1559906005859375,
0.016746357083320618,
-0.023094654083251953,
0.09280194342136383,
-0.04350893199443817,
0.12526124715805054,
0.3113380968570709,
-0.10356593877077103,
0.17681974172592163,
0.34370461106300354,
0.008127868175506592,
-0.23198539018630981,
0.0013907309621572495,
-0.08180397003889084,
0.1954888105392456,
0.15925654768943787,
-0.11217174679040909,
-0.178290456533432,
0.0035042990930378437,
0.0858548954129219,
0.05240349471569061,
0.3356245458126068,
-0.12311776727437973,
-0.05845563858747482,
-0.26658523082733154,
-0.011236781254410744,
-0.35216376185417175,
-0.41796931624412537,
0.2023589313030243,
-0.21944165229797363,
0.3659834861755371,
-0.2661970853805542,
-0.10964161157608032,
0.16602268815040588,
-0.20009443163871765,
-0.039896346628665924,
-0.21105138957500458,
0.14170557260513306,
0.06503497064113617,
-0.35489723086357117,
0.05609244853258133,
0.16037189960479736,
-0.1643003225326538,
0.16581016778945923,
0.06891690194606781,
0.10909165441989899,
0.3962392807006836,
0.07365448772907257,
0.09363695234060287,
0.003474450670182705,
-0.09850418567657471,
0.0076173581182956696,
-0.12947064638137817,
0.0020591896027326584,
0.07646995037794113,
0.3395669460296631,
0.0011253170669078827,
0.054554231464862823,
0.07265102118253708,
0.08577146381139755,
0.17669309675693512,
0.10910385847091675,
0.06887340545654297,
0.12095361948013306,
0.16118794679641724,
0.006151765584945679,
-0.11649946123361588,
-0.48640838265419006,
0.2619827389717102,
0.2703685164451599,
0.18384194374084473,
-0.10687443614006042,
0.13988815248012543,
-0.1348111927509308,
0.21620607376098633,
0.2009957730770111,
-0.28108420968055725,
0.19564536213874817,
0.5947710275650024,
0.021772300824522972,
-0.17371267080307007,
-0.019288279116153717,
0.14665178954601288,
-0.23813876509666443,
0.08437954634428024,
-0.05146709084510803,
-0.5304423570632935,
-0.2478124350309372,
-0.42056596279144287,
-0.021777212619781494,
0.27759650349617004,
0.24841131269931793,
0.10971282422542572,
-0.1661537140607834,
0.21720075607299805,
0.10454665124416351,
-0.05039828270673752,
0.11562187224626541,
-0.14139509201049805,
0.05825110897421837,
0.4113912582397461,
0.12124258279800415,
-0.07351166009902954,
-0.02622835710644722,
0.04397433623671532,
0.136768639087677,
-0.005862856283783913,
0.32549428939819336,
-0.17236128449440002,
-0.4058007001876831,
-0.18465612828731537,
-0.3051835298538208,
0.08498575538396835,
0.23125393688678741,
-0.059639573097229004,
0.06209001690149307,
-0.20994997024536133,
0.12363241612911224,
-0.23363468050956726,
0.013947173953056335,
0.3433847427368164,
-0.38830265402793884,
0.16731232404708862,
-0.04583954066038132,
0.1351976990699768,
-0.12058106064796448,
-0.03554882854223251,
0.040956754237413406,
0.06173146516084671,
0.35247135162353516,
-0.22736383974552155,
-0.2662836015224457,
-0.1808488816022873,
-0.4476240873336792,
0.331831693649292,
0.040236759930849075,
0.15538236498832703,
0.001733243465423584,
-0.25743722915649414,
0.009715385735034943,
0.24520833790302277,
0.4330424666404724,
0.03152434527873993,
-0.6177976727485657,
0.31312471628189087,
-0.2915341556072235,
-0.23013713955879211,
0.09274587035179138,
-0.0908014103770256,
0.10312642902135849,
-0.1930004358291626,
0.3711823523044586,
-0.4536581039428711,
-0.09095149487257004,
0.4706273376941681,
0.616211473941803,
-0.20740920305252075,
-0.18140335381031036,
-0.038323793560266495,
-0.22830435633659363,
-0.09224918484687805,
0.1406908631324768,
0.26980680227279663,
0.17169353365898132,
-0.2213984578847885,
-0.15339569747447968,
-0.23397593200206757,
-0.2724379897117615,
0.5111115574836731,
-0.0721006989479065,
0.06291233003139496,
0.052664440125226974,
0.04686976596713066,
-0.010593052953481674,
0.13890177011489868,
-0.03980058431625366,
0.1125246211886406,
-0.1415942907333374,
-0.17668604850769043,
-0.028518684208393097,
0.07033725827932358,
0.6782563328742981,
0.512319803237915,
-0.06443821638822556,
0.3256653845310211,
-0.5330560207366943,
-0.010275505483150482,
-0.2952008545398712,
-0.16588330268859863,
0.1286529302597046,
-0.05044154077768326,
-0.35420528054237366,
-0.5788649916648865,
0.37094393372535706,
0.10111050307750702,
0.08653053641319275,
0.1324312686920166,
0.27895909547805786,
-0.015487251803278923,
0.32557541131973267,
0.07923892885446548,
0.9767774343490601,
-0.12523958086967468,
0.10864777863025665,
0.14746178686618805,
-0.4256386160850525,
0.9001294374465942,
0.15943729877471924,
0.12184960395097733,
-0.30380916595458984,
-0.3614557683467865,
-0.051943257451057434,
-0.02112012729048729,
0.15245407819747925,
0.13002827763557434,
0.020648349076509476,
0.3828152120113373,
-0.6822748780250549,
0.24952760338783264,
0.3238052725791931,
0.18490271270275116,
0.048856575042009354,
-0.46658989787101746,
-0.5579943656921387,
0.1301223188638687,
0.1538618505001068,
-0.3098869025707245,
0.14584994316101074,
-0.11283224076032639,
-0.25627633929252625,
0.049032025039196014,
0.16704688966274261,
0.0019634515047073364,
0.021066835150122643,
0.04004690796136856,
-0.2539648115634918,
-0.5732535123825073,
0.120669886469841,
0.2068229466676712,
0.3081885576248169,
0.34020504355430603,
0.025978028774261475,
-0.15170341730117798,
0.10002587735652924,
0.1424541473388672,
-0.023072822019457817,
0.02747797966003418,
0.37435388565063477,
0.05971454828977585,
0.26348185539245605,
0.5086519122123718,
-0.07971320301294327,
-0.07915616035461426,
-0.30535727739334106,
-0.07396480441093445,
0.18353092670440674,
-0.44763222336769104,
-0.7967786192893982,
-0.2729508578777313,
0.2095227986574173,
-0.23263272643089294,
0.20367272198200226,
0.10989966988563538,
-0.09019347280263901,
0.33631396293640137,
-0.11819247901439667,
0.2121049463748932,
-0.216413676738739,
0.07037816941738129,
0.02501792088150978,
-0.04083067178726196,
0.22013181447982788,
-0.044074174016714096,
-0.29593032598495483,
-0.058448631316423416,
-0.04956307262182236,
0.15841540694236755,
-0.08118914812803268,
0.2568798065185547,
0.056730207055807114,
0.03576475381851196,
-0.3263954222202301,
0.0656735822558403,
-0.04856588691473007,
0.053526971489191055,
-0.2655802369117737,
-0.0808795839548111,
-0.16586920619010925,
0.11230409145355225,
0.32280266284942627,
0.22210922837257385,
0.04527144879102707,
0.27952441573143005,
-0.386249840259552,
-0.005764041095972061,
-0.3490089178085327,
-0.3009253442287445,
-0.2882382571697235,
0.1777825653553009,
0.2132374495267868,
0.09039190411567688,
-0.22168995440006256,
-0.0453331358730793,
0.23053383827209473,
0.23985549807548523,
0.39817267656326294,
-0.3042445480823517,
-0.1763068437576294,
0.10101759433746338,
0.059015657752752304,
-0.15135543048381805,
0.19116739928722382,
-0.042347755283117294,
-0.301624059677124,
-0.24837476015090942,
-0.11895035207271576,
0.23727071285247803,
-0.07829371094703674,
-0.13947616517543793,
0.018113117665052414,
-0.13478446006774902,
-0.1812717616558075,
0.07728078216314316,
-0.20468056201934814,
0.1860634982585907,
0.03073221445083618,
0.06792417168617249,
0.020765606313943863,
-0.06408853828907013,
-0.004043318331241608,
0.13988097012043,
-0.03568658232688904,
-0.3331048786640167,
0.1786390244960785,
0.08628472685813904,
0.047757405787706375,
0.3156861960887909,
0.25913798809051514,
0.27340376377105713,
-0.128855898976326,
0.29013341665267944,
0.36962583661079407,
0.2658117711544037,
-0.29025810956954956,
-0.2642417252063751,
-0.04564004763960838,
-0.20171447098255157,
0.04142254963517189,
0.42492344975471497,
0.1708906888961792,
0.1308138370513916,
0.06011563166975975,
-0.1514115035533905,
-0.13541360199451447,
0.009995793923735619,
-0.011121399700641632,
0.8061000108718872,
0.3368140757083893,
0.045910242944955826,
0.23195703327655792,
0.30898216366767883,
0.03076411783695221,
-0.1070416122674942,
0.11619570106267929,
0.07208263128995895,
0.11519572138786316,
-0.0439201258122921,
-0.08100306242704391,
-0.322558730840683,
-0.0553971491754055,
-0.10395467281341553,
-0.02216176688671112,
0.15378084778785706,
-0.15104089677333832,
0.013781130313873291,
-0.38275477290153503,
0.0508049800992012,
0.08002563565969467,
0.16870246827602386,
0.008059198036789894,
0.04287855699658394,
0.2231006920337677,
-0.052840739488601685,
-0.12298481166362762,
-0.24466316401958466,
-0.08373706042766571,
-0.40795207023620605,
0.13350573182106018,
-0.21089638769626617,
0.2379348874092102,
0.13027259707450867,
-0.0022618062794208527,
-0.2480434775352478,
0.4437062740325928,
-0.23140381276607513,
-0.3917270302772522,
-0.10043701529502869,
0.11006759852170944,
-0.031967077404260635,
-0.011427050456404686,
0.1500018984079361,
0.1780540645122528,
0.018381930887699127,
-0.18266771733760834,
-0.14413423836231232,
-0.20596130192279816,
0.2351011335849762,
0.2347235232591629,
0.05729963630437851,
0.294230192899704,
0.19309881329536438,
0.14739343523979187,
-0.26746276021003723,
0.13328172266483307,
0.05121671408414841,
-0.0657462328672409,
-0.6251013875007629,
0.290669709444046,
0.3550526797771454,
-0.47124236822128296,
-0.07894885540008545,
-0.08168277889490128,
-0.10790149122476578,
-0.07773463428020477,
0.022671205922961235,
0.07393888384103775,
0.09897291660308838,
0.32609498500823975,
0.14657555520534515,
0.05652821436524391,
-0.18368645012378693,
-0.27951517701148987,
0.23340550065040588,
-0.3322391211986542,
-0.09570128470659256,
-0.05939323827624321,
-0.14511620998382568,
0.13396207988262177,
-0.10007540881633759,
0.27867192029953003,
-0.09937532246112823,
0.21520933508872986,
0.05785350129008293,
-0.31239771842956543,
0.10208312422037125,
-0.10681252181529999,
0.438724547624588,
0.13651777803897858,
-0.2919118106365204,
-0.24986787140369415,
0.09586449712514877,
-0.13671579957008362,
-0.2266223132610321,
0.2782231271266937,
0.04874173179268837,
0.11357452720403671,
-0.10630159080028534,
0.08610743284225464,
0.1481078416109085,
0.42001795768737793,
-0.02311982959508896,
0.19809025526046753,
0.13171595335006714,
-0.07759355753660202,
0.0060620661824941635,
0.2939390540122986,
0.2841421067714691,
-0.28687164187431335,
0.31240320205688477,
-0.12983714044094086,
0.2226424664258957,
0.043146006762981415,
-0.05839264765381813,
0.0360499732196331,
0.3729291260242462,
-0.057788290083408356,
-0.03953297436237335,
-0.10377687215805054,
0.001549338921904564,
-0.015590254217386246,
-0.08284183591604233,
0.3509151339530945,
0.23816487193107605,
-0.15157543122768402,
0.09343460947275162,
-0.010448984801769257,
-0.25569847226142883,
0.2110004872083664,
-0.22711464762687683,
-0.441001832485199,
0.07212945818901062,
0.04148377478122711,
0.2652762830257416,
0.23015521466732025,
0.16196998953819275,
-0.13804173469543457,
0.2656494379043579,
-0.11518683284521103,
0.00211440771818161,
0.3091779947280884,
-0.19380749762058258,
-0.005233239382505417,
-0.08202345669269562,
0.19664594531059265,
-0.025690823793411255,
0.15434791147708893,
-0.3627699911594391,
-0.3164184093475342
] |
https://github.com/huggingface/datasets/issues/4476 | `to_pandas` doesn't take into account format. | Hi! Instead of `with_format(columns=['a', 'b']).to_pandas()`, use `with_format("pandas", columns=["a", "b"])` for easy conversion of the parts of the dataset to pandas via indexing/slicing.
The full code:
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format("pandas", columns=['a', 'b'])[:]
``` | **Is your feature request related to a problem? Please describe.**
I have a large dataset that I need to convert part of to pandas to do some further analysis. Calling `to_pandas` directly on it is expensive. So I thought I could simply select the columns that I want and then call `to_pandas`.
**Describe the solution you'd like**
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format(columns=['a', 'b']).to_pandas()
# I would expect `pandas_df` to only include a,b as column.
```
**Describe alternatives you've considered**
I could remove all columns that I don't want? But I don't know all of them in advance.
**Additional context**
I can probably make a PR with some pointers.
| 44 | `to_pandas` doesn't take into account format.
**Is your feature request related to a problem? Please describe.**
I have a large dataset that I need to convert part of to pandas to do some further analysis. Calling `to_pandas` directly on it is expensive. So I thought I could simply select the columns that I want and then call `to_pandas`.
**Describe the solution you'd like**
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format(columns=['a', 'b']).to_pandas()
# I would expect `pandas_df` to only include a,b as column.
```
**Describe alternatives you've considered**
I could remove all columns that I don't want? But I don't know all of them in advance.
**Additional context**
I can probably make a PR with some pointers.
Hi! Instead of `with_format(columns=['a', 'b']).to_pandas()`, use `with_format("pandas", columns=["a", "b"])` for easy conversion of the parts of the dataset to pandas via indexing/slicing.
The full code:
```python
from datasets import Dataset
ds = Dataset.from_dict({'a': [1,2,3], 'b': [5,6,7], 'c': [8,9,10]})
pandas_df = ds.with_format("pandas", columns=['a', 'b'])[:]
``` | [
0.04485657438635826,
-0.2022828608751297,
-0.06910037249326706,
-0.10313864052295685,
0.47545236349105835,
0.280233234167099,
0.3150918185710907,
0.5535863041877747,
-0.08521560579538345,
0.1245804876089096,
-0.1309104561805725,
0.30377277731895447,
-0.10908091813325882,
0.4659910500049591,
-0.03454842418432236,
-0.38955003023147583,
0.31444844603538513,
0.3809960186481476,
-0.06894969940185547,
0.16082331538200378,
-0.331522136926651,
-0.21027643978595734,
-0.11357159912586212,
-0.18002189695835114,
-0.10942905396223068,
-0.022421224042773247,
-0.12028926610946655,
-0.028764799237251282,
-0.03483150899410248,
-0.2004731148481369,
0.07248536497354507,
-0.09148095548152924,
0.1011301800608635,
0.30837130546569824,
-0.00010758654389064759,
-0.27632832527160645,
-0.018338240683078766,
-0.0358387753367424,
-0.20958906412124634,
0.03451702743768692,
-0.22352179884910583,
-0.4602283835411072,
0.39970147609710693,
-0.49476879835128784,
-0.16657105088233948,
-0.35453495383262634,
-0.3135194778442383,
0.02501676231622696,
0.10680112987756729,
0.29549160599708557,
0.26289570331573486,
-0.06443290412425995,
0.11853891611099243,
-0.05598002299666405,
-0.1841142773628235,
0.09656354039907455,
-0.018764574080705643,
0.040833599865436554,
0.019952639937400818,
0.14062738418579102,
0.44647932052612305,
0.2252858430147171,
-0.44000762701034546,
-0.1575825810432434,
-0.03227919340133667,
-0.039453040808439255,
0.06770742684602737,
-0.2885131537914276,
0.27039942145347595,
0.16299211978912354,
0.5628049969673157,
-0.15720483660697937,
-0.37523847818374634,
-0.27645599842071533,
-0.011227894574403763,
-0.4926186203956604,
-0.26598623394966125,
-0.11857180297374725,
0.13779900968074799,
0.153555229306221,
0.0013986161211505532,
-0.03444427251815796,
-0.08864545077085495,
0.126490980386734,
-0.43218061327934265,
-0.02049127221107483,
-0.26112714409828186,
-0.0935303345322609,
0.07669618725776672,
0.007607858628034592,
-0.10413108766078949,
-0.18871824443340302,
0.22290299832820892,
0.19926591217517853,
-0.3629739284515381,
-0.3569001853466034,
-0.15880805253982544,
-0.25109991431236267,
-0.23450452089309692,
0.1533314287662506,
-0.3572169840335846,
-0.034488096833229065,
-0.06335949897766113,
0.078364796936512,
0.22075723111629486,
-0.022009029984474182,
-0.15966865420341492,
0.3054227828979492,
-0.012983649969100952,
-0.009258899837732315,
0.44191449880599976,
-0.1498553454875946,
-0.05824121832847595,
-0.07975825667381287,
0.12169788777828217,
-0.1076538935303688,
0.2457016259431839,
-0.20948824286460876,
-0.29110559821128845,
-0.14757370948791504,
0.09056460112333298,
-0.021163951605558395,
-0.10976751893758774,
0.22900328040122986,
-0.10903375595808029,
0.6106308102607727,
-0.0035979747772216797,
0.18139244616031647,
-0.08066501468420029,
0.29181209206581116,
-0.18557658791542053,
0.5101683139801025,
0.13214188814163208,
-0.36348286271095276,
-0.09962421655654907,
0.019770832732319832,
0.03122737817466259,
0.05412700027227402,
-0.02908654510974884,
0.09673000872135162,
-0.37594130635261536,
-0.3222163915634155,
0.25622066855430603,
0.2176555097103119,
-0.16463035345077515,
0.36472609639167786,
0.27475690841674805,
-0.0345153845846653,
-0.35087862610816956,
0.2970854938030243,
0.06581473350524902,
-0.234561488032341,
-0.19975917041301727,
0.19436141848564148,
-0.1626490354537964,
-0.07586030662059784,
0.0031855031847953796,
0.2604980766773224,
-0.00944286584854126,
0.06367132067680359,
-0.06288095563650131,
-0.1341009885072708,
-0.0750950276851654,
-0.34220558404922485,
0.22957801818847656,
0.22627151012420654,
-0.5249387621879578,
0.17636698484420776,
0.4535437524318695,
0.055394936352968216,
0.5507365465164185,
0.09820373356342316,
0.1311781257390976,
-0.17811468243598938,
0.17072172462940216,
-0.3361678123474121,
0.3501777648925781,
0.10549640655517578,
-0.03177689015865326,
0.15605103969573975,
-0.11978627741336823,
0.25838181376457214,
0.14183522760868073,
0.10234019160270691,
-0.001122092828154564,
-0.020252572372555733,
0.061325035989284515,
0.2939111590385437,
-0.06972270458936691,
0.11768495291471481,
-0.020991891622543335,
-0.11402387917041779,
0.11664154380559921,
0.11214008927345276,
0.03164885193109512,
0.3839768171310425,
-0.3427249789237976,
0.012233004905283451,
0.22867631912231445,
-0.11572355031967163,
-0.05357881635427475,
-0.04776637256145477,
0.3125433325767517,
0.0946870967745781,
-0.10583308339118958,
-0.2698141932487488,
0.09160918742418289,
0.14034032821655273,
0.6080271005630493,
-0.22230136394500732,
0.01014457643032074,
-0.2296968549489975,
-0.36593618988990784,
-0.053417958319187164,
0.14894360303878784,
0.10500873625278473,
0.09124183654785156,
-0.25756126642227173,
0.23436245322227478,
0.10260172188282013,
-0.34448060393333435,
-0.07923723757266998,
-0.09999050199985504,
0.0766102522611618,
0.04318663477897644,
-0.12873922288417816,
0.25114575028419495,
-0.18256635963916779,
0.3247499465942383,
0.30157431960105896,
0.3134053349494934,
0.1264735460281372,
-0.07262979447841644,
0.02434663102030754,
0.1509336531162262,
0.004951201379299164,
-0.4678383767604828,
0.21228867769241333,
0.14019212126731873,
0.36819958686828613,
-0.223433256149292,
0.08479289710521698,
0.267284095287323,
0.11262612789869308,
-0.40792280435562134,
0.18647587299346924,
-0.28155216574668884,
0.47052130103111267,
0.11878451704978943,
0.2796455919742584,
0.2474808692932129,
-0.09444940835237503,
0.2029685080051422,
-0.3695937395095825,
-0.16952648758888245,
-0.04039285331964493,
-0.35552316904067993,
0.012799032032489777,
-0.5854907631874084,
0.15094685554504395,
0.167636439204216,
-0.015103779733181,
-0.05808441340923309,
0.09043082594871521,
-0.01795525848865509,
0.10926885157823563,
0.2610023021697998,
-0.19071252644062042,
0.1415446698665619,
0.35426145792007446,
0.04674086347222328,
-0.2598470449447632,
0.0508558452129364,
-0.11337777227163315,
0.24837654829025269,
0.24596533179283142,
-0.1326504945755005,
-0.1655590534210205,
0.025768423452973366,
0.038027700036764145,
0.04876464605331421,
0.3023414611816406,
-0.14528517425060272,
-0.007081847637891769,
-0.286977082490921,
0.0055536869913339615,
-0.3764313757419586,
-0.33965370059013367,
0.19119219481945038,
-0.25954359769821167,
0.333538293838501,
-0.3744329512119293,
-0.09170886129140854,
0.1770811527967453,
-0.2255927324295044,
-0.040527984499931335,
-0.24564674496650696,
0.060649171471595764,
0.05596277862787247,
-0.3843396008014679,
0.08147087693214417,
0.09420935064554214,
-0.17498192191123962,
0.1695621758699417,
0.07448619604110718,
0.12594936788082123,
0.33619993925094604,
0.08769772201776505,
0.08509007096290588,
0.023530155420303345,
-0.07479581981897354,
-0.024748019874095917,
-0.15519919991493225,
0.06550288200378418,
0.0911908894777298,
0.3266561031341553,
0.03423019498586655,
-0.021707337349653244,
0.06443673372268677,
0.14306733012199402,
0.16721637547016144,
0.10759766399860382,
0.08740080893039703,
0.11048513650894165,
0.16761355102062225,
-0.03583822399377823,
-0.1358623057603836,
-0.49978575110435486,
0.2254956066608429,
0.19221395254135132,
0.17888253927230835,
-0.09599422663450241,
0.11633311212062836,
-0.10348161309957504,
0.24680988490581512,
0.20741204917430878,
-0.27318909764289856,
0.2241995632648468,
0.5924535989761353,
-0.0005297153256833553,
-0.14078494906425476,
-0.053797703236341476,
0.11154337227344513,
-0.1855648010969162,
0.047295067459344864,
-0.11726820468902588,
-0.4273633062839508,
-0.31325143575668335,
-0.36361971497535706,
-0.0363268107175827,
0.3215350806713104,
0.23748928308486938,
0.1363372802734375,
-0.18255680799484253,
0.22492265701293945,
0.09912639856338501,
-0.1350630223751068,
0.14822357892990112,
-0.16161048412322998,
0.08704166114330292,
0.4577857553958893,
0.11053341627120972,
0.025824304670095444,
0.009579483419656754,
0.054808810353279114,
0.15611228346824646,
0.01704503782093525,
0.29992368817329407,
-0.18864789605140686,
-0.4649532437324524,
-0.13470423221588135,
-0.28267383575439453,
0.08656366914510727,
0.1704447865486145,
-0.07900417596101761,
0.06022854894399643,
-0.19413596391677856,
0.08249695599079132,
-0.2575794756412506,
-0.044582825154066086,
0.3750745356082916,
-0.3491591513156891,
0.13092902302742004,
-0.07758886367082596,
0.13471174240112305,
-0.13610853254795074,
-0.017576180398464203,
0.04532932490110397,
0.044757530093193054,
0.3953382670879364,
-0.25307294726371765,
-0.2827247977256775,
-0.23473741114139557,
-0.463290274143219,
0.34453481435775757,
0.08248482644557953,
0.1927097737789154,
0.021728087216615677,
-0.28778076171875,
-0.01285676658153534,
0.25281450152397156,
0.519911527633667,
0.01947101764380932,
-0.607293426990509,
0.3316616714000702,
-0.3341315984725952,
-0.28518396615982056,
0.06913389265537262,
-0.07805562019348145,
0.15201103687286377,
-0.17152255773544312,
0.3687564730644226,
-0.4398203492164612,
-0.12460821121931076,
0.4890153706073761,
0.5955676436424255,
-0.21157307922840118,
-0.15390032529830933,
-0.08388103544712067,
-0.20591667294502258,
-0.04935690015554428,
0.13394901156425476,
0.2129516303539276,
0.23385415971279144,
-0.1822190135717392,
-0.14352373778820038,
-0.2704527974128723,
-0.34732016921043396,
0.4597720503807068,
-0.08102244138717651,
0.08276495337486267,
0.140210822224617,
0.09981328248977661,
0.007246110588312149,
0.1152108758687973,
-0.02895633690059185,
0.14897319674491882,
-0.18115352094173431,
-0.11667801439762115,
-0.0971548855304718,
0.13010264933109283,
0.6861905455589294,
0.4566888213157654,
-0.10308627784252167,
0.28610560297966003,
-0.560806393623352,
0.01586279645562172,
-0.33983170986175537,
-0.17663367092609406,
0.10082591325044632,
-0.0019367863424122334,
-0.3451930582523346,
-0.5600191354751587,
0.42569130659103394,
0.11831337213516235,
0.08237716555595398,
0.13410845398902893,
0.30225858092308044,
-0.0534619465470314,
0.3217008709907532,
0.06725162267684937,
0.9305105805397034,
-0.08410720527172089,
0.07853354513645172,
0.16987469792366028,
-0.38727372884750366,
0.8886951804161072,
0.21764476597309113,
0.1667601764202118,
-0.25924962759017944,
-0.4295988976955414,
-0.03592289611697197,
-0.012728672474622726,
0.07660513371229172,
0.04653546214103699,
-0.017304841428995132,
0.4421687722206116,
-0.7314000129699707,
0.2225506752729416,
0.2633800208568573,
0.18684276938438416,
0.08199100196361542,
-0.45632514357566833,
-0.5035961866378784,
0.13824684917926788,
0.13449795544147491,
-0.2860162854194641,
0.16659069061279297,
-0.10443554818630219,
-0.2295611947774887,
0.03474293649196625,
0.10980033874511719,
-0.03682716190814972,
0.06091969832777977,
0.12265413254499435,
-0.2521226704120636,
-0.5535514950752258,
0.15915128588676453,
0.1293184608221054,
0.26030850410461426,
0.31295347213745117,
0.04179689288139343,
-0.17732864618301392,
0.0871465876698494,
0.1489705890417099,
0.021715829148888588,
0.04024645313620567,
0.3713538646697998,
0.08605708926916122,
0.22610759735107422,
0.4201086759567261,
-0.07404551655054092,
-0.034837089478969574,
-0.326137900352478,
-0.028530478477478027,
0.16909679770469666,
-0.46760064363479614,
-0.8013516068458557,
-0.2485358715057373,
0.22632426023483276,
-0.2601660490036011,
0.21452058851718903,
0.08812156319618225,
-0.09431663900613785,
0.39433515071868896,
-0.08208009600639343,
0.14854519069194794,
-0.20854169130325317,
0.11579243838787079,
0.03542819619178772,
-0.01868550293147564,
0.22963294386863708,
-0.04539477825164795,
-0.34243905544281006,
-0.025615181773900986,
-0.03612607717514038,
0.1787521094083786,
0.0029618442058563232,
0.3018369674682617,
-0.021548684686422348,
0.06757843494415283,
-0.3104317784309387,
0.006780337542295456,
-0.0753893107175827,
0.07431339472532272,
-0.3540163040161133,
-0.09540794789791107,
-0.13636742532253265,
0.1667914092540741,
0.3521653711795807,
0.2869502604007721,
-0.0336754247546196,
0.2358458936214447,
-0.3512849807739258,
0.028091078624129295,
-0.3528178632259369,
-0.2370912879705429,
-0.276967316865921,
0.2323644608259201,
0.17960089445114136,
0.05164733901619911,
-0.15856589376926422,
-0.051317546516656876,
0.2574150264263153,
0.23094700276851654,
0.34151721000671387,
-0.31468433141708374,
-0.19753511250019073,
0.07758079469203949,
0.0052716974169015884,
-0.22154295444488525,
0.1837272197008133,
-0.028496310114860535,
-0.3058513104915619,
-0.2594459056854248,
-0.13655301928520203,
0.20756176114082336,
-0.07722002267837524,
-0.12634049355983734,
0.06279534101486206,
-0.14250770211219788,
-0.11232825368642807,
0.10336882621049881,
-0.20771121978759766,
0.222993403673172,
0.06276967376470566,
0.14639651775360107,
-0.015268347226083279,
-0.09274885803461075,
-0.017676696181297302,
0.10893568396568298,
-0.092582568526268,
-0.2785768508911133,
0.13143333792686462,
0.07050469517707825,
-0.015246374532580376,
0.36159929633140564,
0.26524683833122253,
0.2874056100845337,
-0.06964781880378723,
0.24556182324886322,
0.3352798521518707,
0.27187079191207886,
-0.29332950711250305,
-0.32784804701805115,
-0.045766305178403854,
-0.1597244292497635,
0.0748542845249176,
0.43251490592956543,
0.11350290477275848,
0.08795703947544098,
0.019837267696857452,
-0.12922698259353638,
-0.09933162480592728,
0.04111035540699959,
0.0621386356651783,
0.7382758855819702,
0.28942301869392395,
-0.039208244532346725,
0.20745062828063965,
0.2182292640209198,
0.07757295668125153,
-0.004904087632894516,
0.08107849955558777,
0.13677391409873962,
0.17393699288368225,
-0.03193238750100136,
-0.06354018300771713,
-0.2818746566772461,
-0.10017332434654236,
-0.06544534862041473,
-0.03810843825340271,
0.1349000334739685,
-0.10110126435756683,
-0.002861626446247101,
-0.43467628955841064,
0.07214885205030441,
0.15266716480255127,
0.23259353637695312,
0.00029607489705085754,
0.03196770325303078,
0.2857971787452698,
-0.07184252887964249,
-0.1628199815750122,
-0.23340287804603577,
-0.06253616511821747,
-0.4047245979309082,
0.131140798330307,
-0.17650091648101807,
0.22342637181282043,
0.1370450109243393,
0.01317945308983326,
-0.1983046531677246,
0.4840787947177887,
-0.2610987424850464,
-0.413452684879303,
0.014325805008411407,
0.08089376240968704,
-0.03971635177731514,
-0.039836302399635315,
0.2322341948747635,
0.1468409299850464,
-0.06574246287345886,
-0.18548858165740967,
-0.11856985092163086,
-0.20023906230926514,
0.22976380586624146,
0.1849384903907776,
-0.04105059802532196,
0.31442660093307495,
0.19971315562725067,
0.17533566057682037,
-0.2625495493412018,
0.06263931095600128,
0.06419271975755692,
-0.04549314081668854,
-0.6169171333312988,
0.32944363355636597,
0.37148794531822205,
-0.41741177439689636,
-0.08311137557029724,
-0.07438976317644119,
-0.12717819213867188,
-0.10783829540014267,
-0.0020237676799297333,
0.07634086906909943,
0.08721337467432022,
0.38178715109825134,
0.15653909742832184,
0.0019640326499938965,
-0.1006690263748169,
-0.2614213824272156,
0.20604273676872253,
-0.3012467920780182,
-0.02935553342103958,
-0.039329893887043,
-0.23040133714675903,
0.16439680755138397,
-0.04639163985848427,
0.3410801589488983,
-0.03291255608201027,
0.1829145848751068,
0.0531390905380249,
-0.24510647356510162,
0.10969595611095428,
-0.06612749397754669,
0.3823755085468292,
0.09200635552406311,
-0.2748875021934509,
-0.23116783797740936,
0.04384484887123108,
-0.09158960729837418,
-0.22498053312301636,
0.28854605555534363,
-0.0024995743297040462,
0.1595226228237152,
-0.13460583984851837,
0.060231320559978485,
0.16437819600105286,
0.36205029487609863,
0.01971619203686714,
0.20382651686668396,
0.08838343620300293,
-0.07144350558519363,
-0.005132349207997322,
0.28493666648864746,
0.2536748945713043,
-0.28161099553108215,
0.3862532675266266,
-0.1297246813774109,
0.2932725250720978,
0.019038526341319084,
-0.07905739545822144,
-0.0016630657482892275,
0.345760315656662,
-0.07289295643568039,
-0.050452422350645065,
-0.080021433532238,
-0.022794680669903755,
-0.02749773859977722,
-0.0834951177239418,
0.2967960834503174,
0.2277148962020874,
-0.12853911519050598,
0.10720203816890717,
0.011049501597881317,
-0.33353763818740845,
0.26297396421432495,
-0.20937325060367584,
-0.39153003692626953,
0.04530905559659004,
0.047214433550834656,
0.2628416419029236,
0.2583290636539459,
0.16970059275627136,
-0.12630943953990936,
0.2941403388977051,
-0.14461404085159302,
0.012368950992822647,
0.31751781702041626,
-0.13441689312458038,
-0.016987565904855728,
-0.10705539584159851,
0.1767600029706955,
-0.04298297315835953,
0.1443527191877365,
-0.30499517917633057,
-0.2914103865623474
] |
https://github.com/huggingface/datasets/issues/4467 | Transcript string 'null' converted to [None] by load_dataset() | Hi @mbarnig, thanks for reporting.
Please note that is an expected behavior by `pandas` (we use the `pandas` library to parse CSV files): https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
```
By default the following values are interpreted as NaN:
‘’, ‘#N/A’, ‘#N/A N/A’, ‘#NA’, ‘-1.#IND’, ‘-1.#QNAN’, ‘-NaN’, ‘-nan’, ‘1.#IND’, ‘1.#QNAN’, ‘<NA>’, ‘N/A’, ‘NA’, ‘NULL’, ‘NaN’, ‘n/a’, ‘nan’, ‘null’.
```
(see "null" in the last position in the above list).
In order to prevent `pandas` from performing that automatic conversion from the string "null" to a NaN value, you should pass the `pandas` parameter `keep_default_na=False`:
```python
In [2]: dataset = load_dataset('csv', data_files={'train': 'null-test.csv'}, keep_default_na=False)
In [3]: dataset["train"][0]["transcript"]
Out[3]: 'null'
``` | ## Issue
I am training a luxembourgish speech-recognition model in Colab with a custom dataset, including a dictionary of luxembourgish words, for example the speaken numbers 0 to 9. When preparing the dataset with the script
`ds_train1 = mydataset.map(prepare_dataset)`
the following error was issued:
```
ValueError Traceback (most recent call last)
<ipython-input-69-1e8f2b37f5bc> in <module>()
----> 1 ds_train = mydataset_train.map(prepare_dataset)
11 frames
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in __call__(self, text, text_pair, add_special_tokens, padding, truncation, max_length, stride, is_split_into_words, pad_to_multiple_of, return_tensors, return_token_type_ids, return_attention_mask, return_overflowing_tokens, return_special_tokens_mask, return_offsets_mapping, return_length, verbose, **kwargs)
2450 if not _is_valid_text_input(text):
2451 raise ValueError(
-> 2452 "text input must of type str (single example), List[str] (batch or single pretokenized example) "
2453 "or List[List[str]] (batch of pretokenized examples)."
2454 )
ValueError: text input must of type str (single example), List[str] (batch or single pretokenized example) or List[List[str]] (batch of pretokenized examples).
```
Debugging this problem was not easy, all transcriptions in the dataset are correct strings. Finally I discovered that the transcription string 'null' is interpreted as [None] by the `load_dataset()` script. By deleting this row in the dataset the training worked fine.
## Expected result:
transcription 'null' interpreted as 'str' instead of 'None'.
## Reproduction
Here is the code to reproduce the error with a one-row-dataset.
```
with open("null-test.csv") as f:
reader = csv.reader(f)
for row in reader:
print(row)
```
['wav_filename', 'wav_filesize', 'transcript']
['wavs/female/NULL1.wav', '17530', 'null']
```
dataset = load_dataset('csv', data_files={'train': 'null-test.csv'})
```
Using custom data configuration default-81ac0c0e27af3514
Downloading and preparing dataset csv/default to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519...
Downloading data files: 100%
1/1 [00:00<00:00, 29.55it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 23.66it/s]
Dataset csv downloaded and prepared to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519. Subsequent calls will reuse this data.
100%
1/1 [00:00<00:00, 25.84it/s]
```
print(dataset['train']['transcript'])
```
[None]
## Environment info
```
!pip install datasets==2.2.2
!pip install transformers==4.19.2
``` | 104 | Transcript string 'null' converted to [None] by load_dataset()
## Issue
I am training a luxembourgish speech-recognition model in Colab with a custom dataset, including a dictionary of luxembourgish words, for example the speaken numbers 0 to 9. When preparing the dataset with the script
`ds_train1 = mydataset.map(prepare_dataset)`
the following error was issued:
```
ValueError Traceback (most recent call last)
<ipython-input-69-1e8f2b37f5bc> in <module>()
----> 1 ds_train = mydataset_train.map(prepare_dataset)
11 frames
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in __call__(self, text, text_pair, add_special_tokens, padding, truncation, max_length, stride, is_split_into_words, pad_to_multiple_of, return_tensors, return_token_type_ids, return_attention_mask, return_overflowing_tokens, return_special_tokens_mask, return_offsets_mapping, return_length, verbose, **kwargs)
2450 if not _is_valid_text_input(text):
2451 raise ValueError(
-> 2452 "text input must of type str (single example), List[str] (batch or single pretokenized example) "
2453 "or List[List[str]] (batch of pretokenized examples)."
2454 )
ValueError: text input must of type str (single example), List[str] (batch or single pretokenized example) or List[List[str]] (batch of pretokenized examples).
```
Debugging this problem was not easy, all transcriptions in the dataset are correct strings. Finally I discovered that the transcription string 'null' is interpreted as [None] by the `load_dataset()` script. By deleting this row in the dataset the training worked fine.
## Expected result:
transcription 'null' interpreted as 'str' instead of 'None'.
## Reproduction
Here is the code to reproduce the error with a one-row-dataset.
```
with open("null-test.csv") as f:
reader = csv.reader(f)
for row in reader:
print(row)
```
['wav_filename', 'wav_filesize', 'transcript']
['wavs/female/NULL1.wav', '17530', 'null']
```
dataset = load_dataset('csv', data_files={'train': 'null-test.csv'})
```
Using custom data configuration default-81ac0c0e27af3514
Downloading and preparing dataset csv/default to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519...
Downloading data files: 100%
1/1 [00:00<00:00, 29.55it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 23.66it/s]
Dataset csv downloaded and prepared to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519. Subsequent calls will reuse this data.
100%
1/1 [00:00<00:00, 25.84it/s]
```
print(dataset['train']['transcript'])
```
[None]
## Environment info
```
!pip install datasets==2.2.2
!pip install transformers==4.19.2
```
Hi @mbarnig, thanks for reporting.
Please note that is an expected behavior by `pandas` (we use the `pandas` library to parse CSV files): https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
```
By default the following values are interpreted as NaN:
‘’, ‘#N/A’, ‘#N/A N/A’, ‘#NA’, ‘-1.#IND’, ‘-1.#QNAN’, ‘-NaN’, ‘-nan’, ‘1.#IND’, ‘1.#QNAN’, ‘<NA>’, ‘N/A’, ‘NA’, ‘NULL’, ‘NaN’, ‘n/a’, ‘nan’, ‘null’.
```
(see "null" in the last position in the above list).
In order to prevent `pandas` from performing that automatic conversion from the string "null" to a NaN value, you should pass the `pandas` parameter `keep_default_na=False`:
```python
In [2]: dataset = load_dataset('csv', data_files={'train': 'null-test.csv'}, keep_default_na=False)
In [3]: dataset["train"][0]["transcript"]
Out[3]: 'null'
``` | [
-0.1377425491809845,
-0.03448756784200668,
0.09885776042938232,
0.26334843039512634,
0.17446957528591156,
-0.05979602411389351,
0.48916545510292053,
0.20321351289749146,
-0.06966747343540192,
0.24052365124225616,
0.0718797817826271,
0.545098066329956,
-0.3162612020969391,
-0.12006296962499619,
-0.15055416524410248,
0.21196329593658447,
0.032974742352962494,
0.252593457698822,
0.07889191061258316,
-0.08162498474121094,
-0.15460026264190674,
0.28744614124298096,
-0.4356958866119385,
-0.1180942952632904,
-0.7061774730682373,
-0.1342611461877823,
0.04681457579135895,
0.05096506327390671,
-0.0743066743016243,
-0.38285285234451294,
0.08876360207796097,
-0.010173916816711426,
-0.05166931450366974,
0.4800780415534973,
-0.0001234070077771321,
-0.15475943684577942,
0.35280871391296387,
-0.1286042332649231,
-0.5174364447593689,
-0.5590481162071228,
-0.32562774419784546,
0.21665264666080475,
0.08658254146575928,
-0.08714529126882553,
-0.014572842046618462,
0.3160499632358551,
0.11252287775278091,
-0.3630402386188507,
0.09411363303661346,
0.5121599435806274,
0.06684135645627975,
0.2585601508617401,
-0.39271071553230286,
0.16092364490032196,
0.28272441029548645,
0.4332638382911682,
0.0057153236120939255,
0.3008481562137604,
0.2581438422203064,
-0.09669754654169083,
-0.18041151762008667,
0.28111571073532104,
-0.247575044631958,
-0.0573963038623333,
-0.0156632661819458,
0.34126704931259155,
-0.07210584729909897,
-0.38040420413017273,
0.2242560088634491,
0.22902196645736694,
0.34851744771003723,
-0.3550693094730377,
-0.22225454449653625,
-0.21583011746406555,
0.4654777944087982,
-0.33293721079826355,
0.2086533010005951,
0.08150050789117813,
-0.26251518726348877,
0.1782621145248413,
-0.10601791739463806,
-0.012972231954336166,
-0.38518497347831726,
-0.1607622653245926,
-0.5335456132888794,
0.37454718351364136,
0.00042122742161154747,
-0.08351869136095047,
-0.16863977909088135,
-0.25029927492141724,
0.29372310638427734,
-0.19173094630241394,
0.07606834918260574,
0.16907304525375366,
-0.13658547401428223,
-0.029337184503674507,
-0.1408044397830963,
-0.0490618571639061,
0.11421514302492142,
-0.469188928604126,
0.07699263095855713,
0.14363008737564087,
-0.10345309972763062,
0.304854154586792,
0.030206535011529922,
0.22826257348060608,
0.327991783618927,
0.16607558727264404,
0.10176131129264832,
0.0019850721582770348,
-0.20429553091526031,
0.24261346459388733,
-0.2657632827758789,
0.22211062908172607,
-0.12007096409797668,
0.16281002759933472,
0.4379248023033142,
-0.1790120005607605,
-0.4449057877063751,
0.2833816409111023,
-0.40069594979286194,
0.3486180305480957,
0.002201075665652752,
0.24523839354515076,
-0.02688133716583252,
0.2699844241142273,
0.17119856178760529,
0.10775779187679291,
-0.23988699913024902,
-0.544578492641449,
-0.08425573259592056,
0.0654386654496193,
0.01738571748137474,
0.027255268767476082,
0.14657236635684967,
0.07567863911390305,
0.15115590393543243,
0.014025394804775715,
0.15054911375045776,
-0.012317422777414322,
-0.2652878165245056,
-0.5102479457855225,
0.2712412476539612,
0.18796667456626892,
-0.12165309488773346,
0.18029457330703735,
0.1857481747865677,
-0.6278893351554871,
0.08643463999032974,
0.7535839676856995,
-0.30623573064804077,
-0.13048571348190308,
0.12534034252166748,
0.0164800975471735,
-0.3535008430480957,
-0.038739144802093506,
-0.4549616277217865,
0.4263351559638977,
0.23850089311599731,
-0.051235537976026535,
-0.11153929680585861,
-0.6266514658927917,
-0.41539064049720764,
-0.09353246539831161,
0.08555574715137482,
0.6764317750930786,
-0.8100748658180237,
-0.10466281324625015,
0.11792387813329697,
0.07165868580341339,
0.44512858986854553,
0.2750251293182373,
-0.04659315198659897,
0.3972465991973877,
-0.07948104292154312,
0.4079853296279907,
0.08053188771009445,
-0.2636508643627167,
-0.17076154053211212,
0.12217167019844055,
-0.22592505812644958,
0.27846986055374146,
-0.05893940478563309,
-0.2938930094242096,
0.19052045047283173,
0.043851956725120544,
0.4746856689453125,
-0.004221789538860321,
-0.047220826148986816,
0.10765878111124039,
-0.388298362493515,
0.011812662705779076,
0.521629273891449,
0.08272950351238251,
0.03591207414865494,
0.04398290067911148,
-0.2407488226890564,
0.15154752135276794,
0.25978410243988037,
-0.252419650554657,
0.1514272838830948,
0.13965411484241486,
0.24037544429302216,
-0.08334808051586151,
-0.13416889309883118,
0.10671708732843399,
-0.20766830444335938,
-0.04590152949094772,
-0.06358402967453003,
0.496501624584198,
-0.42566412687301636,
-0.09453360736370087,
-0.17467743158340454,
0.1780431866645813,
-0.14208082854747772,
0.09384521096944809,
0.08020052313804626,
0.3111666440963745,
-0.3770187497138977,
0.25031232833862305,
-0.27981626987457275,
0.4516986608505249,
-0.43523991107940674,
0.13383473455905914,
-0.4295444190502167,
-0.00567366648465395,
0.19516871869564056,
-0.32720470428466797,
0.07646651566028595,
0.2735051214694977,
0.22693702578544617,
0.06149161979556084,
-0.17632782459259033,
0.1843709647655487,
0.26148849725723267,
-0.08297668397426605,
-0.33016711473464966,
-0.34998011589050293,
0.2475360929965973,
-0.2913669943809509,
0.04834107309579849,
0.145038440823555,
0.3086460530757904,
0.03937051445245743,
0.01626085489988327,
0.5541180968284607,
0.1503666192293167,
-0.009601034224033356,
-0.18662364780902863,
-0.21244993805885315,
0.19054526090621948,
-0.0005186088383197784,
-0.20647090673446655,
-0.23027727007865906,
0.02280353009700775,
0.26053085923194885,
0.25322821736335754,
0.21262791752815247,
-0.26244109869003296,
0.08659422397613525,
0.3505558371543884,
-0.28164464235305786,
0.07422204315662384,
0.18494611978530884,
-0.18075835704803467,
-0.16539719700813293,
0.015168385580182076,
0.15072982013225555,
0.3214767575263977,
0.05282001942396164,
0.057915229350328445,
0.026285696774721146,
0.012561827898025513,
-0.13985416293144226,
0.3123309016227722,
0.04805603623390198,
0.12092463672161102,
0.23063641786575317,
0.2242686152458191,
-0.06857088953256607,
-0.2804533541202545,
-0.2324698120355606,
0.1561805009841919,
0.4251350462436676,
-0.5469730496406555,
0.09665082395076752,
-0.3270009756088257,
-0.136724054813385,
-0.28714463114738464,
0.0748291164636612,
0.0835363119840622,
-0.15114733576774597,
-0.018260814249515533,
0.00422302633523941,
0.015156939625740051,
0.04607957601547241,
0.30943843722343445,
0.15463030338287354,
-0.0177348293364048,
-0.2951076626777649,
-0.03907833620905876,
-0.2440325915813446,
-0.4777575731277466,
-0.040950410068035126,
0.17695534229278564,
-0.012001428753137589,
-0.20604285597801208,
-0.23859205842018127,
-0.27740395069122314,
0.09257444739341736,
-0.17211022973060608,
0.2317090630531311,
-0.3433586359024048,
0.15646708011627197,
0.07903613895177841,
0.0591302216053009,
-0.32680565118789673,
-0.18116651475429535,
-0.05225522071123123,
0.025061240419745445,
-0.1809629499912262,
0.10542256385087967,
-0.1586132049560547,
-0.10406998544931412,
-0.11842331290245056,
-0.3094978630542755,
-0.2466679960489273,
-0.0018417909741401672,
-0.16980352997779846,
-0.2488587349653244,
0.20581741631031036,
0.49748241901397705,
0.11009185761213303,
0.4825630187988281,
-0.08601565659046173,
-0.16963911056518555,
0.04293534532189369,
-0.27315372228622437,
0.413163423538208,
-0.03181862458586693,
-0.12871982157230377,
0.09741757810115814,
-0.09512123465538025,
0.24347200989723206,
0.23360367119312286,
-0.2327461689710617,
0.11712446063756943,
0.30722346901893616,
0.05940757319331169,
-0.1519935578107834,
-0.4245225489139557,
0.2801934778690338,
0.26948127150535583,
0.08676944673061371,
-0.11900497227907181,
-0.23318396508693695,
-0.11146905273199081,
0.11513826996088028,
0.3337199091911316,
0.08514142036437988,
0.182195246219635,
0.06546001136302948,
0.421710729598999,
0.18288777768611908,
-0.07873944938182831,
0.08381412923336029,
-0.1614087074995041,
0.08936528861522675,
-0.1186617836356163,
-0.026719210669398308,
-0.1223774254322052,
0.034115612506866455,
-0.3112379312515259,
0.5094714760780334,
-0.3079172372817993,
-0.501530647277832,
0.01985819637775421,
-0.21957607567310333,
-0.4175562560558319,
-0.27300477027893066,
0.391702800989151,
-0.11231492459774017,
0.2860409617424011,
-0.09184452891349792,
0.02433561533689499,
-0.0704345628619194,
-0.11912029981613159,
-0.14430440962314606,
0.07996070384979248,
0.0962051972746849,
-0.18363982439041138,
-0.10815981030464172,
-0.01726723462343216,
-0.5667577981948853,
0.1659858226776123,
0.2676892876625061,
0.37947049736976624,
-0.12694412469863892,
-0.027452148497104645,
-0.00936821848154068,
0.04284949600696564,
0.3159785866737366,
-0.04741378873586655,
0.11792472749948502,
0.4005246162414551,
-0.09192898869514465,
-0.3295530378818512,
0.10212188959121704,
-0.44423171877861023,
0.01947680488228798,
0.1544640064239502,
0.09378057718276978,
-0.16367006301879883,
-0.08444557338953018,
0.02294868603348732,
0.11450532078742981,
-0.10337132215499878,
0.1299535483121872,
-0.11909684538841248,
-0.2008536458015442,
-0.17959998548030853,
0.023869283497333527,
0.09905891865491867,
0.2603822946548462,
0.01877790503203869,
0.1831972599029541,
0.00000790134072303772,
0.21665173768997192,
0.48982709646224976,
0.203365296125412,
0.4815211594104767,
0.1923595666885376,
-0.07612798362970352,
-0.022799678146839142,
-0.02679852396249771,
0.4149700999259949,
0.37275955080986023,
0.13647541403770447,
-0.5177229046821594,
0.05255986750125885,
-0.10074090957641602,
0.4666403830051422,
0.44852590560913086,
-0.20021367073059082,
0.11104138940572739,
-0.07689906656742096,
-0.04726128280162811,
0.11530236154794693,
0.3803706765174866,
0.22455953061580658,
-0.007774519734084606,
-0.39226362109184265,
-0.2344731092453003,
0.004900544881820679,
-0.103461354970932,
0.008912362158298492,
-0.09846152365207672,
0.10733170062303543,
-0.42733412981033325,
0.739878237247467,
-0.04531834274530411,
0.9558804631233215,
0.07653981447219849,
0.227556973695755,
0.3370082974433899,
0.2266826182603836,
0.14694809913635254,
0.15281425416469574,
0.1786813586950302,
-0.2627594470977783,
0.0420609675347805,
-0.1137726753950119,
0.12968596816062927,
0.20329514145851135,
0.09834809601306915,
-0.4109816253185272,
0.1506344974040985,
0.09092347323894501,
-0.006929092109203339,
0.1440843641757965,
-0.06096682697534561,
0.09242217242717743,
-0.3219035565853119,
-0.20641222596168518,
0.07400711625814438,
-0.3147210478782654,
-0.03693213686347008,
0.13185536861419678,
0.026553723961114883,
-0.2877524495124817,
-0.15428468585014343,
-0.2934344410896301,
0.025753136724233627,
-0.633147120475769,
-0.25373202562332153,
-0.06490403413772583,
-0.33074837923049927,
0.31214025616645813,
0.5791832208633423,
0.10858909040689468,
0.24258281290531158,
-0.1991311013698578,
-0.026286255568265915,
0.07306507229804993,
0.09791140258312225,
0.04113094508647919,
-0.26459208130836487,
0.3564344346523285,
0.06287379562854767,
-0.19385430216789246,
0.01573203131556511,
-0.13923443853855133,
0.13174107670783997,
0.33964529633522034,
-0.09872537851333618,
0.35936230421066284,
-0.10481581091880798,
-0.12157835066318512,
0.10942570120096207,
0.23289108276367188,
-0.09873636066913605,
0.0561162605881691,
-0.10571044683456421,
-0.3121582567691803,
0.10868991911411285,
-0.18482568860054016,
-0.5152146816253662,
0.017064856365323067,
0.47309213876724243,
0.1878969669342041,
0.3418751358985901,
0.7822737693786621,
-0.08142399042844772,
-0.06730085611343384,
-0.1958642601966858,
0.2786162793636322,
-0.03161672502756119,
-0.30261707305908203,
0.23323222994804382,
0.04787493124604225,
-0.0444830060005188,
0.01289273053407669,
0.4605427086353302,
0.05177066847681999,
0.1389491707086563,
-0.22879597544670105,
-0.16611769795417786,
-0.5531914830207825,
-0.08167552947998047,
0.21322019398212433,
0.0413566492497921,
0.2936013340950012,
0.27256253361701965,
0.11140434443950653,
-0.1630224585533142,
-0.2242077887058258,
0.066558338701725,
-0.11570354551076889,
0.3823243975639343,
0.039701394736766815,
0.019332770258188248,
0.29753977060317993,
0.04729761555790901,
0.07461937516927719,
0.3186984062194824,
0.19636282324790955,
-0.14928627014160156,
-0.22645404934883118,
0.1556388884782791,
0.14870601892471313,
0.06066647917032242,
-0.0901881605386734,
-0.02236131578683853,
-0.0017380695790052414,
-0.155513733625412,
0.21862834692001343,
0.464604914188385,
0.008901577442884445,
0.31886112689971924,
0.28298524022102356,
0.4164523184299469,
-0.033913254737854004,
-0.06384759396314621,
-0.032838620245456696,
0.11290021240711212,
0.18828296661376953,
0.1513940393924713,
-0.06688369810581207,
-0.15166610479354858,
-0.03855948522686958,
0.08625990152359009,
0.017490893602371216,
0.04087148234248161,
0.10553564131259918,
-0.38979482650756836,
-0.0448322631418705,
-0.07871440052986145,
-0.220338374376297,
0.08977734297513962,
-0.24676981568336487,
-0.3480337858200073,
0.26202529668807983,
-0.016344694420695305,
-0.05325641110539436,
-0.010991880670189857,
0.10912482440471649,
-0.02253442257642746,
-0.021937357261776924,
0.4018140435218811,
-0.030287904664874077,
0.19523724913597107,
-0.10031698644161224,
-0.1525557041168213,
0.2945396900177002,
0.05479210987687111,
0.027117447927594185,
-0.03259572014212608,
-0.1394752413034439,
0.1613299548625946,
-0.01843925379216671,
0.07622625678777695,
0.010722823441028595,
0.42509734630584717,
-0.03387170284986496,
0.4417504668235779,
-0.1728420853614807,
-0.013440299779176712,
0.006006516516208649,
-0.3340771794319153,
0.125928595662117,
0.3196221590042114,
-0.21982428431510925,
0.2203962504863739,
0.14859503507614136,
0.06726387143135071,
-0.02160123735666275,
-0.14565445482730865,
-0.02131100557744503,
0.10261711478233337,
-0.5182806849479675,
-0.2679748833179474,
-0.430260568857193,
-0.03509549796581268,
-0.10246601700782776,
0.05780735984444618,
-0.12944737076759338,
0.004514776170253754,
0.20717886090278625,
0.340668261051178,
-0.3026363253593445,
0.034476447850465775,
-0.05073314160108566,
0.22284764051437378,
0.08755692094564438,
-0.19956693053245544,
0.423892080783844,
-0.028514280915260315,
0.27466076612472534,
0.3074263036251068,
0.4603685736656189,
0.47950467467308044,
0.439657598733902,
-0.11984051764011383,
-0.144109845161438,
-0.032290276139974594,
-0.14871203899383545,
0.05625312030315399,
0.1490730345249176,
0.05320117250084877,
0.4220965802669525,
0.2825678884983063,
0.035366304218769073,
-0.022483399137854576,
0.04446549713611603,
0.2475997358560562,
-0.05283534154295921,
-0.001934083178639412,
0.12138353288173676,
0.1247774213552475,
0.08687513321638107,
-0.45327892899513245,
-0.17140644788742065,
-0.5199360251426697,
0.17559754848480225,
0.5047067999839783,
0.13094690442085266,
0.2424803376197815,
0.2801896035671234,
0.017401553690433502,
0.09796701371669769,
0.4155038893222809,
0.22932100296020508,
-0.1068233773112297,
-0.4534686505794525,
-0.053663842380046844,
-0.4960609972476959,
0.27904561161994934,
0.03645014017820358,
0.15052981674671173,
-0.2273232340812683,
-0.06346472352743149,
0.12660934031009674,
-0.00009033083915710449,
-0.30590909719467163,
-0.23612143099308014,
-0.12530748546123505,
0.015954632312059402,
-0.17465740442276,
-0.027525726705789566,
0.12169650197029114,
-0.15622630715370178,
-0.07631992548704147,
-0.2683223485946655,
0.009795591235160828,
0.06041335687041283,
-0.09594075381755829,
0.013248538598418236,
-0.1572834551334381,
-0.19926783442497253,
0.21338623762130737,
0.12687498331069946,
0.10260322690010071,
0.4181343615055084,
-0.0797760933637619,
0.0060648731887340546,
-0.06844660639762878,
0.026226840913295746,
-0.30054011940956116,
0.3973793089389801,
0.3977441191673279,
0.5851603746414185,
0.015010280534625053,
0.15301603078842163,
-0.02408110350370407,
-0.006837137043476105,
0.20875658094882965,
-0.1910577267408371,
-0.5707175731658936,
0.22590768337249756,
-0.19018030166625977,
0.15763205289840698,
-0.21234220266342163,
0.15600678324699402,
0.0381518229842186,
0.2800125777721405,
-0.5372306704521179,
-0.27916213870048523,
0.5484110116958618,
-0.6133669018745422,
-0.46408769488334656,
-0.04899514466524124,
0.17169000208377838,
0.07480132579803467,
-0.1244833692908287,
-0.7808848023414612,
0.030662663280963898,
0.2515118420124054,
-0.1823098063468933,
-0.3932880163192749,
0.14243099093437195,
-0.07938693463802338,
0.18499235808849335,
-0.2904778718948364,
0.5153408646583557,
0.05034492164850235,
-0.10196154564619064,
-0.04431521147489548,
-0.3437390923500061
] |
https://github.com/huggingface/datasets/issues/4467 | Transcript string 'null' converted to [None] by load_dataset() | @albertvillanova I also ran into this issue, it had me scratching my head for a while! In my case it was tripped by a literal "NA" comment collected from a user-facing form (e.g., this question does not apply to me). Thankfully this answer was here, but I feel it is such a common trap that it deserves to be noted in the official docs, maybe [here](https://huggingface.co/docs/datasets/loading#csv)?
I'm happy to submit a PR if you agree! | ## Issue
I am training a luxembourgish speech-recognition model in Colab with a custom dataset, including a dictionary of luxembourgish words, for example the speaken numbers 0 to 9. When preparing the dataset with the script
`ds_train1 = mydataset.map(prepare_dataset)`
the following error was issued:
```
ValueError Traceback (most recent call last)
<ipython-input-69-1e8f2b37f5bc> in <module>()
----> 1 ds_train = mydataset_train.map(prepare_dataset)
11 frames
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in __call__(self, text, text_pair, add_special_tokens, padding, truncation, max_length, stride, is_split_into_words, pad_to_multiple_of, return_tensors, return_token_type_ids, return_attention_mask, return_overflowing_tokens, return_special_tokens_mask, return_offsets_mapping, return_length, verbose, **kwargs)
2450 if not _is_valid_text_input(text):
2451 raise ValueError(
-> 2452 "text input must of type str (single example), List[str] (batch or single pretokenized example) "
2453 "or List[List[str]] (batch of pretokenized examples)."
2454 )
ValueError: text input must of type str (single example), List[str] (batch or single pretokenized example) or List[List[str]] (batch of pretokenized examples).
```
Debugging this problem was not easy, all transcriptions in the dataset are correct strings. Finally I discovered that the transcription string 'null' is interpreted as [None] by the `load_dataset()` script. By deleting this row in the dataset the training worked fine.
## Expected result:
transcription 'null' interpreted as 'str' instead of 'None'.
## Reproduction
Here is the code to reproduce the error with a one-row-dataset.
```
with open("null-test.csv") as f:
reader = csv.reader(f)
for row in reader:
print(row)
```
['wav_filename', 'wav_filesize', 'transcript']
['wavs/female/NULL1.wav', '17530', 'null']
```
dataset = load_dataset('csv', data_files={'train': 'null-test.csv'})
```
Using custom data configuration default-81ac0c0e27af3514
Downloading and preparing dataset csv/default to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519...
Downloading data files: 100%
1/1 [00:00<00:00, 29.55it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 23.66it/s]
Dataset csv downloaded and prepared to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519. Subsequent calls will reuse this data.
100%
1/1 [00:00<00:00, 25.84it/s]
```
print(dataset['train']['transcript'])
```
[None]
## Environment info
```
!pip install datasets==2.2.2
!pip install transformers==4.19.2
``` | 75 | Transcript string 'null' converted to [None] by load_dataset()
## Issue
I am training a luxembourgish speech-recognition model in Colab with a custom dataset, including a dictionary of luxembourgish words, for example the speaken numbers 0 to 9. When preparing the dataset with the script
`ds_train1 = mydataset.map(prepare_dataset)`
the following error was issued:
```
ValueError Traceback (most recent call last)
<ipython-input-69-1e8f2b37f5bc> in <module>()
----> 1 ds_train = mydataset_train.map(prepare_dataset)
11 frames
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in __call__(self, text, text_pair, add_special_tokens, padding, truncation, max_length, stride, is_split_into_words, pad_to_multiple_of, return_tensors, return_token_type_ids, return_attention_mask, return_overflowing_tokens, return_special_tokens_mask, return_offsets_mapping, return_length, verbose, **kwargs)
2450 if not _is_valid_text_input(text):
2451 raise ValueError(
-> 2452 "text input must of type str (single example), List[str] (batch or single pretokenized example) "
2453 "or List[List[str]] (batch of pretokenized examples)."
2454 )
ValueError: text input must of type str (single example), List[str] (batch or single pretokenized example) or List[List[str]] (batch of pretokenized examples).
```
Debugging this problem was not easy, all transcriptions in the dataset are correct strings. Finally I discovered that the transcription string 'null' is interpreted as [None] by the `load_dataset()` script. By deleting this row in the dataset the training worked fine.
## Expected result:
transcription 'null' interpreted as 'str' instead of 'None'.
## Reproduction
Here is the code to reproduce the error with a one-row-dataset.
```
with open("null-test.csv") as f:
reader = csv.reader(f)
for row in reader:
print(row)
```
['wav_filename', 'wav_filesize', 'transcript']
['wavs/female/NULL1.wav', '17530', 'null']
```
dataset = load_dataset('csv', data_files={'train': 'null-test.csv'})
```
Using custom data configuration default-81ac0c0e27af3514
Downloading and preparing dataset csv/default to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519...
Downloading data files: 100%
1/1 [00:00<00:00, 29.55it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 23.66it/s]
Dataset csv downloaded and prepared to /root/.cache/huggingface/datasets/csv/default-81ac0c0e27af3514/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519. Subsequent calls will reuse this data.
100%
1/1 [00:00<00:00, 25.84it/s]
```
print(dataset['train']['transcript'])
```
[None]
## Environment info
```
!pip install datasets==2.2.2
!pip install transformers==4.19.2
```
@albertvillanova I also ran into this issue, it had me scratching my head for a while! In my case it was tripped by a literal "NA" comment collected from a user-facing form (e.g., this question does not apply to me). Thankfully this answer was here, but I feel it is such a common trap that it deserves to be noted in the official docs, maybe [here](https://huggingface.co/docs/datasets/loading#csv)?
I'm happy to submit a PR if you agree! | [
-0.1377425491809845,
-0.03448756784200668,
0.09885776042938232,
0.26334843039512634,
0.17446957528591156,
-0.05979602411389351,
0.48916545510292053,
0.20321351289749146,
-0.06966747343540192,
0.24052365124225616,
0.0718797817826271,
0.545098066329956,
-0.3162612020969391,
-0.12006296962499619,
-0.15055416524410248,
0.21196329593658447,
0.032974742352962494,
0.252593457698822,
0.07889191061258316,
-0.08162498474121094,
-0.15460026264190674,
0.28744614124298096,
-0.4356958866119385,
-0.1180942952632904,
-0.7061774730682373,
-0.1342611461877823,
0.04681457579135895,
0.05096506327390671,
-0.0743066743016243,
-0.38285285234451294,
0.08876360207796097,
-0.010173916816711426,
-0.05166931450366974,
0.4800780415534973,
-0.0001234070077771321,
-0.15475943684577942,
0.35280871391296387,
-0.1286042332649231,
-0.5174364447593689,
-0.5590481162071228,
-0.32562774419784546,
0.21665264666080475,
0.08658254146575928,
-0.08714529126882553,
-0.014572842046618462,
0.3160499632358551,
0.11252287775278091,
-0.3630402386188507,
0.09411363303661346,
0.5121599435806274,
0.06684135645627975,
0.2585601508617401,
-0.39271071553230286,
0.16092364490032196,
0.28272441029548645,
0.4332638382911682,
0.0057153236120939255,
0.3008481562137604,
0.2581438422203064,
-0.09669754654169083,
-0.18041151762008667,
0.28111571073532104,
-0.247575044631958,
-0.0573963038623333,
-0.0156632661819458,
0.34126704931259155,
-0.07210584729909897,
-0.38040420413017273,
0.2242560088634491,
0.22902196645736694,
0.34851744771003723,
-0.3550693094730377,
-0.22225454449653625,
-0.21583011746406555,
0.4654777944087982,
-0.33293721079826355,
0.2086533010005951,
0.08150050789117813,
-0.26251518726348877,
0.1782621145248413,
-0.10601791739463806,
-0.012972231954336166,
-0.38518497347831726,
-0.1607622653245926,
-0.5335456132888794,
0.37454718351364136,
0.00042122742161154747,
-0.08351869136095047,
-0.16863977909088135,
-0.25029927492141724,
0.29372310638427734,
-0.19173094630241394,
0.07606834918260574,
0.16907304525375366,
-0.13658547401428223,
-0.029337184503674507,
-0.1408044397830963,
-0.0490618571639061,
0.11421514302492142,
-0.469188928604126,
0.07699263095855713,
0.14363008737564087,
-0.10345309972763062,
0.304854154586792,
0.030206535011529922,
0.22826257348060608,
0.327991783618927,
0.16607558727264404,
0.10176131129264832,
0.0019850721582770348,
-0.20429553091526031,
0.24261346459388733,
-0.2657632827758789,
0.22211062908172607,
-0.12007096409797668,
0.16281002759933472,
0.4379248023033142,
-0.1790120005607605,
-0.4449057877063751,
0.2833816409111023,
-0.40069594979286194,
0.3486180305480957,
0.002201075665652752,
0.24523839354515076,
-0.02688133716583252,
0.2699844241142273,
0.17119856178760529,
0.10775779187679291,
-0.23988699913024902,
-0.544578492641449,
-0.08425573259592056,
0.0654386654496193,
0.01738571748137474,
0.027255268767476082,
0.14657236635684967,
0.07567863911390305,
0.15115590393543243,
0.014025394804775715,
0.15054911375045776,
-0.012317422777414322,
-0.2652878165245056,
-0.5102479457855225,
0.2712412476539612,
0.18796667456626892,
-0.12165309488773346,
0.18029457330703735,
0.1857481747865677,
-0.6278893351554871,
0.08643463999032974,
0.7535839676856995,
-0.30623573064804077,
-0.13048571348190308,
0.12534034252166748,
0.0164800975471735,
-0.3535008430480957,
-0.038739144802093506,
-0.4549616277217865,
0.4263351559638977,
0.23850089311599731,
-0.051235537976026535,
-0.11153929680585861,
-0.6266514658927917,
-0.41539064049720764,
-0.09353246539831161,
0.08555574715137482,
0.6764317750930786,
-0.8100748658180237,
-0.10466281324625015,
0.11792387813329697,
0.07165868580341339,
0.44512858986854553,
0.2750251293182373,
-0.04659315198659897,
0.3972465991973877,
-0.07948104292154312,
0.4079853296279907,
0.08053188771009445,
-0.2636508643627167,
-0.17076154053211212,
0.12217167019844055,
-0.22592505812644958,
0.27846986055374146,
-0.05893940478563309,
-0.2938930094242096,
0.19052045047283173,
0.043851956725120544,
0.4746856689453125,
-0.004221789538860321,
-0.047220826148986816,
0.10765878111124039,
-0.388298362493515,
0.011812662705779076,
0.521629273891449,
0.08272950351238251,
0.03591207414865494,
0.04398290067911148,
-0.2407488226890564,
0.15154752135276794,
0.25978410243988037,
-0.252419650554657,
0.1514272838830948,
0.13965411484241486,
0.24037544429302216,
-0.08334808051586151,
-0.13416889309883118,
0.10671708732843399,
-0.20766830444335938,
-0.04590152949094772,
-0.06358402967453003,
0.496501624584198,
-0.42566412687301636,
-0.09453360736370087,
-0.17467743158340454,
0.1780431866645813,
-0.14208082854747772,
0.09384521096944809,
0.08020052313804626,
0.3111666440963745,
-0.3770187497138977,
0.25031232833862305,
-0.27981626987457275,
0.4516986608505249,
-0.43523991107940674,
0.13383473455905914,
-0.4295444190502167,
-0.00567366648465395,
0.19516871869564056,
-0.32720470428466797,
0.07646651566028595,
0.2735051214694977,
0.22693702578544617,
0.06149161979556084,
-0.17632782459259033,
0.1843709647655487,
0.26148849725723267,
-0.08297668397426605,
-0.33016711473464966,
-0.34998011589050293,
0.2475360929965973,
-0.2913669943809509,
0.04834107309579849,
0.145038440823555,
0.3086460530757904,
0.03937051445245743,
0.01626085489988327,
0.5541180968284607,
0.1503666192293167,
-0.009601034224033356,
-0.18662364780902863,
-0.21244993805885315,
0.19054526090621948,
-0.0005186088383197784,
-0.20647090673446655,
-0.23027727007865906,
0.02280353009700775,
0.26053085923194885,
0.25322821736335754,
0.21262791752815247,
-0.26244109869003296,
0.08659422397613525,
0.3505558371543884,
-0.28164464235305786,
0.07422204315662384,
0.18494611978530884,
-0.18075835704803467,
-0.16539719700813293,
0.015168385580182076,
0.15072982013225555,
0.3214767575263977,
0.05282001942396164,
0.057915229350328445,
0.026285696774721146,
0.012561827898025513,
-0.13985416293144226,
0.3123309016227722,
0.04805603623390198,
0.12092463672161102,
0.23063641786575317,
0.2242686152458191,
-0.06857088953256607,
-0.2804533541202545,
-0.2324698120355606,
0.1561805009841919,
0.4251350462436676,
-0.5469730496406555,
0.09665082395076752,
-0.3270009756088257,
-0.136724054813385,
-0.28714463114738464,
0.0748291164636612,
0.0835363119840622,
-0.15114733576774597,
-0.018260814249515533,
0.00422302633523941,
0.015156939625740051,
0.04607957601547241,
0.30943843722343445,
0.15463030338287354,
-0.0177348293364048,
-0.2951076626777649,
-0.03907833620905876,
-0.2440325915813446,
-0.4777575731277466,
-0.040950410068035126,
0.17695534229278564,
-0.012001428753137589,
-0.20604285597801208,
-0.23859205842018127,
-0.27740395069122314,
0.09257444739341736,
-0.17211022973060608,
0.2317090630531311,
-0.3433586359024048,
0.15646708011627197,
0.07903613895177841,
0.0591302216053009,
-0.32680565118789673,
-0.18116651475429535,
-0.05225522071123123,
0.025061240419745445,
-0.1809629499912262,
0.10542256385087967,
-0.1586132049560547,
-0.10406998544931412,
-0.11842331290245056,
-0.3094978630542755,
-0.2466679960489273,
-0.0018417909741401672,
-0.16980352997779846,
-0.2488587349653244,
0.20581741631031036,
0.49748241901397705,
0.11009185761213303,
0.4825630187988281,
-0.08601565659046173,
-0.16963911056518555,
0.04293534532189369,
-0.27315372228622437,
0.413163423538208,
-0.03181862458586693,
-0.12871982157230377,
0.09741757810115814,
-0.09512123465538025,
0.24347200989723206,
0.23360367119312286,
-0.2327461689710617,
0.11712446063756943,
0.30722346901893616,
0.05940757319331169,
-0.1519935578107834,
-0.4245225489139557,
0.2801934778690338,
0.26948127150535583,
0.08676944673061371,
-0.11900497227907181,
-0.23318396508693695,
-0.11146905273199081,
0.11513826996088028,
0.3337199091911316,
0.08514142036437988,
0.182195246219635,
0.06546001136302948,
0.421710729598999,
0.18288777768611908,
-0.07873944938182831,
0.08381412923336029,
-0.1614087074995041,
0.08936528861522675,
-0.1186617836356163,
-0.026719210669398308,
-0.1223774254322052,
0.034115612506866455,
-0.3112379312515259,
0.5094714760780334,
-0.3079172372817993,
-0.501530647277832,
0.01985819637775421,
-0.21957607567310333,
-0.4175562560558319,
-0.27300477027893066,
0.391702800989151,
-0.11231492459774017,
0.2860409617424011,
-0.09184452891349792,
0.02433561533689499,
-0.0704345628619194,
-0.11912029981613159,
-0.14430440962314606,
0.07996070384979248,
0.0962051972746849,
-0.18363982439041138,
-0.10815981030464172,
-0.01726723462343216,
-0.5667577981948853,
0.1659858226776123,
0.2676892876625061,
0.37947049736976624,
-0.12694412469863892,
-0.027452148497104645,
-0.00936821848154068,
0.04284949600696564,
0.3159785866737366,
-0.04741378873586655,
0.11792472749948502,
0.4005246162414551,
-0.09192898869514465,
-0.3295530378818512,
0.10212188959121704,
-0.44423171877861023,
0.01947680488228798,
0.1544640064239502,
0.09378057718276978,
-0.16367006301879883,
-0.08444557338953018,
0.02294868603348732,
0.11450532078742981,
-0.10337132215499878,
0.1299535483121872,
-0.11909684538841248,
-0.2008536458015442,
-0.17959998548030853,
0.023869283497333527,
0.09905891865491867,
0.2603822946548462,
0.01877790503203869,
0.1831972599029541,
0.00000790134072303772,
0.21665173768997192,
0.48982709646224976,
0.203365296125412,
0.4815211594104767,
0.1923595666885376,
-0.07612798362970352,
-0.022799678146839142,
-0.02679852396249771,
0.4149700999259949,
0.37275955080986023,
0.13647541403770447,
-0.5177229046821594,
0.05255986750125885,
-0.10074090957641602,
0.4666403830051422,
0.44852590560913086,
-0.20021367073059082,
0.11104138940572739,
-0.07689906656742096,
-0.04726128280162811,
0.11530236154794693,
0.3803706765174866,
0.22455953061580658,
-0.007774519734084606,
-0.39226362109184265,
-0.2344731092453003,
0.004900544881820679,
-0.103461354970932,
0.008912362158298492,
-0.09846152365207672,
0.10733170062303543,
-0.42733412981033325,
0.739878237247467,
-0.04531834274530411,
0.9558804631233215,
0.07653981447219849,
0.227556973695755,
0.3370082974433899,
0.2266826182603836,
0.14694809913635254,
0.15281425416469574,
0.1786813586950302,
-0.2627594470977783,
0.0420609675347805,
-0.1137726753950119,
0.12968596816062927,
0.20329514145851135,
0.09834809601306915,
-0.4109816253185272,
0.1506344974040985,
0.09092347323894501,
-0.006929092109203339,
0.1440843641757965,
-0.06096682697534561,
0.09242217242717743,
-0.3219035565853119,
-0.20641222596168518,
0.07400711625814438,
-0.3147210478782654,
-0.03693213686347008,
0.13185536861419678,
0.026553723961114883,
-0.2877524495124817,
-0.15428468585014343,
-0.2934344410896301,
0.025753136724233627,
-0.633147120475769,
-0.25373202562332153,
-0.06490403413772583,
-0.33074837923049927,
0.31214025616645813,
0.5791832208633423,
0.10858909040689468,
0.24258281290531158,
-0.1991311013698578,
-0.026286255568265915,
0.07306507229804993,
0.09791140258312225,
0.04113094508647919,
-0.26459208130836487,
0.3564344346523285,
0.06287379562854767,
-0.19385430216789246,
0.01573203131556511,
-0.13923443853855133,
0.13174107670783997,
0.33964529633522034,
-0.09872537851333618,
0.35936230421066284,
-0.10481581091880798,
-0.12157835066318512,
0.10942570120096207,
0.23289108276367188,
-0.09873636066913605,
0.0561162605881691,
-0.10571044683456421,
-0.3121582567691803,
0.10868991911411285,
-0.18482568860054016,
-0.5152146816253662,
0.017064856365323067,
0.47309213876724243,
0.1878969669342041,
0.3418751358985901,
0.7822737693786621,
-0.08142399042844772,
-0.06730085611343384,
-0.1958642601966858,
0.2786162793636322,
-0.03161672502756119,
-0.30261707305908203,
0.23323222994804382,
0.04787493124604225,
-0.0444830060005188,
0.01289273053407669,
0.4605427086353302,
0.05177066847681999,
0.1389491707086563,
-0.22879597544670105,
-0.16611769795417786,
-0.5531914830207825,
-0.08167552947998047,
0.21322019398212433,
0.0413566492497921,
0.2936013340950012,
0.27256253361701965,
0.11140434443950653,
-0.1630224585533142,
-0.2242077887058258,
0.066558338701725,
-0.11570354551076889,
0.3823243975639343,
0.039701394736766815,
0.019332770258188248,
0.29753977060317993,
0.04729761555790901,
0.07461937516927719,
0.3186984062194824,
0.19636282324790955,
-0.14928627014160156,
-0.22645404934883118,
0.1556388884782791,
0.14870601892471313,
0.06066647917032242,
-0.0901881605386734,
-0.02236131578683853,
-0.0017380695790052414,
-0.155513733625412,
0.21862834692001343,
0.464604914188385,
0.008901577442884445,
0.31886112689971924,
0.28298524022102356,
0.4164523184299469,
-0.033913254737854004,
-0.06384759396314621,
-0.032838620245456696,
0.11290021240711212,
0.18828296661376953,
0.1513940393924713,
-0.06688369810581207,
-0.15166610479354858,
-0.03855948522686958,
0.08625990152359009,
0.017490893602371216,
0.04087148234248161,
0.10553564131259918,
-0.38979482650756836,
-0.0448322631418705,
-0.07871440052986145,
-0.220338374376297,
0.08977734297513962,
-0.24676981568336487,
-0.3480337858200073,
0.26202529668807983,
-0.016344694420695305,
-0.05325641110539436,
-0.010991880670189857,
0.10912482440471649,
-0.02253442257642746,
-0.021937357261776924,
0.4018140435218811,
-0.030287904664874077,
0.19523724913597107,
-0.10031698644161224,
-0.1525557041168213,
0.2945396900177002,
0.05479210987687111,
0.027117447927594185,
-0.03259572014212608,
-0.1394752413034439,
0.1613299548625946,
-0.01843925379216671,
0.07622625678777695,
0.010722823441028595,
0.42509734630584717,
-0.03387170284986496,
0.4417504668235779,
-0.1728420853614807,
-0.013440299779176712,
0.006006516516208649,
-0.3340771794319153,
0.125928595662117,
0.3196221590042114,
-0.21982428431510925,
0.2203962504863739,
0.14859503507614136,
0.06726387143135071,
-0.02160123735666275,
-0.14565445482730865,
-0.02131100557744503,
0.10261711478233337,
-0.5182806849479675,
-0.2679748833179474,
-0.430260568857193,
-0.03509549796581268,
-0.10246601700782776,
0.05780735984444618,
-0.12944737076759338,
0.004514776170253754,
0.20717886090278625,
0.340668261051178,
-0.3026363253593445,
0.034476447850465775,
-0.05073314160108566,
0.22284764051437378,
0.08755692094564438,
-0.19956693053245544,
0.423892080783844,
-0.028514280915260315,
0.27466076612472534,
0.3074263036251068,
0.4603685736656189,
0.47950467467308044,
0.439657598733902,
-0.11984051764011383,
-0.144109845161438,
-0.032290276139974594,
-0.14871203899383545,
0.05625312030315399,
0.1490730345249176,
0.05320117250084877,
0.4220965802669525,
0.2825678884983063,
0.035366304218769073,
-0.022483399137854576,
0.04446549713611603,
0.2475997358560562,
-0.05283534154295921,
-0.001934083178639412,
0.12138353288173676,
0.1247774213552475,
0.08687513321638107,
-0.45327892899513245,
-0.17140644788742065,
-0.5199360251426697,
0.17559754848480225,
0.5047067999839783,
0.13094690442085266,
0.2424803376197815,
0.2801896035671234,
0.017401553690433502,
0.09796701371669769,
0.4155038893222809,
0.22932100296020508,
-0.1068233773112297,
-0.4534686505794525,
-0.053663842380046844,
-0.4960609972476959,
0.27904561161994934,
0.03645014017820358,
0.15052981674671173,
-0.2273232340812683,
-0.06346472352743149,
0.12660934031009674,
-0.00009033083915710449,
-0.30590909719467163,
-0.23612143099308014,
-0.12530748546123505,
0.015954632312059402,
-0.17465740442276,
-0.027525726705789566,
0.12169650197029114,
-0.15622630715370178,
-0.07631992548704147,
-0.2683223485946655,
0.009795591235160828,
0.06041335687041283,
-0.09594075381755829,
0.013248538598418236,
-0.1572834551334381,
-0.19926783442497253,
0.21338623762130737,
0.12687498331069946,
0.10260322690010071,
0.4181343615055084,
-0.0797760933637619,
0.0060648731887340546,
-0.06844660639762878,
0.026226840913295746,
-0.30054011940956116,
0.3973793089389801,
0.3977441191673279,
0.5851603746414185,
0.015010280534625053,
0.15301603078842163,
-0.02408110350370407,
-0.006837137043476105,
0.20875658094882965,
-0.1910577267408371,
-0.5707175731658936,
0.22590768337249756,
-0.19018030166625977,
0.15763205289840698,
-0.21234220266342163,
0.15600678324699402,
0.0381518229842186,
0.2800125777721405,
-0.5372306704521179,
-0.27916213870048523,
0.5484110116958618,
-0.6133669018745422,
-0.46408769488334656,
-0.04899514466524124,
0.17169000208377838,
0.07480132579803467,
-0.1244833692908287,
-0.7808848023414612,
0.030662663280963898,
0.2515118420124054,
-0.1823098063468933,
-0.3932880163192749,
0.14243099093437195,
-0.07938693463802338,
0.18499235808849335,
-0.2904778718948364,
0.5153408646583557,
0.05034492164850235,
-0.10196154564619064,
-0.04431521147489548,
-0.3437390923500061
] |
https://github.com/huggingface/datasets/issues/4462 | BigBench: NonMatchingSplitsSizesError when passing a dataset configuration parameter | Yup it can also work, and maybe it's simpler this way. Opening a PR to fix bigbench instead of https://github.com/huggingface/datasets/pull/4463 | As noticed in https://github.com/huggingface/datasets/pull/4125 when a dataset config class has a parameter that reduces the number of examples (e.g. named `max_examples`), then loading the dataset and passing `max_examples` raises `NonMatchingSplitsSizesError`.
This is because it will check for expected the number of examples of the config with the same name without taking into account the `max_examples` parameter. This can be fixed by checking the expected number of examples using the **config id** instead of name. Indeed the config id corresponds to the config name + an optional suffix that depends on the config parameters | 20 | BigBench: NonMatchingSplitsSizesError when passing a dataset configuration parameter
As noticed in https://github.com/huggingface/datasets/pull/4125 when a dataset config class has a parameter that reduces the number of examples (e.g. named `max_examples`), then loading the dataset and passing `max_examples` raises `NonMatchingSplitsSizesError`.
This is because it will check for expected the number of examples of the config with the same name without taking into account the `max_examples` parameter. This can be fixed by checking the expected number of examples using the **config id** instead of name. Indeed the config id corresponds to the config name + an optional suffix that depends on the config parameters
Yup it can also work, and maybe it's simpler this way. Opening a PR to fix bigbench instead of https://github.com/huggingface/datasets/pull/4463 | [
-0.5403623580932617,
-0.3582238554954529,
0.011093351989984512,
0.3671172261238098,
0.05378848686814308,
-0.1841181367635727,
-0.01696135476231575,
0.4620932936668396,
0.11047019064426422,
0.2697080969810486,
0.27880728244781494,
0.10549081861972809,
-0.13502831757068634,
0.3006335496902466,
0.07819069921970367,
-0.06800906360149384,
0.004848584532737732,
-0.06603832542896271,
-0.2549790143966675,
0.23461325466632843,
-0.20481018722057343,
0.1876285821199417,
-0.2783225178718567,
-0.02264239639043808,
-0.3083335757255554,
0.2331710159778595,
-0.13870581984519958,
0.05487797409296036,
0.08269909024238586,
-0.16447986662387848,
0.21638895571231842,
-0.08627782762050629,
0.003474954515695572,
0.3672965466976166,
-0.00010682487481972203,
0.08978450298309326,
0.4439849853515625,
-0.16141483187675476,
-0.32696232199668884,
0.057325512170791626,
-0.4056733250617981,
-0.42792636156082153,
-0.2761315405368805,
-0.11052118241786957,
-0.07164403796195984,
0.08167104423046112,
0.00886589102447033,
-0.2013949453830719,
0.17732927203178406,
0.11373536288738251,
0.2551939785480499,
0.3957306146621704,
-0.32250022888183594,
-0.3643749952316284,
0.05688835680484772,
0.030065134167671204,
-0.2094019204378128,
0.12560328841209412,
0.23727522790431976,
-0.13717623054981232,
-0.25720658898353577,
0.1269342452287674,
0.07961232215166092,
0.2306678146123886,
0.2536182105541229,
-0.20498718321323395,
-0.011867217719554901,
0.06035540625452995,
0.2581901252269745,
0.49279308319091797,
0.4972046911716461,
-0.18448671698570251,
-0.25233396887779236,
-0.5917614698410034,
0.038517892360687256,
-0.14385370910167694,
0.3296331465244293,
-0.01829385571181774,
-0.2274058312177658,
0.04875357449054718,
-0.20453490316867828,
-0.13986709713935852,
-0.0021248236298561096,
-0.1533716917037964,
0.3483450412750244,
-0.15607157349586487,
-0.18608230352401733,
0.18851801753044128,
0.09098423272371292,
-0.27122825384140015,
0.03184876963496208,
-0.2937386631965637,
-0.017147254198789597,
-0.04649849608540535,
-0.29088321328163147,
-0.024237381294369698,
-0.04610396921634674,
0.2687150239944458,
0.5785043835639954,
0.31890785694122314,
0.35547298192977905,
0.12552502751350403,
0.5650190711021423,
0.03512827306985855,
0.13583585619926453,
0.12529365718364716,
0.3437800407409668,
-0.12648005783557892,
0.05460343882441521,
0.0413723960518837,
0.09889154136180878,
0.17512911558151245,
0.20109570026397705,
-0.5512024164199829,
-0.1567947119474411,
-0.1604718267917633,
0.4607856869697571,
-0.289023220539093,
-0.3436523973941803,
0.028485719114542007,
-0.09885162115097046,
-0.05277127027511597,
0.07059798389673233,
0.3264036774635315,
-0.18299846351146698,
0.15519863367080688,
-0.1757095903158188,
-0.07557609677314758,
-0.2481464296579361,
-0.24500030279159546,
-0.2715122401714325,
-0.1329481303691864,
-0.28128698468208313,
0.18192268908023834,
0.23312832415103912,
-0.04097062349319458,
0.4600796699523926,
0.1820780634880066,
0.2886503338813782,
-0.04759465903043747,
0.23823338747024536,
0.11975160241127014,
-0.15423816442489624,
0.08605829626321793,
-0.2296762615442276,
-0.1673239916563034,
0.0599842444062233,
0.07821863889694214,
-0.19900727272033691,
-0.07673432677984238,
0.12004461884498596,
-0.25531822443008423,
0.14820687472820282,
0.24691733717918396,
-0.3805057406425476,
-0.009629510343074799,
-0.35903042554855347,
0.18963398039340973,
0.21128013730049133,
-0.03506474196910858,
-0.05896373838186264,
-0.1428631991147995,
-0.12808659672737122,
-0.08716738224029541,
0.07692316174507141,
0.4066036343574524,
0.014677099883556366,
-0.3645651042461395,
0.558076798915863,
-0.12352780997753143,
-0.008843980729579926,
0.2869890034198761,
-0.31482362747192383,
-0.10779847949743271,
-0.30133920907974243,
-0.05832885578274727,
0.2889573872089386,
-0.14702801406383514,
-0.5849848389625549,
0.5152921080589294,
-0.09357169270515442,
0.16411922872066498,
0.06201625242829323,
0.1397501826286316,
0.2557823359966278,
0.043535467237234116,
-0.05495494604110718,
0.17495441436767578,
-0.11128200590610504,
-0.11383502930402756,
-0.35822489857673645,
-0.19467611610889435,
0.13021740317344666,
0.06983506679534912,
0.15135404467582703,
0.04655036702752113,
-0.07662227004766464,
0.22982071340084076,
0.2752038538455963,
-0.05443340167403221,
0.09877577424049377,
0.2690088748931885,
-0.09633959829807281,
-0.0404951348900795,
-0.01877797767519951,
-0.08244040608406067,
-0.3277660608291626,
0.32309550046920776,
0.05112980306148529,
-0.10111835598945618,
0.2827223539352417,
-0.14057666063308716,
-0.04272179678082466,
0.015697678551077843,
-0.13683125376701355,
-0.14176535606384277,
0.09220907837152481,
0.27716100215911865,
0.07232747972011566,
-0.46000170707702637,
-0.08475431054830551,
0.6488836407661438,
-0.36718565225601196,
0.014018570072948933,
-0.4905713200569153,
0.058642446994781494,
0.03776521980762482,
-0.2177056074142456,
0.1433229297399521,
-0.0035435110330581665,
0.2012183964252472,
-0.22616398334503174,
-0.09973645210266113,
0.469828724861145,
-0.01965724118053913,
-0.25299710035324097,
-0.023968227207660675,
0.11302695423364639,
0.24902042746543884,
-0.19036725163459778,
0.12484049052000046,
0.33461225032806396,
-0.11460264027118683,
-0.06350655108690262,
-0.183923602104187,
0.4142010807991028,
0.0425710529088974,
0.29565587639808655,
0.03776944428682327,
0.060556501150131226,
0.1067643016576767,
-0.0378427617251873,
-0.40267905592918396,
-0.07841707766056061,
0.43112117052078247,
-0.015445642173290253,
0.09231305122375488,
0.06442724913358688,
-0.5104201436042786,
-0.17560172080993652,
0.3555361330509186,
-0.026509523391723633,
-0.058327771723270416,
0.06206679344177246,
0.01628575101494789,
0.058934926986694336,
0.1961957961320877,
0.21159954369068146,
0.46748918294906616,
0.3226594626903534,
-0.16365844011306763,
-0.00510198250412941,
-0.24569514393806458,
-0.14342407882213593,
0.019553445279598236,
0.01806899905204773,
0.293552041053772,
-0.13845160603523254,
-0.07292188704013824,
-0.08975420892238617,
-0.28326985239982605,
-0.12048935890197754,
0.25029614567756653,
-0.031910620629787445,
-0.37021225690841675,
-0.06224840134382248,
-0.22573457658290863,
-0.05877881869673729,
-0.15045388042926788,
0.2965194284915924,
-0.31101903319358826,
-0.10595258325338364,
-0.00796281173825264,
0.19966338574886322,
-0.05476526916027069,
0.3732002377510071,
-0.1382015198469162,
0.23471446335315704,
0.12901738286018372,
-0.17362859845161438,
0.1197386085987091,
-0.04511139541864395,
-0.22754338383674622,
0.07215021550655365,
0.2065267413854599,
-0.13607414066791534,
0.4016304910182953,
-0.2784915864467621,
-0.14983466267585754,
-0.6323435306549072,
-0.07558832317590714,
0.09514831006526947,
-0.19177132844924927,
0.43651625514030457,
0.3345392942428589,
0.03512776270508766,
0.022470969706773758,
0.03699143975973129,
0.17066222429275513,
-0.20195317268371582,
-0.0493856742978096,
0.011460574343800545,
0.14123587310314178,
-0.02639981172978878,
-0.11310723423957825,
-0.08824367076158524,
0.06220490485429764,
-0.3421018719673157,
0.269290566444397,
-0.02211611717939377,
0.059642575681209564,
0.24345318973064423,
0.34296348690986633,
0.3032999038696289,
0.10155696421861649,
0.08632005006074905,
-0.29117056727409363,
-0.3893383741378784,
0.08035383373498917,
-0.24775151908397675,
-0.4555937945842743,
-0.17996226251125336,
0.22448743879795074,
0.23184062540531158,
0.200368732213974,
-0.3812718391418457,
-0.17726720869541168,
-0.2493123859167099,
0.4517395496368408,
-0.08443617820739746,
-0.04221782833337784,
0.18082734942436218,
-0.18202802538871765,
-0.14497289061546326,
-0.2991671562194824,
-0.49628373980522156,
0.3258320093154907,
-0.10889164358377457,
0.6574723124504089,
0.08286179602146149,
0.30209317803382874,
0.1072557270526886,
0.7473217248916626,
0.34230637550354004,
-0.22403012216091156,
0.14753320813179016,
-0.09080002456903458,
0.34089040756225586,
0.053923092782497406,
-0.1317930668592453,
0.2998958230018616,
-0.054928362369537354,
0.24659596383571625,
0.14886583387851715,
-0.029446851462125778,
0.015138906426727772,
0.06274078041315079,
-0.25986582040786743,
0.1498241126537323,
-0.12745344638824463,
-0.06277111917734146,
-0.408286452293396,
0.04799026995897293,
0.15179137885570526,
0.24757173657417297,
-0.2683769762516022,
0.17037451267242432,
0.14150066673755646,
-0.05210219323635101,
0.03844389691948891,
-0.07140584290027618,
-0.23399314284324646,
0.1672784835100174,
-0.25582659244537354,
0.41739898920059204,
0.02149377390742302,
0.3700748383998871,
-0.06146962195634842,
-0.20398512482643127,
-0.017233990132808685,
-0.14672259986400604,
0.8248330950737,
0.00530628114938736,
-0.07640957832336426,
0.022431369870901108,
-0.11030655354261398,
-0.639448344707489,
-0.10347703099250793,
-0.11022096872329712,
0.5100253820419312,
0.36300429701805115,
0.3634647727012634,
-0.37188202142715454,
-0.4172086715698242,
-0.008460484445095062,
0.11392422765493393,
-0.05264302343130112,
-0.1778251677751541,
-0.15055228769779205,
-0.29812702536582947,
-0.3265646994113922,
0.10885637998580933,
0.14601844549179077,
0.20170313119888306,
-0.10127125680446625,
0.09037026762962341,
-0.27871930599212646,
-0.055229783058166504,
0.18666434288024902,
0.03422123193740845,
0.12772813439369202,
0.1354968249797821,
0.3253622055053711,
-0.06265376508235931,
0.6142513751983643,
0.31880947947502136,
0.25967156887054443,
0.06938526034355164,
-0.17853981256484985,
0.2620428204536438,
0.10136149078607559,
0.2122354507446289,
0.3244098424911499,
-0.048551689833402634,
0.0604657381772995,
0.02040868252515793,
0.13709834218025208,
-0.19751861691474915,
0.23293539881706238,
0.15795207023620605,
0.2453424632549286,
-0.2961399257183075,
-0.3441380262374878,
0.6779359579086304,
0.2280125617980957,
-0.057533279061317444,
0.22988814115524292,
0.12931573390960693,
-0.1678776741027832,
-0.2240125834941864,
0.0976906418800354,
0.5262399315834045,
0.08592607825994492,
0.024539092555642128,
0.1399552822113037,
-0.40631359815597534,
0.28025174140930176,
0.19451169669628143,
0.27481967210769653,
-0.1928248107433319,
-0.557471513748169,
0.09547438472509384,
-0.17513790726661682,
0.3817479908466339,
0.015860196202993393,
-0.2685399651527405,
0.31846731901168823,
0.1064966470003128,
0.041567739099264145,
-0.08096613734960556,
0.2598952353000641,
-0.4076154828071594,
-0.21300189197063446,
-0.44095176458358765,
0.2458609640598297,
-0.1969703584909439,
0.17872536182403564,
-0.014507071115076542,
-0.2267063409090042,
0.14178204536437988,
-0.2625507116317749,
-0.24110868573188782,
0.12368229776620865,
-0.4515952169895172,
0.08863084763288498,
0.27712076902389526,
-0.1749512255191803,
0.2409457266330719,
0.05234295129776001,
0.21651756763458252,
-0.0033270716667175293,
-0.26019027829170227,
0.19907955825328827,
0.08700250089168549,
0.1160566434264183,
-0.03212748467922211,
-0.07769665122032166,
0.23368161916732788,
-0.0609106570482254,
-0.06353321671485901,
0.09140846133232117,
0.0061005474999547005,
-0.20507708191871643,
0.0006946176290512085,
-0.20145873725414276,
-0.3015900254249573,
-0.311225026845932,
-0.058694034814834595,
-0.1528220921754837,
0.020599503070116043,
-0.3273025155067444,
0.17352768778800964,
-0.07969249784946442,
-0.29699206352233887,
0.1553490310907364,
0.17427782714366913,
-0.20443983376026154,
-0.060458097606897354,
0.5127543210983276,
0.008519107475876808,
-0.12182533740997314,
0.4486629068851471,
-0.029914183542132378,
0.024241477251052856,
-0.19987896084785461,
0.05800532549619675,
0.11759887635707855,
-0.22822943329811096,
0.1673823744058609,
-0.18582449853420258,
-0.05568742752075195,
0.22833459079265594,
0.275503545999527,
0.3999602794647217,
-0.029336385428905487,
0.00896267220377922,
0.047258734703063965,
-0.4539545476436615,
0.09970184415578842,
-0.16278289258480072,
0.35444167256355286,
-0.17241448163986206,
0.19659532606601715,
0.001942913979291916,
0.010284699499607086,
-0.3834689259529114,
-0.04481014609336853,
-0.24397969245910645,
0.18706732988357544,
0.2908405661582947,
0.08530957996845245,
0.004755335859954357,
0.20253030955791473,
0.018191298469901085,
0.19417807459831238,
-0.3423427641391754,
-0.2276761829853058,
-0.022872088477015495,
0.05159465968608856,
-0.08886595070362091,
-0.04324738681316376,
-0.19587698578834534,
-0.03371163085103035,
-0.0924515575170517,
-0.10554748773574829,
0.22949224710464478,
0.16645249724388123,
-0.21219183504581451,
-0.00036779604852199554,
0.043923500925302505,
-0.13650092482566833,
0.25811731815338135,
0.032137513160705566,
-0.07082469761371613,
0.15372295677661896,
-0.034848786890506744,
0.10796377062797546,
0.0128713333979249,
-0.0382453091442585,
0.08642777800559998,
0.09815585613250732,
0.08132337778806686,
-0.12808233499526978,
-0.021763965487480164,
-0.36582428216934204,
-0.21799494326114655,
0.48513370752334595,
0.15148396790027618,
0.24024981260299683,
-0.06117792800068855,
-0.0994880348443985,
0.14393556118011475,
0.27329227328300476,
-0.34558242559432983,
-0.054687101393938065,
0.22569093108177185,
-0.027733858674764633,
0.1795864850282669,
0.28864583373069763,
0.28098225593566895,
-0.25287866592407227,
0.11732114851474762,
0.05684204399585724,
0.0836280882358551,
-0.09777561575174332,
0.18055492639541626,
0.5634793043136597,
0.03521627560257912,
0.004286371171474457,
0.29592660069465637,
0.21943256258964539,
0.4151383340358734,
0.2862832546234131,
-0.25487807393074036,
0.5949938297271729,
-0.19456839561462402,
0.32442963123321533,
-0.04736655205488205,
-0.2737661302089691,
-0.02881680801510811,
0.04709877073764801,
-0.1652223765850067,
0.17080199718475342,
-0.1543581634759903,
0.41238492727279663,
-0.16139821708202362,
-0.18028539419174194,
-0.3102775514125824,
-0.03172873333096504,
-0.26709628105163574,
-0.26621800661087036,
-0.13778483867645264,
-0.15765440464019775,
0.01579582691192627,
0.0030310414731502533,
-0.006113898009061813,
-0.015528984367847443,
0.6325373649597168,
-0.21437431871891022,
0.05996398627758026,
-0.1576201319694519,
-0.0805671438574791,
0.2210734486579895,
-0.0030194148421287537,
-0.28137877583503723,
0.13934312760829926,
-0.19244147837162018,
-0.10999509692192078,
0.05148753896355629,
0.48724663257598877,
0.4206932485103607,
0.2736240029335022,
-0.19428925216197968,
-0.05817155912518501,
0.17879977822303772,
0.13267488777637482,
-0.0845436304807663,
0.3010896146297455,
0.1242256686091423,
-0.29623398184776306,
0.39781448245048523,
0.0834897831082344,
-0.07631516456604004,
0.23621995747089386,
-0.09392547607421875,
-0.08357171714305878,
-0.4773220121860504,
-0.017147235572338104,
-0.1534634381532669,
0.17221885919570923,
-0.20431405305862427,
0.06990878283977509,
-0.3427101969718933,
-0.2559761106967926,
0.6217352151870728,
-0.11501310020685196,
0.1934356391429901,
0.08292638510465622,
0.11529079079627991,
-0.4190080463886261,
0.6132084131240845,
0.1071104109287262,
0.03518952429294586,
-0.2592872083187103,
0.07631917297840118,
-0.44606348872184753,
0.049758296459913254,
-0.22009840607643127,
0.24798700213432312,
0.1386132389307022,
0.28332167863845825,
0.04820003733038902,
-0.22420541942119598,
0.08550697565078735,
0.14162074029445648,
0.19299647212028503,
-0.09731152653694153,
-0.5031625032424927,
-0.23828737437725067,
-0.12233497202396393,
0.09120301902294159,
0.445526659488678,
-0.3806173801422119,
0.04212282598018646,
-0.05120806023478508,
0.0695423036813736,
-0.25170958042144775,
0.0695437341928482,
0.07833340764045715,
0.012922227382659912,
0.22253955900669098,
0.15672266483306885,
0.21794581413269043,
-0.006204813718795776,
-0.26545679569244385,
-0.43219098448753357,
-0.18828463554382324,
-0.1808563619852066,
0.052650295197963715,
0.07531776279211044,
-0.0005959700793027878,
-0.2050197422504425,
0.32802852988243103,
-0.08550956845283508,
0.060416605323553085,
0.28754961490631104,
-0.1472015231847763,
0.019855013117194176,
-0.02530488558113575,
-0.2834186553955078,
0.022305145859718323,
-0.053393758833408356,
0.35971611738204956,
-0.12552033364772797,
0.12824171781539917,
-0.23413313925266266,
-0.07534576952457428,
0.7709335088729858,
-0.28843969106674194,
-0.21733199059963226,
-0.20214466750621796,
0.27550217509269714,
0.05794907361268997,
-0.3287711441516876,
-0.4460880160331726,
-0.05893901363015175,
0.301491916179657,
-0.0331009104847908,
-0.15149448812007904,
0.16332149505615234,
-0.13678382337093353,
-0.0012887902557849884,
0.010397054255008698,
0.05231017246842384,
-0.028456497937440872,
-0.34224241971969604,
0.14797988533973694,
-0.18958401679992676
] |
https://github.com/huggingface/datasets/issues/4462 | BigBench: NonMatchingSplitsSizesError when passing a dataset configuration parameter | Hi @lhoestq,
Thank you for taking a look at this issue, and proposing a solution.
Unfortunately, after trying the fix in #4465 I still see the same issue.
I think there is some subtlety where the config name gets overwritten somewhere when `BUILDER_CONFIGS`[(link)](https://github.com/huggingface/datasets/blob/master/datasets/bigbench/bigbench.py#L126) is defined.
If I print out the `self.config.name` in the current version (with the fix in #4465), I see just the task name, but if I comment out `BUILDER_CONFIGS`, the `num_shots` and `max_examples` gets appended as was meant by #4465.
I haven't managed to track down where this happens, but I thought you might know?
(Another comment on your fix: the `name` variable is used to fetch the task from the bigbench API, so modifying it causes an error if it's actually called. This can easily be fixed by having `config_name` variable in addition to the `task_name`)
| As noticed in https://github.com/huggingface/datasets/pull/4125 when a dataset config class has a parameter that reduces the number of examples (e.g. named `max_examples`), then loading the dataset and passing `max_examples` raises `NonMatchingSplitsSizesError`.
This is because it will check for expected the number of examples of the config with the same name without taking into account the `max_examples` parameter. This can be fixed by checking the expected number of examples using the **config id** instead of name. Indeed the config id corresponds to the config name + an optional suffix that depends on the config parameters | 140 | BigBench: NonMatchingSplitsSizesError when passing a dataset configuration parameter
As noticed in https://github.com/huggingface/datasets/pull/4125 when a dataset config class has a parameter that reduces the number of examples (e.g. named `max_examples`), then loading the dataset and passing `max_examples` raises `NonMatchingSplitsSizesError`.
This is because it will check for expected the number of examples of the config with the same name without taking into account the `max_examples` parameter. This can be fixed by checking the expected number of examples using the **config id** instead of name. Indeed the config id corresponds to the config name + an optional suffix that depends on the config parameters
Hi @lhoestq,
Thank you for taking a look at this issue, and proposing a solution.
Unfortunately, after trying the fix in #4465 I still see the same issue.
I think there is some subtlety where the config name gets overwritten somewhere when `BUILDER_CONFIGS`[(link)](https://github.com/huggingface/datasets/blob/master/datasets/bigbench/bigbench.py#L126) is defined.
If I print out the `self.config.name` in the current version (with the fix in #4465), I see just the task name, but if I comment out `BUILDER_CONFIGS`, the `num_shots` and `max_examples` gets appended as was meant by #4465.
I haven't managed to track down where this happens, but I thought you might know?
(Another comment on your fix: the `name` variable is used to fetch the task from the bigbench API, so modifying it causes an error if it's actually called. This can easily be fixed by having `config_name` variable in addition to the `task_name`)
| [
-0.296103835105896,
-0.3113393187522888,
0.09185461699962616,
0.4651556611061096,
0.10660169273614883,
-0.11537007987499237,
-0.0237538181245327,
0.41597819328308105,
-0.0015082992613315582,
0.23245978355407715,
0.3906216025352478,
0.08338918536901474,
-0.136163592338562,
0.21562165021896362,
0.14223524928092957,
-0.014230489730834961,
0.034093186259269714,
-0.2296464443206787,
-0.1408858746290207,
0.27268707752227783,
-0.2645690441131592,
0.22879551351070404,
-0.1841413974761963,
0.026931047439575195,
-0.2814147472381592,
0.24930620193481445,
-0.15418800711631775,
0.03836612030863762,
0.12428909540176392,
-0.2620494067668915,
0.21503330767154694,
-0.16462647914886475,
-0.01646355725824833,
0.3807292580604553,
-0.00012189085100544617,
0.07032650709152222,
0.40267789363861084,
-0.19935639202594757,
-0.3736085295677185,
0.03223950415849686,
-0.40786227583885193,
-0.40152496099472046,
-0.24363532662391663,
-0.04327501729130745,
-0.043399740010499954,
0.16235877573490143,
-0.028526095673441887,
-0.07851415127515793,
0.1123170554637909,
0.07805391401052475,
0.12632639706134796,
0.2917048931121826,
-0.25797805190086365,
-0.25229206681251526,
-0.05750543624162674,
0.040823470801115036,
-0.24017031490802765,
0.04297129437327385,
0.2310466319322586,
-0.16617800295352936,
-0.19577357172966003,
0.11921845376491547,
-0.012508505955338478,
0.12217600643634796,
0.3458951711654663,
-0.1865631639957428,
0.21303057670593262,
0.05651748925447464,
0.21926677227020264,
0.4090053141117096,
0.432577908039093,
-0.20823785662651062,
-0.2976591885089874,
-0.7846283316612244,
0.09263673424720764,
-0.04838877171278,
0.3248753547668457,
0.033293455839157104,
-0.2240680456161499,
-0.005821187049150467,
-0.1444549709558487,
-0.28688204288482666,
-0.08275140076875687,
-0.17335113883018494,
0.4362371861934662,
-0.19995030760765076,
-0.15123595297336578,
0.21972861886024475,
0.005369517952203751,
-0.24145926535129547,
0.1420898139476776,
-0.4633878767490387,
-0.041896525770425797,
0.02880045771598816,
-0.28201016783714294,
0.0010406672954559326,
-0.014734700322151184,
0.33447954058647156,
0.5273752808570862,
0.30550432205200195,
0.3371967673301697,
-0.001885049045085907,
0.6079871654510498,
-0.0238821879029274,
0.17824967205524445,
0.1550503373146057,
0.40014371275901794,
-0.04825007542967796,
-0.12407708168029785,
0.12041321396827698,
0.21822163462638855,
0.14351937174797058,
0.18691332638263702,
-0.45651188492774963,
-0.13196687400341034,
-0.09077736735343933,
0.5220284461975098,
-0.22977180778980255,
-0.32561343908309937,
0.0558597557246685,
-0.14821957051753998,
-0.1183730885386467,
0.1386137753725052,
0.11659780889749527,
-0.28000542521476746,
0.23185017704963684,
-0.1754959672689438,
0.06390480697154999,
-0.24978819489479065,
-0.34765052795410156,
-0.2682603895664215,
-0.30449044704437256,
-0.2357441782951355,
0.1840742975473404,
0.12221778929233551,
-0.06085870787501335,
0.3504737615585327,
0.18385595083236694,
0.35651516914367676,
-0.19370341300964355,
0.1606997847557068,
0.1614532768726349,
-0.19945955276489258,
0.04092322662472725,
-0.34361574053764343,
-0.08561162650585175,
0.11147202551364899,
-0.02521788328886032,
-0.12079610675573349,
0.04339989647269249,
0.006706811487674713,
-0.2945401966571808,
0.11497451364994049,
0.08451097458600998,
-0.5218416452407837,
-0.022793546319007874,
-0.4005357325077057,
0.09512192755937576,
0.31871727108955383,
0.04596761241555214,
-0.06358646601438522,
-0.09510086476802826,
-0.07964500784873962,
-0.11028136312961578,
0.051310233771800995,
0.4654902219772339,
0.010023929178714752,
-0.465082585811615,
0.5945410132408142,
-0.05090990290045738,
0.06712278723716736,
0.24047553539276123,
-0.2375766634941101,
-0.0734715536236763,
-0.33218663930892944,
-0.15151888132095337,
0.21482647955417633,
-0.20310020446777344,
-0.5308567881584167,
0.5081435441970825,
-0.047668762505054474,
0.3193305432796478,
0.16516155004501343,
0.0799035131931305,
0.23052501678466797,
-0.07102830708026886,
-0.04419879615306854,
0.12544786930084229,
-0.1522480994462967,
-0.16434800624847412,
-0.36791419982910156,
-0.22110497951507568,
0.21070794761180878,
-0.09751546382904053,
0.15829868614673615,
0.17587490379810333,
-0.14196491241455078,
0.13578039407730103,
0.28517964482307434,
0.10066229104995728,
0.06736323237419128,
0.2687545418739319,
-0.051369745284318924,
0.08961565792560577,
-0.000011071795597672462,
0.010296080261468887,
-0.37303346395492554,
0.25193333625793457,
0.025467775762081146,
-0.11358997225761414,
0.11013460159301758,
-0.08413461595773697,
0.06815832853317261,
0.03682587295770645,
-0.2396681159734726,
-0.15749819576740265,
-0.05734102427959442,
0.24221906065940857,
-0.049779459834098816,
-0.552920401096344,
-0.026038816198706627,
0.7846243977546692,
-0.4041481614112854,
0.11735910177230835,
-0.5618183612823486,
0.009945429861545563,
0.13090838491916656,
-0.24012970924377441,
-0.009072579443454742,
0.080925352871418,
0.36861324310302734,
-0.1676098108291626,
-0.12340853363275528,
0.49846646189689636,
-0.026501132175326347,
-0.2663165330886841,
-0.008889537304639816,
0.1306764930486679,
0.2440313696861267,
-0.14221595227718353,
0.16550780832767487,
0.26810893416404724,
-0.14517785608768463,
-0.09803077578544617,
-0.06230107694864273,
0.34957587718963623,
-0.00012737512588500977,
0.4693886935710907,
-0.1365201473236084,
0.05280669778585434,
-0.10327939689159393,
0.020574871450662613,
-0.5763510465621948,
-0.06661950796842575,
0.32404106855392456,
0.022949866950511932,
-0.028060991317033768,
0.1394929587841034,
-0.4917971193790436,
-0.14523062109947205,
0.3453933596611023,
-0.06832365691661835,
-0.1943894326686859,
-0.0095156729221344,
0.01979002356529236,
0.09712422639131546,
0.12839840352535248,
0.3226885199546814,
0.4648935794830322,
0.15712523460388184,
-0.2835236191749573,
-0.01666863076388836,
-0.2428685426712036,
-0.0936913713812828,
-0.025789834558963776,
0.16890332102775574,
0.33794254064559937,
-0.17173781991004944,
-0.11041346192359924,
-0.03557337448000908,
-0.059969622641801834,
0.039580363780260086,
0.2611919939517975,
-0.15300987660884857,
-0.5020816326141357,
-0.05838371813297272,
-0.2686348557472229,
-0.036710239946842194,
-0.3182646334171295,
0.19688308238983154,
-0.5529704093933105,
-0.17355860769748688,
-0.07894979417324066,
0.14534474909305573,
-0.046120308339595795,
0.41065239906311035,
-0.13218238949775696,
0.2089257687330246,
0.06906367838382721,
-0.3477325439453125,
0.11360406875610352,
-0.11399738490581512,
-0.20343521237373352,
-0.08798191696405411,
0.11034746468067169,
-0.3542727530002594,
0.3016033172607422,
-0.3199896216392517,
-0.1708420068025589,
-0.5388088822364807,
-0.028219781816005707,
0.0902521014213562,
-0.21680299937725067,
0.5666886568069458,
0.2675977647304535,
0.0951043963432312,
0.061510905623435974,
0.05591969192028046,
0.2186642438173294,
-0.10772565007209778,
0.004079362377524376,
-0.010286576114594936,
0.17671427130699158,
0.060180578380823135,
-0.011238692328333855,
0.06389214098453522,
0.06268095225095749,
-0.20120573043823242,
0.22580838203430176,
-0.07776518166065216,
0.059229083359241486,
0.4225448966026306,
0.28240588307380676,
0.13744400441646576,
0.024004194885492325,
0.10389883816242218,
-0.23908758163452148,
-0.47548362612724304,
0.09548071026802063,
-0.1563004106283188,
-0.27268466353416443,
-0.18872417509555817,
0.2674994468688965,
0.25652045011520386,
0.14668267965316772,
-0.3004995882511139,
-0.1095123142004013,
-0.15096436440944672,
0.48088669776916504,
-0.0915520042181015,
-0.018538007512688637,
0.12541300058364868,
-0.04690447077155113,
0.03342543542385101,
-0.3095954656600952,
-0.5627678036689758,
0.33523011207580566,
0.049784936010837555,
0.8870970010757446,
0.21924754977226257,
0.2672727704048157,
0.10966286063194275,
0.8428307771682739,
0.4469953775405884,
-0.13791894912719727,
0.13494090735912323,
0.02182159014046192,
0.2883560061454773,
0.1687277853488922,
-0.18203957378864288,
0.3751133382320404,
0.0729878693819046,
0.2107200175523758,
0.051422834396362305,
-0.021357931196689606,
0.18291492760181427,
0.11828535795211792,
-0.23850604891777039,
0.07202508300542831,
-0.10954304039478302,
-0.12198103964328766,
-0.5072535276412964,
0.11630204319953918,
0.24799472093582153,
0.2538367509841919,
-0.3709105849266052,
0.04691699892282486,
0.13801200687885284,
-0.026085197925567627,
0.1391713172197342,
0.026062173768877983,
-0.06516113132238388,
0.10880840569734573,
-0.2278352677822113,
0.3632878065109253,
-0.06768541783094406,
0.30614855885505676,
-0.0537477545440197,
-0.17229217290878296,
0.039183009415864944,
-0.04314287751913071,
0.9745944738388062,
0.011159825138747692,
-0.14140057563781738,
-0.034376490861177444,
0.04069529473781586,
-0.7201265096664429,
-0.19672717154026031,
0.049754004925489426,
0.48234885931015015,
0.3805226981639862,
0.3289634585380554,
-0.3152310848236084,
-0.4695528745651245,
0.011904912069439888,
0.13417652249336243,
-0.09081494063138962,
-0.14065897464752197,
-0.20071987807750702,
-0.27786967158317566,
-0.19809508323669434,
0.06683914363384247,
0.18633238971233368,
0.31348341703414917,
-0.0072744470089674,
0.17292344570159912,
-0.13016939163208008,
0.010222278535366058,
0.13323724269866943,
-0.1523873209953308,
0.16675716638565063,
0.1787024736404419,
0.3148317337036133,
0.05358900874853134,
0.6190897226333618,
0.35498926043510437,
0.2087121456861496,
-0.005439896136522293,
-0.17188459634780884,
0.21071162819862366,
0.0405411534011364,
0.310667484998703,
0.39255547523498535,
-0.04293217882514,
0.09663152694702148,
0.08137761056423187,
0.08344081044197083,
-0.3161637485027313,
0.05669286102056503,
0.26570045948028564,
0.3143290579319,
-0.2798389196395874,
-0.5288987159729004,
0.5307644605636597,
0.2627076804637909,
-0.054565250873565674,
0.24661777913570404,
0.08696622401475906,
-0.2558808922767639,
-0.22551952302455902,
0.06098715215921402,
0.5957123637199402,
0.1668033003807068,
-0.029926422983407974,
0.026142532005906105,
-0.4806705713272095,
0.24220991134643555,
0.2949713468551636,
0.33205801248550415,
-0.2041281759738922,
-0.44472965598106384,
0.07339709997177124,
-0.22450582683086395,
0.4892100691795349,
0.01489364355802536,
-0.16029426455497742,
0.4096123278141022,
-0.004795536398887634,
0.150038942694664,
0.001315917819738388,
0.13901078701019287,
-0.40398702025413513,
-0.16080883145332336,
-0.31324100494384766,
0.08578827232122421,
-0.3019254803657532,
0.20636509358882904,
0.05103933811187744,
-0.24484701454639435,
0.17233861982822418,
-0.27302753925323486,
-0.27824389934539795,
0.1368330419063568,
-0.5376765727996826,
-0.047349877655506134,
0.4448530673980713,
-0.2347061038017273,
0.2317529022693634,
0.07991811633110046,
0.23284108936786652,
-0.057926494628190994,
-0.15137523412704468,
0.24215029180049896,
0.17358802258968353,
0.2254485785961151,
-0.026136178523302078,
-0.013931984081864357,
0.25196537375450134,
0.04123367369174957,
-0.12015233188867569,
-0.016287870705127716,
-0.037813249975442886,
-0.23494647443294525,
-0.18790121376514435,
-0.2877166271209717,
-0.2629361152648926,
-0.31777897477149963,
0.06188708916306496,
-0.17858833074569702,
0.2569454610347748,
-0.3577180802822113,
0.08187225461006165,
-0.06046272814273834,
-0.3615494966506958,
0.17740309238433838,
-0.05446812883019447,
-0.2332671731710434,
0.014891966246068478,
0.505719006061554,
0.04491168260574341,
-0.19411978125572205,
0.5098710060119629,
-0.07355456799268723,
0.06732583045959473,
-0.049233149737119675,
0.08145741373300552,
0.06486240774393082,
-0.16691981256008148,
0.16261056065559387,
-0.1562322974205017,
-0.014759860932826996,
0.11571884900331497,
0.24676799774169922,
0.34994959831237793,
-0.002137802541255951,
0.008734282106161118,
0.066102996468544,
-0.43118491768836975,
0.06880027055740356,
-0.08499497175216675,
0.23366734385490417,
-0.26677393913269043,
0.1858224868774414,
0.06780298799276352,
-0.0670183077454567,
-0.23450393974781036,
-0.13863074779510498,
-0.19604824483394623,
0.2403244823217392,
0.29742708802223206,
0.12844806909561157,
0.031055811792612076,
0.10976086556911469,
-0.09298165142536163,
0.11565949767827988,
-0.26622143387794495,
-0.07598257064819336,
-0.07141679525375366,
0.1057380735874176,
-0.0859510526061058,
0.04045712947845459,
-0.2612658739089966,
-0.08732374757528305,
-0.02318783476948738,
-0.057967253029346466,
0.1869959980249405,
0.2341327965259552,
-0.059024736285209656,
0.13724155724048615,
0.03217640519142151,
-0.04030468314886093,
0.3997589349746704,
0.04131458327174187,
-0.04797390103340149,
0.37336301803588867,
-0.014996575191617012,
0.16487959027290344,
-0.021724605932831764,
0.013205140829086304,
0.05257757008075714,
0.03204762190580368,
-0.12244424223899841,
-0.031043201684951782,
-0.06539645045995712,
-0.41968023777008057,
-0.23895488679409027,
0.5175970196723938,
0.01344962790608406,
0.24937042593955994,
-0.05026445910334587,
-0.24302905797958374,
0.19025155901908875,
0.11884845793247223,
-0.24843668937683105,
0.025481276214122772,
0.4081755578517914,
0.012348522432148457,
0.08202953636646271,
0.37009426951408386,
0.25951385498046875,
-0.2739378809928894,
0.14421549439430237,
0.07360726594924927,
0.14923636615276337,
-0.14624735713005066,
0.30380693078041077,
0.6061471700668335,
0.10501693189144135,
-0.021998893469572067,
0.31194213032722473,
0.21876437962055206,
0.2844565808773041,
0.2887169420719147,
-0.1307334303855896,
0.4565486013889313,
-0.17197847366333008,
0.2764788269996643,
0.008938901126384735,
-0.19709864258766174,
-0.06841275095939636,
0.0722864493727684,
-0.17495161294937134,
0.29517409205436707,
-0.15426935255527496,
0.5050643682479858,
-0.13548751175403595,
-0.24791644513607025,
-0.19747310876846313,
-0.005355663597583771,
-0.2301347851753235,
-0.29958903789520264,
-0.2684551477432251,
-0.18494926393032074,
0.09816838800907135,
-0.01582738198339939,
0.0642613023519516,
-0.12267628312110901,
0.6756854057312012,
-0.1820325404405594,
-0.014698907732963562,
-0.1390121728181839,
-0.24865975975990295,
0.23282048106193542,
0.04023595526814461,
-0.3324401080608368,
0.1198352798819542,
-0.296541690826416,
-0.14014102518558502,
0.053660571575164795,
0.461757093667984,
0.39596816897392273,
0.26941928267478943,
-0.2358992099761963,
-0.07363850623369217,
0.2607475519180298,
0.14313815534114838,
0.046076275408267975,
0.31516560912132263,
0.05538118630647659,
-0.347074955701828,
0.3074318766593933,
-0.06616861373186111,
0.08872901648283005,
0.060403335839509964,
-0.028858240693807602,
-0.015617191791534424,
-0.4549822211265564,
0.1647210717201233,
-0.17456993460655212,
0.16122305393218994,
-0.13384699821472168,
0.11827220767736435,
-0.36102014780044556,
-0.33834707736968994,
0.7391868829727173,
-0.02572472207248211,
0.11879348009824753,
0.11407224833965302,
0.034165866672992706,
-0.4420223832130432,
0.5694403648376465,
0.14996270835399628,
-0.08121604472398758,
-0.32912853360176086,
0.1250833421945572,
-0.3429633378982544,
-0.02970833331346512,
-0.2062166929244995,
0.3470795154571533,
0.2942257523536682,
0.23756225407123566,
-0.03523001819849014,
-0.30675679445266724,
0.2042722851037979,
0.07605967670679092,
0.2515171766281128,
0.02759869024157524,
-0.4539209008216858,
-0.26687169075012207,
0.004328623414039612,
0.11159142851829529,
0.5027188062667847,
-0.18702712655067444,
0.01782400906085968,
0.02793414145708084,
-0.09271068871021271,
-0.26852166652679443,
0.0277586430311203,
0.13918936252593994,
0.046293098479509354,
0.19591228663921356,
0.15010222792625427,
0.182753786444664,
0.07122265547513962,
-0.32502317428588867,
-0.3543088734149933,
-0.191347137093544,
-0.20149633288383484,
0.08354976773262024,
-0.10883533954620361,
-0.07515916228294373,
-0.316008597612381,
0.3688051998615265,
-0.2199130356311798,
-0.05527488887310028,
0.23387853801250458,
-0.19715003669261932,
0.0024638399481773376,
-0.007875624112784863,
-0.26365354657173157,
0.04359835386276245,
-0.006402703933417797,
0.28021398186683655,
-0.08346377313137054,
0.2820568382740021,
-0.23909026384353638,
-0.005898407660424709,
0.8238486051559448,
-0.2645585834980011,
-0.2826174795627594,
-0.14643514156341553,
0.21721649169921875,
-0.0923103466629982,
-0.29347121715545654,
-0.5136929750442505,
-0.12771442532539368,
0.34497353434562683,
-0.022261623293161392,
-0.08340942859649658,
0.15764907002449036,
-0.09005947411060333,
0.07702375948429108,
0.09982843697071075,
-0.012412361800670624,
0.004723044112324715,
-0.33930692076683044,
0.28787314891815186,
-0.15689115226268768
] |
https://github.com/huggingface/datasets/issues/4461 | AttributeError: module 'datasets' has no attribute 'load_dataset' | I had a folder named 'datasets' so this is why it can't find the import, it's looking in the wrong place | ## Describe the bug
I have piped install datasets, but this package doesn't have these attributes: load_dataset, load_metric.
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-5.13.0-44-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.6.13
- PyArrow version: 6.0.1
| 21 | AttributeError: module 'datasets' has no attribute 'load_dataset'
## Describe the bug
I have piped install datasets, but this package doesn't have these attributes: load_dataset, load_metric.
## Environment info
- `datasets` version: 1.9.0
- Platform: Linux-5.13.0-44-generic-x86_64-with-debian-bullseye-sid
- Python version: 3.6.13
- PyArrow version: 6.0.1
I had a folder named 'datasets' so this is why it can't find the import, it's looking in the wrong place | [
-0.38473716378211975,
0.09812600910663605,
-0.16463899612426758,
0.2966442108154297,
0.38724029064178467,
0.11337792128324509,
0.14504976570606232,
0.015103591606020927,
0.2565525472164154,
0.07296447455883026,
-0.025026794523000717,
0.22762179374694824,
-0.043027568608522415,
0.11782946437597275,
0.26685798168182373,
-0.22207051515579224,
0.0603359155356884,
0.1617141216993332,
-0.03738442063331604,
-0.045814141631126404,
-0.007680121809244156,
0.15411174297332764,
-0.299816370010376,
-0.12271387875080109,
-0.09469464421272278,
0.09950045496225357,
0.010399604216217995,
0.04556361958384514,
-0.2999971807003021,
-0.3313836455345154,
0.3588394522666931,
0.04086237773299217,
0.15415801107883453,
0.48093128204345703,
-0.00011078210081905127,
0.06746439635753632,
0.2679864764213562,
-0.12417132407426834,
-0.27680572867393494,
-0.19507648050785065,
-0.36420902609825134,
-0.43898746371269226,
0.0347762256860733,
-0.18776661157608032,
0.1426057517528534,
-0.2046888917684555,
-0.06169438362121582,
-0.2621554732322693,
0.056698475033044815,
0.39132604002952576,
0.26922371983528137,
0.25265443325042725,
0.27575820684432983,
-0.1973099410533905,
0.2404557466506958,
-0.023257233202457428,
-0.0025270935148000717,
0.27323150634765625,
-0.06499229371547699,
0.04403158277273178,
0.30460652709007263,
0.08424223959445953,
-0.30137187242507935,
0.12404601275920868,
0.4675389528274536,
-0.0028530582785606384,
0.1315096765756607,
-0.15541496872901917,
-0.14705052971839905,
0.085447758436203,
0.5126917958259583,
-0.34279799461364746,
-0.3527279794216156,
-0.02335604652762413,
0.12295719236135483,
-0.4012835621833801,
-0.018168844282627106,
-0.08884529769420624,
0.04172401875257492,
0.07826516777276993,
0.0469076968729496,
-0.32856470346450806,
-0.08062341064214706,
0.22874639928340912,
-0.28735631704330444,
0.12532518804073334,
-0.07785008102655411,
-0.05207427591085434,
0.08107469975948334,
0.08340036869049072,
0.2952055037021637,
-0.020863741636276245,
0.002398800104856491,
0.2505223751068115,
-0.2997846305370331,
0.15253129601478577,
0.16819214820861816,
0.13642585277557373,
-0.023682735860347748,
0.403201162815094,
-0.15280474722385406,
-0.22673776745796204,
0.030031319707632065,
0.24980798363685608,
-0.02058214321732521,
0.2987464964389801,
0.07131101936101913,
0.21886879205703735,
0.20293274521827698,
0.03251468762755394,
0.00570177286863327,
-0.0984673872590065,
-0.15907545387744904,
-0.29596251249313354,
0.27983686327934265,
-0.044385746121406555,
0.0932525247335434,
-0.07641521841287613,
-0.3832434117794037,
-0.04525360092520714,
0.029810838401317596,
-0.15122546255588531,
0.19931241869926453,
0.30797114968299866,
-0.09701786190271378,
0.15156827867031097,
0.022675268352031708,
0.2032141387462616,
-0.20600613951683044,
-0.11071717739105225,
-0.3352542817592621,
0.2509714961051941,
-0.17150169610977173,
-0.10438159108161926,
0.172942653298378,
-0.17392586171627045,
0.4721255302429199,
-0.07268525660037994,
-0.024188071489334106,
0.038250237703323364,
-0.018323274329304695,
0.03507291525602341,
-0.3780815303325653,
0.5091031193733215,
0.08565454185009003,
0.14160561561584473,
0.10435512661933899,
-0.21843436360359192,
-0.18674416840076447,
0.06711259484291077,
-0.4593071937561035,
-0.22409938275814056,
-0.06950487196445465,
0.2483421266078949,
-0.34844040870666504,
-0.31905049085617065,
-0.4263138473033905,
-0.17940184473991394,
-0.07431123405694962,
-0.3858747184276581,
-0.05083378404378891,
-0.15879744291305542,
0.15194286406040192,
-0.19977779686450958,
0.3676707446575165,
0.4551240801811218,
-0.36233648657798767,
-0.08710238337516785,
-0.30051150918006897,
-0.20533695816993713,
0.14199823141098022,
-0.12248638272285461,
-0.020606108009815216,
0.37703201174736023,
-0.09160428494215012,
-0.025395147502422333,
0.7744128108024597,
-0.5953385233879089,
-0.4495575428009033,
0.12404125928878784,
-0.01498689129948616,
-0.149563729763031,
0.2031104415655136,
0.04839823395013809,
0.09839433431625366,
0.09121442586183548,
0.36192893981933594,
0.22908757627010345,
-0.048196323215961456,
-0.20637589693069458,
0.0630827248096466,
-0.12519299983978271,
0.13506734371185303,
0.09005963802337646,
0.27505913376808167,
-0.005578137934207916,
0.11597723513841629,
0.009074379689991474,
-0.06664171069860458,
0.21958667039871216,
-0.19173087179660797,
0.4129655361175537,
0.3420528471469879,
0.17991673946380615,
0.011417638510465622,
-0.4106758236885071,
-0.1787623167037964,
0.1460423767566681,
-0.0669400691986084,
-0.10754966735839844,
-0.12758371233940125,
0.028966568410396576,
-0.4857427775859833,
0.14418615400791168,
-0.17690931260585785,
-0.16824598610401154,
0.10568663477897644,
-0.025932393968105316,
0.09715530276298523,
0.2362559288740158,
-0.26146838068962097,
0.31977635622024536,
0.024252044036984444,
0.23782981932163239,
-0.2252574861049652,
0.34347808361053467,
-0.14137651026248932,
-0.11778347194194794,
0.02674763649702072,
0.04405885934829712,
0.23938682675361633,
0.005757492501288652,
-0.06092815101146698,
0.3090941905975342,
-0.009697804227471352,
0.181901216506958,
0.051029495894908905,
0.2500706911087036,
0.07940749824047089,
-0.2214275747537613,
0.0704345703125,
-0.08213664591312408,
0.20698146522045135,
-0.05194263160228729,
0.16405728459358215,
-0.11996349692344666,
-0.03027069941163063,
0.2742801010608673,
0.0844101756811142,
0.08512720465660095,
0.22461920976638794,
0.07234835624694824,
0.060120321810245514,
-0.0772705078125,
0.3732186555862427,
-0.18940569460391998,
0.24852924048900604,
-0.0561394989490509,
0.011349275708198547,
-0.1498381495475769,
0.3333011865615845,
0.08026504516601562,
0.13985688984394073,
-0.06190542131662369,
-0.32092949748039246,
0.13267916440963745,
0.2530870735645294,
0.14346341788768768,
0.7015594244003296,
0.37762850522994995,
-0.14779497683048248,
-0.009030533954501152,
-0.02287772297859192,
-0.0801592469215393,
0.19807156920433044,
0.10561368614435196,
0.04187088832259178,
0.15118175745010376,
-0.03129037469625473,
0.15898239612579346,
-0.2545161247253418,
-0.35987621545791626,
-0.12052503973245621,
0.36502140760421753,
-0.43152546882629395,
0.1604291945695877,
-0.3742544651031494,
0.06405404955148697,
-0.0775766372680664,
-0.3246220648288727,
-0.10794311761856079,
-0.40683677792549133,
-0.05878123641014099,
0.0189058780670166,
0.1829906404018402,
0.010250135324895382,
-0.2828110158443451,
-0.06402339041233063,
0.07689496129751205,
-0.3983795642852783,
-0.28698742389678955,
-0.13632604479789734,
-0.06212318688631058,
0.06521603465080261,
0.11797429621219635,
0.20675034821033478,
0.35232090950012207,
-0.2144256979227066,
0.20576846599578857,
-0.017117904499173164,
-0.3081406056880951,
-0.0646926537156105,
-0.026600070297718048,
0.586097002029419,
0.2645336389541626,
0.27963078022003174,
0.11198237538337708,
-0.02837016060948372,
0.3624430298805237,
-0.12833191454410553,
-0.14843428134918213,
0.22581233084201813,
-0.06903094053268433,
-0.1662568300962448,
0.04513397440314293,
-0.4707741439342499,
-0.33638280630111694,
-0.4939591884613037,
-0.24271456897258759,
0.23185677826404572,
-0.05577457696199417,
0.17214731872081757,
0.2895795702934265,
0.2261112779378891,
0.1504715234041214,
0.29807624220848083,
0.0074394503608345985,
-0.296670138835907,
0.5092517137527466,
-0.27313297986984253,
-0.2523576021194458,
0.16236472129821777,
-0.010214598849415779,
0.1736927628517151,
0.05061376839876175,
-0.3917075991630554,
-0.10983239114284515,
-0.15091675519943237,
0.035458896309137344,
-0.01014803722500801,
0.3981238603591919,
0.2884117364883423,
0.013446155935525894,
-0.03997550904750824,
-0.26103127002716064,
-0.12501363456249237,
-0.11095874756574631,
-0.05301165580749512,
0.17846789956092834,
-0.12177176028490067,
0.32706379890441895,
-0.22042113542556763,
0.6359529495239258,
0.06827893853187561,
0.05111795663833618,
0.3072367310523987,
-0.2331354320049286,
0.4522550404071808,
-0.1298382580280304,
-0.5349995493888855,
-0.10796651989221573,
0.1688534915447235,
0.12774017453193665,
0.07823190093040466,
0.023373771458864212,
0.18624670803546906,
-0.33120375871658325,
-0.1455858200788498,
-0.14180800318717957,
0.10261139273643494,
-0.13197959959506989,
-0.19120827317237854,
0.05468026548624039,
0.0012603290379047394,
-0.0053798481822013855,
-0.18971258401870728,
-0.05745547264814377,
0.16895288228988647,
0.25755053758621216,
-0.24344143271446228,
0.29723331332206726,
-0.2497042417526245,
-0.17048680782318115,
-0.040912479162216187,
0.12662313878536224,
-0.1815699338912964,
0.29989108443260193,
-0.1248609870672226,
0.24008142948150635,
0.028522849082946777,
0.026926131919026375,
0.5036419034004211,
-0.19904708862304688,
-0.17132356762886047,
0.06601989269256592,
0.2018461972475052,
-0.42492568492889404,
-0.01709972508251667,
-0.09526698291301727,
0.24462907016277313,
-0.09230877459049225,
0.09266101568937302,
-0.19811445474624634,
0.08126690238714218,
0.4508143961429596,
0.30945688486099243,
-0.24205021560192108,
-0.30656737089157104,
-0.5193422436714172,
-0.30261680483818054,
-0.22162991762161255,
-0.1868039071559906,
0.039253026247024536,
0.34698960185050964,
0.27922260761260986,
-0.005776513367891312,
-0.23286761343479156,
-0.2015070915222168,
0.3061220049858093,
0.12404446303844452,
0.2038787305355072,
-0.1980963796377182,
0.0445190854370594,
0.16953828930854797,
-0.16502311825752258,
0.2237178236246109,
0.6932166218757629,
-0.18243029713630676,
-0.4231247901916504,
-0.18114089965820312,
0.08562261611223221,
0.49701499938964844,
-0.1345095932483673,
-0.2743798792362213,
-0.04501967877149582,
-0.1714140623807907,
-0.14011554419994354,
-0.09971928596496582,
0.033125605434179306,
0.25685712695121765,
0.14841242134571075,
-0.184596449136734,
-0.41646185517311096,
0.5628304481506348,
0.13799692690372467,
0.08405667543411255,
0.5989327430725098,
0.32578161358833313,
-0.12777097523212433,
0.07128353416919708,
-0.2764240503311157,
0.8126537203788757,
0.1740638017654419,
-0.195041686296463,
0.226912260055542,
0.0469607338309288,
0.25904470682144165,
-0.4602416753768921,
-0.01985624060034752,
-0.0673045963048935,
-0.1268284022808075,
-0.08636827766895294,
-0.2695249021053314,
0.4376749098300934,
-0.05711764842271805,
-0.09104140102863312,
0.42057791352272034,
-0.1703103482723236,
0.05002879351377487,
0.045471228659152985,
0.10657650232315063,
0.0400063656270504,
0.09832035005092621,
-0.27469298243522644,
0.21754364669322968,
-0.04084217548370361,
0.4745151102542877,
-0.18806064128875732,
0.1630038470029831,
-0.20224761962890625,
-0.13771335780620575,
-0.18820159137248993,
-0.1417546570301056,
-0.20200031995773315,
0.10854675620794296,
0.15076398849487305,
-0.37232083082199097,
-0.038300082087516785,
0.2733934223651886,
-0.004241339862346649,
0.10067488253116608,
-0.21135595440864563,
0.24711455404758453,
-0.15555351972579956,
-0.12101379781961441,
0.12831738591194153,
0.14157734811306,
0.3525189459323883,
-0.1753091812133789,
-0.30148300528526306,
0.31135278940200806,
-0.10194341093301773,
-0.18210889399051666,
0.24016529321670532,
0.0692482441663742,
0.18857650458812714,
-0.1796024590730667,
-0.25861531496047974,
0.05854818969964981,
0.4707046151161194,
-0.12731754779815674,
0.16951337456703186,
0.28624242544174194,
-0.09819180518388748,
0.2773919701576233,
-0.0037497282028198242,
0.010826416313648224,
-0.19967523217201233,
0.22329962253570557,
-0.13350337743759155,
-0.020009111613035202,
0.2485077679157257,
-0.00712648406624794,
-0.249879851937294,
-0.22461199760437012,
0.14468428492546082,
0.08403488993644714,
-0.22371771931648254,
0.03892457112669945,
0.03465871140360832,
0.07584935426712036,
-0.005427403841167688,
0.005022447556257248,
0.07414469867944717,
-0.2445245087146759,
-0.005236472934484482,
-0.6025911569595337,
-0.04666785150766373,
0.17021223902702332,
0.09285418689250946,
0.00125223770737648,
-0.05866030603647232,
-0.2338922619819641,
0.11178754270076752,
0.09972742944955826,
-0.3211798369884491,
-0.09268705546855927,
-0.17248640954494476,
-0.10658480226993561,
0.1727750301361084,
0.22891157865524292,
0.16893845796585083,
-0.1084354966878891,
0.18960051238536835,
-0.22503097355365753,
-0.08113779127597809,
-0.23352855443954468,
-0.2023252248764038,
0.1262994408607483,
-0.11055045574903488,
0.2139224410057068,
0.23364455997943878,
-0.21206383407115936,
-0.2190571427345276,
-0.0904356837272644,
0.060866642743349075,
0.16070520877838135,
-0.035788848996162415,
0.264386385679245,
0.2368772327899933,
0.031767748296260834,
-0.3129458427429199,
0.16798998415470123,
-0.01655365526676178,
0.16064593195915222,
0.13747946918010712,
0.01752985455095768,
0.3320063650608063,
-0.000041253864765167236,
-0.3280286192893982,
-0.12194900959730148,
-0.07574687898159027,
-0.11923649162054062,
0.43874499201774597,
-0.38670963048934937,
0.4023507535457611,
0.1631891131401062,
0.1623387485742569,
0.4128427803516388,
-0.2700018286705017,
0.4597293734550476,
0.2010963261127472,
0.24247737228870392,
-0.4194726347923279,
-0.05103820189833641,
0.1085505336523056,
0.14115408062934875,
0.005222294479608536,
0.11289234459400177,
-0.008567992597818375,
-0.07484249770641327,
0.16979432106018066,
0.29152774810791016,
0.35395634174346924,
0.02020839974284172,
0.29426029324531555,
0.13098925352096558,
0.032023344188928604,
0.099912628531456,
0.2394353151321411,
0.15349312126636505,
-0.040621452033519745,
0.53429114818573,
-0.32421013712882996,
0.26722201704978943,
-0.09110426157712936,
-0.009341102093458176,
-0.1899416148662567,
-0.30398857593536377,
0.010501094162464142,
-0.015109390020370483,
0.05992726981639862,
-0.12347044795751572,
-0.07551823556423187,
0.36168035864830017,
-0.1712227463722229,
0.1932355910539627,
-0.1668861210346222,
0.07027175277471542,
-0.11267808824777603,
0.05608532950282097,
0.12047381699085236,
-0.1528799682855606,
0.008009642362594604,
-0.2086961716413498,
0.3194839060306549,
-0.34274959564208984,
0.06234242394566536,
0.07267791777849197,
-0.19115115702152252,
-0.582382082939148,
0.27599889039993286,
0.07700668275356293,
-0.034633569419384,
-0.19639630615711212,
0.21720178425312042,
0.07456676661968231,
-0.1147805005311966,
0.04779171943664551,
0.2503688335418701,
0.4759802520275116,
0.24335269629955292,
0.18409527838230133,
-0.09521138668060303,
-0.19333866238594055,
-0.34044525027275085,
-0.12565520405769348,
0.30865761637687683,
-0.2199227213859558,
0.3687344193458557,
0.1279219537973404,
0.24009889364242554,
-0.279624342918396,
-0.01982584223151207,
0.19925756752490997,
-0.047013554722070694,
-0.4420907199382782,
0.7309630513191223,
-0.25723084807395935,
-0.24094519019126892,
-0.3496789038181305,
-0.08300528675317764,
-0.441163033246994,
-0.07599641382694244,
0.387478232383728,
0.00496527086943388,
-0.141462504863739,
-0.3293376564979553,
0.0742729976773262,
-0.07754510641098022,
0.371416836977005,
0.31142038106918335,
0.46008744835853577,
-0.19731564819812775,
0.03969627618789673,
-0.764848530292511,
0.09438543021678925,
-0.17285169661045074,
-0.1763569414615631,
0.09350674599409103,
0.03349444270133972,
-0.08414719253778458,
0.3690003752708435,
0.2314046025276184,
0.08896123617887497,
0.04848235100507736,
-0.09872645139694214,
-0.3700864911079407,
-0.3742963671684265,
-0.278434693813324,
0.06726863235235214,
-0.04737069830298424,
-0.1991894543170929,
-0.04632885381579399,
-0.47864970564842224,
0.0758778378367424,
-0.22120527923107147,
-0.10280530154705048,
0.2696666121482849,
0.23332108557224274,
0.5501666069030762,
-0.14659005403518677,
0.7683048248291016,
0.14273425936698914,
0.25172632932662964,
-0.09747679531574249,
-0.2796722650527954,
-0.17616306245326996,
0.07846816629171371,
-0.10175217688083649,
0.08781649172306061,
-0.41663581132888794,
-0.43989717960357666,
-0.2644181549549103,
0.29848989844322205,
0.01818285882472992,
-0.13916034996509552,
-0.248928502202034,
0.178313747048378,
-0.04938998445868492,
0.2399466186761856,
0.16416548192501068,
-0.13526242971420288,
-0.15160484611988068,
0.16089218854904175,
-0.1409778892993927,
-0.3798040747642517,
0.282421737909317,
-0.3125072121620178,
-0.10462011396884918,
0.046220384538173676,
0.21753956377506256,
0.14255580306053162,
-0.02174309454858303,
-0.5684854388237,
0.18986913561820984,
0.4957387149333954,
0.00953993946313858,
-0.036867886781692505,
0.49163106083869934,
-0.13609528541564941,
0.30332013964653015,
0.09323529899120331,
0.1297137290239334,
-0.13960689306259155,
0.011305572465062141,
0.16231608390808105,
-0.1219828650355339
] |
https://github.com/huggingface/datasets/issues/4456 | Workflow for Tabular data | I use below to load a dataset:
```
dataset = datasets.load_dataset("scikit-learn/auto-mpg")
df = pd.DataFrame(dataset["train"])
```
TBH as said, tabular folk split their own dataset, they sometimes have two splits, sometimes three. Maybe somehow avoiding it for tabular datasets might be good for later. (it's just UX improvement) | Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion ! | 47 | Workflow for Tabular data
Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion !
I use below to load a dataset:
```
dataset = datasets.load_dataset("scikit-learn/auto-mpg")
df = pd.DataFrame(dataset["train"])
```
TBH as said, tabular folk split their own dataset, they sometimes have two splits, sometimes three. Maybe somehow avoiding it for tabular datasets might be good for later. (it's just UX improvement) | [
-0.2491477131843567,
0.07358591258525848,
-0.17000502347946167,
-0.3053778409957886,
0.17729002237319946,
-0.06776853650808334,
0.42263904213905334,
0.4514343738555908,
0.3860595226287842,
0.10520576685667038,
-0.2380918264389038,
0.6696101427078247,
-0.04544596001505852,
0.7114232778549194,
0.1465497463941574,
-0.058875344693660736,
0.0708419680595398,
0.2527356743812561,
-0.3292844891548157,
0.19387392699718475,
-0.18746764957904816,
-0.33965155482292175,
-0.06750155985355377,
-0.008950948715209961,
-0.15979920327663422,
-0.4042704999446869,
-0.2417483627796173,
0.08364756405353546,
-0.08525186032056808,
-0.006353117525577545,
0.07475021481513977,
0.13751542568206787,
0.25060075521469116,
0.4497627317905426,
-0.00010209241008851677,
-0.07435943931341171,
0.15490466356277466,
0.07378114759922028,
-0.2490500658750534,
-0.2837286591529846,
0.09384680539369583,
-0.3596291244029999,
0.1778847873210907,
-0.23243257403373718,
-0.08262866735458374,
-0.20316679775714874,
0.031273253262043,
-0.438425749540329,
0.2848087251186371,
-0.14173364639282227,
0.1812705546617508,
-0.0017346777021884918,
-0.03740641474723816,
0.011865771375596523,
0.04196101054549217,
0.1156013160943985,
-0.3388099670410156,
-0.03943144902586937,
0.13147982954978943,
-0.43294569849967957,
0.11589207500219345,
0.3851815164089203,
-0.07711999863386154,
0.08493857830762863,
0.5840128660202026,
-0.018203865736722946,
-0.5037029385566711,
-0.34690597653388977,
-0.17633989453315735,
0.576582133769989,
0.41219139099121094,
-0.33004236221313477,
-0.48793745040893555,
-0.3252639174461365,
0.09293727576732635,
-0.009209142997860909,
-0.12887144088745117,
0.4618901014328003,
-0.026004407554864883,
0.09327320754528046,
0.005595617927610874,
-0.312724232673645,
-0.21221321821212769,
-0.049918562173843384,
-0.15494735538959503,
0.21150532364845276,
0.02279825508594513,
-0.036084502935409546,
0.2988954186439514,
-0.010760430246591568,
0.5430915951728821,
-0.22950011491775513,
0.30930066108703613,
0.09486845880746841,
-0.4802836775779724,
-0.10297824442386627,
-0.13374945521354675,
-0.04939492791891098,
0.0020974017679691315,
0.1794125884771347,
0.36396148800849915,
0.18115907907485962,
-0.20399194955825806,
0.14208322763442993,
0.1820899248123169,
0.00006243027746677399,
0.030160322785377502,
0.40029773116111755,
0.18497002124786377,
-0.033703871071338654,
-0.055728498846292496,
-0.1865304410457611,
-0.13433249294757843,
-0.1583481729030609,
-0.15863588452339172,
0.0043629240244627,
0.13162000477313995,
0.1257571578025818,
-0.3168780207633972,
-0.3478884696960449,
0.03907700628042221,
0.06993798166513443,
0.010191669687628746,
0.3007010519504547,
-0.1937917321920395,
0.14634525775909424,
-0.1434546262025833,
0.2904161810874939,
0.05417761951684952,
-0.15562397241592407,
-0.07241900265216827,
0.09840227663516998,
-0.07733480632305145,
0.06592544913291931,
0.0802030861377716,
-0.03428144007921219,
-0.11629011482000351,
0.16168127954006195,
-0.23700685799121857,
0.09385532140731812,
0.12540221214294434,
-0.2055305391550064,
0.1507042944431305,
0.2221723049879074,
0.4342893958091736,
-0.1571969985961914,
-0.1626453399658203,
0.08986261487007141,
-0.18795610964298248,
0.34305304288864136,
-0.42132487893104553,
-0.1972012221813202,
-0.1398889720439911,
0.18676064908504486,
0.05180325359106064,
-0.1625264286994934,
-0.3856070339679718,
0.36342036724090576,
0.07263673096895218,
-0.08091439306735992,
-0.2684190273284912,
0.01857732981443405,
-0.24221812188625336,
-0.2243949919939041,
0.18039026856422424,
0.08521408587694168,
-0.49962276220321655,
0.19555962085723877,
0.00012113386765122414,
0.19098705053329468,
0.25137194991111755,
0.4386727511882782,
0.00474476208910346,
0.48600858449935913,
0.2765299677848816,
0.26431161165237427,
0.37575000524520874,
-0.06832867860794067,
-0.026984503492712975,
0.24887703359127045,
0.26508909463882446,
0.13868704438209534,
0.06448723375797272,
0.07573264837265015,
0.08052298426628113,
-0.0877421498298645,
0.022367406636476517,
0.4447140693664551,
-0.25125348567962646,
0.05157481133937836,
-0.12561297416687012,
-0.2856549620628357,
0.4294304847717285,
0.2635115385055542,
0.0317116342484951,
-0.010036811232566833,
0.1593538224697113,
-0.011884103529155254,
0.24644452333450317,
-0.33712637424468994,
-0.20648722350597382,
-0.2728014588356018,
0.3851417005062103,
0.062185417860746384,
-0.06575097888708115,
-0.335470587015152,
-0.42239153385162354,
-0.004588484764099121,
-0.014356935396790504,
-0.16341984272003174,
0.18162861466407776,
-0.3698002099990845,
0.010732101276516914,
-0.05299970507621765,
-0.15387962758541107,
0.30359411239624023,
0.1499040722846985,
-0.19681590795516968,
-0.005256211385130882,
-0.068534255027771,
-0.2622816264629364,
0.2550891935825348,
-0.5249053835868835,
0.12939614057540894,
-0.1393890380859375,
0.27385440468788147,
0.1473563313484192,
-0.02766573056578636,
0.07930271327495575,
0.3365279734134674,
-0.09709436446428299,
-0.04533759877085686,
0.1995757818222046,
0.33413293957710266,
0.23553673923015594,
0.26872867345809937,
-0.044634439051151276,
0.3816644549369812,
0.0897759199142456,
0.37722399830818176,
-0.003917170688509941,
-0.2158050388097763,
0.12826377153396606,
0.06930159777402878,
-0.6012455821037292,
0.4713585376739502,
-0.46715834736824036,
0.31585168838500977,
0.11638431251049042,
-0.0482359454035759,
0.048544615507125854,
0.006718181073665619,
-0.08030369132757187,
0.3060981035232544,
-0.1259072870016098,
-0.17424190044403076,
-0.13429725170135498,
-0.051048919558525085,
-0.30095118284225464,
0.20869767665863037,
0.5659315586090088,
-0.0827503651380539,
0.35312172770500183,
-0.1999378502368927,
0.015223197638988495,
-0.2209899127483368,
0.12559103965759277,
0.25187116861343384,
0.10734841227531433,
0.34026485681533813,
-0.045316245406866074,
-0.009561179205775261,
-0.2642305791378021,
-0.08794450759887695,
0.20710106194019318,
0.2817527949810028,
0.2291996031999588,
0.13769826292991638,
-0.0756799504160881,
0.04193953052163124,
0.013955175876617432,
0.012735694646835327,
-0.07383536547422409,
0.15188875794410706,
-0.24173332750797272,
0.027411965653300285,
-0.2869199216365814,
-0.2371785044670105,
-0.18358319997787476,
0.10618741065263748,
0.4363548755645752,
-0.3328392803668976,
0.1275610476732254,
0.06350807100534439,
-0.3239756226539612,
0.07591672986745834,
0.08090193569660187,
0.2910129427909851,
-0.19467118382453918,
0.2633039653301239,
-0.22343619167804718,
-0.20448178052902222,
0.1214280053973198,
0.15859729051589966,
0.5441875457763672,
0.10592655837535858,
0.40849143266677856,
-0.07674850523471832,
0.15968471765518188,
-0.11334670335054398,
-0.33572790026664734,
0.009107708930969238,
0.0893341451883316,
0.26754310727119446,
-0.08654248714447021,
0.005554467439651489,
-0.20513784885406494,
-0.17702113091945648,
-0.03907046467065811,
-0.17000918090343475,
0.07913187891244888,
0.02612924575805664,
-0.07939442247152328,
-0.016593556851148605,
0.027205664664506912,
-0.5742194652557373,
-0.48344552516937256,
-0.3991861939430237,
0.2860296368598938,
-0.11212168633937836,
0.0035168901085853577,
0.04772080481052399,
0.08565853536128998,
-0.24484917521476746,
0.028295760974287987,
-0.006645608693361282,
0.0252901092171669,
-0.0664428174495697,
0.2134159952402115,
-0.16132114827632904,
-0.256635844707489,
-0.11419259011745453,
0.07072268426418304,
-0.1573805958032608,
0.3139643669128418,
-0.10786622017621994,
-0.1412356197834015,
-0.1417877972126007,
-0.1739780455827713,
-0.07575419545173645,
0.22453638911247253,
0.1818135380744934,
-0.06782888621091843,
-0.05703461170196533,
-0.028063183650374413,
0.24011638760566711,
-0.07715121656656265,
0.14128920435905457,
-0.20500367879867554,
0.07405172288417816,
0.19598239660263062,
0.32916709780693054,
0.4009985327720642,
0.1075962483882904,
-0.0011871196329593658,
0.08271671831607819,
0.026492221280932426,
0.27569255232810974,
-0.22754445672035217,
-0.0936349630355835,
0.021451858803629875,
-0.2961944341659546,
0.3827725052833557,
0.3416689336299896,
-0.0018250159919261932,
-0.327863484621048,
-0.09063422679901123,
-0.17180883884429932,
-0.3234146535396576,
-0.2025119513273239,
0.5339106917381287,
-0.40530043840408325,
0.20914170145988464,
0.1821587085723877,
0.06676086038351059,
0.045658815652132034,
-0.18936073780059814,
0.03753204271197319,
0.10193809121847153,
0.20776444673538208,
0.10315530747175217,
-0.28327250480651855,
-0.5543309450149536,
-0.16984966397285461,
0.2594253420829773,
0.052968062460422516,
0.15839409828186035,
0.1585456132888794,
-0.21587792038917542,
-0.06458941102027893,
0.024301450699567795,
0.09281174838542938,
-0.254420667886734,
-0.4006715416908264,
-0.18927273154258728,
-0.1366870105266571,
-0.17929485440254211,
0.010098379105329514,
-0.24779915809631348,
0.12033139914274216,
-0.32264575362205505,
0.5155823230743408,
-0.16895970702171326,
-0.19380518794059753,
0.11495941877365112,
0.2085469663143158,
-0.03797927871346474,
0.01266732718795538,
-0.19709883630275726,
-0.027389906346797943,
-0.1998138725757599,
0.09354594349861145,
0.02435060776770115,
-0.12423577904701233,
-0.23542821407318115,
-0.32517993450164795,
-0.34246715903282166,
0.141038715839386,
0.26022955775260925,
0.15823297202587128,
0.07664920389652252,
-0.016062088310718536,
0.2942163646221161,
0.15914344787597656,
0.28342312574386597,
0.26722481846809387,
0.264597088098526,
-0.3242073357105255,
-0.23967763781547546,
-0.02060985192656517,
-0.21069104969501495,
0.3856009542942047,
0.15583369135856628,
0.15405428409576416,
0.04121467471122742,
0.06430064141750336,
-0.01531192660331726,
-0.24346259236335754,
-0.010410591959953308,
0.18190094828605652,
0.10630367696285248,
-0.2429833561182022,
-0.8853293061256409,
0.22715741395950317,
0.011537998914718628,
-0.08325149863958359,
0.12236107140779495,
0.09247700124979019,
-0.05805172026157379,
0.12030237913131714,
0.11487232148647308,
0.7409595847129822,
-0.2642034888267517,
0.07495813071727753,
0.1472979187965393,
-0.47777658700942993,
0.46913233399391174,
-0.6218088865280151,
-0.13827286660671234,
-0.3201512098312378,
-0.2480096071958542,
-0.014745249412953854,
0.00888870283961296,
0.14602461457252502,
0.14351347088813782,
-0.12753956019878387,
0.38905346393585205,
0.11226096749305725,
0.2028200328350067,
-0.05390845984220505,
0.3305554986000061,
-0.18280015885829926,
-0.31564727425575256,
-0.2444974184036255,
0.1788332164287567,
-0.0973353236913681,
-0.30706843733787537,
-0.0006940728053450584,
0.06370802223682404,
0.06149500235915184,
0.33030760288238525,
0.03129389137029648,
-0.05063369870185852,
-0.23671483993530273,
0.2055668979883194,
-0.03363403305411339,
-0.46393609046936035,
0.12254670262336731,
0.16004513204097748,
0.021282322704792023,
0.10454784333705902,
0.0019553974270820618,
-0.00975000113248825,
-0.1389136016368866,
0.13748686015605927,
0.075541652739048,
-0.2704657316207886,
0.49744489789009094,
-0.007389813661575317,
-0.037209853529930115,
-0.1166686937212944,
0.1447407752275467,
-0.16862469911575317,
-0.28020480275154114,
0.14134883880615234,
0.6172770261764526,
-0.3955761194229126,
-0.1397469937801361,
-0.02638806402683258,
0.07292455434799194,
-0.20574705302715302,
0.19643057882785797,
-0.03327534347772598,
0.2634928226470947,
0.5766738653182983,
0.014629926532506943,
-0.0974089577794075,
-0.10255907475948334,
-0.25342312455177307,
0.10995260626077652,
0.36634424328804016,
0.13258510828018188,
-0.07417050004005432,
-0.383622407913208,
-0.23258718848228455,
0.5111268758773804,
0.5738118886947632,
-0.10153808444738388,
-0.061476875096559525,
-0.03593529388308525,
0.11517493426799774,
0.22083282470703125,
0.0191134475171566,
0.003181617707014084,
-0.22281086444854736,
-0.28110846877098083,
-0.22699525952339172,
0.2993411123752594,
0.46420276165008545,
0.23456346988677979,
0.22054164111614227,
0.299912691116333,
0.06417076289653778,
-0.2693241834640503,
0.1508694589138031,
-0.34503093361854553,
-0.1855926215648651,
0.16540560126304626,
0.15744304656982422,
0.016927354037761688,
0.005723118782043457,
-0.19907307624816895,
-0.11346966028213501,
0.09914417564868927,
0.013781530782580376,
0.18511748313903809,
-0.3503193259239197,
-0.19476889073848724,
0.07776537537574768,
-0.016103599220514297,
0.2862670421600342,
-0.08263281732797623,
-0.38056081533432007,
-0.3013118505477905,
-0.31438061594963074,
-0.003781462088227272,
-0.25165459513664246,
0.07080401480197906,
0.07397763431072235,
0.21368521451950073,
0.008443742990493774,
-0.12214208394289017,
0.323358952999115,
-0.2099432349205017,
-0.042685702443122864,
-0.28968966007232666,
0.13598062098026276,
0.24693328142166138,
0.05316045880317688,
0.08131403475999832,
0.06482774764299393,
0.5612501502037048,
0.00994763895869255,
0.2968928813934326,
-0.004063274711370468,
0.41598135232925415,
-0.1527225226163864,
0.384414941072464,
0.33448687195777893,
0.08562906086444855,
-0.050647884607315063,
0.3105403184890747,
0.2726955711841583,
-0.1853339672088623,
-0.13162164390087128,
-0.12558986246585846,
-0.09815701842308044,
0.1456669718027115,
0.35440194606781006,
0.06072475388646126,
0.45123106241226196,
-0.018336914479732513,
-0.18675535917282104,
0.19317704439163208,
-0.38428622484207153,
0.04408246651291847,
0.3126068115234375,
-0.04255791753530502,
-0.04124245420098305,
0.06507012248039246,
-0.04929737374186516,
-0.10547444969415665,
0.5435975790023804,
0.10311311483383179,
0.15383493900299072,
0.2974333167076111,
-0.004104789346456528,
0.3493858575820923,
-0.19831067323684692,
-0.44840332865715027,
0.15676051378250122,
-0.25383445620536804,
0.10553108155727386,
-0.03413242846727371,
0.2730920612812042,
-0.1805504411458969,
-0.21966996788978577,
0.03147127479314804,
0.0374097116291523,
-0.12286581844091415,
0.02404790371656418,
-0.3317580819129944,
-0.082953080534935,
0.10283482074737549,
-0.004441630095243454,
-0.10542389750480652,
0.19592006504535675,
0.09544461220502853,
-0.04314903914928436,
0.14371024072170258,
0.12961985170841217,
0.2375531792640686,
0.16752731800079346,
0.4463655650615692,
-0.23808352649211884,
-0.15723341703414917,
-0.0936804860830307,
0.08228126168251038,
-0.21338105201721191,
0.212332621216774,
0.3086381256580353,
0.23312583565711975,
-0.27504071593284607,
-0.0333845317363739,
0.17378704249858856,
-0.21802836656570435,
-0.0038336049765348434,
0.1598043143749237,
0.11371713131666183,
0.17742358148097992,
0.2683197259902954,
0.2222495824098587,
-0.1692676991224289,
0.28211769461631775,
-0.13553397357463837,
-0.04714677855372429,
-0.29659634828567505,
0.2736416757106781,
0.27648627758026123,
-0.3138604462146759,
0.17501838505268097,
0.054512832313776016,
-0.29349473118782043,
0.010663921013474464,
0.05724531412124634,
-0.12652269005775452,
-0.08894480019807816,
-0.16598324477672577,
0.11357921361923218,
0.19499878585338593,
0.48305100202560425,
0.09576332569122314,
0.2439911961555481,
-0.09852607548236847,
-0.0250021293759346,
-0.21550405025482178,
-0.24301481246948242,
-0.19956785440444946,
-0.2612234652042389,
0.0019610985182225704,
0.1597997546195984,
0.24420762062072754,
0.3204271197319031,
-0.04717305302619934,
-0.34114500880241394,
-0.18239955604076385,
0.20641116797924042,
-0.18422672152519226,
-0.099419966340065,
-0.04408562183380127,
-0.14675332605838776,
-0.017462339252233505,
-0.5461558103561401,
0.0978710725903511,
0.14949767291545868,
-0.050678011029958725,
0.025585394352674484,
0.29066866636276245,
0.3844849467277527,
0.06274478882551193,
0.10084167867898941,
-0.09660182148218155,
0.49719229340553284,
-0.0033289529383182526,
0.044450923800468445,
-0.09312447905540466,
-0.26620838046073914,
-0.36348438262939453,
0.42921701073646545,
0.04396337270736694,
0.14189237356185913,
-0.12795308232307434,
-0.37289106845855713,
0.01935361512005329,
0.07140379399061203,
0.006930466741323471,
0.1905803382396698,
-0.11721517145633698,
0.04320426285266876,
0.036137521266937256,
0.010192632675170898,
0.2681104838848114,
0.23203763365745544,
-0.050218403339385986,
-0.2175971418619156,
-0.10641390085220337,
-0.19564877450466156,
0.047682926058769226,
0.07680564373731613,
-0.18002855777740479,
-0.15621985495090485,
-0.021731778979301453,
0.21405157446861267,
0.38426473736763,
-0.3153363764286041,
-0.22216054797172546,
0.18145963549613953,
-0.14934685826301575,
0.2163628786802292,
0.47592347860336304,
0.3192417323589325,
0.02873879298567772,
-0.29747557640075684,
-0.03667942434549332,
-0.1148044690489769,
-0.3537605106830597,
-0.2596687972545624,
-0.4518110156059265
] |
https://github.com/huggingface/datasets/issues/4456 | Workflow for Tabular data | is very slow batch access of a dataset (tabular, csv) with many columns to be expected? | Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion ! | 16 | Workflow for Tabular data
Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion !
is very slow batch access of a dataset (tabular, csv) with many columns to be expected? | [
-0.39244958758354187,
0.14258205890655518,
-0.20618796348571777,
-0.31092143058776855,
0.17349998652935028,
-0.06509330868721008,
0.4074799120426178,
0.4767451882362366,
0.3228021562099457,
0.07285264134407043,
-0.19770486652851105,
0.42343634366989136,
-0.040627192705869675,
0.6204625368118286,
0.11959576606750488,
0.025935357436537743,
0.08786816149950027,
0.2158435881137848,
-0.4265417158603668,
0.1748615950345993,
-0.15365049242973328,
-0.4553949534893036,
-0.1409572958946228,
-0.030966944992542267,
-0.042870767414569855,
-0.39755550026893616,
-0.23951464891433716,
-0.035003662109375,
-0.1522301882505417,
-0.03758654370903969,
0.01315215416252613,
0.1237650066614151,
0.22163888812065125,
0.45472511649131775,
-0.00010633235797286034,
-0.11260376125574112,
0.1413215696811676,
0.1771838665008545,
-0.27570846676826477,
-0.1863478571176529,
0.04254000633955002,
-0.577316403388977,
0.12291407585144043,
-0.17556899785995483,
-0.01142771914601326,
-0.21147006750106812,
0.1455807387828827,
-0.31068721413612366,
0.15997475385665894,
-0.10487238317728043,
0.14374375343322754,
0.02222573012113571,
-0.03188062459230423,
0.09934170544147491,
0.10210313647985458,
0.07574455440044403,
-0.36079782247543335,
0.05486779659986496,
0.3153911232948303,
-0.4660663604736328,
0.08917002379894257,
0.31675809621810913,
-0.14122532308101654,
0.15196458995342255,
0.47905078530311584,
-0.03708457201719284,
-0.44083935022354126,
-0.24954718351364136,
-0.10765913873910904,
0.5361467599868774,
0.43246662616729736,
-0.33043932914733887,
-0.5289062261581421,
-0.2806246876716614,
0.09776788204908371,
0.006445901468396187,
-0.12348871678113937,
0.4195582866668701,
-0.037408497184515,
0.11810894310474396,
-0.17701251804828644,
-0.38977015018463135,
-0.20692704617977142,
-0.052989184856414795,
0.02094842493534088,
0.062084928154945374,
0.04833301156759262,
-0.053953804075717926,
0.2077893316745758,
-0.029149852693080902,
0.5380354523658752,
-0.31637778878211975,
0.35771024227142334,
0.1130177453160286,
-0.48642587661743164,
-0.06772889196872711,
-0.02254083752632141,
-0.07540159672498703,
0.06303343921899796,
0.12297026067972183,
0.30342406034469604,
0.16454780101776123,
-0.1540696620941162,
0.07761675119400024,
0.1668039858341217,
-0.05617222189903259,
-0.08986520022153854,
0.26839110255241394,
0.34324049949645996,
-0.08663976937532425,
-0.026652025058865547,
-0.07276691496372223,
-0.19492781162261963,
-0.16653338074684143,
-0.08139908313751221,
0.060648903250694275,
0.08814088255167007,
0.07739204168319702,
-0.30525127053260803,
-0.3148486912250519,
0.07676828652620316,
-0.059191521257162094,
-0.004665042273700237,
0.3012852072715759,
-0.3345312774181366,
0.05388310179114342,
-0.1652233749628067,
0.21396522223949432,
0.09199128299951553,
-0.15374015271663666,
-0.0417751707136631,
-0.0022014211863279343,
-0.10184228420257568,
0.03946096822619438,
0.15935790538787842,
-0.06602711975574493,
-0.21609874069690704,
0.24180425703525543,
-0.402321994304657,
0.15794548392295837,
0.04494120180606842,
-0.28606152534484863,
0.1612069010734558,
0.04876740276813507,
0.3519785702228546,
-0.16930806636810303,
-0.21555279195308685,
0.18470260500907898,
-0.15086977183818817,
0.3478599786758423,
-0.34141597151756287,
-0.31071266531944275,
-0.07400158792734146,
0.12383514642715454,
0.04970189183950424,
-0.10676203668117523,
-0.45749011635780334,
0.33764851093292236,
0.004833497107028961,
-0.00962347537279129,
-0.3229696750640869,
0.01567520759999752,
-0.12129353731870651,
-0.23445945978164673,
0.06895685195922852,
0.1354246288537979,
-0.552631676197052,
0.3020414412021637,
0.19022634625434875,
0.13279801607131958,
0.2886909246444702,
0.543404757976532,
0.03357440605759621,
0.3816145658493042,
0.24022668600082397,
0.03366043418645859,
0.31715065240859985,
-0.0004513375461101532,
-0.0574033185839653,
0.363805890083313,
0.2639434337615967,
0.06689544767141342,
0.16810482740402222,
0.1115831583738327,
0.1339617520570755,
-0.22576789557933807,
0.13349759578704834,
0.4066659212112427,
-0.238550066947937,
0.01732032187283039,
-0.09634978324174881,
-0.271356463432312,
0.3231971859931946,
0.20501436293125153,
-0.019359465688467026,
0.06512957811355591,
0.16873088479042053,
-0.17276741564273834,
0.1688840389251709,
-0.29481855034828186,
-0.22791500389575958,
-0.25556105375289917,
0.34965091943740845,
0.11325129866600037,
-0.050970036536455154,
-0.13311856985092163,
-0.3929791748523712,
-0.03327846899628639,
0.13210906088352203,
-0.1624028980731964,
0.21956878900527954,
-0.3387306332588196,
0.15687796473503113,
0.03835985064506531,
-0.005489807575941086,
0.4570819139480591,
0.08761608600616455,
-0.19214776158332825,
-0.015354910865426064,
-0.11752966046333313,
-0.20622511208057404,
0.21498243510723114,
-0.6403297781944275,
0.04274175316095352,
-0.03695634379982948,
0.1763419210910797,
0.1592976450920105,
0.0009420225396752357,
0.18003937602043152,
0.39507025480270386,
-0.15324532985687256,
-0.04657057672739029,
0.20738881826400757,
0.23837056756019592,
0.1315937042236328,
0.17701204121112823,
-0.011037323623895645,
0.5640683174133301,
0.0690755546092987,
0.49087145924568176,
0.0746360570192337,
-0.28758084774017334,
0.15479610860347748,
0.04780180752277374,
-0.5484067797660828,
0.44256293773651123,
-0.3498116731643677,
0.4188566505908966,
0.2614848017692566,
-0.06713405251502991,
0.24236801266670227,
0.11407835781574249,
-0.04141252860426903,
0.4771457016468048,
0.01750807836651802,
-0.13269370794296265,
-0.06712167710065842,
0.00018413178622722626,
-0.4548622667789459,
0.1907413899898529,
0.44109609723091125,
-0.11162349581718445,
0.3621942400932312,
-0.12616682052612305,
0.053441114723682404,
-0.3034716844558716,
0.13625547289848328,
0.13515973091125488,
0.1515229344367981,
0.3400976061820984,
-0.0374637134373188,
-0.008476736024022102,
-0.21988463401794434,
-0.1256132274866104,
0.22025126218795776,
0.1906561553478241,
0.2245899885892868,
0.12410030514001846,
-0.056500501930713654,
0.06723403930664062,
0.09414201229810715,
-0.118375763297081,
-0.06051938235759735,
0.23529082536697388,
-0.32200416922569275,
-0.08762391656637192,
-0.2646837830543518,
-0.3172653913497925,
-0.04705997556447983,
0.19461268186569214,
0.4842221140861511,
-0.20207761228084564,
0.09373831748962402,
0.07887641340494156,
-0.3187921345233917,
0.07922758162021637,
0.14299221336841583,
0.28944888710975647,
-0.219359889626503,
0.33030375838279724,
-0.21381641924381256,
-0.1817484050989151,
0.09126400947570801,
0.1084899753332138,
0.5791698098182678,
-0.07276325672864914,
0.3790678083896637,
-0.06391393393278122,
0.10749166458845139,
-0.2748012840747833,
-0.19089370965957642,
-0.009278614073991776,
0.09944210946559906,
0.32625964283943176,
-0.012753672897815704,
0.096189945936203,
-0.20633548498153687,
-0.13194823265075684,
-0.031434327363967896,
-0.15009473264217377,
0.016601381823420525,
0.09142544865608215,
-0.25736886262893677,
-0.16236628592014313,
0.18956626951694489,
-0.4955209791660309,
-0.556050181388855,
-0.4006006121635437,
0.21661445498466492,
-0.13823579251766205,
0.05625629425048828,
0.07416678965091705,
0.09623710066080093,
-0.2337084412574768,
0.04762924090027809,
0.06959054619073868,
0.05865897610783577,
-0.11926784366369247,
0.2655293941497803,
-0.08599420636892319,
-0.3312200605869293,
-0.14880970120429993,
0.07622180879116058,
-0.15436284244060516,
0.4544697403907776,
-0.1798584759235382,
-0.09869822859764099,
-0.2307455688714981,
-0.15402725338935852,
-0.02598007768392563,
0.18747290968894958,
0.19006255269050598,
-0.14382918179035187,
-0.0870676189661026,
0.08327821642160416,
0.035849813371896744,
-0.13238254189491272,
0.12330465763807297,
-0.26525577902793884,
0.1591111123561859,
0.3362939655780792,
0.3425411283969879,
0.3837251663208008,
0.03668080270290375,
0.06888970732688904,
0.14321988821029663,
-0.04034905880689621,
0.2628476023674011,
-0.1525428593158722,
-0.1301867961883545,
0.09185979515314102,
-0.2914266586303711,
0.3403934836387634,
0.220574751496315,
-0.013178389519453049,
-0.32979556918144226,
-0.13418084383010864,
-0.1778186708688736,
-0.35747429728507996,
-0.11835356056690216,
0.5743167996406555,
-0.45203909277915955,
0.2971937954425812,
0.2715047597885132,
0.03500499576330185,
-0.08289782702922821,
-0.21598488092422485,
0.037112750113010406,
0.0014606267213821411,
0.25343161821365356,
0.010419539175927639,
-0.23923680186271667,
-0.5049505829811096,
-0.2928391396999359,
0.32186993956565857,
0.062115609645843506,
0.34288614988327026,
0.16576160490512848,
-0.11462140828371048,
-0.007663913071155548,
0.11785920709371567,
0.17818473279476166,
-0.2795548439025879,
-0.3220953345298767,
-0.19852133095264435,
-0.22217398881912231,
-0.24035829305648804,
0.02926464006304741,
-0.27664244174957275,
0.10268089920282364,
-0.25814229249954224,
0.5603387355804443,
-0.1726338267326355,
-0.23508909344673157,
0.17682059109210968,
0.16272766888141632,
0.028558868914842606,
-0.04431954771280289,
-0.15016888082027435,
-0.017541853711009026,
-0.18626801669597626,
0.13966336846351624,
-0.027083540335297585,
-0.19081822037696838,
-0.17941664159297943,
-0.313120573759079,
-0.33939188718795776,
0.24502161145210266,
0.29582929611206055,
0.12624964118003845,
-0.03272681310772896,
0.00775819830596447,
0.37460681796073914,
0.041724853217601776,
0.23965425789356232,
0.25143590569496155,
0.14360970258712769,
-0.2570931613445282,
-0.22414737939834595,
0.046278465539216995,
-0.16008903086185455,
0.46386227011680603,
0.1913948655128479,
0.1543673723936081,
0.09778210520744324,
-0.021267227828502655,
-0.013673365116119385,
-0.2582973837852478,
-0.1253809630870819,
0.2319386899471283,
0.2414882481098175,
-0.31789126992225647,
-0.9149647355079651,
0.1453888714313507,
0.041158225387334824,
-0.09448589384555817,
0.06571836769580841,
0.09040916711091995,
0.04910540580749512,
0.09540487825870514,
0.07386603206396103,
0.734755277633667,
-0.31512218713760376,
0.050975874066352844,
0.14360839128494263,
-0.44185465574264526,
0.3424471616744995,
-0.4950147271156311,
-0.11110496520996094,
-0.21471446752548218,
-0.32772600650787354,
0.011919790878891945,
-0.07454201579093933,
0.13652180135250092,
0.12862424552440643,
-0.014746520668268204,
0.44543102383613586,
0.17262761294841766,
0.26709505915641785,
-0.10661070793867111,
0.28474584221839905,
-0.20125824213027954,
-0.26714444160461426,
-0.2224435657262802,
0.14235974848270416,
-0.07522439956665039,
-0.30866774916648865,
-0.0412740558385849,
0.18648523092269897,
0.05457131192088127,
0.38373416662216187,
-0.017556771636009216,
-0.09778016805648804,
-0.17503893375396729,
0.17908242344856262,
0.039014898240566254,
-0.4665706157684326,
0.10061948001384735,
0.10371483117341995,
-0.024837538599967957,
0.1361546665430069,
-0.029389148578047752,
-0.11829616129398346,
-0.16949275135993958,
0.2111871838569641,
0.19630417227745056,
-0.30258283019065857,
0.4148814082145691,
-0.027433283627033234,
0.05466540902853012,
-0.1775365173816681,
0.11506587266921997,
-0.16595673561096191,
-0.27141886949539185,
0.08206124603748322,
0.6313469409942627,
-0.3173733949661255,
-0.24185962975025177,
-0.018145397305488586,
0.021290849894285202,
-0.2072339802980423,
0.15547160804271698,
-0.0013728290796279907,
0.27145683765411377,
0.6784496307373047,
-0.02496260777115822,
-0.1006166934967041,
-0.06378060579299927,
-0.1841820478439331,
0.11635743826627731,
0.3080526292324066,
0.22902214527130127,
0.039018262177705765,
-0.45890533924102783,
-0.1635664999485016,
0.46435344219207764,
0.7008926272392273,
-0.15500131249427795,
-0.015776842832565308,
-0.09911879897117615,
0.1811649352312088,
0.17741727828979492,
0.01703749969601631,
0.017032712697982788,
-0.31603264808654785,
-0.23067937791347504,
-0.22204232215881348,
0.2734295725822449,
0.5247098803520203,
0.28824740648269653,
0.10582880675792694,
0.2173345685005188,
-0.06339159607887268,
-0.21262003481388092,
0.13193808495998383,
-0.30068010091781616,
-0.188027024269104,
0.12686708569526672,
0.2035721391439438,
0.05511155351996422,
0.1006666049361229,
-0.18750499188899994,
-0.081721231341362,
0.07162299007177353,
-0.08226839452981949,
0.15717174112796783,
-0.3170571029186249,
-0.09710164368152618,
0.1181381419301033,
-0.07757938653230667,
0.23305830359458923,
0.021749146282672882,
-0.44357043504714966,
-0.3956628441810608,
-0.3258553743362427,
-0.16625945270061493,
-0.18920499086380005,
0.014901522547006607,
-0.04288037121295929,
0.09118537604808807,
-0.12228011339902878,
-0.013592181727290154,
0.41222551465034485,
-0.21496042609214783,
0.01833445578813553,
-0.27226901054382324,
0.17616982758045197,
0.3261057436466217,
-0.03854835778474808,
0.021102141588926315,
0.08753245323896408,
0.5549349784851074,
0.05254694074392319,
0.319080650806427,
-0.012987829744815826,
0.4225427806377411,
-0.03597547858953476,
0.3703765273094177,
0.2518346905708313,
0.12922170758247375,
-0.04299112409353256,
0.3902028501033783,
0.20316752791404724,
-0.22387908399105072,
-0.13980719447135925,
-0.14655283093452454,
-0.04187452048063278,
0.14573916792869568,
0.277161568403244,
0.09846493601799011,
0.44970041513442993,
-0.07435418665409088,
-0.20685675740242004,
0.18054071068763733,
-0.4627695679664612,
-0.18403442203998566,
0.29922163486480713,
0.11395099759101868,
-0.05600887909531593,
0.11785852909088135,
0.07559261471033096,
-0.14916330575942993,
0.4951702952384949,
0.1856900155544281,
0.17337971925735474,
0.4117739200592041,
0.11253812909126282,
0.23211830854415894,
-0.31566306948661804,
-0.3669917583465576,
0.21050463616847992,
-0.26128989458084106,
0.05351362004876137,
-0.08533227443695068,
0.18315935134887695,
-0.09277105331420898,
-0.14734315872192383,
0.07029470056295395,
-0.02846905216574669,
-0.10294909030199051,
0.0480743870139122,
-0.29046496748924255,
-0.058578088879585266,
0.15185752511024475,
0.1152835339307785,
-0.2196204662322998,
0.24314676225185394,
0.08948174118995667,
-0.03382575511932373,
0.30153772234916687,
-0.0578923225402832,
0.25648924708366394,
0.10540258884429932,
0.34674057364463806,
-0.22527289390563965,
-0.05999671667814255,
-0.16536037623882294,
0.20580406486988068,
-0.19743454456329346,
0.3767639994621277,
0.3374730944633484,
0.3334278464317322,
-0.0927424430847168,
0.05324067547917366,
0.10965573787689209,
-0.2260512262582779,
-0.08344924449920654,
0.2616770267486572,
0.16312050819396973,
0.2401319295167923,
0.17285393178462982,
0.16906161606311798,
-0.1017986536026001,
0.3698638379573822,
-0.24575774371623993,
-0.16685818135738373,
-0.24492037296295166,
0.15040987730026245,
0.32702258229255676,
-0.49978670477867126,
0.13595953583717346,
0.04186203330755234,
-0.17449833452701569,
-0.028280608355998993,
0.20064690709114075,
-0.19773827493190765,
-0.061167970299720764,
-0.09161105006933212,
0.10329685360193253,
0.11750923097133636,
0.44632014632225037,
0.22724570333957672,
0.4722498059272766,
-0.18222002685070038,
-0.019436106085777283,
-0.25097590684890747,
-0.24603283405303955,
-0.21517789363861084,
-0.18111394345760345,
0.04604345187544823,
0.20762155950069427,
0.26745137572288513,
0.2900276184082031,
-0.00002969801425933838,
-0.4817526042461395,
-0.15847180783748627,
0.2273789346218109,
-0.18036825954914093,
-0.13792002201080322,
0.09175889194011688,
-0.05060078948736191,
-0.09813963621854782,
-0.5264365077018738,
0.24615414440631866,
0.21638619899749756,
-0.09851253777742386,
-0.05127755552530289,
0.3178492784500122,
0.3225457966327667,
0.03547780215740204,
0.12899768352508545,
-0.11503706872463226,
0.4186767339706421,
0.01653079316020012,
0.1232876405119896,
-0.14217142760753632,
-0.22675399482250214,
-0.2601613402366638,
0.4461674690246582,
0.04698720574378967,
-0.05970117822289467,
-0.16554807126522064,
-0.2846275866031647,
0.12693054974079132,
0.06646492332220078,
-0.1470782458782196,
0.30028748512268066,
-0.17247238755226135,
0.020067719742655754,
0.06708180159330368,
0.05624855309724808,
0.10986612737178802,
-0.016289882361888885,
0.01964709535241127,
-0.20315907895565033,
-0.1707792580127716,
-0.10553960502147675,
0.08490902930498123,
0.06321254372596741,
-0.18608404695987701,
-0.22750024497509003,
0.0749242752790451,
0.1766783446073532,
0.39256399869918823,
-0.19572895765304565,
-0.24414974451065063,
0.20367005467414856,
-0.14201870560646057,
0.14222270250320435,
0.5495303273200989,
0.18520230054855347,
0.14106664061546326,
-0.2756690979003906,
-0.03634483367204666,
-0.17562076449394226,
-0.3948485851287842,
-0.30387458205223083,
-0.47560304403305054
] |
https://github.com/huggingface/datasets/issues/4456 | Workflow for Tabular data | ~20k! I was surprised batch loading with as few as 32 samples was really slow. I was speculating the columnar format was the cause -- or do you see good performance with this approx size of tabular data? | Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion ! | 38 | Workflow for Tabular data
Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion !
~20k! I was surprised batch loading with as few as 32 samples was really slow. I was speculating the columnar format was the cause -- or do you see good performance with this approx size of tabular data? | [
-0.46042799949645996,
0.11330518126487732,
-0.18204757571220398,
-0.3295387029647827,
0.1515868604183197,
-0.1130647212266922,
0.5216742157936096,
0.555488109588623,
0.3649042546749115,
0.08977203071117401,
-0.23160405457019806,
0.36944109201431274,
-0.06016477197408676,
0.6334143280982971,
0.16702033579349518,
0.034136705100536346,
0.020918168127536774,
0.2510632276535034,
-0.40192991495132446,
0.15442882478237152,
-0.11579371988773346,
-0.3896739184856415,
-0.12652260065078735,
-0.12922368943691254,
-0.17462806403636932,
-0.311568945646286,
-0.2351398468017578,
0.06258947402238846,
-0.13679926097393036,
-0.09296588599681854,
-0.013681613840162754,
0.08131420612335205,
0.29051685333251953,
0.4864156246185303,
-0.00010429049871163443,
-0.14685341715812683,
0.23672552406787872,
0.12777341902256012,
-0.35365450382232666,
-0.05694428086280823,
0.20680317282676697,
-0.5976302623748779,
0.007098991423845291,
-0.13011406362056732,
0.03610976040363312,
-0.34040138125419617,
0.005294894799590111,
-0.26676103472709656,
0.14824926853179932,
-0.07962701469659805,
0.17381367087364197,
0.11455300450325012,
-0.06980638951063156,
0.07442225515842438,
0.13624697923660278,
0.10711082071065903,
-0.2896835505962372,
0.21105752885341644,
0.4348793029785156,
-0.4316076636314392,
0.01178549975156784,
0.33034369349479675,
-0.16713175177574158,
0.15183250606060028,
0.36658719182014465,
-0.0720941349864006,
-0.3064044713973999,
-0.18777091801166534,
-0.028437986969947815,
0.579433798789978,
0.47207674384117126,
-0.212330162525177,
-0.427823007106781,
-0.3444614112377167,
-0.012877950444817543,
0.052573613822460175,
-0.2072247862815857,
0.3697049021720886,
-0.09354639053344727,
0.04169033467769623,
-0.22894206643104553,
-0.19476354122161865,
-0.14194568991661072,
-0.13400565087795258,
-0.006955277174711227,
0.11489975452423096,
0.040922731161117554,
-0.06544018536806107,
0.24226011335849762,
-0.11158394813537598,
0.39955848455429077,
-0.26603490114212036,
0.31591859459877014,
0.1494411826133728,
-0.46542829275131226,
-0.08212236315011978,
0.03710836172103882,
-0.13784608244895935,
0.07911359518766403,
-0.002256035804748535,
0.31284046173095703,
0.22152021527290344,
0.03712936490774155,
-0.017093166708946228,
0.130136638879776,
0.09507890045642853,
-0.06216467171907425,
0.14554372429847717,
0.26393014192581177,
-0.07871327549219131,
0.018242385238409042,
-0.038187965750694275,
-0.24275361001491547,
-0.18816640973091125,
-0.16090284287929535,
-0.10614652186632156,
-0.035613298416137695,
0.009806554764509201,
-0.303814560174942,
-0.280450701713562,
0.08062490075826645,
-0.08272884786128998,
-0.040795281529426575,
0.3561326265335083,
-0.2500242590904236,
0.07889419049024582,
-0.1436203122138977,
0.13446033000946045,
0.0399625226855278,
-0.21139408648014069,
-0.0987333282828331,
-0.042290229350328445,
-0.150575652718544,
-0.004421666264533997,
0.24157442152500153,
-0.07059569656848907,
-0.16752196848392487,
0.1704888492822647,
-0.34687793254852295,
0.23230907320976257,
0.03404182940721512,
-0.23149313032627106,
0.1257944405078888,
0.13273602724075317,
0.3330535888671875,
-0.1809336245059967,
-0.1654270440340042,
0.19684003293514252,
-0.15812280774116516,
0.40532150864601135,
-0.2960865795612335,
-0.3713657557964325,
-0.1455136090517044,
0.15811896324157715,
0.012666366994380951,
-0.10523079335689545,
-0.5042415261268616,
0.3888985812664032,
0.058375753462314606,
0.030959349125623703,
-0.35401758551597595,
-0.0660834088921547,
-0.21554209291934967,
-0.1890120655298233,
0.16859394311904907,
0.1084534227848053,
-0.6919279098510742,
0.17569689452648163,
0.23009221255779266,
0.22226156294345856,
0.4194774925708771,
0.5085082650184631,
-0.021362023428082466,
0.43343716859817505,
0.2694859504699707,
0.13056349754333496,
0.20879718661308289,
-0.0036002211272716522,
-0.10051034390926361,
0.47134220600128174,
0.18722517788410187,
0.03325565159320831,
0.1996155083179474,
0.06571909785270691,
0.19266948103904724,
-0.21263334155082703,
0.21756690740585327,
0.40357863903045654,
-0.15781192481517792,
0.08806181699037552,
-0.3047860562801361,
-0.21721291542053223,
0.23803742229938507,
0.3613292872905731,
-0.04848482832312584,
-0.020659178495407104,
0.15146325528621674,
-0.23637527227401733,
0.19483210146427155,
-0.3500295579433441,
-0.2684496343135834,
-0.23945792019367218,
0.3265039920806885,
0.07473041862249374,
0.08305666595697403,
0.008965019136667252,
-0.4026466906070709,
0.06625749170780182,
0.010915521532297134,
-0.13258233666419983,
0.44581353664398193,
-0.22826500236988068,
0.1356423795223236,
-0.00383622944355011,
0.010895539075136185,
0.4062662124633789,
0.06162898987531662,
-0.2671479284763336,
0.03849579021334648,
-0.18531060218811035,
-0.2722117304801941,
0.17005133628845215,
-0.6499407887458801,
-0.005661129020154476,
-0.057814400643110275,
0.06723695248365402,
0.24166633188724518,
-0.08591452240943909,
0.20112662017345428,
0.3062962591648102,
-0.18342161178588867,
-0.014890680089592934,
0.11792708188295364,
0.2760956585407257,
0.1113973930478096,
0.18433044850826263,
-0.013372600078582764,
0.43040281534194946,
0.01769796386361122,
0.586763858795166,
0.2342810034751892,
-0.3492860794067383,
0.11762063205242157,
0.009765513241291046,
-0.45192185044288635,
0.4598391056060791,
-0.35842156410217285,
0.39783549308776855,
0.14988383650779724,
-0.20111510157585144,
0.18244890868663788,
0.07564358413219452,
-0.05998343229293823,
0.464550644159317,
0.2175813615322113,
-0.14810530841350555,
0.006258975714445114,
0.08364751189947128,
-0.38235628604888916,
0.17597851157188416,
0.25793299078941345,
-0.1196921318769455,
0.3231483995914459,
-0.04770365357398987,
-0.022547058761119843,
-0.396782785654068,
0.0528513602912426,
0.10295505821704865,
0.26863569021224976,
0.3399733304977417,
-0.09737555682659149,
-0.03728210926055908,
-0.14776571094989777,
-0.11198502033948898,
0.23069941997528076,
0.168134868144989,
0.17197231948375702,
0.1604231894016266,
0.004049811977893114,
0.040156129747629166,
0.024633295834064484,
-0.058523088693618774,
-0.04505447298288345,
0.23573951423168182,
-0.375410795211792,
-0.064978688955307,
-0.18234902620315552,
-0.2679304778575897,
-0.046118639409542084,
0.16450326144695282,
0.4288334548473358,
-0.18606790900230408,
0.126360684633255,
0.05189378187060356,
-0.30609968304634094,
0.062248051166534424,
0.18526960909366608,
0.4521694779396057,
-0.28844577074050903,
0.34171348810195923,
-0.23332823812961578,
-0.12610071897506714,
-0.08747527748346329,
0.13659818470478058,
0.5633832216262817,
0.03468451648950577,
0.3753361701965332,
-0.07996292412281036,
0.08022363483905792,
-0.07095004618167877,
-0.1335877925157547,
-0.04661857336759567,
0.08415502309799194,
0.31777068972587585,
0.036170683801174164,
0.14175091683864594,
-0.2385246604681015,
-0.09279914945363998,
-0.024086520075798035,
-0.19271361827850342,
-0.0007389392703771591,
0.026126153767108917,
-0.2554578185081482,
-0.11899928748607635,
0.13840875029563904,
-0.3374241888523102,
-0.5108811855316162,
-0.36408156156539917,
0.1645471155643463,
-0.07345671206712723,
-0.004663348197937012,
0.10779024660587311,
0.11560453474521637,
-0.18567481637001038,
0.030635839328169823,
-0.027628036215901375,
0.008433456532657146,
-0.15397275984287262,
0.27262288331985474,
-0.053615178912878036,
-0.31485214829444885,
-0.23274284601211548,
0.11551004648208618,
-0.20071330666542053,
0.41789114475250244,
-0.18017640709877014,
-0.05526893213391304,
-0.1685401201248169,
-0.29727408289909363,
-0.042414017021656036,
0.19253119826316833,
0.17187440395355225,
-0.20021004974842072,
-0.1363953948020935,
0.07203975319862366,
0.10875749588012695,
-0.17070478200912476,
0.07735523581504822,
-0.21635520458221436,
0.06424969434738159,
0.28486427664756775,
0.2927252948284149,
0.4284948706626892,
0.030046209692955017,
-0.055840153247117996,
0.1397045999765396,
0.08601430058479309,
0.1904607117176056,
-0.31307315826416016,
-0.09004711359739304,
0.12868160009384155,
-0.28552645444869995,
0.3148741126060486,
0.3251648545265198,
-0.04546118155121803,
-0.3944155275821686,
-0.12872552871704102,
-0.14768880605697632,
-0.2519557476043701,
-0.027819816023111343,
0.7291032075881958,
-0.3024671971797943,
0.2895994186401367,
0.2793196737766266,
-0.005595628172159195,
-0.06646229326725006,
-0.23390129208564758,
0.0020851213485002518,
-0.16838599741458893,
0.2532575726509094,
-0.0040748268365859985,
-0.3065793812274933,
-0.36299145221710205,
-0.37039411067962646,
0.3282080292701721,
0.07518169283866882,
0.31720924377441406,
0.18538732826709747,
-0.16157639026641846,
-0.023499898612499237,
0.10527265816926956,
0.2178274691104889,
-0.19010189175605774,
-0.2797641158103943,
-0.128067284822464,
-0.1808251142501831,
-0.26800769567489624,
-0.07650884240865707,
-0.21433252096176147,
0.06685732305049896,
-0.13304470479488373,
0.5314478874206543,
-0.11560104787349701,
-0.2211078703403473,
0.2396862655878067,
0.20108695328235626,
0.027576636523008347,
-0.046050235629081726,
-0.2969806492328644,
-0.05280395224690437,
-0.14344263076782227,
0.14940887689590454,
-0.03816406428813934,
-0.15316861867904663,
-0.19088897109031677,
-0.19258466362953186,
-0.21936766803264618,
0.20929494500160217,
0.2661316990852356,
0.10638591647148132,
0.05476831644773483,
0.09342662990093231,
0.43100830912590027,
0.13611818850040436,
0.27993834018707275,
0.2877720594406128,
0.15185488760471344,
-0.25150352716445923,
-0.08396802842617035,
0.08477778732776642,
-0.16222478449344635,
0.4253919720649719,
0.3149482309818268,
0.22837163507938385,
-0.08854392915964127,
-0.05468162149190903,
0.058453306555747986,
-0.22445884346961975,
-0.052811138331890106,
0.2370283007621765,
0.15926483273506165,
-0.327125608921051,
-0.8231288194656372,
0.22671005129814148,
0.05792703106999397,
0.018233060836791992,
0.13769349455833435,
-0.043147459626197815,
0.07129423320293427,
0.10761900246143341,
0.13076037168502808,
0.7316983342170715,
-0.26217061281204224,
0.03275632858276367,
0.11875517666339874,
-0.2710314393043518,
0.2039644569158554,
-0.3837100863456726,
-0.15155650675296783,
-0.2649375796318054,
-0.32016146183013916,
0.11198434233665466,
-0.0957946926355362,
0.13241660594940186,
0.20092427730560303,
0.03613099083304405,
0.3776668906211853,
0.1361406445503235,
0.17201749980449677,
-0.10254272818565369,
0.3477342128753662,
-0.17445793747901917,
-0.34761902689933777,
-0.20734253525733948,
0.160763218998909,
-0.07858626544475555,
-0.3214171826839447,
-0.08657263964414597,
0.20290696620941162,
0.02223477140069008,
0.29041802883148193,
-0.026009269058704376,
-0.09642581641674042,
-0.14989502727985382,
0.221507266163826,
0.044349946081638336,
-0.5056830644607544,
-0.04008641093969345,
0.1227840781211853,
-0.09508240222930908,
0.05473065376281738,
0.0017345193773508072,
-0.06163059547543526,
-0.11070811003446579,
0.23448684811592102,
0.27357494831085205,
-0.38940030336380005,
0.4075908958911896,
-0.10074210166931152,
0.06626801937818527,
-0.24761927127838135,
0.1155337244272232,
-0.15732471644878387,
-0.2443433254957199,
0.03394734486937523,
0.6404515504837036,
-0.36080124974250793,
-0.32468000054359436,
0.0032769814133644104,
0.10388053953647614,
-0.16852284967899323,
0.17038176953792572,
0.07968034595251083,
0.2728174030780792,
0.6625620722770691,
0.03806716203689575,
-0.14824816584587097,
-0.14743593335151672,
-0.17918792366981506,
0.12082009762525558,
0.24979808926582336,
0.23003073036670685,
0.10128718614578247,
-0.4330173134803772,
-0.14380663633346558,
0.5213549733161926,
0.6927676200866699,
-0.28334325551986694,
0.015797141939401627,
-0.042985882610082626,
0.11644934117794037,
0.1876317858695984,
0.15662704408168793,
0.050374001264572144,
-0.26898595690727234,
-0.19993509352207184,
-0.16965773701667786,
0.25131955742836,
0.5593917369842529,
0.28383204340934753,
0.17076106369495392,
0.20518985390663147,
-0.06777732074260712,
-0.1626911610364914,
0.09622501581907272,
-0.3303784132003784,
-0.12779365479946136,
0.17590396106243134,
0.17200104892253876,
-0.04944716393947601,
0.08153919875621796,
-0.13585947453975677,
-0.09961889684200287,
0.06206294149160385,
0.02667904645204544,
0.12038511037826538,
-0.34922972321510315,
-0.08758440613746643,
0.10747815668582916,
-0.10050233453512192,
0.22343944013118744,
0.013403353281319141,
-0.3669135570526123,
-0.46140414476394653,
-0.3270053267478943,
-0.16139794886112213,
-0.18450534343719482,
-0.01248486340045929,
-0.13279137015342712,
0.1378082036972046,
-0.0892919972538948,
0.030142121016979218,
0.46328115463256836,
-0.1708069145679474,
-0.024012543261051178,
-0.22426092624664307,
0.1747293770313263,
0.31723085045814514,
-0.0870395302772522,
-0.014578805305063725,
0.12620319426059723,
0.4891754984855652,
0.06497989594936371,
0.24183017015457153,
-0.1193522959947586,
0.4259660243988037,
-0.07804778963327408,
0.34735265374183655,
0.29599541425704956,
0.04237829148769379,
-0.15101735293865204,
0.3205625116825104,
0.21347470581531525,
-0.20349596440792084,
-0.22779588401317596,
-0.2297123670578003,
-0.03859208524227142,
0.07921865582466125,
0.2797403037548065,
0.178190678358078,
0.4015696942806244,
-0.0740257203578949,
-0.16438567638397217,
0.23693549633026123,
-0.3229418396949768,
-0.26000162959098816,
0.2275305986404419,
0.05833476409316063,
-0.03613058850169182,
0.07909902185201645,
0.10915020108222961,
-0.10467945784330368,
0.35986578464508057,
0.18728969991207123,
0.2873421609401703,
0.38526302576065063,
0.1269731968641281,
-0.005775436758995056,
-0.4344441592693329,
-0.2876814305782318,
0.3755056858062744,
-0.2773877680301666,
0.17197418212890625,
-0.04586149752140045,
0.24549663066864014,
-0.1825581043958664,
-0.23810003697872162,
0.037276916205883026,
-0.1291355937719345,
-0.09893219918012619,
0.03454139083623886,
-0.3668557107448578,
-0.06678842008113861,
0.001952432096004486,
0.2752016484737396,
-0.2832667827606201,
0.2910879850387573,
0.006301626563072205,
-0.05294954776763916,
0.16477414965629578,
-0.03386741131544113,
0.12829947471618652,
0.047958895564079285,
0.2798592448234558,
-0.2318001389503479,
-0.03791980445384979,
-0.16382770240306854,
0.2665681838989258,
-0.11121438443660736,
0.4050593972206116,
0.4121369421482086,
0.3243473172187805,
-0.10474193096160889,
0.009375262074172497,
0.02493649534881115,
-0.16542354226112366,
-0.0752979964017868,
0.23148700594902039,
0.23877233266830444,
0.1834176480770111,
0.19203722476959229,
0.18670563399791718,
-0.1496257483959198,
0.30008649826049805,
-0.16682623326778412,
-0.18579256534576416,
-0.14499327540397644,
0.10102006047964096,
0.2490832805633545,
-0.47868600487709045,
0.053962454199790955,
0.0519416481256485,
-0.18209253251552582,
0.02266177348792553,
0.11184728145599365,
-0.1358940154314041,
-0.11755437403917313,
-0.0790107399225235,
0.1282569169998169,
0.03545107692480087,
0.5452753305435181,
0.2675609886646271,
0.4657337963581085,
-0.20288270711898804,
-0.10432175546884537,
-0.24611392617225647,
-0.25271469354629517,
-0.2893429398536682,
-0.10636059194803238,
0.07131020724773407,
0.236146941781044,
0.3820147216320038,
0.35002726316452026,
0.021712228655815125,
-0.39464443922042847,
-0.266239196062088,
0.18950803577899933,
-0.20308451354503632,
0.008028283715248108,
-0.007837548851966858,
0.11032343655824661,
-0.12936590611934662,
-0.5480444431304932,
0.24745532870292664,
0.11545948684215546,
-0.056488242000341415,
-0.1015927717089653,
0.13058620691299438,
0.3827891945838928,
0.09893788397312164,
0.048007555305957794,
-0.20869044959545135,
0.46725744009017944,
0.04838814586400986,
0.0008122455328702927,
-0.17140525579452515,
-0.18283964693546295,
-0.15325520932674408,
0.40148141980171204,
0.10017572343349457,
0.00047907233238220215,
-0.12131015956401825,
-0.20583166182041168,
0.16691386699676514,
0.11561383306980133,
-0.14141032099723816,
0.34325334429740906,
-0.20247399806976318,
-0.12274638563394547,
0.11537926644086838,
-0.03004704788327217,
0.15622764825820923,
0.057694438844919205,
-0.0015212371945381165,
-0.29321250319480896,
-0.2207629680633545,
-0.052179932594299316,
0.13762131333351135,
0.00387426745146513,
-0.13410229980945587,
-0.3366302251815796,
0.14189907908439636,
0.16842296719551086,
0.4290015697479248,
-0.22117668390274048,
-0.2517422139644623,
0.14098194241523743,
-0.053665854036808014,
0.15358461439609528,
0.5539892315864563,
0.17884409427642822,
0.05037406459450722,
-0.30125877261161804,
-0.017613470554351807,
-0.27378547191619873,
-0.32626086473464966,
-0.39533519744873047,
-0.4495755434036255
] |
https://github.com/huggingface/datasets/issues/4456 | Workflow for Tabular data | 20k can be a lot for a columnar format but maybe we can optimize a few things.
It would be cool to profile the code to see if there's an unoptimized part of the code that slows everything down.
(it's also possible to kill the job when it accesses the batch, it often gives you the traceback at the location where the code was running) | Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion ! | 65 | Workflow for Tabular data
Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion !
20k can be a lot for a columnar format but maybe we can optimize a few things.
It would be cool to profile the code to see if there's an unoptimized part of the code that slows everything down.
(it's also possible to kill the job when it accesses the batch, it often gives you the traceback at the location where the code was running) | [
-0.5319504141807556,
0.14949926733970642,
-0.1688041090965271,
-0.3950577974319458,
0.17301659286022186,
-0.11785034835338593,
0.41590750217437744,
0.6188486814498901,
0.23808684945106506,
0.14929921925067902,
-0.1270846724510193,
0.534894585609436,
-0.1121787503361702,
0.7199985384941101,
0.12136611342430115,
-0.027248136699199677,
-0.013329297304153442,
0.214802086353302,
-0.3778160810470581,
0.2048218995332718,
-0.15856564044952393,
-0.3386473059654236,
-0.10843876004219055,
-0.061754077672958374,
-0.24026040732860565,
-0.3623158037662506,
-0.19902974367141724,
0.045529842376708984,
-0.1405368149280548,
-0.010210065171122551,
-0.01854618825018406,
0.09621988981962204,
0.24241921305656433,
0.5062496662139893,
-0.00010372955875936896,
-0.1420716643333435,
0.16950580477714539,
0.12281565368175507,
-0.23156781494617462,
-0.12665624916553497,
0.14822685718536377,
-0.6421290040016174,
0.002262440975755453,
-0.22243458032608032,
-0.016765117645263672,
-0.3024890422821045,
0.11717294156551361,
-0.1374661773443222,
0.27585840225219727,
-0.0298207588493824,
0.1600317656993866,
0.040116775780916214,
-0.02504025585949421,
0.13257411122322083,
0.034841906279325485,
0.13269399106502533,
-0.3990846574306488,
0.07352781295776367,
0.3096175193786621,
-0.3980332314968109,
0.06002426892518997,
0.43588170409202576,
-0.13905824720859528,
0.11103922128677368,
0.3923081159591675,
-0.026427581906318665,
-0.40688982605934143,
-0.2335500419139862,
0.036631666123867035,
0.5714651346206665,
0.35773685574531555,
-0.3079393804073334,
-0.41530200839042664,
-0.33694222569465637,
0.03386412188410759,
-0.07022859156131744,
-0.1857607662677765,
0.39359042048454285,
-0.10870331525802612,
0.10912352800369263,
-0.238525390625,
-0.2883041203022003,
-0.1535649299621582,
-0.06986099481582642,
0.053437523543834686,
0.19461148977279663,
0.038932934403419495,
-0.09891723841428757,
0.2902454137802124,
-0.032365746796131134,
0.4049926996231079,
-0.21490421891212463,
0.38096103072166443,
0.12596723437309265,
-0.4490807056427002,
-0.11642412841320038,
-0.0485629066824913,
-0.16282278299331665,
0.04700516164302826,
0.0445755273103714,
0.21481983363628387,
0.2835155427455902,
-0.052709825336933136,
0.07355978339910507,
0.06922081112861633,
0.040954094380140305,
-0.06891491264104843,
0.19430160522460938,
0.29974934458732605,
-0.181228369474411,
-0.028864167630672455,
-0.09167654067277908,
-0.19221027195453644,
-0.14176931977272034,
-0.05658499151468277,
-0.02539130300283432,
0.03240589052438736,
0.04819580540060997,
-0.3106785714626312,
-0.31946513056755066,
0.07580743730068207,
-0.030216893181204796,
-0.05084714666008949,
0.3079686760902405,
-0.20785978436470032,
0.014657186344265938,
-0.16188842058181763,
0.16856026649475098,
0.1015082597732544,
-0.11907727271318436,
-0.042145777493715286,
0.06388567388057709,
-0.16466934978961945,
-0.005581758916378021,
0.18591941893100739,
-0.026783760637044907,
-0.1314631551504135,
0.2310951203107834,
-0.33932405710220337,
0.15392106771469116,
0.14654795825481415,
-0.19405287504196167,
0.1616915613412857,
0.08754798769950867,
0.23858243227005005,
-0.2383989691734314,
-0.21816514432430267,
0.18182221055030823,
-0.198009192943573,
0.32211750745773315,
-0.3638031482696533,
-0.3578493595123291,
-0.23309065401554108,
0.152914360165596,
0.051527515053749084,
-0.05414421111345291,
-0.43731966614723206,
0.3924119770526886,
0.04564560577273369,
0.06279085576534271,
-0.2625013291835785,
-0.0930970311164856,
-0.22012151777744293,
-0.18918776512145996,
0.16007615625858307,
0.08802053332328796,
-0.6121911406517029,
0.16743910312652588,
0.15086272358894348,
0.21931061148643494,
0.3827835023403168,
0.44266921281814575,
0.03753463923931122,
0.47026488184928894,
0.2711501121520996,
0.13877880573272705,
0.3215843737125397,
0.026717770844697952,
0.03918827325105667,
0.3791781961917877,
0.20505596697330475,
-0.06331590563058853,
0.17383266985416412,
0.09919729828834534,
0.12640920281410217,
-0.20434387028217316,
0.07905031740665436,
0.384843647480011,
-0.2281830608844757,
0.02321690507233143,
-0.2048347294330597,
-0.22099538147449493,
0.24708013236522675,
0.3050118088722229,
0.038877807557582855,
-0.04100476950407028,
0.1583089530467987,
-0.1489962935447693,
0.08734460920095444,
-0.40588244795799255,
-0.24846014380455017,
-0.24717943370342255,
0.28462454676628113,
0.11070243269205093,
0.011496571823954582,
-0.20768684148788452,
-0.3461301028728485,
-0.043920084834098816,
0.0591123104095459,
-0.0907263457775116,
0.3268943428993225,
-0.3136945366859436,
0.0946437269449234,
0.01685372181236744,
0.014817304909229279,
0.3612414598464966,
0.10017402470111847,
-0.23032864928245544,
-0.005732426419854164,
-0.20554080605506897,
-0.26194506883621216,
0.21195024251937866,
-0.6654055118560791,
0.021792147308588028,
-0.01197652705013752,
0.07357386499643326,
0.21448753774166107,
-0.14006832242012024,
0.26374974846839905,
0.4515332281589508,
-0.08230424672365189,
-0.0672011524438858,
0.15966078639030457,
0.2641792297363281,
0.10591735690832138,
0.18100783228874207,
-0.023055389523506165,
0.5848429799079895,
-0.045408278703689575,
0.5531935691833496,
0.12345510721206665,
-0.2843509912490845,
0.05181872844696045,
0.0243910551071167,
-0.5068804025650024,
0.4998290538787842,
-0.27596235275268555,
0.3913836181163788,
0.13147097826004028,
-0.046108901500701904,
0.15565380454063416,
-0.031128719449043274,
-0.0441947802901268,
0.4102981388568878,
0.11403263360261917,
-0.2150888890028,
-0.052428536117076874,
0.05364727973937988,
-0.47904786467552185,
0.24851447343826294,
0.4585212767124176,
-0.1406514048576355,
0.37139537930488586,
-0.06833232939243317,
0.07891445606946945,
-0.2891536355018616,
0.03688470274209976,
0.1792357861995697,
0.14588046073913574,
0.3513312339782715,
-0.046675924211740494,
0.010457021184265614,
-0.28613612055778503,
-0.12238171696662903,
0.1722555309534073,
0.2142375409603119,
0.1871356964111328,
0.10671865195035934,
-0.058953382074832916,
0.035870976746082306,
-0.006885591894388199,
-0.14054743945598602,
-0.09217506647109985,
0.2827756404876709,
-0.2771960198879242,
-0.01294528879225254,
-0.2565459609031677,
-0.3025951385498047,
-0.16439098119735718,
0.21791993081569672,
0.4357565939426422,
-0.2546444833278656,
0.15252673625946045,
0.039444711059331894,
-0.38583868741989136,
0.15243913233280182,
0.12436613440513611,
0.3160485625267029,
-0.30693772435188293,
0.31669169664382935,
-0.22876526415348053,
-0.18051639199256897,
-0.027860887348651886,
0.12677910923957825,
0.6038675308227539,
0.12287944555282593,
0.44585153460502625,
-0.06660987436771393,
0.11101143062114716,
-0.12251303344964981,
-0.2553649842739105,
-0.006205271929502487,
0.08453117311000824,
0.3272065222263336,
0.07676441967487335,
0.08235163241624832,
-0.2508111894130707,
-0.21624141931533813,
-0.05103986710309982,
-0.15027545392513275,
0.03394024819135666,
0.06946922093629837,
-0.2494169920682907,
-0.16480988264083862,
0.056183215230703354,
-0.42153045535087585,
-0.44796308875083923,
-0.4346919655799866,
0.12178301811218262,
-0.17047910392284393,
0.10323958843946457,
0.04378636181354523,
0.05781058594584465,
-0.17750327289104462,
0.05366143956780434,
-0.04295849800109863,
0.05858077108860016,
-0.06852015107870102,
0.3118554651737213,
-0.08951883018016815,
-0.2958909869194031,
-0.1271122395992279,
0.047723740339279175,
-0.13719919323921204,
0.3742195963859558,
-0.08353183418512344,
-0.17522089183330536,
-0.2314683049917221,
-0.1893632709980011,
-0.07753842324018478,
0.18973051011562347,
0.22010666131973267,
-0.07829775661230087,
-0.1266702115535736,
0.10049404948949814,
0.09665518999099731,
-0.11732327193021774,
0.04317846894264221,
-0.2725685238838196,
0.15120548009872437,
0.2749069035053253,
0.30168113112449646,
0.3205101191997528,
-0.004539471119642258,
-0.023752417415380478,
0.13749974966049194,
0.007832853123545647,
0.24094000458717346,
-0.2440316081047058,
-0.1352199912071228,
0.20587158203125,
-0.2253178358078003,
0.3061251640319824,
0.3117287755012512,
0.01021506916731596,
-0.37680527567863464,
-0.05210104584693909,
-0.19119960069656372,
-0.2871481776237488,
-0.09934401512145996,
0.7608639001846313,
-0.33820682764053345,
0.3051919639110565,
0.2044774740934372,
0.098866306245327,
-0.08691519498825073,
-0.21639251708984375,
0.07756887376308441,
-0.10070112347602844,
0.22336921095848083,
0.0684000626206398,
-0.27570074796676636,
-0.4686106741428375,
-0.30126985907554626,
0.2895472049713135,
0.07875370979309082,
0.2591226100921631,
0.09587924182415009,
-0.023770112544298172,
-0.011088550090789795,
0.06920468062162399,
0.25169116258621216,
-0.25810885429382324,
-0.311728298664093,
-0.15550175309181213,
-0.16933822631835938,
-0.16056233644485474,
-0.01531137339770794,
-0.2878410816192627,
0.047664303332567215,
-0.10489310324192047,
0.5361393094062805,
-0.16264283657073975,
-0.27533844113349915,
0.32641416788101196,
0.1929459422826767,
-0.013858351856470108,
-0.01694124937057495,
-0.17972144484519958,
-0.10340891033411026,
-0.25440195202827454,
0.2682792544364929,
0.057448871433734894,
-0.18524549901485443,
-0.16755087673664093,
-0.2364935725927353,
-0.2654314637184143,
0.1838138997554779,
0.26211124658584595,
0.13680315017700195,
0.010357975959777832,
0.03283575177192688,
0.34368881583213806,
0.0638136938214302,
0.20999988913536072,
0.21918559074401855,
-0.011346962302923203,
-0.20399107038974762,
-0.057554736733436584,
0.006782768294215202,
-0.19857318699359894,
0.4560004770755768,
0.1951410174369812,
0.19141340255737305,
-0.04374773055315018,
-0.12340719997882843,
0.1383928507566452,
-0.2702471911907196,
-0.07498184591531754,
0.29533663392066956,
0.19208656251430511,
-0.29509082436561584,
-0.8296999931335449,
0.15608596801757812,
0.06839032471179962,
-0.028143666684627533,
0.06676465272903442,
0.015448249876499176,
0.05794026702642441,
0.18172003328800201,
0.15324674546718597,
0.7955530285835266,
-0.21244217455387115,
-0.06356655061244965,
0.17741572856903076,
-0.4242037534713745,
0.3057551681995392,
-0.45290809869766235,
-0.15018123388290405,
-0.1747979074716568,
-0.30210503935813904,
0.03470867872238159,
-0.01625126600265503,
0.08107000589370728,
0.2135387361049652,
-0.014651741832494736,
0.4190845787525177,
0.18087489902973175,
0.15837305784225464,
-0.06887023150920868,
0.3780832588672638,
-0.2556750178337097,
-0.3558235168457031,
-0.23972320556640625,
0.1598430573940277,
-0.13468939065933228,
-0.3564119040966034,
-0.0670037791132927,
0.10610727965831757,
0.09188869595527649,
0.31153643131256104,
-0.08902949839830399,
-0.08147523552179337,
-0.14358268678188324,
0.15572509169578552,
-0.01718466356396675,
-0.48670172691345215,
0.025816533714532852,
0.13254602253437042,
0.08334067463874817,
0.13150720298290253,
-0.027339210733771324,
-0.03054489567875862,
-0.16721594333648682,
0.2470993995666504,
0.20926658809185028,
-0.4247075021266937,
0.4663776755332947,
-0.09233815968036652,
0.04907418042421341,
-0.24794304370880127,
0.19669632613658905,
-0.18862220644950867,
-0.23612801730632782,
0.016924917697906494,
0.6133472919464111,
-0.2757714092731476,
-0.2282600849866867,
0.04025480896234512,
-0.012077881023287773,
-0.23018306493759155,
0.1670176088809967,
0.055316075682640076,
0.24396483600139618,
0.736462414264679,
-0.03139851614832878,
-0.06974580883979797,
-0.1367449015378952,
-0.3232229948043823,
0.13536542654037476,
0.3053682744503021,
0.24867112934589386,
0.07501104474067688,
-0.4374518394470215,
-0.18231669068336487,
0.43350234627723694,
0.7202889323234558,
-0.2715567648410797,
0.004086698871105909,
-0.029100505635142326,
0.09550368785858154,
0.14062108099460602,
0.05040288344025612,
-0.048443444073200226,
-0.2785530090332031,
-0.28488320112228394,
-0.22982825338840485,
0.27642300724983215,
0.4980694651603699,
0.2981349527835846,
0.18389774858951569,
0.19655436277389526,
0.13590416312217712,
-0.19269783794879913,
0.13267086446285248,
-0.3370351791381836,
-0.20012174546718597,
0.06907624006271362,
0.20155063271522522,
0.07490204274654388,
0.10099981725215912,
-0.11651244014501572,
-0.09973102807998657,
0.028960218653082848,
0.03775373846292496,
0.1359964907169342,
-0.32927030324935913,
-0.15968254208564758,
0.08335690945386887,
-0.10959317535161972,
0.26704734563827515,
0.02677161991596222,
-0.31518667936325073,
-0.4269750416278839,
-0.3632297217845917,
-0.16742736101150513,
-0.18809369206428528,
-0.016403712332248688,
-0.014237962663173676,
0.1235833689570427,
-0.06088937073945999,
0.08464277535676956,
0.27695706486701965,
-0.13528504967689514,
0.027369655668735504,
-0.24876584112644196,
0.24662718176841736,
0.3540072739124298,
-0.03532886505126953,
0.06808830052614212,
0.08215583115816116,
0.46999025344848633,
0.0676201581954956,
0.22522839903831482,
-0.0007683075964450836,
0.33962681889533997,
-0.07961290329694748,
0.3382200598716736,
0.2749795913696289,
0.13473644852638245,
-0.16240647435188293,
0.4267430901527405,
0.21125489473342896,
-0.23069751262664795,
-0.15505646169185638,
-0.11615927517414093,
-0.1010526567697525,
0.13736295700073242,
0.31198346614837646,
0.12155185639858246,
0.47541218996047974,
-0.11094261705875397,
-0.1717340052127838,
0.19672900438308716,
-0.5116527676582336,
-0.2090994268655777,
0.2575698494911194,
0.042173612862825394,
-0.03999688848853111,
0.08013039827346802,
0.06298282742500305,
-0.0987916961312294,
0.4146829843521118,
0.2660118639469147,
0.27439144253730774,
0.42986994981765747,
0.08462366461753845,
0.15308645367622375,
-0.2384023517370224,
-0.36969515681266785,
0.2793123126029968,
-0.12984812259674072,
0.17185068130493164,
-0.02173139899969101,
0.17421531677246094,
-0.07773115485906601,
-0.24535328149795532,
0.11056720465421677,
0.0027128830552101135,
-0.16092026233673096,
0.11352011561393738,
-0.352072149515152,
-0.022193241864442825,
0.020186543464660645,
0.21329888701438904,
-0.11962659657001495,
0.2874945104122162,
0.06181202083826065,
-0.07662500441074371,
0.2133251130580902,
0.07246267795562744,
0.19733238220214844,
0.03401854261755943,
0.3374001383781433,
-0.26024484634399414,
-0.06141369789838791,
-0.12403321266174316,
0.19962359964847565,
-0.18905951082706451,
0.405282199382782,
0.4448273479938507,
0.25988948345184326,
-0.10264860093593597,
0.008783096447587013,
0.042712144553661346,
-0.1998831033706665,
-0.11771128326654434,
0.27284684777259827,
0.1286429762840271,
0.21511799097061157,
0.15747852623462677,
0.1745886504650116,
-0.1376500278711319,
0.23182521760463715,
-0.2132246047258377,
-0.188771590590477,
-0.13494890928268433,
0.14990198612213135,
0.4120311141014099,
-0.5451266765594482,
0.037343062460422516,
0.02663702517747879,
-0.09639783948659897,
-0.025187145918607712,
0.07774655520915985,
-0.12679331004619598,
-0.14743706583976746,
-0.15849266946315765,
0.1231362372636795,
0.09077039361000061,
0.546781599521637,
0.212423637509346,
0.4238816201686859,
-0.20656238496303558,
-0.05420149490237236,
-0.2957223057746887,
-0.27151235938072205,
-0.2528541684150696,
-0.18041299283504486,
0.0799349918961525,
0.11334456503391266,
0.34245532751083374,
0.3466395139694214,
0.03304659575223923,
-0.40856117010116577,
-0.22730004787445068,
0.21684783697128296,
-0.20031249523162842,
-0.10833302140235901,
0.06890086084604263,
-0.0018486715853214264,
-0.023093843832612038,
-0.5323479175567627,
0.2597394287586212,
0.15016043186187744,
-0.06111273169517517,
-0.01828347146511078,
0.24050119519233704,
0.29074931144714355,
-0.0002351813018321991,
0.06168831139802933,
-0.052570924162864685,
0.4294929802417755,
-0.06590257585048676,
0.060541167855262756,
-0.10729558765888214,
-0.08215855062007904,
-0.3230366110801697,
0.4064985513687134,
0.13439281284809113,
0.0681239515542984,
-0.10347789525985718,
-0.3065641224384308,
0.021211126819252968,
0.20493105053901672,
-0.15031304955482483,
0.33101633191108704,
-0.0686696320772171,
-0.03795112669467926,
-0.0009082071483135223,
0.03626060113310814,
0.1640649139881134,
0.0577993169426918,
0.018451597541570663,
-0.149433895945549,
-0.2029379904270172,
-0.17314261198043823,
0.07310862094163895,
0.018221862614154816,
-0.22923441231250763,
-0.2604142725467682,
0.08117512613534927,
0.27734312415122986,
0.3838726580142975,
-0.23869970440864563,
-0.24045240879058838,
0.0827099084854126,
-0.06831032037734985,
0.18697988986968994,
0.5597476959228516,
0.16847765445709229,
0.0591428317129612,
-0.23709550499916077,
0.049136340618133545,
-0.2162298858165741,
-0.3718879222869873,
-0.3323516249656677,
-0.4668562412261963
] |
https://github.com/huggingface/datasets/issues/4456 | Workflow for Tabular data | @wconnell I'm not sure what you mean by my secret, I load them into a numpy array 😁
An example dataset is [here](https://portal.gdc.cancer.gov/repository?facetTab=files&filters=%7B%22content%22%3A%5B%7B%22content%22%3A%7B%22field%22%3A%22cases.project.project_id%22%2C%22value%22%3A%5B%22TCGA-CESC%22%5D%7D%2C%22op%22%3A%22in%22%7D%2C%7B%22content%22%3A%7B%22field%22%3A%22files.data_category%22%2C%22value%22%3A%5B%22DNA%20Methylation%22%5D%7D%2C%22op%22%3A%22in%22%7D%5D%2C%22op%22%3A%22and%22%7D&searchTableTab=files) which is a dataset of DNA methylation reads. This dataset is about 950 rows and 450k columns. | Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion ! | 40 | Workflow for Tabular data
Tabular data are treated very differently than data for NLP, audio, vision, etc. and therefore the worflow for tabular data in `datasets` is not ideal.
For example for tabular data, it is common to use pandas/spark/dask to process the data, and then load the data into X and y (X is an array of features and y an array of labels), then train_test_split and finally feed the data to a machine learning model.
In `datasets` the workflow is different: we use load_dataset, then map, then train_test_split (if we only have a train split) and we end up with columnar dataset splits, not formatted as X and y.
Right now, it is already possible to convert a dataset from and to pandas, but there are still many things that could improve the workflow for tabular data:
- be able to load the data into X and y
- be able to load a dataset from the output of spark or dask (as far as I know it's usually csv or parquet files on S3/GCS/HDFS etc.)
- support "unsplit" datasets explicitly, instead of putting everything in "train" by default
cc @adrinjalali @merveenoyan feel free to complete/correct this :)
Feel free to also share ideas of APIs that would be super intuitive in your opinion !
@wconnell I'm not sure what you mean by my secret, I load them into a numpy array 😁
An example dataset is [here](https://portal.gdc.cancer.gov/repository?facetTab=files&filters=%7B%22content%22%3A%5B%7B%22content%22%3A%7B%22field%22%3A%22cases.project.project_id%22%2C%22value%22%3A%5B%22TCGA-CESC%22%5D%7D%2C%22op%22%3A%22in%22%7D%2C%7B%22content%22%3A%7B%22field%22%3A%22files.data_category%22%2C%22value%22%3A%5B%22DNA%20Methylation%22%5D%7D%2C%22op%22%3A%22in%22%7D%5D%2C%22op%22%3A%22and%22%7D&searchTableTab=files) which is a dataset of DNA methylation reads. This dataset is about 950 rows and 450k columns. | [
-0.29446810483932495,
0.201296865940094,
-0.2063637375831604,
-0.3129569888114929,
0.10777847468852997,
-0.022809673100709915,
0.347158819437027,
0.5121543407440186,
0.26903143525123596,
0.014075465500354767,
-0.25779950618743896,
0.644679605960846,
-0.018886268138885498,
0.667198121547699,
0.2239285409450531,
0.09363345801830292,
0.046825677156448364,
0.24709466099739075,
-0.3721402585506439,
0.1706288456916809,
-0.17921091616153717,
-0.3342493772506714,
-0.060275934636592865,
-0.012379743158817291,
-0.12952686846256256,
-0.33591991662979126,
-0.2415585070848465,
0.15456745028495789,
-0.18212521076202393,
-0.030057426542043686,
0.06858161091804504,
0.12404496967792511,
0.20786596834659576,
0.3910370171070099,
-0.00010141287930309772,
-0.08483635634183884,
0.09595818817615509,
0.056614950299263,
-0.23198752105236053,
-0.33115237951278687,
0.1358276605606079,
-0.5172191858291626,
0.07699830085039139,
-0.18689800798892975,
0.021646052598953247,
-0.28033584356307983,
0.05302877724170685,
-0.2499365359544754,
0.22481948137283325,
-0.09653926640748978,
0.16606517136096954,
0.05518501251935959,
0.04362766072154045,
0.03243933618068695,
-0.012477807700634003,
0.07503762096166611,
-0.3067215085029602,
0.03372025862336159,
0.1931440234184265,
-0.45901480317115784,
0.15478986501693726,
0.35363325476646423,
-0.19288894534111023,
0.11538857221603394,
0.4725368022918701,
-0.0669250637292862,
-0.4540436863899231,
-0.2756984829902649,
-0.15087071061134338,
0.5400623083114624,
0.3758374750614166,
-0.3463556468486786,
-0.44876834750175476,
-0.268159419298172,
0.1216769739985466,
0.0222735907882452,
-0.13286498188972473,
0.41518157720565796,
-0.10447092354297638,
0.15720956027507782,
-0.18853776156902313,
-0.32892173528671265,
-0.1712796986103058,
-0.008512042462825775,
-0.03915955126285553,
0.10805552452802658,
0.003406125819310546,
-0.08719091862440109,
0.30199405550956726,
0.003932656720280647,
0.5069257616996765,
-0.27159684896469116,
0.3801199495792389,
0.14224079251289368,
-0.4635251760482788,
-0.09643872082233429,
-0.019425086677074432,
-0.11504931002855301,
0.1306435763835907,
0.09416447579860687,
0.3568353056907654,
0.1757526397705078,
-0.26456961035728455,
0.17575694620609283,
0.09111270308494568,
-0.08799321949481964,
-0.007858134806156158,
0.28005871176719666,
0.16575588285923004,
-0.08881425857543945,
0.022461283951997757,
-0.10027451068162918,
-0.20623064041137695,
-0.12141379714012146,
-0.17548613250255585,
-0.014356382191181183,
0.1682462841272354,
0.019432153552770615,
-0.38501790165901184,
-0.3436252772808075,
0.03854852169752121,
0.014966282993555069,
-0.06888095289468765,
0.28452253341674805,
-0.2597407400608063,
0.09091883897781372,
-0.13094425201416016,
0.24813584983348846,
0.07932231575250626,
-0.1980597972869873,
-0.08389823138713837,
0.01728769578039646,
-0.09610259532928467,
0.06772854924201965,
0.16967988014221191,
-0.01669292524456978,
-0.12139424681663513,
0.16001781821250916,
-0.28049731254577637,
0.13503700494766235,
0.08855753391981125,
-0.15464916825294495,
0.2562236785888672,
0.11871694028377533,
0.38870227336883545,
-0.2395547330379486,
-0.11595602333545685,
0.09179230034351349,
-0.1467197835445404,
0.35655656456947327,
-0.418098509311676,
-0.19002878665924072,
-0.13175128400325775,
0.17812290787696838,
0.04783874750137329,
-0.17369282245635986,
-0.4077970087528229,
0.44539132714271545,
-0.00515776127576828,
-0.05433039367198944,
-0.30275121331214905,
0.034093599766492844,
-0.20108531415462494,
-0.2740997076034546,
0.1919984072446823,
0.12760300934314728,
-0.5686084628105164,
0.1809687614440918,
0.12703900039196014,
0.13029594719409943,
0.1306866556406021,
0.40823808312416077,
0.042826030403375626,
0.41851547360420227,
0.2568936347961426,
0.22496838867664337,
0.41772592067718506,
0.00534435361623764,
-0.037123143672943115,
0.28479841351509094,
0.250826358795166,
0.0653098002076149,
0.07379696518182755,
0.12785647809505463,
0.10417383164167404,
-0.14779312908649445,
0.07727213203907013,
0.5049721002578735,
-0.28553709387779236,
-0.01242920383810997,
-0.08898775279521942,
-0.2541787326335907,
0.3317546248435974,
0.2827067971229553,
-0.07070721685886383,
0.045855723321437836,
0.1888105273246765,
-0.17250432074069977,
0.2006291151046753,
-0.30564436316490173,
-0.2744223177433014,
-0.28298407793045044,
0.2812187075614929,
0.07771605998277664,
-0.07565982639789581,
-0.2634909749031067,
-0.4440110921859741,
-0.08091413974761963,
0.028956230729818344,
-0.14445185661315918,
0.1779058277606964,
-0.34463948011398315,
0.008254515007138252,
-0.03732873126864433,
-0.0852099061012268,
0.367312490940094,
0.15934626758098602,
-0.18875384330749512,
-0.065932497382164,
-0.1219346672296524,
-0.2522226572036743,
0.22262506186962128,
-0.5464029908180237,
0.10974033921957016,
-0.1630258858203888,
0.2696234881877899,
0.15394647419452667,
-0.08212441951036453,
0.159724622964859,
0.40279704332351685,
-0.15946072340011597,
-0.001966985175386071,
0.21274396777153015,
0.2955634295940399,
0.08445480465888977,
0.16746823489665985,
0.01765645667910576,
0.5473213791847229,
-0.00017409026622772217,
0.3549920916557312,
0.0852472186088562,
-0.1915886253118515,
0.12519758939743042,
0.09227722138166428,
-0.5696328282356262,
0.5036784410476685,
-0.3129561245441437,
0.2950996160507202,
0.18537674844264984,
-0.028361409902572632,
0.19194398820400238,
-0.0006844364106655121,
-0.0155107406899333,
0.3786795735359192,
-0.049048569053411484,
-0.09752459824085236,
-0.02305776998400688,
-0.052513860166072845,
-0.3772660195827484,
0.2637530267238617,
0.44629114866256714,
-0.07592889666557312,
0.3816053569316864,
-0.19670888781547546,
-0.021850936114788055,
-0.2520993649959564,
0.06423226743936539,
0.15064801275730133,
0.13370943069458008,
0.35322898626327515,
-0.07279691100120544,
0.03301360458135605,
-0.29344505071640015,
-0.10612889379262924,
0.129850834608078,
0.23071642220020294,
0.22223864495754242,
0.11441831290721893,
-0.047797586768865585,
0.043634139001369476,
-0.009019080549478531,
-0.039038076996803284,
-0.09852133691310883,
0.15232542157173157,
-0.31676262617111206,
0.0031856298446655273,
-0.30305206775665283,
-0.3551822900772095,
-0.07411756366491318,
0.21629270911216736,
0.4015977382659912,
-0.2747162878513336,
0.15470001101493835,
0.029229115694761276,
-0.2670317590236664,
0.08434876054525375,
0.16905353963375092,
0.29310697317123413,
-0.1919752061367035,
0.3335391879081726,
-0.24325862526893616,
-0.19572138786315918,
0.11989503353834152,
0.1697704792022705,
0.5717073082923889,
0.07490160316228867,
0.46717822551727295,
-0.0788896307349205,
0.13924549520015717,
-0.1898816078901291,
-0.29978129267692566,
0.014452993869781494,
0.1125049740076065,
0.35660815238952637,
-0.036313146352767944,
0.06450194120407104,
-0.23881816864013672,
-0.12409768253564835,
-0.01650426909327507,
-0.19030208885669708,
-0.03670462220907211,
0.044877246022224426,
-0.19708876311779022,
-0.07939319312572479,
0.07618032395839691,
-0.6114441752433777,
-0.5382516980171204,
-0.45400550961494446,
0.1964874416589737,
-0.11312519013881683,
0.06472214311361313,
0.06912790238857269,
0.11800150573253632,
-0.17857366800308228,
-0.02782331220805645,
-0.007303338497877121,
0.0038351528346538544,
-0.04851542413234711,
0.32667216658592224,
-0.15225137770175934,
-0.2540217638015747,
-0.10066226124763489,
0.0574067160487175,
-0.16168169677257538,
0.3813239336013794,
-0.11370210349559784,
-0.13824312388896942,
-0.07742144912481308,
-0.18132489919662476,
-0.04300203174352646,
0.18095426261425018,
0.1883232295513153,
-0.09181704372167587,
-0.11524045467376709,
-0.017503224313259125,
0.11022597551345825,
-0.15183144807815552,
0.1493224948644638,
-0.1805742383003235,
0.13263526558876038,
0.29422879219055176,
0.3475041687488556,
0.2510496973991394,
0.03447232022881508,
-0.03748833015561104,
0.2131754457950592,
-0.016111979261040688,
0.30051904916763306,
-0.14615356922149658,
-0.10041522979736328,
0.01787642575800419,
-0.2573571801185608,
0.4041935205459595,
0.24783889949321747,
0.04835394397377968,
-0.3473634421825409,
-0.08864647150039673,
-0.20974576473236084,
-0.3900073766708374,
-0.05333942547440529,
0.6006585955619812,
-0.34104520082473755,
0.23982471227645874,
0.2322397232055664,
0.0023988112807273865,
-0.016314920037984848,
-0.18866723775863647,
0.02805911749601364,
0.11958780139684677,
0.2779530882835388,
0.09811755269765854,
-0.3021773099899292,
-0.38917142152786255,
-0.14821019768714905,
0.3425023555755615,
0.07802764326334,
0.19747082889080048,
0.14545094966888428,
-0.14462538063526154,
-0.12847712635993958,
0.05152035877108574,
0.16093799471855164,
-0.26880723237991333,
-0.40946054458618164,
-0.1692436784505844,
-0.1335470974445343,
-0.15805919468402863,
0.054936688393354416,
-0.24454271793365479,
0.0943867564201355,
-0.2498389631509781,
0.5671912431716919,
-0.15760767459869385,
-0.20954236388206482,
0.21712422370910645,
0.2022443413734436,
0.0032823048532009125,
-0.037578973919153214,
-0.17625553905963898,
-0.11967259645462036,
-0.3095705509185791,
0.08903439342975616,
0.004451880231499672,
-0.16126754879951477,
-0.2023121863603592,
-0.32314789295196533,
-0.3021414279937744,
0.2039373815059662,
0.2713671326637268,
0.14644263684749603,
0.05289572849869728,
0.049970269203186035,
0.2484915554523468,
0.15343688428401947,
0.2640101909637451,
0.23998582363128662,
0.21500827372074127,
-0.2318008840084076,
-0.15908578038215637,
-0.038545574992895126,
-0.16529898345470428,
0.44714778661727905,
0.15750807523727417,
0.20217424631118774,
0.03550564497709274,
0.010945077985525131,
-0.07870562374591827,
-0.16660723090171814,
-0.019786233082413673,
0.17667190730571747,
0.10458603501319885,
-0.21361364424228668,
-0.9269631505012512,
0.2265864908695221,
0.013830550014972687,
-0.037568673491477966,
0.13510851562023163,
-0.058802902698516846,
0.028922781348228455,
0.07524172961711884,
0.04491884633898735,
0.7467142343521118,
-0.24574913084506989,
0.10399770736694336,
0.2191694974899292,
-0.4016156792640686,
0.3115804195404053,
-0.513525664806366,
-0.18927180767059326,
-0.23743268847465515,
-0.2871455252170563,
-0.03523174673318863,
-0.04156551510095596,
0.1329471468925476,
0.23682095110416412,
-0.05819959193468094,
0.4480513334274292,
0.19924263656139374,
0.2125283032655716,
0.04422725737094879,
0.2272510528564453,
-0.1881484091281891,
-0.2505953907966614,
-0.32173600792884827,
0.17902405560016632,
-0.09985019266605377,
-0.37535086274147034,
-0.06868980824947357,
0.07155707478523254,
0.04209676757454872,
0.35286980867385864,
0.10546325147151947,
-0.00809604674577713,
-0.23829776048660278,
0.17437705397605896,
0.07508090138435364,
-0.4242320656776428,
0.00807047076523304,
0.1087900921702385,
-0.04353924095630646,
0.12616881728172302,
-0.014504613354802132,
-0.07682304084300995,
-0.10486152023077011,
0.15845900774002075,
0.17732030153274536,
-0.34321272373199463,
0.5222700238227844,
-0.0017076171934604645,
0.000496596097946167,
-0.15264570713043213,
0.19765713810920715,
-0.2494582235813141,
-0.2810743749141693,
0.05722709000110626,
0.5785080194473267,
-0.2891964614391327,
-0.20157302916049957,
-0.02123744785785675,
0.009948927909135818,
-0.20551550388336182,
0.19921639561653137,
0.039463020861148834,
0.21252714097499847,
0.5917453169822693,
0.042769622057676315,
-0.10694903135299683,
-0.07410076260566711,
-0.21241164207458496,
0.04825248569250107,
0.2542494237422943,
0.13301467895507812,
-0.013479229062795639,
-0.3939272165298462,
-0.2156316339969635,
0.4279162287712097,
0.7265332937240601,
-0.11249066889286041,
-0.039568133652210236,
-0.0490926057100296,
0.15769203007221222,
0.1929304599761963,
0.030797503888607025,
-0.0026052184402942657,
-0.2522389888763428,
-0.26992982625961304,
-0.2890821099281311,
0.30454614758491516,
0.5967316627502441,
0.25511229038238525,
0.18715347349643707,
0.2653907537460327,
0.013231733813881874,
-0.20203445851802826,
0.13070879876613617,
-0.3589976131916046,
-0.15187449753284454,
0.07626591622829437,
0.18716628849506378,
0.03964933007955551,
0.10900723934173584,
-0.19135676324367523,
-0.09455060958862305,
0.09288118034601212,
-0.0256110280752182,
0.1033276692032814,
-0.36845967173576355,
-0.08518290519714355,
0.09067258983850479,
-0.03606535121798515,
0.21231690049171448,
-0.013728694058954716,
-0.3890454173088074,
-0.38301053643226624,
-0.30794742703437805,
-0.1399085521697998,
-0.3051566183567047,
0.05874627083539963,
0.00794235523790121,
0.1388479471206665,
-0.014835797250270844,
-0.04493941366672516,
0.3493179976940155,
-0.1713894009590149,
-0.017829813063144684,
-0.26731252670288086,
0.13629870116710663,
0.1916833072900772,
0.04185473173856735,
0.02429250068962574,
0.09298807382583618,
0.5844665765762329,
0.034834373742341995,
0.3554026782512665,
0.002242203801870346,
0.3842514753341675,
-0.11473482102155685,
0.3560815751552582,
0.2631765604019165,
0.06300337612628937,
-0.0010318029671907425,
0.3339979350566864,
0.2658436596393585,
-0.20528525114059448,
-0.10635664314031601,
0.0099062854424119,
-0.09479521214962006,
0.152365043759346,
0.29216501116752625,
0.14056600630283356,
0.4387184977531433,
-0.10931171476840973,
-0.18827679753303528,
0.20504499971866608,
-0.42690783739089966,
-0.14745785295963287,
0.28223085403442383,
0.039586033672094345,
-0.03906590864062309,
0.08082558959722519,
-0.030866272747516632,
-0.114703468978405,
0.5054402351379395,
0.17230288684368134,
0.18121832609176636,
0.326935738325119,
-0.008085038512945175,
0.2942957282066345,
-0.22480037808418274,
-0.40275055170059204,
0.202815443277359,
-0.14977741241455078,
0.12971793115139008,
-0.059601008892059326,
0.13503511250019073,
-0.044341929256916046,
-0.19391846656799316,
0.10663039237260818,
0.04672406613826752,
-0.091237373650074,
0.11840198934078217,
-0.385042279958725,
-0.09016146510839462,
0.029775351285934448,
0.04594351723790169,
-0.12901926040649414,
0.13001711666584015,
0.14876991510391235,
-0.05098940432071686,
0.17676594853401184,
0.02158695086836815,
0.24721184372901917,
0.17626449465751648,
0.28434842824935913,
-0.28908783197402954,
-0.061780184507369995,
-0.08890998363494873,
0.17527306079864502,
-0.1663353145122528,
0.35087430477142334,
0.38410484790802,
0.32285842299461365,
-0.14975805580615997,
-0.005357617512345314,
0.13397809863090515,
-0.2747343182563782,
-0.09464962780475616,
0.16055607795715332,
0.09856176376342773,
0.20258934795856476,
0.153757706284523,
0.22817037999629974,
-0.15537837147712708,
0.30743616819381714,
-0.17683045566082,
-0.0850508064031601,
-0.2264098823070526,
0.18258073925971985,
0.3124549388885498,
-0.4315015971660614,
0.11422277987003326,
0.05349100008606911,
-0.25350847840309143,
-0.005090489983558655,
0.22841455042362213,
-0.11725278198719025,
-0.07464093714952469,
-0.06651388108730316,
0.13412272930145264,
0.11115927994251251,
0.45762234926223755,
0.18338681757450104,
0.3753771185874939,
-0.15171974897384644,
-0.05209491774439812,
-0.33244097232818604,
-0.1817716360092163,
-0.10277196764945984,
-0.2546679675579071,
0.043586649000644684,
0.15616674721240997,
0.37041130661964417,
0.36589717864990234,
-0.11152267456054688,
-0.483072429895401,
-0.06469614058732986,
0.22439105808734894,
-0.21758732199668884,
-0.15347148478031158,
0.07984931766986847,
0.008083733730018139,
-0.047363266348838806,
-0.5273035764694214,
0.09142746031284332,
0.13718710839748383,
-0.03278505057096481,
-0.06833948940038681,
0.24427077174186707,
0.3368890881538391,
0.09494659304618835,
0.08498163521289825,
-0.1577000916004181,
0.48592716455459595,
-0.07325547933578491,
0.04236288368701935,
-0.07189305126667023,
-0.23393762111663818,
-0.33780694007873535,
0.44386640191078186,
0.01228349283337593,
0.04532121866941452,
-0.12622490525245667,
-0.25830692052841187,
0.05730680748820305,
0.06950491666793823,
-0.13861730694770813,
0.22608943283557892,
-0.10749159753322601,
0.014889156445860863,
0.013255834579467773,
0.0350676104426384,
0.09827093780040741,
0.10125887393951416,
-0.0015527382493019104,
-0.15213334560394287,
-0.13240230083465576,
-0.16005802154541016,
0.0856843814253807,
0.07988094538450241,
-0.19462421536445618,
-0.21516522765159607,
-0.028741255402565002,
0.18074041604995728,
0.3672386407852173,
-0.2788070738315582,
-0.2199246883392334,
0.21303358674049377,
-0.13997766375541687,
0.19750961661338806,
0.5711433291435242,
0.23600366711616516,
0.13093584775924683,
-0.3156414031982422,
-0.047832146286964417,
-0.13743653893470764,
-0.4272083342075348,
-0.28910255432128906,
-0.48299670219421387
] |
https://github.com/huggingface/datasets/issues/4453 | Dataset Viewer issue for Yaxin/SemEval2015 | I understand that the issue is that a remote file (URL) is being loaded as a local file. Right @albertvillanova @lhoestq?
```
Message: [Errno 2] No such file or directory: 'https://raw.githubusercontent.com/YaxinCui/ABSADataset/main/SemEval2015Task12Corrected/train/restaurants_train.xml'
``` | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 32 | Dataset Viewer issue for Yaxin/SemEval2015
### Link
_No response_
### Description
_No response_
### Owner
_No response_
I understand that the issue is that a remote file (URL) is being loaded as a local file. Right @albertvillanova @lhoestq?
```
Message: [Errno 2] No such file or directory: 'https://raw.githubusercontent.com/YaxinCui/ABSADataset/main/SemEval2015Task12Corrected/train/restaurants_train.xml'
``` | [
-0.36048176884651184,
-0.09973987191915512,
0.039635058492422104,
0.38937652111053467,
0.3074730634689331,
-0.012752644717693329,
0.36254897713661194,
0.40173691511154175,
0.19438962638378143,
0.19511646032333374,
-0.09984879195690155,
-0.13383282721042633,
-0.03990144282579422,
0.0072494689375162125,
-0.04092678055167198,
0.3974344730377197,
-0.01369599997997284,
0.08371897786855698,
0.042901646345853806,
-0.1494155377149582,
-0.24466155469417572,
0.01285395585000515,
0.11214306950569153,
0.4616355299949646,
-0.25560063123703003,
0.263681560754776,
0.004679867997765541,
0.2948387563228607,
-0.15329857170581818,
-0.5747779011726379,
0.32457512617111206,
0.010893434286117554,
0.15894095599651337,
0.29588639736175537,
-0.00011444211850175634,
0.2333144098520279,
0.2868994474411011,
-0.0006170626729726791,
-0.06413538753986359,
-0.2241264134645462,
-0.341535359621048,
-0.07364314794540405,
0.2653581500053406,
-0.09171230345964432,
-0.0037327855825424194,
-0.38444510102272034,
0.05280403420329094,
0.13335907459259033,
0.4361748695373535,
0.32698455452919006,
0.13721239566802979,
-0.41741251945495605,
-0.04851750284433365,
-0.13004867732524872,
0.157232403755188,
0.4467530846595764,
0.05753951519727707,
0.0927218645811081,
0.18594126403331757,
0.16303245723247528,
-0.2492028772830963,
0.14113003015518188,
0.12450242042541504,
0.07219953835010529,
0.16032320261001587,
-0.06812397390604019,
0.6446181535720825,
-0.13107869029045105,
0.30982348322868347,
0.032616809010505676,
0.7663761377334595,
-0.10449828952550888,
0.0157054141163826,
0.11638521403074265,
-0.1447151154279709,
-0.031178109347820282,
0.24367815256118774,
0.2897621691226959,
-0.25399067997932434,
0.25607019662857056,
0.010139500722289085,
-0.3874414563179016,
-0.3659669756889343,
0.10214526951313019,
-0.2654123306274414,
-0.03180196136236191,
0.06978397071361542,
0.23760679364204407,
-0.22920779883861542,
-0.3348778486251831,
0.4323561489582062,
0.12710246443748474,
-0.05764920637011528,
0.3333309590816498,
-0.2507098615169525,
0.005449477583169937,
0.0650029182434082,
-0.15157708525657654,
0.01618790626525879,
-0.11671195924282074,
-0.5540303587913513,
0.13775375485420227,
0.009399374015629292,
0.2124859094619751,
0.47307270765304565,
-0.07960957288742065,
-0.02230626344680786,
0.42502671480178833,
0.3888620138168335,
0.045352522283792496,
-0.07846413552761078,
-0.001220211386680603,
-0.35299116373062134,
-0.504307746887207,
-0.15803545713424683,
-0.05229104310274124,
0.32621854543685913,
-0.49504217505455017,
-0.06488744169473648,
0.14848493039608002,
-0.49273908138275146,
0.0678565502166748,
0.04693588241934776,
0.6026010513305664,
-0.23486602306365967,
-0.07425089925527573,
0.2327214628458023,
-0.005963686853647232,
-0.1867348700761795,
-0.12307608872652054,
-0.059362322092056274,
0.07249775528907776,
-0.216854065656662,
-0.14643822610378265,
0.1658240407705307,
-0.06122546270489693,
-0.12284328043460846,
0.025152534246444702,
-0.08088010549545288,
-0.22153781354427338,
0.2174956351518631,
0.10484050214290619,
-0.12462020665407181,
0.29240649938583374,
0.1931690126657486,
0.11921095103025436,
0.18113023042678833,
-0.4455539584159851,
0.06008761376142502,
0.3178520202636719,
-0.5373033285140991,
-0.5498579740524292,
0.09119457751512527,
0.18104930222034454,
-0.1683535873889923,
0.1598944514989853,
0.30583426356315613,
-0.03875343129038811,
-0.16792762279510498,
-0.30898404121398926,
-0.2415911853313446,
0.08569999039173126,
-0.11766017973423004,
-0.08369132876396179,
0.2586526572704315,
0.5380188226699829,
-0.5229644775390625,
-0.16035939753055573,
-0.2606889307498932,
-0.26647040247917175,
-0.23837924003601074,
0.13282272219657898,
-0.32016947865486145,
0.01757047325372696,
-0.27062395215034485,
0.1937093883752823,
0.5767982006072998,
-0.5065182447433472,
-0.3812218904495239,
0.5267934203147888,
-0.37051957845687866,
-0.13376858830451965,
0.13437974452972412,
0.08132607489824295,
0.18534281849861145,
-0.346274733543396,
-0.031708016991615295,
0.11583194881677628,
0.1959458738565445,
-0.1518167108297348,
-0.37619131803512573,
-0.07826848328113556,
0.024221358820796013,
0.19919949769973755,
0.3749192953109741,
0.06529302150011063,
0.568314254283905,
0.09950494766235352,
0.28364771604537964,
-0.17064136266708374,
0.32152917981147766,
0.20927847921848297,
0.5114330053329468,
0.3453594446182251,
0.03914601355791092,
0.40328845381736755,
0.03766157478094101,
0.09425563365221024,
-0.3704940676689148,
-0.18877319991588593,
-0.15828318893909454,
-0.1302223652601242,
-0.2078092098236084,
0.07805923372507095,
-0.5502473711967468,
-0.31459537148475647,
0.11537592113018036,
-0.012733496725559235,
-0.4097370207309723,
0.33953848481178284,
0.16325871646404266,
0.020286479964852333,
-0.021937066689133644,
-0.004538192413747311,
0.06163196265697479,
0.14389736950397491,
-0.12880952656269073,
0.1304490864276886,
-0.09474332630634308,
0.12742218375205994,
0.28272220492362976,
0.059373509138822556,
-0.23882967233657837,
0.2867013216018677,
0.08635858446359634,
0.3808560371398926,
0.3402301073074341,
-0.12364955246448517,
0.16102083027362823,
-0.11353130638599396,
0.2726980149745941,
-0.042080823332071304,
0.08297915756702423,
-0.07332125306129456,
-0.5786812901496887,
0.06950658559799194,
0.3021617829799652,
0.22375938296318054,
0.07261350750923157,
0.219917431473732,
0.3725520372390747,
0.00529816746711731,
-0.06929991394281387,
-0.18750035762786865,
0.18806655704975128,
-0.002827158197760582,
0.14632967114448547,
0.20906077325344086,
-0.37326210737228394,
-0.05852300673723221,
0.1357477754354477,
-0.09022991359233856,
0.13668960332870483,
0.25775840878486633,
-0.11805548518896103,
-0.07827485352754593,
0.09507152438163757,
0.36237162351608276,
0.12761253118515015,
0.009514505974948406,
-0.29940271377563477,
0.17925556004047394,
0.2062414139509201,
-0.10241284966468811,
0.14157575368881226,
0.01863856241106987,
0.09845362603664398,
0.3500708341598511,
-0.07994787395000458,
-0.12807804346084595,
-0.1523800492286682,
-0.2561655044555664,
0.026040730997920036,
0.2545878291130066,
-0.43703314661979675,
-0.22546017169952393,
-0.3333435356616974,
-0.1446501910686493,
-0.1443335860967636,
0.0947200134396553,
-0.008354157209396362,
-0.20076307654380798,
0.13754504919052124,
0.0756092369556427,
-0.07126505672931671,
0.08868391811847687,
-0.26056262850761414,
0.16311189532279968,
0.04256068170070648,
0.27197834849357605,
-0.09591718018054962,
-0.4174468517303467,
-0.15959370136260986,
0.012460853904485703,
0.3222440779209137,
0.18239189684391022,
-0.019809609279036522,
-0.07318893074989319,
0.34626173973083496,
-0.33834728598594666,
-0.15637114644050598,
0.19610881805419922,
0.10180528461933136,
0.17192453145980835,
-0.10115236043930054,
0.13821697235107422,
-0.10556440055370331,
0.05843091011047363,
0.4773738384246826,
0.2754884660243988,
-0.08888260275125504,
0.20088040828704834,
0.07263220101594925,
-0.05378425866365433,
-0.00381450355052948,
-0.34889841079711914,
-0.38042402267456055,
-0.4734219014644623,
0.1426437944173813,
0.21014948189258575,
0.15260115265846252,
-0.02777090296149254,
0.15796789526939392,
0.01241240557283163,
0.13911452889442444,
0.10759270191192627,
-0.13459299504756927,
-0.38544508814811707,
0.42275872826576233,
-0.4798104763031006,
-0.3647262454032898,
0.3983246982097626,
0.1893685758113861,
0.18522381782531738,
0.212589293718338,
-0.6689680218696594,
0.30204227566719055,
0.3508918881416321,
-0.12525297701358795,
0.12886066734790802,
-0.3756743371486664,
0.10337640345096588,
0.27113163471221924,
0.030762260779738426,
-0.010798178613185883,
0.1675877869129181,
0.14482542872428894,
-0.05910699814558029,
-0.05051358789205551,
0.025110282003879547,
0.606902539730072,
0.19558686017990112,
0.8040247559547424,
-0.09230130910873413,
0.32426923513412476,
0.2697296142578125,
-0.15250200033187866,
0.22086107730865479,
0.07339874655008316,
-0.23766247928142548,
0.24027356505393982,
0.10858459770679474,
-0.2008516788482666,
0.14742091298103333,
0.22740700840950012,
-0.0029134228825569153,
-0.24579951167106628,
-0.19774791598320007,
-0.18583202362060547,
-0.30730047821998596,
-0.05031657963991165,
-0.011577922850847244,
0.11356621980667114,
-0.08577148616313934,
-0.09111211448907852,
-0.1870070844888687,
-0.09904143214225769,
0.08937051892280579,
0.41535723209381104,
0.18046879768371582,
0.1291818916797638,
-0.07971750199794769,
-0.06545804440975189,
-0.1828896701335907,
0.27531522512435913,
-0.11737169325351715,
0.12722726166248322,
-0.3868890702724457,
-0.11219082027673721,
0.28816086053848267,
-0.02552223578095436,
0.6214365363121033,
-0.07792504131793976,
0.18786613643169403,
-0.04562278091907501,
-0.19048035144805908,
-0.48392078280448914,
-0.08560999482870102,
0.27654069662094116,
0.2114967256784439,
-0.2768390476703644,
0.10549449175596237,
0.003806889057159424,
-0.2570549249649048,
-0.027376506477594376,
-0.21552559733390808,
-0.45548370480537415,
-0.2509241998195648,
-0.16050027310848236,
0.18366491794586182,
-0.4980996251106262,
-0.321785569190979,
-0.17007648944854736,
0.06432835012674332,
0.27450868487358093,
-0.1444867104291916,
-0.09278709441423416,
0.23264965415000916,
-0.07588078081607819,
0.0758415162563324,
0.30564385652542114,
-0.2561433017253876,
0.10253514349460602,
0.2768981158733368,
0.5683233737945557,
0.33168086409568787,
0.36725276708602905,
0.08565552532672882,
-0.49925100803375244,
0.3209761381149292,
-0.42362913489341736,
0.0826721340417862,
0.14016349613666534,
-0.12331820279359818,
-0.20012962818145752,
0.27346518635749817,
0.05772046744823456,
-0.06736018508672714,
0.15755018591880798,
0.44588232040405273,
0.02793746069073677,
-0.24660497903823853,
-0.4231611490249634,
0.23166081309318542,
0.018341202288866043,
-0.1103266030550003,
0.15934370458126068,
-0.1332021802663803,
-0.10726244002580643,
-0.040486324578523636,
0.17434510588645935,
0.8210572004318237,
0.0407542958855629,
-0.10740472376346588,
0.3176644444465637,
0.33465850353240967,
-0.10233913362026215,
-0.8142474889755249,
0.12424641102552414,
-0.27153903245925903,
0.04118691384792328,
-0.15341618657112122,
-0.14709486067295074,
0.1005721241235733,
0.0976298451423645,
0.10717251896858215,
0.09854468703269958,
-0.026521623134613037,
-0.02693856880068779,
0.06929004937410355,
0.29485884308815,
0.04054379463195801,
-0.08634017407894135,
0.3105301856994629,
0.10009090602397919,
0.0482739619910717,
0.31834909319877625,
-0.18651673197746277,
-0.11811225116252899,
-0.21263127028942108,
-0.0248502679169178,
-0.06816604733467102,
0.16429883241653442,
0.3003946542739868,
0.4064550995826721,
-0.21646973490715027,
-0.26573413610458374,
0.03508177399635315,
0.3605189919471741,
-0.3113405704498291,
0.023162871599197388,
-0.2202472686767578,
0.32601869106292725,
-0.04934924840927124,
0.18105866014957428,
0.03323894739151001,
0.11407709866762161,
0.1833261400461197,
-0.2072262465953827,
-0.1591605544090271,
0.19837766885757446,
-0.1740972101688385,
-0.18044497072696686,
-0.24496179819107056,
0.02291865646839142,
0.1315390169620514,
-0.27521583437919617,
-0.12340974807739258,
-0.19213685393333435,
-0.13888363540172577,
0.008252285420894623,
0.0968131572008133,
0.019184444099664688,
-0.07479225099086761,
-0.1349104940891266,
0.030446888878941536,
-0.5124845504760742,
0.09080801904201508,
0.4127959907054901,
-0.020497672259807587,
-0.09767061471939087,
0.5407005548477173,
0.10444031655788422,
-0.12905743718147278,
-0.2108430564403534,
0.14163556694984436,
0.38396576046943665,
-0.5580212473869324,
-0.07999314367771149,
-0.10662836581468582,
0.051120609045028687,
0.016446972265839577,
0.07728859037160873,
0.08994108438491821,
-0.1017264798283577,
-0.1341412514448166,
-0.5609942078590393,
-0.19682905077934265,
0.1798764169216156,
-0.18601714074611664,
0.01067144051194191,
-0.23883512616157532,
0.05730312317609787,
0.23768693208694458,
-0.3422051668167114,
-0.25943952798843384,
-0.03829780966043472,
-0.10245618969202042,
0.15754690766334534,
-0.17565451562404633,
0.15677839517593384,
-0.03280758857727051,
-0.033118538558483124,
0.07457499206066132,
-0.1520605981349945,
-0.2230328470468521,
-0.11691659688949585,
0.0744929313659668,
0.15401259064674377,
0.08056184649467468,
-0.052287712693214417,
-0.30290231108665466,
-0.18272963166236877,
-0.06379570066928864,
0.11061027646064758,
-0.001206202432513237,
0.14843544363975525,
-0.30174708366394043,
-0.20677758753299713,
-0.37523701786994934,
-0.1417335867881775,
-0.2840571999549866,
0.2163093388080597,
0.24462838470935822,
0.2405126690864563,
-0.26481881737709045,
-0.0869218111038208,
-0.12943807244300842,
-0.09746409952640533,
-0.23190277814865112,
0.19314295053482056,
-0.05418926477432251,
0.06465145945549011,
0.42849481105804443,
-0.2674058675765991,
0.30681708455085754,
0.17646251618862152,
0.4839399755001068,
0.36060458421707153,
-0.28960108757019043,
0.10296543687582016,
0.37778839468955994,
0.1972900927066803,
-0.11517970263957977,
0.10681981593370438,
0.3712296485900879,
-0.34328171610832214,
-0.10817326605319977,
-0.15269315242767334,
-0.047442249953746796,
-0.16953334212303162,
0.44199705123901367,
0.3036735951900482,
0.32930272817611694,
-0.2799772620201111,
0.14107245206832886,
0.5877789258956909,
-0.4415140748023987,
0.33762267231941223,
0.16698035597801208,
0.36322686076164246,
0.23730626702308655,
0.7089501619338989,
-0.1997544765472412,
-0.2072446644306183,
-0.005001280456781387,
0.047713685780763626,
0.07687153667211533,
-0.6198658347129822,
0.28308191895484924,
0.058329083025455475,
-0.41272294521331787,
-0.21828266978263855,
0.08524345606565475,
0.40570205450057983,
0.20228834450244904,
-0.17812436819076538,
-0.20872531831264496,
0.2164899855852127,
-0.2908911406993866,
0.23697124421596527,
-0.34263262152671814,
-0.2996326684951782,
-0.288809597492218,
0.11012785136699677,
-0.00923314318060875,
-0.05958527326583862,
-0.5023322105407715,
0.26877886056900024,
-0.2529350519180298,
-0.05030421167612076,
0.17312738299369812,
-0.03019072115421295,
-0.1562507450580597,
-0.18533286452293396,
0.13440972566604614,
0.21695733070373535,
-0.12113012373447418,
0.3114537298679352,
-0.0039329323917627335,
0.25709930062294006,
0.4275617003440857,
-0.1449626386165619,
0.09775888174772263,
-0.040071286261081696,
-0.13788463175296783,
0.05547105520963669,
0.07244792580604553,
0.06640524417161942,
0.18083491921424866,
0.22972115874290466,
0.16101346909999847,
-0.11859337985515594,
0.4116126000881195,
-0.01423332467675209,
0.5729254484176636,
-0.09795595705509186,
-0.32574886083602905,
0.07203418016433716,
-0.19054976105690002,
-0.008965842425823212,
-0.31211116909980774,
-0.5324521660804749,
-0.06322454661130905,
0.23583346605300903,
-0.04076356068253517,
0.13116306066513062,
-0.5241835713386536,
0.03250285983085632,
0.005485024303197861,
0.16068042814731598,
0.21389250457286835,
0.003931879997253418,
-0.11924197524785995,
0.0038935989141464233,
-0.6692950129508972,
0.3764784336090088,
-0.18495504558086395,
-0.22803637385368347,
-0.059607960283756256,
0.03886330872774124,
-0.06680900603532791,
0.13627994060516357,
0.0939410850405693,
0.017649609595537186,
-0.15675155818462372,
0.1930103600025177,
0.09502415359020233,
0.11428171396255493,
0.36846673488616943,
0.4029071033000946,
-0.16597624123096466,
-0.15229898691177368,
0.33444997668266296,
-0.3715956211090088,
0.09933056682348251,
-0.029808152467012405,
-0.3421741724014282,
-0.13345982134342194,
-0.1656629890203476,
0.46793651580810547,
-0.03025984950363636,
0.24751393496990204,
0.08392685651779175,
0.19444692134857178,
-0.27891263365745544,
-0.2762109637260437,
0.03641049191355705,
0.09052327275276184,
0.13783985376358032,
0.09625232219696045,
-0.18875092267990112,
-0.09650182723999023,
-0.3661436438560486,
0.09640176594257355,
-0.37271732091903687,
0.06636033952236176,
0.04411906749010086,
-0.1292266696691513,
-0.1042020320892334,
0.21016263961791992,
0.14883524179458618,
-0.039777226746082306,
0.052179161459207535,
-0.03857750818133354,
-0.30226677656173706,
-0.06366465240716934,
0.31471723318099976,
-0.4110717177391052,
-0.07677893340587616,
-0.11325474083423615,
0.2716684341430664,
-0.019023366272449493,
0.06232482194900513,
0.15594738721847534,
0.061743415892124176,
0.26918089389801025,
0.11221065372228622,
-0.012190384790301323,
-0.19745036959648132,
0.05419573932886124,
0.029300469905138016,
-0.11783985793590546,
0.1882169544696808,
0.16732773184776306,
-0.03751223534345627,
0.12498439848423004,
-0.16809003055095673
] |
https://github.com/huggingface/datasets/issues/4453 | Dataset Viewer issue for Yaxin/SemEval2015 | `xml.dom.minidom.parse` is not supported in streaming mode. I opened a PR here to fix it:
https://huggingface.co/datasets/Yaxin/SemEval2015/discussions/1
Please review the PR @WithYouTo and let me know if it works ! | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 29 | Dataset Viewer issue for Yaxin/SemEval2015
### Link
_No response_
### Description
_No response_
### Owner
_No response_
`xml.dom.minidom.parse` is not supported in streaming mode. I opened a PR here to fix it:
https://huggingface.co/datasets/Yaxin/SemEval2015/discussions/1
Please review the PR @WithYouTo and let me know if it works ! | [
-0.6567187905311584,
-0.29029330611228943,
0.03281590715050697,
0.10222400724887848,
0.45500969886779785,
0.07929102331399918,
0.23468732833862305,
0.3523225486278534,
0.0021390244364738464,
0.07026992738246918,
-0.16250793635845184,
-0.05907224118709564,
-0.004859239794313908,
0.196241095662117,
-0.16581664979457855,
0.13417652249336243,
0.07000395655632019,
0.012879416346549988,
-0.11605942249298096,
-0.029148731380701065,
-0.13200955092906952,
-0.1577294021844864,
-0.18811342120170593,
0.21431270241737366,
-0.03693070635199547,
0.003803946077823639,
0.13928543031215668,
-0.062153615057468414,
-0.25902095437049866,
-0.42056044936180115,
0.15382802486419678,
-0.058445658534765244,
0.14860323071479797,
0.1282455027103424,
-0.00010400039900559932,
0.23095618188381195,
0.5372328758239746,
-0.012972920201718807,
-0.1447172611951828,
-0.06393085420131683,
-0.38193994760513306,
0.06699872761964798,
0.21612422168254852,
0.13667556643486023,
-0.14588817954063416,
-0.4412882924079895,
0.1451878845691681,
-0.09475789964199066,
0.3902244567871094,
0.16975858807563782,
0.24635016918182373,
-0.09086262434720993,
0.055170346051454544,
-0.08866652101278305,
0.11170048266649246,
0.3379661440849304,
-0.0668494924902916,
-0.06224599853157997,
0.2686882019042969,
0.286199688911438,
-0.05952083319425583,
0.3125866651535034,
0.053891852498054504,
0.17739054560661316,
0.10739924013614655,
-0.10325783491134644,
0.5813441276550293,
-0.25199320912361145,
0.32896411418914795,
0.20470720529556274,
0.8805915713310242,
-0.04383885860443115,
-0.05836872011423111,
0.030274853110313416,
-0.1748598963022232,
-0.3114815056324005,
-0.059448353946208954,
0.1259004771709442,
-0.23330441117286682,
0.10975711047649384,
0.03911600261926651,
-0.32079973816871643,
-0.1810549795627594,
-0.02327478677034378,
-0.10558360815048218,
0.31243079900741577,
0.08115754276514053,
0.09557817876338959,
-0.31333649158477783,
-0.4945189952850342,
0.6248754262924194,
0.053198423236608505,
-0.2077740728855133,
0.19024837017059326,
-0.3496097922325134,
-0.012502159923315048,
0.10373494029045105,
-0.07776326686143875,
0.17556828260421753,
-0.08574420213699341,
-0.2351025491952896,
0.3503541946411133,
0.2861909866333008,
0.11310449242591858,
0.4018716812133789,
-0.15620854496955872,
0.08865061402320862,
0.2096918225288391,
0.4340129494667053,
0.10446807742118835,
0.14806678891181946,
-0.01632370427250862,
-0.0680292472243309,
-0.24992018938064575,
-0.18065913021564484,
-0.06776326894760132,
0.28949689865112305,
-0.3293209671974182,
-0.2675894796848297,
0.025652851909399033,
-0.48848772048950195,
0.027115216478705406,
0.137317955493927,
0.44917207956314087,
-0.09624400734901428,
0.15036052465438843,
-0.005102701485157013,
0.16028696298599243,
-0.11795719712972641,
-0.2831927239894867,
-0.19468167424201965,
-0.09103235602378845,
-0.010450638830661774,
-0.2621510326862335,
0.18195419013500214,
-0.19796031713485718,
0.012295644730329514,
0.07164739072322845,
-0.0717172771692276,
-0.058928824961185455,
0.14652755856513977,
0.11720162630081177,
-0.19711074233055115,
0.2678612172603607,
0.2369166612625122,
0.04418053478002548,
0.18563058972358704,
-0.17115595936775208,
0.07304360717535019,
0.013807132840156555,
-0.11780295521020889,
-0.48690250515937805,
0.30890142917633057,
0.28163811564445496,
-0.06368459016084671,
0.06090821325778961,
0.19146063923835754,
0.1704639196395874,
-0.0668792650103569,
-0.18261292576789856,
-0.26775264739990234,
0.08605021238327026,
-0.15240155160427094,
0.04049357399344444,
0.272538423538208,
0.2842390835285187,
-0.4397794306278229,
-0.18559694290161133,
-0.20035609602928162,
-0.24039819836616516,
-0.01957276463508606,
-0.13229043781757355,
-0.07831186801195145,
-0.27599361538887024,
-0.028762977570295334,
0.25568050146102905,
0.3310253918170929,
-0.26705342531204224,
-0.39660438895225525,
0.387533962726593,
-0.10010454803705215,
-0.12623384594917297,
0.18960657715797424,
-0.03441586717963219,
0.4828028678894043,
-0.11071281880140305,
-0.07469883561134338,
0.29183369874954224,
0.03690801188349724,
0.006312066689133644,
-0.41031613945961,
-0.09226005524396896,
0.12493474781513214,
0.20894165337085724,
0.34213125705718994,
-0.13870179653167725,
0.43299174308776855,
0.3281380534172058,
0.3111693859100342,
-0.025151323527097702,
0.5015826225280762,
0.15093082189559937,
0.5175487399101257,
0.11714581400156021,
0.02654499188065529,
0.024076271802186966,
0.024869129061698914,
0.004163861274719238,
-0.10784220695495605,
-0.026378914713859558,
-0.06309346854686737,
-0.09160413593053818,
-0.19540312886238098,
0.028875963762402534,
-0.5422088503837585,
-0.4044659733772278,
0.2736400365829468,
0.11588583886623383,
-0.4012152850627899,
0.11269320547580719,
0.07867614924907684,
0.1438022255897522,
0.04468029737472534,
0.08317384123802185,
0.0432606115937233,
0.20586688816547394,
-0.20486555993556976,
-0.08105804771184921,
0.05548051744699478,
-0.06696630269289017,
0.29995283484458923,
0.01887647435069084,
-0.1853911280632019,
0.4002760648727417,
-0.011749526485800743,
0.3436068892478943,
0.09615578502416611,
-0.2155516892671585,
0.19106101989746094,
-0.43968328833580017,
0.1723213642835617,
0.08739915490150452,
0.0008098776452243328,
-0.04325811192393303,
-0.5193083882331848,
-0.07907822728157043,
0.3007427453994751,
0.24773293733596802,
0.08239085972309113,
0.29415711760520935,
0.44586095213890076,
0.17997650802135468,
-0.17347903549671173,
-0.29991427063941956,
0.2568853795528412,
-0.0742531269788742,
0.09994819760322571,
-0.09473912417888641,
-0.5669033527374268,
0.12169115245342255,
-0.0023072995245456696,
-0.03282904624938965,
0.22933167219161987,
0.08954386413097382,
-0.49930012226104736,
-0.1650218963623047,
0.27754536271095276,
0.08039940893650055,
-0.03904812037944794,
0.10473837703466415,
-0.03849933668971062,
0.14737649261951447,
0.16554857790470123,
-0.11684097349643707,
0.342120498418808,
-0.07871952652931213,
0.1345958262681961,
0.2164992094039917,
0.153465136885643,
-0.19464513659477234,
-0.3646950125694275,
0.12848810851573944,
0.14136309921741486,
0.22261136770248413,
-0.34745851159095764,
-0.3824113607406616,
-0.3620685935020447,
-0.08435335755348206,
0.1702469438314438,
-0.13432729244232178,
-0.09958721697330475,
-0.46288222074508667,
0.2183365374803543,
0.2655603885650635,
-0.07905671745538712,
0.35370391607284546,
-0.0991053581237793,
0.07479207217693329,
0.1402886062860489,
0.29081928730010986,
-0.3084580600261688,
-0.2626344859600067,
-0.07811295241117477,
0.1930171549320221,
0.12528075277805328,
0.26827841997146606,
-0.09488441050052643,
0.0222164336591959,
0.2026466280221939,
-0.39254218339920044,
-0.284890741109848,
0.3553769886493683,
-0.1329030990600586,
0.3609941899776459,
0.020464718341827393,
0.22163395583629608,
0.12929734587669373,
0.06482691317796707,
0.3169860541820526,
-0.02453080751001835,
-0.1282586008310318,
0.284493088722229,
0.04381082206964493,
-0.021969076246023178,
-0.08539830148220062,
-0.1809527575969696,
-0.3639475703239441,
-0.572852373123169,
0.0009558722376823425,
0.14924971759319305,
-0.08299030363559723,
-0.012149282731115818,
0.014507831074297428,
-0.11666864901781082,
0.22727279365062714,
0.0468892827630043,
-0.2527608573436737,
-0.23609662055969238,
0.5431779623031616,
-0.5185842514038086,
-0.3311121165752411,
0.459889680147171,
0.24139343202114105,
0.17433567345142365,
0.23063667118549347,
-0.27835115790367126,
0.3670802414417267,
0.2632930874824524,
-0.14588961005210876,
0.29535943269729614,
-0.3184244632720947,
0.10477258265018463,
0.3158033788204193,
-0.04501998424530029,
-0.16421563923358917,
0.15423905849456787,
-0.17250558733940125,
-0.024096641689538956,
0.1557750701904297,
-0.005789458751678467,
0.5061185359954834,
0.28226879239082336,
0.6556369066238403,
0.07339011132717133,
0.27251681685447693,
0.3552529513835907,
-0.07408881932497025,
0.19436047971248627,
0.04498577490448952,
-0.2146817445755005,
0.16132603585720062,
-0.14346304535865784,
0.016361042857170105,
0.06744661927223206,
0.043998412787914276,
-0.12823744118213654,
-0.18384025990962982,
0.0061845481395721436,
-0.07687846571207047,
-0.23813496530056,
-0.32289835810661316,
-0.13588248193264008,
0.19787979125976562,
0.02175932005047798,
0.20833751559257507,
-0.030287418514490128,
-0.1554642617702484,
0.024566330015659332,
0.1895306557416916,
0.09298425167798996,
0.1433972716331482,
0.3470792770385742,
0.18627992272377014,
-0.4215103089809418,
0.32707667350769043,
-0.2925615608692169,
0.13305026292800903,
-0.2624444365501404,
-0.19350573420524597,
0.18148019909858704,
-0.1164417415857315,
0.5391674041748047,
-0.40406739711761475,
0.22482796013355255,
0.006948679685592651,
0.011688284575939178,
-0.40880441665649414,
-0.014711074531078339,
-0.10181376338005066,
-0.08551018685102463,
-0.18183664977550507,
-0.006888046860694885,
-0.25319403409957886,
-0.1310434490442276,
0.004628580063581467,
-0.35523098707199097,
-0.25930285453796387,
0.0012045223265886307,
-0.15309591591358185,
0.16154935956001282,
-0.45949509739875793,
-0.13764259219169617,
-0.11024323105812073,
0.0782252624630928,
-0.0002979834098368883,
-0.09409058094024658,
-0.21097813546657562,
0.0754457339644432,
0.01416797935962677,
0.25612273812294006,
0.27244865894317627,
-0.09941384941339493,
0.20653969049453735,
0.22810986638069153,
0.3861102759838104,
0.432265967130661,
0.27901047468185425,
0.248638316988945,
-0.5026257634162903,
0.2832272946834564,
-0.275581419467926,
0.07506772875785828,
0.08101707696914673,
-0.17477542161941528,
-0.0808662697672844,
0.12196516990661621,
0.18896669149398804,
-0.020629163831472397,
0.13220149278640747,
0.5040812492370605,
0.04688413813710213,
-0.1627410352230072,
-0.31088703870773315,
0.3096981346607208,
0.08364789187908173,
-0.14686518907546997,
0.060583531856536865,
-0.2128819078207016,
-0.26738083362579346,
-0.10651007294654846,
0.308106005191803,
0.627841591835022,
0.2609631419181824,
-0.22008395195007324,
0.283112108707428,
0.11821991205215454,
-0.005993000231683254,
-0.5873128771781921,
0.17930443584918976,
-0.15658201277256012,
-0.21521081030368805,
-0.13495317101478577,
0.051928531378507614,
0.19355365633964539,
-0.0977969765663147,
-0.19278137385845184,
0.24015413224697113,
0.060269951820373535,
0.1202986091375351,
-0.04818695783615112,
0.1525617241859436,
-0.2507033348083496,
-0.06248333677649498,
0.1652713567018509,
0.2342441976070404,
-0.11816585063934326,
0.2069462537765503,
-0.03242592513561249,
-0.16745343804359436,
-0.009721018373966217,
-0.09479673951864243,
-0.2915058732032776,
0.24512484669685364,
0.36639469861984253,
0.27579253911972046,
-0.38812100887298584,
-0.2581440210342407,
0.18195189535617828,
0.11060357093811035,
-0.28410667181015015,
0.010035794228315353,
-0.3713441491127014,
0.32691001892089844,
0.10525591671466827,
0.16601033508777618,
-0.14018674194812775,
0.12153586745262146,
0.2154778689146042,
-0.2197660207748413,
-0.13771888613700867,
0.2534976303577423,
-0.155495747923851,
-0.0403774231672287,
-0.36105936765670776,
-0.19190959632396698,
-0.019715681672096252,
-0.23642392456531525,
0.03184405341744423,
-0.06872695684432983,
-0.1583097130060196,
-0.2702535092830658,
0.19880925118923187,
-0.1901726871728897,
-0.21856993436813354,
-0.06817672401666641,
-0.14424774050712585,
-0.07800251245498657,
-0.080412358045578,
0.34279927611351013,
-0.035758912563323975,
0.1579795479774475,
0.48968666791915894,
0.2662580609321594,
-0.2553888261318207,
-0.22248908877372742,
0.02153826504945755,
0.19497065246105194,
-0.1065092384815216,
-0.023063544183969498,
-0.07046116143465042,
-0.1178663894534111,
0.0816839411854744,
0.14283393323421478,
-0.15176592767238617,
-0.1430572271347046,
-0.30704355239868164,
-0.39779728651046753,
-0.3218032717704773,
0.2820408344268799,
-0.2871170938014984,
0.10998377203941345,
-0.31446507573127747,
0.2654525637626648,
0.246307373046875,
-0.19520063698291779,
-0.364731103181839,
-0.14873896539211273,
0.00035784579813480377,
0.05254027247428894,
-0.26433178782463074,
-0.009963072836399078,
-0.0676744133234024,
-0.029079994186758995,
0.16035066545009613,
0.13854822516441345,
-0.36669856309890747,
-0.17836779356002808,
0.09937703609466553,
0.10672517865896225,
0.22301241755485535,
-0.14862050116062164,
-0.17072369158267975,
0.06766034662723541,
-0.26866236329078674,
0.04030408710241318,
0.013481434434652328,
0.002315536141395569,
-0.22036950290203094,
-0.2618340849876404,
0.025385376065969467,
-0.09180647879838943,
-0.13697639107704163,
0.0737120658159256,
0.2033286988735199,
0.1577211618423462,
-0.24583131074905396,
0.024175966158509254,
0.04677503556013107,
-0.09543673694133759,
-0.10942240804433823,
0.16599580645561218,
0.20420342683792114,
-0.053107425570487976,
0.567328929901123,
-0.20181430876255035,
0.0595761276781559,
0.12917840480804443,
0.6094557046890259,
0.4203885495662689,
-0.010412761941552162,
0.030800966545939445,
0.17690664529800415,
0.29089298844337463,
-0.3221837282180786,
0.012163585983216763,
0.13468459248542786,
-0.13719195127487183,
0.0921783447265625,
-0.27657997608184814,
0.058186497539281845,
0.08079081773757935,
0.19359643757343292,
0.3642164170742035,
0.362130343914032,
-0.32707858085632324,
0.34231990575790405,
0.5837183594703674,
-0.3027946352958679,
0.2640368640422821,
0.23223379254341125,
0.2345878928899765,
0.16789919137954712,
0.5535138249397278,
-0.14706307649612427,
0.09174703806638718,
-0.1562821865081787,
0.013387322425842285,
0.02004055678844452,
-0.46939513087272644,
0.1645401120185852,
-0.01751820743083954,
-0.344359427690506,
0.13690577447414398,
0.029207084327936172,
0.24034544825553894,
0.11923795938491821,
-0.16679222881793976,
-0.3363727927207947,
0.3939515948295593,
-0.08297980576753616,
-0.0389062762260437,
-0.2643253207206726,
-0.2081904411315918,
-0.2507057189941406,
0.08859112858772278,
0.09497195482254028,
-0.07566456496715546,
-0.3218127489089966,
0.12885546684265137,
-0.07640877366065979,
-0.37877941131591797,
0.1106836199760437,
0.0025776810944080353,
0.06472794711589813,
-0.18067866563796997,
0.22558340430259705,
0.16173353791236877,
-0.1861783266067505,
0.18571032583713531,
0.0946037694811821,
0.27481982111930847,
0.23353524506092072,
-0.36774733662605286,
0.08912275731563568,
0.009021934121847153,
-0.282257616519928,
0.07741814106702805,
0.0742798000574112,
0.21579653024673462,
0.09351274371147156,
0.25438088178634644,
0.2134663462638855,
-0.209575355052948,
0.2013065665960312,
-0.06497111916542053,
0.4786294996738434,
0.007994016632437706,
-0.37766703963279724,
0.05476709455251694,
-0.03345733880996704,
0.05668586120009422,
-0.4614401161670685,
-0.495134562253952,
0.13534203171730042,
0.2738248407840729,
-0.11317447572946548,
0.0671907514333725,
-0.5166286826133728,
0.11843198537826538,
0.01634817011654377,
0.28326886892318726,
0.07049418240785599,
-0.13030090928077698,
0.04725392907857895,
-0.004766345024108887,
-0.6319911479949951,
0.20102599263191223,
-0.11544758081436157,
-0.16616274416446686,
-0.018775394186377525,
-0.004503272473812103,
0.2172512412071228,
0.11581746488809586,
0.040110595524311066,
0.09448563307523727,
-0.08328685164451599,
0.2681569457054138,
-0.038920942693948746,
0.06085573509335518,
0.21294276416301727,
0.254375696182251,
-0.057590365409851074,
-0.09363442659378052,
0.3806251585483551,
-0.1594507396221161,
0.20049318671226501,
0.02443084493279457,
-0.14749830961227417,
-0.009679315611720085,
-0.42932021617889404,
0.3990957736968994,
-0.017796454951167107,
0.08502917736768723,
-0.034571368247270584,
0.11675899475812912,
-0.2972049117088318,
-0.35620251297950745,
-0.09225916862487793,
0.04290071874856949,
0.1287803202867508,
0.2148476243019104,
0.04624128341674805,
-0.23434607684612274,
-0.31781479716300964,
0.03205186128616333,
-0.21902775764465332,
-0.024560287594795227,
-0.15624268352985382,
0.06315717101097107,
-0.18425968289375305,
0.1646837592124939,
0.008474818430840969,
-0.07263930886983871,
-0.09111130237579346,
-0.11796543747186661,
-0.35710620880126953,
-0.4733448922634125,
0.23081418871879578,
-0.18708491325378418,
-0.27964016795158386,
-0.30653634667396545,
0.06323134899139404,
0.17696630954742432,
0.03835563734173775,
-0.05409890413284302,
0.11779997497797012,
0.1727674901485443,
-0.008392173796892166,
0.0037370622158050537,
-0.1216033399105072,
0.2819059193134308,
-0.07568250596523285,
-0.22260555624961853,
0.1206161230802536,
0.32321426272392273,
0.015416013076901436,
0.1501360684633255,
-0.09151113778352737
] |
https://github.com/huggingface/datasets/issues/4452 | Trying to load FEVER dataset results in NonMatchingChecksumError | Thanks for reporting @santhnm2. We are fixing it.
Data owners updated their URLs recently. We have to align with them, otherwise you do not download anything (that is why ignore_verifications does not work). | ## Describe the bug
Trying to load the `fever` dataset fails with `datasets.utils.info_utils.NonMatchingChecksumError`.
I tried with `download_mode="force_redownload"` but that did not fix the error. I also tried with `ignore_verification=True` but then that raised a `json.decoder.JSONDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('fever', 'v1.0') # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', download_mode="force_redownload") # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', ignore_verification=True)` # Fails with JSONDecodeError
```
## Expected results
I expect this call to return with no error raised.
## Actual results
With `ignore_verification=False`:
```
*** datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://s3-eu-west-1.amazonaws.com/fever.public/train.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev_public.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_test.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_test.jsonl']
```
With `ignore_verification=True`:
```
*** json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.2.3.dev0
- Platform: Linux-4.15.0-50-generic-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 33 | Trying to load FEVER dataset results in NonMatchingChecksumError
## Describe the bug
Trying to load the `fever` dataset fails with `datasets.utils.info_utils.NonMatchingChecksumError`.
I tried with `download_mode="force_redownload"` but that did not fix the error. I also tried with `ignore_verification=True` but then that raised a `json.decoder.JSONDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('fever', 'v1.0') # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', download_mode="force_redownload") # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', ignore_verification=True)` # Fails with JSONDecodeError
```
## Expected results
I expect this call to return with no error raised.
## Actual results
With `ignore_verification=False`:
```
*** datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://s3-eu-west-1.amazonaws.com/fever.public/train.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev_public.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_test.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_test.jsonl']
```
With `ignore_verification=True`:
```
*** json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.2.3.dev0
- Platform: Linux-4.15.0-50-generic-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Thanks for reporting @santhnm2. We are fixing it.
Data owners updated their URLs recently. We have to align with them, otherwise you do not download anything (that is why ignore_verifications does not work). | [
0.055092860013246536,
0.07758583128452301,
-0.00831948034465313,
0.3154527544975281,
0.2888719439506531,
0.20612165331840515,
0.011998016387224197,
0.28212815523147583,
0.09228794276714325,
-0.005048893392086029,
-0.0823885053396225,
0.34708812832832336,
0.0801294595003128,
0.0386856347322464,
-0.37750527262687683,
0.2917598783969879,
0.058823127299547195,
0.21202239394187927,
0.25592041015625,
0.08276107907295227,
-0.31102192401885986,
0.24386849999427795,
-0.08651041984558105,
-0.09322740137577057,
0.015094984322786331,
0.2377551645040512,
0.18253231048583984,
0.1569347083568573,
-0.1207202598452568,
-0.5586887001991272,
0.4996066093444824,
0.032248035073280334,
0.2008797973394394,
0.46805375814437866,
-0.0001271782530238852,
0.1444958597421646,
0.4837310314178467,
-0.10401729494333267,
-0.25739654898643494,
-0.2590813636779785,
-0.6408226490020752,
-0.44542479515075684,
0.07050971686840057,
-0.0450262650847435,
-0.143964946269989,
-0.06355278939008713,
-0.06630735099315643,
-0.36478209495544434,
0.24369876086711884,
0.2583453357219696,
0.09827561676502228,
0.4349660575389862,
0.1616235226392746,
0.19166095554828644,
0.23034143447875977,
-0.03673167526721954,
-0.12848135828971863,
0.1038902997970581,
0.4716969430446625,
0.11807696521282196,
-0.0797218456864357,
0.17200671136379242,
-0.26243120431900024,
0.3307558298110962,
0.032305970788002014,
-0.1960943192243576,
0.2668060064315796,
-0.24665144085884094,
0.36030998826026917,
0.39236265420913696,
0.44874832034111023,
-0.2332105040550232,
-0.4341714084148407,
-0.12707284092903137,
-0.14807376265525818,
-0.15719552338123322,
0.402194082736969,
0.1285143345594406,
-0.0784483551979065,
0.08793608844280243,
-0.4906463921070099,
0.17793525755405426,
-0.03661854937672615,
0.049848806113004684,
0.19152793288230896,
0.05712275207042694,
-0.0025747762992978096,
0.012476570904254913,
0.12591855227947235,
-0.19946593046188354,
0.6203250885009766,
-0.4731203019618988,
-0.2664252817630768,
0.09073110669851303,
-0.5954519510269165,
-0.20285236835479736,
-0.1034003421664238,
0.25598204135894775,
0.4035072326660156,
0.27429327368736267,
0.039735499769449234,
0.06314486265182495,
-0.0031757382676005363,
0.1378556191921234,
0.28078457713127136,
0.003926597535610199,
0.1870761215686798,
0.062383562326431274,
0.03955090418457985,
0.2617432773113251,
0.06767226755619049,
0.12500722706317902,
0.10015921294689178,
-0.20033401250839233,
0.474046528339386,
0.1002892404794693,
0.1869899481534958,
-0.6138273477554321,
-0.34164342284202576,
0.3084028363227844,
-0.2857610881328583,
-0.04349295794963837,
-0.05564843490719795,
0.25651928782463074,
-0.23497146368026733,
0.30121225118637085,
0.034809865057468414,
0.1927977204322815,
-0.05636046081781387,
-0.28506869077682495,
-0.1675054430961609,
-0.1217820942401886,
0.0753883570432663,
0.021611925214529037,
0.2638889253139496,
-0.35888952016830444,
0.356179803609848,
0.17882037162780762,
-0.03088347613811493,
-0.2684951424598694,
0.4031934440135956,
-0.08077752590179443,
-0.08250243216753006,
0.25306227803230286,
0.07966050505638123,
0.19018320739269257,
0.20548027753829956,
-0.12651926279067993,
-0.02059882879257202,
0.21159356832504272,
-0.3847499191761017,
-0.24525371193885803,
-0.05785275250673294,
0.07843845337629318,
-0.6482194066047668,
-0.20162975788116455,
-0.12471028417348862,
-0.37962397933006287,
0.3106200695037842,
-0.2702520489692688,
-0.17641296982765198,
-0.2991640567779541,
0.08412250876426697,
-0.20008313655853271,
0.1162252202630043,
0.22398591041564941,
-0.2500552237033844,
-0.004249494522809982,
-0.16569308936595917,
-0.1878560334444046,
0.34970197081565857,
0.19229468703269958,
-0.15628044307231903,
-0.0415673553943634,
-0.26928043365478516,
-0.12264527380466461,
0.1546075940132141,
-0.48752516508102417,
-0.5998029112815857,
0.28364554047584534,
0.09865400195121765,
0.590198814868927,
0.13294662535190582,
-0.03453664109110832,
-0.2183612585067749,
-0.033247943967580795,
0.28823405504226685,
0.08607526123523712,
-0.06972653418779373,
0.08689698576927185,
-0.18993452191352844,
-0.4992433488368988,
0.4380776286125183,
0.32255038619041443,
-0.04030351713299751,
0.10193292051553726,
0.06953492015600204,
-0.11439526826143265,
0.30278077721595764,
-0.227645605802536,
-0.11073476076126099,
0.17164263129234314,
0.12456479668617249,
0.05573991686105728,
0.12375913560390472,
0.10379789024591446,
-0.6040160655975342,
0.36878615617752075,
-0.08568722754716873,
-0.13255275785923004,
-0.0020881295204162598,
-0.05415668338537216,
-0.13259035348892212,
-0.20790401101112366,
-0.39536887407302856,
-0.013666193932294846,
0.0340261235833168,
0.45217254757881165,
0.1741802990436554,
-0.07810509204864502,
-0.1735798418521881,
0.22350367903709412,
-0.20930901169776917,
0.07570318877696991,
-0.629215657711029,
0.2314382940530777,
0.10203342884778976,
0.015452366322278976,
0.13864323496818542,
0.04870016127824783,
0.10665209591388702,
-0.053350917994976044,
-0.20865711569786072,
0.24371075630187988,
0.41276243329048157,
0.17440344393253326,
-0.13464581966400146,
0.2051902413368225,
-0.18884718418121338,
-0.10351918637752533,
-0.24963346123695374,
0.6052866578102112,
0.12045685946941376,
-0.13194775581359863,
-0.039032943546772,
0.4673161506652832,
-0.004158522933721542,
0.3345080018043518,
-0.08969724178314209,
0.0010091383010149002,
0.4047529697418213,
-0.2142956405878067,
-0.33625122904777527,
-0.13417798280715942,
0.3852628469467163,
-0.13537302613258362,
-0.018160346895456314,
-0.0269047562032938,
-0.08158116787672043,
-0.15122681856155396,
0.3112088143825531,
-0.03589051216840744,
0.04976103454828262,
-0.017023004591464996,
-0.028249390423297882,
0.004570614546537399,
0.04726315289735794,
0.5770112872123718,
0.45432060956954956,
0.06340224295854568,
-0.1811283379793167,
0.0951334610581398,
-0.007803819142282009,
-0.033198967576026917,
0.03233295679092407,
0.12180265784263611,
0.22134898602962494,
0.6330013275146484,
0.19507014751434326,
-0.16469497978687286,
-0.3889191448688507,
-0.3240307867527008,
0.06898121535778046,
0.2615568935871124,
-0.5277560353279114,
-0.04310151934623718,
-0.33903053402900696,
0.07680846750736237,
-0.18990468978881836,
-0.30238330364227295,
-0.25423115491867065,
-0.3067402243614197,
-0.11386251449584961,
0.4238910377025604,
-0.041693028062582016,
0.16285882890224457,
-0.492058128118515,
-0.04120956361293793,
-0.21006491780281067,
-0.3444388508796692,
-0.022365998476743698,
0.05290733650326729,
-0.08789106458425522,
-0.060641877353191376,
0.33402112126350403,
-0.2912563979625702,
0.23631969094276428,
-0.43547627329826355,
0.012699885293841362,
-0.26224732398986816,
-0.1372184157371521,
0.04258541017770767,
-0.11196279525756836,
0.22125838696956635,
0.2594939172267914,
0.20268508791923523,
0.04257243126630783,
-0.15089073777198792,
0.2105618119239807,
0.09943564236164093,
-0.2519342601299286,
0.2191963493824005,
-0.01753779873251915,
0.0774734690785408,
0.13701730966567993,
-0.23447063565254211,
-0.12755009531974792,
-0.27315929532051086,
-0.11884672939777374,
0.08290815353393555,
0.11765506863594055,
0.10510735213756561,
-0.0868171751499176,
0.26966729760169983,
0.07063622027635574,
0.3259367346763611,
-0.1534179151058197,
-0.670734703540802,
0.4826107919216156,
0.01887519843876362,
-0.14108557999134064,
0.16762861609458923,
0.04148278385400772,
0.2375139594078064,
0.07485691457986832,
-0.553472638130188,
-0.07451769709587097,
-0.28338825702667236,
-0.22787366807460785,
-0.07562541961669922,
-0.05205882340669632,
0.2182523012161255,
0.19974127411842346,
0.05106224864721298,
-0.1396975815296173,
-0.3660846948623657,
-0.005625218152999878,
0.009120244532823563,
0.6090216040611267,
-0.06571008265018463,
0.33397728204727173,
-0.07734666764736176,
0.2963346838951111,
0.5736469030380249,
-0.05711028352379799,
0.18538783490657806,
0.09862939268350601,
0.2394046038389206,
0.024410095065832138,
-0.2287701666355133,
-0.353099524974823,
-0.14996638894081116,
0.15040236711502075,
0.08269933611154556,
-0.06460944563150406,
-0.04205228388309479,
-0.13616910576820374,
-0.1863757222890854,
-0.34404316544532776,
-0.1429017335176468,
-0.030010027810931206,
-0.17842578887939453,
0.11115182936191559,
0.08511057496070862,
0.3311430513858795,
-0.05998997017741203,
-0.2714669406414032,
-0.043722234666347504,
0.30419158935546875,
0.018887929618358612,
0.0017939172685146332,
-0.46467694640159607,
-0.26177462935447693,
-0.06486565619707108,
0.3869251012802124,
0.10320623964071274,
0.6360225677490234,
0.15576496720314026,
0.050737060606479645,
0.04502313584089279,
-0.27605122327804565,
0.38770896196365356,
-0.529143750667572,
0.494767963886261,
0.06130503490567207,
-0.18066608905792236,
-0.19969618320465088,
-0.1742275059223175,
-0.11677181720733643,
-0.0643998309969902,
0.09387931227684021,
0.3227182626724243,
-0.21668890118598938,
-0.057363949716091156,
-0.008423198014497757,
0.3617824912071228,
-0.1279611587524414,
-0.2871297299861908,
-0.3419356048107147,
-0.33245426416397095,
-0.4091149866580963,
-0.1582638919353485,
-0.11783544719219208,
0.25821205973625183,
-0.22200170159339905,
-0.09637999534606934,
-0.13571271300315857,
-0.06227236986160278,
0.40259891748428345,
0.1270134299993515,
0.2646006643772125,
0.03755992650985718,
0.2915676534175873,
0.13362115621566772,
0.01354735717177391,
0.3953385055065155,
0.828327476978302,
-0.0005370564758777618,
-0.6229301691055298,
0.05731964111328125,
-0.0770745649933815,
0.03594179451465607,
0.21478623151779175,
0.0032265568152070045,
-0.014354966580867767,
0.37693509459495544,
-0.15817686915397644,
-0.08433665335178375,
-0.27852627635002136,
0.33173057436943054,
-0.0680694729089737,
-0.35352277755737305,
-0.33346983790397644,
0.23896795511245728,
0.14593899250030518,
0.07100898027420044,
0.1338052749633789,
0.24311494827270508,
-0.13151104748249054,
0.32511550188064575,
0.24383676052093506,
0.9287355542182922,
0.27524614334106445,
0.062356628477573395,
0.0710081160068512,
-0.4137309789657593,
0.367278128862381,
-0.144586443901062,
0.17691436409950256,
-0.4252293109893799,
-0.2552100419998169,
-0.1132379099726677,
-0.272120863199234,
0.2879924178123474,
0.09695746004581451,
-0.02135811373591423,
0.386681467294693,
-0.12873230874538422,
0.11643081903457642,
0.11870887875556946,
0.12536582350730896,
-0.21648316085338593,
-0.025978028774261475,
-0.3102695047855377,
0.07248120754957199,
-0.1389530748128891,
0.216398224234581,
-0.04232010990381241,
-0.16363997757434845,
-0.1549074351787567,
-0.2522647976875305,
-0.27765780687332153,
0.3201697766780853,
0.02760157361626625,
0.2175113409757614,
0.18277472257614136,
-0.021315790712833405,
0.07794715464115143,
0.17506767809391022,
0.3752182722091675,
0.11750896275043488,
-0.30447763204574585,
-0.0415806882083416,
0.48367929458618164,
0.14305290579795837,
0.13069801032543182,
-0.11236298084259033,
0.20593421161174774,
-0.08690312504768372,
-0.16561266779899597,
0.1221979558467865,
-0.03230154514312744,
-0.45929914712905884,
0.08967483043670654,
-0.142584890127182,
-0.20049317181110382,
-0.46625930070877075,
-0.19831839203834534,
-0.12142284214496613,
0.1414983868598938,
-0.20362050831317902,
0.08999413251876831,
0.24311526119709015,
-0.30996033549308777,
0.28945252299308777,
-0.05536091700196266,
-0.28900033235549927,
-0.13984762132167816,
0.6321603059768677,
0.21065425872802734,
-0.17549476027488708,
0.48012498021125793,
0.10129892826080322,
-0.20899999141693115,
-0.13346852362155914,
0.23080754280090332,
0.3195473551750183,
-0.3296949863433838,
0.015202274546027184,
-0.10495476424694061,
0.07948125898838043,
-0.054114822298288345,
0.3323748707771301,
0.2820037603378296,
0.037258297204971313,
0.22172696888446808,
-0.5956917405128479,
-0.062380388379096985,
0.0741240605711937,
0.221056267619133,
0.3517460525035858,
-0.1484275609254837,
-0.16146957874298096,
-0.18591757118701935,
-0.13941845297813416,
-0.20120707154273987,
0.06237249821424484,
-0.32596978545188904,
0.013658592477440834,
-0.09501206129789352,
0.1725718230009079,
0.1475459486246109,
0.03336383029818535,
0.05184406042098999,
0.13200631737709045,
-0.19648049771785736,
-0.08695146441459656,
-0.15039336681365967,
0.2132396250963211,
0.2992708683013916,
-0.08577125519514084,
0.00575617142021656,
-0.14100760221481323,
-0.1521284133195877,
-0.06593268364667892,
-0.003833649680018425,
0.20969915390014648,
0.0011298134922981262,
0.3159479796886444,
0.0693693682551384,
-0.12243377417325974,
-0.08143503963947296,
-0.09057383239269257,
-0.17799636721611023,
0.09190645813941956,
-0.04343072324991226,
0.07417479157447815,
-0.005865144543349743,
0.05527098476886749,
0.14891251921653748,
0.09375008940696716,
0.10302198678255081,
0.0992647334933281,
0.3164149522781372,
-0.4874528646469116,
0.07329748570919037,
0.1940099149942398,
0.15257057547569275,
0.593187689781189,
-0.41738516092300415,
0.003565499559044838,
0.14541620016098022,
0.14175862073898315,
-0.2140350192785263,
-0.2840854525566101,
0.23462894558906555,
-0.059737734496593475,
-0.063299760222435,
0.15219707787036896,
-0.08929966390132904,
-0.2936754822731018,
0.36599862575531006,
0.03289911895990372,
0.380129337310791,
-0.3980720043182373,
0.25428617000579834,
0.4787040650844574,
-0.12642599642276764,
-0.14683076739311218,
0.030965570360422134,
-0.04038486257195473,
0.09329406172037125,
0.031407635658979416,
-0.006307430565357208,
0.2403615564107895,
-0.08209125697612762,
0.2336348295211792,
-0.3423771560192108,
-0.34568122029304504,
0.30379143357276917,
0.41141021251678467,
0.03640510141849518,
0.24760618805885315,
0.215452179312706,
-0.030039623379707336,
-0.1374378502368927,
0.20808756351470947,
-0.5627201795578003,
-0.11621527373790741,
-0.06097564101219177,
-0.05799024924635887,
0.02983996272087097,
-0.2719523012638092,
-0.14685368537902832,
0.17912578582763672,
-0.08949640393257141,
0.10313640534877777,
-0.021153829991817474,
0.004713796079158783,
-0.1954110711812973,
-0.3767836391925812,
-0.07922900468111038,
0.2616947591304779,
-0.04917731136083603,
-0.31190237402915955,
0.17807598412036896,
0.283170610666275,
-0.055722177028656006,
0.21428044140338898,
0.2922825217247009,
0.42259371280670166,
0.3048306405544281,
-0.013811904937028885,
-0.063855841755867,
-0.09384460747241974,
-0.08303701132535934,
0.12471042573451996,
0.8237307071685791,
-0.09006200730800629,
-0.39199453592300415,
0.44882434606552124,
0.07991674542427063,
-0.09052876383066177,
-0.10727721452713013,
-0.25118422508239746,
-0.2342129647731781,
-0.12466157972812653,
0.7563708424568176,
0.024052325636148453,
0.18986114859580994,
0.020002875477075577,
-0.028698205947875977,
-0.39911511540412903,
-0.38674965500831604,
0.1785559058189392,
0.09394893795251846,
0.09198662638664246,
0.0312579907476902,
0.03846266493201256,
-0.24220168590545654,
0.26461970806121826,
0.2592434585094452,
-0.08676130324602127,
-0.2864265739917755,
-0.0903618261218071,
-0.6156070232391357,
0.17473024129867554,
-0.11322526633739471,
-0.12799042463302612,
0.08925826102495193,
0.0636293888092041,
0.015277363359928131,
0.2777794301509857,
0.05633486062288284,
0.052677493542432785,
-0.07951901853084564,
0.15024271607398987,
-0.023398881778120995,
-0.20922210812568665,
0.33366531133651733,
-0.08294905722141266,
-0.11782180517911911,
-0.2734711170196533,
0.2439674288034439,
0.060431141406297684,
-0.00845109298825264,
-0.03954407945275307,
-0.049418047070503235,
0.019010141491889954,
-0.05887041985988617,
0.14542528986930847,
0.24110615253448486,
0.6805782318115234,
-0.07902514934539795,
-0.1766977310180664,
-0.16322951018810272,
-0.13714806735515594,
-0.1732845902442932,
0.38532111048698425,
0.11712099611759186,
0.49849918484687805,
-0.14891497790813446,
0.038069743663072586,
-0.2960042953491211,
0.11329948902130127,
-0.10498395562171936,
-0.19016200304031372,
-0.1999819129705429,
0.2622809410095215,
-0.152382493019104,
0.28912585973739624,
-0.13434089720249176,
-0.029534950852394104,
0.17153844237327576,
0.5189557075500488,
-0.2559897005558014,
-0.19903142750263214,
0.5218873023986816,
-0.2198820263147354,
-0.18338245153427124,
-0.06743425875902176,
0.2956903874874115,
-0.21493783593177795,
-0.2087545394897461,
-0.4680781364440918,
0.14401322603225708,
0.31629157066345215,
0.12030589580535889,
-0.25572335720062256,
0.24688756465911865,
-0.23209747672080994,
0.14049746096134186,
0.00632583349943161,
0.22050422430038452,
0.23150774836540222,
-0.07280021160840988,
0.0960015058517456,
-0.16835813224315643
] |
https://github.com/huggingface/datasets/issues/4452 | Trying to load FEVER dataset results in NonMatchingChecksumError | Hello! Is there any update on this? I am having the same issue 6 months later. | ## Describe the bug
Trying to load the `fever` dataset fails with `datasets.utils.info_utils.NonMatchingChecksumError`.
I tried with `download_mode="force_redownload"` but that did not fix the error. I also tried with `ignore_verification=True` but then that raised a `json.decoder.JSONDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('fever', 'v1.0') # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', download_mode="force_redownload") # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', ignore_verification=True)` # Fails with JSONDecodeError
```
## Expected results
I expect this call to return with no error raised.
## Actual results
With `ignore_verification=False`:
```
*** datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://s3-eu-west-1.amazonaws.com/fever.public/train.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev_public.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_test.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_test.jsonl']
```
With `ignore_verification=True`:
```
*** json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.2.3.dev0
- Platform: Linux-4.15.0-50-generic-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 16 | Trying to load FEVER dataset results in NonMatchingChecksumError
## Describe the bug
Trying to load the `fever` dataset fails with `datasets.utils.info_utils.NonMatchingChecksumError`.
I tried with `download_mode="force_redownload"` but that did not fix the error. I also tried with `ignore_verification=True` but then that raised a `json.decoder.JSONDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset('fever', 'v1.0') # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', download_mode="force_redownload") # Fails with NonMatchingChecksumError
dataset = load_dataset('fever', 'v1.0', ignore_verification=True)` # Fails with JSONDecodeError
```
## Expected results
I expect this call to return with no error raised.
## Actual results
With `ignore_verification=False`:
```
*** datasets.utils.info_utils.NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://s3-eu-west-1.amazonaws.com/fever.public/train.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_dev_public.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/shared_task_test.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_dev.jsonl', 'https://s3-eu-west-1.amazonaws.com/fever.public/paper_test.jsonl']
```
With `ignore_verification=True`:
```
*** json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.2.3.dev0
- Platform: Linux-4.15.0-50-generic-x86_64-with-glibc2.10
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Hello! Is there any update on this? I am having the same issue 6 months later. | [
0.055092860013246536,
0.07758583128452301,
-0.00831948034465313,
0.3154527544975281,
0.2888719439506531,
0.20612165331840515,
0.011998016387224197,
0.28212815523147583,
0.09228794276714325,
-0.005048893392086029,
-0.0823885053396225,
0.34708812832832336,
0.0801294595003128,
0.0386856347322464,
-0.37750527262687683,
0.2917598783969879,
0.058823127299547195,
0.21202239394187927,
0.25592041015625,
0.08276107907295227,
-0.31102192401885986,
0.24386849999427795,
-0.08651041984558105,
-0.09322740137577057,
0.015094984322786331,
0.2377551645040512,
0.18253231048583984,
0.1569347083568573,
-0.1207202598452568,
-0.5586887001991272,
0.4996066093444824,
0.032248035073280334,
0.2008797973394394,
0.46805375814437866,
-0.0001271782530238852,
0.1444958597421646,
0.4837310314178467,
-0.10401729494333267,
-0.25739654898643494,
-0.2590813636779785,
-0.6408226490020752,
-0.44542479515075684,
0.07050971686840057,
-0.0450262650847435,
-0.143964946269989,
-0.06355278939008713,
-0.06630735099315643,
-0.36478209495544434,
0.24369876086711884,
0.2583453357219696,
0.09827561676502228,
0.4349660575389862,
0.1616235226392746,
0.19166095554828644,
0.23034143447875977,
-0.03673167526721954,
-0.12848135828971863,
0.1038902997970581,
0.4716969430446625,
0.11807696521282196,
-0.0797218456864357,
0.17200671136379242,
-0.26243120431900024,
0.3307558298110962,
0.032305970788002014,
-0.1960943192243576,
0.2668060064315796,
-0.24665144085884094,
0.36030998826026917,
0.39236265420913696,
0.44874832034111023,
-0.2332105040550232,
-0.4341714084148407,
-0.12707284092903137,
-0.14807376265525818,
-0.15719552338123322,
0.402194082736969,
0.1285143345594406,
-0.0784483551979065,
0.08793608844280243,
-0.4906463921070099,
0.17793525755405426,
-0.03661854937672615,
0.049848806113004684,
0.19152793288230896,
0.05712275207042694,
-0.0025747762992978096,
0.012476570904254913,
0.12591855227947235,
-0.19946593046188354,
0.6203250885009766,
-0.4731203019618988,
-0.2664252817630768,
0.09073110669851303,
-0.5954519510269165,
-0.20285236835479736,
-0.1034003421664238,
0.25598204135894775,
0.4035072326660156,
0.27429327368736267,
0.039735499769449234,
0.06314486265182495,
-0.0031757382676005363,
0.1378556191921234,
0.28078457713127136,
0.003926597535610199,
0.1870761215686798,
0.062383562326431274,
0.03955090418457985,
0.2617432773113251,
0.06767226755619049,
0.12500722706317902,
0.10015921294689178,
-0.20033401250839233,
0.474046528339386,
0.1002892404794693,
0.1869899481534958,
-0.6138273477554321,
-0.34164342284202576,
0.3084028363227844,
-0.2857610881328583,
-0.04349295794963837,
-0.05564843490719795,
0.25651928782463074,
-0.23497146368026733,
0.30121225118637085,
0.034809865057468414,
0.1927977204322815,
-0.05636046081781387,
-0.28506869077682495,
-0.1675054430961609,
-0.1217820942401886,
0.0753883570432663,
0.021611925214529037,
0.2638889253139496,
-0.35888952016830444,
0.356179803609848,
0.17882037162780762,
-0.03088347613811493,
-0.2684951424598694,
0.4031934440135956,
-0.08077752590179443,
-0.08250243216753006,
0.25306227803230286,
0.07966050505638123,
0.19018320739269257,
0.20548027753829956,
-0.12651926279067993,
-0.02059882879257202,
0.21159356832504272,
-0.3847499191761017,
-0.24525371193885803,
-0.05785275250673294,
0.07843845337629318,
-0.6482194066047668,
-0.20162975788116455,
-0.12471028417348862,
-0.37962397933006287,
0.3106200695037842,
-0.2702520489692688,
-0.17641296982765198,
-0.2991640567779541,
0.08412250876426697,
-0.20008313655853271,
0.1162252202630043,
0.22398591041564941,
-0.2500552237033844,
-0.004249494522809982,
-0.16569308936595917,
-0.1878560334444046,
0.34970197081565857,
0.19229468703269958,
-0.15628044307231903,
-0.0415673553943634,
-0.26928043365478516,
-0.12264527380466461,
0.1546075940132141,
-0.48752516508102417,
-0.5998029112815857,
0.28364554047584534,
0.09865400195121765,
0.590198814868927,
0.13294662535190582,
-0.03453664109110832,
-0.2183612585067749,
-0.033247943967580795,
0.28823405504226685,
0.08607526123523712,
-0.06972653418779373,
0.08689698576927185,
-0.18993452191352844,
-0.4992433488368988,
0.4380776286125183,
0.32255038619041443,
-0.04030351713299751,
0.10193292051553726,
0.06953492015600204,
-0.11439526826143265,
0.30278077721595764,
-0.227645605802536,
-0.11073476076126099,
0.17164263129234314,
0.12456479668617249,
0.05573991686105728,
0.12375913560390472,
0.10379789024591446,
-0.6040160655975342,
0.36878615617752075,
-0.08568722754716873,
-0.13255275785923004,
-0.0020881295204162598,
-0.05415668338537216,
-0.13259035348892212,
-0.20790401101112366,
-0.39536887407302856,
-0.013666193932294846,
0.0340261235833168,
0.45217254757881165,
0.1741802990436554,
-0.07810509204864502,
-0.1735798418521881,
0.22350367903709412,
-0.20930901169776917,
0.07570318877696991,
-0.629215657711029,
0.2314382940530777,
0.10203342884778976,
0.015452366322278976,
0.13864323496818542,
0.04870016127824783,
0.10665209591388702,
-0.053350917994976044,
-0.20865711569786072,
0.24371075630187988,
0.41276243329048157,
0.17440344393253326,
-0.13464581966400146,
0.2051902413368225,
-0.18884718418121338,
-0.10351918637752533,
-0.24963346123695374,
0.6052866578102112,
0.12045685946941376,
-0.13194775581359863,
-0.039032943546772,
0.4673161506652832,
-0.004158522933721542,
0.3345080018043518,
-0.08969724178314209,
0.0010091383010149002,
0.4047529697418213,
-0.2142956405878067,
-0.33625122904777527,
-0.13417798280715942,
0.3852628469467163,
-0.13537302613258362,
-0.018160346895456314,
-0.0269047562032938,
-0.08158116787672043,
-0.15122681856155396,
0.3112088143825531,
-0.03589051216840744,
0.04976103454828262,
-0.017023004591464996,
-0.028249390423297882,
0.004570614546537399,
0.04726315289735794,
0.5770112872123718,
0.45432060956954956,
0.06340224295854568,
-0.1811283379793167,
0.0951334610581398,
-0.007803819142282009,
-0.033198967576026917,
0.03233295679092407,
0.12180265784263611,
0.22134898602962494,
0.6330013275146484,
0.19507014751434326,
-0.16469497978687286,
-0.3889191448688507,
-0.3240307867527008,
0.06898121535778046,
0.2615568935871124,
-0.5277560353279114,
-0.04310151934623718,
-0.33903053402900696,
0.07680846750736237,
-0.18990468978881836,
-0.30238330364227295,
-0.25423115491867065,
-0.3067402243614197,
-0.11386251449584961,
0.4238910377025604,
-0.041693028062582016,
0.16285882890224457,
-0.492058128118515,
-0.04120956361293793,
-0.21006491780281067,
-0.3444388508796692,
-0.022365998476743698,
0.05290733650326729,
-0.08789106458425522,
-0.060641877353191376,
0.33402112126350403,
-0.2912563979625702,
0.23631969094276428,
-0.43547627329826355,
0.012699885293841362,
-0.26224732398986816,
-0.1372184157371521,
0.04258541017770767,
-0.11196279525756836,
0.22125838696956635,
0.2594939172267914,
0.20268508791923523,
0.04257243126630783,
-0.15089073777198792,
0.2105618119239807,
0.09943564236164093,
-0.2519342601299286,
0.2191963493824005,
-0.01753779873251915,
0.0774734690785408,
0.13701730966567993,
-0.23447063565254211,
-0.12755009531974792,
-0.27315929532051086,
-0.11884672939777374,
0.08290815353393555,
0.11765506863594055,
0.10510735213756561,
-0.0868171751499176,
0.26966729760169983,
0.07063622027635574,
0.3259367346763611,
-0.1534179151058197,
-0.670734703540802,
0.4826107919216156,
0.01887519843876362,
-0.14108557999134064,
0.16762861609458923,
0.04148278385400772,
0.2375139594078064,
0.07485691457986832,
-0.553472638130188,
-0.07451769709587097,
-0.28338825702667236,
-0.22787366807460785,
-0.07562541961669922,
-0.05205882340669632,
0.2182523012161255,
0.19974127411842346,
0.05106224864721298,
-0.1396975815296173,
-0.3660846948623657,
-0.005625218152999878,
0.009120244532823563,
0.6090216040611267,
-0.06571008265018463,
0.33397728204727173,
-0.07734666764736176,
0.2963346838951111,
0.5736469030380249,
-0.05711028352379799,
0.18538783490657806,
0.09862939268350601,
0.2394046038389206,
0.024410095065832138,
-0.2287701666355133,
-0.353099524974823,
-0.14996638894081116,
0.15040236711502075,
0.08269933611154556,
-0.06460944563150406,
-0.04205228388309479,
-0.13616910576820374,
-0.1863757222890854,
-0.34404316544532776,
-0.1429017335176468,
-0.030010027810931206,
-0.17842578887939453,
0.11115182936191559,
0.08511057496070862,
0.3311430513858795,
-0.05998997017741203,
-0.2714669406414032,
-0.043722234666347504,
0.30419158935546875,
0.018887929618358612,
0.0017939172685146332,
-0.46467694640159607,
-0.26177462935447693,
-0.06486565619707108,
0.3869251012802124,
0.10320623964071274,
0.6360225677490234,
0.15576496720314026,
0.050737060606479645,
0.04502313584089279,
-0.27605122327804565,
0.38770896196365356,
-0.529143750667572,
0.494767963886261,
0.06130503490567207,
-0.18066608905792236,
-0.19969618320465088,
-0.1742275059223175,
-0.11677181720733643,
-0.0643998309969902,
0.09387931227684021,
0.3227182626724243,
-0.21668890118598938,
-0.057363949716091156,
-0.008423198014497757,
0.3617824912071228,
-0.1279611587524414,
-0.2871297299861908,
-0.3419356048107147,
-0.33245426416397095,
-0.4091149866580963,
-0.1582638919353485,
-0.11783544719219208,
0.25821205973625183,
-0.22200170159339905,
-0.09637999534606934,
-0.13571271300315857,
-0.06227236986160278,
0.40259891748428345,
0.1270134299993515,
0.2646006643772125,
0.03755992650985718,
0.2915676534175873,
0.13362115621566772,
0.01354735717177391,
0.3953385055065155,
0.828327476978302,
-0.0005370564758777618,
-0.6229301691055298,
0.05731964111328125,
-0.0770745649933815,
0.03594179451465607,
0.21478623151779175,
0.0032265568152070045,
-0.014354966580867767,
0.37693509459495544,
-0.15817686915397644,
-0.08433665335178375,
-0.27852627635002136,
0.33173057436943054,
-0.0680694729089737,
-0.35352277755737305,
-0.33346983790397644,
0.23896795511245728,
0.14593899250030518,
0.07100898027420044,
0.1338052749633789,
0.24311494827270508,
-0.13151104748249054,
0.32511550188064575,
0.24383676052093506,
0.9287355542182922,
0.27524614334106445,
0.062356628477573395,
0.0710081160068512,
-0.4137309789657593,
0.367278128862381,
-0.144586443901062,
0.17691436409950256,
-0.4252293109893799,
-0.2552100419998169,
-0.1132379099726677,
-0.272120863199234,
0.2879924178123474,
0.09695746004581451,
-0.02135811373591423,
0.386681467294693,
-0.12873230874538422,
0.11643081903457642,
0.11870887875556946,
0.12536582350730896,
-0.21648316085338593,
-0.025978028774261475,
-0.3102695047855377,
0.07248120754957199,
-0.1389530748128891,
0.216398224234581,
-0.04232010990381241,
-0.16363997757434845,
-0.1549074351787567,
-0.2522647976875305,
-0.27765780687332153,
0.3201697766780853,
0.02760157361626625,
0.2175113409757614,
0.18277472257614136,
-0.021315790712833405,
0.07794715464115143,
0.17506767809391022,
0.3752182722091675,
0.11750896275043488,
-0.30447763204574585,
-0.0415806882083416,
0.48367929458618164,
0.14305290579795837,
0.13069801032543182,
-0.11236298084259033,
0.20593421161174774,
-0.08690312504768372,
-0.16561266779899597,
0.1221979558467865,
-0.03230154514312744,
-0.45929914712905884,
0.08967483043670654,
-0.142584890127182,
-0.20049317181110382,
-0.46625930070877075,
-0.19831839203834534,
-0.12142284214496613,
0.1414983868598938,
-0.20362050831317902,
0.08999413251876831,
0.24311526119709015,
-0.30996033549308777,
0.28945252299308777,
-0.05536091700196266,
-0.28900033235549927,
-0.13984762132167816,
0.6321603059768677,
0.21065425872802734,
-0.17549476027488708,
0.48012498021125793,
0.10129892826080322,
-0.20899999141693115,
-0.13346852362155914,
0.23080754280090332,
0.3195473551750183,
-0.3296949863433838,
0.015202274546027184,
-0.10495476424694061,
0.07948125898838043,
-0.054114822298288345,
0.3323748707771301,
0.2820037603378296,
0.037258297204971313,
0.22172696888446808,
-0.5956917405128479,
-0.062380388379096985,
0.0741240605711937,
0.221056267619133,
0.3517460525035858,
-0.1484275609254837,
-0.16146957874298096,
-0.18591757118701935,
-0.13941845297813416,
-0.20120707154273987,
0.06237249821424484,
-0.32596978545188904,
0.013658592477440834,
-0.09501206129789352,
0.1725718230009079,
0.1475459486246109,
0.03336383029818535,
0.05184406042098999,
0.13200631737709045,
-0.19648049771785736,
-0.08695146441459656,
-0.15039336681365967,
0.2132396250963211,
0.2992708683013916,
-0.08577125519514084,
0.00575617142021656,
-0.14100760221481323,
-0.1521284133195877,
-0.06593268364667892,
-0.003833649680018425,
0.20969915390014648,
0.0011298134922981262,
0.3159479796886444,
0.0693693682551384,
-0.12243377417325974,
-0.08143503963947296,
-0.09057383239269257,
-0.17799636721611023,
0.09190645813941956,
-0.04343072324991226,
0.07417479157447815,
-0.005865144543349743,
0.05527098476886749,
0.14891251921653748,
0.09375008940696716,
0.10302198678255081,
0.0992647334933281,
0.3164149522781372,
-0.4874528646469116,
0.07329748570919037,
0.1940099149942398,
0.15257057547569275,
0.593187689781189,
-0.41738516092300415,
0.003565499559044838,
0.14541620016098022,
0.14175862073898315,
-0.2140350192785263,
-0.2840854525566101,
0.23462894558906555,
-0.059737734496593475,
-0.063299760222435,
0.15219707787036896,
-0.08929966390132904,
-0.2936754822731018,
0.36599862575531006,
0.03289911895990372,
0.380129337310791,
-0.3980720043182373,
0.25428617000579834,
0.4787040650844574,
-0.12642599642276764,
-0.14683076739311218,
0.030965570360422134,
-0.04038486257195473,
0.09329406172037125,
0.031407635658979416,
-0.006307430565357208,
0.2403615564107895,
-0.08209125697612762,
0.2336348295211792,
-0.3423771560192108,
-0.34568122029304504,
0.30379143357276917,
0.41141021251678467,
0.03640510141849518,
0.24760618805885315,
0.215452179312706,
-0.030039623379707336,
-0.1374378502368927,
0.20808756351470947,
-0.5627201795578003,
-0.11621527373790741,
-0.06097564101219177,
-0.05799024924635887,
0.02983996272087097,
-0.2719523012638092,
-0.14685368537902832,
0.17912578582763672,
-0.08949640393257141,
0.10313640534877777,
-0.021153829991817474,
0.004713796079158783,
-0.1954110711812973,
-0.3767836391925812,
-0.07922900468111038,
0.2616947591304779,
-0.04917731136083603,
-0.31190237402915955,
0.17807598412036896,
0.283170610666275,
-0.055722177028656006,
0.21428044140338898,
0.2922825217247009,
0.42259371280670166,
0.3048306405544281,
-0.013811904937028885,
-0.063855841755867,
-0.09384460747241974,
-0.08303701132535934,
0.12471042573451996,
0.8237307071685791,
-0.09006200730800629,
-0.39199453592300415,
0.44882434606552124,
0.07991674542427063,
-0.09052876383066177,
-0.10727721452713013,
-0.25118422508239746,
-0.2342129647731781,
-0.12466157972812653,
0.7563708424568176,
0.024052325636148453,
0.18986114859580994,
0.020002875477075577,
-0.028698205947875977,
-0.39911511540412903,
-0.38674965500831604,
0.1785559058189392,
0.09394893795251846,
0.09198662638664246,
0.0312579907476902,
0.03846266493201256,
-0.24220168590545654,
0.26461970806121826,
0.2592434585094452,
-0.08676130324602127,
-0.2864265739917755,
-0.0903618261218071,
-0.6156070232391357,
0.17473024129867554,
-0.11322526633739471,
-0.12799042463302612,
0.08925826102495193,
0.0636293888092041,
0.015277363359928131,
0.2777794301509857,
0.05633486062288284,
0.052677493542432785,
-0.07951901853084564,
0.15024271607398987,
-0.023398881778120995,
-0.20922210812568665,
0.33366531133651733,
-0.08294905722141266,
-0.11782180517911911,
-0.2734711170196533,
0.2439674288034439,
0.060431141406297684,
-0.00845109298825264,
-0.03954407945275307,
-0.049418047070503235,
0.019010141491889954,
-0.05887041985988617,
0.14542528986930847,
0.24110615253448486,
0.6805782318115234,
-0.07902514934539795,
-0.1766977310180664,
-0.16322951018810272,
-0.13714806735515594,
-0.1732845902442932,
0.38532111048698425,
0.11712099611759186,
0.49849918484687805,
-0.14891497790813446,
0.038069743663072586,
-0.2960042953491211,
0.11329948902130127,
-0.10498395562171936,
-0.19016200304031372,
-0.1999819129705429,
0.2622809410095215,
-0.152382493019104,
0.28912585973739624,
-0.13434089720249176,
-0.029534950852394104,
0.17153844237327576,
0.5189557075500488,
-0.2559897005558014,
-0.19903142750263214,
0.5218873023986816,
-0.2198820263147354,
-0.18338245153427124,
-0.06743425875902176,
0.2956903874874115,
-0.21493783593177795,
-0.2087545394897461,
-0.4680781364440918,
0.14401322603225708,
0.31629157066345215,
0.12030589580535889,
-0.25572335720062256,
0.24688756465911865,
-0.23209747672080994,
0.14049746096134186,
0.00632583349943161,
0.22050422430038452,
0.23150774836540222,
-0.07280021160840988,
0.0960015058517456,
-0.16835813224315643
] |
https://github.com/huggingface/datasets/issues/4448 | New Preprocessing Feature - Deduplication [Request] | Hi! The [datasets_sql](https://github.com/mariosasko/datasets_sql) package lets you easily find distinct rows in a dataset (an example with `SELECT DISTINCT` is in the readme). Deduplication is (still) not part of the official API because it's hard to implement for datasets bigger than RAM while only using the native PyArrow ops.
(Btw, this is a duplicate of https://github.com/huggingface/datasets/issues/2514) | **Is your feature request related to a problem? Please describe.**
Many large datasets are full of duplications and it has been shown that deduplicating datasets can lead to better performance while training, and more truthful evaluation at test-time.
A feature that allows one to easily deduplicate a dataset can be cool!
**Describe the solution you'd like**
We can define a function and keep only the first/last data-point that yields the value according to this function.
**Describe alternatives you've considered**
The clear alternative is to repeat a clear boilerplate every time someone want to deduplicate a dataset.
| 55 | New Preprocessing Feature - Deduplication [Request]
**Is your feature request related to a problem? Please describe.**
Many large datasets are full of duplications and it has been shown that deduplicating datasets can lead to better performance while training, and more truthful evaluation at test-time.
A feature that allows one to easily deduplicate a dataset can be cool!
**Describe the solution you'd like**
We can define a function and keep only the first/last data-point that yields the value according to this function.
**Describe alternatives you've considered**
The clear alternative is to repeat a clear boilerplate every time someone want to deduplicate a dataset.
Hi! The [datasets_sql](https://github.com/mariosasko/datasets_sql) package lets you easily find distinct rows in a dataset (an example with `SELECT DISTINCT` is in the readme). Deduplication is (still) not part of the official API because it's hard to implement for datasets bigger than RAM while only using the native PyArrow ops.
(Btw, this is a duplicate of https://github.com/huggingface/datasets/issues/2514) | [
-0.32169559597969055,
-0.19249114394187927,
-0.1381891667842865,
-0.0009355023503303528,
0.010670781135559082,
0.06374194473028183,
-0.16842442750930786,
0.4268958270549774,
-0.35620686411857605,
0.2864800989627838,
0.03303627297282219,
0.6406441330909729,
0.015022692270576954,
0.03057115711271763,
0.1191047728061676,
-0.015935130417346954,
0.02848701924085617,
0.17994825541973114,
0.17643430829048157,
0.10552152991294861,
-0.12609824538230896,
-0.0023597124963998795,
-0.24990952014923096,
-0.13509678840637207,
-0.1926049292087555,
0.08893285691738129,
-0.17315267026424408,
-0.061986543238162994,
-0.10082288831472397,
-0.21169938147068024,
0.1788415163755417,
0.48088234663009644,
0.004977881908416748,
0.09946775436401367,
-0.0001089989673346281,
-0.20467998087406158,
0.034566838294267654,
0.04625040292739868,
-0.4095146059989929,
-0.17546288669109344,
-0.337260901927948,
-0.05216211825609207,
-0.013591792434453964,
-0.1772160828113556,
-0.04984224587678909,
-0.4439399838447571,
-0.0962497889995575,
-0.38931140303611755,
0.18820738792419434,
0.09666969627141953,
0.21253621578216553,
-0.21571233868598938,
-0.3022151291370392,
-0.03867911174893379,
0.17165064811706543,
0.29472169280052185,
-0.004741387441754341,
0.14322488009929657,
0.3136202394962311,
-0.0803002193570137,
0.23090991377830505,
0.16954492032527924,
-0.13850006461143494,
-0.014490541070699692,
-0.07100880891084671,
0.17555321753025055,
0.26352372765541077,
0.03338014706969261,
0.27632051706314087,
0.33292463421821594,
0.33020609617233276,
-0.5844320058822632,
-0.2101147323846817,
-0.15699949860572815,
0.18899255990982056,
-0.5985981225967407,
-0.34603574872016907,
0.02190082147717476,
-0.13316035270690918,
0.08636841177940369,
0.03725981339812279,
-0.1670035421848297,
-0.10367126762866974,
0.09200145304203033,
0.011074483394622803,
-0.24948424100875854,
0.1291620135307312,
0.007576733827590942,
0.24427250027656555,
0.15982520580291748,
0.09362512826919556,
0.01084552239626646,
0.25361761450767517,
0.3200097978115082,
-0.20905016362667084,
-0.33918046951293945,
0.13031792640686035,
-0.2520122826099396,
0.26859739422798157,
0.49176299571990967,
0.26070305705070496,
0.0023812800645828247,
0.20396140217781067,
0.15794846415519714,
0.15809783339500427,
-0.028607597574591637,
-0.011120103299617767,
-0.20644809305667877,
0.1331089287996292,
-0.022148167714476585,
-0.0782480388879776,
0.014847161248326302,
-0.013827537186443806,
0.02181892842054367,
0.39936506748199463,
0.12159501016139984,
0.48160403966903687,
-0.16274970769882202,
-0.23655225336551666,
-0.03185156732797623,
-0.4364467263221741,
-0.27594706416130066,
-0.12372944504022598,
0.11541561782360077,
0.39649805426597595,
0.034339480102062225,
-0.32039451599121094,
-0.0961771309375763,
-0.4472537338733673,
-0.38220417499542236,
-0.19055494666099548,
0.06220899894833565,
-0.08674348890781403,
0.08362077921628952,
0.1532520055770874,
-0.1639532446861267,
0.029201464727520943,
0.043796356767416,
0.2004353106021881,
-0.19953030347824097,
0.25185394287109375,
-0.30552345514297485,
0.19966661930084229,
-0.043140146881341934,
-0.25477683544158936,
-0.24624419212341309,
-0.21966199576854706,
0.07434263825416565,
-0.41089558601379395,
0.35992807149887085,
0.26925185322761536,
-0.5464414954185486,
-0.05917016416788101,
0.26223358511924744,
0.20167939364910126,
0.17235760390758514,
-0.19693735241889954,
0.628950297832489,
-0.29951032996177673,
-0.03297483175992966,
0.1470973640680313,
-0.0063129328191280365,
-0.13188986480236053,
-0.3453017771244049,
0.20127061009407043,
0.13943585753440857,
-0.5039087533950806,
0.045985572040081024,
-0.2693234384059906,
-0.2517002820968628,
0.26225778460502625,
-0.17597772181034088,
-0.15780727565288544,
0.3570104241371155,
-0.04767658933997154,
0.13344739377498627,
0.36059078574180603,
0.04890826717019081,
-0.14279359579086304,
0.39356160163879395,
-0.14771142601966858,
0.09218281507492065,
-0.05122493952512741,
0.327457457780838,
0.0674728974699974,
-0.007578602526336908,
-0.12013110518455505,
0.2065652757883072,
-0.1938142478466034,
-0.37532341480255127,
-0.09014447033405304,
-0.45353737473487854,
0.055879149585962296,
0.20104575157165527,
-0.09768252074718475,
-0.04001673310995102,
0.12816014885902405,
-0.2015646994113922,
0.5222100615501404,
-0.0635938048362732,
-0.18177510797977448,
0.014448463916778564,
0.6534966826438904,
-0.03447627276182175,
0.06483800709247589,
-0.6943840384483337,
-0.20874902606010437,
0.14752653241157532,
0.040151678025722504,
-0.37041419744491577,
0.005869448184967041,
-0.5079421997070312,
-0.03255071863532066,
0.20866094529628754,
-0.05747615918517113,
0.018021056428551674,
0.1673404425382614,
-0.3144800662994385,
0.24246832728385925,
-0.15827998518943787,
-0.15989798307418823,
0.1863175481557846,
0.02094929851591587,
-0.017904585227370262,
-0.1777929812669754,
0.2025383561849594,
0.11623795330524445,
-0.04740138351917267,
0.028724804520606995,
0.44374850392341614,
0.11341103911399841,
-0.03385785222053528,
0.08339618146419525,
0.2508930265903473,
0.4693032503128052,
-0.03674912452697754,
0.04213869199156761,
0.07708317041397095,
-0.13206563889980316,
0.06024232134222984,
-0.21193060278892517,
0.11587469279766083,
-0.04046536237001419,
0.09683678299188614,
-0.19118067622184753,
0.2334003895521164,
-0.12020052969455719,
-0.12652802467346191,
0.04359165579080582,
-0.10578130185604095,
-0.03181925788521767,
-0.12031233310699463,
0.3025570809841156,
-0.39022985100746155,
0.23689095675945282,
0.200407937169075,
-0.016122393310070038,
0.1182701364159584,
-0.39784038066864014,
0.18096484243869781,
-0.10962347686290741,
-0.4603825509548187,
-0.02790055423974991,
-0.060106173157691956,
0.18134965002536774,
-0.07332208752632141,
0.22642339766025543,
0.12656110525131226,
0.3086094558238983,
0.25026002526283264,
0.1878821700811386,
0.30780279636383057,
-0.03053347021341324,
0.11615528166294098,
0.20807519555091858,
0.11723785102367401,
0.0802956148982048,
-0.031170286238193512,
-0.029192345216870308,
0.1329052597284317,
-0.3186098337173462,
-0.06407799571752548,
0.13521991670131683,
-0.10462560504674911,
-0.0029341131448745728,
0.0025215763598680496,
-0.5765955448150635,
-0.24266859889030457,
-0.2614245116710663,
0.014689918607473373,
-0.01514318585395813,
-0.16303043067455292,
0.4135221242904663,
0.18055394291877747,
-0.026392320170998573,
0.02901991829276085,
-0.28469008207321167,
0.6760233640670776,
-0.16533853113651276,
-0.3968214690685272,
-0.008849479258060455,
-0.05593857541680336,
-0.12105046957731247,
0.08541245758533478,
-0.052186448127031326,
0.22371724247932434,
0.6124079823493958,
0.19910170137882233,
-0.018007051199674606,
-0.5427137017250061,
-0.37184861302375793,
0.06830937415361404,
0.07901788502931595,
0.22151991724967957,
0.2693931460380554,
-0.20014728605747223,
0.04699227213859558,
-0.07351954281330109,
-0.21973676979541779,
-0.1597333401441574,
-0.2887420058250427,
-0.08316968381404877,
0.0737580731511116,
0.14616046845912933,
-0.19413752853870392,
-0.35969993472099304,
0.1367059350013733,
-0.20689712464809418,
0.2100011259317398,
-0.18058358132839203,
0.23634129762649536,
-0.30117344856262207,
-0.050920821726322174,
-0.029934097081422806,
-0.004230428021401167,
0.17589297890663147,
-0.43816858530044556,
-0.02233697846531868,
-0.10511192679405212,
0.008046165108680725,
0.015117021277546883,
-0.3795473873615265,
-0.10514205694198608,
0.10053884983062744,
0.25727513432502747,
-0.3174038529396057,
-0.5039339661598206,
0.13158993422985077,
0.40613043308258057,
-0.26014721393585205,
0.07314425706863403,
0.3713565468788147,
0.3742433190345764,
-0.1042485460639,
0.10148707777261734,
-0.1949663758277893,
-0.1301175057888031,
0.19624844193458557,
0.11556490510702133,
0.018193602561950684,
0.2879714369773865,
0.20050057768821716,
0.6675019860267639,
0.31949740648269653,
0.06566554307937622,
0.03201856464147568,
-0.17738360166549683,
-0.020294126123189926,
-0.006832674145698547,
-0.12910130620002747,
-0.21613265573978424,
-0.31080275774002075,
-0.04165509343147278,
0.3588474988937378,
0.09427439421415329,
-0.15954045951366425,
0.07743881642818451,
-0.020358577370643616,
-0.20939239859580994,
-0.35264599323272705,
-0.0047178976237773895,
-0.2452492117881775,
0.05182034522294998,
-0.04250302538275719,
0.07455620914697647,
-0.21457748115062714,
0.17585977911949158,
0.01906547322869301,
-0.19507066905498505,
0.04049774631857872,
-0.17067191004753113,
-0.045405637472867966,
0.02252567932009697,
-0.42216452956199646,
0.2820298671722412,
0.14290544390678406,
-0.19057781994342804,
0.2615242302417755,
-0.17913952469825745,
0.06633583456277847,
-0.04560317099094391,
0.4688960313796997,
-0.10557935386896133,
-0.09662514925003052,
0.132127583026886,
-0.2810167074203491,
0.08368907868862152,
-0.13723915815353394,
-0.11213257908821106,
0.2688436508178711,
0.022524913772940636,
-0.11954452097415924,
-0.3489101827144623,
-0.30176734924316406,
0.5798331499099731,
0.24375705420970917,
-0.02253096178174019,
-0.14349576830863953,
-0.027996933087706566,
-0.2659890651702881,
-0.05394748970866203,
0.005115002393722534,
-0.008313460275530815,
0.2187126874923706,
-0.0059592523612082005,
0.06479141116142273,
-0.19310720264911652,
-0.029290180653333664,
0.38440948724746704,
-0.018551185727119446,
0.05481287091970444,
-0.18595778942108154,
0.346723735332489,
0.06651107966899872,
0.010711126029491425,
0.38111475110054016,
0.4848712682723999,
-0.2073041945695877,
-0.4604366421699524,
-0.23601996898651123,
-0.0877593383193016,
0.5580995678901672,
0.2318355292081833,
-0.16757261753082275,
0.3747991621494293,
-0.2458261251449585,
0.06560249626636505,
-0.43759989738464355,
-0.04059835150837898,
0.25868943333625793,
-0.057137273252010345,
-0.3637847304344177,
-0.1589185744524002,
0.455213725566864,
0.35750311613082886,
-0.1813102811574936,
0.6981024742126465,
0.17789021134376526,
-0.025997838005423546,
0.26253122091293335,
0.046117838472127914,
1.0255792140960693,
0.02553119882941246,
0.13348768651485443,
-0.16304424405097961,
-0.3767186999320984,
0.06035038083791733,
-0.16547708213329315,
0.3262209892272949,
-0.1657276600599289,
-0.33342859148979187,
-0.1588979959487915,
-0.10542182624340057,
-0.004639029502868652,
0.2986036539077759,
-0.03763512149453163,
0.14010748267173767,
0.004410825669765472,
0.14457865059375763,
0.2594331204891205,
0.23518145084381104,
0.16521017253398895,
0.06736834347248077,
0.09703632444143295,
0.05603411793708801,
-0.029337719082832336,
-0.1755746603012085,
-0.07260611653327942,
-0.007720502093434334,
0.49081286787986755,
-0.06275331228971481,
-0.1055978536605835,
-0.25040361285209656,
-0.21287710964679718,
0.4305227994918823,
-0.037157949060201645,
-0.27320486307144165,
0.010580480098724365,
-0.15108643472194672,
-0.23552541434764862,
0.0913994312286377,
-0.027229519560933113,
-0.18670117855072021,
0.5980862975120544,
0.3202837109565735,
-0.11998098343610764,
-0.3801828622817993,
0.2185233235359192,
0.030413873493671417,
-0.1447579711675644,
0.039331331849098206,
0.31424158811569214,
-0.24139386415481567,
-0.13852229714393616,
0.08509068936109543,
0.0076071880757808685,
-0.04021622985601425,
0.17859111726284027,
0.24433200061321259,
-0.004465382546186447,
-0.346478134393692,
0.08917398750782013,
0.2593436539173126,
-0.27820906043052673,
0.11326707154512405,
-0.03988843783736229,
-0.02395961806178093,
-0.15356580913066864,
0.13096153736114502,
0.3910540044307709,
-0.20340141654014587,
-0.06388027220964432,
-0.12514089047908783,
-0.17919990420341492,
-0.27587467432022095,
-0.05292227864265442,
-0.004318982362747192,
-0.26916834712028503,
0.32653582096099854,
-0.40030670166015625,
0.12605349719524384,
0.27822235226631165,
-0.1300867646932602,
0.05593162029981613,
0.10201002657413483,
-0.10315066576004028,
0.05974006652832031,
-0.050066471099853516,
0.04550974443554878,
0.08045122027397156,
0.5142178535461426,
0.1742035150527954,
0.07411399483680725,
-0.37994542717933655,
0.4526384770870209,
-0.34820419549942017,
0.31861329078674316,
0.08885308355093002,
0.052979350090026855,
-0.23269116878509521,
0.0773119404911995,
-0.01364120002835989,
0.0010501807555556297,
0.17397314310073853,
0.1674553006887436,
0.0784367248415947,
-0.2542632818222046,
-0.19349665939807892,
0.1314682960510254,
-0.3825794458389282,
0.15872398018836975,
0.13798578083515167,
0.19525007903575897,
-0.07951590418815613,
-0.08680954575538635,
0.3050464987754822,
0.1264415681362152,
0.18660521507263184,
0.08263827860355377,
0.4940774440765381,
-0.20623761415481567,
-0.3882455825805664,
-0.1807968020439148,
0.08659455180168152,
0.20512494444847107,
0.243041530251503,
0.26538342237472534,
-0.20959696173667908,
0.0010592341423034668,
-0.03706168383359909,
-0.02581578493118286,
0.32678189873695374,
-0.4307298958301544,
0.15212810039520264,
0.07412982732057571,
-0.34823480248451233,
-0.08102589100599289,
0.3729991614818573,
0.3435918986797333,
-0.24788370728492737,
0.007228117436170578,
0.09775366634130478,
0.24245543777942657,
-0.3612598478794098,
-0.2498590499162674,
0.36621183156967163,
-0.14095793664455414,
0.17582589387893677,
0.23018339276313782,
0.18957307934761047,
0.4307597279548645,
0.02909248322248459,
-0.1499916911125183,
-0.2897367775440216,
-0.22242991626262665,
0.28644493222236633,
0.4603939950466156,
0.2734799385070801,
-0.2601453959941864,
0.15272891521453857,
0.35398808121681213,
0.2009924054145813,
0.290976881980896,
-0.24836602807044983,
0.6099987626075745,
0.050426214933395386,
-0.12472938001155853,
0.25067177414894104,
-0.15719687938690186,
0.2503373622894287,
0.2981588840484619,
-0.34211400151252747,
-0.09113764017820358,
0.00425199419260025,
0.02248527482151985,
0.16841816902160645,
0.07581239193677902,
-0.3306606113910675,
0.0237731970846653,
0.0008391775190830231,
-0.11427532136440277,
0.1629275232553482,
-0.061329036951065063,
-0.14477500319480896,
-0.14461630582809448,
0.10331512987613678,
-0.5446637272834778,
0.31529414653778076,
-0.032494887709617615,
0.23033392429351807,
-0.23683278262615204,
0.40170910954475403,
-0.19744807481765747,
0.4558095932006836,
-0.22198951244354248,
-0.197762593626976,
0.10484403371810913,
-0.11058776080608368,
-0.04133174940943718,
0.0696960836648941,
0.2768460214138031,
-0.08698850125074387,
-0.3753320276737213,
0.02906893938779831,
-0.0784645825624466,
0.05433633178472519,
-0.002217372879385948,
0.007898680865764618,
0.0042218416929244995,
0.339390367269516,
0.38588568568229675,
0.10773444175720215,
-0.03765324130654335,
-0.09054034948348999,
0.5986298322677612,
0.01417603250592947,
-0.8195335268974304,
0.6184324026107788,
0.3713049590587616,
-0.0943913385272026,
0.1337215006351471,
0.2569357752799988,
0.14434760808944702,
-0.07963179796934128,
0.5400502681732178,
0.1205393522977829,
-0.02704547718167305,
0.16414903104305267,
0.14282241463661194,
0.02356177568435669,
0.07200392335653305,
0.2815811336040497,
0.2339843213558197,
-0.22456330060958862,
-0.035401247441768646,
-0.35576507449150085,
0.019432835280895233,
-0.157738596200943,
-0.12397291511297226,
0.32747066020965576,
0.44734814763069153,
0.024126462638378143,
0.1931140273809433,
-0.027725234627723694,
-0.19260428845882416,
0.10609004646539688,
0.3453351557254791,
-0.3947714567184448,
-0.09906217455863953,
-0.07572025060653687,
-0.3282199800014496,
-0.051239557564258575,
-0.35769203305244446,
0.0058531612157821655,
-0.14099238812923431,
-0.008469752967357635,
-0.08659068495035172,
0.0006624460220336914,
0.5346466302871704,
0.39435169100761414,
0.1553310751914978,
-0.08492905646562576,
-0.14439326524734497,
0.11735860258340836,
0.004866672679781914,
0.032085128128528595,
0.44728124141693115,
-0.259405255317688,
0.20467489957809448,
0.17234626412391663,
-0.21859712898731232,
-0.08514954149723053,
-0.15902379155158997,
-0.05032777786254883,
0.11148481070995331,
0.20439088344573975,
-0.08104804903268814,
-0.23083123564720154,
-0.06861161440610886,
0.004642225801944733,
0.23275971412658691,
0.09547755122184753,
0.3523143231868744,
-0.3016020655632019,
0.2952602803707123,
-0.19103124737739563,
-0.36022308468818665,
0.2083349972963333,
-0.22953149676322937,
-0.14084070920944214,
-0.37843459844589233,
0.5454612970352173,
-0.014991246163845062,
0.07123399525880814,
-0.2656400203704834,
-0.0511263906955719,
0.5252499580383301,
-0.23768502473831177,
-0.03485842049121857,
0.5842241048812866,
-0.09380453824996948,
-0.08206300437450409,
-0.06970237195491791,
0.17146070301532745,
-0.056308992207050323,
-0.011865371838212013,
0.1594274789094925,
-0.47126948833465576
] |
https://github.com/huggingface/datasets/issues/4448 | New Preprocessing Feature - Deduplication [Request] | Here is an example using the [datasets_sql](https://github.com/mariosasko/datasets_sql) mentioned
```python
from datasets_sql import query
dataset = load_dataset("imdb", split="train")
# If you dont have an id column just add one by enumerating
dataset=dataset.add_column("id", range(len(dataset)))
id_column='id'
unique_column='text'
# always selects min id
unique_dataset = query(f"SELECT dataset.* FROM dataset JOIN (SELECT MIN({id_column}) as unique_id FROM dataset group by {unique_column}) ON unique_id=dataset.{id_column}")
```
Not ideal for large datasets but good enough for basic cases.
Sure would be nice to have in the library 🤗 | **Is your feature request related to a problem? Please describe.**
Many large datasets are full of duplications and it has been shown that deduplicating datasets can lead to better performance while training, and more truthful evaluation at test-time.
A feature that allows one to easily deduplicate a dataset can be cool!
**Describe the solution you'd like**
We can define a function and keep only the first/last data-point that yields the value according to this function.
**Describe alternatives you've considered**
The clear alternative is to repeat a clear boilerplate every time someone want to deduplicate a dataset.
| 79 | New Preprocessing Feature - Deduplication [Request]
**Is your feature request related to a problem? Please describe.**
Many large datasets are full of duplications and it has been shown that deduplicating datasets can lead to better performance while training, and more truthful evaluation at test-time.
A feature that allows one to easily deduplicate a dataset can be cool!
**Describe the solution you'd like**
We can define a function and keep only the first/last data-point that yields the value according to this function.
**Describe alternatives you've considered**
The clear alternative is to repeat a clear boilerplate every time someone want to deduplicate a dataset.
Here is an example using the [datasets_sql](https://github.com/mariosasko/datasets_sql) mentioned
```python
from datasets_sql import query
dataset = load_dataset("imdb", split="train")
# If you dont have an id column just add one by enumerating
dataset=dataset.add_column("id", range(len(dataset)))
id_column='id'
unique_column='text'
# always selects min id
unique_dataset = query(f"SELECT dataset.* FROM dataset JOIN (SELECT MIN({id_column}) as unique_id FROM dataset group by {unique_column}) ON unique_id=dataset.{id_column}")
```
Not ideal for large datasets but good enough for basic cases.
Sure would be nice to have in the library 🤗 | [
-0.322091281414032,
-0.25996482372283936,
-0.11233982443809509,
-0.14556145668029785,
-0.041646793484687805,
0.179482102394104,
-0.04290088638663292,
0.5064113140106201,
-0.2167438566684723,
0.2552605867385864,
0.04862014949321747,
0.7056498527526855,
-0.025995317846536636,
0.12066265195608139,
0.08638099581003189,
-0.108949214220047,
-0.002484932541847229,
0.11486303806304932,
0.15509700775146484,
0.07590585947036743,
-0.13081476092338562,
0.025564299896359444,
-0.20636464655399323,
-0.12463174760341644,
-0.22178830206394196,
0.21422195434570312,
-0.14100049436092377,
-0.0838361456990242,
-0.08067948371171951,
-0.16666576266288757,
0.14675287902355194,
0.4077380895614624,
0.04999479651451111,
0.15062852203845978,
-0.00010893522266997024,
-0.27033770084381104,
0.014245152473449707,
-0.05986490100622177,
-0.37961146235466003,
-0.3991166353225708,
-0.28869935870170593,
-0.05102449655532837,
-0.005107999779284,
-0.07032828778028488,
-0.07680562138557434,
-0.27788445353507996,
-0.14000634849071503,
-0.48985883593559265,
0.21699541807174683,
0.06713367253541946,
0.21020960807800293,
-0.32628482580184937,
-0.3815305233001709,
-0.09726404398679733,
-0.06466592103242874,
0.2524455487728119,
-0.0741364136338234,
0.18843486905097961,
0.37507715821266174,
-0.10510610044002533,
0.28474146127700806,
0.2740895450115204,
-0.10485424846410751,
-0.11350446939468384,
-0.019863352179527283,
0.12230043113231659,
0.37456658482551575,
-0.07473958283662796,
0.16595536470413208,
0.2948022484779358,
0.38196319341659546,
-0.5425349473953247,
-0.3224171996116638,
-0.09323230385780334,
0.2742454707622528,
-0.5199557542800903,
-0.3959897458553314,
-0.02921430952847004,
-0.058435410261154175,
0.13702692091464996,
0.016475364565849304,
-0.08956538885831833,
-0.0809440016746521,
-0.007843360304832458,
-0.010364692658185959,
-0.0963670015335083,
0.03409271687269211,
-0.06055648624897003,
0.2936583161354065,
0.09967784583568573,
0.02944883331656456,
-0.041416846215724945,
0.26295098662376404,
0.32777124643325806,
-0.04474208876490593,
-0.4534495174884796,
0.1005002036690712,
-0.288336843252182,
0.1818009316921234,
0.6354930400848389,
0.18755389750003815,
-0.039038509130477905,
0.10908889025449753,
0.19604673981666565,
0.2094702273607254,
-0.0762493759393692,
-0.024514101445674896,
-0.10733968019485474,
0.13227778673171997,
0.020948318764567375,
-0.07071302831172943,
-0.06442124396562576,
0.03182237967848778,
0.006448300555348396,
0.36016133427619934,
0.21393811702728271,
0.4205407500267029,
-0.19661957025527954,
-0.21832765638828278,
0.006899074651300907,
-0.2683427035808563,
-0.08420851081609726,
-0.04561794921755791,
0.17264297604560852,
0.3011055290699005,
0.2693188786506653,
-0.1886715143918991,
-0.028845731168985367,
-0.3220152258872986,
-0.25482064485549927,
-0.16383962333202362,
0.109437495470047,
-0.011761549860239029,
0.12145912647247314,
0.15547606348991394,
-0.07625284790992737,
0.08533407002687454,
0.11980914324522018,
0.3186025619506836,
-0.410376638174057,
0.29881158471107483,
-0.3509325087070465,
0.32402077317237854,
-0.13913902640342712,
-0.2723124027252197,
-0.12454694509506226,
-0.10083012282848358,
-0.015898652374744415,
-0.4912777543067932,
0.332060843706131,
0.006842747330665588,
-0.49801450967788696,
-0.12404423952102661,
0.2933044135570526,
0.2177140861749649,
0.11332633346319199,
-0.22951266169548035,
0.533098578453064,
-0.28492268919944763,
0.03388170525431633,
0.10046519339084625,
0.01712762378156185,
-0.1581442803144455,
-0.18868441879749298,
0.2819291353225708,
0.32388633489608765,
-0.331596314907074,
-0.025418497622013092,
-0.3211420178413391,
-0.1287676990032196,
0.25313353538513184,
-0.18133562803268433,
-0.169540673494339,
0.36300715804100037,
-0.050095025449991226,
-0.0077407509088516235,
0.48449814319610596,
-0.16782701015472412,
0.003854958340525627,
0.48692587018013,
-0.13742998242378235,
0.1733754575252533,
-0.16239231824874878,
0.41665542125701904,
-0.02749190852046013,
-0.03911742940545082,
-0.10462740063667297,
0.2628270387649536,
-0.15108917653560638,
-0.27317363023757935,
-0.08352608978748322,
-0.3413170576095581,
0.055366355925798416,
0.12063966691493988,
-0.1850423961877823,
0.12741774320602417,
-0.15642684698104858,
-0.13851018249988556,
0.46142375469207764,
-0.01571362093091011,
-0.2505607604980469,
0.05288243666291237,
0.5533828139305115,
0.02811408042907715,
0.050958361476659775,
-0.6161419153213501,
-0.12517333030700684,
0.11798667162656784,
0.38429883122444153,
-0.3607208728790283,
0.024792402982711792,
-0.554509162902832,
-0.11117776483297348,
0.12852491438388824,
-0.09281779825687408,
-0.03256940469145775,
0.16163629293441772,
-0.22428539395332336,
0.051476482301950455,
-0.24076515436172485,
-0.3466990888118744,
0.11294721812009811,
-0.09762214869260788,
-0.04356583207845688,
-0.1184936910867691,
0.1586170345544815,
0.07016700506210327,
0.08236650377511978,
0.00014807283878326416,
0.42214831709861755,
0.0797993466258049,
0.030381210148334503,
0.10938244313001633,
0.2669394910335541,
0.4082104563713074,
0.012171141803264618,
-0.023450203239917755,
0.03606218099594116,
-0.16198639571666718,
0.010767105966806412,
-0.2013763040304184,
0.12324683368206024,
-0.016029277816414833,
0.11118588596582413,
-0.09595227986574173,
0.28505733609199524,
-0.15272296965122223,
0.020708374679088593,
0.03140886127948761,
-0.018280155956745148,
0.0006278473883867264,
-0.14352230727672577,
0.156753808259964,
-0.5767334699630737,
0.06136589124798775,
0.0649402067065239,
-0.1720944494009018,
0.09690507501363754,
-0.4990023672580719,
0.1523607224225998,
-0.15735188126564026,
-0.3083273768424988,
-0.05199398845434189,
0.02959286980330944,
0.2492676079273224,
0.02050667628645897,
0.1239028349518776,
0.19834809005260468,
0.2782639265060425,
0.16460593044757843,
0.1592751145362854,
0.26630449295043945,
-0.059718407690525055,
0.09703114628791809,
0.2021978199481964,
-0.07545240223407745,
-0.09946632385253906,
0.009016964584589005,
-0.1672029346227646,
0.1492401659488678,
-0.1536068320274353,
-0.20966264605522156,
0.0716489851474762,
-0.09224440902471542,
-0.08028952777385712,
0.039953701198101044,
-0.5118044018745422,
-0.24035724997520447,
-0.29588526487350464,
0.017326511442661285,
0.1136738508939743,
-0.1584276407957077,
0.2961950898170471,
0.17260679602622986,
-0.013541065156459808,
-0.05317002534866333,
-0.33329224586486816,
0.6074343323707581,
-0.19160977005958557,
-0.48064160346984863,
0.034519948065280914,
-0.009925078600645065,
-0.021710358560085297,
0.0771699994802475,
0.022816304117441177,
0.17337468266487122,
0.5201089978218079,
0.07629404217004776,
-0.0404190868139267,
-0.5307430028915405,
-0.3034287095069885,
-0.024945348501205444,
0.07197323441505432,
0.34272634983062744,
0.2296341210603714,
-0.21733687818050385,
0.040781132876873016,
-0.20091287791728973,
-0.2491529881954193,
-0.03920171037316322,
-0.12307288497686386,
-0.18811726570129395,
0.16713891923427582,
0.167383074760437,
-0.22970356047153473,
-0.30968955159187317,
0.14847929775714874,
-0.19532866775989532,
0.20282548666000366,
-0.09894178807735443,
0.22935931384563446,
-0.16534478962421417,
-0.08870070427656174,
-0.12640391290187836,
0.055603474378585815,
0.34545451402664185,
-0.3271597921848297,
-0.15221087634563446,
0.030861658975481987,
-0.07197501510381699,
0.10774761438369751,
-0.36917534470558167,
-0.0695190280675888,
0.1968684047460556,
0.07932203263044357,
-0.3693276047706604,
-0.4976535439491272,
0.1241333931684494,
0.18248483538627625,
-0.3406212627887726,
0.12102720886468887,
0.14955386519432068,
0.3835734724998474,
-0.08071525394916534,
0.11226602643728256,
-0.11028553545475006,
-0.10010378807783127,
0.2045460343360901,
0.14878347516059875,
-0.019182633608579636,
0.2820695638656616,
0.12826961278915405,
0.5164992809295654,
0.4112749993801117,
-0.060725968331098557,
0.0019726529717445374,
-0.10022468119859695,
-0.00698307529091835,
-0.08043146878480911,
-0.21646510064601898,
-0.34680622816085815,
-0.20509734749794006,
0.046006619930267334,
0.21632719039916992,
0.08795571327209473,
-0.09393014013767242,
0.020133256912231445,
0.07397347688674927,
-0.0893535166978836,
-0.3641614317893982,
-0.0012751109898090363,
-0.4751853942871094,
0.04019122198224068,
-0.23024187982082367,
0.158014178276062,
-0.19036534428596497,
0.16512402892112732,
0.01773839257657528,
0.011964060366153717,
0.2262677550315857,
-0.1791524738073349,
0.013650257140398026,
0.024063806980848312,
-0.2718409299850464,
0.10888064652681351,
0.09711316227912903,
-0.03305382281541824,
0.2482089251279831,
-0.19019079208374023,
-0.036721497774124146,
-0.007400515954941511,
0.19503268599510193,
-0.2113291472196579,
-0.11927397549152374,
0.16669543087482452,
-0.36756187677383423,
0.13937601447105408,
-0.08329572528600693,
0.011279702186584473,
0.37682032585144043,
0.036262396723032,
0.050914183259010315,
-0.13242028653621674,
-0.3510153293609619,
0.6930713653564453,
0.22390314936637878,
0.08377864956855774,
-0.12937071919441223,
0.0052579790353775024,
-0.16527429223060608,
-0.015427361242473125,
-0.045810095965862274,
0.10450569540262222,
0.12490450590848923,
-0.0006925844354555011,
-0.026256375014781952,
-0.26436564326286316,
-0.06686116009950638,
0.4623781442642212,
-0.01945902407169342,
0.1385246217250824,
-0.025738107040524483,
0.4854092597961426,
-0.047455355525016785,
-0.014623500406742096,
0.24952878057956696,
0.3872542679309845,
-0.21823692321777344,
-0.37108662724494934,
-0.156470388174057,
-0.052417270839214325,
0.5366612672805786,
0.2788010835647583,
-0.1565224826335907,
0.4226517081260681,
-0.4507417380809784,
0.035338640213012695,
-0.5534172058105469,
0.014708945527672768,
0.23327480256557465,
-0.03789690509438515,
-0.36903756856918335,
-0.3686666190624237,
0.5122122168540955,
0.35624343156814575,
-0.12096983194351196,
0.7604728937149048,
0.09063881635665894,
-0.06040874868631363,
0.20152059197425842,
0.10535512864589691,
1.0240439176559448,
0.10592424869537354,
0.13033540546894073,
-0.39291635155677795,
-0.2779964208602905,
0.026241451501846313,
-0.1415887475013733,
0.26185083389282227,
-0.16269834339618683,
-0.3902261257171631,
-0.17673060297966003,
-0.07836545258760452,
0.04231995716691017,
0.2479148656129837,
-0.2653696537017822,
0.2203165888786316,
-0.22730858623981476,
0.07733795046806335,
0.1748364418745041,
0.3160420060157776,
-0.025027932599186897,
-0.04751000180840492,
0.12871059775352478,
0.07543828338384628,
0.11873787641525269,
-0.2214851975440979,
-0.12067417800426483,
0.002508406527340412,
0.4175662398338318,
0.026009172201156616,
-0.17575016617774963,
-0.2021980583667755,
-0.15967923402786255,
0.41412651538848877,
-0.11093765497207642,
-0.16203415393829346,
0.24410301446914673,
-0.06124451383948326,
-0.08134797215461731,
0.3603902757167816,
-0.0165217537432909,
-0.11808258295059204,
0.5470789074897766,
0.3458034098148346,
-0.0890008956193924,
-0.3420030176639557,
0.26936784386634827,
0.06051512807607651,
-0.14133863151073456,
0.044112078845500946,
0.3964821994304657,
-0.19969379901885986,
-0.14997094869613647,
0.09907959401607513,
0.03588398918509483,
-0.07846419513225555,
0.010916868224740028,
0.2832432687282562,
-0.0303863026201725,
-0.2785002291202545,
0.1295093595981598,
0.276561975479126,
-0.37978506088256836,
0.033655475825071335,
-0.019600119441747665,
-0.15556815266609192,
0.02102220058441162,
0.17749622464179993,
0.3147414028644562,
-0.22352701425552368,
-0.03261946141719818,
-0.21175627410411835,
-0.16431282460689545,
-0.3015629053115845,
0.006007440388202667,
0.039994433522224426,
-0.24792656302452087,
0.3555089831352234,
-0.4884737432003021,
0.05459669232368469,
0.2702008783817291,
-0.01290193572640419,
-0.01398925855755806,
0.14724987745285034,
-0.20063742995262146,
0.09884245693683624,
-0.10471819341182709,
-0.0631149560213089,
-0.035620372742414474,
0.5903210043907166,
-0.0006470866501331329,
0.12508484721183777,
-0.3852625787258148,
0.3592093288898468,
-0.3664364516735077,
0.25072556734085083,
-0.007208827883005142,
0.16571953892707825,
-0.153574600815773,
0.17168188095092773,
-0.07814701646566391,
-0.02186572179198265,
0.1705184131860733,
0.19212107360363007,
0.11373835802078247,
-0.2606615722179413,
-0.2145123928785324,
0.1174573302268982,
-0.3859584927558899,
0.06908514350652695,
0.11362572014331818,
0.21613937616348267,
-0.23023152351379395,
-0.1986600011587143,
0.18914155662059784,
0.06133704632520676,
0.24809657037258148,
0.1806761622428894,
0.20310591161251068,
-0.18248620629310608,
-0.273319810628891,
-0.23736748099327087,
0.0830824226140976,
0.29341715574264526,
0.1849845051765442,
0.2268739640712738,
-0.14899270236492157,
-0.025160863995552063,
-0.10519734770059586,
0.03603518009185791,
0.1258397400379181,
-0.27478620409965515,
0.12966269254684448,
0.17804686725139618,
-0.2277858406305313,
0.0705876499414444,
0.30028367042541504,
0.4645030200481415,
-0.27762943506240845,
0.01124810241162777,
0.172830730676651,
0.26614895462989807,
-0.2670096158981323,
-0.16049925982952118,
0.2878752052783966,
-0.1597193032503128,
0.1615224927663803,
0.37081217765808105,
0.14639237523078918,
0.44305914640426636,
0.0033763423562049866,
-0.19152164459228516,
-0.3635033667087555,
-0.20723146200180054,
0.508326530456543,
0.4827473759651184,
0.27443957328796387,
-0.22224517166614532,
-0.0971236377954483,
0.3184932768344879,
0.20842048525810242,
0.19319675862789154,
-0.14687421917915344,
0.5905418992042542,
0.12509307265281677,
-0.10344775021076202,
0.21903690695762634,
-0.10970349609851837,
0.2798811197280884,
0.16849403083324432,
-0.19080612063407898,
0.023944538086652756,
0.07360275089740753,
-0.0381290540099144,
0.09900286048650742,
-0.06828261911869049,
-0.28509101271629333,
0.0695408284664154,
-0.00941675528883934,
-0.25539934635162354,
0.2563098073005676,
0.0380241721868515,
-0.3448426425457001,
-0.17825020849704742,
0.1395874172449112,
-0.3771962523460388,
0.12589219212532043,
0.02248338609933853,
0.2676759958267212,
-0.15841689705848694,
0.4358495771884918,
-0.1145716980099678,
0.5894609689712524,
-0.30841243267059326,
-0.20421090722084045,
0.03185711055994034,
0.02512427419424057,
0.007871251553297043,
0.038329556584358215,
0.29622122645378113,
0.06561445444822311,
-0.1994086056947708,
0.1568656712770462,
-0.04085339605808258,
0.05449547618627548,
0.12031514942646027,
-0.04601453244686127,
-0.014075271785259247,
0.2846788763999939,
0.46085453033447266,
0.12862448394298553,
0.003268255852162838,
-0.11746683716773987,
0.5337478518486023,
0.13580842316150665,
-0.8043286800384521,
0.7044147253036499,
0.47896888852119446,
0.03597906976938248,
0.024142395704984665,
0.2610900402069092,
0.0616067498922348,
-0.31338822841644287,
0.6105639338493347,
0.11795074492692947,
-0.005182010121643543,
0.1488543599843979,
0.1441483199596405,
0.1467260867357254,
-0.03695664182305336,
0.25361284613609314,
0.1116318479180336,
-0.2675948441028595,
-0.11117340624332428,
-0.3173958957195282,
-0.14392584562301636,
0.07590239495038986,
-0.13238653540611267,
0.25978702306747437,
0.44329947233200073,
-0.08998940140008926,
0.07723908126354218,
-0.14095379412174225,
-0.21793286502361298,
0.2508978843688965,
0.32425978779792786,
-0.30190014839172363,
-0.16456522047519684,
-0.31141602993011475,
-0.24278727173805237,
-0.00767689011991024,
-0.30291590094566345,
-0.1869150549173355,
-0.08110633492469788,
0.03336326777935028,
0.058897584676742554,
-0.10040804743766785,
0.3955443203449249,
0.46590784192085266,
0.2647993266582489,
-0.16187693178653717,
-0.08015412092208862,
0.037191636860370636,
-0.046358246356248856,
-0.08991298079490662,
0.2634914517402649,
-0.25071218609809875,
0.20205119252204895,
0.1963578164577484,
-0.22959265112876892,
-0.1335565745830536,
0.05257079750299454,
-0.18640263378620148,
0.02489517256617546,
0.26215285062789917,
-0.1565747708082199,
-0.34080076217651367,
-0.13169308006763458,
0.017126113176345825,
0.1506611704826355,
0.001071220263838768,
0.4799673557281494,
-0.30658069252967834,
0.40996357798576355,
-0.11784341931343079,
-0.3417580723762512,
0.32649603486061096,
0.015283226035535336,
-0.15607748925685883,
-0.34674933552742004,
0.5670078992843628,
0.039845291525125504,
0.18104052543640137,
-0.5059061646461487,
-0.07482188940048218,
0.471956729888916,
-0.23145484924316406,
-0.014402510598301888,
0.5654866099357605,
-0.054389629513025284,
0.0038073137402534485,
-0.19422225654125214,
0.06941220909357071,
-0.04583452641963959,
0.08419349044561386,
0.19225215911865234,
-0.47474128007888794
] |
https://github.com/huggingface/datasets/issues/4443 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km | If I understand correctly, this is due to the key `split` missing in the line https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L41 of the script.
Maybe @albertvillanova could confirm. | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 23 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km
### Link
_No response_
### Description
_No response_
### Owner
_No response_
If I understand correctly, this is due to the key `split` missing in the line https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L41 of the script.
Maybe @albertvillanova could confirm. | [
-0.48776763677597046,
-0.009561307728290558,
-0.027109097689390182,
0.2157333940267563,
-0.0026691555976867676,
-0.0184626467525959,
0.31159064173698425,
0.4936908185482025,
0.09518557786941528,
0.34265607595443726,
-0.10089908540248871,
0.3467600345611572,
-0.0434107668697834,
0.42545732855796814,
-0.07062649726867676,
-0.2879997789859772,
-0.17011606693267822,
0.14699168503284454,
0.04862293601036072,
0.029939882457256317,
-0.4712424576282501,
0.22143013775348663,
-0.45810645818710327,
0.03107253462076187,
-0.05596057325601578,
-0.2485141158103943,
-0.16878442466259003,
0.1657988429069519,
0.03006368689239025,
-0.05117721110582352,
-0.25343480706214905,
0.0306394025683403,
-0.0030269930139184,
0.3946239948272705,
-0.00011052360059693456,
-0.07687190920114517,
0.18851570785045624,
-0.03881879150867462,
0.1101708710193634,
-0.15646590292453766,
-0.016476716846227646,
0.09058856219053268,
0.12913444638252258,
-0.2958654463291168,
-0.14227944612503052,
-0.07068897038698196,
0.14202041923999786,
-0.34013327956199646,
0.593005895614624,
0.25277748703956604,
0.1857977658510208,
0.17617963254451752,
0.03378433361649513,
-0.13770699501037598,
0.04971546307206154,
0.33825594186782837,
-0.11962087452411652,
-0.16789549589157104,
-0.15851156413555145,
-0.02484404481947422,
-0.2414461374282837,
0.5447546243667603,
-0.05698595941066742,
-0.029443107545375824,
0.3320280909538269,
0.05712432786822319,
-0.6322329044342041,
-0.4781148135662079,
0.2493196725845337,
0.2997819185256958,
0.040718063712120056,
0.004334293305873871,
-0.08260909467935562,
-0.13616076111793518,
-0.03143925219774246,
-0.2058168649673462,
0.0608944334089756,
0.4230622947216034,
-0.10237497091293335,
0.2642579674720764,
-0.2317478209733963,
-0.2680583596229553,
-0.16369301080703735,
0.08665460348129272,
-0.24266082048416138,
0.3080933690071106,
-0.2291008085012436,
0.27268314361572266,
0.35272011160850525,
0.06762802600860596,
0.22391675412654877,
0.14119566977024078,
-0.18958531320095062,
-0.011875982396304607,
-0.09301844239234924,
-0.08286570757627487,
-0.006837517023086548,
0.27508944272994995,
0.13013452291488647,
0.028966760262846947,
-0.11515915393829346,
-0.009485945105552673,
-0.10410714149475098,
0.08120998740196228,
0.26632192730903625,
0.09772332012653351,
0.1347646862268448,
0.5282031297683716,
0.5995423197746277,
0.22010567784309387,
-0.0912695974111557,
-0.16298338770866394,
0.026361342519521713,
-0.46734458208084106,
-0.23322026431560516,
0.13938134908676147,
0.27857792377471924,
0.0831853598356247,
-0.25428837537765503,
-0.013582051731646061,
0.026016749441623688,
-0.23256072402000427,
0.1489512175321579,
0.37080883979797363,
0.04002373293042183,
0.006549447774887085,
0.15953031182289124,
0.3314136862754822,
-0.4656359553337097,
-0.3339405059814453,
-0.2074054330587387,
0.20871028304100037,
-0.11734311282634735,
-0.1441982537508011,
0.018686547875404358,
-0.13531886041164398,
0.20977185666561127,
-0.17623105645179749,
0.19928571581840515,
-0.29147106409072876,
-0.06201843172311783,
-0.0076101855374872684,
0.04750522971153259,
0.30437806248664856,
0.37482398748397827,
0.057763539254665375,
0.2601049244403839,
-0.1311875283718109,
0.04096049815416336,
0.2915303111076355,
-0.24532869458198547,
-0.14353206753730774,
-0.17342713475227356,
0.14385588467121124,
-0.22138114273548126,
0.13727721571922302,
0.5664851069450378,
0.0015796534717082977,
-0.1250559389591217,
-0.313220351934433,
-0.10630426555871964,
0.008691255003213882,
-0.26779240369796753,
-0.28008314967155457,
0.3266940116882324,
0.511609673500061,
-0.3437707722187042,
0.036529213190078735,
-0.22886434197425842,
-0.08403411507606506,
0.1384589970111847,
0.18830570578575134,
-0.12375571578741074,
-0.159542053937912,
-0.3274296224117279,
0.06029041111469269,
0.3510570824146271,
-0.3521340787410736,
-0.2897169589996338,
0.41747456789016724,
-0.24813789129257202,
-0.17800898849964142,
0.27399131655693054,
0.06661040335893631,
0.46334412693977356,
-0.1410430371761322,
0.2601473927497864,
-0.00833192840218544,
-0.0565507709980011,
-0.075717031955719,
-0.05333822965621948,
-0.08626031130552292,
-0.202901691198349,
0.06938192248344421,
0.3202641010284424,
-0.04320470243692398,
0.2680824100971222,
-0.33872389793395996,
0.5588109493255615,
0.11280187964439392,
0.28535130620002747,
-0.016811173409223557,
0.04349976405501366,
-0.369324266910553,
0.1563386470079422,
-0.18410709500312805,
-0.09601063281297684,
0.006804756820201874,
-0.07048583030700684,
-0.047540389001369476,
-0.2606072425842285,
-0.19775047898292542,
-0.25868546962738037,
0.012531338259577751,
-0.31712469458580017,
-0.19464585185050964,
0.10920752584934235,
-0.17520615458488464,
-0.22882041335105896,
0.13063091039657593,
-0.20470614731311798,
-0.17286863923072815,
0.29370948672294617,
0.07165952026844025,
-0.1560853272676468,
0.36137616634368896,
-0.42125213146209717,
-0.010029849596321583,
0.15719367563724518,
0.08758864551782608,
0.23816022276878357,
-0.21308138966560364,
-0.09468492865562439,
0.5835320353507996,
0.28278684616088867,
0.2770578861236572,
0.23057395219802856,
-0.152435764670372,
0.3666929006576538,
-0.43590307235717773,
0.48085832595825195,
-0.09900772571563721,
-0.1228841245174408,
-0.06975649297237396,
-0.24461987614631653,
0.5423739552497864,
-0.19162560999393463,
0.2472570538520813,
-0.041374679654836655,
0.3621845543384552,
-0.11415068805217743,
-0.18255148828029633,
0.008917322382330894,
-0.5376330614089966,
0.11698897182941437,
0.09517987072467804,
-0.07442847639322281,
-0.27394840121269226,
-0.2758975028991699,
0.28686514496803284,
0.6260498762130737,
-0.07013683766126633,
-0.023874610662460327,
-0.021378934383392334,
-0.415617972612381,
0.04175270348787308,
-0.09245283156633377,
0.5416877865791321,
0.25246956944465637,
0.2816687524318695,
0.05236339569091797,
0.2233734428882599,
0.0697842389345169,
-0.20539572834968567,
0.2638517916202545,
0.3515359163284302,
0.16842064261436462,
0.10498688369989395,
-0.1885380893945694,
-0.15548433363437653,
-0.07369808852672577,
-0.0077346134930849075,
0.07341097295284271,
0.23781605064868927,
-0.2389933317899704,
-0.004241621121764183,
-0.19158923625946045,
-0.18945196270942688,
-0.097201868891716,
-0.1464422643184662,
-0.17421238124370575,
-0.6266934275627136,
0.13312466442584991,
0.0022841840982437134,
-0.1917763352394104,
0.23214584589004517,
-0.14425086975097656,
-0.047960683703422546,
0.08533420413732529,
0.37955984473228455,
-0.010420732200145721,
-0.28303661942481995,
-0.022933602333068848,
0.094029501080513,
0.36081817746162415,
0.0152350515127182,
0.20008577406406403,
-0.2414328008890152,
0.2509588599205017,
-0.03899236023426056,
-0.306316077709198,
0.22453634440898895,
-0.15858228504657745,
0.3221413791179657,
0.40900254249572754,
0.28982722759246826,
-0.164237380027771,
0.0056906575337052345,
0.2895050048828125,
-0.16961096227169037,
0.003063356503844261,
-0.13289731740951538,
0.10233043879270554,
-0.3161389231681824,
-0.26525160670280457,
-0.2881121337413788,
-0.05062057822942734,
-0.38947179913520813,
0.19674991071224213,
0.09628446400165558,
0.19252459704875946,
0.00043040793389081955,
0.19136179983615875,
0.03428155556321144,
0.040599554777145386,
-0.27181100845336914,
-0.14969858527183533,
-0.10639271140098572,
0.3259449303150177,
-0.5644179582595825,
-0.39111340045928955,
0.4226926863193512,
0.21198956668376923,
0.05589239299297333,
-0.22219137847423553,
-0.34569329023361206,
0.025057438760995865,
-0.10894577205181122,
-0.10618701577186584,
-0.1273273378610611,
0.1279984414577484,
0.1560451090335846,
0.16600705683231354,
-0.010170973837375641,
-0.3331441879272461,
0.006476834416389465,
0.13092906773090363,
-0.33220046758651733,
0.04045940935611725,
-0.16804063320159912,
0.18861809372901917,
0.03749774023890495,
0.505363941192627,
0.20044586062431335,
0.032641761004924774,
-0.04655250161886215,
-0.46235740184783936,
0.40330052375793457,
0.004085838794708252,
-0.32629117369651794,
0.13426072895526886,
0.049678072333335876,
-0.09468048065900803,
0.3588510751724243,
0.04295753687620163,
0.22696998715400696,
-0.4056318402290344,
-0.34155699610710144,
-0.375637412071228,
-0.6184614896774292,
0.02864222601056099,
0.3189753592014313,
-0.00740843266248703,
0.05393597111105919,
0.32044562697410583,
-0.03305269405245781,
-0.003256613854318857,
-0.07711607217788696,
0.3294329047203064,
0.39206254482269287,
-0.14577637612819672,
-0.11988876760005951,
-0.22990134358406067,
-0.4087376594543457,
0.5064239501953125,
-0.13369566202163696,
-0.22309339046478271,
-0.025417711585760117,
-0.07600727677345276,
0.07436132431030273,
-0.06018922105431557,
0.8274558782577515,
-0.14567209780216217,
-0.1906493455171585,
-0.027953367680311203,
0.26161617040634155,
-0.19088582694530487,
0.18697062134742737,
-0.07458741962909698,
0.26037558913230896,
0.15209828317165375,
0.08521299064159393,
-0.13539527356624603,
-0.22217315435409546,
0.5667943954467773,
-0.08005660772323608,
-0.23722407221794128,
-0.2672463655471802,
-0.20872379839420319,
0.02643294632434845,
-0.5470183491706848,
-0.22131341695785522,
0.211768239736557,
-0.03492104634642601,
-0.20626994967460632,
-0.1569903939962387,
0.2897392511367798,
-0.44368404150009155,
0.276920884847641,
0.14814767241477966,
0.39570289850234985,
-0.03905562311410904,
0.26473313570022583,
0.3112008571624756,
0.12290636450052261,
0.04129811376333237,
0.25627779960632324,
-0.028425637632608414,
-0.19212162494659424,
0.2120741307735443,
-0.23654566705226898,
0.39605021476745605,
0.30165666341781616,
-0.26085707545280457,
-0.12892374396324158,
0.20973052084445953,
0.387920618057251,
-0.06952643394470215,
-0.0658985897898674,
0.3074965476989746,
-0.2207135260105133,
-0.4114890694618225,
-0.2963961958885193,
0.13221533596515656,
-0.04962505027651787,
-0.04234987497329712,
0.3440091609954834,
0.3428230285644531,
0.00910562090575695,
0.1622689813375473,
-0.07072115689516068,
1.003416657447815,
-0.018990419805049896,
0.09409656375646591,
0.2578580677509308,
-0.15568330883979797,
0.3491624891757965,
0.19134049117565155,
0.18034687638282776,
-0.5194627642631531,
-0.2662461996078491,
-0.05270121246576309,
-0.06270767748355865,
0.18320979177951813,
-0.1734677404165268,
-0.20917193591594696,
0.2247365266084671,
-0.2015588879585266,
-0.17219094932079315,
-0.22029460966587067,
-0.03889423981308937,
0.01836157776415348,
-0.01114421896636486,
0.30046385526657104,
0.04108280688524246,
-0.08451084792613983,
0.32890021800994873,
0.03291570022702217,
-0.3354678153991699,
-0.013694122433662415,
-0.13938719034194946,
-0.06952264159917831,
0.21604308485984802,
-0.2904775142669678,
-0.18080992996692657,
-0.2578779458999634,
-0.15795305371284485,
0.32809239625930786,
0.5206781625747681,
0.05342388153076172,
0.24235258996486664,
-0.1878705769777298,
0.39804932475090027,
-0.16519209742546082,
-0.2919436991214752,
-0.09390601515769958,
0.28793439269065857,
0.09657865017652512,
-0.14197728037834167,
-0.16621051728725433,
-0.14796042442321777,
-0.07210167497396469,
0.1934869885444641,
0.07825994491577148,
0.122754767537117,
0.13274887204170227,
-0.4294494390487671,
-0.1220071017742157,
-0.1905594766139984,
-0.28055769205093384,
-0.36028414964675903,
0.09872832894325256,
-0.07743161916732788,
-0.03187279775738716,
0.06892675906419754,
-0.10834112763404846,
-0.1530722677707672,
0.02026267722249031,
0.18761202692985535,
-0.028067518025636673,
-0.12012382596731186,
0.35204678773880005,
0.34487977623939514,
-0.12858936190605164,
-0.34477970004081726,
-0.007586739957332611,
0.03031540848314762,
-0.44083651900291443,
0.2467900514602661,
0.014739797450602055,
0.30411815643310547,
0.24728500843048096,
0.26968690752983093,
-0.11600199341773987,
0.01827426254749298,
-0.07447444647550583,
-0.48979803919792175,
-0.13464990258216858,
0.2974863052368164,
-0.07473166286945343,
-0.040839266031980515,
0.08243272453546524,
0.2556972801685333,
0.0856177806854248,
0.06654832512140274,
-0.3200204372406006,
0.14098979532718658,
0.3672703206539154,
-0.19327451288700104,
-0.017555180937051773,
-0.044637054204940796,
0.32960420846939087,
0.0542830266058445,
0.11306065320968628,
0.26750892400741577,
-0.19727632403373718,
-0.1466841995716095,
-0.12652228772640228,
0.12300209701061249,
-0.0646115317940712,
-0.17609386146068573,
0.06932263821363449,
-0.11176163703203201,
-0.29537370800971985,
-0.050515078008174896,
0.14805968105793,
0.08514924347400665,
0.06564997136592865,
-0.12643496692180634,
0.13405075669288635,
0.006235934793949127,
-0.08517512679100037,
-0.025121793150901794,
0.10466010123491287,
0.513250470161438,
-0.18399281799793243,
0.11886507272720337,
-0.08874444663524628,
-0.10134094208478928,
-0.199596107006073,
0.12329967319965363,
0.24774852395057678,
0.23083791136741638,
0.3835656940937042,
-0.10328724980354309,
0.03376035764813423,
-0.05215637758374214,
0.5810284614562988,
0.32019737362861633,
-0.14575497806072235,
0.19560305774211884,
-0.014724519103765488,
0.16587257385253906,
-0.407365620136261,
0.27463188767433167,
-0.014814741909503937,
0.057866569608449936,
0.205296128988266,
0.29515668749809265,
0.004344545304775238,
0.23539888858795166,
-0.03898569196462631,
-0.021118801087141037,
0.3181760311126709,
-0.06123647838830948,
0.41343992948532104,
0.6458752155303955,
-0.0678512454032898,
0.07571839541196823,
0.3852134048938751,
0.07859325408935547,
0.28439873456954956,
0.44218605756759644,
-0.5822404026985168,
0.12802593410015106,
0.24781936407089233,
0.2352999746799469,
0.33644184470176697,
-0.3209281265735626,
0.35805806517601013,
0.09828400611877441,
-0.12578846514225006,
-0.013686858117580414,
-0.06650014221668243,
0.48199963569641113,
-0.2757844030857086,
0.212246835231781,
-0.15151441097259521,
0.6451882719993591,
-0.02968515455722809,
0.20583000779151917,
-0.352145791053772,
-0.3502180576324463,
-0.17017729580402374,
-0.04370393976569176,
0.2120617926120758,
0.09433376044034958,
-0.18403905630111694,
0.17061616480350494,
0.02684280276298523,
0.10190308094024658,
-0.05088479816913605,
-0.16335135698318481,
0.3276863992214203,
-0.28865790367126465,
0.043985769152641296,
0.3308493196964264,
0.20970703661441803,
0.39261680841445923,
0.02515519969165325,
0.44277408719062805,
-0.0771780014038086,
-0.1341746747493744,
-0.18568672239780426,
-0.09848247468471527,
-0.19556544721126556,
0.09960778802633286,
-0.06039118021726608,
0.26438161730766296,
0.5073350667953491,
0.36730489134788513,
0.13828159868717194,
-0.19900569319725037,
-0.026014041155576706,
0.13028360903263092,
0.2533159852027893,
0.038521040230989456,
0.19025692343711853,
-0.46246567368507385,
-0.24295425415039062,
-0.41289782524108887,
-0.35399922728538513,
-0.33873504400253296,
0.0953231006860733,
-0.1900681108236313,
-0.2686087489128113,
-0.020051134750247,
-0.300240695476532,
0.09155772626399994,
0.06953876465559006,
0.1488315761089325,
0.02648911252617836,
-0.04798329621553421,
-0.2816142439842224,
-0.48125582933425903,
-0.47017568349838257,
0.2155790776014328,
0.08077133446931839,
-0.24331814050674438,
-0.10909529775381088,
-0.006312467157840729,
-0.12003495544195175,
-0.15391597151756287,
0.280445396900177,
0.050063177943229675,
0.20630832016468048,
0.334960401058197,
-0.09044753015041351,
-0.05506237968802452,
-0.1656915247440338,
-0.02483929507434368,
0.08160262554883957,
-0.028513982892036438,
0.047736573964357376,
-0.10020308941602707,
-0.022345175966620445,
-0.17325459420681,
0.286574125289917,
-0.15012674033641815,
-0.479279488325119,
0.25079625844955444,
0.14803776144981384,
0.45942047238349915,
-0.09712104499340057,
-0.016897983849048615,
-0.027118001133203506,
-0.1973920613527298,
-0.202057346701622,
0.23521387577056885,
0.4194641709327698,
0.3858487010002136,
0.02266733907163143,
-0.3371071517467499,
-0.32732218503952026,
0.0739915743470192,
-0.06493187695741653,
0.3107317388057709,
-0.21355031430721283,
0.14964695274829865,
-0.1829811930656433,
0.1328987032175064,
0.5198317170143127,
0.35125061869621277,
-0.11576297879219055,
-0.12012992799282074,
-0.38065624237060547,
-0.4710182845592499,
0.3145119547843933,
-0.23474666476249695,
-0.3368695378303528,
0.11077926307916641,
0.24722610414028168,
-0.27823182940483093,
-0.08683333545923233,
-0.601220428943634,
0.030209071934223175,
0.2398013323545456,
-0.12787866592407227,
0.10118424892425537,
0.11083626747131348,
-0.1401500701904297,
-0.2676096260547638,
0.16569215059280396,
0.2706925868988037,
0.4693620800971985,
-0.43561112880706787,
0.07474753260612488,
0.10162763297557831
] |
https://github.com/huggingface/datasets/issues/4443 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km | Indeed there are several issues in this dataset loading script.
The one pointed out by @severo: for the default configuration "crops": https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L244
- The download manager downloads `_URL`
- But `_URL` is not defined: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L41
```python
_URL = {'train': []}
```
- Afterwards, for each split, a different key in `_ULR` is used, but it only contains one key: "train"
- "valid" key: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L260
- "test key: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L269
These keys do not exist inside `_URL`, thus the error message reported in the viewer:
```
Exception: KeyError
Message: 'valid'
``` | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 89 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Indeed there are several issues in this dataset loading script.
The one pointed out by @severo: for the default configuration "crops": https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L244
- The download manager downloads `_URL`
- But `_URL` is not defined: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L41
```python
_URL = {'train': []}
```
- Afterwards, for each split, a different key in `_ULR` is used, but it only contains one key: "train"
- "valid" key: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L260
- "test key: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py#L269
These keys do not exist inside `_URL`, thus the error message reported in the viewer:
```
Exception: KeyError
Message: 'valid'
``` | [
-0.4990963339805603,
0.16815906763076782,
0.017822936177253723,
0.30690211057662964,
0.18004819750785828,
-0.19324231147766113,
0.25078245997428894,
0.34333208203315735,
0.15782618522644043,
0.20260143280029297,
-0.016974888741970062,
0.35529038310050964,
-0.2488403469324112,
0.21139055490493774,
0.027377238497138023,
-0.10846750438213348,
-0.1653367578983307,
0.017690174281597137,
-0.1493629366159439,
-0.056845106184482574,
-0.46477994322776794,
0.12036313861608505,
-0.30185365676879883,
0.023500729352235794,
-0.13919752836227417,
0.09624861925840378,
-0.08956153690814972,
0.19445443153381348,
-0.07268014550209045,
-0.3419053554534912,
-0.06897994875907898,
0.3358227014541626,
0.19584345817565918,
0.3552156090736389,
-0.0001102064925362356,
0.0771573930978775,
0.3224751949310303,
-0.02131163328886032,
-0.2647370994091034,
-0.1581447273492813,
-0.1233639270067215,
0.015660447999835014,
0.335326611995697,
-0.16692031919956207,
-0.03405628353357315,
-0.09767657518386841,
0.14364732801914215,
-0.33983737230300903,
0.4163290858268738,
0.17883740365505219,
0.21436592936515808,
0.260060578584671,
-0.16804254055023193,
0.0428231917321682,
0.0043535009026527405,
0.17376738786697388,
-0.02004072442650795,
0.023538950830698013,
-0.11101233959197998,
-0.0923619344830513,
-0.3670026659965515,
0.35347601771354675,
0.013480061665177345,
-0.04785943403840065,
0.40281620621681213,
0.008720079436898232,
-0.4105329215526581,
-0.512600302696228,
0.05555935949087143,
0.28605765104293823,
0.11396274715662003,
0.004899267107248306,
-0.29453569650650024,
-0.2555640935897827,
0.07627270370721817,
-0.17529594898223877,
0.14079716801643372,
0.35087263584136963,
-0.11775508522987366,
0.16382162272930145,
-0.526828944683075,
-0.08069197833538055,
-0.17553022503852844,
0.13182219862937927,
-0.11374783515930176,
0.29007989168167114,
-0.1284620314836502,
0.2618981897830963,
0.34177878499031067,
0.0421425886452198,
0.1496519148349762,
-0.16497336328029633,
-0.030245881527662277,
0.2275698035955429,
-0.2137727290391922,
0.005401249974966049,
0.02878091111779213,
0.27997109293937683,
0.10993921011686325,
0.1595393568277359,
0.10797052085399628,
0.11166573315858841,
-0.1742555946111679,
0.07900696992874146,
0.27101218700408936,
0.2278546541929245,
-0.002261817455291748,
0.38028281927108765,
0.5157871842384338,
0.25019004940986633,
0.08989113569259644,
-0.01943458616733551,
-0.1332329660654068,
-0.4080193340778351,
-0.27914154529571533,
-0.09536226093769073,
0.16853949427604675,
0.059465307742357254,
-0.325874000787735,
0.1390148252248764,
-0.045500800013542175,
-0.13525083661079407,
0.22786347568035126,
0.501430869102478,
-0.2140631228685379,
0.16125229001045227,
0.09749212861061096,
0.3071590065956116,
-0.2715456187725067,
-0.28140586614608765,
-0.22253459692001343,
0.07493409514427185,
-0.13801279664039612,
0.06608807295560837,
0.2585294842720032,
-0.2634473741054535,
0.2569285035133362,
0.03244750574231148,
0.084234319627285,
-0.2585529685020447,
0.008625006303191185,
0.11943422257900238,
-0.0623357817530632,
0.3125724494457245,
0.2655700445175171,
0.1468694657087326,
0.1109142005443573,
-0.24517624080181122,
0.08828803151845932,
0.33489036560058594,
-0.3271004259586334,
-0.1946430504322052,
0.015451690182089806,
0.1785084754228592,
-0.5040706992149353,
-0.0051526352763175964,
0.40835243463516235,
0.00886872410774231,
-0.19251582026481628,
-0.14399226009845734,
-0.26472392678260803,
-0.07540950179100037,
-0.23280832171440125,
-0.22523869574069977,
0.4362173080444336,
0.6265859007835388,
-0.3425525426864624,
-0.1107148677110672,
-0.1303078681230545,
-0.10702669620513916,
0.06675601005554199,
0.05467529594898224,
-0.23745128512382507,
-0.10643825680017471,
-0.34521543979644775,
-0.18635185062885284,
0.419452965259552,
-0.30506137013435364,
-0.3341424763202667,
0.4520002603530884,
-0.09692110121250153,
0.18087927997112274,
0.10387328267097473,
0.19310136139392853,
0.20173154771327972,
-0.18935610353946686,
0.3292304575443268,
0.028447739779949188,
0.08299727737903595,
-0.053027503192424774,
-0.2189972847700119,
-0.1440340280532837,
-0.3518756031990051,
0.29586267471313477,
0.1942203938961029,
0.05045919865369797,
0.19719982147216797,
-0.35750097036361694,
0.4933079481124878,
0.11509699374437332,
0.1804053634405136,
0.08585315197706223,
0.017883777618408203,
-0.34902167320251465,
0.020341435447335243,
0.0958046242594719,
-0.4922991394996643,
0.2525423765182495,
-0.143224835395813,
0.05090074613690376,
-0.24456073343753815,
-0.014439916238188744,
-0.3295145332813263,
0.21224288642406464,
-0.5131912231445312,
-0.09220191836357117,
0.09873399138450623,
0.02296379953622818,
-0.3071410357952118,
0.22151459753513336,
-0.28509068489074707,
-0.01812167651951313,
0.1337047517299652,
0.0759892612695694,
-0.156705841422081,
0.31783339381217957,
-0.15889284014701843,
0.0614657998085022,
0.19483935832977295,
0.09441694617271423,
0.16953888535499573,
-0.2079145908355713,
-0.05216669663786888,
0.6478031277656555,
0.2702268362045288,
0.38257843255996704,
0.28101828694343567,
0.04791465401649475,
0.38502922654151917,
-0.16582155227661133,
0.24084939062595367,
0.03986508399248123,
-0.03177139163017273,
-0.0349760577082634,
-0.2822847366333008,
0.6538819670677185,
-0.16263507306575775,
0.2130897045135498,
0.06952501833438873,
0.1890731006860733,
-0.03827962279319763,
-0.0017413422465324402,
-0.3272797465324402,
-0.4112871289253235,
0.24293231964111328,
0.31098148226737976,
0.11503686010837555,
-0.029534107074141502,
-0.30571621656417847,
0.036887653172016144,
0.28587549924850464,
-0.16152292490005493,
-0.10735542327165604,
0.19412663578987122,
-0.32287558913230896,
-0.008406268432736397,
-0.10208871960639954,
0.5602268576622009,
0.25303104519844055,
0.12676285207271576,
0.01654762402176857,
0.3214135766029358,
-0.13864555954933167,
-0.22532768547534943,
0.26263266801834106,
0.247911736369133,
0.1551186889410019,
0.1969209909439087,
-0.23542223870754242,
-0.11089151352643967,
-0.1904064118862152,
-0.13113762438297272,
0.17877602577209473,
0.3806167244911194,
-0.48329460620880127,
0.09886235743761063,
-0.27645570039749146,
-0.12589436769485474,
-0.1811191588640213,
-0.35412052273750305,
-0.25543472170829773,
-0.5977436900138855,
0.047137390822172165,
0.2028447836637497,
-0.2492820918560028,
0.2617506682872772,
-0.304877370595932,
0.09278622269630432,
0.10354205965995789,
0.1418009251356125,
-0.15919356048107147,
-0.27417832612991333,
-0.208376944065094,
0.06603372097015381,
0.5103538036346436,
-0.20803120732307434,
0.194816455245018,
-0.18906335532665253,
0.199823796749115,
-0.14259786903858185,
-0.2695980966091156,
0.16858670115470886,
0.061665818095207214,
0.5281897783279419,
0.2211582064628601,
0.1450687050819397,
-0.22650150954723358,
0.06754163652658463,
0.31944596767425537,
0.0583362951874733,
0.11723683774471283,
0.09642071276903152,
0.03859139606356621,
-0.2678726315498352,
-0.21147403120994568,
-0.23602759838104248,
-0.02891741506755352,
-0.34982332587242126,
0.03539195656776428,
0.23320360481739044,
0.13891270756721497,
0.29715633392333984,
0.3324538767337799,
0.042036816477775574,
0.1546117514371872,
-0.30094513297080994,
-0.22787955403327942,
-0.24042458832263947,
0.4700487554073334,
-0.399915874004364,
-0.5644879937171936,
0.24737104773521423,
0.14085914194583893,
0.059613704681396484,
-0.0249546580016613,
-0.6148849725723267,
0.015404936857521534,
-0.006399042904376984,
-0.24056370556354523,
0.09093554317951202,
0.10131694376468658,
-0.015487812459468842,
0.21789485216140747,
0.032643623650074005,
-0.16608965396881104,
-0.03434140607714653,
0.10837551206350327,
-0.22077390551567078,
0.14962467551231384,
-0.12642425298690796,
0.2689261734485626,
-0.020666351541876793,
0.47861385345458984,
0.2622540295124054,
-0.028465595096349716,
0.24762074649333954,
-0.2943987250328064,
0.47546276450157166,
0.0027349814772605896,
-0.14228378236293793,
-0.013967054896056652,
-0.16400277614593506,
-0.018181413412094116,
0.42705368995666504,
0.060578566044569016,
0.2013559490442276,
-0.49872493743896484,
0.07456587255001068,
-0.1548921763896942,
-0.5529072880744934,
-0.029809242114424706,
-0.022177964448928833,
-0.03315730392932892,
0.18647634983062744,
0.30199140310287476,
0.014044482260942459,
-0.1411202847957611,
-0.07403349876403809,
0.32025468349456787,
0.31465622782707214,
-0.1084262952208519,
-0.38451769948005676,
-0.04895663633942604,
-0.47536730766296387,
0.4180983304977417,
-0.1606966108083725,
0.12929891049861908,
0.1611935943365097,
-0.07142438739538193,
0.12759792804718018,
-0.04466881603002548,
0.6518393158912659,
-0.14393897354602814,
-0.11434541642665863,
-0.08727775514125824,
0.15892265737056732,
-0.5074735879898071,
-0.018355458974838257,
0.03358699008822441,
-0.03541221097111702,
0.0797736644744873,
0.18221312761306763,
-0.19480714201927185,
-0.2311450093984604,
0.23660090565681458,
-0.008922259323298931,
-0.34961265325546265,
-0.4268554747104645,
-0.32141149044036865,
0.010405242443084717,
-0.5157468914985657,
-0.28704652190208435,
-0.12078817188739777,
-0.009266151115298271,
-0.2721691429615021,
-0.028813740238547325,
0.19433017075061798,
-0.41114163398742676,
0.26298201084136963,
0.20591402053833008,
0.39104923605918884,
0.11220359802246094,
0.3452608585357666,
0.4032364785671234,
0.1902623474597931,
0.026359369978308678,
0.4400634467601776,
-0.0601721815764904,
-0.1474243551492691,
0.30274608731269836,
-0.061897777020931244,
0.2250177264213562,
0.3024585545063019,
-0.0735764130949974,
-0.3043191432952881,
0.37063297629356384,
0.19754718244075775,
-0.24467208981513977,
0.2625305652618408,
0.30276522040367126,
-0.2754476070404053,
-0.507479190826416,
-0.48862424492836,
0.46753427386283875,
-0.09959036111831665,
-0.11205929517745972,
0.4045289158821106,
0.3645191788673401,
-0.02507619373500347,
0.07149027287960052,
0.14972840249538422,
0.8279656171798706,
0.029044639319181442,
0.23437325656414032,
0.5635759830474854,
-0.18700134754180908,
0.22140337526798248,
0.16771334409713745,
0.16860122978687286,
-0.5140054821968079,
-0.12082917988300323,
-0.006141608580946922,
-0.056340742856264114,
0.013185359537601471,
0.011353306472301483,
-0.15760934352874756,
0.24536655843257904,
0.0015116333961486816,
-0.14892685413360596,
-0.05952654033899307,
0.18906210362911224,
-0.02290164865553379,
-0.17949984967708588,
0.06974676251411438,
0.07799431681632996,
-0.07026846706867218,
0.3041613698005676,
-0.13712985813617706,
-0.1791074424982071,
0.016522344201803207,
-0.126875102519989,
0.03502088785171509,
0.2557353377342224,
-0.2747489809989929,
-0.07087478041648865,
-0.19945010542869568,
-0.1554553210735321,
0.040455661714076996,
0.5313226580619812,
-0.10363341867923737,
0.04873010143637657,
-0.23638328909873962,
0.43045106530189514,
-0.31202563643455505,
-0.08151210844516754,
0.006744627840816975,
0.19037006795406342,
0.2076343446969986,
-0.16215039789676666,
-0.03949984908103943,
-0.07595070451498032,
-0.07433709502220154,
0.17719683051109314,
0.19621142745018005,
0.027698244899511337,
0.008972451090812683,
-0.2685100734233856,
-0.3180236518383026,
-0.2195034921169281,
-0.14559349417686462,
-0.17281201481819153,
0.10707204043865204,
-0.04769600182771683,
0.18837182223796844,
0.0839284211397171,
0.12679322063922882,
-0.23039714992046356,
-0.1014963835477829,
0.35550862550735474,
-0.06257474422454834,
-0.20214535295963287,
0.4321158826351166,
0.21274153888225555,
-0.10527883470058441,
-0.19205710291862488,
0.07866177707910538,
0.08785571902990341,
-0.45966836810112,
0.07798316329717636,
-0.0062854355201125145,
0.2143835574388504,
0.18720215559005737,
0.28863078355789185,
0.023906469345092773,
-0.007052391767501831,
0.1048734188079834,
-0.6186642050743103,
-0.26793140172958374,
0.22567227482795715,
-0.14741024374961853,
0.10032759606838226,
-0.09964700788259506,
0.09235794842243195,
-0.013952614739537239,
-0.10902206599712372,
-0.3232874572277069,
-0.07869219779968262,
0.2034536898136139,
-0.32239970564842224,
0.11176961660385132,
0.09503165632486343,
0.3300830125808716,
0.06487764418125153,
0.11712417006492615,
-0.0027033351361751556,
-0.4624817669391632,
-0.09989067912101746,
-0.2699970006942749,
0.15482407808303833,
0.12007952481508255,
-0.31934821605682373,
-0.02272767201066017,
-0.13403689861297607,
-0.2677524983882904,
-0.0980953648686409,
-0.06416186690330505,
0.06123850494623184,
-0.058730870485305786,
-0.27438125014305115,
-0.038418594747781754,
0.20517060160636902,
-0.06121879443526268,
-0.019200891256332397,
0.030355259776115417,
0.4409988522529602,
0.05159320682287216,
-0.008590977638959885,
-0.04060883820056915,
-0.1320672184228897,
-0.36091184616088867,
0.11122056096792221,
0.2473350167274475,
0.1770802140235901,
0.3946947455406189,
-0.23430146276950836,
0.21736130118370056,
-0.054578185081481934,
0.49187740683555603,
0.46767348051071167,
-0.29164811968803406,
-0.11220118403434753,
0.055741313844919205,
0.18137216567993164,
-0.40573447942733765,
0.17761856317520142,
-0.13254119455814362,
0.1799180507659912,
0.05929424241185188,
0.1880517303943634,
0.08152987062931061,
0.14181944727897644,
0.0664483904838562,
0.06618756055831909,
0.28797680139541626,
-0.022975590080022812,
0.26737964153289795,
0.5098247528076172,
-0.20396235585212708,
0.23677226901054382,
0.2821262776851654,
0.14924736320972443,
0.182636559009552,
0.2893578112125397,
-0.6402769684791565,
-0.02298167161643505,
0.15440547466278076,
0.201151505112648,
0.093476302921772,
-0.4616733193397522,
0.26065126061439514,
0.2213108092546463,
-0.27249452471733093,
0.18179604411125183,
0.05847587808966637,
0.3080909848213196,
-0.2227356880903244,
0.15250995755195618,
-0.32110556960105896,
0.5869646668434143,
0.0323621965944767,
-0.0019148634746670723,
-0.42346319556236267,
-0.529725193977356,
-0.11887729167938232,
0.17419667541980743,
-0.05964374169707298,
0.05117972940206528,
-0.23704320192337036,
0.16974997520446777,
-0.13079145550727844,
-0.14535541832447052,
-0.04428581893444061,
0.013299968093633652,
0.24138522148132324,
-0.19717635214328766,
0.1654185652732849,
0.43583112955093384,
0.15443338453769684,
0.39547017216682434,
-0.06702771782875061,
0.3644704818725586,
0.24667268991470337,
0.03236810490489006,
-0.10306558012962341,
0.06126350164413452,
0.044711336493492126,
0.023064784705638885,
0.07107917964458466,
0.3865313231945038,
0.1897098273038864,
0.49898627400398254,
0.10752812772989273,
-0.13769666850566864,
0.06127125769853592,
0.03436673432588577,
0.3278861939907074,
0.0006926823407411575,
0.3275788128376007,
-0.32154330611228943,
-0.11766856163740158,
-0.19160956144332886,
-0.23447543382644653,
-0.20007812976837158,
0.14218483865261078,
-0.13230791687965393,
-0.09321241080760956,
0.07329704612493515,
-0.3744342029094696,
0.07327692210674286,
0.17262370884418488,
0.5251566767692566,
0.18866227567195892,
-0.09639772027730942,
-0.224725604057312,
-0.4234399199485779,
-0.910466194152832,
0.15203464031219482,
0.10897432267665863,
-0.08570736646652222,
0.024739209562540054,
-0.04479701817035675,
-0.11708467453718185,
-0.022642403841018677,
0.014109089970588684,
0.01145380362868309,
0.07181984186172485,
0.1798606514930725,
-0.10371753573417664,
-0.07416583597660065,
-0.28331267833709717,
0.22946280241012573,
-0.09806043654680252,
-0.13372617959976196,
0.09842779487371445,
-0.3507688045501709,
0.010814636945724487,
-0.13507375121116638,
0.3961166441440582,
-0.270772248506546,
-0.19306281208992004,
0.45198971033096313,
0.1262924075126648,
0.4583156704902649,
0.01515854150056839,
-0.09796908497810364,
-0.3116900324821472,
-0.1835440844297409,
-0.12458204478025436,
0.07646799087524414,
0.26940348744392395,
0.3344648480415344,
0.17455999553203583,
-0.4253048300743103,
-0.3362342417240143,
0.029974443838000298,
0.01843515783548355,
0.19812241196632385,
-0.2743065059185028,
0.057459235191345215,
0.0035220757126808167,
0.1691528558731079,
0.37464556097984314,
0.2724992632865906,
-0.02917686104774475,
0.11393272876739502,
-0.23896034061908722,
-0.35052189230918884,
0.49666064977645874,
-0.3757621943950653,
-0.1651180535554886,
0.08971621841192245,
0.1434151530265808,
-0.2840588092803955,
-0.06417398899793625,
-0.5765659809112549,
0.143263041973114,
0.2921373248100281,
-0.12207257002592087,
-0.09514889121055603,
0.08559376001358032,
-0.20220929384231567,
-0.24812130630016327,
0.04868541285395622,
0.4415014684200287,
0.33831465244293213,
-0.4875940680503845,
0.03892425075173378,
-0.004060028120875359
] |
https://github.com/huggingface/datasets/issues/4443 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km | Would anyone want to submit a Hub PR (or open a Discussion for the authors to be aware) to this dataset? https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 22 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Would anyone want to submit a Hub PR (or open a Discussion for the authors to be aware) to this dataset? https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km | [
-0.47888436913490295,
-0.12609872221946716,
-0.013959435746073723,
0.4152287244796753,
0.2487771213054657,
-0.04992640018463135,
0.17155525088310242,
0.3034141957759857,
0.12617866694927216,
0.37934786081314087,
0.06974230706691742,
0.3841482698917389,
-0.38796260952949524,
0.261920303106308,
-0.09487445652484894,
-0.1877911388874054,
-0.15680283308029175,
-0.04201643168926239,
0.3202039301395416,
-0.17585048079490662,
-0.13119657337665558,
-0.09486275166273117,
-0.27082353830337524,
0.12667562067508698,
-0.212034672498703,
-0.17095644772052765,
0.06643810123205185,
0.0026657991111278534,
-0.25519368052482605,
-0.22308556735515594,
0.022974958643317223,
0.3282248377799988,
0.11318215727806091,
0.16079004108905792,
-0.0001092366364900954,
0.02816544473171234,
0.2770301103591919,
0.07727129012346268,
0.24780333042144775,
-0.0068246424198150635,
-0.1917741596698761,
0.06143391132354736,
0.10225889086723328,
0.002552911639213562,
-0.23176991939544678,
-0.007053499110043049,
0.19759096205234528,
-0.16325266659259796,
0.2072114646434784,
0.07064121961593628,
0.23369024693965912,
0.31798282265663147,
-0.1419733762741089,
0.06077372655272484,
-0.13828104734420776,
0.17503982782363892,
-0.31057581305503845,
0.12484069168567657,
0.09118980169296265,
0.14201001822948456,
-0.4989941120147705,
0.371208518743515,
-0.03994239866733551,
-0.1258980929851532,
0.3840540945529938,
-0.09159909933805466,
-0.21277818083763123,
-0.42592644691467285,
0.09852588921785355,
0.2083054780960083,
0.2696163058280945,
-0.06544428318738937,
-0.03530092537403107,
-0.10690626502037048,
0.07008091360330582,
-0.24393907189369202,
0.08797626197338104,
0.3506859540939331,
-0.20975711941719055,
0.3093162178993225,
-0.4574348032474518,
-0.254821240901947,
-0.334766685962677,
-0.09098686277866364,
-0.4712797701358795,
0.30125656723976135,
-0.2263718545436859,
0.14726579189300537,
0.11458303034305573,
-0.0343499630689621,
0.5170600414276123,
-0.04169769585132599,
-0.0348808653652668,
-0.10636066645383835,
-0.19712446630001068,
-0.20159821212291718,
0.1909540295600891,
0.3694368302822113,
0.011751465499401093,
0.038908541202545166,
-0.004729549400508404,
0.14947357773780823,
-0.3621938228607178,
-0.022863730788230896,
0.3519189655780792,
0.029170379042625427,
0.05693914741277695,
0.4207182824611664,
0.5873185992240906,
0.09550027549266815,
0.12212349474430084,
-0.10187157243490219,
-0.1384323537349701,
-0.2787123918533325,
-0.45757049322128296,
-0.07048312574625015,
0.1449924260377884,
-0.17922911047935486,
-0.25026094913482666,
0.2895519435405731,
0.0001515895128250122,
0.07546292245388031,
0.35611772537231445,
0.07347521185874939,
-0.058143630623817444,
0.2625827193260193,
0.13612022995948792,
0.031745824962854385,
-0.2158305048942566,
-0.21355697512626648,
-0.17365562915802002,
-0.009889818727970123,
-0.19996407628059387,
0.020227573812007904,
-0.06175253540277481,
-0.04279788210988045,
0.0213184654712677,
-0.10264120250940323,
0.37111222743988037,
-0.13044516742229462,
-0.052598387002944946,
0.1949705183506012,
-0.13750538229942322,
0.2522762715816498,
-0.062090255320072174,
0.09480088204145432,
-0.050747934728860855,
-0.17158886790275574,
0.0781676396727562,
0.22089216113090515,
-0.12761524319648743,
-0.18658889830112457,
-0.35369348526000977,
0.12263601273298264,
-0.5597227215766907,
-0.008909158408641815,
0.5672659873962402,
0.14472202956676483,
-0.3701572120189667,
-0.23383010923862457,
-0.0012496262788772583,
0.09684941172599792,
-0.16873440146446228,
-0.1924022138118744,
0.11799422651529312,
0.4183838367462158,
-0.22373442351818085,
0.1339789479970932,
-0.029839057475328445,
0.03918394073843956,
0.12091012299060822,
0.0648811012506485,
-0.12164051830768585,
-0.21396708488464355,
-0.14064045250415802,
-0.30090004205703735,
0.2795870006084442,
-0.5220769643783569,
-0.45146429538726807,
-0.016616662964224815,
-0.34007447957992554,
-0.29278722405433655,
0.06163676083087921,
0.3125161826610565,
0.10582762211561203,
-0.23411156237125397,
0.429511696100235,
-0.16834215819835663,
0.1114901527762413,
-0.17506536841392517,
-0.40564605593681335,
-0.11239507794380188,
-0.4501786231994629,
0.27831336855888367,
0.1956804245710373,
0.06725519895553589,
0.1461922526359558,
-0.06475254148244858,
0.32134386897087097,
0.0815456211566925,
0.24830758571624756,
-0.001955900341272354,
0.24211640655994415,
-0.5265531539916992,
-0.1560569405555725,
-0.044214606285095215,
0.18943345546722412,
0.07553163170814514,
-0.1136937215924263,
0.23394262790679932,
0.0928935557603836,
-0.17116810381412506,
-0.3324795067310333,
0.039015479385852814,
-0.2884608507156372,
-0.2511163651943207,
0.13048426806926727,
-0.21438759565353394,
-0.36513516306877136,
0.18092654645442963,
-0.15365006029605865,
0.03535604476928711,
-0.11641499400138855,
-0.16003374755382538,
-0.11975866556167603,
0.5069148540496826,
-0.024347687140107155,
-0.017593257129192352,
0.13391457498073578,
0.22250625491142273,
0.11265721917152405,
0.18524174392223358,
-0.04798392951488495,
0.18637263774871826,
-0.06485743820667267,
0.44101202487945557,
0.6488103270530701,
0.2647804319858551,
0.5042088031768799,
-0.4365660846233368,
0.46884414553642273,
-0.40697047114372253,
-0.2621046304702759,
0.135757178068161,
-0.4997430741786957,
0.5405195355415344,
-0.07280385494232178,
-0.17494213581085205,
-0.3410232663154602,
0.5611675977706909,
-0.1683073192834854,
0.08904437720775604,
-0.10672477632761002,
-0.164285808801651,
0.32404717803001404,
0.6493640542030334,
-0.04858635738492012,
-0.11639855802059174,
-0.4291852116584778,
0.21223656833171844,
0.22656090557575226,
0.0920613706111908,
-0.07738349586725235,
0.016399553045630455,
-0.4365646243095398,
0.1604560911655426,
0.224776029586792,
0.25237956643104553,
-0.015398189425468445,
0.19291824102401733,
-0.012153435498476028,
0.32112693786621094,
-0.10821418464183807,
-0.12781500816345215,
-0.018762104213237762,
0.28954821825027466,
0.10794210433959961,
0.01298278197646141,
0.2220580130815506,
-0.026950906962156296,
-0.4077379107475281,
0.011282827705144882,
0.21703778207302094,
0.3629864752292633,
-0.22338347136974335,
-0.12531982362270355,
0.01571558602154255,
0.046963438391685486,
0.09541130065917969,
-0.20492015779018402,
-0.4575846791267395,
-0.5227456092834473,
0.1465696096420288,
0.22490853071212769,
-0.003664441406726837,
0.0033556674607098103,
-0.10479240119457245,
0.3964219093322754,
0.0631483644247055,
0.4737831652164459,
-0.2602558732032776,
-0.5092278122901917,
-0.030055150389671326,
0.14445270597934723,
0.3679625689983368,
-0.05668299272656441,
0.27428361773490906,
-0.12931405007839203,
0.4606659412384033,
-0.2496550977230072,
-0.4065777361392975,
0.10494135320186615,
0.1357100009918213,
0.5509999990463257,
0.17976872622966766,
0.13403961062431335,
-0.5231480598449707,
0.24164848029613495,
0.12917453050613403,
0.2435213327407837,
0.04723405838012695,
-0.12004897743463516,
-0.10776249319314957,
-0.09748461842536926,
0.07518036663532257,
0.0990212932229042,
-0.04204626381397247,
-0.4014746844768524,
0.27198803424835205,
0.1037333756685257,
0.06573589891195297,
0.1650514155626297,
-0.008469411171972752,
-0.01949780061841011,
0.0392925925552845,
-0.5071051716804504,
-0.2563893795013428,
-0.5234091281890869,
0.3648020029067993,
-0.3542673885822296,
-0.4179079830646515,
0.11934119462966919,
0.3005251884460449,
0.05684071034193039,
-0.1234162449836731,
-0.7547541856765747,
-0.28477147221565247,
-0.002166738733649254,
0.08233378827571869,
0.25728505849838257,
-0.06454584747552872,
0.22110803425312042,
0.09138023853302002,
-0.022242533043026924,
-0.13426029682159424,
-0.14243464171886444,
-0.13978073000907898,
0.14854660630226135,
0.19038189947605133,
-0.15201330184936523,
-0.3930819630622864,
0.08296525478363037,
0.40660566091537476,
0.32960575819015503,
-0.12873855233192444,
0.24131236970424652,
-0.1751909703016281,
0.32255199551582336,
0.1338079422712326,
-0.2408449947834015,
0.2691490948200226,
0.03128742426633835,
-0.19251926243305206,
0.2612713575363159,
0.2258598804473877,
0.21403750777244568,
-0.4250098168849945,
-0.23945322632789612,
-0.03198760002851486,
-0.4670121371746063,
-0.2396841198205948,
0.14206266403198242,
0.13129644095897675,
0.0852794498205185,
0.1237550899386406,
-0.257885217666626,
-0.35030248761177063,
0.06360363960266113,
0.3080299496650696,
0.25645217299461365,
-0.23516659438610077,
-0.16404934227466583,
0.026229556649923325,
-0.44007551670074463,
0.20580360293388367,
-0.25263142585754395,
0.02455807849764824,
-0.09523288905620575,
0.2728985846042633,
0.2631717324256897,
-0.08014258742332458,
0.5772457122802734,
-0.47854676842689514,
-0.04560951888561249,
0.026846211403608322,
0.3775848150253296,
-0.20610854029655457,
0.1261717975139618,
-0.06225229427218437,
0.2203132063150406,
-0.17784732580184937,
0.16779640316963196,
0.07170120626688004,
-0.24401944875717163,
0.3743514120578766,
-0.2800922989845276,
-0.330014705657959,
-0.24697677791118622,
-0.11428390443325043,
0.08677395433187485,
-0.2250460535287857,
-0.03560269623994827,
0.028680412098765373,
-0.013265980407595634,
-0.059942811727523804,
-0.18195395171642303,
0.1417284607887268,
-0.1485878825187683,
0.35076165199279785,
0.12267157435417175,
0.29402071237564087,
0.2077629417181015,
0.21181854605674744,
0.4240371882915497,
0.01588011160492897,
-0.13990098237991333,
0.33038076758384705,
0.23380956053733826,
-0.007732421159744263,
0.39403071999549866,
-0.016869179904460907,
0.31771066784858704,
0.4617730677127838,
0.04494807869195938,
-0.2077331244945526,
-0.018073543906211853,
0.1482456624507904,
-0.35341987013816833,
0.10550868511199951,
0.10464539378881454,
-0.08434324711561203,
-0.42162320017814636,
-0.027295149862766266,
0.5273910760879517,
0.26083195209503174,
-0.29612237215042114,
0.49133357405662537,
0.4893108606338501,
0.09009157866239548,
-0.06197810173034668,
0.5176756381988525,
1.237892508506775,
-0.012963972985744476,
0.07471883296966553,
0.17455333471298218,
-0.15412870049476624,
0.45078298449516296,
-0.11784651130437851,
0.15057425200939178,
-0.4947718679904938,
-0.2487933486700058,
-0.17987310886383057,
-0.12853607535362244,
0.17601972818374634,
-0.22208721935749054,
0.034699697047472,
-0.05218855291604996,
0.08170677721500397,
-0.22145983576774597,
-0.12189972400665283,
-0.038404859602451324,
-0.02452264167368412,
-0.06317456066608429,
-0.05869559198617935,
0.10737942159175873,
-0.16029438376426697,
0.2990269064903259,
-0.20574060082435608,
-0.2079988718032837,
-0.0019818544387817383,
0.1025046855211258,
-0.45697569847106934,
-0.09428106993436813,
0.020460501313209534,
-0.40551042556762695,
-0.01447998359799385,
-0.17664489150047302,
0.31684139370918274,
0.5132307410240173,
0.2664477229118347,
0.16293999552726746,
-0.5176533460617065,
0.45045706629753113,
-0.20885401964187622,
-0.1521943360567093,
0.11286088079214096,
0.1616566926240921,
0.05373960733413696,
-0.282654732465744,
-0.2212226390838623,
0.13670456409454346,
0.05630006641149521,
0.2033129185438156,
-0.19317802786827087,
-0.0208955779671669,
0.1997089833021164,
-0.18500801920890808,
0.148979052901268,
-0.12674452364444733,
-0.07786209881305695,
-0.1885090321302414,
0.1295473724603653,
0.11095711588859558,
0.11508020758628845,
0.11131437122821808,
0.310080349445343,
-0.10652163624763489,
0.17957115173339844,
0.13619861006736755,
0.10210954397916794,
-0.29454678297042847,
-0.014523349702358246,
0.2474876195192337,
-0.19653591513633728,
-0.18188151717185974,
0.07395952194929123,
-0.02627246454358101,
-0.5120501518249512,
0.0879930630326271,
-0.08189871162176132,
0.09107136726379395,
0.12775304913520813,
0.2817578911781311,
0.12661322951316833,
-0.1696336567401886,
0.06462948024272919,
-0.5558844804763794,
-0.31368619203567505,
0.09405815601348877,
-0.3514886498451233,
0.21897096931934357,
-0.17351195216178894,
-0.03293401002883911,
-0.046836066991090775,
-0.11746443808078766,
-0.3240821957588196,
0.04520706087350845,
-0.0854313001036644,
-0.1266934871673584,
-0.38746389746665955,
-0.1334618330001831,
0.013078142888844013,
-0.23113510012626648,
0.026320667937397957,
0.08295208215713501,
-0.570298433303833,
-0.10569881647825241,
-0.09914162755012512,
0.1914472132921219,
0.13336706161499023,
-0.24502025544643402,
0.11750119924545288,
-0.06566358357667923,
-0.20771290361881256,
0.21583086252212524,
-0.08163845539093018,
0.20815235376358032,
0.06371486186981201,
-0.40106669068336487,
0.1772150844335556,
0.2593686878681183,
-0.04281533882021904,
0.03224167600274086,
0.3717517852783203,
0.4367631673812866,
-0.14166241884231567,
-0.038409434258937836,
0.17648446559906006,
-0.09652180969715118,
-0.05038157105445862,
0.297867089509964,
0.2526026666164398,
0.04500214755535126,
0.33550500869750977,
-0.044154971837997437,
0.2508831322193146,
0.10391387343406677,
0.26347798109054565,
0.3152456283569336,
-0.2719441056251526,
0.029303735122084618,
0.03098556585609913,
0.18881267309188843,
-0.4074802100658417,
0.09900034964084625,
0.06126122549176216,
0.13295502960681915,
0.021968510001897812,
-0.0934625193476677,
0.398788183927536,
0.1949593424797058,
0.013171762228012085,
0.10369586199522018,
0.14596599340438843,
-0.25867778062820435,
0.18551526963710785,
0.4351171851158142,
-0.1134505495429039,
0.07404699921607971,
0.4090595841407776,
0.15805578231811523,
-0.045899488031864166,
0.3514364957809448,
-0.29922476410865784,
0.03428364172577858,
0.47443297505378723,
0.06743897497653961,
0.16794010996818542,
-0.2536180019378662,
0.5036922097206116,
-0.030830100178718567,
0.03609544783830643,
0.08340680599212646,
0.02790803462266922,
0.13816168904304504,
0.007987475953996181,
0.1332501769065857,
-0.25364789366722107,
0.46025559306144714,
-0.10265005379915237,
0.22130660712718964,
-0.5380656123161316,
-0.41072824597358704,
-0.13822025060653687,
0.2120954990386963,
-0.09847065806388855,
0.0824146643280983,
-0.07270234823226929,
0.09515303373336792,
-0.0544874370098114,
-0.1837964951992035,
-0.020482301712036133,
0.11992490291595459,
0.4047752916812897,
-0.1180378794670105,
0.10641895234584808,
0.25933244824409485,
0.15062931180000305,
0.3045744299888611,
0.48687121272087097,
0.2902381122112274,
0.006702369078993797,
-0.23335620760917664,
0.09186910092830658,
-0.02886521816253662,
0.021704768761992455,
0.07751450687646866,
0.12310141324996948,
0.3312349319458008,
0.4872705340385437,
0.1346903294324875,
0.0900740772485733,
-0.1066211462020874,
0.1006605252623558,
-0.3440364897251129,
0.191846564412117,
-0.16070656478405,
0.2687738835811615,
-0.30181026458740234,
-0.16829469799995422,
-0.16928161680698395,
-0.3624740242958069,
0.01246606558561325,
0.17653916776180267,
0.07348915189504623,
-0.21826711297035217,
0.06647365540266037,
-0.31139805912971497,
0.06032280623912811,
0.08911757171154022,
0.2958115041255951,
0.35571593046188354,
0.0010505616664886475,
-0.13702236115932465,
-0.3757762908935547,
-0.6282516121864319,
0.4989925026893616,
0.31498944759368896,
-0.06963174790143967,
0.15767376124858856,
-0.36472490429878235,
-0.02888944000005722,
0.1316746175289154,
-0.11391589045524597,
0.043692849576473236,
-0.16805274784564972,
0.2957884669303894,
-0.3214820325374603,
0.11074759066104889,
0.06453581899404526,
0.02099163457751274,
-0.08014030009508133,
0.10872288793325424,
0.343525767326355,
0.11296578496694565,
-0.008492715656757355,
-0.17805476486682892,
0.33293479681015015,
-0.3495296835899353,
-0.17933540046215057,
0.30550187826156616,
0.1716686338186264,
0.42295899987220764,
0.14700615406036377,
-0.08740909397602081,
-0.19621789455413818,
-0.18285273015499115,
-0.055838823318481445,
-0.03676269203424454,
0.10338836908340454,
0.2393890917301178,
0.12657517194747925,
-0.46494051814079285,
-0.02155560627579689,
-0.18006691336631775,
0.0007120147347450256,
0.5915102958679199,
-0.38783740997314453,
-0.14698894321918488,
-0.19019681215286255,
0.17227992415428162,
0.3460385501384735,
0.10295360535383224,
0.21343950927257538,
-0.03694119304418564,
-0.23782701790332794,
-0.4095268249511719,
0.49218863248825073,
-0.2936210334300995,
-0.2722565829753876,
0.2255890965461731,
0.1268354207277298,
-0.16791045665740967,
-0.1543351113796234,
-0.6726502180099487,
-0.036892153322696686,
0.3169248700141907,
-0.19821950793266296,
0.20816878974437714,
0.1657273918390274,
-0.10343992710113525,
-0.21921616792678833,
0.044877540320158005,
0.3923353850841522,
0.05802787095308304,
-0.39648303389549255,
0.04951820895075798,
0.052738577127456665
] |
https://github.com/huggingface/datasets/issues/4443 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km | Hi, I'm the main author for that dataset, so I'll work on updating it! I was working on debugging some stuff awhile ago, which is what broke it. | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 28 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Hi, I'm the main author for that dataset, so I'll work on updating it! I was working on debugging some stuff awhile ago, which is what broke it. | [
-0.5738492608070374,
0.16284745931625366,
-0.02706160955131054,
0.22329145669937134,
0.16078142821788788,
-0.16488930583000183,
0.37284186482429504,
0.3347889482975006,
0.030218269675970078,
0.3588322401046753,
0.10172003507614136,
0.40525710582733154,
-0.3044203221797943,
0.18825744092464447,
-0.1092371940612793,
-0.04954751580953598,
-0.040969349443912506,
0.07781326770782471,
-0.07310017943382263,
-0.09298667311668396,
-0.2566007375717163,
0.058519452810287476,
-0.3234046697616577,
0.03668857738375664,
-0.08987551927566528,
-0.06218191236257553,
0.09775425493717194,
-0.09225565940141678,
-0.1362963765859604,
-0.2770431339740753,
-0.05721164494752884,
0.0010927468538284302,
0.017913509160280228,
0.2328290045261383,
-0.00009420968854101375,
0.005197867751121521,
0.28040093183517456,
0.04457318037748337,
0.023161903023719788,
-0.06853748857975006,
-0.09837520867586136,
-0.02786124311387539,
0.22874823212623596,
-0.03777569159865379,
-0.11063267290592194,
-0.14320339262485504,
0.2687450647354126,
-0.3752289414405823,
0.2777555584907532,
0.21241706609725952,
0.3670060634613037,
0.2377229928970337,
-0.098629891872406,
-0.08325139433145523,
-0.0442429855465889,
0.0863482803106308,
-0.17585134506225586,
-0.08166824281215668,
0.03398272395133972,
-0.060157425701618195,
-0.4263150095939636,
0.35395297408103943,
-0.00458524189889431,
-0.0033124927431344986,
0.17974059283733368,
-0.1575365960597992,
-0.3009340465068817,
-0.3067784011363983,
0.18292224407196045,
0.19154849648475647,
0.3689673840999603,
0.09812183678150177,
0.08238402754068375,
0.002350553870201111,
-0.017624221742153168,
-0.30536195635795593,
0.15799559652805328,
0.3859938085079193,
-0.13182500004768372,
0.195039302110672,
-0.22554486989974976,
-0.03300485014915466,
-0.1955486536026001,
0.20457886159420013,
-0.4021684527397156,
0.3393489718437195,
-0.2230992466211319,
0.16863591969013214,
0.2501993477344513,
-0.1415819525718689,
0.33014824986457825,
0.25136110186576843,
-0.2110542356967926,
0.011338019743561745,
-0.21720369160175323,
0.02136983722448349,
0.2516563832759857,
0.20607781410217285,
0.06562253832817078,
0.01871464028954506,
0.05593489855527878,
0.05155954509973526,
-0.23895803093910217,
0.004679195582866669,
0.14534854888916016,
0.037511829286813736,
0.09634009003639221,
0.3909968435764313,
0.5496839880943298,
-0.054121654480695724,
-0.022451849654316902,
-0.07129912823438644,
0.0005759294144809246,
-0.4293823838233948,
-0.25994229316711426,
-0.08256161957979202,
0.14247791469097137,
-0.07882778346538544,
-0.12239401787519455,
0.14542904496192932,
0.0011622980237007141,
-0.013443158939480782,
0.18338318169116974,
0.13590280711650848,
-0.08094344288110733,
0.010697253048419952,
-0.0057740360498428345,
0.10107467323541641,
-0.2062259018421173,
-0.2747610807418823,
-0.2009115368127823,
-0.06916145980358124,
-0.14428375661373138,
-0.09990950673818588,
0.18617640435695648,
-0.12367938458919525,
0.25870266556739807,
-0.005891092121601105,
0.14768972992897034,
-0.09189733117818832,
0.07642890512943268,
0.043559782207012177,
-0.11068090051412582,
0.2797695994377136,
-0.003479268401861191,
0.14671765267848969,
0.12490016222000122,
-0.34922564029693604,
0.2268589735031128,
0.254016637802124,
-0.22835931181907654,
-0.1576392650604248,
-0.504920482635498,
0.2606167495250702,
-0.27684444189071655,
-0.008165102452039719,
0.6656359434127808,
0.16252513229846954,
-0.15403518080711365,
-0.4035508334636688,
-0.10357775539159775,
-0.004429839551448822,
-0.19036385416984558,
-0.15347515046596527,
0.1393553912639618,
0.36581310629844666,
-0.42766809463500977,
0.08841493725776672,
-0.3058187663555145,
-0.06752324104309082,
0.034224480390548706,
0.023409267887473106,
-0.3013692796230316,
-0.309130996465683,
-0.26721981167793274,
-0.17792946100234985,
0.2784207761287689,
-0.24968817830085754,
-0.4110361635684967,
0.07584744691848755,
-0.20674221217632294,
-0.23248079419136047,
-0.041540928184986115,
0.12355212867259979,
0.25311070680618286,
-0.15217606723308563,
0.2230062037706375,
-0.005003528669476509,
0.06696145981550217,
-0.1334402710199356,
-0.27083566784858704,
-0.08242589980363846,
-0.2636083960533142,
0.1375613510608673,
0.2831301689147949,
-0.0210576131939888,
0.3137216866016388,
-0.2704969346523285,
0.337253212928772,
0.10067340731620789,
0.18704883754253387,
0.18618862330913544,
0.20317843556404114,
-0.5439706444740295,
-0.02371077425777912,
-0.0788084864616394,
-0.09761855751276016,
0.1004827693104744,
-0.19593289494514465,
0.09175911545753479,
-0.04840466380119324,
0.024373434484004974,
-0.2254461944103241,
0.1462000459432602,
-0.22923479974269867,
-0.2186926305294037,
0.2883197069168091,
0.000057153403759002686,
-0.45372894406318665,
0.2310245782136917,
-0.05476927384734154,
-0.11691170185804367,
0.04218626022338867,
-0.17948758602142334,
0.0381564125418663,
0.39771464467048645,
-0.15260529518127441,
-0.10543958097696304,
0.05658393353223801,
0.019354335963726044,
0.10264332592487335,
0.08077802509069443,
-0.19068142771720886,
0.4149233102798462,
0.03800765052437782,
0.35699641704559326,
0.31743258237838745,
0.07912581413984299,
0.2543387711048126,
-0.41308119893074036,
0.34545838832855225,
-0.14259786903858185,
-0.20004014670848846,
0.11456339806318283,
-0.39920687675476074,
0.25255918502807617,
-0.031666774302721024,
-0.08851218968629837,
-0.21172790229320526,
0.3925575017929077,
0.024790367111563683,
0.01612434908747673,
-0.11495493352413177,
-0.29983872175216675,
0.32217738032341003,
0.5105419754981995,
0.03500323370099068,
-0.028460415080189705,
-0.5048543810844421,
0.19059669971466064,
0.3607184588909149,
0.12413324415683746,
-0.026397868990898132,
0.19153109192848206,
-0.494836688041687,
0.05040690302848816,
0.1465398520231247,
0.40277764201164246,
0.03888600319623947,
0.2015382945537567,
0.13701704144477844,
0.15569496154785156,
-0.09036687761545181,
-0.15102924406528473,
0.08587323874235153,
0.20996040105819702,
0.30708348751068115,
0.11293897032737732,
0.21650323271751404,
-0.07440724968910217,
-0.41242361068725586,
-0.030303288251161575,
0.16396395862102509,
0.3087467551231384,
-0.1842033863067627,
0.025249658152461052,
-0.43050023913383484,
-0.0891769528388977,
-0.007841118611395359,
-0.08349939435720444,
-0.3552525043487549,
-0.4767056703567505,
0.11649613082408905,
0.1617589145898819,
-0.1247904896736145,
0.21756882965564728,
-0.17533421516418457,
0.10190031677484512,
0.1091388612985611,
0.40987417101860046,
-0.11234875023365021,
-0.4539194107055664,
-0.1730409562587738,
0.24537211656570435,
0.4036199152469635,
-0.0931033194065094,
0.25657975673675537,
0.07761497795581818,
0.2592296004295349,
-0.1632937639951706,
-0.4761832654476166,
0.1525592803955078,
0.15570035576820374,
0.6174615621566772,
0.11503934860229492,
0.14045771956443787,
-0.5520618557929993,
0.12372338771820068,
0.16177229583263397,
0.23895502090454102,
0.16577185690402985,
-0.029449980705976486,
-0.060596030205488205,
-0.15484334528446198,
-0.13464601337909698,
-0.0446457639336586,
-0.1255141645669937,
-0.4250626266002655,
0.10050362348556519,
0.13310736417770386,
0.09781742095947266,
0.39160433411598206,
0.1287822276353836,
0.05584048852324486,
0.03644311800599098,
-0.25736308097839355,
-0.23185577988624573,
-0.3157336115837097,
0.35480865836143494,
-0.5408669710159302,
-0.45526835322380066,
0.14491616189479828,
0.25562798976898193,
0.13996438682079315,
-0.11637276411056519,
-0.6795675754547119,
0.0859825536608696,
-0.05672202259302139,
0.0013047531247138977,
0.1896141916513443,
-0.19085031747817993,
0.1760714203119278,
0.2270146608352661,
-0.15482082962989807,
-0.22808155417442322,
-0.13560055196285248,
-0.02197933942079544,
-0.01083356887102127,
0.13683545589447021,
-0.2001698911190033,
-0.05450863391160965,
0.0917215496301651,
0.29949188232421875,
0.10616861283779144,
-0.08140084147453308,
0.26437175273895264,
-0.3325534760951996,
0.3995080292224884,
-0.015312470495700836,
-0.19034187495708466,
0.24768707156181335,
-0.08110576868057251,
-0.11214612424373627,
0.24994319677352905,
0.04546826332807541,
-0.17107851803302765,
-0.3919431269168854,
0.00543401762843132,
-0.1727493405342102,
-0.4085862338542938,
-0.11895090341567993,
0.17433792352676392,
0.13389769196510315,
0.20371009409427643,
0.1801159381866455,
-0.13694851100444794,
-0.3516397774219513,
-0.032900482416152954,
0.1407967209815979,
0.0655084103345871,
-0.17862601578235626,
-0.24466848373413086,
0.09531936794519424,
-0.2900410294532776,
0.2679098844528198,
-0.3632252514362335,
0.10332518070936203,
-0.11063577979803085,
0.07083646208047867,
0.04424050822854042,
-0.20291078090667725,
0.46059125661849976,
-0.16849444806575775,
-0.2127200812101364,
0.07690010964870453,
0.34186631441116333,
-0.2945021092891693,
0.02380228415131569,
-0.024745306000113487,
0.05859925597906113,
-0.051179151982069016,
0.13117972016334534,
0.15333569049835205,
-0.20134320855140686,
0.34400296211242676,
-0.0032524794805794954,
-0.24190495908260345,
-0.2876763343811035,
-0.10762332379817963,
0.2118326723575592,
-0.3332028388977051,
-0.22221949696540833,
-0.12969449162483215,
-0.035262349992990494,
-0.07237886637449265,
-0.18188883364200592,
0.05919044464826584,
-0.25771060585975647,
0.16683641076087952,
0.0793728232383728,
0.3537582457065582,
0.21256814897060394,
0.35567036271095276,
0.19503048062324524,
0.2122022807598114,
-0.08577895909547806,
0.16206781566143036,
0.019998300820589066,
0.052463140338659286,
0.3395339250564575,
-0.14708535373210907,
0.2965526282787323,
0.19947472214698792,
-0.08090037852525711,
-0.20175006985664368,
0.179368257522583,
0.1316029131412506,
-0.09937026351690292,
0.17906956374645233,
0.19996342062950134,
-0.08563227206468582,
-0.38441771268844604,
-0.04624795913696289,
0.42777636647224426,
0.08361628651618958,
-0.058908071368932724,
0.5352790355682373,
0.11959749460220337,
0.07467476278543472,
-0.025143368169665337,
0.2467881739139557,
0.8521243333816528,
0.21526017785072327,
0.062345266342163086,
0.2954865097999573,
-0.1938098818063736,
0.2136642336845398,
0.13976621627807617,
0.13973478972911835,
-0.4399506747722626,
-0.40038323402404785,
-0.06960104405879974,
-0.07849480211734772,
0.18944627046585083,
-0.12413467466831207,
-0.13350391387939453,
-0.013250015676021576,
0.041131556034088135,
-0.3040156364440918,
-0.08297716081142426,
-0.08326833695173264,
0.1543770581483841,
-0.1633235663175583,
0.14485281705856323,
0.2547091841697693,
-0.20388473570346832,
0.14082473516464233,
-0.10793411731719971,
-0.1575821191072464,
0.20697322487831116,
0.050168298184871674,
-0.2832128405570984,
0.1870395839214325,
-0.023981044068932533,
-0.07501207292079926,
-0.058161597698926926,
-0.1910216063261032,
0.14706674218177795,
0.4331892430782318,
-0.03495607525110245,
0.28640836477279663,
-0.35102224349975586,
0.4759438633918762,
-0.04234687238931656,
-0.08019524812698364,
0.045035138726234436,
0.17744916677474976,
0.1967443823814392,
-0.27529841661453247,
-0.13519014418125153,
0.16588155925273895,
-0.10208159685134888,
0.2158460170030594,
0.04964423179626465,
0.05796158313751221,
0.1047583669424057,
-0.09596221894025803,
-0.01532895676791668,
-0.1269998401403427,
-0.09759575873613358,
-0.29108157753944397,
0.24856212735176086,
0.06670104712247849,
0.24086453020572662,
0.13240563869476318,
0.12082774937152863,
-0.14385569095611572,
-0.024296384304761887,
0.22880512475967407,
0.022642221301794052,
-0.20552930235862732,
0.2974686622619629,
0.4004560708999634,
-0.22724013030529022,
-0.3010407090187073,
0.12557443976402283,
-0.06701871007680893,
-0.45370519161224365,
0.04533606767654419,
-0.02990054525434971,
0.20690171420574188,
0.2869575023651123,
0.30778902769088745,
-0.10882693529129028,
-0.09610793739557266,
0.02755315974354744,
-0.45799827575683594,
-0.3330826163291931,
0.021156784147024155,
-0.27724623680114746,
0.24403956532478333,
-0.01190008595585823,
-0.07628397643566132,
0.04618663340806961,
-0.017637191340327263,
-0.45356327295303345,
-0.00018229219131171703,
0.02885022945702076,
-0.1804773062467575,
-0.1444467008113861,
0.03299867361783981,
0.13623467087745667,
-0.035518497228622437,
0.21910704672336578,
0.16443675756454468,
-0.4705641269683838,
-0.28814801573753357,
-0.17666815221309662,
0.05549810826778412,
0.21791517734527588,
-0.3328065276145935,
0.20944981276988983,
-0.11323779821395874,
-0.22252391278743744,
0.04709331691265106,
-0.1258845180273056,
-0.023686403408646584,
-0.0562434196472168,
-0.21016037464141846,
-0.04206756129860878,
0.1349758356809616,
0.23316507041454315,
-0.042217060923576355,
0.3230551481246948,
0.2870129942893982,
-0.09126078337430954,
0.03484590724110603,
0.17721833288669586,
-0.14094379544258118,
-0.28015977144241333,
0.06771694868803024,
0.05513337627053261,
0.23060429096221924,
0.35505372285842896,
-0.2347453087568283,
0.09611187875270844,
0.019705291837453842,
0.3003154397010803,
0.1059705838561058,
-0.2510507106781006,
-0.01531052216887474,
0.2611097991466522,
0.35366976261138916,
-0.4799642562866211,
0.10087568312883377,
-0.14252091944217682,
0.24355320632457733,
0.12738220393657684,
-0.12623074650764465,
0.0857861191034317,
0.08344124257564545,
0.012104704976081848,
0.26702940464019775,
-0.07143396884202957,
-0.34422820806503296,
0.23209936916828156,
0.5376485586166382,
-0.1120544821023941,
0.007298111915588379,
0.24059662222862244,
0.0638970285654068,
0.13295960426330566,
0.5389143824577332,
-0.35351160168647766,
0.05811351537704468,
0.49830344319343567,
0.0774441808462143,
0.2719733715057373,
-0.2681931257247925,
0.5511104464530945,
0.06987050175666809,
-0.14078745245933533,
0.1559327244758606,
0.17353475093841553,
0.16799871623516083,
-0.01819898560643196,
0.026286287233233452,
-0.29007187485694885,
0.609467089176178,
-0.09246868640184402,
0.2003558874130249,
-0.4320979416370392,
-0.3433614671230316,
-0.011122606694698334,
0.2021564394235611,
-0.07835797965526581,
0.257455050945282,
-0.1387377679347992,
0.16703245043754578,
-0.18369434773921967,
-0.23487596213817596,
0.01071624644100666,
0.045919403433799744,
0.15626606345176697,
-0.110852912068367,
0.13958275318145752,
0.26160603761672974,
0.06506869941949844,
0.1807318776845932,
0.2721085548400879,
0.24048644304275513,
0.13236036896705627,
-0.0397971011698246,
-0.06547939032316208,
0.0025907596573233604,
-0.1114402711391449,
-0.022104019299149513,
0.0051805078983306885,
0.32887738943099976,
0.35129299759864807,
0.3413147032260895,
0.2070658951997757,
-0.2561984658241272,
0.21496634185314178,
-0.08308239281177521,
0.1748291254043579,
-0.19072532653808594,
-0.10254760831594467,
-0.15726448595523834,
-0.11184100806713104,
-0.1620100885629654,
-0.40073737502098083,
-0.12120649963617325,
0.23731167614459991,
0.14819028973579407,
-0.039582543075084686,
0.05735448747873306,
-0.37546318769454956,
0.16294090449810028,
0.16667470335960388,
0.3103160262107849,
0.0797606036067009,
-0.03203418105840683,
-0.06395073235034943,
-0.4880025386810303,
-0.646162211894989,
0.39576172828674316,
0.1501401960849762,
0.018193060532212257,
-0.0036215195432305336,
-0.23220837116241455,
0.037338342517614365,
-0.04326571524143219,
0.19802765548229218,
0.037405189126729965,
0.037749599665403366,
0.12839820981025696,
-0.29381245374679565,
0.017948713153600693,
-0.029336437582969666,
0.08044702559709549,
-0.058798253536224365,
-0.014276336878538132,
0.16100311279296875,
-0.22255901992321014,
0.2047899067401886,
-0.2476864904165268,
0.13294048607349396,
-0.37372541427612305,
-0.2273401916027069,
0.49306049942970276,
0.10568305104970932,
0.23143020272254944,
-0.002253938466310501,
-0.09019936621189117,
-0.30187907814979553,
-0.2721426486968994,
-0.005686517339199781,
0.11526021361351013,
0.28582993149757385,
0.36098557710647583,
0.10757355391979218,
-0.25382381677627563,
-0.08058164268732071,
-0.0650186762213707,
-0.01741265505552292,
0.40324723720550537,
-0.2297135591506958,
0.008970139548182487,
0.05482551455497742,
0.03928406536579132,
0.2630479037761688,
0.1525266170501709,
0.025046687573194504,
-0.050134092569351196,
-0.22314409911632538,
-0.4410370886325836,
0.3556630313396454,
-0.26498183608055115,
-0.23758158087730408,
0.008297462947666645,
0.02345147728919983,
-0.27883386611938477,
-0.1686088591814041,
-0.505435049533844,
0.05699176341295242,
0.3200860023498535,
-0.09077847748994827,
0.1326221227645874,
-0.04638935998082161,
-0.09801560640335083,
-0.08908688277006149,
-0.01726638525724411,
0.4900047183036804,
0.37297946214675903,
-0.43638524413108826,
0.1428046077489853,
0.10731837153434753
] |
https://github.com/huggingface/datasets/issues/4443 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km | I've opened a Discussion page, so that we can ask/answer and propose fixes until the script works properly: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/discussions/1
CC: @julien-c @jacobbieker | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 22 | Dataset Viewer issue for openclimatefix/nimrod-uk-1km
### Link
_No response_
### Description
_No response_
### Owner
_No response_
I've opened a Discussion page, so that we can ask/answer and propose fixes until the script works properly: https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/discussions/1
CC: @julien-c @jacobbieker | [
-0.6805039644241333,
0.13112330436706543,
-0.03437969461083412,
0.1487870216369629,
0.1187773197889328,
-0.26213064789772034,
0.4099898338317871,
0.5005975365638733,
0.13961611688137054,
0.47502803802490234,
0.12022458761930466,
0.4043653905391693,
-0.2316914051771164,
0.3663710951805115,
0.05836568772792816,
0.0077995918691158295,
-0.11714305728673935,
0.039247505366802216,
-0.060451164841651917,
-0.09028913825750351,
-0.29929259419441223,
0.06132134050130844,
-0.39442259073257446,
0.013740591704845428,
-0.023998523131012917,
0.05718708783388138,
0.12224909663200378,
0.09118033945560455,
-0.06120899319648743,
-0.18761543929576874,
-0.1447957307100296,
0.33669260144233704,
0.1599179208278656,
0.3337102234363556,
-0.00009928136569214985,
-0.01711122691631317,
0.3582320213317871,
0.028343481943011284,
0.016726937144994736,
-0.13318656384944916,
0.06716802716255188,
-0.0066177574917674065,
0.27065855264663696,
-0.0254712775349617,
-0.20920956134796143,
-0.07777407020330429,
0.2652386724948883,
-0.376624196767807,
0.2507411241531372,
0.11583108454942703,
0.29537978768348694,
0.23981475830078125,
-0.1570633202791214,
-0.08251991122961044,
-0.03608745336532593,
0.28467220067977905,
-0.09041988849639893,
-0.010008521378040314,
0.11258479952812195,
-0.16694428026676178,
-0.4735891819000244,
0.4877120554447174,
-0.17320363223552704,
-0.18255741894245148,
0.35231882333755493,
-0.06724245101213455,
-0.3949379026889801,
-0.43236321210861206,
0.15841346979141235,
0.26858147978782654,
0.2981746196746826,
-0.1737811267375946,
0.08506601303815842,
-0.09616924822330475,
-0.09226357191801071,
-0.22255708277225494,
0.035158671438694,
0.295245498418808,
-0.09753003716468811,
0.18809613585472107,
-0.44081705808639526,
-0.012536379508674145,
-0.27400073409080505,
0.11256246268749237,
-0.1529051512479782,
0.25657522678375244,
-0.21470467746257782,
0.24458089470863342,
0.2078348845243454,
-0.08942806720733643,
0.24748729169368744,
0.09979195892810822,
-0.12061671912670135,
0.06565942615270615,
-0.15636678040027618,
-0.0829293355345726,
0.27076050639152527,
0.1600847840309143,
0.2003900706768036,
0.23810994625091553,
0.05677710101008415,
0.20099681615829468,
-0.22541670501232147,
0.059581391513347626,
0.16709625720977783,
0.24127577245235443,
0.23971498012542725,
0.28491389751434326,
0.6789966821670532,
0.29245367646217346,
0.06979307532310486,
-0.03474760800600052,
0.02788805589079857,
-0.5481955409049988,
-0.26917484402656555,
-0.00022997520864009857,
0.2183079719543457,
-0.03602646291255951,
-0.21256646513938904,
0.2027733474969864,
0.12244056910276413,
-0.10201232135295868,
0.22375567257404327,
0.36914581060409546,
-0.08871643990278244,
0.09531216323375702,
0.24067451059818268,
0.27222564816474915,
-0.31927913427352905,
-0.2700785994529724,
-0.15262643992900848,
0.09104228019714355,
-0.15622104704380035,
0.026383008807897568,
0.23158635199069977,
-0.04027050733566284,
0.1638307273387909,
-0.08132603764533997,
0.27407580614089966,
-0.1517120599746704,
0.006943034008145332,
0.1754114031791687,
-0.029723867774009705,
0.19748540222644806,
0.1507754772901535,
-0.0040139928460121155,
0.04364379495382309,
-0.07759152352809906,
0.1624700129032135,
0.3459071218967438,
-0.10956680029630661,
-0.04396606981754303,
-0.2176835536956787,
0.1776377111673355,
-0.2978554964065552,
-0.06908661127090454,
0.5914343595504761,
0.11007972061634064,
-0.2238922417163849,
-0.4043053090572357,
-0.07974127680063248,
0.041025057435035706,
-0.2578926682472229,
-0.16572007536888123,
0.2289728820323944,
0.5394541025161743,
-0.37090620398521423,
0.16738708317279816,
-0.16017091274261475,
-0.056248780339956284,
0.025359734892845154,
-0.008365776389837265,
-0.1663506031036377,
-0.3582698404788971,
-0.30428454279899597,
-0.18746313452720642,
0.23528751730918884,
-0.4471490681171417,
-0.2886086106300354,
0.13627749681472778,
-0.23160284757614136,
-0.10231424868106842,
0.12265878915786743,
0.20353077352046967,
0.22239536046981812,
-0.27016037702560425,
0.2009456902742386,
-0.14666904509067535,
0.11793963611125946,
-0.05447324365377426,
-0.2392856776714325,
-0.06490404158830643,
-0.3159886598587036,
0.16399595141410828,
0.256089448928833,
-0.0331699401140213,
0.2332269251346588,
-0.46700170636177063,
0.5061933994293213,
0.09862959384918213,
0.24265863001346588,
0.022664235904812813,
0.21495597064495087,
-0.42733335494995117,
0.042450200766325,
-0.1812998354434967,
-0.2999974191188812,
0.059765174984931946,
-0.14543259143829346,
0.15275314450263977,
-0.11130164563655853,
-0.1152665838599205,
-0.2933512032032013,
0.04589780420064926,
-0.296502023935318,
-0.22636035084724426,
0.19531750679016113,
-0.08426941931247711,
-0.27541670203208923,
0.17316673696041107,
-0.1714499443769455,
-0.1266966611146927,
0.11015814542770386,
-0.06366664916276932,
-0.13186846673488617,
0.3603192865848541,
-0.14715388417243958,
-0.18113994598388672,
0.16664789617061615,
0.021004967391490936,
0.18949010968208313,
-0.04953307285904884,
-0.1232704445719719,
0.4035246670246124,
0.021258629858493805,
0.3540923595428467,
0.3052484691143036,
0.03740599751472473,
0.20658288896083832,
-0.3417202830314636,
0.5917885303497314,
-0.10240484774112701,
-0.13070544600486755,
0.05616021156311035,
-0.37995466589927673,
0.547663152217865,
-0.135247603058815,
0.0466061532497406,
-0.13145466148853302,
0.2726389169692993,
-0.12805134057998657,
-0.08348029106855392,
-0.1535203754901886,
-0.44552621245384216,
0.2520851790904999,
0.5197404623031616,
0.04058190807700157,
-0.24400155246257782,
-0.43327242136001587,
0.18023298680782318,
0.4057174324989319,
-0.04799175634980202,
-0.02918318659067154,
0.1700325608253479,
-0.3482781648635864,
0.03999542444944382,
0.07905492931604385,
0.31619134545326233,
0.11760182678699493,
0.28112858533859253,
-0.009037841111421585,
0.30486127734184265,
-0.047090284526348114,
-0.15933960676193237,
0.12022033333778381,
0.22949452698230743,
0.2011273056268692,
0.11810895800590515,
0.07187093794345856,
-0.1681097000837326,
-0.2770855128765106,
-0.08927163481712341,
-0.006462284363806248,
0.28887656331062317,
-0.29857251048088074,
0.09122132509946823,
-0.25938302278518677,
-0.04044050723314285,
-0.041427724063396454,
-0.11787158995866776,
-0.28563055396080017,
-0.48144450783729553,
0.14530780911445618,
0.32067203521728516,
-0.25415411591529846,
0.21006640791893005,
-0.18723437190055847,
0.025866135954856873,
0.12517504394054413,
0.3760952949523926,
-0.2590172290802002,
-0.351339191198349,
-0.1570797860622406,
0.12854541838169098,
0.46106594800949097,
-0.19465041160583496,
0.3022444248199463,
-0.11972889304161072,
0.24190331995487213,
-0.2877238988876343,
-0.44536978006362915,
0.20376691222190857,
-0.025149807333946228,
0.5717650651931763,
0.23414798080921173,
0.09738864004611969,
-0.30910617113113403,
0.16030077636241913,
0.1317703127861023,
0.0009020920842885971,
0.10192690789699554,
0.05413789302110672,
-0.031433477997779846,
-0.20725572109222412,
-0.29533347487449646,
-0.15732690691947937,
0.05954577773809433,
-0.465576171875,
0.18326818943023682,
0.19143016636371613,
0.18199452757835388,
0.29427698254585266,
0.20666244626045227,
-0.004288057796657085,
-0.020666327327489853,
-0.15352067351341248,
-0.18888771533966064,
-0.1467762440443039,
0.3727114200592041,
-0.5397421717643738,
-0.4774681031703949,
0.2546786069869995,
0.2388029843568802,
0.04887763783335686,
-0.12474092841148376,
-0.5586224794387817,
-0.11259602755308151,
-0.004811404272913933,
-0.10055720806121826,
0.1747586578130722,
0.02368466928601265,
0.10061189532279968,
0.2341485470533371,
-0.06992720067501068,
-0.1894073486328125,
-0.15265771746635437,
-0.006936095654964447,
-0.19962140917778015,
-0.07739188522100449,
-0.04381142556667328,
0.176828533411026,
-0.03207503631711006,
0.23277205228805542,
0.209696426987648,
-0.09944644570350647,
0.21143335103988647,
-0.33938291668891907,
0.5198928117752075,
-0.10661167651414871,
-0.18848833441734314,
0.09516909718513489,
0.02803308516740799,
-0.10214578360319138,
0.32497110962867737,
-0.059356920421123505,
0.10026673972606659,
-0.49495747685432434,
-0.2082449197769165,
-0.10744199901819229,
-0.472474604845047,
-0.0762207880616188,
0.12294036895036697,
0.02531607821583748,
0.24983927607536316,
0.3948154151439667,
-0.12178125977516174,
-0.24176564812660217,
-0.014486663043498993,
0.2741072177886963,
0.21146366000175476,
-0.17224812507629395,
-0.2227739840745926,
0.1547909677028656,
-0.4660828113555908,
0.5120593309402466,
-0.24025264382362366,
-0.06367320567369461,
-0.02407379448413849,
-0.011073250323534012,
0.03579609468579292,
-0.13295014202594757,
0.5996828675270081,
-0.1591663360595703,
-0.15008629858493805,
0.05554286018013954,
0.2578265368938446,
-0.23944196105003357,
0.06031965836882591,
-0.12021850049495697,
0.0357363298535347,
-0.0031740404665470123,
0.0649590790271759,
-0.10324113816022873,
-0.29934364557266235,
0.46496906876564026,
-0.10255496948957443,
-0.1593981236219406,
-0.35549992322921753,
-0.1754326969385147,
0.17978119850158691,
-0.5804438591003418,
-0.22181859612464905,
0.007533745840191841,
-0.14703547954559326,
-0.22309187054634094,
-0.1673039048910141,
0.1338629126548767,
-0.35016950964927673,
0.27352362871170044,
0.2178983837366104,
0.4216693043708801,
0.14076797664165497,
0.3662698268890381,
0.24909667670726776,
0.060872290283441544,
0.07656871527433395,
0.1558678150177002,
0.10015314817428589,
-0.08846241235733032,
0.2759064733982086,
-0.08963670581579208,
0.44724002480506897,
0.3073539435863495,
-0.09789168834686279,
-0.31486544013023376,
0.19350630044937134,
0.1992628276348114,
-0.17349755764007568,
0.010033844038844109,
0.14111198484897614,
-0.12610244750976562,
-0.25906339287757874,
-0.2475932538509369,
0.35029515624046326,
0.03605327382683754,
-0.06533938646316528,
0.2788775861263275,
0.22906704246997833,
0.0172184519469738,
-0.1063922792673111,
0.19004422426223755,
0.9238428473472595,
0.15507659316062927,
0.1762346774339676,
0.3721129596233368,
-0.15956170856952667,
0.09691975265741348,
0.2019912600517273,
0.16674862802028656,
-0.6180676817893982,
-0.21873033046722412,
0.04160917550325394,
-0.07214657962322235,
0.09454107284545898,
-0.08285707235336304,
-0.17365655303001404,
0.19697324931621552,
0.0753428041934967,
-0.3673897385597229,
-0.23961733281612396,
0.033325254917144775,
0.006430424749851227,
-0.1724553108215332,
0.21563400328159332,
0.14510783553123474,
-0.11223268508911133,
0.2181522697210312,
-0.125313401222229,
-0.35090112686157227,
0.10967350006103516,
-0.1340598613023758,
-0.09973055124282837,
0.2681175470352173,
-0.11539863049983978,
-0.19733326137065887,
-0.04820120707154274,
-0.11570681631565094,
0.28533878922462463,
0.509897768497467,
-0.030118070542812347,
0.2633313238620758,
-0.2139953076839447,
0.36549240350723267,
-0.028308138251304626,
-0.01734163798391819,
0.009368816390633583,
0.20011581480503082,
0.2832450866699219,
-0.17983859777450562,
-0.11297376453876495,
0.0084514319896698,
0.059666626155376434,
0.26503634452819824,
-0.036343254148960114,
0.11576906591653824,
0.07508260011672974,
-0.21944841742515564,
-0.07305330038070679,
-0.1456846296787262,
-0.1792387217283249,
-0.31726425886154175,
0.18216219544410706,
0.1187872588634491,
0.12257105857133865,
0.10036006569862366,
0.20466336607933044,
-0.16654351353645325,
0.028993675485253334,
0.26161038875579834,
0.022083492949604988,
-0.3463592529296875,
0.24259930849075317,
0.5454230904579163,
-0.19782210886478424,
-0.32134974002838135,
-0.06562013179063797,
0.10446000099182129,
-0.41703441739082336,
0.11331777274608612,
0.10426285862922668,
0.18286167085170746,
0.2874477505683899,
0.22976912558078766,
-0.2933785319328308,
-0.15795829892158508,
0.07025264203548431,
-0.4186607003211975,
-0.3667653501033783,
0.12428705394268036,
-0.10889182984828949,
0.24996376037597656,
0.11655060201883316,
-0.045134007930755615,
-0.0018856674432754517,
-0.14110924303531647,
-0.4096983075141907,
-0.1448204070329666,
0.26081275939941406,
-0.21404016017913818,
0.012928967364132404,
-0.05625408887863159,
0.19627481698989868,
0.012417631223797798,
0.14126239717006683,
0.15013933181762695,
-0.6037348508834839,
-0.20436197519302368,
-0.09327144920825958,
0.10644501447677612,
0.09977409988641739,
-0.29799768328666687,
0.13261643052101135,
-0.13681720197200775,
-0.30372151732444763,
-0.08471636474132538,
0.02272016927599907,
0.06777404993772507,
-0.024479687213897705,
-0.2636308968067169,
-0.06951440870761871,
0.1104520782828331,
0.2712562680244446,
-0.12996692955493927,
0.18834346532821655,
0.37532782554626465,
-0.20626495778560638,
-0.023025833070278168,
-0.028913043439388275,
-0.19865654408931732,
-0.1567511111497879,
0.1952158808708191,
0.36280596256256104,
0.26081782579421997,
0.27347972989082336,
-0.1699112504720688,
-0.0022144876420497894,
0.03621507063508034,
0.4188271164894104,
0.22969748079776764,
-0.2733058035373688,
-0.09473211318254471,
0.1875198781490326,
0.2479664534330368,
-0.4885796904563904,
0.205231174826622,
-0.06801410019397736,
0.1358860582113266,
0.2183992564678192,
0.13087312877178192,
0.07769468426704407,
0.0813400149345398,
0.11467920243740082,
0.15744489431381226,
0.07760336250066757,
-0.2787342667579651,
0.18829602003097534,
0.31118395924568176,
-0.13739649951457977,
0.04410220682621002,
0.34339380264282227,
0.20764563977718353,
0.12415548413991928,
0.4953250288963318,
-0.45488303899765015,
-0.012738944962620735,
0.23853179812431335,
0.1191616952419281,
0.2489052414894104,
-0.3413989543914795,
0.41672298312187195,
0.05941670387983322,
-0.15239989757537842,
0.16835980117321014,
0.11857405304908752,
0.252301424741745,
0.06449656188488007,
0.303033709526062,
-0.22921223938465118,
0.5794298648834229,
-0.12453284114599228,
0.22463805973529816,
-0.5371655821800232,
-0.367135226726532,
-0.07641153037548065,
0.11477905511856079,
-0.0041755735874176025,
0.2610365152359009,
-0.22160604596138,
0.1758476197719574,
-0.1461973786354065,
-0.06320904195308685,
0.01013520359992981,
-0.06307074427604675,
0.20010904967784882,
-0.13335251808166504,
0.1488475203514099,
0.35864531993865967,
0.14805999398231506,
0.24868300557136536,
0.1941753327846527,
0.3831058442592621,
0.15943174064159393,
-0.058060165494680405,
-0.08178260177373886,
-0.15735077857971191,
-0.048295579850673676,
-0.060648538172245026,
0.014973499812185764,
0.22135256230831146,
0.4881683588027954,
0.18536610901355743,
0.1473270207643509,
-0.18704639375209808,
-0.003737702965736389,
-0.04132576659321785,
0.1639576107263565,
-0.032450057566165924,
-0.04877375811338425,
-0.26662272214889526,
-0.15209262073040009,
-0.41400858759880066,
-0.3449561297893524,
-0.2258777618408203,
0.055468592792749405,
0.04796577990055084,
-0.0629468783736229,
0.04032937437295914,
-0.5452414155006409,
0.12878896296024323,
0.18993021547794342,
0.26233619451522827,
0.010206490755081177,
-0.13300403952598572,
-0.14288555085659027,
-0.3178854286670685,
-0.6774008274078369,
0.31771767139434814,
0.2966037690639496,
-0.07415595650672913,
-0.0731792077422142,
-0.2637529671192169,
0.05558105930685997,
-0.10967220366001129,
0.2235318124294281,
-0.080546535551548,
0.10098918527364731,
0.1883692443370819,
-0.2201191782951355,
-0.038691725581884384,
-0.15935826301574707,
0.08703509718179703,
0.12936116755008698,
-0.056874390691518784,
0.012253288179636002,
-0.2776549756526947,
0.09803097695112228,
-0.23118813335895538,
0.4079146385192871,
-0.3756895661354065,
-0.17061492800712585,
0.5654166340827942,
0.12306109070777893,
0.3854377865791321,
-0.12658581137657166,
-0.023665200918912888,
-0.31747525930404663,
-0.08101946860551834,
-0.08090129494667053,
0.15283527970314026,
0.31460198760032654,
0.2876740097999573,
0.11294514685869217,
-0.47414490580558777,
-0.13633079826831818,
0.03363513574004173,
-0.016655631363391876,
0.3313177227973938,
-0.17693762481212616,
0.07013703137636185,
-0.01181100681424141,
0.12412819266319275,
0.25256016850471497,
0.18195593357086182,
0.04456818103790283,
0.03634726256132126,
-0.3945379853248596,
-0.558017373085022,
0.40711185336112976,
-0.19173049926757812,
-0.36515572667121887,
0.023106999695301056,
0.09199713170528412,
-0.3762664198875427,
-0.23646020889282227,
-0.501125156879425,
0.20713567733764648,
0.11823825538158417,
-0.04679982364177704,
0.14625468850135803,
0.09771843254566193,
-0.2474212944507599,
-0.2713952362537384,
0.059055622667074203,
0.40832558274269104,
0.4402869641780853,
-0.31160110235214233,
-0.09427906572818756,
0.04642174392938614
] |
https://github.com/huggingface/datasets/issues/4439 | TIMIT won't load after manual download: Errors about files that don't exist | To have some context, please see:
- #4145
Please, also note that we have recently made some fixes to the script, which are in our GitHub master branch but not yet released:
- #4422
- #4425
- #4436 | ## Describe the bug
I get the message from HuggingFace that it must be downloaded manually. From the URL provided in the message, I got to UPenn page for manual download. (UPenn apparently want $250? for the dataset??) ...So, ok, I obtained a copy from a friend and also a smaller version from Kaggle. But in both cases the HF dataloader fails; it is looking for files that don't exist anywhere in the dataset: it is looking for files with lower-case letters like "**test*" (all the filenames in both my copies are uppercase) and certain file extensions that exclude the .DOC which is provided in TIMIT:
## Steps to reproduce the bug
```python
data = load_dataset('timit_asr', 'clean')['train']
```
## Expected results
The dataset should load with no errors.
## Actual results
This error message:
```
File "/home/ubuntu/envs/data2vec/lib/python3.9/site-packages/datasets/data_files.py", line 201, in resolve_patterns_locally_or_by_urls
raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to resolve any data file that matches '['**test*', '**eval*']' at /home/ubuntu/datasets/timit with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
But this is a strange sort of error: why is it looking for lower-case file names when all the TIMIT dataset filenames are uppercase? Why does it exclude .DOC files when the only parts of the TIMIT data set with "TEST" in them have ".DOC" extensions? ...I wonder, how was anyone able to get this to work in the first place?
The files in the dataset look like the following:
```
³ PHONCODE.DOC
³ PROMPTS.TXT
³ SPKRINFO.TXT
³ SPKRSENT.TXT
³ TESTSET.DOC
```
...so why are these being excluded by the dataset loader?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-1060-aws-x86_64-with-glibc2.27
- Python version: 3.9.9
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 38 | TIMIT won't load after manual download: Errors about files that don't exist
## Describe the bug
I get the message from HuggingFace that it must be downloaded manually. From the URL provided in the message, I got to UPenn page for manual download. (UPenn apparently want $250? for the dataset??) ...So, ok, I obtained a copy from a friend and also a smaller version from Kaggle. But in both cases the HF dataloader fails; it is looking for files that don't exist anywhere in the dataset: it is looking for files with lower-case letters like "**test*" (all the filenames in both my copies are uppercase) and certain file extensions that exclude the .DOC which is provided in TIMIT:
## Steps to reproduce the bug
```python
data = load_dataset('timit_asr', 'clean')['train']
```
## Expected results
The dataset should load with no errors.
## Actual results
This error message:
```
File "/home/ubuntu/envs/data2vec/lib/python3.9/site-packages/datasets/data_files.py", line 201, in resolve_patterns_locally_or_by_urls
raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to resolve any data file that matches '['**test*', '**eval*']' at /home/ubuntu/datasets/timit with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
But this is a strange sort of error: why is it looking for lower-case file names when all the TIMIT dataset filenames are uppercase? Why does it exclude .DOC files when the only parts of the TIMIT data set with "TEST" in them have ".DOC" extensions? ...I wonder, how was anyone able to get this to work in the first place?
The files in the dataset look like the following:
```
³ PHONCODE.DOC
³ PROMPTS.TXT
³ SPKRINFO.TXT
³ SPKRSENT.TXT
³ TESTSET.DOC
```
...so why are these being excluded by the dataset loader?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-1060-aws-x86_64-with-glibc2.27
- Python version: 3.9.9
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
To have some context, please see:
- #4145
Please, also note that we have recently made some fixes to the script, which are in our GitHub master branch but not yet released:
- #4422
- #4425
- #4436 | [
0.13059167563915253,
-0.2234242707490921,
0.07193812727928162,
0.07531831413507462,
0.14005018770694733,
0.04869215935468674,
-0.008748825639486313,
0.28026852011680603,
-0.49403584003448486,
-0.04652264714241028,
-0.12519943714141846,
0.06427090615034103,
-0.09158769249916077,
0.3849906921386719,
0.33433008193969727,
0.019346266984939575,
-0.10956599563360214,
0.23113465309143066,
-0.28662675619125366,
-0.13452649116516113,
-0.024670617654919624,
0.27009597420692444,
-0.08265211433172226,
0.22900646924972534,
-0.047234147787094116,
0.2566682994365692,
-0.07459703832864761,
0.34244582056999207,
-0.04823379963636398,
-0.38166123628616333,
0.30187737941741943,
-0.02615177258849144,
0.35709720849990845,
0.42065560817718506,
-0.00011999610433122143,
0.2332557886838913,
0.07685218006372452,
-0.18260368704795837,
-0.33623141050338745,
-0.2224069982767105,
0.03170834481716156,
-0.05221150070428848,
0.06414416432380676,
-0.08560286462306976,
0.07315408438444138,
-0.09284266829490662,
0.020451810210943222,
-0.05443931370973587,
0.308518648147583,
0.35939842462539673,
0.10587070882320404,
0.2535859942436218,
0.07730592787265778,
-0.1800018548965454,
0.3382164239883423,
0.23454125225543976,
-0.13421477377414703,
0.2213924527168274,
-0.11911755800247192,
-0.20939211547374725,
0.28564995527267456,
-0.005049470346421003,
0.10494467616081238,
0.01936466619372368,
0.32645073533058167,
0.13874007761478424,
-0.3953189551830292,
-0.4598063826560974,
-0.09108953922986984,
0.3974376916885376,
0.5721790790557861,
-0.16894283890724182,
-0.40964898467063904,
-0.21134158968925476,
0.061998847872018814,
0.06505929678678513,
0.45744389295578003,
0.09171584993600845,
-0.1576252281665802,
0.14726926386356354,
-0.05698010325431824,
-0.15980544686317444,
-0.3094460070133209,
0.17888903617858887,
-0.07500790804624557,
-0.412244588136673,
-0.14672541618347168,
0.0530787855386734,
0.05891229212284088,
-0.05885931849479675,
-0.3773459196090698,
0.1183764711022377,
0.029017867520451546,
0.1991068422794342,
-0.08468398451805115,
-0.18509551882743835,
0.0399121418595314,
-0.2665764391422272,
0.17796313762664795,
0.04682447761297226,
0.3179832100868225,
-0.17238184809684753,
-0.4321182072162628,
-0.16325002908706665,
0.12498337030410767,
0.12064696848392487,
-0.21177178621292114,
-0.21068328619003296,
0.2735435366630554,
0.14911341667175293,
0.14053112268447876,
-0.06866642832756042,
-0.2301270216703415,
-0.1497214436531067,
-0.21407318115234375,
-0.25500282645225525,
0.13318538665771484,
-0.42614448070526123,
-0.5034869909286499,
-0.024723339825868607,
-0.28655508160591125,
0.145034059882164,
-0.19728365540504456,
0.10587702691555023,
-0.2199241816997528,
0.26395925879478455,
0.23206262290477753,
0.13737188279628754,
-0.2323940396308899,
-0.03245176374912262,
0.01947767473757267,
0.09996478259563446,
0.022356588393449783,
-0.011195208877325058,
0.3960835039615631,
-0.48835647106170654,
0.39936861395835876,
0.16536845266819,
0.2590288519859314,
0.34901106357574463,
-0.07225830107927322,
-0.059957779943943024,
-0.05219423025846481,
0.40427473187446594,
-0.0439986027777195,
0.18148654699325562,
-0.0010044500231742859,
-0.09588910639286041,
-0.05182161554694176,
0.03956843912601471,
-0.32998085021972656,
-0.11793863028287888,
0.05959540605545044,
0.09982866793870926,
-0.05795377492904663,
-0.22267332673072815,
-0.23262938857078552,
-0.1437777578830719,
-0.1699838936328888,
-0.18718001246452332,
-0.06731293350458145,
-0.08969336748123169,
-0.0056538693606853485,
-0.1520347148180008,
0.3622722327709198,
0.4651625156402588,
-0.7085107564926147,
0.016606464982032776,
0.3299202620983124,
0.15931423008441925,
-0.024691738188266754,
0.17041614651679993,
-0.11938413232564926,
0.4281507730484009,
-0.5451366901397705,
0.10022252798080444,
0.019980192184448242,
-0.45343905687332153,
-0.22764146327972412,
0.2590521275997162,
-0.11079858988523483,
0.25819405913352966,
0.183477982878685,
-0.04025900363922119,
-0.23013277351856232,
-0.19967038929462433,
0.14774402976036072,
-0.056149959564208984,
0.039542507380247116,
-0.4263516664505005,
-0.23450912535190582,
-0.08119357377290726,
-0.058241553604602814,
0.3736216723918915,
0.2355603128671646,
-0.043570928275585175,
-0.03339063376188278,
0.22602251172065735,
0.31412917375564575,
0.1024978831410408,
-0.07751505076885223,
0.28410184383392334,
-0.0024469122290611267,
0.23864559829235077,
0.08964859694242477,
-0.009448518976569176,
-0.133417546749115,
0.3264275789260864,
-0.05646314471960068,
0.16548746824264526,
-0.00522371381521225,
0.1364055573940277,
-0.3411617577075958,
-0.2605827748775482,
-0.18835878372192383,
-0.2747609317302704,
0.001107439398765564,
0.3970586657524109,
-0.21106018126010895,
0.21500356495380402,
-0.29867562651634216,
0.6568642854690552,
-0.2253342866897583,
0.04352455586194992,
-0.206333726644516,
0.16855838894844055,
0.03025304339826107,
0.044091954827308655,
-0.04472368210554123,
-0.027683019638061523,
-0.08855699747800827,
-0.10078377276659012,
-0.07915804535150528,
0.3475629687309265,
-0.06288539618253708,
-0.2358914464712143,
0.16275590658187866,
0.02977631986141205,
0.32156234979629517,
-0.509870707988739,
-0.29408591985702515,
0.37476158142089844,
0.18460965156555176,
-0.03825603798031807,
-0.27194151282310486,
0.03418184071779251,
-0.31714048981666565,
0.17754003405570984,
0.2744078040122986,
-0.04291613772511482,
0.09950384497642517,
-0.0652836412191391,
-0.023707732558250427,
-0.06969486176967621,
0.39555904269218445,
-0.07467108964920044,
0.06180212274193764,
-0.21922416985034943,
-0.21838337182998657,
-0.005994692444801331,
0.24967749416828156,
-0.06581982970237732,
-0.13304758071899414,
0.3122040331363678,
-0.1294119656085968,
0.3712874948978424,
0.027441920712590218,
-0.10614657402038574,
0.38432806730270386,
0.2278405725955963,
-0.14088788628578186,
0.013056442141532898,
-0.28163406252861023,
-0.07733621448278427,
0.043910034000873566,
-0.006682373583316803,
-0.21330182254314423,
0.40242835879325867,
-0.20236164331436157,
0.32753705978393555,
-0.3146091401576996,
-0.21952295303344727,
-0.1316446214914322,
0.1846168041229248,
-0.558576762676239,
0.00055675208568573,
-0.1416090726852417,
-0.20255175232887268,
0.11468701809644699,
0.0018546171486377716,
-0.3012009263038635,
-0.20908775925636292,
0.047558315098285675,
0.2284720242023468,
0.048806559294462204,
-0.11585488170385361,
-0.26534757018089294,
-0.0037698447704315186,
0.04598456621170044,
-0.17337538301944733,
-0.06969758123159409,
0.08692199736833572,
-0.4549371898174286,
0.031948935240507126,
0.20477329194545746,
-0.07271947711706161,
0.23823966085910797,
-0.6240913271903992,
0.022838670760393143,
-0.33297044038772583,
-0.3063673973083496,
0.23687197268009186,
-0.23327608406543732,
0.5146207809448242,
0.28045040369033813,
0.3294137120246887,
-0.30813324451446533,
-0.07843650877475739,
0.3055580258369446,
-0.08543841540813446,
-0.2523217499256134,
0.1708677113056183,
0.038406237959861755,
0.12680351734161377,
-0.0658503994345665,
-0.564508855342865,
0.09475990384817123,
-0.36042821407318115,
0.21836993098258972,
0.26187852025032043,
-0.03964643180370331,
0.7167624831199646,
0.11471924185752869,
0.3875178098678589,
0.20075297355651855,
0.3205118477344513,
-0.13286344707012177,
-0.2876507043838501,
0.39100486040115356,
0.0290178544819355,
-0.4367161691188812,
0.11626902222633362,
0.17344467341899872,
-0.07919365167617798,
0.173988938331604,
-0.6868883967399597,
0.055386219173669815,
0.043758757412433624,
0.269185870885849,
-0.3503462076187134,
0.13487811386585236,
0.222554013133049,
0.041706886142492294,
-0.07690730690956116,
-0.20552700757980347,
0.029726099222898483,
0.10169534385204315,
0.08173399418592453,
0.17008113861083984,
0.13487638533115387,
0.4021790623664856,
-0.06571637094020844,
0.5830797553062439,
0.13107098639011383,
0.10108505934476852,
0.5865950584411621,
-0.0638299435377121,
0.6118605732917786,
-0.10442011803388596,
-0.39664319157600403,
-0.07865557819604874,
0.03369008004665375,
0.34090888500213623,
0.3698168992996216,
0.24737605452537537,
0.29062938690185547,
-0.4431682825088501,
-0.11605054140090942,
-0.15260180830955505,
-0.1416972428560257,
0.0550442636013031,
-0.22066405415534973,
0.04485393688082695,
0.04169176146388054,
0.14697659015655518,
0.11427859961986542,
-0.18649724125862122,
0.28148743510246277,
0.3399169445037842,
0.23824691772460938,
0.2049608677625656,
-0.31051409244537354,
-0.14590251445770264,
-0.2978819012641907,
-0.003799133002758026,
0.15245524048805237,
0.6194829940795898,
-0.18499860167503357,
-0.2872861921787262,
0.06401357054710388,
0.14068076014518738,
0.6219336986541748,
-0.3462412655353546,
-0.023783117532730103,
0.2081761509180069,
0.15135711431503296,
-0.42944276332855225,
0.026120822876691818,
-0.25151169300079346,
0.22967039048671722,
0.06805197894573212,
0.3560698628425598,
-0.07896014302968979,
-0.262412965297699,
0.07309452444314957,
0.3905855417251587,
-0.08170164376497269,
-0.10171473026275635,
-0.36626845598220825,
-0.5582164525985718,
-0.052034538239240646,
-0.16202712059020996,
-0.056036412715911865,
-0.09454146027565002,
-0.00418127654120326,
0.2018500566482544,
-0.27140453457832336,
-0.1102839931845665,
0.3737683892250061,
0.001562364399433136,
0.35803619027137756,
0.10036743432283401,
0.25771090388298035,
0.3456307649612427,
0.30116888880729675,
0.21103748679161072,
0.5975887179374695,
-0.07285904884338379,
-0.10807281732559204,
0.2938811182975769,
-0.0566677488386631,
0.20521700382232666,
0.2750622034072876,
-0.0973915383219719,
-0.1440763771533966,
-0.09789268672466278,
0.19617553055286407,
-0.30933722853660583,
0.4197697937488556,
0.47012004256248474,
-0.3266209065914154,
-0.321911096572876,
-0.23972217738628387,
0.3531309962272644,
0.08551190793514252,
0.08063754439353943,
0.30136364698410034,
0.4512500762939453,
-0.17436327040195465,
0.05825479328632355,
-0.10814923793077469,
0.96485835313797,
0.08634686470031738,
0.42410504817962646,
0.2731476128101349,
0.015570349991321564,
0.2871118485927582,
-0.6531113982200623,
0.06490188837051392,
-0.03947357460856438,
-0.2112484574317932,
-0.16417399048805237,
0.032140303403139114,
0.03189864754676819,
0.1607661098241806,
-0.0887838751077652,
0.3428167700767517,
0.1657295674085617,
0.6255346536636353,
0.2661729156970978,
0.10462629795074463,
-0.20124179124832153,
-0.15207010507583618,
-0.02400418370962143,
0.05772038549184799,
0.1724970042705536,
0.4606356918811798,
-0.03481356054544449,
-0.17114610970020294,
0.1112372875213623,
-0.11381801217794418,
-0.13834571838378906,
0.17198902368545532,
-0.2746110260486603,
0.11393504589796066,
-0.2728410065174103,
-0.19862772524356842,
0.06022302433848381,
0.10329090058803558,
0.4959219694137573,
0.10174210369586945,
-0.2793689966201782,
-0.0034578628838062286,
-0.010006576776504517,
0.004605376161634922,
0.13465441763401031,
0.1609317511320114,
0.26405656337738037,
-0.14966264367103577,
-0.16538086533546448,
0.2137453556060791,
-0.23469893634319305,
-0.04745084047317505,
-0.09750763326883316,
-0.016420602798461914,
-0.12074950337409973,
-0.366641640663147,
0.2989632487297058,
-0.048104047775268555,
0.01135607436299324,
-0.05559675768017769,
0.07118307799100876,
-0.006342165172100067,
-0.007586900144815445,
0.10078062117099762,
0.015572797507047653,
-0.3224194645881653,
-0.13551567494869232,
0.47019314765930176,
-0.09053612500429153,
0.1410401165485382,
0.5776418447494507,
-0.165363147854805,
-0.037102892994880676,
-0.13420163094997406,
0.2980858087539673,
-0.14159038662910461,
-0.41387656331062317,
-0.021742772310972214,
0.2897656261920929,
0.21961180865764618,
-0.019558541476726532,
0.1328585147857666,
0.4500715732574463,
-0.4380425810813904,
0.05556176230311394,
-0.3779567778110504,
-0.17548397183418274,
0.33542388677597046,
0.22901193797588348,
0.1276339590549469,
0.17116695642471313,
0.026222866028547287,
0.2635115087032318,
-0.33262142539024353,
-0.23842743039131165,
0.04589105397462845,
-0.1744089275598526,
-0.10334400832653046,
-0.02257698029279709,
0.1687028706073761,
0.4020445942878723,
-0.12266620993614197,
0.08316465467214584,
0.06996220350265503,
-0.1796923130750656,
-0.05552487075328827,
-0.04948132485151291,
0.17238017916679382,
0.06559722870588303,
-0.12630511820316315,
0.020033031702041626,
-0.15227212011814117,
-0.10075081884860992,
0.03559419885277748,
-0.00658594723790884,
0.06281445175409317,
0.06262894719839096,
0.2629508972167969,
0.1461334377527237,
0.044335491955280304,
-0.3062107563018799,
0.2715226113796234,
0.10824325680732727,
0.23957645893096924,
0.16633054614067078,
-0.09358970820903778,
-0.29214367270469666,
-0.008857764303684235,
-0.05503569543361664,
0.20640522241592407,
-0.10015475749969482,
-0.29536473751068115,
0.15803170204162598,
-0.6083139181137085,
0.2343273162841797,
-0.08984874188899994,
0.05622750520706177,
0.587246298789978,
-0.22664876282215118,
-0.032285176217556,
0.4322362244129181,
0.11867521703243256,
-0.40948328375816345,
0.12519744038581848,
-0.2633911967277527,
-0.032823361456394196,
0.06194392219185829,
0.16686706244945526,
0.13936631381511688,
-0.29576241970062256,
0.45603400468826294,
0.11161752790212631,
0.0044499351643025875,
0.06570293009281158,
-0.026094183325767517,
0.6122167110443115,
-0.05554936081171036,
0.0002875886857509613,
-0.16558389365673065,
-0.006148036569356918,
-0.05341630429029465,
0.2564135789871216,
-0.19404861330986023,
-0.0947079136967659,
-0.6567636728286743,
0.1833885908126831,
-0.07972446829080582,
-0.483734130859375,
-0.358834832906723,
0.27201372385025024,
0.18464848399162292,
0.0776761919260025,
-0.07021257281303406,
0.8341996073722839,
-0.1932036578655243,
-0.20753762125968933,
-0.24742746353149414,
-0.05433299019932747,
-0.1863216757774353,
0.07885801792144775,
-0.32555752992630005,
-0.3691594898700714,
-0.17381152510643005,
-0.014188436791300774,
0.0128166563808918,
-0.10707621276378632,
0.05665689706802368,
0.28209367394447327,
-0.18892844021320343,
-0.5766676664352417,
-0.2808496952056885,
0.1642872840166092,
0.2782967686653137,
0.06642299890518188,
0.24580402672290802,
0.43150293827056885,
-0.055282190442085266,
0.06347274780273438,
0.3087514638900757,
0.2965126037597656,
0.12089469283819199,
-0.24733537435531616,
0.01643608696758747,
-0.02582063153386116,
0.10251596570014954,
0.07814531773328781,
0.22387149930000305,
-0.14096881449222565,
-0.2442602962255478,
0.2785189747810364,
0.019327161833643913,
-0.0726948007941246,
0.05829787999391556,
-0.22415141761302948,
0.00359535776078701,
-0.4303022623062134,
0.04930320382118225,
-0.1504685878753662,
0.23711895942687988,
-0.047562070190906525,
-0.07336682826280594,
-0.39104682207107544,
0.1572420597076416,
0.378402978181839,
0.15547913312911987,
0.06669151782989502,
-0.09104189276695251,
0.025049321353435516,
-0.07068848609924316,
0.39132291078567505,
0.5155997276306152,
0.032852090895175934,
-0.2225298434495926,
-0.14487387239933014,
-0.6859334111213684,
-0.15517273545265198,
-0.17840933799743652,
-0.2773410677909851,
0.2733473777770996,
-0.018828919157385826,
0.2253720462322235,
0.19111672043800354,
0.3814510703086853,
0.025003686547279358,
-0.13436058163642883,
0.08188716322183609,
-0.2806752026081085,
-0.34761685132980347,
-0.14436398446559906,
0.2842012345790863,
-0.13675671815872192,
-0.45672428607940674,
-0.14176253974437714,
0.05322085693478584,
0.003959152847528458,
-0.1714259684085846,
0.04873162508010864,
0.18342788517475128,
0.2699207067489624,
0.4198942184448242,
-0.1137123703956604,
0.058286529034376144,
0.12960785627365112,
-0.33312302827835083,
0.009339660406112671,
-0.3196184039115906,
-0.0801856517791748,
0.2337351143360138,
0.03603325039148331,
0.05936324596405029,
-0.3031279444694519,
-0.19782496988773346,
-0.14940695464611053,
0.11549503356218338,
0.10891802608966827,
0.15244531631469727,
-0.3151453733444214,
0.08340480178594589,
-0.14577573537826538,
0.17781208455562592,
-0.007681778632104397,
0.41690823435783386,
-0.16385067999362946,
0.10254727303981781,
-0.630989134311676,
-0.5317299962043762,
0.5684304237365723,
-0.1902931183576584,
0.03678549453616142,
0.21119241416454315,
0.05632678046822548,
0.07067717611789703,
0.1103917807340622,
-0.34867048263549805,
-0.026126310229301453,
0.41669800877571106,
0.17730513215065002,
-0.10796447098255157,
0.21490508317947388,
-0.2570026218891144,
0.085860475897789,
0.029150519520044327,
0.6684761047363281,
0.023873168975114822,
-0.2641795575618744,
0.12179635465145111,
-0.09721451252698898
] |
https://github.com/huggingface/datasets/issues/4439 | TIMIT won't load after manual download: Errors about files that don't exist | Thanks Albert! I'll try pulling `datasets` from the git repo instead of PyPI, and/or just wait for the next release.
| ## Describe the bug
I get the message from HuggingFace that it must be downloaded manually. From the URL provided in the message, I got to UPenn page for manual download. (UPenn apparently want $250? for the dataset??) ...So, ok, I obtained a copy from a friend and also a smaller version from Kaggle. But in both cases the HF dataloader fails; it is looking for files that don't exist anywhere in the dataset: it is looking for files with lower-case letters like "**test*" (all the filenames in both my copies are uppercase) and certain file extensions that exclude the .DOC which is provided in TIMIT:
## Steps to reproduce the bug
```python
data = load_dataset('timit_asr', 'clean')['train']
```
## Expected results
The dataset should load with no errors.
## Actual results
This error message:
```
File "/home/ubuntu/envs/data2vec/lib/python3.9/site-packages/datasets/data_files.py", line 201, in resolve_patterns_locally_or_by_urls
raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to resolve any data file that matches '['**test*', '**eval*']' at /home/ubuntu/datasets/timit with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
But this is a strange sort of error: why is it looking for lower-case file names when all the TIMIT dataset filenames are uppercase? Why does it exclude .DOC files when the only parts of the TIMIT data set with "TEST" in them have ".DOC" extensions? ...I wonder, how was anyone able to get this to work in the first place?
The files in the dataset look like the following:
```
³ PHONCODE.DOC
³ PROMPTS.TXT
³ SPKRINFO.TXT
³ SPKRSENT.TXT
³ TESTSET.DOC
```
...so why are these being excluded by the dataset loader?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-1060-aws-x86_64-with-glibc2.27
- Python version: 3.9.9
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 20 | TIMIT won't load after manual download: Errors about files that don't exist
## Describe the bug
I get the message from HuggingFace that it must be downloaded manually. From the URL provided in the message, I got to UPenn page for manual download. (UPenn apparently want $250? for the dataset??) ...So, ok, I obtained a copy from a friend and also a smaller version from Kaggle. But in both cases the HF dataloader fails; it is looking for files that don't exist anywhere in the dataset: it is looking for files with lower-case letters like "**test*" (all the filenames in both my copies are uppercase) and certain file extensions that exclude the .DOC which is provided in TIMIT:
## Steps to reproduce the bug
```python
data = load_dataset('timit_asr', 'clean')['train']
```
## Expected results
The dataset should load with no errors.
## Actual results
This error message:
```
File "/home/ubuntu/envs/data2vec/lib/python3.9/site-packages/datasets/data_files.py", line 201, in resolve_patterns_locally_or_by_urls
raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to resolve any data file that matches '['**test*', '**eval*']' at /home/ubuntu/datasets/timit with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
But this is a strange sort of error: why is it looking for lower-case file names when all the TIMIT dataset filenames are uppercase? Why does it exclude .DOC files when the only parts of the TIMIT data set with "TEST" in them have ".DOC" extensions? ...I wonder, how was anyone able to get this to work in the first place?
The files in the dataset look like the following:
```
³ PHONCODE.DOC
³ PROMPTS.TXT
³ SPKRINFO.TXT
³ SPKRSENT.TXT
³ TESTSET.DOC
```
...so why are these being excluded by the dataset loader?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-1060-aws-x86_64-with-glibc2.27
- Python version: 3.9.9
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Thanks Albert! I'll try pulling `datasets` from the git repo instead of PyPI, and/or just wait for the next release.
| [
0.13059167563915253,
-0.2234242707490921,
0.07193812727928162,
0.07531831413507462,
0.14005018770694733,
0.04869215935468674,
-0.008748825639486313,
0.28026852011680603,
-0.49403584003448486,
-0.04652264714241028,
-0.12519943714141846,
0.06427090615034103,
-0.09158769249916077,
0.3849906921386719,
0.33433008193969727,
0.019346266984939575,
-0.10956599563360214,
0.23113465309143066,
-0.28662675619125366,
-0.13452649116516113,
-0.024670617654919624,
0.27009597420692444,
-0.08265211433172226,
0.22900646924972534,
-0.047234147787094116,
0.2566682994365692,
-0.07459703832864761,
0.34244582056999207,
-0.04823379963636398,
-0.38166123628616333,
0.30187737941741943,
-0.02615177258849144,
0.35709720849990845,
0.42065560817718506,
-0.00011999610433122143,
0.2332557886838913,
0.07685218006372452,
-0.18260368704795837,
-0.33623141050338745,
-0.2224069982767105,
0.03170834481716156,
-0.05221150070428848,
0.06414416432380676,
-0.08560286462306976,
0.07315408438444138,
-0.09284266829490662,
0.020451810210943222,
-0.05443931370973587,
0.308518648147583,
0.35939842462539673,
0.10587070882320404,
0.2535859942436218,
0.07730592787265778,
-0.1800018548965454,
0.3382164239883423,
0.23454125225543976,
-0.13421477377414703,
0.2213924527168274,
-0.11911755800247192,
-0.20939211547374725,
0.28564995527267456,
-0.005049470346421003,
0.10494467616081238,
0.01936466619372368,
0.32645073533058167,
0.13874007761478424,
-0.3953189551830292,
-0.4598063826560974,
-0.09108953922986984,
0.3974376916885376,
0.5721790790557861,
-0.16894283890724182,
-0.40964898467063904,
-0.21134158968925476,
0.061998847872018814,
0.06505929678678513,
0.45744389295578003,
0.09171584993600845,
-0.1576252281665802,
0.14726926386356354,
-0.05698010325431824,
-0.15980544686317444,
-0.3094460070133209,
0.17888903617858887,
-0.07500790804624557,
-0.412244588136673,
-0.14672541618347168,
0.0530787855386734,
0.05891229212284088,
-0.05885931849479675,
-0.3773459196090698,
0.1183764711022377,
0.029017867520451546,
0.1991068422794342,
-0.08468398451805115,
-0.18509551882743835,
0.0399121418595314,
-0.2665764391422272,
0.17796313762664795,
0.04682447761297226,
0.3179832100868225,
-0.17238184809684753,
-0.4321182072162628,
-0.16325002908706665,
0.12498337030410767,
0.12064696848392487,
-0.21177178621292114,
-0.21068328619003296,
0.2735435366630554,
0.14911341667175293,
0.14053112268447876,
-0.06866642832756042,
-0.2301270216703415,
-0.1497214436531067,
-0.21407318115234375,
-0.25500282645225525,
0.13318538665771484,
-0.42614448070526123,
-0.5034869909286499,
-0.024723339825868607,
-0.28655508160591125,
0.145034059882164,
-0.19728365540504456,
0.10587702691555023,
-0.2199241816997528,
0.26395925879478455,
0.23206262290477753,
0.13737188279628754,
-0.2323940396308899,
-0.03245176374912262,
0.01947767473757267,
0.09996478259563446,
0.022356588393449783,
-0.011195208877325058,
0.3960835039615631,
-0.48835647106170654,
0.39936861395835876,
0.16536845266819,
0.2590288519859314,
0.34901106357574463,
-0.07225830107927322,
-0.059957779943943024,
-0.05219423025846481,
0.40427473187446594,
-0.0439986027777195,
0.18148654699325562,
-0.0010044500231742859,
-0.09588910639286041,
-0.05182161554694176,
0.03956843912601471,
-0.32998085021972656,
-0.11793863028287888,
0.05959540605545044,
0.09982866793870926,
-0.05795377492904663,
-0.22267332673072815,
-0.23262938857078552,
-0.1437777578830719,
-0.1699838936328888,
-0.18718001246452332,
-0.06731293350458145,
-0.08969336748123169,
-0.0056538693606853485,
-0.1520347148180008,
0.3622722327709198,
0.4651625156402588,
-0.7085107564926147,
0.016606464982032776,
0.3299202620983124,
0.15931423008441925,
-0.024691738188266754,
0.17041614651679993,
-0.11938413232564926,
0.4281507730484009,
-0.5451366901397705,
0.10022252798080444,
0.019980192184448242,
-0.45343905687332153,
-0.22764146327972412,
0.2590521275997162,
-0.11079858988523483,
0.25819405913352966,
0.183477982878685,
-0.04025900363922119,
-0.23013277351856232,
-0.19967038929462433,
0.14774402976036072,
-0.056149959564208984,
0.039542507380247116,
-0.4263516664505005,
-0.23450912535190582,
-0.08119357377290726,
-0.058241553604602814,
0.3736216723918915,
0.2355603128671646,
-0.043570928275585175,
-0.03339063376188278,
0.22602251172065735,
0.31412917375564575,
0.1024978831410408,
-0.07751505076885223,
0.28410184383392334,
-0.0024469122290611267,
0.23864559829235077,
0.08964859694242477,
-0.009448518976569176,
-0.133417546749115,
0.3264275789260864,
-0.05646314471960068,
0.16548746824264526,
-0.00522371381521225,
0.1364055573940277,
-0.3411617577075958,
-0.2605827748775482,
-0.18835878372192383,
-0.2747609317302704,
0.001107439398765564,
0.3970586657524109,
-0.21106018126010895,
0.21500356495380402,
-0.29867562651634216,
0.6568642854690552,
-0.2253342866897583,
0.04352455586194992,
-0.206333726644516,
0.16855838894844055,
0.03025304339826107,
0.044091954827308655,
-0.04472368210554123,
-0.027683019638061523,
-0.08855699747800827,
-0.10078377276659012,
-0.07915804535150528,
0.3475629687309265,
-0.06288539618253708,
-0.2358914464712143,
0.16275590658187866,
0.02977631986141205,
0.32156234979629517,
-0.509870707988739,
-0.29408591985702515,
0.37476158142089844,
0.18460965156555176,
-0.03825603798031807,
-0.27194151282310486,
0.03418184071779251,
-0.31714048981666565,
0.17754003405570984,
0.2744078040122986,
-0.04291613772511482,
0.09950384497642517,
-0.0652836412191391,
-0.023707732558250427,
-0.06969486176967621,
0.39555904269218445,
-0.07467108964920044,
0.06180212274193764,
-0.21922416985034943,
-0.21838337182998657,
-0.005994692444801331,
0.24967749416828156,
-0.06581982970237732,
-0.13304758071899414,
0.3122040331363678,
-0.1294119656085968,
0.3712874948978424,
0.027441920712590218,
-0.10614657402038574,
0.38432806730270386,
0.2278405725955963,
-0.14088788628578186,
0.013056442141532898,
-0.28163406252861023,
-0.07733621448278427,
0.043910034000873566,
-0.006682373583316803,
-0.21330182254314423,
0.40242835879325867,
-0.20236164331436157,
0.32753705978393555,
-0.3146091401576996,
-0.21952295303344727,
-0.1316446214914322,
0.1846168041229248,
-0.558576762676239,
0.00055675208568573,
-0.1416090726852417,
-0.20255175232887268,
0.11468701809644699,
0.0018546171486377716,
-0.3012009263038635,
-0.20908775925636292,
0.047558315098285675,
0.2284720242023468,
0.048806559294462204,
-0.11585488170385361,
-0.26534757018089294,
-0.0037698447704315186,
0.04598456621170044,
-0.17337538301944733,
-0.06969758123159409,
0.08692199736833572,
-0.4549371898174286,
0.031948935240507126,
0.20477329194545746,
-0.07271947711706161,
0.23823966085910797,
-0.6240913271903992,
0.022838670760393143,
-0.33297044038772583,
-0.3063673973083496,
0.23687197268009186,
-0.23327608406543732,
0.5146207809448242,
0.28045040369033813,
0.3294137120246887,
-0.30813324451446533,
-0.07843650877475739,
0.3055580258369446,
-0.08543841540813446,
-0.2523217499256134,
0.1708677113056183,
0.038406237959861755,
0.12680351734161377,
-0.0658503994345665,
-0.564508855342865,
0.09475990384817123,
-0.36042821407318115,
0.21836993098258972,
0.26187852025032043,
-0.03964643180370331,
0.7167624831199646,
0.11471924185752869,
0.3875178098678589,
0.20075297355651855,
0.3205118477344513,
-0.13286344707012177,
-0.2876507043838501,
0.39100486040115356,
0.0290178544819355,
-0.4367161691188812,
0.11626902222633362,
0.17344467341899872,
-0.07919365167617798,
0.173988938331604,
-0.6868883967399597,
0.055386219173669815,
0.043758757412433624,
0.269185870885849,
-0.3503462076187134,
0.13487811386585236,
0.222554013133049,
0.041706886142492294,
-0.07690730690956116,
-0.20552700757980347,
0.029726099222898483,
0.10169534385204315,
0.08173399418592453,
0.17008113861083984,
0.13487638533115387,
0.4021790623664856,
-0.06571637094020844,
0.5830797553062439,
0.13107098639011383,
0.10108505934476852,
0.5865950584411621,
-0.0638299435377121,
0.6118605732917786,
-0.10442011803388596,
-0.39664319157600403,
-0.07865557819604874,
0.03369008004665375,
0.34090888500213623,
0.3698168992996216,
0.24737605452537537,
0.29062938690185547,
-0.4431682825088501,
-0.11605054140090942,
-0.15260180830955505,
-0.1416972428560257,
0.0550442636013031,
-0.22066405415534973,
0.04485393688082695,
0.04169176146388054,
0.14697659015655518,
0.11427859961986542,
-0.18649724125862122,
0.28148743510246277,
0.3399169445037842,
0.23824691772460938,
0.2049608677625656,
-0.31051409244537354,
-0.14590251445770264,
-0.2978819012641907,
-0.003799133002758026,
0.15245524048805237,
0.6194829940795898,
-0.18499860167503357,
-0.2872861921787262,
0.06401357054710388,
0.14068076014518738,
0.6219336986541748,
-0.3462412655353546,
-0.023783117532730103,
0.2081761509180069,
0.15135711431503296,
-0.42944276332855225,
0.026120822876691818,
-0.25151169300079346,
0.22967039048671722,
0.06805197894573212,
0.3560698628425598,
-0.07896014302968979,
-0.262412965297699,
0.07309452444314957,
0.3905855417251587,
-0.08170164376497269,
-0.10171473026275635,
-0.36626845598220825,
-0.5582164525985718,
-0.052034538239240646,
-0.16202712059020996,
-0.056036412715911865,
-0.09454146027565002,
-0.00418127654120326,
0.2018500566482544,
-0.27140453457832336,
-0.1102839931845665,
0.3737683892250061,
0.001562364399433136,
0.35803619027137756,
0.10036743432283401,
0.25771090388298035,
0.3456307649612427,
0.30116888880729675,
0.21103748679161072,
0.5975887179374695,
-0.07285904884338379,
-0.10807281732559204,
0.2938811182975769,
-0.0566677488386631,
0.20521700382232666,
0.2750622034072876,
-0.0973915383219719,
-0.1440763771533966,
-0.09789268672466278,
0.19617553055286407,
-0.30933722853660583,
0.4197697937488556,
0.47012004256248474,
-0.3266209065914154,
-0.321911096572876,
-0.23972217738628387,
0.3531309962272644,
0.08551190793514252,
0.08063754439353943,
0.30136364698410034,
0.4512500762939453,
-0.17436327040195465,
0.05825479328632355,
-0.10814923793077469,
0.96485835313797,
0.08634686470031738,
0.42410504817962646,
0.2731476128101349,
0.015570349991321564,
0.2871118485927582,
-0.6531113982200623,
0.06490188837051392,
-0.03947357460856438,
-0.2112484574317932,
-0.16417399048805237,
0.032140303403139114,
0.03189864754676819,
0.1607661098241806,
-0.0887838751077652,
0.3428167700767517,
0.1657295674085617,
0.6255346536636353,
0.2661729156970978,
0.10462629795074463,
-0.20124179124832153,
-0.15207010507583618,
-0.02400418370962143,
0.05772038549184799,
0.1724970042705536,
0.4606356918811798,
-0.03481356054544449,
-0.17114610970020294,
0.1112372875213623,
-0.11381801217794418,
-0.13834571838378906,
0.17198902368545532,
-0.2746110260486603,
0.11393504589796066,
-0.2728410065174103,
-0.19862772524356842,
0.06022302433848381,
0.10329090058803558,
0.4959219694137573,
0.10174210369586945,
-0.2793689966201782,
-0.0034578628838062286,
-0.010006576776504517,
0.004605376161634922,
0.13465441763401031,
0.1609317511320114,
0.26405656337738037,
-0.14966264367103577,
-0.16538086533546448,
0.2137453556060791,
-0.23469893634319305,
-0.04745084047317505,
-0.09750763326883316,
-0.016420602798461914,
-0.12074950337409973,
-0.366641640663147,
0.2989632487297058,
-0.048104047775268555,
0.01135607436299324,
-0.05559675768017769,
0.07118307799100876,
-0.006342165172100067,
-0.007586900144815445,
0.10078062117099762,
0.015572797507047653,
-0.3224194645881653,
-0.13551567494869232,
0.47019314765930176,
-0.09053612500429153,
0.1410401165485382,
0.5776418447494507,
-0.165363147854805,
-0.037102892994880676,
-0.13420163094997406,
0.2980858087539673,
-0.14159038662910461,
-0.41387656331062317,
-0.021742772310972214,
0.2897656261920929,
0.21961180865764618,
-0.019558541476726532,
0.1328585147857666,
0.4500715732574463,
-0.4380425810813904,
0.05556176230311394,
-0.3779567778110504,
-0.17548397183418274,
0.33542388677597046,
0.22901193797588348,
0.1276339590549469,
0.17116695642471313,
0.026222866028547287,
0.2635115087032318,
-0.33262142539024353,
-0.23842743039131165,
0.04589105397462845,
-0.1744089275598526,
-0.10334400832653046,
-0.02257698029279709,
0.1687028706073761,
0.4020445942878723,
-0.12266620993614197,
0.08316465467214584,
0.06996220350265503,
-0.1796923130750656,
-0.05552487075328827,
-0.04948132485151291,
0.17238017916679382,
0.06559722870588303,
-0.12630511820316315,
0.020033031702041626,
-0.15227212011814117,
-0.10075081884860992,
0.03559419885277748,
-0.00658594723790884,
0.06281445175409317,
0.06262894719839096,
0.2629508972167969,
0.1461334377527237,
0.044335491955280304,
-0.3062107563018799,
0.2715226113796234,
0.10824325680732727,
0.23957645893096924,
0.16633054614067078,
-0.09358970820903778,
-0.29214367270469666,
-0.008857764303684235,
-0.05503569543361664,
0.20640522241592407,
-0.10015475749969482,
-0.29536473751068115,
0.15803170204162598,
-0.6083139181137085,
0.2343273162841797,
-0.08984874188899994,
0.05622750520706177,
0.587246298789978,
-0.22664876282215118,
-0.032285176217556,
0.4322362244129181,
0.11867521703243256,
-0.40948328375816345,
0.12519744038581848,
-0.2633911967277527,
-0.032823361456394196,
0.06194392219185829,
0.16686706244945526,
0.13936631381511688,
-0.29576241970062256,
0.45603400468826294,
0.11161752790212631,
0.0044499351643025875,
0.06570293009281158,
-0.026094183325767517,
0.6122167110443115,
-0.05554936081171036,
0.0002875886857509613,
-0.16558389365673065,
-0.006148036569356918,
-0.05341630429029465,
0.2564135789871216,
-0.19404861330986023,
-0.0947079136967659,
-0.6567636728286743,
0.1833885908126831,
-0.07972446829080582,
-0.483734130859375,
-0.358834832906723,
0.27201372385025024,
0.18464848399162292,
0.0776761919260025,
-0.07021257281303406,
0.8341996073722839,
-0.1932036578655243,
-0.20753762125968933,
-0.24742746353149414,
-0.05433299019932747,
-0.1863216757774353,
0.07885801792144775,
-0.32555752992630005,
-0.3691594898700714,
-0.17381152510643005,
-0.014188436791300774,
0.0128166563808918,
-0.10707621276378632,
0.05665689706802368,
0.28209367394447327,
-0.18892844021320343,
-0.5766676664352417,
-0.2808496952056885,
0.1642872840166092,
0.2782967686653137,
0.06642299890518188,
0.24580402672290802,
0.43150293827056885,
-0.055282190442085266,
0.06347274780273438,
0.3087514638900757,
0.2965126037597656,
0.12089469283819199,
-0.24733537435531616,
0.01643608696758747,
-0.02582063153386116,
0.10251596570014954,
0.07814531773328781,
0.22387149930000305,
-0.14096881449222565,
-0.2442602962255478,
0.2785189747810364,
0.019327161833643913,
-0.0726948007941246,
0.05829787999391556,
-0.22415141761302948,
0.00359535776078701,
-0.4303022623062134,
0.04930320382118225,
-0.1504685878753662,
0.23711895942687988,
-0.047562070190906525,
-0.07336682826280594,
-0.39104682207107544,
0.1572420597076416,
0.378402978181839,
0.15547913312911987,
0.06669151782989502,
-0.09104189276695251,
0.025049321353435516,
-0.07068848609924316,
0.39132291078567505,
0.5155997276306152,
0.032852090895175934,
-0.2225298434495926,
-0.14487387239933014,
-0.6859334111213684,
-0.15517273545265198,
-0.17840933799743652,
-0.2773410677909851,
0.2733473777770996,
-0.018828919157385826,
0.2253720462322235,
0.19111672043800354,
0.3814510703086853,
0.025003686547279358,
-0.13436058163642883,
0.08188716322183609,
-0.2806752026081085,
-0.34761685132980347,
-0.14436398446559906,
0.2842012345790863,
-0.13675671815872192,
-0.45672428607940674,
-0.14176253974437714,
0.05322085693478584,
0.003959152847528458,
-0.1714259684085846,
0.04873162508010864,
0.18342788517475128,
0.2699207067489624,
0.4198942184448242,
-0.1137123703956604,
0.058286529034376144,
0.12960785627365112,
-0.33312302827835083,
0.009339660406112671,
-0.3196184039115906,
-0.0801856517791748,
0.2337351143360138,
0.03603325039148331,
0.05936324596405029,
-0.3031279444694519,
-0.19782496988773346,
-0.14940695464611053,
0.11549503356218338,
0.10891802608966827,
0.15244531631469727,
-0.3151453733444214,
0.08340480178594589,
-0.14577573537826538,
0.17781208455562592,
-0.007681778632104397,
0.41690823435783386,
-0.16385067999362946,
0.10254727303981781,
-0.630989134311676,
-0.5317299962043762,
0.5684304237365723,
-0.1902931183576584,
0.03678549453616142,
0.21119241416454315,
0.05632678046822548,
0.07067717611789703,
0.1103917807340622,
-0.34867048263549805,
-0.026126310229301453,
0.41669800877571106,
0.17730513215065002,
-0.10796447098255157,
0.21490508317947388,
-0.2570026218891144,
0.085860475897789,
0.029150519520044327,
0.6684761047363281,
0.023873168975114822,
-0.2641795575618744,
0.12179635465145111,
-0.09721451252698898
] |
https://github.com/huggingface/datasets/issues/4439 | TIMIT won't load after manual download: Errors about files that don't exist | I'm closing this issue then. Please, feel free to reopen it again if the problem persists. | ## Describe the bug
I get the message from HuggingFace that it must be downloaded manually. From the URL provided in the message, I got to UPenn page for manual download. (UPenn apparently want $250? for the dataset??) ...So, ok, I obtained a copy from a friend and also a smaller version from Kaggle. But in both cases the HF dataloader fails; it is looking for files that don't exist anywhere in the dataset: it is looking for files with lower-case letters like "**test*" (all the filenames in both my copies are uppercase) and certain file extensions that exclude the .DOC which is provided in TIMIT:
## Steps to reproduce the bug
```python
data = load_dataset('timit_asr', 'clean')['train']
```
## Expected results
The dataset should load with no errors.
## Actual results
This error message:
```
File "/home/ubuntu/envs/data2vec/lib/python3.9/site-packages/datasets/data_files.py", line 201, in resolve_patterns_locally_or_by_urls
raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to resolve any data file that matches '['**test*', '**eval*']' at /home/ubuntu/datasets/timit with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
But this is a strange sort of error: why is it looking for lower-case file names when all the TIMIT dataset filenames are uppercase? Why does it exclude .DOC files when the only parts of the TIMIT data set with "TEST" in them have ".DOC" extensions? ...I wonder, how was anyone able to get this to work in the first place?
The files in the dataset look like the following:
```
³ PHONCODE.DOC
³ PROMPTS.TXT
³ SPKRINFO.TXT
³ SPKRSENT.TXT
³ TESTSET.DOC
```
...so why are these being excluded by the dataset loader?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-1060-aws-x86_64-with-glibc2.27
- Python version: 3.9.9
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 16 | TIMIT won't load after manual download: Errors about files that don't exist
## Describe the bug
I get the message from HuggingFace that it must be downloaded manually. From the URL provided in the message, I got to UPenn page for manual download. (UPenn apparently want $250? for the dataset??) ...So, ok, I obtained a copy from a friend and also a smaller version from Kaggle. But in both cases the HF dataloader fails; it is looking for files that don't exist anywhere in the dataset: it is looking for files with lower-case letters like "**test*" (all the filenames in both my copies are uppercase) and certain file extensions that exclude the .DOC which is provided in TIMIT:
## Steps to reproduce the bug
```python
data = load_dataset('timit_asr', 'clean')['train']
```
## Expected results
The dataset should load with no errors.
## Actual results
This error message:
```
File "/home/ubuntu/envs/data2vec/lib/python3.9/site-packages/datasets/data_files.py", line 201, in resolve_patterns_locally_or_by_urls
raise FileNotFoundError(error_msg)
FileNotFoundError: Unable to resolve any data file that matches '['**test*', '**eval*']' at /home/ubuntu/datasets/timit with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']
```
But this is a strange sort of error: why is it looking for lower-case file names when all the TIMIT dataset filenames are uppercase? Why does it exclude .DOC files when the only parts of the TIMIT data set with "TEST" in them have ".DOC" extensions? ...I wonder, how was anyone able to get this to work in the first place?
The files in the dataset look like the following:
```
³ PHONCODE.DOC
³ PROMPTS.TXT
³ SPKRINFO.TXT
³ SPKRSENT.TXT
³ TESTSET.DOC
```
...so why are these being excluded by the dataset loader?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-1060-aws-x86_64-with-glibc2.27
- Python version: 3.9.9
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
I'm closing this issue then. Please, feel free to reopen it again if the problem persists. | [
0.13059167563915253,
-0.2234242707490921,
0.07193812727928162,
0.07531831413507462,
0.14005018770694733,
0.04869215935468674,
-0.008748825639486313,
0.28026852011680603,
-0.49403584003448486,
-0.04652264714241028,
-0.12519943714141846,
0.06427090615034103,
-0.09158769249916077,
0.3849906921386719,
0.33433008193969727,
0.019346266984939575,
-0.10956599563360214,
0.23113465309143066,
-0.28662675619125366,
-0.13452649116516113,
-0.024670617654919624,
0.27009597420692444,
-0.08265211433172226,
0.22900646924972534,
-0.047234147787094116,
0.2566682994365692,
-0.07459703832864761,
0.34244582056999207,
-0.04823379963636398,
-0.38166123628616333,
0.30187737941741943,
-0.02615177258849144,
0.35709720849990845,
0.42065560817718506,
-0.00011999610433122143,
0.2332557886838913,
0.07685218006372452,
-0.18260368704795837,
-0.33623141050338745,
-0.2224069982767105,
0.03170834481716156,
-0.05221150070428848,
0.06414416432380676,
-0.08560286462306976,
0.07315408438444138,
-0.09284266829490662,
0.020451810210943222,
-0.05443931370973587,
0.308518648147583,
0.35939842462539673,
0.10587070882320404,
0.2535859942436218,
0.07730592787265778,
-0.1800018548965454,
0.3382164239883423,
0.23454125225543976,
-0.13421477377414703,
0.2213924527168274,
-0.11911755800247192,
-0.20939211547374725,
0.28564995527267456,
-0.005049470346421003,
0.10494467616081238,
0.01936466619372368,
0.32645073533058167,
0.13874007761478424,
-0.3953189551830292,
-0.4598063826560974,
-0.09108953922986984,
0.3974376916885376,
0.5721790790557861,
-0.16894283890724182,
-0.40964898467063904,
-0.21134158968925476,
0.061998847872018814,
0.06505929678678513,
0.45744389295578003,
0.09171584993600845,
-0.1576252281665802,
0.14726926386356354,
-0.05698010325431824,
-0.15980544686317444,
-0.3094460070133209,
0.17888903617858887,
-0.07500790804624557,
-0.412244588136673,
-0.14672541618347168,
0.0530787855386734,
0.05891229212284088,
-0.05885931849479675,
-0.3773459196090698,
0.1183764711022377,
0.029017867520451546,
0.1991068422794342,
-0.08468398451805115,
-0.18509551882743835,
0.0399121418595314,
-0.2665764391422272,
0.17796313762664795,
0.04682447761297226,
0.3179832100868225,
-0.17238184809684753,
-0.4321182072162628,
-0.16325002908706665,
0.12498337030410767,
0.12064696848392487,
-0.21177178621292114,
-0.21068328619003296,
0.2735435366630554,
0.14911341667175293,
0.14053112268447876,
-0.06866642832756042,
-0.2301270216703415,
-0.1497214436531067,
-0.21407318115234375,
-0.25500282645225525,
0.13318538665771484,
-0.42614448070526123,
-0.5034869909286499,
-0.024723339825868607,
-0.28655508160591125,
0.145034059882164,
-0.19728365540504456,
0.10587702691555023,
-0.2199241816997528,
0.26395925879478455,
0.23206262290477753,
0.13737188279628754,
-0.2323940396308899,
-0.03245176374912262,
0.01947767473757267,
0.09996478259563446,
0.022356588393449783,
-0.011195208877325058,
0.3960835039615631,
-0.48835647106170654,
0.39936861395835876,
0.16536845266819,
0.2590288519859314,
0.34901106357574463,
-0.07225830107927322,
-0.059957779943943024,
-0.05219423025846481,
0.40427473187446594,
-0.0439986027777195,
0.18148654699325562,
-0.0010044500231742859,
-0.09588910639286041,
-0.05182161554694176,
0.03956843912601471,
-0.32998085021972656,
-0.11793863028287888,
0.05959540605545044,
0.09982866793870926,
-0.05795377492904663,
-0.22267332673072815,
-0.23262938857078552,
-0.1437777578830719,
-0.1699838936328888,
-0.18718001246452332,
-0.06731293350458145,
-0.08969336748123169,
-0.0056538693606853485,
-0.1520347148180008,
0.3622722327709198,
0.4651625156402588,
-0.7085107564926147,
0.016606464982032776,
0.3299202620983124,
0.15931423008441925,
-0.024691738188266754,
0.17041614651679993,
-0.11938413232564926,
0.4281507730484009,
-0.5451366901397705,
0.10022252798080444,
0.019980192184448242,
-0.45343905687332153,
-0.22764146327972412,
0.2590521275997162,
-0.11079858988523483,
0.25819405913352966,
0.183477982878685,
-0.04025900363922119,
-0.23013277351856232,
-0.19967038929462433,
0.14774402976036072,
-0.056149959564208984,
0.039542507380247116,
-0.4263516664505005,
-0.23450912535190582,
-0.08119357377290726,
-0.058241553604602814,
0.3736216723918915,
0.2355603128671646,
-0.043570928275585175,
-0.03339063376188278,
0.22602251172065735,
0.31412917375564575,
0.1024978831410408,
-0.07751505076885223,
0.28410184383392334,
-0.0024469122290611267,
0.23864559829235077,
0.08964859694242477,
-0.009448518976569176,
-0.133417546749115,
0.3264275789260864,
-0.05646314471960068,
0.16548746824264526,
-0.00522371381521225,
0.1364055573940277,
-0.3411617577075958,
-0.2605827748775482,
-0.18835878372192383,
-0.2747609317302704,
0.001107439398765564,
0.3970586657524109,
-0.21106018126010895,
0.21500356495380402,
-0.29867562651634216,
0.6568642854690552,
-0.2253342866897583,
0.04352455586194992,
-0.206333726644516,
0.16855838894844055,
0.03025304339826107,
0.044091954827308655,
-0.04472368210554123,
-0.027683019638061523,
-0.08855699747800827,
-0.10078377276659012,
-0.07915804535150528,
0.3475629687309265,
-0.06288539618253708,
-0.2358914464712143,
0.16275590658187866,
0.02977631986141205,
0.32156234979629517,
-0.509870707988739,
-0.29408591985702515,
0.37476158142089844,
0.18460965156555176,
-0.03825603798031807,
-0.27194151282310486,
0.03418184071779251,
-0.31714048981666565,
0.17754003405570984,
0.2744078040122986,
-0.04291613772511482,
0.09950384497642517,
-0.0652836412191391,
-0.023707732558250427,
-0.06969486176967621,
0.39555904269218445,
-0.07467108964920044,
0.06180212274193764,
-0.21922416985034943,
-0.21838337182998657,
-0.005994692444801331,
0.24967749416828156,
-0.06581982970237732,
-0.13304758071899414,
0.3122040331363678,
-0.1294119656085968,
0.3712874948978424,
0.027441920712590218,
-0.10614657402038574,
0.38432806730270386,
0.2278405725955963,
-0.14088788628578186,
0.013056442141532898,
-0.28163406252861023,
-0.07733621448278427,
0.043910034000873566,
-0.006682373583316803,
-0.21330182254314423,
0.40242835879325867,
-0.20236164331436157,
0.32753705978393555,
-0.3146091401576996,
-0.21952295303344727,
-0.1316446214914322,
0.1846168041229248,
-0.558576762676239,
0.00055675208568573,
-0.1416090726852417,
-0.20255175232887268,
0.11468701809644699,
0.0018546171486377716,
-0.3012009263038635,
-0.20908775925636292,
0.047558315098285675,
0.2284720242023468,
0.048806559294462204,
-0.11585488170385361,
-0.26534757018089294,
-0.0037698447704315186,
0.04598456621170044,
-0.17337538301944733,
-0.06969758123159409,
0.08692199736833572,
-0.4549371898174286,
0.031948935240507126,
0.20477329194545746,
-0.07271947711706161,
0.23823966085910797,
-0.6240913271903992,
0.022838670760393143,
-0.33297044038772583,
-0.3063673973083496,
0.23687197268009186,
-0.23327608406543732,
0.5146207809448242,
0.28045040369033813,
0.3294137120246887,
-0.30813324451446533,
-0.07843650877475739,
0.3055580258369446,
-0.08543841540813446,
-0.2523217499256134,
0.1708677113056183,
0.038406237959861755,
0.12680351734161377,
-0.0658503994345665,
-0.564508855342865,
0.09475990384817123,
-0.36042821407318115,
0.21836993098258972,
0.26187852025032043,
-0.03964643180370331,
0.7167624831199646,
0.11471924185752869,
0.3875178098678589,
0.20075297355651855,
0.3205118477344513,
-0.13286344707012177,
-0.2876507043838501,
0.39100486040115356,
0.0290178544819355,
-0.4367161691188812,
0.11626902222633362,
0.17344467341899872,
-0.07919365167617798,
0.173988938331604,
-0.6868883967399597,
0.055386219173669815,
0.043758757412433624,
0.269185870885849,
-0.3503462076187134,
0.13487811386585236,
0.222554013133049,
0.041706886142492294,
-0.07690730690956116,
-0.20552700757980347,
0.029726099222898483,
0.10169534385204315,
0.08173399418592453,
0.17008113861083984,
0.13487638533115387,
0.4021790623664856,
-0.06571637094020844,
0.5830797553062439,
0.13107098639011383,
0.10108505934476852,
0.5865950584411621,
-0.0638299435377121,
0.6118605732917786,
-0.10442011803388596,
-0.39664319157600403,
-0.07865557819604874,
0.03369008004665375,
0.34090888500213623,
0.3698168992996216,
0.24737605452537537,
0.29062938690185547,
-0.4431682825088501,
-0.11605054140090942,
-0.15260180830955505,
-0.1416972428560257,
0.0550442636013031,
-0.22066405415534973,
0.04485393688082695,
0.04169176146388054,
0.14697659015655518,
0.11427859961986542,
-0.18649724125862122,
0.28148743510246277,
0.3399169445037842,
0.23824691772460938,
0.2049608677625656,
-0.31051409244537354,
-0.14590251445770264,
-0.2978819012641907,
-0.003799133002758026,
0.15245524048805237,
0.6194829940795898,
-0.18499860167503357,
-0.2872861921787262,
0.06401357054710388,
0.14068076014518738,
0.6219336986541748,
-0.3462412655353546,
-0.023783117532730103,
0.2081761509180069,
0.15135711431503296,
-0.42944276332855225,
0.026120822876691818,
-0.25151169300079346,
0.22967039048671722,
0.06805197894573212,
0.3560698628425598,
-0.07896014302968979,
-0.262412965297699,
0.07309452444314957,
0.3905855417251587,
-0.08170164376497269,
-0.10171473026275635,
-0.36626845598220825,
-0.5582164525985718,
-0.052034538239240646,
-0.16202712059020996,
-0.056036412715911865,
-0.09454146027565002,
-0.00418127654120326,
0.2018500566482544,
-0.27140453457832336,
-0.1102839931845665,
0.3737683892250061,
0.001562364399433136,
0.35803619027137756,
0.10036743432283401,
0.25771090388298035,
0.3456307649612427,
0.30116888880729675,
0.21103748679161072,
0.5975887179374695,
-0.07285904884338379,
-0.10807281732559204,
0.2938811182975769,
-0.0566677488386631,
0.20521700382232666,
0.2750622034072876,
-0.0973915383219719,
-0.1440763771533966,
-0.09789268672466278,
0.19617553055286407,
-0.30933722853660583,
0.4197697937488556,
0.47012004256248474,
-0.3266209065914154,
-0.321911096572876,
-0.23972217738628387,
0.3531309962272644,
0.08551190793514252,
0.08063754439353943,
0.30136364698410034,
0.4512500762939453,
-0.17436327040195465,
0.05825479328632355,
-0.10814923793077469,
0.96485835313797,
0.08634686470031738,
0.42410504817962646,
0.2731476128101349,
0.015570349991321564,
0.2871118485927582,
-0.6531113982200623,
0.06490188837051392,
-0.03947357460856438,
-0.2112484574317932,
-0.16417399048805237,
0.032140303403139114,
0.03189864754676819,
0.1607661098241806,
-0.0887838751077652,
0.3428167700767517,
0.1657295674085617,
0.6255346536636353,
0.2661729156970978,
0.10462629795074463,
-0.20124179124832153,
-0.15207010507583618,
-0.02400418370962143,
0.05772038549184799,
0.1724970042705536,
0.4606356918811798,
-0.03481356054544449,
-0.17114610970020294,
0.1112372875213623,
-0.11381801217794418,
-0.13834571838378906,
0.17198902368545532,
-0.2746110260486603,
0.11393504589796066,
-0.2728410065174103,
-0.19862772524356842,
0.06022302433848381,
0.10329090058803558,
0.4959219694137573,
0.10174210369586945,
-0.2793689966201782,
-0.0034578628838062286,
-0.010006576776504517,
0.004605376161634922,
0.13465441763401031,
0.1609317511320114,
0.26405656337738037,
-0.14966264367103577,
-0.16538086533546448,
0.2137453556060791,
-0.23469893634319305,
-0.04745084047317505,
-0.09750763326883316,
-0.016420602798461914,
-0.12074950337409973,
-0.366641640663147,
0.2989632487297058,
-0.048104047775268555,
0.01135607436299324,
-0.05559675768017769,
0.07118307799100876,
-0.006342165172100067,
-0.007586900144815445,
0.10078062117099762,
0.015572797507047653,
-0.3224194645881653,
-0.13551567494869232,
0.47019314765930176,
-0.09053612500429153,
0.1410401165485382,
0.5776418447494507,
-0.165363147854805,
-0.037102892994880676,
-0.13420163094997406,
0.2980858087539673,
-0.14159038662910461,
-0.41387656331062317,
-0.021742772310972214,
0.2897656261920929,
0.21961180865764618,
-0.019558541476726532,
0.1328585147857666,
0.4500715732574463,
-0.4380425810813904,
0.05556176230311394,
-0.3779567778110504,
-0.17548397183418274,
0.33542388677597046,
0.22901193797588348,
0.1276339590549469,
0.17116695642471313,
0.026222866028547287,
0.2635115087032318,
-0.33262142539024353,
-0.23842743039131165,
0.04589105397462845,
-0.1744089275598526,
-0.10334400832653046,
-0.02257698029279709,
0.1687028706073761,
0.4020445942878723,
-0.12266620993614197,
0.08316465467214584,
0.06996220350265503,
-0.1796923130750656,
-0.05552487075328827,
-0.04948132485151291,
0.17238017916679382,
0.06559722870588303,
-0.12630511820316315,
0.020033031702041626,
-0.15227212011814117,
-0.10075081884860992,
0.03559419885277748,
-0.00658594723790884,
0.06281445175409317,
0.06262894719839096,
0.2629508972167969,
0.1461334377527237,
0.044335491955280304,
-0.3062107563018799,
0.2715226113796234,
0.10824325680732727,
0.23957645893096924,
0.16633054614067078,
-0.09358970820903778,
-0.29214367270469666,
-0.008857764303684235,
-0.05503569543361664,
0.20640522241592407,
-0.10015475749969482,
-0.29536473751068115,
0.15803170204162598,
-0.6083139181137085,
0.2343273162841797,
-0.08984874188899994,
0.05622750520706177,
0.587246298789978,
-0.22664876282215118,
-0.032285176217556,
0.4322362244129181,
0.11867521703243256,
-0.40948328375816345,
0.12519744038581848,
-0.2633911967277527,
-0.032823361456394196,
0.06194392219185829,
0.16686706244945526,
0.13936631381511688,
-0.29576241970062256,
0.45603400468826294,
0.11161752790212631,
0.0044499351643025875,
0.06570293009281158,
-0.026094183325767517,
0.6122167110443115,
-0.05554936081171036,
0.0002875886857509613,
-0.16558389365673065,
-0.006148036569356918,
-0.05341630429029465,
0.2564135789871216,
-0.19404861330986023,
-0.0947079136967659,
-0.6567636728286743,
0.1833885908126831,
-0.07972446829080582,
-0.483734130859375,
-0.358834832906723,
0.27201372385025024,
0.18464848399162292,
0.0776761919260025,
-0.07021257281303406,
0.8341996073722839,
-0.1932036578655243,
-0.20753762125968933,
-0.24742746353149414,
-0.05433299019932747,
-0.1863216757774353,
0.07885801792144775,
-0.32555752992630005,
-0.3691594898700714,
-0.17381152510643005,
-0.014188436791300774,
0.0128166563808918,
-0.10707621276378632,
0.05665689706802368,
0.28209367394447327,
-0.18892844021320343,
-0.5766676664352417,
-0.2808496952056885,
0.1642872840166092,
0.2782967686653137,
0.06642299890518188,
0.24580402672290802,
0.43150293827056885,
-0.055282190442085266,
0.06347274780273438,
0.3087514638900757,
0.2965126037597656,
0.12089469283819199,
-0.24733537435531616,
0.01643608696758747,
-0.02582063153386116,
0.10251596570014954,
0.07814531773328781,
0.22387149930000305,
-0.14096881449222565,
-0.2442602962255478,
0.2785189747810364,
0.019327161833643913,
-0.0726948007941246,
0.05829787999391556,
-0.22415141761302948,
0.00359535776078701,
-0.4303022623062134,
0.04930320382118225,
-0.1504685878753662,
0.23711895942687988,
-0.047562070190906525,
-0.07336682826280594,
-0.39104682207107544,
0.1572420597076416,
0.378402978181839,
0.15547913312911987,
0.06669151782989502,
-0.09104189276695251,
0.025049321353435516,
-0.07068848609924316,
0.39132291078567505,
0.5155997276306152,
0.032852090895175934,
-0.2225298434495926,
-0.14487387239933014,
-0.6859334111213684,
-0.15517273545265198,
-0.17840933799743652,
-0.2773410677909851,
0.2733473777770996,
-0.018828919157385826,
0.2253720462322235,
0.19111672043800354,
0.3814510703086853,
0.025003686547279358,
-0.13436058163642883,
0.08188716322183609,
-0.2806752026081085,
-0.34761685132980347,
-0.14436398446559906,
0.2842012345790863,
-0.13675671815872192,
-0.45672428607940674,
-0.14176253974437714,
0.05322085693478584,
0.003959152847528458,
-0.1714259684085846,
0.04873162508010864,
0.18342788517475128,
0.2699207067489624,
0.4198942184448242,
-0.1137123703956604,
0.058286529034376144,
0.12960785627365112,
-0.33312302827835083,
0.009339660406112671,
-0.3196184039115906,
-0.0801856517791748,
0.2337351143360138,
0.03603325039148331,
0.05936324596405029,
-0.3031279444694519,
-0.19782496988773346,
-0.14940695464611053,
0.11549503356218338,
0.10891802608966827,
0.15244531631469727,
-0.3151453733444214,
0.08340480178594589,
-0.14577573537826538,
0.17781208455562592,
-0.007681778632104397,
0.41690823435783386,
-0.16385067999362946,
0.10254727303981781,
-0.630989134311676,
-0.5317299962043762,
0.5684304237365723,
-0.1902931183576584,
0.03678549453616142,
0.21119241416454315,
0.05632678046822548,
0.07067717611789703,
0.1103917807340622,
-0.34867048263549805,
-0.026126310229301453,
0.41669800877571106,
0.17730513215065002,
-0.10796447098255157,
0.21490508317947388,
-0.2570026218891144,
0.085860475897789,
0.029150519520044327,
0.6684761047363281,
0.023873168975114822,
-0.2641795575618744,
0.12179635465145111,
-0.09721451252698898
] |
https://github.com/huggingface/datasets/issues/4435 | Load a local cached dataset that has been modified | Hi! `datasets` caches every modification/loading, so you can either rerun the pipeline up to the `map` call or use `Dataset.from_file(modified_dataset)` to load the dataset directly from the cache file. | ## Describe the bug
I have loaded a dataset as follows:
```
d = load_dataset("emotion", split="validation")
```
Afterwards I make some modifications to the dataset via a `map` call:
```
d.map(some_update_func, cache_file_name=modified_dataset)
```
This generates a cached version of the dataset on my local system in the same directory as the original download of the data (/path/to/cache). Running an `ls` returns:
```
modified_dataset
dataset_info.json
emotion-test.arrow
emotion-train.arrow
emotion-validation.arrow
```
as expected. However, when I try to load up the modified cached dataset via a call to
```
modified = load_dataset("emotion", split="validation", data_files="/path/to/cache/modified_dataset")
```
it simply redownloads a new version of the dataset and dumps to a new cache rather than loading up the original modified dataset:
```
Using custom data configuration validation-cdbf51685638421b
Downloading and preparing dataset emotion/validation to ...
```
How am I supposed to load the original modified local cache copy of the dataset?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-113-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 29 | Load a local cached dataset that has been modified
## Describe the bug
I have loaded a dataset as follows:
```
d = load_dataset("emotion", split="validation")
```
Afterwards I make some modifications to the dataset via a `map` call:
```
d.map(some_update_func, cache_file_name=modified_dataset)
```
This generates a cached version of the dataset on my local system in the same directory as the original download of the data (/path/to/cache). Running an `ls` returns:
```
modified_dataset
dataset_info.json
emotion-test.arrow
emotion-train.arrow
emotion-validation.arrow
```
as expected. However, when I try to load up the modified cached dataset via a call to
```
modified = load_dataset("emotion", split="validation", data_files="/path/to/cache/modified_dataset")
```
it simply redownloads a new version of the dataset and dumps to a new cache rather than loading up the original modified dataset:
```
Using custom data configuration validation-cdbf51685638421b
Downloading and preparing dataset emotion/validation to ...
```
How am I supposed to load the original modified local cache copy of the dataset?
## Environment info
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-113-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Hi! `datasets` caches every modification/loading, so you can either rerun the pipeline up to the `map` call or use `Dataset.from_file(modified_dataset)` to load the dataset directly from the cache file. | [
-0.10946343839168549,
0.20976367592811584,
0.043923672288656235,
0.272295743227005,
-0.10988190770149231,
0.2734677195549011,
0.2665173411369324,
0.23619261384010315,
0.3935365676879883,
-0.09648334980010986,
-0.20715457201004028,
0.545515239238739,
0.15295112133026123,
-0.35195183753967285,
0.17360858619213104,
0.20208899676799774,
0.10622291266918182,
0.14954198896884918,
-0.13163790106773376,
-0.1068890392780304,
-0.09106218814849854,
0.029906325042247772,
0.03665802627801895,
-0.019481606781482697,
-0.23042988777160645,
0.1985575556755066,
-0.12604005634784698,
0.48830386996269226,
0.023427855223417282,
-0.30965888500213623,
0.5503206849098206,
0.2648580074310303,
0.22706858813762665,
0.48430222272872925,
-0.00011638006253633648,
0.03461772948503494,
0.28750038146972656,
-0.014543470926582813,
-0.1532135009765625,
-0.18335376679897308,
-0.1223183423280716,
-0.2025189995765686,
0.14501623809337616,
-0.16988563537597656,
0.01000160351395607,
-0.2343132644891739,
-0.093498595058918,
-0.6120320558547974,
0.495705246925354,
-0.008326184004545212,
0.16399969160556793,
-0.10206000506877899,
-0.6195138096809387,
0.025123685598373413,
0.0004575178027153015,
0.1235954686999321,
0.09975437074899673,
0.4741358458995819,
0.2678752541542053,
-0.12364139407873154,
-0.06286012381315231,
0.20118053257465363,
-0.34944412112236023,
0.0022536516189575195,
0.2680114209651947,
-0.06952403485774994,
-0.07147455960512161,
0.06544800847768784,
0.42565643787384033,
0.09029300510883331,
0.6293264031410217,
-0.30666112899780273,
-0.28055787086486816,
-0.38436615467071533,
-0.24098505079746246,
0.010037699714303017,
0.11631929874420166,
-0.24664756655693054,
0.03763855621218681,
0.2879790663719177,
-0.4650488495826721,
-0.2721776068210602,
0.15470385551452637,
0.09595565497875214,
-0.23087243735790253,
-0.13166573643684387,
-0.0631205216050148,
0.1394774317741394,
-0.04265541210770607,
0.020744772627949715,
0.3457050323486328,
-0.22768518328666687,
-0.10614587366580963,
0.4705492854118347,
-0.12833605706691742,
0.16691526770591736,
0.20318058133125305,
-0.08227372914552689,
0.013824507594108582,
-0.0973883867263794,
0.15496568381786346,
0.20986619591712952,
-0.19550630450248718,
0.10628798604011536,
0.40393364429473877,
0.3323357403278351,
0.0936567410826683,
0.3550375998020172,
-0.2608322501182556,
0.04937756806612015,
-0.4073602259159088,
-0.20223897695541382,
-0.11965730786323547,
-0.11699821054935455,
0.2998146116733551,
0.05470370128750801,
0.07591859251260757,
-0.27108973264694214,
0.1359042525291443,
0.14505447447299957,
-0.1751347780227661,
-0.04292181506752968,
0.06096909940242767,
0.16166052222251892,
-0.10491090267896652,
0.2635498046875,
-0.04182630032300949,
-0.10828423500061035,
-0.22663213312625885,
0.07789380848407745,
-0.31632107496261597,
-0.2300993949174881,
-0.2206110805273056,
0.15997909009456635,
0.2571835517883301,
-0.31435900926589966,
0.3818819522857666,
0.02925945073366165,
-0.21111388504505157,
-0.16074153780937195,
-0.06756591796875,
0.22348468005657196,
0.33461901545524597,
0.1838073879480362,
-0.09275765717029572,
0.2964261770248413,
0.18527500331401825,
-0.26182737946510315,
-0.18075960874557495,
0.4613748788833618,
-0.3113963007926941,
-0.39772647619247437,
0.1301768720149994,
0.10118746012449265,
-0.2961271405220032,
0.16698040068149567,
-0.27195945382118225,
0.17580334842205048,
0.379602313041687,
-0.23759929835796356,
0.015416838228702545,
-0.05057309567928314,
-0.35449472069740295,
-0.15157823264598846,
0.16226664185523987,
0.7271596789360046,
-0.6245501637458801,
-0.14351561665534973,
-0.345659464597702,
0.09835904836654663,
0.05235075578093529,
0.19258272647857666,
-0.2896132171154022,
0.26259949803352356,
-0.27294546365737915,
0.1397554874420166,
0.4318964183330536,
-0.29050424695014954,
-0.6824741959571838,
0.3805308938026428,
-0.15255603194236755,
0.3860686719417572,
-0.24600249528884888,
0.008651413954794407,
0.08003693073987961,
-0.007914803922176361,
0.10444550961256027,
0.2163645476102829,
-0.14040029048919678,
-0.13751468062400818,
-0.3490462899208069,
-0.06311509758234024,
0.21692807972431183,
-0.021729692816734314,
-0.03143155202269554,
0.4347083568572998,
0.3123449385166168,
0.09520900249481201,
0.28297537565231323,
0.1191307082772255,
-0.03231830149888992,
0.18336597084999084,
-0.045999351888895035,
0.09925908595323563,
0.04657349735498428,
0.05432266741991043,
-0.48193371295928955,
0.26764002442359924,
-0.19615189731121063,
-0.48229682445526123,
0.02316257357597351,
-0.008562672883272171,
-0.5828783512115479,
-0.04770651459693909,
-0.2971102297306061,
-0.25759613513946533,
-0.02151556685566902,
0.1727343201637268,
0.09077058732509613,
-0.19715675711631775,
-0.11459232866764069,
0.2306348979473114,
0.020633677020668983,
0.02032533846795559,
-0.3813798129558563,
0.050451040267944336,
0.0345735102891922,
0.03114454075694084,
-0.3969137966632843,
0.09464903175830841,
0.227199524641037,
-0.11675998568534851,
-0.2343120574951172,
0.4650719463825226,
0.04273684695363045,
0.36935603618621826,
-0.11922185868024826,
0.10814416408538818,
0.08889201283454895,
0.15197138488292694,
0.17564035952091217,
0.006088498048484325,
0.06271903216838837,
-0.19824787974357605,
-0.32076922059059143,
0.25375622510910034,
-0.15706230700016022,
0.1664285808801651,
-0.29930591583251953,
-0.1514684408903122,
0.13391146063804626,
-0.09058374911546707,
-0.1563524305820465,
-0.2558794319629669,
-0.24711664021015167,
0.13878753781318665,
0.573190450668335,
0.12648260593414307,
0.06971894204616547,
0.08523018658161163,
0.20430628955364227,
-0.10948562622070312,
-0.22309911251068115,
-0.16745832562446594,
-0.15487301349639893,
-0.2122892439365387,
0.19048359990119934,
0.4187164902687073,
0.34479182958602905,
0.03053363785147667,
0.31147077679634094,
0.24164339900016785,
0.23862457275390625,
-0.041218437254428864,
-0.1520666480064392,
-0.25543445348739624,
0.0030474583618342876,
0.22514647245407104,
0.19233115017414093,
0.14821815490722656,
-0.07726256549358368,
0.39276596903800964,
0.18298394978046417,
0.01725008524954319,
-0.13268201053142548,
0.4141663908958435,
-0.5413194894790649,
0.01002608984708786,
-0.3705805838108063,
-0.32036125659942627,
-0.1671392172574997,
-0.23249998688697815,
-0.1743287295103073,
0.3674091398715973,
0.009578276425600052,
0.20026050508022308,
-0.007915964350104332,
0.05605700612068176,
-0.04753294587135315,
-0.6034273505210876,
-0.17809131741523743,
-0.05476636439561844,
-0.4411865174770355,
-0.04535814747214317,
0.20803749561309814,
-0.03506794571876526,
-0.0013624299317598343,
-0.02340429462492466,
0.0779823586344719,
-0.06242795288562775,
-0.09443078935146332,
0.00602596253156662,
0.12447483092546463,
0.27664270997047424,
-0.09934593737125397,
-0.0389045774936676,
-0.29103654623031616,
0.00899276603013277,
0.09492714703083038,
-0.08964962512254715,
-0.022298090159893036,
-0.0363469235599041,
0.07310505956411362,
0.09776265174150467,
-0.22985105216503143,
-0.3308049142360687,
-0.1065366193652153,
-0.0759631097316742,
0.1499360203742981,
-0.03912213444709778,
0.12374267727136612,
0.13111205399036407,
0.13912580907344818,
-0.018370002508163452,
0.0980224460363388,
-0.21014994382858276,
-0.4957786500453949,
-0.548760712146759,
0.13838228583335876,
-0.1702539026737213,
-0.13311292231082916,
-0.22051078081130981,
-0.015186680480837822,
0.20758143067359924,
0.27248477935791016,
-0.3430584669113159,
0.19304271042346954,
0.04858403652906418,
0.2992110252380371,
0.015326540917158127,
-0.12430135905742645,
0.5695717334747314,
-0.05677518993616104,
0.16704247891902924,
-0.32518067955970764,
-0.22859203815460205,
0.05880717933177948,
0.2624381482601166,
0.12632106244564056,
0.10412190109491348,
0.0699891448020935,
0.11487919092178345,
0.678585410118103,
-0.05744544044137001,
-0.054758865386247635,
0.2717869281768799,
0.04662945121526718,
0.4758182168006897,
-0.35710179805755615,
-0.2682904303073883,
-0.302378386259079,
-0.09960511326789856,
-0.3066495656967163,
0.1302727460861206,
0.17332428693771362,
-0.2770218849182129,
-0.02746676094830036,
-0.048552267253398895,
-0.23529842495918274,
-0.11076292395591736,
0.04460325837135315,
-0.5001798272132874,
0.12213525176048279,
0.39868590235710144,
0.06488218158483505,
-0.2859433591365814,
0.03885751590132713,
0.07087965309619904,
0.2087305188179016,
0.35673969984054565,
0.14578066766262054,
-0.25424328446388245,
0.12595532834529877,
-0.338103711605072,
0.1817929744720459,
0.19681932032108307,
0.3342834413051605,
0.15288208425045013,
-0.19279745221138,
0.009222187101840973,
0.03471486642956734,
0.5093473792076111,
-0.1549481302499771,
0.19095709919929504,
0.309356689453125,
0.04513704776763916,
-0.2933013439178467,
-0.1545192301273346,
0.3994373381137848,
0.39888301491737366,
0.12604843080043793,
0.5859006643295288,
0.2595854103565216,
-0.08866988122463226,
-0.4968503415584564,
0.33904334902763367,
-0.3463168144226074,
-0.25128448009490967,
-0.15611520409584045,
-0.0756920576095581,
0.01715969853103161,
-0.19952061772346497,
-0.18811234831809998,
0.15693029761314392,
0.116792231798172,
-0.0060864947736263275,
-0.09186506271362305,
0.2277284562587738,
-0.1012100875377655,
0.17075961828231812,
0.24285590648651123,
0.10415694862604141,
0.12209452688694,
0.298277348279953,
0.10666461288928986,
0.030715763568878174,
0.7340147495269775,
-0.24176684021949768,
-0.03713202476501465,
-0.17621323466300964,
-0.04839149862527847,
-0.22885853052139282,
0.01700308918952942,
-0.04022872447967529,
-0.2870563864707947,
0.2263013869524002,
-0.3950912356376648,
-0.22437500953674316,
0.1970810890197754,
-0.13859407603740692,
-0.10473396629095078,
0.11547375470399857,
-0.6906586289405823,
0.43891075253486633,
0.08348903059959412,
-0.3846557140350342,
0.5558239817619324,
-0.5048065185546875,
-0.2220723181962967,
0.3606124520301819,
-0.047154687345027924,
0.5941945314407349,
-0.315154492855072,
0.02820310741662979,
0.1141512468457222,
0.010437287390232086,
0.03407398983836174,
-0.18466635048389435,
-0.12062226235866547,
-0.38931477069854736,
-0.13350509107112885,
0.019801704213023186,
0.026109907776117325,
0.07311497628688812,
0.46452057361602783,
0.24425435066223145,
0.1953754723072052,
-0.10762100666761398,
0.22823092341423035,
0.15506935119628906,
0.055908530950546265,
0.2792896628379822,
-0.1495189666748047,
-0.07809903472661972,
0.12892809510231018,
0.007527898997068405,
0.31268438696861267,
-0.04006628692150116,
0.05031561478972435,
-0.20067527890205383,
-0.19349150359630585,
-0.020355254411697388,
0.1015959158539772,
-0.16029006242752075,
0.09666867554187775,
0.02879626676440239,
-0.20517492294311523,
-0.26897552609443665,
0.4021051824092865,
-0.006338067352771759,
0.0885096937417984,
-0.10353276133537292,
0.02819412387907505,
0.3490926921367645,
0.2432476133108139,
-0.05529061332345009,
-0.22069783508777618,
0.11912711709737778,
0.17705804109573364,
-0.09335774183273315,
-0.23688676953315735,
-0.23157449066638947,
-0.559099555015564,
0.06957215070724487,
0.25747787952423096,
0.2076277881860733,
-0.15699614584445953,
-0.25271180272102356,
0.17590796947479248,
0.3717419505119324,
0.009823128581047058,
0.08343055844306946,
0.002905510365962982,
0.11081989854574203,
0.00795023888349533,
-0.15634672343730927,
-0.3173152804374695,
0.07015017420053482,
0.5353423357009888,
-0.040878891944885254,
-0.20398704707622528,
0.40947967767715454,
-0.22553564608097076,
0.1491491198539734,
-0.018934868276119232,
-0.1066330224275589,
0.23377899825572968,
-0.1375846564769745,
-0.18218322098255157,
-0.32016634941101074,
0.058621153235435486,
0.10640381276607513,
-0.08369098603725433,
0.24105101823806763,
0.09007469564676285,
-0.0037634260952472687,
-0.30105066299438477,
-0.3224661350250244,
-0.16904261708259583,
-0.11510767042636871,
0.11738501489162445,
0.2043316662311554,
-0.04636678099632263,
-0.16153742372989655,
0.3023982644081116,
-0.21135002374649048,
0.24628613889217377,
0.2043086737394333,
0.13519646227359772,
0.10101098567247391,
0.15106263756752014,
0.04764629900455475,
-0.1869949996471405,
-0.006980538368225098,
0.15535959601402283,
-0.20410162210464478,
-0.21514594554901123,
-0.08820624649524689,
0.13390134274959564,
0.0778844803571701,
-0.004834851250052452,
-0.2854200005531311,
-0.07290314137935638,
0.11649547517299652,
-0.25003814697265625,
0.17771902680397034,
0.3052343726158142,
0.006832189857959747,
0.32456791400909424,
0.3439234495162964,
0.26920080184936523,
-0.3203319311141968,
0.09954642504453659,
-0.1421840339899063,
0.05084505304694176,
-0.16792359948158264,
0.13972246646881104,
0.15479758381843567,
-0.06192122399806976,
-0.1883031725883484,
-0.16150131821632385,
0.10297325253486633,
0.24543866515159607,
0.36448022723197937,
-0.16828946769237518,
0.18372395634651184,
0.3215579688549042,
0.3845597207546234,
0.11950170993804932,
-0.14276906847953796,
-0.1538463532924652,
0.23218783736228943,
0.1653253734111786,
0.019796594977378845,
-0.21014529466629028,
0.4341789186000824,
0.051520057022571564,
-0.15744157135486603,
0.16277888417243958,
0.41995641589164734,
-0.1316220611333847,
0.016199618577957153,
0.006010912358760834,
0.4298974275588989,
-0.1838197410106659,
0.327953577041626,
0.5446856617927551,
-0.07293974608182907,
0.06194358319044113,
0.31835654377937317,
0.2982042133808136,
-0.06513842195272446,
0.4784950613975525,
0.1259295642375946,
-0.043885573744773865,
0.1855534315109253,
0.11817046999931335,
-0.1775580644607544,
-0.7865672707557678,
0.25713351368904114,
0.19087156653404236,
-0.11893615126609802,
0.3888449966907501,
-0.08289992809295654,
0.23937785625457764,
0.03473546728491783,
-0.20219291746616364,
0.10493648797273636,
0.08061932027339935,
-0.13959765434265137,
-0.3649594187736511,
0.11570477485656738,
-0.1740957647562027,
-0.08271307498216629,
0.04767438396811485,
-0.041335489600896835,
-0.022653065621852875,
0.34558597207069397,
-0.25639694929122925,
-0.2690715789794922,
-0.03375628590583801,
-0.27339014410972595,
0.0913621038198471,
-0.11604706197977066,
-0.1799101084470749,
0.1683451533317566,
-0.038886427879333496,
-0.1547851264476776,
0.31771764159202576,
-0.13232029974460602,
0.061689313501119614,
0.2960488200187683,
-0.059736985713243484,
0.24558758735656738,
0.025469083338975906,
-0.11154447495937347,
-0.1137663796544075,
0.2743534445762634,
-0.4384218752384186,
-0.26613059639930725,
0.11018131673336029,
0.05836816132068634,
-0.05008622258901596,
0.331794798374176,
-0.0712905079126358,
0.5873708128929138,
-0.3153139054775238,
0.10298959165811539,
0.12088670581579208,
-0.023008957505226135,
-0.030717402696609497,
0.2982565760612488,
-0.10373841971158981,
-0.18763718008995056,
0.4978863000869751,
-0.08058823645114899,
0.31370487809181213,
-0.11105380207300186,
0.03288285434246063,
-0.03703262656927109,
0.429178923368454,
0.3679834306240082,
-0.048632629215717316,
-0.04272855818271637,
-0.18729011714458466,
-0.751397967338562,
0.2230580747127533,
0.04720916226506233,
0.10387176275253296,
-0.019423849880695343,
0.12224350869655609,
-0.10727030783891678,
0.10973328351974487,
-0.2002275139093399,
-0.1144028827548027,
0.03909074887633324,
0.2889230251312256,
0.11807321012020111,
-0.3791678249835968,
-0.23519016802310944,
-0.06851695477962494,
0.05790982395410538,
-0.3772578537464142,
-0.06394936144351959,
0.04435929283499718,
0.0486748069524765,
-0.027772516012191772,
-0.31440964341163635,
0.13653509318828583,
0.12714341282844543,
0.48946917057037354,
0.3573024868965149,
0.01590246707201004,
0.07833780348300934,
-0.013457882218062878,
-0.44421184062957764,
0.13656345009803772,
-0.22601504623889923,
0.05435117334127426,
-0.2524169683456421,
0.348647803068161,
-0.4408983290195465,
0.001026589423418045,
-0.3240354657173157,
0.10833606868982315,
0.10828457772731781,
-0.10885239392518997,
-0.18825384974479675,
-0.22946681082248688,
-0.35113126039505005,
0.09610605984926224,
0.20806972682476044,
0.5581150054931641,
0.0591413639485836,
0.5233166813850403,
-0.11463961005210876,
-0.012330213561654091,
0.39022961258888245,
-0.7212226390838623,
-0.08053566515445709,
0.020297862589359283,
-0.041039347648620605,
0.030845385044813156,
-0.24420705437660217,
-0.2657220959663391,
0.08726214617490768,
0.5231480002403259,
-0.26018327474594116,
0.1280146688222885,
0.06375770270824432,
-0.24347162246704102,
0.2057734578847885,
-0.09510327875614166,
0.3588145077228546,
0.2696250081062317,
0.030992882326245308,
-0.030109072104096413,
-0.34366142749786377
] |
https://github.com/huggingface/datasets/issues/4430 | Add ability to load newer, cleaner version of Multi-News | Hi! Our versioning is based on Git revisions (the `revision` param in `load_dataset`), so you can just replace the old URL with the new one and open a PR :). I can also give you some pointers if needed. | **Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
| 39 | Add ability to load newer, cleaner version of Multi-News
**Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
Hi! Our versioning is based on Git revisions (the `revision` param in `load_dataset`), so you can just replace the old URL with the new one and open a PR :). I can also give you some pointers if needed. | [
-0.2597789168357849,
0.07839801907539368,
-0.07855775952339172,
-0.08194296061992645,
-0.20508787035942078,
0.012279495596885681,
0.32760506868362427,
0.2581801414489746,
0.04155837371945381,
0.008546561002731323,
-0.1402484029531479,
0.2975924015045166,
-0.07111411541700363,
0.24845163524150848,
-0.167283296585083,
-0.3249896764755249,
0.011145398020744324,
-0.030866339802742004,
0.2987023591995239,
0.21221937239170074,
-0.47726669907569885,
-0.03207928687334061,
-0.06422138214111328,
-0.15067258477210999,
-0.14660535752773285,
0.12718971073627472,
-0.3250672519207001,
0.31124448776245117,
-0.11065944284200668,
-0.48639366030693054,
0.033885128796100616,
0.546055257320404,
0.18252131342887878,
0.4421595633029938,
-0.00010274900705553591,
-0.09293349087238312,
0.2835480570793152,
0.15559223294258118,
-0.4185918867588043,
-0.20563508570194244,
-0.14082562923431396,
-0.5725325345993042,
0.10569793730974197,
-0.21420836448669434,
0.13328763842582703,
-0.11179953813552856,
-0.15539005398750305,
0.024635188281536102,
0.4020829200744629,
0.15132933855056763,
0.2711402177810669,
0.29137662053108215,
-0.03290203586220741,
-0.1421080231666565,
0.07644309103488922,
0.0767759308218956,
-0.12150003015995026,
0.3462378680706024,
0.27805352210998535,
0.08499272912740707,
0.10874723643064499,
0.48872503638267517,
0.03297530114650726,
0.07959017157554626,
-0.18006673455238342,
0.009487059898674488,
0.22662216424942017,
0.09010159224271774,
-0.04972435534000397,
0.16901516914367676,
0.4076458513736725,
-0.0288865864276886,
-0.7803997993469238,
-0.310499370098114,
0.11405541747808456,
-0.1202266588807106,
0.12266235053539276,
-0.06293170899152756,
-0.1392694115638733,
0.2492123246192932,
-0.19175836443901062,
-0.4669720232486725,
-0.30547988414764404,
0.2759767770767212,
-0.08877034485340118,
0.4197341799736023,
0.027344688773155212,
0.17625188827514648,
0.20970626175403595,
0.027515431866049767,
0.10582872480154037,
0.1850244700908661,
0.12819220125675201,
-0.047298088669776917,
-0.17353619635105133,
-0.26313284039497375,
0.05294262617826462,
-0.27244195342063904,
0.15679931640625,
-0.03933008760213852,
-0.031134039163589478,
0.1073274239897728,
-0.3473640978336334,
0.02837282419204712,
0.24938398599624634,
-0.27776166796684265,
0.06297148764133453,
0.018990594893693924,
0.3706560730934143,
0.4348316490650177,
0.10757668316364288,
0.012975247576832771,
-0.15348604321479797,
-0.04898218810558319,
0.02746640145778656,
0.2342720925807953,
0.33246493339538574,
-0.13201585412025452,
0.036804281175136566,
-0.15337443351745605,
0.09237696975469589,
-0.3372032642364502,
-0.10223306715488434,
0.2129896879196167,
-0.13108621537685394,
0.6900045275688171,
-0.07360275834798813,
0.09230239689350128,
-0.16922715306282043,
-0.34038934111595154,
-0.07599271088838577,
-0.06039119139313698,
-0.30757954716682434,
0.39872199296951294,
0.323323130607605,
-0.03496120497584343,
0.04148465394973755,
-0.0354018472135067,
-0.15524032711982727,
-0.08881518244743347,
-0.040678463876247406,
0.017085878178477287,
-0.26773157715797424,
0.06848042458295822,
-0.19342488050460815,
0.2071860134601593,
0.06276677548885345,
0.04226914048194885,
-0.10592544078826904,
0.3045898377895355,
-0.29579272866249084,
-0.5450459122657776,
-0.2982410788536072,
0.2177375704050064,
0.08198460936546326,
0.07981458306312561,
-0.29750680923461914,
0.31218448281288147,
-0.21481898427009583,
-0.15913942456245422,
-0.0635189488530159,
0.16669513285160065,
-0.25098299980163574,
-0.1984642595052719,
0.06800632923841476,
0.3478538393974304,
-0.18448396027088165,
-0.11234915256500244,
-0.34686973690986633,
-0.12269698083400726,
-0.11409293860197067,
0.2022521197795868,
-0.32831355929374695,
-0.029217399656772614,
0.005443623289465904,
-0.3803579807281494,
0.2755137085914612,
-0.37847980856895447,
-0.23368039727210999,
0.19713683426380157,
-0.1368330419063568,
0.34959644079208374,
0.1917634904384613,
0.22094474732875824,
-0.08406463265419006,
-0.09446229040622711,
0.010138876736164093,
0.3696189522743225,
0.09788455069065094,
0.09418269246816635,
-0.39939171075820923,
-0.28897061944007874,
0.24696221947669983,
0.1991731971502304,
0.08973833173513412,
0.0545060820877552,
0.08058758080005646,
0.08844178169965744,
0.38929131627082825,
0.036027684807777405,
-0.0504424124956131,
-0.003591235727071762,
0.22406147420406342,
0.16933909058570862,
0.02386334538459778,
-0.20384106040000916,
-0.6822797656059265,
0.2689591944217682,
-0.08424180746078491,
-0.19805899262428284,
0.19901634752750397,
-0.21358560025691986,
-0.20390629768371582,
0.02201528660953045,
-0.09798221290111542,
-0.2605138123035431,
0.14764365553855896,
0.4279562532901764,
-0.11024124920368195,
-0.24064549803733826,
-0.21492452919483185,
0.2589786946773529,
-0.0980817973613739,
0.11840755492448807,
-0.10514847934246063,
0.40696582198143005,
-0.15642356872558594,
0.11579877883195877,
-0.007021501660346985,
0.07844046503305435,
0.26682165265083313,
-0.0737956166267395,
-0.11315039545297623,
0.5385907292366028,
0.058112092316150665,
0.47214508056640625,
0.1957816779613495,
0.17118056118488312,
0.2040966898202896,
-0.09083380550146103,
0.23310862481594086,
0.22765623033046722,
-0.10029125213623047,
0.08551367372274399,
-0.5777426362037659,
0.42233264446258545,
-0.05515528842806816,
0.10824534296989441,
0.12464457750320435,
-0.15074682235717773,
0.08670569956302643,
-0.34178951382637024,
0.07666375488042831,
-0.26462799310684204,
-0.07616400718688965,
0.21848273277282715,
-0.11328773200511932,
-0.026370679959654808,
-0.16936294734477997,
0.24012157320976257,
0.002669781446456909,
-0.06864950060844421,
-0.07475493103265762,
0.35465288162231445,
0.0365460179746151,
-0.33377155661582947,
0.06829876452684402,
0.3510895073413849,
0.2157326489686966,
0.2086194008588791,
-0.1319562941789627,
0.10258055478334427,
0.3267287611961365,
-0.12205062806606293,
0.15513156354427338,
0.031041108071804047,
0.2583979666233063,
0.325125515460968,
0.26966598629951477,
0.20779187977313995,
0.06564873456954956,
0.07487154006958008,
0.3515874743461609,
0.19238653779029846,
-0.11176645010709763,
-0.15397238731384277,
-0.19216719269752502,
-0.2673709988594055,
-0.15603020787239075,
-0.2084781676530838,
-0.21762065589427948,
-0.24256260693073273,
0.15387867391109467,
0.3513437807559967,
-0.20804017782211304,
0.11143516004085541,
0.04834166541695595,
0.3417295515537262,
-0.01440313272178173,
0.24880890548229218,
0.012715041637420654,
0.023199230432510376,
0.052536237984895706,
0.16010281443595886,
0.024594593793153763,
0.16601808369159698,
0.11757908016443253,
0.005213290452957153,
-0.15568199753761292,
-0.7084998488426208,
-0.44746091961860657,
-0.0558028444647789,
0.024595681577920914,
0.2990240752696991,
0.21996745467185974,
0.31598854064941406,
0.33250945806503296,
-0.21726597845554352,
0.46606144309043884,
-0.13640709221363068,
0.09155619889497757,
-0.11635688692331314,
0.14704497158527374,
0.4760779142379761,
0.0868629664182663,
-0.38950031995773315,
-0.24576739966869354,
-0.46175315976142883,
0.30718380212783813,
-0.17243297398090363,
0.3502272963523865,
-0.0020068492740392685,
0.09951882809400558,
-0.32741522789001465,
0.12203192710876465,
0.16984272003173828,
-0.22674527764320374,
-0.2376338392496109,
0.1782410591840744,
-0.33427825570106506,
-0.12545937299728394,
-0.22086985409259796,
0.26120322942733765,
-0.1101468950510025,
-0.04294990748167038,
-0.3356163501739502,
-0.4088246822357178,
0.1217091903090477,
0.13493119180202484,
0.1419314444065094,
-0.12958984076976776,
0.3674558103084564,
0.09568885713815689,
-0.3103278577327728,
0.007049258798360825,
-0.2824476957321167,
-0.3290198743343353,
0.04232766479253769,
0.1922369748353958,
0.28317251801490784,
0.13347025215625763,
0.045853372663259506,
0.7540262341499329,
-0.012992102652788162,
0.1262534111738205,
0.2319423407316208,
0.052276112139225006,
0.11234039068222046,
-0.01707962155342102,
-0.2956143617630005,
0.01780749298632145,
-0.22419747710227966,
0.2638724446296692,
0.36684417724609375,
0.24041861295700073,
-0.13646849989891052,
-0.09781859815120697,
-0.3524763882160187,
-0.22214937210083008,
-0.27525463700294495,
0.2499707192182541,
0.04150347411632538,
0.10013638436794281,
0.008874788880348206,
-0.23308616876602173,
-0.34495434165000916,
0.054550640285015106,
0.16604915261268616,
0.41491103172302246,
-0.02208518236875534,
-0.2313847839832306,
-0.2212103009223938,
0.2609231472015381,
-0.15071430802345276,
0.25621846318244934,
0.14180022478103638,
0.09366407245397568,
0.2854112684726715,
-0.13229602575302124,
0.019033126533031464,
-0.10764322429895401,
0.5558325052261353,
-0.44404494762420654,
-0.017280124127864838,
0.14217863976955414,
-0.20219935476779938,
-0.22540050745010376,
-0.22665230929851532,
-0.08218148350715637,
0.35002756118774414,
0.030920593068003654,
0.5791460871696472,
-0.06291660666465759,
-0.32903820276260376,
0.24882455170154572,
0.09146352112293243,
-0.14026640355587006,
-0.33267340064048767,
-0.07717558741569519,
0.3029993772506714,
-0.37614133954048157,
-0.25731101632118225,
-0.3270122706890106,
0.05277634784579277,
-0.22369182109832764,
0.029168058186769485,
0.1257276087999344,
-0.034454647451639175,
-0.1150401383638382,
-0.07580596208572388,
0.054853398352861404,
0.2884536385536194,
0.0219549760222435,
0.15594053268432617,
0.0629386156797409,
0.26394903659820557,
0.5503601431846619,
-0.39831504225730896,
-0.40474337339401245,
0.03767748549580574,
-0.07814281433820724,
0.17835426330566406,
0.40486791729927063,
0.24330469965934753,
0.2441391944885254,
0.3386203944683075,
0.2579641342163086,
-0.30630049109458923,
-0.03665367141366005,
0.261042982339859,
-0.09644421190023422,
-0.23446601629257202,
-0.5093198418617249,
0.4341127276420593,
-0.042448990046978,
-0.3280538320541382,
0.40316498279571533,
-0.08984462916851044,
-0.1173705905675888,
0.002583008259534836,
-0.10302188247442245,
0.9191073179244995,
-0.027824997901916504,
0.027815859764814377,
-0.025970667600631714,
0.12290544807910919,
0.30945324897766113,
-0.29681140184402466,
-0.02537497878074646,
-0.18582215905189514,
-0.22828929126262665,
0.03181293606758118,
0.15783533453941345,
0.1169825941324234,
0.10506811738014221,
-0.21939100325107574,
0.06560781598091125,
-0.014464333653450012,
-0.015383195132017136,
0.15609577298164368,
0.5852944254875183,
0.052164770662784576,
-0.19754216074943542,
-0.30776864290237427,
0.15301966667175293,
0.046478528529405594,
-0.09045115113258362,
-0.20333433151245117,
0.05056016892194748,
0.2564743757247925,
-0.21206466853618622,
-0.43743669986724854,
-0.21003121137619019,
-0.19452068209648132,
0.1322823315858841,
-0.0504070483148098,
-0.14579559862613678,
-0.13831213116645813,
-0.030381496995687485,
0.012501493096351624,
-0.02319158986210823,
-0.16114410758018494,
0.11934861540794373,
-0.12280521541833878,
-0.012767617590725422,
-0.25984159111976624,
-0.36089688539505005,
0.316317617893219,
-0.09711839258670807,
-0.43678006529808044,
0.35674849152565,
-0.1801917850971222,
-0.6904681324958801,
0.13706952333450317,
-0.15676294267177582,
0.2846786379814148,
-0.23719653487205505,
0.12234124541282654,
0.06897976994514465,
-0.01321900263428688,
-0.46360480785369873,
0.20437923073768616,
0.03795626387000084,
-0.08671324700117111,
-0.2033025026321411,
0.11003468930721283,
-0.12393765151500702,
-0.028625819832086563,
0.34028536081314087,
0.2964520752429962,
-0.24995483458042145,
0.20412710309028625,
0.27143171429634094,
-0.052250418812036514,
-0.27432969212532043,
-0.07530926913022995,
0.033388618379831314,
-0.16692030429840088,
0.0755566880106926,
0.001900451839901507,
-0.08072271943092346,
0.30258676409721375,
0.3396628201007843,
0.14716902375221252,
0.30995747447013855,
-0.04949747025966644,
-0.5361548662185669,
-0.007981688715517521,
0.21757972240447998,
-0.2588895261287689,
0.10954850912094116,
-0.16216951608657837,
-0.3233034610748291,
0.042874567210674286,
0.09516752511262894,
-0.42615920305252075,
0.06032038480043411,
0.02845039777457714,
0.03000582940876484,
-0.016981936991214752,
0.1474655717611313,
0.09864428639411926,
0.027029767632484436,
0.12353743612766266,
-0.1457653045654297,
-0.02214725688099861,
-0.22666165232658386,
-0.18351896107196808,
0.15392546355724335,
-0.07677298039197922,
0.08407770097255707,
-0.005661740433424711,
0.07125945389270782,
-0.011690910905599594,
-0.05373417213559151,
0.3004501461982727,
0.09505902975797653,
-0.023236043751239777,
0.08485899120569229,
0.1879281997680664,
-0.12902233004570007,
-0.27025115489959717,
0.17925064265727997,
-0.10619337856769562,
0.43067264556884766,
0.0665435716509819,
0.25298357009887695,
-0.34435346722602844,
-0.05045013874769211,
-0.12762829661369324,
0.05314984172582626,
0.15337438881397247,
0.3082941770553589,
0.2009199559688568,
0.10848847031593323,
-0.17455124855041504,
0.1442515254020691,
0.38936537504196167,
0.1305224597454071,
-0.37884721159935,
0.10303384810686111,
0.18571683764457703,
0.2642163336277008,
-0.21985971927642822,
0.1361062228679657,
0.13790519535541534,
-0.4707053005695343,
0.20785391330718994,
0.18361440300941467,
0.3419075012207031,
-0.013209953904151917,
0.2614595890045166,
0.06595899909734726,
0.16443082690238953,
-0.034377723932266235,
0.3793415129184723,
0.06303804367780685,
-0.022142942994832993,
-0.12722063064575195,
0.1793353259563446,
0.012521838769316673,
0.13154323399066925,
-0.20086617767810822,
-0.1663951873779297,
0.18372398614883423,
0.1981872022151947,
0.2232109159231186,
0.18393772840499878,
-0.1122792661190033,
0.3414562940597534,
0.22734764218330383,
-0.27329063415527344,
0.06977558135986328,
0.00906352698802948,
0.3605574369430542,
-0.08246933668851852,
-0.033923014998435974,
-0.3592709004878998,
0.3980519473552704,
0.2638987898826599,
-0.22981809079647064,
-0.1556548923254013,
-0.27945584058761597,
-0.3965648114681244,
-0.02163655310869217,
-0.12229014933109283,
-0.16022655367851257,
0.6479036808013916,
0.013389278203248978,
-0.041662052273750305,
-0.3492312431335449,
0.023014836013317108,
0.016827469691634178,
0.39401233196258545,
-0.14176325500011444,
0.15457449853420258,
0.31605058908462524,
-0.07426871359348297,
0.3818565011024475,
0.4051027297973633,
0.16861431300640106,
0.07751817256212234,
0.17709124088287354,
0.15529634058475494,
-0.21808463335037231,
-0.026360230520367622,
0.10043589770793915,
0.024481358006596565,
-0.057632699608802795,
-0.21444523334503174,
0.21923744678497314,
0.23321399092674255,
-0.2550814747810364,
0.08570969849824905,
0.12835972011089325,
0.06630802154541016,
-0.37885624170303345,
0.006370097398757935,
0.35796961188316345,
0.01064164936542511,
0.1269790232181549,
-0.005989871919155121,
-0.29335758090019226,
-0.3787907361984253,
0.18173103034496307,
-0.1850041151046753,
0.12408048659563065,
0.07328998297452927,
0.14136534929275513,
0.20900508761405945,
0.5202482342720032,
0.20961040258407593,
0.12045449018478394,
-0.08654908835887909,
-0.3158010244369507,
-0.6618092060089111,
-0.024390973150730133,
-0.08412046730518341,
-0.19565802812576294,
0.15725108981132507,
-0.11925698816776276,
-0.012057118117809296,
0.4005967974662781,
0.31324928998947144,
-0.2510060966014862,
0.23514506220817566,
0.0820394903421402,
-0.5432049632072449,
0.059737201780080795,
0.6360645294189453,
0.16546598076820374,
-0.04954028129577637,
-0.2187444567680359,
0.0847533568739891,
0.056159887462854385,
0.050337277352809906,
-0.034146152436733246,
-0.16887874901294708,
0.20542895793914795,
0.04656405746936798,
0.4589579403400421,
0.01905951090157032,
0.008017271757125854,
-0.21642091870307922,
-0.4219244718551636,
-0.37635862827301025,
-0.07205469906330109,
-0.0800776407122612,
-0.03491474688053131,
0.05141356587409973,
0.4700540006160736,
-0.17304186522960663,
0.11440296471118927,
-0.22068145871162415,
0.22807122766971588,
-0.20671115815639496,
-0.20953282713890076,
-0.3736605644226074,
-0.01305555459111929,
0.26340845227241516,
-0.01777528040111065,
0.08218672126531601,
0.14260956645011902,
-0.02623070776462555,
0.08025164902210236,
-0.29972410202026367,
-0.13775686919689178,
0.42921197414398193,
-0.28823140263557434,
-0.03853050246834755,
-0.26234209537506104,
0.3516242802143097,
-0.32317081093788147,
0.4018228352069855,
-0.8266335725784302,
0.029134079813957214,
0.39526718854904175,
0.4561002850532532,
-0.22716550529003143,
0.14842988550662994,
-0.224930077791214,
-0.1603616625070572,
-0.07683145999908447,
0.057918839156627655,
-0.08439795672893524,
-0.2918073236942291,
-0.12894059717655182,
-0.11034557968378067
] |
https://github.com/huggingface/datasets/issues/4430 | Add ability to load newer, cleaner version of Multi-News | @mariosasko Awesome thanks! I will do that. Looks like this new version of the data is not available as a zip but as three files (train/dev/test). How is this usually handled in HF Datasets, should `_URL` be a dict with keys `train`, `val`, `test` perhaps? | **Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
| 45 | Add ability to load newer, cleaner version of Multi-News
**Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
@mariosasko Awesome thanks! I will do that. Looks like this new version of the data is not available as a zip but as three files (train/dev/test). How is this usually handled in HF Datasets, should `_URL` be a dict with keys `train`, `val`, `test` perhaps? | [
-0.14610418677330017,
0.11213615536689758,
-0.05282742530107498,
-0.10732312500476837,
-0.3316490650177002,
0.04110230505466461,
0.3071531653404236,
0.2734023928642273,
0.07105764746665955,
0.014758601784706116,
-0.30019688606262207,
0.17131134867668152,
-0.031777750700712204,
0.2504991292953491,
-0.06768489629030228,
-0.31479617953300476,
0.04115729406476021,
-0.038087278604507446,
0.14231663942337036,
0.043085820972919464,
-0.534109890460968,
-0.023373914882540703,
-0.06198721379041672,
-0.10632888972759247,
-0.17937526106834412,
0.09623212367296219,
-0.4994863271713257,
0.3795661926269531,
-0.06371665000915527,
-0.35956066846847534,
0.012419795617461205,
0.649253785610199,
0.28168579936027527,
0.43870416283607483,
-0.0001069253048626706,
-0.056660182774066925,
0.11249957978725433,
0.14732176065444946,
-0.3749982416629791,
-0.26835477352142334,
-0.15427520871162415,
-0.5428540706634521,
-0.01809205487370491,
-0.1636102944612503,
0.21920126676559448,
-0.15033669769763947,
-0.04457242786884308,
0.10428732633590698,
0.487628698348999,
0.1958867609500885,
0.23690074682235718,
0.2126786857843399,
-0.11403018981218338,
-0.1203051432967186,
0.30361998081207275,
0.09965961426496506,
-0.0366036482155323,
0.2715546488761902,
0.09142277389764786,
-0.027151085436344147,
-0.043464295566082,
0.4790160655975342,
0.17025326192378998,
0.09946626424789429,
-0.06450489908456802,
0.026724923402071,
0.12027986347675323,
0.15441423654556274,
-0.17667627334594727,
0.3135504722595215,
0.3045538067817688,
0.0036742202937602997,
-0.811873197555542,
-0.22264060378074646,
0.02477310225367546,
-0.1612493097782135,
0.1433858573436737,
-0.07041319459676743,
-0.04877094179391861,
0.22393128275871277,
-0.037146590650081635,
-0.4516732394695282,
-0.31789085268974304,
0.3006877899169922,
-0.16075265407562256,
0.36578062176704407,
0.0229562446475029,
0.18556317687034607,
0.13743795454502106,
0.08066201210021973,
0.24695423245429993,
0.0620969794690609,
0.15727415680885315,
-0.027996636927127838,
-0.07151216268539429,
-0.21156007051467896,
0.02275172993540764,
-0.36632707715034485,
0.19567745923995972,
-0.14315073192119598,
-0.15097513794898987,
0.08504212647676468,
-0.42942535877227783,
0.07868017256259918,
0.2389001101255417,
-0.354800820350647,
-0.02651885896921158,
0.038947176188230515,
0.2994097173213959,
0.5271456837654114,
0.05620759353041649,
-0.06968648731708527,
-0.2376966029405594,
-0.04432160034775734,
-0.10954704880714417,
0.1742798388004303,
0.12833018600940704,
-0.16767477989196777,
-0.054575927555561066,
-0.06010335683822632,
0.06409100443124771,
-0.33879271149635315,
-0.12014993280172348,
0.3618084192276001,
-0.20687425136566162,
0.5874960422515869,
-0.05699361860752106,
0.10267122089862823,
-0.19590367376804352,
-0.19478097558021545,
-0.08820006251335144,
0.017489179968833923,
-0.24158155918121338,
0.3492147922515869,
0.17227201163768768,
0.047823961824178696,
0.018690554425120354,
0.026250015944242477,
-0.0029229074716567993,
-0.047291167080402374,
-0.009550410322844982,
-0.10241274535655975,
-0.11378050595521927,
0.12821796536445618,
-0.1145266592502594,
0.312810480594635,
0.02925253100693226,
0.05913382023572922,
-0.13291166722774506,
0.2168143391609192,
-0.39900925755500793,
-0.43276679515838623,
-0.1966848522424698,
0.1872355043888092,
0.13489548861980438,
0.04323289915919304,
-0.16640427708625793,
0.26530471444129944,
-0.2795417606830597,
-0.16338741779327393,
-0.04249217361211777,
0.0630497857928276,
-0.31660282611846924,
-0.290958970785141,
-0.015271972864866257,
0.36410999298095703,
-0.2884823977947235,
-0.08992049843072891,
-0.19225627183914185,
-0.036466050893068314,
-0.03202623873949051,
0.2781147360801697,
-0.4125582277774811,
-0.01708795875310898,
-0.0814414918422699,
-0.26361703872680664,
0.3612061142921448,
-0.3782111406326294,
-0.23079687356948853,
0.43497326970100403,
-0.0476338192820549,
0.3336293399333954,
0.24432358145713806,
0.1581561416387558,
-0.007893383502960205,
-0.14272873103618622,
0.08111550658941269,
0.3022729754447937,
0.18443916738033295,
-0.09179751574993134,
-0.3449094891548157,
-0.31594276428222656,
0.2513948976993561,
0.16346703469753265,
0.20413118600845337,
0.040961310267448425,
0.06650392711162567,
0.14249010384082794,
0.53094881772995,
0.05564428120851517,
-0.026617031544446945,
0.06633029878139496,
0.2318469136953354,
0.33856844902038574,
0.014404190704226494,
-0.0566767193377018,
-0.5849089622497559,
0.21901154518127441,
-0.3089376986026764,
-0.3847454786300659,
0.289023220539093,
-0.27430447936058044,
-0.19799739122390747,
-0.05479440838098526,
-0.21822412312030792,
-0.2459922730922699,
0.12275052070617676,
0.3863687515258789,
-0.16896936297416687,
-0.27860188484191895,
-0.2929318845272064,
0.3963099718093872,
-0.032592177391052246,
0.1213846281170845,
0.02885526791214943,
0.5398750305175781,
-0.14243195950984955,
0.25392946600914,
-0.02593047358095646,
0.13580471277236938,
0.2788577377796173,
-0.1022481620311737,
-0.10553652793169022,
0.5585535764694214,
0.11648006737232208,
0.20922091603279114,
0.22860723733901978,
0.11019841581583023,
0.291846364736557,
-0.022484637796878815,
0.3235231637954712,
0.2032780647277832,
-0.1019449308514595,
0.02354944497346878,
-0.5714634656906128,
0.42708921432495117,
-0.009404841810464859,
0.051433321088552475,
0.1968717724084854,
-0.14897111058235168,
0.0014450643211603165,
-0.32623714208602905,
0.030612101778388023,
-0.21606312692165375,
-0.17609669268131256,
0.20279879868030548,
-0.08953176438808441,
-0.03446497768163681,
-0.10862726718187332,
0.1993749588727951,
0.15906664729118347,
-0.055475495755672455,
-0.13704827427864075,
0.3842030167579651,
0.01876584067940712,
-0.312642902135849,
0.11977316439151764,
0.40549537539482117,
0.23495382070541382,
0.19471152126789093,
-0.0073433928191661835,
0.09512178599834442,
0.10028189420700073,
-0.08097965270280838,
0.0540473572909832,
-0.04919680953025818,
0.2415739744901657,
0.368832528591156,
0.15917444229125977,
0.22146572172641754,
-0.01880539581179619,
0.011085014790296555,
0.3713318109512329,
0.008984619751572609,
-0.18396009504795074,
-0.09335426241159439,
-0.2595541179180145,
-0.2702684700489044,
-0.28496381640434265,
-0.09729703515768051,
-0.2166723608970642,
-0.32034799456596375,
0.18049252033233643,
0.2849879562854767,
-0.14553244411945343,
0.07724282890558243,
0.013466164469718933,
0.2287992537021637,
-0.05321117490530014,
0.23711979389190674,
0.0850415825843811,
0.196670264005661,
-0.12426484376192093,
0.09528081119060516,
-0.009821529500186443,
0.1825670450925827,
0.12118961662054062,
0.05548209697008133,
-0.20672471821308136,
-0.7830771803855896,
-0.38786157965660095,
-0.04331579804420471,
-0.06121676415205002,
0.23049035668373108,
0.33152592182159424,
0.35411572456359863,
0.21704979240894318,
-0.1746545135974884,
0.44691571593284607,
0.027985138818621635,
0.09626583755016327,
-0.12187646329402924,
0.046053849160671234,
0.5255871415138245,
0.1230904757976532,
-0.4044949412345886,
-0.2538805305957794,
-0.38768744468688965,
0.2507222890853882,
-0.23319792747497559,
0.3684861660003662,
0.1352955549955368,
0.1099589616060257,
-0.2447136640548706,
0.1873900294303894,
-0.005559982731938362,
-0.2880115807056427,
-0.2099243849515915,
0.23924005031585693,
-0.32629331946372986,
-0.23093752562999725,
-0.214097261428833,
0.1504008173942566,
-0.2484392523765564,
0.021238893270492554,
-0.40129417181015015,
-0.4576944410800934,
0.1616681069135666,
0.15663239359855652,
0.022202149033546448,
0.018919363617897034,
0.30186349153518677,
-0.03834263235330582,
-0.2608054280281067,
-0.12039016932249069,
-0.1559882014989853,
-0.15070262551307678,
0.12224594503641129,
0.33345702290534973,
0.2836245894432068,
0.17585909366607666,
0.152767151594162,
0.7259224057197571,
0.05484466627240181,
0.22100910544395447,
0.3668063282966614,
0.09490139782428741,
0.17142483592033386,
0.0889563113451004,
-0.1494063436985016,
-0.01718640886247158,
-0.26148438453674316,
0.24962617456912994,
0.32289355993270874,
0.21470576524734497,
0.012239261530339718,
0.03048473596572876,
-0.2587164342403412,
-0.10187859833240509,
-0.2564082145690918,
0.3414398431777954,
-0.02062993496656418,
0.05991530418395996,
0.03274548426270485,
-0.22388574481010437,
-0.298114150762558,
0.1289757490158081,
0.31981396675109863,
0.4571376442909241,
0.03534849360585213,
-0.16469603776931763,
-0.2217351496219635,
0.15433543920516968,
-0.1551768183708191,
0.3074464797973633,
0.17555390298366547,
0.15786471962928772,
0.29195380210876465,
-0.09935931861400604,
0.04165267199277878,
-0.2126317322254181,
0.6662032604217529,
-0.4384114444255829,
-0.040892429649829865,
0.23026131093502045,
-0.22087222337722778,
-0.2072497308254242,
-0.2334315925836563,
-0.16965711116790771,
0.18834689259529114,
-0.14564934372901917,
0.6347658634185791,
-0.11330880224704742,
-0.387509822845459,
0.2654462456703186,
-0.006666688714176416,
-0.15574967861175537,
-0.2596900463104248,
-0.067630834877491,
0.13175126910209656,
-0.31309813261032104,
-0.37918761372566223,
-0.3707984983921051,
-0.08006320148706436,
-0.2546611428260803,
-0.086771160364151,
0.17369985580444336,
-0.024038413539528847,
-0.06021606922149658,
-0.16568626463413239,
-0.02317574992775917,
0.38245078921318054,
-0.008789796382188797,
0.25554054975509644,
0.16549302637577057,
0.3032625913619995,
0.49745145440101624,
-0.5099842548370361,
-0.29611387848854065,
0.06792766600847244,
-0.040747836232185364,
0.22434589266777039,
0.5048215389251709,
0.15618641674518585,
0.2894015312194824,
0.38153159618377686,
0.21360771358013153,
-0.3251411020755768,
0.12810923159122467,
0.43276381492614746,
-0.18419203162193298,
-0.20772071182727814,
-0.54311603307724,
0.5163770914077759,
-0.041959650814533234,
-0.36886686086654663,
0.43678927421569824,
0.0227702334523201,
-0.0970955491065979,
0.13707484304904938,
-0.05200590938329697,
0.9312682747840881,
-0.13021241128444672,
0.24716335535049438,
0.060492053627967834,
-0.11383587121963501,
0.2135382741689682,
-0.5002676248550415,
-0.12435935437679291,
-0.23902133107185364,
-0.2388620525598526,
-0.07687141001224518,
0.16532111167907715,
0.21156296133995056,
0.20851759612560272,
-0.185130774974823,
0.16661612689495087,
0.05599597096443176,
0.12479601800441742,
0.09774388372898102,
0.41658177971839905,
-0.016663340851664543,
-0.21251343190670013,
-0.2861175239086151,
0.1385267972946167,
0.14330776035785675,
-0.06928747892379761,
-0.3010227084159851,
0.00023426581174135208,
0.2434232234954834,
-0.23046107590198517,
-0.25682419538497925,
-0.21968060731887817,
-0.31262513995170593,
0.1690957248210907,
0.010209392756223679,
-0.1014072522521019,
-0.21309860050678253,
-0.11537876725196838,
-0.009256571531295776,
-0.07952699065208435,
-0.04948272556066513,
0.09813003242015839,
-0.002388499677181244,
0.08218792825937271,
-0.29353731870651245,
-0.34881874918937683,
0.40358611941337585,
-0.09085163474082947,
-0.3697233498096466,
0.3200872242450714,
-0.2678883671760559,
-0.6188015341758728,
0.22592678666114807,
-0.12953025102615356,
0.2491397261619568,
-0.32707852125167847,
0.19442817568778992,
0.12551124393939972,
0.055338677018880844,
-0.41018280386924744,
0.1602247804403305,
-0.06605841219425201,
-0.08337593078613281,
-0.1824266016483307,
0.14043347537517548,
-0.1250917613506317,
-0.017343543469905853,
0.3100820779800415,
0.20995068550109863,
-0.12679913640022278,
0.24647559225559235,
0.2055767923593521,
-0.07603300362825394,
-0.20961228013038635,
0.011557355523109436,
0.16354840993881226,
-0.10992825031280518,
0.07142908871173859,
-0.09542997926473618,
-0.1204613745212555,
0.17367687821388245,
0.3769274652004242,
0.20265325903892517,
0.15060609579086304,
-0.11354407668113708,
-0.4426010549068451,
-0.0036567840725183487,
0.24375073611736298,
-0.3215686082839966,
0.1527484804391861,
-0.1637316346168518,
-0.1558949053287506,
-0.003671223297715187,
0.08106356114149094,
-0.3834247887134552,
0.11973410844802856,
0.08219780027866364,
0.006375828757882118,
-0.19508308172225952,
0.176741361618042,
0.15827001631259918,
0.13670575618743896,
0.10795031487941742,
-0.0552196130156517,
-0.14729775488376617,
-0.18193185329437256,
-0.3467353582382202,
0.16021622717380524,
-0.042152561247348785,
0.07855447381734848,
0.06956584006547928,
0.000963505357503891,
-0.12955188751220703,
-0.006367908790707588,
0.37365490198135376,
0.110927052795887,
-0.0684041976928711,
0.23872174322605133,
0.2020849734544754,
-0.22591450810432434,
-0.28158313035964966,
0.11965975910425186,
0.030828945338726044,
0.5275633335113525,
0.058875035494565964,
0.19451601803302765,
-0.3928997218608856,
-0.08306040614843369,
-0.2299947738647461,
0.12273711711168289,
0.19185681641101837,
0.13402707874774933,
0.2838357090950012,
0.016406744718551636,
-0.10672101378440857,
0.06742464751005173,
0.4090576767921448,
0.2697480320930481,
-0.3145076632499695,
0.023256009444594383,
0.23261773586273193,
0.20445182919502258,
-0.2218155860900879,
0.09626246243715286,
0.07270044833421707,
-0.4519572854042053,
0.17286598682403564,
0.18051490187644958,
0.4392990171909332,
0.07974554598331451,
0.2869621515274048,
0.01263546571135521,
0.007328392937779427,
0.05176050588488579,
0.2183500975370407,
0.21190834045410156,
-0.025847405195236206,
0.03815183788537979,
0.1647455245256424,
0.007196405902504921,
0.1474061757326126,
-0.10230755805969238,
0.027598563581705093,
0.09269789606332779,
0.20134201645851135,
0.25849828124046326,
0.165468230843544,
-0.4277839958667755,
0.28069767355918884,
0.1928023397922516,
-0.15419119596481323,
0.06312154978513718,
-0.05664125084877014,
0.42440828680992126,
-0.009969553910195827,
-0.1473982185125351,
-0.23858611285686493,
0.38951224088668823,
0.2299533486366272,
-0.33695003390312195,
-0.139600932598114,
-0.22887703776359558,
-0.5365357398986816,
0.007465820759534836,
-0.10865303874015808,
-0.16459189355373383,
0.6797595024108887,
0.04039986431598663,
0.11337843537330627,
-0.3274376392364502,
0.060402046889066696,
-0.07064907252788544,
0.343057781457901,
-0.2227202206850052,
0.17997822165489197,
0.3437073826789856,
-0.05515199899673462,
0.48960280418395996,
0.19976332783699036,
0.13973796367645264,
-0.09608988463878632,
0.09152553975582123,
0.14577852189540863,
-0.2731388509273529,
0.07789826393127441,
0.17655612528324127,
-0.07254532724618912,
-0.07459895312786102,
-0.20527434349060059,
0.33380016684532166,
0.13906991481781006,
-0.21754072606563568,
0.10012462735176086,
-0.007461953908205032,
0.09559865295886993,
-0.46223580837249756,
0.07136400043964386,
0.3477512001991272,
0.11696208268404007,
0.15247471630573273,
-0.12348572164773941,
-0.3280016779899597,
-0.35310447216033936,
0.28212669491767883,
-0.2433769851922989,
0.24171200394630432,
0.19675464928150177,
0.12163656949996948,
0.08995677530765533,
0.5347704887390137,
0.33222275972366333,
0.08637115359306335,
-0.13780568540096283,
-0.27358895540237427,
-0.6602140069007874,
-0.08651242405176163,
-0.21622079610824585,
-0.20604009926319122,
0.13900279998779297,
-0.016870247200131416,
0.043504856526851654,
0.18374869227409363,
0.33277925848960876,
-0.3443939685821533,
0.26213300228118896,
0.12732729315757751,
-0.4670579433441162,
-0.023476917296648026,
0.5824093222618103,
0.29121193289756775,
-0.13132105767726898,
-0.3243539333343506,
0.022441081702709198,
0.2326512634754181,
-0.02869444712996483,
0.004249373450875282,
-0.2441578060388565,
0.3178962469100952,
-0.2019599974155426,
0.44323912262916565,
0.008460449986159801,
-0.0355936735868454,
-0.21020904183387756,
-0.3846874237060547,
-0.23881515860557556,
0.05868331342935562,
-0.017887208610773087,
-0.1894225776195526,
-0.06283308565616608,
0.5731581449508667,
-0.13505829870700836,
0.06700742244720459,
-0.19307515025138855,
0.264160692691803,
-0.10244853049516678,
-0.2562013566493988,
-0.42403444647789,
0.16066573560237885,
0.1188504621386528,
-0.06585216522216797,
0.21022185683250427,
0.3796483874320984,
-0.0011728182435035706,
0.05372639745473862,
-0.2576424479484558,
-0.1854621022939682,
0.458614706993103,
-0.3031538724899292,
-0.1201585978269577,
-0.2574499845504761,
0.3925091326236725,
-0.30045047402381897,
0.332745760679245,
-0.8188037276268005,
-0.07701238989830017,
0.3884608745574951,
0.3765811622142792,
-0.29513105750083923,
0.0562545545399189,
-0.17295029759407043,
-0.1660841703414917,
-0.05851726979017258,
0.11621290445327759,
-0.15880951285362244,
-0.35159242153167725,
-0.15212136507034302,
-0.16962407529354095
] |
https://github.com/huggingface/datasets/issues/4430 | Add ability to load newer, cleaner version of Multi-News | Yes! Let me help you with more detailed instructions.
In the first step, we need to update the URLs. One of the possible dictionary structures is as follows:
```python
_URLs = {
"train": {"src": "https://drive.google.com/uc?export=download&id=1wHAWDOwOoQWSj7HYpyJ3Aeud8WhhaJ7P", "tgt": "https://drive.google.com/uc?export=download&id=1QVgswwhVTkd3VLCzajK6eVkcrSWEK6kq"}
"val": ...
"test": ...
}
```
(You can use this page to generate direct download links: https://sites.google.com/site/gdocs2direct/)
Then we move to the `split_generators` method:
```python
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
files = dl_manager.download(_URLs)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={"src_file": files["train"]["src"], "tgt_file": files["train"]["tgt"]},
),
... # same for val and test
]
```
Finally, we adjust the signature of `_generate_examples`:
```python
def _generate_examples(self, src_file, tgt_file):
"""Yields examples."""
with open(src_file, encoding="utf-8") as src_f, open(
tgt_file, encoding="utf-8"
) as tgt_f:
... # the rest is the same
```
And that's it!
PS: Let me know if you need help updating the dummy data and regenerating the metadata file. | **Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
| 141 | Add ability to load newer, cleaner version of Multi-News
**Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
Yes! Let me help you with more detailed instructions.
In the first step, we need to update the URLs. One of the possible dictionary structures is as follows:
```python
_URLs = {
"train": {"src": "https://drive.google.com/uc?export=download&id=1wHAWDOwOoQWSj7HYpyJ3Aeud8WhhaJ7P", "tgt": "https://drive.google.com/uc?export=download&id=1QVgswwhVTkd3VLCzajK6eVkcrSWEK6kq"}
"val": ...
"test": ...
}
```
(You can use this page to generate direct download links: https://sites.google.com/site/gdocs2direct/)
Then we move to the `split_generators` method:
```python
def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
files = dl_manager.download(_URLs)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={"src_file": files["train"]["src"], "tgt_file": files["train"]["tgt"]},
),
... # same for val and test
]
```
Finally, we adjust the signature of `_generate_examples`:
```python
def _generate_examples(self, src_file, tgt_file):
"""Yields examples."""
with open(src_file, encoding="utf-8") as src_f, open(
tgt_file, encoding="utf-8"
) as tgt_f:
... # the rest is the same
```
And that's it!
PS: Let me know if you need help updating the dummy data and regenerating the metadata file. | [
-0.18265461921691895,
0.1126437783241272,
-0.10607783496379852,
-0.05953238159418106,
-0.14160370826721191,
0.06452877074480057,
0.3196961283683777,
0.2980671226978302,
0.06817598640918732,
-0.032039105892181396,
-0.22333283722400665,
0.2548075020313263,
-0.21407854557037354,
0.27223262190818787,
-0.11785566806793213,
-0.32595178484916687,
0.013792149722576141,
-0.12516769766807556,
0.2355814129114151,
0.14657096564769745,
-0.5565335750579834,
-0.006047500297427177,
-0.11717920005321503,
-0.23114095628261566,
-0.16440126299858093,
0.12345302104949951,
-0.3482465445995331,
0.32480812072753906,
-0.09977834671735764,
-0.5184274315834045,
-0.03957362473011017,
0.5177462697029114,
0.15814466774463654,
0.43298405408859253,
-0.00010287608893122524,
-0.08300194144248962,
0.2524409890174866,
0.13776981830596924,
-0.3698599636554718,
-0.1876651793718338,
-0.1741381585597992,
-0.5118439197540283,
0.09299711883068085,
-0.27170467376708984,
0.17377707362174988,
-0.21257621049880981,
-0.14131025969982147,
0.016078978776931763,
0.5034552216529846,
0.26051756739616394,
0.27599722146987915,
0.25403788685798645,
0.006172344088554382,
-0.05004332959651947,
0.10293220728635788,
-0.06607295572757721,
-0.029210563749074936,
0.334698885679245,
0.1976337432861328,
0.03554446995258331,
0.05725356191396713,
0.4621146023273468,
-0.02047359198331833,
0.0035365689545869827,
-0.23215028643608093,
0.03047753870487213,
0.09439706802368164,
0.01479075476527214,
-0.07837562263011932,
0.14096516370773315,
0.32845059037208557,
-0.029510945081710815,
-0.7223008871078491,
-0.26800402998924255,
0.03634225204586983,
-0.0915556475520134,
0.1463514268398285,
-0.010836618021130562,
-0.025775780901312828,
0.228776752948761,
-0.23922018706798553,
-0.39938902854919434,
-0.28835076093673706,
0.3571763038635254,
-0.12642401456832886,
0.49764275550842285,
0.08478675782680511,
0.14470462501049042,
0.19830136001110077,
0.07401634007692337,
0.17818531394004822,
0.13611575961112976,
0.21257619559764862,
-0.03353961557149887,
-0.18076194822788239,
-0.2618280053138733,
0.09537342190742493,
-0.25801733136177063,
0.06378844380378723,
-0.09532147645950317,
-0.03562154993414879,
0.1176149770617485,
-0.32403045892715454,
0.045789916068315506,
0.19705267250537872,
-0.2667790651321411,
0.05049677565693855,
0.055695340037345886,
0.3881882429122925,
0.4958823621273041,
0.08292265236377716,
0.12063093483448029,
-0.14064458012580872,
-0.15494981408119202,
0.016863465309143066,
0.2872720956802368,
0.32924938201904297,
-0.002753607928752899,
-0.02876747027039528,
-0.06556691974401474,
-0.06853915750980377,
-0.24965213239192963,
-0.050727833062410355,
0.19523343443870544,
-0.24403788149356842,
0.6124877333641052,
0.10240817070007324,
0.08778832852840424,
-0.17532925307750702,
-0.22901104390621185,
-0.10378273576498032,
0.09219107031822205,
-0.2170003354549408,
0.32073622941970825,
0.33418023586273193,
0.04142223298549652,
0.025698775425553322,
-0.054949238896369934,
-0.1656808853149414,
-0.1193961650133133,
-0.02698485553264618,
0.013635629788041115,
-0.2541159391403198,
0.011349648237228394,
-0.16510432958602905,
0.2236858457326889,
0.03853769227862358,
-0.07634536921977997,
-0.14073385298252106,
0.26084065437316895,
-0.2617025673389435,
-0.4828340411186218,
-0.22083096206188202,
0.2587561011314392,
-0.0028139445930719376,
-0.01122066006064415,
-0.16117677092552185,
0.3171629011631012,
-0.20945686101913452,
-0.06881725043058395,
-0.04756415635347366,
0.13150086998939514,
-0.31018418073654175,
-0.20625846087932587,
0.07703748345375061,
0.38110291957855225,
-0.20590680837631226,
-0.12526935338974,
-0.2092716097831726,
-0.03086898848414421,
-0.0967705175280571,
0.1834779530763626,
-0.2553641200065613,
0.022355783730745316,
0.0341704785823822,
-0.36404329538345337,
0.23973622918128967,
-0.39926862716674805,
-0.2548297047615051,
0.13486558198928833,
-0.12332432717084885,
0.3322150409221649,
0.2012377381324768,
0.14362794160842896,
-0.008516410365700722,
-0.016154831275343895,
0.12238790094852448,
0.47332876920700073,
0.12742000818252563,
0.11749795824289322,
-0.4176577627658844,
-0.2757650911808014,
0.2630797028541565,
0.2185484617948532,
0.20004858076572418,
-0.019123993813991547,
-0.047230787575244904,
0.14983300864696503,
0.4535973072052002,
0.02618926204741001,
0.007054116111248732,
0.0683981329202652,
0.25589239597320557,
0.1782476305961609,
0.017718598246574402,
-0.211549311876297,
-0.6535950303077698,
0.25600844621658325,
-0.10574828833341599,
-0.08684438467025757,
0.10536345839500427,
-0.2426706999540329,
-0.3106086254119873,
-0.021649396046996117,
-0.15544793009757996,
-0.25092366337776184,
0.19950611889362335,
0.3459983170032501,
0.0047233812510967255,
-0.11557495594024658,
-0.15436048805713654,
0.2097400724887848,
-0.12535440921783447,
0.10646561533212662,
-0.10180045664310455,
0.49080199003219604,
-0.17011992633342743,
0.143281027674675,
-0.007975764572620392,
0.1049276664853096,
0.23828521370887756,
-0.10458307713270187,
-0.09378697723150253,
0.5429711937904358,
0.11234407126903534,
0.3635733723640442,
0.12143458425998688,
0.2090296447277069,
0.23607106506824493,
-0.1376849263906479,
0.2632291316986084,
0.38935133814811707,
-0.05180666595697403,
0.06436742097139359,
-0.48494085669517517,
0.45223933458328247,
-0.030328664928674698,
0.1310642510652542,
0.1640346795320511,
-0.08847127854824066,
0.04630383849143982,
-0.35309240221977234,
0.017680594697594643,
-0.2711804509162903,
-0.17131416499614716,
0.17949075996875763,
-0.09665514528751373,
-0.052424266934394836,
-0.1652601659297943,
0.19068017601966858,
0.009943347424268723,
-0.05993003770709038,
-0.08984554558992386,
0.316039115190506,
0.0036146119236946106,
-0.3050096929073334,
0.02280290424823761,
0.4602073132991791,
0.16966496407985687,
0.1674320548772812,
-0.024779286235570908,
0.1942187249660492,
0.25996384024620056,
-0.12746146321296692,
0.18545842170715332,
0.0326685905456543,
0.1852021962404251,
0.32269734144210815,
0.24812336266040802,
0.21446864306926727,
-0.06613606959581375,
0.043315690010786057,
0.32574334740638733,
0.18641433119773865,
-0.16985297203063965,
-0.10197626799345016,
-0.21428978443145752,
-0.2869766056537628,
-0.19099277257919312,
-0.2237357348203659,
-0.15020769834518433,
-0.3451882600784302,
0.21091769635677338,
0.30725204944610596,
-0.27803438901901245,
0.17160145938396454,
0.09404987096786499,
0.24622932076454163,
0.02930031530559063,
0.14288988709449768,
0.07463616132736206,
0.016007281839847565,
0.04116711765527725,
0.18315662443637848,
0.09781783819198608,
0.15232223272323608,
0.1046379879117012,
-0.03904646635055542,
-0.2121976763010025,
-0.667803943157196,
-0.4596227705478668,
-0.13554173707962036,
-0.033174946904182434,
0.2381531298160553,
0.23948761820793152,
0.33012714982032776,
0.2552148699760437,
-0.2530779242515564,
0.4724613130092621,
-0.13680191338062286,
0.11409550905227661,
-0.13081714510917664,
0.21696628630161285,
0.4832944869995117,
0.11199110746383667,
-0.4761407673358917,
-0.28682416677474976,
-0.43092355132102966,
0.21228384971618652,
-0.15789271891117096,
0.354086697101593,
0.0551920160651207,
0.12549224495887756,
-0.29426050186157227,
0.2221250683069229,
0.1901843100786209,
-0.20343200862407684,
-0.12073551118373871,
0.3062523603439331,
-0.3212469816207886,
-0.22654806077480316,
-0.20758922398090363,
0.08455238491296768,
-0.09867514669895172,
0.0016619991511106491,
-0.3261899948120117,
-0.42363646626472473,
0.04244492948055267,
0.020795639604330063,
0.13346818089485168,
-0.028525279834866524,
0.28969210386276245,
0.12693585455417633,
-0.30619123578071594,
0.011619705706834793,
-0.18570725619792938,
-0.3660275936126709,
0.1331762969493866,
0.19888463616371155,
0.28811395168304443,
0.1850222647190094,
0.03418416157364845,
0.7021188735961914,
-0.05090980976819992,
0.14514346420764923,
0.29083776473999023,
0.002670740708708763,
0.08577998727560043,
0.03521014377474785,
-0.27755939960479736,
-0.06714482605457306,
-0.2347036600112915,
0.16686929762363434,
0.2782081961631775,
0.19331970810890198,
-0.0538192093372345,
-0.13769495487213135,
-0.20247437059879303,
-0.33757489919662476,
-0.3130188286304474,
0.2864006757736206,
0.06852062791585922,
0.0971008688211441,
0.02557460218667984,
-0.22484135627746582,
-0.22042281925678253,
0.06156814843416214,
0.2161145806312561,
0.3726698160171509,
-0.0841960683465004,
-0.26603493094444275,
-0.1745947003364563,
0.25960803031921387,
-0.24425452947616577,
0.2956163287162781,
0.19078683853149414,
0.13369408249855042,
0.38648754358291626,
-0.17242887616157532,
0.00026789307594299316,
-0.123285211622715,
0.5680738091468811,
-0.4216938614845276,
-0.01680033653974533,
0.17020145058631897,
-0.2515609860420227,
-0.27947789430618286,
-0.21941402554512024,
-0.19686450064182281,
0.2327938973903656,
0.012675629928708076,
0.5068908333778381,
-0.08156940340995789,
-0.2639717757701874,
0.24589088559150696,
0.15805062651634216,
-0.13582384586334229,
-0.23481035232543945,
-0.06516468524932861,
0.1584930121898651,
-0.39429494738578796,
-0.2868756353855133,
-0.20433826744556427,
0.15121549367904663,
-0.24799568951129913,
0.012934412807226181,
0.12820830941200256,
-0.12194797396659851,
-0.0435350239276886,
-0.10874009132385254,
0.10460730642080307,
0.33561715483665466,
0.03321939334273338,
0.08511818945407867,
0.05560069531202316,
0.197816863656044,
0.5595404505729675,
-0.40374699234962463,
-0.3870086073875427,
-0.030582841485738754,
0.01277963351458311,
0.18495333194732666,
0.43036484718322754,
0.13983263075351715,
0.20512163639068604,
0.2974908947944641,
0.2476751208305359,
-0.2995281219482422,
0.07347570359706879,
0.3064206838607788,
-0.04193190485239029,
-0.1892291158437729,
-0.5796351432800293,
0.4922572076320648,
0.013581804931163788,
-0.3141663074493408,
0.3572172522544861,
-0.009179383516311646,
-0.22457093000411987,
0.07995294779539108,
-0.06864147633314133,
0.8817217350006104,
-0.1096315085887909,
0.14143136143684387,
0.06784819811582565,
0.06402212381362915,
0.336698442697525,
-0.2636486887931824,
0.0281052403151989,
-0.19958169758319855,
-0.14594711363315582,
-0.006789686158299446,
0.21727269887924194,
0.07529579848051071,
0.1627514362335205,
-0.2494376003742218,
0.07273317128419876,
-0.03190480172634125,
-0.004381552338600159,
0.11375592648983002,
0.5781438946723938,
0.004697822965681553,
-0.18390469253063202,
-0.37381452322006226,
0.15955114364624023,
0.13605141639709473,
-0.11914719641208649,
-0.25657957792282104,
0.09153611212968826,
0.162758469581604,
-0.24356751143932343,
-0.3690223693847656,
-0.17223882675170898,
-0.2642906606197357,
0.22935344278812408,
-0.060745563358068466,
-0.1662948727607727,
-0.16187776625156403,
0.10505107045173645,
-0.04922474920749664,
0.009822707623243332,
-0.14576312899589539,
0.12295854091644287,
-0.14166724681854248,
-0.04110994562506676,
-0.19001711905002594,
-0.3232538402080536,
0.3389175832271576,
-0.07524803280830383,
-0.4284336566925049,
0.3266535699367523,
-0.13979870080947876,
-0.608226478099823,
0.11228904128074646,
-0.08769316971302032,
0.18232950568199158,
-0.29777371883392334,
0.04486929625272751,
0.005512401461601257,
-0.10072009265422821,
-0.444546103477478,
0.22219033539295197,
-0.04498783499002457,
-0.07518592476844788,
-0.12921908497810364,
0.14266446232795715,
-0.1591283231973648,
-0.015347275882959366,
0.4300532639026642,
0.3450186252593994,
-0.15978409349918365,
0.28004562854766846,
0.2439809888601303,
-0.06992410123348236,
-0.2675759196281433,
-0.07973991334438324,
-0.02538721263408661,
-0.025279346853494644,
0.11745405942201614,
0.009076525457203388,
-0.051832057535648346,
0.21845045685768127,
0.30465179681777954,
0.17312604188919067,
0.3974100947380066,
-0.03137534111738205,
-0.5064573287963867,
-0.04308644309639931,
0.3188268542289734,
-0.16812722384929657,
0.1493959128856659,
-0.22484615445137024,
-0.24903510510921478,
0.055653564631938934,
-0.024724027141928673,
-0.4394199252128601,
0.10979282110929489,
0.038590140640735626,
-0.001379258930683136,
-0.06838098913431168,
0.10749970376491547,
0.10920530557632446,
0.032351359724998474,
0.1822190135717392,
-0.15980760753154755,
0.002086491324007511,
-0.24938994646072388,
-0.2399829626083374,
0.13237398862838745,
0.019325871020555496,
0.015276024118065834,
-0.020813941955566406,
0.06468413770198822,
-0.04729694500565529,
-0.07382351160049438,
0.2613236606121063,
0.19640731811523438,
0.003751426935195923,
0.16545337438583374,
0.12176904082298279,
-0.1403164565563202,
-0.18995219469070435,
0.08767499029636383,
-0.17080146074295044,
0.4441297650337219,
0.14597907662391663,
0.24397608637809753,
-0.23549459874629974,
-0.050831057131290436,
-0.10835017263889313,
0.03664930537343025,
0.09809398651123047,
0.2039308249950409,
0.21606215834617615,
0.06332656741142273,
-0.23152294754981995,
0.12352199852466583,
0.4297637343406677,
0.34555068612098694,
-0.45046064257621765,
0.053990863263607025,
0.20755097270011902,
0.2828807234764099,
-0.27982237935066223,
0.1948038786649704,
0.1058298647403717,
-0.4751550853252411,
0.23938611149787903,
0.18500591814517975,
0.2877599000930786,
-0.036004889756441116,
0.11991490423679352,
0.07338889688253403,
0.09203799813985825,
0.033390723168849945,
0.44531574845314026,
0.003737453371286392,
-0.04863489046692848,
-0.12509669363498688,
0.0839514285326004,
-0.026553642004728317,
0.14110401272773743,
-0.24105460941791534,
-0.112889863550663,
0.22170257568359375,
0.06886877864599228,
0.22121162712574005,
0.13209755718708038,
-0.14349384605884552,
0.2653126120567322,
0.16923271119594574,
-0.32149994373321533,
0.10883930325508118,
0.011579349637031555,
0.37340185046195984,
-0.08373425155878067,
0.018338249996304512,
-0.2979110777378082,
0.3757561147212982,
0.25079384446144104,
-0.2872406244277954,
-0.06430412828922272,
-0.27062487602233887,
-0.4612046182155609,
-0.01283217966556549,
-0.0710490345954895,
-0.27804845571517944,
0.5567787289619446,
-0.0060598477721214294,
-0.04746721684932709,
-0.40060484409332275,
-0.001897912472486496,
-0.03536132723093033,
0.3994496166706085,
-0.19739536941051483,
0.04913736879825592,
0.36668860912323,
-0.027046211063861847,
0.28208693861961365,
0.3257189393043518,
0.1781604140996933,
0.10247404128313065,
0.04703495651483536,
0.13376347720623016,
-0.2500036656856537,
0.0043870750814676285,
0.1047540158033371,
0.05000153183937073,
0.0037681758403778076,
-0.27820202708244324,
0.257185161113739,
0.24732592701911926,
-0.2994355261325836,
0.041510771960020065,
0.19022922217845917,
0.05997523292899132,
-0.2635171413421631,
-0.03961937874555588,
0.3156415522098541,
0.11000671237707138,
0.11340507864952087,
-0.07104558497667313,
-0.38405582308769226,
-0.5106473565101624,
0.1889585554599762,
-0.1575290560722351,
0.19849306344985962,
0.097276471555233,
0.12688598036766052,
0.2115391194820404,
0.5468640923500061,
0.27928876876831055,
0.21705591678619385,
-0.1341126561164856,
-0.33001983165740967,
-0.6831253170967102,
-0.05522456020116806,
-0.09792622923851013,
-0.2639618515968323,
0.0447242297232151,
-0.08517816662788391,
-0.0676334872841835,
0.3470008969306946,
0.23514944314956665,
-0.09177760034799576,
0.16261999309062958,
-0.0039048083126544952,
-0.5481961369514465,
0.05465167760848999,
0.5431672930717468,
0.19512847065925598,
-0.03491107374429703,
-0.28316783905029297,
0.01316320151090622,
0.017168626189231873,
0.08788102120161057,
-0.06687496602535248,
-0.13240137696266174,
0.11573462188243866,
0.03871861472725868,
0.49258458614349365,
-0.00044247694313526154,
0.1364852637052536,
-0.2699795067310333,
-0.38411304354667664,
-0.3397732973098755,
-0.06772685796022415,
-0.09559667110443115,
0.02235192060470581,
0.07495413720607758,
0.4795732796192169,
-0.08459796756505966,
0.11593885719776154,
-0.12826736271381378,
0.34421101212501526,
-0.13341519236564636,
-0.30878689885139465,
-0.3684956431388855,
0.027293061837553978,
0.26491716504096985,
0.07340170443058014,
0.02261073887348175,
0.23508891463279724,
-0.08078475296497345,
0.12296174466609955,
-0.253165602684021,
-0.310795396566391,
0.45347851514816284,
-0.2758680284023285,
-0.062270525842905045,
-0.26054316759109497,
0.28372910618782043,
-0.3101250231266022,
0.48238781094551086,
-0.7620293498039246,
0.018955491483211517,
0.34486132860183716,
0.39830514788627625,
-0.26567962765693665,
0.12598052620887756,
-0.18540556728839874,
-0.1567930430173874,
-0.08187888562679291,
0.021089158952236176,
-0.08824072033166885,
-0.20281855762004852,
-0.16765643656253815,
-0.16393208503723145
] |
https://github.com/huggingface/datasets/issues/4430 | Add ability to load newer, cleaner version of Multi-News | Awesome! Thanks for the detailed help, that was straightforward with your instruction. However, I think I am being blocked by this issue: https://github.com/huggingface/datasets/issues/4428 | **Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
| 23 | Add ability to load newer, cleaner version of Multi-News
**Is your feature request related to a problem? Please describe.**
The [Multi-News dataloader points to the original version of the Multi-News dataset](https://github.com/huggingface/datasets/blob/12540dd75015678ec6019f258d811ee107439a73/datasets/multi_news/multi_news.py#L47), but this has [known errors in it](https://github.com/Alex-Fabbri/Multi-News/issues/11). There exists a [newer version which fixes some of these issues](https://drive.google.com/open?id=1jwBzXBVv8sfnFrlzPnSUBHEEAbpIUnFq).
Unfortunately I don't think you can just replace this old URL with the new one, otherwise this could lead to issues with reproducibility.
**Describe the solution you'd like**
Add a new version to the Multi-News dataloader that points to the updated dataset which has fixes for some known issues.
**Describe alternatives you've considered**
Replace the current URL to the original version to the dataset with the URL to the version with fixes.
**Additional context**
Would be happy to make a PR for this, could someone maybe point me to another dataloader that has multiple versions so I can see how this is handled in `datasets`?
Awesome! Thanks for the detailed help, that was straightforward with your instruction. However, I think I am being blocked by this issue: https://github.com/huggingface/datasets/issues/4428 | [
-0.16652260720729828,
-0.023137688636779785,
-0.08440636843442917,
-0.060711897909641266,
-0.12671545147895813,
0.07482241839170456,
0.2727241814136505,
0.19914156198501587,
0.0301169753074646,
0.021154746413230896,
-0.187438502907753,
0.25123006105422974,
-0.08516962081193924,
0.2855844795703888,
-0.2103573977947235,
-0.32450050115585327,
-0.07639389485120773,
-0.013701178133487701,
0.2633453607559204,
0.2397468537092209,
-0.4181741178035736,
0.06626519560813904,
-0.08145841956138611,
-0.16778405010700226,
-0.24717319011688232,
0.10040377080440521,
-0.3034539520740509,
0.2806205749511719,
-0.2377636581659317,
-0.48374003171920776,
0.10722769796848297,
0.5673132538795471,
0.13190294802188873,
0.4495728611946106,
-0.00010614965867716819,
-0.15893730521202087,
0.3379506468772888,
0.1307605355978012,
-0.37158194184303284,
-0.265552818775177,
-0.13355985283851624,
-0.5323740839958191,
0.18411947786808014,
-0.15276449918746948,
0.08707400411367416,
-0.06773609668016434,
-0.16180163621902466,
0.0241125226020813,
0.4985429644584656,
0.13549557328224182,
0.2602076530456543,
0.30926311016082764,
0.11102065443992615,
-0.17378999292850494,
0.06291544437408447,
0.09212556481361389,
-0.14771956205368042,
0.38046330213546753,
0.25561296939849854,
0.0454656258225441,
0.08832882344722748,
0.5193237066268921,
0.03581732511520386,
0.07901221513748169,
-0.06110032647848129,
-0.09085415303707123,
0.1742553859949112,
0.05255499482154846,
-0.0015261918306350708,
0.1388644278049469,
0.4303407073020935,
-0.03164215385913849,
-0.7938249111175537,
-0.3411921560764313,
0.10024524480104446,
-0.12218435108661652,
0.15224233269691467,
-0.09814554452896118,
-0.16197046637535095,
0.22676192224025726,
-0.23344029486179352,
-0.4416661858558655,
-0.32654350996017456,
0.28803056478500366,
-0.07037097960710526,
0.38311251997947693,
-0.07172144204378128,
0.13785120844841003,
0.2654534876346588,
-0.0019198134541511536,
0.08058500289916992,
0.25301867723464966,
0.18365609645843506,
0.03161577507853508,
-0.17513634264469147,
-0.22258256375789642,
0.1384555697441101,
-0.1382369101047516,
0.1549159288406372,
-0.05748675763607025,
-0.05520959198474884,
0.052411697804927826,
-0.33305591344833374,
0.041077278554439545,
0.19373719394207,
-0.1809118539094925,
0.11692674458026886,
-0.08033932000398636,
0.32696837186813354,
0.5615028142929077,
0.141861692070961,
-0.009111806750297546,
-0.13506868481636047,
-0.08017419278621674,
-0.088931143283844,
0.30065158009529114,
0.43362748622894287,
-0.16857415437698364,
-0.04720822349190712,
-0.1163933053612709,
0.024523384869098663,
-0.2863121032714844,
-0.03374868631362915,
0.2481728196144104,
-0.12732470035552979,
0.5561388731002808,
0.012037698179483414,
0.11791644990444183,
-0.2138453871011734,
-0.2846909165382385,
-0.07248113304376602,
0.016590159386396408,
-0.35970160365104675,
0.37266042828559875,
0.4210502803325653,
-0.052617792040109634,
0.04286447912454605,
0.0350959338247776,
-0.08467473089694977,
-0.08402036130428314,
-0.05709473043680191,
0.024817567318677902,
-0.28683263063430786,
0.004293352365493774,
-0.16021791100502014,
0.30737829208374023,
0.06263891607522964,
0.050331324338912964,
-0.0910925567150116,
0.238078773021698,
-0.2735600173473358,
-0.5710659623146057,
-0.3033996820449829,
0.20088276267051697,
0.034350551664829254,
0.09533651173114777,
-0.23037323355674744,
0.27582570910453796,
-0.2482902705669403,
-0.10316373407840729,
-0.04995570331811905,
0.22729775309562683,
-0.2807564437389374,
-0.18425557017326355,
0.10510461777448654,
0.38552147150039673,
-0.21499940752983093,
-0.10001449286937714,
-0.3612774610519409,
-0.07587157189846039,
-0.07977957278490067,
0.19337129592895508,
-0.2832243740558624,
-0.047096364200115204,
-0.06627717614173889,
-0.33968496322631836,
0.11070737987756729,
-0.34306439757347107,
-0.24776950478553772,
0.14200261235237122,
-0.21665464341640472,
0.37472274899482727,
0.2567342221736908,
0.1688859760761261,
-0.11951017379760742,
-0.1364837884902954,
0.031998369842767715,
0.3581541180610657,
0.12155186384916306,
0.019236234948039055,
-0.3672579526901245,
-0.2981928586959839,
0.2799603044986725,
0.15113994479179382,
0.08521102368831635,
0.07970557361841202,
0.0637759119272232,
0.10811649262905121,
0.39130517840385437,
0.02199065312743187,
0.006139536388218403,
0.10985733568668365,
0.2595949172973633,
0.20335347950458527,
-0.009082099422812462,
-0.2317044734954834,
-0.6984475255012512,
0.27049151062965393,
-0.10164804756641388,
-0.052449315786361694,
0.12155775725841522,
-0.22214975953102112,
-0.25817519426345825,
-0.026035800576210022,
-0.14166180789470673,
-0.28232964873313904,
0.1440661996603012,
0.34366920590400696,
-0.021675292402505875,
-0.27179524302482605,
-0.13955257833003998,
0.277047723531723,
-0.12239309400320053,
0.13367630541324615,
-0.21717745065689087,
0.34727951884269714,
-0.19390523433685303,
0.05045562610030174,
0.006351187825202942,
0.17028984427452087,
0.37237513065338135,
-0.03417837619781494,
-0.068947933614254,
0.4900705814361572,
0.022329501807689667,
0.44144099950790405,
0.16178593039512634,
0.14260156452655792,
0.1383623480796814,
-0.1555587649345398,
0.21515515446662903,
0.24282126128673553,
-0.13067808747291565,
0.07116613537073135,
-0.4924866855144501,
0.42356061935424805,
-0.10590407252311707,
0.1549866795539856,
0.1424020677804947,
-0.0925484225153923,
-0.0010772459208965302,
-0.3295815885066986,
0.03344987332820892,
-0.24232734739780426,
0.08917595446109772,
0.14161570370197296,
-0.11263814568519592,
-0.06211461126804352,
-0.1610284149646759,
0.22980421781539917,
-0.043162260204553604,
0.0021408796310424805,
-0.14483129978179932,
0.35615092515945435,
0.07768945395946503,
-0.1766200065612793,
0.09517087042331696,
0.3536001145839691,
0.20827460289001465,
0.25863116979599,
-0.08170799911022186,
0.1832808405160904,
0.2333947718143463,
-0.11429138481616974,
0.15681225061416626,
0.02987103909254074,
0.16826443374156952,
0.29920056462287903,
0.2634284198284149,
0.2303999960422516,
0.02136395126581192,
0.017808761447668076,
0.2831996977329254,
0.11599542945623398,
-0.21533238887786865,
-0.22959186136722565,
-0.20647136867046356,
-0.31715482473373413,
-0.14615170657634735,
-0.2316504716873169,
-0.26550227403640747,
-0.2532005310058594,
0.14282414317131042,
0.3864891529083252,
-0.15463237464427948,
0.1533912867307663,
0.0448463000357151,
0.3229164183139801,
-0.05081705003976822,
0.27175387740135193,
-0.03342295438051224,
0.10347982496023178,
0.021300574764609337,
0.12505756318569183,
0.05288298428058624,
0.18945683538913727,
0.2104499638080597,
0.008755778893828392,
-0.12689617276191711,
-0.6727558970451355,
-0.530030369758606,
-0.04725877195596695,
-0.07485252618789673,
0.28991761803627014,
0.2564340829849243,
0.39349454641342163,
0.20032507181167603,
-0.27216270565986633,
0.5213273763656616,
-0.10751286894083023,
0.08772657811641693,
-0.17371337115764618,
0.11504611372947693,
0.47140103578567505,
0.07496263086795807,
-0.33629536628723145,
-0.18590277433395386,
-0.49620869755744934,
0.44274210929870605,
-0.21210147440433502,
0.34689462184906006,
0.08708515018224716,
0.06475958973169327,
-0.2602682113647461,
0.13299372792243958,
0.19733886420726776,
-0.23672600090503693,
-0.21553176641464233,
0.2408304065465927,
-0.37667232751846313,
-0.16771532595157623,
-0.135602205991745,
0.2880536913871765,
-0.07514089345932007,
-0.021716047078371048,
-0.2602387070655823,
-0.4120401442050934,
0.025734422728419304,
0.08526730537414551,
0.08450693637132645,
-0.03140927851200104,
0.3968023359775543,
0.06912195682525635,
-0.2817298173904419,
-0.03836778178811073,
-0.36830615997314453,
-0.27109774947166443,
-0.019847247749567032,
0.2479609251022339,
0.21150344610214233,
0.18427199125289917,
0.05229731276631355,
0.7167145013809204,
0.05760650709271431,
0.1639086753129959,
0.33458101749420166,
0.11150479316711426,
0.17542365193367004,
-0.026543207466602325,
-0.36757996678352356,
-0.024113843217492104,
-0.2471570372581482,
0.2300982028245926,
0.2646469473838806,
0.24714982509613037,
0.04304184392094612,
-0.14086392521858215,
-0.31625041365623474,
-0.2806708514690399,
-0.29998424649238586,
0.20146724581718445,
0.036846961826086044,
0.08367522060871124,
-0.051020506769418716,
-0.2808021605014801,
-0.32579636573791504,
0.034929271787405014,
0.1735486388206482,
0.4518182873725891,
0.012238390743732452,
-0.18475620448589325,
-0.28842300176620483,
0.19513264298439026,
-0.23370704054832458,
0.30057623982429504,
0.08755277842283249,
0.09587467461824417,
0.11861485242843628,
-0.08251912891864777,
0.07706829905509949,
-0.06054477021098137,
0.660574197769165,
-0.41644033789634705,
0.04964398965239525,
0.1060280054807663,
-0.21566234529018402,
-0.276227205991745,
-0.19361166656017303,
-0.0833737701177597,
0.36655327677726746,
0.03022494912147522,
0.5330027341842651,
-0.13371728360652924,
-0.3036958575248718,
0.21896645426750183,
0.03960276022553444,
-0.03638755902647972,
-0.35387107729911804,
-0.124397873878479,
0.19524767994880676,
-0.4108192026615143,
-0.27033036947250366,
-0.17438018321990967,
0.12830975651741028,
-0.19812177121639252,
0.04538169875741005,
0.18309472501277924,
-0.04159003496170044,
0.023486919701099396,
-0.17003533244132996,
0.07458033412694931,
0.3562506437301636,
0.018041018396615982,
0.27684876322746277,
0.06257157772779465,
0.24100516736507416,
0.5799351334571838,
-0.3946034014225006,
-0.40123358368873596,
0.04269058257341385,
-0.1034066379070282,
0.215825617313385,
0.5194201469421387,
0.24007879197597504,
0.29523926973342896,
0.35172849893569946,
0.2343732863664627,
-0.34663429856300354,
-0.053858716040849686,
0.27978771924972534,
-0.08821900188922882,
-0.2120804339647293,
-0.44715017080307007,
0.40322673320770264,
-0.05501417815685272,
-0.286991149187088,
0.4340955317020416,
0.11851338297128677,
-0.16194365918636322,
-0.04797476530075073,
-0.13669514656066895,
1.0281745195388794,
-0.021070614457130432,
0.037044111639261246,
-0.0008721277117729187,
0.09145861864089966,
0.40209922194480896,
-0.2160012423992157,
0.019973086193203926,
-0.1440698653459549,
-0.18130072951316833,
-0.003585854545235634,
0.08570800721645355,
0.09070809185504913,
0.11152330040931702,
-0.20157934725284576,
0.06849183887243271,
-0.08522839099168777,
0.017056619748473167,
0.16318339109420776,
0.5801652073860168,
-0.06991177797317505,
-0.26490363478660583,
-0.4520041048526764,
0.14798879623413086,
0.07949528098106384,
0.0359896682202816,
-0.24267596006393433,
0.009700313210487366,
0.18076835572719574,
-0.28805866837501526,
-0.44861865043640137,
-0.17889735102653503,
-0.26211753487586975,
0.08301213383674622,
-0.01579395681619644,
-0.11151305586099625,
0.008460057899355888,
-0.025872860103845596,
0.0794568806886673,
0.001675393432378769,
-0.19403645396232605,
0.09575752913951874,
-0.10032782703638077,
-0.10721563547849655,
-0.28210246562957764,
-0.3586580157279968,
0.3113313317298889,
-0.12010980397462845,
-0.33259665966033936,
0.28912118077278137,
-0.15483126044273376,
-0.6381447911262512,
0.08335773646831512,
-0.16266371309757233,
0.1611328423023224,
-0.2985859215259552,
0.04814179986715317,
-0.06039927899837494,
0.06507569551467896,
-0.4491715431213379,
0.19899208843708038,
0.026313118636608124,
-0.13587866723537445,
-0.26940545439720154,
0.09467191994190216,
-0.0823967382311821,
0.04429154843091965,
0.4143064618110657,
0.20359018445014954,
-0.316205769777298,
0.3395569622516632,
0.33318474888801575,
-0.09508077800273895,
-0.25053828954696655,
-0.15980994701385498,
0.11732403188943863,
-0.17055481672286987,
0.07930364459753036,
-0.003392209531739354,
-0.09978774189949036,
0.22346147894859314,
0.3470090627670288,
0.18668735027313232,
0.2950672209262848,
0.03410631790757179,
-0.5658586025238037,
-0.10498937964439392,
0.3012186884880066,
-0.28797224164009094,
0.13753648102283478,
-0.21879124641418457,
-0.1677572876214981,
0.11121182143688202,
0.08409421145915985,
-0.41526347398757935,
0.11115589737892151,
0.01202881895005703,
-0.01854768767952919,
0.08092060685157776,
0.11071617901325226,
0.16250218451023102,
0.04058555141091347,
0.10190822184085846,
-0.10383741557598114,
-0.12022846937179565,
-0.19453921914100647,
-0.1976044774055481,
0.167927086353302,
-0.09358415752649307,
0.052219897508621216,
0.06417316198348999,
-0.0038238856941461563,
-0.05321582779288292,
-0.01830471120774746,
0.2669944763183594,
0.16806384921073914,
0.0041277483105659485,
0.06589798629283905,
0.131449893116951,
-0.09879610687494278,
-0.2588859498500824,
0.10229799151420593,
-0.074162557721138,
0.4088655114173889,
0.19807735085487366,
0.19147704541683197,
-0.32720378041267395,
-0.009943746030330658,
-0.10561658442020416,
0.04986006021499634,
0.16792088747024536,
0.257402628660202,
0.12358707934617996,
0.05482933297753334,
-0.20720583200454712,
0.11891938745975494,
0.47737476229667664,
0.11980538070201874,
-0.3764045834541321,
0.12170049548149109,
0.19746601581573486,
0.24533140659332275,
-0.19660086929798126,
0.18729713559150696,
0.18118147552013397,
-0.49102315306663513,
0.17409288883209229,
0.20681416988372803,
0.3478280305862427,
-0.0029622241854667664,
0.21439558267593384,
0.0951324850320816,
0.11416904628276825,
-0.05117221176624298,
0.38000696897506714,
0.06503960490226746,
-0.07202928513288498,
-0.1280437409877777,
0.2513917088508606,
0.05685954540967941,
0.12697206437587738,
-0.22391872107982635,
-0.14879196882247925,
0.22441497445106506,
0.05096353590488434,
0.29048842191696167,
0.19380681216716766,
-0.23581908643245697,
0.2778122127056122,
0.24260114133358002,
-0.1941802203655243,
0.04988812655210495,
-0.09771065413951874,
0.5153524279594421,
-0.13366453349590302,
-0.025648554787039757,
-0.29269492626190186,
0.4080536961555481,
0.22695526480674744,
-0.21455919742584229,
-0.14879804849624634,
-0.3200397193431854,
-0.4343413710594177,
-0.06498856842517853,
-0.06735819578170776,
-0.1740909218788147,
0.6721510887145996,
-0.06844751536846161,
-0.05346314609050751,
-0.4002130925655365,
-0.07606250792741776,
0.02278558537364006,
0.3549979031085968,
-0.17170187830924988,
0.16454139351844788,
0.2916479706764221,
-0.08987060189247131,
0.3998042047023773,
0.40565061569213867,
0.27617019414901733,
0.08264128863811493,
0.18694038689136505,
0.1352812647819519,
-0.25453442335128784,
-0.05942224711179733,
0.10557350516319275,
0.10922088474035263,
0.015193372964859009,
-0.17789824306964874,
0.22510921955108643,
0.21453024446964264,
-0.2600964605808258,
0.02280561998486519,
0.05078411474823952,
0.09910887479782104,
-0.36935821175575256,
-0.03264891356229782,
0.30094674229621887,
0.021823406219482422,
0.13578516244888306,
-0.06971799582242966,
-0.3443899154663086,
-0.3669930100440979,
0.2136279046535492,
-0.16034696996212006,
0.12192729860544205,
0.08940251916646957,
0.12694472074508667,
0.20680716633796692,
0.48850342631340027,
0.2925478518009186,
0.16469711065292358,
-0.16311128437519073,
-0.3266657292842865,
-0.7280311584472656,
-0.05024582892656326,
-0.07627017796039581,
-0.24293920397758484,
0.18864460289478302,
-0.14755989611148834,
0.010097198188304901,
0.24875810742378235,
0.28797388076782227,
-0.27454501390457153,
0.23761838674545288,
0.04652852192521095,
-0.513047456741333,
0.09936121106147766,
0.6245215535163879,
0.1516290307044983,
-0.03845584765076637,
-0.14196448028087616,
0.041179150342941284,
0.21255964040756226,
0.005308754742145538,
-0.08418601006269455,
-0.04315711557865143,
0.08255495131015778,
-0.0680045485496521,
0.4516634941101074,
0.08846598118543625,
0.14498797059059143,
-0.24748072028160095,
-0.464094877243042,
-0.4629756212234497,
-0.03425212949514389,
-0.09204822033643723,
0.018306277692317963,
0.09330932796001434,
0.5764704942703247,
-0.2370968610048294,
0.10389786958694458,
-0.3312206566333771,
0.3207405209541321,
-0.2076393961906433,
-0.23811550438404083,
-0.38181859254837036,
0.14598016440868378,
0.16725128889083862,
0.07253280282020569,
0.10253290832042694,
0.21853846311569214,
-0.0047293901443481445,
0.12338487803936005,
-0.35913747549057007,
-0.16693583130836487,
0.568589448928833,
-0.2830806076526642,
-0.12572474777698517,
-0.16670812666416168,
0.37419450283050537,
-0.2848292291164398,
0.3011372983455658,
-0.9054283499717712,
0.037466861307621,
0.2975027859210968,
0.426596999168396,
-0.2262529581785202,
0.22485661506652832,
-0.24891555309295654,
-0.18191735446453094,
-0.05536552518606186,
0.07509024441242218,
-0.029715877026319504,
-0.24626798927783966,
-0.0914909690618515,
-0.10491034388542175
] |
https://github.com/huggingface/datasets/issues/4426 | Add loading variable number of columns for different splits | Hi! Indeed the column is missing, but you shouldn't get an error? Have you made some modifications (locally) to the loading script? I've opened a PR to add the missing columns to the script. | **Is your feature request related to a problem? Please describe.**
The original dataset `blended_skill_talk` consists of different sets of columns for the different splits: (test/valid) splits have additional data column `label_candidates` that the (train) doesn't have.
When loading such data, an exception occurs at table.py:cast_table_to_schema, because of mismatched columns. | 34 | Add loading variable number of columns for different splits
**Is your feature request related to a problem? Please describe.**
The original dataset `blended_skill_talk` consists of different sets of columns for the different splits: (test/valid) splits have additional data column `label_candidates` that the (train) doesn't have.
When loading such data, an exception occurs at table.py:cast_table_to_schema, because of mismatched columns.
Hi! Indeed the column is missing, but you shouldn't get an error? Have you made some modifications (locally) to the loading script? I've opened a PR to add the missing columns to the script. | [
-0.09027811884880066,
-0.2585310935974121,
-0.04823273420333862,
0.1493133008480072,
0.5014791488647461,
0.16222140192985535,
0.49423909187316895,
0.3203108012676239,
0.3934251070022583,
0.2607402801513672,
-0.02070060558617115,
0.3569554090499878,
-0.2077334225177765,
0.6640576720237732,
0.08534577488899231,
-0.46452388167381287,
0.052986990660429,
0.13296747207641602,
-0.13438156247138977,
0.09378767013549805,
-0.3012252449989319,
0.05062741041183472,
0.042711466550827026,
-0.2394973784685135,
-0.37427303194999695,
0.2830647826194763,
-0.24965804815292358,
0.048570383340120316,
0.060194291174411774,
-0.24974629282951355,
-0.05656906217336655,
0.17598752677440643,
0.052797138690948486,
0.12204036861658096,
-0.00011029188317479566,
-0.023199692368507385,
-0.1122429221868515,
-0.21031974256038666,
-0.3612578809261322,
-0.10630318522453308,
0.09381292015314102,
-0.22855383157730103,
0.13474631309509277,
-0.3025861084461212,
-0.3115212619304657,
0.18510760366916656,
-0.4020112454891205,
0.06089024990797043,
0.22095471620559692,
0.20084214210510254,
0.26967763900756836,
-0.028859363868832588,
-0.11122176796197891,
-0.17720048129558563,
0.44431254267692566,
-0.1624414175748825,
-0.20888866484165192,
0.2742459774017334,
0.13748984038829803,
-0.2020510733127594,
0.0840834304690361,
0.2160768061876297,
0.1522834599018097,
-0.182215616106987,
0.16326865553855896,
0.014540513977408409,
0.299418181180954,
-0.2426915466785431,
0.0648319274187088,
0.3367899954319,
0.4288470447063446,
-0.04142057150602341,
-0.07962310314178467,
-0.41405412554740906,
0.38280659914016724,
-0.34700196981430054,
-0.05328188091516495,
-0.026631051674485207,
0.08276163041591644,
0.043743785470724106,
-0.16169968247413635,
0.08759498596191406,
-0.06710676103830338,
-0.06795084476470947,
-0.017178144305944443,
0.4443608522415161,
0.10987712442874908,
0.07692428678274155,
0.17196112871170044,
0.029603242874145508,
0.20343594253063202,
0.41345566511154175,
-0.12755344808101654,
0.26529955863952637,
-0.533633828163147,
-0.29604673385620117,
-0.01921660453081131,
-0.26533007621765137,
-0.036210060119628906,
0.4363711476325989,
0.06628473103046417,
0.17545157670974731,
0.14714014530181885,
-0.0010028928518295288,
0.3472951650619507,
0.18384402990341187,
-0.10418776422739029,
0.22994449734687805,
-0.13818220794200897,
0.22643055021762848,
-0.14019770920276642,
0.011441472917795181,
-0.3094106614589691,
-0.17215250432491302,
0.15883171558380127,
0.17103323340415955,
-0.15197741985321045,
0.09463946521282196,
-0.25886815786361694,
-0.025806330144405365,
0.39012622833251953,
0.0030258209444582462,
0.041676849126815796,
0.6848349571228027,
0.06389734894037247,
0.32780104875564575,
0.0046837590634822845,
0.32732516527175903,
-0.06841060519218445,
-0.3197895288467407,
-0.2707642614841461,
0.09747759997844696,
-0.10302755236625671,
0.0803539976477623,
0.1331905722618103,
0.2851353883743286,
0.08720456063747406,
0.15825803577899933,
-0.025433138012886047,
-0.35982632637023926,
-0.23305195569992065,
-0.16471824049949646,
-0.04498780518770218,
0.14385244250297546,
0.050557393580675125,
-0.25722840428352356,
0.17158852517604828,
0.21638156473636627,
-0.10856304317712784,
0.15616846084594727,
-0.3598434627056122,
-0.6029518842697144,
0.056566353887319565,
0.28877630829811096,
-0.05669763311743736,
-0.14691567420959473,
-0.26663655042648315,
0.3495028018951416,
0.122487872838974,
-0.2611430883407593,
0.049243517220020294,
-0.2823019027709961,
-0.21513299643993378,
-0.35636278986930847,
0.29287955164909363,
0.31400665640830994,
-0.08736436069011688,
-0.22917897999286652,
0.16554699838161469,
-0.12669646739959717,
0.0684858188033104,
0.014067575335502625,
-0.14000123739242554,
0.1326257735490799,
-0.19875869154930115,
0.12678605318069458,
0.44584915041923523,
0.06021499261260033,
-0.0077287014573812485,
0.05770855396986008,
-0.09056511521339417,
0.07220767438411713,
0.2973673641681671,
0.14128893613815308,
0.3605087101459503,
0.025001855567097664,
0.16660906374454498,
0.3573737144470215,
-0.18649822473526,
0.19266058504581451,
-0.10146143287420273,
0.04072076827287674,
0.2827986478805542,
0.340446412563324,
0.040522947907447815,
0.10603083670139313,
0.19196346402168274,
0.05959582328796387,
0.24934238195419312,
-0.13335907459259033,
-0.08898229897022247,
0.1401265263557434,
0.204382985830307,
0.35127562284469604,
0.17121173441410065,
-0.2808755338191986,
-0.2117651104927063,
0.22384455800056458,
0.11931218206882477,
0.004088252782821655,
0.32810068130493164,
-0.2650931477546692,
-0.3734530210494995,
0.03766170144081116,
-0.15190185606479645,
0.23727349936962128,
0.1378294974565506,
-0.2498476505279541,
-0.10050110518932343,
-0.28298336267471313,
-0.1517001986503601,
-0.11579970270395279,
-0.25244566798210144,
0.013227973133325577,
0.08869576454162598,
0.41051989793777466,
0.02004314959049225,
-0.20555701851844788,
0.042111389338970184,
0.5495561361312866,
0.15779659152030945,
-0.2249164581298828,
-0.15784817934036255,
0.4103259742259979,
0.09767590463161469,
0.034382592886686325,
-0.37598717212677,
0.06439107656478882,
-0.101311095058918,
0.03818252310156822,
-0.05648096650838852,
-0.2945970296859741,
-0.05647920444607735,
-0.11476697027683258,
0.0027208924293518066,
0.5023341774940491,
-0.2854970693588257,
0.19648616015911102,
0.06021878123283386,
-0.12625928223133087,
0.278933584690094,
-0.11730669438838959,
0.13414904475212097,
-0.3410606384277344,
0.012901894748210907,
-0.1579732447862625,
-0.2576196491718292,
-0.14295083284378052,
-0.20642699301242828,
0.3292672038078308,
0.3915046751499176,
0.029906075447797775,
0.07029911875724792,
-0.1372997760772705,
0.044243790209293365,
-0.13279706239700317,
-0.1371748149394989,
0.13544535636901855,
0.634467601776123,
0.2288183569908142,
-0.15907995402812958,
0.05778080224990845,
-0.08922091871500015,
-0.08919724822044373,
0.13414493203163147,
-0.24458889663219452,
0.07396884262561798,
0.5525342226028442,
0.0004224986769258976,
-0.2019849568605423,
0.01784174144268036,
-0.04667877405881882,
0.1933780014514923,
0.16106858849525452,
-0.2885473668575287,
-0.15520386397838593,
-0.1086517870426178,
0.007979489862918854,
-0.24365562200546265,
-0.05117477849125862,
0.032485317438840866,
-0.3116197884082794,
0.23417134582996368,
0.19615978002548218,
-0.38626450300216675,
0.16352564096450806,
-0.3411218822002411,
0.0797734409570694,
-0.10129151493310928,
-0.015798242762684822,
-0.007158275693655014,
-0.1501173973083496,
0.04180367290973663,
0.08941137790679932,
-0.12683837115764618,
0.1360851526260376,
0.2969755530357361,
-0.27611005306243896,
-0.13389292359352112,
-0.016608914360404015,
-0.25663286447525024,
0.03347720205783844,
-0.2343427985906601,
-0.12875856459140778,
0.18848448991775513,
0.19314134120941162,
0.3735971450805664,
-0.34622007608413696,
0.44145482778549194,
-0.2070847898721695,
0.030863190069794655,
0.4333961308002472,
0.1292257159948349,
-0.012098146602511406,
-0.03823332116007805,
-0.6336199045181274,
-0.23835070431232452,
-0.38245439529418945,
-0.016171783208847046,
0.02001413330435753,
0.12530732154846191,
-0.22947365045547485,
0.28696784377098083,
-0.2555089592933655,
0.12132947891950607,
0.07326455414295197,
-0.38088494539260864,
0.267295241355896,
0.04604964330792427,
-0.09386008232831955,
-0.13777539134025574,
0.2514578402042389,
-0.14324145019054413,
0.04442707076668739,
-0.03877173736691475,
-0.2454494833946228,
0.16466137766838074,
0.22990083694458008,
-0.027635663747787476,
-0.29273760318756104,
-0.1244259774684906,
0.4259839355945587,
0.10818753391504288,
-0.018492795526981354,
-0.058046605437994,
-0.17597432434558868,
-0.04801272600889206,
0.25461307168006897,
-0.024181343615055084,
-0.36624908447265625,
0.6450177431106567,
-0.23069840669631958,
0.3464445471763611,
-0.0686192661523819,
0.14774970710277557,
0.2985827624797821,
-0.47701841592788696,
0.19756905734539032,
-0.3147442042827606,
-0.11406172066926956,
0.13837213814258575,
-0.2670762836933136,
0.04583413898944855,
0.3074331283569336,
-0.14463549852371216,
-0.12873385846614838,
-0.13271167874336243,
-0.18066999316215515,
0.23040348291397095,
-0.25654929876327515,
0.49075496196746826,
-0.2426508367061615,
0.18696701526641846,
-0.24773746728897095,
-0.015461698174476624,
-0.3373499810695648,
-0.028841469436883926,
0.048690419644117355,
0.15616869926452637,
-0.06524252146482468,
-0.17049430310726166,
-0.5278723239898682,
-0.23399889469146729,
0.07720045000314713,
0.07921987771987915,
0.10760357230901718,
0.045428317040205,
-0.07882597297430038,
-0.3571374714374542,
0.05975722521543503,
0.21554772555828094,
0.3587983250617981,
-0.3131526708602905,
-0.07964080572128296,
0.2129858285188675,
-0.04550284147262573,
-0.03651866316795349,
-0.38910937309265137,
-0.005742404609918594,
-0.20065118372440338,
0.27942755818367004,
0.5134084224700928,
-0.4024237394332886,
0.023556595668196678,
0.680843710899353,
0.33646056056022644,
-0.33302098512649536,
-0.4760928153991699,
-0.4363615810871124,
0.19435545802116394,
-0.2093607783317566,
0.09122070670127869,
0.0579862967133522,
0.3836420774459839,
-0.2930569350719452,
-0.13674241304397583,
-0.0036319997161626816,
-0.25942620635032654,
0.045125022530555725,
0.1770843118429184,
0.28046321868896484,
0.008349406532943249,
0.34927546977996826,
-0.064837746322155,
0.09066081047058105,
-0.03286305069923401,
0.7943493127822876,
-0.37569940090179443,
-0.2661197781562805,
0.0743161141872406,
-0.08211379498243332,
0.27873361110687256,
0.2920004725456238,
0.08901405334472656,
0.36848437786102295,
-0.08027538657188416,
0.22129780054092407,
-0.08425863832235336,
0.0006645377725362778,
0.08351366221904755,
-0.21494023501873016,
-0.18547743558883667,
-0.5963813662528992,
0.14427149295806885,
-0.3036438524723053,
-0.005268506705760956,
-0.176040917634964,
-0.2010146826505661,
-0.2739267349243164,
0.5892423987388611,
-0.3090229630470276,
0.9219161868095398,
-0.10980081558227539,
0.11419479548931122,
0.14621597528457642,
0.03303956985473633,
0.07046379894018173,
-0.3472425937652588,
0.22738943994045258,
-0.57096928358078,
-0.26578041911125183,
0.11806920170783997,
0.09392955899238586,
-0.12336214631795883,
0.21205340325832367,
-0.1520545780658722,
0.22138039767742157,
-0.3235419988632202,
0.41836798191070557,
-0.19445855915546417,
0.04821372032165527,
-0.1604478657245636,
-0.10840271413326263,
-0.13541707396507263,
0.08478065580129623,
0.12613768875598907,
-0.10941405594348907,
0.01882191002368927,
0.05539553239941597,
0.036581385880708694,
-0.1737419217824936,
-0.23343297839164734,
0.1374402642250061,
-0.10938732326030731,
0.029232993721961975,
0.0714200958609581,
-0.06041371077299118,
0.04396170750260353,
0.06430766731500626,
0.05175077170133591,
0.022065604105591774,
-0.066719651222229,
0.10089309513568878,
0.12647490203380585,
-0.08150509744882584,
-0.0666179358959198,
0.19607551395893097,
0.3585208058357239,
-0.04664861410856247,
-0.3836270868778229,
0.20249491930007935,
-0.12998470664024353,
-0.3489026427268982,
-0.37642043828964233,
0.06451497972011566,
0.3093947768211365,
-0.763809323310852,
-0.298702597618103,
-0.0925864726305008,
0.2658543586730957,
-0.47292017936706543,
0.19576938450336456,
-0.060203880071640015,
-0.13383668661117554,
0.1444198191165924,
-0.07159270346164703,
-0.12763920426368713,
-0.165410116314888,
0.15305033326148987,
0.13036125898361206,
0.21422994136810303,
0.5339206457138062,
-0.0016641244292259216,
0.027177810668945312,
-0.24098077416419983,
-0.15826833248138428,
0.4272057116031647,
-0.6736679673194885,
0.08119172602891922,
0.17808610200881958,
-0.2935175895690918,
0.16314364969730377,
0.3206932544708252,
0.24688084423542023,
0.22085320949554443,
-0.10861557722091675,
-0.20987503230571747,
-0.20969150960445404,
0.13034869730472565,
0.2639181315898895,
0.22376863658428192,
-0.08252357691526413,
0.48944610357284546,
-0.25859564542770386,
0.39367732405662537,
-0.3741288483142853,
-0.20530614256858826,
-0.2021949589252472,
0.1964559704065323,
0.019384106621146202,
-0.1375686228275299,
-0.22818408906459808,
0.12576019763946533,
0.2962808609008789,
-0.16805210709571838,
0.05125412717461586,
-0.19254261255264282,
-0.1867818534374237,
0.08954277634620667,
-0.0809599906206131,
0.42220067977905273,
-0.43701159954071045,
-0.1405661553144455,
-0.2162661850452423,
-0.22659184038639069,
0.22296491265296936,
-0.041551947593688965,
-0.05362797528505325,
-0.05432242527604103,
0.1966746598482132,
0.10935276746749878,
-0.20448006689548492,
0.23626966774463654,
-0.18398869037628174,
0.08483470976352692,
-0.12945719063282013,
-0.009236138314008713,
-0.23493872582912445,
-0.00461404025554657,
-0.03420676663517952,
0.04622751846909523,
0.10441238433122635,
0.015366246923804283,
0.29139649868011475,
-0.021653100848197937,
0.25212326645851135,
-0.08777986466884613,
0.216996967792511,
0.25968652963638306,
-0.26298096776008606,
0.12160179018974304,
0.22048109769821167,
0.3067791163921356,
-0.38421711325645447,
-0.12691184878349304,
-0.03502707555890083,
-0.08618330955505371,
0.08535274863243103,
0.41256949305534363,
0.3875862658023834,
0.02415098249912262,
0.23665565252304077,
0.12594494223594666,
0.15234021842479706,
0.0479259230196476,
0.06457705795764923,
0.407205730676651,
0.012644011527299881,
0.0007592849433422089,
0.12225492298603058,
-0.04353231564164162,
0.08323141932487488,
-0.03128083795309067,
-0.1377251148223877,
0.0523250550031662,
-0.2996428608894348,
-0.1256222426891327,
0.10386110097169876,
-0.2472284883260727,
-0.04650970920920372,
0.06391624361276627,
-0.22190746665000916,
0.06082579493522644,
-0.285046249628067,
0.39209386706352234,
-0.36124154925346375,
-0.10578262060880661,
-0.21882691979408264,
0.14362050592899323,
-0.20201531052589417,
-0.08794963359832764,
0.13349193334579468,
-0.14289264380931854,
-0.32301774621009827,
-0.037099018692970276,
0.04765986651182175,
0.03344840183854103,
0.0801178440451622,
0.01252826303243637,
0.07746658474206924,
0.012716693803668022,
-0.058278873562812805,
0.20757213234901428,
0.21419695019721985,
-0.40028810501098633,
0.1871698796749115,
0.07553301751613617,
-0.15464672446250916,
0.5699623227119446,
-0.29924508929252625,
0.40011274814605713,
0.28593817353248596,
0.1343865543603897,
-0.07844160497188568,
0.16238310933113098,
-0.02407900057733059,
0.0073470547795295715,
0.012025189585983753,
0.28600460290908813,
0.24170345067977905,
0.1884564757347107,
0.1729595959186554,
-0.22191618382930756,
0.0011316761374473572,
0.09686410427093506,
0.22124291956424713,
-0.29004091024398804,
0.48027095198631287,
0.11471226066350937,
-0.321085125207901,
-0.263244092464447,
0.10455381125211716,
-0.30243897438049316,
-0.11503206938505173,
-0.113358274102211,
0.09128008037805557,
0.06932589411735535,
0.10140297561883926,
0.11385011672973633,
0.1566271036863327,
0.31017011404037476,
-0.34332650899887085,
-0.3112793266773224,
-0.2512480318546295,
-0.12152594327926636,
-0.2804392874240875,
0.09970106184482574,
0.013316042721271515,
-0.552566409111023,
0.3170487880706787,
0.09889975935220718,
0.07457435876131058,
-0.18438345193862915,
0.15864330530166626,
-0.042865410447120667,
0.3422902524471283,
0.36432090401649475,
-0.2641581594944,
-0.2568656802177429,
-0.23953448235988617,
0.23276755213737488,
0.0690639391541481,
-0.13742657005786896,
0.11462600529193878,
0.33034276962280273,
0.03654627501964569,
0.059593554586172104,
0.057838842272758484,
0.189565971493721,
-0.0050110965967178345,
0.19470304250717163,
-0.4349060654640198,
0.5753457546234131,
-0.037677403539419174,
0.3644181191921234,
-0.009111043065786362,
-0.43245595693588257,
-0.13431385159492493,
0.21751666069030762,
0.37422412633895874,
0.13702626526355743,
0.22567078471183777,
0.1341351866722107,
-0.14708833396434784,
0.08135173469781876,
0.10950475931167603,
-0.08602481335401535,
-0.17624647915363312,
0.21459399163722992,
0.2349211871623993,
0.1360183209180832,
0.36247777938842773,
0.25006985664367676,
0.038442566990852356,
-0.032511889934539795,
-0.00613817572593689,
-0.4088132381439209,
0.32938119769096375,
0.07020825147628784,
-0.31483277678489685,
-0.19277533888816833,
0.38749828934669495,
0.13616745173931122,
0.2209978550672531,
-0.6943525075912476,
0.02346336841583252,
0.18580178916454315,
0.059362661093473434,
0.02810126543045044,
0.5207837820053101,
-0.03493143618106842,
0.0878298282623291,
0.0747591108083725,
-0.04082398861646652,
0.030012940987944603,
0.006452010944485664,
-0.2451745867729187,
-0.16124968230724335
] |
https://github.com/huggingface/datasets/issues/4422 | Cannot load timit_asr data set | @bhaddow we have also made a fix so that you don't have to convert to uppercase the file extensions of the LDC data.
Would you mind checking if it works OK now for you and reporting if there are any issues? Thanks. | ## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 42 | Cannot load timit_asr data set
## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
@bhaddow we have also made a fix so that you don't have to convert to uppercase the file extensions of the LDC data.
Would you mind checking if it works OK now for you and reporting if there are any issues? Thanks. | [
-0.11117299646139145,
-0.30005016922950745,
0.10342074930667877,
0.5051798224449158,
0.26155364513397217,
0.09815844148397446,
0.2501973807811737,
0.15714696049690247,
-0.3770354688167572,
-0.0910203754901886,
-0.1131468191742897,
0.4798595607280731,
-0.06322288513183594,
0.17775769531726837,
0.13415208458900452,
-0.09813132882118225,
0.028914660215377808,
-0.08668205142021179,
-0.24985015392303467,
-0.050926323980093,
-0.09452178329229355,
0.22728842496871948,
-0.11876742541790009,
0.34782886505126953,
-0.08069764077663422,
0.18032631278038025,
-0.25079816579818726,
0.32912904024124146,
0.042364247143268585,
-0.43936124444007874,
0.44200363755226135,
0.03489571064710617,
0.46350234746932983,
0.5587447285652161,
-0.00012207261170260608,
0.13236480951309204,
0.4100337028503418,
-0.03425949811935425,
-0.310995876789093,
-0.3366747498512268,
-0.255237877368927,
-0.11247313022613525,
0.19745033979415894,
-0.09548875689506531,
-0.11741912364959717,
-0.19385550916194916,
0.1021890789270401,
-0.28890207409858704,
0.26209554076194763,
0.1344878077507019,
0.1683189570903778,
-0.06979434192180634,
0.03023296222090721,
-0.3172336220741272,
-0.09510866552591324,
-0.2762618064880371,
0.08858885616064072,
0.43863794207572937,
0.05311639979481697,
0.010623790323734283,
0.18453499674797058,
-0.14492666721343994,
-0.08969828486442566,
-0.11448557674884796,
0.31848928332328796,
-0.011943229474127293,
-0.039369285106658936,
-0.12730610370635986,
0.3726617991924286,
0.3378620445728302,
0.9731475710868835,
-0.35798895359039307,
-0.2873193025588989,
0.03437037020921707,
0.11694785207509995,
-0.013306648470461369,
0.3386887013912201,
0.00018108170479536057,
-0.04228563606739044,
0.20979560911655426,
0.22530992329120636,
-0.03829832002520561,
-0.18388035893440247,
0.055972374975681305,
-0.10186852514743805,
-0.18817728757858276,
0.021338671445846558,
0.22431370615959167,
0.015789557248353958,
-0.17937980592250824,
0.14711272716522217,
-0.18454767763614655,
-0.06584307551383972,
0.15447527170181274,
-0.17507633566856384,
0.21314024925231934,
-0.08550357073545456,
-0.06126073747873306,
0.20155465602874756,
0.1470920294523239,
0.44374021887779236,
-0.0037751905620098114,
-0.467471718788147,
0.13711893558502197,
0.1652095466852188,
0.3090183734893799,
0.0012699514627456665,
0.19138996303081512,
0.28238797187805176,
-0.16671188175678253,
-0.15532666444778442,
-0.0643986314535141,
-0.27147501707077026,
-0.14824126660823822,
-0.10007117688655853,
-0.05654191970825195,
0.16202865540981293,
-0.41012507677078247,
-0.368002712726593,
0.024245869368314743,
-0.23470178246498108,
-0.066587433218956,
-0.15249696373939514,
0.30460917949676514,
0.17748257517814636,
0.33226239681243896,
0.025658831000328064,
0.21323640644550323,
-0.0820797011256218,
0.1549912393093109,
-0.09016570448875427,
0.06432833522558212,
-0.10968053340911865,
-0.09111762046813965,
0.21627478301525116,
-0.42837005853652954,
0.1405366063117981,
0.24599675834178925,
0.02888653427362442,
-0.07285356521606445,
-0.12196864932775497,
0.24439053237438202,
-0.16546165943145752,
0.09513212740421295,
0.055336687713861465,
0.18361365795135498,
0.04963870719075203,
-0.5233719348907471,
-0.10075850039720535,
0.21613791584968567,
-0.10037253051996231,
-0.18616615235805511,
-0.076427161693573,
0.07397221773862839,
-0.18490542471408844,
-0.13828688859939575,
-0.27566689252853394,
0.19097475707530975,
0.09263233840465546,
-0.1386094093322754,
-0.19307219982147217,
-0.06358426064252853,
-0.1712309867143631,
-0.32037290930747986,
0.06715448200702667,
0.4930758476257324,
-0.6492821574211121,
0.0561666265130043,
0.03879868984222412,
0.15014399588108063,
0.012810707092285156,
0.1894271820783615,
-0.2138504683971405,
-0.0067134276032447815,
-0.2899602949619293,
-0.09618958085775375,
0.047607533633708954,
-0.16999398171901703,
-0.585412323474884,
0.2460651695728302,
-0.1771780103445053,
0.07828378677368164,
0.2749743163585663,
0.15750974416732788,
-0.1297246217727661,
-0.1365966498851776,
-0.029598787426948547,
0.14951735734939575,
0.0885043516755104,
-0.400813490152359,
-0.41803961992263794,
-0.1901991367340088,
0.4517841935157776,
-0.025357084348797798,
0.11353552341461182,
0.20973199605941772,
0.16562403738498688,
0.005603405646979809,
0.25477921962738037,
0.02230556681752205,
-0.2136518359184265,
0.0562058724462986,
-0.07856607437133789,
-0.08203890919685364,
0.21165533363819122,
-0.013237111270427704,
-0.19665542244911194,
0.469220906496048,
0.1660669595003128,
0.08596289902925491,
0.0052675604820251465,
0.0038532689213752747,
-0.3891613781452179,
-0.08019649237394333,
-0.2623027265071869,
-0.010206658393144608,
-0.04743253439664841,
0.2897786498069763,
-0.11525088548660278,
0.19341182708740234,
-0.09877043217420578,
0.37008753418922424,
0.043833598494529724,
-0.03870850056409836,
-0.35464227199554443,
0.30342182517051697,
-0.05128245800733566,
0.16243644058704376,
0.23148292303085327,
-0.022726215422153473,
0.19632863998413086,
-0.09005872905254364,
-0.3329933285713196,
0.2573416233062744,
-0.25196173787117004,
0.10455045104026794,
0.09717908501625061,
-0.04965867102146149,
0.18215882778167725,
-0.3191492557525635,
0.1983335018157959,
0.4797890782356262,
0.2703586220741272,
0.08438805490732193,
-0.23769336938858032,
0.4310019612312317,
0.01752455160021782,
0.012211546301841736,
0.12052163481712341,
0.12466543167829514,
0.5210867524147034,
-0.197738915681839,
0.20480218529701233,
-0.03276627138257027,
0.19359402358531952,
-0.09885594248771667,
0.14728933572769165,
0.010069681331515312,
-0.3176466226577759,
0.14692291617393494,
-0.09363691508769989,
-0.18608641624450684,
-0.077509306371212,
0.2278246283531189,
-0.14661583304405212,
0.10529977828264236,
0.12072072923183441,
0.3228517174720764,
0.22400054335594177,
0.27843302488327026,
-0.19505953788757324,
-0.08074980229139328,
-0.20380280911922455,
-0.000759112648665905,
0.31895703077316284,
-0.13701048493385315,
-0.03764020651578903,
0.08731473237276077,
0.09172970801591873,
-0.006233439780771732,
-0.2557052671909332,
0.025908734649419785,
0.2528441846370697,
0.4072750508785248,
-0.4079425632953644,
0.15044169127941132,
-0.3044034540653229,
-0.18170353770256042,
0.013058274984359741,
0.028210844844579697,
-0.17121656239032745,
-0.18265113234519958,
0.032039329409599304,
0.24620698392391205,
0.21177516877651215,
0.10601996630430222,
-0.18001170456409454,
0.15799769759178162,
-0.00615958496928215,
0.20844395458698273,
-0.1279239058494568,
-0.14988979697227478,
-0.43869268894195557,
0.03296839818358421,
0.7558921575546265,
0.17931902408599854,
0.26163631677627563,
0.0769568607211113,
0.03821159526705742,
-0.33209332823753357,
-0.2352139949798584,
0.06644271314144135,
-0.1291542947292328,
0.33605921268463135,
0.04664677381515503,
-0.03151020407676697,
-0.27826768159866333,
-0.2606198489665985,
0.25043830275535583,
-0.0037458576261997223,
-0.13675761222839355,
0.4152824580669403,
-0.01524644996970892,
-0.2498697191476822,
-0.05077514797449112,
-0.4690913259983063,
-0.14851966500282288,
-0.12089790403842926,
0.21166278421878815,
0.03829501196742058,
0.12634964287281036,
0.11716265231370926,
-0.012418117374181747,
-0.04495585337281227,
0.532672643661499,
-0.13342289626598358,
-0.3646093010902405,
-0.09479556977748871,
0.20602969825267792,
-0.09451714903116226,
-0.5216634273529053,
-0.23652465641498566,
0.11699438095092773,
0.1570209562778473,
-0.25875163078308105,
-0.46762651205062866,
0.07539345324039459,
-0.1698783040046692,
0.2926434874534607,
-0.13071668148040771,
0.011533737182617188,
0.004683628678321838,
0.0852060317993164,
-0.015981942415237427,
-0.17004086077213287,
-0.07388383150100708,
0.2798443138599396,
-0.10722913593053818,
0.16859856247901917,
0.2974000871181488,
0.5203705430030823,
-0.1231691986322403,
0.42855966091156006,
0.3035137355327606,
-0.3951437473297119,
0.345104455947876,
-0.18556824326515198,
0.24258288741111755,
-0.11625320464372635,
-0.4426151514053345,
-0.333529531955719,
-0.11197388172149658,
0.13993972539901733,
0.1648848056793213,
0.04018872231245041,
0.0030501168221235275,
-0.16377364099025726,
0.007811293005943298,
-0.1304018795490265,
-0.1761617362499237,
-0.17481571435928345,
-0.4634808301925659,
-0.046970635652542114,
0.23741161823272705,
0.024772748351097107,
-0.1127137839794159,
-0.2710479199886322,
0.23609428107738495,
0.33296340703964233,
0.10548245161771774,
0.0000678939395584166,
-0.30524179339408875,
-0.18635311722755432,
-0.45790618658065796,
0.44526243209838867,
0.22402723133563995,
0.5449813604354858,
0.029141519218683243,
-0.022844525054097176,
0.1791633665561676,
-0.059662025421857834,
0.5521699786186218,
-0.373100608587265,
0.20286883413791656,
0.33647969365119934,
0.24238622188568115,
-0.3253941237926483,
0.07220771908760071,
0.02943762019276619,
0.6758834719657898,
-0.019938666373491287,
0.29383426904678345,
-0.10831654071807861,
0.0186406709253788,
-0.29313984513282776,
0.44317004084587097,
-0.4277348518371582,
-0.27222150564193726,
-0.35451313853263855,
-0.38949018716812134,
-0.28053390979766846,
-0.13532891869544983,
-0.16986486315727234,
0.24070696532726288,
-0.21239250898361206,
0.03182942047715187,
-0.3444857597351074,
-0.3382004499435425,
0.4855409860610962,
0.14812393486499786,
0.5095787644386292,
0.2694886028766632,
0.639844536781311,
-0.046606630086898804,
0.16877980530261993,
0.13747817277908325,
0.7837068438529968,
-0.21391171216964722,
0.013841770589351654,
0.1853702962398529,
-0.2723441421985626,
0.10503746569156647,
0.1760745644569397,
-0.2847149074077606,
0.19019019603729248,
-0.3613838255405426,
-0.19349636137485504,
-0.060495730489492416,
-0.14674755930900574,
-0.0912051722407341,
0.17023634910583496,
-0.3223481774330139,
-0.4877719581127167,
0.5513089895248413,
-0.10415652394294739,
-0.3196521997451782,
0.5016742944717407,
0.04640207439661026,
-0.06356994062662125,
0.3815224766731262,
-0.27050545811653137,
1.0630028247833252,
-0.45891785621643066,
0.15978126227855682,
-0.038561075925827026,
0.1007380485534668,
0.108096182346344,
0.07579399645328522,
-0.060227274894714355,
-0.4775322675704956,
-0.2120361328125,
-0.017947498708963394,
0.060993801802396774,
-0.10130058974027634,
0.027123648673295975,
-0.1977309286594391,
0.2116268426179886,
0.11760656535625458,
0.10531678795814514,
0.367728054523468,
0.65485680103302,
-0.12030034512281418,
0.1747385412454605,
-0.2430848777294159,
-0.004941271618008614,
0.20017161965370178,
-0.05297305807471275,
0.09931836277246475,
-0.045241061598062515,
-0.07979114353656769,
-0.15996034443378448,
-0.33886879682540894,
0.09793000668287277,
-0.1306023895740509,
0.5762055516242981,
-0.2720835506916046,
-0.7149540185928345,
0.40333855152130127,
0.4882304072380066,
0.4900367856025696,
0.1419454663991928,
-0.2639601528644562,
0.050139736384153366,
0.045602235943078995,
0.22701193392276764,
-0.08217108249664307,
0.07808495312929153,
0.1813058853149414,
-0.022672489285469055,
-0.1150064766407013,
0.11394304037094116,
0.23793816566467285,
-0.16764026880264282,
-0.27140161395072937,
-0.03616213798522949,
-0.07052002847194672,
-0.29875874519348145,
0.02560022473335266,
-0.031567372381687164,
-0.04898202046751976,
-0.21454037725925446,
0.043326351791620255,
0.18996065855026245,
-0.013875672593712807,
-0.008478283882141113,
0.07181808352470398,
-0.2960324287414551,
0.17382332682609558,
0.5882043838500977,
0.20268189907073975,
0.21515262126922607,
0.555142879486084,
0.12370520830154419,
0.030355215072631836,
-0.03712237626314163,
0.14909961819648743,
0.029164044186472893,
-0.5500364303588867,
0.11195322126150131,
-0.14649923145771027,
0.1694178730249405,
0.05033944547176361,
0.16135723888874054,
0.20704305171966553,
0.054874490946531296,
0.14284490048885345,
-0.3960582911968231,
-0.2274775207042694,
0.07223846018314362,
-0.10673192143440247,
0.18851958215236664,
-0.10412240773439407,
-0.05253419652581215,
-0.07968106865882874,
-0.08888841420412064,
-0.2283121794462204,
0.32617637515068054,
-0.001575428992509842,
-0.00542810931801796,
0.013704712502658367,
0.1171557828783989,
0.17685136198997498,
-0.14694245159626007,
0.11158958077430725,
0.18008530139923096,
0.11948487907648087,
-0.07976950705051422,
-0.0649883970618248,
0.20851512253284454,
-0.032908692955970764,
-0.09137265384197235,
-0.40421369671821594,
-0.29053765535354614,
-0.001261761412024498,
0.07117906957864761,
0.036532923579216,
0.2692437767982483,
-0.1345318853855133,
0.04497331753373146,
0.18116290867328644,
-0.0157778337597847,
-0.27646031975746155,
0.2647416889667511,
-0.2373054027557373,
0.17492526769638062,
0.26858726143836975,
0.13614685833454132,
-0.03660192713141441,
-0.014615274965763092,
-0.21456196904182434,
0.11970239877700806,
-0.10446672141551971,
-0.14758872985839844,
0.2477746307849884,
-0.3461458086967468,
0.013593152165412903,
0.24013207852840424,
-0.07334369421005249,
0.317579984664917,
-0.2275608628988266,
0.08034110814332962,
0.26982250809669495,
0.031067173928022385,
-0.5249632596969604,
-0.19391591846942902,
-0.39019572734832764,
-0.2851842939853668,
-0.2048967182636261,
0.2769433856010437,
0.28986358642578125,
-0.5004305839538574,
-0.1286649852991104,
-0.01955495774745941,
0.2937740981578827,
0.19713596999645233,
0.031695425510406494,
0.6341696977615356,
0.06828348338603973,
0.06338313966989517,
-0.003446219488978386,
0.022012101486325264,
-0.17292577028274536,
0.41730189323425293,
-0.2736157476902008,
0.17580503225326538,
-0.21865668892860413,
0.13471800088882446,
0.12404893338680267,
-0.47197961807250977,
0.04817209765315056,
-0.0023705512285232544,
-0.11200785636901855,
0.10380711406469345,
0.19877901673316956,
0.6873951554298401,
0.015835978090763092,
0.14113231003284454,
-0.22622931003570557,
-0.09041953086853027,
-0.006485205143690109,
-0.20086486637592316,
-0.15514586865901947,
-0.4486062228679657,
-0.24004347622394562,
0.06696641445159912,
-0.3017663061618805,
-0.010453276336193085,
0.18283671140670776,
0.2532750070095062,
-0.13356298208236694,
-0.3089958131313324,
-0.10039673000574112,
0.38189172744750977,
0.03051309660077095,
-0.24588517844676971,
0.21513408422470093,
0.43713104724884033,
-0.1813664734363556,
0.3054901361465454,
0.01764390990138054,
0.47827813029289246,
0.007899923250079155,
-0.28539761900901794,
0.2859973609447479,
0.0304099228233099,
0.002447826787829399,
0.19062672555446625,
0.2953970432281494,
0.04265063256025314,
0.0038509536534547806,
0.22224880754947662,
-0.0035258373245596886,
0.08045821636915207,
-0.0771055817604065,
0.1988249272108078,
0.18539489805698395,
-0.30501648783683777,
0.20518776774406433,
-0.021076016128063202,
-0.025276679545640945,
-0.07673017680644989,
0.21137432754039764,
-0.443181574344635,
-0.26107197999954224,
0.4519747495651245,
0.1230418011546135,
0.007630644366145134,
-0.2162778228521347,
0.048359647393226624,
-0.15222832560539246,
0.39013808965682983,
0.47228187322616577,
0.23150303959846497,
-0.2575930953025818,
-0.31683820486068726,
-0.870513916015625,
0.2031673938035965,
-0.07892975211143494,
-0.11503386497497559,
0.1364373117685318,
-0.07749764621257782,
0.3279341459274292,
-0.027943097054958344,
0.214235320687294,
0.36702489852905273,
-0.18306034803390503,
0.35172605514526367,
-0.28028595447540283,
-0.2864495515823364,
-0.02042229473590851,
0.1543235182762146,
-0.40587425231933594,
-0.37945616245269775,
-0.03086158260703087,
-0.14106513559818268,
0.004833605140447617,
-0.20162753760814667,
0.0534757599234581,
0.1527806967496872,
0.2657240331172943,
0.3977186381816864,
0.15790732204914093,
0.5454262495040894,
0.083194799721241,
-0.19540028274059296,
-0.1783236414194107,
-0.31072765588760376,
-0.1948968917131424,
0.19058887660503387,
0.14009004831314087,
0.07766052335500717,
-0.20832766592502594,
-0.18466030061244965,
-0.13876308500766754,
0.10437589883804321,
-0.011113166809082031,
0.29915651679039,
-0.37990304827690125,
-0.04096364229917526,
-0.35340648889541626,
0.19792112708091736,
-0.04936408996582031,
0.4816599190235138,
0.07445508241653442,
0.31632691621780396,
-0.15862086415290833,
-0.45679908990859985,
0.4792052209377289,
-0.5619736313819885,
-0.2339930534362793,
0.02093515917658806,
0.22705447673797607,
-0.07996813207864761,
0.03219228237867355,
-0.23638176918029785,
-0.15639075636863708,
0.36831676959991455,
0.13015365600585938,
-0.1658843755722046,
0.09878242015838623,
-0.019031062722206116,
0.26268428564071655,
-0.17505280673503876,
0.12013695389032364,
0.2018452286720276,
-0.3154710829257965,
0.04923911765217781,
-0.3141074776649475
] |
https://github.com/huggingface/datasets/issues/4422 | Cannot load timit_asr data set | Hi @albertvillanova -It loads fine on a copy of the data from deepai - although I have to remove the copies of the .WAV files (with extension .WAV,wav). On a copy of the data that was obtained from the LDC, the glob still fails to find the files. The LDC copy looks like it was copied from CD, in 2004, so the structure may be different to a current download. | ## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 70 | Cannot load timit_asr data set
## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Hi @albertvillanova -It loads fine on a copy of the data from deepai - although I have to remove the copies of the .WAV files (with extension .WAV,wav). On a copy of the data that was obtained from the LDC, the glob still fails to find the files. The LDC copy looks like it was copied from CD, in 2004, so the structure may be different to a current download. | [
-0.12274299561977386,
-0.28387558460235596,
0.11440135538578033,
0.419750452041626,
0.24682165682315826,
0.013537831604480743,
0.16538842022418976,
0.16519787907600403,
-0.35715633630752563,
0.01091025024652481,
-0.19361940026283264,
0.395245760679245,
-0.13379591703414917,
0.09354683011770248,
0.1807391196489334,
-0.079892098903656,
0.09644467383623123,
-0.022815227508544922,
-0.2525741457939148,
-0.08258777856826782,
-0.1656128168106079,
0.274486243724823,
-0.17628031969070435,
0.3952155113220215,
-0.04553079977631569,
0.23233255743980408,
-0.2420174479484558,
0.3812278211116791,
-0.10580940544605255,
-0.4443836808204651,
0.3436681926250458,
0.08360303938388824,
0.3856687843799591,
0.5956049561500549,
-0.00012633112783078104,
0.14274398982524872,
0.38891929388046265,
-0.10506337881088257,
-0.3536602854728699,
-0.2659391164779663,
-0.3112165033817291,
-0.1236155703663826,
0.03703392297029495,
0.03787117451429367,
-0.08116431534290314,
-0.34214335680007935,
0.13744303584098816,
-0.37401866912841797,
0.30178603529930115,
0.2656145691871643,
0.10372109711170197,
-0.07487329840660095,
0.07516881823539734,
-0.28838101029396057,
0.10731911659240723,
-0.22687287628650665,
0.06712234765291214,
0.48259472846984863,
0.2339036762714386,
-0.06974601000547409,
0.11038480699062347,
-0.0907086580991745,
-0.1263607293367386,
-0.12183968722820282,
0.3034155070781708,
0.018504856154322624,
-0.06948781758546829,
-0.13700620830059052,
0.3501623570919037,
0.32696086168289185,
0.9167166948318481,
-0.32075801491737366,
-0.3741317689418793,
-0.022304262965917587,
0.1405300796031952,
-0.023330973461270332,
0.3556467294692993,
-0.08964881300926208,
-0.08472763001918793,
0.22522851824760437,
0.1367354393005371,
-0.016155263409018517,
-0.1400633007287979,
0.10900624096393585,
-0.03833216428756714,
-0.18104997277259827,
0.04226301610469818,
0.21672213077545166,
0.10124766826629639,
-0.1338554173707962,
0.10325834155082703,
-0.15247182548046112,
-0.09375841915607452,
0.23311977088451385,
-0.15808042883872986,
0.2876872420310974,
-0.07480356842279434,
-0.04377526789903641,
0.23348689079284668,
0.11603476852178574,
0.46249261498451233,
-0.034326910972595215,
-0.4580215811729431,
0.18051567673683167,
0.2037416398525238,
0.34606078267097473,
-0.08137001842260361,
0.018640581518411636,
0.33682799339294434,
-0.1888517290353775,
-0.19329717755317688,
-0.06133291870355606,
-0.32295000553131104,
-0.1826368272304535,
-0.13817831873893738,
-0.08533711731433868,
0.1794946938753128,
-0.3287116289138794,
-0.4359557628631592,
-0.007041896693408489,
-0.2608760595321655,
-0.04683910310268402,
-0.13515996932983398,
0.2805412709712982,
0.26162290573120117,
0.38395577669143677,
-0.022079385817050934,
0.3046342730522156,
-0.10355666279792786,
0.1849086582660675,
-0.013078656047582626,
0.028459329158067703,
-0.07082106918096542,
-0.03906085342168808,
0.2852709889411926,
-0.42351341247558594,
0.23101292550563812,
0.25417232513427734,
0.038053736090660095,
-0.0724719688296318,
-0.17621710896492004,
0.2577909231185913,
-0.13977783918380737,
0.11447212845087051,
-0.002711605280637741,
0.16939710080623627,
-0.013019021600484848,
-0.4477943778038025,
-0.1410810500383377,
0.2022450566291809,
-0.0851430669426918,
-0.16573689877986908,
-0.05731363594532013,
0.023625684902071953,
-0.2443723976612091,
0.008172575384378433,
-0.263711154460907,
0.13066524267196655,
-0.03160519152879715,
-0.33633777499198914,
-0.21306046843528748,
-0.15242458879947662,
-0.19476568698883057,
-0.2778899371623993,
0.07207745313644409,
0.43370163440704346,
-0.6589205861091614,
0.056097231805324554,
-0.05782308802008629,
0.22481957077980042,
0.00999462604522705,
0.24147193133831024,
-0.11445289105176926,
0.024726562201976776,
-0.35681289434432983,
-0.05242835730314255,
0.0409691259264946,
-0.26565825939178467,
-0.6020044088363647,
0.16005277633666992,
-0.2322121262550354,
0.2130216807126999,
0.35383525490760803,
0.1474434733390808,
-0.12461282312870026,
-0.1600995510816574,
0.06643043458461761,
0.10304679721593857,
0.1242862343788147,
-0.3825337588787079,
-0.35154446959495544,
-0.18730510771274567,
0.30887269973754883,
-0.011982723139226437,
0.05224091559648514,
0.1341765820980072,
0.2246207892894745,
0.0631493404507637,
0.21636325120925903,
0.07485433667898178,
-0.1431485116481781,
0.0571625716984272,
0.014600206166505814,
-0.122646763920784,
0.19430778920650482,
-0.06808529049158096,
-0.19155898690223694,
0.4606110751628876,
0.05307213217020035,
0.02844824641942978,
0.034487560391426086,
0.008261367678642273,
-0.3926490545272827,
-0.050751131027936935,
-0.2910216152667999,
-0.001535516232252121,
-0.07213921844959259,
0.365633487701416,
0.02145501598715782,
0.2281446009874344,
-0.09811381250619888,
0.3276674747467041,
0.11428435146808624,
-0.059644825756549835,
-0.34423357248306274,
0.20370620489120483,
-0.07362660765647888,
0.08470768481492996,
0.2970550060272217,
0.0709061399102211,
0.18618246912956238,
-0.03916104882955551,
-0.27074217796325684,
0.2842409610748291,
-0.22830812633037567,
0.1085624024271965,
0.024126769974827766,
-0.04404361546039581,
0.1258639395236969,
-0.3062622845172882,
0.16326941549777985,
0.42476344108581543,
0.27066513895988464,
0.00420224666595459,
-0.26646310091018677,
0.3709724545478821,
0.062354572117328644,
0.036710429936647415,
0.1794327199459076,
0.12130334228277206,
0.4889174997806549,
-0.14482419192790985,
0.18211986124515533,
0.07542313635349274,
0.1992855966091156,
-0.1845480352640152,
0.2743564248085022,
0.05090963467955589,
-0.28143972158432007,
0.13176019489765167,
0.07505504786968231,
-0.21362709999084473,
-0.07674757391214371,
0.24488893151283264,
-0.2223697006702423,
0.029529448598623276,
0.14159366488456726,
0.2827683687210083,
0.3499794602394104,
0.2814856171607971,
-0.020048227161169052,
-0.14247387647628784,
-0.21716727316379547,
-0.038093045353889465,
0.3522070348262787,
-0.16624987125396729,
-0.09969626367092133,
0.20546698570251465,
0.08048079907894135,
-0.034789927303791046,
-0.26734378933906555,
0.027383174747228622,
0.21197882294654846,
0.3572826087474823,
-0.4294331967830658,
0.07798492908477783,
-0.2954973578453064,
-0.07021129131317139,
-0.125491201877594,
-0.04082837700843811,
-0.2343428134918213,
-0.2420019954442978,
0.15688124299049377,
0.39646488428115845,
0.1651487797498703,
0.12808269262313843,
-0.09723728895187378,
0.192152202129364,
-0.014441054314374924,
0.17765644192695618,
-0.14371579885482788,
-0.010100504383444786,
-0.42703860998153687,
-0.015012295916676521,
0.7707310318946838,
0.1621912568807602,
0.1453717052936554,
0.10852409154176712,
0.033544689416885376,
-0.33482033014297485,
-0.15634191036224365,
0.08539405465126038,
-0.13562946021556854,
0.37555593252182007,
0.06697863340377808,
-0.06605847179889679,
-0.23624400794506073,
-0.3400633633136749,
0.2379712462425232,
-0.04302722215652466,
-0.17082184553146362,
0.44344499707221985,
0.03482118248939514,
-0.20364204049110413,
-0.09447558969259262,
-0.4763003885746002,
-0.16758379340171814,
-0.17909206449985504,
0.2869962453842163,
-0.05701052024960518,
0.12846508622169495,
0.14760179817676544,
0.06040285900235176,
0.02127738669514656,
0.4799230098724365,
-0.11126496642827988,
-0.36876773834228516,
-0.12091429531574249,
0.240299254655838,
-0.06638793647289276,
-0.4465636610984802,
-0.18598656356334686,
0.16529414057731628,
0.1718469262123108,
-0.14760532975196838,
-0.4075329899787903,
0.07065938413143158,
-0.09100065380334854,
0.2359464168548584,
-0.0805235505104065,
0.030216993764042854,
-0.02354678511619568,
0.1366308629512787,
-0.003146536648273468,
-0.20627978444099426,
0.020336780697107315,
0.20995694398880005,
-0.022725820541381836,
0.18381182849407196,
0.36028799414634705,
0.25414344668388367,
-0.17502886056900024,
0.5159763693809509,
0.25639039278030396,
-0.24204783141613007,
0.3265656530857086,
-0.17294898629188538,
0.3028648793697357,
-0.21445909142494202,
-0.3854377269744873,
-0.3149305284023285,
-0.16972851753234863,
0.12590532004833221,
0.28200697898864746,
0.1262703537940979,
0.0347406342625618,
-0.11712762713432312,
0.21297797560691833,
-0.10686218738555908,
-0.1659357249736786,
-0.08491910248994827,
-0.30883926153182983,
-0.11058513075113297,
0.25273460149765015,
0.06926783174276352,
-0.003932551480829716,
-0.2839137017726898,
0.1842869371175766,
0.20773254334926605,
0.16352476179599762,
0.04767914116382599,
-0.2989685833454132,
-0.2413114756345749,
-0.47014570236206055,
0.36584341526031494,
0.28200846910476685,
0.6431366205215454,
-0.025515347719192505,
-0.06261485815048218,
0.10526091605424881,
0.02260182797908783,
0.5539157390594482,
-0.3673586845397949,
0.2585451602935791,
0.31647825241088867,
0.3857141435146332,
-0.22094213962554932,
0.014982406049966812,
-0.02001778967678547,
0.567893385887146,
-0.014081202447414398,
0.34310126304626465,
-0.03926541656255722,
0.03249163180589676,
-0.3048563599586487,
0.5120751261711121,
-0.3159906566143036,
-0.12454094737768173,
-0.3627844750881195,
-0.45309290289878845,
-0.23189672827720642,
-0.23029938340187073,
-0.11472900956869125,
0.22412154078483582,
-0.3189803957939148,
0.07317554950714111,
-0.2836679220199585,
-0.3119668960571289,
0.5673383474349976,
0.09130688011646271,
0.5156756639480591,
0.29208484292030334,
0.5455085635185242,
0.030620045959949493,
0.15617895126342773,
0.10340119898319244,
0.8227850198745728,
-0.17166297137737274,
-0.012376464903354645,
0.18358469009399414,
-0.3078356683254242,
0.16444432735443115,
0.2961406707763672,
-0.23018845915794373,
0.145625039935112,
-0.37054240703582764,
-0.2394881397485733,
-0.15184102952480316,
-0.018560366705060005,
-0.05157103389501572,
0.11466708779335022,
-0.2753991484642029,
-0.44701144099235535,
0.558042049407959,
-0.03830824792385101,
-0.3759002089500427,
0.6145564913749695,
0.15518590807914734,
-0.09917503595352173,
0.38128846883773804,
-0.3410138189792633,
1.085115671157837,
-0.46244049072265625,
0.1901615858078003,
-0.008143778890371323,
0.10334804654121399,
0.021372027695178986,
0.0390307754278183,
0.04820198565721512,
-0.36398863792419434,
-0.29653725028038025,
-0.043855536729097366,
0.10283137857913971,
-0.09521668404340744,
0.129350483417511,
-0.20332294702529907,
0.2804200053215027,
0.2557585835456848,
0.13543260097503662,
0.35385367274284363,
0.5223087072372437,
-0.16967348754405975,
0.12915784120559692,
-0.2161281257867813,
-0.04797033965587616,
0.20436477661132812,
0.04204361140727997,
0.16100281476974487,
-0.040975745767354965,
-0.20232976973056793,
-0.2326524257659912,
-0.36753392219543457,
0.03137856349349022,
-0.22991161048412323,
0.5271457433700562,
-0.4038301110267639,
-0.6649105548858643,
0.3058612048625946,
0.5028520822525024,
0.28875333070755005,
0.11835460364818573,
-0.3076467514038086,
0.043239526450634,
0.07810261100530624,
0.23552313446998596,
-0.04286979138851166,
0.06334758549928665,
0.06825048476457596,
0.054855167865753174,
-0.10360798239707947,
0.1326301097869873,
0.13081125915050507,
-0.20109997689723969,
-0.2648179829120636,
-0.013414643704891205,
-0.1066245585680008,
-0.18330056965351105,
-0.046073876321315765,
-0.08037756383419037,
-0.09056149423122406,
-0.21595606207847595,
0.0036352137103676796,
0.1604764759540558,
-0.07818088680505753,
-0.00460246205329895,
-0.029714513570070267,
-0.235234797000885,
0.1994011551141739,
0.598686158657074,
0.1222812831401825,
0.2259024977684021,
0.5499683618545532,
0.08707964420318604,
0.12378428876399994,
-0.025499068200588226,
0.12969344854354858,
-0.005138869397342205,
-0.5682961940765381,
0.07735105603933334,
-0.07807958126068115,
0.05461537837982178,
-0.005595423746854067,
0.1417895257472992,
0.1892566978931427,
-0.003769032657146454,
0.07956947386264801,
-0.35972028970718384,
-0.17742474377155304,
0.1435108482837677,
0.04141100123524666,
0.21864286065101624,
-0.11684880405664444,
-0.22235774993896484,
-0.030637629330158234,
-0.1341901272535324,
-0.18223905563354492,
0.27778157591819763,
-0.0043701715767383575,
0.0209498330950737,
-0.01690039411187172,
0.184774249792099,
0.20435060560703278,
-0.20010671019554138,
0.06964259594678879,
0.13962647318840027,
0.10214919596910477,
-0.03417016193270683,
-0.03280414268374443,
0.24039073288440704,
-0.08771348744630814,
-0.011787215247750282,
-0.2877906560897827,
-0.23452436923980713,
0.026380032300949097,
0.0016647521406412125,
0.024615611881017685,
0.2701083719730377,
-0.11810027062892914,
0.017830628901720047,
0.015271395444869995,
0.03424316644668579,
-0.10776057094335556,
0.25540560483932495,
-0.20872807502746582,
0.19305652379989624,
0.27547186613082886,
0.12578189373016357,
0.0168448556214571,
-0.02566865086555481,
-0.1787373572587967,
0.1307198405265808,
-0.20959992706775665,
-0.1350710391998291,
0.28176096081733704,
-0.2916138172149658,
-0.032034777104854584,
0.1944321095943451,
-0.043565865606069565,
0.4115346074104309,
-0.21240244805812836,
0.029145678505301476,
0.30899733304977417,
-0.016342541202902794,
-0.5130727887153625,
-0.2757803201675415,
-0.3179212212562561,
-0.3037300705909729,
-0.17835059762001038,
0.29611366987228394,
0.33453893661499023,
-0.5753563642501831,
-0.17203737795352936,
-0.04801417142152786,
0.3353056311607361,
0.27590981125831604,
-0.002483675256371498,
0.7290383577346802,
0.15449722111225128,
0.0916682630777359,
-0.12168418616056442,
-0.00536152720451355,
-0.10828336328268051,
0.465276300907135,
-0.42857468128204346,
0.21717266738414764,
-0.28147804737091064,
0.13374793529510498,
0.07644806057214737,
-0.4714760482311249,
-0.045056071132421494,
0.15153023600578308,
-0.08912579715251923,
0.2959069013595581,
0.2319469004869461,
0.7448762059211731,
-0.16217005252838135,
0.11526866257190704,
-0.1718883365392685,
-0.16921645402908325,
0.05039224028587341,
-0.18680334091186523,
-0.16252447664737701,
-0.4567350447177887,
-0.29681748151779175,
0.08543100953102112,
-0.24667826294898987,
-0.010415792465209961,
0.27141815423965454,
0.21243618428707123,
-0.09528456628322601,
-0.2517857551574707,
-0.21315160393714905,
0.3299953043460846,
-0.020985305309295654,
-0.30283743143081665,
0.19328108429908752,
0.4838523864746094,
-0.1505669802427292,
0.4575621783733368,
-0.0074699874967336655,
0.532903254032135,
0.04724034667015076,
-0.30838432908058167,
0.24351586401462555,
-0.10687874257564545,
-0.020183414220809937,
0.08157290518283844,
0.32261648774147034,
0.023847032338380814,
-0.02503718063235283,
0.2358870953321457,
-0.049795620143413544,
0.11967550218105316,
-0.18640010058879852,
0.2886658012866974,
0.08153708279132843,
-0.25263503193855286,
0.16299836337566376,
-0.1691606491804123,
-0.07128359377384186,
-0.048205241560935974,
0.1534404456615448,
-0.41399452090263367,
-0.2273898422718048,
0.3446219861507416,
0.16283223032951355,
0.052882879972457886,
-0.1369393914937973,
0.023531798273324966,
-0.10934780538082123,
0.34724149107933044,
0.5388023257255554,
0.19933485984802246,
-0.22801877558231354,
-0.375118613243103,
-0.9639624953269958,
0.1229165643453598,
-0.10848197340965271,
-0.10429852455854416,
0.11750493943691254,
-0.05434068292379379,
0.34880784153938293,
-0.02316957339644432,
0.13421759009361267,
0.3221679925918579,
-0.11576084047555923,
0.38848641514778137,
-0.29573702812194824,
-0.36691009998321533,
0.04229578375816345,
0.2449236959218979,
-0.42746055126190186,
-0.4632036089897156,
0.020082790404558182,
-0.215131938457489,
-0.05082583427429199,
-0.13425764441490173,
0.17990799248218536,
0.04328468069434166,
0.21731632947921753,
0.3731894791126251,
0.15929004549980164,
0.5107488632202148,
0.03418128192424774,
-0.24638406932353973,
-0.22417765855789185,
-0.15464428067207336,
-0.14752843976020813,
0.07107790559530258,
0.10225844383239746,
0.19596639275550842,
-0.2289499193429947,
-0.16712859272956848,
-0.137487530708313,
0.14623677730560303,
0.05088983476161957,
0.4068101942539215,
-0.4520307779312134,
-0.03275362029671669,
-0.4617273211479187,
0.23787586390972137,
-0.029404670000076294,
0.3656045198440552,
0.008887473493814468,
0.25734907388687134,
-0.20737895369529724,
-0.4206414520740509,
0.45481428503990173,
-0.6182095408439636,
-0.24709060788154602,
0.05847883224487305,
0.27019965648651123,
-0.03388842195272446,
0.06715795397758484,
-0.2683444619178772,
-0.12120241671800613,
0.29832568764686584,
0.19125518202781677,
-0.1735529750585556,
0.06637300550937653,
-0.09070068597793579,
0.14546559751033783,
-0.10213033109903336,
0.08648167550563812,
0.2393924593925476,
-0.3680543303489685,
0.09419099986553192,
-0.35524213314056396
] |
https://github.com/huggingface/datasets/issues/4422 | Cannot load timit_asr data set | Ah, if I change the train/ and test/ directories to TRAIN/ and TEST/ then it works! | ## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 16 | Cannot load timit_asr data set
## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Ah, if I change the train/ and test/ directories to TRAIN/ and TEST/ then it works! | [
-0.11325687170028687,
-0.18663489818572998,
0.12861932814121246,
0.4597626328468323,
0.3614996075630188,
0.1456907093524933,
0.29637080430984497,
0.1980886608362198,
-0.4100964367389679,
-0.04298688471317291,
-0.1318950355052948,
0.4366244673728943,
-0.0733189731836319,
0.12590375542640686,
0.15301629900932312,
-0.12179282307624817,
0.04627037048339844,
-0.10005958378314972,
-0.2741413116455078,
-0.04984774440526962,
-0.07478191703557968,
0.21939882636070251,
-0.12635399401187897,
0.3779418468475342,
-0.1626080572605133,
0.18081016838550568,
-0.23282715678215027,
0.3396929204463959,
-0.0010084230452775955,
-0.4180474281311035,
0.43048959970474243,
0.011687800288200378,
0.4209845960140228,
0.6156270503997803,
-0.00012330454774200916,
0.2286221832036972,
0.38965731859207153,
-0.037835463881492615,
-0.3011210858821869,
-0.36630964279174805,
-0.2061467468738556,
-0.057698316872119904,
0.18321073055267334,
-0.09908571094274521,
-0.11997825652360916,
-0.21951715648174286,
0.1675020009279251,
-0.25324833393096924,
0.27100133895874023,
0.18824340403079987,
0.1420542597770691,
-0.1342972069978714,
-0.025018708780407906,
-0.30921944975852966,
-0.03038793057203293,
-0.24353908002376556,
0.07529647648334503,
0.45516127347946167,
0.007014356553554535,
-0.03853621333837509,
0.09238451719284058,
-0.1681458055973053,
-0.05022185295820236,
-0.14829304814338684,
0.28182438015937805,
0.044588539749383926,
-0.02194845676422119,
-0.09130531549453735,
0.32183244824409485,
0.34014785289764404,
0.8600640892982483,
-0.36892685294151306,
-0.29524245858192444,
0.027958281338214874,
0.13676173985004425,
-0.040094874799251556,
0.3809773027896881,
-0.0009797513484954834,
-0.06672448664903641,
0.23845863342285156,
0.19034898281097412,
-0.038421809673309326,
-0.17883460223674774,
0.07454041391611099,
-0.09017341583967209,
-0.14225980639457703,
0.08184304088354111,
0.2139086127281189,
0.06412892788648605,
-0.11437280476093292,
0.1351611167192459,
-0.16247987747192383,
-0.03328951075673103,
0.1368323564529419,
-0.16019393503665924,
0.27130258083343506,
-0.10090740770101547,
-0.14873993396759033,
0.22469854354858398,
0.15892767906188965,
0.42713889479637146,
-0.04808458685874939,
-0.46318188309669495,
0.14375776052474976,
0.1134970486164093,
0.3621211051940918,
-0.04811551421880722,
0.2263360172510147,
0.31092917919158936,
-0.08627045899629593,
-0.2390901744365692,
-0.039948493242263794,
-0.30730271339416504,
-0.18112145364284515,
-0.11329945921897888,
-0.04486832767724991,
0.1614304780960083,
-0.3180490732192993,
-0.37960466742515564,
0.0007503833621740341,
-0.3135974407196045,
-0.06798893213272095,
-0.14636677503585815,
0.28974518179893494,
0.19087611138820648,
0.3119504749774933,
-0.00727679580450058,
0.2612931728363037,
-0.11328333616256714,
0.19500795006752014,
-0.08683983236551285,
0.0683007538318634,
-0.15554796159267426,
-0.0675421729683876,
0.19500309228897095,
-0.4067750573158264,
0.15216079354286194,
0.2523888647556305,
0.029213540256023407,
-0.08235082775354385,
-0.11308418214321136,
0.2688320577144623,
-0.19269701838493347,
0.1063593327999115,
0.016001209616661072,
0.1898222714662552,
0.049810152500867844,
-0.5192809700965881,
-0.09822151809930801,
0.1828259974718094,
-0.13599804043769836,
-0.18590235710144043,
-0.01865535043179989,
0.0585741326212883,
-0.18595924973487854,
-0.1006331592798233,
-0.26293689012527466,
0.20158743858337402,
0.07571245729923248,
-0.1546342372894287,
-0.16102352738380432,
-0.08570049703121185,
-0.1850469410419464,
-0.3037151098251343,
0.11330006271600723,
0.44184601306915283,
-0.5769890546798706,
0.028718605637550354,
0.07235623896121979,
0.17443840205669403,
0.007250368595123291,
0.26245081424713135,
-0.22468945384025574,
0.03581836819648743,
-0.30136382579803467,
-0.003969050943851471,
0.12385603040456772,
-0.18517054617404938,
-0.582126796245575,
0.17907223105430603,
-0.23657557368278503,
0.06662937998771667,
0.27819815278053284,
0.12118466198444366,
-0.165619358420372,
-0.10219720751047134,
0.020965103060007095,
0.1780909150838852,
0.11929572373628616,
-0.4421534240245819,
-0.38037005066871643,
-0.218186616897583,
0.43920421600341797,
-0.012917334213852882,
0.10053814947605133,
0.1300296187400818,
0.14807958900928497,
0.03612211346626282,
0.2784825563430786,
-0.014738384634256363,
-0.23047159612178802,
0.048228584229946136,
-0.10038471221923828,
-0.0706104189157486,
0.19061021506786346,
-0.02046273648738861,
-0.18080320954322815,
0.48027774691581726,
0.14053364098072052,
0.07980537414550781,
0.03407365083694458,
-0.014885727316141129,
-0.3839607536792755,
-0.09779014438390732,
-0.2997008264064789,
-0.03255561366677284,
-0.05364743620157242,
0.30045148730278015,
-0.13344334065914154,
0.22999243438243866,
-0.1023731529712677,
0.2945290803909302,
0.016550341621041298,
-0.006333024241030216,
-0.3676576018333435,
0.2664388418197632,
-0.09358399361371994,
0.1322585791349411,
0.17497701942920685,
0.0036906078457832336,
0.15796269476413727,
-0.11299306899309158,
-0.32509514689445496,
0.2925907075405121,
-0.21495738625526428,
0.10716446489095688,
0.081938236951828,
-0.03508313000202179,
0.12880313396453857,
-0.27462130784988403,
0.10583243519067764,
0.49704331159591675,
0.1941133737564087,
0.07865793257951736,
-0.3139793872833252,
0.3840484619140625,
0.024661866948008537,
0.06449230015277863,
0.15789154171943665,
0.1264732927083969,
0.5472611784934998,
-0.21741549670696259,
0.20212016999721527,
0.012988947331905365,
0.19597531855106354,
-0.13608133792877197,
0.12143784761428833,
0.04585985094308853,
-0.2901719808578491,
0.06572425365447998,
-0.04422268643975258,
-0.21843479573726654,
-0.074176125228405,
0.2635912597179413,
-0.12574118375778198,
0.06095241755247116,
0.09568614512681961,
0.30469122529029846,
0.2482253909111023,
0.278277188539505,
-0.08594261109828949,
-0.057554058730602264,
-0.2731596827507019,
-0.058375902473926544,
0.334037721157074,
-0.12087932229042053,
-0.03684937208890915,
0.13717544078826904,
0.12814389169216156,
0.012290365062654018,
-0.28806865215301514,
-0.05954616516828537,
0.2531799077987671,
0.40599262714385986,
-0.4514184296131134,
0.18426424264907837,
-0.3188105523586273,
-0.14779910445213318,
-0.053323812782764435,
0.04458942636847496,
-0.15016457438468933,
-0.16610684990882874,
0.0897238552570343,
0.2506653964519501,
0.1809077262878418,
0.15563245117664337,
-0.2059573382139206,
0.11208390444517136,
-0.0006700921803712845,
0.1285981684923172,
-0.136732280254364,
-0.11112065613269806,
-0.48635900020599365,
0.009979292750358582,
0.7855203747749329,
0.12585894763469696,
0.21102569997310638,
0.04615020751953125,
0.0003989189863204956,
-0.3103475272655487,
-0.26453107595443726,
0.0754779651761055,
-0.13943983614444733,
0.3473334312438965,
0.09186413139104843,
-0.06721533834934235,
-0.2496928870677948,
-0.3229016065597534,
0.31137168407440186,
0.010154521092772484,
-0.1714639514684677,
0.42783647775650024,
-0.015342522412538528,
-0.19214372336864471,
-0.06959874927997589,
-0.5397214293479919,
-0.07543638348579407,
-0.13345107436180115,
0.21788924932479858,
0.00445464625954628,
0.08933740854263306,
0.1922389268875122,
0.03588233143091202,
-0.00624997541308403,
0.5021234750747681,
-0.13693742454051971,
-0.3228197991847992,
-0.09300558269023895,
0.23093020915985107,
-0.040749453008174896,
-0.4742514193058014,
-0.2752688527107239,
0.08131060004234314,
0.18261632323265076,
-0.19193722307682037,
-0.5182360410690308,
0.07522918283939362,
-0.16626965999603271,
0.29460740089416504,
-0.15594300627708435,
0.004133598878979683,
0.0034940913319587708,
0.0873013436794281,
-0.04320574179291725,
-0.15049827098846436,
-0.013414609245955944,
0.32742977142333984,
-0.09247858077287674,
0.1460312008857727,
0.21922680735588074,
0.486991822719574,
-0.08617928624153137,
0.5076201558113098,
0.2772589921951294,
-0.3543231785297394,
0.36006224155426025,
-0.2672748863697052,
0.2595048248767853,
-0.1662229299545288,
-0.3871079683303833,
-0.3209785223007202,
-0.1288544237613678,
0.06727790087461472,
0.16702672839164734,
0.06346353888511658,
0.007155190221965313,
-0.09397892653942108,
0.056514922529459,
-0.07915207743644714,
-0.211090549826622,
-0.08108408004045486,
-0.48995816707611084,
-0.06518634408712387,
0.21823187172412872,
0.061445944011211395,
-0.03211451321840286,
-0.2695538401603699,
0.28440797328948975,
0.3425511121749878,
0.05162154510617256,
0.022049084305763245,
-0.34637922048568726,
-0.21538832783699036,
-0.4128551185131073,
0.4071224331855774,
0.26801830530166626,
0.5495359301567078,
0.033020321279764175,
-0.0462266281247139,
0.16124552488327026,
-0.05037028715014458,
0.614310622215271,
-0.34946510195732117,
0.19813840091228485,
0.3547082543373108,
0.2783464789390564,
-0.3084624409675598,
0.0076227374374866486,
0.0123664028942585,
0.6201174259185791,
-0.01371729001402855,
0.3808704912662506,
-0.10154316574335098,
0.005293156020343304,
-0.2728833258152008,
0.445868581533432,
-0.4107469916343689,
-0.20780104398727417,
-0.3742336332798004,
-0.4267953336238861,
-0.2607281804084778,
-0.11581764370203018,
-0.13273882865905762,
0.21341019868850708,
-0.20270681381225586,
0.011724531650543213,
-0.3222096562385559,
-0.3523258864879608,
0.4761165380477905,
0.14635631442070007,
0.4934388995170593,
0.26698413491249084,
0.5594923496246338,
0.003400016576051712,
0.10726402699947357,
0.15733079612255096,
0.7735652327537537,
-0.25980040431022644,
0.020421326160430908,
0.16923120617866516,
-0.2549281716346741,
0.15821266174316406,
0.22288811206817627,
-0.2755669057369232,
0.15525397658348083,
-0.33858171105384827,
-0.21932043135166168,
-0.08885575830936432,
0.021511606872081757,
0.0005722725763916969,
0.15146885812282562,
-0.31491485238075256,
-0.5195373296737671,
0.5271077156066895,
-0.07201781868934631,
-0.32629430294036865,
0.481155663728714,
0.048248473554849625,
-0.08191440999507904,
0.40153253078460693,
-0.27489519119262695,
1.0530215501785278,
-0.5033779144287109,
0.25810903310775757,
0.007397567853331566,
0.12182056903839111,
0.08782241493463516,
-0.0007518231868743896,
-0.0030765049159526825,
-0.4458751082420349,
-0.24087940156459808,
-0.03175598382949829,
0.05849292501807213,
-0.11993154138326645,
0.0651322677731514,
-0.16950610280036926,
0.2540491223335266,
0.14099626243114471,
0.16111516952514648,
0.38430410623550415,
0.6057422757148743,
-0.12527427077293396,
0.2136058509349823,
-0.2441408336162567,
-0.028900381177663803,
0.23744924366474152,
-0.0629199892282486,
0.1308368444442749,
-0.05365122854709625,
-0.12088261544704437,
-0.1449570208787918,
-0.28178834915161133,
0.1030440405011177,
-0.20439070463180542,
0.6169347763061523,
-0.3048855662345886,
-0.7247990965843201,
0.33269762992858887,
0.5139340758323669,
0.3927777409553528,
0.13793796300888062,
-0.2559616267681122,
0.05865944176912308,
0.02094721421599388,
0.25782063603401184,
-0.05377829819917679,
0.010496833361685276,
0.22512519359588623,
0.010397441685199738,
-0.08861623704433441,
0.06182286888360977,
0.2063695192337036,
-0.1694289743900299,
-0.28786903619766235,
-0.06073474884033203,
-0.009769871830940247,
-0.3268047869205475,
0.06144319847226143,
-0.08582313358783722,
-0.0378817617893219,
-0.25744080543518066,
0.022113682702183723,
0.1353932023048401,
0.009861219674348831,
-0.05390506237745285,
0.07635124027729034,
-0.3172915577888489,
0.20134472846984863,
0.5458666682243347,
0.16567251086235046,
0.23443976044654846,
0.6030384302139282,
0.08486543595790863,
0.08978632092475891,
-0.03898695111274719,
0.17862829566001892,
0.14189547300338745,
-0.5610801577568054,
0.1280670464038849,
-0.15887412428855896,
0.1387948840856552,
0.02721559815108776,
0.168223038315773,
0.23023444414138794,
0.00800234079360962,
0.07791595160961151,
-0.3480527698993683,
-0.24142882227897644,
0.10592474788427353,
-0.05834358558058739,
0.22025267779827118,
-0.09303529560565948,
-0.0342828743159771,
-0.09540734440088272,
-0.14338363707065582,
-0.19892370700836182,
0.3017776310443878,
-0.028499841690063477,
0.005352819338440895,
-0.03454325348138809,
0.10801620781421661,
0.2187165468931198,
-0.13479351997375488,
0.11554346978664398,
0.13584856688976288,
0.13445071876049042,
-0.07127535343170166,
-0.13315635919570923,
0.2134288102388382,
-0.042512521147727966,
-0.0015892130322754383,
-0.31199631094932556,
-0.2591131925582886,
0.021493736654520035,
0.007859655655920506,
0.009905081242322922,
0.25644451379776,
-0.11303651332855225,
0.09395415335893631,
0.17710578441619873,
-0.015019088983535767,
-0.2643573582172394,
0.19661037623882294,
-0.29954972863197327,
0.1697806715965271,
0.28800562024116516,
0.12062215059995651,
-0.017196068540215492,
-0.020905751734972,
-0.272625207901001,
0.11964371800422668,
-0.07343728840351105,
-0.13498640060424805,
0.18713882565498352,
-0.31066399812698364,
-0.015145393088459969,
0.19546328485012054,
-0.036313727498054504,
0.36126598715782166,
-0.25510063767433167,
0.06695926934480667,
0.30092114210128784,
0.01748785935342312,
-0.48819780349731445,
-0.20275911688804626,
-0.33651402592658997,
-0.32447901368141174,
-0.1935497522354126,
0.28447282314300537,
0.27434515953063965,
-0.45340338349342346,
-0.22898493707180023,
-0.02787950076162815,
0.2626652717590332,
0.2611438035964966,
0.03439842909574509,
0.6881221532821655,
0.040188971906900406,
0.062059272080659866,
-0.02329421602189541,
-0.0687294602394104,
-0.12323597818613052,
0.48256099224090576,
-0.23811200261116028,
0.21874237060546875,
-0.2223898470401764,
0.12301117181777954,
0.10143434256315231,
-0.4312697649002075,
-0.008852951228618622,
-0.01959732174873352,
-0.07410876452922821,
0.12294179201126099,
0.2092610001564026,
0.80378258228302,
0.001689002849161625,
0.10872440040111542,
-0.17976512014865875,
-0.13237595558166504,
-0.03695547580718994,
-0.24277929961681366,
-0.1328810453414917,
-0.4505232870578766,
-0.25955069065093994,
0.09282593429088593,
-0.28200724720954895,
0.031770847737789154,
0.22911293804645538,
0.2274012565612793,
-0.13229386508464813,
-0.31818896532058716,
-0.07572318613529205,
0.3948708176612854,
0.0092572420835495,
-0.2859722673892975,
0.22165672481060028,
0.45519042015075684,
-0.24489885568618774,
0.32186654210090637,
-0.031695134937763214,
0.5201112627983093,
0.0069901831448078156,
-0.2719998061656952,
0.21536467969417572,
-0.01262434758245945,
0.005449170246720314,
0.13627904653549194,
0.2724876403808594,
0.0897490605711937,
0.007011452689766884,
0.22554738819599152,
-0.01907166838645935,
0.0775829404592514,
-0.04087572172284126,
0.20103546977043152,
0.1488458812236786,
-0.30189111828804016,
0.24543046951293945,
-0.0020280927419662476,
-0.0315745547413826,
-0.09252113103866577,
0.2072378545999527,
-0.4195425808429718,
-0.2734964191913605,
0.4358985126018524,
0.12686260044574738,
0.010440675541758537,
-0.20623290538787842,
0.03665535897016525,
-0.0938737690448761,
0.4230539798736572,
0.45164191722869873,
0.2112898826599121,
-0.2802462577819824,
-0.26429808139801025,
-0.8954679369926453,
0.22123147547245026,
-0.11249841749668121,
-0.07514004409313202,
0.11927048116922379,
-0.0628911703824997,
0.3176168203353882,
-0.03852663189172745,
0.23859286308288574,
0.3493427336215973,
-0.1707168072462082,
0.3812463581562042,
-0.2895023822784424,
-0.2820809483528137,
-0.03581908345222473,
0.152363583445549,
-0.37785330414772034,
-0.417294979095459,
0.010982897132635117,
-0.1685912311077118,
-0.022139130160212517,
-0.1284095048904419,
0.04346255213022232,
0.1787385791540146,
0.2649543881416321,
0.4038080871105194,
0.1464703381061554,
0.5419565439224243,
0.06356097757816315,
-0.2044750601053238,
-0.26427391171455383,
-0.3037557899951935,
-0.2042839676141739,
0.17837238311767578,
0.08998918533325195,
0.12409599125385284,
-0.24997328221797943,
-0.21296904981136322,
-0.1473008096218109,
0.13438664376735687,
0.06081525236368179,
0.23384201526641846,
-0.3985537886619568,
-0.02870021015405655,
-0.37791407108306885,
0.2256077080965042,
-0.0274225901812315,
0.5002440810203552,
0.04962514713406563,
0.28132498264312744,
-0.16576603055000305,
-0.505392849445343,
0.5133180618286133,
-0.5792292952537537,
-0.27656444907188416,
0.01160456519573927,
0.16203704476356506,
-0.01631198823451996,
0.08115187287330627,
-0.2892329692840576,
-0.18696323037147522,
0.3583410680294037,
0.19125720858573914,
-0.23660758137702942,
0.10681690275669098,
0.007567901164293289,
0.22917287051677704,
-0.1425044685602188,
0.1537880003452301,
0.1734268069267273,
-0.3521827161312103,
0.10351690649986267,
-0.3668392300605774
] |
https://github.com/huggingface/datasets/issues/4422 | Cannot load timit_asr data set | Thanks for your investigation and report, @bhaddow. I'm adding another fix for the TRAIN/train and TEST/test directory names. | ## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
| 18 | Cannot load timit_asr data set
## Describe the bug
I am trying to load the timit_asr data set. I have tried with a copy from the LDC, and a copy from deepai. In both cases they fail with a "duplicate key" error. With the LDC version I have to convert the file extensions all to upper-case before I can load it at all.
## Steps to reproduce the bug
```python
timit = datasets.load_dataset("timit_asr", data_dir = "/path/to/dataset")
# Sample code to reproduce the bug
```
## Expected results
The data set should load without error. It worked for me before the LDC url change.
## Actual results
```
datasets.keyhash.DuplicatedKeysError: FAILURE TO GENERATE DATASET !
Found duplicate Key: SA1
Keys should be unique and deterministic in nature
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- `datasets` version: 2.2.2
- Platform: Linux-5.4.0-90-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 8.0.0
- Pandas version: 1.4.2
Thanks for your investigation and report, @bhaddow. I'm adding another fix for the TRAIN/train and TEST/test directory names. | [
-0.12912718951702118,
-0.21241958439350128,
0.11182968318462372,
0.47808653116226196,
0.3360818028450012,
0.13902851939201355,
0.30126529932022095,
0.20190095901489258,
-0.37618187069892883,
-0.0309751033782959,
-0.13144448399543762,
0.4844801127910614,
-0.08096881210803986,
0.17010289430618286,
0.14748793840408325,
-0.1191340833902359,
0.025559604167938232,
-0.09952424466609955,
-0.3156166970729828,
-0.026084959506988525,
-0.09417206048965454,
0.2381288856267929,
-0.1188022792339325,
0.3751037120819092,
-0.12397175282239914,
0.17829875648021698,
-0.2428382933139801,
0.31176790595054626,
0.02473928965628147,
-0.45106807351112366,
0.4175305962562561,
0.008789636194705963,
0.4174070358276367,
0.6251512765884399,
-0.00012149012763984501,
0.19819144904613495,
0.3857874274253845,
-0.035323597490787506,
-0.2958222031593323,
-0.36344242095947266,
-0.22000399231910706,
-0.06321191787719727,
0.20989032089710236,
-0.11986246705055237,
-0.1059764176607132,
-0.2075500637292862,
0.13468419015407562,
-0.25251930952072144,
0.2563980221748352,
0.2137254923582077,
0.1628054529428482,
-0.0877569317817688,
-0.043880388140678406,
-0.3098684549331665,
-0.04979156702756882,
-0.2620609998703003,
0.08327401429414749,
0.44421783089637756,
-0.00012273341417312622,
0.003173157572746277,
0.12433458864688873,
-0.16746030747890472,
-0.04734044522047043,
-0.1298157423734665,
0.29697179794311523,
0.033911384642124176,
-0.02114785462617874,
-0.11241720616817474,
0.324057400226593,
0.3394068777561188,
0.8997144103050232,
-0.3863581120967865,
-0.2494349181652069,
0.07424020022153854,
0.11309456825256348,
-0.032918110489845276,
0.36937588453292847,
0.01277963351458311,
-0.07469408214092255,
0.20780716836452484,
0.18415994942188263,
-0.01862306147813797,
-0.169644296169281,
0.07619807124137878,
-0.03980174660682678,
-0.16086459159851074,
0.0724935308098793,
0.2303234338760376,
0.029980134218931198,
-0.12039391696453094,
0.1372171938419342,
-0.1610652655363083,
-0.03041369840502739,
0.14081890881061554,
-0.1574496179819107,
0.25914257764816284,
-0.09997225552797318,
-0.17698174715042114,
0.20823344588279724,
0.17145481705665588,
0.4125746786594391,
-0.042980946600437164,
-0.46689513325691223,
0.1466360092163086,
0.11631821095943451,
0.35179024934768677,
-0.041985802352428436,
0.2181076854467392,
0.2887877821922302,
-0.09635083377361298,
-0.22794361412525177,
-0.049383848905563354,
-0.2687365710735321,
-0.16750726103782654,
-0.10698734223842621,
-0.05660783499479294,
0.14134304225444794,
-0.33233359456062317,
-0.350044846534729,
-0.012536662630736828,
-0.2922489047050476,
-0.05373632535338402,
-0.1481187492609024,
0.3211219608783722,
0.17673644423484802,
0.2887321710586548,
0.021291762590408325,
0.22648413479328156,
-0.07315750420093536,
0.22795113921165466,
-0.1071757823228836,
0.09122547507286072,
-0.14158624410629272,
-0.08178640156984329,
0.2072371393442154,
-0.4419166147708893,
0.1629481166601181,
0.23417054116725922,
0.03850994259119034,
-0.09991125762462616,
-0.09887389093637466,
0.26080432534217834,
-0.19474858045578003,
0.11979344487190247,
0.04444487765431404,
0.18608243763446808,
0.013883858919143677,
-0.4620392918586731,
-0.09960081428289413,
0.18727940320968628,
-0.16099336743354797,
-0.19964592158794403,
-0.02261551283299923,
0.07943050563335419,
-0.17270134389400482,
-0.12047480046749115,
-0.24206402897834778,
0.15226520597934723,
0.023984387516975403,
-0.16302093863487244,
-0.16816574335098267,
-0.07661756873130798,
-0.18877799808979034,
-0.32464900612831116,
0.11417291313409805,
0.4557463526725769,
-0.5477295517921448,
0.02495007961988449,
0.08442565053701401,
0.15699759125709534,
-0.01028820127248764,
0.2483004927635193,
-0.219520702958107,
0.03808032348752022,
-0.3108867406845093,
-0.03678087890148163,
0.13371320068836212,
-0.1938907355070114,
-0.5679059624671936,
0.1846221387386322,
-0.22980883717536926,
0.006667597219347954,
0.2628161609172821,
0.1397305279970169,
-0.1806921362876892,
-0.07794543355703354,
0.01763969287276268,
0.18714453279972076,
0.11860271543264389,
-0.40302297472953796,
-0.3963141441345215,
-0.24535083770751953,
0.42269712686538696,
0.018491562455892563,
0.11645105481147766,
0.1533432900905609,
0.1377696990966797,
0.011795314960181713,
0.27137336134910583,
-0.001684524118900299,
-0.23334701359272003,
0.06777850538492203,
-0.06411655247211456,
-0.062156230211257935,
0.19298484921455383,
-0.04100385308265686,
-0.18155384063720703,
0.4672987759113312,
0.14478124678134918,
0.09607169032096863,
0.052160777151584625,
0.016375936567783356,
-0.40250036120414734,
-0.11842117458581924,
-0.29942646622657776,
-0.032957833260297775,
-0.03729253262281418,
0.294428288936615,
-0.12045936286449432,
0.23488293588161469,
-0.10774949193000793,
0.32737427949905396,
0.02204551361501217,
-0.01211599726229906,
-0.33501240611076355,
0.26619580388069153,
-0.10343313962221146,
0.13262714445590973,
0.1938343048095703,
0.009608879685401917,
0.15951386094093323,
-0.1243385449051857,
-0.33131980895996094,
0.29746928811073303,
-0.22144165635108948,
0.0880364254117012,
0.11543828248977661,
-0.05831451714038849,
0.11928043514490128,
-0.3085416257381439,
0.13537827134132385,
0.5060398578643799,
0.2257494479417801,
0.08856082707643509,
-0.29251953959465027,
0.3938443660736084,
-0.0054550692439079285,
0.03013451397418976,
0.16770431399345398,
0.1395689994096756,
0.5197494029998779,
-0.2160380333662033,
0.20551162958145142,
0.017781928181648254,
0.23309485614299774,
-0.1326204091310501,
0.1332625299692154,
0.03099742904305458,
-0.28874197602272034,
0.04280170425772667,
-0.06480675935745239,
-0.19017982482910156,
-0.06893711537122726,
0.26346489787101746,
-0.13477855920791626,
0.08192787319421768,
0.07733765244483948,
0.3131147623062134,
0.2679699659347534,
0.27963754534721375,
-0.1233774721622467,
-0.029879530891776085,
-0.23709075152873993,
-0.034645020961761475,
0.3408021628856659,
-0.09477400779724121,
-0.07489720731973648,
0.1417691707611084,
0.10898078233003616,
0.0014877347275614738,
-0.2919268012046814,
-0.07248853147029877,
0.23066402971744537,
0.41160205006599426,
-0.42382973432540894,
0.18403781950473785,
-0.2734244763851166,
-0.1518627107143402,
-0.07355932146310806,
0.025718610733747482,
-0.15387949347496033,
-0.190068319439888,
0.062497302889823914,
0.20787213742733002,
0.18846485018730164,
0.16070276498794556,
-0.20449300110340118,
0.13023912906646729,
-0.000055246055126190186,
0.15722039341926575,
-0.16745999455451965,
-0.09185396879911423,
-0.45212090015411377,
0.024722103029489517,
0.7312740683555603,
0.1741684228181839,
0.2640434503555298,
0.03227829933166504,
0.02228076010942459,
-0.34280362725257874,
-0.2394641935825348,
0.0737762376666069,
-0.12584803998470306,
0.3498873710632324,
0.08459558337926865,
-0.048178017139434814,
-0.25217920541763306,
-0.3085734248161316,
0.3022421896457672,
-0.037574272602796555,
-0.15183548629283905,
0.42990002036094666,
-0.005141666159033775,
-0.2008332461118698,
-0.07228685915470123,
-0.5782104730606079,
-0.11605789512395859,
-0.13630913197994232,
0.23466075956821442,
0.03015502169728279,
0.12126921862363815,
0.18792393803596497,
0.014494148083031178,
0.02064405381679535,
0.5095388889312744,
-0.13104407489299774,
-0.3312833607196808,
-0.12318536639213562,
0.22871729731559753,
-0.07896291464567184,
-0.4882194697856903,
-0.23859906196594238,
0.10413527488708496,
0.1579698920249939,
-0.227570578455925,
-0.5088297724723816,
0.05789940431714058,
-0.1545807123184204,
0.2854572832584381,
-0.15282611548900604,
0.004322949796915054,
-0.018635354936122894,
0.08613711595535278,
-0.048625122755765915,
-0.145344540476799,
-0.05003977194428444,
0.32424888014793396,
-0.09979120641946793,
0.15208348631858826,
0.25516799092292786,
0.49352118372917175,
-0.11475396156311035,
0.4928063154220581,
0.31466856598854065,
-0.36141011118888855,
0.3576725721359253,
-0.2700098156929016,
0.24811424314975739,
-0.1657392978668213,
-0.41338682174682617,
-0.3104545474052429,
-0.1366904377937317,
0.08901143819093704,
0.1580774337053299,
0.04160477966070175,
0.04731173813343048,
-0.12136548012495041,
0.08668024837970734,
-0.08556026965379715,
-0.2015686333179474,
-0.09704655408859253,
-0.49171245098114014,
-0.03249397873878479,
0.2045295536518097,
0.018635503947734833,
-0.055605169385671616,
-0.2762856185436249,
0.29155847430229187,
0.34677717089653015,
0.020389385521411896,
0.011538621969521046,
-0.3498603105545044,
-0.20494328439235687,
-0.44461590051651,
0.42464131116867065,
0.24806615710258484,
0.5639336705207825,
0.01184510812163353,
-0.03283770754933357,
0.1728840321302414,
-0.013866767287254333,
0.6068187952041626,
-0.3809376060962677,
0.21924640238285065,
0.34951668977737427,
0.261690616607666,
-0.31932559609413147,
0.0242784284055233,
-0.010416164994239807,
0.5881555080413818,
-0.01405271515250206,
0.35676419734954834,
-0.0714474767446518,
-0.02288091368973255,
-0.2140839844942093,
0.4525635838508606,
-0.4268483519554138,
-0.24518869817256927,
-0.37427282333374023,
-0.42634934186935425,
-0.24594543874263763,
-0.13932791352272034,
-0.14306238293647766,
0.23470056056976318,
-0.20586173236370087,
0.013670109212398529,
-0.3370746374130249,
-0.34021124243736267,
0.4773525595664978,
0.11664342880249023,
0.5038253664970398,
0.2703261077404022,
0.580491304397583,
0.012686049565672874,
0.11766687035560608,
0.14753752946853638,
0.7580408453941345,
-0.28486067056655884,
0.005579419434070587,
0.17750123143196106,
-0.2739424407482147,
0.1600813865661621,
0.20605099201202393,
-0.2850762903690338,
0.14969459176063538,
-0.36027079820632935,
-0.1993141621351242,
-0.06635303795337677,
-0.005646797362715006,
0.0066817388869822025,
0.17270082235336304,
-0.3013415038585663,
-0.508314311504364,
0.5306142568588257,
-0.04780521243810654,
-0.3229548931121826,
0.48564085364341736,
-0.00525326281785965,
-0.07474569231271744,
0.4179369807243347,
-0.2859874963760376,
1.05060613155365,
-0.49579858779907227,
0.23531922698020935,
0.0004650615155696869,
0.10420604050159454,
0.0767396092414856,
0.001221250742673874,
-0.021702297031879425,
-0.4656907916069031,
-0.2464384287595749,
-0.019481534138321877,
0.02421383187174797,
-0.12325979024171829,
0.03883679211139679,
-0.20594167709350586,
0.2540874481201172,
0.13441918790340424,
0.15334932506084442,
0.3581233024597168,
0.6140686869621277,
-0.10427625477313995,
0.21765297651290894,
-0.22901909053325653,
-0.009621899574995041,
0.21517986059188843,
-0.040504951030015945,
0.13151323795318604,
-0.05607954412698746,
-0.10323537886142731,
-0.15442970395088196,
-0.27827662229537964,
0.08388230949640274,
-0.1795644313097,
0.6163124442100525,
-0.29914718866348267,
-0.6970333456993103,
0.33791178464889526,
0.5228546261787415,
0.4052315950393677,
0.14612770080566406,
-0.2536082863807678,
0.06285786628723145,
0.009881645441055298,
0.23977504670619965,
-0.07510572671890259,
0.04711366444826126,
0.20973551273345947,
-0.010613713413476944,
-0.0920608639717102,
0.10358816385269165,
0.2012157142162323,
-0.17277324199676514,
-0.26077544689178467,
-0.051827311515808105,
-0.01882564276456833,
-0.34538570046424866,
0.04372397065162659,
-0.07298977673053741,
-0.04837727174162865,
-0.2528211176395416,
0.04338402301073074,
0.1638641357421875,
-0.020812643691897392,
-0.013107024133205414,
0.09293295443058014,
-0.3279191851615906,
0.19823423027992249,
0.5552416443824768,
0.16820785403251648,
0.23538047075271606,
0.5867550373077393,
0.10514473915100098,
0.08375747501850128,
-0.04912181198596954,
0.18968895077705383,
0.08199834078550339,
-0.558799147605896,
0.1266515702009201,
-0.150318905711174,
0.15735109150409698,
0.029212236404418945,
0.1890336126089096,
0.22998371720314026,
0.019318729639053345,
0.06535416841506958,
-0.3725214898586273,
-0.2580159306526184,
0.10267364233732224,
-0.06863418221473694,
0.22904160618782043,
-0.09888828545808792,
-0.01989220455288887,
-0.07988165318965912,
-0.14163431525230408,
-0.22576598823070526,
0.34710484743118286,
-0.05617737025022507,
0.0023436862975358963,
-0.033095214515924454,
0.09401636570692062,
0.23046450316905975,
-0.11912795901298523,
0.12076249718666077,
0.12446029484272003,
0.10278455913066864,
-0.0857936218380928,
-0.1306602507829666,
0.20173832774162292,
-0.05086380988359451,
-0.026454662904143333,
-0.36049729585647583,
-0.26890555024147034,
0.013614732772111893,
0.050414323806762695,
0.005103759467601776,
0.2533678114414215,
-0.13068917393684387,
0.10610327124595642,
0.17229948937892914,
-0.04077550768852234,
-0.27317047119140625,
0.2238016575574875,
-0.27357450127601624,
0.15214920043945312,
0.2801801264286041,
0.12017183005809784,
-0.03351835906505585,
-0.02501140907406807,
-0.2575036287307739,
0.10567792505025864,
-0.05976225435733795,
-0.14064911007881165,
0.16709227859973907,
-0.29859811067581177,
0.013423614203929901,
0.20892851054668427,
-0.050788380205631256,
0.3738497197628021,
-0.29108965396881104,
0.08338968455791473,
0.2928052842617035,
0.03662874549627304,
-0.47521108388900757,
-0.2112521082162857,
-0.3561134338378906,
-0.29200565814971924,
-0.1938771903514862,
0.27681776881217957,
0.2653111517429352,
-0.46315085887908936,
-0.1963554173707962,
-0.02085557021200657,
0.25698110461235046,
0.24125370383262634,
0.04290720075368881,
0.6707422733306885,
0.04481707140803337,
0.073316290974617,
-0.00993841327726841,
-0.015360210090875626,
-0.1455458402633667,
0.49674713611602783,
-0.23287740349769592,
0.2050265669822693,
-0.2621956169605255,
0.08922907710075378,
0.09222260862588882,
-0.40592160820961,
-0.0031333230435848236,
-0.04093506932258606,
-0.12365376949310303,
0.10052667558193207,
0.1884092390537262,
0.7943131923675537,
-0.03900248929858208,
0.11063314229249954,
-0.21566934883594513,
-0.12677247822284698,
-0.052093833684921265,
-0.23251569271087646,
-0.12254002690315247,
-0.448702871799469,
-0.24227914214134216,
0.10041001439094543,
-0.2729102075099945,
0.016625095158815384,
0.2284422516822815,
0.2518285810947418,
-0.12811757624149323,
-0.3096120357513428,
-0.09652919322252274,
0.4128935635089874,
0.003928549587726593,
-0.2764596939086914,
0.18494072556495667,
0.40009331703186035,
-0.1994853913784027,
0.2852950394153595,
-0.02031014673411846,
0.5014733076095581,
-0.016500893980264664,
-0.29540061950683594,
0.23004770278930664,
0.0034086592495441437,
0.0014062821865081787,
0.17343924939632416,
0.2849433422088623,
0.10159485042095184,
-0.027813825756311417,
0.22835376858711243,
0.0015166550874710083,
0.05421964079141617,
-0.058026883751153946,
0.19323185086250305,
0.1937195062637329,
-0.3182796835899353,
0.26852262020111084,
-0.03240686655044556,
-0.03127863630652428,
-0.0987672507762909,
0.19407950341701508,
-0.42966899275779724,
-0.23159800469875336,
0.4431781768798828,
0.1266237050294876,
0.01496141217648983,
-0.21062837541103363,
0.04834868758916855,
-0.11881549656391144,
0.43831998109817505,
0.43074336647987366,
0.21380329132080078,
-0.2992772161960602,
-0.2892037630081177,
-0.876064658164978,
0.22361034154891968,
-0.06357699632644653,
-0.09261007606983185,
0.10501734912395477,
-0.09280073642730713,
0.2690250873565674,
-0.04455610364675522,
0.2391434907913208,
0.3715129792690277,
-0.1822865903377533,
0.37902557849884033,
-0.31502190232276917,
-0.28684696555137634,
-0.05176713317632675,
0.16118454933166504,
-0.3458271920681,
-0.40425485372543335,
-0.01837022230029106,
-0.1632666140794754,
-0.008516006171703339,
-0.15203891694545746,
0.012040570378303528,
0.17867621779441833,
0.2592732906341553,
0.4139886498451233,
0.12449081242084503,
0.5685067176818848,
0.07200634479522705,
-0.20096459984779358,
-0.20620524883270264,
-0.33530890941619873,
-0.15268397331237793,
0.18568626046180725,
0.11933113634586334,
0.08676768094301224,
-0.22945639491081238,
-0.1961050033569336,
-0.1533232480287552,
0.11708584427833557,
0.0432276576757431,
0.21362823247909546,
-0.396430104970932,
-0.04080510139465332,
-0.34637415409088135,
0.24084094166755676,
-0.012770567089319229,
0.522182822227478,
0.05220183730125427,
0.2773742377758026,
-0.1648884117603302,
-0.48546716570854187,
0.5128158330917358,
-0.5318161249160767,
-0.27443015575408936,
0.003842787817120552,
0.17003536224365234,
-0.0397605374455452,
0.07679827511310577,
-0.2911459803581238,
-0.17392107844352722,
0.35800260305404663,
0.186580091714859,
-0.23279120028018951,
0.12617932260036469,
-0.030532684177160263,
0.2540874481201172,
-0.12485770881175995,
0.1643574982881546,
0.18346494436264038,
-0.321069598197937,
0.10237105190753937,
-0.3391934037208557
] |
https://github.com/huggingface/datasets/issues/4420 | Metric evaluation problems in multi-node, shared file system | If you call `metric.compute` in a distributed setup like yours, then `metric.compute` is called in each process. `metric.compute` first calls `metric.add_batch`, and it looks like your error appears at that stage.
To make sure that all the processes have started writing their predictions/references at the same time, each process waits for process 0 to lock `slurm-{world_size}-0.arrow.lock`. Process 0 locks this file when `metric.add_batch` is called, so here when `metric.compute` is called.
Therefore your error can happen when process 0 takes too much time to call `metric.compute` compared to process 3 (>100 seconds by default). I haven't tried running your code but could it be the case ?
I guess it could also happen if you run multiple times the same distributed job at the same time with the same `experiment_id` because they would collide.
| ## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
| 134 | Metric evaluation problems in multi-node, shared file system
## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
If you call `metric.compute` in a distributed setup like yours, then `metric.compute` is called in each process. `metric.compute` first calls `metric.add_batch`, and it looks like your error appears at that stage.
To make sure that all the processes have started writing their predictions/references at the same time, each process waits for process 0 to lock `slurm-{world_size}-0.arrow.lock`. Process 0 locks this file when `metric.add_batch` is called, so here when `metric.compute` is called.
Therefore your error can happen when process 0 takes too much time to call `metric.compute` compared to process 3 (>100 seconds by default). I haven't tried running your code but could it be the case ?
I guess it could also happen if you run multiple times the same distributed job at the same time with the same `experiment_id` because they would collide.
| [
-0.1226465255022049,
-0.29547232389450073,
0.07963378727436066,
0.36486637592315674,
0.062170859426259995,
-0.3332039713859558,
0.3804205656051636,
0.10030752420425415,
0.1567913144826889,
0.28335070610046387,
-0.17039130628108978,
0.10685503482818604,
-0.18573790788650513,
-0.358416885137558,
-0.3080679774284363,
-0.1064901202917099,
0.03433121740818024,
-0.2464396059513092,
-0.27878835797309875,
-0.13324296474456787,
-0.07453227043151855,
0.39288538694381714,
-0.09850480407476425,
-0.1667705625295639,
-0.5835465788841248,
-0.14868389070034027,
-0.1840139776468277,
0.2807324528694153,
0.08021943271160126,
-0.2285727709531784,
0.030915407463908195,
0.2531624734401703,
-0.05648243799805641,
0.6916359066963196,
-0.00011334523878758773,
0.015102162957191467,
0.20982606709003448,
0.11131420731544495,
-0.027201887220144272,
0.010143876075744629,
0.2791859209537506,
-0.22019855678081512,
-0.04965561628341675,
-0.223126620054245,
0.114160917699337,
-0.020802658051252365,
0.033914484083652496,
-0.28398698568344116,
0.45585018396377563,
-0.04291117563843727,
0.05991266295313835,
0.835524320602417,
-0.1456398069858551,
-0.23779550194740295,
-0.44132480025291443,
-0.09305855631828308,
0.015589063987135887,
0.6000438928604126,
0.4134036600589752,
-0.17180611193180084,
-0.5711012482643127,
0.3044431209564209,
0.19795534014701843,
-0.11619523167610168,
0.3093448877334595,
0.14413270354270935,
0.160135418176651,
0.07866046577692032,
-0.355080783367157,
0.12263303250074387,
-0.3049754500389099,
0.024682406336069107,
-0.21766838431358337,
-0.27577224373817444,
-0.19729755818843842,
-0.27293363213539124,
0.3068850636482239,
-0.20456497371196747,
-0.1598876714706421,
0.05007230490446091,
-0.43397438526153564,
0.11648011207580566,
-0.1950545310974121,
0.014863379299640656,
-0.10825683921575546,
0.15458592772483826,
-0.02490409091114998,
-0.010247334837913513,
0.17278216779232025,
0.22525912523269653,
-0.3425598740577698,
-0.01629308983683586,
-0.0016896091401576996,
0.03127197176218033,
-0.6960668563842773,
-0.15327051281929016,
0.19864392280578613,
-0.2164013683795929,
-0.08415809273719788,
0.08636628091335297,
0.01858370564877987,
-0.07447761297225952,
0.0774577409029007,
0.2815343737602234,
0.06028095260262489,
0.5285845994949341,
-0.44969189167022705,
0.4792744815349579,
0.3597560524940491,
0.03379306569695473,
-0.17972563207149506,
-0.07193125784397125,
-0.08220511674880981,
-0.4150053560733795,
0.01172555610537529,
0.3745640218257904,
-0.059862472116947174,
-0.020323950797319412,
0.06907092779874802,
0.1544884294271469,
0.13032245635986328,
0.05577220022678375,
0.42046698927879333,
0.34813427925109863,
0.21095284819602966,
0.3364879786968231,
0.196696475148201,
0.19494780898094177,
-0.23199811577796936,
-0.044107936322689056,
-0.256224125623703,
-0.08411037921905518,
-0.3242303729057312,
0.041089579463005066,
0.23096449673175812,
0.01657487452030182,
0.21161876618862152,
-0.05971935763955116,
0.6232886910438538,
-0.33594438433647156,
-0.13358831405639648,
-0.08222651481628418,
-0.06256017833948135,
0.11407553404569626,
-0.015215897932648659,
-0.08760657906532288,
0.15232455730438232,
0.2480224221944809,
0.09249775856733322,
-0.36197713017463684,
-0.22690662741661072,
-0.23025232553482056,
0.20299294590950012,
0.029884707182645798,
-0.2474093735218048,
0.44512057304382324,
0.18141469359397888,
0.12668858468532562,
0.1485063135623932,
-0.026334762573242188,
0.07744735479354858,
-0.1655108630657196,
-0.48621657490730286,
-0.010952292010188103,
0.20193898677825928,
0.4323155879974365,
0.6334858536720276,
-0.07869616895914078,
0.11625200510025024,
0.05629682540893555,
-0.03406409174203873,
0.7166301012039185,
-0.008150414563715458,
0.25285279750823975,
-0.1942288875579834,
0.32558488845825195,
0.10816164314746857,
-0.7999746799468994,
-0.3105439245700836,
0.223687544465065,
-0.4377644658088684,
0.1720459908246994,
0.2563614845275879,
0.013428940437734127,
0.24495555460453033,
-0.1248922049999237,
0.027626313269138336,
0.2301892340183258,
0.064564049243927,
-0.0624079704284668,
-0.5194101333618164,
0.11149927973747253,
0.012047426775097847,
-0.047355249524116516,
0.2685912847518921,
0.045096833258867264,
0.20512938499450684,
0.33239129185676575,
0.13736362755298615,
-0.0032366998493671417,
0.03264372795820236,
0.20777179300785065,
-0.004549290984869003,
-0.19889123737812042,
0.17546342313289642,
-0.10968618094921112,
-0.10247587412595749,
0.5124408006668091,
-0.5817217826843262,
0.04135716333985329,
0.21233177185058594,
-0.06913363933563232,
0.0037334635853767395,
-0.020825359970331192,
-0.005137082189321518,
-0.11497707664966583,
0.08822433650493622,
0.1054539680480957,
-0.22015252709388733,
-0.12726789712905884,
0.07331573963165283,
0.2836350202560425,
-0.0716329887509346,
-0.07619428634643555,
0.011021731421351433,
0.15302111208438873,
-0.10725932568311691,
-0.1084766685962677,
-0.010346729308366776,
0.2614203989505768,
0.14595697820186615,
-0.22731615602970123,
-0.23874151706695557,
0.4972596764564514,
-0.07233927398920059,
0.4353688955307007,
-0.06178247928619385,
0.08152676373720169,
0.2623959183692932,
-0.15576960146427155,
-0.09450837224721909,
0.19318445026874542,
0.05529632791876793,
-0.054188452661037445,
-0.1847611665725708,
0.41593462228775024,
-0.0472797267138958,
-0.04881524294614792,
-0.058452628552913666,
-0.051324263215065,
-0.09040872007608414,
-0.10653386265039444,
0.04834676533937454,
0.07061642408370972,
0.3840908706188202,
0.14837084710597992,
0.012667495757341385,
0.055778618901968,
0.03851685672998428,
-0.31274887919425964,
0.4695686995983124,
0.04389215633273125,
0.10052722692489624,
-0.15546777844429016,
0.18580272793769836,
-0.0014796052128076553,
-0.10856632888317108,
-0.14094780385494232,
0.5798085331916809,
0.059148579835891724,
0.20253436267375946,
0.2487802505493164,
0.010992924682796001,
-0.21207283437252045,
0.07094938308000565,
0.0053445324301719666,
-0.11742371320724487,
0.6353678107261658,
0.2944051921367645,
0.012618680484592915,
-0.11078590154647827,
-0.21145334839820862,
0.27877968549728394,
-0.1665809154510498,
-0.35170817375183105,
0.11777948588132858,
-0.15009276568889618,
0.4524969160556793,
-0.19030162692070007,
0.20605506002902985,
-0.2598244249820709,
-0.2019272893667221,
0.1805843859910965,
0.38087746500968933,
-0.1686890721321106,
0.17363032698631287,
0.46487292647361755,
0.39033252000808716,
-0.05586042255163193,
0.17103101313114166,
0.07496124505996704,
-0.1925722062587738,
-0.15373265743255615,
-0.06519343703985214,
0.3134978413581848,
0.016378162428736687,
-0.18609972298145294,
0.06276726722717285,
-0.2008979171514511,
0.09126591682434082,
-0.29298335313796997,
0.139414981007576,
-0.10494869947433472,
0.2532104253768921,
-0.016026191413402557,
-0.23153676092624664,
-0.006327267736196518,
0.2019171118736267,
0.19733470678329468,
-0.1883944272994995,
-0.2364923059940338,
0.2938821017742157,
0.0004088502610102296,
-0.39840686321258545,
-0.522148609161377,
-0.32951706647872925,
-0.0628572404384613,
-0.4356900453567505,
0.463864803314209,
-0.31556883454322815,
0.029709819704294205,
0.24797219038009644,
0.02816316857933998,
0.006149111315608025,
-0.06620337069034576,
0.08463679254055023,
-0.041000790894031525,
-0.1605428159236908,
0.28352513909339905,
-0.17686468362808228,
-0.3544844686985016,
-0.3257427215576172,
0.10640156269073486,
0.11600561439990997,
-0.038701821118593216,
-0.14935243129730225,
-0.33307960629463196,
0.024303454905748367,
0.0647609680891037,
0.0029282346367836,
0.01668519899249077,
0.4571922719478607,
-0.26972055435180664,
-0.01649072766304016,
-0.27252504229545593,
0.21221771836280823,
0.4781433641910553,
0.23290851712226868,
-0.07715455442667007,
0.007532086223363876,
-0.08795645833015442,
0.23632431030273438,
0.8373278975486755,
0.414650559425354,
0.016226623207330704,
0.11626335233449936,
0.04920046031475067,
0.2530555725097656,
0.2053135335445404,
-0.23785759508609772,
0.23165878653526306,
0.038400016725063324,
-0.20962481200695038,
0.3397589921951294,
0.09292875230312347,
0.07160863280296326,
-0.09781570732593536,
-0.3758299648761749,
0.020079515874385834,
-0.45011404156684875,
0.07141508907079697,
0.13596701622009277,
0.29021576046943665,
0.08205214142799377,
0.15253034234046936,
-0.06582784652709961,
0.11150141060352325,
0.1713983714580536,
0.33625227212905884,
0.055381596088409424,
-0.09184861928224564,
0.02254783734679222,
-0.08557525277137756,
-0.1284903883934021,
0.035434380173683167,
0.1114310771226883,
0.38846683502197266,
-0.09260578453540802,
-0.005700442939996719,
0.06905427575111389,
-0.07332047075033188,
0.5187137126922607,
0.24250665307044983,
0.3133060932159424,
-0.0725182592868805,
-0.35823163390159607,
0.021648341789841652,
-0.01565558835864067,
-0.2780194878578186,
-0.416666179895401,
0.3179636597633362,
0.49051418900489807,
-0.14787405729293823,
-0.27586808800697327,
-0.4128696918487549,
-0.09228237718343735,
-0.24892862141132355,
-0.14182761311531067,
-0.35563868284225464,
0.07218515127897263,
-0.3742581605911255,
0.2835468649864197,
0.3413563668727875,
0.25894755125045776,
-0.1655925214290619,
0.06659355759620667,
0.1010136753320694,
-0.12258702516555786,
-0.01193874329328537,
0.36804109811782837,
0.19159454107284546,
-0.38127005100250244,
0.20699651539325714,
0.42324015498161316,
0.055182456970214844,
-0.1996738612651825,
0.23640286922454834,
0.08541354537010193,
-0.0919678658246994,
0.25172215700149536,
-0.08546838164329529,
0.12773491442203522,
0.5462225675582886,
-0.2121763974428177,
-0.08146872371435165,
0.27169644832611084,
0.20310699939727783,
-0.24885600805282593,
-0.07970103621482849,
0.12946748733520508,
0.2681671380996704,
0.26796263456344604,
0.29102805256843567,
0.056196391582489014,
0.09846648573875427,
-0.183993399143219,
0.14030268788337708,
-0.2215782254934311,
-0.11662229895591736,
0.18979975581169128,
-0.171197772026062,
0.79226154088974,
0.16929686069488525,
0.12428721785545349,
0.14606082439422607,
0.10674360394477844,
0.10974621772766113,
-0.6064883470535278,
0.29189103841781616,
-0.07793723046779633,
-0.2649601697921753,
-0.02831267938017845,
-0.02948339469730854,
0.05656944215297699,
-0.21043024957180023,
0.004144787788391113,
0.2079232931137085,
0.2406349629163742,
-0.012965485453605652,
-0.24343682825565338,
0.19522768259048462,
0.03885679319500923,
-0.22637046873569489,
0.3143179714679718,
0.02394719421863556,
0.2714504897594452,
0.433695912361145,
-0.07500151544809341,
-0.3992971181869507,
-0.1263045072555542,
-0.23586146533489227,
-0.21441003680229187,
0.0254514217376709,
-0.11033766716718674,
0.08824042230844498,
0.3932216167449951,
0.18408100306987762,
0.22890633344650269,
0.37114861607551575,
0.33837682008743286,
0.15565894544124603,
-0.23156529664993286,
0.1762319654226303,
-0.28623324632644653,
0.37821581959724426,
-0.05967751890420914,
-0.08840081840753555,
0.11791414022445679,
-0.17832082509994507,
-0.35662350058555603,
-0.202804297208786,
-0.09581795334815979,
-0.033979009836912155,
0.11891409754753113,
0.11794372648000717,
-0.17823392152786255,
0.23217420279979706,
0.3084328770637512,
0.01432124525308609,
-0.29994404315948486,
-0.15666699409484863,
0.103555828332901,
0.07761364430189133,
-0.3427913188934326,
0.17439457774162292,
-0.09572368860244751,
-0.28441953659057617,
0.22251753509044647,
0.5015813708305359,
-0.11752098053693771,
-0.0775732696056366,
0.07386192679405212,
0.1801404058933258,
-0.10319054871797562,
-0.20611795783042908,
-0.3111307621002197,
-0.20843271911144257,
-0.605645477771759,
0.18165670335292816,
-0.06025161221623421,
-0.3021441698074341,
0.016405774280428886,
0.32027655839920044,
0.3288378119468689,
0.12673893570899963,
-0.07310618460178375,
-0.31677377223968506,
-0.40407848358154297,
0.09206797927618027,
-0.4520488381385803,
-0.0811762809753418,
-0.059310317039489746,
0.45788633823394775,
-0.16426703333854675,
0.3518691956996918,
-0.26611751317977905,
-0.09190776199102402,
-0.4133838415145874,
-0.017430253326892853,
0.26403382420539856,
-0.3474743068218231,
0.1843053251504898,
-0.1253085881471634,
-0.06507813930511475,
0.36015433073043823,
-0.30464309453964233,
-0.060578182339668274,
-0.3630121946334839,
0.17079441249370575,
0.04493040591478348,
0.11253342777490616,
0.07003859430551529,
-0.09745021909475327,
-0.13090376555919647,
-0.26732829213142395,
0.1417086124420166,
0.11499766260385513,
-0.07895082235336304,
0.15426547825336456,
-0.28458982706069946,
0.38686054944992065,
-0.10551390796899796,
0.07889100909233093,
0.08838827908039093,
-0.33902740478515625,
-0.2293836921453476,
-0.019472450017929077,
-0.03361549228429794,
-0.10838709771633148,
-0.40928760170936584,
0.013161823153495789,
0.19238659739494324,
0.17777109146118164,
0.3446156084537506,
0.3719736337661743,
-0.23831364512443542,
-0.2726480960845947,
0.3021422326564789,
-0.19200783967971802,
-0.050377145409584045,
-0.03016398847103119,
0.02803034707903862,
0.10283065587282181,
-0.2123607099056244,
-0.03140454366803169,
-0.05558246746659279,
0.0612918920814991,
0.13880977034568787,
0.3166537582874298,
0.47211888432502747,
-0.10295315086841583,
-0.028156742453575134,
0.1954536736011505,
0.24443523585796356,
-0.12660908699035645,
-0.05584418773651123,
0.09184493124485016,
0.21325962245464325,
0.3728077709674835,
0.309048056602478,
-0.1657077670097351,
0.21887944638729095,
0.3541126251220703,
-0.4744991660118103,
0.21857516467571259,
-0.28947755694389343,
0.1934727132320404,
0.01654639095067978,
-0.06116337329149246,
-0.14349694550037384,
-0.10553514957427979,
-0.057172149419784546,
0.15270951390266418,
-0.5392782688140869,
0.23439157009124756,
-0.38294392824172974,
-0.15573559701442719,
-0.197966068983078,
0.35624900460243225,
-0.1585698127746582,
-0.15442056953907013,
-0.3112891912460327,
-0.16528114676475525,
-0.27896392345428467,
-0.1631334125995636,
0.2511577308177948,
0.38664019107818604,
0.2265464812517166,
0.36658012866973877,
-0.04723510146141052,
-0.17875665426254272,
-0.49362772703170776,
0.2092776596546173,
0.22999733686447144,
-0.3069007396697998,
0.24135571718215942,
0.5113224983215332,
-0.12261731922626495,
0.3116088807582855,
0.34227463603019714,
0.39099040627479553,
0.01700439676642418,
-0.0488167367875576,
0.0171196311712265,
0.06669413298368454,
0.19170628488063812,
-0.13734140992164612,
0.23277677595615387,
-0.16971424221992493,
-0.10073384642601013,
-0.004182280972599983,
-0.022867539897561073,
-0.2050240933895111,
0.13774386048316956,
-0.15160542726516724,
0.12745460867881775,
-0.2960871160030365,
0.6735236048698425,
-0.08811739832162857,
0.018308565020561218,
-0.16118203103542328,
-0.10930731147527695,
-0.4887101650238037,
0.2702738344669342,
0.1911807507276535,
0.20017492771148682,
0.30115821957588196,
-0.21184536814689636,
0.03187807276844978,
0.0614364892244339,
0.3160473108291626,
0.16763029992580414,
-0.24471870064735413,
-0.354339599609375,
0.04476974904537201,
-0.6734270453453064,
0.4350377321243286,
0.1517411172389984,
0.10922902822494507,
-0.03847714513540268,
0.03493170440196991,
-0.11195670813322067,
0.07929633557796478,
0.17305098474025726,
-0.1939648538827896,
0.035636577755212784,
0.26346060633659363,
-0.36603134870529175,
0.27558350563049316,
-0.2461363822221756,
-0.23811811208724976,
0.2487059235572815,
-0.11308664083480835,
0.0006521232426166534,
0.0036281272768974304,
0.029976651072502136,
-0.0061790719628334045,
-0.01004139706492424,
-0.21091550588607788,
0.29738765954971313,
0.028424903750419617,
0.044204674661159515,
0.17182309925556183,
0.01574263721704483,
-0.15980330109596252,
-0.2036956250667572,
0.17690984904766083,
0.009497200138866901,
-0.35314875841140747,
-0.008286409080028534,
0.4376751184463501,
-0.32120615243911743,
-0.06548286974430084,
-0.3393903076648712,
0.07986273616552353,
0.008869443088769913,
-0.17908765375614166,
-0.3372270464897156,
0.23770064115524292,
-0.3895711302757263,
0.24976658821105957,
0.3788767457008362,
0.5589139461517334,
-0.04165166616439819,
0.02822951041162014,
-0.5358927845954895,
-0.22398275136947632,
0.429124116897583,
-0.6881700754165649,
-0.13198384642601013,
-0.33538544178009033,
0.39702141284942627,
0.08930892497301102,
0.0715339183807373,
-0.5503525733947754,
-0.03614452853798866,
-0.01795632764697075,
0.11851033568382263,
-0.24627187848091125,
-0.04956464841961861,
-0.15310798585414886,
-0.3234373927116394,
0.08975876867771149,
-0.017823360860347748,
0.1394115835428238,
-0.37214821577072144,
0.27140265703201294,
-0.0634138286113739
] |
https://github.com/huggingface/datasets/issues/4420 | Metric evaluation problems in multi-node, shared file system | We've finally been able to isolate the problem, it wasn't a timing problem, but rather a file locking one.
The locks produced by calling `flock` where not visible between nodes (so the master node couldn't check other node's locks nor the other way around).
We are now having issues with the pre-processing in our runner script, but are not related with the rendezvous process during the evaluation phase. We will let you know about it once we address it.
Our solution to the rendezvous is as follows:
- We solved the problem by calling `lockf` instead of `flock`.
- We had to change slightly the `_check_all_processes_locks` method so that the main process (i.e. process 0) didn't check it's own lock (because `lockf` permits recursive locks and thus checking it only replaced the current lock with a new one).
We use a shared file system between nodes using GPFS in our cluster setup. Maybe the difference between the behavior we see with respect to your usage in multi-node executions comes from that fact. Which file system scheme do you use for the multi-node executions?
`lockf` seems to work in more settings than `flock`, so maybe we could write a PR so you could test it in your environment. | ## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
| 207 | Metric evaluation problems in multi-node, shared file system
## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
We've finally been able to isolate the problem, it wasn't a timing problem, but rather a file locking one.
The locks produced by calling `flock` where not visible between nodes (so the master node couldn't check other node's locks nor the other way around).
We are now having issues with the pre-processing in our runner script, but are not related with the rendezvous process during the evaluation phase. We will let you know about it once we address it.
Our solution to the rendezvous is as follows:
- We solved the problem by calling `lockf` instead of `flock`.
- We had to change slightly the `_check_all_processes_locks` method so that the main process (i.e. process 0) didn't check it's own lock (because `lockf` permits recursive locks and thus checking it only replaced the current lock with a new one).
We use a shared file system between nodes using GPFS in our cluster setup. Maybe the difference between the behavior we see with respect to your usage in multi-node executions comes from that fact. Which file system scheme do you use for the multi-node executions?
`lockf` seems to work in more settings than `flock`, so maybe we could write a PR so you could test it in your environment. | [
-0.1226465255022049,
-0.29547232389450073,
0.07963378727436066,
0.36486637592315674,
0.062170859426259995,
-0.3332039713859558,
0.3804205656051636,
0.10030752420425415,
0.1567913144826889,
0.28335070610046387,
-0.17039130628108978,
0.10685503482818604,
-0.18573790788650513,
-0.358416885137558,
-0.3080679774284363,
-0.1064901202917099,
0.03433121740818024,
-0.2464396059513092,
-0.27878835797309875,
-0.13324296474456787,
-0.07453227043151855,
0.39288538694381714,
-0.09850480407476425,
-0.1667705625295639,
-0.5835465788841248,
-0.14868389070034027,
-0.1840139776468277,
0.2807324528694153,
0.08021943271160126,
-0.2285727709531784,
0.030915407463908195,
0.2531624734401703,
-0.05648243799805641,
0.6916359066963196,
-0.00011334523878758773,
0.015102162957191467,
0.20982606709003448,
0.11131420731544495,
-0.027201887220144272,
0.010143876075744629,
0.2791859209537506,
-0.22019855678081512,
-0.04965561628341675,
-0.223126620054245,
0.114160917699337,
-0.020802658051252365,
0.033914484083652496,
-0.28398698568344116,
0.45585018396377563,
-0.04291117563843727,
0.05991266295313835,
0.835524320602417,
-0.1456398069858551,
-0.23779550194740295,
-0.44132480025291443,
-0.09305855631828308,
0.015589063987135887,
0.6000438928604126,
0.4134036600589752,
-0.17180611193180084,
-0.5711012482643127,
0.3044431209564209,
0.19795534014701843,
-0.11619523167610168,
0.3093448877334595,
0.14413270354270935,
0.160135418176651,
0.07866046577692032,
-0.355080783367157,
0.12263303250074387,
-0.3049754500389099,
0.024682406336069107,
-0.21766838431358337,
-0.27577224373817444,
-0.19729755818843842,
-0.27293363213539124,
0.3068850636482239,
-0.20456497371196747,
-0.1598876714706421,
0.05007230490446091,
-0.43397438526153564,
0.11648011207580566,
-0.1950545310974121,
0.014863379299640656,
-0.10825683921575546,
0.15458592772483826,
-0.02490409091114998,
-0.010247334837913513,
0.17278216779232025,
0.22525912523269653,
-0.3425598740577698,
-0.01629308983683586,
-0.0016896091401576996,
0.03127197176218033,
-0.6960668563842773,
-0.15327051281929016,
0.19864392280578613,
-0.2164013683795929,
-0.08415809273719788,
0.08636628091335297,
0.01858370564877987,
-0.07447761297225952,
0.0774577409029007,
0.2815343737602234,
0.06028095260262489,
0.5285845994949341,
-0.44969189167022705,
0.4792744815349579,
0.3597560524940491,
0.03379306569695473,
-0.17972563207149506,
-0.07193125784397125,
-0.08220511674880981,
-0.4150053560733795,
0.01172555610537529,
0.3745640218257904,
-0.059862472116947174,
-0.020323950797319412,
0.06907092779874802,
0.1544884294271469,
0.13032245635986328,
0.05577220022678375,
0.42046698927879333,
0.34813427925109863,
0.21095284819602966,
0.3364879786968231,
0.196696475148201,
0.19494780898094177,
-0.23199811577796936,
-0.044107936322689056,
-0.256224125623703,
-0.08411037921905518,
-0.3242303729057312,
0.041089579463005066,
0.23096449673175812,
0.01657487452030182,
0.21161876618862152,
-0.05971935763955116,
0.6232886910438538,
-0.33594438433647156,
-0.13358831405639648,
-0.08222651481628418,
-0.06256017833948135,
0.11407553404569626,
-0.015215897932648659,
-0.08760657906532288,
0.15232455730438232,
0.2480224221944809,
0.09249775856733322,
-0.36197713017463684,
-0.22690662741661072,
-0.23025232553482056,
0.20299294590950012,
0.029884707182645798,
-0.2474093735218048,
0.44512057304382324,
0.18141469359397888,
0.12668858468532562,
0.1485063135623932,
-0.026334762573242188,
0.07744735479354858,
-0.1655108630657196,
-0.48621657490730286,
-0.010952292010188103,
0.20193898677825928,
0.4323155879974365,
0.6334858536720276,
-0.07869616895914078,
0.11625200510025024,
0.05629682540893555,
-0.03406409174203873,
0.7166301012039185,
-0.008150414563715458,
0.25285279750823975,
-0.1942288875579834,
0.32558488845825195,
0.10816164314746857,
-0.7999746799468994,
-0.3105439245700836,
0.223687544465065,
-0.4377644658088684,
0.1720459908246994,
0.2563614845275879,
0.013428940437734127,
0.24495555460453033,
-0.1248922049999237,
0.027626313269138336,
0.2301892340183258,
0.064564049243927,
-0.0624079704284668,
-0.5194101333618164,
0.11149927973747253,
0.012047426775097847,
-0.047355249524116516,
0.2685912847518921,
0.045096833258867264,
0.20512938499450684,
0.33239129185676575,
0.13736362755298615,
-0.0032366998493671417,
0.03264372795820236,
0.20777179300785065,
-0.004549290984869003,
-0.19889123737812042,
0.17546342313289642,
-0.10968618094921112,
-0.10247587412595749,
0.5124408006668091,
-0.5817217826843262,
0.04135716333985329,
0.21233177185058594,
-0.06913363933563232,
0.0037334635853767395,
-0.020825359970331192,
-0.005137082189321518,
-0.11497707664966583,
0.08822433650493622,
0.1054539680480957,
-0.22015252709388733,
-0.12726789712905884,
0.07331573963165283,
0.2836350202560425,
-0.0716329887509346,
-0.07619428634643555,
0.011021731421351433,
0.15302111208438873,
-0.10725932568311691,
-0.1084766685962677,
-0.010346729308366776,
0.2614203989505768,
0.14595697820186615,
-0.22731615602970123,
-0.23874151706695557,
0.4972596764564514,
-0.07233927398920059,
0.4353688955307007,
-0.06178247928619385,
0.08152676373720169,
0.2623959183692932,
-0.15576960146427155,
-0.09450837224721909,
0.19318445026874542,
0.05529632791876793,
-0.054188452661037445,
-0.1847611665725708,
0.41593462228775024,
-0.0472797267138958,
-0.04881524294614792,
-0.058452628552913666,
-0.051324263215065,
-0.09040872007608414,
-0.10653386265039444,
0.04834676533937454,
0.07061642408370972,
0.3840908706188202,
0.14837084710597992,
0.012667495757341385,
0.055778618901968,
0.03851685672998428,
-0.31274887919425964,
0.4695686995983124,
0.04389215633273125,
0.10052722692489624,
-0.15546777844429016,
0.18580272793769836,
-0.0014796052128076553,
-0.10856632888317108,
-0.14094780385494232,
0.5798085331916809,
0.059148579835891724,
0.20253436267375946,
0.2487802505493164,
0.010992924682796001,
-0.21207283437252045,
0.07094938308000565,
0.0053445324301719666,
-0.11742371320724487,
0.6353678107261658,
0.2944051921367645,
0.012618680484592915,
-0.11078590154647827,
-0.21145334839820862,
0.27877968549728394,
-0.1665809154510498,
-0.35170817375183105,
0.11777948588132858,
-0.15009276568889618,
0.4524969160556793,
-0.19030162692070007,
0.20605506002902985,
-0.2598244249820709,
-0.2019272893667221,
0.1805843859910965,
0.38087746500968933,
-0.1686890721321106,
0.17363032698631287,
0.46487292647361755,
0.39033252000808716,
-0.05586042255163193,
0.17103101313114166,
0.07496124505996704,
-0.1925722062587738,
-0.15373265743255615,
-0.06519343703985214,
0.3134978413581848,
0.016378162428736687,
-0.18609972298145294,
0.06276726722717285,
-0.2008979171514511,
0.09126591682434082,
-0.29298335313796997,
0.139414981007576,
-0.10494869947433472,
0.2532104253768921,
-0.016026191413402557,
-0.23153676092624664,
-0.006327267736196518,
0.2019171118736267,
0.19733470678329468,
-0.1883944272994995,
-0.2364923059940338,
0.2938821017742157,
0.0004088502610102296,
-0.39840686321258545,
-0.522148609161377,
-0.32951706647872925,
-0.0628572404384613,
-0.4356900453567505,
0.463864803314209,
-0.31556883454322815,
0.029709819704294205,
0.24797219038009644,
0.02816316857933998,
0.006149111315608025,
-0.06620337069034576,
0.08463679254055023,
-0.041000790894031525,
-0.1605428159236908,
0.28352513909339905,
-0.17686468362808228,
-0.3544844686985016,
-0.3257427215576172,
0.10640156269073486,
0.11600561439990997,
-0.038701821118593216,
-0.14935243129730225,
-0.33307960629463196,
0.024303454905748367,
0.0647609680891037,
0.0029282346367836,
0.01668519899249077,
0.4571922719478607,
-0.26972055435180664,
-0.01649072766304016,
-0.27252504229545593,
0.21221771836280823,
0.4781433641910553,
0.23290851712226868,
-0.07715455442667007,
0.007532086223363876,
-0.08795645833015442,
0.23632431030273438,
0.8373278975486755,
0.414650559425354,
0.016226623207330704,
0.11626335233449936,
0.04920046031475067,
0.2530555725097656,
0.2053135335445404,
-0.23785759508609772,
0.23165878653526306,
0.038400016725063324,
-0.20962481200695038,
0.3397589921951294,
0.09292875230312347,
0.07160863280296326,
-0.09781570732593536,
-0.3758299648761749,
0.020079515874385834,
-0.45011404156684875,
0.07141508907079697,
0.13596701622009277,
0.29021576046943665,
0.08205214142799377,
0.15253034234046936,
-0.06582784652709961,
0.11150141060352325,
0.1713983714580536,
0.33625227212905884,
0.055381596088409424,
-0.09184861928224564,
0.02254783734679222,
-0.08557525277137756,
-0.1284903883934021,
0.035434380173683167,
0.1114310771226883,
0.38846683502197266,
-0.09260578453540802,
-0.005700442939996719,
0.06905427575111389,
-0.07332047075033188,
0.5187137126922607,
0.24250665307044983,
0.3133060932159424,
-0.0725182592868805,
-0.35823163390159607,
0.021648341789841652,
-0.01565558835864067,
-0.2780194878578186,
-0.416666179895401,
0.3179636597633362,
0.49051418900489807,
-0.14787405729293823,
-0.27586808800697327,
-0.4128696918487549,
-0.09228237718343735,
-0.24892862141132355,
-0.14182761311531067,
-0.35563868284225464,
0.07218515127897263,
-0.3742581605911255,
0.2835468649864197,
0.3413563668727875,
0.25894755125045776,
-0.1655925214290619,
0.06659355759620667,
0.1010136753320694,
-0.12258702516555786,
-0.01193874329328537,
0.36804109811782837,
0.19159454107284546,
-0.38127005100250244,
0.20699651539325714,
0.42324015498161316,
0.055182456970214844,
-0.1996738612651825,
0.23640286922454834,
0.08541354537010193,
-0.0919678658246994,
0.25172215700149536,
-0.08546838164329529,
0.12773491442203522,
0.5462225675582886,
-0.2121763974428177,
-0.08146872371435165,
0.27169644832611084,
0.20310699939727783,
-0.24885600805282593,
-0.07970103621482849,
0.12946748733520508,
0.2681671380996704,
0.26796263456344604,
0.29102805256843567,
0.056196391582489014,
0.09846648573875427,
-0.183993399143219,
0.14030268788337708,
-0.2215782254934311,
-0.11662229895591736,
0.18979975581169128,
-0.171197772026062,
0.79226154088974,
0.16929686069488525,
0.12428721785545349,
0.14606082439422607,
0.10674360394477844,
0.10974621772766113,
-0.6064883470535278,
0.29189103841781616,
-0.07793723046779633,
-0.2649601697921753,
-0.02831267938017845,
-0.02948339469730854,
0.05656944215297699,
-0.21043024957180023,
0.004144787788391113,
0.2079232931137085,
0.2406349629163742,
-0.012965485453605652,
-0.24343682825565338,
0.19522768259048462,
0.03885679319500923,
-0.22637046873569489,
0.3143179714679718,
0.02394719421863556,
0.2714504897594452,
0.433695912361145,
-0.07500151544809341,
-0.3992971181869507,
-0.1263045072555542,
-0.23586146533489227,
-0.21441003680229187,
0.0254514217376709,
-0.11033766716718674,
0.08824042230844498,
0.3932216167449951,
0.18408100306987762,
0.22890633344650269,
0.37114861607551575,
0.33837682008743286,
0.15565894544124603,
-0.23156529664993286,
0.1762319654226303,
-0.28623324632644653,
0.37821581959724426,
-0.05967751890420914,
-0.08840081840753555,
0.11791414022445679,
-0.17832082509994507,
-0.35662350058555603,
-0.202804297208786,
-0.09581795334815979,
-0.033979009836912155,
0.11891409754753113,
0.11794372648000717,
-0.17823392152786255,
0.23217420279979706,
0.3084328770637512,
0.01432124525308609,
-0.29994404315948486,
-0.15666699409484863,
0.103555828332901,
0.07761364430189133,
-0.3427913188934326,
0.17439457774162292,
-0.09572368860244751,
-0.28441953659057617,
0.22251753509044647,
0.5015813708305359,
-0.11752098053693771,
-0.0775732696056366,
0.07386192679405212,
0.1801404058933258,
-0.10319054871797562,
-0.20611795783042908,
-0.3111307621002197,
-0.20843271911144257,
-0.605645477771759,
0.18165670335292816,
-0.06025161221623421,
-0.3021441698074341,
0.016405774280428886,
0.32027655839920044,
0.3288378119468689,
0.12673893570899963,
-0.07310618460178375,
-0.31677377223968506,
-0.40407848358154297,
0.09206797927618027,
-0.4520488381385803,
-0.0811762809753418,
-0.059310317039489746,
0.45788633823394775,
-0.16426703333854675,
0.3518691956996918,
-0.26611751317977905,
-0.09190776199102402,
-0.4133838415145874,
-0.017430253326892853,
0.26403382420539856,
-0.3474743068218231,
0.1843053251504898,
-0.1253085881471634,
-0.06507813930511475,
0.36015433073043823,
-0.30464309453964233,
-0.060578182339668274,
-0.3630121946334839,
0.17079441249370575,
0.04493040591478348,
0.11253342777490616,
0.07003859430551529,
-0.09745021909475327,
-0.13090376555919647,
-0.26732829213142395,
0.1417086124420166,
0.11499766260385513,
-0.07895082235336304,
0.15426547825336456,
-0.28458982706069946,
0.38686054944992065,
-0.10551390796899796,
0.07889100909233093,
0.08838827908039093,
-0.33902740478515625,
-0.2293836921453476,
-0.019472450017929077,
-0.03361549228429794,
-0.10838709771633148,
-0.40928760170936584,
0.013161823153495789,
0.19238659739494324,
0.17777109146118164,
0.3446156084537506,
0.3719736337661743,
-0.23831364512443542,
-0.2726480960845947,
0.3021422326564789,
-0.19200783967971802,
-0.050377145409584045,
-0.03016398847103119,
0.02803034707903862,
0.10283065587282181,
-0.2123607099056244,
-0.03140454366803169,
-0.05558246746659279,
0.0612918920814991,
0.13880977034568787,
0.3166537582874298,
0.47211888432502747,
-0.10295315086841583,
-0.028156742453575134,
0.1954536736011505,
0.24443523585796356,
-0.12660908699035645,
-0.05584418773651123,
0.09184493124485016,
0.21325962245464325,
0.3728077709674835,
0.309048056602478,
-0.1657077670097351,
0.21887944638729095,
0.3541126251220703,
-0.4744991660118103,
0.21857516467571259,
-0.28947755694389343,
0.1934727132320404,
0.01654639095067978,
-0.06116337329149246,
-0.14349694550037384,
-0.10553514957427979,
-0.057172149419784546,
0.15270951390266418,
-0.5392782688140869,
0.23439157009124756,
-0.38294392824172974,
-0.15573559701442719,
-0.197966068983078,
0.35624900460243225,
-0.1585698127746582,
-0.15442056953907013,
-0.3112891912460327,
-0.16528114676475525,
-0.27896392345428467,
-0.1631334125995636,
0.2511577308177948,
0.38664019107818604,
0.2265464812517166,
0.36658012866973877,
-0.04723510146141052,
-0.17875665426254272,
-0.49362772703170776,
0.2092776596546173,
0.22999733686447144,
-0.3069007396697998,
0.24135571718215942,
0.5113224983215332,
-0.12261731922626495,
0.3116088807582855,
0.34227463603019714,
0.39099040627479553,
0.01700439676642418,
-0.0488167367875576,
0.0171196311712265,
0.06669413298368454,
0.19170628488063812,
-0.13734140992164612,
0.23277677595615387,
-0.16971424221992493,
-0.10073384642601013,
-0.004182280972599983,
-0.022867539897561073,
-0.2050240933895111,
0.13774386048316956,
-0.15160542726516724,
0.12745460867881775,
-0.2960871160030365,
0.6735236048698425,
-0.08811739832162857,
0.018308565020561218,
-0.16118203103542328,
-0.10930731147527695,
-0.4887101650238037,
0.2702738344669342,
0.1911807507276535,
0.20017492771148682,
0.30115821957588196,
-0.21184536814689636,
0.03187807276844978,
0.0614364892244339,
0.3160473108291626,
0.16763029992580414,
-0.24471870064735413,
-0.354339599609375,
0.04476974904537201,
-0.6734270453453064,
0.4350377321243286,
0.1517411172389984,
0.10922902822494507,
-0.03847714513540268,
0.03493170440196991,
-0.11195670813322067,
0.07929633557796478,
0.17305098474025726,
-0.1939648538827896,
0.035636577755212784,
0.26346060633659363,
-0.36603134870529175,
0.27558350563049316,
-0.2461363822221756,
-0.23811811208724976,
0.2487059235572815,
-0.11308664083480835,
0.0006521232426166534,
0.0036281272768974304,
0.029976651072502136,
-0.0061790719628334045,
-0.01004139706492424,
-0.21091550588607788,
0.29738765954971313,
0.028424903750419617,
0.044204674661159515,
0.17182309925556183,
0.01574263721704483,
-0.15980330109596252,
-0.2036956250667572,
0.17690984904766083,
0.009497200138866901,
-0.35314875841140747,
-0.008286409080028534,
0.4376751184463501,
-0.32120615243911743,
-0.06548286974430084,
-0.3393903076648712,
0.07986273616552353,
0.008869443088769913,
-0.17908765375614166,
-0.3372270464897156,
0.23770064115524292,
-0.3895711302757263,
0.24976658821105957,
0.3788767457008362,
0.5589139461517334,
-0.04165166616439819,
0.02822951041162014,
-0.5358927845954895,
-0.22398275136947632,
0.429124116897583,
-0.6881700754165649,
-0.13198384642601013,
-0.33538544178009033,
0.39702141284942627,
0.08930892497301102,
0.0715339183807373,
-0.5503525733947754,
-0.03614452853798866,
-0.01795632764697075,
0.11851033568382263,
-0.24627187848091125,
-0.04956464841961861,
-0.15310798585414886,
-0.3234373927116394,
0.08975876867771149,
-0.017823360860347748,
0.1394115835428238,
-0.37214821577072144,
0.27140265703201294,
-0.0634138286113739
] |
https://github.com/huggingface/datasets/issues/4420 | Metric evaluation problems in multi-node, shared file system | Cool, I'm glad you managed to make evaluation work :)
I'm not completely aware of the differences between lockf and flock, but I've read somewhere that flock is preferable over lockf in multithreading and multiprocessing situations. Here we definitely are in such a situation so unless it is super important I don't think we will switch to lockf | ## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
| 58 | Metric evaluation problems in multi-node, shared file system
## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
Cool, I'm glad you managed to make evaluation work :)
I'm not completely aware of the differences between lockf and flock, but I've read somewhere that flock is preferable over lockf in multithreading and multiprocessing situations. Here we definitely are in such a situation so unless it is super important I don't think we will switch to lockf | [
-0.1226465255022049,
-0.29547232389450073,
0.07963378727436066,
0.36486637592315674,
0.062170859426259995,
-0.3332039713859558,
0.3804205656051636,
0.10030752420425415,
0.1567913144826889,
0.28335070610046387,
-0.17039130628108978,
0.10685503482818604,
-0.18573790788650513,
-0.358416885137558,
-0.3080679774284363,
-0.1064901202917099,
0.03433121740818024,
-0.2464396059513092,
-0.27878835797309875,
-0.13324296474456787,
-0.07453227043151855,
0.39288538694381714,
-0.09850480407476425,
-0.1667705625295639,
-0.5835465788841248,
-0.14868389070034027,
-0.1840139776468277,
0.2807324528694153,
0.08021943271160126,
-0.2285727709531784,
0.030915407463908195,
0.2531624734401703,
-0.05648243799805641,
0.6916359066963196,
-0.00011334523878758773,
0.015102162957191467,
0.20982606709003448,
0.11131420731544495,
-0.027201887220144272,
0.010143876075744629,
0.2791859209537506,
-0.22019855678081512,
-0.04965561628341675,
-0.223126620054245,
0.114160917699337,
-0.020802658051252365,
0.033914484083652496,
-0.28398698568344116,
0.45585018396377563,
-0.04291117563843727,
0.05991266295313835,
0.835524320602417,
-0.1456398069858551,
-0.23779550194740295,
-0.44132480025291443,
-0.09305855631828308,
0.015589063987135887,
0.6000438928604126,
0.4134036600589752,
-0.17180611193180084,
-0.5711012482643127,
0.3044431209564209,
0.19795534014701843,
-0.11619523167610168,
0.3093448877334595,
0.14413270354270935,
0.160135418176651,
0.07866046577692032,
-0.355080783367157,
0.12263303250074387,
-0.3049754500389099,
0.024682406336069107,
-0.21766838431358337,
-0.27577224373817444,
-0.19729755818843842,
-0.27293363213539124,
0.3068850636482239,
-0.20456497371196747,
-0.1598876714706421,
0.05007230490446091,
-0.43397438526153564,
0.11648011207580566,
-0.1950545310974121,
0.014863379299640656,
-0.10825683921575546,
0.15458592772483826,
-0.02490409091114998,
-0.010247334837913513,
0.17278216779232025,
0.22525912523269653,
-0.3425598740577698,
-0.01629308983683586,
-0.0016896091401576996,
0.03127197176218033,
-0.6960668563842773,
-0.15327051281929016,
0.19864392280578613,
-0.2164013683795929,
-0.08415809273719788,
0.08636628091335297,
0.01858370564877987,
-0.07447761297225952,
0.0774577409029007,
0.2815343737602234,
0.06028095260262489,
0.5285845994949341,
-0.44969189167022705,
0.4792744815349579,
0.3597560524940491,
0.03379306569695473,
-0.17972563207149506,
-0.07193125784397125,
-0.08220511674880981,
-0.4150053560733795,
0.01172555610537529,
0.3745640218257904,
-0.059862472116947174,
-0.020323950797319412,
0.06907092779874802,
0.1544884294271469,
0.13032245635986328,
0.05577220022678375,
0.42046698927879333,
0.34813427925109863,
0.21095284819602966,
0.3364879786968231,
0.196696475148201,
0.19494780898094177,
-0.23199811577796936,
-0.044107936322689056,
-0.256224125623703,
-0.08411037921905518,
-0.3242303729057312,
0.041089579463005066,
0.23096449673175812,
0.01657487452030182,
0.21161876618862152,
-0.05971935763955116,
0.6232886910438538,
-0.33594438433647156,
-0.13358831405639648,
-0.08222651481628418,
-0.06256017833948135,
0.11407553404569626,
-0.015215897932648659,
-0.08760657906532288,
0.15232455730438232,
0.2480224221944809,
0.09249775856733322,
-0.36197713017463684,
-0.22690662741661072,
-0.23025232553482056,
0.20299294590950012,
0.029884707182645798,
-0.2474093735218048,
0.44512057304382324,
0.18141469359397888,
0.12668858468532562,
0.1485063135623932,
-0.026334762573242188,
0.07744735479354858,
-0.1655108630657196,
-0.48621657490730286,
-0.010952292010188103,
0.20193898677825928,
0.4323155879974365,
0.6334858536720276,
-0.07869616895914078,
0.11625200510025024,
0.05629682540893555,
-0.03406409174203873,
0.7166301012039185,
-0.008150414563715458,
0.25285279750823975,
-0.1942288875579834,
0.32558488845825195,
0.10816164314746857,
-0.7999746799468994,
-0.3105439245700836,
0.223687544465065,
-0.4377644658088684,
0.1720459908246994,
0.2563614845275879,
0.013428940437734127,
0.24495555460453033,
-0.1248922049999237,
0.027626313269138336,
0.2301892340183258,
0.064564049243927,
-0.0624079704284668,
-0.5194101333618164,
0.11149927973747253,
0.012047426775097847,
-0.047355249524116516,
0.2685912847518921,
0.045096833258867264,
0.20512938499450684,
0.33239129185676575,
0.13736362755298615,
-0.0032366998493671417,
0.03264372795820236,
0.20777179300785065,
-0.004549290984869003,
-0.19889123737812042,
0.17546342313289642,
-0.10968618094921112,
-0.10247587412595749,
0.5124408006668091,
-0.5817217826843262,
0.04135716333985329,
0.21233177185058594,
-0.06913363933563232,
0.0037334635853767395,
-0.020825359970331192,
-0.005137082189321518,
-0.11497707664966583,
0.08822433650493622,
0.1054539680480957,
-0.22015252709388733,
-0.12726789712905884,
0.07331573963165283,
0.2836350202560425,
-0.0716329887509346,
-0.07619428634643555,
0.011021731421351433,
0.15302111208438873,
-0.10725932568311691,
-0.1084766685962677,
-0.010346729308366776,
0.2614203989505768,
0.14595697820186615,
-0.22731615602970123,
-0.23874151706695557,
0.4972596764564514,
-0.07233927398920059,
0.4353688955307007,
-0.06178247928619385,
0.08152676373720169,
0.2623959183692932,
-0.15576960146427155,
-0.09450837224721909,
0.19318445026874542,
0.05529632791876793,
-0.054188452661037445,
-0.1847611665725708,
0.41593462228775024,
-0.0472797267138958,
-0.04881524294614792,
-0.058452628552913666,
-0.051324263215065,
-0.09040872007608414,
-0.10653386265039444,
0.04834676533937454,
0.07061642408370972,
0.3840908706188202,
0.14837084710597992,
0.012667495757341385,
0.055778618901968,
0.03851685672998428,
-0.31274887919425964,
0.4695686995983124,
0.04389215633273125,
0.10052722692489624,
-0.15546777844429016,
0.18580272793769836,
-0.0014796052128076553,
-0.10856632888317108,
-0.14094780385494232,
0.5798085331916809,
0.059148579835891724,
0.20253436267375946,
0.2487802505493164,
0.010992924682796001,
-0.21207283437252045,
0.07094938308000565,
0.0053445324301719666,
-0.11742371320724487,
0.6353678107261658,
0.2944051921367645,
0.012618680484592915,
-0.11078590154647827,
-0.21145334839820862,
0.27877968549728394,
-0.1665809154510498,
-0.35170817375183105,
0.11777948588132858,
-0.15009276568889618,
0.4524969160556793,
-0.19030162692070007,
0.20605506002902985,
-0.2598244249820709,
-0.2019272893667221,
0.1805843859910965,
0.38087746500968933,
-0.1686890721321106,
0.17363032698631287,
0.46487292647361755,
0.39033252000808716,
-0.05586042255163193,
0.17103101313114166,
0.07496124505996704,
-0.1925722062587738,
-0.15373265743255615,
-0.06519343703985214,
0.3134978413581848,
0.016378162428736687,
-0.18609972298145294,
0.06276726722717285,
-0.2008979171514511,
0.09126591682434082,
-0.29298335313796997,
0.139414981007576,
-0.10494869947433472,
0.2532104253768921,
-0.016026191413402557,
-0.23153676092624664,
-0.006327267736196518,
0.2019171118736267,
0.19733470678329468,
-0.1883944272994995,
-0.2364923059940338,
0.2938821017742157,
0.0004088502610102296,
-0.39840686321258545,
-0.522148609161377,
-0.32951706647872925,
-0.0628572404384613,
-0.4356900453567505,
0.463864803314209,
-0.31556883454322815,
0.029709819704294205,
0.24797219038009644,
0.02816316857933998,
0.006149111315608025,
-0.06620337069034576,
0.08463679254055023,
-0.041000790894031525,
-0.1605428159236908,
0.28352513909339905,
-0.17686468362808228,
-0.3544844686985016,
-0.3257427215576172,
0.10640156269073486,
0.11600561439990997,
-0.038701821118593216,
-0.14935243129730225,
-0.33307960629463196,
0.024303454905748367,
0.0647609680891037,
0.0029282346367836,
0.01668519899249077,
0.4571922719478607,
-0.26972055435180664,
-0.01649072766304016,
-0.27252504229545593,
0.21221771836280823,
0.4781433641910553,
0.23290851712226868,
-0.07715455442667007,
0.007532086223363876,
-0.08795645833015442,
0.23632431030273438,
0.8373278975486755,
0.414650559425354,
0.016226623207330704,
0.11626335233449936,
0.04920046031475067,
0.2530555725097656,
0.2053135335445404,
-0.23785759508609772,
0.23165878653526306,
0.038400016725063324,
-0.20962481200695038,
0.3397589921951294,
0.09292875230312347,
0.07160863280296326,
-0.09781570732593536,
-0.3758299648761749,
0.020079515874385834,
-0.45011404156684875,
0.07141508907079697,
0.13596701622009277,
0.29021576046943665,
0.08205214142799377,
0.15253034234046936,
-0.06582784652709961,
0.11150141060352325,
0.1713983714580536,
0.33625227212905884,
0.055381596088409424,
-0.09184861928224564,
0.02254783734679222,
-0.08557525277137756,
-0.1284903883934021,
0.035434380173683167,
0.1114310771226883,
0.38846683502197266,
-0.09260578453540802,
-0.005700442939996719,
0.06905427575111389,
-0.07332047075033188,
0.5187137126922607,
0.24250665307044983,
0.3133060932159424,
-0.0725182592868805,
-0.35823163390159607,
0.021648341789841652,
-0.01565558835864067,
-0.2780194878578186,
-0.416666179895401,
0.3179636597633362,
0.49051418900489807,
-0.14787405729293823,
-0.27586808800697327,
-0.4128696918487549,
-0.09228237718343735,
-0.24892862141132355,
-0.14182761311531067,
-0.35563868284225464,
0.07218515127897263,
-0.3742581605911255,
0.2835468649864197,
0.3413563668727875,
0.25894755125045776,
-0.1655925214290619,
0.06659355759620667,
0.1010136753320694,
-0.12258702516555786,
-0.01193874329328537,
0.36804109811782837,
0.19159454107284546,
-0.38127005100250244,
0.20699651539325714,
0.42324015498161316,
0.055182456970214844,
-0.1996738612651825,
0.23640286922454834,
0.08541354537010193,
-0.0919678658246994,
0.25172215700149536,
-0.08546838164329529,
0.12773491442203522,
0.5462225675582886,
-0.2121763974428177,
-0.08146872371435165,
0.27169644832611084,
0.20310699939727783,
-0.24885600805282593,
-0.07970103621482849,
0.12946748733520508,
0.2681671380996704,
0.26796263456344604,
0.29102805256843567,
0.056196391582489014,
0.09846648573875427,
-0.183993399143219,
0.14030268788337708,
-0.2215782254934311,
-0.11662229895591736,
0.18979975581169128,
-0.171197772026062,
0.79226154088974,
0.16929686069488525,
0.12428721785545349,
0.14606082439422607,
0.10674360394477844,
0.10974621772766113,
-0.6064883470535278,
0.29189103841781616,
-0.07793723046779633,
-0.2649601697921753,
-0.02831267938017845,
-0.02948339469730854,
0.05656944215297699,
-0.21043024957180023,
0.004144787788391113,
0.2079232931137085,
0.2406349629163742,
-0.012965485453605652,
-0.24343682825565338,
0.19522768259048462,
0.03885679319500923,
-0.22637046873569489,
0.3143179714679718,
0.02394719421863556,
0.2714504897594452,
0.433695912361145,
-0.07500151544809341,
-0.3992971181869507,
-0.1263045072555542,
-0.23586146533489227,
-0.21441003680229187,
0.0254514217376709,
-0.11033766716718674,
0.08824042230844498,
0.3932216167449951,
0.18408100306987762,
0.22890633344650269,
0.37114861607551575,
0.33837682008743286,
0.15565894544124603,
-0.23156529664993286,
0.1762319654226303,
-0.28623324632644653,
0.37821581959724426,
-0.05967751890420914,
-0.08840081840753555,
0.11791414022445679,
-0.17832082509994507,
-0.35662350058555603,
-0.202804297208786,
-0.09581795334815979,
-0.033979009836912155,
0.11891409754753113,
0.11794372648000717,
-0.17823392152786255,
0.23217420279979706,
0.3084328770637512,
0.01432124525308609,
-0.29994404315948486,
-0.15666699409484863,
0.103555828332901,
0.07761364430189133,
-0.3427913188934326,
0.17439457774162292,
-0.09572368860244751,
-0.28441953659057617,
0.22251753509044647,
0.5015813708305359,
-0.11752098053693771,
-0.0775732696056366,
0.07386192679405212,
0.1801404058933258,
-0.10319054871797562,
-0.20611795783042908,
-0.3111307621002197,
-0.20843271911144257,
-0.605645477771759,
0.18165670335292816,
-0.06025161221623421,
-0.3021441698074341,
0.016405774280428886,
0.32027655839920044,
0.3288378119468689,
0.12673893570899963,
-0.07310618460178375,
-0.31677377223968506,
-0.40407848358154297,
0.09206797927618027,
-0.4520488381385803,
-0.0811762809753418,
-0.059310317039489746,
0.45788633823394775,
-0.16426703333854675,
0.3518691956996918,
-0.26611751317977905,
-0.09190776199102402,
-0.4133838415145874,
-0.017430253326892853,
0.26403382420539856,
-0.3474743068218231,
0.1843053251504898,
-0.1253085881471634,
-0.06507813930511475,
0.36015433073043823,
-0.30464309453964233,
-0.060578182339668274,
-0.3630121946334839,
0.17079441249370575,
0.04493040591478348,
0.11253342777490616,
0.07003859430551529,
-0.09745021909475327,
-0.13090376555919647,
-0.26732829213142395,
0.1417086124420166,
0.11499766260385513,
-0.07895082235336304,
0.15426547825336456,
-0.28458982706069946,
0.38686054944992065,
-0.10551390796899796,
0.07889100909233093,
0.08838827908039093,
-0.33902740478515625,
-0.2293836921453476,
-0.019472450017929077,
-0.03361549228429794,
-0.10838709771633148,
-0.40928760170936584,
0.013161823153495789,
0.19238659739494324,
0.17777109146118164,
0.3446156084537506,
0.3719736337661743,
-0.23831364512443542,
-0.2726480960845947,
0.3021422326564789,
-0.19200783967971802,
-0.050377145409584045,
-0.03016398847103119,
0.02803034707903862,
0.10283065587282181,
-0.2123607099056244,
-0.03140454366803169,
-0.05558246746659279,
0.0612918920814991,
0.13880977034568787,
0.3166537582874298,
0.47211888432502747,
-0.10295315086841583,
-0.028156742453575134,
0.1954536736011505,
0.24443523585796356,
-0.12660908699035645,
-0.05584418773651123,
0.09184493124485016,
0.21325962245464325,
0.3728077709674835,
0.309048056602478,
-0.1657077670097351,
0.21887944638729095,
0.3541126251220703,
-0.4744991660118103,
0.21857516467571259,
-0.28947755694389343,
0.1934727132320404,
0.01654639095067978,
-0.06116337329149246,
-0.14349694550037384,
-0.10553514957427979,
-0.057172149419784546,
0.15270951390266418,
-0.5392782688140869,
0.23439157009124756,
-0.38294392824172974,
-0.15573559701442719,
-0.197966068983078,
0.35624900460243225,
-0.1585698127746582,
-0.15442056953907013,
-0.3112891912460327,
-0.16528114676475525,
-0.27896392345428467,
-0.1631334125995636,
0.2511577308177948,
0.38664019107818604,
0.2265464812517166,
0.36658012866973877,
-0.04723510146141052,
-0.17875665426254272,
-0.49362772703170776,
0.2092776596546173,
0.22999733686447144,
-0.3069007396697998,
0.24135571718215942,
0.5113224983215332,
-0.12261731922626495,
0.3116088807582855,
0.34227463603019714,
0.39099040627479553,
0.01700439676642418,
-0.0488167367875576,
0.0171196311712265,
0.06669413298368454,
0.19170628488063812,
-0.13734140992164612,
0.23277677595615387,
-0.16971424221992493,
-0.10073384642601013,
-0.004182280972599983,
-0.022867539897561073,
-0.2050240933895111,
0.13774386048316956,
-0.15160542726516724,
0.12745460867881775,
-0.2960871160030365,
0.6735236048698425,
-0.08811739832162857,
0.018308565020561218,
-0.16118203103542328,
-0.10930731147527695,
-0.4887101650238037,
0.2702738344669342,
0.1911807507276535,
0.20017492771148682,
0.30115821957588196,
-0.21184536814689636,
0.03187807276844978,
0.0614364892244339,
0.3160473108291626,
0.16763029992580414,
-0.24471870064735413,
-0.354339599609375,
0.04476974904537201,
-0.6734270453453064,
0.4350377321243286,
0.1517411172389984,
0.10922902822494507,
-0.03847714513540268,
0.03493170440196991,
-0.11195670813322067,
0.07929633557796478,
0.17305098474025726,
-0.1939648538827896,
0.035636577755212784,
0.26346060633659363,
-0.36603134870529175,
0.27558350563049316,
-0.2461363822221756,
-0.23811811208724976,
0.2487059235572815,
-0.11308664083480835,
0.0006521232426166534,
0.0036281272768974304,
0.029976651072502136,
-0.0061790719628334045,
-0.01004139706492424,
-0.21091550588607788,
0.29738765954971313,
0.028424903750419617,
0.044204674661159515,
0.17182309925556183,
0.01574263721704483,
-0.15980330109596252,
-0.2036956250667572,
0.17690984904766083,
0.009497200138866901,
-0.35314875841140747,
-0.008286409080028534,
0.4376751184463501,
-0.32120615243911743,
-0.06548286974430084,
-0.3393903076648712,
0.07986273616552353,
0.008869443088769913,
-0.17908765375614166,
-0.3372270464897156,
0.23770064115524292,
-0.3895711302757263,
0.24976658821105957,
0.3788767457008362,
0.5589139461517334,
-0.04165166616439819,
0.02822951041162014,
-0.5358927845954895,
-0.22398275136947632,
0.429124116897583,
-0.6881700754165649,
-0.13198384642601013,
-0.33538544178009033,
0.39702141284942627,
0.08930892497301102,
0.0715339183807373,
-0.5503525733947754,
-0.03614452853798866,
-0.01795632764697075,
0.11851033568382263,
-0.24627187848091125,
-0.04956464841961861,
-0.15310798585414886,
-0.3234373927116394,
0.08975876867771149,
-0.017823360860347748,
0.1394115835428238,
-0.37214821577072144,
0.27140265703201294,
-0.0634138286113739
] |
https://github.com/huggingface/datasets/issues/4420 | Metric evaluation problems in multi-node, shared file system | > * We had to change slightly the `_check_all_processes_locks` method so that the main process (i.e. process 0) didn't check it's own lock (because `lockf` permits recursive locks and thus checking it only replaced the current lock with a new one).
Hi @panserbjorn , Can you share your `_check_all_processes_locks` function? thanks! | ## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
| 51 | Metric evaluation problems in multi-node, shared file system
## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
> * We had to change slightly the `_check_all_processes_locks` method so that the main process (i.e. process 0) didn't check it's own lock (because `lockf` permits recursive locks and thus checking it only replaced the current lock with a new one).
Hi @panserbjorn , Can you share your `_check_all_processes_locks` function? thanks! | [
-0.1226465255022049,
-0.29547232389450073,
0.07963378727436066,
0.36486637592315674,
0.062170859426259995,
-0.3332039713859558,
0.3804205656051636,
0.10030752420425415,
0.1567913144826889,
0.28335070610046387,
-0.17039130628108978,
0.10685503482818604,
-0.18573790788650513,
-0.358416885137558,
-0.3080679774284363,
-0.1064901202917099,
0.03433121740818024,
-0.2464396059513092,
-0.27878835797309875,
-0.13324296474456787,
-0.07453227043151855,
0.39288538694381714,
-0.09850480407476425,
-0.1667705625295639,
-0.5835465788841248,
-0.14868389070034027,
-0.1840139776468277,
0.2807324528694153,
0.08021943271160126,
-0.2285727709531784,
0.030915407463908195,
0.2531624734401703,
-0.05648243799805641,
0.6916359066963196,
-0.00011334523878758773,
0.015102162957191467,
0.20982606709003448,
0.11131420731544495,
-0.027201887220144272,
0.010143876075744629,
0.2791859209537506,
-0.22019855678081512,
-0.04965561628341675,
-0.223126620054245,
0.114160917699337,
-0.020802658051252365,
0.033914484083652496,
-0.28398698568344116,
0.45585018396377563,
-0.04291117563843727,
0.05991266295313835,
0.835524320602417,
-0.1456398069858551,
-0.23779550194740295,
-0.44132480025291443,
-0.09305855631828308,
0.015589063987135887,
0.6000438928604126,
0.4134036600589752,
-0.17180611193180084,
-0.5711012482643127,
0.3044431209564209,
0.19795534014701843,
-0.11619523167610168,
0.3093448877334595,
0.14413270354270935,
0.160135418176651,
0.07866046577692032,
-0.355080783367157,
0.12263303250074387,
-0.3049754500389099,
0.024682406336069107,
-0.21766838431358337,
-0.27577224373817444,
-0.19729755818843842,
-0.27293363213539124,
0.3068850636482239,
-0.20456497371196747,
-0.1598876714706421,
0.05007230490446091,
-0.43397438526153564,
0.11648011207580566,
-0.1950545310974121,
0.014863379299640656,
-0.10825683921575546,
0.15458592772483826,
-0.02490409091114998,
-0.010247334837913513,
0.17278216779232025,
0.22525912523269653,
-0.3425598740577698,
-0.01629308983683586,
-0.0016896091401576996,
0.03127197176218033,
-0.6960668563842773,
-0.15327051281929016,
0.19864392280578613,
-0.2164013683795929,
-0.08415809273719788,
0.08636628091335297,
0.01858370564877987,
-0.07447761297225952,
0.0774577409029007,
0.2815343737602234,
0.06028095260262489,
0.5285845994949341,
-0.44969189167022705,
0.4792744815349579,
0.3597560524940491,
0.03379306569695473,
-0.17972563207149506,
-0.07193125784397125,
-0.08220511674880981,
-0.4150053560733795,
0.01172555610537529,
0.3745640218257904,
-0.059862472116947174,
-0.020323950797319412,
0.06907092779874802,
0.1544884294271469,
0.13032245635986328,
0.05577220022678375,
0.42046698927879333,
0.34813427925109863,
0.21095284819602966,
0.3364879786968231,
0.196696475148201,
0.19494780898094177,
-0.23199811577796936,
-0.044107936322689056,
-0.256224125623703,
-0.08411037921905518,
-0.3242303729057312,
0.041089579463005066,
0.23096449673175812,
0.01657487452030182,
0.21161876618862152,
-0.05971935763955116,
0.6232886910438538,
-0.33594438433647156,
-0.13358831405639648,
-0.08222651481628418,
-0.06256017833948135,
0.11407553404569626,
-0.015215897932648659,
-0.08760657906532288,
0.15232455730438232,
0.2480224221944809,
0.09249775856733322,
-0.36197713017463684,
-0.22690662741661072,
-0.23025232553482056,
0.20299294590950012,
0.029884707182645798,
-0.2474093735218048,
0.44512057304382324,
0.18141469359397888,
0.12668858468532562,
0.1485063135623932,
-0.026334762573242188,
0.07744735479354858,
-0.1655108630657196,
-0.48621657490730286,
-0.010952292010188103,
0.20193898677825928,
0.4323155879974365,
0.6334858536720276,
-0.07869616895914078,
0.11625200510025024,
0.05629682540893555,
-0.03406409174203873,
0.7166301012039185,
-0.008150414563715458,
0.25285279750823975,
-0.1942288875579834,
0.32558488845825195,
0.10816164314746857,
-0.7999746799468994,
-0.3105439245700836,
0.223687544465065,
-0.4377644658088684,
0.1720459908246994,
0.2563614845275879,
0.013428940437734127,
0.24495555460453033,
-0.1248922049999237,
0.027626313269138336,
0.2301892340183258,
0.064564049243927,
-0.0624079704284668,
-0.5194101333618164,
0.11149927973747253,
0.012047426775097847,
-0.047355249524116516,
0.2685912847518921,
0.045096833258867264,
0.20512938499450684,
0.33239129185676575,
0.13736362755298615,
-0.0032366998493671417,
0.03264372795820236,
0.20777179300785065,
-0.004549290984869003,
-0.19889123737812042,
0.17546342313289642,
-0.10968618094921112,
-0.10247587412595749,
0.5124408006668091,
-0.5817217826843262,
0.04135716333985329,
0.21233177185058594,
-0.06913363933563232,
0.0037334635853767395,
-0.020825359970331192,
-0.005137082189321518,
-0.11497707664966583,
0.08822433650493622,
0.1054539680480957,
-0.22015252709388733,
-0.12726789712905884,
0.07331573963165283,
0.2836350202560425,
-0.0716329887509346,
-0.07619428634643555,
0.011021731421351433,
0.15302111208438873,
-0.10725932568311691,
-0.1084766685962677,
-0.010346729308366776,
0.2614203989505768,
0.14595697820186615,
-0.22731615602970123,
-0.23874151706695557,
0.4972596764564514,
-0.07233927398920059,
0.4353688955307007,
-0.06178247928619385,
0.08152676373720169,
0.2623959183692932,
-0.15576960146427155,
-0.09450837224721909,
0.19318445026874542,
0.05529632791876793,
-0.054188452661037445,
-0.1847611665725708,
0.41593462228775024,
-0.0472797267138958,
-0.04881524294614792,
-0.058452628552913666,
-0.051324263215065,
-0.09040872007608414,
-0.10653386265039444,
0.04834676533937454,
0.07061642408370972,
0.3840908706188202,
0.14837084710597992,
0.012667495757341385,
0.055778618901968,
0.03851685672998428,
-0.31274887919425964,
0.4695686995983124,
0.04389215633273125,
0.10052722692489624,
-0.15546777844429016,
0.18580272793769836,
-0.0014796052128076553,
-0.10856632888317108,
-0.14094780385494232,
0.5798085331916809,
0.059148579835891724,
0.20253436267375946,
0.2487802505493164,
0.010992924682796001,
-0.21207283437252045,
0.07094938308000565,
0.0053445324301719666,
-0.11742371320724487,
0.6353678107261658,
0.2944051921367645,
0.012618680484592915,
-0.11078590154647827,
-0.21145334839820862,
0.27877968549728394,
-0.1665809154510498,
-0.35170817375183105,
0.11777948588132858,
-0.15009276568889618,
0.4524969160556793,
-0.19030162692070007,
0.20605506002902985,
-0.2598244249820709,
-0.2019272893667221,
0.1805843859910965,
0.38087746500968933,
-0.1686890721321106,
0.17363032698631287,
0.46487292647361755,
0.39033252000808716,
-0.05586042255163193,
0.17103101313114166,
0.07496124505996704,
-0.1925722062587738,
-0.15373265743255615,
-0.06519343703985214,
0.3134978413581848,
0.016378162428736687,
-0.18609972298145294,
0.06276726722717285,
-0.2008979171514511,
0.09126591682434082,
-0.29298335313796997,
0.139414981007576,
-0.10494869947433472,
0.2532104253768921,
-0.016026191413402557,
-0.23153676092624664,
-0.006327267736196518,
0.2019171118736267,
0.19733470678329468,
-0.1883944272994995,
-0.2364923059940338,
0.2938821017742157,
0.0004088502610102296,
-0.39840686321258545,
-0.522148609161377,
-0.32951706647872925,
-0.0628572404384613,
-0.4356900453567505,
0.463864803314209,
-0.31556883454322815,
0.029709819704294205,
0.24797219038009644,
0.02816316857933998,
0.006149111315608025,
-0.06620337069034576,
0.08463679254055023,
-0.041000790894031525,
-0.1605428159236908,
0.28352513909339905,
-0.17686468362808228,
-0.3544844686985016,
-0.3257427215576172,
0.10640156269073486,
0.11600561439990997,
-0.038701821118593216,
-0.14935243129730225,
-0.33307960629463196,
0.024303454905748367,
0.0647609680891037,
0.0029282346367836,
0.01668519899249077,
0.4571922719478607,
-0.26972055435180664,
-0.01649072766304016,
-0.27252504229545593,
0.21221771836280823,
0.4781433641910553,
0.23290851712226868,
-0.07715455442667007,
0.007532086223363876,
-0.08795645833015442,
0.23632431030273438,
0.8373278975486755,
0.414650559425354,
0.016226623207330704,
0.11626335233449936,
0.04920046031475067,
0.2530555725097656,
0.2053135335445404,
-0.23785759508609772,
0.23165878653526306,
0.038400016725063324,
-0.20962481200695038,
0.3397589921951294,
0.09292875230312347,
0.07160863280296326,
-0.09781570732593536,
-0.3758299648761749,
0.020079515874385834,
-0.45011404156684875,
0.07141508907079697,
0.13596701622009277,
0.29021576046943665,
0.08205214142799377,
0.15253034234046936,
-0.06582784652709961,
0.11150141060352325,
0.1713983714580536,
0.33625227212905884,
0.055381596088409424,
-0.09184861928224564,
0.02254783734679222,
-0.08557525277137756,
-0.1284903883934021,
0.035434380173683167,
0.1114310771226883,
0.38846683502197266,
-0.09260578453540802,
-0.005700442939996719,
0.06905427575111389,
-0.07332047075033188,
0.5187137126922607,
0.24250665307044983,
0.3133060932159424,
-0.0725182592868805,
-0.35823163390159607,
0.021648341789841652,
-0.01565558835864067,
-0.2780194878578186,
-0.416666179895401,
0.3179636597633362,
0.49051418900489807,
-0.14787405729293823,
-0.27586808800697327,
-0.4128696918487549,
-0.09228237718343735,
-0.24892862141132355,
-0.14182761311531067,
-0.35563868284225464,
0.07218515127897263,
-0.3742581605911255,
0.2835468649864197,
0.3413563668727875,
0.25894755125045776,
-0.1655925214290619,
0.06659355759620667,
0.1010136753320694,
-0.12258702516555786,
-0.01193874329328537,
0.36804109811782837,
0.19159454107284546,
-0.38127005100250244,
0.20699651539325714,
0.42324015498161316,
0.055182456970214844,
-0.1996738612651825,
0.23640286922454834,
0.08541354537010193,
-0.0919678658246994,
0.25172215700149536,
-0.08546838164329529,
0.12773491442203522,
0.5462225675582886,
-0.2121763974428177,
-0.08146872371435165,
0.27169644832611084,
0.20310699939727783,
-0.24885600805282593,
-0.07970103621482849,
0.12946748733520508,
0.2681671380996704,
0.26796263456344604,
0.29102805256843567,
0.056196391582489014,
0.09846648573875427,
-0.183993399143219,
0.14030268788337708,
-0.2215782254934311,
-0.11662229895591736,
0.18979975581169128,
-0.171197772026062,
0.79226154088974,
0.16929686069488525,
0.12428721785545349,
0.14606082439422607,
0.10674360394477844,
0.10974621772766113,
-0.6064883470535278,
0.29189103841781616,
-0.07793723046779633,
-0.2649601697921753,
-0.02831267938017845,
-0.02948339469730854,
0.05656944215297699,
-0.21043024957180023,
0.004144787788391113,
0.2079232931137085,
0.2406349629163742,
-0.012965485453605652,
-0.24343682825565338,
0.19522768259048462,
0.03885679319500923,
-0.22637046873569489,
0.3143179714679718,
0.02394719421863556,
0.2714504897594452,
0.433695912361145,
-0.07500151544809341,
-0.3992971181869507,
-0.1263045072555542,
-0.23586146533489227,
-0.21441003680229187,
0.0254514217376709,
-0.11033766716718674,
0.08824042230844498,
0.3932216167449951,
0.18408100306987762,
0.22890633344650269,
0.37114861607551575,
0.33837682008743286,
0.15565894544124603,
-0.23156529664993286,
0.1762319654226303,
-0.28623324632644653,
0.37821581959724426,
-0.05967751890420914,
-0.08840081840753555,
0.11791414022445679,
-0.17832082509994507,
-0.35662350058555603,
-0.202804297208786,
-0.09581795334815979,
-0.033979009836912155,
0.11891409754753113,
0.11794372648000717,
-0.17823392152786255,
0.23217420279979706,
0.3084328770637512,
0.01432124525308609,
-0.29994404315948486,
-0.15666699409484863,
0.103555828332901,
0.07761364430189133,
-0.3427913188934326,
0.17439457774162292,
-0.09572368860244751,
-0.28441953659057617,
0.22251753509044647,
0.5015813708305359,
-0.11752098053693771,
-0.0775732696056366,
0.07386192679405212,
0.1801404058933258,
-0.10319054871797562,
-0.20611795783042908,
-0.3111307621002197,
-0.20843271911144257,
-0.605645477771759,
0.18165670335292816,
-0.06025161221623421,
-0.3021441698074341,
0.016405774280428886,
0.32027655839920044,
0.3288378119468689,
0.12673893570899963,
-0.07310618460178375,
-0.31677377223968506,
-0.40407848358154297,
0.09206797927618027,
-0.4520488381385803,
-0.0811762809753418,
-0.059310317039489746,
0.45788633823394775,
-0.16426703333854675,
0.3518691956996918,
-0.26611751317977905,
-0.09190776199102402,
-0.4133838415145874,
-0.017430253326892853,
0.26403382420539856,
-0.3474743068218231,
0.1843053251504898,
-0.1253085881471634,
-0.06507813930511475,
0.36015433073043823,
-0.30464309453964233,
-0.060578182339668274,
-0.3630121946334839,
0.17079441249370575,
0.04493040591478348,
0.11253342777490616,
0.07003859430551529,
-0.09745021909475327,
-0.13090376555919647,
-0.26732829213142395,
0.1417086124420166,
0.11499766260385513,
-0.07895082235336304,
0.15426547825336456,
-0.28458982706069946,
0.38686054944992065,
-0.10551390796899796,
0.07889100909233093,
0.08838827908039093,
-0.33902740478515625,
-0.2293836921453476,
-0.019472450017929077,
-0.03361549228429794,
-0.10838709771633148,
-0.40928760170936584,
0.013161823153495789,
0.19238659739494324,
0.17777109146118164,
0.3446156084537506,
0.3719736337661743,
-0.23831364512443542,
-0.2726480960845947,
0.3021422326564789,
-0.19200783967971802,
-0.050377145409584045,
-0.03016398847103119,
0.02803034707903862,
0.10283065587282181,
-0.2123607099056244,
-0.03140454366803169,
-0.05558246746659279,
0.0612918920814991,
0.13880977034568787,
0.3166537582874298,
0.47211888432502747,
-0.10295315086841583,
-0.028156742453575134,
0.1954536736011505,
0.24443523585796356,
-0.12660908699035645,
-0.05584418773651123,
0.09184493124485016,
0.21325962245464325,
0.3728077709674835,
0.309048056602478,
-0.1657077670097351,
0.21887944638729095,
0.3541126251220703,
-0.4744991660118103,
0.21857516467571259,
-0.28947755694389343,
0.1934727132320404,
0.01654639095067978,
-0.06116337329149246,
-0.14349694550037384,
-0.10553514957427979,
-0.057172149419784546,
0.15270951390266418,
-0.5392782688140869,
0.23439157009124756,
-0.38294392824172974,
-0.15573559701442719,
-0.197966068983078,
0.35624900460243225,
-0.1585698127746582,
-0.15442056953907013,
-0.3112891912460327,
-0.16528114676475525,
-0.27896392345428467,
-0.1631334125995636,
0.2511577308177948,
0.38664019107818604,
0.2265464812517166,
0.36658012866973877,
-0.04723510146141052,
-0.17875665426254272,
-0.49362772703170776,
0.2092776596546173,
0.22999733686447144,
-0.3069007396697998,
0.24135571718215942,
0.5113224983215332,
-0.12261731922626495,
0.3116088807582855,
0.34227463603019714,
0.39099040627479553,
0.01700439676642418,
-0.0488167367875576,
0.0171196311712265,
0.06669413298368454,
0.19170628488063812,
-0.13734140992164612,
0.23277677595615387,
-0.16971424221992493,
-0.10073384642601013,
-0.004182280972599983,
-0.022867539897561073,
-0.2050240933895111,
0.13774386048316956,
-0.15160542726516724,
0.12745460867881775,
-0.2960871160030365,
0.6735236048698425,
-0.08811739832162857,
0.018308565020561218,
-0.16118203103542328,
-0.10930731147527695,
-0.4887101650238037,
0.2702738344669342,
0.1911807507276535,
0.20017492771148682,
0.30115821957588196,
-0.21184536814689636,
0.03187807276844978,
0.0614364892244339,
0.3160473108291626,
0.16763029992580414,
-0.24471870064735413,
-0.354339599609375,
0.04476974904537201,
-0.6734270453453064,
0.4350377321243286,
0.1517411172389984,
0.10922902822494507,
-0.03847714513540268,
0.03493170440196991,
-0.11195670813322067,
0.07929633557796478,
0.17305098474025726,
-0.1939648538827896,
0.035636577755212784,
0.26346060633659363,
-0.36603134870529175,
0.27558350563049316,
-0.2461363822221756,
-0.23811811208724976,
0.2487059235572815,
-0.11308664083480835,
0.0006521232426166534,
0.0036281272768974304,
0.029976651072502136,
-0.0061790719628334045,
-0.01004139706492424,
-0.21091550588607788,
0.29738765954971313,
0.028424903750419617,
0.044204674661159515,
0.17182309925556183,
0.01574263721704483,
-0.15980330109596252,
-0.2036956250667572,
0.17690984904766083,
0.009497200138866901,
-0.35314875841140747,
-0.008286409080028534,
0.4376751184463501,
-0.32120615243911743,
-0.06548286974430084,
-0.3393903076648712,
0.07986273616552353,
0.008869443088769913,
-0.17908765375614166,
-0.3372270464897156,
0.23770064115524292,
-0.3895711302757263,
0.24976658821105957,
0.3788767457008362,
0.5589139461517334,
-0.04165166616439819,
0.02822951041162014,
-0.5358927845954895,
-0.22398275136947632,
0.429124116897583,
-0.6881700754165649,
-0.13198384642601013,
-0.33538544178009033,
0.39702141284942627,
0.08930892497301102,
0.0715339183807373,
-0.5503525733947754,
-0.03614452853798866,
-0.01795632764697075,
0.11851033568382263,
-0.24627187848091125,
-0.04956464841961861,
-0.15310798585414886,
-0.3234373927116394,
0.08975876867771149,
-0.017823360860347748,
0.1394115835428238,
-0.37214821577072144,
0.27140265703201294,
-0.0634138286113739
] |
https://github.com/huggingface/datasets/issues/4420 | Metric evaluation problems in multi-node, shared file system | ```
def _check_all_processes_locks(self):
expected_lock_file_names = [
os.path.join(self.data_dir, f"{self.experiment_id}-{self.num_process}-{process_id}.arrow.lock")
for process_id in range(self.num_process)
]
#for expected_lock_file_name in expected_lock_file_names: # OUR CHANGE process 0 shouldn't check its own lock
for expected_lock_file_name in expected_lock_file_names[1:]:
nofilelock = FileFreeLock(expected_lock_file_name)
try:
nofilelock.acquire(timeout=self.timeout)
except Timeout:
raise ValueError(
f"Expected to find locked file {expected_lock_file_name} from process {self.process_id} but it doesn't exist."
)
else:
nofilelock.release()
```
### Changed files:
- metric.py file in the datasets library
- filelock.py file in the datasets/utils library.
Changes we made:
1. We changed the flock for lockf
flock and lockf both perform a lock over a file (like the lock for writing).
The difference is that flock only works in local file systems, but if you have a shared file system (like what we have in the clusters) the flock fails to “see” the lock of another node. The only disadvantage we had was that a single process couldn’t detect it’s own lock so we did the second change.
2. We prevented the process 0 (which is the one that coordinates the rendezvous) from checking its own lock on its arrow because it didn't work with lockf (as stated in the previous change).
3. We made a second rendezvous so that all the process had the results of the metrics (other than the loss) and not only the process 0.
What happened was that only process 0 computed the metric and that didn’t present any problem if you are using the loss. However, if you are using another metric, the only process which had the information to choose the best checkpoint at evaluation time was the process 0. But since the evaluation was performed over all processes, every process except the process 0 chose a bad check point (bad meaning it wasn’t the best one) because they didn’t have the information of the metric of the best checkpoint.
The consequence was that the evaluation was different from what would result if using only the best checkpoint, because each process chose a different checkpoint to run the evaluation and thus the numbers were often worse than the numbers that would be obtained if all processes choose the best checkpoint (correct one) to perform the evaluation of their samples.
We performed a second rendezvous so that all processes had the same best_metric and best_model as process 0 after the evaluation cycle.
| ## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
| 386 | Metric evaluation problems in multi-node, shared file system
## Describe the bug
Metric evaluation fails in multi-node within a shared file system, because the master process cannot find the lock files from other nodes. (This issue was originally mentioned in the transformers repo https://github.com/huggingface/transformers/issues/17412)
## Steps to reproduce the bug
1. clone [this huggingface model](https://huggingface.co/PereLluis13/wav2vec2-xls-r-300m-ca-lm) and replace the `run_speech_recognition_ctc.py` script with the version in the gist [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71#file-run_speech_recognition_ctc-py).
2. Setup the `venv` according to the requirements of the model file plus `datasets==2.0.0`, `transformers==4.18.0` and `torch==1.9.0`
3. Launch the runner in a distributed environment which has a shared file system for two nodes, preferably with SLURM. Example [here](https://gist.github.com/gullabi/3f66094caa8db1c1e615dd35bd67ec71)
Specifically for the datasets, for the distributed setup the `load_metric` is called as:
```
process_id=int(os.environ["RANK"])
num_process=int(os.environ["WORLD_SIZE"])
eval_metrics = {metric: load_metric(metric,
process_id=process_id,
num_process=num_process,
experiment_id="slurm")
for metric in data_args.eval_metrics}
```
## Expected results
The training should not fail, due to the failure of the `Metric.compute()` step.
## Actual results
For the test I am executing the world size is 4, with 2 GPUs in 2 nodes. However the process is not finding the necessary lock files
```
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 841, in <module>
main()
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 792, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1497, in train
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 1624, in _maybe_log_save_evaluate
metrics = self.evaluate(ignore_keys=ignore_keys_for_eval)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2291, in evaluate
metric_key_prefix=metric_key_prefix,
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/transformers/trainer.py", line 2535, in evaluation_loop
metrics = self.compute_metrics(EvalPrediction(predictions=all_preds, label_ids=all_labels))
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in compute_metrics
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/speech/asr/wav2vec2-xls-r-300m-ca-lm/run_speech_recognition_ctc.py", line 742, in <dictcomp>
metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 419, in compute
self.add_batch(**inputs)
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 465, in add_batch
self._init_writer()
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 552, in _init_writer
self._check_rendez_vous() # wait for master to be ready and to let everyone go
File "/gpfs/projects/bsc88/projects/speech-tech-resources/venv_amd_speech/lib/python3.7/site-packages/datasets/metric.py", line 342, in _check_rendez_vous
) from None
ValueError: Expected to find locked file /home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock from process 3 but it doesn't exist.
```
When I look at the cache directory, I can see all the lock files in principle:
```
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-0.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-1.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-2.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-3.arrow.lock
/home/bsc88/bsc88474/.cache/huggingface/metrics/wer/default/slurm-4-rdv.lock
```
I see that there was another related issue here https://github.com/huggingface/datasets/issues/1942, but it seems to have resolved via https://github.com/huggingface/datasets/pull/1966. Let me know if there is problem with how I am calling the `load_metric` or whether I need to make changes to the `.compute()` steps.
## Environment info
- `datasets` version: 2.0.0
- Platform: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core
- Python version: 3.7.4
- PyArrow version: 7.0.0
- Pandas version: 1.3.0
```
def _check_all_processes_locks(self):
expected_lock_file_names = [
os.path.join(self.data_dir, f"{self.experiment_id}-{self.num_process}-{process_id}.arrow.lock")
for process_id in range(self.num_process)
]
#for expected_lock_file_name in expected_lock_file_names: # OUR CHANGE process 0 shouldn't check its own lock
for expected_lock_file_name in expected_lock_file_names[1:]:
nofilelock = FileFreeLock(expected_lock_file_name)
try:
nofilelock.acquire(timeout=self.timeout)
except Timeout:
raise ValueError(
f"Expected to find locked file {expected_lock_file_name} from process {self.process_id} but it doesn't exist."
)
else:
nofilelock.release()
```
### Changed files:
- metric.py file in the datasets library
- filelock.py file in the datasets/utils library.
Changes we made:
1. We changed the flock for lockf
flock and lockf both perform a lock over a file (like the lock for writing).
The difference is that flock only works in local file systems, but if you have a shared file system (like what we have in the clusters) the flock fails to “see” the lock of another node. The only disadvantage we had was that a single process couldn’t detect it’s own lock so we did the second change.
2. We prevented the process 0 (which is the one that coordinates the rendezvous) from checking its own lock on its arrow because it didn't work with lockf (as stated in the previous change).
3. We made a second rendezvous so that all the process had the results of the metrics (other than the loss) and not only the process 0.
What happened was that only process 0 computed the metric and that didn’t present any problem if you are using the loss. However, if you are using another metric, the only process which had the information to choose the best checkpoint at evaluation time was the process 0. But since the evaluation was performed over all processes, every process except the process 0 chose a bad check point (bad meaning it wasn’t the best one) because they didn’t have the information of the metric of the best checkpoint.
The consequence was that the evaluation was different from what would result if using only the best checkpoint, because each process chose a different checkpoint to run the evaluation and thus the numbers were often worse than the numbers that would be obtained if all processes choose the best checkpoint (correct one) to perform the evaluation of their samples.
We performed a second rendezvous so that all processes had the same best_metric and best_model as process 0 after the evaluation cycle.
| [
-0.1226465255022049,
-0.29547232389450073,
0.07963378727436066,
0.36486637592315674,
0.062170859426259995,
-0.3332039713859558,
0.3804205656051636,
0.10030752420425415,
0.1567913144826889,
0.28335070610046387,
-0.17039130628108978,
0.10685503482818604,
-0.18573790788650513,
-0.358416885137558,
-0.3080679774284363,
-0.1064901202917099,
0.03433121740818024,
-0.2464396059513092,
-0.27878835797309875,
-0.13324296474456787,
-0.07453227043151855,
0.39288538694381714,
-0.09850480407476425,
-0.1667705625295639,
-0.5835465788841248,
-0.14868389070034027,
-0.1840139776468277,
0.2807324528694153,
0.08021943271160126,
-0.2285727709531784,
0.030915407463908195,
0.2531624734401703,
-0.05648243799805641,
0.6916359066963196,
-0.00011334523878758773,
0.015102162957191467,
0.20982606709003448,
0.11131420731544495,
-0.027201887220144272,
0.010143876075744629,
0.2791859209537506,
-0.22019855678081512,
-0.04965561628341675,
-0.223126620054245,
0.114160917699337,
-0.020802658051252365,
0.033914484083652496,
-0.28398698568344116,
0.45585018396377563,
-0.04291117563843727,
0.05991266295313835,
0.835524320602417,
-0.1456398069858551,
-0.23779550194740295,
-0.44132480025291443,
-0.09305855631828308,
0.015589063987135887,
0.6000438928604126,
0.4134036600589752,
-0.17180611193180084,
-0.5711012482643127,
0.3044431209564209,
0.19795534014701843,
-0.11619523167610168,
0.3093448877334595,
0.14413270354270935,
0.160135418176651,
0.07866046577692032,
-0.355080783367157,
0.12263303250074387,
-0.3049754500389099,
0.024682406336069107,
-0.21766838431358337,
-0.27577224373817444,
-0.19729755818843842,
-0.27293363213539124,
0.3068850636482239,
-0.20456497371196747,
-0.1598876714706421,
0.05007230490446091,
-0.43397438526153564,
0.11648011207580566,
-0.1950545310974121,
0.014863379299640656,
-0.10825683921575546,
0.15458592772483826,
-0.02490409091114998,
-0.010247334837913513,
0.17278216779232025,
0.22525912523269653,
-0.3425598740577698,
-0.01629308983683586,
-0.0016896091401576996,
0.03127197176218033,
-0.6960668563842773,
-0.15327051281929016,
0.19864392280578613,
-0.2164013683795929,
-0.08415809273719788,
0.08636628091335297,
0.01858370564877987,
-0.07447761297225952,
0.0774577409029007,
0.2815343737602234,
0.06028095260262489,
0.5285845994949341,
-0.44969189167022705,
0.4792744815349579,
0.3597560524940491,
0.03379306569695473,
-0.17972563207149506,
-0.07193125784397125,
-0.08220511674880981,
-0.4150053560733795,
0.01172555610537529,
0.3745640218257904,
-0.059862472116947174,
-0.020323950797319412,
0.06907092779874802,
0.1544884294271469,
0.13032245635986328,
0.05577220022678375,
0.42046698927879333,
0.34813427925109863,
0.21095284819602966,
0.3364879786968231,
0.196696475148201,
0.19494780898094177,
-0.23199811577796936,
-0.044107936322689056,
-0.256224125623703,
-0.08411037921905518,
-0.3242303729057312,
0.041089579463005066,
0.23096449673175812,
0.01657487452030182,
0.21161876618862152,
-0.05971935763955116,
0.6232886910438538,
-0.33594438433647156,
-0.13358831405639648,
-0.08222651481628418,
-0.06256017833948135,
0.11407553404569626,
-0.015215897932648659,
-0.08760657906532288,
0.15232455730438232,
0.2480224221944809,
0.09249775856733322,
-0.36197713017463684,
-0.22690662741661072,
-0.23025232553482056,
0.20299294590950012,
0.029884707182645798,
-0.2474093735218048,
0.44512057304382324,
0.18141469359397888,
0.12668858468532562,
0.1485063135623932,
-0.026334762573242188,
0.07744735479354858,
-0.1655108630657196,
-0.48621657490730286,
-0.010952292010188103,
0.20193898677825928,
0.4323155879974365,
0.6334858536720276,
-0.07869616895914078,
0.11625200510025024,
0.05629682540893555,
-0.03406409174203873,
0.7166301012039185,
-0.008150414563715458,
0.25285279750823975,
-0.1942288875579834,
0.32558488845825195,
0.10816164314746857,
-0.7999746799468994,
-0.3105439245700836,
0.223687544465065,
-0.4377644658088684,
0.1720459908246994,
0.2563614845275879,
0.013428940437734127,
0.24495555460453033,
-0.1248922049999237,
0.027626313269138336,
0.2301892340183258,
0.064564049243927,
-0.0624079704284668,
-0.5194101333618164,
0.11149927973747253,
0.012047426775097847,
-0.047355249524116516,
0.2685912847518921,
0.045096833258867264,
0.20512938499450684,
0.33239129185676575,
0.13736362755298615,
-0.0032366998493671417,
0.03264372795820236,
0.20777179300785065,
-0.004549290984869003,
-0.19889123737812042,
0.17546342313289642,
-0.10968618094921112,
-0.10247587412595749,
0.5124408006668091,
-0.5817217826843262,
0.04135716333985329,
0.21233177185058594,
-0.06913363933563232,
0.0037334635853767395,
-0.020825359970331192,
-0.005137082189321518,
-0.11497707664966583,
0.08822433650493622,
0.1054539680480957,
-0.22015252709388733,
-0.12726789712905884,
0.07331573963165283,
0.2836350202560425,
-0.0716329887509346,
-0.07619428634643555,
0.011021731421351433,
0.15302111208438873,
-0.10725932568311691,
-0.1084766685962677,
-0.010346729308366776,
0.2614203989505768,
0.14595697820186615,
-0.22731615602970123,
-0.23874151706695557,
0.4972596764564514,
-0.07233927398920059,
0.4353688955307007,
-0.06178247928619385,
0.08152676373720169,
0.2623959183692932,
-0.15576960146427155,
-0.09450837224721909,
0.19318445026874542,
0.05529632791876793,
-0.054188452661037445,
-0.1847611665725708,
0.41593462228775024,
-0.0472797267138958,
-0.04881524294614792,
-0.058452628552913666,
-0.051324263215065,
-0.09040872007608414,
-0.10653386265039444,
0.04834676533937454,
0.07061642408370972,
0.3840908706188202,
0.14837084710597992,
0.012667495757341385,
0.055778618901968,
0.03851685672998428,
-0.31274887919425964,
0.4695686995983124,
0.04389215633273125,
0.10052722692489624,
-0.15546777844429016,
0.18580272793769836,
-0.0014796052128076553,
-0.10856632888317108,
-0.14094780385494232,
0.5798085331916809,
0.059148579835891724,
0.20253436267375946,
0.2487802505493164,
0.010992924682796001,
-0.21207283437252045,
0.07094938308000565,
0.0053445324301719666,
-0.11742371320724487,
0.6353678107261658,
0.2944051921367645,
0.012618680484592915,
-0.11078590154647827,
-0.21145334839820862,
0.27877968549728394,
-0.1665809154510498,
-0.35170817375183105,
0.11777948588132858,
-0.15009276568889618,
0.4524969160556793,
-0.19030162692070007,
0.20605506002902985,
-0.2598244249820709,
-0.2019272893667221,
0.1805843859910965,
0.38087746500968933,
-0.1686890721321106,
0.17363032698631287,
0.46487292647361755,
0.39033252000808716,
-0.05586042255163193,
0.17103101313114166,
0.07496124505996704,
-0.1925722062587738,
-0.15373265743255615,
-0.06519343703985214,
0.3134978413581848,
0.016378162428736687,
-0.18609972298145294,
0.06276726722717285,
-0.2008979171514511,
0.09126591682434082,
-0.29298335313796997,
0.139414981007576,
-0.10494869947433472,
0.2532104253768921,
-0.016026191413402557,
-0.23153676092624664,
-0.006327267736196518,
0.2019171118736267,
0.19733470678329468,
-0.1883944272994995,
-0.2364923059940338,
0.2938821017742157,
0.0004088502610102296,
-0.39840686321258545,
-0.522148609161377,
-0.32951706647872925,
-0.0628572404384613,
-0.4356900453567505,
0.463864803314209,
-0.31556883454322815,
0.029709819704294205,
0.24797219038009644,
0.02816316857933998,
0.006149111315608025,
-0.06620337069034576,
0.08463679254055023,
-0.041000790894031525,
-0.1605428159236908,
0.28352513909339905,
-0.17686468362808228,
-0.3544844686985016,
-0.3257427215576172,
0.10640156269073486,
0.11600561439990997,
-0.038701821118593216,
-0.14935243129730225,
-0.33307960629463196,
0.024303454905748367,
0.0647609680891037,
0.0029282346367836,
0.01668519899249077,
0.4571922719478607,
-0.26972055435180664,
-0.01649072766304016,
-0.27252504229545593,
0.21221771836280823,
0.4781433641910553,
0.23290851712226868,
-0.07715455442667007,
0.007532086223363876,
-0.08795645833015442,
0.23632431030273438,
0.8373278975486755,
0.414650559425354,
0.016226623207330704,
0.11626335233449936,
0.04920046031475067,
0.2530555725097656,
0.2053135335445404,
-0.23785759508609772,
0.23165878653526306,
0.038400016725063324,
-0.20962481200695038,
0.3397589921951294,
0.09292875230312347,
0.07160863280296326,
-0.09781570732593536,
-0.3758299648761749,
0.020079515874385834,
-0.45011404156684875,
0.07141508907079697,
0.13596701622009277,
0.29021576046943665,
0.08205214142799377,
0.15253034234046936,
-0.06582784652709961,
0.11150141060352325,
0.1713983714580536,
0.33625227212905884,
0.055381596088409424,
-0.09184861928224564,
0.02254783734679222,
-0.08557525277137756,
-0.1284903883934021,
0.035434380173683167,
0.1114310771226883,
0.38846683502197266,
-0.09260578453540802,
-0.005700442939996719,
0.06905427575111389,
-0.07332047075033188,
0.5187137126922607,
0.24250665307044983,
0.3133060932159424,
-0.0725182592868805,
-0.35823163390159607,
0.021648341789841652,
-0.01565558835864067,
-0.2780194878578186,
-0.416666179895401,
0.3179636597633362,
0.49051418900489807,
-0.14787405729293823,
-0.27586808800697327,
-0.4128696918487549,
-0.09228237718343735,
-0.24892862141132355,
-0.14182761311531067,
-0.35563868284225464,
0.07218515127897263,
-0.3742581605911255,
0.2835468649864197,
0.3413563668727875,
0.25894755125045776,
-0.1655925214290619,
0.06659355759620667,
0.1010136753320694,
-0.12258702516555786,
-0.01193874329328537,
0.36804109811782837,
0.19159454107284546,
-0.38127005100250244,
0.20699651539325714,
0.42324015498161316,
0.055182456970214844,
-0.1996738612651825,
0.23640286922454834,
0.08541354537010193,
-0.0919678658246994,
0.25172215700149536,
-0.08546838164329529,
0.12773491442203522,
0.5462225675582886,
-0.2121763974428177,
-0.08146872371435165,
0.27169644832611084,
0.20310699939727783,
-0.24885600805282593,
-0.07970103621482849,
0.12946748733520508,
0.2681671380996704,
0.26796263456344604,
0.29102805256843567,
0.056196391582489014,
0.09846648573875427,
-0.183993399143219,
0.14030268788337708,
-0.2215782254934311,
-0.11662229895591736,
0.18979975581169128,
-0.171197772026062,
0.79226154088974,
0.16929686069488525,
0.12428721785545349,
0.14606082439422607,
0.10674360394477844,
0.10974621772766113,
-0.6064883470535278,
0.29189103841781616,
-0.07793723046779633,
-0.2649601697921753,
-0.02831267938017845,
-0.02948339469730854,
0.05656944215297699,
-0.21043024957180023,
0.004144787788391113,
0.2079232931137085,
0.2406349629163742,
-0.012965485453605652,
-0.24343682825565338,
0.19522768259048462,
0.03885679319500923,
-0.22637046873569489,
0.3143179714679718,
0.02394719421863556,
0.2714504897594452,
0.433695912361145,
-0.07500151544809341,
-0.3992971181869507,
-0.1263045072555542,
-0.23586146533489227,
-0.21441003680229187,
0.0254514217376709,
-0.11033766716718674,
0.08824042230844498,
0.3932216167449951,
0.18408100306987762,
0.22890633344650269,
0.37114861607551575,
0.33837682008743286,
0.15565894544124603,
-0.23156529664993286,
0.1762319654226303,
-0.28623324632644653,
0.37821581959724426,
-0.05967751890420914,
-0.08840081840753555,
0.11791414022445679,
-0.17832082509994507,
-0.35662350058555603,
-0.202804297208786,
-0.09581795334815979,
-0.033979009836912155,
0.11891409754753113,
0.11794372648000717,
-0.17823392152786255,
0.23217420279979706,
0.3084328770637512,
0.01432124525308609,
-0.29994404315948486,
-0.15666699409484863,
0.103555828332901,
0.07761364430189133,
-0.3427913188934326,
0.17439457774162292,
-0.09572368860244751,
-0.28441953659057617,
0.22251753509044647,
0.5015813708305359,
-0.11752098053693771,
-0.0775732696056366,
0.07386192679405212,
0.1801404058933258,
-0.10319054871797562,
-0.20611795783042908,
-0.3111307621002197,
-0.20843271911144257,
-0.605645477771759,
0.18165670335292816,
-0.06025161221623421,
-0.3021441698074341,
0.016405774280428886,
0.32027655839920044,
0.3288378119468689,
0.12673893570899963,
-0.07310618460178375,
-0.31677377223968506,
-0.40407848358154297,
0.09206797927618027,
-0.4520488381385803,
-0.0811762809753418,
-0.059310317039489746,
0.45788633823394775,
-0.16426703333854675,
0.3518691956996918,
-0.26611751317977905,
-0.09190776199102402,
-0.4133838415145874,
-0.017430253326892853,
0.26403382420539856,
-0.3474743068218231,
0.1843053251504898,
-0.1253085881471634,
-0.06507813930511475,
0.36015433073043823,
-0.30464309453964233,
-0.060578182339668274,
-0.3630121946334839,
0.17079441249370575,
0.04493040591478348,
0.11253342777490616,
0.07003859430551529,
-0.09745021909475327,
-0.13090376555919647,
-0.26732829213142395,
0.1417086124420166,
0.11499766260385513,
-0.07895082235336304,
0.15426547825336456,
-0.28458982706069946,
0.38686054944992065,
-0.10551390796899796,
0.07889100909233093,
0.08838827908039093,
-0.33902740478515625,
-0.2293836921453476,
-0.019472450017929077,
-0.03361549228429794,
-0.10838709771633148,
-0.40928760170936584,
0.013161823153495789,
0.19238659739494324,
0.17777109146118164,
0.3446156084537506,
0.3719736337661743,
-0.23831364512443542,
-0.2726480960845947,
0.3021422326564789,
-0.19200783967971802,
-0.050377145409584045,
-0.03016398847103119,
0.02803034707903862,
0.10283065587282181,
-0.2123607099056244,
-0.03140454366803169,
-0.05558246746659279,
0.0612918920814991,
0.13880977034568787,
0.3166537582874298,
0.47211888432502747,
-0.10295315086841583,
-0.028156742453575134,
0.1954536736011505,
0.24443523585796356,
-0.12660908699035645,
-0.05584418773651123,
0.09184493124485016,
0.21325962245464325,
0.3728077709674835,
0.309048056602478,
-0.1657077670097351,
0.21887944638729095,
0.3541126251220703,
-0.4744991660118103,
0.21857516467571259,
-0.28947755694389343,
0.1934727132320404,
0.01654639095067978,
-0.06116337329149246,
-0.14349694550037384,
-0.10553514957427979,
-0.057172149419784546,
0.15270951390266418,
-0.5392782688140869,
0.23439157009124756,
-0.38294392824172974,
-0.15573559701442719,
-0.197966068983078,
0.35624900460243225,
-0.1585698127746582,
-0.15442056953907013,
-0.3112891912460327,
-0.16528114676475525,
-0.27896392345428467,
-0.1631334125995636,
0.2511577308177948,
0.38664019107818604,
0.2265464812517166,
0.36658012866973877,
-0.04723510146141052,
-0.17875665426254272,
-0.49362772703170776,
0.2092776596546173,
0.22999733686447144,
-0.3069007396697998,
0.24135571718215942,
0.5113224983215332,
-0.12261731922626495,
0.3116088807582855,
0.34227463603019714,
0.39099040627479553,
0.01700439676642418,
-0.0488167367875576,
0.0171196311712265,
0.06669413298368454,
0.19170628488063812,
-0.13734140992164612,
0.23277677595615387,
-0.16971424221992493,
-0.10073384642601013,
-0.004182280972599983,
-0.022867539897561073,
-0.2050240933895111,
0.13774386048316956,
-0.15160542726516724,
0.12745460867881775,
-0.2960871160030365,
0.6735236048698425,
-0.08811739832162857,
0.018308565020561218,
-0.16118203103542328,
-0.10930731147527695,
-0.4887101650238037,
0.2702738344669342,
0.1911807507276535,
0.20017492771148682,
0.30115821957588196,
-0.21184536814689636,
0.03187807276844978,
0.0614364892244339,
0.3160473108291626,
0.16763029992580414,
-0.24471870064735413,
-0.354339599609375,
0.04476974904537201,
-0.6734270453453064,
0.4350377321243286,
0.1517411172389984,
0.10922902822494507,
-0.03847714513540268,
0.03493170440196991,
-0.11195670813322067,
0.07929633557796478,
0.17305098474025726,
-0.1939648538827896,
0.035636577755212784,
0.26346060633659363,
-0.36603134870529175,
0.27558350563049316,
-0.2461363822221756,
-0.23811811208724976,
0.2487059235572815,
-0.11308664083480835,
0.0006521232426166534,
0.0036281272768974304,
0.029976651072502136,
-0.0061790719628334045,
-0.01004139706492424,
-0.21091550588607788,
0.29738765954971313,
0.028424903750419617,
0.044204674661159515,
0.17182309925556183,
0.01574263721704483,
-0.15980330109596252,
-0.2036956250667572,
0.17690984904766083,
0.009497200138866901,
-0.35314875841140747,
-0.008286409080028534,
0.4376751184463501,
-0.32120615243911743,
-0.06548286974430084,
-0.3393903076648712,
0.07986273616552353,
0.008869443088769913,
-0.17908765375614166,
-0.3372270464897156,
0.23770064115524292,
-0.3895711302757263,
0.24976658821105957,
0.3788767457008362,
0.5589139461517334,
-0.04165166616439819,
0.02822951041162014,
-0.5358927845954895,
-0.22398275136947632,
0.429124116897583,
-0.6881700754165649,
-0.13198384642601013,
-0.33538544178009033,
0.39702141284942627,
0.08930892497301102,
0.0715339183807373,
-0.5503525733947754,
-0.03614452853798866,
-0.01795632764697075,
0.11851033568382263,
-0.24627187848091125,
-0.04956464841961861,
-0.15310798585414886,
-0.3234373927116394,
0.08975876867771149,
-0.017823360860347748,
0.1394115835428238,
-0.37214821577072144,
0.27140265703201294,
-0.0634138286113739
] |
https://github.com/huggingface/datasets/issues/4419 | Update `unittest` assertions over tuples from `assertEqual` to `assertTupleEqual` | Hi! If the only goal is to improve readability, it's better to use `assertTupleEqual` than `assertSequenceEqual` for Python tuples. Also, note that this function is called internally by `assertEqual`, but I guess we can accept a PR to be more verbose. | **Is your feature request related to a problem? Please describe.**
So this is more a readability improvement rather than a proposal, wouldn't it be better to use `assertTupleEqual` over the tuples rather than `assertEqual`? As `unittest` added that function in `v3.1`, as detailed at https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTupleEqual, so maybe it's worth updating.
Find an example of an `assertEqual` over a tuple in 🤗 `datasets` unit tests over an `ArrowDataset` at https://github.com/huggingface/datasets/blob/0bb47271910c8a0b628dba157988372307fca1d2/tests/test_arrow_dataset.py#L570
**Describe the solution you'd like**
Start slowly replacing all the `assertEqual` statements with `assertTupleEqual` if the assertion is done over a Python tuple, as we're doing with the Python lists using `assertListEqual` rather than `assertEqual`.
**Additional context**
If so, please let me know and I'll try to go over the tests and create a PR if applicable, otherwise, if you consider this should stay as `assertEqual` rather than `assertSequenceEqual` feel free to close this issue! Thanks 🤗
| 41 | Update `unittest` assertions over tuples from `assertEqual` to `assertTupleEqual`
**Is your feature request related to a problem? Please describe.**
So this is more a readability improvement rather than a proposal, wouldn't it be better to use `assertTupleEqual` over the tuples rather than `assertEqual`? As `unittest` added that function in `v3.1`, as detailed at https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTupleEqual, so maybe it's worth updating.
Find an example of an `assertEqual` over a tuple in 🤗 `datasets` unit tests over an `ArrowDataset` at https://github.com/huggingface/datasets/blob/0bb47271910c8a0b628dba157988372307fca1d2/tests/test_arrow_dataset.py#L570
**Describe the solution you'd like**
Start slowly replacing all the `assertEqual` statements with `assertTupleEqual` if the assertion is done over a Python tuple, as we're doing with the Python lists using `assertListEqual` rather than `assertEqual`.
**Additional context**
If so, please let me know and I'll try to go over the tests and create a PR if applicable, otherwise, if you consider this should stay as `assertEqual` rather than `assertSequenceEqual` feel free to close this issue! Thanks 🤗
Hi! If the only goal is to improve readability, it's better to use `assertTupleEqual` than `assertSequenceEqual` for Python tuples. Also, note that this function is called internally by `assertEqual`, but I guess we can accept a PR to be more verbose. | [
-0.11732026934623718,
0.17830273509025574,
-0.2007409632205963,
-0.219443216919899,
0.15809227526187897,
0.19009238481521606,
0.1293112188577652,
0.25092408061027527,
0.16732637584209442,
0.057909045368433,
0.2828997075557709,
0.30522221326828003,
-0.16012747585773468,
-0.09168107807636261,
-0.21851803362369537,
-0.04138194024562836,
-0.17628929018974304,
0.17489883303642273,
0.21219488978385925,
0.07185231149196625,
-0.3183669447898865,
-0.0035553202033042908,
-0.2100764513015747,
-0.08898390829563141,
0.12503312528133392,
-0.06356401741504669,
0.09366939216852188,
-0.022869020700454712,
-0.1363433450460434,
-0.7904582023620605,
0.39929425716400146,
0.31791311502456665,
-0.18240822851657867,
-0.004615612328052521,
-0.00010403319902252406,
-0.14056208729743958,
0.5211164355278015,
0.07849723845720291,
-0.2580043077468872,
0.21952711045742035,
-0.09305958449840546,
-0.16752175986766815,
0.33969351649284363,
-0.24891257286071777,
0.009687695652246475,
-0.013419325463473797,
-0.2982178330421448,
-0.20548610389232635,
-0.11931699514389038,
0.08848536014556885,
0.2376309633255005,
0.5034911632537842,
0.02326156571507454,
0.14129868149757385,
0.03071799874305725,
-0.2615271210670471,
0.09222535043954849,
0.2974488437175751,
0.33619996905326843,
-0.06939256191253662,
0.030619613826274872,
0.09373302757740021,
0.09801161289215088,
0.26985305547714233,
-0.21125313639640808,
-0.17936821281909943,
0.0024774447083473206,
-0.02128777652978897,
-0.4398922622203827,
-0.07376772910356522,
0.12490443885326385,
-0.3561255633831024,
-0.5074971318244934,
0.10136059671640396,
-0.0199257954955101,
-0.37879395484924316,
0.15425923466682434,
-0.09012292325496674,
-0.25456368923187256,
-0.020455829799175262,
-0.06685192137956619,
-0.14994560182094574,
-0.0020648688077926636,
0.24536167085170746,
-0.09917774796485901,
0.29906052350997925,
0.13340134918689728,
0.04179118573665619,
0.03334146738052368,
-0.10313227772712708,
-0.27165091037750244,
0.06579172611236572,
0.02249714359641075,
0.021403811872005463,
-0.14319609105587006,
-0.38661259412765503,
0.11909116804599762,
-0.07625500112771988,
0.16138869524002075,
0.09989972412586212,
0.16816426813602448,
0.1309516727924347,
-0.30794382095336914,
0.002986084669828415,
-0.025340788066387177,
0.5414718985557556,
0.2892635762691498,
-0.040386371314525604,
-0.10728567838668823,
0.3224762976169586,
-0.1061796247959137,
0.1757296621799469,
0.4563749134540558,
-0.28609541058540344,
0.06833967566490173,
0.4596477746963501,
0.3486436605453491,
-0.19446352124214172,
-0.36438876390457153,
-0.0810699313879013,
-0.36729100346565247,
-0.23828129470348358,
0.12944550812244415,
-0.100954569876194,
0.2052592784166336,
0.27917227149009705,
0.15943554043769836,
-0.026471514254808426,
-0.1756799966096878,
-0.27305635809898376,
-0.1898508220911026,
0.04150856286287308,
0.014636766165494919,
0.06676299124956131,
0.08510458469390869,
-0.17602655291557312,
0.1557261198759079,
-0.1247902438044548,
0.2970719337463379,
0.04672224074602127,
0.29677778482437134,
0.15214279294013977,
0.3014846742153168,
-0.1439269334077835,
-0.2262972891330719,
-0.2302401214838028,
0.1637633889913559,
0.06639297306537628,
-0.07612831890583038,
0.12755650281906128,
-0.022882595658302307,
0.007919508963823318,
0.22892220318317413,
0.23157984018325806,
-0.10428432375192642,
-0.013155583292245865,
-0.09608135372400284,
-0.16660651564598083,
-0.2589127719402313,
-0.2623593509197235,
0.48470523953437805,
-0.1723645180463791,
-0.060645196586847305,
-0.05874393507838249,
0.13296754658222198,
0.013046301901340485,
-0.2371169626712799,
0.11779464781284332,
-0.1470615267753601,
0.16754914820194244,
-0.08392921835184097,
0.20108696818351746,
-0.0841221883893013,
0.0560433566570282,
-0.16242682933807373,
0.07391120493412018,
0.17201372981071472,
-0.4855060577392578,
-0.17972669005393982,
0.10813799500465393,
-0.0254991352558136,
0.1258721798658371,
-0.19239714741706848,
-0.18900826573371887,
-0.19974999129772186,
-0.26269957423210144,
-0.004885770380496979,
-0.009850820526480675,
0.0606394037604332,
0.044816091656684875,
-0.4649258255958557,
-0.16890345513820648,
0.14109985530376434,
-0.24171625077724457,
-0.30200326442718506,
-0.12918329238891602,
-0.18823924660682678,
-0.2794826626777649,
0.48178863525390625,
-0.26954734325408936,
-0.027081945911049843,
-0.040896639227867126,
0.7177526950836182,
-0.12443144619464874,
-0.1257610321044922,
-0.15613842010498047,
-0.018861018121242523,
0.27141568064689636,
-0.2930563986301422,
0.18571418523788452,
-0.1290469467639923,
-0.2034541815519333,
-0.14424026012420654,
0.15020053088665009,
0.07323873043060303,
-0.12428122758865356,
0.1916104406118393,
0.04264415055513382,
0.1842544823884964,
-0.033067360520362854,
-0.02376389317214489,
-0.45969370007514954,
-0.0667298287153244,
0.09340818226337433,
-0.036793436855077744,
0.10108160227537155,
0.3335700035095215,
-0.09476777911186218,
-0.09706583619117737,
0.08908739686012268,
-0.18419447541236877,
-0.18121688067913055,
-0.3784317374229431,
0.4091236889362335,
0.12765903770923615,
-0.044296786189079285,
0.12796634435653687,
-0.04171091318130493,
0.08695991337299347,
-0.15182583034038544,
0.04227156937122345,
0.5084352493286133,
0.09061960130929947,
0.38195285201072693,
-0.20302250981330872,
0.6525139212608337,
-0.23784677684307098,
-0.015169128775596619,
-0.011264912784099579,
0.07057754695415497,
0.14423580467700958,
0.04668569937348366,
-0.4376075863838196,
-0.18650439381599426,
0.051017578691244125,
0.27069953083992004,
0.1216636598110199,
-0.09758232533931732,
0.11400921642780304,
-0.046895869076251984,
0.04673533886671066,
-0.07596783339977264,
-0.0163264200091362,
0.07828545570373535,
0.06478004157543182,
0.057189591228961945,
0.20205363631248474,
-0.06330623477697372,
0.5984821915626526,
0.14959751069545746,
0.1773083508014679,
0.007532199844717979,
-0.03275752440094948,
-0.03156932815909386,
0.1485239416360855,
0.1721692681312561,
-0.419738233089447,
-0.13295090198516846,
0.2743796110153198,
-0.1939445286989212,
-0.1584484577178955,
0.007333613932132721,
-0.22837406396865845,
-0.0379820242524147,
-0.19971591234207153,
-0.04675669968128204,
-0.2615508735179901,
-0.024411838501691818,
-0.17655996978282928,
-0.3111911416053772,
-0.13411258161067963,
-0.2544993460178375,
0.09693199396133423,
-0.08793722093105316,
-0.35863196849823,
0.39580896496772766,
0.01883517950773239,
0.5350196361541748,
0.24549947679042816,
-0.24086321890354156,
0.14791907370090485,
-0.027972344309091568,
0.1329808235168457,
0.15366646647453308,
0.034353699535131454,
0.07709477841854095,
0.2443651556968689,
0.02254468761384487,
0.008061766624450684,
-0.22575527429580688,
-0.5837823748588562,
-0.16391398012638092,
-0.10480786859989166,
0.07086467742919922,
0.3094210624694824,
-0.13324187695980072,
0.19064055383205414,
-0.19711405038833618,
-0.03461238741874695,
-0.24815520644187927,
-0.2844235599040985,
-0.09278327226638794,
0.3969516456127167,
0.17669810354709625,
-0.06060373783111572,
-0.4806497395038605,
0.22383412718772888,
-0.34347692131996155,
0.4885372519493103,
0.28120940923690796,
0.009201422333717346,
-0.393280029296875,
0.03744480386376381,
0.11837731301784515,
-0.08317834138870239,
-0.014103112742304802,
0.00768634770065546,
-0.03458896279335022,
-0.11814668774604797,
-0.1703338772058487,
-0.045100290328264236,
-0.1963922381401062,
-0.3569474220275879,
0.5372037887573242,
0.08884627372026443,
-0.020862102508544922,
-0.5950779318809509,
-0.1326209008693695,
0.39026984572410583,
-0.12368011474609375,
-0.10109920799732208,
0.2592077851295471,
0.257371723651886,
-0.18497724831104279,
0.005156222730875015,
-0.07107222825288773,
-0.09482748061418533,
0.41595104336738586,
-0.15120255947113037,
0.12535595893859863,
0.06320589780807495,
0.07302640378475189,
0.2329031378030777,
0.27089524269104004,
-0.1333884447813034,
0.04633016884326935,
-0.04316385090351105,
-0.15191946923732758,
0.08520858734846115,
-0.22151587903499603,
-0.16756701469421387,
0.04262032359838486,
-0.09348222613334656,
0.2793387174606323,
-0.3005286157131195,
0.21190612018108368,
0.12449982762336731,
0.08749742805957794,
-0.09140767902135849,
-0.4310398995876312,
-0.01186935044825077,
-0.5521475076675415,
0.3798238933086395,
-0.04246458411216736,
-0.034261517226696014,
-0.3398028314113617,
-0.0989719107747078,
0.18578797578811646,
-0.10054202377796173,
0.07879079133272171,
-0.27978479862213135,
-0.04551795870065689,
0.15546642243862152,
0.03659310191869736,
0.5309212803840637,
0.2691662311553955,
0.5158148407936096,
0.2977810204029083,
-0.3104357123374939,
-0.08267809450626373,
0.011524668894708157,
0.0961560606956482,
-0.31234148144721985,
0.02091345377266407,
-0.060202453285455704,
-0.25687074661254883,
-0.23912154138088226,
-0.0004663728177547455,
-0.5003764033317566,
-0.06193108484148979,
-0.051131222397089005,
0.3184667229652405,
-0.08624497056007385,
-0.15222187340259552,
0.06363615393638611,
0.1594729870557785,
-0.11361061036586761,
0.01665358990430832,
-0.21358631551265717,
0.011269498616456985,
-0.15691716969013214,
0.2992706596851349,
0.07488842308521271,
0.039091870188713074,
-0.3440660536289215,
0.14553368091583252,
-0.38155850768089294,
-0.12695708870887756,
-0.0042393505573272705,
-0.1475394070148468,
0.20624157786369324,
-0.11659132689237595,
0.027850031852722168,
-0.10569341480731964,
-0.10997645556926727,
0.047431107610464096,
0.3604334890842438,
-0.028859306126832962,
0.02105545997619629,
-0.49299758672714233,
0.23183131217956543,
0.27726781368255615,
0.20331181585788727,
-0.004690208472311497,
0.23330575227737427,
-0.22802913188934326,
-0.026057906448841095,
-0.5153979063034058,
0.22059543430805206,
0.21886979043483734,
0.18171797692775726,
0.4197169244289398,
-0.006860614754259586,
0.20477427542209625,
0.2422957569360733,
-0.2214074581861496,
0.4541991055011749,
0.20830202102661133,
-0.3126983344554901,
0.3619738221168518,
0.45748868584632874,
0.44602957367897034,
0.1483670175075531,
0.06355993449687958,
0.07925049215555191,
0.032472990453243256,
0.3687068521976471,
0.29021698236465454,
0.187552347779274,
-0.09563855826854706,
-0.19333519041538239,
0.02840503118932247,
-0.11707080900669098,
0.3688707649707794,
0.011145446449518204,
-0.3549202084541321,
0.3933735489845276,
0.33404839038848877,
-0.3480047285556793,
0.31315892934799194,
0.15783832967281342,
-0.024841973558068275,
0.09909816086292267,
-0.0739983320236206,
0.189414843916893,
0.12882889807224274,
0.023885708302259445,
0.09103218466043472,
-0.1313788890838623,
0.20748135447502136,
-0.3563477396965027,
-0.0005306452512741089,
-0.1639067530632019,
-0.40428778529167175,
0.020971177145838737,
0.43470126390457153,
-0.2145135998725891,
0.2303808629512787,
-0.13257552683353424,
-0.022366374731063843,
0.4553948640823364,
0.007468972355127335,
-0.06317418813705444,
0.2601952850818634,
0.2325291782617569,
0.03470415621995926,
0.05699140578508377,
0.38245677947998047,
0.04797592759132385,
-0.21954473853111267,
-0.023521944880485535,
-0.07364851236343384,
-0.3028450608253479,
0.03440077602863312,
0.008297540247440338,
-0.24574242532253265,
-0.4985613524913788,
-0.1118532121181488,
-0.05694226920604706,
-0.3587547540664673,
-0.1190275102853775,
0.15655960142612457,
0.16087915003299713,
-0.475286602973938,
0.3564239740371704,
0.43322861194610596,
-0.3850971758365631,
0.15028855204582214,
0.2315332293510437,
-0.18170225620269775,
-0.0904616042971611,
0.34671536087989807,
-0.24215446412563324,
0.12140792608261108,
-0.22815674543380737,
-0.3135279417037964,
0.06774791330099106,
-0.25295722484588623,
0.3206655979156494,
-0.23386883735656738,
0.16372518241405487,
0.011894958093762398,
0.17131225764751434,
0.2579061686992645,
0.41862332820892334,
-0.3659124970436096,
-0.002499222755432129,
-0.2735521197319031,
0.19595760107040405,
0.17951536178588867,
0.3727108836174011,
-0.3908085227012634,
0.015139425173401833,
-0.19815705716609955,
0.0641268864274025,
-0.3886125087738037,
0.15425123274326324,
-0.16355672478675842,
-0.003595784306526184,
-0.1261049509048462,
-0.010414894670248032,
-0.09415890276432037,
0.2677921950817108,
0.2515416443347931,
0.13204620778560638,
0.0626753568649292,
-0.2714616656303406,
-0.03922193497419357,
0.06284927576780319,
-0.09272246062755585,
0.042719967663288116,
0.11442024260759354,
0.13700176775455475,
0.40698742866516113,
-0.13321806490421295,
-0.02703341841697693,
-0.2820167541503906,
-0.09302422404289246,
0.5649994611740112,
0.07704298943281174,
-0.021393395960330963,
-0.09559710323810577,
0.06299241632223129,
-0.050969839096069336,
-0.17892806231975555,
-0.046933479607105255,
0.3464733958244324,
0.055120568722486496,
0.04466983675956726,
0.11393867433071136,
0.09215890616178513,
0.04094349220395088,
0.2512996792793274,
-0.08443038910627365,
0.1738736927509308,
-0.22366070747375488,
-0.14872704446315765,
0.47040560841560364,
0.2522065043449402,
-0.06090548262000084,
-0.15059705078601837,
-0.008146325126290321,
0.307555228471756,
-0.28021401166915894,
0.08442872762680054,
-0.16137780249118805,
0.16447488963603973,
0.5214260816574097,
0.2269178032875061,
0.07410745322704315,
-0.049353163689374924,
0.12895524501800537,
0.07565435767173767,
-0.12547990679740906,
-0.25192326307296753,
-0.02205035462975502,
0.22311753034591675,
-0.10293398797512054,
-0.2812930941581726,
-0.014950422570109367,
-0.10180868208408356,
0.3546311557292938,
-0.18517345190048218,
0.19763359427452087,
0.5105976462364197,
-0.18303003907203674,
-0.1306031048297882,
-0.0667526051402092,
0.310605525970459,
0.07729305326938629,
0.06127280741930008,
0.13152937591075897,
0.09063354134559631,
0.31785115599632263,
0.47665470838546753,
-0.22462117671966553,
-0.40642407536506653,
-0.07461479306221008,
-0.017646946012973785,
0.059921279549598694,
-0.26099520921707153,
-0.30382826924324036,
-0.04587149620056152,
-0.223922997713089,
-0.14059874415397644,
-0.006718713790178299,
0.06500249356031418,
0.34866708517074585,
-0.01305367797613144,
0.06727485358715057,
-0.43919140100479126,
-0.16686797142028809,
-0.007134199142456055,
0.3244170546531677,
-0.1626037210226059,
0.04500659555196762,
0.2930905520915985,
0.11253603547811508,
0.15865887701511383,
0.4374479353427887,
0.2451115995645523,
0.0324227400124073,
-0.38771796226501465,
0.12328119575977325,
-0.39110711216926575,
0.03440215438604355,
-0.12209146469831467,
0.08476104587316513,
-0.338056355714798,
0.06419125199317932,
0.27980488538742065,
0.2985069453716278,
-0.12052518874406815,
0.19101625680923462,
-0.14863918721675873,
-0.3989270329475403,
-0.6178948283195496,
0.9946874380111694,
0.3343042731285095,
-0.03676392510533333,
-0.08417032659053802,
0.07591987401247025,
-0.1862679421901703,
-0.2010527402162552,
0.09134986996650696,
-0.040306802839040756,
0.05186320096254349,
0.20239877700805664,
0.14747442305088043,
-0.19008764624595642,
0.38216736912727356,
0.2344079315662384,
0.1854913830757141,
-0.1731722205877304,
-0.08214918524026871,
-0.49057361483573914,
0.2107231467962265,
0.11610104143619537,
-0.3865961730480194,
0.1399454027414322,
-0.027775511145591736,
0.06412092596292496,
0.3261480927467346,
-0.039049580693244934,
-0.23397167026996613,
-0.19255571067333221,
-0.25793105363845825,
-0.6128923892974854,
0.021655015647411346,
0.21364375948905945,
-0.28750449419021606,
0.17832019925117493,
-0.21543559432029724,
-0.09468777477741241,
-0.10504166781902313,
0.12715569138526917,
0.20630311965942383,
-0.06535468995571136,
0.3358073830604553,
0.3578968048095703,
0.16052377223968506,
0.20008306205272675,
0.20263266563415527,
-0.0404835119843483,
0.08450379222631454,
0.08665337413549423,
0.07291962951421738,
-0.05987032875418663,
0.3092046082019806,
-0.1991015076637268,
0.24899181723594666,
0.0516538992524147,
-0.11523950099945068,
-0.1459052860736847,
0.3556419610977173,
0.21826831996440887,
-0.2587010860443115,
-0.06481339782476425,
0.14614224433898926,
-0.025914914906024933,
-0.16578973829746246,
0.1312972903251648,
0.4043293297290802,
0.03116697445511818,
0.38110360503196716,
-0.18613263964653015,
-0.28728482127189636,
0.4182772636413574,
-0.1586696058511734,
-0.16636259853839874,
0.1101236641407013,
0.35017502307891846,
0.02439211681485176,
-0.39639168977737427,
-0.2175508737564087,
-0.09076183289289474,
0.2984393835067749,
0.13452377915382385,
-0.23835700750350952,
0.31369802355766296,
-0.0006855279207229614,
0.2089175432920456,
0.04251149669289589,
0.3906075358390808,
0.03151891380548477,
0.21000634133815765,
0.03223651275038719,
-0.09977839887142181
] |
https://github.com/huggingface/datasets/issues/4419 | Update `unittest` assertions over tuples from `assertEqual` to `assertTupleEqual` | Hi @mariosasko, right! I'll update the issue title/desc with `assertTupleEqual` even though as you said it seems to be internally using `assertEqual` so I'm not sure whether it's worth it or not...
https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTupleEqual | **Is your feature request related to a problem? Please describe.**
So this is more a readability improvement rather than a proposal, wouldn't it be better to use `assertTupleEqual` over the tuples rather than `assertEqual`? As `unittest` added that function in `v3.1`, as detailed at https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTupleEqual, so maybe it's worth updating.
Find an example of an `assertEqual` over a tuple in 🤗 `datasets` unit tests over an `ArrowDataset` at https://github.com/huggingface/datasets/blob/0bb47271910c8a0b628dba157988372307fca1d2/tests/test_arrow_dataset.py#L570
**Describe the solution you'd like**
Start slowly replacing all the `assertEqual` statements with `assertTupleEqual` if the assertion is done over a Python tuple, as we're doing with the Python lists using `assertListEqual` rather than `assertEqual`.
**Additional context**
If so, please let me know and I'll try to go over the tests and create a PR if applicable, otherwise, if you consider this should stay as `assertEqual` rather than `assertSequenceEqual` feel free to close this issue! Thanks 🤗
| 33 | Update `unittest` assertions over tuples from `assertEqual` to `assertTupleEqual`
**Is your feature request related to a problem? Please describe.**
So this is more a readability improvement rather than a proposal, wouldn't it be better to use `assertTupleEqual` over the tuples rather than `assertEqual`? As `unittest` added that function in `v3.1`, as detailed at https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTupleEqual, so maybe it's worth updating.
Find an example of an `assertEqual` over a tuple in 🤗 `datasets` unit tests over an `ArrowDataset` at https://github.com/huggingface/datasets/blob/0bb47271910c8a0b628dba157988372307fca1d2/tests/test_arrow_dataset.py#L570
**Describe the solution you'd like**
Start slowly replacing all the `assertEqual` statements with `assertTupleEqual` if the assertion is done over a Python tuple, as we're doing with the Python lists using `assertListEqual` rather than `assertEqual`.
**Additional context**
If so, please let me know and I'll try to go over the tests and create a PR if applicable, otherwise, if you consider this should stay as `assertEqual` rather than `assertSequenceEqual` feel free to close this issue! Thanks 🤗
Hi @mariosasko, right! I'll update the issue title/desc with `assertTupleEqual` even though as you said it seems to be internally using `assertEqual` so I'm not sure whether it's worth it or not...
https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTupleEqual | [
-0.096736378967762,
0.1710253357887268,
-0.20067532360553741,
-0.21332524716854095,
0.13387863337993622,
0.18414059281349182,
0.16805149614810944,
0.2551600933074951,
0.19010868668556213,
0.08620865643024445,
0.27008143067359924,
0.30105939507484436,
-0.13259562849998474,
-0.10468018800020218,
-0.18573541939258575,
0.05802619457244873,
-0.18264514207839966,
0.16118334233760834,
0.1967640221118927,
0.07490848004817963,
-0.34732040762901306,
-0.001152627170085907,
-0.19920815527439117,
-0.10982897877693176,
0.1230524405837059,
-0.05037777125835419,
0.07591303437948227,
-0.023896731436252594,
-0.12349345535039902,
-0.7799980640411377,
0.42184895277023315,
0.2930273413658142,
-0.19085057079792023,
0.004053942859172821,
-0.00010437207674840465,
-0.13399100303649902,
0.5179429054260254,
0.06480973213911057,
-0.29129934310913086,
0.22689568996429443,
-0.16176936030387878,
-0.16010665893554688,
0.3368336856365204,
-0.25511011481285095,
-0.0007530339062213898,
0.07141728699207306,
-0.28168195486068726,
-0.2499680072069168,
-0.10923714935779572,
0.06213199719786644,
0.24152497947216034,
0.5060691833496094,
0.014218803495168686,
0.08058945834636688,
0.03524037078022957,
-0.2691347002983093,
0.113977812230587,
0.26213401556015015,
0.3278466463088989,
-0.08560258895158768,
0.0005331486463546753,
0.06571267545223236,
0.1160101443529129,
0.2926025688648224,
-0.22168803215026855,
-0.15851174294948578,
-0.02120695263147354,
-0.01348155364394188,
-0.40848425030708313,
-0.10296697169542313,
0.12278786301612854,
-0.3572852611541748,
-0.5151355266571045,
0.0665121003985405,
-0.008638342842459679,
-0.4214942455291748,
0.15900303423404694,
-0.07626450806856155,
-0.24205127358436584,
-0.014807716012001038,
-0.056825052946805954,
-0.1401566118001938,
0.019075028598308563,
0.22201651334762573,
-0.12434785068035126,
0.30504924058914185,
0.11331243813037872,
0.04540537670254707,
0.01800788938999176,
-0.0770014077425003,
-0.23476582765579224,
0.04006342589855194,
0.03795115649700165,
-0.0069366032257676125,
-0.1358860433101654,
-0.3726358413696289,
0.13044171035289764,
-0.0652119442820549,
0.16713052988052368,
0.09560584276914597,
0.12897814810276031,
0.10575825721025467,
-0.2801992893218994,
-0.02558722347021103,
0.02490190975368023,
0.561018705368042,
0.28909268975257874,
-0.05358358100056648,
-0.09280592203140259,
0.35553231835365295,
-0.09371072053909302,
0.20744532346725464,
0.43831050395965576,
-0.259384423494339,
0.052010487765073776,
0.4350280165672302,
0.36419278383255005,
-0.18115757405757904,
-0.39106863737106323,
-0.09985747188329697,
-0.3933366537094116,
-0.21164292097091675,
0.11061149835586548,
-0.09902118891477585,
0.2031038999557495,
0.27906349301338196,
0.15534807741641998,
-0.05784028768539429,
-0.15960580110549927,
-0.2734507620334625,
-0.19507864117622375,
0.03054177388548851,
-0.001779012382030487,
0.048493556678295135,
0.07320369780063629,
-0.16809017956256866,
0.1644160896539688,
-0.07640496641397476,
0.3103729486465454,
0.04076734930276871,
0.2672331929206848,
0.15593259036540985,
0.29412999749183655,
-0.12206052243709564,
-0.2258666604757309,
-0.21220991015434265,
0.17059272527694702,
0.013000912964344025,
-0.09715564548969269,
0.10157978534698486,
-0.0084705650806427,
-0.008825425058603287,
0.26796913146972656,
0.2412068247795105,
-0.09894353896379471,
-0.04432748258113861,
-0.056501470506191254,
-0.21279792487621307,
-0.21401163935661316,
-0.22300775349140167,
0.46848413348197937,
-0.1789916455745697,
-0.09022702276706696,
-0.02392539381980896,
0.15634556114673615,
0.037999339401721954,
-0.2928754985332489,
0.15897876024246216,
-0.1772523820400238,
0.18663311004638672,
-0.09067314118146896,
0.21859535574913025,
-0.09598050266504288,
0.05133078992366791,
-0.1729241907596588,
0.08742117881774902,
0.13396942615509033,
-0.5094059705734253,
-0.22912992537021637,
0.0656917467713356,
-0.03821815177798271,
0.11592564731836319,
-0.1869034469127655,
-0.1989251971244812,
-0.2072754055261612,
-0.27277225255966187,
0.053532954305410385,
0.02329929918050766,
0.04142998158931732,
0.045416831970214844,
-0.44598618149757385,
-0.1777210384607315,
0.08696568757295609,
-0.24543121457099915,
-0.27827349305152893,
-0.1167822852730751,
-0.17356956005096436,
-0.2684980630874634,
0.4509487450122833,
-0.2661818563938141,
-0.02915836311876774,
-0.04820740967988968,
0.6923445463180542,
-0.09192337095737457,
-0.13898751139640808,
-0.10576506704092026,
-0.08377907425165176,
0.3066049814224243,
-0.3014645576477051,
0.13454413414001465,
-0.1279902309179306,
-0.22610615193843842,
-0.15332508087158203,
0.19291071593761444,
0.05685031786561012,
-0.13961529731750488,
0.18680529296398163,
0.08297702670097351,
0.1546044647693634,
-0.02788480371236801,
-0.07229319214820862,
-0.464633971452713,
-0.07088451832532883,
0.08426757156848907,
-0.08062981069087982,
0.08220868557691574,
0.3272131383419037,
-0.0927281379699707,
-0.0759478285908699,
0.10349228978157043,
-0.21798920631408691,
-0.1796184480190277,
-0.33094701170921326,
0.38745754957199097,
0.1549493372440338,
-0.058005452156066895,
0.1359252631664276,
-0.06876470148563385,
0.06584454327821732,
-0.10860995948314667,
0.013169849291443825,
0.520429253578186,
0.10746074467897415,
0.3816709816455841,
-0.16957488656044006,
0.6326608061790466,
-0.24502702057361603,
-0.008730120956897736,
0.005919754505157471,
0.07927098870277405,
0.1439092457294464,
0.031037215143442154,
-0.43485119938850403,
-0.21772858500480652,
0.008394651114940643,
0.2495548576116562,
0.11534059047698975,
-0.05594117194414139,
0.08500975370407104,
-0.0405522957444191,
0.09310417622327805,
-0.01523039024323225,
-0.02224855124950409,
0.06394053995609283,
0.06786368042230606,
0.0556403249502182,
0.1777547001838684,
-0.035632818937301636,
0.6187233924865723,
0.16352513432502747,
0.18032658100128174,
-0.008263589814305305,
0.004707695450633764,
-0.03392542153596878,
0.16218677163124084,
0.19969400763511658,
-0.3980542719364166,
-0.09115435928106308,
0.28980162739753723,
-0.19074136018753052,
-0.1530882716178894,
0.033453572541475296,
-0.23725435137748718,
-0.05790700018405914,
-0.22066852450370789,
-0.00824552308768034,
-0.3019658327102661,
-0.005941115319728851,
-0.17637918889522552,
-0.3246168792247772,
-0.12827879190444946,
-0.253745436668396,
0.10065018385648727,
-0.0759994238615036,
-0.3446611762046814,
0.4016554653644562,
-0.025568917393684387,
0.5440773367881775,
0.2023954689502716,
-0.28019070625305176,
0.18226346373558044,
-0.0350814014673233,
0.12046733498573303,
0.14603431522846222,
0.06162256747484207,
0.02165594883263111,
0.27844128012657166,
0.05850587040185928,
-0.019585413858294487,
-0.24147552251815796,
-0.5521756410598755,
-0.17914988100528717,
-0.09337933361530304,
0.11617544293403625,
0.3084109425544739,
-0.2105848640203476,
0.18363505601882935,
-0.20923815667629242,
-0.031101766973733902,
-0.22103387117385864,
-0.329980731010437,
-0.13585594296455383,
0.39297348260879517,
0.19538302719593048,
-0.04786768555641174,
-0.47770825028419495,
0.2226542830467224,
-0.3536829948425293,
0.4946514368057251,
0.2777419686317444,
-0.004341535270214081,
-0.3578821122646332,
0.015576244331896305,
0.12383083999156952,
-0.0891060158610344,
-0.019808607175946236,
-0.010559245944023132,
-0.01464824378490448,
-0.12614895403385162,
-0.16608595848083496,
-0.038940612226724625,
-0.21409055590629578,
-0.38597434759140015,
0.5448672771453857,
0.11417441815137863,
-0.0035898536443710327,
-0.5996202230453491,
-0.12335774302482605,
0.4189309775829315,
-0.09779481589794159,
-0.1146613359451294,
0.30444467067718506,
0.21953751146793365,
-0.19598251581192017,
0.015925735235214233,
-0.09866084158420563,
-0.09876065701246262,
0.3831994831562042,
-0.17704489827156067,
0.1107155829668045,
0.11824191361665726,
0.0784740298986435,
0.3003285527229309,
0.24345239996910095,
-0.14272649586200714,
0.0830385759472847,
-0.03784027695655823,
-0.12607543170452118,
0.028907552361488342,
-0.24693362414836884,
-0.19555893540382385,
0.04245243966579437,
-0.1047947108745575,
0.3089766204357147,
-0.28939563035964966,
0.19419877231121063,
0.1351540982723236,
0.11830070614814758,
-0.11941676586866379,
-0.4200795888900757,
-0.033214688301086426,
-0.5098727345466614,
0.4012916684150696,
-0.01728643849492073,
-0.03279273957014084,
-0.30604439973831177,
-0.1209171935915947,
0.1737256944179535,
-0.14297305047512054,
0.05439342185854912,
-0.2803533673286438,
-0.04137762635946274,
0.1721007227897644,
0.054707691073417664,
0.5476120114326477,
0.28491201996803284,
0.5336658954620361,
0.29122933745384216,
-0.3486091196537018,
-0.06688207387924194,
-0.03925289586186409,
0.08045443892478943,
-0.2736181914806366,
0.04323359951376915,
-0.0575183667242527,
-0.28976699709892273,
-0.2533382773399353,
0.004259258508682251,
-0.4628586769104004,
-0.04956459626555443,
0.000006424263119697571,
0.3169695734977722,
-0.06420168280601501,
-0.15444692969322205,
0.0938720777630806,
0.15757088363170624,
-0.09111294150352478,
0.016859855502843857,
-0.21255257725715637,
-0.006222832947969437,
-0.14863505959510803,
0.2733924686908722,
0.05987509340047836,
0.047975193709135056,
-0.2935936450958252,
0.14645220339298248,
-0.40598514676094055,
-0.12930935621261597,
0.008432373404502869,
-0.1770017147064209,
0.1877405345439911,
-0.10391946136951447,
0.04506826773285866,
-0.1421602964401245,
-0.08957566320896149,
0.06458457559347153,
0.36764127016067505,
-0.00012276321649551392,
0.015914268791675568,
-0.5023558139801025,
0.2541431784629822,
0.3191084861755371,
0.1973176747560501,
-0.018599286675453186,
0.23900020122528076,
-0.26980558037757874,
-0.04862646758556366,
-0.5243225693702698,
0.1921270191669464,
0.2406177818775177,
0.1619875282049179,
0.4683905839920044,
0.0216569434851408,
0.18365707993507385,
0.23604728281497955,
-0.22117553651332855,
0.4785844385623932,
0.1712835431098938,
-0.33919280767440796,
0.3271123766899109,
0.46639612317085266,
0.40360838174819946,
0.1720680296421051,
0.08357188105583191,
0.07999832928180695,
0.03211553394794464,
0.3615942895412445,
0.29350489377975464,
0.22712060809135437,
-0.11991411447525024,
-0.14680805802345276,
0.02228665165603161,
-0.14702343940734863,
0.3494313955307007,
0.010626967996358871,
-0.3150377571582794,
0.3821493685245514,
0.33311307430267334,
-0.324386864900589,
0.2973203957080841,
0.16044212877750397,
-0.03765222430229187,
0.08124606311321259,
-0.08646613359451294,
0.19841626286506653,
0.11769939213991165,
0.0221526101231575,
0.05044955760240555,
-0.08735779672861099,
0.20724418759346008,
-0.3443833589553833,
0.021991342306137085,
-0.12161635607481003,
-0.3792121410369873,
0.09157578647136688,
0.4350126087665558,
-0.20836549997329712,
0.23353707790374756,
-0.10622009634971619,
0.0035391226410865784,
0.4309309422969818,
0.045361533761024475,
-0.06101555749773979,
0.2779181897640228,
0.24132010340690613,
0.07436323165893555,
0.05017102509737015,
0.3664012849330902,
0.03765462338924408,
-0.16576696932315826,
-0.010870493948459625,
-0.03251539543271065,
-0.3165908455848694,
-0.009519442915916443,
0.035640452057123184,
-0.23465551435947418,
-0.5094712376594543,
-0.10219651460647583,
-0.02416306734085083,
-0.27918148040771484,
-0.121853768825531,
0.15208467841148376,
0.11363273113965988,
-0.4715777039527893,
0.3723584711551666,
0.3907316327095032,
-0.4307633638381958,
0.1514730453491211,
0.2846916615962982,
-0.18783754110336304,
-0.05087967962026596,
0.4066847562789917,
-0.25239846110343933,
0.12243176996707916,
-0.2400091588497162,
-0.2641502916812897,
0.05098970606923103,
-0.24553784728050232,
0.33235371112823486,
-0.23389896750450134,
0.1738559454679489,
0.012560907751321793,
0.18745355308055878,
0.28136834502220154,
0.36510220170021057,
-0.34349551796913147,
-0.02859180048108101,
-0.2543182671070099,
0.16404275596141815,
0.16877229511737823,
0.3774300813674927,
-0.37824493646621704,
0.011456016451120377,
-0.20553991198539734,
0.023828692734241486,
-0.3843153715133667,
0.15167760848999023,
-0.1774928718805313,
-0.010842014104127884,
-0.09149528294801712,
-0.045775048434734344,
-0.08310461789369583,
0.26085853576660156,
0.2604478597640991,
0.09863362461328506,
0.046100497245788574,
-0.2811017632484436,
-0.031536780297756195,
0.06135041266679764,
-0.11608602851629257,
0.10782405734062195,
0.1269628405570984,
0.1382160186767578,
0.37788519263267517,
-0.11103494465351105,
-0.0038349516689777374,
-0.2424001395702362,
-0.08778633177280426,
0.5346482396125793,
0.06937587261199951,
-0.04291100800037384,
-0.05628175288438797,
0.07749122381210327,
-0.02861858159303665,
-0.1742538958787918,
-0.021772459149360657,
0.33317849040031433,
0.03521169349551201,
0.05230829119682312,
0.11803650856018066,
0.10437391698360443,
0.03211631625890732,
0.2429277002811432,
-0.0815480574965477,
0.1358247995376587,
-0.25278928875923157,
-0.12425664067268372,
0.44717320799827576,
0.2510276436805725,
-0.05716807395219803,
-0.1557224988937378,
0.006812251638621092,
0.3175267279148102,
-0.2703053951263428,
0.12703418731689453,
-0.14831212162971497,
0.20585115253925323,
0.477708101272583,
0.22089999914169312,
0.08688496053218842,
-0.07400255650281906,
0.13554581999778748,
0.10633087903261185,
-0.10339470207691193,
-0.23246191442012787,
-0.035822127014398575,
0.21285173296928406,
-0.10321080684661865,
-0.2752849757671356,
0.004972221329808235,
-0.10424208641052246,
0.37433263659477234,
-0.19326037168502808,
0.17508366703987122,
0.5215920805931091,
-0.22818231582641602,
-0.13071562349796295,
-0.021222800016403198,
0.2880341410636902,
0.08492077142000198,
0.040910325944423676,
0.17221514880657196,
0.07226678729057312,
0.32557520270347595,
0.5022318363189697,
-0.23442383110523224,
-0.3862166702747345,
-0.09546096622943878,
0.0016457699239253998,
0.059362366795539856,
-0.2816784381866455,
-0.3397022485733032,
-0.05618207901716232,
-0.17433682084083557,
-0.10734012722969055,
0.0012920424342155457,
0.12988495826721191,
0.35451382398605347,
-0.02223331481218338,
0.03252201899886131,
-0.4155142307281494,
-0.16234254837036133,
-0.04922080785036087,
0.29474562406539917,
-0.19185930490493774,
0.039305176585912704,
0.2533870339393616,
0.13871139287948608,
0.12952055037021637,
0.4671749174594879,
0.23540732264518738,
0.04517311602830887,
-0.3858049809932709,
0.06999521702528,
-0.4057214558124542,
0.0342034250497818,
-0.1733734905719757,
0.08628199249505997,
-0.34850555658340454,
0.09578192234039307,
0.28798437118530273,
0.30535489320755005,
-0.13009941577911377,
0.1477983444929123,
-0.1580277383327484,
-0.3864307403564453,
-0.633329451084137,
0.9685627818107605,
0.3708898425102234,
-0.046877749264240265,
-0.035034745931625366,
0.12823247909545898,
-0.1827302873134613,
-0.1997472643852234,
0.13914576172828674,
-0.042876411229372025,
0.05075671523809433,
0.19484996795654297,
0.15168601274490356,
-0.21772584319114685,
0.3430892825126648,
0.2253563404083252,
0.12289357930421829,
-0.16445426642894745,
-0.09365369379520416,
-0.495025634765625,
0.22145825624465942,
0.10153701901435852,
-0.3500351905822754,
0.10276967287063599,
0.04687535762786865,
0.07728750258684158,
0.3450990319252014,
-0.019060537219047546,
-0.24177208542823792,
-0.22530709207057953,
-0.2926129102706909,
-0.5751001834869385,
0.03546416759490967,
0.19647687673568726,
-0.3264012038707733,
0.18659548461437225,
-0.23831278085708618,
-0.13785813748836517,
-0.16939517855644226,
0.12027988582849503,
0.1978163719177246,
-0.06709133833646774,
0.34815847873687744,
0.3478602170944214,
0.17611686885356903,
0.1898266226053238,
0.19486340880393982,
-0.04534438997507095,
0.09720075130462646,
0.027637090533971786,
0.01322034653276205,
-0.1034460961818695,
0.3102763891220093,
-0.25810813903808594,
0.2498161792755127,
0.023675570264458656,
-0.12550006806850433,
-0.14728304743766785,
0.3615906536579132,
0.22493241727352142,
-0.2673497796058655,
-0.03337610512971878,
0.13989922404289246,
-0.044246092438697815,
-0.1363736391067505,
0.1391943097114563,
0.42588597536087036,
0.012363001704216003,
0.3892138600349426,
-0.18642690777778625,
-0.30413496494293213,
0.42896759510040283,
-0.17512254416942596,
-0.18589559197425842,
0.12252437323331833,
0.3523388206958771,
0.019380617886781693,
-0.44610729813575745,
-0.15961086750030518,
-0.05867447331547737,
0.3359268605709076,
0.13563242554664612,
-0.2674369215965271,
0.2891596853733063,
-0.0443490669131279,
0.20291562378406525,
0.03732706978917122,
0.3912930488586426,
0.01503797434270382,
0.19447778165340424,
0.019258245825767517,
-0.09298469871282578
] |
https://github.com/huggingface/datasets/issues/4417 | how to convert a dict generator into a huggingface dataset. | Hi ! As mentioned on the [forum](https://discuss.huggingface.co/t/how-to-wrap-a-generator-with-hf-dataset/18464), the simplest for now would be to define a [dataset script](https://huggingface.co/docs/datasets/dataset_script) which can contain your generator. But we can also explore adding something like `ds = Dataset.from_iterable(seqio_dataset)` | ### Link
_No response_
### Description
Hey there, I have used seqio to get a well distributed mixture of samples from multiple dataset. However the resultant output from seqio is a python generator dict, which I cannot produce back into huggingface dataset.
The generator contains all the samples needed for training the model but I cannot convert it into a huggingface dataset.
The code looks like this:
```
for ex in seqio_data:
print(ex[“text”])
```
I need to convert the seqio_data (generator) into huggingface dataset.
the complete seqio code goes here:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_params=None):
dataset = load_dataset(**dataset_params)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_params=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_params=dataset_params),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_name)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
dataset_name = 'oscar-corpus/OSCAR-2109'
subset= 'mr'
dataset_params = {"path": dataset_name, "language":subset, "use_auth_token":True}
dataset_shapes = None
TaskRegistry.add(
"oscar_marathi_corpus",
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_params=dataset_params),
splits=("train", "validation"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
dataset = seqio.get_mixture_or_task("oscar_marathi_corpus").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42
)
for _, ex in zip(range(5), dataset):
print(ex['targets'].numpy().decode())
```
### Owner
_No response_ | 34 | how to convert a dict generator into a huggingface dataset.
### Link
_No response_
### Description
Hey there, I have used seqio to get a well distributed mixture of samples from multiple dataset. However the resultant output from seqio is a python generator dict, which I cannot produce back into huggingface dataset.
The generator contains all the samples needed for training the model but I cannot convert it into a huggingface dataset.
The code looks like this:
```
for ex in seqio_data:
print(ex[“text”])
```
I need to convert the seqio_data (generator) into huggingface dataset.
the complete seqio code goes here:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_params=None):
dataset = load_dataset(**dataset_params)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_params=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_params=dataset_params),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_name)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
dataset_name = 'oscar-corpus/OSCAR-2109'
subset= 'mr'
dataset_params = {"path": dataset_name, "language":subset, "use_auth_token":True}
dataset_shapes = None
TaskRegistry.add(
"oscar_marathi_corpus",
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_params=dataset_params),
splits=("train", "validation"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
dataset = seqio.get_mixture_or_task("oscar_marathi_corpus").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42
)
for _, ex in zip(range(5), dataset):
print(ex['targets'].numpy().decode())
```
### Owner
_No response_
Hi ! As mentioned on the [forum](https://discuss.huggingface.co/t/how-to-wrap-a-generator-with-hf-dataset/18464), the simplest for now would be to define a [dataset script](https://huggingface.co/docs/datasets/dataset_script) which can contain your generator. But we can also explore adding something like `ds = Dataset.from_iterable(seqio_dataset)` | [
-0.2356611043214798,
-0.5294454097747803,
0.023818079382181168,
0.32638633251190186,
0.4359237551689148,
-0.018439490348100662,
0.05949658155441284,
0.2877725660800934,
0.22911503911018372,
0.24235397577285767,
-0.2977548837661743,
0.10299661755561829,
-0.22395963966846466,
0.5133184194564819,
0.13184259831905365,
-0.223420649766922,
0.10111737251281738,
0.12503840029239655,
-0.256332129240036,
-0.15094423294067383,
-0.024126127362251282,
0.3305816650390625,
0.18056444823741913,
0.12474486231803894,
-0.07278795540332794,
0.051042456179857254,
-0.05738506466150284,
0.03495781868696213,
-0.5592506527900696,
0.2151000052690506,
0.3356219232082367,
0.23728488385677338,
-0.05609516799449921,
0.2405969798564911,
-0.00012041340960422531,
0.011252418160438538,
-0.14764340221881866,
-0.05951523780822754,
-0.03748549520969391,
-0.3290523290634155,
-0.14111189544200897,
0.15640410780906677,
-0.2155429720878601,
0.03374386578798294,
-0.2117002308368683,
0.11423464119434357,
-0.2645387649536133,
-0.2315617948770523,
0.8827856183052063,
0.3853742182254791,
0.13120856881141663,
0.058254748582839966,
0.25458183884620667,
-0.062463801354169846,
-0.04376908391714096,
0.4773828983306885,
-0.14499621093273163,
0.039532870054244995,
0.07538244873285294,
-0.05331570655107498,
0.18827968835830688,
0.057129524648189545,
-0.27666300535202026,
-0.34533265233039856,
0.3134000897407532,
0.08602962642908096,
-0.010637305676937103,
-0.5321673154830933,
0.2251158356666565,
0.45114076137542725,
0.2407839000225067,
-0.17671337723731995,
-0.24847853183746338,
-0.17360089719295502,
0.004291674122214317,
-0.3675316274166107,
-0.31399214267730713,
-0.12830494344234467,
-0.4041491448879242,
0.1465989053249359,
0.08082963526248932,
-0.31001439690589905,
-0.3173931837081909,
-0.2312585860490799,
-0.42061030864715576,
-0.06201918423175812,
-0.2021523416042328,
0.0019412152469158173,
0.13016822934150696,
-0.04692365974187851,
-0.3292063772678375,
0.15018218755722046,
0.041755661368370056,
0.04236097261309624,
-0.34176743030548096,
-0.10423242300748825,
0.14006474614143372,
0.026867970824241638,
0.41474857926368713,
0.2569507360458374,
-0.0056573497131466866,
-0.027274038642644882,
0.05407967045903206,
-0.07670334726572037,
0.1218041479587555,
0.3082921504974365,
-0.03304140269756317,
0.10697507113218307,
-0.07799674570560455,
-0.11081629246473312,
-0.02882375195622444,
-0.04750669002532959,
-0.1755852997303009,
-0.22787915170192719,
-0.007815156131982803,
-0.23117804527282715,
0.22130978107452393,
-0.1299549639225006,
-0.2110106348991394,
-0.011496472172439098,
0.010649390518665314,
0.19153718650341034,
-0.07528572529554367,
0.22681131958961487,
-0.06662842631340027,
0.21004170179367065,
0.15238109230995178,
0.5235421061515808,
-0.3275834619998932,
-0.20636588335037231,
-0.11158828437328339,
-0.05229177698493004,
0.006772488355636597,
0.09450337290763855,
-0.24851921200752258,
-0.14249858260154724,
0.010617539286613464,
0.11902893334627151,
0.25296157598495483,
-0.209229975938797,
-0.00348783191293478,
-0.009486157447099686,
0.27197423577308655,
0.09317778050899506,
0.03733165189623833,
0.07752713561058044,
0.3192778527736664,
-0.20698899030685425,
-0.17098018527030945,
-0.3374159336090088,
-0.00540710985660553,
-0.3673466145992279,
-0.15429435670375824,
0.05337582901120186,
-0.07207256555557251,
-0.019474558532238007,
-0.28894397616386414,
0.2268752008676529,
0.09561807662248611,
0.1160857081413269,
-0.02368362993001938,
-0.05167757719755173,
-0.1148405373096466,
-0.11024539917707443,
0.5718247890472412,
0.5491489768028259,
-0.2819739580154419,
-0.04659896343946457,
-0.3740173578262329,
-0.07609619200229645,
0.2432238757610321,
0.2956424355506897,
0.09217744320631027,
0.29097452759742737,
-0.23299089074134827,
-0.03915281221270561,
0.29552656412124634,
-0.3448220193386078,
-0.24687236547470093,
0.1725783795118332,
-0.16568610072135925,
0.11522112041711807,
0.1602797657251358,
-0.009876513853669167,
0.1407860517501831,
0.16605451703071594,
0.18341362476348877,
0.31767725944519043,
-0.2932208776473999,
-0.11316711455583572,
-0.034159354865550995,
-0.0420418307185173,
0.22859305143356323,
-0.14324061572551727,
0.11279109120368958,
0.5248817801475525,
-0.2842274308204651,
-0.13365177810192108,
0.27850931882858276,
-0.18709370493888855,
0.22202646732330322,
0.03301072120666504,
0.310335248708725,
0.2961236238479614,
-0.1107826754450798,
0.08711972087621689,
-0.1151973232626915,
-0.01672227680683136,
-0.12392889708280563,
0.18505097925662994,
-0.2694283723831177,
-0.11826259642839432,
-0.4308243691921234,
0.2963372468948364,
-0.2637321949005127,
-0.15612341463565826,
0.023865539580583572,
-0.08344589173793793,
0.5775659084320068,
0.02585846558213234,
-0.2097151130437851,
0.17942161858081818,
0.3365042507648468,
0.3155481815338135,
-0.6794306635856628,
0.2143261730670929,
0.16315923631191254,
-0.053721003234386444,
0.16794894635677338,
0.7571073770523071,
-0.06466778367757797,
0.1070830300450325,
0.19021165370941162,
0.010365508496761322,
-0.16235513985157013,
0.060185983777046204,
-0.034636080265045166,
0.2212279736995697,
0.07432182133197784,
-0.06369765847921371,
0.058705661445856094,
-0.3046143352985382,
-0.06351156532764435,
0.08956297487020493,
0.3781384229660034,
0.4530909061431885,
-0.04455726966261864,
0.44175755977630615,
-0.2961627244949341,
0.5692640542984009,
0.20702585577964783,
0.03358716890215874,
-0.22443290054798126,
-0.007877763360738754,
0.024681566283106804,
-0.06504210829734802,
0.4625294804573059,
0.0794818326830864,
-0.30805450677871704,
0.22220772504806519,
0.14638617634773254,
-0.15745268762111664,
0.0346049889922142,
0.07187032699584961,
-0.15256977081298828,
-0.05599028617143631,
-0.1654493361711502,
0.11526124179363251,
0.13104167580604553,
-0.06464668363332748,
-0.03642653301358223,
0.05371788144111633,
0.08697829395532608,
-0.05847308039665222,
0.046886153519153595,
-0.0009735748171806335,
0.13879252970218658,
0.11727982759475708,
-0.1699339598417282,
-0.025423958897590637,
-0.15274932980537415,
0.09244965016841888,
-0.1799841672182083,
0.19991439580917358,
-0.2712903618812561,
0.11546226590871811,
-0.1522534042596817,
-0.24907195568084717,
-0.2975539267063141,
-0.07178491353988647,
-0.38889482617378235,
-0.24241262674331665,
-0.25718873739242554,
0.04346922039985657,
0.09193649888038635,
-0.010635355487465858,
0.4552035629749298,
0.10057413578033447,
0.2640780508518219,
-0.05970244109630585,
-0.3983681797981262,
-0.35952994227409363,
-0.06743297725915909,
0.06648670136928558,
0.04404760152101517,
-0.11331222951412201,
0.20837408304214478,
-0.3103455603122711,
0.04859672486782074,
-0.33674153685569763,
0.11288752406835556,
0.15086042881011963,
-0.4559388756752014,
0.18117907643318176,
0.2658701539039612,
0.4236304759979248,
0.016381893306970596,
-0.08970409631729126,
0.04945844039320946,
0.09817419946193695,
-0.19601401686668396,
0.444612979888916,
-0.25628823041915894,
0.23493067920207977,
0.08932377398014069,
-0.011164247989654541,
-0.09570137411355972,
-0.11143265664577484,
0.30565744638442993,
-0.09232443571090698,
0.09377232939004898,
0.2335662543773651,
0.20850999653339386,
0.010414376854896545,
-0.2521216571331024,
0.10934030264616013,
-0.08116807043552399,
-0.5911011695861816,
0.26234865188598633,
-0.28558149933815,
-0.3184962868690491,
-0.10157224535942078,
-0.08788734674453735,
0.8734861016273499,
-0.02673596888780594,
-0.1387588381767273,
-0.09724878519773483,
-0.16141627728939056,
0.31157585978507996,
-0.08907237648963928,
0.06860101222991943,
0.18425893783569336,
-0.07797890901565552,
0.11783584952354431,
0.05072701722383499,
0.12516702711582184,
0.3527485430240631,
0.031913306564092636,
0.03398437798023224,
0.1483328938484192,
0.4057469367980957,
-0.13833287358283997,
0.5244123339653015,
0.3790161609649658,
0.07672890275716782,
0.04905848950147629,
-0.17749862372875214,
0.09968174993991852,
-0.12405338138341904,
-0.4137384593486786,
0.15707580745220184,
0.09278497099876404,
-0.05173853784799576,
0.015698067843914032,
-0.021659836173057556,
0.740490198135376,
-0.168460875749588,
0.32538342475891113,
-0.1630173772573471,
-0.2664024531841278,
-0.12297746539115906,
-0.44874367117881775,
0.12064649164676666,
-0.1701764166355133,
0.0921965017914772,
-0.17975690960884094,
0.024485275149345398,
0.17934182286262512,
0.15331561863422394,
0.5704125761985779,
0.1505003273487091,
0.021277744323015213,
-0.16840915381908417,
-0.8259093165397644,
0.0019906610250473022,
-0.208978071808815,
-0.26439353823661804,
-0.006279699504375458,
0.03553108125925064,
0.061228156089782715,
0.17910584807395935,
0.9725092649459839,
0.24260620772838593,
-0.15607011318206787,
0.0467698760330677,
-0.28408437967300415,
-0.5021288394927979,
0.13319526612758636,
0.05509975180029869,
-0.0325656495988369,
0.01893862709403038,
-0.10083281993865967,
-0.5409141778945923,
-0.31976261734962463,
-0.01775510609149933,
0.26118943095207214,
-0.2890709340572357,
0.15352831780910492,
-0.28360000252723694,
-0.2053341269493103,
-0.2118171751499176,
-0.13777592778205872,
0.060210928320884705,
0.4127071797847748,
-0.054528191685676575,
-0.05249026045203209,
0.04953233152627945,
-0.18714210391044617,
0.10453211516141891,
0.06471326947212219,
0.3183838129043579,
-0.16919706761837006,
-0.06917400658130646,
0.3315044939517975,
0.07577341794967651,
-0.19086410105228424,
0.20533180236816406,
-0.018439162522554398,
-0.48110175132751465,
-0.1940174102783203,
0.14069682359695435,
0.24777460098266602,
-0.14766094088554382,
-0.21478447318077087,
0.34593796730041504,
-0.1468919962644577,
0.14397817850112915,
-0.48415371775627136,
-0.0612017847597599,
0.41389134526252747,
0.201988086104393,
-0.0962061807513237,
-0.43100878596305847,
0.3464459776878357,
0.15914230048656464,
0.1522439420223236,
-0.19835427403450012,
0.5254842042922974,
-0.20006868243217468,
0.427389919757843,
0.09585822373628616,
0.8359091877937317,
-0.4967048168182373,
0.23294539749622345,
0.561822772026062,
0.33401525020599365,
0.8295431733131409,
-0.025389553979039192,
0.04263236001133919,
-0.303618848323822,
0.15492790937423706,
-0.03263773396611214,
-0.03140605241060257,
-0.05775127559900284,
-0.010099560022354126,
-0.19293305277824402,
0.04000411927700043,
-0.2636655569076538,
-0.06518350541591644,
-0.06304226815700531,
-0.18738196790218353,
-0.028715545311570168,
-0.1535082757472992,
-0.16100984811782837,
0.01875939965248108,
-0.2056194394826889,
0.5768225789070129,
-0.010729284957051277,
-0.130656898021698,
-0.28669893741607666,
0.1736336350440979,
-0.2008974850177765,
0.059327028691768646,
-0.052462946623563766,
-0.184662863612175,
0.3722628355026245,
-0.3314097821712494,
0.10656143724918365,
0.6841478943824768,
0.46808183193206787,
0.025989297777414322,
-0.33263111114501953,
-0.11187544465065002,
-0.04354752600193024,
-0.0612998865544796,
0.09928949922323227,
-0.22475406527519226,
0.266266793012619,
0.06498558819293976,
-0.09613765776157379,
0.2987026572227478,
0.14152716100215912,
0.011031080037355423,
-0.4504334032535553,
-0.4370521903038025,
0.22938159108161926,
-0.3846753239631653,
0.27210935950279236,
0.23198391497135162,
0.3093315064907074,
-0.12310606241226196,
-0.0033005811274051666,
0.4282325506210327,
-0.32063496112823486,
0.24476730823516846,
-0.3915395140647888,
-0.06277520954608917,
0.09161950647830963,
0.12226552516222,
-0.05814250558614731,
-0.02737482264637947,
0.4006408452987671,
0.21763695776462555,
0.1778578907251358,
-0.09480464458465576,
-0.22190266847610474,
0.37007826566696167,
-0.40653589367866516,
0.38668903708457947,
-0.010716321878135204,
0.022087842226028442,
-0.1176375076174736,
0.1633242815732956,
-0.003564927726984024,
-0.25592368841171265,
0.04313851520419121,
-0.15180936455726624,
-0.403582364320755,
-0.05842523276805878,
0.0297097098082304,
-0.05835879221558571,
0.023224469274282455,
0.19291049242019653,
-0.12304659932851791,
0.23543214797973633,
-0.22381272912025452,
-0.2667703330516815,
-0.021939951926469803,
0.021149881184101105,
0.23099365830421448,
-0.2568458020687103,
-0.15372097492218018,
-0.016910914331674576,
0.058434754610061646,
0.07152733951807022,
-0.1446535587310791,
-0.11816851794719696,
-0.22234030067920685,
0.14002351462841034,
0.04984157904982567,
-0.14216399192810059,
0.36346015334129333,
0.14215384423732758,
-0.23697078227996826,
-0.3115988075733185,
0.4277398884296417,
0.2211904227733612,
0.00274793803691864,
0.0022120075300335884,
-0.09740957617759705,
0.32292434573173523,
-0.45364195108413696,
-0.13072475790977478,
0.07920892536640167,
0.07107231765985489,
0.07374919950962067,
0.36613667011260986,
-0.08651977777481079,
-0.27643275260925293,
-0.04444645345211029,
0.2341306209564209,
0.06463764607906342,
-0.35342898964881897,
0.4543966054916382,
-0.08579738438129425,
-0.08127492666244507,
0.21008135378360748,
0.5304523706436157,
0.22702926397323608,
0.00439039058983326,
0.179167240858078,
0.17517799139022827,
0.10196098685264587,
-0.10724332183599472,
0.2993565499782562,
-0.19541342556476593,
-0.24858282506465912,
-0.013118036091327667,
0.30818355083465576,
-0.16139960289001465,
-0.07439979165792465,
-0.14118483662605286,
-0.2033107578754425,
-0.052180469036102295,
0.03011222742497921,
0.21638306975364685,
0.40970003604888916,
0.2604445815086365,
0.17355430126190186,
0.11994943767786026,
0.2106347382068634,
0.12163842469453812,
0.38300323486328125,
-0.14958304166793823,
0.5344508290290833,
-0.6321101188659668,
0.11008552461862564,
0.4394211173057556,
-0.2944062650203705,
0.10658924281597137,
0.09319397807121277,
-0.3377265930175781,
0.10487692803144455,
-0.2544233202934265,
0.3543289303779602,
-0.10652854293584824,
-0.13427481055259705,
-0.27235662937164307,
0.4891595244407654,
-0.1620807647705078,
-0.18314732611179352,
-0.1912584751844406,
-0.19893339276313782,
-0.07666052132844925,
-0.02846190333366394,
0.04343222826719284,
-0.321086585521698,
-0.1470562219619751,
-0.0034599527716636658,
0.03385777771472931,
-0.1280052214860916,
-0.12898558378219604,
0.008826503530144691,
-0.026066496968269348,
-0.13088876008987427,
-0.09217866510152817,
0.20939430594444275,
-0.5083575248718262,
0.0013322383165359497,
0.4049331843852997,
0.2758959233760834,
-0.026301659643650055,
-0.06158066913485527,
0.42652466893196106,
0.0516543872654438,
-0.10182327032089233,
-0.03060780093073845,
-0.004543788731098175,
-0.16040846705436707,
0.12413914501667023,
0.19492509961128235,
-0.01413729228079319,
-0.016551868990063667,
-0.5287272334098816,
0.14600133895874023,
0.45813101530075073,
-0.2641419768333435,
0.30808866024017334,
-0.11738546192646027,
-0.07412727922201157,
-0.44300153851509094,
0.16288727521896362,
-0.44052499532699585,
0.06527974456548691,
-0.021660130470991135,
0.07197295129299164,
-0.09185703098773956,
-0.3206789493560791,
0.03288104012608528,
0.06412790715694427,
0.38410454988479614,
0.40207281708717346,
0.18342149257659912,
-0.3030431568622589,
-0.10970693826675415,
-0.2304036170244217,
0.13928672671318054,
0.3322724997997284,
0.21494248509407043,
-0.1104934886097908,
0.06010958552360535,
-0.06633002310991287,
0.14870814979076385,
-0.3217294216156006,
0.009778551757335663,
0.04177239164710045,
0.1862279176712036,
-0.009960418567061424,
-0.33806705474853516,
-0.14432062208652496,
-0.012743229046463966,
0.04121829569339752,
0.058638639748096466,
0.29958540201187134,
-0.015375802293419838,
0.03075743466615677,
-0.034210484474897385,
0.32184502482414246,
0.050545234233140945,
-0.1019773930311203,
-0.1472524106502533,
0.42861542105674744,
-0.16322821378707886,
0.0006655678153038025,
-0.04992326349020004,
0.02923155203461647,
0.36633843183517456,
-0.2725326716899872,
0.03035709261894226,
-0.06980116665363312,
0.2467103898525238,
-0.07114644348621368,
-0.16504059731960297,
-0.3278750777244568,
0.10043811053037643,
0.29965221881866455,
-0.4137957990169525,
-0.3468659222126007,
0.28459829092025757,
0.07059916108846664,
-0.18264679610729218,
0.28665891289711,
0.38686680793762207,
-0.05015811324119568,
0.24120904505252838,
-0.3673957586288452,
-0.046699702739715576,
0.1407032459974289,
-0.33288589119911194,
-0.14148761332035065,
-0.17234225571155548,
0.21368886530399323,
-0.006733588874340057,
-0.38483160734176636,
-0.05993393063545227,
0.2246115803718567,
0.02322963997721672,
-0.07820424437522888,
0.31753256916999817,
0.17765037715435028,
0.18376874923706055,
-0.043653883039951324,
-0.11022055149078369,
0.466231107711792,
0.3630123436450958,
-0.0053563192486763,
0.5454837679862976,
-0.07788233458995819
] |
https://github.com/huggingface/datasets/issues/4417 | how to convert a dict generator into a huggingface dataset. | @lhoestq , hey i did as you instructed, but sadly i cannot get pass through the download_manager, as i dont have anything to download. i was skipping the ` def _split_generators(self, dl_manager):` function. but i cannot get around it. I get a `NotImplementedError: `
the following is my code for the same:
```
import datasets
import functools
import glob
from datasets import load_from_disk
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
data_path = glob.glob("/home/stephen/Desktop/MEGA_CORPUS/COMBINED_CORPUS/*", recursive=False)
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_path=None):
dataset = load_from_disk(dataset_path)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_path=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_path=dataset_path),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_path)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
_CITATION = "Not ready yet"
_DESCRIPTION = "a custom seqio based mixed samples on a given temperature value, that again returns a dataset in HF dataset format well samples on the Mixture temperature"
_HOMEPAGE = "ldcil.org"
class CustomSeqio(datasets.GeneratorBasedBuilder):
def _info(self):
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=datasets.Features(
{
"text": datasets.Value("string"),
}
),
homepage="https://ldcil.org",
citation=_CITATION,)
def generate_examples(self):
seqio_train_list = []
for lang in data_path:
dataset_name = lang.split("/")[-1]
dataset_shapes = None
TaskRegistry.add(
str(dataset_name),
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_path=lang),
splits=("train", "test"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
seqio_train_dataset = seqio.get_mixture_or_task(dataset_name).get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
seqio_train_list.append(seqio_train_dataset)
lang_name_list = []
for lang in data_path:
lang_name = lang.split("/")[-1]
lang_name_list.append(lang_name)
seqio_mixture = seqio.MixtureRegistry.add(
"seqio_mixture",
lang_name_list,
default_rate=0.7)
seqio_mixture_dataset = seqio.get_mixture_or_task("seqio_mixture").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
for id, ex in enumerate(seqio_mixture_dataset):
yield id, {"text": ex["targets"].numpy().decode()}
```
and i load it by:
`seqio_mixture = load_dataset("seqio_loader")` | ### Link
_No response_
### Description
Hey there, I have used seqio to get a well distributed mixture of samples from multiple dataset. However the resultant output from seqio is a python generator dict, which I cannot produce back into huggingface dataset.
The generator contains all the samples needed for training the model but I cannot convert it into a huggingface dataset.
The code looks like this:
```
for ex in seqio_data:
print(ex[“text”])
```
I need to convert the seqio_data (generator) into huggingface dataset.
the complete seqio code goes here:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_params=None):
dataset = load_dataset(**dataset_params)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_params=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_params=dataset_params),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_name)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
dataset_name = 'oscar-corpus/OSCAR-2109'
subset= 'mr'
dataset_params = {"path": dataset_name, "language":subset, "use_auth_token":True}
dataset_shapes = None
TaskRegistry.add(
"oscar_marathi_corpus",
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_params=dataset_params),
splits=("train", "validation"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
dataset = seqio.get_mixture_or_task("oscar_marathi_corpus").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42
)
for _, ex in zip(range(5), dataset):
print(ex['targets'].numpy().decode())
```
### Owner
_No response_ | 311 | how to convert a dict generator into a huggingface dataset.
### Link
_No response_
### Description
Hey there, I have used seqio to get a well distributed mixture of samples from multiple dataset. However the resultant output from seqio is a python generator dict, which I cannot produce back into huggingface dataset.
The generator contains all the samples needed for training the model but I cannot convert it into a huggingface dataset.
The code looks like this:
```
for ex in seqio_data:
print(ex[“text”])
```
I need to convert the seqio_data (generator) into huggingface dataset.
the complete seqio code goes here:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_params=None):
dataset = load_dataset(**dataset_params)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_params=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_params=dataset_params),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_name)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
dataset_name = 'oscar-corpus/OSCAR-2109'
subset= 'mr'
dataset_params = {"path": dataset_name, "language":subset, "use_auth_token":True}
dataset_shapes = None
TaskRegistry.add(
"oscar_marathi_corpus",
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_params=dataset_params),
splits=("train", "validation"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
dataset = seqio.get_mixture_or_task("oscar_marathi_corpus").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42
)
for _, ex in zip(range(5), dataset):
print(ex['targets'].numpy().decode())
```
### Owner
_No response_
@lhoestq , hey i did as you instructed, but sadly i cannot get pass through the download_manager, as i dont have anything to download. i was skipping the ` def _split_generators(self, dl_manager):` function. but i cannot get around it. I get a `NotImplementedError: `
the following is my code for the same:
```
import datasets
import functools
import glob
from datasets import load_from_disk
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
data_path = glob.glob("/home/stephen/Desktop/MEGA_CORPUS/COMBINED_CORPUS/*", recursive=False)
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_path=None):
dataset = load_from_disk(dataset_path)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_path=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_path=dataset_path),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_path)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
_CITATION = "Not ready yet"
_DESCRIPTION = "a custom seqio based mixed samples on a given temperature value, that again returns a dataset in HF dataset format well samples on the Mixture temperature"
_HOMEPAGE = "ldcil.org"
class CustomSeqio(datasets.GeneratorBasedBuilder):
def _info(self):
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=datasets.Features(
{
"text": datasets.Value("string"),
}
),
homepage="https://ldcil.org",
citation=_CITATION,)
def generate_examples(self):
seqio_train_list = []
for lang in data_path:
dataset_name = lang.split("/")[-1]
dataset_shapes = None
TaskRegistry.add(
str(dataset_name),
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_path=lang),
splits=("train", "test"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
seqio_train_dataset = seqio.get_mixture_or_task(dataset_name).get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
seqio_train_list.append(seqio_train_dataset)
lang_name_list = []
for lang in data_path:
lang_name = lang.split("/")[-1]
lang_name_list.append(lang_name)
seqio_mixture = seqio.MixtureRegistry.add(
"seqio_mixture",
lang_name_list,
default_rate=0.7)
seqio_mixture_dataset = seqio.get_mixture_or_task("seqio_mixture").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
for id, ex in enumerate(seqio_mixture_dataset):
yield id, {"text": ex["targets"].numpy().decode()}
```
and i load it by:
`seqio_mixture = load_dataset("seqio_loader")` | [
-0.2356611043214798,
-0.5294454097747803,
0.023818079382181168,
0.32638633251190186,
0.4359237551689148,
-0.018439490348100662,
0.05949658155441284,
0.2877725660800934,
0.22911503911018372,
0.24235397577285767,
-0.2977548837661743,
0.10299661755561829,
-0.22395963966846466,
0.5133184194564819,
0.13184259831905365,
-0.223420649766922,
0.10111737251281738,
0.12503840029239655,
-0.256332129240036,
-0.15094423294067383,
-0.024126127362251282,
0.3305816650390625,
0.18056444823741913,
0.12474486231803894,
-0.07278795540332794,
0.051042456179857254,
-0.05738506466150284,
0.03495781868696213,
-0.5592506527900696,
0.2151000052690506,
0.3356219232082367,
0.23728488385677338,
-0.05609516799449921,
0.2405969798564911,
-0.00012041340960422531,
0.011252418160438538,
-0.14764340221881866,
-0.05951523780822754,
-0.03748549520969391,
-0.3290523290634155,
-0.14111189544200897,
0.15640410780906677,
-0.2155429720878601,
0.03374386578798294,
-0.2117002308368683,
0.11423464119434357,
-0.2645387649536133,
-0.2315617948770523,
0.8827856183052063,
0.3853742182254791,
0.13120856881141663,
0.058254748582839966,
0.25458183884620667,
-0.062463801354169846,
-0.04376908391714096,
0.4773828983306885,
-0.14499621093273163,
0.039532870054244995,
0.07538244873285294,
-0.05331570655107498,
0.18827968835830688,
0.057129524648189545,
-0.27666300535202026,
-0.34533265233039856,
0.3134000897407532,
0.08602962642908096,
-0.010637305676937103,
-0.5321673154830933,
0.2251158356666565,
0.45114076137542725,
0.2407839000225067,
-0.17671337723731995,
-0.24847853183746338,
-0.17360089719295502,
0.004291674122214317,
-0.3675316274166107,
-0.31399214267730713,
-0.12830494344234467,
-0.4041491448879242,
0.1465989053249359,
0.08082963526248932,
-0.31001439690589905,
-0.3173931837081909,
-0.2312585860490799,
-0.42061030864715576,
-0.06201918423175812,
-0.2021523416042328,
0.0019412152469158173,
0.13016822934150696,
-0.04692365974187851,
-0.3292063772678375,
0.15018218755722046,
0.041755661368370056,
0.04236097261309624,
-0.34176743030548096,
-0.10423242300748825,
0.14006474614143372,
0.026867970824241638,
0.41474857926368713,
0.2569507360458374,
-0.0056573497131466866,
-0.027274038642644882,
0.05407967045903206,
-0.07670334726572037,
0.1218041479587555,
0.3082921504974365,
-0.03304140269756317,
0.10697507113218307,
-0.07799674570560455,
-0.11081629246473312,
-0.02882375195622444,
-0.04750669002532959,
-0.1755852997303009,
-0.22787915170192719,
-0.007815156131982803,
-0.23117804527282715,
0.22130978107452393,
-0.1299549639225006,
-0.2110106348991394,
-0.011496472172439098,
0.010649390518665314,
0.19153718650341034,
-0.07528572529554367,
0.22681131958961487,
-0.06662842631340027,
0.21004170179367065,
0.15238109230995178,
0.5235421061515808,
-0.3275834619998932,
-0.20636588335037231,
-0.11158828437328339,
-0.05229177698493004,
0.006772488355636597,
0.09450337290763855,
-0.24851921200752258,
-0.14249858260154724,
0.010617539286613464,
0.11902893334627151,
0.25296157598495483,
-0.209229975938797,
-0.00348783191293478,
-0.009486157447099686,
0.27197423577308655,
0.09317778050899506,
0.03733165189623833,
0.07752713561058044,
0.3192778527736664,
-0.20698899030685425,
-0.17098018527030945,
-0.3374159336090088,
-0.00540710985660553,
-0.3673466145992279,
-0.15429435670375824,
0.05337582901120186,
-0.07207256555557251,
-0.019474558532238007,
-0.28894397616386414,
0.2268752008676529,
0.09561807662248611,
0.1160857081413269,
-0.02368362993001938,
-0.05167757719755173,
-0.1148405373096466,
-0.11024539917707443,
0.5718247890472412,
0.5491489768028259,
-0.2819739580154419,
-0.04659896343946457,
-0.3740173578262329,
-0.07609619200229645,
0.2432238757610321,
0.2956424355506897,
0.09217744320631027,
0.29097452759742737,
-0.23299089074134827,
-0.03915281221270561,
0.29552656412124634,
-0.3448220193386078,
-0.24687236547470093,
0.1725783795118332,
-0.16568610072135925,
0.11522112041711807,
0.1602797657251358,
-0.009876513853669167,
0.1407860517501831,
0.16605451703071594,
0.18341362476348877,
0.31767725944519043,
-0.2932208776473999,
-0.11316711455583572,
-0.034159354865550995,
-0.0420418307185173,
0.22859305143356323,
-0.14324061572551727,
0.11279109120368958,
0.5248817801475525,
-0.2842274308204651,
-0.13365177810192108,
0.27850931882858276,
-0.18709370493888855,
0.22202646732330322,
0.03301072120666504,
0.310335248708725,
0.2961236238479614,
-0.1107826754450798,
0.08711972087621689,
-0.1151973232626915,
-0.01672227680683136,
-0.12392889708280563,
0.18505097925662994,
-0.2694283723831177,
-0.11826259642839432,
-0.4308243691921234,
0.2963372468948364,
-0.2637321949005127,
-0.15612341463565826,
0.023865539580583572,
-0.08344589173793793,
0.5775659084320068,
0.02585846558213234,
-0.2097151130437851,
0.17942161858081818,
0.3365042507648468,
0.3155481815338135,
-0.6794306635856628,
0.2143261730670929,
0.16315923631191254,
-0.053721003234386444,
0.16794894635677338,
0.7571073770523071,
-0.06466778367757797,
0.1070830300450325,
0.19021165370941162,
0.010365508496761322,
-0.16235513985157013,
0.060185983777046204,
-0.034636080265045166,
0.2212279736995697,
0.07432182133197784,
-0.06369765847921371,
0.058705661445856094,
-0.3046143352985382,
-0.06351156532764435,
0.08956297487020493,
0.3781384229660034,
0.4530909061431885,
-0.04455726966261864,
0.44175755977630615,
-0.2961627244949341,
0.5692640542984009,
0.20702585577964783,
0.03358716890215874,
-0.22443290054798126,
-0.007877763360738754,
0.024681566283106804,
-0.06504210829734802,
0.4625294804573059,
0.0794818326830864,
-0.30805450677871704,
0.22220772504806519,
0.14638617634773254,
-0.15745268762111664,
0.0346049889922142,
0.07187032699584961,
-0.15256977081298828,
-0.05599028617143631,
-0.1654493361711502,
0.11526124179363251,
0.13104167580604553,
-0.06464668363332748,
-0.03642653301358223,
0.05371788144111633,
0.08697829395532608,
-0.05847308039665222,
0.046886153519153595,
-0.0009735748171806335,
0.13879252970218658,
0.11727982759475708,
-0.1699339598417282,
-0.025423958897590637,
-0.15274932980537415,
0.09244965016841888,
-0.1799841672182083,
0.19991439580917358,
-0.2712903618812561,
0.11546226590871811,
-0.1522534042596817,
-0.24907195568084717,
-0.2975539267063141,
-0.07178491353988647,
-0.38889482617378235,
-0.24241262674331665,
-0.25718873739242554,
0.04346922039985657,
0.09193649888038635,
-0.010635355487465858,
0.4552035629749298,
0.10057413578033447,
0.2640780508518219,
-0.05970244109630585,
-0.3983681797981262,
-0.35952994227409363,
-0.06743297725915909,
0.06648670136928558,
0.04404760152101517,
-0.11331222951412201,
0.20837408304214478,
-0.3103455603122711,
0.04859672486782074,
-0.33674153685569763,
0.11288752406835556,
0.15086042881011963,
-0.4559388756752014,
0.18117907643318176,
0.2658701539039612,
0.4236304759979248,
0.016381893306970596,
-0.08970409631729126,
0.04945844039320946,
0.09817419946193695,
-0.19601401686668396,
0.444612979888916,
-0.25628823041915894,
0.23493067920207977,
0.08932377398014069,
-0.011164247989654541,
-0.09570137411355972,
-0.11143265664577484,
0.30565744638442993,
-0.09232443571090698,
0.09377232939004898,
0.2335662543773651,
0.20850999653339386,
0.010414376854896545,
-0.2521216571331024,
0.10934030264616013,
-0.08116807043552399,
-0.5911011695861816,
0.26234865188598633,
-0.28558149933815,
-0.3184962868690491,
-0.10157224535942078,
-0.08788734674453735,
0.8734861016273499,
-0.02673596888780594,
-0.1387588381767273,
-0.09724878519773483,
-0.16141627728939056,
0.31157585978507996,
-0.08907237648963928,
0.06860101222991943,
0.18425893783569336,
-0.07797890901565552,
0.11783584952354431,
0.05072701722383499,
0.12516702711582184,
0.3527485430240631,
0.031913306564092636,
0.03398437798023224,
0.1483328938484192,
0.4057469367980957,
-0.13833287358283997,
0.5244123339653015,
0.3790161609649658,
0.07672890275716782,
0.04905848950147629,
-0.17749862372875214,
0.09968174993991852,
-0.12405338138341904,
-0.4137384593486786,
0.15707580745220184,
0.09278497099876404,
-0.05173853784799576,
0.015698067843914032,
-0.021659836173057556,
0.740490198135376,
-0.168460875749588,
0.32538342475891113,
-0.1630173772573471,
-0.2664024531841278,
-0.12297746539115906,
-0.44874367117881775,
0.12064649164676666,
-0.1701764166355133,
0.0921965017914772,
-0.17975690960884094,
0.024485275149345398,
0.17934182286262512,
0.15331561863422394,
0.5704125761985779,
0.1505003273487091,
0.021277744323015213,
-0.16840915381908417,
-0.8259093165397644,
0.0019906610250473022,
-0.208978071808815,
-0.26439353823661804,
-0.006279699504375458,
0.03553108125925064,
0.061228156089782715,
0.17910584807395935,
0.9725092649459839,
0.24260620772838593,
-0.15607011318206787,
0.0467698760330677,
-0.28408437967300415,
-0.5021288394927979,
0.13319526612758636,
0.05509975180029869,
-0.0325656495988369,
0.01893862709403038,
-0.10083281993865967,
-0.5409141778945923,
-0.31976261734962463,
-0.01775510609149933,
0.26118943095207214,
-0.2890709340572357,
0.15352831780910492,
-0.28360000252723694,
-0.2053341269493103,
-0.2118171751499176,
-0.13777592778205872,
0.060210928320884705,
0.4127071797847748,
-0.054528191685676575,
-0.05249026045203209,
0.04953233152627945,
-0.18714210391044617,
0.10453211516141891,
0.06471326947212219,
0.3183838129043579,
-0.16919706761837006,
-0.06917400658130646,
0.3315044939517975,
0.07577341794967651,
-0.19086410105228424,
0.20533180236816406,
-0.018439162522554398,
-0.48110175132751465,
-0.1940174102783203,
0.14069682359695435,
0.24777460098266602,
-0.14766094088554382,
-0.21478447318077087,
0.34593796730041504,
-0.1468919962644577,
0.14397817850112915,
-0.48415371775627136,
-0.0612017847597599,
0.41389134526252747,
0.201988086104393,
-0.0962061807513237,
-0.43100878596305847,
0.3464459776878357,
0.15914230048656464,
0.1522439420223236,
-0.19835427403450012,
0.5254842042922974,
-0.20006868243217468,
0.427389919757843,
0.09585822373628616,
0.8359091877937317,
-0.4967048168182373,
0.23294539749622345,
0.561822772026062,
0.33401525020599365,
0.8295431733131409,
-0.025389553979039192,
0.04263236001133919,
-0.303618848323822,
0.15492790937423706,
-0.03263773396611214,
-0.03140605241060257,
-0.05775127559900284,
-0.010099560022354126,
-0.19293305277824402,
0.04000411927700043,
-0.2636655569076538,
-0.06518350541591644,
-0.06304226815700531,
-0.18738196790218353,
-0.028715545311570168,
-0.1535082757472992,
-0.16100984811782837,
0.01875939965248108,
-0.2056194394826889,
0.5768225789070129,
-0.010729284957051277,
-0.130656898021698,
-0.28669893741607666,
0.1736336350440979,
-0.2008974850177765,
0.059327028691768646,
-0.052462946623563766,
-0.184662863612175,
0.3722628355026245,
-0.3314097821712494,
0.10656143724918365,
0.6841478943824768,
0.46808183193206787,
0.025989297777414322,
-0.33263111114501953,
-0.11187544465065002,
-0.04354752600193024,
-0.0612998865544796,
0.09928949922323227,
-0.22475406527519226,
0.266266793012619,
0.06498558819293976,
-0.09613765776157379,
0.2987026572227478,
0.14152716100215912,
0.011031080037355423,
-0.4504334032535553,
-0.4370521903038025,
0.22938159108161926,
-0.3846753239631653,
0.27210935950279236,
0.23198391497135162,
0.3093315064907074,
-0.12310606241226196,
-0.0033005811274051666,
0.4282325506210327,
-0.32063496112823486,
0.24476730823516846,
-0.3915395140647888,
-0.06277520954608917,
0.09161950647830963,
0.12226552516222,
-0.05814250558614731,
-0.02737482264637947,
0.4006408452987671,
0.21763695776462555,
0.1778578907251358,
-0.09480464458465576,
-0.22190266847610474,
0.37007826566696167,
-0.40653589367866516,
0.38668903708457947,
-0.010716321878135204,
0.022087842226028442,
-0.1176375076174736,
0.1633242815732956,
-0.003564927726984024,
-0.25592368841171265,
0.04313851520419121,
-0.15180936455726624,
-0.403582364320755,
-0.05842523276805878,
0.0297097098082304,
-0.05835879221558571,
0.023224469274282455,
0.19291049242019653,
-0.12304659932851791,
0.23543214797973633,
-0.22381272912025452,
-0.2667703330516815,
-0.021939951926469803,
0.021149881184101105,
0.23099365830421448,
-0.2568458020687103,
-0.15372097492218018,
-0.016910914331674576,
0.058434754610061646,
0.07152733951807022,
-0.1446535587310791,
-0.11816851794719696,
-0.22234030067920685,
0.14002351462841034,
0.04984157904982567,
-0.14216399192810059,
0.36346015334129333,
0.14215384423732758,
-0.23697078227996826,
-0.3115988075733185,
0.4277398884296417,
0.2211904227733612,
0.00274793803691864,
0.0022120075300335884,
-0.09740957617759705,
0.32292434573173523,
-0.45364195108413696,
-0.13072475790977478,
0.07920892536640167,
0.07107231765985489,
0.07374919950962067,
0.36613667011260986,
-0.08651977777481079,
-0.27643275260925293,
-0.04444645345211029,
0.2341306209564209,
0.06463764607906342,
-0.35342898964881897,
0.4543966054916382,
-0.08579738438129425,
-0.08127492666244507,
0.21008135378360748,
0.5304523706436157,
0.22702926397323608,
0.00439039058983326,
0.179167240858078,
0.17517799139022827,
0.10196098685264587,
-0.10724332183599472,
0.2993565499782562,
-0.19541342556476593,
-0.24858282506465912,
-0.013118036091327667,
0.30818355083465576,
-0.16139960289001465,
-0.07439979165792465,
-0.14118483662605286,
-0.2033107578754425,
-0.052180469036102295,
0.03011222742497921,
0.21638306975364685,
0.40970003604888916,
0.2604445815086365,
0.17355430126190186,
0.11994943767786026,
0.2106347382068634,
0.12163842469453812,
0.38300323486328125,
-0.14958304166793823,
0.5344508290290833,
-0.6321101188659668,
0.11008552461862564,
0.4394211173057556,
-0.2944062650203705,
0.10658924281597137,
0.09319397807121277,
-0.3377265930175781,
0.10487692803144455,
-0.2544233202934265,
0.3543289303779602,
-0.10652854293584824,
-0.13427481055259705,
-0.27235662937164307,
0.4891595244407654,
-0.1620807647705078,
-0.18314732611179352,
-0.1912584751844406,
-0.19893339276313782,
-0.07666052132844925,
-0.02846190333366394,
0.04343222826719284,
-0.321086585521698,
-0.1470562219619751,
-0.0034599527716636658,
0.03385777771472931,
-0.1280052214860916,
-0.12898558378219604,
0.008826503530144691,
-0.026066496968269348,
-0.13088876008987427,
-0.09217866510152817,
0.20939430594444275,
-0.5083575248718262,
0.0013322383165359497,
0.4049331843852997,
0.2758959233760834,
-0.026301659643650055,
-0.06158066913485527,
0.42652466893196106,
0.0516543872654438,
-0.10182327032089233,
-0.03060780093073845,
-0.004543788731098175,
-0.16040846705436707,
0.12413914501667023,
0.19492509961128235,
-0.01413729228079319,
-0.016551868990063667,
-0.5287272334098816,
0.14600133895874023,
0.45813101530075073,
-0.2641419768333435,
0.30808866024017334,
-0.11738546192646027,
-0.07412727922201157,
-0.44300153851509094,
0.16288727521896362,
-0.44052499532699585,
0.06527974456548691,
-0.021660130470991135,
0.07197295129299164,
-0.09185703098773956,
-0.3206789493560791,
0.03288104012608528,
0.06412790715694427,
0.38410454988479614,
0.40207281708717346,
0.18342149257659912,
-0.3030431568622589,
-0.10970693826675415,
-0.2304036170244217,
0.13928672671318054,
0.3322724997997284,
0.21494248509407043,
-0.1104934886097908,
0.06010958552360535,
-0.06633002310991287,
0.14870814979076385,
-0.3217294216156006,
0.009778551757335663,
0.04177239164710045,
0.1862279176712036,
-0.009960418567061424,
-0.33806705474853516,
-0.14432062208652496,
-0.012743229046463966,
0.04121829569339752,
0.058638639748096466,
0.29958540201187134,
-0.015375802293419838,
0.03075743466615677,
-0.034210484474897385,
0.32184502482414246,
0.050545234233140945,
-0.1019773930311203,
-0.1472524106502533,
0.42861542105674744,
-0.16322821378707886,
0.0006655678153038025,
-0.04992326349020004,
0.02923155203461647,
0.36633843183517456,
-0.2725326716899872,
0.03035709261894226,
-0.06980116665363312,
0.2467103898525238,
-0.07114644348621368,
-0.16504059731960297,
-0.3278750777244568,
0.10043811053037643,
0.29965221881866455,
-0.4137957990169525,
-0.3468659222126007,
0.28459829092025757,
0.07059916108846664,
-0.18264679610729218,
0.28665891289711,
0.38686680793762207,
-0.05015811324119568,
0.24120904505252838,
-0.3673957586288452,
-0.046699702739715576,
0.1407032459974289,
-0.33288589119911194,
-0.14148761332035065,
-0.17234225571155548,
0.21368886530399323,
-0.006733588874340057,
-0.38483160734176636,
-0.05993393063545227,
0.2246115803718567,
0.02322963997721672,
-0.07820424437522888,
0.31753256916999817,
0.17765037715435028,
0.18376874923706055,
-0.043653883039951324,
-0.11022055149078369,
0.466231107711792,
0.3630123436450958,
-0.0053563192486763,
0.5454837679862976,
-0.07788233458995819
] |
https://github.com/huggingface/datasets/issues/4417 | how to convert a dict generator into a huggingface dataset. | @lhoestq , just to make things clear ...
the following is my original code, thats not in the HF dataset loading script:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_from_disk
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
import glob
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_path=None):
dataset = load_from_disk(dataset_path)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_path=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_path=dataset_path),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_path)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
data_path = glob.glob("/home/stephen/Desktop/MEGA_CORPUS/COMBINED_CORPUS/*", recursive=False)
seqio_train_list = []
for lang in data_path:
dataset_name = lang.split("/")[-1]
dataset_shapes = None
TaskRegistry.add(
str(dataset_name),
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_path=lang),
splits=("train", "test"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
seqio_train_dataset = seqio.get_mixture_or_task(dataset_name).get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
seqio_train_list.append(seqio_train_dataset)
lang_name_list = []
for lang in data_path:
lang_name = lang.split("/")[-1]
lang_name_list.append(lang_name)
seqio_mixture = seqio.MixtureRegistry.add(
"seqio_mixture",
lang_name_list,
default_rate=0.7
)
seqio_mixture_dataset = seqio.get_mixture_or_task("seqio_mixture").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
for _, ex in zip(range(15), seqio_mixture_dataset):
print(ex["targets"].numpy().decode())
```
where the seqio_mixture_dataset is the generator that i wanted to be wrapped in HF dataset.
also additionally, could you please tell me how do i set the `default_rate=0.7` args where `seqio_mixture` is defined to be made as a custom option in the HF load_dataset() method,
maybe like this:
`seqio_mixture_dataset = datasets.load_dataset("seqio_loader",temperature=0.5)` | ### Link
_No response_
### Description
Hey there, I have used seqio to get a well distributed mixture of samples from multiple dataset. However the resultant output from seqio is a python generator dict, which I cannot produce back into huggingface dataset.
The generator contains all the samples needed for training the model but I cannot convert it into a huggingface dataset.
The code looks like this:
```
for ex in seqio_data:
print(ex[“text”])
```
I need to convert the seqio_data (generator) into huggingface dataset.
the complete seqio code goes here:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_params=None):
dataset = load_dataset(**dataset_params)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_params=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_params=dataset_params),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_name)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
dataset_name = 'oscar-corpus/OSCAR-2109'
subset= 'mr'
dataset_params = {"path": dataset_name, "language":subset, "use_auth_token":True}
dataset_shapes = None
TaskRegistry.add(
"oscar_marathi_corpus",
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_params=dataset_params),
splits=("train", "validation"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
dataset = seqio.get_mixture_or_task("oscar_marathi_corpus").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42
)
for _, ex in zip(range(5), dataset):
print(ex['targets'].numpy().decode())
```
### Owner
_No response_ | 264 | how to convert a dict generator into a huggingface dataset.
### Link
_No response_
### Description
Hey there, I have used seqio to get a well distributed mixture of samples from multiple dataset. However the resultant output from seqio is a python generator dict, which I cannot produce back into huggingface dataset.
The generator contains all the samples needed for training the model but I cannot convert it into a huggingface dataset.
The code looks like this:
```
for ex in seqio_data:
print(ex[“text”])
```
I need to convert the seqio_data (generator) into huggingface dataset.
the complete seqio code goes here:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_dataset
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_params=None):
dataset = load_dataset(**dataset_params)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_params=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_params=dataset_params),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_name)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
dataset_name = 'oscar-corpus/OSCAR-2109'
subset= 'mr'
dataset_params = {"path": dataset_name, "language":subset, "use_auth_token":True}
dataset_shapes = None
TaskRegistry.add(
"oscar_marathi_corpus",
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_params=dataset_params),
splits=("train", "validation"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
dataset = seqio.get_mixture_or_task("oscar_marathi_corpus").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42
)
for _, ex in zip(range(5), dataset):
print(ex['targets'].numpy().decode())
```
### Owner
_No response_
@lhoestq , just to make things clear ...
the following is my original code, thats not in the HF dataset loading script:
```
import functools
import seqio
import tensorflow as tf
import t5.data
from datasets import load_from_disk
from t5.data import postprocessors
from t5.data import preprocessors
from t5.evaluation import metrics
from seqio import FunctionDataSource, utils
import glob
TaskRegistry = seqio.TaskRegistry
def gen_dataset(split, shuffle=False, seed=None, column="text", dataset_path=None):
dataset = load_from_disk(dataset_path)
if shuffle:
if seed:
dataset = dataset.shuffle(seed=seed)
else:
dataset = dataset.shuffle()
while True:
for item in dataset[str(split)]:
yield item[column]
def dataset_fn(split, shuffle_files, seed=None, dataset_path=None):
return tf.data.Dataset.from_generator(
functools.partial(gen_dataset, split, shuffle_files, seed, dataset_path=dataset_path),
output_signature=tf.TensorSpec(shape=(), dtype=tf.string, name=dataset_path)
)
@utils.map_over_dataset
def target_to_key(x, key_map, target_key):
"""Assign the value from the dataset to target_key in key_map"""
return {**key_map, target_key: x}
data_path = glob.glob("/home/stephen/Desktop/MEGA_CORPUS/COMBINED_CORPUS/*", recursive=False)
seqio_train_list = []
for lang in data_path:
dataset_name = lang.split("/")[-1]
dataset_shapes = None
TaskRegistry.add(
str(dataset_name),
source=seqio.FunctionDataSource(
dataset_fn=functools.partial(dataset_fn, dataset_path=lang),
splits=("train", "test"),
caching_permitted=False,
num_input_examples=dataset_shapes,
),
preprocessors=[
functools.partial(
target_to_key, key_map={
"targets": None,
}, target_key="targets")],
output_features={"targets": seqio.Feature(vocabulary=seqio.PassThroughVocabulary, add_eos=False, dtype=tf.string, rank=0)},
metric_fns=[]
)
seqio_train_dataset = seqio.get_mixture_or_task(dataset_name).get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
seqio_train_list.append(seqio_train_dataset)
lang_name_list = []
for lang in data_path:
lang_name = lang.split("/")[-1]
lang_name_list.append(lang_name)
seqio_mixture = seqio.MixtureRegistry.add(
"seqio_mixture",
lang_name_list,
default_rate=0.7
)
seqio_mixture_dataset = seqio.get_mixture_or_task("seqio_mixture").get_dataset(
sequence_length=None,
split="train",
shuffle=True,
num_epochs=1,
shard_info=seqio.ShardInfo(index=0, num_shards=10),
use_cached=False,
seed=42)
for _, ex in zip(range(15), seqio_mixture_dataset):
print(ex["targets"].numpy().decode())
```
where the seqio_mixture_dataset is the generator that i wanted to be wrapped in HF dataset.
also additionally, could you please tell me how do i set the `default_rate=0.7` args where `seqio_mixture` is defined to be made as a custom option in the HF load_dataset() method,
maybe like this:
`seqio_mixture_dataset = datasets.load_dataset("seqio_loader",temperature=0.5)` | [
-0.2356611043214798,
-0.5294454097747803,
0.023818079382181168,
0.32638633251190186,
0.4359237551689148,
-0.018439490348100662,
0.05949658155441284,
0.2877725660800934,
0.22911503911018372,
0.24235397577285767,
-0.2977548837661743,
0.10299661755561829,
-0.22395963966846466,
0.5133184194564819,
0.13184259831905365,
-0.223420649766922,
0.10111737251281738,
0.12503840029239655,
-0.256332129240036,
-0.15094423294067383,
-0.024126127362251282,
0.3305816650390625,
0.18056444823741913,
0.12474486231803894,
-0.07278795540332794,
0.051042456179857254,
-0.05738506466150284,
0.03495781868696213,
-0.5592506527900696,
0.2151000052690506,
0.3356219232082367,
0.23728488385677338,
-0.05609516799449921,
0.2405969798564911,
-0.00012041340960422531,
0.011252418160438538,
-0.14764340221881866,
-0.05951523780822754,
-0.03748549520969391,
-0.3290523290634155,
-0.14111189544200897,
0.15640410780906677,
-0.2155429720878601,
0.03374386578798294,
-0.2117002308368683,
0.11423464119434357,
-0.2645387649536133,
-0.2315617948770523,
0.8827856183052063,
0.3853742182254791,
0.13120856881141663,
0.058254748582839966,
0.25458183884620667,
-0.062463801354169846,
-0.04376908391714096,
0.4773828983306885,
-0.14499621093273163,
0.039532870054244995,
0.07538244873285294,
-0.05331570655107498,
0.18827968835830688,
0.057129524648189545,
-0.27666300535202026,
-0.34533265233039856,
0.3134000897407532,
0.08602962642908096,
-0.010637305676937103,
-0.5321673154830933,
0.2251158356666565,
0.45114076137542725,
0.2407839000225067,
-0.17671337723731995,
-0.24847853183746338,
-0.17360089719295502,
0.004291674122214317,
-0.3675316274166107,
-0.31399214267730713,
-0.12830494344234467,
-0.4041491448879242,
0.1465989053249359,
0.08082963526248932,
-0.31001439690589905,
-0.3173931837081909,
-0.2312585860490799,
-0.42061030864715576,
-0.06201918423175812,
-0.2021523416042328,
0.0019412152469158173,
0.13016822934150696,
-0.04692365974187851,
-0.3292063772678375,
0.15018218755722046,
0.041755661368370056,
0.04236097261309624,
-0.34176743030548096,
-0.10423242300748825,
0.14006474614143372,
0.026867970824241638,
0.41474857926368713,
0.2569507360458374,
-0.0056573497131466866,
-0.027274038642644882,
0.05407967045903206,
-0.07670334726572037,
0.1218041479587555,
0.3082921504974365,
-0.03304140269756317,
0.10697507113218307,
-0.07799674570560455,
-0.11081629246473312,
-0.02882375195622444,
-0.04750669002532959,
-0.1755852997303009,
-0.22787915170192719,
-0.007815156131982803,
-0.23117804527282715,
0.22130978107452393,
-0.1299549639225006,
-0.2110106348991394,
-0.011496472172439098,
0.010649390518665314,
0.19153718650341034,
-0.07528572529554367,
0.22681131958961487,
-0.06662842631340027,
0.21004170179367065,
0.15238109230995178,
0.5235421061515808,
-0.3275834619998932,
-0.20636588335037231,
-0.11158828437328339,
-0.05229177698493004,
0.006772488355636597,
0.09450337290763855,
-0.24851921200752258,
-0.14249858260154724,
0.010617539286613464,
0.11902893334627151,
0.25296157598495483,
-0.209229975938797,
-0.00348783191293478,
-0.009486157447099686,
0.27197423577308655,
0.09317778050899506,
0.03733165189623833,
0.07752713561058044,
0.3192778527736664,
-0.20698899030685425,
-0.17098018527030945,
-0.3374159336090088,
-0.00540710985660553,
-0.3673466145992279,
-0.15429435670375824,
0.05337582901120186,
-0.07207256555557251,
-0.019474558532238007,
-0.28894397616386414,
0.2268752008676529,
0.09561807662248611,
0.1160857081413269,
-0.02368362993001938,
-0.05167757719755173,
-0.1148405373096466,
-0.11024539917707443,
0.5718247890472412,
0.5491489768028259,
-0.2819739580154419,
-0.04659896343946457,
-0.3740173578262329,
-0.07609619200229645,
0.2432238757610321,
0.2956424355506897,
0.09217744320631027,
0.29097452759742737,
-0.23299089074134827,
-0.03915281221270561,
0.29552656412124634,
-0.3448220193386078,
-0.24687236547470093,
0.1725783795118332,
-0.16568610072135925,
0.11522112041711807,
0.1602797657251358,
-0.009876513853669167,
0.1407860517501831,
0.16605451703071594,
0.18341362476348877,
0.31767725944519043,
-0.2932208776473999,
-0.11316711455583572,
-0.034159354865550995,
-0.0420418307185173,
0.22859305143356323,
-0.14324061572551727,
0.11279109120368958,
0.5248817801475525,
-0.2842274308204651,
-0.13365177810192108,
0.27850931882858276,
-0.18709370493888855,
0.22202646732330322,
0.03301072120666504,
0.310335248708725,
0.2961236238479614,
-0.1107826754450798,
0.08711972087621689,
-0.1151973232626915,
-0.01672227680683136,
-0.12392889708280563,
0.18505097925662994,
-0.2694283723831177,
-0.11826259642839432,
-0.4308243691921234,
0.2963372468948364,
-0.2637321949005127,
-0.15612341463565826,
0.023865539580583572,
-0.08344589173793793,
0.5775659084320068,
0.02585846558213234,
-0.2097151130437851,
0.17942161858081818,
0.3365042507648468,
0.3155481815338135,
-0.6794306635856628,
0.2143261730670929,
0.16315923631191254,
-0.053721003234386444,
0.16794894635677338,
0.7571073770523071,
-0.06466778367757797,
0.1070830300450325,
0.19021165370941162,
0.010365508496761322,
-0.16235513985157013,
0.060185983777046204,
-0.034636080265045166,
0.2212279736995697,
0.07432182133197784,
-0.06369765847921371,
0.058705661445856094,
-0.3046143352985382,
-0.06351156532764435,
0.08956297487020493,
0.3781384229660034,
0.4530909061431885,
-0.04455726966261864,
0.44175755977630615,
-0.2961627244949341,
0.5692640542984009,
0.20702585577964783,
0.03358716890215874,
-0.22443290054798126,
-0.007877763360738754,
0.024681566283106804,
-0.06504210829734802,
0.4625294804573059,
0.0794818326830864,
-0.30805450677871704,
0.22220772504806519,
0.14638617634773254,
-0.15745268762111664,
0.0346049889922142,
0.07187032699584961,
-0.15256977081298828,
-0.05599028617143631,
-0.1654493361711502,
0.11526124179363251,
0.13104167580604553,
-0.06464668363332748,
-0.03642653301358223,
0.05371788144111633,
0.08697829395532608,
-0.05847308039665222,
0.046886153519153595,
-0.0009735748171806335,
0.13879252970218658,
0.11727982759475708,
-0.1699339598417282,
-0.025423958897590637,
-0.15274932980537415,
0.09244965016841888,
-0.1799841672182083,
0.19991439580917358,
-0.2712903618812561,
0.11546226590871811,
-0.1522534042596817,
-0.24907195568084717,
-0.2975539267063141,
-0.07178491353988647,
-0.38889482617378235,
-0.24241262674331665,
-0.25718873739242554,
0.04346922039985657,
0.09193649888038635,
-0.010635355487465858,
0.4552035629749298,
0.10057413578033447,
0.2640780508518219,
-0.05970244109630585,
-0.3983681797981262,
-0.35952994227409363,
-0.06743297725915909,
0.06648670136928558,
0.04404760152101517,
-0.11331222951412201,
0.20837408304214478,
-0.3103455603122711,
0.04859672486782074,
-0.33674153685569763,
0.11288752406835556,
0.15086042881011963,
-0.4559388756752014,
0.18117907643318176,
0.2658701539039612,
0.4236304759979248,
0.016381893306970596,
-0.08970409631729126,
0.04945844039320946,
0.09817419946193695,
-0.19601401686668396,
0.444612979888916,
-0.25628823041915894,
0.23493067920207977,
0.08932377398014069,
-0.011164247989654541,
-0.09570137411355972,
-0.11143265664577484,
0.30565744638442993,
-0.09232443571090698,
0.09377232939004898,
0.2335662543773651,
0.20850999653339386,
0.010414376854896545,
-0.2521216571331024,
0.10934030264616013,
-0.08116807043552399,
-0.5911011695861816,
0.26234865188598633,
-0.28558149933815,
-0.3184962868690491,
-0.10157224535942078,
-0.08788734674453735,
0.8734861016273499,
-0.02673596888780594,
-0.1387588381767273,
-0.09724878519773483,
-0.16141627728939056,
0.31157585978507996,
-0.08907237648963928,
0.06860101222991943,
0.18425893783569336,
-0.07797890901565552,
0.11783584952354431,
0.05072701722383499,
0.12516702711582184,
0.3527485430240631,
0.031913306564092636,
0.03398437798023224,
0.1483328938484192,
0.4057469367980957,
-0.13833287358283997,
0.5244123339653015,
0.3790161609649658,
0.07672890275716782,
0.04905848950147629,
-0.17749862372875214,
0.09968174993991852,
-0.12405338138341904,
-0.4137384593486786,
0.15707580745220184,
0.09278497099876404,
-0.05173853784799576,
0.015698067843914032,
-0.021659836173057556,
0.740490198135376,
-0.168460875749588,
0.32538342475891113,
-0.1630173772573471,
-0.2664024531841278,
-0.12297746539115906,
-0.44874367117881775,
0.12064649164676666,
-0.1701764166355133,
0.0921965017914772,
-0.17975690960884094,
0.024485275149345398,
0.17934182286262512,
0.15331561863422394,
0.5704125761985779,
0.1505003273487091,
0.021277744323015213,
-0.16840915381908417,
-0.8259093165397644,
0.0019906610250473022,
-0.208978071808815,
-0.26439353823661804,
-0.006279699504375458,
0.03553108125925064,
0.061228156089782715,
0.17910584807395935,
0.9725092649459839,
0.24260620772838593,
-0.15607011318206787,
0.0467698760330677,
-0.28408437967300415,
-0.5021288394927979,
0.13319526612758636,
0.05509975180029869,
-0.0325656495988369,
0.01893862709403038,
-0.10083281993865967,
-0.5409141778945923,
-0.31976261734962463,
-0.01775510609149933,
0.26118943095207214,
-0.2890709340572357,
0.15352831780910492,
-0.28360000252723694,
-0.2053341269493103,
-0.2118171751499176,
-0.13777592778205872,
0.060210928320884705,
0.4127071797847748,
-0.054528191685676575,
-0.05249026045203209,
0.04953233152627945,
-0.18714210391044617,
0.10453211516141891,
0.06471326947212219,
0.3183838129043579,
-0.16919706761837006,
-0.06917400658130646,
0.3315044939517975,
0.07577341794967651,
-0.19086410105228424,
0.20533180236816406,
-0.018439162522554398,
-0.48110175132751465,
-0.1940174102783203,
0.14069682359695435,
0.24777460098266602,
-0.14766094088554382,
-0.21478447318077087,
0.34593796730041504,
-0.1468919962644577,
0.14397817850112915,
-0.48415371775627136,
-0.0612017847597599,
0.41389134526252747,
0.201988086104393,
-0.0962061807513237,
-0.43100878596305847,
0.3464459776878357,
0.15914230048656464,
0.1522439420223236,
-0.19835427403450012,
0.5254842042922974,
-0.20006868243217468,
0.427389919757843,
0.09585822373628616,
0.8359091877937317,
-0.4967048168182373,
0.23294539749622345,
0.561822772026062,
0.33401525020599365,
0.8295431733131409,
-0.025389553979039192,
0.04263236001133919,
-0.303618848323822,
0.15492790937423706,
-0.03263773396611214,
-0.03140605241060257,
-0.05775127559900284,
-0.010099560022354126,
-0.19293305277824402,
0.04000411927700043,
-0.2636655569076538,
-0.06518350541591644,
-0.06304226815700531,
-0.18738196790218353,
-0.028715545311570168,
-0.1535082757472992,
-0.16100984811782837,
0.01875939965248108,
-0.2056194394826889,
0.5768225789070129,
-0.010729284957051277,
-0.130656898021698,
-0.28669893741607666,
0.1736336350440979,
-0.2008974850177765,
0.059327028691768646,
-0.052462946623563766,
-0.184662863612175,
0.3722628355026245,
-0.3314097821712494,
0.10656143724918365,
0.6841478943824768,
0.46808183193206787,
0.025989297777414322,
-0.33263111114501953,
-0.11187544465065002,
-0.04354752600193024,
-0.0612998865544796,
0.09928949922323227,
-0.22475406527519226,
0.266266793012619,
0.06498558819293976,
-0.09613765776157379,
0.2987026572227478,
0.14152716100215912,
0.011031080037355423,
-0.4504334032535553,
-0.4370521903038025,
0.22938159108161926,
-0.3846753239631653,
0.27210935950279236,
0.23198391497135162,
0.3093315064907074,
-0.12310606241226196,
-0.0033005811274051666,
0.4282325506210327,
-0.32063496112823486,
0.24476730823516846,
-0.3915395140647888,
-0.06277520954608917,
0.09161950647830963,
0.12226552516222,
-0.05814250558614731,
-0.02737482264637947,
0.4006408452987671,
0.21763695776462555,
0.1778578907251358,
-0.09480464458465576,
-0.22190266847610474,
0.37007826566696167,
-0.40653589367866516,
0.38668903708457947,
-0.010716321878135204,
0.022087842226028442,
-0.1176375076174736,
0.1633242815732956,
-0.003564927726984024,
-0.25592368841171265,
0.04313851520419121,
-0.15180936455726624,
-0.403582364320755,
-0.05842523276805878,
0.0297097098082304,
-0.05835879221558571,
0.023224469274282455,
0.19291049242019653,
-0.12304659932851791,
0.23543214797973633,
-0.22381272912025452,
-0.2667703330516815,
-0.021939951926469803,
0.021149881184101105,
0.23099365830421448,
-0.2568458020687103,
-0.15372097492218018,
-0.016910914331674576,
0.058434754610061646,
0.07152733951807022,
-0.1446535587310791,
-0.11816851794719696,
-0.22234030067920685,
0.14002351462841034,
0.04984157904982567,
-0.14216399192810059,
0.36346015334129333,
0.14215384423732758,
-0.23697078227996826,
-0.3115988075733185,
0.4277398884296417,
0.2211904227733612,
0.00274793803691864,
0.0022120075300335884,
-0.09740957617759705,
0.32292434573173523,
-0.45364195108413696,
-0.13072475790977478,
0.07920892536640167,
0.07107231765985489,
0.07374919950962067,
0.36613667011260986,
-0.08651977777481079,
-0.27643275260925293,
-0.04444645345211029,
0.2341306209564209,
0.06463764607906342,
-0.35342898964881897,
0.4543966054916382,
-0.08579738438129425,
-0.08127492666244507,
0.21008135378360748,
0.5304523706436157,
0.22702926397323608,
0.00439039058983326,
0.179167240858078,
0.17517799139022827,
0.10196098685264587,
-0.10724332183599472,
0.2993565499782562,
-0.19541342556476593,
-0.24858282506465912,
-0.013118036091327667,
0.30818355083465576,
-0.16139960289001465,
-0.07439979165792465,
-0.14118483662605286,
-0.2033107578754425,
-0.052180469036102295,
0.03011222742497921,
0.21638306975364685,
0.40970003604888916,
0.2604445815086365,
0.17355430126190186,
0.11994943767786026,
0.2106347382068634,
0.12163842469453812,
0.38300323486328125,
-0.14958304166793823,
0.5344508290290833,
-0.6321101188659668,
0.11008552461862564,
0.4394211173057556,
-0.2944062650203705,
0.10658924281597137,
0.09319397807121277,
-0.3377265930175781,
0.10487692803144455,
-0.2544233202934265,
0.3543289303779602,
-0.10652854293584824,
-0.13427481055259705,
-0.27235662937164307,
0.4891595244407654,
-0.1620807647705078,
-0.18314732611179352,
-0.1912584751844406,
-0.19893339276313782,
-0.07666052132844925,
-0.02846190333366394,
0.04343222826719284,
-0.321086585521698,
-0.1470562219619751,
-0.0034599527716636658,
0.03385777771472931,
-0.1280052214860916,
-0.12898558378219604,
0.008826503530144691,
-0.026066496968269348,
-0.13088876008987427,
-0.09217866510152817,
0.20939430594444275,
-0.5083575248718262,
0.0013322383165359497,
0.4049331843852997,
0.2758959233760834,
-0.026301659643650055,
-0.06158066913485527,
0.42652466893196106,
0.0516543872654438,
-0.10182327032089233,
-0.03060780093073845,
-0.004543788731098175,
-0.16040846705436707,
0.12413914501667023,
0.19492509961128235,
-0.01413729228079319,
-0.016551868990063667,
-0.5287272334098816,
0.14600133895874023,
0.45813101530075073,
-0.2641419768333435,
0.30808866024017334,
-0.11738546192646027,
-0.07412727922201157,
-0.44300153851509094,
0.16288727521896362,
-0.44052499532699585,
0.06527974456548691,
-0.021660130470991135,
0.07197295129299164,
-0.09185703098773956,
-0.3206789493560791,
0.03288104012608528,
0.06412790715694427,
0.38410454988479614,
0.40207281708717346,
0.18342149257659912,
-0.3030431568622589,
-0.10970693826675415,
-0.2304036170244217,
0.13928672671318054,
0.3322724997997284,
0.21494248509407043,
-0.1104934886097908,
0.06010958552360535,
-0.06633002310991287,
0.14870814979076385,
-0.3217294216156006,
0.009778551757335663,
0.04177239164710045,
0.1862279176712036,
-0.009960418567061424,
-0.33806705474853516,
-0.14432062208652496,
-0.012743229046463966,
0.04121829569339752,
0.058638639748096466,
0.29958540201187134,
-0.015375802293419838,
0.03075743466615677,
-0.034210484474897385,
0.32184502482414246,
0.050545234233140945,
-0.1019773930311203,
-0.1472524106502533,
0.42861542105674744,
-0.16322821378707886,
0.0006655678153038025,
-0.04992326349020004,
0.02923155203461647,
0.36633843183517456,
-0.2725326716899872,
0.03035709261894226,
-0.06980116665363312,
0.2467103898525238,
-0.07114644348621368,
-0.16504059731960297,
-0.3278750777244568,
0.10043811053037643,
0.29965221881866455,
-0.4137957990169525,
-0.3468659222126007,
0.28459829092025757,
0.07059916108846664,
-0.18264679610729218,
0.28665891289711,
0.38686680793762207,
-0.05015811324119568,
0.24120904505252838,
-0.3673957586288452,
-0.046699702739715576,
0.1407032459974289,
-0.33288589119911194,
-0.14148761332035065,
-0.17234225571155548,
0.21368886530399323,
-0.006733588874340057,
-0.38483160734176636,
-0.05993393063545227,
0.2246115803718567,
0.02322963997721672,
-0.07820424437522888,
0.31753256916999817,
0.17765037715435028,
0.18376874923706055,
-0.043653883039951324,
-0.11022055149078369,
0.466231107711792,
0.3630123436450958,
-0.0053563192486763,
0.5454837679862976,
-0.07788233458995819
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.