html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 67
24.7k
| body
stringlengths 51
36.2k
| __index_level_0__
int64 1
1.17k
| comment_length
int64 16
1.45k
| text
stringlengths 190
38.3k
| embeddings
sequence |
---|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/6048 | when i use datasets.load_dataset, i encounter the http connect error! | The `audiofolder` loader is not available in version `2.3.2`, hence the error. Please run the `pip install -U datasets` command to update the `datasets` installation to make `load_dataset("audiofolder", ...)` work. | ### Describe the bug
`common_voice_test = load_dataset("audiofolder", data_dir="./dataset/",cache_dir="./cache",split=datasets.Split.TEST)`
when i run the code above, i got the error as below:
--------------------------------------------
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f299ed082e0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))")))
--------------------------------------------------
My all data is on local machine, why does it need to connect the internet? how can i fix it, because my machine cannot connect the internet.
### Steps to reproduce the bug
1
### Expected behavior
no error when i use the load_dataset func
### Environment info
python=3.8.15 | 58 | 30 | when i use datasets.load_dataset, i encounter the http connect error!
### Describe the bug
`common_voice_test = load_dataset("audiofolder", data_dir="./dataset/",cache_dir="./cache",split=datasets.Split.TEST)`
when i run the code above, i got the error as below:
--------------------------------------------
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (ConnectionError(MaxRetryError("HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /huggingface/datasets/2.3.2/datasets/audiofolder/audiofolder.py (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f299ed082e0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))")))
--------------------------------------------------
My all data is on local machine, why does it need to connect the internet? how can i fix it, because my machine cannot connect the internet.
### Steps to reproduce the bug
1
### Expected behavior
no error when i use the load_dataset func
### Environment info
python=3.8.15
The `audiofolder` loader is not available in version `2.3.2`, hence the error. Please run the `pip install -U datasets` command to update the `datasets` installation to make `load_dataset("audiofolder", ...)` work. | [
-1.1496117115020752,
-0.7972938418388367,
-0.5717766880989075,
1.3664467334747314,
-0.026249855756759644,
-1.354591727256775,
0.0974016860127449,
-0.8682535290718079,
1.5897915363311768,
-0.8269336223602295,
0.35338395833969116,
-1.7552576065063477,
0.027949972078204155,
-0.5685946345329285,
-0.6554988026618958,
-0.6858051419258118,
-0.3321291208267212,
-0.6470736265182495,
1.114370346069336,
2.460339307785034,
1.1736494302749634,
-1.323357343673706,
2.8556859493255615,
0.6294866800308228,
-0.18386411666870117,
-0.8316305875778198,
0.4599401354789734,
-0.007841086015105247,
-1.5583491325378418,
-0.2614899277687073,
-1.0210483074188232,
-0.06418023258447647,
-0.6100621819496155,
-0.5219132304191589,
0.13294243812561035,
0.4107189178466797,
-0.1902366429567337,
-0.4721139073371887,
-0.4428354501724243,
-0.7433147430419922,
0.5649077892303467,
-0.31876322627067566,
0.8810073733329773,
-0.30870702862739563,
1.7874512672424316,
-0.582252025604248,
0.5411884784698486,
0.5625228881835938,
1.1637370586395264,
0.2597949802875519,
-0.02474788948893547,
0.47646594047546387,
0.31817176938056946,
0.08917924761772156,
0.541481077671051,
1.19391930103302,
0.6258018016815186,
0.5209311246871948,
0.7209696173667908,
-2.175018548965454,
1.317918062210083,
-0.7270951867103577,
0.17494605481624603,
1.3930109739303589,
-1.1385453939437866,
0.48636531829833984,
-1.9152922630310059,
-0.10831012576818466,
0.3961077034473419,
-2.2505600452423096,
0.06616516411304474,
-1.340348243713379,
-0.5496768951416016,
1.0433326959609985,
0.3307754099369049,
-1.2460261583328247,
-0.021609703078866005,
-0.3998429477214813,
0.9217023253440857,
0.3766312003135681,
1.1769517660140991,
-1.6196306943893433,
-0.004102838225662708,
-0.24128079414367676,
0.29340270161628723,
-1.1716228723526,
-1.602764368057251,
0.6310222148895264,
0.7711183428764343,
0.6405892968177795,
-0.1708027422428131,
0.8558168411254883,
-1.06102454662323,
0.8207327723503113,
-0.9175247550010681,
-1.9297105073928833,
-1.3556180000305176,
-2.434774398803711,
-2.3832147121429443,
0.805029034614563,
-0.3959115743637085,
-0.3517627716064453,
2.167146682739258,
-1.1996891498565674,
-1.7128896713256836,
1.0806522369384766,
0.23600557446479797,
-0.08681731671094894,
2.3693418502807617,
0.21264486014842987,
-0.9266912341117859,
0.6972068548202515,
-0.8606007099151611,
0.6321336030960083,
-0.3292299807071686,
1.2268494367599487,
0.38384416699409485,
-1.0964641571044922,
1.6137410402297974,
-0.44081151485443115,
0.5218912959098816,
-0.7074182629585266,
-0.3568548560142517,
-0.5271580219268799,
0.18706266582012177,
2.019383668899536,
-0.15139785408973694,
1.572386622428894,
-0.1569099873304367,
-1.4697319269180298,
-1.3893287181854248,
0.693518340587616,
0.5129662752151489,
-0.7923777103424072,
0.17197008430957794,
-0.33052873611450195,
0.11949815601110458,
0.17092002928256989,
1.0754481554031372,
1.304404854774475,
0.8085066676139832,
-0.14109286665916443,
-0.9382414817810059,
0.09788668900728226,
-0.041390560567379,
-0.5548637509346008,
-1.7063370943069458,
-0.2885386347770691,
0.12429428845643997,
0.6286389827728271,
-1.212645173072815,
1.8641107082366943,
0.8821069002151489,
2.0183844566345215,
1.0144535303115845,
-0.37059059739112854,
1.545527458190918,
0.1263311207294464,
1.9005262851715088,
-0.275107204914093,
0.6890144348144531,
-0.5352845788002014,
-1.1777148246765137,
0.6167657971382141,
-0.33054235577583313,
-1.9733376502990723,
-0.32785144448280334,
-0.9295326471328735,
-0.07291420549154282,
-0.8729577660560608,
1.0317504405975342,
-0.1498267948627472,
-1.3408795595169067,
0.25179290771484375,
-0.642651379108429,
0.09117726981639862,
-1.47907555103302,
0.2592662572860718,
0.7599743604660034,
-0.7363568544387817,
0.046383388340473175,
-0.45312193036079407,
-1.4097996950149536,
-0.6243100166320801,
0.48496559262275696,
1.7293481826782227,
-0.6664251089096069,
1.04315984249115,
1.0553971529006958,
-0.6166799068450928,
-0.1042952761054039,
0.5087687969207764,
-0.4391618072986603,
0.8551678657531738,
-0.9747480750083923,
-0.4116305112838745,
1.125620722770691,
-0.3443693518638611,
-0.4463321268558502,
1.3027782440185547,
0.7402434945106506,
-1.0278486013412476,
-0.33537402749061584,
-0.10716503858566284,
-0.8148506283760071,
0.040564730763435364,
-1.6604140996932983,
-0.10302472114562988,
0.21973095834255219,
-1.5026768445968628,
-0.5126963257789612,
-0.0709376260638237,
1.3008551597595215,
0.03748432546854019,
1.3619345426559448,
-0.2364329695701599,
-0.132489413022995,
-0.599581778049469,
-0.6065481901168823,
0.08718064427375793,
-0.12228202819824219,
-0.6611356139183044,
0.32609114050865173,
-0.6935513615608215,
0.16440033912658691,
1.473953366279602,
0.2549234628677368,
0.14308685064315796,
0.5588032007217407,
1.1747850179672241,
0.32532837986946106,
-0.21799181401729584,
-0.8580285310745239,
-1.7210109233856201,
2.0068445205688477,
-1.5968512296676636,
1.970452070236206,
0.8156163692474365,
-0.07998869568109512,
-1.7994983196258545,
-1.8563495874404907,
1.5449377298355103,
1.1011366844177246,
2.5079193115234375,
0.542366087436676,
0.4983460307121277,
-0.8192741870880127,
-0.6455765962600708,
0.47037482261657715,
-0.6728885173797607,
-0.9331998229026794,
0.1572834998369217,
2.3370766639709473,
1.6691360473632812,
-0.4001569449901581,
-0.13110363483428955,
-0.9945748448371887,
1.328732967376709,
-0.28595390915870667,
0.24605591595172882,
1.8569345474243164,
-0.4212886393070221,
-1.0289955139160156,
1.24851655960083,
-2.367429733276367,
0.31827518343925476,
1.998326301574707,
0.2888568043708801,
0.03848502039909363,
-1.1830066442489624,
-0.7333730459213257,
-0.15032172203063965,
-0.40612903237342834,
-1.2275917530059814,
0.4000891149044037,
-0.24936997890472412,
-0.8283989429473877,
-1.392041563987732,
-0.022041920572519302,
-1.2168840169906616,
-1.7495331764221191,
0.27289026975631714,
1.7928162813186646,
2.1074929237365723,
-0.7620320320129395,
1.3107670545578003,
-0.25760334730148315,
0.30507221817970276,
1.1898456811904907,
1.2507935762405396,
3.231210708618164,
1.9454090595245361,
-1.2197006940841675,
0.7726446390151978,
-0.14010930061340332,
-0.4853207468986511,
1.1997054815292358,
-0.9894187450408936,
1.2254741191864014,
-0.2510933578014374,
-1.3737738132476807,
-1.1780378818511963,
0.8741240501403809,
0.4559457302093506,
-0.08422178775072098,
-0.42738601565361023,
1.093841791152954,
0.20404043793678284,
1.3437846899032593,
0.6167137026786804,
-0.31175753474235535,
0.5790061950683594,
-0.30315083265304565,
-0.5426087975502014,
1.5489612817764282,
0.053113892674446106,
-1.576826572418213,
-2.3170197010040283,
-0.22633866965770721,
-1.0380481481552124,
-0.03280971944332123,
-0.9039924740791321,
-1.0068333148956299,
1.5052605867385864,
0.5159097909927368,
-0.9148318767547607,
-0.1013697013258934,
-0.48245444893836975,
-0.6199550032615662,
2.5913963317871094,
-1.4246383905410767,
-0.24621471762657166,
-0.9466681480407715,
-0.650689959526062,
1.4949733018875122,
-1.1642634868621826,
-0.24852800369262695,
-1.052000641822815,
-0.537220299243927,
-1.259293556213379,
-0.43713781237602234,
-0.0778297558426857,
-0.7987565398216248,
0.7291257977485657,
-0.05490424484014511,
-1.2363336086273193,
-0.2423946112394333,
-1.118891954421997,
0.8327987194061279,
-0.2676795423030853,
-0.05471917241811752,
1.758301854133606,
0.2836894094944,
-0.4257444441318512,
0.765613317489624,
1.2815662622451782,
0.5848179459571838,
-0.5421578884124756,
0.2777937352657318,
-0.6543374061584473,
0.4885258376598358,
-1.1868704557418823,
0.32558637857437134,
-2.8907833099365234,
0.6567074656486511,
-0.005842064507305622,
-0.03109055757522583,
-0.14239582419395447,
-1.392086148262024,
0.8997663259506226,
2.4153895378112793,
-1.1486936807632446,
0.669167160987854,
0.2494143694639206,
1.238214135169983,
-1.6518114805221558,
0.025855140760540962,
-0.6464523077011108,
2.0212621688842773,
0.03068545274436474,
1.0223300457000732,
-0.5432500839233398,
-2.3063833713531494,
0.5639987587928772,
-1.1860710382461548,
-0.9311071038246155,
0.7719416618347168,
-0.8563648462295532,
0.21700049936771393,
-1.0893864631652832,
-0.0944976955652237,
-0.884541928768158,
-1.1163305044174194,
0.5129727721214294,
0.06217430531978607,
0.6765035390853882,
-0.6058045625686646,
0.26077160239219666,
-2.310572624206543,
-1.4009857177734375,
-0.19606736302375793,
-0.9000125527381897,
0.46366721391677856,
-0.33123084902763367,
0.7377006411552429,
-0.15590313076972961,
0.03222333639860153,
0.289797842502594,
1.4613432884216309,
3.171543836593628,
-0.04088745638728142,
0.35134536027908325,
-0.2421647012233734,
-1.1051349639892578,
1.56687593460083,
0.9227190613746643,
-0.2853491008281708,
-0.6197800636291504,
-0.9847130179405212,
1.369284987449646,
1.8744916915893555,
1.1106747388839722,
0.13565291464328766,
-0.9151912927627563,
-0.7934436202049255,
0.14625224471092224,
0.1207675114274025,
0.48111024498939514,
1.0125433206558228,
0.14113689959049225,
0.2279006391763687,
1.4250479936599731,
1.0309312343597412,
-0.28263694047927856,
0.48625558614730835,
-0.8295280337333679,
-0.4288823902606964,
0.5720808506011963,
0.39327192306518555,
0.018386727198958397,
0.20487263798713684,
-1.0535072088241577,
-0.18962080776691437,
-0.23648251593112946,
-0.8729391694068909,
-0.7159273028373718,
-0.39857208728790283,
-0.3863639533519745,
1.7629311084747314,
-0.09835527092218399,
-0.5309122204780579,
-0.006681689061224461,
-0.8220818042755127,
-0.08803678303956985,
-0.955130934715271,
0.32465094327926636,
-0.15587681531906128,
0.10987681895494461,
-0.11346187442541122,
1.6299362182617188,
-0.9794016480445862,
-2.2653679847717285,
0.1808996945619583,
0.20657682418823242,
-0.3017526865005493,
-0.09741611778736115,
1.7807875871658325,
0.5528081059455872,
1.3686556816101074,
1.6175659894943237,
1.1111479997634888,
-0.6014813780784607,
-1.4116495847702026,
0.7061309814453125,
0.9458845257759094,
-1.3317283391952515,
0.8755969405174255,
-0.20641151070594788,
-0.6069523692131042,
0.5069078803062439,
1.317697525024414,
0.4206511974334717,
-1.9057328701019287,
0.8761683106422424,
-1.098465919494629,
0.930934727191925,
0.8156960010528564,
0.8691990375518799,
0.07746469974517822,
0.8654929399490356,
-1.219688057899475,
-1.0468858480453491,
-0.588864266872406,
-0.679433286190033,
1.8309868574142456,
-0.16421757638454437,
0.2984963357448578,
-0.3335161507129669,
-1.2846490144729614,
0.16520316898822784,
0.603767991065979,
0.30473801493644714,
-0.33495205640792847,
0.723137378692627,
-0.7308019399642944,
-1.158528447151184,
-1.3870036602020264,
-0.454267293214798,
-1.031302809715271,
-0.8326810598373413,
1.0283945798873901,
0.7500924468040466,
0.5156446099281311,
1.930945634841919,
0.6850270628929138,
0.1963409036397934,
-2.6628777980804443,
0.8702978491783142,
0.3385312855243683,
-0.10294961929321289,
0.8322046995162964,
0.24870921671390533,
1.2722707986831665,
-0.2351476550102234,
0.6105657815933228,
-2.281574010848999,
2.2581253051757812,
-0.2988951504230499,
0.7666804790496826,
0.09087938070297241,
0.07409239560365677,
0.9466309547424316,
0.573332667350769,
0.5844878554344177,
-1.1102865934371948,
0.9476518034934998,
-0.5951004028320312,
1.1697216033935547,
0.8354023098945618,
-0.9193970561027527,
0.12704458832740784,
1.1823256015777588,
0.38285812735557556,
-0.5498171448707581,
-0.9905532002449036,
-0.858361005783081,
0.9453873038291931,
1.780330777168274,
0.009229490533471107,
0.12308403104543686,
0.8241925239562988,
0.7505611777305603,
-1.3306010961532593,
-0.0016472572460770607,
-0.5674235820770264,
-0.6577142477035522,
1.7905491590499878,
2.0720462799072266,
0.03145714849233627,
-0.1137871965765953,
-0.7215467691421509,
-1.469542384147644,
0.8277547359466553,
0.16149285435676575,
-0.07799115777015686,
0.883117139339447,
-0.6721137762069702,
1.229618787765503,
0.8259115219116211,
0.8800656199455261,
0.2899481952190399,
-0.008345418609678745,
0.2333691418170929,
-0.22899021208286285,
-1.202262043952942,
-0.33450543880462646,
-0.9209927320480347,
-2.5187325477600098,
0.4135262966156006,
-0.2600574195384979,
-1.4928058385849,
0.11863382905721664,
-0.9526193141937256,
0.7145422101020813,
-0.5460931062698364,
-1.1908316612243652,
-1.3129968643188477,
0.233291894197464,
-0.18333841860294342,
0.7252986431121826,
-1.6499998569488525,
-0.15787774324417114,
1.1683732271194458,
1.0158600807189941,
-0.6408657431602478,
0.9023959636688232,
0.299311101436615,
0.8994495272636414,
0.9423165917396545,
-0.37296879291534424,
0.4495089054107666,
0.2254730612039566,
-1.3329155445098877,
0.3236316442489624,
1.3713393211364746,
0.2192455679178238,
1.3327302932739258,
-0.5067419409751892,
-0.02394185960292816,
0.42392754554748535,
-0.169968381524086,
-0.5257584452629089,
-0.7921698093414307,
0.6024690866470337,
-0.16784752905368805,
-0.9650806188583374,
-0.11760040372610092,
0.012584589421749115,
-0.08019942790269852,
0.33565983176231384,
-1.4615048170089722,
-0.057838134467601776,
-0.37748512625694275,
-0.6232602596282959,
-1.399364709854126,
-0.13400748372077942,
1.3328155279159546,
-0.8982664942741394,
-0.046438559889793396,
0.5738433003425598,
0.16647180914878845,
0.4984816908836365,
0.6455799341201782,
-0.7867518067359924,
-0.19376428425312042,
-0.05813240259885788,
-0.471632719039917,
0.2541804313659668,
1.3008402585983276,
-0.15341047942638397,
-1.0124503374099731,
0.444037526845932,
-0.2641123831272125,
0.2303439825773239,
1.931958794593811,
0.06552401185035706,
-0.9180443286895752,
0.3516140580177307,
-0.7859213352203369,
1.889033317565918,
1.6482316255569458,
1.3808927536010742,
-0.09502905607223511,
-0.9236264228820801,
0.5685643553733826,
-0.3031446635723114,
-0.3568046987056732,
0.9188811779022217,
0.369091272354126,
-0.31504374742507935,
-1.3568216562271118,
0.7899091839790344,
1.2228070497512817,
-0.8168486952781677,
-0.7420438528060913,
0.07538557797670364,
-0.8247998356819153,
1.19963800907135,
0.7404229044914246,
0.3503408432006836,
0.2577311396598816,
1.707341194152832,
0.7183049321174622,
-0.6031409502029419,
0.49301183223724365,
0.4321269094944,
-0.17812514305114746,
-1.955783486366272,
-1.097161054611206,
0.25198620557785034,
-0.4572165310382843,
-1.518727421760559,
1.4344773292541504,
-1.2856535911560059,
-0.98702472448349,
0.5172820687294006,
0.1651023030281067,
1.39370858669281,
0.33743610978126526,
1.7209805250167847,
1.994882583618164,
0.9754965305328369,
0.5204528570175171,
1.146014928817749,
-0.22681598365306854,
-0.1954101324081421,
1.6340669393539429,
-0.4815823435783386,
0.6415764093399048,
1.0193417072296143,
-0.48494231700897217,
-1.1939187049865723,
-0.8858674168586731,
-1.1677896976470947,
-0.7784450650215149,
1.0002448558807373,
0.15551209449768066,
-1.117336392402649,
0.337344229221344,
1.5502912998199463,
-0.004435552284121513,
-0.12671594321727753,
0.7746973037719727,
0.367057740688324,
-0.6533042788505554,
-0.11691590398550034,
-1.0731902122497559,
0.6178777813911438,
-0.378568172454834,
-0.41791775822639465,
0.18747884035110474,
0.5616822242736816,
1.2321420907974243,
0.2214505821466446,
0.1078200414776802,
1.4510499238967896,
-1.3097059726715088,
1.2020809650421143,
-1.033530831336975,
0.3896394371986389,
-2.2399544715881348,
1.5018692016601562,
-0.9744244813919067,
1.9022611379623413,
-2.7083280086517334,
0.49571073055267334,
-0.4859450161457062,
-0.6006907224655151,
0.14618368446826935,
-0.14531546831130981,
0.091877281665802,
-0.058297500014305115,
-1.0896762609481812,
-0.13958077132701874,
-0.8991063833236694,
0.47503355145454407,
1.2298455238342285,
1.3787199258804321,
-0.9281426668167114,
-0.293862909078598,
-1.6715816259384155,
-0.17223961651325226,
-0.45088690519332886,
0.2222994863986969,
-1.748863935470581,
-0.17968280613422394,
-2.064439296722412,
-2.505173921585083,
-1.3803937435150146,
-1.0311229228973389,
1.368121862411499,
0.10907164216041565,
-0.8821243047714233,
1.1502952575683594,
-0.43275463581085205,
-1.770488977432251,
1.1940521001815796,
-2.2300591468811035
] |
https://github.com/huggingface/datasets/issues/6043 | Compression kwargs have no effect when saving datasets as csv | Hello @exs-avianello, I have reproduced the bug successfully and have understood the problem. But I am confused regarding this part of the statement, "`pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`".
Can you please elaborate on it?
Thanks! | ### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
| 59 | 38 | Compression kwargs have no effect when saving datasets as csv
### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
Hello @exs-avianello, I have reproduced the bug successfully and have understood the problem. But I am confused regarding this part of the statement, "`pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`".
Can you please elaborate on it?
Thanks! | [
-1.1168360710144043,
-0.900812566280365,
-0.7744753956794739,
1.420461654663086,
-0.10985736548900604,
-1.2823952436447144,
0.10812487453222275,
-1.1060352325439453,
1.7183713912963867,
-0.8180946111679077,
0.30754318833351135,
-1.7111681699752808,
-0.037234142422676086,
-0.6284632682800293,
-0.7869439721107483,
-0.842337965965271,
-0.3671760559082031,
-0.7356948852539062,
1.0616806745529175,
2.532766819000244,
1.1255848407745361,
-1.3166515827178955,
2.645268440246582,
0.7567117810249329,
-0.09349629282951355,
-0.9773021936416626,
0.6166613101959229,
-0.05566178634762764,
-1.3202784061431885,
-0.3777313828468323,
-0.976398229598999,
-0.09636224806308746,
-0.5742902755737305,
-0.5596725344657898,
0.10166124254465103,
0.35852500796318054,
-0.31098708510398865,
-0.5040317177772522,
-0.7136236429214478,
-0.7985639572143555,
0.446877658367157,
-0.494199275970459,
0.9638375639915466,
-0.31646132469177246,
1.8036441802978516,
-0.6311697363853455,
0.4995254576206207,
0.7608989477157593,
1.3689486980438232,
0.21106350421905518,
0.018131215125322342,
0.4492940902709961,
0.37609395384788513,
0.06759265065193176,
0.5326135754585266,
1.11244797706604,
0.6211467981338501,
0.4901892840862274,
0.8133689165115356,
-2.2875254154205322,
1.3365628719329834,
-1.018896460533142,
0.24848662316799164,
1.3066656589508057,
-0.9322461485862732,
0.3483022153377533,
-1.820330023765564,
-0.007575477939099073,
0.48830586671829224,
-2.266836166381836,
0.28881749510765076,
-1.4255239963531494,
-0.4513356387615204,
1.0744197368621826,
0.47918862104415894,
-1.2201086282730103,
0.15822993218898773,
-0.39245355129241943,
0.904414713382721,
0.47625061869621277,
1.1169764995574951,
-1.7270770072937012,
-0.14570334553718567,
-0.28595131635665894,
0.09915205836296082,
-1.2110257148742676,
-1.506848692893982,
0.6141206622123718,
0.7950940728187561,
0.534454882144928,
-0.2153249830007553,
0.9809665083885193,
-1.024024248123169,
0.7056279182434082,
-0.9511116147041321,
-1.851266622543335,
-1.5006721019744873,
-2.168666362762451,
-2.289398193359375,
0.7580740451812744,
-0.5142483711242676,
-0.480497807264328,
2.0463414192199707,
-1.0565438270568848,
-1.7535772323608398,
1.126138687133789,
0.19421438872814178,
-0.014116848818957806,
2.2924513816833496,
0.2827785313129425,
-0.6294167637825012,
0.46312952041625977,
-0.7297751903533936,
0.7052890062332153,
-0.29096925258636475,
1.300283432006836,
0.4354283809661865,
-1.0290502309799194,
1.6892845630645752,
-0.33662453293800354,
0.5764448046684265,
-0.6458566188812256,
-0.3485567271709442,
-0.721570611000061,
0.3467790484428406,
1.9288711547851562,
-0.26486602425575256,
1.566208839416504,
-0.3556104898452759,
-1.663101315498352,
-1.6912245750427246,
0.8407086133956909,
0.5458827614784241,
-0.7145107388496399,
0.12283540517091751,
-0.4115927517414093,
0.20062409341335297,
0.04442141577601433,
1.2501733303070068,
1.349433422088623,
0.7620142102241516,
-0.36444225907325745,
-0.8268612623214722,
0.16021601855754852,
0.08235783874988556,
-0.7760504484176636,
-1.7979854345321655,
-0.47937700152397156,
0.20667734742164612,
0.6025454998016357,
-1.114196538925171,
1.7836555242538452,
0.9135195016860962,
1.830004334449768,
1.1420972347259521,
-0.31335124373435974,
1.4864271879196167,
0.08891359716653824,
1.9674263000488281,
-0.4325464963912964,
0.5953192710876465,
-0.3854287266731262,
-1.1607589721679688,
0.7500196695327759,
-0.32228463888168335,
-2.0464274883270264,
-0.7968129515647888,
-0.8075549006462097,
-0.18170644342899323,
-0.6517871618270874,
0.9451525211334229,
-0.26643237471580505,
-1.29752516746521,
0.13507485389709473,
-0.8206679821014404,
0.07140497118234634,
-1.1798527240753174,
0.1861151158809662,
0.6935595870018005,
-0.6966843008995056,
0.15944696962833405,
-0.2999487817287445,
-1.3526554107666016,
-0.32391589879989624,
0.23322689533233643,
1.8739148378372192,
-0.8825843334197998,
0.8714936375617981,
1.064733624458313,
-0.7699570059776306,
0.034596022218465805,
0.34973448514938354,
-0.3675767779350281,
0.7749691605567932,
-1.0115822553634644,
-0.38305535912513733,
1.1836892366409302,
-0.09567401558160782,
-0.6227789521217346,
1.408817172050476,
0.6702714562416077,
-1.0563315153121948,
-0.22539694607257843,
-0.17784395813941956,
-0.8063299655914307,
-0.058175601065158844,
-1.6710784435272217,
-0.1469515860080719,
0.3936710059642792,
-1.5561038255691528,
-0.5161765813827515,
-0.2653748691082001,
1.2477893829345703,
-0.03428920358419418,
1.3296773433685303,
-0.32995739579200745,
-0.1332741230726242,
-0.43456852436065674,
-0.41348230838775635,
0.19125543534755707,
-0.2157396674156189,
-0.7187992334365845,
0.2687373757362366,
-0.7667214274406433,
0.33373793959617615,
1.4905917644500732,
0.34842050075531006,
0.05204924941062927,
0.6110513210296631,
1.0453757047653198,
0.3672043979167938,
-0.09485867619514465,
-0.8096666932106018,
-1.758788824081421,
2.0724403858184814,
-1.4711682796478271,
1.9071425199508667,
0.6761040091514587,
0.03390415385365486,
-1.8640395402908325,
-1.8880072832107544,
1.279821515083313,
1.1217892169952393,
2.389890670776367,
0.5811727643013,
0.4804229438304901,
-0.8068696856498718,
-0.6174143552780151,
0.4957487881183624,
-1.04564368724823,
-0.7394556999206543,
0.09938988089561462,
2.3281819820404053,
1.778638482093811,
-0.48802682757377625,
-0.16564753651618958,
-1.0008045434951782,
1.3430627584457397,
-0.2048022300004959,
0.28711241483688354,
2.0497050285339355,
-0.22866904735565186,
-1.0128633975982666,
1.396729588508606,
-2.2777512073516846,
0.1711389422416687,
1.9684020280838013,
0.16737522184848785,
0.09890024363994598,
-1.3984225988388062,
-0.6181963682174683,
-0.2573154866695404,
-0.37722739577293396,
-1.2389984130859375,
0.5218323469161987,
-0.25218257308006287,
-0.7651563286781311,
-1.4202053546905518,
0.14990262687206268,
-1.1484063863754272,
-1.6171650886535645,
0.14455266296863556,
1.8377320766448975,
1.967905879020691,
-0.7513781189918518,
1.5025120973587036,
-0.30739447474479675,
0.12894757091999054,
1.2449928522109985,
1.2191004753112793,
3.1212518215179443,
1.929624319076538,
-1.304192066192627,
0.7167882919311523,
-0.18697954714298248,
-0.42369067668914795,
1.177715539932251,
-1.1448062658309937,
1.2763442993164062,
-0.13625657558441162,
-1.182474970817566,
-1.068400502204895,
0.9211666584014893,
0.48391056060791016,
0.0009282240644097328,
-0.36788737773895264,
1.2570511102676392,
-0.038507141172885895,
1.28501296043396,
0.5323913097381592,
-0.4617323875427246,
0.6797618269920349,
-0.3290531635284424,
-0.5199142098426819,
1.5442482233047485,
0.32342496514320374,
-1.3147752285003662,
-2.2026896476745605,
-0.1490582376718521,
-0.9334180951118469,
0.052528541535139084,
-0.622979998588562,
-0.838523268699646,
1.64137601852417,
0.29920056462287903,
-1.2682809829711914,
-0.20217837393283844,
-0.3712664246559143,
-0.6142124533653259,
2.71854305267334,
-1.4532090425491333,
-0.18033315241336823,
-0.9936212301254272,
-0.6311256289482117,
1.6625289916992188,
-1.258117437362671,
-0.2985090911388397,
-1.0076719522476196,
-0.4274568259716034,
-1.220940113067627,
-0.6088318824768066,
-0.05192135274410248,
-0.9478578567504883,
0.8675135374069214,
0.12345094233751297,
-1.2241551876068115,
-0.3060780465602875,
-0.88885098695755,
0.933856725692749,
-0.14618255198001862,
0.1466057449579239,
2.001352310180664,
0.4044506251811981,
-0.39783817529678345,
0.722306489944458,
1.1244443655014038,
0.6461051106452942,
-0.6114622354507446,
0.25871825218200684,
-0.7199416756629944,
0.2791399359703064,
-1.409805178642273,
0.2696192264556885,
-2.7687017917633057,
0.6320080161094666,
-0.07683800905942917,
-0.06988044083118439,
0.06797594577074051,
-1.297698974609375,
0.9798740744590759,
2.6271212100982666,
-1.263397455215454,
0.4668472111225128,
0.2522924840450287,
1.2313708066940308,
-1.4571534395217896,
0.3198564648628235,
-0.3339794874191284,
2.0197231769561768,
0.2429809421300888,
1.1141937971115112,
-0.3552550673484802,
-2.160320520401001,
0.718073308467865,
-1.2501927614212036,
-1.1299763917922974,
0.8037776947021484,
-0.8973177075386047,
0.061570290476083755,
-1.3330713510513306,
-0.1981625109910965,
-0.7481260895729065,
-1.1612008810043335,
0.7095200419425964,
0.12690241634845734,
0.4294700622558594,
-0.5115002989768982,
0.3266318142414093,
-2.1844966411590576,
-1.2933628559112549,
-0.25756916403770447,
-0.9423646926879883,
0.4938717782497406,
-0.27222955226898193,
0.6765274405479431,
-0.18922238051891327,
0.03519811853766441,
0.4274655878543854,
1.4842743873596191,
3.421665906906128,
0.0789274200797081,
0.32015520334243774,
-0.24945636093616486,
-0.950030505657196,
1.4185600280761719,
0.904325544834137,
-0.21215687692165375,
-0.617883563041687,
-1.2050150632858276,
1.2342921495437622,
1.9606907367706299,
0.9133440852165222,
0.011826115660369396,
-0.8945465683937073,
-0.8844719529151917,
0.031226005405187607,
0.06538525968790054,
0.4929474890232086,
0.921115517616272,
0.19028182327747345,
0.0375988595187664,
1.5231260061264038,
1.1475645303726196,
-0.36243170499801636,
0.36536362767219543,
-0.8752488493919373,
-0.42628151178359985,
0.5323021411895752,
0.3001575469970703,
0.024018600583076477,
0.19426627457141876,
-1.064638376235962,
-0.20445947349071503,
-0.33655786514282227,
-0.8749420046806335,
-0.8020851612091064,
-0.504220724105835,
-0.30137941241264343,
1.6815396547317505,
0.20242692530155182,
-0.5125110149383545,
-0.1316855251789093,
-0.7716248035430908,
-0.050954729318618774,
-0.9916427731513977,
0.2874681055545807,
-0.057919230312108994,
-0.18869614601135254,
-0.08873023092746735,
1.673539400100708,
-0.9641121029853821,
-2.0176985263824463,
0.2586468458175659,
0.10223458707332611,
-0.3718169629573822,
0.16095079481601715,
1.7109569311141968,
0.5955833196640015,
1.3704283237457275,
1.3109004497528076,
0.9080963730812073,
-0.663645327091217,
-1.271849513053894,
0.45734816789627075,
0.919952392578125,
-1.3990533351898193,
0.7817223072052002,
-0.05303115397691727,
-0.4536408483982086,
0.5580140948295593,
1.2809014320373535,
0.4749314785003662,
-2.0102622509002686,
0.7832150459289551,
-0.964293897151947,
0.6752253174781799,
0.68287593126297,
0.7484361529350281,
0.1632176786661148,
0.7684286236763,
-1.2213361263275146,
-1.2379555702209473,
-0.7701852321624756,
-0.7478219270706177,
1.9601500034332275,
-0.20160040259361267,
0.44297149777412415,
-0.14194723963737488,
-1.4377254247665405,
-0.16175201535224915,
0.7084659934043884,
0.32437649369239807,
-0.5439755320549011,
0.7792975902557373,
-0.6709127426147461,
-1.1346887350082397,
-1.4023131132125854,
-0.5349937081336975,
-0.9878829717636108,
-0.8858718276023865,
1.0318039655685425,
0.8895888924598694,
0.23941074311733246,
1.9226700067520142,
0.6057333946228027,
0.3071776032447815,
-2.653193950653076,
0.9515537023544312,
0.252420574426651,
0.059886764734983444,
0.8816747069358826,
0.3458428680896759,
0.9873824715614319,
-0.2075764387845993,
0.5011532306671143,
-2.394563913345337,
2.3293471336364746,
-0.24723678827285767,
0.5960133671760559,
0.036511898040771484,
-0.09551077336072922,
0.9958280920982361,
0.5002396702766418,
0.6725394129753113,
-1.0467017889022827,
0.5530056357383728,
-0.6914710998535156,
1.1693099737167358,
0.8716542720794678,
-0.8221427798271179,
-0.02784329652786255,
1.3482853174209595,
0.43047329783439636,
-0.6722403168678284,
-0.9738211035728455,
-1.1328092813491821,
0.9710649847984314,
1.8631229400634766,
-0.1154145747423172,
-0.06950792670249939,
0.7930203676223755,
0.5401875972747803,
-1.3991403579711914,
0.0001270519569516182,
-0.6719309687614441,
-0.709580659866333,
1.5323450565338135,
2.116025447845459,
-0.17889197170734406,
-0.22693760693073273,
-0.7301150560379028,
-1.2563554048538208,
0.7349393963813782,
0.07140247523784637,
0.11438753455877304,
0.7892283797264099,
-0.6197546720504761,
1.1631698608398438,
0.8658387660980225,
0.9699316024780273,
0.19303441047668457,
0.3496834933757782,
0.40615391731262207,
-0.28277450799942017,
-1.131630301475525,
-0.3580804765224457,
-0.9951796531677246,
-2.507779836654663,
0.5602849721908569,
-0.13964715600013733,
-1.5078333616256714,
0.03564264625310898,
-1.0343315601348877,
0.9481561183929443,
-0.4620232582092285,
-0.9551352262496948,
-1.421741008758545,
0.17359158396720886,
-0.05385514348745346,
0.9177806377410889,
-1.6366918087005615,
-0.15605510771274567,
1.2323017120361328,
1.0513713359832764,
-0.697161853313446,
0.9797095656394958,
0.3250361680984497,
1.0658140182495117,
0.8841721415519714,
-0.34031614661216736,
0.4982447326183319,
0.007812577299773693,
-1.2374234199523926,
0.41365355253219604,
1.1971213817596436,
0.18145032227039337,
1.380018711090088,
-0.5596325993537903,
0.05049649998545647,
0.4302946627140045,
-0.612585186958313,
-0.33003637194633484,
-0.5635422468185425,
0.669134259223938,
0.10096514225006104,
-0.881065845489502,
-0.06349284201860428,
0.003196294419467449,
-0.20894639194011688,
0.1564462035894394,
-1.4710100889205933,
-0.12866806983947754,
-0.24058757722377777,
-0.5890002250671387,
-1.1102944612503052,
-0.17000718414783478,
1.3361616134643555,
-0.8316822052001953,
-0.20798136293888092,
0.6050024628639221,
0.3295622766017914,
0.6127539873123169,
0.5827475786209106,
-0.8025842905044556,
-0.2898080348968506,
-0.1606030911207199,
-0.3512335419654846,
0.2899453043937683,
1.4475431442260742,
-0.03492593392729759,
-1.0040645599365234,
0.7522264122962952,
-0.3574110269546509,
0.07088976353406906,
2.0069408416748047,
0.05992208793759346,
-0.8493474721908569,
0.15875400602817535,
-0.6800208687782288,
1.9210381507873535,
1.7507562637329102,
1.2795586585998535,
-0.034250445663928986,
-0.994504451751709,
0.5878463387489319,
-0.3066956400871277,
-0.2858400046825409,
0.8312714695930481,
0.37434330582618713,
-0.2809799015522003,
-1.2745646238327026,
0.6716364026069641,
1.262791633605957,
-0.8905713558197021,
-0.8101915121078491,
-0.0022310051135718822,
-0.7887418270111084,
1.1592903137207031,
0.8201735019683838,
0.3775714933872223,
0.2364606112241745,
1.5881822109222412,
0.8020243644714355,
-0.4410323202610016,
0.5967516303062439,
0.6222841143608093,
-0.18977384269237518,
-2.0589969158172607,
-1.0437874794006348,
0.38239696621894836,
-0.4099450409412384,
-1.697709321975708,
1.3499943017959595,
-1.2998822927474976,
-0.9038885235786438,
0.5199531316757202,
0.08014196157455444,
1.5421030521392822,
0.42061638832092285,
1.501439094543457,
2.0736196041107178,
0.998849093914032,
0.41844597458839417,
1.2727100849151611,
-0.16535937786102295,
-0.5131171345710754,
1.7496987581253052,
-0.4477277398109436,
0.482941597700119,
1.0049248933792114,
-0.2493288367986679,
-1.0072309970855713,
-0.7622330188751221,
-1.2008686065673828,
-0.8077659606933594,
1.1582506895065308,
0.030483607202768326,
-1.0913405418395996,
0.26777908205986023,
1.5817577838897705,
0.12969931960105896,
-0.31622692942619324,
0.7186712622642517,
0.40256085991859436,
-0.8269557952880859,
-0.10903758555650711,
-0.8827910423278809,
0.4962739050388336,
-0.13411252200603485,
-0.3624551296234131,
0.4031291604042053,
0.26284340023994446,
1.343964695930481,
0.04322217404842377,
0.18205997347831726,
1.2079746723175049,
-1.3993381261825562,
1.619053602218628,
-0.6367594599723816,
0.27456653118133545,
-2.4329864978790283,
1.4371598958969116,
-0.808871865272522,
1.9206682443618774,
-2.5846152305603027,
0.47695717215538025,
-0.5270923972129822,
-0.48380762338638306,
0.20708250999450684,
-0.3390561640262604,
0.05289335176348686,
-0.054824963212013245,
-1.3333884477615356,
-0.037539009004831314,
-0.6566894054412842,
0.5629671216011047,
1.0660784244537354,
1.3415358066558838,
-1.1204503774642944,
-0.26502180099487305,
-1.795602560043335,
-0.15598009526729584,
-0.6707349419593811,
0.32854264974594116,
-1.857424020767212,
-0.18083038926124573,
-1.8596017360687256,
-2.439415693283081,
-1.3755704164505005,
-0.8062856793403625,
1.2052923440933228,
0.11325948685407639,
-0.8339816927909851,
1.1656326055526733,
-0.37950214743614197,
-1.9197404384613037,
1.0664535760879517,
-2.1887288093566895
] |
https://github.com/huggingface/datasets/issues/6043 | Compression kwargs have no effect when saving datasets as csv | Hi @aryanxk02 ! Sure, what I actually meant is that when passing a path-like `path_or_buf` here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/arrow_dataset.py#L4708-L4714
it gets converted to a file object behind the scenes here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L92-L94
and the eventual pandas `.to_csv()` calls that write to it always get `path_or_buf=None`, making pandas ignore the `compression` kwarg in the `to_csv_kwargs`
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L107-L109 | ### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
| 59 | 52 | Compression kwargs have no effect when saving datasets as csv
### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
Hi @aryanxk02 ! Sure, what I actually meant is that when passing a path-like `path_or_buf` here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/arrow_dataset.py#L4708-L4714
it gets converted to a file object behind the scenes here
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L92-L94
and the eventual pandas `.to_csv()` calls that write to it always get `path_or_buf=None`, making pandas ignore the `compression` kwarg in the `to_csv_kwargs`
https://github.com/huggingface/datasets/blob/14f6edd9222e577dccb962ed5338b79b73502fa5/src/datasets/io/csv.py#L107-L109 | [
-1.1168360710144043,
-0.900812566280365,
-0.7744753956794739,
1.420461654663086,
-0.10985736548900604,
-1.2823952436447144,
0.10812487453222275,
-1.1060352325439453,
1.7183713912963867,
-0.8180946111679077,
0.30754318833351135,
-1.7111681699752808,
-0.037234142422676086,
-0.6284632682800293,
-0.7869439721107483,
-0.842337965965271,
-0.3671760559082031,
-0.7356948852539062,
1.0616806745529175,
2.532766819000244,
1.1255848407745361,
-1.3166515827178955,
2.645268440246582,
0.7567117810249329,
-0.09349629282951355,
-0.9773021936416626,
0.6166613101959229,
-0.05566178634762764,
-1.3202784061431885,
-0.3777313828468323,
-0.976398229598999,
-0.09636224806308746,
-0.5742902755737305,
-0.5596725344657898,
0.10166124254465103,
0.35852500796318054,
-0.31098708510398865,
-0.5040317177772522,
-0.7136236429214478,
-0.7985639572143555,
0.446877658367157,
-0.494199275970459,
0.9638375639915466,
-0.31646132469177246,
1.8036441802978516,
-0.6311697363853455,
0.4995254576206207,
0.7608989477157593,
1.3689486980438232,
0.21106350421905518,
0.018131215125322342,
0.4492940902709961,
0.37609395384788513,
0.06759265065193176,
0.5326135754585266,
1.11244797706604,
0.6211467981338501,
0.4901892840862274,
0.8133689165115356,
-2.2875254154205322,
1.3365628719329834,
-1.018896460533142,
0.24848662316799164,
1.3066656589508057,
-0.9322461485862732,
0.3483022153377533,
-1.820330023765564,
-0.007575477939099073,
0.48830586671829224,
-2.266836166381836,
0.28881749510765076,
-1.4255239963531494,
-0.4513356387615204,
1.0744197368621826,
0.47918862104415894,
-1.2201086282730103,
0.15822993218898773,
-0.39245355129241943,
0.904414713382721,
0.47625061869621277,
1.1169764995574951,
-1.7270770072937012,
-0.14570334553718567,
-0.28595131635665894,
0.09915205836296082,
-1.2110257148742676,
-1.506848692893982,
0.6141206622123718,
0.7950940728187561,
0.534454882144928,
-0.2153249830007553,
0.9809665083885193,
-1.024024248123169,
0.7056279182434082,
-0.9511116147041321,
-1.851266622543335,
-1.5006721019744873,
-2.168666362762451,
-2.289398193359375,
0.7580740451812744,
-0.5142483711242676,
-0.480497807264328,
2.0463414192199707,
-1.0565438270568848,
-1.7535772323608398,
1.126138687133789,
0.19421438872814178,
-0.014116848818957806,
2.2924513816833496,
0.2827785313129425,
-0.6294167637825012,
0.46312952041625977,
-0.7297751903533936,
0.7052890062332153,
-0.29096925258636475,
1.300283432006836,
0.4354283809661865,
-1.0290502309799194,
1.6892845630645752,
-0.33662453293800354,
0.5764448046684265,
-0.6458566188812256,
-0.3485567271709442,
-0.721570611000061,
0.3467790484428406,
1.9288711547851562,
-0.26486602425575256,
1.566208839416504,
-0.3556104898452759,
-1.663101315498352,
-1.6912245750427246,
0.8407086133956909,
0.5458827614784241,
-0.7145107388496399,
0.12283540517091751,
-0.4115927517414093,
0.20062409341335297,
0.04442141577601433,
1.2501733303070068,
1.349433422088623,
0.7620142102241516,
-0.36444225907325745,
-0.8268612623214722,
0.16021601855754852,
0.08235783874988556,
-0.7760504484176636,
-1.7979854345321655,
-0.47937700152397156,
0.20667734742164612,
0.6025454998016357,
-1.114196538925171,
1.7836555242538452,
0.9135195016860962,
1.830004334449768,
1.1420972347259521,
-0.31335124373435974,
1.4864271879196167,
0.08891359716653824,
1.9674263000488281,
-0.4325464963912964,
0.5953192710876465,
-0.3854287266731262,
-1.1607589721679688,
0.7500196695327759,
-0.32228463888168335,
-2.0464274883270264,
-0.7968129515647888,
-0.8075549006462097,
-0.18170644342899323,
-0.6517871618270874,
0.9451525211334229,
-0.26643237471580505,
-1.29752516746521,
0.13507485389709473,
-0.8206679821014404,
0.07140497118234634,
-1.1798527240753174,
0.1861151158809662,
0.6935595870018005,
-0.6966843008995056,
0.15944696962833405,
-0.2999487817287445,
-1.3526554107666016,
-0.32391589879989624,
0.23322689533233643,
1.8739148378372192,
-0.8825843334197998,
0.8714936375617981,
1.064733624458313,
-0.7699570059776306,
0.034596022218465805,
0.34973448514938354,
-0.3675767779350281,
0.7749691605567932,
-1.0115822553634644,
-0.38305535912513733,
1.1836892366409302,
-0.09567401558160782,
-0.6227789521217346,
1.408817172050476,
0.6702714562416077,
-1.0563315153121948,
-0.22539694607257843,
-0.17784395813941956,
-0.8063299655914307,
-0.058175601065158844,
-1.6710784435272217,
-0.1469515860080719,
0.3936710059642792,
-1.5561038255691528,
-0.5161765813827515,
-0.2653748691082001,
1.2477893829345703,
-0.03428920358419418,
1.3296773433685303,
-0.32995739579200745,
-0.1332741230726242,
-0.43456852436065674,
-0.41348230838775635,
0.19125543534755707,
-0.2157396674156189,
-0.7187992334365845,
0.2687373757362366,
-0.7667214274406433,
0.33373793959617615,
1.4905917644500732,
0.34842050075531006,
0.05204924941062927,
0.6110513210296631,
1.0453757047653198,
0.3672043979167938,
-0.09485867619514465,
-0.8096666932106018,
-1.758788824081421,
2.0724403858184814,
-1.4711682796478271,
1.9071425199508667,
0.6761040091514587,
0.03390415385365486,
-1.8640395402908325,
-1.8880072832107544,
1.279821515083313,
1.1217892169952393,
2.389890670776367,
0.5811727643013,
0.4804229438304901,
-0.8068696856498718,
-0.6174143552780151,
0.4957487881183624,
-1.04564368724823,
-0.7394556999206543,
0.09938988089561462,
2.3281819820404053,
1.778638482093811,
-0.48802682757377625,
-0.16564753651618958,
-1.0008045434951782,
1.3430627584457397,
-0.2048022300004959,
0.28711241483688354,
2.0497050285339355,
-0.22866904735565186,
-1.0128633975982666,
1.396729588508606,
-2.2777512073516846,
0.1711389422416687,
1.9684020280838013,
0.16737522184848785,
0.09890024363994598,
-1.3984225988388062,
-0.6181963682174683,
-0.2573154866695404,
-0.37722739577293396,
-1.2389984130859375,
0.5218323469161987,
-0.25218257308006287,
-0.7651563286781311,
-1.4202053546905518,
0.14990262687206268,
-1.1484063863754272,
-1.6171650886535645,
0.14455266296863556,
1.8377320766448975,
1.967905879020691,
-0.7513781189918518,
1.5025120973587036,
-0.30739447474479675,
0.12894757091999054,
1.2449928522109985,
1.2191004753112793,
3.1212518215179443,
1.929624319076538,
-1.304192066192627,
0.7167882919311523,
-0.18697954714298248,
-0.42369067668914795,
1.177715539932251,
-1.1448062658309937,
1.2763442993164062,
-0.13625657558441162,
-1.182474970817566,
-1.068400502204895,
0.9211666584014893,
0.48391056060791016,
0.0009282240644097328,
-0.36788737773895264,
1.2570511102676392,
-0.038507141172885895,
1.28501296043396,
0.5323913097381592,
-0.4617323875427246,
0.6797618269920349,
-0.3290531635284424,
-0.5199142098426819,
1.5442482233047485,
0.32342496514320374,
-1.3147752285003662,
-2.2026896476745605,
-0.1490582376718521,
-0.9334180951118469,
0.052528541535139084,
-0.622979998588562,
-0.838523268699646,
1.64137601852417,
0.29920056462287903,
-1.2682809829711914,
-0.20217837393283844,
-0.3712664246559143,
-0.6142124533653259,
2.71854305267334,
-1.4532090425491333,
-0.18033315241336823,
-0.9936212301254272,
-0.6311256289482117,
1.6625289916992188,
-1.258117437362671,
-0.2985090911388397,
-1.0076719522476196,
-0.4274568259716034,
-1.220940113067627,
-0.6088318824768066,
-0.05192135274410248,
-0.9478578567504883,
0.8675135374069214,
0.12345094233751297,
-1.2241551876068115,
-0.3060780465602875,
-0.88885098695755,
0.933856725692749,
-0.14618255198001862,
0.1466057449579239,
2.001352310180664,
0.4044506251811981,
-0.39783817529678345,
0.722306489944458,
1.1244443655014038,
0.6461051106452942,
-0.6114622354507446,
0.25871825218200684,
-0.7199416756629944,
0.2791399359703064,
-1.409805178642273,
0.2696192264556885,
-2.7687017917633057,
0.6320080161094666,
-0.07683800905942917,
-0.06988044083118439,
0.06797594577074051,
-1.297698974609375,
0.9798740744590759,
2.6271212100982666,
-1.263397455215454,
0.4668472111225128,
0.2522924840450287,
1.2313708066940308,
-1.4571534395217896,
0.3198564648628235,
-0.3339794874191284,
2.0197231769561768,
0.2429809421300888,
1.1141937971115112,
-0.3552550673484802,
-2.160320520401001,
0.718073308467865,
-1.2501927614212036,
-1.1299763917922974,
0.8037776947021484,
-0.8973177075386047,
0.061570290476083755,
-1.3330713510513306,
-0.1981625109910965,
-0.7481260895729065,
-1.1612008810043335,
0.7095200419425964,
0.12690241634845734,
0.4294700622558594,
-0.5115002989768982,
0.3266318142414093,
-2.1844966411590576,
-1.2933628559112549,
-0.25756916403770447,
-0.9423646926879883,
0.4938717782497406,
-0.27222955226898193,
0.6765274405479431,
-0.18922238051891327,
0.03519811853766441,
0.4274655878543854,
1.4842743873596191,
3.421665906906128,
0.0789274200797081,
0.32015520334243774,
-0.24945636093616486,
-0.950030505657196,
1.4185600280761719,
0.904325544834137,
-0.21215687692165375,
-0.617883563041687,
-1.2050150632858276,
1.2342921495437622,
1.9606907367706299,
0.9133440852165222,
0.011826115660369396,
-0.8945465683937073,
-0.8844719529151917,
0.031226005405187607,
0.06538525968790054,
0.4929474890232086,
0.921115517616272,
0.19028182327747345,
0.0375988595187664,
1.5231260061264038,
1.1475645303726196,
-0.36243170499801636,
0.36536362767219543,
-0.8752488493919373,
-0.42628151178359985,
0.5323021411895752,
0.3001575469970703,
0.024018600583076477,
0.19426627457141876,
-1.064638376235962,
-0.20445947349071503,
-0.33655786514282227,
-0.8749420046806335,
-0.8020851612091064,
-0.504220724105835,
-0.30137941241264343,
1.6815396547317505,
0.20242692530155182,
-0.5125110149383545,
-0.1316855251789093,
-0.7716248035430908,
-0.050954729318618774,
-0.9916427731513977,
0.2874681055545807,
-0.057919230312108994,
-0.18869614601135254,
-0.08873023092746735,
1.673539400100708,
-0.9641121029853821,
-2.0176985263824463,
0.2586468458175659,
0.10223458707332611,
-0.3718169629573822,
0.16095079481601715,
1.7109569311141968,
0.5955833196640015,
1.3704283237457275,
1.3109004497528076,
0.9080963730812073,
-0.663645327091217,
-1.271849513053894,
0.45734816789627075,
0.919952392578125,
-1.3990533351898193,
0.7817223072052002,
-0.05303115397691727,
-0.4536408483982086,
0.5580140948295593,
1.2809014320373535,
0.4749314785003662,
-2.0102622509002686,
0.7832150459289551,
-0.964293897151947,
0.6752253174781799,
0.68287593126297,
0.7484361529350281,
0.1632176786661148,
0.7684286236763,
-1.2213361263275146,
-1.2379555702209473,
-0.7701852321624756,
-0.7478219270706177,
1.9601500034332275,
-0.20160040259361267,
0.44297149777412415,
-0.14194723963737488,
-1.4377254247665405,
-0.16175201535224915,
0.7084659934043884,
0.32437649369239807,
-0.5439755320549011,
0.7792975902557373,
-0.6709127426147461,
-1.1346887350082397,
-1.4023131132125854,
-0.5349937081336975,
-0.9878829717636108,
-0.8858718276023865,
1.0318039655685425,
0.8895888924598694,
0.23941074311733246,
1.9226700067520142,
0.6057333946228027,
0.3071776032447815,
-2.653193950653076,
0.9515537023544312,
0.252420574426651,
0.059886764734983444,
0.8816747069358826,
0.3458428680896759,
0.9873824715614319,
-0.2075764387845993,
0.5011532306671143,
-2.394563913345337,
2.3293471336364746,
-0.24723678827285767,
0.5960133671760559,
0.036511898040771484,
-0.09551077336072922,
0.9958280920982361,
0.5002396702766418,
0.6725394129753113,
-1.0467017889022827,
0.5530056357383728,
-0.6914710998535156,
1.1693099737167358,
0.8716542720794678,
-0.8221427798271179,
-0.02784329652786255,
1.3482853174209595,
0.43047329783439636,
-0.6722403168678284,
-0.9738211035728455,
-1.1328092813491821,
0.9710649847984314,
1.8631229400634766,
-0.1154145747423172,
-0.06950792670249939,
0.7930203676223755,
0.5401875972747803,
-1.3991403579711914,
0.0001270519569516182,
-0.6719309687614441,
-0.709580659866333,
1.5323450565338135,
2.116025447845459,
-0.17889197170734406,
-0.22693760693073273,
-0.7301150560379028,
-1.2563554048538208,
0.7349393963813782,
0.07140247523784637,
0.11438753455877304,
0.7892283797264099,
-0.6197546720504761,
1.1631698608398438,
0.8658387660980225,
0.9699316024780273,
0.19303441047668457,
0.3496834933757782,
0.40615391731262207,
-0.28277450799942017,
-1.131630301475525,
-0.3580804765224457,
-0.9951796531677246,
-2.507779836654663,
0.5602849721908569,
-0.13964715600013733,
-1.5078333616256714,
0.03564264625310898,
-1.0343315601348877,
0.9481561183929443,
-0.4620232582092285,
-0.9551352262496948,
-1.421741008758545,
0.17359158396720886,
-0.05385514348745346,
0.9177806377410889,
-1.6366918087005615,
-0.15605510771274567,
1.2323017120361328,
1.0513713359832764,
-0.697161853313446,
0.9797095656394958,
0.3250361680984497,
1.0658140182495117,
0.8841721415519714,
-0.34031614661216736,
0.4982447326183319,
0.007812577299773693,
-1.2374234199523926,
0.41365355253219604,
1.1971213817596436,
0.18145032227039337,
1.380018711090088,
-0.5596325993537903,
0.05049649998545647,
0.4302946627140045,
-0.612585186958313,
-0.33003637194633484,
-0.5635422468185425,
0.669134259223938,
0.10096514225006104,
-0.881065845489502,
-0.06349284201860428,
0.003196294419467449,
-0.20894639194011688,
0.1564462035894394,
-1.4710100889205933,
-0.12866806983947754,
-0.24058757722377777,
-0.5890002250671387,
-1.1102944612503052,
-0.17000718414783478,
1.3361616134643555,
-0.8316822052001953,
-0.20798136293888092,
0.6050024628639221,
0.3295622766017914,
0.6127539873123169,
0.5827475786209106,
-0.8025842905044556,
-0.2898080348968506,
-0.1606030911207199,
-0.3512335419654846,
0.2899453043937683,
1.4475431442260742,
-0.03492593392729759,
-1.0040645599365234,
0.7522264122962952,
-0.3574110269546509,
0.07088976353406906,
2.0069408416748047,
0.05992208793759346,
-0.8493474721908569,
0.15875400602817535,
-0.6800208687782288,
1.9210381507873535,
1.7507562637329102,
1.2795586585998535,
-0.034250445663928986,
-0.994504451751709,
0.5878463387489319,
-0.3066956400871277,
-0.2858400046825409,
0.8312714695930481,
0.37434330582618713,
-0.2809799015522003,
-1.2745646238327026,
0.6716364026069641,
1.262791633605957,
-0.8905713558197021,
-0.8101915121078491,
-0.0022310051135718822,
-0.7887418270111084,
1.1592903137207031,
0.8201735019683838,
0.3775714933872223,
0.2364606112241745,
1.5881822109222412,
0.8020243644714355,
-0.4410323202610016,
0.5967516303062439,
0.6222841143608093,
-0.18977384269237518,
-2.0589969158172607,
-1.0437874794006348,
0.38239696621894836,
-0.4099450409412384,
-1.697709321975708,
1.3499943017959595,
-1.2998822927474976,
-0.9038885235786438,
0.5199531316757202,
0.08014196157455444,
1.5421030521392822,
0.42061638832092285,
1.501439094543457,
2.0736196041107178,
0.998849093914032,
0.41844597458839417,
1.2727100849151611,
-0.16535937786102295,
-0.5131171345710754,
1.7496987581253052,
-0.4477277398109436,
0.482941597700119,
1.0049248933792114,
-0.2493288367986679,
-1.0072309970855713,
-0.7622330188751221,
-1.2008686065673828,
-0.8077659606933594,
1.1582506895065308,
0.030483607202768326,
-1.0913405418395996,
0.26777908205986023,
1.5817577838897705,
0.12969931960105896,
-0.31622692942619324,
0.7186712622642517,
0.40256085991859436,
-0.8269557952880859,
-0.10903758555650711,
-0.8827910423278809,
0.4962739050388336,
-0.13411252200603485,
-0.3624551296234131,
0.4031291604042053,
0.26284340023994446,
1.343964695930481,
0.04322217404842377,
0.18205997347831726,
1.2079746723175049,
-1.3993381261825562,
1.619053602218628,
-0.6367594599723816,
0.27456653118133545,
-2.4329864978790283,
1.4371598958969116,
-0.808871865272522,
1.9206682443618774,
-2.5846152305603027,
0.47695717215538025,
-0.5270923972129822,
-0.48380762338638306,
0.20708250999450684,
-0.3390561640262604,
0.05289335176348686,
-0.054824963212013245,
-1.3333884477615356,
-0.037539009004831314,
-0.6566894054412842,
0.5629671216011047,
1.0660784244537354,
1.3415358066558838,
-1.1204503774642944,
-0.26502180099487305,
-1.795602560043335,
-0.15598009526729584,
-0.6707349419593811,
0.32854264974594116,
-1.857424020767212,
-0.18083038926124573,
-1.8596017360687256,
-2.439415693283081,
-1.3755704164505005,
-0.8062856793403625,
1.2052923440933228,
0.11325948685407639,
-0.8339816927909851,
1.1656326055526733,
-0.37950214743614197,
-1.9197404384613037,
1.0664535760879517,
-2.1887288093566895
] |
https://github.com/huggingface/datasets/issues/6043 | Compression kwargs have no effect when saving datasets as csv | @exs-avianello When `path_or_buf` is set to None, the `to_csv()` method will return the CSV data as a string instead of saving it to a file. Hence the compression doesn't take place. I think setting `path_or_buf=self.path_or_buf` should work. What you say? | ### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
| 59 | 40 | Compression kwargs have no effect when saving datasets as csv
### Describe the bug
Attempting to save a dataset as a compressed csv file, the compression kwargs provided to `.to_csv()` that get piped to panda's `pandas.DataFrame.to_csv` do not have any effect - resulting in the dataset not getting compressed.
A warning is raised if explicitly providing a `compression` kwarg, but no warnings are raised if relying on the defaults. This can lead to datasets secretly not getting compressed for users expecting the behaviour to match panda's `.to_csv()`, where the compression format is automatically inferred from the destination path suffix.
### Steps to reproduce the bug
```python
# dataset is not compressed (but at least a warning is emitted)
import datasets
dataset = datasets.load_dataset("rotten_tomatoes", split="train")
dataset.to_csv("uncompressed.csv")
print(os.path.getsize("uncompressed.csv")) # 1008607
dataset.to_csv("compressed.csv.gz", compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1})
print(os.path.getsize("compressed.csv.gz")) # 1008607
```
```shell
>>>
RuntimeWarning: compression has no effect when passing a non-binary object as input.
csv_str = batch.to_pandas().to_csv(
```
```python
# dataset is not compressed and no warnings are emitted
dataset.to_csv("compressed.csv.gz")
print(os.path.getsize("compressed.csv.gz")) # 1008607
# compare with
dataset.to_pandas().to_csv("pandas.csv.gz")
print(os.path.getsize("pandas.csv.gz")) # 418561
```
---
I think that this is because behind the scenes `pandas.DataFrame.to_csv` is always called with a buf-like `path_or_buf`, but users that are providing a path-like to `datasets.Dataset.to_csv` are likely not to expect / know that - leading to a mismatch in their understanding of the expected behaviour of the `compression` kwarg.
### Expected behavior
The dataset to be saved as a compressed csv file when providing a `compression` kwarg, or when relying on the default `compression='infer'`
### Environment info
`datasets == 2.13.1`
@exs-avianello When `path_or_buf` is set to None, the `to_csv()` method will return the CSV data as a string instead of saving it to a file. Hence the compression doesn't take place. I think setting `path_or_buf=self.path_or_buf` should work. What you say? | [
-1.1168360710144043,
-0.900812566280365,
-0.7744753956794739,
1.420461654663086,
-0.10985736548900604,
-1.2823952436447144,
0.10812487453222275,
-1.1060352325439453,
1.7183713912963867,
-0.8180946111679077,
0.30754318833351135,
-1.7111681699752808,
-0.037234142422676086,
-0.6284632682800293,
-0.7869439721107483,
-0.842337965965271,
-0.3671760559082031,
-0.7356948852539062,
1.0616806745529175,
2.532766819000244,
1.1255848407745361,
-1.3166515827178955,
2.645268440246582,
0.7567117810249329,
-0.09349629282951355,
-0.9773021936416626,
0.6166613101959229,
-0.05566178634762764,
-1.3202784061431885,
-0.3777313828468323,
-0.976398229598999,
-0.09636224806308746,
-0.5742902755737305,
-0.5596725344657898,
0.10166124254465103,
0.35852500796318054,
-0.31098708510398865,
-0.5040317177772522,
-0.7136236429214478,
-0.7985639572143555,
0.446877658367157,
-0.494199275970459,
0.9638375639915466,
-0.31646132469177246,
1.8036441802978516,
-0.6311697363853455,
0.4995254576206207,
0.7608989477157593,
1.3689486980438232,
0.21106350421905518,
0.018131215125322342,
0.4492940902709961,
0.37609395384788513,
0.06759265065193176,
0.5326135754585266,
1.11244797706604,
0.6211467981338501,
0.4901892840862274,
0.8133689165115356,
-2.2875254154205322,
1.3365628719329834,
-1.018896460533142,
0.24848662316799164,
1.3066656589508057,
-0.9322461485862732,
0.3483022153377533,
-1.820330023765564,
-0.007575477939099073,
0.48830586671829224,
-2.266836166381836,
0.28881749510765076,
-1.4255239963531494,
-0.4513356387615204,
1.0744197368621826,
0.47918862104415894,
-1.2201086282730103,
0.15822993218898773,
-0.39245355129241943,
0.904414713382721,
0.47625061869621277,
1.1169764995574951,
-1.7270770072937012,
-0.14570334553718567,
-0.28595131635665894,
0.09915205836296082,
-1.2110257148742676,
-1.506848692893982,
0.6141206622123718,
0.7950940728187561,
0.534454882144928,
-0.2153249830007553,
0.9809665083885193,
-1.024024248123169,
0.7056279182434082,
-0.9511116147041321,
-1.851266622543335,
-1.5006721019744873,
-2.168666362762451,
-2.289398193359375,
0.7580740451812744,
-0.5142483711242676,
-0.480497807264328,
2.0463414192199707,
-1.0565438270568848,
-1.7535772323608398,
1.126138687133789,
0.19421438872814178,
-0.014116848818957806,
2.2924513816833496,
0.2827785313129425,
-0.6294167637825012,
0.46312952041625977,
-0.7297751903533936,
0.7052890062332153,
-0.29096925258636475,
1.300283432006836,
0.4354283809661865,
-1.0290502309799194,
1.6892845630645752,
-0.33662453293800354,
0.5764448046684265,
-0.6458566188812256,
-0.3485567271709442,
-0.721570611000061,
0.3467790484428406,
1.9288711547851562,
-0.26486602425575256,
1.566208839416504,
-0.3556104898452759,
-1.663101315498352,
-1.6912245750427246,
0.8407086133956909,
0.5458827614784241,
-0.7145107388496399,
0.12283540517091751,
-0.4115927517414093,
0.20062409341335297,
0.04442141577601433,
1.2501733303070068,
1.349433422088623,
0.7620142102241516,
-0.36444225907325745,
-0.8268612623214722,
0.16021601855754852,
0.08235783874988556,
-0.7760504484176636,
-1.7979854345321655,
-0.47937700152397156,
0.20667734742164612,
0.6025454998016357,
-1.114196538925171,
1.7836555242538452,
0.9135195016860962,
1.830004334449768,
1.1420972347259521,
-0.31335124373435974,
1.4864271879196167,
0.08891359716653824,
1.9674263000488281,
-0.4325464963912964,
0.5953192710876465,
-0.3854287266731262,
-1.1607589721679688,
0.7500196695327759,
-0.32228463888168335,
-2.0464274883270264,
-0.7968129515647888,
-0.8075549006462097,
-0.18170644342899323,
-0.6517871618270874,
0.9451525211334229,
-0.26643237471580505,
-1.29752516746521,
0.13507485389709473,
-0.8206679821014404,
0.07140497118234634,
-1.1798527240753174,
0.1861151158809662,
0.6935595870018005,
-0.6966843008995056,
0.15944696962833405,
-0.2999487817287445,
-1.3526554107666016,
-0.32391589879989624,
0.23322689533233643,
1.8739148378372192,
-0.8825843334197998,
0.8714936375617981,
1.064733624458313,
-0.7699570059776306,
0.034596022218465805,
0.34973448514938354,
-0.3675767779350281,
0.7749691605567932,
-1.0115822553634644,
-0.38305535912513733,
1.1836892366409302,
-0.09567401558160782,
-0.6227789521217346,
1.408817172050476,
0.6702714562416077,
-1.0563315153121948,
-0.22539694607257843,
-0.17784395813941956,
-0.8063299655914307,
-0.058175601065158844,
-1.6710784435272217,
-0.1469515860080719,
0.3936710059642792,
-1.5561038255691528,
-0.5161765813827515,
-0.2653748691082001,
1.2477893829345703,
-0.03428920358419418,
1.3296773433685303,
-0.32995739579200745,
-0.1332741230726242,
-0.43456852436065674,
-0.41348230838775635,
0.19125543534755707,
-0.2157396674156189,
-0.7187992334365845,
0.2687373757362366,
-0.7667214274406433,
0.33373793959617615,
1.4905917644500732,
0.34842050075531006,
0.05204924941062927,
0.6110513210296631,
1.0453757047653198,
0.3672043979167938,
-0.09485867619514465,
-0.8096666932106018,
-1.758788824081421,
2.0724403858184814,
-1.4711682796478271,
1.9071425199508667,
0.6761040091514587,
0.03390415385365486,
-1.8640395402908325,
-1.8880072832107544,
1.279821515083313,
1.1217892169952393,
2.389890670776367,
0.5811727643013,
0.4804229438304901,
-0.8068696856498718,
-0.6174143552780151,
0.4957487881183624,
-1.04564368724823,
-0.7394556999206543,
0.09938988089561462,
2.3281819820404053,
1.778638482093811,
-0.48802682757377625,
-0.16564753651618958,
-1.0008045434951782,
1.3430627584457397,
-0.2048022300004959,
0.28711241483688354,
2.0497050285339355,
-0.22866904735565186,
-1.0128633975982666,
1.396729588508606,
-2.2777512073516846,
0.1711389422416687,
1.9684020280838013,
0.16737522184848785,
0.09890024363994598,
-1.3984225988388062,
-0.6181963682174683,
-0.2573154866695404,
-0.37722739577293396,
-1.2389984130859375,
0.5218323469161987,
-0.25218257308006287,
-0.7651563286781311,
-1.4202053546905518,
0.14990262687206268,
-1.1484063863754272,
-1.6171650886535645,
0.14455266296863556,
1.8377320766448975,
1.967905879020691,
-0.7513781189918518,
1.5025120973587036,
-0.30739447474479675,
0.12894757091999054,
1.2449928522109985,
1.2191004753112793,
3.1212518215179443,
1.929624319076538,
-1.304192066192627,
0.7167882919311523,
-0.18697954714298248,
-0.42369067668914795,
1.177715539932251,
-1.1448062658309937,
1.2763442993164062,
-0.13625657558441162,
-1.182474970817566,
-1.068400502204895,
0.9211666584014893,
0.48391056060791016,
0.0009282240644097328,
-0.36788737773895264,
1.2570511102676392,
-0.038507141172885895,
1.28501296043396,
0.5323913097381592,
-0.4617323875427246,
0.6797618269920349,
-0.3290531635284424,
-0.5199142098426819,
1.5442482233047485,
0.32342496514320374,
-1.3147752285003662,
-2.2026896476745605,
-0.1490582376718521,
-0.9334180951118469,
0.052528541535139084,
-0.622979998588562,
-0.838523268699646,
1.64137601852417,
0.29920056462287903,
-1.2682809829711914,
-0.20217837393283844,
-0.3712664246559143,
-0.6142124533653259,
2.71854305267334,
-1.4532090425491333,
-0.18033315241336823,
-0.9936212301254272,
-0.6311256289482117,
1.6625289916992188,
-1.258117437362671,
-0.2985090911388397,
-1.0076719522476196,
-0.4274568259716034,
-1.220940113067627,
-0.6088318824768066,
-0.05192135274410248,
-0.9478578567504883,
0.8675135374069214,
0.12345094233751297,
-1.2241551876068115,
-0.3060780465602875,
-0.88885098695755,
0.933856725692749,
-0.14618255198001862,
0.1466057449579239,
2.001352310180664,
0.4044506251811981,
-0.39783817529678345,
0.722306489944458,
1.1244443655014038,
0.6461051106452942,
-0.6114622354507446,
0.25871825218200684,
-0.7199416756629944,
0.2791399359703064,
-1.409805178642273,
0.2696192264556885,
-2.7687017917633057,
0.6320080161094666,
-0.07683800905942917,
-0.06988044083118439,
0.06797594577074051,
-1.297698974609375,
0.9798740744590759,
2.6271212100982666,
-1.263397455215454,
0.4668472111225128,
0.2522924840450287,
1.2313708066940308,
-1.4571534395217896,
0.3198564648628235,
-0.3339794874191284,
2.0197231769561768,
0.2429809421300888,
1.1141937971115112,
-0.3552550673484802,
-2.160320520401001,
0.718073308467865,
-1.2501927614212036,
-1.1299763917922974,
0.8037776947021484,
-0.8973177075386047,
0.061570290476083755,
-1.3330713510513306,
-0.1981625109910965,
-0.7481260895729065,
-1.1612008810043335,
0.7095200419425964,
0.12690241634845734,
0.4294700622558594,
-0.5115002989768982,
0.3266318142414093,
-2.1844966411590576,
-1.2933628559112549,
-0.25756916403770447,
-0.9423646926879883,
0.4938717782497406,
-0.27222955226898193,
0.6765274405479431,
-0.18922238051891327,
0.03519811853766441,
0.4274655878543854,
1.4842743873596191,
3.421665906906128,
0.0789274200797081,
0.32015520334243774,
-0.24945636093616486,
-0.950030505657196,
1.4185600280761719,
0.904325544834137,
-0.21215687692165375,
-0.617883563041687,
-1.2050150632858276,
1.2342921495437622,
1.9606907367706299,
0.9133440852165222,
0.011826115660369396,
-0.8945465683937073,
-0.8844719529151917,
0.031226005405187607,
0.06538525968790054,
0.4929474890232086,
0.921115517616272,
0.19028182327747345,
0.0375988595187664,
1.5231260061264038,
1.1475645303726196,
-0.36243170499801636,
0.36536362767219543,
-0.8752488493919373,
-0.42628151178359985,
0.5323021411895752,
0.3001575469970703,
0.024018600583076477,
0.19426627457141876,
-1.064638376235962,
-0.20445947349071503,
-0.33655786514282227,
-0.8749420046806335,
-0.8020851612091064,
-0.504220724105835,
-0.30137941241264343,
1.6815396547317505,
0.20242692530155182,
-0.5125110149383545,
-0.1316855251789093,
-0.7716248035430908,
-0.050954729318618774,
-0.9916427731513977,
0.2874681055545807,
-0.057919230312108994,
-0.18869614601135254,
-0.08873023092746735,
1.673539400100708,
-0.9641121029853821,
-2.0176985263824463,
0.2586468458175659,
0.10223458707332611,
-0.3718169629573822,
0.16095079481601715,
1.7109569311141968,
0.5955833196640015,
1.3704283237457275,
1.3109004497528076,
0.9080963730812073,
-0.663645327091217,
-1.271849513053894,
0.45734816789627075,
0.919952392578125,
-1.3990533351898193,
0.7817223072052002,
-0.05303115397691727,
-0.4536408483982086,
0.5580140948295593,
1.2809014320373535,
0.4749314785003662,
-2.0102622509002686,
0.7832150459289551,
-0.964293897151947,
0.6752253174781799,
0.68287593126297,
0.7484361529350281,
0.1632176786661148,
0.7684286236763,
-1.2213361263275146,
-1.2379555702209473,
-0.7701852321624756,
-0.7478219270706177,
1.9601500034332275,
-0.20160040259361267,
0.44297149777412415,
-0.14194723963737488,
-1.4377254247665405,
-0.16175201535224915,
0.7084659934043884,
0.32437649369239807,
-0.5439755320549011,
0.7792975902557373,
-0.6709127426147461,
-1.1346887350082397,
-1.4023131132125854,
-0.5349937081336975,
-0.9878829717636108,
-0.8858718276023865,
1.0318039655685425,
0.8895888924598694,
0.23941074311733246,
1.9226700067520142,
0.6057333946228027,
0.3071776032447815,
-2.653193950653076,
0.9515537023544312,
0.252420574426651,
0.059886764734983444,
0.8816747069358826,
0.3458428680896759,
0.9873824715614319,
-0.2075764387845993,
0.5011532306671143,
-2.394563913345337,
2.3293471336364746,
-0.24723678827285767,
0.5960133671760559,
0.036511898040771484,
-0.09551077336072922,
0.9958280920982361,
0.5002396702766418,
0.6725394129753113,
-1.0467017889022827,
0.5530056357383728,
-0.6914710998535156,
1.1693099737167358,
0.8716542720794678,
-0.8221427798271179,
-0.02784329652786255,
1.3482853174209595,
0.43047329783439636,
-0.6722403168678284,
-0.9738211035728455,
-1.1328092813491821,
0.9710649847984314,
1.8631229400634766,
-0.1154145747423172,
-0.06950792670249939,
0.7930203676223755,
0.5401875972747803,
-1.3991403579711914,
0.0001270519569516182,
-0.6719309687614441,
-0.709580659866333,
1.5323450565338135,
2.116025447845459,
-0.17889197170734406,
-0.22693760693073273,
-0.7301150560379028,
-1.2563554048538208,
0.7349393963813782,
0.07140247523784637,
0.11438753455877304,
0.7892283797264099,
-0.6197546720504761,
1.1631698608398438,
0.8658387660980225,
0.9699316024780273,
0.19303441047668457,
0.3496834933757782,
0.40615391731262207,
-0.28277450799942017,
-1.131630301475525,
-0.3580804765224457,
-0.9951796531677246,
-2.507779836654663,
0.5602849721908569,
-0.13964715600013733,
-1.5078333616256714,
0.03564264625310898,
-1.0343315601348877,
0.9481561183929443,
-0.4620232582092285,
-0.9551352262496948,
-1.421741008758545,
0.17359158396720886,
-0.05385514348745346,
0.9177806377410889,
-1.6366918087005615,
-0.15605510771274567,
1.2323017120361328,
1.0513713359832764,
-0.697161853313446,
0.9797095656394958,
0.3250361680984497,
1.0658140182495117,
0.8841721415519714,
-0.34031614661216736,
0.4982447326183319,
0.007812577299773693,
-1.2374234199523926,
0.41365355253219604,
1.1971213817596436,
0.18145032227039337,
1.380018711090088,
-0.5596325993537903,
0.05049649998545647,
0.4302946627140045,
-0.612585186958313,
-0.33003637194633484,
-0.5635422468185425,
0.669134259223938,
0.10096514225006104,
-0.881065845489502,
-0.06349284201860428,
0.003196294419467449,
-0.20894639194011688,
0.1564462035894394,
-1.4710100889205933,
-0.12866806983947754,
-0.24058757722377777,
-0.5890002250671387,
-1.1102944612503052,
-0.17000718414783478,
1.3361616134643555,
-0.8316822052001953,
-0.20798136293888092,
0.6050024628639221,
0.3295622766017914,
0.6127539873123169,
0.5827475786209106,
-0.8025842905044556,
-0.2898080348968506,
-0.1606030911207199,
-0.3512335419654846,
0.2899453043937683,
1.4475431442260742,
-0.03492593392729759,
-1.0040645599365234,
0.7522264122962952,
-0.3574110269546509,
0.07088976353406906,
2.0069408416748047,
0.05992208793759346,
-0.8493474721908569,
0.15875400602817535,
-0.6800208687782288,
1.9210381507873535,
1.7507562637329102,
1.2795586585998535,
-0.034250445663928986,
-0.994504451751709,
0.5878463387489319,
-0.3066956400871277,
-0.2858400046825409,
0.8312714695930481,
0.37434330582618713,
-0.2809799015522003,
-1.2745646238327026,
0.6716364026069641,
1.262791633605957,
-0.8905713558197021,
-0.8101915121078491,
-0.0022310051135718822,
-0.7887418270111084,
1.1592903137207031,
0.8201735019683838,
0.3775714933872223,
0.2364606112241745,
1.5881822109222412,
0.8020243644714355,
-0.4410323202610016,
0.5967516303062439,
0.6222841143608093,
-0.18977384269237518,
-2.0589969158172607,
-1.0437874794006348,
0.38239696621894836,
-0.4099450409412384,
-1.697709321975708,
1.3499943017959595,
-1.2998822927474976,
-0.9038885235786438,
0.5199531316757202,
0.08014196157455444,
1.5421030521392822,
0.42061638832092285,
1.501439094543457,
2.0736196041107178,
0.998849093914032,
0.41844597458839417,
1.2727100849151611,
-0.16535937786102295,
-0.5131171345710754,
1.7496987581253052,
-0.4477277398109436,
0.482941597700119,
1.0049248933792114,
-0.2493288367986679,
-1.0072309970855713,
-0.7622330188751221,
-1.2008686065673828,
-0.8077659606933594,
1.1582506895065308,
0.030483607202768326,
-1.0913405418395996,
0.26777908205986023,
1.5817577838897705,
0.12969931960105896,
-0.31622692942619324,
0.7186712622642517,
0.40256085991859436,
-0.8269557952880859,
-0.10903758555650711,
-0.8827910423278809,
0.4962739050388336,
-0.13411252200603485,
-0.3624551296234131,
0.4031291604042053,
0.26284340023994446,
1.343964695930481,
0.04322217404842377,
0.18205997347831726,
1.2079746723175049,
-1.3993381261825562,
1.619053602218628,
-0.6367594599723816,
0.27456653118133545,
-2.4329864978790283,
1.4371598958969116,
-0.808871865272522,
1.9206682443618774,
-2.5846152305603027,
0.47695717215538025,
-0.5270923972129822,
-0.48380762338638306,
0.20708250999450684,
-0.3390561640262604,
0.05289335176348686,
-0.054824963212013245,
-1.3333884477615356,
-0.037539009004831314,
-0.6566894054412842,
0.5629671216011047,
1.0660784244537354,
1.3415358066558838,
-1.1204503774642944,
-0.26502180099487305,
-1.795602560043335,
-0.15598009526729584,
-0.6707349419593811,
0.32854264974594116,
-1.857424020767212,
-0.18083038926124573,
-1.8596017360687256,
-2.439415693283081,
-1.3755704164505005,
-0.8062856793403625,
1.2052923440933228,
0.11325948685407639,
-0.8339816927909851,
1.1656326055526733,
-0.37950214743614197,
-1.9197404384613037,
1.0664535760879517,
-2.1887288093566895
] |
https://github.com/huggingface/datasets/issues/6038 | File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare if str(split_generator.split_info.name).lower() == "all": AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'? | Instead of writing the loading script, you can use the built-in loader to [load JSON files](https://huggingface.co/docs/datasets/loading#json):
```python
from datasets import load_dataset
ds = load_dataset("json", data_files={"train": os.path.join(data_dir["train"]), "dev": os.path.join(data_dir["dev"])})
``` | Hi, I use the code below to load local file
```
def _split_generators(self, dl_manager):
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
# urls = _URLS[self.config.name]
data_dir = dl_manager.download_and_extract(_URLs)
print(data_dir)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["train"]),
"split": "train",
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["dev"]),
"split": "dev",
},
),
]
```
and error occured
```
Traceback (most recent call last):
File "/home/zhizhou/data1/zhanghao/huggingface/FineTuning_Transformer/load_local_dataset.py", line 2, in <module>
dataset = load_dataset("./QA_script.py",data_files='/home/zhizhou/.cache/huggingface/datasets/conversatiom_corps/part_file.json')
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/load.py", line 1809, in load_dataset
builder_instance.download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 1670, in _download_and_prepare
super()._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare
if str(split_generator.split_info.name).lower() == "all":
AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?
```
Could you help me? | 60 | 29 | File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare if str(split_generator.split_info.name).lower() == "all": AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?
Hi, I use the code below to load local file
```
def _split_generators(self, dl_manager):
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
# urls = _URLS[self.config.name]
data_dir = dl_manager.download_and_extract(_URLs)
print(data_dir)
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["train"]),
"split": "train",
},
),
datasets.SplitGenerator(
name=datasets.Split.VALIDATION,
# These kwargs will be passed to _generate_examples
gen_kwargs={
"filepath": os.path.join(data_dir["dev"]),
"split": "dev",
},
),
]
```
and error occured
```
Traceback (most recent call last):
File "/home/zhizhou/data1/zhanghao/huggingface/FineTuning_Transformer/load_local_dataset.py", line 2, in <module>
dataset = load_dataset("./QA_script.py",data_files='/home/zhizhou/.cache/huggingface/datasets/conversatiom_corps/part_file.json')
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/load.py", line 1809, in load_dataset
builder_instance.download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 1670, in _download_and_prepare
super()._download_and_prepare(
File "/home/zhizhou/anaconda3/envs/pytorch/lib/python3.10/site-packages/datasets/builder.py", line 992, in _download_and_prepare
if str(split_generator.split_info.name).lower() == "all":
AttributeError: 'str' object has no attribute 'split_info'. Did you mean: 'splitlines'?
```
Could you help me?
Instead of writing the loading script, you can use the built-in loader to [load JSON files](https://huggingface.co/docs/datasets/loading#json):
```python
from datasets import load_dataset
ds = load_dataset("json", data_files={"train": os.path.join(data_dir["train"]), "dev": os.path.join(data_dir["dev"])})
``` | [
-1.2361313104629517,
-0.9707532525062561,
-0.7087602615356445,
1.4899070262908936,
-0.20801934599876404,
-1.2016712427139282,
0.14858272671699524,
-1.0610185861587524,
1.639115333557129,
-0.8069785833358765,
0.30962151288986206,
-1.6301939487457275,
0.004292638972401619,
-0.5656403303146362,
-0.7168557643890381,
-0.961607038974762,
-0.4047562777996063,
-0.7849110960960388,
1.0389612913131714,
2.5026438236236572,
1.2934478521347046,
-1.4157768487930298,
2.703376054763794,
0.7552603483200073,
-0.20639684796333313,
-1.0368292331695557,
0.5714684128761292,
-0.018146466463804245,
-1.2551121711730957,
-0.4630720317363739,
-0.9902176260948181,
-0.04214571416378021,
-0.5516894459724426,
-0.4607844650745392,
0.027728401124477386,
0.4269070327281952,
-0.31871721148490906,
-0.4128098785877228,
-0.6429016590118408,
-0.8222396969795227,
0.46430957317352295,
-0.399127334356308,
0.9534454345703125,
-0.35352233052253723,
1.8172991275787354,
-0.5565240383148193,
0.42993584275245667,
0.7417346835136414,
1.2842516899108887,
0.23352563381195068,
0.042043834924697876,
0.2862185537815094,
0.38533931970596313,
-0.06569299101829529,
0.5386020541191101,
1.189100980758667,
0.6442052721977234,
0.4925772547721863,
0.6637035012245178,
-2.221102476119995,
1.307544469833374,
-1.0191688537597656,
0.2902560532093048,
1.301385760307312,
-0.8904299139976501,
0.3255777060985565,
-1.802714228630066,
-0.03284993767738342,
0.6671867370605469,
-2.2378978729248047,
0.3039185702800751,
-1.2969056367874146,
-0.5106645822525024,
1.0198822021484375,
0.3686259984970093,
-1.1819353103637695,
0.13251551985740662,
-0.48626014590263367,
1.0580179691314697,
0.4557167589664459,
1.076685905456543,
-1.6646230220794678,
-0.03718437999486923,
-0.2715023159980774,
0.09146763384342194,
-1.2627865076065063,
-1.5764479637145996,
0.597561240196228,
0.6684924364089966,
0.5408741235733032,
-0.05378948897123337,
1.0646750926971436,
-1.0505714416503906,
0.8382611870765686,
-1.0310946702957153,
-1.584236979484558,
-1.4561623334884644,
-2.3848092555999756,
-2.254772424697876,
0.8043491244316101,
-0.48894616961479187,
-0.5480159521102905,
2.1167168617248535,
-1.0765990018844604,
-1.690054178237915,
1.107378602027893,
0.18580234050750732,
0.0661965161561966,
2.407104969024658,
0.1418548822402954,
-0.721686601638794,
0.43234407901763916,
-0.7047389149665833,
0.8181766867637634,
-0.30857521295547485,
1.3001652956008911,
0.42563265562057495,
-1.023518443107605,
1.5897283554077148,
-0.36884212493896484,
0.5832805037498474,
-0.5928476452827454,
-0.5618440508842468,
-0.68996262550354,
0.30828824639320374,
1.8578842878341675,
-0.3159536123275757,
1.5480294227600098,
-0.30891484022140503,
-1.4781129360198975,
-1.6558865308761597,
0.9015934467315674,
0.4942942261695862,
-0.8065803647041321,
0.0650341659784317,
-0.4355755150318146,
0.1255553662776947,
-0.0891311913728714,
1.1461248397827148,
1.3029892444610596,
0.7591384649276733,
-0.35422495007514954,
-0.8561274409294128,
0.15305334329605103,
-0.16031813621520996,
-0.7341011166572571,
-1.7326996326446533,
-0.3508470356464386,
0.10454902797937393,
0.6498605012893677,
-1.2409453392028809,
1.76820969581604,
0.8803805112838745,
1.9711652994155884,
1.0197432041168213,
-0.3558211624622345,
1.5018824338912964,
0.07981143891811371,
1.7970995903015137,
-0.5091488361358643,
0.6089270710945129,
-0.37258368730545044,
-1.163327693939209,
0.8335371613502502,
-0.34541356563568115,
-2.035064935684204,
-0.8249287605285645,
-0.72361820936203,
-0.15547430515289307,
-0.7048505544662476,
0.9143727421760559,
-0.3267033100128174,
-1.4114973545074463,
0.19001540541648865,
-0.7282638549804688,
0.06936703622341156,
-1.2033828496932983,
0.21219071745872498,
0.6873645782470703,
-0.6734187006950378,
0.07328595221042633,
-0.2222556173801422,
-1.1900482177734375,
-0.48437586426734924,
0.3430968225002289,
1.9534595012664795,
-0.675828218460083,
0.8464528918266296,
1.0707948207855225,
-0.706612765789032,
0.07009800523519516,
0.23121494054794312,
-0.30045804381370544,
0.8470484614372253,
-1.0697729587554932,
-0.48925527930259705,
1.2275032997131348,
-0.2771841287612915,
-0.6903067231178284,
1.436646580696106,
0.6545698046684265,
-1.045880675315857,
-0.27717065811157227,
-0.11204440146684647,
-0.8552948832511902,
0.06073947250843048,
-1.5393707752227783,
-0.1720450520515442,
0.4268227815628052,
-1.564723014831543,
-0.4381982982158661,
-0.2152196764945984,
1.3442275524139404,
-0.14571887254714966,
1.4943528175354004,
-0.39441508054733276,
-0.17306265234947205,
-0.19079682230949402,
-0.3747918903827667,
0.170342355966568,
-0.23051536083221436,
-0.5405100584030151,
0.17306429147720337,
-0.849220871925354,
0.2939266562461853,
1.447808027267456,
0.3485696017742157,
0.009227296337485313,
0.517217755317688,
1.1058931350708008,
0.4085230827331543,
-0.041395701467990875,
-0.8378642201423645,
-1.5016202926635742,
1.9586764574050903,
-1.4157663583755493,
1.989501953125,
0.7935287356376648,
-0.08620694279670715,
-1.763917326927185,
-1.8324767351150513,
1.286102294921875,
1.1171895265579224,
2.2486183643341064,
0.5213890075683594,
0.4064769446849823,
-0.8546390533447266,
-0.6943240165710449,
0.41431930661201477,
-1.0327867269515991,
-0.6605767011642456,
0.15027931332588196,
2.395869493484497,
1.7627761363983154,
-0.4253394901752472,
-0.20607692003250122,
-0.9278721809387207,
1.3575602769851685,
-0.2169153094291687,
0.256401002407074,
2.0277180671691895,
-0.22391963005065918,
-1.061044454574585,
1.3153218030929565,
-2.3278374671936035,
0.17196321487426758,
1.9823213815689087,
0.26807689666748047,
0.09152038395404816,
-1.3960142135620117,
-0.633056640625,
-0.36914148926734924,
-0.47190994024276733,
-1.2225933074951172,
0.5471629500389099,
-0.30500853061676025,
-0.816438615322113,
-1.3840148448944092,
0.13886117935180664,
-1.1391992568969727,
-1.7056032419204712,
0.25197651982307434,
1.9560432434082031,
2.0273938179016113,
-0.7759144306182861,
1.589918613433838,
-0.3080909848213196,
0.03282126411795616,
1.2032403945922852,
1.2930415868759155,
3.142282724380493,
1.8623555898666382,
-1.3050590753555298,
0.6295989751815796,
-0.13221623003482819,
-0.4144597053527832,
1.0846165418624878,
-1.2183613777160645,
1.259818196296692,
-0.15952154994010925,
-1.1634886264801025,
-1.1962121725082397,
1.0262868404388428,
0.499575138092041,
0.029029279947280884,
-0.49983957409858704,
1.2445701360702515,
0.08368509262800217,
1.3789572715759277,
0.5898305177688599,
-0.3861579895019531,
0.5621609091758728,
-0.3582610487937927,
-0.5508215427398682,
1.525159478187561,
0.15227347612380981,
-1.4462827444076538,
-2.2417821884155273,
-0.24646058678627014,
-0.8480626344680786,
0.02617696300148964,
-0.6556254625320435,
-0.9919543862342834,
1.741911768913269,
0.34350472688674927,
-1.256361484527588,
-0.343196302652359,
-0.37189018726348877,
-0.5489522814750671,
2.7208452224731445,
-1.251899242401123,
-0.14426583051681519,
-0.9777342677116394,
-0.5871932506561279,
1.6425098180770874,
-1.2665374279022217,
-0.24293962121009827,
-1.0571531057357788,
-0.5695192217826843,
-1.2527562379837036,
-0.5316147208213806,
0.03745609149336815,
-1.016445279121399,
0.781491756439209,
0.20902442932128906,
-1.147491216659546,
-0.3318141996860504,
-0.800406277179718,
0.958240270614624,
-0.07764752209186554,
0.15834593772888184,
1.9119982719421387,
0.3321666717529297,
-0.3801005482673645,
0.7742984294891357,
1.1456239223480225,
0.6554172039031982,
-0.6065738797187805,
0.12273331731557846,
-0.645411491394043,
0.37171581387519836,
-1.3433159589767456,
0.26495856046676636,
-2.911104679107666,
0.6834596395492554,
-0.0956205278635025,
-0.10651510953903198,
-0.031575459986925125,
-1.2697287797927856,
1.0805891752243042,
2.625516653060913,
-1.180474877357483,
0.5331721305847168,
0.3611277639865875,
1.0993627309799194,
-1.6312793493270874,
0.3676031529903412,
-0.41888609528541565,
2.091407299041748,
0.1758541762828827,
1.2497400045394897,
-0.4605761170387268,
-2.235405921936035,
0.7107335329055786,
-1.2137207984924316,
-1.1616215705871582,
0.7732853889465332,
-0.8700333833694458,
0.16603025794029236,
-1.444309115409851,
-0.21637234091758728,
-0.8661328554153442,
-1.2076468467712402,
0.6251165866851807,
0.17209085822105408,
0.3989093601703644,
-0.5933102965354919,
0.32522526383399963,
-2.234982490539551,
-1.4083482027053833,
-0.20374149084091187,
-0.9652397036552429,
0.4974774122238159,
-0.425335556268692,
0.6497347950935364,
-0.1356523633003235,
0.04140884056687355,
0.375657320022583,
1.4684112071990967,
3.4457972049713135,
0.17865434288978577,
0.22717401385307312,
-0.14501264691352844,
-0.9751414060592651,
1.4755603075027466,
0.8124998807907104,
-0.1863986849784851,
-0.5650508403778076,
-1.127404808998108,
1.287604570388794,
2.008697271347046,
1.0095458030700684,
0.05020197853446007,
-0.8176044225692749,
-0.7183942198753357,
-0.09467080980539322,
0.20303893089294434,
0.5221331715583801,
0.8874569535255432,
-0.002904521767050028,
0.09775201976299286,
1.4429584741592407,
1.1964813470840454,
-0.37173783779144287,
0.3072763681411743,
-0.8723706007003784,
-0.48071154952049255,
0.4909660220146179,
0.22661137580871582,
-0.03510243445634842,
0.4317254424095154,
-0.9938921332359314,
-0.2740319073200226,
-0.4085506200790405,
-0.8476358652114868,
-0.6495863795280457,
-0.3923039138317108,
-0.3421585261821747,
1.6216219663619995,
0.14340588450431824,
-0.4931457042694092,
-0.048047564923763275,
-0.6891067624092102,
-0.19469767808914185,
-1.1115204095840454,
0.2256653606891632,
-0.056784916669130325,
-0.16780409216880798,
-0.20278847217559814,
1.6364758014678955,
-0.9194419384002686,
-2.1242058277130127,
0.21518006920814514,
0.2826549708843231,
-0.2634150981903076,
0.23227769136428833,
1.7077676057815552,
0.48507627844810486,
1.4274909496307373,
1.2903591394424438,
0.9032042026519775,
-0.6314463019371033,
-1.2981185913085938,
0.6264002323150635,
0.9998133778572083,
-1.4309208393096924,
0.8257964849472046,
-0.10723428428173065,
-0.500375509262085,
0.6759522557258606,
1.2912918329238892,
0.5130940675735474,
-1.9952080249786377,
0.9313871264457703,
-0.9187434911727905,
0.7546307444572449,
0.6757752895355225,
0.7103037238121033,
0.17006683349609375,
0.8356785178184509,
-1.151655912399292,
-1.1778061389923096,
-0.6687033772468567,
-0.6890496611595154,
1.9658480882644653,
-0.3347087502479553,
0.631388783454895,
-0.2029675543308258,
-1.3123486042022705,
-0.12108258903026581,
0.6930006146430969,
0.3312886953353882,
-0.44302406907081604,
0.8777357339859009,
-0.664391815662384,
-1.0886486768722534,
-1.326673150062561,
-0.3888087570667267,
-1.061586856842041,
-0.9071998000144958,
1.0506463050842285,
0.7663585543632507,
0.32001620531082153,
1.9471759796142578,
0.6397462487220764,
0.3288094699382782,
-2.567171573638916,
0.9134446382522583,
0.3595944941043854,
-0.08026720583438873,
0.8827690482139587,
0.30166521668434143,
1.0486830472946167,
0.00691600888967514,
0.5266318917274475,
-2.415665626525879,
2.2939417362213135,
-0.1886177659034729,
0.7352904081344604,
0.01695999503135681,
-0.19493341445922852,
1.1015807390213013,
0.6141031384468079,
0.5771447420120239,
-1.0506678819656372,
0.6847776174545288,
-0.4801372289657593,
1.1680598258972168,
0.9036667943000793,
-0.7963306903839111,
-0.015196596272289753,
1.4235526323318481,
0.49990105628967285,
-0.5389482378959656,
-0.9433035850524902,
-0.8956436514854431,
0.8786904215812683,
1.7226002216339111,
-0.11273075640201569,
0.05282531678676605,
0.8115516304969788,
0.6222612261772156,
-1.203749179840088,
0.04567873850464821,
-0.6823588013648987,
-0.7796332836151123,
1.65831458568573,
2.0725107192993164,
-0.15931478142738342,
-0.2502818703651428,
-0.6833392977714539,
-1.2999205589294434,
0.8359101414680481,
-0.1887606680393219,
0.1553877592086792,
0.6270719170570374,
-0.6107433438301086,
1.0195190906524658,
0.7898948192596436,
1.0143804550170898,
0.10074160993099213,
0.2371203899383545,
0.4249470829963684,
-0.31838497519493103,
-1.1408424377441406,
-0.2445524036884308,
-1.0965341329574585,
-2.610637903213501,
0.4237569570541382,
-0.23479801416397095,
-1.4036273956298828,
-0.03654371201992035,
-0.9818778038024902,
0.9621233344078064,
-0.6224488615989685,
-1.1079699993133545,
-1.4623675346374512,
0.25965914130210876,
-0.061822112649679184,
0.9022635817527771,
-1.6790934801101685,
-0.24652931094169617,
1.2425521612167358,
0.876239538192749,
-0.6442573070526123,
0.9415903091430664,
0.18370872735977173,
1.0417944192886353,
0.8018112778663635,
-0.34439709782600403,
0.5402706265449524,
0.0014038849622011185,
-1.3454511165618896,
0.46523797512054443,
1.1816136837005615,
0.17181289196014404,
1.5578874349594116,
-0.4983420968055725,
0.021784478798508644,
0.38196685910224915,
-0.6276838183403015,
-0.4456830620765686,
-0.4613981544971466,
0.6851494908332825,
-0.006916401907801628,
-0.9688253402709961,
-0.1203257218003273,
-0.1524600088596344,
-0.32438138127326965,
0.10215896368026733,
-1.425018548965454,
-0.1671215295791626,
-0.4096403121948242,
-0.5020341873168945,
-1.2780054807662964,
-0.08796326071023941,
1.3656901121139526,
-0.7635442614555359,
-0.24107149243354797,
0.43925151228904724,
0.4032604396343231,
0.5533740520477295,
0.6978243589401245,
-0.7744901776313782,
-0.29889941215515137,
-0.2450152039527893,
-0.31388092041015625,
0.3323133885860443,
1.357757806777954,
-0.08299155533313751,
-0.9365158677101135,
0.6636722683906555,
-0.3154057562351227,
0.15684375166893005,
1.9524693489074707,
0.05086597800254822,
-0.7025133371353149,
0.33046287298202515,
-0.7051297426223755,
1.8679275512695312,
1.7334537506103516,
1.2861071825027466,
-0.14724689722061157,
-0.8914405703544617,
0.6346591114997864,
-0.37722504138946533,
-0.3759213089942932,
0.8199011087417603,
0.42935946583747864,
-0.23821720480918884,
-1.4387001991271973,
0.7332803606987,
1.1669329404830933,
-0.8594714999198914,
-0.7572503685951233,
0.12843367457389832,
-0.7751041054725647,
1.1015950441360474,
0.586107075214386,
0.3312571346759796,
0.313831090927124,
1.673905849456787,
0.8406504988670349,
-0.4777045249938965,
0.5301327705383301,
0.5356112718582153,
-0.21591368317604065,
-2.146317481994629,
-1.1085398197174072,
0.3787015676498413,
-0.5093210339546204,
-1.5910348892211914,
1.3686516284942627,
-1.0991886854171753,
-1.0373377799987793,
0.5201656222343445,
0.0010490482673048973,
1.3813081979751587,
0.3759724795818329,
1.5975404977798462,
2.10009765625,
0.8624523282051086,
0.41242650151252747,
1.2848010063171387,
-0.10730508714914322,
-0.4675215482711792,
1.8417754173278809,
-0.46699294447898865,
0.45313435792922974,
1.1075806617736816,
-0.33734482526779175,
-1.0309288501739502,
-0.7732497453689575,
-1.2714698314666748,
-0.7080603241920471,
1.188273310661316,
0.054924994707107544,
-1.0868157148361206,
0.2598225176334381,
1.5888679027557373,
0.13426533341407776,
-0.321897953748703,
0.5865799188613892,
0.4299758970737457,
-0.7733007073402405,
-0.09394014626741409,
-0.846599817276001,
0.49562186002731323,
-0.20079690217971802,
-0.36011165380477905,
0.30224958062171936,
0.45891159772872925,
1.4374529123306274,
-0.1175219938158989,
0.11390566825866699,
1.086269497871399,
-1.4600836038589478,
1.4840202331542969,
-0.6240638494491577,
0.2839885354042053,
-2.375166893005371,
1.3591411113739014,
-0.8041180968284607,
1.9823120832443237,
-2.621116876602173,
0.46823814511299133,
-0.5486845970153809,
-0.5149905681610107,
0.2575761675834656,
-0.37935489416122437,
0.10340537130832672,
-0.12831516563892365,
-1.0682308673858643,
-0.025761067867279053,
-0.6152536273002625,
0.6578165888786316,
1.1541218757629395,
1.370481014251709,
-1.1508182287216187,
-0.2185787856578827,
-1.6665228605270386,
-0.13585978746414185,
-0.7876937985420227,
0.32018205523490906,
-2.014997720718384,
-0.1707889437675476,
-1.9578131437301636,
-2.3624300956726074,
-1.2489360570907593,
-0.8150098323822021,
1.0875639915466309,
0.1270086169242859,
-0.9113729000091553,
1.2253292798995972,
-0.34413155913352966,
-1.8812024593353271,
1.1232595443725586,
-2.189462900161743
] |
https://github.com/huggingface/datasets/issues/6037 | Documentation links to examples are broken | These docs are outdated (version 1.2.1 is over two years old). Please refer to [this](https://huggingface.co/docs/datasets/dataset_script) version instead.
Initially, we hosted datasets in this repo, but now you can find them [on the HF Hub](https://huggingface.co/datasets) (e.g. the [`ag_news`](https://huggingface.co/datasets/ag_news/blob/main/ag_news.py) script) | ### Describe the bug
The links at the bottom of [add_dataset](https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html) to examples of specific datasets are all broken, for example
- text classification: [ag_news](https://github.com/huggingface/datasets/blob/master/datasets/ag_news/ag_news.py) (original data are in csv files)
### Steps to reproduce the bug
Click on links to examples from latest documentation
### Expected behavior
Links should be up to date - it might be more stable to link to https://huggingface.co/datasets/ag_news/blob/main/ag_news.py
### Environment info
dataset v1.2.1 | 61 | 38 | Documentation links to examples are broken
### Describe the bug
The links at the bottom of [add_dataset](https://huggingface.co/docs/datasets/v1.2.1/add_dataset.html) to examples of specific datasets are all broken, for example
- text classification: [ag_news](https://github.com/huggingface/datasets/blob/master/datasets/ag_news/ag_news.py) (original data are in csv files)
### Steps to reproduce the bug
Click on links to examples from latest documentation
### Expected behavior
Links should be up to date - it might be more stable to link to https://huggingface.co/datasets/ag_news/blob/main/ag_news.py
### Environment info
dataset v1.2.1
These docs are outdated (version 1.2.1 is over two years old). Please refer to [this](https://huggingface.co/docs/datasets/dataset_script) version instead.
Initially, we hosted datasets in this repo, but now you can find them [on the HF Hub](https://huggingface.co/datasets) (e.g. the [`ag_news`](https://huggingface.co/datasets/ag_news/blob/main/ag_news.py) script) | [
-1.201838731765747,
-0.8922097682952881,
-0.6922095417976379,
1.4508154392242432,
-0.05030794069170952,
-1.3228124380111694,
0.06119988486170769,
-0.9711858630180359,
1.5745917558670044,
-0.6364167332649231,
0.32652443647384644,
-1.6934266090393066,
-0.08025117218494415,
-0.4993923604488373,
-0.7132911086082458,
-0.9548888802528381,
-0.3697667121887207,
-0.7751343250274658,
0.9559768438339233,
2.556353807449341,
1.2215131521224976,
-1.40086030960083,
2.695465564727783,
0.6684297323226929,
-0.15372323989868164,
-1.1245512962341309,
0.5413325428962708,
0.07263822853565216,
-1.339471459388733,
-0.4253084361553192,
-0.9594334959983826,
-0.0064528342336416245,
-0.5433380007743835,
-0.5290317535400391,
0.12536592781543732,
0.36183053255081177,
-0.1518065482378006,
-0.24240998923778534,
-0.6783203482627869,
-0.7692200541496277,
0.41423365473747253,
-0.3642968237400055,
0.9203229546546936,
-0.40391308069229126,
1.779578447341919,
-0.5650821328163147,
0.46483176946640015,
0.684226393699646,
1.3522214889526367,
0.124139204621315,
0.05208483710885048,
0.3481765389442444,
0.3805478811264038,
0.06971171498298645,
0.5434667468070984,
1.204041600227356,
0.6926079392433167,
0.40223902463912964,
0.5803036689758301,
-2.1965250968933105,
1.2886552810668945,
-0.8190845847129822,
0.24011996388435364,
1.4123222827911377,
-0.9347065687179565,
0.3473028242588043,
-1.6878870725631714,
-0.11233799159526825,
0.6365410685539246,
-2.314096212387085,
0.11186498403549194,
-1.268627643585205,
-0.520723283290863,
1.0640915632247925,
0.3770882189273834,
-1.2317163944244385,
0.16705501079559326,
-0.5309777855873108,
1.0480135679244995,
0.5812475681304932,
1.157358169555664,
-1.6650924682617188,
-0.005052519496530294,
-0.20626482367515564,
0.03613365441560745,
-1.297186017036438,
-1.6312029361724854,
0.49539363384246826,
0.664847195148468,
0.7726572751998901,
-0.10616645216941833,
0.8719334006309509,
-1.0284464359283447,
0.7850810885429382,
-0.8395340442657471,
-1.7357532978057861,
-1.3526142835617065,
-2.424257755279541,
-2.318864583969116,
0.8742903470993042,
-0.47996410727500916,
-0.4426490068435669,
1.966996669769287,
-1.0045409202575684,
-1.83915114402771,
1.0930581092834473,
0.3097299337387085,
0.06530505418777466,
2.418384552001953,
0.2119952142238617,
-0.70866459608078,
0.3562573492527008,
-0.637416422367096,
0.7801921367645264,
-0.29482579231262207,
1.298440933227539,
0.5561485886573792,
-1.040725588798523,
1.5342000722885132,
-0.49727147817611694,
0.5118752121925354,
-0.6954283714294434,
-0.45220234990119934,
-0.750437319278717,
0.24035201966762543,
1.8864086866378784,
-0.4357277452945709,
1.6069645881652832,
-0.26203441619873047,
-1.5228078365325928,
-1.541772723197937,
0.75999915599823,
0.47310373187065125,
-0.7719946503639221,
0.036873187869787216,
-0.4912586808204651,
0.110038623213768,
-0.004683013539761305,
1.123948335647583,
1.139422059059143,
0.5386643409729004,
-0.34634220600128174,
-0.8439865112304688,
0.2934466600418091,
-0.08183906972408295,
-0.6557220816612244,
-1.8605678081512451,
-0.3173023462295532,
0.22945885360240936,
0.6097882986068726,
-1.2688713073730469,
1.7658265829086304,
0.7510378360748291,
1.9772433042526245,
0.9959473013877869,
-0.3426100015640259,
1.4784175157546997,
-0.053271498531103134,
1.9005836248397827,
-0.5410576462745667,
0.6471399068832397,
-0.28104597330093384,
-1.2402650117874146,
0.7680972218513489,
-0.5029246211051941,
-2.0338940620422363,
-0.838258683681488,
-0.7738717794418335,
-0.12211132049560547,
-0.7056498527526855,
0.9994778037071228,
-0.2757892906665802,
-1.3243424892425537,
0.11126688122749329,
-0.7651636600494385,
0.15067626535892487,
-1.3056896924972534,
0.11291931569576263,
0.7997477054595947,
-0.7118293642997742,
-0.10300780832767487,
-0.276156485080719,
-1.3509001731872559,
-0.47067415714263916,
0.35981619358062744,
1.8058536052703857,
-0.7130452990531921,
0.9323463439941406,
0.9872030019760132,
-0.7328980565071106,
0.22307398915290833,
0.2784799039363861,
-0.3016306757926941,
0.8663499355316162,
-1.0751087665557861,
-0.4326803386211395,
1.1804240942001343,
-0.1894150674343109,
-0.8294427990913391,
1.5364168882369995,
0.8489148020744324,
-1.038926601409912,
-0.2275206595659256,
-0.1627589613199234,
-0.7934257984161377,
0.042570196092128754,
-1.642587661743164,
-0.1388421654701233,
0.3560275733470917,
-1.4341856241226196,
-0.36518770456314087,
-0.20837576687335968,
1.4224236011505127,
-0.11595474183559418,
1.4729979038238525,
-0.2993917167186737,
-0.14076851308345795,
-0.40690314769744873,
-0.44895535707473755,
0.1592126339673996,
-0.22279466688632965,
-0.6340380311012268,
0.3239688277244568,
-0.8994148373603821,
0.281583309173584,
1.4329760074615479,
0.4198334813117981,
0.11708050966262817,
0.5944246649742126,
1.0463958978652954,
0.3019328713417053,
-0.21442319452762604,
-0.8657272458076477,
-1.6998814344406128,
2.0648229122161865,
-1.2395946979522705,
1.9951860904693604,
0.850177526473999,
-0.14265160262584686,
-1.7382220029830933,
-1.8853756189346313,
1.333820104598999,
1.1296796798706055,
2.399153470993042,
0.5003154873847961,
0.4134410619735718,
-0.8229634761810303,
-0.7503466010093689,
0.3066767752170563,
-0.9281420111656189,
-0.7338027954101562,
0.11773164570331573,
2.341675281524658,
1.842340350151062,
-0.46632811427116394,
-0.1604757308959961,
-1.0489492416381836,
1.2370967864990234,
-0.3132674992084503,
0.20020583271980286,
2.0618162155151367,
-0.3240734338760376,
-0.9651570320129395,
1.343660831451416,
-2.3263895511627197,
0.29034021496772766,
2.075259208679199,
0.27306678891181946,
0.03271375223994255,
-1.4901748895645142,
-0.6801447868347168,
-0.4032886326313019,
-0.3794384300708771,
-1.155042052268982,
0.5989904999732971,
-0.3545045554637909,
-0.9538988471031189,
-1.394149899482727,
0.030090320855379105,
-1.1143929958343506,
-1.804058313369751,
0.3838021755218506,
1.7485381364822388,
1.9290270805358887,
-0.7860028147697449,
1.400057077407837,
-0.2100609838962555,
0.07243730127811432,
1.3441580533981323,
1.3490269184112549,
3.0589184761047363,
1.9570729732513428,
-1.3004459142684937,
0.8332834243774414,
-0.10293669998645782,
-0.4821675419807434,
1.1327321529388428,
-1.0940250158309937,
1.2158524990081787,
-0.16387183964252472,
-1.4008620977401733,
-1.2432234287261963,
1.1856573820114136,
0.5442628264427185,
0.013824984431266785,
-0.5736703276634216,
1.3515576124191284,
-0.0026501822285354137,
1.3682997226715088,
0.5875594019889832,
-0.3881484568119049,
0.5166775584220886,
-0.3391178846359253,
-0.5965827703475952,
1.5661094188690186,
0.15868660807609558,
-1.585876703262329,
-2.3123669624328613,
-0.2536831498146057,
-0.877327561378479,
-0.22169721126556396,
-0.7363853454589844,
-0.9631848931312561,
1.6090766191482544,
0.45923155546188354,
-1.2420332431793213,
-0.3323693871498108,
-0.31572088599205017,
-0.538689911365509,
2.686915159225464,
-1.3457887172698975,
-0.11847925186157227,
-1.0620571374893188,
-0.423885703086853,
1.5647287368774414,
-1.1560605764389038,
-0.11144226789474487,
-1.1048383712768555,
-0.778100848197937,
-1.2929582595825195,
-0.5313687920570374,
0.09919941425323486,
-0.9485383033752441,
0.6852670311927795,
-0.0241851769387722,
-1.116836428642273,
-0.2910679876804352,
-0.8917907476425171,
1.002748966217041,
-0.11251971125602722,
0.2694610059261322,
1.9033478498458862,
0.452673077583313,
-0.4681653678417206,
0.6239023804664612,
1.1860171556472778,
0.6744275689125061,
-0.7201926112174988,
0.14106130599975586,
-0.7219736576080322,
0.3091782033443451,
-1.4796396493911743,
0.12774896621704102,
-2.914414644241333,
0.7043994665145874,
-0.13400554656982422,
-0.04979580640792847,
-0.02343340963125229,
-1.1979365348815918,
1.0931769609451294,
2.563474416732788,
-1.2840325832366943,
0.44899609684944153,
0.42585399746894836,
1.0594760179519653,
-1.5178784132003784,
0.26557663083076477,
-0.5099879503250122,
2.0300309658050537,
0.08609628677368164,
1.1966068744659424,
-0.5196950435638428,
-1.9505109786987305,
0.7373225688934326,
-1.203059434890747,
-0.9317371845245361,
0.8615409731864929,
-0.8619158267974854,
0.31349343061447144,
-1.440129041671753,
0.021403422579169273,
-0.7929162383079529,
-1.1743733882904053,
0.6670985221862793,
0.004083053208887577,
0.3824254274368286,
-0.5458932518959045,
0.37788188457489014,
-2.0963027477264404,
-1.3549789190292358,
-0.15716706216335297,
-1.0049567222595215,
0.5708091259002686,
-0.27656957507133484,
0.6205372214317322,
-0.08218301832675934,
0.07998910546302795,
0.2700718641281128,
1.3598631620407104,
3.4060215950012207,
0.18623888492584229,
0.21977120637893677,
-0.04387355595827103,
-1.0111666917800903,
1.4507780075073242,
0.9998350739479065,
-0.19965490698814392,
-0.49602413177490234,
-0.8775012493133545,
1.3888092041015625,
1.9940707683563232,
1.2338322401046753,
0.16868235170841217,
-0.9344309568405151,
-0.8647732734680176,
0.06128475442528725,
0.2297516018152237,
0.4482347369194031,
0.9136059284210205,
-0.04091793671250343,
0.11579851806163788,
1.490233063697815,
1.2933794260025024,
-0.37136587500572205,
0.5171858072280884,
-0.9941943883895874,
-0.5124484896659851,
0.44209372997283936,
0.24990828335285187,
0.10707621276378632,
0.5570753812789917,
-1.1425153017044067,
-0.26020699739456177,
-0.31572240591049194,
-0.8779990077018738,
-0.7401243448257446,
-0.4497879147529602,
-0.4942067265510559,
1.5792444944381714,
0.06221133843064308,
-0.43703120946884155,
0.10663387179374695,
-0.7886068224906921,
-0.23316505551338196,
-0.9800342321395874,
0.3210735619068146,
-0.11736354231834412,
-0.007030102424323559,
-0.20686054229736328,
1.6353492736816406,
-1.0170557498931885,
-2.2118093967437744,
0.2761310636997223,
0.23744305968284607,
-0.4092668294906616,
0.13023041188716888,
1.7066069841384888,
0.5254783034324646,
1.4478435516357422,
1.2534154653549194,
0.9289594292640686,
-0.6050798892974854,
-1.2381573915481567,
0.7126032710075378,
1.0679177045822144,
-1.45560622215271,
0.9092438817024231,
-0.18617631494998932,
-0.6011504530906677,
0.6958532333374023,
1.3448867797851562,
0.38625022768974304,
-1.873421311378479,
0.8454983830451965,
-0.8474698066711426,
0.7896316051483154,
0.6346273422241211,
0.8152663111686707,
0.2334980070590973,
0.8217443823814392,
-1.433524250984192,
-1.1684547662734985,
-0.7324152588844299,
-0.5765971541404724,
1.8754737377166748,
-0.19085097312927246,
0.5054677724838257,
-0.26105543971061707,
-1.3121874332427979,
-0.16004660725593567,
0.7523583173751831,
0.35062798857688904,
-0.4497467577457428,
1.0013481378555298,
-0.5457702279090881,
-0.9861127138137817,
-1.3437520265579224,
-0.4327141046524048,
-0.9377052783966064,
-0.821770191192627,
1.0052292346954346,
0.8284099102020264,
0.41915246844291687,
1.802794337272644,
0.5009695887565613,
0.2915888726711273,
-2.663019895553589,
0.9440725445747375,
0.22910131514072418,
-0.06762272119522095,
0.8707771897315979,
0.217510387301445,
1.1366792917251587,
-0.04676061123609543,
0.5643690228462219,
-2.3125128746032715,
2.191155433654785,
-0.1719590127468109,
0.5696147680282593,
0.02770346775650978,
-0.11885955929756165,
1.0836085081100464,
0.5534336566925049,
0.6437062621116638,
-1.174320936203003,
0.7552323937416077,
-0.5799164772033691,
1.1620229482650757,
0.9004403352737427,
-0.9049766659736633,
-0.041246045380830765,
1.4227373600006104,
0.5445523262023926,
-0.3527050316333771,
-0.9162209630012512,
-0.8047084808349609,
0.9814601540565491,
1.6722098588943481,
0.04989571496844292,
0.015516366809606552,
0.9241511821746826,
0.6008322834968567,
-1.3471225500106812,
0.058867115527391434,
-0.7395799160003662,
-0.6179382801055908,
1.7247905731201172,
2.082284927368164,
-0.06556674838066101,
-0.20333018898963928,
-0.7369771599769592,
-1.167855143547058,
0.6898572444915771,
-0.10121910274028778,
0.1010640561580658,
0.8897410035133362,
-0.6331426501274109,
1.1159512996673584,
0.6134024858474731,
0.9484182000160217,
-0.037552155554294586,
0.2079438865184784,
0.2519313097000122,
-0.3364049196243286,
-1.2572170495986938,
-0.36614084243774414,
-1.1480368375778198,
-2.504528522491455,
0.3377574384212494,
-0.30631354451179504,
-1.5212719440460205,
0.04111889749765396,
-1.1697256565093994,
0.9264984726905823,
-0.6390641331672668,
-1.0674219131469727,
-1.4786458015441895,
0.38945266604423523,
-0.17056332528591156,
0.9043055772781372,
-1.6501116752624512,
-0.12421892583370209,
1.250160574913025,
0.8634417057037354,
-0.5024795532226562,
0.9480597972869873,
0.2959502637386322,
1.0201970338821411,
0.7528278827667236,
-0.28166037797927856,
0.4795134365558624,
0.1648494005203247,
-1.42524254322052,
0.47718703746795654,
1.1100385189056396,
0.2647339403629303,
1.3192399740219116,
-0.4491259753704071,
0.18064337968826294,
0.48673295974731445,
-0.575930655002594,
-0.48917824029922485,
-0.4277425706386566,
0.797325849533081,
0.12367329001426697,
-1.0877487659454346,
-0.07169069349765778,
-0.17484639585018158,
-0.223201721906662,
0.1712999939918518,
-1.515884280204773,
-0.20474252104759216,
-0.2750985026359558,
-0.5172988772392273,
-1.2425674200057983,
0.05637713894248009,
1.376444935798645,
-0.9190896153450012,
-0.24798895418643951,
0.5247640013694763,
0.2909539043903351,
0.6158061027526855,
0.7248750329017639,
-0.6511505246162415,
-0.2907014489173889,
-0.3016471266746521,
-0.2587719261646271,
0.23439127206802368,
1.2152179479599,
-0.12128584086894989,
-1.0129106044769287,
0.8802237510681152,
-0.41810348629951477,
0.20111487805843353,
1.9987802505493164,
0.01173771359026432,
-0.8296968936920166,
0.3272014558315277,
-0.6481339335441589,
1.8462737798690796,
1.6962556838989258,
1.306530237197876,
-0.11305585503578186,
-0.8896568417549133,
0.4911647439002991,
-0.1915339082479477,
-0.2952859699726105,
0.8712324500083923,
0.43809884786605835,
-0.1823064386844635,
-1.316583275794983,
0.4889604449272156,
1.2903293371200562,
-0.8743541240692139,
-0.750480592250824,
0.14948859810829163,
-0.9500508308410645,
1.130161166191101,
0.685073971748352,
0.3551722764968872,
0.22078703343868256,
1.5051051378250122,
0.6775992512702942,
-0.44676917791366577,
0.39591264724731445,
0.517887532711029,
-0.2343202829360962,
-2.038675308227539,
-0.9110491871833801,
0.2595069706439972,
-0.47351205348968506,
-1.50349760055542,
1.2089883089065552,
-1.2242952585220337,
-0.8272448778152466,
0.4734109342098236,
0.12706339359283447,
1.4186594486236572,
0.25052300095558167,
1.7245060205459595,
2.0554728507995605,
0.9937064051628113,
0.2338109165430069,
1.334057331085205,
0.05431729927659035,
-0.35709384083747864,
1.7382632493972778,
-0.30944105982780457,
0.5630866885185242,
0.9729757905006409,
-0.44028061628341675,
-1.0727307796478271,
-0.8032838106155396,
-1.1832040548324585,
-0.5303099751472473,
1.1808003187179565,
0.13609014451503754,
-1.1117339134216309,
0.11185845732688904,
1.495400309562683,
0.1495169699192047,
-0.2288365364074707,
0.7097559571266174,
0.40404215455055237,
-0.6425071358680725,
-0.05802421644330025,
-0.8626156449317932,
0.5634108781814575,
-0.15654423832893372,
-0.23505531251430511,
0.3064872622489929,
0.5073802471160889,
1.238552451133728,
-0.06712637841701508,
0.19138601422309875,
1.190024495124817,
-1.3185863494873047,
1.52930748462677,
-0.5929690003395081,
0.25732991099357605,
-2.4979941844940186,
1.416045904159546,
-0.7589908242225647,
1.790522575378418,
-2.5185656547546387,
0.4691285490989685,
-0.6223828196525574,
-0.48772764205932617,
0.26710617542266846,
-0.5241934657096863,
0.09600037336349487,
-0.05347732454538345,
-1.0797927379608154,
-0.174757719039917,
-0.8022356033325195,
0.5652709603309631,
1.2353085279464722,
1.3687565326690674,
-1.0963282585144043,
-0.2824116349220276,
-1.8543137311935425,
-0.20217810571193695,
-0.859107255935669,
0.5276879668235779,
-1.9541765451431274,
-0.12844900786876678,
-1.8946454524993896,
-2.505077600479126,
-1.4376262426376343,
-0.7832603454589844,
1.0315052270889282,
0.23713664710521698,
-0.9037400484085083,
1.0908880233764648,
-0.359527051448822,
-1.8190317153930664,
1.070320963859558,
-2.3448240756988525
] |
https://github.com/huggingface/datasets/issues/6034 | load_dataset hangs on WSL | Even if a dataset is cached, we still make requests to check whether the cache is up-to-date. [This](https://huggingface.co/docs/datasets/v2.13.1/en/loading#offline) section in the docs explains how to avoid them and directly load the cached version. | ### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information. | 62 | 33 | load_dataset hangs on WSL
### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information.
Even if a dataset is cached, we still make requests to check whether the cache is up-to-date. [This](https://huggingface.co/docs/datasets/v2.13.1/en/loading#offline) section in the docs explains how to avoid them and directly load the cached version. | [
-1.2228678464889526,
-0.9821550846099854,
-0.7424820065498352,
1.4652351140975952,
-0.06262974441051483,
-1.1958858966827393,
0.06592405587434769,
-1.0115690231323242,
1.7043321132659912,
-0.717893660068512,
0.24771787226200104,
-1.6565674543380737,
-0.04175431653857231,
-0.5186669230461121,
-0.6928482055664062,
-0.9165083765983582,
-0.38003987073898315,
-0.8692708015441895,
1.0786625146865845,
2.617154836654663,
1.1243420839309692,
-1.4399354457855225,
2.7182741165161133,
0.6912992596626282,
-0.19586247205734253,
-1.045579195022583,
0.5591615438461304,
-0.01309066079556942,
-1.3468350172042847,
-0.4284111261367798,
-0.9979000091552734,
-0.051773540675640106,
-0.5431501865386963,
-0.44979536533355713,
0.07648598402738571,
0.26576584577560425,
-0.14561618864536285,
-0.4491058588027954,
-0.546746015548706,
-0.7259663939476013,
0.3844031095504761,
-0.41654902696609497,
0.9005213379859924,
-0.3017210364341736,
1.8160051107406616,
-0.5673880577087402,
0.4319714307785034,
0.6132807731628418,
1.3566491603851318,
0.23508603870868683,
-0.015506512485444546,
0.4017983675003052,
0.41562753915786743,
0.020967865362763405,
0.5356833338737488,
1.101325511932373,
0.6614630818367004,
0.45306432247161865,
0.6671838164329529,
-2.256737470626831,
1.309556484222412,
-0.9957396984100342,
0.34028804302215576,
1.3123711347579956,
-0.9179227948188782,
0.3584144711494446,
-1.7914336919784546,
-0.06924471259117126,
0.6033593416213989,
-2.2705800533294678,
0.19987161457538605,
-1.2953996658325195,
-0.47556906938552856,
0.9551876187324524,
0.35269761085510254,
-1.3003708124160767,
0.07108406722545624,
-0.551160454750061,
1.0408666133880615,
0.418212890625,
1.152467131614685,
-1.7484793663024902,
-0.07832452654838562,
-0.2963826060295105,
0.14376859366893768,
-1.2959136962890625,
-1.563999056816101,
0.5687878727912903,
0.7051376700401306,
0.5760521292686462,
-0.002478389535099268,
0.8860360980033875,
-1.0064985752105713,
0.7359375953674316,
-0.866218626499176,
-1.7561062574386597,
-1.4466044902801514,
-2.375070095062256,
-2.342775821685791,
0.773668646812439,
-0.43282490968704224,
-0.5056310892105103,
2.0348973274230957,
-1.012551188468933,
-1.801756501197815,
1.1952975988388062,
0.25397664308547974,
-0.0027466220781207085,
2.4529168605804443,
0.13493677973747253,
-0.7246429324150085,
0.43693679571151733,
-0.7032711505889893,
0.7983483076095581,
-0.4229174256324768,
1.3474812507629395,
0.42083197832107544,
-0.9555932879447937,
1.583938717842102,
-0.3983590602874756,
0.5189523696899414,
-0.6512535810470581,
-0.46568071842193604,
-0.8357096910476685,
0.2848445177078247,
1.9658482074737549,
-0.3406389355659485,
1.6187018156051636,
-0.32907795906066895,
-1.5310043096542358,
-1.5710035562515259,
0.819360613822937,
0.4539322257041931,
-0.8196508288383484,
0.09018630534410477,
-0.3722245693206787,
0.12514877319335938,
0.016713524237275124,
1.0816171169281006,
1.217705488204956,
0.6305152177810669,
-0.32713693380355835,
-0.961834192276001,
0.25106745958328247,
-0.15412698686122894,
-0.6660811901092529,
-1.8093186616897583,
-0.35737377405166626,
0.12739510834217072,
0.6484301090240479,
-1.2620600461959839,
1.6468579769134521,
0.8326831459999084,
1.973191738128662,
1.073828935623169,
-0.359855592250824,
1.526942253112793,
0.07139033824205399,
1.8207876682281494,
-0.5330502390861511,
0.6972743272781372,
-0.30751973390579224,
-1.1567069292068481,
0.8082987070083618,
-0.409152090549469,
-1.991692304611206,
-0.733746349811554,
-0.8276575803756714,
-0.18328145146369934,
-0.7626786828041077,
0.8763344287872314,
-0.316356360912323,
-1.3915486335754395,
0.2676433324813843,
-0.8180913329124451,
0.13720135390758514,
-1.257668137550354,
0.29961466789245605,
0.7386059165000916,
-0.5267679691314697,
0.0854928120970726,
-0.29783254861831665,
-1.3459347486495972,
-0.4145474433898926,
0.2695203423500061,
1.8731193542480469,
-0.7375686764717102,
0.8926600217819214,
1.0266427993774414,
-0.7111032009124756,
0.045059043914079666,
0.3781864047050476,
-0.2568305730819702,
0.9465001821517944,
-1.0484479665756226,
-0.35261887311935425,
1.231145977973938,
-0.20807383954524994,
-0.6108014583587646,
1.4395004510879517,
0.7497608661651611,
-0.9999893307685852,
-0.21612732112407684,
-0.14107200503349304,
-0.7931472659111023,
0.0031883707270026207,
-1.691721796989441,
-0.20241838693618774,
0.30827319622039795,
-1.5526151657104492,
-0.4386237859725952,
-0.2441180944442749,
1.3203308582305908,
-0.08596160262823105,
1.4446722269058228,
-0.33398884534835815,
-0.13944649696350098,
-0.3288835287094116,
-0.45170730352401733,
0.15004658699035645,
-0.24998082220554352,
-0.5744591951370239,
0.3314003348350525,
-0.810885488986969,
0.34262174367904663,
1.417216181755066,
0.38221120834350586,
0.11692255735397339,
0.5852938890457153,
0.9360907673835754,
0.39400267601013184,
-0.06776593625545502,
-0.8950141668319702,
-1.7000126838684082,
2.112156867980957,
-1.420556902885437,
1.939886212348938,
0.8503804206848145,
-0.08704671263694763,
-1.784899115562439,
-1.8902748823165894,
1.313240647315979,
1.142114281654358,
2.332646608352661,
0.555194616317749,
0.45016705989837646,
-0.7809211611747742,
-0.6895156502723694,
0.2859150767326355,
-1.0027273893356323,
-0.839974045753479,
0.08370371907949448,
2.372407913208008,
1.7410639524459839,
-0.4041290879249573,
-0.07692758738994598,
-0.9705169200897217,
1.4542994499206543,
-0.16087424755096436,
0.19921475648880005,
1.9707638025283813,
-0.23802749812602997,
-1.026667594909668,
1.283519983291626,
-2.309319019317627,
0.20694182813167572,
2.0086865425109863,
0.26412391662597656,
0.0513148233294487,
-1.5032038688659668,
-0.7227140665054321,
-0.289547860622406,
-0.3592984080314636,
-1.1765786409378052,
0.5692059993743896,
-0.2601664066314697,
-0.826823353767395,
-1.5523611307144165,
0.11667525768280029,
-1.131314754486084,
-1.678747296333313,
0.24163390696048737,
1.8651047945022583,
2.0213382244110107,
-0.7491641044616699,
1.424666166305542,
-0.17897771298885345,
0.11896362900733948,
1.2107059955596924,
1.1812856197357178,
3.1284680366516113,
1.9854844808578491,
-1.2279788255691528,
0.7405967116355896,
-0.15474383533000946,
-0.438737690448761,
1.133676290512085,
-1.2001491785049438,
1.244170904159546,
-0.14410842955112457,
-1.2034605741500854,
-1.1930921077728271,
1.0292266607284546,
0.48545968532562256,
-0.028222888708114624,
-0.4897056818008423,
1.2811007499694824,
0.006428065709769726,
1.2962288856506348,
0.47817671298980713,
-0.34633809328079224,
0.5503528118133545,
-0.4278830289840698,
-0.5643497705459595,
1.5979152917861938,
0.2348487824201584,
-1.424328088760376,
-2.301483154296875,
-0.2001618593931198,
-0.8675973415374756,
-0.03485704958438873,
-0.6188606023788452,
-1.0429078340530396,
1.6178231239318848,
0.3865385055541992,
-1.1780869960784912,
-0.29800260066986084,
-0.28653842210769653,
-0.6277367472648621,
2.7013590335845947,
-1.3986836671829224,
-0.21732382476329803,
-1.048334002494812,
-0.5413917303085327,
1.5787030458450317,
-1.2369513511657715,
-0.17312411963939667,
-0.9573867917060852,
-0.6522430777549744,
-1.230587124824524,
-0.568976104259491,
-0.03616677224636078,
-0.9245370030403137,
0.7972106337547302,
0.19465723633766174,
-1.0918011665344238,
-0.2554326057434082,
-0.8853374719619751,
0.8849772810935974,
0.0029894383624196053,
0.24698583781719208,
1.9007169008255005,
0.37654781341552734,
-0.36546725034713745,
0.6889649629592896,
1.1558648347854614,
0.6089107990264893,
-0.6836404204368591,
0.1302022635936737,
-0.639593243598938,
0.36524301767349243,
-1.3205469846725464,
0.30019521713256836,
-2.886453628540039,
0.6417231559753418,
-0.0620858408510685,
-0.09852161258459091,
-0.03540300577878952,
-1.225721001625061,
1.0617753267288208,
2.6067352294921875,
-1.218205213546753,
0.49293339252471924,
0.3249237537384033,
1.2117794752120972,
-1.5782238245010376,
0.3088366389274597,
-0.45405423641204834,
2.2051050662994385,
0.2394946962594986,
1.172877550125122,
-0.46022266149520874,
-2.2861597537994385,
0.6054104566574097,
-1.2888797521591187,
-1.1015796661376953,
0.6953171491622925,
-0.9454482197761536,
0.1304938942193985,
-1.4106591939926147,
-0.1595037579536438,
-0.789373517036438,
-1.226813554763794,
0.6673726439476013,
0.009831691160798073,
0.4536327123641968,
-0.5008460283279419,
0.3548113703727722,
-2.1393332481384277,
-1.376543641090393,
-0.13921698927879333,
-0.9876662492752075,
0.49142301082611084,
-0.32535552978515625,
0.679017186164856,
-0.16101105511188507,
0.05679551512002945,
0.3540423512458801,
1.3692524433135986,
3.419980525970459,
0.14598120748996735,
0.3431083559989929,
-0.10436981916427612,
-0.9942052364349365,
1.3880058526992798,
0.8926678895950317,
-0.19337961077690125,
-0.5837545990943909,
-1.0442063808441162,
1.445099949836731,
1.9751278162002563,
1.0412434339523315,
0.14694802463054657,
-0.7706827521324158,
-0.7063320875167847,
0.018874144181609154,
0.2568426728248596,
0.4629415273666382,
0.8772146105766296,
0.03896569833159447,
0.12702858448028564,
1.492652177810669,
1.2592352628707886,
-0.42245274782180786,
0.4462064504623413,
-0.8661772012710571,
-0.47341954708099365,
0.4578222632408142,
0.3120114207267761,
0.02438030019402504,
0.42820388078689575,
-1.038119912147522,
-0.22859835624694824,
-0.4017009735107422,
-0.9110060930252075,
-0.7154123783111572,
-0.3466596007347107,
-0.3557692766189575,
1.6534663438796997,
0.16221070289611816,
-0.4738314151763916,
0.015853378921747208,
-0.7283934354782104,
-0.02630542404949665,
-1.0397727489471436,
0.30092567205429077,
-0.07407253235578537,
-0.10645848512649536,
-0.019214464351534843,
1.761522889137268,
-0.9350361227989197,
-2.1341047286987305,
0.22073602676391602,
0.2692289352416992,
-0.325461745262146,
0.1890925019979477,
1.6451938152313232,
0.4712243676185608,
1.421594500541687,
1.3021397590637207,
0.9528213143348694,
-0.7074447870254517,
-1.3353832960128784,
0.6259675025939941,
1.0003528594970703,
-1.3794749975204468,
0.8599427938461304,
-0.0841507762670517,
-0.5910854339599609,
0.61875319480896,
1.3058496713638306,
0.4249764084815979,
-1.9332963228225708,
0.8242232799530029,
-0.9281026124954224,
0.7960056662559509,
0.6230440735816956,
0.7829049229621887,
0.19318246841430664,
0.781467616558075,
-1.3374627828598022,
-1.146870493888855,
-0.8110947608947754,
-0.6540142893791199,
1.9610381126403809,
-0.25051742792129517,
0.5222028493881226,
-0.19039775431156158,
-1.3680657148361206,
-0.08919140696525574,
0.6543573141098022,
0.27423596382141113,
-0.454581618309021,
0.8841119408607483,
-0.6676799058914185,
-1.190643072128296,
-1.4175677299499512,
-0.4670237898826599,
-1.0267438888549805,
-0.9309011101722717,
1.1176279783248901,
0.8389273881912231,
0.310849130153656,
1.8748352527618408,
0.5130285024642944,
0.2742531895637512,
-2.6655380725860596,
0.8668970465660095,
0.2696758508682251,
-0.031180502846837044,
0.8838938474655151,
0.21740037202835083,
1.0213313102722168,
-0.005920602940022945,
0.5776003003120422,
-2.2552695274353027,
2.219590663909912,
-0.19810070097446442,
0.7257446646690369,
-0.010418104939162731,
-0.04686830937862396,
0.9773280620574951,
0.5771185755729675,
0.7034029364585876,
-1.0988115072250366,
0.6791103482246399,
-0.5687990784645081,
1.2425020933151245,
0.9371615052223206,
-0.7890034914016724,
-0.013184178620576859,
1.3441650867462158,
0.4556490182876587,
-0.4844479560852051,
-0.9502320885658264,
-0.9584711790084839,
0.9616252183914185,
1.7585957050323486,
-0.051623642444610596,
-0.04963192343711853,
0.8429273962974548,
0.6163434386253357,
-1.3326622247695923,
0.04896566644310951,
-0.7673805952072144,
-0.6995407938957214,
1.6267495155334473,
2.139246702194214,
-0.09656467288732529,
-0.20431427657604218,
-0.703478991985321,
-1.2880895137786865,
0.7070556879043579,
-0.04733629524707794,
0.05001519247889519,
0.6927716732025146,
-0.614641547203064,
1.116153597831726,
0.8455159068107605,
1.0081192255020142,
0.1441686749458313,
0.2673739194869995,
0.2962617874145508,
-0.28552472591400146,
-1.1990876197814941,
-0.3001617193222046,
-1.105455994606018,
-2.524409294128418,
0.45013898611068726,
-0.2361963391304016,
-1.4933627843856812,
0.09745372831821442,
-1.0511980056762695,
0.8766794204711914,
-0.5271100401878357,
-1.0648834705352783,
-1.3991210460662842,
0.24742425978183746,
-0.12891757488250732,
0.8898994326591492,
-1.6426268815994263,
-0.1087745651602745,
1.2271193265914917,
0.9478427171707153,
-0.5916082262992859,
1.0783973932266235,
0.2927137017250061,
0.9901077151298523,
0.87702476978302,
-0.3971956968307495,
0.5502821207046509,
0.125848188996315,
-1.2644861936569214,
0.4847847819328308,
1.1563910245895386,
0.2720261812210083,
1.4018064737319946,
-0.6093003153800964,
0.023155443370342255,
0.4282016158103943,
-0.49157828092575073,
-0.37542128562927246,
-0.49666327238082886,
0.6928002238273621,
0.016575684770941734,
-0.9333626627922058,
-0.02460744045674801,
-0.10113794356584549,
-0.21301685273647308,
0.20185476541519165,
-1.4919447898864746,
-0.18262822926044464,
-0.4065448045730591,
-0.5223374366760254,
-1.2773103713989258,
-0.08151591569185257,
1.4091362953186035,
-0.9013652801513672,
-0.17943686246871948,
0.48678380250930786,
0.43652939796447754,
0.574331521987915,
0.6535943150520325,
-0.6006263494491577,
-0.38749974966049194,
-0.1806877702474594,
-0.3633129596710205,
0.2946184277534485,
1.262471079826355,
-0.19798049330711365,
-1.0252488851547241,
0.7358132600784302,
-0.3495383858680725,
0.11189669370651245,
1.8928321599960327,
0.1185450404882431,
-0.8316182494163513,
0.25198835134506226,
-0.6903328895568848,
1.9190385341644287,
1.6182875633239746,
1.318878173828125,
-0.10242970287799835,
-0.9352298974990845,
0.6617163419723511,
-0.1593647003173828,
-0.37918752431869507,
0.8270309567451477,
0.46703964471817017,
-0.17440102994441986,
-1.3835645914077759,
0.5622127056121826,
1.1930376291275024,
-0.9089235067367554,
-0.7847756743431091,
0.0731029063463211,
-0.8224453926086426,
1.1383616924285889,
0.721718966960907,
0.3849834203720093,
0.13207212090492249,
1.6636346578598022,
0.7759488821029663,
-0.5635197162628174,
0.4686136841773987,
0.533433198928833,
-0.17878301441669464,
-2.125784158706665,
-0.9681510329246521,
0.26123303174972534,
-0.4707380533218384,
-1.6176713705062866,
1.2814441919326782,
-1.1598397493362427,
-0.8785058259963989,
0.5037060379981995,
0.11552378535270691,
1.4733452796936035,
0.27290576696395874,
1.621548056602478,
2.0539801120758057,
0.9510612487792969,
0.2790488004684448,
1.296937108039856,
-0.0832325890660286,
-0.36097413301467896,
1.7539249658584595,
-0.3741951584815979,
0.564672589302063,
1.0760059356689453,
-0.4795915484428406,
-1.02829110622406,
-0.7082146406173706,
-1.1954950094223022,
-0.6508652567863464,
1.1460965871810913,
0.11512965708971024,
-1.1156532764434814,
0.21866074204444885,
1.5605895519256592,
0.1375807523727417,
-0.2554718554019928,
0.5499585270881653,
0.4486774206161499,
-0.7207962870597839,
-0.08612773567438126,
-0.9893585443496704,
0.47380805015563965,
-0.20518837869167328,
-0.3250964879989624,
0.27011895179748535,
0.3954387903213501,
1.311095952987671,
0.029920663684606552,
0.1337321698665619,
1.244911789894104,
-1.391200304031372,
1.4985778331756592,
-0.587099015712738,
0.23651260137557983,
-2.4250619411468506,
1.4089184999465942,
-0.7829205989837646,
1.8891690969467163,
-2.666250705718994,
0.44388771057128906,
-0.6550742983818054,
-0.43784475326538086,
0.3060208559036255,
-0.34728509187698364,
0.1187313050031662,
-0.1687745451927185,
-1.0782920122146606,
-0.1461797058582306,
-0.6935518383979797,
0.5328364372253418,
1.1510051488876343,
1.3354213237762451,
-1.0739037990570068,
-0.23506276309490204,
-1.7670962810516357,
-0.14144176244735718,
-0.777760922908783,
0.3969438076019287,
-1.934226155281067,
-0.1291772574186325,
-1.909763216972351,
-2.4028098583221436,
-1.3347434997558594,
-0.7786089777946472,
1.073045253753662,
0.11760123074054718,
-0.920390784740448,
1.1389515399932861,
-0.3377615213394165,
-1.8055258989334106,
1.0929632186889648,
-2.192197799682617
] |
https://github.com/huggingface/datasets/issues/6034 | load_dataset hangs on WSL | Thanks - that works! However it doesn't resolve the original issue (but I am not sure if it is a WSL problem) | ### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information. | 62 | 22 | load_dataset hangs on WSL
### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information.
Thanks - that works! However it doesn't resolve the original issue (but I am not sure if it is a WSL problem) | [
-1.2606147527694702,
-1.025841474533081,
-0.7423518300056458,
1.4611889123916626,
-0.08388272672891617,
-1.1834825277328491,
0.060363709926605225,
-1.0104409456253052,
1.7091079950332642,
-0.726340115070343,
0.27476975321769714,
-1.6232661008834839,
0.004051377065479755,
-0.540695071220398,
-0.6806443929672241,
-0.9047511219978333,
-0.37046006321907043,
-0.8734069466590881,
1.1104124784469604,
2.6270503997802734,
1.1184930801391602,
-1.472700595855713,
2.7393648624420166,
0.6847144365310669,
-0.16461676359176636,
-1.0472279787063599,
0.5210445523262024,
-0.04493414983153343,
-1.3384166955947876,
-0.4525541663169861,
-1.007536768913269,
-0.08336730301380157,
-0.5364722609519958,
-0.4543304741382599,
0.06591562181711197,
0.26725059747695923,
-0.16589601337909698,
-0.4519025683403015,
-0.5100255012512207,
-0.7328407764434814,
0.39256295561790466,
-0.43492332100868225,
0.8789607882499695,
-0.31040018796920776,
1.804136872291565,
-0.5555320382118225,
0.4572311341762543,
0.6051779389381409,
1.3494714498519897,
0.2546793818473816,
-0.05336537957191467,
0.42232251167297363,
0.4491228461265564,
0.037346046417951584,
0.5348419547080994,
1.0836191177368164,
0.6779453158378601,
0.44808486104011536,
0.6550828218460083,
-2.2468228340148926,
1.283586025238037,
-1.0183135271072388,
0.29830092191696167,
1.2823480367660522,
-0.9347102046012878,
0.3630664050579071,
-1.7643606662750244,
-0.08725493401288986,
0.6238301396369934,
-2.2917375564575195,
0.18423083424568176,
-1.279822826385498,
-0.4835028052330017,
0.9744069576263428,
0.3590094745159149,
-1.3323758840560913,
0.02178819105029106,
-0.5505824089050293,
1.0348221063613892,
0.4156247079372406,
1.1300231218338013,
-1.7459355592727661,
-0.08121617138385773,
-0.3131331205368042,
0.18419736623764038,
-1.2923475503921509,
-1.5486799478530884,
0.5874165296554565,
0.6690187454223633,
0.5784965753555298,
0.011490211822092533,
0.8754007816314697,
-1.039207935333252,
0.7393209934234619,
-0.9182490110397339,
-1.7265698909759521,
-1.4675288200378418,
-2.3635754585266113,
-2.3381130695343018,
0.7792118787765503,
-0.40442943572998047,
-0.4904118478298187,
1.999996542930603,
-1.034950613975525,
-1.7697789669036865,
1.2246755361557007,
0.21975401043891907,
-0.04626651480793953,
2.49082350730896,
0.11849217861890793,
-0.7552925944328308,
0.5125149488449097,
-0.7110589742660522,
0.7632471919059753,
-0.46698710322380066,
1.3822699785232544,
0.4314816892147064,
-0.931617259979248,
1.5984805822372437,
-0.4015773832798004,
0.5074647665023804,
-0.6069114208221436,
-0.475320428609848,
-0.8441633582115173,
0.32463955879211426,
1.9968093633651733,
-0.3294009268283844,
1.6249608993530273,
-0.3348788917064667,
-1.5373883247375488,
-1.5914939641952515,
0.8344778418540955,
0.43187767267227173,
-0.8440204858779907,
0.13487552106380463,
-0.38460075855255127,
0.15140371024608612,
-0.022856455296278,
1.073705792427063,
1.2231396436691284,
0.6565878391265869,
-0.2899712920188904,
-0.9113642573356628,
0.3077964186668396,
-0.14425772428512573,
-0.6347376704216003,
-1.794091820716858,
-0.390636682510376,
0.06971819698810577,
0.6885097622871399,
-1.228732705116272,
1.6814992427825928,
0.8351050615310669,
1.9619957208633423,
1.0968493223190308,
-0.3452345132827759,
1.520634412765503,
0.09034480154514313,
1.8113536834716797,
-0.5072929263114929,
0.704356849193573,
-0.3022634983062744,
-1.1450856924057007,
0.7875094413757324,
-0.4248187243938446,
-1.9946664571762085,
-0.7206376791000366,
-0.8193790316581726,
-0.1540609896183014,
-0.8027945160865784,
0.9005939364433289,
-0.310532808303833,
-1.4027204513549805,
0.32942190766334534,
-0.8528652191162109,
0.16038796305656433,
-1.2490246295928955,
0.356437087059021,
0.7392547130584717,
-0.5217494368553162,
0.13982175290584564,
-0.28758475184440613,
-1.3098996877670288,
-0.4085041284561157,
0.23656466603279114,
1.8993198871612549,
-0.7649269700050354,
0.8801789879798889,
0.9991081953048706,
-0.6643315553665161,
0.04916461184620857,
0.3931393027305603,
-0.22487474977970123,
0.926969051361084,
-1.0514755249023438,
-0.35219240188598633,
1.2868916988372803,
-0.2603883147239685,
-0.5609995722770691,
1.4316357374191284,
0.7509798407554626,
-0.984242856502533,
-0.19097784161567688,
-0.1467410922050476,
-0.7727409601211548,
0.015802405774593353,
-1.7128784656524658,
-0.17394210398197174,
0.3422503173351288,
-1.5634225606918335,
-0.4208834171295166,
-0.2349732220172882,
1.2982888221740723,
-0.08613291382789612,
1.4390813112258911,
-0.3913024663925171,
-0.1169147938489914,
-0.32190605998039246,
-0.44185590744018555,
0.15872257947921753,
-0.26362454891204834,
-0.5564612746238708,
0.2952065169811249,
-0.7928079962730408,
0.350589394569397,
1.4107102155685425,
0.4141620695590973,
0.12147649377584457,
0.6008155941963196,
0.943777322769165,
0.39767542481422424,
-0.07198839634656906,
-0.8702437877655029,
-1.677688717842102,
2.1360740661621094,
-1.430523157119751,
1.958773136138916,
0.8430178761482239,
-0.12167434394359589,
-1.773707628250122,
-1.891457200050354,
1.278485655784607,
1.1301616430282593,
2.312300205230713,
0.5943877696990967,
0.45069798827171326,
-0.7905581593513489,
-0.6928616762161255,
0.27871331572532654,
-0.9949411153793335,
-0.8769809007644653,
0.07660794258117676,
2.3593592643737793,
1.744789481163025,
-0.38640326261520386,
-0.05907093361020088,
-0.9763850569725037,
1.4605315923690796,
-0.16637274622917175,
0.2576497793197632,
1.940420150756836,
-0.25296348333358765,
-1.0376602411270142,
1.2743656635284424,
-2.2978780269622803,
0.18804927170276642,
2.0097782611846924,
0.26563534140586853,
0.032335035502910614,
-1.5030044317245483,
-0.710902988910675,
-0.2666063904762268,
-0.31722551584243774,
-1.188288688659668,
0.5553023219108582,
-0.2864469289779663,
-0.8577215671539307,
-1.5289863348007202,
0.13149234652519226,
-1.1000208854675293,
-1.6397972106933594,
0.22769027948379517,
1.8526703119277954,
2.0467207431793213,
-0.7369221448898315,
1.428558349609375,
-0.14766007661819458,
0.14011210203170776,
1.2543878555297852,
1.1382414102554321,
3.110507011413574,
1.968115210533142,
-1.2266159057617188,
0.7314503788948059,
-0.16837376356124878,
-0.42138078808784485,
1.1160659790039062,
-1.242981195449829,
1.252338171005249,
-0.14079484343528748,
-1.1969945430755615,
-1.1765506267547607,
0.9919863939285278,
0.47433918714523315,
-0.029816780239343643,
-0.4681442975997925,
1.2978262901306152,
-0.017758574336767197,
1.3098443746566772,
0.45900797843933105,
-0.3100394010543823,
0.5561414957046509,
-0.42995110154151917,
-0.5501891374588013,
1.5821616649627686,
0.2484893798828125,
-1.4422259330749512,
-2.281841993331909,
-0.17356224358081818,
-0.8788379430770874,
-0.026129942387342453,
-0.6132206320762634,
-1.0174058675765991,
1.5958982706069946,
0.3636779189109802,
-1.1679564714431763,
-0.29985177516937256,
-0.27944982051849365,
-0.6043641567230225,
2.7473838329315186,
-1.409461259841919,
-0.2774030864238739,
-1.0538904666900635,
-0.5594315528869629,
1.603019118309021,
-1.2610061168670654,
-0.1663798838853836,
-0.9576706290245056,
-0.6363910436630249,
-1.23328697681427,
-0.5710551142692566,
-0.05962799862027168,
-0.9096697568893433,
0.839233934879303,
0.25591468811035156,
-1.0692732334136963,
-0.28452444076538086,
-0.849776029586792,
0.8320714831352234,
-0.004805309697985649,
0.3029640018939972,
1.889811635017395,
0.3200225830078125,
-0.3898252844810486,
0.6997451782226562,
1.1563944816589355,
0.6040461659431458,
-0.6562016010284424,
0.13904348015785217,
-0.6389604806900024,
0.4292740821838379,
-1.2726507186889648,
0.3003423511981964,
-2.869786500930786,
0.6594029068946838,
-0.08509749174118042,
-0.12032034993171692,
-0.08054256439208984,
-1.2570711374282837,
1.0673795938491821,
2.5873584747314453,
-1.2083055973052979,
0.4999975264072418,
0.2941681146621704,
1.2275758981704712,
-1.5820907354354858,
0.3398378789424896,
-0.4556277096271515,
2.2413270473480225,
0.28953680396080017,
1.1642200946807861,
-0.44153109192848206,
-2.3300304412841797,
0.6465069651603699,
-1.2628029584884644,
-1.1136152744293213,
0.6769062876701355,
-0.9623984694480896,
0.11971358209848404,
-1.405327320098877,
-0.17288075387477875,
-0.7964539527893066,
-1.2022206783294678,
0.6446071863174438,
0.030264608561992645,
0.47824332118034363,
-0.4882899820804596,
0.3494190573692322,
-2.1156058311462402,
-1.3943142890930176,
-0.13987158238887787,
-0.9934505224227905,
0.4887634217739105,
-0.33858728408813477,
0.7104105353355408,
-0.17457415163516998,
0.012337190099060535,
0.38529637455940247,
1.3996303081512451,
3.4434359073638916,
0.15175144374370575,
0.35130447149276733,
-0.11793571710586548,
-0.9658304452896118,
1.3854137659072876,
0.8696907758712769,
-0.20543085038661957,
-0.603207528591156,
-1.0339299440383911,
1.4812017679214478,
1.9670699834823608,
0.9787954688072205,
0.1382906138896942,
-0.7103294134140015,
-0.6630006432533264,
-0.01736009493470192,
0.23164890706539154,
0.4607519805431366,
0.8687512278556824,
0.03681230545043945,
0.1208214983344078,
1.4997928142547607,
1.2804286479949951,
-0.44067707657814026,
0.4390890598297119,
-0.8459396958351135,
-0.4517887830734253,
0.4922870099544525,
0.3109441101551056,
-0.003467161674052477,
0.3885027766227722,
-1.0327270030975342,
-0.19800466299057007,
-0.37817659974098206,
-0.9422633051872253,
-0.7343284487724304,
-0.2996111512184143,
-0.3600623905658722,
1.6656043529510498,
0.16539621353149414,
-0.4972580373287201,
0.015402835793793201,
-0.7824408411979675,
-0.052256278693675995,
-1.026708722114563,
0.28410983085632324,
-0.08118720352649689,
-0.13853628933429718,
-0.021312806755304337,
1.76689612865448,
-0.9043886065483093,
-2.137301445007324,
0.22783617675304413,
0.2669360637664795,
-0.2990259528160095,
0.1978510469198227,
1.6443355083465576,
0.4708312153816223,
1.4327573776245117,
1.3051025867462158,
0.9394453167915344,
-0.7188429236412048,
-1.3206332921981812,
0.647080659866333,
0.9793199300765991,
-1.4010825157165527,
0.8295184969902039,
-0.08155585080385208,
-0.5779674649238586,
0.5967524647712708,
1.279849648475647,
0.47814884781837463,
-1.8883686065673828,
0.8101934790611267,
-0.9554111361503601,
0.8073889017105103,
0.6318244338035583,
0.7606143355369568,
0.2180594950914383,
0.8129522800445557,
-1.3296977281570435,
-1.1315661668777466,
-0.8153237104415894,
-0.6780984997749329,
1.9357227087020874,
-0.2756686508655548,
0.5129532217979431,
-0.14595261216163635,
-1.3489519357681274,
-0.07801700383424759,
0.6406691074371338,
0.25108587741851807,
-0.4079013168811798,
0.86538165807724,
-0.7078337669372559,
-1.2070164680480957,
-1.3955557346343994,
-0.48166635632514954,
-1.0285346508026123,
-0.9786603450775146,
1.1327197551727295,
0.8318670988082886,
0.2795812785625458,
1.8949766159057617,
0.5387954711914062,
0.2628875970840454,
-2.651771306991577,
0.8825199007987976,
0.23601718246936798,
-0.0431235246360302,
0.9049602746963501,
0.19773760437965393,
1.0171716213226318,
0.028836891055107117,
0.5761070251464844,
-2.2852566242218018,
2.234114408493042,
-0.2174941897392273,
0.6972306370735168,
-0.007345565594732761,
-0.023005763068795204,
0.9770915508270264,
0.5822241902351379,
0.6524377465248108,
-1.093183159828186,
0.7009275555610657,
-0.6013332009315491,
1.286609172821045,
0.936443567276001,
-0.8078482151031494,
-0.013579271733760834,
1.2828924655914307,
0.43619605898857117,
-0.5332017540931702,
-0.954555869102478,
-0.9743474721908569,
0.9494889974594116,
1.7679306268692017,
-0.04178563505411148,
-0.07742514461278915,
0.8305220603942871,
0.6135711669921875,
-1.3139857053756714,
0.03922608867287636,
-0.7436479330062866,
-0.7151901125907898,
1.6473479270935059,
2.095792293548584,
-0.0886649638414383,
-0.20006076991558075,
-0.6717795729637146,
-1.3115980625152588,
0.7259802222251892,
-0.003527479711920023,
0.0375656932592392,
0.6804110407829285,
-0.635109543800354,
1.085313081741333,
0.8934081792831421,
1.024437665939331,
0.17531387507915497,
0.24806615710258484,
0.2796548008918762,
-0.2743646204471588,
-1.2103501558303833,
-0.3055737018585205,
-1.1355642080307007,
-2.562276840209961,
0.4460611939430237,
-0.24700933694839478,
-1.479970097541809,
0.10317888855934143,
-1.0307574272155762,
0.8797169327735901,
-0.5065947771072388,
-1.0733026266098022,
-1.4103903770446777,
0.228780135512352,
-0.126438707113266,
0.9017321467399597,
-1.6247225999832153,
-0.13309349119663239,
1.2206259965896606,
0.9828415513038635,
-0.6043009161949158,
1.080650806427002,
0.3063657581806183,
1.0268715620040894,
0.8551589250564575,
-0.4081784188747406,
0.5798001885414124,
0.06919042021036148,
-1.2902060747146606,
0.5359365940093994,
1.181925892829895,
0.2486383616924286,
1.438920021057129,
-0.6178150773048401,
-0.0017225355841219425,
0.41905197501182556,
-0.5391835570335388,
-0.40352100133895874,
-0.507938802242279,
0.6914448738098145,
-0.011988243088126183,
-0.9006430506706238,
-0.03195859119296074,
-0.07789262384176254,
-0.20940491557121277,
0.17969578504562378,
-1.4987200498580933,
-0.13315080106258392,
-0.40386807918548584,
-0.5738950967788696,
-1.2766696214675903,
-0.11318153887987137,
1.4067015647888184,
-0.8882090449333191,
-0.195942685008049,
0.48934200406074524,
0.45075538754463196,
0.5613684058189392,
0.6492906808853149,
-0.6237574815750122,
-0.4292750656604767,
-0.1794285774230957,
-0.3855569660663605,
0.31818267703056335,
1.2635217905044556,
-0.2092653512954712,
-1.0788263082504272,
0.7401309609413147,
-0.3325745165348053,
0.10195010900497437,
1.8466393947601318,
0.13738049566745758,
-0.816051721572876,
0.21230904757976532,
-0.7390120625495911,
1.938002586364746,
1.5886952877044678,
1.2838619947433472,
-0.10639657080173492,
-0.9448162913322449,
0.6865136623382568,
-0.19356364011764526,
-0.37435564398765564,
0.7717989683151245,
0.4516918361186981,
-0.18473917245864868,
-1.3718942403793335,
0.5819311141967773,
1.1163431406021118,
-0.9089915752410889,
-0.7614916563034058,
0.030849050730466843,
-0.7922694087028503,
1.176963448524475,
0.7172410488128662,
0.39053165912628174,
0.16856415569782257,
1.7240439653396606,
0.791225016117096,
-0.5286378264427185,
0.4454144537448883,
0.543817937374115,
-0.17661820352077484,
-2.15751576423645,
-0.9787927865982056,
0.2638433873653412,
-0.49869662523269653,
-1.601086139678955,
1.2599002122879028,
-1.1246538162231445,
-0.8391932845115662,
0.5280080437660217,
0.12558738887310028,
1.4595656394958496,
0.2877483069896698,
1.6174695491790771,
2.026766061782837,
0.9528422951698303,
0.26618629693984985,
1.257834792137146,
-0.13578054308891296,
-0.3414149582386017,
1.7522815465927124,
-0.37146392464637756,
0.5821912884712219,
1.090002417564392,
-0.4957026541233063,
-1.0398708581924438,
-0.6946542859077454,
-1.2075575590133667,
-0.6558173894882202,
1.096052885055542,
0.11497475206851959,
-1.139194369316101,
0.20899970829486847,
1.5421236753463745,
0.10197094082832336,
-0.25424420833587646,
0.47302913665771484,
0.41776013374328613,
-0.718839704990387,
-0.08058962970972061,
-0.9650768637657166,
0.48936188220977783,
-0.21080318093299866,
-0.37041375041007996,
0.2826975882053375,
0.38975539803504944,
1.29688560962677,
0.0036434121429920197,
0.11047516018152237,
1.2883408069610596,
-1.391018271446228,
1.4875202178955078,
-0.6366114616394043,
0.2054855078458786,
-2.3690640926361084,
1.3518370389938354,
-0.8074292540550232,
1.9303120374679565,
-2.6847550868988037,
0.4974640905857086,
-0.6645699143409729,
-0.4363767206668854,
0.3366803526878357,
-0.33228886127471924,
0.12496922165155411,
-0.1784258633852005,
-1.0673034191131592,
-0.14668169617652893,
-0.6790979504585266,
0.5162065029144287,
1.1347707509994507,
1.3360439538955688,
-1.0721244812011719,
-0.19625307619571686,
-1.730464220046997,
-0.11103318631649017,
-0.8022974133491516,
0.3711104393005371,
-1.973193883895874,
-0.11179424822330475,
-1.9456582069396973,
-2.3509740829467773,
-1.3216530084609985,
-0.7517712712287903,
1.1074658632278442,
0.082208551466465,
-0.8942003846168518,
1.1568732261657715,
-0.3271341025829315,
-1.783978819847107,
1.0857518911361694,
-2.2213518619537354
] |
https://github.com/huggingface/datasets/issues/6034 | load_dataset hangs on WSL | We use `requests` to make HTTP requests (and `aiohttp` in the streaming mode), so I don't think we can provide much help regarding the socket issue (it probably has something to do with WSL). | ### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information. | 62 | 34 | load_dataset hangs on WSL
### Describe the bug
load_dataset simply hangs. It happens once every ~5 times, and interestingly hangs for a multiple of 5 minutes (hangs for 5/10/15 minutes). Using the profiler in PyCharm shows that it spends the time at <method 'connect' of '_socket.socket' objects>. However, a local cache is available so I am not sure why socket is needed. ([profiler result](https://ibb.co/0Btbbp8))
It only happens on WSL for me. It works for native Windows and my MacBook. (cache quickly recognized and loaded within a second).
### Steps to reproduce the bug
I am using Ubuntu 22.04.2 LTS (GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64)
Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
>>> import datasets
>>> datasets.load_dataset('ai2_arc', 'ARC-Challenge') # hangs for 5/10/15 minutes
### Expected behavior
cache quickly recognized and loaded within a second
### Environment info
Please let me know if I should provide more environment information.
We use `requests` to make HTTP requests (and `aiohttp` in the streaming mode), so I don't think we can provide much help regarding the socket issue (it probably has something to do with WSL). | [
-1.2554733753204346,
-1.0141922235488892,
-0.7413086295127869,
1.4800934791564941,
-0.10498398542404175,
-1.1705819368362427,
0.08941688388586044,
-1.0425829887390137,
1.704733967781067,
-0.7188597321510315,
0.2837793231010437,
-1.6243011951446533,
-0.002514083869755268,
-0.5275703072547913,
-0.6943632364273071,
-0.9070106148719788,
-0.4018852710723877,
-0.8636388182640076,
1.078696846961975,
2.627031087875366,
1.1405773162841797,
-1.4617334604263306,
2.7226288318634033,
0.6969813704490662,
-0.16469964385032654,
-1.0524418354034424,
0.5046252608299255,
-0.04769778624176979,
-1.3315237760543823,
-0.45012468099594116,
-0.9884543418884277,
-0.09131927788257599,
-0.5504341721534729,
-0.46862292289733887,
0.0613381490111351,
0.26109778881073,
-0.16663235425949097,
-0.46778643131256104,
-0.49064910411834717,
-0.7439139485359192,
0.4141249656677246,
-0.44213420152664185,
0.899035632610321,
-0.2980833053588867,
1.800614833831787,
-0.5671624541282654,
0.45220011472702026,
0.622208297252655,
1.3568638563156128,
0.2300848662853241,
-0.06293787062168121,
0.4288145899772644,
0.4524235129356384,
0.05856844037771225,
0.527594268321991,
1.0794373750686646,
0.6893928647041321,
0.4412429928779602,
0.6565052270889282,
-2.2430591583251953,
1.2628439664840698,
-1.0507657527923584,
0.32391947507858276,
1.276261806488037,
-0.9130126237869263,
0.346643328666687,
-1.7653428316116333,
-0.10139427334070206,
0.634895384311676,
-2.2819278240203857,
0.20913700759410858,
-1.2978414297103882,
-0.4531397223472595,
0.9710176587104797,
0.3312634825706482,
-1.3297324180603027,
0.04622986540198326,
-0.5302416682243347,
1.045387864112854,
0.427686870098114,
1.1403714418411255,
-1.7809010744094849,
-0.08231489360332489,
-0.3390393853187561,
0.15882554650306702,
-1.2719521522521973,
-1.5189954042434692,
0.5767945051193237,
0.6588115692138672,
0.5549579858779907,
0.006992965936660767,
0.9023617506027222,
-1.0305050611495972,
0.7486806511878967,
-0.9107314944267273,
-1.7235857248306274,
-1.4648427963256836,
-2.3382208347320557,
-2.326411724090576,
0.7628622651100159,
-0.4087890386581421,
-0.4973601698875427,
2.0139482021331787,
-1.03389573097229,
-1.78902268409729,
1.2097755670547485,
0.2228180170059204,
-0.04523592069745064,
2.4554755687713623,
0.10949933528900146,
-0.7506059408187866,
0.4772794246673584,
-0.7076819539070129,
0.7556349039077759,
-0.4624031186103821,
1.3881174325942993,
0.4328805208206177,
-0.9342605471611023,
1.5920215845108032,
-0.3700733780860901,
0.5280665159225464,
-0.6101553440093994,
-0.47883880138397217,
-0.8434493541717529,
0.30521905422210693,
2.0140888690948486,
-0.34894269704818726,
1.6066367626190186,
-0.33973127603530884,
-1.5377951860427856,
-1.557331919670105,
0.8706721067428589,
0.4330350160598755,
-0.8343150615692139,
0.1152045801281929,
-0.3837021589279175,
0.12799932062625885,
-0.019853707402944565,
1.0954111814498901,
1.2331318855285645,
0.6618439555168152,
-0.30660486221313477,
-0.9082691669464111,
0.2977192997932434,
-0.1290871948003769,
-0.6747473478317261,
-1.8008259534835815,
-0.38368165493011475,
0.07844939827919006,
0.6709671020507812,
-1.2312968969345093,
1.6459383964538574,
0.8310233950614929,
1.9538949728012085,
1.0991426706314087,
-0.34179508686065674,
1.511522889137268,
0.08773339539766312,
1.838143229484558,
-0.4802786111831665,
0.6929517388343811,
-0.32419466972351074,
-1.1731220483779907,
0.8203786015510559,
-0.4011051654815674,
-2.002845287322998,
-0.7025315761566162,
-0.8164077997207642,
-0.16819629073143005,
-0.7891750931739807,
0.8961639404296875,
-0.2983053922653198,
-1.4095754623413086,
0.31354784965515137,
-0.8502689003944397,
0.1444883495569229,
-1.2208982706069946,
0.34381598234176636,
0.7121879458427429,
-0.5222075581550598,
0.12867306172847748,
-0.31420111656188965,
-1.3298590183258057,
-0.43843668699264526,
0.23525750637054443,
1.8718364238739014,
-0.7618833184242249,
0.8586580753326416,
1.0211780071258545,
-0.6771692633628845,
0.008581707254052162,
0.39202481508255005,
-0.2506706714630127,
0.9201057553291321,
-1.0540682077407837,
-0.36323481798171997,
1.2635822296142578,
-0.217294842004776,
-0.5830782055854797,
1.4241315126419067,
0.7154209613800049,
-0.9870485067367554,
-0.18307049572467804,
-0.1471927911043167,
-0.7969598174095154,
0.024435028433799744,
-1.7324562072753906,
-0.1808171272277832,
0.358384370803833,
-1.5803143978118896,
-0.4348325729370117,
-0.23271355032920837,
1.3100749254226685,
-0.0633179321885109,
1.4450268745422363,
-0.37603676319122314,
-0.12082573771476746,
-0.334530770778656,
-0.4228052496910095,
0.18537482619285583,
-0.23232918977737427,
-0.5518444776535034,
0.27828824520111084,
-0.8077981472015381,
0.3682391047477722,
1.414734125137329,
0.3818119764328003,
0.0918479710817337,
0.59223872423172,
0.9361515045166016,
0.3921568989753723,
-0.07143287360668182,
-0.8792919516563416,
-1.6738417148590088,
2.136327028274536,
-1.4297833442687988,
1.9514583349227905,
0.8137582540512085,
-0.10583959519863129,
-1.7788633108139038,
-1.908587098121643,
1.3014227151870728,
1.1475005149841309,
2.2875523567199707,
0.5922409296035767,
0.46798259019851685,
-0.7746911644935608,
-0.6653872132301331,
0.2771214246749878,
-1.0320359468460083,
-0.8895061612129211,
0.0863998681306839,
2.3617305755615234,
1.7250241041183472,
-0.42047327756881714,
-0.07080859690904617,
-0.9919891953468323,
1.4517459869384766,
-0.16401755809783936,
0.22608433663845062,
1.9636118412017822,
-0.2241760492324829,
-1.0549976825714111,
1.2946144342422485,
-2.2916274070739746,
0.18710631132125854,
2.014458417892456,
0.2615187168121338,
0.04783913865685463,
-1.4926358461380005,
-0.6920397281646729,
-0.2544654309749603,
-0.33128446340560913,
-1.188277244567871,
0.5663185715675354,
-0.2830665707588196,
-0.8348335027694702,
-1.5218276977539062,
0.13264939188957214,
-1.105911374092102,
-1.6478708982467651,
0.23070606589317322,
1.8624510765075684,
2.0316483974456787,
-0.709782063961029,
1.4685332775115967,
-0.18717241287231445,
0.1427045464515686,
1.2531988620758057,
1.1272118091583252,
3.1309902667999268,
1.9819198846817017,
-1.235569953918457,
0.7251624464988708,
-0.16108673810958862,
-0.4460117816925049,
1.1212407350540161,
-1.2314592599868774,
1.2824338674545288,
-0.17300713062286377,
-1.193071961402893,
-1.1659529209136963,
0.9911724328994751,
0.4741389751434326,
0.010568046942353249,
-0.4635075330734253,
1.25538969039917,
-0.006644297391176224,
1.2909693717956543,
0.45484793186187744,
-0.33743220567703247,
0.5717753767967224,
-0.441067099571228,
-0.5419282913208008,
1.586955189704895,
0.2629162669181824,
-1.4143942594528198,
-2.314831256866455,
-0.18492668867111206,
-0.8852187395095825,
-0.013309139758348465,
-0.598495602607727,
-0.9956976175308228,
1.5819584131240845,
0.37704652547836304,
-1.1708184480667114,
-0.312411904335022,
-0.2975502610206604,
-0.5887834429740906,
2.7384049892425537,
-1.4140424728393555,
-0.26662731170654297,
-1.0496482849121094,
-0.6191869974136353,
1.6080790758132935,
-1.2538684606552124,
-0.17188198864459991,
-0.9486817121505737,
-0.6090213656425476,
-1.2534363269805908,
-0.59442538022995,
-0.03876465559005737,
-0.9398712515830994,
0.8345290422439575,
0.23093146085739136,
-1.1014083623886108,
-0.2515556216239929,
-0.8447039723396301,
0.822502851486206,
-0.009775439277291298,
0.2931833863258362,
1.9128618240356445,
0.33505797386169434,
-0.3731577396392822,
0.7167796492576599,
1.1142895221710205,
0.6082906126976013,
-0.6512976884841919,
0.15299786627292633,
-0.6538112163543701,
0.3700404167175293,
-1.2806516885757446,
0.30009186267852783,
-2.8711204528808594,
0.6581602692604065,
-0.052124787122011185,
-0.06739125400781631,
-0.054250095039606094,
-1.2473185062408447,
1.0276319980621338,
2.5979464054107666,
-1.2185595035552979,
0.4768863916397095,
0.30044275522232056,
1.2007920742034912,
-1.562549114227295,
0.29800909757614136,
-0.44623512029647827,
2.2372703552246094,
0.26869356632232666,
1.1926172971725464,
-0.42463791370391846,
-2.337099075317383,
0.6445751786231995,
-1.2900999784469604,
-1.152389407157898,
0.6665579676628113,
-0.9477179050445557,
0.07481421530246735,
-1.4067721366882324,
-0.16899517178535461,
-0.8209227919578552,
-1.1964935064315796,
0.683101236820221,
0.044850774109363556,
0.4751875400543213,
-0.5042901635169983,
0.36611974239349365,
-2.1266775131225586,
-1.3697564601898193,
-0.12946084141731262,
-0.9805269837379456,
0.47792816162109375,
-0.32601022720336914,
0.6798492670059204,
-0.1919117271900177,
0.008858997374773026,
0.38008445501327515,
1.395660161972046,
3.453932762145996,
0.15416471660137177,
0.34801530838012695,
-0.12646962702274323,
-0.9652050137519836,
1.3904569149017334,
0.8635911345481873,
-0.21444831788539886,
-0.6004414558410645,
-1.0254725217819214,
1.440792202949524,
1.9753047227859497,
0.9409259557723999,
0.14447875320911407,
-0.7297661304473877,
-0.646311342716217,
-0.03754197061061859,
0.2399626076221466,
0.46989309787750244,
0.8813517093658447,
0.05715108662843704,
0.08684206008911133,
1.4648535251617432,
1.2483303546905518,
-0.43897509574890137,
0.42099815607070923,
-0.8189725279808044,
-0.4303986430168152,
0.515663743019104,
0.3209637403488159,
0.0047891996800899506,
0.38045740127563477,
-0.9949651956558228,
-0.19656291604042053,
-0.41330671310424805,
-0.9480745196342468,
-0.7498342394828796,
-0.3101680278778076,
-0.34716296195983887,
1.6495177745819092,
0.1879090964794159,
-0.49884939193725586,
-0.0015999097377061844,
-0.7654724717140198,
-0.03135909512639046,
-1.0226539373397827,
0.29652804136276245,
-0.07643117010593414,
-0.10830485075712204,
-0.028268197551369667,
1.7498805522918701,
-0.9026258587837219,
-2.105073928833008,
0.2402004450559616,
0.26842761039733887,
-0.30100762844085693,
0.20857994258403778,
1.6497353315353394,
0.45211678743362427,
1.4320262670516968,
1.2856624126434326,
0.9580143690109253,
-0.6812162399291992,
-1.319000482559204,
0.6200021505355835,
1.0085687637329102,
-1.4292550086975098,
0.7978761196136475,
-0.022669941186904907,
-0.5682097673416138,
0.6311358213424683,
1.2289897203445435,
0.4692869186401367,
-1.9250590801239014,
0.7989107966423035,
-0.9474948644638062,
0.803326427936554,
0.6157116889953613,
0.7331162095069885,
0.2289612591266632,
0.8099140524864197,
-1.284303069114685,
-1.0978280305862427,
-0.810983419418335,
-0.6644428968429565,
1.9672695398330688,
-0.261921226978302,
0.5202479362487793,
-0.13765904307365417,
-1.3741751909255981,
-0.08689896017313004,
0.6433050036430359,
0.27364933490753174,
-0.4554196000099182,
0.8478842973709106,
-0.7011379599571228,
-1.2094535827636719,
-1.402219295501709,
-0.46527427434921265,
-1.0305252075195312,
-0.964512288570404,
1.1060937643051147,
0.8327715396881104,
0.25554943084716797,
1.8829246759414673,
0.5371046662330627,
0.2623440623283386,
-2.673344373703003,
0.8720792531967163,
0.26054251194000244,
-0.05278469994664192,
0.9303764700889587,
0.20467112958431244,
1.0043278932571411,
0.006463050842285156,
0.5762184858322144,
-2.289069414138794,
2.2292354106903076,
-0.20453116297721863,
0.7042512893676758,
0.023748736828565598,
-0.03993065282702446,
0.954184353351593,
0.5525957345962524,
0.6489121317863464,
-1.0920066833496094,
0.6804869174957275,
-0.6012043952941895,
1.3070262670516968,
0.934427797794342,
-0.8056167364120483,
-0.048390958458185196,
1.3151519298553467,
0.4357556700706482,
-0.510129988193512,
-0.958777129650116,
-0.9958920478820801,
0.9551806449890137,
1.7598274946212769,
-0.058414947241544724,
-0.07846333831548691,
0.8163735270500183,
0.6369072794914246,
-1.3159898519515991,
0.06271114200353622,
-0.7491533160209656,
-0.7288039922714233,
1.624079704284668,
2.1178388595581055,
-0.09367775917053223,
-0.21549004316329956,
-0.7152524590492249,
-1.2938799858093262,
0.7439542412757874,
-0.021328553557395935,
0.04094960168004036,
0.6549577116966248,
-0.6164286732673645,
1.106268286705017,
0.9238232970237732,
1.0237499475479126,
0.210089311003685,
0.2649892568588257,
0.2878381609916687,
-0.2719777822494507,
-1.1899380683898926,
-0.2804067134857178,
-1.1226353645324707,
-2.575056314468384,
0.47689902782440186,
-0.2270040661096573,
-1.48259699344635,
0.10212019085884094,
-1.006377935409546,
0.8893646597862244,
-0.5236973166465759,
-1.0840927362442017,
-1.4186556339263916,
0.2218823879957199,
-0.09015126526355743,
0.930815577507019,
-1.6313884258270264,
-0.0966259092092514,
1.2341856956481934,
0.9709979891777039,
-0.6101819276809692,
1.072660207748413,
0.30402350425720215,
1.0122709274291992,
0.8808083534240723,
-0.4001926779747009,
0.5911601185798645,
0.10376983135938644,
-1.2817375659942627,
0.5412724018096924,
1.1802173852920532,
0.26793450117111206,
1.417011022567749,
-0.6389427185058594,
0.005524092353880405,
0.4267581105232239,
-0.5541378259658813,
-0.4044489860534668,
-0.512347936630249,
0.6966218948364258,
-0.020788036286830902,
-0.8956519365310669,
-0.03201044350862503,
-0.09790589660406113,
-0.2040058821439743,
0.17630594968795776,
-1.518350601196289,
-0.1512727290391922,
-0.3835294246673584,
-0.5671461224555969,
-1.2559508085250854,
-0.1344747692346573,
1.4021830558776855,
-0.8780117034912109,
-0.17408506572246552,
0.51934814453125,
0.4505205750465393,
0.5822123289108276,
0.6237434148788452,
-0.6055240035057068,
-0.4381105899810791,
-0.17615176737308502,
-0.3891018033027649,
0.3136477470397949,
1.3195279836654663,
-0.1988997757434845,
-1.0345429182052612,
0.763949990272522,
-0.3610990047454834,
0.09346899390220642,
1.844801425933838,
0.15539129078388214,
-0.8401439785957336,
0.2003229558467865,
-0.7064585089683533,
1.9517158269882202,
1.5957226753234863,
1.2716801166534424,
-0.12431860715150833,
-0.9523680210113525,
0.6763357520103455,
-0.22823090851306915,
-0.3798813819885254,
0.7725796699523926,
0.45781177282333374,
-0.17991279065608978,
-1.3699634075164795,
0.5858638286590576,
1.1614110469818115,
-0.8728823661804199,
-0.7861306071281433,
0.03792555257678032,
-0.7754819989204407,
1.1372060775756836,
0.7249042391777039,
0.4125804305076599,
0.1403043270111084,
1.6741783618927002,
0.817901611328125,
-0.5476662516593933,
0.4575957655906677,
0.549567461013794,
-0.13754504919052124,
-2.1830837726593018,
-1.0060107707977295,
0.3012115955352783,
-0.4885920286178589,
-1.6223969459533691,
1.2687476873397827,
-1.1425693035125732,
-0.8587362170219421,
0.5216531157493591,
0.10591264814138412,
1.469170331954956,
0.30556344985961914,
1.5921722650527954,
2.0359761714935303,
0.9454764127731323,
0.25429612398147583,
1.3077837228775024,
-0.11872702836990356,
-0.3599504232406616,
1.7512788772583008,
-0.38362938165664673,
0.5571873188018799,
1.1320728063583374,
-0.479977548122406,
-1.017809271812439,
-0.7097491025924683,
-1.243023157119751,
-0.6720681190490723,
1.1155844926834106,
0.12332780659198761,
-1.1273993253707886,
0.21529729664325714,
1.5625696182250977,
0.10027210414409637,
-0.2707514762878418,
0.5221262574195862,
0.3999755382537842,
-0.7387692332267761,
-0.07000115513801575,
-0.9430702924728394,
0.4848790764808655,
-0.18742932379245758,
-0.3552590608596802,
0.30375462770462036,
0.36124134063720703,
1.2796835899353027,
0.014599556103348732,
0.12659412622451782,
1.2362196445465088,
-1.3997869491577148,
1.5097852945327759,
-0.6455341577529907,
0.22543500363826752,
-2.383589029312134,
1.372645616531372,
-0.7881053686141968,
1.9313141107559204,
-2.6861042976379395,
0.46584630012512207,
-0.6538723707199097,
-0.4195353388786316,
0.29107290506362915,
-0.32527071237564087,
0.11432058364152908,
-0.1786089986562729,
-1.0738532543182373,
-0.16146250069141388,
-0.6737780570983887,
0.5646346211433411,
1.1258515119552612,
1.337695837020874,
-1.079654574394226,
-0.2221774160861969,
-1.7376651763916016,
-0.10058420896530151,
-0.754955530166626,
0.3730727434158325,
-1.974000096321106,
-0.10480038821697235,
-1.9379898309707642,
-2.3709795475006104,
-1.2906618118286133,
-0.7566919326782227,
1.1079607009887695,
0.10294079780578613,
-0.8815975785255432,
1.1542350053787231,
-0.30690962076187134,
-1.800648808479309,
1.0936089754104614,
-2.2000832557678223
] |
https://github.com/huggingface/datasets/issues/6032 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info | `HfApi` comes from the `huggingface_hub` package. You can use [this](https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/utilities#huggingface_hub.configure_http_backend) utility to change the `huggingface_hub`'s `Session` proxies (see the example).
We plan to implement https://github.com/huggingface/datasets/issues/5080 and make this behavior more consistent eventually. | ### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4 | 63 | 32 | DownloadConfig.proxies not work when load_dataset_builder calling HfApi.dataset_info
### Describe the bug
```python
download_config = DownloadConfig(proxies={'https': '<my proxy>'})
builder = load_dataset_builder(..., download_config=download_config)
```
But, when getting the dataset_info from HfApi, the http requests not using the proxies.
### Steps to reproduce the bug
1. Setup proxies in DownloadConfig.
2. Call `load_dataset_build` with download_config.
3. Inspect the call stack in HfApi.dataset_info.
![image](https://github.com/huggingface/datasets/assets/138426806/33e538a8-2e22-4e63-b634-343febe5324b)
### Expected behavior
DownloadConfig.proxies works for getting dataset_info.
### Environment info
https://github.com/huggingface/datasets/commit/406b2212263c0d33f267e35b917f410ff6b3bc00
Python 3.11.4
`HfApi` comes from the `huggingface_hub` package. You can use [this](https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/utilities#huggingface_hub.configure_http_backend) utility to change the `huggingface_hub`'s `Session` proxies (see the example).
We plan to implement https://github.com/huggingface/datasets/issues/5080 and make this behavior more consistent eventually. | [
-1.1104506254196167,
-0.900575578212738,
-0.676376461982727,
1.509926438331604,
-0.10628755390644073,
-1.2705026865005493,
0.15166087448596954,
-1.0402348041534424,
1.57485032081604,
-0.6813511252403259,
0.24466240406036377,
-1.692107081413269,
-0.0123829310759902,
-0.5783460140228271,
-0.7574391961097717,
-0.8580574989318848,
-0.36628347635269165,
-0.6904918551445007,
1.095688819885254,
2.577338933944702,
1.2022228240966797,
-1.3430448770523071,
2.699180841445923,
0.5962550044059753,
-0.19665177166461945,
-1.0601813793182373,
0.5628510117530823,
0.041189733892679214,
-1.328599452972412,
-0.4165651798248291,
-0.9039327502250671,
-0.03228007256984711,
-0.60875403881073,
-0.535675585269928,
-0.02046091854572296,
0.47508659958839417,
-0.27380162477493286,
-0.4081621468067169,
-0.596829891204834,
-0.8036574125289917,
0.4329395592212677,
-0.4128052592277527,
0.9225213527679443,
-0.29648223519325256,
1.7908931970596313,
-0.5474662780761719,
0.4918093681335449,
0.7132156491279602,
1.3026652336120605,
0.16792167723178864,
0.06788921356201172,
0.3552790582180023,
0.4436330497264862,
-0.0725734755396843,
0.4368550181388855,
1.2244088649749756,
0.6461663842201233,
0.4341297745704651,
0.678678572177887,
-2.228120803833008,
1.305802583694458,
-0.88321852684021,
0.20956456661224365,
1.3315443992614746,
-0.9755920767784119,
0.30149298906326294,
-1.7679370641708374,
0.02052128128707409,
0.5488011240959167,
-2.286839723587036,
0.22506412863731384,
-1.3437837362289429,
-0.5066854953765869,
1.006107211112976,
0.34713315963745117,
-1.306723713874817,
0.13191425800323486,
-0.4518280327320099,
1.0986979007720947,
0.4515588581562042,
1.142503261566162,
-1.6751364469528198,
-0.08218446373939514,
-0.24405667185783386,
0.021836917847394943,
-1.2407456636428833,
-1.575995922088623,
0.42326679825782776,
0.649223804473877,
0.6901586651802063,
-0.12710081040859222,
1.0086017847061157,
-0.9885355830192566,
0.7609552145004272,
-0.93067467212677,
-1.7645260095596313,
-1.382432460784912,
-2.4003143310546875,
-2.3488991260528564,
0.7546905279159546,
-0.47516220808029175,
-0.4057999551296234,
2.030994415283203,
-1.038969874382019,
-1.8142956495285034,
1.1295772790908813,
0.3130558431148529,
0.022266458719968796,
2.3042404651641846,
0.223633274435997,
-0.7439404129981995,
0.3906031548976898,
-0.6915361881256104,
0.7444323897361755,
-0.3550393283367157,
1.3575876951217651,
0.5272257328033447,
-1.0721018314361572,
1.538185715675354,
-0.33627960085868835,
0.5982251167297363,
-0.7210452556610107,
-0.4415929615497589,
-0.7794319987297058,
0.23130013048648834,
1.8594266176223755,
-0.4186212122440338,
1.5882319211959839,
-0.34326285123825073,
-1.5787087678909302,
-1.5743600130081177,
0.8637368083000183,
0.4836169183254242,
-0.7991888523101807,
0.07475407421588898,
-0.42807647585868835,
0.055734243243932724,
-0.02685748226940632,
1.1058378219604492,
1.2535598278045654,
0.7014623284339905,
-0.42115071415901184,
-0.8224623799324036,
0.20639584958553314,
-0.14455066621303558,
-0.611973762512207,
-1.8436617851257324,
-0.2667807340621948,
0.1983506679534912,
0.6535174250602722,
-1.2218923568725586,
1.7115440368652344,
0.8278061151504517,
1.9350255727767944,
0.9842560291290283,
-0.3858925402164459,
1.4714568853378296,
0.005415491759777069,
1.9144108295440674,
-0.5294147729873657,
0.6301470994949341,
-0.2849245071411133,
-1.1735538244247437,
0.8531694412231445,
-0.3411025106906891,
-1.9827847480773926,
-0.7748124599456787,
-0.7456656098365784,
-0.16387300193309784,
-0.7769320607185364,
0.9170798063278198,
-0.2668803632259369,
-1.455291509628296,
0.1603352427482605,
-0.6780170202255249,
0.19708068668842316,
-1.2204996347427368,
0.17549774050712585,
0.7711459398269653,
-0.6633509993553162,
0.0003262581303715706,
-0.21091525256633759,
-1.3705083131790161,
-0.4451509118080139,
0.40551871061325073,
1.8167880773544312,
-0.712732195854187,
1.0028834342956543,
1.0932523012161255,
-0.7038068175315857,
0.12928855419158936,
0.3155202865600586,
-0.2809404134750366,
0.905299186706543,
-1.0528125762939453,
-0.3706701993942261,
1.1954586505889893,
-0.2515409290790558,
-0.6771320700645447,
1.4405089616775513,
0.8239383101463318,
-1.0660247802734375,
-0.19052746891975403,
-0.06585107743740082,
-0.8210427165031433,
0.050512246787548065,
-1.6882896423339844,
-0.11614768207073212,
0.37863004207611084,
-1.4917182922363281,
-0.45664840936660767,
-0.2630783021450043,
1.4258201122283936,
-0.1689932495355606,
1.4888763427734375,
-0.21554073691368103,
-0.12197472155094147,
-0.41155391931533813,
-0.42855656147003174,
0.15436379611492157,
-0.2881987988948822,
-0.6391745209693909,
0.2431480884552002,
-0.7977826595306396,
0.33022570610046387,
1.399599313735962,
0.28671562671661377,
0.11409276723861694,
0.5398007035255432,
1.0926789045333862,
0.3668820261955261,
-0.12053313851356506,
-0.8648257255554199,
-1.629359245300293,
2.0034353733062744,
-1.4093984365463257,
2.025486469268799,
0.8225417137145996,
-0.06754973530769348,
-1.774362325668335,
-1.89962637424469,
1.3516241312026978,
1.107871651649475,
2.376584053039551,
0.5273396968841553,
0.37432485818862915,
-0.8004161715507507,
-0.6654309630393982,
0.32232987880706787,
-0.970313549041748,
-0.6845314502716064,
0.12291190028190613,
2.3872902393341064,
1.7940868139266968,
-0.4443439543247223,
-0.29881638288497925,
-1.0322444438934326,
1.3637194633483887,
-0.16370436549186707,
0.2211681306362152,
2.031266212463379,
-0.1991729736328125,
-1.013655662536621,
1.2927072048187256,
-2.2588884830474854,
0.2382107526063919,
2.0152883529663086,
0.21199028193950653,
0.05535600706934929,
-1.493480920791626,
-0.6452730894088745,
-0.35643020272254944,
-0.520674467086792,
-1.230623722076416,
0.549981415271759,
-0.32473161816596985,
-0.8729644417762756,
-1.42784583568573,
0.0713624656200409,
-1.1397325992584229,
-1.7932571172714233,
0.2918204665184021,
1.8869130611419678,
1.9488624334335327,
-0.7767377495765686,
1.542568325996399,
-0.2680276930332184,
0.11991997063159943,
1.2711715698242188,
1.3213027715682983,
3.178255558013916,
1.9134122133255005,
-1.300635814666748,
0.7326114177703857,
-0.11930903792381287,
-0.46935316920280457,
1.1508896350860596,
-1.1284335851669312,
1.301548719406128,
-0.2396194189786911,
-1.230385184288025,
-1.2443428039550781,
1.043971061706543,
0.532069981098175,
0.08511912822723389,
-0.48597416281700134,
1.1990917921066284,
0.09815050661563873,
1.2431241273880005,
0.5797106623649597,
-0.42757081985473633,
0.6580641865730286,
-0.4341757297515869,
-0.6091070175170898,
1.545697808265686,
0.1584693342447281,
-1.4693907499313354,
-2.309870481491089,
-0.27083951234817505,
-0.8653379678726196,
-0.08544647693634033,
-0.6854977011680603,
-0.9847479462623596,
1.5756161212921143,
0.4991028904914856,
-1.3250092267990112,
-0.3245549499988556,
-0.2774961292743683,
-0.5250338315963745,
2.652000904083252,
-1.3184236288070679,
-0.14841623604297638,
-0.997268557548523,
-0.5525486469268799,
1.6473424434661865,
-1.1753937005996704,
-0.2752460241317749,
-1.0792251825332642,
-0.6727097034454346,
-1.308925747871399,
-0.5399994254112244,
0.008983155712485313,
-0.9028916358947754,
0.6863226890563965,
0.12383641302585602,
-1.2247729301452637,
-0.2551611661911011,
-0.8397879004478455,
1.0243127346038818,
-0.10494346916675568,
0.15703995525836945,
1.8872638940811157,
0.46244102716445923,
-0.41567617654800415,
0.7435840368270874,
1.1031173467636108,
0.6267648935317993,
-0.6889869570732117,
0.19403567910194397,
-0.6989346742630005,
0.31811895966529846,
-1.389559030532837,
0.2264556735754013,
-2.9290595054626465,
0.635353684425354,
-0.11505897343158722,
-0.07450148463249207,
0.006298240274190903,
-1.2845402956008911,
1.116457462310791,
2.5502116680145264,
-1.1916154623031616,
0.5274258852005005,
0.3907861113548279,
1.09413743019104,
-1.6173415184020996,
0.3402658700942993,
-0.4192294478416443,
2.059000253677368,
0.16322925686836243,
1.2067759037017822,
-0.4683348536491394,
-2.1562156677246094,
0.6483377814292908,
-1.2708253860473633,
-1.09096360206604,
0.8871893882751465,
-0.8460959196090698,
0.18949492275714874,
-1.3379875421524048,
-0.1759718954563141,
-0.8692435026168823,
-1.242500901222229,
0.7168657779693604,
0.11342667043209076,
0.3983815610408783,
-0.5594236254692078,
0.39061135053634644,
-2.0997118949890137,
-1.3056803941726685,
-0.2596973180770874,
-0.9964914917945862,
0.4820858836174011,
-0.2995300590991974,
0.5811614394187927,
-0.1292431354522705,
0.0966697633266449,
0.33382198214530945,
1.4503339529037476,
3.398569345474243,
0.18015746772289276,
0.24026048183441162,
-0.0403471477329731,
-0.9789121747016907,
1.411399245262146,
0.9639238119125366,
-0.1715283840894699,
-0.6459697484970093,
-1.061428427696228,
1.31447172164917,
1.9701550006866455,
1.0984361171722412,
0.028490271419286728,
-0.8300684690475464,
-0.819693386554718,
0.03280534967780113,
0.12751956284046173,
0.5340533256530762,
0.9314444661140442,
0.046695977449417114,
0.07639974355697632,
1.408305287361145,
1.2404409646987915,
-0.38758671283721924,
0.3904059827327728,
-0.9489261507987976,
-0.43309301137924194,
0.38763582706451416,
0.30541351437568665,
0.03170131891965866,
0.3897475600242615,
-1.110353946685791,
-0.19508807361125946,
-0.41015031933784485,
-0.9078550934791565,
-0.7905780673027039,
-0.39279794692993164,
-0.39544522762298584,
1.5838663578033447,
0.10904772579669952,
-0.43384674191474915,
0.04067584127187729,
-0.7306506037712097,
-0.14276695251464844,
-0.9898078441619873,
0.27919459342956543,
-0.1437651365995407,
-0.03947918489575386,
-0.11779910326004028,
1.6479473114013672,
-1.008719801902771,
-2.1797807216644287,
0.22205208241939545,
0.1505385786294937,
-0.3923719823360443,
0.21525175869464874,
1.7143436670303345,
0.5541250109672546,
1.3747334480285645,
1.3164650201797485,
0.9593373537063599,
-0.6887542605400085,
-1.3319637775421143,
0.6879987716674805,
0.965389609336853,
-1.3602808713912964,
0.8887390494346619,
-0.06066930294036865,
-0.4934891164302826,
0.7616540193557739,
1.3001078367233276,
0.4579680562019348,
-1.9964876174926758,
0.808971107006073,
-0.8486285209655762,
0.8056060075759888,
0.6540830135345459,
0.7735265493392944,
0.20070861279964447,
0.7691859006881714,
-1.298603892326355,
-1.1345932483673096,
-0.6715010404586792,
-0.679571270942688,
1.9636056423187256,
-0.2564260959625244,
0.4970133304595947,
-0.19330492615699768,
-1.2506746053695679,
-0.17531518638134003,
0.8045036196708679,
0.3647267818450928,
-0.5250203013420105,
0.8185453414916992,
-0.6055139303207397,
-1.0545711517333984,
-1.3061720132827759,
-0.4195604920387268,
-0.9647086262702942,
-0.8558672070503235,
0.9600194692611694,
0.7538859844207764,
0.42141982913017273,
1.9241664409637451,
0.5686176419258118,
0.2591942846775055,
-2.6640193462371826,
0.9078684449195862,
0.301035076379776,
-0.016753902658820152,
0.9278759360313416,
0.28418686985969543,
1.1215622425079346,
-0.055356215685606,
0.5584802031517029,
-2.387166976928711,
2.1635360717773438,
-0.2495628446340561,
0.6435447335243225,
-0.01199102122336626,
-0.18279635906219482,
1.1085662841796875,
0.49321049451828003,
0.5488974452018738,
-1.0810540914535522,
0.7784179449081421,
-0.5419455170631409,
1.1335060596466064,
0.8286700248718262,
-0.8662793636322021,
-0.024927649646997452,
1.3682219982147217,
0.47116416692733765,
-0.4619517922401428,
-0.915962278842926,
-0.9658344388008118,
0.9249561429023743,
1.7605665922164917,
-0.04794906824827194,
0.002422482706606388,
0.8263320922851562,
0.6667499542236328,
-1.3132942914962769,
0.15583795309066772,
-0.6878367066383362,
-0.6605168581008911,
1.765930414199829,
2.0837457180023193,
-0.08718268573284149,
-0.2645869553089142,
-0.7969180941581726,
-1.1878108978271484,
0.801214337348938,
-0.025628114119172096,
0.02485368400812149,
0.7196112871170044,
-0.7082555294036865,
1.1117026805877686,
0.7418818473815918,
0.9276309609413147,
0.0731847733259201,
0.2718614935874939,
0.4202505052089691,
-0.26339462399482727,
-1.2561390399932861,
-0.35960039496421814,
-1.1312750577926636,
-2.504185914993286,
0.4240133464336395,
-0.167829230427742,
-1.4600085020065308,
0.04885152727365494,
-1.1132224798202515,
0.8366135954856873,
-0.6053246855735779,
-1.1435577869415283,
-1.5121734142303467,
0.2767999768257141,
-0.17242683470249176,
0.8427345156669617,
-1.583522081375122,
-0.11560167372226715,
1.2850888967514038,
0.8736845850944519,
-0.558977484703064,
0.9645640850067139,
0.18400128185749054,
0.992579996585846,
0.8471308350563049,
-0.3555775284767151,
0.50501549243927,
0.11803720891475677,
-1.345475673675537,
0.44771742820739746,
1.2480593919754028,
0.22911593317985535,
1.4832953214645386,
-0.6061870455741882,
0.0560591034591198,
0.4502590298652649,
-0.5546932220458984,
-0.4905683100223541,
-0.4670950472354889,
0.7188193202018738,
0.08497850596904755,
-0.8974539637565613,
0.06379508972167969,
-0.202626571059227,
-0.24213963747024536,
0.22556574642658234,
-1.4381203651428223,
-0.2003638744354248,
-0.26444900035858154,
-0.5401555299758911,
-1.2402154207229614,
0.007744211703538895,
1.3320045471191406,
-0.7714713215827942,
-0.3059207499027252,
0.5248145461082458,
0.31399041414260864,
0.528569221496582,
0.6233301162719727,
-0.6314515471458435,
-0.2955535054206848,
-0.3662138283252716,
-0.3638804852962494,
0.3588886559009552,
1.2910104990005493,
-0.1386292427778244,
-0.9417473077774048,
0.7435895800590515,
-0.4327552616596222,
0.15231207013130188,
1.9569017887115479,
0.0077581219375133514,
-0.7843679785728455,
0.32048797607421875,
-0.6585538983345032,
1.8923490047454834,
1.7313798666000366,
1.3138991594314575,
-0.13675451278686523,
-1.023309588432312,
0.5546406507492065,
-0.23931659758090973,
-0.32069358229637146,
1.034258246421814,
0.4701540172100067,
-0.21824781596660614,
-1.2511346340179443,
0.5865550637245178,
1.264053225517273,
-0.9415462017059326,
-0.7461144924163818,
0.11625757813453674,
-0.9013423323631287,
1.1302213668823242,
0.6963455080986023,
0.3674607574939728,
0.22964125871658325,
1.5336045026779175,
0.7458339929580688,
-0.3781801164150238,
0.5830110907554626,
0.43789786100387573,
-0.25366953015327454,
-2.064675807952881,
-1.0665562152862549,
0.3366582989692688,
-0.4997096061706543,
-1.603907585144043,
1.2813565731048584,
-1.160434603691101,
-1.0271623134613037,
0.48419636487960815,
0.05043131858110428,
1.4077372550964355,
0.29055702686309814,
1.6464099884033203,
2.1358275413513184,
0.9577997326850891,
0.3539496660232544,
1.2629410028457642,
-0.015857012942433357,
-0.5296200513839722,
1.791399598121643,
-0.4135205149650574,
0.4906895160675049,
1.0297930240631104,
-0.39091190695762634,
-1.045150876045227,
-0.8584311604499817,
-1.2066771984100342,
-0.6446136236190796,
1.1923812627792358,
0.16394750773906708,
-1.1460524797439575,
0.2569243013858795,
1.4817404747009277,
0.20858189463615417,
-0.24446731805801392,
0.7174646258354187,
0.3760841190814972,
-0.7440569996833801,
-0.06922470778226852,
-0.877405047416687,
0.491197407245636,
-0.18785126507282257,
-0.2763091027736664,
0.28599128127098083,
0.43305984139442444,
1.280267357826233,
-0.05548056215047836,
0.1913035660982132,
1.1935367584228516,
-1.4134501218795776,
1.4935460090637207,
-0.6481170058250427,
0.28104400634765625,
-2.435238838195801,
1.4280213117599487,
-0.7795969843864441,
1.8568114042282104,
-2.6437649726867676,
0.4853416383266449,
-0.5846025943756104,
-0.48768502473831177,
0.30250120162963867,
-0.3338490128517151,
0.13732372224330902,
-0.16766954958438873,
-1.1068397760391235,
-0.11897332966327667,
-0.7269430160522461,
0.632849395275116,
1.206366777420044,
1.3370682001113892,
-1.1028724908828735,
-0.23959805071353912,
-1.7293872833251953,
-0.14503061771392822,
-0.6856334209442139,
0.3935035169124603,
-1.9273054599761963,
-0.09984305500984192,
-1.8934024572372437,
-2.4581708908081055,
-1.256500005722046,
-0.7947723269462585,
1.0462788343429565,
0.25205954909324646,
-0.8223464488983154,
1.1512231826782227,
-0.33368703722953796,
-1.8203145265579224,
1.0763421058654785,
-2.218118667602539
] |
https://github.com/huggingface/datasets/issues/6025 | Using a dataset for a use other than it was intended for. | I've opened a PR with a fix. In the meantime, you can avoid the error by deleting `task_templates` with `dataset.info.task_templates = None` before the `interleave_datasets` call.
` | ### Describe the bug
Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there in the dataset for some reason?
Here is the full stacktrace
```
File "/home/suryahari/Vornoi/tryage-handoff-other-datasets.py", line 276, in create_dataloaders
dataset = interleave_datasets(dsfold, stopping_strategy="all_exhausted")
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/combine.py", line 134, in interleave_datasets
return _interleave_iterable_datasets(
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1833, in _interleave_iterable_datasets
info = DatasetInfo.from_merge([d.info for d in datasets])
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in from_merge
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in <listcomp>
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 378, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 208, in __post_init__
self.task_templates = [
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 209, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/tasks/text_classification.py", line 20, in align_with_features
raise ValueError(f"Column {self.label_column} is not present in features.")
ValueError: Column label is not present in features.
```
### Steps to reproduce the bug
Delete the column `labels` from the `rotten_tomatoes` dataset. Try to interleave it with other datasets.
### Expected behavior
Should let me use the dataset with just the `text` field
### Environment info
latest datasets library? I don't think this was an issue in earlier versions. | 65 | 27 | Using a dataset for a use other than it was intended for.
### Describe the bug
Hi, I want to use the rotten tomatoes dataset but for a task other than classification, but when I interleave the dataset, it throws ```'ValueError: Column label is not present in features.'```. It seems that the label_col must be there in the dataset for some reason?
Here is the full stacktrace
```
File "/home/suryahari/Vornoi/tryage-handoff-other-datasets.py", line 276, in create_dataloaders
dataset = interleave_datasets(dsfold, stopping_strategy="all_exhausted")
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/combine.py", line 134, in interleave_datasets
return _interleave_iterable_datasets(
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/iterable_dataset.py", line 1833, in _interleave_iterable_datasets
info = DatasetInfo.from_merge([d.info for d in datasets])
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in from_merge
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 275, in <listcomp>
dataset_infos = [dset_info.copy() for dset_info in dataset_infos if dset_info is not None]
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 378, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 208, in __post_init__
self.task_templates = [
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/info.py", line 209, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "/home/suryahari/miniconda3/envs/vornoi/lib/python3.10/site-packages/datasets/tasks/text_classification.py", line 20, in align_with_features
raise ValueError(f"Column {self.label_column} is not present in features.")
ValueError: Column label is not present in features.
```
### Steps to reproduce the bug
Delete the column `labels` from the `rotten_tomatoes` dataset. Try to interleave it with other datasets.
### Expected behavior
Should let me use the dataset with just the `text` field
### Environment info
latest datasets library? I don't think this was an issue in earlier versions.
I've opened a PR with a fix. In the meantime, you can avoid the error by deleting `task_templates` with `dataset.info.task_templates = None` before the `interleave_datasets` call.
` | [
-1.1893870830535889,
-0.8744972348213196,
-0.6626822352409363,
1.4390053749084473,
-0.15856659412384033,
-1.3036210536956787,
0.06782419234514236,
-1.0595897436141968,
1.5827667713165283,
-0.763502836227417,
0.24396421015262604,
-1.686629056930542,
-0.07698502391576767,
-0.513750433921814,
-0.7241368293762207,
-0.9104963541030884,
-0.333590030670166,
-0.9068373441696167,
1.028486728668213,
2.5480616092681885,
1.2337501049041748,
-1.3593242168426514,
2.7736783027648926,
0.562408447265625,
-0.24295569956302643,
-1.0384483337402344,
0.543663740158081,
0.0037335073575377464,
-1.1818256378173828,
-0.4670184850692749,
-0.977438747882843,
-0.037165235728025436,
-0.578117311000824,
-0.39683449268341064,
0.09182987362146378,
0.37461575865745544,
-0.29207348823547363,
-0.2593385577201843,
-0.6242038011550903,
-0.6549689173698425,
0.4905564785003662,
-0.2754872143268585,
0.9785796999931335,
-0.37704893946647644,
1.801692008972168,
-0.5629520416259766,
0.3339966833591461,
0.638369619846344,
1.2472813129425049,
0.17918694019317627,
0.020609691739082336,
0.22735969722270966,
0.26994597911834717,
-0.018833301961421967,
0.6008465886116028,
1.1907870769500732,
0.5990839600563049,
0.559347927570343,
0.6752983331680298,
-2.1961755752563477,
1.2984908819198608,
-0.9172113537788391,
0.27894484996795654,
1.3868569135665894,
-0.7574318647384644,
0.35614877939224243,
-1.7720586061477661,
-0.08673539757728577,
0.6376538276672363,
-2.2517311573028564,
0.22629889845848083,
-1.2282918691635132,
-0.49292105436325073,
0.9602181911468506,
0.34336233139038086,
-1.2280067205429077,
0.27073901891708374,
-0.47328686714172363,
1.0628409385681152,
0.530422031879425,
1.2238707542419434,
-1.594411849975586,
0.0429547019302845,
-0.1473049819469452,
0.1466631144285202,
-1.332168698310852,
-1.6531940698623657,
0.6429251432418823,
0.5263065099716187,
0.757008969783783,
-0.12307421863079071,
0.9703125357627869,
-1.0995205640792847,
0.789742112159729,
-0.9263096451759338,
-1.588282585144043,
-1.382873773574829,
-2.39943265914917,
-2.3986403942108154,
0.858527660369873,
-0.5037253499031067,
-0.4347988963127136,
2.028834104537964,
-1.0100923776626587,
-1.7589298486709595,
1.1010292768478394,
0.2883340120315552,
0.09071530401706696,
2.353738307952881,
0.2860388159751892,
-0.810593843460083,
0.5001170039176941,
-0.6381667256355286,
0.814365565776825,
-0.20569419860839844,
1.264512062072754,
0.47604459524154663,
-1.038347840309143,
1.6648739576339722,
-0.4315667450428009,
0.6186067461967468,
-0.593528687953949,
-0.5419360995292664,
-0.8404579162597656,
0.25202468037605286,
1.8426628112792969,
-0.3255394399166107,
1.6632198095321655,
-0.2998514771461487,
-1.562644124031067,
-1.6141773462295532,
0.8119752407073975,
0.4489651322364807,
-0.9345862865447998,
0.08552471548318863,
-0.4641110301017761,
0.14784474670886993,
-0.01873607747256756,
1.1854678392410278,
1.1483186483383179,
0.6640084385871887,
-0.28098341822624207,
-0.8409351706504822,
0.28723564743995667,
-0.11918924748897552,
-0.679766833782196,
-1.8442440032958984,
-0.32207146286964417,
0.22138598561286926,
0.7125968337059021,
-1.1941932439804077,
1.7894726991653442,
0.913168728351593,
1.9952205419540405,
0.9905842542648315,
-0.4091247022151947,
1.4410035610198975,
-0.01587948203086853,
1.8264639377593994,
-0.42285674810409546,
0.5689679980278015,
-0.3350716233253479,
-1.266476035118103,
0.8037241101264954,
-0.35596516728401184,
-1.9836645126342773,
-0.8579992055892944,
-0.8412933945655823,
-0.12460404634475708,
-0.6970422267913818,
0.846856415271759,
-0.31958258152008057,
-1.4968289136886597,
0.10564867407083511,
-0.661194920539856,
0.21175771951675415,
-1.2476750612258911,
0.18820051848888397,
0.7621810436248779,
-0.772163987159729,
-0.13202224671840668,
-0.27387574315071106,
-1.3194729089736938,
-0.5038195848464966,
0.25116977095603943,
1.9768811464309692,
-0.6578606963157654,
0.8904896974563599,
1.0397851467132568,
-0.719054639339447,
0.07682493329048157,
0.2050761878490448,
-0.31430545449256897,
0.8332711458206177,
-1.1105296611785889,
-0.48340967297554016,
1.1641740798950195,
-0.21654896438121796,
-0.7400853633880615,
1.4561644792556763,
0.7846801280975342,
-1.2191526889801025,
-0.25498804450035095,
-0.21340596675872803,
-0.8477485179901123,
-0.028953853994607925,
-1.4969981908798218,
-0.23140543699264526,
0.44512826204299927,
-1.4787545204162598,
-0.33039015531539917,
-0.17216990888118744,
1.3528647422790527,
-0.2255622297525406,
1.4683260917663574,
-0.3601333200931549,
-0.2102852314710617,
-0.31129857897758484,
-0.4802989065647125,
0.25057366490364075,
-0.12998737394809723,
-0.6176050305366516,
0.24563004076480865,
-0.7933650016784668,
0.3070911467075348,
1.414900541305542,
0.30339011549949646,
0.054060135036706924,
0.5053955912590027,
1.1045258045196533,
0.38601765036582947,
0.0050506070256233215,
-0.8497845530509949,
-1.5673028230667114,
1.9178259372711182,
-1.4101719856262207,
1.8504021167755127,
0.7020025849342346,
-0.13081011176109314,
-1.8386809825897217,
-1.8395769596099854,
1.2766073942184448,
1.179831862449646,
2.3285698890686035,
0.5174708962440491,
0.4130423069000244,
-0.7305811643600464,
-0.8305051922798157,
0.31576839089393616,
-0.8648998141288757,
-0.6825198531150818,
0.18598604202270508,
2.3152430057525635,
1.8483006954193115,
-0.5766725540161133,
-0.26879751682281494,
-0.8359520435333252,
1.2617255449295044,
-0.2703877091407776,
0.23460376262664795,
2.107736110687256,
-0.36152181029319763,
-1.1021536588668823,
1.421539306640625,
-2.385988235473633,
0.29311278462409973,
2.0934908390045166,
0.24905316531658173,
0.06864851713180542,
-1.4450498819351196,
-0.601773202419281,
-0.30889832973480225,
-0.4640824794769287,
-1.3202844858169556,
0.5486036539077759,
-0.29248031973838806,
-0.8323423862457275,
-1.4035643339157104,
0.06291790306568146,
-1.1570701599121094,
-1.7565491199493408,
0.3116321563720703,
1.9129263162612915,
2.1146857738494873,
-0.761512041091919,
1.3509242534637451,
-0.2599932551383972,
0.1280907839536667,
1.258929967880249,
1.339234471321106,
3.1068334579467773,
1.8670132160186768,
-1.3073066473007202,
0.796622097492218,
-0.1665503829717636,
-0.4767680764198303,
1.1349663734436035,
-1.1606996059417725,
1.0822066068649292,
-0.18167781829833984,
-1.3067430257797241,
-1.2101507186889648,
1.0480817556381226,
0.4914852976799011,
-0.0215618759393692,
-0.562065601348877,
1.3196765184402466,
0.04908617585897446,
1.3795015811920166,
0.5702036619186401,
-0.4239925146102905,
0.497847318649292,
-0.4156814515590668,
-0.6098982095718384,
1.634723424911499,
0.13168804347515106,
-1.5549356937408447,
-2.3122668266296387,
-0.2682173252105713,
-0.9823127388954163,
-0.05117199569940567,
-0.6389162540435791,
-1.0140374898910522,
1.5449851751327515,
0.43973010778427124,
-1.1615673303604126,
-0.28704383969306946,
-0.3120217025279999,
-0.5217107534408569,
2.688788414001465,
-1.2903977632522583,
-0.12814217805862427,
-1.0299919843673706,
-0.5440471768379211,
1.6428505182266235,
-1.1666847467422485,
-0.22144238650798798,
-0.9914443492889404,
-0.708356499671936,
-1.3804041147232056,
-0.46068012714385986,
0.043519165366888046,
-0.9646852016448975,
0.7944387793540955,
0.12341678142547607,
-1.0196630954742432,
-0.2746274173259735,
-0.8495060205459595,
1.028591275215149,
-0.1075604110956192,
0.19375105202198029,
1.8532370328903198,
0.30799296498298645,
-0.4419127404689789,
0.6504964828491211,
1.2449731826782227,
0.6898334622383118,
-0.6877917647361755,
0.018857091665267944,
-0.7628566026687622,
0.38047948479652405,
-1.434938669204712,
0.20208972692489624,
-2.978189706802368,
0.8109714984893799,
-0.14976978302001953,
-0.12695570290088654,
-0.08391592651605606,
-1.287856101989746,
0.9733098745346069,
2.606112241744995,
-1.1804929971694946,
0.44420763850212097,
0.47211161255836487,
1.0669573545455933,
-1.6127113103866577,
0.19115588068962097,
-0.5336518883705139,
2.016507387161255,
0.09938562661409378,
1.1594690084457397,
-0.45509791374206543,
-2.1524040699005127,
0.6299307942390442,
-1.2820996046066284,
-0.9831259846687317,
0.8550712466239929,
-0.9054377675056458,
0.29297277331352234,
-1.4286494255065918,
-0.0691942572593689,
-0.9420384168624878,
-1.2693661451339722,
0.788449764251709,
0.08473407477140427,
0.43270358443260193,
-0.5390176177024841,
0.3795355558395386,
-2.150324583053589,
-1.4220839738845825,
-0.1452999860048294,
-1.1265077590942383,
0.5638575553894043,
-0.3885619044303894,
0.6470887064933777,
-0.03674059361219406,
0.16927117109298706,
0.32519054412841797,
1.4678192138671875,
3.444727897644043,
0.1321547031402588,
0.18762421607971191,
-0.13376644253730774,
-1.0447971820831299,
1.4126830101013184,
0.9147182703018188,
-0.09052877128124237,
-0.5627944469451904,
-1.0534433126449585,
1.347525715827942,
1.9662166833877563,
1.1570611000061035,
0.1851470172405243,
-0.8806520700454712,
-0.6512149572372437,
0.03312259912490845,
0.29661014676094055,
0.5790323615074158,
0.8936268091201782,
-0.06741674989461899,
0.1305151730775833,
1.3206539154052734,
1.1528816223144531,
-0.24756355583667755,
0.3609978258609772,
-0.9028619527816772,
-0.46278202533721924,
0.47416263818740845,
0.1934269219636917,
0.14881743490695953,
0.5461220741271973,
-1.0378817319869995,
-0.23799076676368713,
-0.2940818965435028,
-0.8985171318054199,
-0.7660701870918274,
-0.38157880306243896,
-0.37467896938323975,
1.5303113460540771,
-0.048185959458351135,
-0.5312338471412659,
0.08550908416509628,
-0.6591504812240601,
-0.15651603043079376,
-1.074044108390808,
0.09149320423603058,
-0.06353559345006943,
-0.15969596803188324,
-0.17501439154148102,
1.5289666652679443,
-0.9201841950416565,
-2.0957908630371094,
0.12221188843250275,
0.35209810733795166,
-0.240303635597229,
0.11529384553432465,
1.6896389722824097,
0.4521061182022095,
1.386250376701355,
1.276077389717102,
0.9538915157318115,
-0.6387069225311279,
-1.2641788721084595,
0.7052298188209534,
0.9824349284172058,
-1.34345543384552,
0.947381854057312,
-0.2847311496734619,
-0.5385894179344177,
0.6702783107757568,
1.379651665687561,
0.42852360010147095,
-1.9794715642929077,
0.9587829113006592,
-1.0205351114273071,
0.7202048301696777,
0.678691565990448,
0.8345026969909668,
0.2314324975013733,
0.8949355483055115,
-1.196433424949646,
-1.1394051313400269,
-0.6718299388885498,
-0.6142860651016235,
1.8623780012130737,
-0.20643621683120728,
0.5756995677947998,
-0.17382274568080902,
-1.1934541463851929,
-0.07659295201301575,
0.8304742574691772,
0.3827156126499176,
-0.3956010341644287,
0.8871088027954102,
-0.7148036360740662,
-0.940241813659668,
-1.2848509550094604,
-0.38479381799697876,
-1.0377496480941772,
-0.8902515769004822,
1.141271710395813,
0.802823543548584,
0.37744390964508057,
1.9118818044662476,
0.5683989524841309,
0.3169171214103699,
-2.586209297180176,
0.8288478851318359,
0.2905315160751343,
-0.06929533183574677,
0.8398928046226501,
0.2510015666484833,
1.1295219659805298,
-0.015196624211966991,
0.6182559132575989,
-2.3526575565338135,
2.233515739440918,
-0.17758780717849731,
0.6277490258216858,
0.046914197504520416,
-0.2118142992258072,
1.092293381690979,
0.6557530760765076,
0.568942666053772,
-1.0809588432312012,
0.7855256199836731,
-0.48740285634994507,
1.1132622957229614,
0.9885170459747314,
-0.9086240530014038,
0.06241248920559883,
1.3944284915924072,
0.5083147883415222,
-0.4204527735710144,
-0.9934670329093933,
-0.8587023019790649,
0.9665196537971497,
1.6899597644805908,
-0.07334873080253601,
-0.0508892685174942,
0.9020689725875854,
0.7140189409255981,
-1.1967569589614868,
0.08677276968955994,
-0.6827165484428406,
-0.7318115830421448,
1.7148576974868774,
2.0038185119628906,
-0.1096784844994545,
-0.17487555742263794,
-0.7661908864974976,
-1.2036277055740356,
0.777826726436615,
-0.12328311800956726,
-0.003365573938935995,
0.7165648937225342,
-0.7317988276481628,
1.0978487730026245,
0.6774446964263916,
0.9227578043937683,
0.024407926946878433,
0.23419013619422913,
0.35499465465545654,
-0.31840190291404724,
-1.1618198156356812,
-0.2840747833251953,
-1.0193448066711426,
-2.625810384750366,
0.32756590843200684,
-0.287475049495697,
-1.4594528675079346,
0.011762858368456364,
-0.9910016655921936,
0.8968880772590637,
-0.5683942437171936,
-1.1104657649993896,
-1.4079091548919678,
0.36045554280281067,
-0.10045456141233444,
0.9673855900764465,
-1.6936352252960205,
-0.2594091594219208,
1.3070884943008423,
0.8372144103050232,
-0.6004194021224976,
0.9056874513626099,
0.24223141372203827,
0.9033476710319519,
0.7649950385093689,
-0.41685131192207336,
0.5716328024864197,
0.01732020452618599,
-1.3525642156600952,
0.4474947452545166,
1.1693851947784424,
0.16348090767860413,
1.3213555812835693,
-0.45710644125938416,
0.07326710969209671,
0.41300666332244873,
-0.6020891666412354,
-0.4572550058364868,
-0.46843868494033813,
0.7158661484718323,
0.024077828973531723,
-0.9825199246406555,
-0.1314731240272522,
-0.15703760087490082,
-0.335091769695282,
0.18180325627326965,
-1.4348464012145996,
-0.267145574092865,
-0.3814661204814911,
-0.4863101840019226,
-1.3189533948898315,
-0.003666226752102375,
1.3009620904922485,
-0.8283920884132385,
-0.24765752255916595,
0.4134231507778168,
0.43561726808547974,
0.5653130412101746,
0.5827257037162781,
-0.7565640211105347,
-0.31055641174316406,
-0.32357490062713623,
-0.2684822380542755,
0.2428090125322342,
1.253335952758789,
-0.08591557294130325,
-1.002056360244751,
0.7222437262535095,
-0.3127100169658661,
0.1441313624382019,
2.026216745376587,
0.11406634002923965,
-0.7166386842727661,
0.37259766459465027,
-0.7536458969116211,
1.7303431034088135,
1.778723955154419,
1.2921931743621826,
-0.11949938535690308,
-0.8159643411636353,
0.6201895475387573,
-0.3182527720928192,
-0.3511117994785309,
0.9990594387054443,
0.4116639196872711,
-0.2432543784379959,
-1.49563729763031,
0.6805077791213989,
1.2446340322494507,
-0.6823343634605408,
-0.7270852327346802,
0.05414971336722374,
-0.910648763179779,
1.1723997592926025,
0.6110594868659973,
0.34130239486694336,
0.2752811908721924,
1.5497958660125732,
0.7786909341812134,
-0.48821166157722473,
0.47064369916915894,
0.5821510553359985,
-0.24632801115512848,
-2.119805097579956,
-1.003017544746399,
0.3149092197418213,
-0.41323432326316833,
-1.6460992097854614,
1.3843413591384888,
-1.1406530141830444,
-0.9957028031349182,
0.5891589522361755,
0.06407222896814346,
1.239454984664917,
0.3412471115589142,
1.786080002784729,
2.086014986038208,
0.8961264491081238,
0.3546796143054962,
1.2703334093093872,
-0.05513843894004822,
-0.39855220913887024,
1.7783844470977783,
-0.4032788872718811,
0.5202489495277405,
1.0438737869262695,
-0.37393540143966675,
-1.0443116426467896,
-0.7985360026359558,
-1.1616253852844238,
-0.6087805032730103,
1.086099624633789,
0.15754592418670654,
-1.0503281354904175,
0.20249637961387634,
1.5751503705978394,
0.17232121527194977,
-0.2111845314502716,
0.6630577445030212,
0.39095205068588257,
-0.7302890419960022,
-0.0917445495724678,
-0.8800901770591736,
0.5151618719100952,
-0.11369440704584122,
-0.22129762172698975,
0.2654707431793213,
0.5686886310577393,
1.408815622329712,
0.001568448729813099,
0.150181844830513,
1.1390252113342285,
-1.3792074918746948,
1.4943821430206299,
-0.6373240351676941,
0.33148160576820374,
-2.515563488006592,
1.3606008291244507,
-0.7396628856658936,
2.0213119983673096,
-2.5151450634002686,
0.4533928632736206,
-0.5637930631637573,
-0.5107551217079163,
0.31701213121414185,
-0.4336085021495819,
0.14190733432769775,
-0.12492553144693375,
-0.960670530796051,
-0.036407992243766785,
-0.7696349620819092,
0.6317809820175171,
1.1931111812591553,
1.3630130290985107,
-1.1611374616622925,
-0.3459845781326294,
-1.6373775005340576,
-0.23814719915390015,
-0.7144688367843628,
0.3192313015460968,
-1.9163659811019897,
-0.2234000861644745,
-2.042569875717163,
-2.4504823684692383,
-1.3939142227172852,
-0.8185921311378479,
1.1614046096801758,
0.20666839182376862,
-1.0211585760116577,
1.1680529117584229,
-0.4146575331687927,
-1.8076328039169312,
1.1488739252090454,
-2.170182228088379
] |
https://github.com/huggingface/datasets/issues/6020 | Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs | This scenario currently requires explicitly passing the target features (to avoid the error):
```python
import datasets
...
features = dataset.features
features["output"] = = [{"test": datasets.Value("int64")}]
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32, features=features)
``` | ### Describe the bug
I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, but there is an edge case that crops up when using multiprocessing. In some cases, an empty list result ends up in a dataset shard consisting of a single item. This results in a `The features can't be aligned` error that is difficult to debug because it depends on the number of processes/shards used.
I've reproduced a minimal example below. My current workaround is to fill empty results with a dummy value that I filter after, but this was a weird error that took a while to track down.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_list([{'idx':i} for i in range(60)])
def test_func(row, idx):
if idx==58:
return {'output': []}
else:
return {'output' : [{'test':1}, {'test':2}]}
# this works fine
test1 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=4)
# this fails
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32)
>ValueError: The features can't be aligned because the key output of features {'idx': Value(dtype='int64', id=None), 'output': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None)} has unexpected type - Sequence(feature=Value(dtype='null', id=None), length=-1, id=None) (expected either [{'test': Value(dtype='int64', id=None)}] or Value("null").
```
The error occurs during the check
```python
_check_if_features_can_be_aligned([dset.features for dset in dsets])
```
When the multiprocessing splitting lines up just right with the empty return value, one of the `dset` in `dsets` will have a single item with an empty list value, causing the error.
### Expected behavior
Expected behavior is the result would be the same regardless of the `num_proc` value used.
### Environment info
Datasets version 2.11.0
Python 3.9.16 | 67 | 36 | Inconsistent "The features can't be aligned" error when combining map, multiprocessing, and variable length outputs
### Describe the bug
I'm using a dataset with map and multiprocessing to run a function that returned a variable length list of outputs. This output list may be empty. Normally this is handled fine, but there is an edge case that crops up when using multiprocessing. In some cases, an empty list result ends up in a dataset shard consisting of a single item. This results in a `The features can't be aligned` error that is difficult to debug because it depends on the number of processes/shards used.
I've reproduced a minimal example below. My current workaround is to fill empty results with a dummy value that I filter after, but this was a weird error that took a while to track down.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_list([{'idx':i} for i in range(60)])
def test_func(row, idx):
if idx==58:
return {'output': []}
else:
return {'output' : [{'test':1}, {'test':2}]}
# this works fine
test1 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=4)
# this fails
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32)
>ValueError: The features can't be aligned because the key output of features {'idx': Value(dtype='int64', id=None), 'output': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None)} has unexpected type - Sequence(feature=Value(dtype='null', id=None), length=-1, id=None) (expected either [{'test': Value(dtype='int64', id=None)}] or Value("null").
```
The error occurs during the check
```python
_check_if_features_can_be_aligned([dset.features for dset in dsets])
```
When the multiprocessing splitting lines up just right with the empty return value, one of the `dset` in `dsets` will have a single item with an empty list value, causing the error.
### Expected behavior
Expected behavior is the result would be the same regardless of the `num_proc` value used.
### Environment info
Datasets version 2.11.0
Python 3.9.16
This scenario currently requires explicitly passing the target features (to avoid the error):
```python
import datasets
...
features = dataset.features
features["output"] = = [{"test": datasets.Value("int64")}]
test2 = dataset.map(lambda row, idx: test_func(row, idx), with_indices=True, num_proc=32, features=features)
``` | [
-1.2154974937438965,
-1.0155515670776367,
-0.7719004154205322,
1.5813425779342651,
-0.2697145640850067,
-1.105621576309204,
0.07095621526241302,
-1.0311253070831299,
1.575103759765625,
-0.7578650116920471,
0.27627527713775635,
-1.6430742740631104,
0.032659441232681274,
-0.7017241716384888,
-0.7221738696098328,
-0.829932451248169,
-0.3410937190055847,
-0.7434271574020386,
1.1441789865493774,
2.513798952102661,
1.1701115369796753,
-1.5086345672607422,
2.7045845985412598,
0.8395006060600281,
-0.20066268742084503,
-1.0257850885391235,
0.575857937335968,
-0.049216173589229584,
-1.219749093055725,
-0.48988690972328186,
-0.8314977288246155,
-0.13299092650413513,
-0.5103568434715271,
-0.48777350783348083,
-0.14977556467056274,
0.4785570204257965,
-0.23037105798721313,
-0.45333942770957947,
-0.5244424343109131,
-0.7560302019119263,
0.49802055954933167,
-0.4413766860961914,
0.8314049243927002,
-0.2580775022506714,
1.8134530782699585,
-0.445891797542572,
0.3233128488063812,
0.6155476570129395,
1.39305579662323,
0.26910531520843506,
-0.02318612113595009,
0.4553978443145752,
0.3642862141132355,
-0.12849588692188263,
0.5142344236373901,
1.1581043004989624,
0.7642658948898315,
0.40027543902397156,
0.8368394374847412,
-2.2460198402404785,
1.2492138147354126,
-1.1528394222259521,
0.4711780250072479,
1.299846887588501,
-1.0073422193527222,
0.49302515387535095,
-1.710038661956787,
-0.049464523792266846,
0.5917004942893982,
-2.1614227294921875,
0.2982073724269867,
-1.217516541481018,
-0.4773542582988739,
0.9192568063735962,
0.3177221119403839,
-1.2479833364486694,
0.12475746124982834,
-0.40014833211898804,
1.0555599927902222,
0.3493676483631134,
1.0371655225753784,
-1.6723769903182983,
-0.01490790955722332,
-0.3190978169441223,
0.13387688994407654,
-1.3519915342330933,
-1.4989252090454102,
0.5357582569122314,
0.5787345767021179,
0.595046877861023,
-0.16236570477485657,
1.0141112804412842,
-1.0343867540359497,
0.6389740109443665,
-1.0324468612670898,
-1.6781584024429321,
-1.473115086555481,
-2.3359665870666504,
-2.1523680686950684,
0.7195543050765991,
-0.4256698191165924,
-0.6153865456581116,
2.0007035732269287,
-0.9160976409912109,
-1.7507215738296509,
1.2345362901687622,
0.3577023446559906,
-0.007090277969837189,
2.467632532119751,
0.12750506401062012,
-0.8080241084098816,
0.4918260872364044,
-0.826704740524292,
0.7417399883270264,
-0.4669492840766907,
1.4919675588607788,
0.3784925639629364,
-0.891698956489563,
1.6299691200256348,
-0.40578991174697876,
0.49979159235954285,
-0.6646618247032166,
-0.5054160952568054,
-0.7833070158958435,
0.3302669823169708,
1.8874499797821045,
-0.23503746092319489,
1.5140043497085571,
-0.41696998476982117,
-1.5338714122772217,
-1.6091355085372925,
0.9353522658348083,
0.4339887797832489,
-0.8441329002380371,
0.22739587724208832,
-0.4200280010700226,
0.13788841664791107,
-0.05616980046033859,
1.129433512687683,
1.289350152015686,
0.5866362452507019,
-0.24294883012771606,
-0.9021213054656982,
0.18528835475444794,
-0.1758144497871399,
-0.6334028244018555,
-1.7914999723434448,
-0.27954724431037903,
0.07340099662542343,
0.6761338114738464,
-1.2261043787002563,
1.6759512424468994,
0.9405801296234131,
1.8570297956466675,
1.0491963624954224,
-0.39145997166633606,
1.4859391450881958,
0.1236974373459816,
1.787238359451294,
-0.5866425037384033,
0.6916550397872925,
-0.43282681703567505,
-1.1207035779953003,
0.8999853730201721,
-0.26325738430023193,
-2.038550615310669,
-0.6812252402305603,
-0.8014198541641235,
-0.23098011314868927,
-0.8624350428581238,
0.8650243282318115,
-0.33913618326187134,
-1.3990310430526733,
0.34799301624298096,
-0.7998445630073547,
0.2831079661846161,
-1.140027642250061,
0.3928501009941101,
0.7013739943504333,
-0.5058653950691223,
0.10549347847700119,
-0.2566307783126831,
-1.22171151638031,
-0.4972180128097534,
0.39645814895629883,
1.8369778394699097,
-0.8193838596343994,
0.7500740885734558,
1.0955053567886353,
-0.59925776720047,
-0.0007714768871665001,
0.38432905077934265,
-0.2189418524503708,
0.8042309284210205,
-0.9876968860626221,
-0.6123589277267456,
1.143858551979065,
-0.20212343335151672,
-0.5307759642601013,
1.4292564392089844,
0.7998777031898499,
-0.9374944567680359,
-0.18022450804710388,
-0.12793594598770142,
-0.8859283924102783,
-0.008173980750143528,
-1.6373764276504517,
-0.15217642486095428,
0.4717411398887634,
-1.590235710144043,
-0.5228370428085327,
-0.24839212000370026,
1.2581517696380615,
-0.13744209706783295,
1.4005546569824219,
-0.4305286705493927,
-0.14241185784339905,
-0.271373450756073,
-0.3974546492099762,
0.13998951017856598,
-0.26511839032173157,
-0.6105130314826965,
0.165286123752594,
-0.8516908288002014,
0.3951922655105591,
1.4460771083831787,
0.38517096638679504,
0.07594699412584305,
0.578227698802948,
1.1711480617523193,
0.442126601934433,
-0.00037291087210178375,
-0.8085386157035828,
-1.4454292058944702,
2.0049521923065186,
-1.5470716953277588,
2.0773367881774902,
0.775227427482605,
0.06134247034788132,
-1.7278803586959839,
-1.8143056631088257,
1.3936558961868286,
1.2255916595458984,
2.295114040374756,
0.6059349775314331,
0.39605939388275146,
-0.8961455821990967,
-0.6445065140724182,
0.1704285442829132,
-1.0053366422653198,
-0.7981243133544922,
0.12106958776712418,
2.48427677154541,
1.851726770401001,
-0.42019373178482056,
-0.17192161083221436,
-1.0252283811569214,
1.5216450691223145,
-0.20416775345802307,
0.20633959770202637,
2.0280911922454834,
-0.13291631639003754,
-1.112393856048584,
1.2052419185638428,
-2.553988456726074,
0.14426013827323914,
1.9560832977294922,
0.3500673174858093,
0.17624886333942413,
-1.3491026163101196,
-0.6801417469978333,
-0.23673754930496216,
-0.4334673285484314,
-1.2683714628219604,
0.45504865050315857,
-0.2740046977996826,
-0.7392436861991882,
-1.4884356260299683,
0.19730931520462036,
-1.1491377353668213,
-1.605722188949585,
0.26174214482307434,
1.8640567064285278,
2.1457343101501465,
-0.773204505443573,
1.689629077911377,
-0.21885475516319275,
0.23940517008304596,
1.2355682849884033,
1.2449065446853638,
3.041914939880371,
1.9085243940353394,
-1.2728524208068848,
0.48033884167671204,
-0.15269194543361664,
-0.4621991813182831,
1.117430329322815,
-1.210911512374878,
1.1967965364456177,
-0.10988293588161469,
-1.1790791749954224,
-1.201751470565796,
0.8582460284233093,
0.48678088188171387,
0.024602914229035378,
-0.4743339717388153,
1.1186679601669312,
0.014466939494013786,
1.3385405540466309,
0.6465312838554382,
-0.24401049315929413,
0.4709433913230896,
-0.3615633547306061,
-0.5294145345687866,
1.5746268033981323,
0.15590523183345795,
-1.402625560760498,
-2.1924526691436768,
-0.17360055446624756,
-0.7606813907623291,
0.006515588611364365,
-0.6164516806602478,
-1.0253366231918335,
1.5803213119506836,
0.29215097427368164,
-1.167995572090149,
-0.19616705179214478,
-0.3255031406879425,
-0.5727044939994812,
2.6789002418518066,
-1.4132651090621948,
-0.403638631105423,
-0.9986389875411987,
-0.6834922432899475,
1.6533747911453247,
-1.132564663887024,
-0.18086634576320648,
-1.0462241172790527,
-0.5573846101760864,
-1.2764959335327148,
-0.5553333163261414,
-0.1055501401424408,
-0.8416897654533386,
0.8320829272270203,
0.2795937955379486,
-1.1804863214492798,
-0.37121379375457764,
-0.8686654567718506,
0.8811264038085938,
-0.1819329708814621,
0.17541061341762543,
1.8362555503845215,
0.3857760429382324,
-0.3582570552825928,
0.9029276967048645,
1.1508674621582031,
0.6000826358795166,
-0.5967921018600464,
0.2511356472969055,
-0.5560219287872314,
0.37078654766082764,
-1.2962037324905396,
0.29291900992393494,
-2.824470281600952,
0.5912837982177734,
0.060745321214199066,
-0.025094538927078247,
-0.00516195222735405,
-1.366363525390625,
1.1391122341156006,
2.5572657585144043,
-1.168274164199829,
0.5784783959388733,
0.3212747871875763,
1.3346987962722778,
-1.7571734189987183,
0.31798362731933594,
-0.38621243834495544,
2.1848843097686768,
0.22904296219348907,
1.2127808332443237,
-0.4738571345806122,
-2.495424747467041,
0.48196735978126526,
-1.314060091972351,
-1.068548560142517,
0.5928630232810974,
-0.9016053080558777,
0.09176850318908691,
-1.5948290824890137,
-0.24247200787067413,
-0.8815320730209351,
-1.1318563222885132,
0.7400919795036316,
0.20211182534694672,
0.30598512291908264,
-0.5930858850479126,
0.34343773126602173,
-2.2148337364196777,
-1.36850905418396,
-0.21107082068920135,
-0.8925828337669373,
0.4894099533557892,
-0.38478341698646545,
0.7488605380058289,
-0.13766175508499146,
-0.13398176431655884,
0.2843858003616333,
1.448785662651062,
3.3177905082702637,
0.25417929887771606,
0.4701804518699646,
-0.21375419199466705,
-0.8687915205955505,
1.4273971319198608,
0.8135818839073181,
-0.21110430359840393,
-0.49906519055366516,
-1.117302656173706,
1.3816736936569214,
1.8846359252929688,
1.0196629762649536,
-0.008670506998896599,
-0.7393372654914856,
-0.6752050518989563,
-0.09235063940286636,
0.2865569591522217,
0.441261887550354,
0.8999153971672058,
-0.04644419252872467,
0.031229985877871513,
1.4371321201324463,
1.2053940296173096,
-0.5400707721710205,
0.3527609705924988,
-0.8819666504859924,
-0.4868779182434082,
0.42125773429870605,
0.22656826674938202,
-0.0712522342801094,
0.3530084788799286,
-1.0216684341430664,
-0.28477853536605835,
-0.2807556092739105,
-0.8651869297027588,
-0.6642746329307556,
-0.41444242000579834,
-0.3491356372833252,
1.6237890720367432,
0.23791158199310303,
-0.6550576090812683,
-0.10315602272748947,
-0.7497588992118835,
-0.16683954000473022,
-1.1018933057785034,
0.1750173717737198,
-0.08734634518623352,
-0.1383008360862732,
-0.13680507242679596,
1.7573678493499756,
-0.8352052569389343,
-2.1862900257110596,
0.19118143618106842,
0.31004956364631653,
-0.17709067463874817,
0.27926406264305115,
1.6839228868484497,
0.5226816534996033,
1.4060883522033691,
1.371728539466858,
0.9878880977630615,
-0.7023422122001648,
-1.3944532871246338,
0.7444838285446167,
1.0877047777175903,
-1.311096429824829,
0.7703202962875366,
-0.005081656854599714,
-0.525773823261261,
0.5827395915985107,
1.2940092086791992,
0.5408028364181519,
-2.100116014480591,
0.828387439250946,
-1.0690503120422363,
0.8731182217597961,
0.7723141312599182,
0.6070829629898071,
0.2911232113838196,
0.8240723013877869,
-1.3143627643585205,
-1.0596528053283691,
-0.8335441946983337,
-0.7383475303649902,
1.9706181287765503,
-0.27912411093711853,
0.6512379050254822,
-0.15887916088104248,
-1.3785344362258911,
-0.05830211937427521,
0.6564290523529053,
0.23395000398159027,
-0.5453152060508728,
0.7780166864395142,
-0.7155704498291016,
-1.2377206087112427,
-1.3280396461486816,
-0.42672449350357056,
-0.9627851247787476,
-0.9518918991088867,
1.117222785949707,
0.8259527087211609,
0.15488260984420776,
1.8906997442245483,
0.6900195479393005,
0.11586131900548935,
-2.519467830657959,
0.9115036129951477,
0.2931239604949951,
-0.10802515596151352,
0.7388105392456055,
0.39366674423217773,
0.9594780206680298,
0.11109277606010437,
0.6156469583511353,
-2.4718658924102783,
2.3056869506835938,
-0.1662113517522812,
0.8397166728973389,
-0.011290180496871471,
-0.09106865525245667,
1.0762914419174194,
0.5953649878501892,
0.5384557247161865,
-0.9173426628112793,
0.5772526264190674,
-0.5710347890853882,
1.2932897806167603,
0.9602936506271362,
-0.7837281227111816,
-0.013306736014783382,
1.2605441808700562,
0.3236714005470276,
-0.6851929426193237,
-0.9711635708808899,
-0.8676588535308838,
0.8914688229560852,
1.705757737159729,
-0.03193240612745285,
0.03259005397558212,
0.8102703094482422,
0.6429158449172974,
-1.2816452980041504,
0.02288432978093624,
-0.6660029888153076,
-0.6956884860992432,
1.7237836122512817,
2.048226833343506,
-0.3550782799720764,
-0.10859326273202896,
-0.6513990163803101,
-1.3763874769210815,
0.7813025116920471,
-0.0628143921494484,
0.16134871542453766,
0.6876489520072937,
-0.6358206868171692,
1.0008240938186646,
0.9007021188735962,
0.8375520706176758,
0.25730323791503906,
0.22116558253765106,
0.40418416261672974,
-0.37716877460479736,
-1.029770851135254,
-0.21589377522468567,
-1.2234803438186646,
-2.466742992401123,
0.37091025710105896,
-0.10628104954957962,
-1.285032033920288,
0.05872449278831482,
-0.9979928135871887,
1.056885004043579,
-0.6149312853813171,
-1.0757399797439575,
-1.4778146743774414,
0.1971297711133957,
-0.03796008974313736,
0.8610674738883972,
-1.7009303569793701,
-0.09924855828285217,
1.200089693069458,
0.8731177449226379,
-0.6782081127166748,
1.049630045890808,
0.2810162305831909,
1.1521015167236328,
0.828482449054718,
-0.374906986951828,
0.5166182518005371,
-0.019914019852876663,
-1.3357641696929932,
0.4935544431209564,
1.1688507795333862,
0.08310403674840927,
1.4953882694244385,
-0.5371402502059937,
-0.05971524864435196,
0.39764562249183655,
-0.554656982421875,
-0.43083471059799194,
-0.5072972178459167,
0.589591383934021,
0.05583491176366806,
-0.808595597743988,
-0.04732205718755722,
0.03307186812162399,
-0.26641422510147095,
0.13917414844036102,
-1.5034970045089722,
-0.1552771031856537,
-0.42110171914100647,
-0.5808219313621521,
-1.2244915962219238,
-0.20316599309444427,
1.4291305541992188,
-0.6667711734771729,
-0.24716731905937195,
0.5256480574607849,
0.3819170594215393,
0.4976066052913666,
0.6588174104690552,
-0.6578406095504761,
-0.36350804567337036,
-0.08229916542768478,
-0.3196682631969452,
0.3206760883331299,
1.3769783973693848,
-0.15854713320732117,
-0.929919421672821,
0.7006142735481262,
-0.3421122133731842,
0.0690540298819542,
1.8085887432098389,
-0.002156936563551426,
-0.8539590835571289,
0.24694228172302246,
-0.7755637168884277,
2.0113744735717773,
1.6646286249160767,
1.3445439338684082,
-0.27836495637893677,
-0.8721076846122742,
0.6893978714942932,
-0.35679176449775696,
-0.4540494680404663,
0.7595651149749756,
0.4507175385951996,
-0.22530797123908997,
-1.458662748336792,
0.7391330003738403,
1.2802734375,
-0.8349486589431763,
-0.8414064645767212,
0.12226512283086777,
-0.7289257049560547,
1.1568944454193115,
0.6138564944267273,
0.3272150754928589,
0.2728103995323181,
1.7283856868743896,
0.7667842507362366,
-0.5009171366691589,
0.5678573250770569,
0.5448359847068787,
-0.14565664529800415,
-2.130950689315796,
-1.2101565599441528,
0.26729777455329895,
-0.508915364742279,
-1.6420354843139648,
1.2738224267959595,
-1.140212893486023,
-0.88697749376297,
0.6165763735771179,
0.08481164276599884,
1.3739651441574097,
0.34723469614982605,
1.4463746547698975,
1.9987924098968506,
0.7350170612335205,
0.473501980304718,
1.2421749830245972,
-0.22023437917232513,
-0.4610063135623932,
1.76410973072052,
-0.3198254108428955,
0.5018622279167175,
1.0982439517974854,
-0.23801754415035248,
-1.1713945865631104,
-0.7101520299911499,
-1.3421489000320435,
-0.7090741395950317,
1.2168718576431274,
0.13273632526397705,
-1.112846851348877,
0.29932132363319397,
1.5708550214767456,
-0.017203882336616516,
-0.47161003947257996,
0.574307918548584,
0.46141374111175537,
-0.8675869107246399,
-0.067066490650177,
-0.9414269924163818,
0.5135764479637146,
-0.19221551716327667,
-0.3582015931606293,
0.42101240158081055,
0.474575936794281,
1.2982286214828491,
0.058991000056266785,
0.19576777517795563,
1.08315110206604,
-1.4298558235168457,
1.5040534734725952,
-0.7468268871307373,
0.32027608156204224,
-2.30560564994812,
1.4078056812286377,
-0.6993539929389954,
2.092292547225952,
-2.729835033416748,
0.4889214038848877,
-0.7175513505935669,
-0.4288136661052704,
0.3565834164619446,
-0.31693023443222046,
0.09829085320234299,
-0.08890558034181595,
-1.0992412567138672,
0.034883640706539154,
-0.6105283498764038,
0.44755545258522034,
1.1719392538070679,
1.2520158290863037,
-1.073083519935608,
-0.21704928576946259,
-1.7360117435455322,
-0.2234681099653244,
-0.7996494770050049,
0.1885308176279068,
-2.092867851257324,
-0.23790013790130615,
-1.8812947273254395,
-2.222219705581665,
-1.2063987255096436,
-0.8457397818565369,
1.1338087320327759,
0.07708996534347534,
-0.8398756980895996,
1.3477153778076172,
-0.41355153918266296,
-1.7826107740402222,
1.0721315145492554,
-2.0393407344818115
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | Hi ! The huggingface/dataset-viewer code was not maintained anymore because we switched to a new dataset viewer that is deployed available for each dataset the Hugging Face website.
What are you using this old repository for ? |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 68 | 37 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
Hi ! The huggingface/dataset-viewer code was not maintained anymore because we switched to a new dataset viewer that is deployed available for each dataset the Hugging Face website.
What are you using this old repository for ? | [
-1.341964602470398,
-0.9977413415908813,
-0.8502453565597534,
1.4040181636810303,
-0.2614966630935669,
-1.2610175609588623,
0.018810737878084183,
-1.1198129653930664,
1.6631938219070435,
-0.8157972693443298,
0.2847517132759094,
-1.750593900680542,
0.13415896892547607,
-0.486471951007843,
-0.7635666131973267,
-1.0650614500045776,
-0.4216703772544861,
-0.8459290266036987,
1.029996633529663,
2.547595739364624,
1.1551461219787598,
-1.4135597944259644,
2.6910674571990967,
0.666935384273529,
-0.07487112283706665,
-1.1069440841674805,
0.6307983994483948,
0.030374281108379364,
-1.1690016984939575,
-0.44836708903312683,
-0.9937163591384888,
-0.06904853880405426,
-0.5486106276512146,
-0.5226052403450012,
0.022036397829651833,
0.3345879018306732,
-0.17714498937129974,
-0.31856343150138855,
-0.5136541128158569,
-0.7785518169403076,
0.442731648683548,
-0.36634334921836853,
0.9140954613685608,
-0.46505987644195557,
1.9279966354370117,
-0.38503506779670715,
0.3531187176704407,
0.688921332359314,
1.3980525732040405,
0.15683455765247345,
-0.08057455718517303,
0.20044611394405365,
0.4099268317222595,
0.05297054722905159,
0.31461864709854126,
1.0132203102111816,
0.5699257850646973,
0.5311352610588074,
0.657629132270813,
-2.208735942840576,
1.3686519861221313,
-0.9761054515838623,
0.3024521470069885,
1.502437710762024,
-1.0512192249298096,
0.38601160049438477,
-1.8017553091049194,
-0.08772101998329163,
0.51398766040802,
-2.2987966537475586,
0.09447687864303589,
-1.2171237468719482,
-0.6030084490776062,
1.0165905952453613,
0.24675987660884857,
-1.273463487625122,
0.23828735947608948,
-0.42058104276657104,
1.0279799699783325,
0.5493045449256897,
1.2332879304885864,
-1.6211835145950317,
0.05379655584692955,
-0.37788665294647217,
0.05107187107205391,
-1.4294075965881348,
-1.5107378959655762,
0.6258429288864136,
0.6297506093978882,
0.5769277811050415,
-0.10301817953586578,
0.910980761051178,
-0.983573317527771,
0.8679236769676208,
-0.839246928691864,
-1.6603367328643799,
-1.4321726560592651,
-2.3431334495544434,
-2.3557753562927246,
0.79598468542099,
-0.5300728678703308,
-0.5124991536140442,
2.0399343967437744,
-1.1139185428619385,
-1.7529902458190918,
1.2819844484329224,
0.24379442632198334,
0.04315315559506416,
2.485684871673584,
0.15539513528347015,
-0.6562277674674988,
0.3711337745189667,
-0.722235918045044,
0.822317898273468,
-0.3797985315322876,
1.4880582094192505,
0.604710042476654,
-1.0022118091583252,
1.6391685009002686,
-0.4843944013118744,
0.5034160017967224,
-0.6040641069412231,
-0.5581236481666565,
-0.873391330242157,
0.4415417015552521,
1.7553220987319946,
-0.36900246143341064,
1.6183924674987793,
-0.4207972288131714,
-1.464642882347107,
-1.6465474367141724,
0.9400613307952881,
0.49739760160446167,
-0.853460967540741,
0.06095593795180321,
-0.28625020384788513,
0.02746923640370369,
-0.07020895928144455,
1.1511573791503906,
1.2197123765945435,
0.6620835661888123,
-0.3659683167934418,
-0.9136767387390137,
0.20141398906707764,
-0.09356839954853058,
-0.6300663352012634,
-1.8398241996765137,
-0.3732052147388458,
0.06013081595301628,
0.7131544351577759,
-1.106211543083191,
1.6111656427383423,
0.9883506894111633,
1.8158717155456543,
1.0437512397766113,
-0.28651198744773865,
1.4579657316207886,
0.0771002322435379,
1.8380526304244995,
-0.5868198275566101,
0.67207932472229,
-0.3352165222167969,
-1.036134958267212,
0.7570829391479492,
-0.3158855140209198,
-2.0543134212493896,
-0.878767192363739,
-0.9144445657730103,
-0.2536576986312866,
-0.7567170262336731,
0.995642900466919,
-0.40636247396469116,
-1.3646471500396729,
0.33016374707221985,
-0.5680139660835266,
0.08834925293922424,
-1.2483502626419067,
0.3723239302635193,
0.7403421401977539,
-0.6149846911430359,
-0.012148565612733364,
-0.24627527594566345,
-1.2788325548171997,
-0.5344604253768921,
0.17090977728366852,
1.8851770162582397,
-0.7758417725563049,
0.933124303817749,
0.9644212126731873,
-0.7160913944244385,
-0.025657985359430313,
0.3744363784790039,
-0.18825675547122955,
0.8813030123710632,
-0.9372588396072388,
-0.4303969740867615,
1.08057701587677,
-0.20891691744327545,
-0.6397210359573364,
1.4439336061477661,
0.7146482467651367,
-0.8688287734985352,
-0.18209518492221832,
-0.1918066442012787,
-0.837844729423523,
-0.11996063590049744,
-1.6116129159927368,
-0.22470642626285553,
0.17099611461162567,
-1.5107697248458862,
-0.5418186783790588,
-0.20620782673358917,
1.291141390800476,
-0.18999333679676056,
1.3974523544311523,
-0.41812148690223694,
-0.2656145691871643,
-0.3615918457508087,
-0.3547532856464386,
0.303850919008255,
-0.1927686184644699,
-0.6522857546806335,
0.2933618128299713,
-0.8609885573387146,
0.2948768734931946,
1.408455491065979,
0.5068444609642029,
0.0908890813589096,
0.5859457850456238,
1.0476797819137573,
0.35367703437805176,
-0.02710098959505558,
-0.9140839576721191,
-1.5696555376052856,
2.038846969604492,
-1.5318758487701416,
1.9803845882415771,
0.7568403482437134,
-0.09074142575263977,
-1.7922191619873047,
-1.8497482538223267,
1.406013011932373,
1.1238811016082764,
2.2831871509552,
0.6537898778915405,
0.34348276257514954,
-0.8978019952774048,
-0.6076586842536926,
0.35507962107658386,
-0.9792804718017578,
-0.7490710020065308,
0.04443284496665001,
2.2923672199249268,
1.727420449256897,
-0.6032885909080505,
-0.1187814325094223,
-1.0285142660140991,
1.270580530166626,
-0.12230424582958221,
0.28561607003211975,
2.0159101486206055,
-0.4351837933063507,
-1.099692702293396,
1.2804242372512817,
-2.2601521015167236,
0.03748878464102745,
2.048887014389038,
0.23897157609462738,
-0.03998522832989693,
-1.4617029428482056,
-0.5875242948532104,
-0.16877412796020508,
-0.4821668863296509,
-1.3275045156478882,
0.6038654446601868,
-0.42001429200172424,
-0.8027387261390686,
-1.520544409751892,
0.08316883444786072,
-1.2063862085342407,
-1.5655344724655151,
0.39047759771347046,
1.8182929754257202,
2.03781795501709,
-0.6284855604171753,
1.5624638795852661,
-0.26152339577674866,
0.21093852818012238,
1.263426423072815,
1.1773139238357544,
3.1120386123657227,
1.893297791481018,
-1.2665832042694092,
0.6551680564880371,
-0.12060925364494324,
-0.5593348145484924,
1.2246736288070679,
-1.053767442703247,
1.3481191396713257,
-0.15678569674491882,
-1.1780468225479126,
-1.1886696815490723,
1.0398091077804565,
0.46065643429756165,
0.10077299177646637,
-0.529624879360199,
1.233106255531311,
0.04371979460120201,
1.2597616910934448,
0.42371097207069397,
-0.36834532022476196,
0.5848373770713806,
-0.5020542144775391,
-0.592578113079071,
1.5321106910705566,
0.17214100062847137,
-1.494997501373291,
-2.251173257827759,
-0.2878832221031189,
-0.7924340963363647,
-0.030247749760746956,
-0.5582272410392761,
-1.014420986175537,
1.654026985168457,
0.4208919405937195,
-1.2498691082000732,
-0.3611777722835541,
-0.43511664867401123,
-0.7172216176986694,
2.585855722427368,
-1.3515342473983765,
-0.2783232033252716,
-0.9526405930519104,
-0.5757522583007812,
1.5931097269058228,
-1.1984697580337524,
-0.04216056317090988,
-1.0657910108566284,
-0.64971923828125,
-1.392388939857483,
-0.5091856718063354,
-0.05047458037734032,
-1.00986909866333,
0.8789130449295044,
0.19681182503700256,
-1.003691554069519,
-0.29791760444641113,
-0.7937019467353821,
0.7710167169570923,
-0.053684912621974945,
0.409745454788208,
1.9257220029830933,
0.5205537676811218,
-0.40616393089294434,
0.6591829061508179,
1.0417603254318237,
0.6466583013534546,
-0.676932692527771,
0.19638651609420776,
-0.6149304509162903,
0.2719535231590271,
-1.2482672929763794,
0.28237468004226685,
-2.933809757232666,
0.6716808080673218,
0.018459457904100418,
-0.15441320836544037,
0.035241544246673584,
-1.2445012331008911,
1.0424686670303345,
2.5770349502563477,
-1.1889995336532593,
0.4547809660434723,
0.291493684053421,
1.1564162969589233,
-1.5871375799179077,
0.34721291065216064,
-0.459229052066803,
2.1120107173919678,
0.16321896016597748,
1.0783649682998657,
-0.5638343691825867,
-2.144775152206421,
0.6389033198356628,
-1.2267160415649414,
-1.2049791812896729,
0.7179555892944336,
-0.8822935819625854,
0.09598976373672485,
-1.4692374467849731,
-0.10643140971660614,
-0.87685626745224,
-1.2960504293441772,
0.8984100818634033,
0.21124669909477234,
0.42097097635269165,
-0.6290313005447388,
0.30271509289741516,
-2.1308960914611816,
-1.3655104637145996,
-0.22858592867851257,
-0.8280336856842041,
0.4938886761665344,
-0.3477829396724701,
0.7510800957679749,
-0.17567458748817444,
0.09049440920352936,
0.37447455525398254,
1.404902696609497,
3.3820557594299316,
0.22932292520999908,
0.44061389565467834,
-0.08660848438739777,
-0.9985732436180115,
1.609893798828125,
0.9818755388259888,
-0.00771121121942997,
-0.558884859085083,
-1.049954891204834,
1.2545802593231201,
1.9138115644454956,
0.952308714389801,
0.09409978985786438,
-0.706405520439148,
-0.5029790997505188,
-0.007150148041546345,
0.24812628328800201,
0.5598260164260864,
0.9030240774154663,
-0.1041492372751236,
0.1833866387605667,
1.4790416955947876,
1.2895739078521729,
-0.46561211347579956,
0.3736385703086853,
-0.7790452837944031,
-0.4835309386253357,
0.5514262318611145,
0.3130946755409241,
-0.043946508318185806,
0.3911677896976471,
-0.9453396201133728,
-0.26248899102211,
-0.3299563229084015,
-1.135191559791565,
-0.6104304790496826,
-0.48548629879951477,
-0.43124058842658997,
1.5933172702789307,
0.13090772926807404,
-0.4645885229110718,
-0.07464681565761566,
-0.9370566010475159,
-0.18062923848628998,
-1.156222939491272,
0.27599334716796875,
-0.13118156790733337,
-0.0834132581949234,
-0.10149456560611725,
1.8321741819381714,
-0.9930554628372192,
-2.1611385345458984,
0.2308320850133896,
0.30308911204338074,
-0.33500128984451294,
0.2516162395477295,
1.4675297737121582,
0.4832616448402405,
1.4400004148483276,
1.370644211769104,
0.9133767485618591,
-0.5530334711074829,
-1.314824104309082,
0.6694004535675049,
0.9127374887466431,
-1.4461783170700073,
1.0039653778076172,
-0.033063456416130066,
-0.6021695137023926,
0.8004425764083862,
1.2331130504608154,
0.45168569684028625,
-1.9156067371368408,
0.8826375603675842,
-0.7916325330734253,
0.8273108601570129,
0.6432490348815918,
0.7744473814964294,
0.1600942313671112,
0.900509774684906,
-1.2730454206466675,
-1.1914634704589844,
-0.840617299079895,
-0.5928134322166443,
1.954626202583313,
-0.08253918588161469,
0.6202583909034729,
-0.1662304550409317,
-1.2654920816421509,
-0.1309657245874405,
0.5770173668861389,
0.3772488832473755,
-0.31019243597984314,
0.8654170036315918,
-0.6470140814781189,
-1.203105092048645,
-1.4969112873077393,
-0.37039655447006226,
-0.9171925783157349,
-0.9163358211517334,
1.1238270998001099,
0.8113486766815186,
0.20666681230068207,
1.8581115007400513,
0.5006511211395264,
0.16372348368167877,
-2.650923490524292,
0.854798436164856,
0.2503943145275116,
0.04401020333170891,
0.9022791385650635,
0.23676706850528717,
1.096089243888855,
0.02488599345088005,
0.4665384292602539,
-2.249053716659546,
2.234421730041504,
-0.3024354875087738,
0.7669937014579773,
-0.06344130635261536,
-0.17888614535331726,
1.087778925895691,
0.6057540774345398,
0.6178445816040039,
-1.0499346256256104,
0.7520841360092163,
-0.595319390296936,
1.2166378498077393,
1.1306204795837402,
-0.7173486948013306,
0.0014143073931336403,
1.3992269039154053,
0.543721616268158,
-0.4295003414154053,
-0.8631885051727295,
-0.8770368695259094,
0.8693351745605469,
1.823444128036499,
0.013247476890683174,
0.030028503388166428,
0.8224334120750427,
0.669116199016571,
-1.2562098503112793,
0.1082579642534256,
-0.7608943581581116,
-0.7210866808891296,
1.5963321924209595,
2.0531997680664062,
-0.01818280853331089,
-0.13503895699977875,
-0.6859934329986572,
-1.180468201637268,
0.7307342886924744,
-0.06208128109574318,
0.22367362678050995,
0.6756444573402405,
-0.6636672616004944,
1.132128357887268,
0.9322349429130554,
0.9279807209968567,
0.07196135818958282,
0.43218082189559937,
0.3798940181732178,
-0.19524148106575012,
-1.1151132583618164,
-0.19021794199943542,
-1.091832160949707,
-2.5122106075286865,
0.3835905194282532,
-0.3424629867076874,
-1.429490566253662,
-0.012332373298704624,
-0.9966935515403748,
0.9693496823310852,
-0.5543685555458069,
-1.1269831657409668,
-1.5422148704528809,
0.1388378143310547,
-0.03016388788819313,
0.9345229268074036,
-1.54848051071167,
-0.005461724009364843,
1.2993661165237427,
0.9079992771148682,
-0.582502007484436,
1.0503283739089966,
0.2888745963573456,
1.0843006372451782,
0.7823494672775269,
-0.4674488604068756,
0.3896158039569855,
0.0761045515537262,
-1.3683698177337646,
0.42814481258392334,
1.0735191106796265,
0.19949012994766235,
1.3538198471069336,
-0.5013457536697388,
0.07051476836204529,
0.46248841285705566,
-0.4926140010356903,
-0.4566096365451813,
-0.5077036023139954,
0.7258667349815369,
-0.02938479371368885,
-0.7922263741493225,
0.16979137063026428,
-0.11861519515514374,
-0.26312723755836487,
0.18245550990104675,
-1.4776924848556519,
-0.3298942446708679,
-0.5110131502151489,
-0.6011719703674316,
-1.388258457183838,
0.046526119112968445,
1.4321357011795044,
-0.7953751087188721,
-0.16094756126403809,
0.4541541635990143,
0.4453059136867523,
0.4999418258666992,
0.6079185605049133,
-0.590987503528595,
-0.32127973437309265,
-0.2734667658805847,
-0.3836822509765625,
0.2022213339805603,
1.2129939794540405,
-0.3191792368888855,
-0.997738778591156,
0.7678143978118896,
-0.24126404523849487,
-0.041589267551898956,
1.901050090789795,
0.11783136427402496,
-0.7909865379333496,
0.2948485016822815,
-0.5780433416366577,
1.849168300628662,
1.5906271934509277,
1.4779698848724365,
-0.18322309851646423,
-0.9077208042144775,
0.525512158870697,
-0.23631134629249573,
-0.3408028185367584,
0.9067146182060242,
0.5201069712638855,
-0.050227224826812744,
-1.3816136121749878,
0.6056457161903381,
1.259819507598877,
-0.9309039115905762,
-0.709154486656189,
0.13190673291683197,
-0.8152658343315125,
1.0270084142684937,
0.6773342490196228,
0.53980553150177,
0.238392174243927,
1.6365455389022827,
0.5840839743614197,
-0.5102263689041138,
0.46317794919013977,
0.53550124168396,
-0.13892436027526855,
-2.1481311321258545,
-1.0376224517822266,
0.31152212619781494,
-0.4515783488750458,
-1.5665546655654907,
1.2702046632766724,
-1.1952470541000366,
-0.9239033460617065,
0.4722447991371155,
0.10953907668590546,
1.5004668235778809,
0.35865840315818787,
1.6158950328826904,
2.152527332305908,
0.9053243398666382,
0.3241744637489319,
1.418926477432251,
-0.03610410541296005,
-0.3472994565963745,
1.8594768047332764,
-0.37148863077163696,
0.531272292137146,
1.1552603244781494,
-0.42844441533088684,
-1.0127489566802979,
-0.7570549249649048,
-1.0926493406295776,
-0.5838490128517151,
1.1125102043151855,
0.13589459657669067,
-1.0829100608825684,
0.12553828954696655,
1.505932092666626,
0.1327177882194519,
-0.29481106996536255,
0.5872904062271118,
0.5290364027023315,
-0.6896545886993408,
-0.08499953150749207,
-0.909642219543457,
0.479083776473999,
-0.3340921998023987,
-0.35515958070755005,
0.437045693397522,
0.4333015978336334,
1.2699849605560303,
-0.14732207357883453,
0.14587892591953278,
1.2894566059112549,
-1.3442093133926392,
1.3933236598968506,
-0.5737580060958862,
0.09430316090583801,
-2.390261173248291,
1.4792243242263794,
-0.727505624294281,
1.9462205171585083,
-2.632917881011963,
0.40993350744247437,
-0.6183040738105774,
-0.419301837682724,
0.31486019492149353,
-0.4162982702255249,
-0.0027624047361314297,
-0.1546163111925125,
-1.0481607913970947,
-0.00458807498216629,
-0.7227717041969299,
0.5171383619308472,
1.265529751777649,
1.2490242719650269,
-1.0643465518951416,
-0.34989699721336365,
-1.7653942108154297,
-0.2429303675889969,
-0.7618228793144226,
0.38722842931747437,
-2.148960828781128,
-0.27335265278816223,
-2.0068695545196533,
-2.464179039001465,
-1.3759504556655884,
-0.9289925694465637,
1.1477186679840088,
0.18331849575042725,
-0.8858994245529175,
1.1407445669174194,
-0.3318037986755371,
-1.8207285404205322,
0.9857725501060486,
-2.103809356689453
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | I think these parts are outdated:
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L126-L131
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L145-L150
To make the viewer work, the first one should be replaced with the following:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
confs = builder_cls.BUILDER_CONFIGS
```
And the second one:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
if conf:
builder_instance = builder_cls(name=conf, cache_dir=path if path_to_datasets is not None else None)
else:
builder_instance = builder_cls(cache_dir=path if path_to_datasets is not None else None)
```
But as @lhoestq suggested, it's better to use the `datasets-server` API nowadays to [fetch the rows](https://huggingface.co/docs/datasets-server/rows). |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 68 | 87 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
I think these parts are outdated:
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L126-L131
* https://github.com/huggingface/datasets-viewer/blob/8efad8eae313a891f713469983bf4c744786f26e/run.py#L145-L150
To make the viewer work, the first one should be replaced with the following:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
confs = builder_cls.BUILDER_CONFIGS
```
And the second one:
```python
dataset_module = datasets.load.dataset_module_factory(path)
builder_cls = datasets.load.import_main_class(dataset_module.module_path)
if conf:
builder_instance = builder_cls(name=conf, cache_dir=path if path_to_datasets is not None else None)
else:
builder_instance = builder_cls(cache_dir=path if path_to_datasets is not None else None)
```
But as @lhoestq suggested, it's better to use the `datasets-server` API nowadays to [fetch the rows](https://huggingface.co/docs/datasets-server/rows). | [
-1.2629460096359253,
-0.9270799160003662,
-0.7126128673553467,
1.3750451803207397,
-0.17643660306930542,
-1.2315737009048462,
0.10852395743131638,
-1.1056809425354004,
1.7054978609085083,
-0.7866798043251038,
0.1789322793483734,
-1.6400784254074097,
-0.00015952438116073608,
-0.5649052262306213,
-0.7402578592300415,
-0.9085838198661804,
-0.445944219827652,
-0.848231315612793,
1.027726173400879,
2.473543882369995,
1.192083716392517,
-1.4095795154571533,
2.7501282691955566,
0.6622525453567505,
-0.1990298330783844,
-1.0001264810562134,
0.47648975253105164,
-0.024530455470085144,
-1.294965147972107,
-0.46385857462882996,
-0.9245914220809937,
0.0020808856934309006,
-0.5715622901916504,
-0.48130470514297485,
0.05258333310484886,
0.3935810923576355,
-0.288724422454834,
-0.36291638016700745,
-0.5720740556716919,
-0.7312263250350952,
0.45829150080680847,
-0.3591768443584442,
0.9061093330383301,
-0.33953049778938293,
1.8492437601089478,
-0.4746323227882385,
0.4104660451412201,
0.7770528197288513,
1.3053349256515503,
0.14479348063468933,
-0.015950370579957962,
0.3405909836292267,
0.3381160795688629,
0.04435752332210541,
0.47968992590904236,
1.1908780336380005,
0.6154377460479736,
0.4458969235420227,
0.6759709715843201,
-2.1945388317108154,
1.356467604637146,
-0.9265667796134949,
0.2783137857913971,
1.452257513999939,
-0.9721584320068359,
0.3034588694572449,
-1.8079774379730225,
-0.04970451816916466,
0.5902050733566284,
-2.2825770378112793,
0.2518059313297272,
-1.2941575050354004,
-0.5551484227180481,
1.075067400932312,
0.31869420409202576,
-1.2098649740219116,
0.2113867998123169,
-0.5623979568481445,
1.1091322898864746,
0.5188838243484497,
1.211511254310608,
-1.6867856979370117,
-0.0817902535200119,
-0.19823086261749268,
0.14034980535507202,
-1.311764121055603,
-1.5688729286193848,
0.5485574007034302,
0.6416550874710083,
0.681663990020752,
-0.17359930276870728,
1.0111746788024902,
-1.0137226581573486,
0.7881478071212769,
-1.0187444686889648,
-1.6560665369033813,
-1.452439546585083,
-2.2973251342773438,
-2.299407720565796,
0.7490759491920471,
-0.4720737636089325,
-0.5351245403289795,
2.076507091522217,
-1.0427956581115723,
-1.708838939666748,
1.1409724950790405,
0.26812878251075745,
0.05319467931985855,
2.346712112426758,
0.2349713146686554,
-0.7277163863182068,
0.3955717980861664,
-0.6659300923347473,
0.8002620935440063,
-0.2740071415901184,
1.3455020189285278,
0.5982790589332581,
-1.0365947484970093,
1.5802932977676392,
-0.43702632188796997,
0.5657945871353149,
-0.5894872546195984,
-0.5267438888549805,
-0.7939453125,
0.3614446520805359,
1.836484670639038,
-0.3663620054721832,
1.577018141746521,
-0.41854020953178406,
-1.6224498748779297,
-1.6231650114059448,
0.9455345869064331,
0.4960311949253082,
-0.774397611618042,
0.03907458484172821,
-0.506401777267456,
0.0649615228176117,
-0.05477852001786232,
1.1292595863342285,
1.2755448818206787,
0.7246043682098389,
-0.39266857504844666,
-0.8157018423080444,
0.18101853132247925,
-0.055680084973573685,
-0.6967688202857971,
-1.805107831954956,
-0.28924867510795593,
0.16971156001091003,
0.635989248752594,
-1.1780592203140259,
1.6774847507476807,
0.9534021019935608,
1.8758264780044556,
0.9809147715568542,
-0.31405460834503174,
1.4832830429077148,
0.04526123031973839,
1.8419197797775269,
-0.5397210121154785,
0.6289209127426147,
-0.2640394866466522,
-1.1455973386764526,
0.827118456363678,
-0.320297509431839,
-2.1348798274993896,
-0.8120413422584534,
-0.7133542895317078,
-0.162746399641037,
-0.7713499665260315,
0.8475260734558105,
-0.28539377450942993,
-1.526916265487671,
0.19863036274909973,
-0.6801384091377258,
0.19995570182800293,
-1.1879239082336426,
0.25135931372642517,
0.7394288182258606,
-0.6198809146881104,
0.0219704732298851,
-0.16307932138442993,
-1.2594736814498901,
-0.44313883781433105,
0.30021798610687256,
1.857759714126587,
-0.6755115985870361,
0.8539959788322449,
1.0784121751785278,
-0.7018269896507263,
0.07575173676013947,
0.23358190059661865,
-0.2516616880893707,
0.8272793889045715,
-1.050005316734314,
-0.33138251304626465,
1.141430377960205,
-0.18398991227149963,
-0.6655498743057251,
1.4074690341949463,
0.7835155725479126,
-0.9823204874992371,
-0.2007916271686554,
-0.2141338586807251,
-0.8515031337738037,
-0.06427620351314545,
-1.561682939529419,
-0.20348647236824036,
0.41312697529792786,
-1.5222944021224976,
-0.38387349247932434,
-0.20300087332725525,
1.3525142669677734,
-0.21545535326004028,
1.448668360710144,
-0.3863789439201355,
-0.10417113453149796,
-0.32334020733833313,
-0.40581387281417847,
0.2561837434768677,
-0.1635499894618988,
-0.6018772125244141,
0.2039320170879364,
-0.7942394614219666,
0.2765110433101654,
1.4593380689620972,
0.4404338598251343,
0.0673939660191536,
0.4532049298286438,
1.100509762763977,
0.33302053809165955,
-0.07393650710582733,
-0.8102502822875977,
-1.5507445335388184,
2.0218605995178223,
-1.4704328775405884,
1.973227620124817,
0.7102587819099426,
-0.04359353333711624,
-1.7908133268356323,
-1.9120639562606812,
1.3445312976837158,
1.1151145696640015,
2.41172456741333,
0.5215068459510803,
0.4108365476131439,
-0.8004278540611267,
-0.7333739995956421,
0.3791695833206177,
-0.9602311849594116,
-0.6508942246437073,
0.12862753868103027,
2.376584529876709,
1.7887423038482666,
-0.4944653809070587,
-0.2173117995262146,
-0.9486142992973328,
1.3193079233169556,
-0.1433086395263672,
0.2527368664741516,
2.06774640083313,
-0.26813632249832153,
-1.0159858465194702,
1.3486183881759644,
-2.3264198303222656,
0.22662538290023804,
2.036247968673706,
0.2080085277557373,
0.05120830237865448,
-1.4524446725845337,
-0.5770235657691956,
-0.24575796723365784,
-0.4929041862487793,
-1.262802243232727,
0.5605852603912354,
-0.3917118012905121,
-0.8362715244293213,
-1.461794137954712,
0.1669696867465973,
-1.1379835605621338,
-1.6678555011749268,
0.331403523683548,
1.8793163299560547,
2.0106308460235596,
-0.7336525917053223,
1.5430220365524292,
-0.33648958802223206,
0.17392027378082275,
1.2263091802597046,
1.3110781908035278,
3.114894151687622,
1.8273298740386963,
-1.3972309827804565,
0.648853063583374,
-0.18783792853355408,
-0.49508699774742126,
1.0811084508895874,
-1.1643319129943848,
1.3161389827728271,
-0.1633853316307068,
-1.2851563692092896,
-1.2216483354568481,
1.1126065254211426,
0.5929560661315918,
0.05975455045700073,
-0.48371604084968567,
1.1996879577636719,
0.042483460158109665,
1.3692814111709595,
0.5625138878822327,
-0.41975200176239014,
0.6550934910774231,
-0.3976673483848572,
-0.5379275679588318,
1.537174940109253,
0.14173340797424316,
-1.4367042779922485,
-2.227121591567993,
-0.323964923620224,
-0.878616988658905,
0.03421086072921753,
-0.6258599758148193,
-1.0035885572433472,
1.6709340810775757,
0.3705746829509735,
-1.2871791124343872,
-0.31163567304611206,
-0.32683125138282776,
-0.5074869394302368,
2.570272207260132,
-1.277144193649292,
-0.11080390959978104,
-0.9037596583366394,
-0.5560198426246643,
1.6393235921859741,
-1.1438615322113037,
-0.25399497151374817,
-1.0910634994506836,
-0.6494720578193665,
-1.2551541328430176,
-0.565899133682251,
-0.001506282016634941,
-0.9439595341682434,
0.8061619400978088,
0.15942132472991943,
-1.1210752725601196,
-0.315875381231308,
-0.8504615426063538,
0.959158718585968,
-0.13787710666656494,
0.14467519521713257,
1.818207859992981,
0.40000858902931213,
-0.4596823751926422,
0.7545328736305237,
1.138401985168457,
0.6111882328987122,
-0.691329300403595,
0.1389806568622589,
-0.6867124438285828,
0.23902395367622375,
-1.321007490158081,
0.241670161485672,
-3.0110979080200195,
0.6820653676986694,
-0.08953627198934555,
-0.06591544300317764,
-0.04667571932077408,
-1.3149298429489136,
1.0487629175186157,
2.5948047637939453,
-1.1897977590560913,
0.48174694180488586,
0.4182775616645813,
1.0602517127990723,
-1.6034899950027466,
0.24708887934684753,
-0.4381612539291382,
2.1018383502960205,
0.224424809217453,
1.294395923614502,
-0.4969959259033203,
-2.1837918758392334,
0.5732525587081909,
-1.1948834657669067,
-1.132386565208435,
0.8046872019767761,
-0.9127877950668335,
0.19565898180007935,
-1.4413537979125977,
-0.2645133435726166,
-0.8674675226211548,
-1.223933219909668,
0.7101666927337646,
0.21947354078292847,
0.42364686727523804,
-0.6059101819992065,
0.35577329993247986,
-2.1884827613830566,
-1.24540376663208,
-0.1742337942123413,
-0.9650598764419556,
0.5576903223991394,
-0.3315782845020294,
0.609345555305481,
-0.12279412150382996,
0.04095812514424324,
0.4210205674171448,
1.3944321870803833,
3.3956215381622314,
0.21544960141181946,
0.25266915559768677,
-0.10377568006515503,
-0.9848682880401611,
1.5160408020019531,
0.945154070854187,
-0.07384641468524933,
-0.5293454527854919,
-1.024574875831604,
1.2241523265838623,
1.9980512857437134,
1.0290985107421875,
-0.04274369403719902,
-0.7924584746360779,
-0.6760962605476379,
0.04774406552314758,
0.1926586627960205,
0.540256679058075,
0.9083742499351501,
-0.044894419610500336,
0.08057639002799988,
1.4425262212753296,
1.196273684501648,
-0.4442560076713562,
0.44326919317245483,
-0.8627949953079224,
-0.45945829153060913,
0.3575383424758911,
0.28172290325164795,
-0.036294929683208466,
0.3759661614894867,
-1.0527364015579224,
-0.207290917634964,
-0.4048497676849365,
-0.9361572861671448,
-0.7280592322349548,
-0.4388180077075958,
-0.4240249991416931,
1.5807045698165894,
0.1302492320537567,
-0.4304444491863251,
-0.025043245404958725,
-0.7951634526252747,
-0.22519230842590332,
-1.1562869548797607,
0.33755752444267273,
-0.15634390711784363,
-0.07023154199123383,
-0.2031899392604828,
1.6978117227554321,
-0.9260331392288208,
-2.080247402191162,
0.15969201922416687,
0.20701348781585693,
-0.3399447798728943,
0.24310284852981567,
1.6473077535629272,
0.5214189887046814,
1.415458083152771,
1.4033844470977783,
0.9541705250740051,
-0.6356440782546997,
-1.2235757112503052,
0.7221388816833496,
0.9492650628089905,
-1.4242990016937256,
0.8384768962860107,
-0.15568089485168457,
-0.599865198135376,
0.7490805387496948,
1.3618419170379639,
0.4328271150588989,
-2.040684938430786,
0.9433025121688843,
-0.8601475358009338,
0.7191790342330933,
0.6449812650680542,
0.7337173223495483,
0.1906566023826599,
0.8703339099884033,
-1.2391042709350586,
-1.1818225383758545,
-0.7456189393997192,
-0.6664547920227051,
1.9182922840118408,
-0.21641770005226135,
0.5826210975646973,
-0.15725761651992798,
-1.2651950120925903,
-0.08242761343717575,
0.7245423793792725,
0.3756418526172638,
-0.4830828011035919,
0.8464390635490417,
-0.6272217631340027,
-1.0983463525772095,
-1.2994158267974854,
-0.42033371329307556,
-1.0526682138442993,
-0.9019098281860352,
0.9339284300804138,
0.7935873866081238,
0.31886258721351624,
1.8628804683685303,
0.6104223132133484,
0.3112470507621765,
-2.615597724914551,
0.8369467854499817,
0.3012232184410095,
-0.016651812940835953,
0.8981527090072632,
0.2722560167312622,
1.1228737831115723,
0.05862979590892792,
0.5501812696456909,
-2.35219669342041,
2.1921396255493164,
-0.2402099370956421,
0.7043190598487854,
-0.05534082278609276,
-0.22465834021568298,
1.1096631288528442,
0.6297159790992737,
0.5606306791305542,
-1.0968785285949707,
0.7703542113304138,
-0.6010503768920898,
1.1186296939849854,
0.9563806056976318,
-0.823932945728302,
-0.0013316813856363297,
1.375518798828125,
0.4256531298160553,
-0.46212494373321533,
-0.9126341938972473,
-0.919583797454834,
0.9161649942398071,
1.7076138257980347,
-0.0377141535282135,
-0.009215578436851501,
0.8582754731178284,
0.7555890679359436,
-1.2516322135925293,
0.022220078855752945,
-0.7107036709785461,
-0.7038683295249939,
1.6465171575546265,
2.064849615097046,
-0.10091886669397354,
-0.1860654056072235,
-0.6843616366386414,
-1.2363945245742798,
0.7423442006111145,
-0.10044170171022415,
0.1687397062778473,
0.599609375,
-0.6597326397895813,
1.1391222476959229,
0.7359247803688049,
0.9508875012397766,
-0.026175305247306824,
0.29982590675354004,
0.4407097101211548,
-0.27176782488822937,
-1.1643511056900024,
-0.33387187123298645,
-1.026627779006958,
-2.495931386947632,
0.40123793482780457,
-0.23361629247665405,
-1.4823895692825317,
0.026007317006587982,
-1.0339523553848267,
0.9251670837402344,
-0.6130961775779724,
-1.106706976890564,
-1.512152075767517,
0.2913585901260376,
-0.11130767315626144,
0.8790731430053711,
-1.563899278640747,
-0.09789381921291351,
1.2290782928466797,
0.827563464641571,
-0.5931681990623474,
1.0674254894256592,
0.27013328671455383,
1.0241891145706177,
0.8500273823738098,
-0.4114994704723358,
0.5043807625770569,
0.09154198318719864,
-1.331809639930725,
0.4092381000518799,
1.1906161308288574,
0.14833036065101624,
1.482331395149231,
-0.47069287300109863,
0.07462675124406815,
0.4461910128593445,
-0.6273235082626343,
-0.4474426805973053,
-0.45933324098587036,
0.7239730358123779,
-0.05415448173880577,
-0.9263364672660828,
-0.004870539531111717,
-0.14318203926086426,
-0.3076854944229126,
0.21509459614753723,
-1.4922802448272705,
-0.2647857069969177,
-0.41818851232528687,
-0.523872435092926,
-1.3162204027175903,
0.044481512159109116,
1.3881405591964722,
-0.8128983378410339,
-0.30308181047439575,
0.4734410345554352,
0.4609376788139343,
0.5472106337547302,
0.6533490419387817,
-0.6299411058425903,
-0.26346051692962646,
-0.3550848364830017,
-0.3417259752750397,
0.3047473132610321,
1.2829484939575195,
-0.11394718289375305,
-0.9785474538803101,
0.7366364598274231,
-0.4285781979560852,
0.06514517217874527,
1.9263989925384521,
0.10286825895309448,
-0.7221858501434326,
0.3122635781764984,
-0.7011145949363708,
1.849822759628296,
1.6989977359771729,
1.4959856271743774,
-0.1464017629623413,
-0.9422114491462708,
0.5995386242866516,
-0.36904647946357727,
-0.3217347264289856,
0.9171757698059082,
0.4753183126449585,
-0.14773070812225342,
-1.4029462337493896,
0.6672455072402954,
1.2787575721740723,
-0.8443213701248169,
-0.735309898853302,
0.08889453113079071,
-0.7808679342269897,
1.1453895568847656,
0.6407914161682129,
0.3536306321620941,
0.23470383882522583,
1.6162947416305542,
0.6877186298370361,
-0.4282959997653961,
0.5102363228797913,
0.5352499485015869,
-0.21441397070884705,
-2.2007434368133545,
-1.0438764095306396,
0.3480544686317444,
-0.41248342394828796,
-1.6235530376434326,
1.3031781911849976,
-1.120124101638794,
-1.037050485610962,
0.45302069187164307,
0.01734422706067562,
1.377166986465454,
0.3997112810611725,
1.6853282451629639,
2.19646954536438,
0.9488723874092102,
0.36988458037376404,
1.3241313695907593,
-0.10449627041816711,
-0.3832325339317322,
1.8102258443832397,
-0.4810471534729004,
0.5441516041755676,
1.093126893043518,
-0.41566944122314453,
-1.0304118394851685,
-0.833043098449707,
-1.1433322429656982,
-0.623913586139679,
1.164223313331604,
0.08286678045988083,
-1.0905550718307495,
0.2308793067932129,
1.5396472215652466,
0.12178144603967667,
-0.33226075768470764,
0.7442948818206787,
0.40421992540359497,
-0.7377038598060608,
-0.13992896676063538,
-0.8842672109603882,
0.4673849940299988,
-0.26255619525909424,
-0.35800790786743164,
0.3044770061969757,
0.5298386812210083,
1.2715741395950317,
-0.11235868185758591,
0.10587549954652786,
1.1444714069366455,
-1.3380708694458008,
1.4320757389068604,
-0.6589935421943665,
0.2661605775356293,
-2.4299097061157227,
1.4380881786346436,
-0.7654647827148438,
1.9215174913406372,
-2.612353801727295,
0.45098525285720825,
-0.5502452254295349,
-0.40980711579322815,
0.328357994556427,
-0.3387465178966522,
0.08492940664291382,
-0.10648737102746964,
-1.1478928327560425,
-0.10166751593351364,
-0.7076765298843384,
0.6323434114456177,
1.199253797531128,
1.3443937301635742,
-1.1708260774612427,
-0.2905673682689667,
-1.7375353574752808,
-0.2396640181541443,
-0.8235613107681274,
0.34955838322639465,
-2.0221574306488037,
-0.15837299823760986,
-2.021980047225952,
-2.4484026432037354,
-1.322664737701416,
-0.8514808416366577,
1.0588202476501465,
0.23541980981826782,
-0.8901118040084839,
1.1973551511764526,
-0.3756711781024933,
-1.8304632902145386,
1.0741961002349854,
-2.1466586589813232
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | > The dataset viewer on the Hugging Face website is incredibly useful
@mariosasko i think @lilyorlilypad wants to run the new dataset-viewer, not the old one |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 68 | 26 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
> The dataset viewer on the Hugging Face website is incredibly useful
@mariosasko i think @lilyorlilypad wants to run the new dataset-viewer, not the old one | [
-1.3138701915740967,
-0.9885465502738953,
-0.8847286701202393,
1.3862971067428589,
-0.28022122383117676,
-1.2336256504058838,
0.060415297746658325,
-1.1434897184371948,
1.641564965248108,
-0.831879198551178,
0.2883841395378113,
-1.7514400482177734,
0.10730206966400146,
-0.49931424856185913,
-0.7893179059028625,
-1.0559357404708862,
-0.40816161036491394,
-0.8508139252662659,
1.0292452573776245,
2.5412757396698,
1.1222988367080688,
-1.3910887241363525,
2.724350929260254,
0.6439782977104187,
-0.0536951906979084,
-1.089561104774475,
0.646619439125061,
0.013284689746797085,
-1.1862034797668457,
-0.47406062483787537,
-1.006532073020935,
-0.03177255019545555,
-0.5852698087692261,
-0.4938609302043915,
0.03365619480609894,
0.32399243116378784,
-0.18708446621894836,
-0.30547821521759033,
-0.4984886050224304,
-0.7809236645698547,
0.4433179497718811,
-0.37491458654403687,
0.9104968905448914,
-0.43186041712760925,
1.9484262466430664,
-0.38542452454566956,
0.37599867582321167,
0.7098370790481567,
1.3974225521087646,
0.17624449729919434,
-0.10054660588502884,
0.21819591522216797,
0.40264105796813965,
0.08002771437168121,
0.3171965777873993,
0.998416006565094,
0.5317668318748474,
0.5700938105583191,
0.6387103796005249,
-2.227912425994873,
1.3526133298873901,
-0.9842956066131592,
0.2956484854221344,
1.5086129903793335,
-1.0590851306915283,
0.3792865574359894,
-1.8175897598266602,
-0.07156773656606674,
0.5393394827842712,
-2.339057445526123,
0.08551045507192612,
-1.2364782094955444,
-0.5733073353767395,
1.0014064311981201,
0.2510261535644531,
-1.2877943515777588,
0.2290072739124298,
-0.4038231074810028,
1.0213426351547241,
0.5494502782821655,
1.236709475517273,
-1.6245733499526978,
0.05164714530110359,
-0.3584882318973541,
0.062363602221012115,
-1.4640004634857178,
-1.5273730754852295,
0.6190307140350342,
0.5831859111785889,
0.5600534081459045,
-0.11640708893537521,
0.8890498280525208,
-0.9682462215423584,
0.8237853050231934,
-0.8155425190925598,
-1.6732462644577026,
-1.452928066253662,
-2.3131473064422607,
-2.330179452896118,
0.782101035118103,
-0.5303769707679749,
-0.5288180112838745,
2.05731463432312,
-1.073172926902771,
-1.741390585899353,
1.3013858795166016,
0.228915274143219,
0.05105958506464958,
2.5153255462646484,
0.1516747921705246,
-0.6431779265403748,
0.38274750113487244,
-0.7138598561286926,
0.8233169317245483,
-0.3630516231060028,
1.4728479385375977,
0.5860676765441895,
-0.9922367334365845,
1.6385102272033691,
-0.4481508731842041,
0.497366726398468,
-0.6053721904754639,
-0.5543368458747864,
-0.8864038586616516,
0.39573371410369873,
1.7378579378128052,
-0.3930385410785675,
1.6149388551712036,
-0.41992536187171936,
-1.4692976474761963,
-1.6562995910644531,
0.9677995443344116,
0.47224971652030945,
-0.8852493166923523,
0.04771173372864723,
-0.31455668807029724,
0.03230181708931923,
-0.056387998163700104,
1.1766688823699951,
1.2394931316375732,
0.646302342414856,
-0.3236725628376007,
-0.9114308953285217,
0.24107228219509125,
-0.10238942503929138,
-0.6376987099647522,
-1.8411551713943481,
-0.35838788747787476,
0.06526258587837219,
0.7219796776771545,
-1.0946568250656128,
1.6214905977249146,
0.9879493713378906,
1.7885794639587402,
1.0323810577392578,
-0.279247909784317,
1.4617854356765747,
0.08045428991317749,
1.8185770511627197,
-0.5684454441070557,
0.6606040596961975,
-0.33563023805618286,
-0.9972930550575256,
0.775936484336853,
-0.31604546308517456,
-2.0242161750793457,
-0.8726920485496521,
-0.9210903644561768,
-0.26699376106262207,
-0.7662551999092102,
0.990220308303833,
-0.38723963499069214,
-1.3746092319488525,
0.31364378333091736,
-0.5789461135864258,
0.05776286870241165,
-1.236821174621582,
0.36676502227783203,
0.7177624702453613,
-0.6267203688621521,
0.0016647689044475555,
-0.2563501000404358,
-1.2796729803085327,
-0.5134176015853882,
0.1751853972673416,
1.9345040321350098,
-0.7769968509674072,
0.9465493559837341,
0.9723324775695801,
-0.7252441048622131,
-0.03880433365702629,
0.38390251994132996,
-0.1892492026090622,
0.8489359617233276,
-0.936414897441864,
-0.4264593720436096,
1.0758775472640991,
-0.23822252452373505,
-0.6348837614059448,
1.4297394752502441,
0.7269171476364136,
-0.9065709114074707,
-0.18404367566108704,
-0.19550399482250214,
-0.8323782682418823,
-0.09920851141214371,
-1.6302844285964966,
-0.23079043626785278,
0.1740754097700119,
-1.5329946279525757,
-0.5718259215354919,
-0.19959834218025208,
1.3151838779449463,
-0.17720510065555573,
1.4231677055358887,
-0.4100607931613922,
-0.2725349962711334,
-0.37692496180534363,
-0.3618183434009552,
0.28629449009895325,
-0.1347382366657257,
-0.6269621253013611,
0.3081388771533966,
-0.8525441288948059,
0.2956097424030304,
1.4008984565734863,
0.5193879008293152,
0.06331480294466019,
0.6204888224601746,
1.0328049659729004,
0.3738436996936798,
-0.008358526974916458,
-0.9561120271682739,
-1.580485224723816,
2.04132342338562,
-1.5571808815002441,
1.9754247665405273,
0.7465421557426453,
-0.08524952083826065,
-1.7678269147872925,
-1.8680646419525146,
1.4320547580718994,
1.1168842315673828,
2.2923314571380615,
0.6892870664596558,
0.36046522855758667,
-0.8497596979141235,
-0.5929949283599854,
0.3559578061103821,
-0.9736198782920837,
-0.7612928152084351,
0.10656507313251495,
2.2674858570098877,
1.7014141082763672,
-0.565837025642395,
-0.09345918893814087,
-1.0241353511810303,
1.244933843612671,
-0.12454251945018768,
0.2816053330898285,
2.041076421737671,
-0.4195612668991089,
-1.1451047658920288,
1.247829794883728,
-2.2583017349243164,
0.014625315554440022,
2.0252161026000977,
0.22638341784477234,
-0.08635975420475006,
-1.4576467275619507,
-0.6086593866348267,
-0.1443251371383667,
-0.5004086494445801,
-1.3283101320266724,
0.5865010023117065,
-0.38897308707237244,
-0.7873473763465881,
-1.5036207437515259,
0.06902512162923813,
-1.1880290508270264,
-1.5724594593048096,
0.3652755916118622,
1.8424413204193115,
2.076524019241333,
-0.6099383234977722,
1.567752718925476,
-0.26904532313346863,
0.1686173677444458,
1.2458539009094238,
1.1837151050567627,
3.1307601928710938,
1.8770469427108765,
-1.2567331790924072,
0.6354699730873108,
-0.0979665219783783,
-0.5902090072631836,
1.2111204862594604,
-1.0344558954238892,
1.355047583580017,
-0.1719679832458496,
-1.1687816381454468,
-1.1997501850128174,
0.9957267642021179,
0.4443395733833313,
0.11545638740062714,
-0.48986974358558655,
1.1944372653961182,
0.04590708017349243,
1.2470111846923828,
0.4202512502670288,
-0.36902090907096863,
0.602109432220459,
-0.52908855676651,
-0.6069219708442688,
1.574968695640564,
0.14442504942417145,
-1.4705818891525269,
-2.2712085247039795,
-0.27890118956565857,
-0.7870376110076904,
0.01550299022346735,
-0.5737040042877197,
-1.0099568367004395,
1.6237657070159912,
0.42759275436401367,
-1.1834406852722168,
-0.38945749402046204,
-0.45298951864242554,
-0.7183000445365906,
2.582132577896118,
-1.3541693687438965,
-0.2707061767578125,
-0.9082151055335999,
-0.6216933727264404,
1.5958631038665771,
-1.2094576358795166,
-0.08991886675357819,
-1.092513084411621,
-0.6396978497505188,
-1.3642321825027466,
-0.4990636110305786,
-0.0076806992292404175,
-1.0264753103256226,
0.8880450129508972,
0.1901494413614273,
-0.9853003621101379,
-0.25804007053375244,
-0.8111209273338318,
0.7579973936080933,
-0.03285301476716995,
0.41881024837493896,
1.937149167060852,
0.5034605264663696,
-0.41892486810684204,
0.6700273752212524,
1.0442920923233032,
0.6574686765670776,
-0.6659523844718933,
0.1718512773513794,
-0.6289499402046204,
0.25992998480796814,
-1.235054612159729,
0.2636117935180664,
-2.958000659942627,
0.640959620475769,
0.022960051894187927,
-0.15610454976558685,
-0.00485580088570714,
-1.2566826343536377,
1.0779982805252075,
2.5631957054138184,
-1.1784467697143555,
0.43791264295578003,
0.28384649753570557,
1.219570279121399,
-1.6026334762573242,
0.3218178153038025,
-0.47475138306617737,
2.122699737548828,
0.1688593477010727,
1.0463742017745972,
-0.5053554177284241,
-2.1688992977142334,
0.6690167188644409,
-1.2256903648376465,
-1.2415857315063477,
0.7233628034591675,
-0.8488685488700867,
0.0680178850889206,
-1.4675861597061157,
-0.11420184373855591,
-0.8627963066101074,
-1.2789767980575562,
0.8690659403800964,
0.23861083388328552,
0.44509226083755493,
-0.6329101324081421,
0.2714478373527527,
-2.1606156826019287,
-1.3521255254745483,
-0.19452990591526031,
-0.8551910519599915,
0.47700631618499756,
-0.3427388072013855,
0.7597792148590088,
-0.23216649889945984,
0.09421330690383911,
0.42331835627555847,
1.4118962287902832,
3.4002492427825928,
0.23809587955474854,
0.46977436542510986,
-0.1175500676035881,
-0.9814708232879639,
1.618275761604309,
0.9905396103858948,
-0.01852385327219963,
-0.5758888721466064,
-1.0532209873199463,
1.2422682046890259,
1.9509806632995605,
0.9320611953735352,
0.10877154767513275,
-0.6955182552337646,
-0.4431873559951782,
-0.03309912234544754,
0.2645367681980133,
0.5714393258094788,
0.922882616519928,
-0.10801076889038086,
0.15799343585968018,
1.4769012928009033,
1.3013262748718262,
-0.47401827573776245,
0.48238086700439453,
-0.7891870737075806,
-0.4354356527328491,
0.5427152514457703,
0.28300878405570984,
-0.06252815574407578,
0.35706180334091187,
-0.902169942855835,
-0.2698820233345032,
-0.3410520851612091,
-1.128778338432312,
-0.63691246509552,
-0.45469892024993896,
-0.3799003064632416,
1.6203784942626953,
0.1571805626153946,
-0.4540994167327881,
-0.08881043642759323,
-0.947391152381897,
-0.18368574976921082,
-1.1724399328231812,
0.250692754983902,
-0.16651076078414917,
-0.09560125321149826,
-0.11981832981109619,
1.7859241962432861,
-0.9608060717582703,
-2.157029867172241,
0.1921224594116211,
0.3237503170967102,
-0.31552040576934814,
0.26366740465164185,
1.4643231630325317,
0.47042834758758545,
1.4594067335128784,
1.3708903789520264,
0.9221932888031006,
-0.5628536343574524,
-1.3305671215057373,
0.6523907780647278,
0.8723451495170593,
-1.3957417011260986,
1.0249651670455933,
-0.07090669870376587,
-0.6324971318244934,
0.7842989563941956,
1.2303416728973389,
0.4387611448764801,
-1.9213037490844727,
0.8956106305122375,
-0.7778710722923279,
0.819642186164856,
0.6104477047920227,
0.7961471676826477,
0.18740402162075043,
0.8773761987686157,
-1.216839075088501,
-1.1653565168380737,
-0.8120911717414856,
-0.5996309518814087,
1.9706968069076538,
-0.05451225861907005,
0.6021687388420105,
-0.14639851450920105,
-1.2500451803207397,
-0.1158875897526741,
0.5777983069419861,
0.4206989109516144,
-0.303970605134964,
0.8556522727012634,
-0.6611962914466858,
-1.2406362295150757,
-1.5002663135528564,
-0.3727649748325348,
-0.929499626159668,
-0.9116975665092468,
1.114657998085022,
0.7953927516937256,
0.16429725289344788,
1.860558271408081,
0.4891374111175537,
0.15973705053329468,
-2.6215052604675293,
0.8586786985397339,
0.30598440766334534,
0.015545221976935863,
0.9113013744354248,
0.25501418113708496,
1.1293234825134277,
0.02402997389435768,
0.4603067636489868,
-2.249094247817993,
2.24556565284729,
-0.29363080859184265,
0.753254771232605,
-0.01392454095184803,
-0.16386178135871887,
1.0514308214187622,
0.6271438002586365,
0.6286939382553101,
-1.0289214849472046,
0.8132808804512024,
-0.6201944351196289,
1.2219206094741821,
1.1541306972503662,
-0.7131907343864441,
-0.024387679994106293,
1.3721688985824585,
0.5370309352874756,
-0.41580215096473694,
-0.849615752696991,
-0.8764477372169495,
0.8639435172080994,
1.8189945220947266,
0.006405259482562542,
0.054748594760894775,
0.7831130027770996,
0.6827755570411682,
-1.2414535284042358,
0.12181229889392853,
-0.7825158834457397,
-0.7544761896133423,
1.584246039390564,
2.043412208557129,
-0.04308577999472618,
-0.13830411434173584,
-0.7253741025924683,
-1.2470792531967163,
0.7476768493652344,
-0.0597713403403759,
0.24056266248226166,
0.654930830001831,
-0.6566641330718994,
1.119646668434143,
0.9749758839607239,
0.9110209941864014,
0.10598114132881165,
0.41411787271499634,
0.39256229996681213,
-0.1993389129638672,
-1.078966498374939,
-0.19791840016841888,
-1.084450125694275,
-2.4756405353546143,
0.39751771092414856,
-0.3547470271587372,
-1.4436601400375366,
-0.014022077433764935,
-0.9782060980796814,
0.9461206197738647,
-0.546423077583313,
-1.0827010869979858,
-1.5413377285003662,
0.14526601135730743,
-0.06316887587308884,
0.9247310161590576,
-1.533001184463501,
-0.008877584710717201,
1.277266502380371,
0.8901593089103699,
-0.6129868626594543,
1.0444138050079346,
0.25746992230415344,
1.096298098564148,
0.7660412192344666,
-0.5067415833473206,
0.36137285828590393,
0.07859545946121216,
-1.351631760597229,
0.42067429423332214,
1.0597213506698608,
0.195741206407547,
1.3612812757492065,
-0.48910266160964966,
0.05453050881624222,
0.4601183831691742,
-0.4999651610851288,
-0.48999401926994324,
-0.49686136841773987,
0.7242723107337952,
-0.09638579189777374,
-0.7696132063865662,
0.17948946356773376,
-0.11646163463592529,
-0.2594735622406006,
0.19202591478824615,
-1.473032832145691,
-0.3379087448120117,
-0.5014312267303467,
-0.5815101265907288,
-1.4020627737045288,
0.03551766276359558,
1.3985713720321655,
-0.7790141701698303,
-0.20444323122501373,
0.44150373339653015,
0.4432637095451355,
0.4679771065711975,
0.6016830205917358,
-0.6112078428268433,
-0.3331243395805359,
-0.26601529121398926,
-0.3899143636226654,
0.22618398070335388,
1.2518322467803955,
-0.36530056595802307,
-0.9871937036514282,
0.7348254919052124,
-0.1992712765932083,
-0.024261634796857834,
1.9038342237472534,
0.11530440300703049,
-0.7735641598701477,
0.24553675949573517,
-0.5585317611694336,
1.8807377815246582,
1.6110177040100098,
1.4828588962554932,
-0.18097566068172455,
-0.9074224233627319,
0.5701101422309875,
-0.2551235556602478,
-0.35000771284103394,
0.8766834735870361,
0.5463270545005798,
-0.04283718392252922,
-1.42775559425354,
0.5839704871177673,
1.2713888883590698,
-0.9024742245674133,
-0.7115650773048401,
0.09907053411006927,
-0.8046115040779114,
1.0247448682785034,
0.6821104288101196,
0.5454836487770081,
0.22202818095684052,
1.6313519477844238,
0.5785737037658691,
-0.5263084173202515,
0.43234992027282715,
0.5177140235900879,
-0.14244702458381653,
-2.1987316608428955,
-1.0865979194641113,
0.29549843072891235,
-0.4484230577945709,
-1.5621347427368164,
1.2718510627746582,
-1.1734648942947388,
-0.9014856219291687,
0.49640482664108276,
0.08886869251728058,
1.489220380783081,
0.35637083649635315,
1.6470274925231934,
2.1358964443206787,
0.9083410501480103,
0.338247150182724,
1.4216833114624023,
-0.015433358028531075,
-0.34048402309417725,
1.8354300260543823,
-0.38968443870544434,
0.5075980424880981,
1.1457278728485107,
-0.4352826774120331,
-0.9970180988311768,
-0.7671322226524353,
-1.0929443836212158,
-0.6009123921394348,
1.1163569688796997,
0.13640427589416504,
-1.127563238143921,
0.13652680814266205,
1.4973572492599487,
0.11634241044521332,
-0.2898217737674713,
0.6166206002235413,
0.554162859916687,
-0.6909018158912659,
-0.08034409582614899,
-0.8996723294258118,
0.49586063623428345,
-0.3476385474205017,
-0.3808271884918213,
0.44714653491973877,
0.4337562322616577,
1.326540470123291,
-0.1307367980480194,
0.15758270025253296,
1.2961924076080322,
-1.3271485567092896,
1.4116276502609253,
-0.5798458456993103,
0.1279173046350479,
-2.362351894378662,
1.4657620191574097,
-0.7349857091903687,
1.9488872289657593,
-2.63490891456604,
0.4084721505641937,
-0.6127761602401733,
-0.4061174690723419,
0.3198026418685913,
-0.4065551459789276,
0.012941929511725903,
-0.17775866389274597,
-1.065735936164856,
-0.021940913051366806,
-0.7197798490524292,
0.5184862613677979,
1.284616231918335,
1.242570400238037,
-1.0544936656951904,
-0.3613032400608063,
-1.771959662437439,
-0.25986558198928833,
-0.7190646529197693,
0.3465217351913452,
-2.138129234313965,
-0.30763331055641174,
-2.0215585231781006,
-2.463251829147339,
-1.3520090579986572,
-0.939591109752655,
1.1737804412841797,
0.16093823313713074,
-0.9070562124252319,
1.1973867416381836,
-0.3305850327014923,
-1.7873300313949585,
0.9905144572257996,
-2.065277338027954
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | > wants to run the new dataset-viewer, not the old one
Thanks for the clarification for me. I do want to run the new dataset-viewer. |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 68 | 25 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
> wants to run the new dataset-viewer, not the old one
Thanks for the clarification for me. I do want to run the new dataset-viewer. | [
-1.3371331691741943,
-0.9638020992279053,
-0.8796965479850769,
1.402085781097412,
-0.2812560498714447,
-1.229543924331665,
0.051484763622283936,
-1.1275341510772705,
1.6628104448318481,
-0.8023957014083862,
0.2706684470176697,
-1.716544270515442,
0.13198640942573547,
-0.46742868423461914,
-0.7753425240516663,
-1.0555418729782104,
-0.4392595589160919,
-0.8491503000259399,
1.0447677373886108,
2.538721799850464,
1.099922776222229,
-1.4502370357513428,
2.7129857540130615,
0.6356390714645386,
-0.03558152914047241,
-1.101425290107727,
0.6450564861297607,
0.03841821104288101,
-1.2124412059783936,
-0.4649656116962433,
-0.9888159036636353,
-0.06033249571919441,
-0.5866192579269409,
-0.49692246317863464,
0.04859023913741112,
0.3096276521682739,
-0.18898354470729828,
-0.33662331104278564,
-0.5008808970451355,
-0.7854658961296082,
0.4153648316860199,
-0.3781285285949707,
0.8840478658676147,
-0.4521801173686981,
1.9111454486846924,
-0.35500121116638184,
0.39616793394088745,
0.7123053073883057,
1.3666789531707764,
0.15189965069293976,
-0.10692614316940308,
0.2256951928138733,
0.4179415702819824,
0.09762214124202728,
0.3353545069694519,
1.0160914659500122,
0.5243238806724548,
0.5608651638031006,
0.6065988540649414,
-2.228865623474121,
1.3529528379440308,
-0.9792197942733765,
0.29980915784835815,
1.5047215223312378,
-1.0342378616333008,
0.3929317891597748,
-1.8165701627731323,
-0.09187515079975128,
0.5341578722000122,
-2.3176116943359375,
0.07488282024860382,
-1.2230677604675293,
-0.5919061899185181,
1.0391302108764648,
0.2450915426015854,
-1.262144684791565,
0.21871532499790192,
-0.42865049839019775,
1.0406005382537842,
0.5374063849449158,
1.2497615814208984,
-1.609696388244629,
0.06596226245164871,
-0.3522627651691437,
0.0755215734243393,
-1.4121837615966797,
-1.5071077346801758,
0.6433504819869995,
0.614098072052002,
0.5655423998832703,
-0.09790872782468796,
0.8888521194458008,
-0.9777585864067078,
0.8648632168769836,
-0.8352020978927612,
-1.675133466720581,
-1.4425233602523804,
-2.3352091312408447,
-2.348571300506592,
0.8167005777359009,
-0.546122670173645,
-0.4932470917701721,
2.0697758197784424,
-1.071231722831726,
-1.7601498365402222,
1.283130168914795,
0.24230991303920746,
0.04087689518928528,
2.4902820587158203,
0.13061761856079102,
-0.65217125415802,
0.3911229372024536,
-0.7100928425788879,
0.8262739181518555,
-0.35062375664711,
1.4832943677902222,
0.5904046893119812,
-1.000815987586975,
1.6368398666381836,
-0.45518046617507935,
0.5184611082077026,
-0.5957052707672119,
-0.5520029664039612,
-0.8662887215614319,
0.4252583384513855,
1.7827893495559692,
-0.3632138967514038,
1.641556978225708,
-0.40797746181488037,
-1.4581835269927979,
-1.653411626815796,
0.9473516941070557,
0.49168238043785095,
-0.8803361058235168,
0.07642025500535965,
-0.29432395100593567,
0.008499168790876865,
-0.05760689079761505,
1.1660621166229248,
1.2574145793914795,
0.6731852889060974,
-0.32053741812705994,
-0.9244974851608276,
0.21537865698337555,
-0.09057541191577911,
-0.6254772543907166,
-1.8411171436309814,
-0.38768288493156433,
0.0374804362654686,
0.7354661226272583,
-1.1106929779052734,
1.5910781621932983,
0.9910057187080383,
1.808706283569336,
1.0326651334762573,
-0.3162786066532135,
1.4714890718460083,
0.11557363718748093,
1.834531307220459,
-0.5763692855834961,
0.6667377948760986,
-0.32789912819862366,
-1.0306026935577393,
0.7717296481132507,
-0.3188454508781433,
-2.0293266773223877,
-0.8605943322181702,
-0.9110576510429382,
-0.2521980106830597,
-0.7342118620872498,
0.9896886944770813,
-0.3508789539337158,
-1.348695158958435,
0.3254038393497467,
-0.5897907614707947,
0.07171569019556046,
-1.2252634763717651,
0.37639161944389343,
0.7369407415390015,
-0.6110338568687439,
0.0009779660031199455,
-0.2663716673851013,
-1.2940617799758911,
-0.5404673218727112,
0.1891753226518631,
1.9000149965286255,
-0.7547683119773865,
0.9475458264350891,
0.9529144167900085,
-0.7509445548057556,
-0.09667378664016724,
0.38226646184921265,
-0.2149938941001892,
0.895338773727417,
-0.9813074469566345,
-0.4258814752101898,
1.0652368068695068,
-0.24899539351463318,
-0.6313698887825012,
1.391830563545227,
0.6864416003227234,
-0.9212124943733215,
-0.19777053594589233,
-0.18396297097206116,
-0.8523339629173279,
-0.09261061996221542,
-1.6432995796203613,
-0.2524961233139038,
0.17066746950149536,
-1.5524814128875732,
-0.5583449006080627,
-0.20203423500061035,
1.2750693559646606,
-0.18080808222293854,
1.4321731328964233,
-0.4025091528892517,
-0.27298709750175476,
-0.37992623448371887,
-0.3848000466823578,
0.2981301248073578,
-0.1382094919681549,
-0.5987958312034607,
0.2835938036441803,
-0.8810632228851318,
0.3245716989040375,
1.4133718013763428,
0.5044437646865845,
0.0737689733505249,
0.6192372441291809,
1.0100693702697754,
0.36073464155197144,
-0.0528402142226696,
-0.9455430507659912,
-1.5574407577514648,
2.0509870052337646,
-1.5350199937820435,
1.9647043943405151,
0.7216609120368958,
-0.10713984072208405,
-1.7944532632827759,
-1.8727070093154907,
1.4379384517669678,
1.10444974899292,
2.281094551086426,
0.6903069615364075,
0.36306074261665344,
-0.8684824705123901,
-0.6192483901977539,
0.32393085956573486,
-0.9656984806060791,
-0.7781962752342224,
0.10923657566308975,
2.2733683586120605,
1.7006453275680542,
-0.5683225393295288,
-0.0865975171327591,
-1.0078728199005127,
1.2558314800262451,
-0.13382622599601746,
0.27619776129722595,
2.0251834392547607,
-0.4046400785446167,
-1.1120635271072388,
1.2365131378173828,
-2.2687811851501465,
0.05472038686275482,
2.0220775604248047,
0.23042824864387512,
-0.039934176951646805,
-1.481687068939209,
-0.5876063704490662,
-0.1328347772359848,
-0.4660693109035492,
-1.3089011907577515,
0.5954226851463318,
-0.4041299819946289,
-0.7978702783584595,
-1.5053439140319824,
0.07921736687421799,
-1.2161325216293335,
-1.5776253938674927,
0.37870994210243225,
1.8444966077804565,
2.047915458679199,
-0.5865440368652344,
1.5521016120910645,
-0.28202176094055176,
0.17507265508174896,
1.240778923034668,
1.1420897245407104,
3.1329267024993896,
1.9215240478515625,
-1.243965744972229,
0.6278117895126343,
-0.0921541228890419,
-0.5569064021110535,
1.2091083526611328,
-1.0296770334243774,
1.3588684797286987,
-0.16367009282112122,
-1.1739403009414673,
-1.198286533355713,
1.026578426361084,
0.43709734082221985,
0.10920287668704987,
-0.4985558092594147,
1.2223492860794067,
0.052399277687072754,
1.2719875574111938,
0.39823657274246216,
-0.36839616298675537,
0.6237315535545349,
-0.5187104344367981,
-0.5724591016769409,
1.5739203691482544,
0.15615613758563995,
-1.4783637523651123,
-2.2726998329162598,
-0.296724796295166,
-0.7998915910720825,
0.018567562103271484,
-0.5751831531524658,
-1.0209418535232544,
1.6278486251831055,
0.445186048746109,
-1.200473666191101,
-0.3773813843727112,
-0.4380286633968353,
-0.7342031598091125,
2.5829920768737793,
-1.3398449420928955,
-0.28709879517555237,
-0.9100832939147949,
-0.6012496948242188,
1.5627542734146118,
-1.1840928792953491,
-0.0761883407831192,
-1.0694650411605835,
-0.6268736720085144,
-1.37081778049469,
-0.5161721110343933,
-0.021949006244540215,
-1.0105150938034058,
0.892225980758667,
0.16349337995052338,
-1.0162286758422852,
-0.24333855509757996,
-0.7914161086082458,
0.7558350563049316,
-0.021387610584497452,
0.4031642973423004,
1.9185022115707397,
0.465006560087204,
-0.4002777934074402,
0.689647912979126,
1.0679771900177002,
0.6659665107727051,
-0.6622446775436401,
0.20102345943450928,
-0.6248500347137451,
0.2841642200946808,
-1.2384449243545532,
0.25495436787605286,
-2.9653096199035645,
0.6547712087631226,
0.015931006520986557,
-0.12328729778528214,
0.009984583593904972,
-1.2314746379852295,
1.0403765439987183,
2.563109874725342,
-1.20482337474823,
0.4572605788707733,
0.3172563314437866,
1.1665579080581665,
-1.5740437507629395,
0.33366039395332336,
-0.45219215750694275,
2.1460211277008057,
0.17862050235271454,
1.048585057258606,
-0.5306333899497986,
-2.1565399169921875,
0.6497302651405334,
-1.2193573713302612,
-1.217301368713379,
0.6897410750389099,
-0.8580273389816284,
0.06240061670541763,
-1.4900981187820435,
-0.10432165861129761,
-0.8481947183609009,
-1.2900989055633545,
0.8521961569786072,
0.21393270790576935,
0.4487024247646332,
-0.6273277401924133,
0.2904967963695526,
-2.1483659744262695,
-1.3584567308425903,
-0.2125304639339447,
-0.8518971800804138,
0.483556866645813,
-0.362184077501297,
0.7712754607200623,
-0.18414685130119324,
0.08610133081674576,
0.38274434208869934,
1.394762396812439,
3.406785488128662,
0.22062990069389343,
0.42677003145217896,
-0.1065375804901123,
-0.995997428894043,
1.6201363801956177,
0.9902151823043823,
-0.025739673525094986,
-0.5426809787750244,
-1.055617094039917,
1.2487977743148804,
1.9352205991744995,
0.9235990643501282,
0.11835211515426636,
-0.7200756072998047,
-0.4637865424156189,
-0.033683378249406815,
0.21056319773197174,
0.5628091096878052,
0.9117177128791809,
-0.09383010119199753,
0.1575663685798645,
1.4884083271026611,
1.2916271686553955,
-0.4335729479789734,
0.4415372610092163,
-0.7964591979980469,
-0.44874751567840576,
0.55921471118927,
0.303147554397583,
-0.06028829514980316,
0.36717426776885986,
-0.9208709001541138,
-0.26630693674087524,
-0.3629162311553955,
-1.1286509037017822,
-0.6203371286392212,
-0.4424394965171814,
-0.39259472489356995,
1.6087685823440552,
0.1636728197336197,
-0.4852786064147949,
-0.06586043536663055,
-0.9468213319778442,
-0.16570433974266052,
-1.157132863998413,
0.26112937927246094,
-0.16616372764110565,
-0.09241911768913269,
-0.10816099494695663,
1.825085997581482,
-0.9840226173400879,
-2.1447200775146484,
0.2104009985923767,
0.30769723653793335,
-0.33835074305534363,
0.22955071926116943,
1.4587839841842651,
0.4915564954280853,
1.4639171361923218,
1.3908016681671143,
0.9032318592071533,
-0.5725271105766296,
-1.313181757926941,
0.6632512211799622,
0.9011794328689575,
-1.4354095458984375,
0.967998206615448,
-0.06612066924571991,
-0.625450849533081,
0.7951344847679138,
1.2383548021316528,
0.4359731376171112,
-1.9424479007720947,
0.9069280028343201,
-0.7585827708244324,
0.8366574645042419,
0.6085113883018494,
0.7780003547668457,
0.1818673014640808,
0.8698509335517883,
-1.2340959310531616,
-1.1520217657089233,
-0.8270646929740906,
-0.5825601816177368,
1.9510594606399536,
-0.06778924912214279,
0.6202811002731323,
-0.15906435251235962,
-1.2777669429779053,
-0.10756544768810272,
0.5709977746009827,
0.40193837881088257,
-0.30206915736198425,
0.8490970134735107,
-0.6484953761100769,
-1.2393591403961182,
-1.4907751083374023,
-0.36241406202316284,
-0.9429359436035156,
-0.8988062739372253,
1.1219817399978638,
0.770426869392395,
0.19839496910572052,
1.8512282371520996,
0.470643013715744,
0.1428198218345642,
-2.6425516605377197,
0.8953186273574829,
0.28423792123794556,
0.02643447369337082,
0.9418283700942993,
0.24050495028495789,
1.123486042022705,
0.015366035513579845,
0.470267117023468,
-2.2014095783233643,
2.2130985260009766,
-0.29097798466682434,
0.7486205697059631,
-0.019928228110074997,
-0.1568070501089096,
1.050577163696289,
0.6333088874816895,
0.6515775918960571,
-1.0614994764328003,
0.8032355308532715,
-0.6306997537612915,
1.2406147718429565,
1.1360955238342285,
-0.709571897983551,
-0.03579812869429588,
1.3675283193588257,
0.5487073063850403,
-0.40842151641845703,
-0.856752336025238,
-0.8739178776741028,
0.8956379294395447,
1.8244216442108154,
-0.0025177891366183758,
0.03311745822429657,
0.8026596307754517,
0.689423143863678,
-1.2611703872680664,
0.11869673430919647,
-0.7702023983001709,
-0.7134299874305725,
1.574737787246704,
2.0338196754455566,
0.005573595874011517,
-0.15531815588474274,
-0.7156223654747009,
-1.2741386890411377,
0.7060152292251587,
-0.06978368014097214,
0.22961129248142242,
0.6628292202949524,
-0.6332993507385254,
1.1212888956069946,
0.9328209757804871,
0.9077617526054382,
0.06680239737033844,
0.4269713759422302,
0.3766185939311981,
-0.2097485512495041,
-1.0973179340362549,
-0.2015186995267868,
-1.044782042503357,
-2.5222878456115723,
0.392704039812088,
-0.3531275987625122,
-1.4316118955612183,
-0.02789289504289627,
-0.9757651090621948,
0.9716067314147949,
-0.5395835638046265,
-1.1172280311584473,
-1.5499801635742188,
0.15257351100444794,
-0.07006650418043137,
0.9529454112052917,
-1.5310940742492676,
-0.016715385019779205,
1.2928686141967773,
0.8954184651374817,
-0.6181895136833191,
1.0818694829940796,
0.3139452636241913,
1.0997190475463867,
0.7452479600906372,
-0.5190794467926025,
0.3598663806915283,
0.08109302818775177,
-1.3584860563278198,
0.43623366951942444,
1.0578622817993164,
0.21151641011238098,
1.3165440559387207,
-0.5291615724563599,
0.05099286511540413,
0.4672998785972595,
-0.5024216175079346,
-0.4864008128643036,
-0.48086971044540405,
0.7212444543838501,
-0.10011187195777893,
-0.7728883028030396,
0.14922234416007996,
-0.10747106373310089,
-0.2509807050228119,
0.17913132905960083,
-1.4892168045043945,
-0.33971840143203735,
-0.5174767971038818,
-0.5861350893974304,
-1.416858434677124,
0.05670120567083359,
1.4017345905303955,
-0.7745017409324646,
-0.17134340107440948,
0.42249596118927,
0.4427734613418579,
0.46454399824142456,
0.6071401834487915,
-0.5909187197685242,
-0.33467480540275574,
-0.2598828673362732,
-0.36315280199050903,
0.21863050758838654,
1.208446979522705,
-0.3377455174922943,
-0.9981383681297302,
0.7477171421051025,
-0.2275637835264206,
-0.04015585407614708,
1.8952125310897827,
0.1194898933172226,
-0.7879772782325745,
0.2922445833683014,
-0.566615879535675,
1.8619027137756348,
1.6088371276855469,
1.4988068342208862,
-0.20972169935703278,
-0.8784034252166748,
0.5551944375038147,
-0.25952422618865967,
-0.361496239900589,
0.8755427598953247,
0.5319375991821289,
-0.006541755050420761,
-1.403673529624939,
0.5979885458946228,
1.2641242742538452,
-0.9250344038009644,
-0.7489057183265686,
0.12228180468082428,
-0.8013380169868469,
1.0269099473953247,
0.6879389882087708,
0.5647611021995544,
0.2557424008846283,
1.613694190979004,
0.6100074648857117,
-0.5476583242416382,
0.4679277539253235,
0.5211668014526367,
-0.16485558450222015,
-2.165196418762207,
-1.077359914779663,
0.2832643687725067,
-0.45465773344039917,
-1.5636497735977173,
1.2766187191009521,
-1.206078052520752,
-0.9002333283424377,
0.4894489347934723,
0.12056100368499756,
1.4902169704437256,
0.3446768820285797,
1.658480167388916,
2.1202995777130127,
0.9002828598022461,
0.32405775785446167,
1.447587013244629,
-0.008832521736621857,
-0.3616517186164856,
1.8730125427246094,
-0.3908907473087311,
0.5368813872337341,
1.1882081031799316,
-0.42815080285072327,
-0.9779101610183716,
-0.7801973223686218,
-1.0918341875076294,
-0.5907938480377197,
1.091200828552246,
0.14263546466827393,
-1.133480191230774,
0.12967310845851898,
1.4825124740600586,
0.14036822319030762,
-0.312179297208786,
0.5961386561393738,
0.5456066727638245,
-0.7027393579483032,
-0.08177836984395981,
-0.9216196537017822,
0.4746887683868408,
-0.3580735921859741,
-0.390484094619751,
0.4317171275615692,
0.40303662419319153,
1.3092756271362305,
-0.1284010410308838,
0.13617469370365143,
1.3021193742752075,
-1.328855276107788,
1.392405390739441,
-0.5792545080184937,
0.1381090134382248,
-2.3815319538116455,
1.4633853435516357,
-0.7509207129478455,
1.9404916763305664,
-2.6509275436401367,
0.4151458144187927,
-0.6275973320007324,
-0.38052091002464294,
0.3303638994693756,
-0.38462144136428833,
0.0015247156843543053,
-0.1622365117073059,
-1.0813002586364746,
-0.04753933101892471,
-0.7325760722160339,
0.5341508984565735,
1.289469599723816,
1.25851571559906,
-1.0630855560302734,
-0.3475834131240845,
-1.7726093530654907,
-0.2334204614162445,
-0.7103312015533447,
0.38454002141952515,
-2.123171806335449,
-0.2892347276210785,
-2.016104221343994,
-2.4738588333129883,
-1.3428815603256226,
-0.9423714280128479,
1.1518564224243164,
0.162239670753479,
-0.8896114826202393,
1.1772016286849976,
-0.34587562084198,
-1.7994321584701538,
0.9976831078529358,
-2.0881502628326416
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | It should be possible to run it locally using the HF datasets-server API (docs [here](https://huggingface.co/docs/datasets-server)) but the front end part is not open source (yet ?)
The back-end is open source though if you're interested: https://github.com/huggingface/datasets-server
It automatically converts datasets on HF to Parquet, which is the format we use to power the viewer. |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 68 | 54 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
It should be possible to run it locally using the HF datasets-server API (docs [here](https://huggingface.co/docs/datasets-server)) but the front end part is not open source (yet ?)
The back-end is open source though if you're interested: https://github.com/huggingface/datasets-server
It automatically converts datasets on HF to Parquet, which is the format we use to power the viewer. | [
-1.2946721315383911,
-0.9562549591064453,
-0.8487693071365356,
1.402969241142273,
-0.18590271472930908,
-1.2506859302520752,
0.01207674853503704,
-1.0751320123672485,
1.6804996728897095,
-0.80080646276474,
0.31254449486732483,
-1.721817135810852,
0.05693713203072548,
-0.4525856673717499,
-0.8352771997451782,
-0.9813817143440247,
-0.4253244996070862,
-0.862133264541626,
1.0045784711837769,
2.5334784984588623,
1.1778696775436401,
-1.4779330492019653,
2.7603859901428223,
0.6460092067718506,
-0.018734030425548553,
-1.0877946615219116,
0.6025770306587219,
0.016394319012761116,
-1.2636184692382812,
-0.447065532207489,
-0.9474837779998779,
-0.004897060338407755,
-0.5638200044631958,
-0.5717902183532715,
0.08254575729370117,
0.313368558883667,
-0.18732835352420807,
-0.3731469213962555,
-0.501420795917511,
-0.7724671363830566,
0.487218976020813,
-0.38778069615364075,
0.8677066564559937,
-0.44521597027778625,
1.9238669872283936,
-0.3884314000606537,
0.39781391620635986,
0.6652794480323792,
1.3861677646636963,
0.20770399272441864,
-0.09865115582942963,
0.2670395076274872,
0.37614279985427856,
0.07789474725723267,
0.38315558433532715,
1.125817894935608,
0.5668919086456299,
0.5078185200691223,
0.6999918818473816,
-2.210537910461426,
1.325668454170227,
-0.997866153717041,
0.2709965109825134,
1.455564260482788,
-0.9728699922561646,
0.34687429666519165,
-1.8182543516159058,
-0.08666977286338806,
0.5671153664588928,
-2.322028636932373,
0.10767656564712524,
-1.238229513168335,
-0.4997028708457947,
1.048354148864746,
0.20912884175777435,
-1.290938377380371,
0.26154038310050964,
-0.4899001717567444,
1.0068976879119873,
0.5385010838508606,
1.2575525045394897,
-1.6279006004333496,
0.032015327364206314,
-0.2634967565536499,
0.09210574626922607,
-1.3542962074279785,
-1.5721203088760376,
0.5358616709709167,
0.5974650382995605,
0.5805484652519226,
-0.09669946134090424,
0.9020097255706787,
-0.9485891461372375,
0.8482029438018799,
-0.8529636859893799,
-1.636022686958313,
-1.4845401048660278,
-2.257441282272339,
-2.3126745223999023,
0.789266049861908,
-0.5568922162055969,
-0.5056482553482056,
2.039475679397583,
-1.081860065460205,
-1.756078839302063,
1.2144242525100708,
0.3279985189437866,
0.08167906105518341,
2.4601171016693115,
0.13984236121177673,
-0.7417382597923279,
0.4126334488391876,
-0.6504764556884766,
0.776414692401886,
-0.39983507990837097,
1.4408220052719116,
0.6001682281494141,
-1.028331995010376,
1.6647038459777832,
-0.5538151860237122,
0.4786880314350128,
-0.6180965900421143,
-0.5394809246063232,
-0.8083812594413757,
0.3572668433189392,
1.7831403017044067,
-0.3900079131126404,
1.6521625518798828,
-0.3979860246181488,
-1.4888811111450195,
-1.6105051040649414,
0.9046973586082458,
0.4636736214160919,
-0.853618323802948,
0.04690001159906387,
-0.3467681407928467,
0.05071290582418442,
-0.10518579185009003,
1.1015965938568115,
1.1682803630828857,
0.6384978294372559,
-0.2907567620277405,
-0.9308211207389832,
0.23614069819450378,
-0.050002843141555786,
-0.5818753838539124,
-1.8162245750427246,
-0.35786882042884827,
0.12820684909820557,
0.67915278673172,
-1.1620122194290161,
1.6621930599212646,
0.9308225512504578,
1.838651418685913,
0.9916870594024658,
-0.3064996302127838,
1.4832842350006104,
0.08163881301879883,
1.8488820791244507,
-0.5798574090003967,
0.6644225120544434,
-0.3037337362766266,
-1.102571725845337,
0.7785519361495972,
-0.3295479714870453,
-2.03621768951416,
-0.8012120127677917,
-0.8880026936531067,
-0.2156006097793579,
-0.7376999258995056,
0.9909214377403259,
-0.294477641582489,
-1.32051420211792,
0.3019133508205414,
-0.6188048124313354,
0.12750738859176636,
-1.2429291009902954,
0.3602118194103241,
0.7808810472488403,
-0.6125444173812866,
0.027112606912851334,
-0.18542177975177765,
-1.2814275026321411,
-0.4810665547847748,
0.209779292345047,
1.9240174293518066,
-0.802544116973877,
0.8938257694244385,
1.0016047954559326,
-0.7123315334320068,
-0.02153351530432701,
0.3944798707962036,
-0.25084853172302246,
0.8858196139335632,
-0.9660371541976929,
-0.4154333472251892,
1.173662543296814,
-0.21708108484745026,
-0.6484352946281433,
1.4215642213821411,
0.7433348298072815,
-0.9516909718513489,
-0.18240050971508026,
-0.16604050993919373,
-0.8493242859840393,
-0.1014978438615799,
-1.588794231414795,
-0.19371464848518372,
0.20168744027614594,
-1.53661048412323,
-0.5301501750946045,
-0.17216943204402924,
1.3170831203460693,
-0.21368856728076935,
1.488483190536499,
-0.4075218141078949,
-0.2251676768064499,
-0.36687272787094116,
-0.3851931691169739,
0.239551842212677,
-0.2041514366865158,
-0.6715030670166016,
0.286947101354599,
-0.8767978549003601,
0.2859479784965515,
1.3887418508529663,
0.5274453163146973,
0.05042590573430061,
0.5868135690689087,
1.0748836994171143,
0.3765360116958618,
-0.0541812926530838,
-0.9098518490791321,
-1.5767533779144287,
2.108031749725342,
-1.4736785888671875,
1.991961121559143,
0.7709554433822632,
-0.05708879604935646,
-1.7620047330856323,
-1.8402460813522339,
1.4078141450881958,
1.1143959760665894,
2.336491346359253,
0.6253464818000793,
0.38944870233535767,
-0.8617743849754333,
-0.6446115970611572,
0.38801634311676025,
-0.9648468494415283,
-0.7654024958610535,
0.05205869302153587,
2.2896676063537598,
1.7595431804656982,
-0.5278778672218323,
-0.11509914696216583,
-1.0376523733139038,
1.2978309392929077,
-0.20205479860305786,
0.26284465193748474,
1.9802550077438354,
-0.3483099043369293,
-1.0766897201538086,
1.266670823097229,
-2.334672451019287,
0.13704152405261993,
2.0348052978515625,
0.23362214863300323,
-0.03584703058004379,
-1.4595295190811157,
-0.5905336737632751,
-0.2046245038509369,
-0.42351025342941284,
-1.274731159210205,
0.568291425704956,
-0.3806624412536621,
-0.8749420642852783,
-1.4664689302444458,
0.0611000694334507,
-1.1968157291412354,
-1.6033495664596558,
0.4168253540992737,
1.8304622173309326,
2.043889045715332,
-0.6658558249473572,
1.5524934530258179,
-0.26327627897262573,
0.19221597909927368,
1.2574516534805298,
1.2510077953338623,
3.1673240661621094,
1.8666268587112427,
-1.2839021682739258,
0.6129684448242188,
-0.1590631902217865,
-0.551965594291687,
1.2098884582519531,
-1.0809338092803955,
1.313820719718933,
-0.16964079439640045,
-1.2644888162612915,
-1.1797891855239868,
1.0521916151046753,
0.5171688199043274,
0.09817428886890411,
-0.5664183497428894,
1.196173071861267,
0.03744411841034889,
1.2589839696884155,
0.4919794201850891,
-0.3751835823059082,
0.5545154213905334,
-0.4427509009838104,
-0.5915831327438354,
1.4939287900924683,
0.1065254807472229,
-1.4895890951156616,
-2.2975947856903076,
-0.24573874473571777,
-0.8228311538696289,
-0.009222125634551048,
-0.5753982663154602,
-1.0356534719467163,
1.6886227130889893,
0.42456158995628357,
-1.2071187496185303,
-0.3999810814857483,
-0.4241030514240265,
-0.6692441701889038,
2.5501084327697754,
-1.3782780170440674,
-0.2581544816493988,
-0.9889105558395386,
-0.5378899574279785,
1.6341135501861572,
-1.190774917602539,
-0.07622373104095459,
-1.0334937572479248,
-0.6971592903137207,
-1.388299584388733,
-0.600106418132782,
-0.052950311452150345,
-0.9359920024871826,
0.8147817850112915,
0.15181230008602142,
-1.0292551517486572,
-0.27072545886039734,
-0.8286164402961731,
0.7373369336128235,
-0.07724574208259583,
0.30880194902420044,
1.9320569038391113,
0.4456513524055481,
-0.4345654547214508,
0.637554407119751,
1.1475404500961304,
0.6549320220947266,
-0.6476826667785645,
0.20276522636413574,
-0.6343790888786316,
0.3065439462661743,
-1.3388028144836426,
0.2264794558286667,
-2.927975654602051,
0.6790192127227783,
-0.011213278397917747,
-0.07857935130596161,
0.015892107039690018,
-1.211489200592041,
1.1091229915618896,
2.549654960632324,
-1.199533462524414,
0.4516546428203583,
0.3534027636051178,
1.1596883535385132,
-1.6457209587097168,
0.3142026364803314,
-0.4381367266178131,
2.116608142852783,
0.14961189031600952,
1.0771347284317017,
-0.49290749430656433,
-2.11287522315979,
0.60528963804245,
-1.2454324960708618,
-1.1368685960769653,
0.741400957107544,
-0.9050604104995728,
0.11997678875923157,
-1.4973344802856445,
-0.08617183566093445,
-0.8925763368606567,
-1.2462165355682373,
0.8307541012763977,
0.11635276675224304,
0.42899948358535767,
-0.6066627502441406,
0.32988330721855164,
-2.1209421157836914,
-1.3257157802581787,
-0.24653427302837372,
-0.8709299564361572,
0.5045417547225952,
-0.33511608839035034,
0.7305434942245483,
-0.19222138822078705,
0.06970065832138062,
0.4022785425186157,
1.3457497358322144,
3.3910677433013916,
0.28637611865997314,
0.44568899273872375,
-0.11429795622825623,
-1.0034122467041016,
1.6247153282165527,
1.0011892318725586,
-0.12627312541007996,
-0.4991394579410553,
-0.9720569252967834,
1.3361084461212158,
1.926040768623352,
1.02402663230896,
0.10980485379695892,
-0.810029923915863,
-0.6157113909721375,
0.007011799141764641,
0.15642841160297394,
0.5429655909538269,
0.9432690143585205,
-0.08261510729789734,
0.13427181541919708,
1.477161169052124,
1.2780519723892212,
-0.4215885400772095,
0.41679510474205017,
-0.7973788976669312,
-0.4378359615802765,
0.5272391438484192,
0.2975008189678192,
-0.03905612230300903,
0.4488142132759094,
-0.9788761138916016,
-0.28936195373535156,
-0.37531259655952454,
-1.0269838571548462,
-0.6411289572715759,
-0.509502112865448,
-0.36445674300193787,
1.6028555631637573,
0.12275396287441254,
-0.46513932943344116,
-0.004513814114034176,
-0.9433537125587463,
-0.15823332965373993,
-1.1468735933303833,
0.2804099917411804,
-0.10862892866134644,
-0.07221098244190216,
-0.14493654668331146,
1.7285728454589844,
-0.9346555471420288,
-2.1519691944122314,
0.18143224716186523,
0.27271637320518494,
-0.3727547824382782,
0.1878572255373001,
1.557236671447754,
0.4400864243507385,
1.440909504890442,
1.3961704969406128,
0.8644431233406067,
-0.599670946598053,
-1.2853224277496338,
0.6720052361488342,
0.9404907822608948,
-1.4630039930343628,
1.001621961593628,
-0.07750071585178375,
-0.6556622982025146,
0.7521606087684631,
1.2703332901000977,
0.3941899538040161,
-1.8925212621688843,
0.8908281326293945,
-0.7649479508399963,
0.8359062075614929,
0.5967054963111877,
0.7644703388214111,
0.17173291742801666,
0.8315009474754333,
-1.2802165746688843,
-1.1831120252609253,
-0.8290696144104004,
-0.602671205997467,
1.8968300819396973,
-0.11001551151275635,
0.5482928156852722,
-0.15182235836982727,
-1.2881330251693726,
-0.14911335706710815,
0.5822749137878418,
0.3556595742702484,
-0.3148458003997803,
0.8823788166046143,
-0.6164388656616211,
-1.1929991245269775,
-1.4460830688476562,
-0.40388280153274536,
-0.9378490447998047,
-0.8808676600456238,
1.1185946464538574,
0.8059383034706116,
0.2242710441350937,
1.8454291820526123,
0.552821695804596,
0.13871657848358154,
-2.621992826461792,
0.9305081963539124,
0.29340407252311707,
-0.04039650037884712,
0.9123967289924622,
0.21079732477664948,
1.0869299173355103,
0.007667688652873039,
0.5121718049049377,
-2.308243751525879,
2.1981773376464844,
-0.27213823795318604,
0.7579883933067322,
-0.010133628733456135,
-0.21175380051136017,
1.1004831790924072,
0.6150457262992859,
0.624442458152771,
-1.1064389944076538,
0.777891993522644,
-0.6286601424217224,
1.1750251054763794,
1.0536515712738037,
-0.7795164585113525,
-0.008081300184130669,
1.373552680015564,
0.4897599220275879,
-0.43957027792930603,
-0.9130282998085022,
-0.8339563608169556,
0.9358097910881042,
1.7427786588668823,
0.046165987849235535,
0.01610417850315571,
0.8787079453468323,
0.7099569439888,
-1.2895270586013794,
0.11030313372612,
-0.7597378492355347,
-0.709045946598053,
1.6420279741287231,
2.046718120574951,
-0.012759285047650337,
-0.13722747564315796,
-0.6915973424911499,
-1.2917035818099976,
0.691283643245697,
-0.06379897892475128,
0.21296364068984985,
0.7127371430397034,
-0.6839079856872559,
1.1889386177062988,
0.8915273547172546,
0.9014049768447876,
0.006731385365128517,
0.3467830717563629,
0.3252500295639038,
-0.2411448359489441,
-1.1023787260055542,
-0.23452244699001312,
-1.0654990673065186,
-2.4483749866485596,
0.3867014944553375,
-0.3003952205181122,
-1.4376040697097778,
0.007635045796632767,
-0.9920058250427246,
0.9547297358512878,
-0.5589954853057861,
-1.0708116292953491,
-1.5084800720214844,
0.18146327137947083,
-0.04958100989460945,
0.8895140290260315,
-1.5227330923080444,
-0.06298567354679108,
1.296899676322937,
0.866951584815979,
-0.5568875670433044,
1.042290449142456,
0.28351664543151855,
1.0860180854797363,
0.7940820455551147,
-0.44616782665252686,
0.4386647343635559,
0.12278188765048981,
-1.3811758756637573,
0.4325036108493805,
1.1129639148712158,
0.19507144391536713,
1.4073487520217896,
-0.4515976011753082,
0.09047998487949371,
0.4413537085056305,
-0.5449966192245483,
-0.4635397493839264,
-0.5505760312080383,
0.7182926535606384,
-0.038897961378097534,
-0.8389030694961548,
0.11545775830745697,
-0.11505343019962311,
-0.25416141748428345,
0.15750250220298767,
-1.5402175188064575,
-0.27520325779914856,
-0.4220219552516937,
-0.5727201104164124,
-1.2953884601593018,
0.0600094236433506,
1.4014428853988647,
-0.8488938212394714,
-0.20186668634414673,
0.4947771430015564,
0.42450201511383057,
0.4659384489059448,
0.6266319751739502,
-0.6244670152664185,
-0.33555373549461365,
-0.22643661499023438,
-0.36685463786125183,
0.2033213973045349,
1.220860481262207,
-0.2568850517272949,
-0.9835498929023743,
0.7174962759017944,
-0.3366968035697937,
-0.031581319868564606,
1.872287392616272,
0.07897801697254181,
-0.7639265060424805,
0.33851540088653564,
-0.5998496413230896,
1.873929738998413,
1.6471643447875977,
1.4614933729171753,
-0.16731029748916626,
-0.8909936547279358,
0.560019850730896,
-0.27646416425704956,
-0.40278396010398865,
0.8748619556427002,
0.5205563902854919,
-0.04485071823000908,
-1.40426766872406,
0.5401942133903503,
1.215734839439392,
-0.9664627313613892,
-0.7092233896255493,
0.1267569214105606,
-0.8232743740081787,
1.064583420753479,
0.696134626865387,
0.45717352628707886,
0.24467439949512482,
1.6661419868469238,
0.6497517824172974,
-0.547028124332428,
0.4303630590438843,
0.5693503618240356,
-0.17746461927890778,
-2.1323535442352295,
-0.9708995223045349,
0.31962332129478455,
-0.41471847891807556,
-1.5625027418136597,
1.2427200078964233,
-1.1774842739105225,
-0.9268948435783386,
0.4976053237915039,
0.12202803790569305,
1.445094108581543,
0.3432266116142273,
1.6987500190734863,
2.1005845069885254,
0.9312369227409363,
0.3095400929450989,
1.3706395626068115,
0.005778385326266289,
-0.2923228442668915,
1.8437656164169312,
-0.35561132431030273,
0.5590302348136902,
1.0934678316116333,
-0.4680991470813751,
-1.0350890159606934,
-0.7610895037651062,
-1.1792482137680054,
-0.5995549559593201,
1.1273690462112427,
0.135299950838089,
-1.1346263885498047,
0.16574816405773163,
1.4814810752868652,
0.08329813182353973,
-0.31999409198760986,
0.6153598427772522,
0.5113274455070496,
-0.674541711807251,
-0.0953969955444336,
-0.9200504422187805,
0.5181814432144165,
-0.2390613853931427,
-0.3970833718776703,
0.378373384475708,
0.4565618932247162,
1.3107820749282837,
-0.06159529089927673,
0.1487727016210556,
1.29717218875885,
-1.3542757034301758,
1.421462059020996,
-0.684770405292511,
0.17436423897743225,
-2.393993616104126,
1.4607737064361572,
-0.7960706353187561,
1.945685625076294,
-2.6073977947235107,
0.4111836850643158,
-0.6175388097763062,
-0.41212934255599976,
0.35360848903656006,
-0.41856732964515686,
0.032353732734918594,
-0.13754382729530334,
-1.0770257711410522,
-0.05596813187003136,
-0.7120603322982788,
0.5732299089431763,
1.259873390197754,
1.3237583637237549,
-1.1224384307861328,
-0.37507304549217224,
-1.8208881616592407,
-0.2309049814939499,
-0.7331591844558716,
0.3764456510543823,
-2.0461339950561523,
-0.1996491253376007,
-2.028590679168701,
-2.4405641555786133,
-1.4662328958511353,
-0.8648155331611633,
1.1065157651901245,
0.20354725420475006,
-0.8911005854606628,
1.1443943977355957,
-0.37941214442253113,
-1.795152187347412,
0.9726722836494446,
-2.117586851119995
] |
https://github.com/huggingface/datasets/issues/6014 | Request to Share/Update Dataset Viewer Code | the new frontend would probably be hard to open source, as is, as it's quite intertwined with the Hub's code.
However, at some point it would be amazing to have a community-driven open source implementation of a frontend to datasets-server! |
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response. | 68 | 40 | Request to Share/Update Dataset Viewer Code
Overview:
The repository (huggingface/datasets-viewer) was recently archived and when I tried to run the code, there was the error message "AttributeError: module 'datasets.load' has no attribute 'prepare_module'". I could not resolve the issue myself due to lack of documentation of that attribute.
Request:
I kindly request the sharing of the code responsible for the dataset preview functionality or help with resolving the error. The dataset viewer on the Hugging Face website is incredibly useful since it is compatible with different types of inputs. It allows users to find datasets that meet their needs more efficiently. If needed, I am willing to contribute to the project by testing, documenting, and providing feedback on the dataset viewer code.
Thank you for considering this request, and I look forward to your response.
the new frontend would probably be hard to open source, as is, as it's quite intertwined with the Hub's code.
However, at some point it would be amazing to have a community-driven open source implementation of a frontend to datasets-server! | [
-1.3399195671081543,
-0.9881343245506287,
-0.8778817653656006,
1.4086564779281616,
-0.24429179728031158,
-1.2349588871002197,
0.020746305584907532,
-1.1103874444961548,
1.6543843746185303,
-0.8417815566062927,
0.316488116979599,
-1.7315900325775146,
0.07928384840488434,
-0.5206704139709473,
-0.7657413482666016,
-0.9859378933906555,
-0.43631821870803833,
-0.851897656917572,
1.0062096118927002,
2.578047513961792,
1.1236263513565063,
-1.4464919567108154,
2.752615451812744,
0.7049518823623657,
-0.003886380698531866,
-1.0605483055114746,
0.6093279719352722,
0.06749609112739563,
-1.196976900100708,
-0.4784260094165802,
-0.9802274107933044,
-0.0170461293309927,
-0.5633265972137451,
-0.5526208281517029,
0.059269387274980545,
0.31899493932724,
-0.17050011456012726,
-0.36317431926727295,
-0.4898032546043396,
-0.7603186964988708,
0.4809771478176117,
-0.42499852180480957,
0.9585186243057251,
-0.4180689752101898,
1.9158750772476196,
-0.3286363482475281,
0.37580493092536926,
0.70539391040802,
1.4056607484817505,
0.19059428572654724,
-0.08238328993320465,
0.21297916769981384,
0.4030839800834656,
0.0207020603120327,
0.3578687906265259,
1.038222312927246,
0.5843986868858337,
0.5671469569206238,
0.7079058289527893,
-2.227234125137329,
1.3818532228469849,
-1.0132908821105957,
0.34976527094841003,
1.4702556133270264,
-0.9932518601417542,
0.3691893517971039,
-1.7835475206375122,
-0.11837620288133621,
0.5130231976509094,
-2.2788801193237305,
0.12169791758060455,
-1.2018386125564575,
-0.5503119826316833,
0.9767001867294312,
0.25162240862846375,
-1.3123353719711304,
0.26381075382232666,
-0.4002293348312378,
1.0341830253601074,
0.5195926427841187,
1.2219659090042114,
-1.6323946714401245,
0.09330326318740845,
-0.29831475019454956,
0.06934396177530289,
-1.3989083766937256,
-1.5046567916870117,
0.536521852016449,
0.5472676753997803,
0.5685613751411438,
-0.0997273325920105,
0.8830796480178833,
-0.9488705396652222,
0.8323603272438049,
-0.8667274713516235,
-1.5905691385269165,
-1.4516611099243164,
-2.2863199710845947,
-2.345963954925537,
0.7732791900634766,
-0.5093755125999451,
-0.5329246520996094,
2.0606868267059326,
-1.0934759378433228,
-1.740444540977478,
1.2765333652496338,
0.26266613602638245,
0.05198508873581886,
2.4763123989105225,
0.16062727570533752,
-0.6640225648880005,
0.36210897564888,
-0.6858228445053101,
0.8953144550323486,
-0.44518157839775085,
1.4777412414550781,
0.5836329460144043,
-1.0059797763824463,
1.6615428924560547,
-0.508159875869751,
0.48294273018836975,
-0.5918102860450745,
-0.5230771899223328,
-0.8831197023391724,
0.4233257472515106,
1.7023025751113892,
-0.32382380962371826,
1.597564697265625,
-0.4433400630950928,
-1.4731274843215942,
-1.6426382064819336,
0.9460327625274658,
0.4669308364391327,
-0.8423305153846741,
0.04310468211770058,
-0.30461281538009644,
0.0675271674990654,
-0.07094714045524597,
1.1500056982040405,
1.2676417827606201,
0.6722211837768555,
-0.2997044622898102,
-0.9527214765548706,
0.1829748898744583,
-0.11302638053894043,
-0.5699118971824646,
-1.8384026288986206,
-0.33636215329170227,
0.05546177551150322,
0.7222549319267273,
-1.1220577955245972,
1.666225790977478,
1.0030176639556885,
1.8330799341201782,
1.0013818740844727,
-0.310532808303833,
1.5000872611999512,
0.07492396980524063,
1.8367611169815063,
-0.5567082166671753,
0.6438838243484497,
-0.35276150703430176,
-1.0332622528076172,
0.7911953330039978,
-0.30181676149368286,
-2.0335311889648438,
-0.8474155068397522,
-0.9330716729164124,
-0.2897803485393524,
-0.7526431679725647,
1.0067596435546875,
-0.36823201179504395,
-1.2881019115447998,
0.3486921787261963,
-0.602583110332489,
0.0862414687871933,
-1.2016334533691406,
0.372646689414978,
0.7274556756019592,
-0.6102373600006104,
0.04210105165839195,
-0.22878317534923553,
-1.2860186100006104,
-0.5179656147956848,
0.19345708191394806,
1.9077990055084229,
-0.7967202663421631,
0.8818581700325012,
0.9639937281608582,
-0.7043230533599854,
-0.11360128223896027,
0.3829026222229004,
-0.2398652881383896,
0.8384339809417725,
-0.977629542350769,
-0.39434218406677246,
1.1083390712738037,
-0.21386773884296417,
-0.6276974678039551,
1.4736363887786865,
0.7552072405815125,
-0.8925168514251709,
-0.12932910025119781,
-0.19045338034629822,
-0.8828829526901245,
-0.08290313929319382,
-1.6325997114181519,
-0.20856738090515137,
0.22709184885025024,
-1.5229614973068237,
-0.5468628406524658,
-0.22367767989635468,
1.255386471748352,
-0.18846957385540009,
1.4432361125946045,
-0.39143186807632446,
-0.31353968381881714,
-0.3410087525844574,
-0.37851908802986145,
0.3087140619754791,
-0.14430542290210724,
-0.6188117265701294,
0.25057047605514526,
-0.8678178191184998,
0.28365492820739746,
1.449892282485962,
0.5101646780967712,
0.06556983292102814,
0.5870250463485718,
1.0823332071304321,
0.3777691125869751,
0.04186997190117836,
-0.9505931735038757,
-1.5207397937774658,
2.07670521736145,
-1.5426510572433472,
1.951617956161499,
0.7226778268814087,
-0.005002079531550407,
-1.835916519165039,
-1.7774754762649536,
1.3975330591201782,
1.1444523334503174,
2.292111396789551,
0.6909242272377014,
0.33824649453163147,
-0.8757538795471191,
-0.5719989538192749,
0.381961852312088,
-1.0057642459869385,
-0.7460010051727295,
0.0808190181851387,
2.3035995960235596,
1.7671985626220703,
-0.5788264274597168,
-0.08468279987573624,
-1.0116018056869507,
1.346929669380188,
-0.14196470379829407,
0.2576974928379059,
2.037367105484009,
-0.36276721954345703,
-1.1077909469604492,
1.2882018089294434,
-2.3233635425567627,
0.07735496759414673,
2.0044021606445312,
0.23299331963062286,
-0.04230433702468872,
-1.454654574394226,
-0.6157497763633728,
-0.18123941123485565,
-0.42350319027900696,
-1.3124607801437378,
0.6094768643379211,
-0.3950291574001312,
-0.7965497970581055,
-1.5186296701431274,
0.10794290155172348,
-1.2025797367095947,
-1.5541319847106934,
0.4153865575790405,
1.8211926221847534,
2.118401050567627,
-0.6053218841552734,
1.5564265251159668,
-0.25098899006843567,
0.20662276446819305,
1.267358660697937,
1.174720048904419,
3.1433279514312744,
1.8906408548355103,
-1.2405632734298706,
0.5883809924125671,
-0.13771399855613708,
-0.574153482913971,
1.1964455842971802,
-1.11433744430542,
1.2986950874328613,
-0.13117355108261108,
-1.1493107080459595,
-1.168426513671875,
1.0086047649383545,
0.47338348627090454,
0.10424384474754333,
-0.5058125257492065,
1.2245376110076904,
0.042829129844903946,
1.2669110298156738,
0.47734934091567993,
-0.3742991089820862,
0.5373652577400208,
-0.4765932261943817,
-0.5953872203826904,
1.5322493314743042,
0.14068098366260529,
-1.5002063512802124,
-2.288158893585205,
-0.27287906408309937,
-0.805540144443512,
-0.009665777906775475,
-0.540404736995697,
-1.013041615486145,
1.6354860067367554,
0.39599165320396423,
-1.199845314025879,
-0.3685532808303833,
-0.43439796566963196,
-0.7016003131866455,
2.5698089599609375,
-1.4127871990203857,
-0.2950904667377472,
-0.9534464478492737,
-0.5528744459152222,
1.575254201889038,
-1.217337965965271,
-0.10960153490304947,
-1.087817907333374,
-0.5806987881660461,
-1.3740946054458618,
-0.5468544363975525,
-0.07011674344539642,
-0.9644176959991455,
0.8570542931556702,
0.17925266921520233,
-1.007908582687378,
-0.26590126752853394,
-0.816161572933197,
0.6867126822471619,
-0.05080871284008026,
0.3940540552139282,
1.8797918558120728,
0.47521963715553284,
-0.40179139375686646,
0.6892806887626648,
1.114016056060791,
0.6390510201454163,
-0.6368727684020996,
0.1732570230960846,
-0.6179795861244202,
0.21921193599700928,
-1.2464250326156616,
0.2691730260848999,
-2.929936647415161,
0.6671273112297058,
-0.008705198764801025,
-0.18430987000465393,
0.002072692848742008,
-1.2430260181427002,
1.1039643287658691,
2.5507545471191406,
-1.2299195528030396,
0.4888608753681183,
0.25918370485305786,
1.1822631359100342,
-1.6132616996765137,
0.34449073672294617,
-0.4109693169593811,
2.0547120571136475,
0.1399809569120407,
1.074436902999878,
-0.5542897582054138,
-2.2371037006378174,
0.6089438199996948,
-1.2606642246246338,
-1.1821470260620117,
0.7315336465835571,
-0.8468146920204163,
0.03038957715034485,
-1.47321617603302,
-0.1306208372116089,
-0.9082969427108765,
-1.3158214092254639,
0.8383314609527588,
0.22711020708084106,
0.42315593361854553,
-0.6266487240791321,
0.3118429183959961,
-2.162095308303833,
-1.369736671447754,
-0.21559911966323853,
-0.8202250599861145,
0.5057127475738525,
-0.34374260902404785,
0.733758807182312,
-0.21465203166007996,
0.06595911085605621,
0.3962700366973877,
1.4160723686218262,
3.4164016246795654,
0.27498701214790344,
0.5185338854789734,
-0.13785937428474426,
-0.971041202545166,
1.5806351900100708,
0.9916796088218689,
-0.05438267067074776,
-0.5573091506958008,
-1.0605599880218506,
1.2331039905548096,
1.899790644645691,
0.9550177454948425,
0.09130893647670746,
-0.7307334542274475,
-0.49677136540412903,
-0.02382134646177292,
0.18041881918907166,
0.5393343567848206,
0.9288813471794128,
-0.06988891959190369,
0.12642450630664825,
1.4574756622314453,
1.2871989011764526,
-0.44463521242141724,
0.3434951603412628,
-0.7373688817024231,
-0.4044210612773895,
0.5418092608451843,
0.3025515079498291,
-0.0898580551147461,
0.4087405204772949,
-0.8954768776893616,
-0.24277301132678986,
-0.3853495121002197,
-1.1082147359848022,
-0.6596500873565674,
-0.5149015188217163,
-0.3754976689815521,
1.5697369575500488,
0.16295261681079865,
-0.49857884645462036,
-0.08671174198389053,
-0.9163886904716492,
-0.1413915455341339,
-1.1686770915985107,
0.23034609854221344,
-0.13846535980701447,
-0.11282344907522202,
-0.12239977717399597,
1.8312429189682007,
-0.9622868299484253,
-2.147345781326294,
0.19960367679595947,
0.30509865283966064,
-0.31483834981918335,
0.265187531709671,
1.4957919120788574,
0.43257930874824524,
1.42013418674469,
1.40855872631073,
0.8948259353637695,
-0.5756344199180603,
-1.3011146783828735,
0.669648289680481,
0.8735945224761963,
-1.4609277248382568,
0.9401281476020813,
-0.024124115705490112,
-0.6118809580802917,
0.8342788219451904,
1.2421128749847412,
0.4405764043331146,
-1.9478495121002197,
0.8812575936317444,
-0.7959678769111633,
0.8783065676689148,
0.6676777005195618,
0.7412741184234619,
0.19030654430389404,
0.8300434350967407,
-1.238002061843872,
-1.201451301574707,
-0.8188245296478271,
-0.5891168713569641,
1.9471815824508667,
-0.11100679636001587,
0.6215396523475647,
-0.17352761328220367,
-1.2564443349838257,
-0.13379338383674622,
0.5682131052017212,
0.33777838945388794,
-0.3117433190345764,
0.811673641204834,
-0.6634716987609863,
-1.2473498582839966,
-1.5062057971954346,
-0.43271687626838684,
-0.9327568411827087,
-0.9097694158554077,
1.14657461643219,
0.7718523144721985,
0.14789119362831116,
1.850875735282898,
0.5748118758201599,
0.12143348157405853,
-2.6225497722625732,
0.8462793827056885,
0.2963223457336426,
0.03573796898126602,
0.9276220202445984,
0.2563323676586151,
1.0865237712860107,
0.004656536504626274,
0.47651565074920654,
-2.315218210220337,
2.2640435695648193,
-0.34396326541900635,
0.7740471959114075,
-0.09873106330633163,
-0.1807638257741928,
1.109647512435913,
0.6244511604309082,
0.6224024295806885,
-1.062290072441101,
0.7139544486999512,
-0.6303813457489014,
1.2074693441390991,
1.1000652313232422,
-0.7370832562446594,
0.004955079406499863,
1.4186819791793823,
0.4839318096637726,
-0.45761680603027344,
-0.859794557094574,
-0.9002721309661865,
0.8751059174537659,
1.8412476778030396,
-0.022998325526714325,
0.061493951827287674,
0.8190439939498901,
0.6857585906982422,
-1.2824375629425049,
0.0891275629401207,
-0.7375926971435547,
-0.766010046005249,
1.6119976043701172,
2.0113296508789062,
-0.03960429131984711,
-0.09645964950323105,
-0.6952948570251465,
-1.2552719116210938,
0.7052299976348877,
-0.004310508258640766,
0.20128607749938965,
0.619904637336731,
-0.6493657827377319,
1.1502490043640137,
0.9357773661613464,
0.9034454226493835,
0.09035243839025497,
0.4016273617744446,
0.3773486316204071,
-0.2458469569683075,
-1.0963584184646606,
-0.24326474964618683,
-1.104150414466858,
-2.449262857437134,
0.39309826493263245,
-0.34747350215911865,
-1.4933600425720215,
-0.024828363209962845,
-0.9559515714645386,
0.9496527910232544,
-0.531286895275116,
-1.1270856857299805,
-1.5099503993988037,
0.14759548008441925,
-0.05462990328669548,
0.9319395422935486,
-1.5487693548202515,
-0.03618433699011803,
1.267408013343811,
0.8983172178268433,
-0.63521409034729,
1.0631515979766846,
0.2723492681980133,
1.0605318546295166,
0.7846028804779053,
-0.5071746706962585,
0.39012494683265686,
0.07780662924051285,
-1.3925983905792236,
0.43800005316734314,
1.0961096286773682,
0.15357308089733124,
1.3318625688552856,
-0.5246612429618835,
0.06924283504486084,
0.4008500874042511,
-0.5185807943344116,
-0.4713757038116455,
-0.5105011463165283,
0.723866879940033,
-0.019456587731838226,
-0.7951547503471375,
0.17259612679481506,
-0.12588883936405182,
-0.2688682973384857,
0.1637832671403885,
-1.5130831003189087,
-0.3514138162136078,
-0.48593127727508545,
-0.5732609033584595,
-1.3273977041244507,
0.03429323434829712,
1.3901087045669556,
-0.733643114566803,
-0.17437191307544708,
0.46553102135658264,
0.4496731460094452,
0.4827854335308075,
0.5874487161636353,
-0.6245442032814026,
-0.364181250333786,
-0.2500927448272705,
-0.3609972298145294,
0.22239015996456146,
1.2103854417800903,
-0.3006812036037445,
-0.9783554673194885,
0.7426621317863464,
-0.2631279230117798,
-0.03296753019094467,
1.8832311630249023,
0.07532177865505219,
-0.7655034065246582,
0.331763356924057,
-0.6053366661071777,
1.8831708431243896,
1.6817681789398193,
1.4472324848175049,
-0.16292375326156616,
-0.894449770450592,
0.6020230054855347,
-0.28377074003219604,
-0.3281250596046448,
0.8745778799057007,
0.5434827208518982,
-0.06399931758642197,
-1.3850723505020142,
0.5862699151039124,
1.2433760166168213,
-0.8880130052566528,
-0.7846867442131042,
0.1014828011393547,
-0.7906695008277893,
1.0479263067245483,
0.6420801877975464,
0.5350772142410278,
0.20943038165569305,
1.696473479270935,
0.5801496505737305,
-0.5850893259048462,
0.5362853407859802,
0.5343614816665649,
-0.1364811211824417,
-2.1544651985168457,
-1.0507844686508179,
0.2823348045349121,
-0.3945543169975281,
-1.5859020948410034,
1.302503228187561,
-1.151495099067688,
-0.9358468651771545,
0.5363212823867798,
0.12211555242538452,
1.4676828384399414,
0.3736642599105835,
1.5608340501785278,
2.1452367305755615,
0.8695617914199829,
0.37276095151901245,
1.3815438747406006,
-0.021137528121471405,
-0.31459519267082214,
1.9080294370651245,
-0.37064507603645325,
0.5410047173500061,
1.1435664892196655,
-0.4150673747062683,
-0.984802782535553,
-0.7242634296417236,
-1.1118242740631104,
-0.6037207245826721,
1.096030592918396,
0.15300564467906952,
-1.1119531393051147,
0.18042032420635223,
1.5277087688446045,
0.09788325428962708,
-0.33787229657173157,
0.5459772348403931,
0.528876006603241,
-0.6763015985488892,
-0.0776921808719635,
-0.9713596701622009,
0.5011976957321167,
-0.31603455543518066,
-0.3331807255744934,
0.4606395363807678,
0.43114614486694336,
1.2830216884613037,
-0.0600481815636158,
0.15351684391498566,
1.2511589527130127,
-1.374638557434082,
1.3997361660003662,
-0.5804803371429443,
0.12907074391841888,
-2.331472873687744,
1.4627622365951538,
-0.7224729657173157,
1.9731582403182983,
-2.663316011428833,
0.3393741548061371,
-0.6359966993331909,
-0.44220831990242004,
0.3241478204727173,
-0.37979432940483093,
0.0023106150329113007,
-0.19853781163692474,
-1.0333726406097412,
-0.015304561704397202,
-0.7277399897575378,
0.49862247705459595,
1.271447777748108,
1.2756614685058594,
-1.1232995986938477,
-0.34338024258613586,
-1.7396262884140015,
-0.22825905680656433,
-0.7029688358306885,
0.39500612020492554,
-2.146249294281006,
-0.29013144969940186,
-1.9989104270935059,
-2.4130289554595947,
-1.401102066040039,
-0.9250562191009521,
1.1896772384643555,
0.1804371178150177,
-0.8707330226898193,
1.160079002380371,
-0.356624960899353,
-1.8176928758621216,
0.9625169038772583,
-2.087193250656128
] |
https://github.com/huggingface/datasets/issues/6013 | [FR] `map` should reuse unchanged columns from the previous dataset to avoid disk usage | You can use the `remove_columns` parameter in `map` to avoid duplicating the columns (and save disk space) and then concatenate the original dataset with the map result:
```python
from datasets import concatenate_datasets
# dummy example
ds_new = ds.map(lambda x: {"new_col": x["col"] + 2}, remove_columns=ds.column_names)
ds_combined = concatenate_datasets([ds, ds_new], axis=1)
```
Doing this automatically is hard to implement efficiently unless we know ahead of time which existing columns will be modified by a `map` transform. We have this info when `input_columns` are specified, so I think this is the only case we can optimize. | ### Feature request
Currently adding a new column with `map` will cause all the data in the dataset to be duplicated and stored/cached on the disk again. It should reuse unchanged columns.
### Motivation
This allows having datasets with different columns but sharing some basic columns. Currently, these datasets would become too expensive to store and one would need some kind of on-the-fly join; which also doesn't seem implemented.
### Your contribution
_ | 69 | 93 | [FR] `map` should reuse unchanged columns from the previous dataset to avoid disk usage
### Feature request
Currently adding a new column with `map` will cause all the data in the dataset to be duplicated and stored/cached on the disk again. It should reuse unchanged columns.
### Motivation
This allows having datasets with different columns but sharing some basic columns. Currently, these datasets would become too expensive to store and one would need some kind of on-the-fly join; which also doesn't seem implemented.
### Your contribution
_
You can use the `remove_columns` parameter in `map` to avoid duplicating the columns (and save disk space) and then concatenate the original dataset with the map result:
```python
from datasets import concatenate_datasets
# dummy example
ds_new = ds.map(lambda x: {"new_col": x["col"] + 2}, remove_columns=ds.column_names)
ds_combined = concatenate_datasets([ds, ds_new], axis=1)
```
Doing this automatically is hard to implement efficiently unless we know ahead of time which existing columns will be modified by a `map` transform. We have this info when `input_columns` are specified, so I think this is the only case we can optimize. | [
-1.2324004173278809,
-0.8735470771789551,
-0.8409361839294434,
1.4102914333343506,
-0.16358308494091034,
-1.2469687461853027,
0.2068706750869751,
-1.1271222829818726,
1.7079567909240723,
-0.8972356915473938,
0.34180065989494324,
-1.6270281076431274,
0.01063393522053957,
-0.6709083914756775,
-0.794188916683197,
-0.8919113874435425,
-0.3063534200191498,
-0.6078149676322937,
1.0032271146774292,
2.5341010093688965,
1.218713402748108,
-1.3701467514038086,
2.695056676864624,
0.626136302947998,
-0.1504494845867157,
-0.8883141875267029,
0.5190467834472656,
-0.006964269559830427,
-1.2720913887023926,
-0.4500345289707184,
-0.8912839293479919,
-0.04757215082645416,
-0.559903621673584,
-0.5452548861503601,
-0.09951923787593842,
0.36451244354248047,
-0.3987385928630829,
-0.5529424548149109,
-0.5286913514137268,
-0.8630369901657104,
0.38655441999435425,
-0.2937549352645874,
0.9610965251922607,
-0.3794526159763336,
1.8826342821121216,
-0.582287609577179,
0.3861554265022278,
0.7320130467414856,
1.234381914138794,
0.23430190980434418,
-0.08051236718893051,
0.3505985736846924,
0.3744042217731476,
-0.05548333004117012,
0.5392482876777649,
1.1298468112945557,
0.5989659428596497,
0.5715447664260864,
0.7592294812202454,
-2.2490837574005127,
1.3265920877456665,
-1.0695281028747559,
0.2992826998233795,
1.3554768562316895,
-0.9683606028556824,
0.32520225644111633,
-1.6895378828048706,
-0.0825265571475029,
0.5770531892776489,
-2.294966459274292,
0.2885155975818634,
-1.2587933540344238,
-0.5492271780967712,
0.9630835056304932,
0.33446305990219116,
-1.2840278148651123,
0.06519274413585663,
-0.4221862852573395,
1.0411875247955322,
0.46633753180503845,
1.1430914402008057,
-1.7377738952636719,
-0.05257255211472511,
-0.4120379090309143,
0.10865531116724014,
-1.3922502994537354,
-1.5024702548980713,
0.5510357618331909,
0.6568443775177002,
0.5108065605163574,
-0.06472835689783096,
1.0428839921951294,
-1.020821213722229,
0.7631230354309082,
-0.9451024532318115,
-1.642423152923584,
-1.3941481113433838,
-2.2557830810546875,
-2.2322957515716553,
0.7268949151039124,
-0.42057254910469055,
-0.5399489998817444,
1.960621953010559,
-1.0395126342773438,
-1.7044702768325806,
1.1905479431152344,
0.25377991795539856,
-0.04132254049181938,
2.376398801803589,
0.2453496754169464,
-0.694868266582489,
0.49411407113075256,
-0.7405649423599243,
0.6994011402130127,
-0.5102626085281372,
1.2831488847732544,
0.388752281665802,
-1.1708581447601318,
1.695970058441162,
-0.5003952383995056,
0.5333751440048218,
-0.6889046430587769,
-0.4979873597621918,
-0.8254934549331665,
0.3300303518772125,
1.9304635524749756,
-0.3570075035095215,
1.6245577335357666,
-0.39232775568962097,
-1.5044957399368286,
-1.63264799118042,
0.9979318976402283,
0.37432363629341125,
-0.7061996459960938,
0.17006491124629974,
-0.42158210277557373,
0.12963075935840607,
-0.21154779195785522,
1.0954805612564087,
1.2218161821365356,
0.7527322769165039,
-0.2982877790927887,
-0.7711768746376038,
0.23788942396640778,
-0.05086567625403404,
-0.7857431173324585,
-1.826572299003601,
-0.23758861422538757,
0.09908536821603775,
0.6238328218460083,
-1.181621789932251,
1.7224825620651245,
0.8328770995140076,
1.9414342641830444,
1.055153727531433,
-0.2738111615180969,
1.4894837141036987,
0.09294117242097855,
1.8452097177505493,
-0.42110273241996765,
0.7079309821128845,
-0.3488519489765167,
-1.1466317176818848,
0.8900875449180603,
-0.33512911200523376,
-2.0287516117095947,
-0.7391099333763123,
-0.7889069318771362,
-0.09974674135446548,
-0.7680741548538208,
0.9550396800041199,
-0.2509630620479584,
-1.4175753593444824,
0.2428920567035675,
-0.7067140936851501,
0.18463686108589172,
-1.240214467048645,
0.32343852519989014,
0.7435894012451172,
-0.6052342653274536,
0.052833061665296555,
-0.2364780157804489,
-1.2413207292556763,
-0.39486250281333923,
0.2516709268093109,
1.8595820665359497,
-0.7709078192710876,
0.9147942066192627,
1.0222586393356323,
-0.6192833781242371,
-0.06624023616313934,
0.28210610151290894,
-0.3679219186306,
0.8776684403419495,
-1.028510332107544,
-0.3986290693283081,
1.229498028755188,
-0.21582689881324768,
-0.5726972222328186,
1.5465935468673706,
0.733714759349823,
-0.9950448870658875,
-0.10991097241640091,
-0.1296774446964264,
-0.8651109337806702,
0.04046154022216797,
-1.6008974313735962,
-0.0419953316450119,
0.4186754524707794,
-1.5422861576080322,
-0.5030608773231506,
-0.16378194093704224,
1.350642204284668,
-0.19193513691425323,
1.4242676496505737,
-0.4606594741344452,
-0.2187291830778122,
-0.30772072076797485,
-0.3202517330646515,
0.12944385409355164,
-0.11971720308065414,
-0.7196910381317139,
0.19633854925632477,
-0.6314760446548462,
0.2832351326942444,
1.4040473699569702,
0.3449203372001648,
0.04192115366458893,
0.5700697302818298,
1.1110877990722656,
0.3438781499862671,
-0.013829798437654972,
-0.8374153971672058,
-1.6111030578613281,
1.970559000968933,
-1.4348684549331665,
2.046189546585083,
0.7503607273101807,
-0.04397200420498848,
-1.8751622438430786,
-1.8931167125701904,
1.4092292785644531,
1.1354241371154785,
2.2500462532043457,
0.5232468843460083,
0.3469134569168091,
-0.8281733393669128,
-0.6585429310798645,
0.3077186942100525,
-0.9556342363357544,
-0.6994786262512207,
0.1304260939359665,
2.3346047401428223,
1.7783280611038208,
-0.46220484375953674,
-0.1724553406238556,
-1.0400696992874146,
1.3866254091262817,
-0.15142817795276642,
0.2240775227546692,
1.9076036214828491,
-0.314151406288147,
-1.0763171911239624,
1.279058575630188,
-2.3286821842193604,
0.09714704006910324,
1.99631929397583,
0.20312753319740295,
0.005748585797846317,
-1.2959741353988647,
-0.6617237329483032,
-0.28335556387901306,
-0.3688914477825165,
-1.2585121393203735,
0.4868815839290619,
-0.22335094213485718,
-0.7219984531402588,
-1.3663134574890137,
0.22090068459510803,
-1.0569491386413574,
-1.584139347076416,
0.31137603521347046,
1.85256028175354,
2.02893328666687,
-0.7270567417144775,
1.578492283821106,
-0.28146758675575256,
0.15491148829460144,
1.3154330253601074,
1.1949349641799927,
3.1625921726226807,
1.8400671482086182,
-1.3641858100891113,
0.699934184551239,
-0.057413119822740555,
-0.49784913659095764,
1.1491985321044922,
-1.2287176847457886,
1.335071325302124,
-0.16073784232139587,
-1.1827040910720825,
-1.219789981842041,
0.877609133720398,
0.4766799509525299,
0.09998554736375809,
-0.48530101776123047,
1.2898625135421753,
-0.03047213703393936,
1.3818488121032715,
0.5696897506713867,
-0.3391505181789398,
0.6006088852882385,
-0.4099985361099243,
-0.5184199213981628,
1.5292249917984009,
0.2577110230922699,
-1.3319110870361328,
-2.2733707427978516,
-0.16969530284404755,
-0.8248720169067383,
0.06524144858121872,
-0.6396192312240601,
-0.9629277586936951,
1.7136237621307373,
0.40379956364631653,
-1.1875832080841064,
-0.32222363352775574,
-0.38769957423210144,
-0.5543808341026306,
2.6951682567596436,
-1.5010102987289429,
-0.28779923915863037,
-1.0107738971710205,
-0.5964347720146179,
1.7039283514022827,
-1.213236689567566,
-0.23897859454154968,
-1.0370949506759644,
-0.5178307294845581,
-1.3216990232467651,
-0.5876335501670837,
-0.021361229941248894,
-0.9354448318481445,
0.8867629170417786,
0.1101393923163414,
-1.1867449283599854,
-0.34335601329803467,
-0.8994839787483215,
0.7913193702697754,
-0.18180817365646362,
0.3585870563983917,
1.7987916469573975,
0.3488211929798126,
-0.4732254445552826,
0.7333240509033203,
1.183114767074585,
0.6524492502212524,
-0.6850582957267761,
0.28432145714759827,
-0.6564725637435913,
0.32579168677330017,
-1.2415494918823242,
0.24375689029693604,
-2.8742623329162598,
0.592586874961853,
-0.07891534268856049,
-0.02870379015803337,
-0.023344937711954117,
-1.3433979749679565,
1.0400031805038452,
2.5573365688323975,
-1.1623094081878662,
0.4581991732120514,
0.3449614942073822,
1.2413687705993652,
-1.6519410610198975,
0.36456671357154846,
-0.4092799723148346,
2.1264092922210693,
0.21709221601486206,
1.196609616279602,
-0.47786831855773926,
-2.271564483642578,
0.6040659546852112,
-1.2491252422332764,
-1.2626655101776123,
0.9074847102165222,
-0.8002062439918518,
0.04582618549466133,
-1.436270833015442,
-0.2460954487323761,
-0.8461453914642334,
-1.2623658180236816,
0.6781926155090332,
0.13603104650974274,
0.5248653292655945,
-0.6465225219726562,
0.3443017303943634,
-2.1915283203125,
-1.3076539039611816,
-0.20478594303131104,
-0.9332974553108215,
0.4221636652946472,
-0.3416510224342346,
0.7028912305831909,
-0.23492734134197235,
0.021265428513288498,
0.3805044889450073,
1.387954592704773,
3.4704246520996094,
0.250636488199234,
0.3983243405818939,
-0.21678856015205383,
-0.8994291424751282,
1.4486762285232544,
0.9222763776779175,
-0.1063445657491684,
-0.5596323609352112,
-0.973442792892456,
1.2513893842697144,
1.9441641569137573,
0.9848142266273499,
0.0649680495262146,
-0.7901723980903625,
-0.6674136519432068,
-0.0943353921175003,
0.14069527387619019,
0.37068864703178406,
0.9403910636901855,
0.09747862815856934,
0.18498314917087555,
1.3563388586044312,
1.2659274339675903,
-0.46845802664756775,
0.42102357745170593,
-0.7655045986175537,
-0.4010178744792938,
0.6068229079246521,
0.356172114610672,
-0.04486194998025894,
0.2913369834423065,
-0.9728901982307434,
-0.2895457148551941,
-0.4335004985332489,
-0.9523840546607971,
-0.6552569270133972,
-0.4994760751724243,
-0.3740818500518799,
1.5979928970336914,
0.09320999681949615,
-0.44862157106399536,
-0.08998537808656693,
-0.8000288009643555,
-0.08711525797843933,
-1.0963321924209595,
0.2318214774131775,
-0.16188539564609528,
-0.1427634060382843,
-0.027754854410886765,
1.791557788848877,
-0.9377330541610718,
-2.0884287357330322,
0.20276501774787903,
0.23705822229385376,
-0.25094616413116455,
0.18689079582691193,
1.601090908050537,
0.47511255741119385,
1.4295825958251953,
1.3669966459274292,
0.9091282486915588,
-0.745367169380188,
-1.2892735004425049,
0.675727128982544,
1.0559782981872559,
-1.4291424751281738,
0.7697518467903137,
0.03491697087883949,
-0.5533312559127808,
0.6487493515014648,
1.2376600503921509,
0.5229500532150269,
-1.9565938711166382,
0.6987877488136292,
-0.9456214308738708,
0.7222620248794556,
0.716786801815033,
0.6729820966720581,
0.2729981541633606,
0.7906193733215332,
-1.1921157836914062,
-1.1342623233795166,
-0.7327343225479126,
-0.6849983930587769,
1.8823734521865845,
-0.2979400157928467,
0.6408420205116272,
-0.05551254004240036,
-1.2912967205047607,
-0.001529879868030548,
0.7961056232452393,
0.33838117122650146,
-0.397940069437027,
0.7096188068389893,
-0.7707280516624451,
-1.0765509605407715,
-1.39621901512146,
-0.4347454309463501,
-1.1140199899673462,
-0.9144942164421082,
1.099553108215332,
0.8888787031173706,
0.18095086514949799,
1.9181406497955322,
0.7264702916145325,
0.23531468212604523,
-2.5403378009796143,
0.8514227867126465,
0.27984780073165894,
-0.02156640589237213,
0.8909873366355896,
0.30210259556770325,
1.055127501487732,
0.06002264842391014,
0.5572713017463684,
-2.5821328163146973,
2.3156700134277344,
-0.24312059581279755,
0.6399980187416077,
-0.16470544040203094,
-0.1872156411409378,
1.1494884490966797,
0.5882327556610107,
0.4731028079986572,
-1.066487431526184,
0.6997432708740234,
-0.628194272518158,
1.2577139139175415,
0.9233746528625488,
-0.8303405046463013,
-0.05735872685909271,
1.3312313556671143,
0.44498196244239807,
-0.4869648814201355,
-0.8809991478919983,
-0.9374053478240967,
0.8937253952026367,
1.7029848098754883,
0.007933669723570347,
0.02559066191315651,
0.8760568499565125,
0.7048471570014954,
-1.2892240285873413,
0.14079523086547852,
-0.7346354722976685,
-0.8427584767341614,
1.673488736152649,
1.9949350357055664,
-0.07947191596031189,
-0.05064859986305237,
-0.8206357955932617,
-1.2657780647277832,
0.8285020589828491,
-0.02013465017080307,
0.1387062668800354,
0.5829408168792725,
-0.6202247142791748,
1.0696345567703247,
0.9065641760826111,
0.8644469380378723,
0.26042604446411133,
0.2303033322095871,
0.447243332862854,
-0.24940292537212372,
-1.166075587272644,
-0.28289180994033813,
-1.1216459274291992,
-2.5728118419647217,
0.48037219047546387,
-0.35199224948883057,
-1.4498411417007446,
-0.024878446012735367,
-0.9887760877609253,
0.9171514511108398,
-0.6406387686729431,
-1.1393953561782837,
-1.4920440912246704,
0.24020089209079742,
-0.04773658141493797,
0.9020315408706665,
-1.5403486490249634,
-0.22124220430850983,
1.2574193477630615,
0.890981912612915,
-0.6105868220329285,
1.0416278839111328,
0.19062578678131104,
1.0061267614364624,
0.8603560924530029,
-0.41697344183921814,
0.5315457582473755,
0.00819579791277647,
-1.3236467838287354,
0.5798259973526001,
1.1691473722457886,
0.14395080506801605,
1.5878764390945435,
-0.525944709777832,
-0.03949896618723869,
0.38307756185531616,
-0.4439331293106079,
-0.457704097032547,
-0.617236316204071,
0.6987577080726624,
0.017686549574136734,
-0.8316393494606018,
-0.002620417159050703,
-0.05359935015439987,
-0.30394646525382996,
0.10052856057882309,
-1.4535691738128662,
-0.08765541762113571,
-0.40138378739356995,
-0.7013838887214661,
-1.2231365442276,
-0.035249002277851105,
1.3893033266067505,
-0.7559124231338501,
-0.16037724912166595,
0.4793098270893097,
0.4180852472782135,
0.578606128692627,
0.7368746995925903,
-0.6174350380897522,
-0.38284558057785034,
-0.2826729118824005,
-0.2922065854072571,
0.4040408134460449,
1.3823657035827637,
-0.1263369917869568,
-1.0102072954177856,
0.7141872644424438,
-0.33818283677101135,
0.007203836925327778,
1.967074990272522,
0.21228325366973877,
-0.7286556363105774,
0.3193728029727936,
-0.7121219038963318,
2.037747859954834,
1.808109998703003,
1.3316432237625122,
-0.058144379407167435,
-0.9518530368804932,
0.6771427989006042,
-0.34525614976882935,
-0.34705597162246704,
0.932790219783783,
0.3661004900932312,
-0.1943386197090149,
-1.4891384840011597,
0.7232328653335571,
1.2388187646865845,
-0.8732369542121887,
-0.8288882970809937,
-0.004355211742222309,
-0.7854213714599609,
1.0994876623153687,
0.6763489842414856,
0.3358438014984131,
0.37059539556503296,
1.5721733570098877,
0.672126829624176,
-0.4319303035736084,
0.4564836025238037,
0.5311805009841919,
-0.12203037738800049,
-2.158039093017578,
-1.101360559463501,
0.3974470794200897,
-0.4712386727333069,
-1.5044481754302979,
1.4340537786483765,
-1.1195456981658936,
-0.9774285554885864,
0.48429134488105774,
0.04892352968454361,
1.375166893005371,
0.3494466543197632,
1.5900355577468872,
2.1166350841522217,
0.8386135101318359,
0.30614998936653137,
1.2538515329360962,
-0.22987665235996246,
-0.45411163568496704,
1.7849465608596802,
-0.4504930078983307,
0.5140958428382874,
1.1083602905273438,
-0.34817469120025635,
-1.0539867877960205,
-0.7529565691947937,
-1.2241977453231812,
-0.6591148972511292,
1.15012526512146,
0.09806668758392334,
-1.0697638988494873,
0.13991132378578186,
1.5011504888534546,
0.11444291472434998,
-0.3822097182273865,
0.5719961524009705,
0.4512902796268463,
-0.8167772889137268,
-0.071338951587677,
-0.9682325720787048,
0.6149594783782959,
-0.23666854202747345,
-0.2950075566768646,
0.3809518814086914,
0.5313668251037598,
1.3276206254959106,
-0.14723756909370422,
0.14325658977031708,
1.180992841720581,
-1.4500330686569214,
1.3875298500061035,
-0.7504155039787292,
0.12996600568294525,
-2.373671293258667,
1.3761870861053467,
-0.6793113946914673,
1.9007350206375122,
-2.6899962425231934,
0.4214995205402374,
-0.5992034077644348,
-0.32405632734298706,
0.4253377616405487,
-0.3402980864048004,
0.10626764595508575,
-0.19381549954414368,
-1.1849534511566162,
-0.10730164498090744,
-0.7269962430000305,
0.5462132692337036,
1.1013718843460083,
1.239459753036499,
-1.1788681745529175,
-0.23095466196537018,
-1.6063131093978882,
-0.18568870425224304,
-0.701838493347168,
0.2593609392642975,
-1.9817777872085571,
-0.1325758397579193,
-2.032893657684326,
-2.350649118423462,
-1.2825325727462769,
-0.748045802116394,
1.1359190940856934,
0.12773942947387695,
-0.939889669418335,
1.2098723649978638,
-0.39511042833328247,
-1.8804736137390137,
1.0920907258987427,
-2.141512393951416
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | You can use `with_transform` to get a new dataset object.
Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex. | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 70 | 35 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
You can use `with_transform` to get a new dataset object.
Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex. | [
-1.0870513916015625,
-0.9203515648841858,
-0.8573570251464844,
1.4368737936019897,
-0.1696109026670456,
-1.388630986213684,
0.2150905728340149,
-1.219287395477295,
1.7853586673736572,
-0.8614228963851929,
0.3620818257331848,
-1.6746468544006348,
0.015742499381303787,
-0.6540535092353821,
-0.7231379747390747,
-0.948523998260498,
-0.31842926144599915,
-0.6957663297653198,
0.9943236112594604,
2.542827606201172,
1.1124368906021118,
-1.2473602294921875,
2.6670196056365967,
0.7277331352233887,
-0.2373880296945572,
-0.9374748468399048,
0.541606068611145,
0.025281578302383423,
-1.2135285139083862,
-0.4809584319591522,
-1.010582685470581,
-0.08543343842029572,
-0.5091949701309204,
-0.6157127618789673,
-0.06634962558746338,
0.3886587917804718,
-0.3085585832595825,
-0.48936283588409424,
-0.5020923614501953,
-0.8779275417327881,
0.4094198942184448,
-0.34452375769615173,
0.9772657155990601,
-0.3858107924461365,
1.8654544353485107,
-0.5637815594673157,
0.36067289113998413,
0.7099567651748657,
1.3073616027832031,
0.13481517136096954,
-0.0718272253870964,
0.2823718190193176,
0.44880348443984985,
-0.07471252232789993,
0.4024851620197296,
1.1473745107650757,
0.5988900661468506,
0.6708149909973145,
0.7521924376487732,
-2.2072551250457764,
1.3568928241729736,
-1.0266549587249756,
0.33275464177131653,
1.2872520685195923,
-0.9523167610168457,
0.32981452345848083,
-1.7094497680664062,
-0.06182299554347992,
0.494905561208725,
-2.278992176055908,
0.20215828716754913,
-1.260249137878418,
-0.6219971776008606,
0.885617733001709,
0.3398432731628418,
-1.2474844455718994,
0.1282554715871811,
-0.39156314730644226,
1.00827157497406,
0.5720029473304749,
1.1217421293258667,
-1.8233768939971924,
-0.03689736872911453,
-0.3824955224990845,
0.06309986114501953,
-1.378144383430481,
-1.499497890472412,
0.5800857543945312,
0.7270793318748474,
0.6752299070358276,
-0.07378411293029785,
1.0146583318710327,
-0.9785358309745789,
0.751387894153595,
-0.9405162334442139,
-1.7475359439849854,
-1.3286641836166382,
-2.2262814044952393,
-2.308502674102783,
0.7737829685211182,
-0.44505584239959717,
-0.5441896915435791,
2.048980474472046,
-0.9826439023017883,
-1.8134180307388306,
1.1142648458480835,
0.19058240950107574,
-0.09346307069063187,
2.409902572631836,
0.2885788083076477,
-0.6424860954284668,
0.4313333332538605,
-0.6939746737480164,
0.7897084951400757,
-0.5360044836997986,
1.4007309675216675,
0.422478049993515,
-1.0696791410446167,
1.629989504814148,
-0.44681820273399353,
0.6185279488563538,
-0.6922246217727661,
-0.4566871225833893,
-0.82940673828125,
0.38265034556388855,
1.8465373516082764,
-0.3700686991214752,
1.5681513547897339,
-0.35014376044273376,
-1.5155259370803833,
-1.6876689195632935,
0.8880872130393982,
0.39705803990364075,
-0.7441200017929077,
0.17813079059123993,
-0.3169446289539337,
0.047563981264829636,
-0.04418807104229927,
1.2127701044082642,
1.1762652397155762,
0.7378991842269897,
-0.3054253160953522,
-0.8400096893310547,
0.3307800889015198,
-0.026392783969640732,
-0.7823308110237122,
-1.71430242061615,
-0.38313746452331543,
0.08282913267612457,
0.6176645755767822,
-1.1754379272460938,
1.7775903940200806,
0.8239943981170654,
1.9887362718582153,
0.9656467437744141,
-0.3102194666862488,
1.3510479927062988,
-0.04596051573753357,
1.8915146589279175,
-0.48925670981407166,
0.7147141098976135,
-0.34282100200653076,
-1.0910937786102295,
0.865983247756958,
-0.3859352171421051,
-1.914027452468872,
-0.7576699256896973,
-0.9682809710502625,
-0.13856816291809082,
-0.7729878425598145,
0.9781203269958496,
-0.3279627859592438,
-1.3882299661636353,
0.24568815529346466,
-0.7190391421318054,
0.07838600128889084,
-1.2285866737365723,
0.2603413760662079,
0.8219919800758362,
-0.6397504806518555,
0.08803875744342804,
-0.28867107629776,
-1.2623873949050903,
-0.4734833836555481,
0.32997262477874756,
1.9811149835586548,
-0.7233709096908569,
0.9019386768341064,
1.0264265537261963,
-0.7228953838348389,
-0.02892555296421051,
0.3362797498703003,
-0.2744191288948059,
0.7769801020622253,
-1.1029430627822876,
-0.35429778695106506,
1.145911693572998,
-0.16866713762283325,
-0.6735944747924805,
1.488967776298523,
0.747793436050415,
-1.0169785022735596,
-0.10760893672704697,
-0.2327127754688263,
-0.743068277835846,
-0.015180086717009544,
-1.6100555658340454,
-0.04931013658642769,
0.3943558633327484,
-1.5168297290802002,
-0.5038382411003113,
-0.22341249883174896,
1.259066104888916,
-0.08053738623857498,
1.3162657022476196,
-0.3307521641254425,
-0.3706505000591278,
-0.3922436237335205,
-0.3718813955783844,
0.15682943165302277,
-0.3286132216453552,
-0.6609498262405396,
0.2253967523574829,
-0.6201995015144348,
0.32719576358795166,
1.4310578107833862,
0.29266926646232605,
0.1307058483362198,
0.6161509156227112,
1.0749832391738892,
0.34036874771118164,
-0.1234029233455658,
-0.8954752683639526,
-1.4714603424072266,
1.9762910604476929,
-1.3519763946533203,
1.8593065738677979,
0.7040567994117737,
-0.06037343665957451,
-1.9155380725860596,
-1.9275195598602295,
1.414015531539917,
1.277913212776184,
2.2168426513671875,
0.6434193849563599,
0.30643367767333984,
-0.7780956029891968,
-0.6363994479179382,
0.28589296340942383,
-0.9977704286575317,
-0.7643299102783203,
0.16692523658275604,
2.3177342414855957,
1.848715901374817,
-0.4802747368812561,
-0.2625022232532501,
-1.154712438583374,
1.3553922176361084,
-0.12454638630151749,
0.19465771317481995,
1.9947165250778198,
-0.4495503306388855,
-1.0139683485031128,
1.233896255493164,
-2.286435127258301,
0.032906729727983475,
1.9444650411605835,
0.19587261974811554,
0.06395667046308517,
-1.3847514390945435,
-0.7135884761810303,
-0.29827114939689636,
-0.40544208884239197,
-1.2855823040008545,
0.4824921786785126,
-0.23969712853431702,
-0.7369368672370911,
-1.543769359588623,
0.22798895835876465,
-0.9760186672210693,
-1.626001238822937,
0.2533288598060608,
1.7871437072753906,
1.9336310625076294,
-0.7968984842300415,
1.596737265586853,
-0.2310383915901184,
0.17157737910747528,
1.3047935962677002,
1.134932041168213,
3.1330246925354004,
1.9586702585220337,
-1.177761197090149,
0.7984734773635864,
-0.08025558292865753,
-0.4266379177570343,
1.2546658515930176,
-1.1776703596115112,
1.308646321296692,
-0.2988400161266327,
-1.2006171941757202,
-1.2812128067016602,
0.8751236796379089,
0.41125839948654175,
0.08580541610717773,
-0.5011377334594727,
1.3251168727874756,
0.043287765234708786,
1.3213001489639282,
0.5976966619491577,
-0.3345310688018799,
0.6971433758735657,
-0.41363969445228577,
-0.5062171816825867,
1.5866450071334839,
0.3410228192806244,
-1.3689364194869995,
-2.310965061187744,
-0.1785755604505539,
-0.7588961720466614,
0.0680285170674324,
-0.5961343050003052,
-0.9649561643600464,
1.7628084421157837,
0.4755394160747528,
-1.1778268814086914,
-0.25850725173950195,
-0.3354686200618744,
-0.583685040473938,
2.7818002700805664,
-1.4518054723739624,
-0.2962135970592499,
-1.067539095878601,
-0.5455604195594788,
1.7015001773834229,
-1.2747808694839478,
-0.18122656643390656,
-0.9965190887451172,
-0.5292255878448486,
-1.3302894830703735,
-0.515843391418457,
-0.0337858647108078,
-0.8940100073814392,
0.8539891242980957,
0.1424432247877121,
-1.148384928703308,
-0.31919345259666443,
-0.8898822665214539,
0.807654082775116,
-0.205265611410141,
0.33112117648124695,
1.96414315700531,
0.48904380202293396,
-0.43033260107040405,
0.7097864151000977,
1.1445621252059937,
0.5565465092658997,
-0.7611448168754578,
0.2808937728404999,
-0.7417773604393005,
0.30448412895202637,
-1.2127437591552734,
0.2022870033979416,
-2.8987996578216553,
0.5274494886398315,
-0.1480584740638733,
-0.13757233321666718,
0.04564491659402847,
-1.3528192043304443,
1.0773476362228394,
2.5765883922576904,
-1.2699508666992188,
0.4493352472782135,
0.27236056327819824,
1.281905174255371,
-1.5189989805221558,
0.36406412720680237,
-0.41605502367019653,
2.039388656616211,
0.17500782012939453,
1.1835933923721313,
-0.45450103282928467,
-2.1519453525543213,
0.6010215878486633,
-1.2636666297912598,
-1.2399953603744507,
0.748673141002655,
-0.8386664986610413,
0.029205400496721268,
-1.3507317304611206,
-0.09448208659887314,
-0.804985523223877,
-1.3509700298309326,
0.7572618722915649,
0.12983888387680054,
0.5958341956138611,
-0.6458600759506226,
0.3729816675186157,
-2.0810844898223877,
-1.4136738777160645,
-0.2693674564361572,
-0.9170699715614319,
0.38333988189697266,
-0.259202241897583,
0.7044995427131653,
-0.33036279678344727,
0.029105208814144135,
0.3910306990146637,
1.3888176679611206,
3.4686992168426514,
0.20296895503997803,
0.4143931269645691,
-0.13830718398094177,
-0.9349179863929749,
1.4332448244094849,
0.9521730542182922,
0.005723805166780949,
-0.53560870885849,
-0.9837060570716858,
1.2536120414733887,
2.0099034309387207,
0.9962841272354126,
0.06073158234357834,
-0.7477275729179382,
-0.6546434760093689,
0.0022621601819992065,
0.2633199393749237,
0.37054693698883057,
0.9497440457344055,
0.09959980845451355,
0.10464903712272644,
1.430646538734436,
1.2445510625839233,
-0.5064143538475037,
0.5077044367790222,
-0.8351799845695496,
-0.4105963706970215,
0.6076451539993286,
0.4125221371650696,
0.009805162437260151,
0.32700425386428833,
-1.015587568283081,
-0.3277343213558197,
-0.43377742171287537,
-0.9734768867492676,
-0.6939134001731873,
-0.4053809642791748,
-0.3768291473388672,
1.6673556566238403,
-0.0019444404169917107,
-0.5199983716011047,
-0.06811673194169998,
-0.7306973338127136,
-0.042744360864162445,
-0.9376040697097778,
0.24292312562465668,
-0.13510359823703766,
-0.16654068231582642,
0.03456876426935196,
1.8151496648788452,
-0.9991115927696228,
-2.0473289489746094,
0.366508811712265,
0.2895163297653198,
-0.4108084738254547,
0.29493147134780884,
1.5438401699066162,
0.5505620241165161,
1.5352164506912231,
1.387865662574768,
0.9865003228187561,
-0.7541331052780151,
-1.3890999555587769,
0.6299967169761658,
0.9917664527893066,
-1.4022704362869263,
0.7566369771957397,
0.07088525593280792,
-0.5486825108528137,
0.6272211074829102,
1.2270153760910034,
0.5005776882171631,
-1.9019168615341187,
0.61153644323349,
-0.8538903594017029,
0.7528513073921204,
0.7800754904747009,
0.7382535338401794,
0.24790529906749725,
0.7602933049201965,
-1.221372365951538,
-1.1939939260482788,
-0.7884342670440674,
-0.5444208979606628,
1.9079495668411255,
-0.21875400841236115,
0.6617186665534973,
-0.10168641805648804,
-1.3211591243743896,
-0.08916738629341125,
0.7894701957702637,
0.40841618180274963,
-0.4986541271209717,
0.7613766193389893,
-0.6623284816741943,
-0.9860446453094482,
-1.3865561485290527,
-0.4499518871307373,
-1.101572871208191,
-0.9620277285575867,
1.0949442386627197,
0.8538132309913635,
0.2539626955986023,
1.9723472595214844,
0.644902229309082,
0.3011489808559418,
-2.5557401180267334,
0.8776987791061401,
0.30056533217430115,
0.03389635309576988,
0.8492864966392517,
0.38208070397377014,
0.9785847067832947,
-0.05084465071558952,
0.5718042850494385,
-2.386305570602417,
2.3499348163604736,
-0.1985136866569519,
0.5822121500968933,
-0.030598554760217667,
-0.14804518222808838,
1.1192744970321655,
0.4378657937049866,
0.49460259079933167,
-1.10125732421875,
0.6392512917518616,
-0.6397157907485962,
1.3365702629089355,
0.9255481958389282,
-0.85624760389328,
0.047499362379312515,
1.3639042377471924,
0.5992116928100586,
-0.4504162073135376,
-0.8388828039169312,
-1.0700218677520752,
0.9033281803131104,
1.6802632808685303,
-0.1019202247262001,
-0.058373626321554184,
0.8755770921707153,
0.6164088845252991,
-1.3728581666946411,
0.09248023480176926,
-0.7353264093399048,
-0.6787053346633911,
1.6588616371154785,
1.9220538139343262,
-0.18329566717147827,
-0.0546257346868515,
-0.7767751812934875,
-1.135174036026001,
0.7972558736801147,
0.12022074311971664,
0.011240583844482899,
0.7619341015815735,
-0.6293237209320068,
1.087539553642273,
0.8347092270851135,
0.8286650776863098,
0.25825655460357666,
0.35753482580184937,
0.40902602672576904,
-0.35447269678115845,
-1.1488068103790283,
-0.19558879733085632,
-1.1577999591827393,
-2.5810041427612305,
0.40715721249580383,
-0.36910170316696167,
-1.461747169494629,
0.01713961362838745,
-1.0937937498092651,
0.946207582950592,
-0.5819486975669861,
-0.9482095241546631,
-1.5123244524002075,
0.23755048215389252,
-0.09081678837537766,
0.8878150582313538,
-1.4971418380737305,
-0.05207185819745064,
1.232211709022522,
0.9843617081642151,
-0.8063666820526123,
0.9920425415039062,
0.19804969429969788,
1.0621591806411743,
0.89158695936203,
-0.38686439394950867,
0.4722595810890198,
0.009406325407326221,
-1.412420630455017,
0.5431482195854187,
1.1244174242019653,
0.18717321753501892,
1.443913221359253,
-0.5233688950538635,
0.018463175743818283,
0.46074745059013367,
-0.4046935737133026,
-0.4344417452812195,
-0.6250035166740417,
0.7192236185073853,
0.06036555767059326,
-0.8592718839645386,
0.09858788549900055,
-0.018192455172538757,
-0.25848838686943054,
0.30001020431518555,
-1.4969580173492432,
-0.24072706699371338,
-0.40394264459609985,
-0.5944586396217346,
-1.2280776500701904,
0.0108053432777524,
1.3447487354278564,
-0.657102644443512,
-0.18180575966835022,
0.47521793842315674,
0.3682435154914856,
0.454891562461853,
0.6141859889030457,
-0.6550023555755615,
-0.341837078332901,
-0.33225947618484497,
-0.3300367295742035,
0.41051971912384033,
1.3376789093017578,
-0.20448462665081024,
-1.0600825548171997,
0.7629953026771545,
-0.39154136180877686,
0.04941520467400551,
1.9477999210357666,
0.09520835429430008,
-0.8877471089363098,
0.1596813201904297,
-0.6583638191223145,
1.9517930746078491,
1.6918210983276367,
1.2871700525283813,
-0.030657101422548294,
-0.9214220643043518,
0.6159878373146057,
-0.14204208552837372,
-0.3510599434375763,
0.9187985062599182,
0.34658244252204895,
-0.21486258506774902,
-1.3732739686965942,
0.6068587899208069,
1.2301270961761475,
-0.7726155519485474,
-0.9191813468933105,
0.0023323828354477882,
-0.7960498929023743,
1.115251064300537,
0.7487322688102722,
0.3779173195362091,
0.3299253582954407,
1.5941970348358154,
0.7144657969474792,
-0.39879050850868225,
0.500781774520874,
0.4130520522594452,
-0.09453734010457993,
-2.148320198059082,
-1.0716652870178223,
0.30987098813056946,
-0.4589385688304901,
-1.6243317127227783,
1.336464285850525,
-1.2286005020141602,
-0.827834963798523,
0.5164920091629028,
0.08299538493156433,
1.4761440753936768,
0.3244297504425049,
1.4978469610214233,
2.1252620220184326,
0.8548229336738586,
0.3028230667114258,
1.3695842027664185,
-0.18544651567935944,
-0.4466798007488251,
1.8458606004714966,
-0.5176195502281189,
0.4794423282146454,
1.1002877950668335,
-0.34340569376945496,
-1.0242136716842651,
-0.7141612768173218,
-1.2000281810760498,
-0.6282159090042114,
1.10337495803833,
0.10070433467626572,
-1.2637901306152344,
0.23598644137382507,
1.4351692199707031,
0.08291622996330261,
-0.32349666953086853,
0.5402989387512207,
0.43641871213912964,
-0.7880532741546631,
-0.05366784706711769,
-0.888331413269043,
0.5660545825958252,
-0.12855325639247894,
-0.31544482707977295,
0.41604360938072205,
0.4400341510772705,
1.2077510356903076,
-0.06485501676797867,
0.20054607093334198,
1.150223970413208,
-1.3956724405288696,
1.5276826620101929,
-0.6150730848312378,
0.1312745213508606,
-2.385453701019287,
1.452247977256775,
-0.7512289881706238,
1.8657310009002686,
-2.725938558578491,
0.372209757566452,
-0.5312092900276184,
-0.4161684215068817,
0.40844637155532837,
-0.34364816546440125,
0.14356215298175812,
-0.24307391047477722,
-1.1861664056777954,
-0.07737591862678528,
-0.8028931617736816,
0.4731845557689667,
1.0479693412780762,
1.2992769479751587,
-1.0758018493652344,
-0.3162061274051666,
-1.7195512056350708,
-0.09450840950012207,
-0.7067108154296875,
0.37102556228637695,
-2.0858452320098877,
-0.21999162435531616,
-1.8794687986373901,
-2.4461307525634766,
-1.3238897323608398,
-0.8126360774040222,
1.089397668838501,
0.07415066659450531,
-0.9258559346199036,
1.1474674940109253,
-0.3342975974082947,
-1.9095287322998047,
1.055496096611023,
-2.2389566898345947
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | > You can use `with_transform` to get a new dataset object.
>
> Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex.
I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
`with_transform` still does not chain AFAIU. | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 70 | 71 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
> You can use `with_transform` to get a new dataset object.
>
> Support for lazy `map` has already been discussed [here](https://github.com/huggingface/datasets/issues/3385) a little bit. Personally, I'm not a fan, as this would make `map` even more complex.
I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
`with_transform` still does not chain AFAIU. | [
-1.1263421773910522,
-0.9593272805213928,
-0.8358762860298157,
1.4299806356430054,
-0.12573891878128052,
-1.338568091392517,
0.19718705117702484,
-1.1990231275558472,
1.7749491930007935,
-0.850988507270813,
0.36475086212158203,
-1.6722731590270996,
0.05434294790029526,
-0.6038029193878174,
-0.7872963547706604,
-0.9358935952186584,
-0.3470193147659302,
-0.7503823637962341,
0.9716604948043823,
2.552086114883423,
1.11770498752594,
-1.3061710596084595,
2.61366868019104,
0.6825992465019226,
-0.18754906952381134,
-0.9897490739822388,
0.5219323635101318,
-0.02772323042154312,
-1.1981067657470703,
-0.4929591715335846,
-0.9602220058441162,
-0.08179077506065369,
-0.5508907437324524,
-0.6572283506393433,
-0.06097358837723732,
0.3542077839374542,
-0.29099777340888977,
-0.40945085883140564,
-0.4498082995414734,
-0.8691789507865906,
0.44690901041030884,
-0.37072423100471497,
1.036792516708374,
-0.3746722638607025,
1.8527172803878784,
-0.5271697044372559,
0.4402925968170166,
0.6807684898376465,
1.3736097812652588,
0.20100580155849457,
-0.08566559851169586,
0.22518959641456604,
0.44781294465065,
-0.03467104956507683,
0.41295769810676575,
1.083236813545227,
0.6010262966156006,
0.6067104339599609,
0.7915633916854858,
-2.214132785797119,
1.3623871803283691,
-1.014757752418518,
0.3284289240837097,
1.2677632570266724,
-0.8825066089630127,
0.32796820998191833,
-1.7317949533462524,
-0.05232589319348335,
0.5565678477287292,
-2.2753632068634033,
0.17949730157852173,
-1.3244928121566772,
-0.56090247631073,
0.9270249009132385,
0.3220627009868622,
-1.2352614402770996,
0.12759526073932648,
-0.33297616243362427,
0.9944685101509094,
0.574890673160553,
1.1180657148361206,
-1.8439934253692627,
-0.06546936184167862,
-0.3504880368709564,
0.160129114985466,
-1.3250662088394165,
-1.5061721801757812,
0.5583629608154297,
0.6831318140029907,
0.6056539416313171,
-0.021504411473870277,
1.0016220808029175,
-0.9424177408218384,
0.7255595326423645,
-0.9471175670623779,
-1.6895196437835693,
-1.3254157304763794,
-2.2146918773651123,
-2.364436388015747,
0.6946141123771667,
-0.48534104228019714,
-0.48026731610298157,
2.0421059131622314,
-1.031776785850525,
-1.8314619064331055,
1.125363826751709,
0.20470470190048218,
-0.06449060887098312,
2.346926689147949,
0.20013996958732605,
-0.6430018544197083,
0.45363086462020874,
-0.7004448771476746,
0.7620480060577393,
-0.5375604629516602,
1.3990802764892578,
0.44433167576789856,
-1.036900281906128,
1.6443408727645874,
-0.4673861265182495,
0.6052634716033936,
-0.7059138417243958,
-0.47555893659591675,
-0.818267285823822,
0.40563133358955383,
1.883750319480896,
-0.3861630856990814,
1.595367193222046,
-0.3285383880138397,
-1.5986915826797485,
-1.671272873878479,
0.8858343362808228,
0.40074390172958374,
-0.7707991003990173,
0.14958703517913818,
-0.3420559763908386,
0.05338726192712784,
-0.05820099264383316,
1.1344218254089355,
1.2153983116149902,
0.7467028498649597,
-0.30676886439323425,
-0.8821890950202942,
0.2751711905002594,
-0.0536404587328434,
-0.7506327629089355,
-1.713952898979187,
-0.39983615279197693,
0.08079709857702255,
0.6582541465759277,
-1.1894184350967407,
1.743186354637146,
0.8245139718055725,
2.0043978691101074,
0.9858722686767578,
-0.29305559396743774,
1.365893840789795,
0.022669415920972824,
1.904928207397461,
-0.48380792140960693,
0.7021108865737915,
-0.3297244906425476,
-1.0717062950134277,
0.8690896034240723,
-0.4105452001094818,
-1.9331191778182983,
-0.7142226696014404,
-0.9564977288246155,
-0.1557433158159256,
-0.7827236652374268,
0.9375472664833069,
-0.3146713078022003,
-1.4143939018249512,
0.3309154212474823,
-0.675834059715271,
0.07792036235332489,
-1.1917355060577393,
0.2971978485584259,
0.8057219386100769,
-0.6295563578605652,
0.06882759183645248,
-0.2776462733745575,
-1.2848279476165771,
-0.48397570848464966,
0.2778607904911041,
2.01119065284729,
-0.7112585306167603,
0.9220053553581238,
1.0318593978881836,
-0.66048663854599,
-0.020944174379110336,
0.3792153596878052,
-0.23400181531906128,
0.7756401300430298,
-1.1195554733276367,
-0.32614484429359436,
1.1858181953430176,
-0.18336498737335205,
-0.59919673204422,
1.4906622171401978,
0.7618427872657776,
-1.028878092765808,
-0.05782463774085045,
-0.1733623445034027,
-0.7252677083015442,
0.016053561121225357,
-1.6196521520614624,
-0.04206831380724907,
0.3353116512298584,
-1.5483839511871338,
-0.4846359193325043,
-0.1968696564435959,
1.2556260824203491,
-0.07090030610561371,
1.3438202142715454,
-0.3625240623950958,
-0.317323237657547,
-0.3365088403224945,
-0.3492751121520996,
0.1684989333152771,
-0.32574865221977234,
-0.6634607315063477,
0.22382670640945435,
-0.6679661273956299,
0.3411020040512085,
1.4551911354064941,
0.3123405873775482,
0.10233602672815323,
0.5447145700454712,
1.0768489837646484,
0.33369192481040955,
-0.04434969648718834,
-0.8915660977363586,
-1.4890800714492798,
2.0218725204467773,
-1.3606226444244385,
1.9196513891220093,
0.7092805504798889,
-0.057685330510139465,
-1.8305468559265137,
-1.8777575492858887,
1.3407975435256958,
1.1880607604980469,
2.281651496887207,
0.6459689140319824,
0.25535956025123596,
-0.7926124930381775,
-0.586689293384552,
0.3348602056503296,
-1.005831241607666,
-0.7849442362785339,
0.09830771386623383,
2.3098742961883545,
1.782551884651184,
-0.4944060146808624,
-0.22107085585594177,
-1.0749595165252686,
1.3958065509796143,
-0.16859525442123413,
0.23765817284584045,
1.9635908603668213,
-0.39475905895233154,
-1.1096537113189697,
1.3212300539016724,
-2.2959682941436768,
0.09558455646038055,
1.9574103355407715,
0.2128896564245224,
0.1034180149435997,
-1.4099231958389282,
-0.7455348968505859,
-0.30249398946762085,
-0.43975797295570374,
-1.2621073722839355,
0.4736849367618561,
-0.25419384241104126,
-0.7289787530899048,
-1.5244157314300537,
0.21021078526973724,
-0.9967727661132812,
-1.6533910036087036,
0.24333243072032928,
1.7967557907104492,
1.9495043754577637,
-0.7536619305610657,
1.5965166091918945,
-0.2712353765964508,
0.19246318936347961,
1.3056566715240479,
1.192012906074524,
3.1405527591705322,
1.9211676120758057,
-1.1955540180206299,
0.8205317258834839,
-0.13122791051864624,
-0.44516220688819885,
1.2565659284591675,
-1.170424461364746,
1.2648956775665283,
-0.3397497534751892,
-1.1937326192855835,
-1.28225839138031,
0.9134882688522339,
0.4297393560409546,
0.06378114223480225,
-0.49089619517326355,
1.3113365173339844,
0.06161455065011978,
1.3331412076950073,
0.5959686636924744,
-0.3561370074748993,
0.6774383783340454,
-0.4224596619606018,
-0.5623635649681091,
1.5485374927520752,
0.3150266706943512,
-1.3815101385116577,
-2.318740129470825,
-0.189390629529953,
-0.7741796374320984,
-0.004794313106685877,
-0.5622830986976624,
-0.9962155222892761,
1.7188469171524048,
0.4605337381362915,
-1.2252250909805298,
-0.27405500411987305,
-0.356720894575119,
-0.6103434562683105,
2.7031493186950684,
-1.4410605430603027,
-0.32984498143196106,
-1.083264708518982,
-0.634018063545227,
1.6313283443450928,
-1.305098533630371,
-0.20242930948734283,
-0.963768720626831,
-0.5687926411628723,
-1.3335275650024414,
-0.5178353190422058,
-0.03909097611904144,
-0.9055293798446655,
0.8013154864311218,
0.2399187982082367,
-1.1427770853042603,
-0.3183172047138214,
-0.8871082067489624,
0.8192111849784851,
-0.10996174812316895,
0.3708554804325104,
1.9484009742736816,
0.4353422522544861,
-0.3914602994918823,
0.6647372245788574,
1.1217460632324219,
0.569990873336792,
-0.7514271140098572,
0.21421729028224945,
-0.7550745010375977,
0.3279091715812683,
-1.2270119190216064,
0.2748960554599762,
-2.8678603172302246,
0.5735938549041748,
-0.12386994808912277,
-0.1183197870850563,
0.041373588144779205,
-1.3323493003845215,
1.104372262954712,
2.6451005935668945,
-1.2149204015731812,
0.45432376861572266,
0.2566169202327728,
1.2621482610702515,
-1.5670915842056274,
0.3826347589492798,
-0.3775480091571808,
2.1268904209136963,
0.2388656884431839,
1.2107913494110107,
-0.41388121247291565,
-2.306767225265503,
0.6568272709846497,
-1.271986961364746,
-1.2566314935684204,
0.7210130095481873,
-0.8196254968643188,
-0.04870762676000595,
-1.364092469215393,
-0.1212238296866417,
-0.8394537568092346,
-1.3243142366409302,
0.7932562828063965,
0.10089083015918732,
0.5815556645393372,
-0.6243621706962585,
0.3782922029495239,
-2.1066439151763916,
-1.386017084121704,
-0.2382403165102005,
-0.9416030049324036,
0.39380908012390137,
-0.2927281856536865,
0.7243102788925171,
-0.2937032878398895,
0.04758515954017639,
0.40825074911117554,
1.3940080404281616,
3.494494676589966,
0.21983934938907623,
0.4194249212741852,
-0.16242127120494843,
-0.9265711307525635,
1.386582851409912,
0.9026089906692505,
-0.07832042872905731,
-0.5591864585876465,
-0.9844698905944824,
1.2385716438293457,
2.0355281829833984,
0.9601255059242249,
0.062393300235271454,
-0.763524055480957,
-0.6646298170089722,
0.016163945198059082,
0.2240268737077713,
0.39849957823753357,
0.9578202962875366,
0.13644003868103027,
0.11281018704175949,
1.3904868364334106,
1.2498599290847778,
-0.43474307656288147,
0.4327564239501953,
-0.7984674572944641,
-0.406015545129776,
0.6245438456535339,
0.3750711977481842,
0.011160069145262241,
0.39729130268096924,
-0.9885321855545044,
-0.2486138939857483,
-0.4562450647354126,
-1.0010428428649902,
-0.7087397575378418,
-0.4672875702381134,
-0.3104130029678345,
1.6480857133865356,
0.004271793179214001,
-0.5592223405838013,
-0.09017737209796906,
-0.7404938340187073,
-0.022582542151212692,
-0.9895128607749939,
0.19422565400600433,
-0.14323456585407257,
-0.15696430206298828,
0.0129599804058671,
1.7667196989059448,
-0.9316262602806091,
-2.028580665588379,
0.362529993057251,
0.2994001507759094,
-0.44204258918762207,
0.2682570517063141,
1.5467908382415771,
0.5311045050621033,
1.5369964838027954,
1.3777990341186523,
0.9531754851341248,
-0.7357444167137146,
-1.3576109409332275,
0.6443267464637756,
0.9361053705215454,
-1.4068188667297363,
0.8092525005340576,
0.12076573818922043,
-0.5255969166755676,
0.6226527094841003,
1.2123069763183594,
0.4777831435203552,
-1.8989143371582031,
0.6175952553749084,
-0.8369203805923462,
0.7608283162117004,
0.7075905203819275,
0.7687387466430664,
0.21909868717193604,
0.77812260389328,
-1.2353404760360718,
-1.1509121656417847,
-0.7599349021911621,
-0.5892473459243774,
1.8987678289413452,
-0.20185314118862152,
0.6600592732429504,
-0.11179199814796448,
-1.316408634185791,
-0.10641831904649734,
0.7556285858154297,
0.3991948962211609,
-0.4935460686683655,
0.7526745200157166,
-0.6779430508613586,
-1.0213559865951538,
-1.3725777864456177,
-0.4547778367996216,
-1.0786505937576294,
-0.9626283645629883,
1.0672457218170166,
0.818873405456543,
0.25702738761901855,
1.9287081956863403,
0.6235220432281494,
0.2502164840698242,
-2.6227214336395264,
0.8347203731536865,
0.27879011631011963,
0.037571270018815994,
0.9353886842727661,
0.3185466229915619,
0.9336122870445251,
-0.01461740955710411,
0.5725774168968201,
-2.396094799041748,
2.3119328022003174,
-0.2396581768989563,
0.6284990906715393,
-0.024686384946107864,
-0.17335499823093414,
1.0935347080230713,
0.5191650986671448,
0.49162590503692627,
-1.156960368156433,
0.6904581785202026,
-0.6995249390602112,
1.3008400201797485,
0.8735196590423584,
-0.8891401290893555,
0.011655949987471104,
1.337716817855835,
0.5204803943634033,
-0.466136634349823,
-0.8686994910240173,
-1.0251531600952148,
0.8823922872543335,
1.730827808380127,
-0.08116607367992401,
-0.0849350318312645,
0.8652436137199402,
0.6104472279548645,
-1.3618757724761963,
0.10856775939464569,
-0.7444394826889038,
-0.7430292963981628,
1.6567473411560059,
1.9464378356933594,
-0.1157299131155014,
-0.07584938406944275,
-0.7512836456298828,
-1.1328288316726685,
0.8204355835914612,
0.12181711941957474,
0.03707220405340195,
0.6873069405555725,
-0.640612006187439,
1.1116929054260254,
0.8770329356193542,
0.8948255777359009,
0.27142333984375,
0.3497917652130127,
0.43848124146461487,
-0.35986974835395813,
-1.1089533567428589,
-0.21617551147937775,
-1.1681432723999023,
-2.5965256690979004,
0.4978564977645874,
-0.30762583017349243,
-1.4820480346679688,
-0.00721375085413456,
-1.0467679500579834,
0.9431570768356323,
-0.5606957674026489,
-0.9624655246734619,
-1.5183111429214478,
0.24435462057590485,
-0.11527612060308456,
0.9085554480552673,
-1.5270646810531616,
-0.018223445862531662,
1.2353954315185547,
1.0104641914367676,
-0.7355257868766785,
1.015771508216858,
0.2018841952085495,
0.9984970688819885,
0.8810712695121765,
-0.39699673652648926,
0.4998634457588196,
0.06288056075572968,
-1.3457999229431152,
0.5306411981582642,
1.1492490768432617,
0.2156555950641632,
1.4510663747787476,
-0.550228476524353,
0.02595595270395279,
0.3694199025630951,
-0.45181718468666077,
-0.4398406147956848,
-0.6565698385238647,
0.7509788870811462,
0.06344474852085114,
-0.8170070648193359,
0.12803156673908234,
-0.07365619391202927,
-0.20282624661922455,
0.26274245977401733,
-1.5157420635223389,
-0.2135268598794937,
-0.39915359020233154,
-0.5689439177513123,
-1.2311689853668213,
-0.07656368613243103,
1.3740873336791992,
-0.7046880125999451,
-0.1007838174700737,
0.48459392786026,
0.40930262207984924,
0.46875742077827454,
0.6185582280158997,
-0.6462870836257935,
-0.4067424535751343,
-0.37824547290802,
-0.34819573163986206,
0.3293173313140869,
1.3095699548721313,
-0.188619464635849,
-1.0393506288528442,
0.7715619206428528,
-0.399990439414978,
0.02475545182824135,
1.861488699913025,
0.10986672341823578,
-0.8145880103111267,
0.20203693211078644,
-0.6495044231414795,
1.9596095085144043,
1.6981290578842163,
1.2880125045776367,
-0.060587380081415176,
-0.9567738771438599,
0.6029267311096191,
-0.17723941802978516,
-0.4164355397224426,
0.9417329430580139,
0.3902547359466553,
-0.2338763028383255,
-1.3997920751571655,
0.6136417984962463,
1.1938551664352417,
-0.8408553600311279,
-0.8743333220481873,
-0.019079722464084625,
-0.788045346736908,
1.0965187549591064,
0.6771538257598877,
0.3967401683330536,
0.31147876381874084,
1.6370126008987427,
0.7076092958450317,
-0.48881667852401733,
0.491733193397522,
0.392701119184494,
-0.08726087212562561,
-2.121466636657715,
-1.1236027479171753,
0.2919548749923706,
-0.477859228849411,
-1.5779263973236084,
1.3398566246032715,
-1.200061559677124,
-0.8245968818664551,
0.5425218939781189,
0.12249510735273361,
1.4575438499450684,
0.3434731662273407,
1.566261887550354,
2.162209987640381,
0.8241612911224365,
0.30025196075439453,
1.33927321434021,
-0.1519765704870224,
-0.4402592182159424,
1.8421014547348022,
-0.4515376389026642,
0.5386419296264648,
1.158240556716919,
-0.3594494163990021,
-0.9831374883651733,
-0.756454348564148,
-1.2239500284194946,
-0.6235942244529724,
1.0675486326217651,
0.130708709359169,
-1.2394459247589111,
0.2488211840391159,
1.5674680471420288,
0.038885876536369324,
-0.2984284460544586,
0.5305451154708862,
0.43027302622795105,
-0.7754284739494324,
-0.06783697754144669,
-0.9405640959739685,
0.5303289294242859,
-0.15293855965137482,
-0.3440593183040619,
0.40373608469963074,
0.4727104604244232,
1.2440369129180908,
-0.07153479754924774,
0.16545253992080688,
1.2442474365234375,
-1.4277245998382568,
1.525276780128479,
-0.6345787048339844,
0.17515631020069122,
-2.347994565963745,
1.3820468187332153,
-0.7590869069099426,
1.940520167350769,
-2.6888763904571533,
0.35730281472206116,
-0.5767759680747986,
-0.4476180970668793,
0.3662974536418915,
-0.35952234268188477,
0.1870170682668686,
-0.2450057417154312,
-1.1396675109863281,
-0.07758377492427826,
-0.7638073563575745,
0.522068440914154,
1.0376009941101074,
1.3523222208023071,
-1.0992131233215332,
-0.2930581569671631,
-1.744909405708313,
-0.12058788537979126,
-0.6559776067733765,
0.3830164074897766,
-2.0020079612731934,
-0.21000149846076965,
-1.931219220161438,
-2.4127159118652344,
-1.3825215101242065,
-0.7910766005516052,
1.057707667350769,
0.05392041802406311,
-0.8890010714530945,
1.0811117887496948,
-0.33346620202064514,
-1.8701871633529663,
1.0846126079559326,
-2.222565174102783
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | > I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
You must cache an `IterableDataset` to disk to load it as a `Dataset`. One way to do this is with `Dataset.from_generator`:
```python
from functools import partial
from datasets import Dataset
def gen_from_iterable_dataset(iterable_ds)
yield from iterable_ds
ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
```
> with_transform still does not chain AFAIU.
Yes, not supported yet - the solution is to combine the transforms into a single one. | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 70 | 92 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
> I read about IterableDataset, and it seems to have lazy mapping. But I can't figure out how to convert an IterableDataset into a normal one when needed.
You must cache an `IterableDataset` to disk to load it as a `Dataset`. One way to do this is with `Dataset.from_generator`:
```python
from functools import partial
from datasets import Dataset
def gen_from_iterable_dataset(iterable_ds)
yield from iterable_ds
ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
```
> with_transform still does not chain AFAIU.
Yes, not supported yet - the solution is to combine the transforms into a single one. | [
-1.1938053369522095,
-0.9703177809715271,
-0.7825504541397095,
1.5296915769577026,
-0.13709205389022827,
-1.3683408498764038,
0.2389739453792572,
-1.1138783693313599,
1.747008204460144,
-0.890055775642395,
0.41942131519317627,
-1.6716158390045166,
0.04120921343564987,
-0.5750960111618042,
-0.8074408769607544,
-0.9516761302947998,
-0.408059298992157,
-0.7709282636642456,
1.011832594871521,
2.4606645107269287,
1.1513550281524658,
-1.3170467615127563,
2.554356336593628,
0.616405725479126,
-0.16293366253376007,
-1.0299336910247803,
0.4094996452331543,
-0.029826480895280838,
-1.2702618837356567,
-0.5415818095207214,
-0.9417777061462402,
-0.12550003826618195,
-0.5623798370361328,
-0.6314144730567932,
-0.02765090949833393,
0.4105866551399231,
-0.33272647857666016,
-0.4888765215873718,
-0.3933548331260681,
-0.8802286386489868,
0.5073251724243164,
-0.36357438564300537,
1.0362213850021362,
-0.37042123079299927,
1.9055372476577759,
-0.5445957183837891,
0.48567134141921997,
0.7084617614746094,
1.3941081762313843,
0.16740739345550537,
-0.05379602685570717,
0.2715638279914856,
0.33328109979629517,
0.020068807527422905,
0.4222274422645569,
1.091519832611084,
0.6058528423309326,
0.6102243065834045,
0.745234489440918,
-2.2289950847625732,
1.3644204139709473,
-1.0991804599761963,
0.3632868528366089,
1.296021580696106,
-0.9129658341407776,
0.26982206106185913,
-1.698348045349121,
-0.060794930905103683,
0.5176524519920349,
-2.25756573677063,
0.26878154277801514,
-1.3122875690460205,
-0.4409342408180237,
1.0506799221038818,
0.36306118965148926,
-1.2023534774780273,
0.11039172857999802,
-0.355007529258728,
0.9032611846923828,
0.5844194889068604,
1.0887629985809326,
-1.8008389472961426,
-0.06622907519340515,
-0.34509366750717163,
0.2503342032432556,
-1.3630930185317993,
-1.4982953071594238,
0.5480188727378845,
0.645020067691803,
0.6188023686408997,
-0.05241251364350319,
1.114711046218872,
-0.9769529700279236,
0.7486738562583923,
-1.016733169555664,
-1.631240963935852,
-1.4056851863861084,
-2.2037248611450195,
-2.3876805305480957,
0.7424341440200806,
-0.45236527919769287,
-0.5614646673202515,
2.065586805343628,
-1.0461288690567017,
-1.7123112678527832,
1.1309175491333008,
0.2106814831495285,
0.05631035566329956,
2.350865364074707,
0.12586191296577454,
-0.664981484413147,
0.5035143494606018,
-0.670409619808197,
0.7892975807189941,
-0.47309255599975586,
1.367309331893921,
0.4743415117263794,
-1.1047712564468384,
1.5587698221206665,
-0.3699847459793091,
0.5478029251098633,
-0.665937066078186,
-0.48214149475097656,
-0.8471578359603882,
0.3171531558036804,
1.8169806003570557,
-0.2896038293838501,
1.6595134735107422,
-0.2652832269668579,
-1.6027623414993286,
-1.7119543552398682,
0.9249278903007507,
0.34921538829803467,
-0.7728654146194458,
0.05178346857428551,
-0.3813427686691284,
0.11438354849815369,
-0.0974336564540863,
1.0943782329559326,
1.1651782989501953,
0.6723315119743347,
-0.40772950649261475,
-0.8633812665939331,
0.2750213146209717,
-0.04967156797647476,
-0.7806271910667419,
-1.6264249086380005,
-0.4015542268753052,
0.09472451359033585,
0.6526782512664795,
-1.115290880203247,
1.7721649408340454,
0.8786184787750244,
1.9630577564239502,
1.0200433731079102,
-0.28184711933135986,
1.4839670658111572,
0.07369814068078995,
1.8769012689590454,
-0.5097020864486694,
0.662283718585968,
-0.3159869313240051,
-1.1097476482391357,
0.8248966336250305,
-0.37311840057373047,
-2.0320374965667725,
-0.7282763719558716,
-0.8769238591194153,
-0.10904467105865479,
-0.7168892025947571,
0.9666740298271179,
-0.32464349269866943,
-1.5110059976577759,
0.2581995725631714,
-0.6948192715644836,
0.17161855101585388,
-1.1845483779907227,
0.3529921770095825,
0.7587534189224243,
-0.668197751045227,
0.09006933122873306,
-0.26009631156921387,
-1.2993196249008179,
-0.4175369143486023,
0.36193084716796875,
1.9686193466186523,
-0.6452525854110718,
0.927955687046051,
0.9994780421257019,
-0.6672165989875793,
0.0028578415513038635,
0.2868978977203369,
-0.19679540395736694,
0.7637320756912231,
-1.0659244060516357,
-0.34292829036712646,
1.288008451461792,
-0.2504410743713379,
-0.6963561177253723,
1.5389459133148193,
0.6926726698875427,
-1.003243088722229,
-0.08856157958507538,
-0.14855468273162842,
-0.7570440173149109,
-0.018511168658733368,
-1.6113287210464478,
0.10930418968200684,
0.4033616781234741,
-1.5948935747146606,
-0.3667020797729492,
-0.1633741706609726,
1.2111732959747314,
-0.16235674917697906,
1.3977477550506592,
-0.3163834810256958,
-0.2711315155029297,
-0.31366461515426636,
-0.3232218623161316,
0.14160704612731934,
-0.26674526929855347,
-0.6512715220451355,
0.2350398451089859,
-0.7151839733123779,
0.43486905097961426,
1.418329119682312,
0.3054974675178528,
0.09140249341726303,
0.49824297428131104,
1.1153912544250488,
0.31231218576431274,
-0.049145832657814026,
-0.7988353371620178,
-1.5625673532485962,
2.0236971378326416,
-1.3738974332809448,
1.9843776226043701,
0.6825289726257324,
-0.1060045063495636,
-1.7873953580856323,
-1.7275282144546509,
1.3347002267837524,
1.1989036798477173,
2.237170457839966,
0.6352344155311584,
0.2643055319786072,
-0.8476288914680481,
-0.625481367111206,
0.39419472217559814,
-0.9832620024681091,
-0.7526172995567322,
0.0956185907125473,
2.2910714149475098,
1.7722811698913574,
-0.3404669165611267,
-0.24993832409381866,
-1.0762407779693604,
1.4211376905441284,
-0.2619286775588989,
0.2824710011482239,
1.9494508504867554,
-0.3065255284309387,
-1.10048508644104,
1.4115463495254517,
-2.359391689300537,
0.15258195996284485,
1.9882153272628784,
0.27845579385757446,
0.06420589983463287,
-1.3867435455322266,
-0.6376274824142456,
-0.35663777589797974,
-0.3086274266242981,
-1.316686987876892,
0.4242974519729614,
-0.27593994140625,
-0.6605463624000549,
-1.440198302268982,
0.23057924211025238,
-0.9938265681266785,
-1.6504778861999512,
0.2787777781486511,
1.7716193199157715,
1.9355332851409912,
-0.607546329498291,
1.5127956867218018,
-0.2568047344684601,
0.26690512895584106,
1.2091792821884155,
1.2122550010681152,
3.11161470413208,
1.931508183479309,
-1.2356702089309692,
0.7299858331680298,
-0.10342495143413544,
-0.5596539378166199,
1.2755329608917236,
-1.3161377906799316,
1.287176251411438,
-0.22420749068260193,
-1.2792894840240479,
-1.2469247579574585,
0.970447838306427,
0.4301002621650696,
0.09427301585674286,
-0.5759009718894958,
1.2704792022705078,
0.02017267979681492,
1.3163124322891235,
0.592462420463562,
-0.40885043144226074,
0.6349583268165588,
-0.5160695314407349,
-0.6450269818305969,
1.520628809928894,
0.22301052510738373,
-1.3910243511199951,
-2.228713035583496,
-0.19122560322284698,
-0.7675867676734924,
0.05941084027290344,
-0.6000452637672424,
-0.9756472110748291,
1.7342723608016968,
0.3612237572669983,
-1.23240065574646,
-0.2460576593875885,
-0.33809930086135864,
-0.596183717250824,
2.7354049682617188,
-1.3231033086776733,
-0.2983415722846985,
-1.0902318954467773,
-0.7394376397132874,
1.6313443183898926,
-1.3556108474731445,
-0.24542109668254852,
-1.0226013660430908,
-0.6003708839416504,
-1.2800490856170654,
-0.5503944158554077,
-0.0022074375301599503,
-0.9088687300682068,
0.8440796732902527,
0.26975566148757935,
-1.1560275554656982,
-0.37463802099227905,
-0.918014645576477,
0.881435215473175,
-0.10274370014667511,
0.31225305795669556,
1.8318374156951904,
0.3872489333152771,
-0.4069591164588928,
0.6856663227081299,
1.1656370162963867,
0.6590997576713562,
-0.7478765249252319,
0.21165011823177338,
-0.7456193566322327,
0.3386414051055908,
-1.2344495058059692,
0.30908238887786865,
-2.8275911808013916,
0.5708821415901184,
-0.10121051967144012,
-0.14321981370449066,
-0.055024221539497375,
-1.3736135959625244,
1.0813225507736206,
2.6474263668060303,
-1.2259023189544678,
0.4886742830276489,
0.3230094313621521,
1.1934635639190674,
-1.623050570487976,
0.40878283977508545,
-0.4697224497795105,
2.117438316345215,
0.2682635188102722,
1.2479889392852783,
-0.41758543252944946,
-2.323819160461426,
0.6373336315155029,
-1.272032618522644,
-1.2822550535202026,
0.7811943888664246,
-0.9815070033073425,
0.05628582090139389,
-1.3512388467788696,
-0.19006600975990295,
-0.7577158212661743,
-1.3001515865325928,
0.7494426369667053,
0.150705948472023,
0.5282917618751526,
-0.5572778582572937,
0.3264768719673157,
-2.1531059741973877,
-1.3693796396255493,
-0.24936068058013916,
-1.0079721212387085,
0.4903408885002136,
-0.37568801641464233,
0.6540145874023438,
-0.2774891257286072,
-0.02762824296951294,
0.4889916777610779,
1.464600682258606,
3.425017833709717,
0.3066098690032959,
0.3755452036857605,
-0.15420372784137726,
-0.9240367412567139,
1.4389809370040894,
0.8567558526992798,
-0.04812067002058029,
-0.5231525301933289,
-0.9702361822128296,
1.2278614044189453,
2.04813814163208,
1.0020650625228882,
-0.025628158822655678,
-0.7762967348098755,
-0.7006694674491882,
-0.050844281911849976,
0.18451975286006927,
0.42201387882232666,
0.8754251003265381,
0.15675479173660278,
0.1530798375606537,
1.4249560832977295,
1.2235286235809326,
-0.4187776446342468,
0.4164913296699524,
-0.8029739856719971,
-0.47413623332977295,
0.6250826120376587,
0.35164809226989746,
-0.08310388773679733,
0.48192280530929565,
-0.9738860726356506,
-0.1775134652853012,
-0.4460131525993347,
-0.9189098477363586,
-0.7262194752693176,
-0.4981682300567627,
-0.3182603716850281,
1.7223871946334839,
-0.03662630915641785,
-0.582245409488678,
-0.0678766518831253,
-0.6865936517715454,
-0.059674493968486786,
-1.0599266290664673,
0.2492869645357132,
-0.09481480717658997,
-0.15901203453540802,
-0.021394861862063408,
1.7336699962615967,
-0.9908086657524109,
-2.0348880290985107,
0.2624252438545227,
0.2593063712120056,
-0.32100653648376465,
0.21911199390888214,
1.5375834703445435,
0.42798399925231934,
1.4910717010498047,
1.4710670709609985,
1.0150364637374878,
-0.787822961807251,
-1.342852234840393,
0.7365663647651672,
0.9167172908782959,
-1.3305795192718506,
0.8599557876586914,
0.04149194061756134,
-0.5172247290611267,
0.5662563443183899,
1.1481870412826538,
0.5309072732925415,
-1.9405648708343506,
0.7030700445175171,
-0.9771909117698669,
0.7921630144119263,
0.7581053972244263,
0.7250516414642334,
0.19055680930614471,
0.8390364050865173,
-1.2227894067764282,
-1.0998845100402832,
-0.696472704410553,
-0.683228075504303,
1.9097141027450562,
-0.329994261264801,
0.7052891254425049,
-0.11520656198263168,
-1.3494925498962402,
-0.03890810161828995,
0.7860285043716431,
0.3925825357437134,
-0.4873971939086914,
0.7623103857040405,
-0.7233800888061523,
-1.0185800790786743,
-1.3373548984527588,
-0.4468874931335449,
-1.1368190050125122,
-0.9064953923225403,
1.107171893119812,
0.7399844527244568,
0.15443108975887299,
1.8733724355697632,
0.7308298349380493,
0.31880080699920654,
-2.653688430786133,
0.7639825344085693,
0.22164739668369293,
0.01267075352370739,
0.8532130122184753,
0.3370365500450134,
0.9045679569244385,
0.07793685048818588,
0.5430335998535156,
-2.4021401405334473,
2.3397393226623535,
-0.23037074506282806,
0.6791082620620728,
-0.06627108156681061,
-0.2316417098045349,
1.148943305015564,
0.5780249834060669,
0.48592084646224976,
-1.1165475845336914,
0.7019369602203369,
-0.6849210858345032,
1.2758690118789673,
0.9313581585884094,
-0.8550025820732117,
-0.044062744826078415,
1.3572802543640137,
0.4816042184829712,
-0.5032501220703125,
-1.0091811418533325,
-0.9552661180496216,
0.8604857921600342,
1.705655574798584,
-0.03668774664402008,
-0.13042765855789185,
0.8894259333610535,
0.7447869777679443,
-1.2346895933151245,
0.17553071677684784,
-0.705411970615387,
-0.835953950881958,
1.656790852546692,
2.027442693710327,
-0.19073672592639923,
-0.0964847058057785,
-0.7333955764770508,
-1.0676450729370117,
0.7705610394477844,
0.07794831693172455,
-0.03625451400876045,
0.5951597690582275,
-0.6653979420661926,
1.1017630100250244,
0.9164956212043762,
0.9262481927871704,
0.24783088266849518,
0.2365894615650177,
0.37278199195861816,
-0.352313756942749,
-1.1565091609954834,
-0.18377268314361572,
-1.113871693611145,
-2.6309688091278076,
0.49994248151779175,
-0.25695860385894775,
-1.4866057634353638,
0.06651732325553894,
-1.0847986936569214,
1.0115560293197632,
-0.5779566764831543,
-1.0343401432037354,
-1.5342670679092407,
0.17931097745895386,
-0.11976557970046997,
0.8880988955497742,
-1.5522727966308594,
-0.04344998300075531,
1.1528953313827515,
0.9005632400512695,
-0.679283082485199,
0.9843558669090271,
0.1306130588054657,
0.988835871219635,
0.9051586985588074,
-0.37455856800079346,
0.5368478298187256,
0.16761644184589386,
-1.362823724746704,
0.5583938956260681,
1.1279078722000122,
0.173360675573349,
1.520864486694336,
-0.50474613904953,
0.04772237315773964,
0.37033432722091675,
-0.5404853820800781,
-0.3988431692123413,
-0.6908690929412842,
0.8192546367645264,
0.01102810725569725,
-0.8502985835075378,
0.07806839048862457,
-0.080355204641819,
-0.21152617037296295,
0.1398155391216278,
-1.5556422472000122,
-0.17167507112026215,
-0.3939092755317688,
-0.64129638671875,
-1.2303850650787354,
-0.11145570874214172,
1.4341869354248047,
-0.7592493891716003,
-0.1423511505126953,
0.42540252208709717,
0.39177197217941284,
0.5625976324081421,
0.6182223558425903,
-0.7319211363792419,
-0.3187229633331299,
-0.29010969400405884,
-0.3291199207305908,
0.3703954219818115,
1.3387821912765503,
-0.17764884233474731,
-1.0072870254516602,
0.7667297124862671,
-0.3604567050933838,
0.029879271984100342,
1.8819630146026611,
0.15095266699790955,
-0.6753386855125427,
0.27031534910202026,
-0.716913104057312,
1.888322114944458,
1.7599822282791138,
1.314842700958252,
-0.09711545705795288,
-1.0291926860809326,
0.6283403635025024,
-0.34707480669021606,
-0.376717209815979,
0.8941493630409241,
0.37473446130752563,
-0.17525134980678558,
-1.3637592792510986,
0.7222809791564941,
1.1573104858398438,
-0.8272809982299805,
-0.8851101994514465,
0.1002226322889328,
-0.7916166186332703,
1.124150037765503,
0.5310065150260925,
0.3674297332763672,
0.2887512445449829,
1.6078405380249023,
0.7082222104072571,
-0.40563255548477173,
0.5976808071136475,
0.4596325755119324,
-0.16568955779075623,
-2.061896562576294,
-1.1470361948013306,
0.3383486270904541,
-0.5098700523376465,
-1.5609642267227173,
1.3737573623657227,
-1.1884372234344482,
-0.8290854692459106,
0.5836702585220337,
0.06705553829669952,
1.4982045888900757,
0.323586642742157,
1.576851725578308,
2.1274259090423584,
0.8885399699211121,
0.4067736268043518,
1.3190561532974243,
-0.17394261062145233,
-0.4164154529571533,
1.7607897520065308,
-0.39141321182250977,
0.515763521194458,
1.175618052482605,
-0.33174633979797363,
-1.03523850440979,
-0.7307009696960449,
-1.2407302856445312,
-0.6644840240478516,
1.0462220907211304,
0.11201749742031097,
-1.1662156581878662,
0.2735614776611328,
1.5829591751098633,
0.059128984808921814,
-0.21768048405647278,
0.5417869687080383,
0.3882949948310852,
-0.7937564253807068,
-0.12894612550735474,
-0.9684632420539856,
0.47011518478393555,
-0.31336092948913574,
-0.3396310806274414,
0.29631197452545166,
0.47585850954055786,
1.2470670938491821,
-0.04975980147719383,
0.10231193155050278,
1.2097889184951782,
-1.3856172561645508,
1.4008965492248535,
-0.6766789555549622,
0.23027652502059937,
-2.316361427307129,
1.316351056098938,
-0.7321113348007202,
1.8944348096847534,
-2.6286237239837646,
0.4232276678085327,
-0.6957288980484009,
-0.5074844360351562,
0.4524407982826233,
-0.3413752317428589,
0.1787046194076538,
-0.2357429563999176,
-1.147369623184204,
-0.030677037313580513,
-0.7224941849708557,
0.5994990468025208,
1.0300031900405884,
1.3361339569091797,
-1.0800061225891113,
-0.36903899908065796,
-1.72150719165802,
-0.17182506620883942,
-0.6759578585624695,
0.34769517183303833,
-1.9385563135147095,
-0.19548848271369934,
-2.050112247467041,
-2.405601978302002,
-1.3083473443984985,
-0.7266291975975037,
1.1223371028900146,
0.14146558940410614,
-0.8172282576560974,
1.0834574699401855,
-0.3018254041671753,
-1.8575243949890137,
1.1057395935058594,
-2.2126083374023438
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | I wonder if it would be beneficial to have a dedicated method to do that ? Maybe a `.save_to_disk()` so that the user can reload the resulting dataset later ? | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 70 | 30 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
I wonder if it would be beneficial to have a dedicated method to do that ? Maybe a `.save_to_disk()` so that the user can reload the resulting dataset later ? | [
-1.076582670211792,
-0.8887300491333008,
-0.8897480964660645,
1.4929651021957397,
-0.15970996022224426,
-1.376573920249939,
0.19339700043201447,
-1.2025911808013916,
1.8099335432052612,
-0.8830694556236267,
0.3570983409881592,
-1.6482824087142944,
-0.027432434260845184,
-0.6611372828483582,
-0.6805852055549622,
-0.9774170517921448,
-0.411093145608902,
-0.7705399394035339,
1.0110421180725098,
2.5158259868621826,
1.0543330907821655,
-1.2151278257369995,
2.6277859210968018,
0.7202751636505127,
-0.2114904224872589,
-0.967711865901947,
0.523476243019104,
0.018013330176472664,
-1.2333261966705322,
-0.5300694704055786,
-0.996420681476593,
-0.10514054447412491,
-0.5110790133476257,
-0.6189683675765991,
-0.08301687240600586,
0.3467864692211151,
-0.335574746131897,
-0.5030044317245483,
-0.46054089069366455,
-0.8643711805343628,
0.43569216132164,
-0.32277876138687134,
0.9706339836120605,
-0.4315977394580841,
1.8982839584350586,
-0.5596396923065186,
0.330858439207077,
0.7572874426841736,
1.3848035335540771,
0.13057824969291687,
-0.14845286309719086,
0.269422709941864,
0.5091685056686401,
-0.11020175367593765,
0.3922557234764099,
1.10085129737854,
0.5662054419517517,
0.7868527770042419,
0.7910876274108887,
-2.1738839149475098,
1.3871982097625732,
-1.0264278650283813,
0.3493920862674713,
1.2510229349136353,
-1.0626180171966553,
0.3561500012874603,
-1.6773262023925781,
-0.04564325511455536,
0.4780794084072113,
-2.27779221534729,
0.2592841684818268,
-1.2269493341445923,
-0.5958545207977295,
0.8846171498298645,
0.31070974469184875,
-1.2302473783493042,
0.09770697355270386,
-0.36972782015800476,
0.9893182516098022,
0.5736616253852844,
1.1554523706436157,
-1.820142388343811,
-0.06963196396827698,
-0.42838114500045776,
0.021825984120368958,
-1.444536566734314,
-1.4521969556808472,
0.5840712785720825,
0.7402394413948059,
0.6046412587165833,
-0.03959115967154503,
1.0412691831588745,
-0.9620633125305176,
0.7292898297309875,
-0.9201810956001282,
-1.7034306526184082,
-1.3513996601104736,
-2.167026996612549,
-2.275135040283203,
0.7832828760147095,
-0.4934556186199188,
-0.5936198830604553,
2.091033458709717,
-1.0229814052581787,
-1.7929987907409668,
1.1205456256866455,
0.1677199900150299,
-0.106889508664608,
2.4240894317626953,
0.22236214578151703,
-0.5574834942817688,
0.4788500666618347,
-0.6591572761535645,
0.8163667321205139,
-0.6690734028816223,
1.3547614812850952,
0.3537943959236145,
-1.0907303094863892,
1.6297305822372437,
-0.4572119116783142,
0.6275162100791931,
-0.6235275268554688,
-0.5168246030807495,
-0.9486218094825745,
0.4068945348262787,
1.8935956954956055,
-0.3434261977672577,
1.6322662830352783,
-0.30808091163635254,
-1.5365533828735352,
-1.7557557821273804,
0.9355996251106262,
0.3342697024345398,
-0.837635338306427,
0.22420582175254822,
-0.3241747319698334,
0.06358017027378082,
-0.0860850140452385,
1.1863898038864136,
1.2585538625717163,
0.7269095182418823,
-0.2568202316761017,
-0.8549491167068481,
0.259518563747406,
-0.06804854422807693,
-0.7645878195762634,
-1.6657646894454956,
-0.3929920196533203,
0.0064169252291321754,
0.599412739276886,
-1.0468652248382568,
1.7417434453964233,
0.8699633479118347,
1.932948112487793,
1.0156209468841553,
-0.2466011792421341,
1.3142485618591309,
0.00399138405919075,
1.8468397855758667,
-0.4707215428352356,
0.7594140768051147,
-0.33428624272346497,
-1.1063590049743652,
0.8981186151504517,
-0.386562705039978,
-1.9326300621032715,
-0.7157402038574219,
-0.9043807983398438,
-0.10554414242506027,
-0.6603537797927856,
0.9977536797523499,
-0.2859167754650116,
-1.3611843585968018,
0.25358593463897705,
-0.7384135127067566,
0.14189429581165314,
-1.2364411354064941,
0.36860391497612,
0.8303943276405334,
-0.6175670623779297,
0.06266546994447708,
-0.2744397222995758,
-1.3011966943740845,
-0.41472429037094116,
0.3017021715641022,
1.974587082862854,
-0.7881044149398804,
0.9127077460289001,
0.974847674369812,
-0.6865818500518799,
-0.06654427945613861,
0.3347446620464325,
-0.21432353556156158,
0.8090267777442932,
-1.1295732259750366,
-0.3393174707889557,
1.1916155815124512,
-0.21727116405963898,
-0.6901171207427979,
1.4669389724731445,
0.7238074541091919,
-1.049306869506836,
-0.05265984684228897,
-0.2809821665287018,
-0.839896559715271,
-0.07492753118276596,
-1.628936529159546,
0.025733789429068565,
0.39747655391693115,
-1.4682968854904175,
-0.5258482098579407,
-0.171461820602417,
1.3058123588562012,
-0.008376369252800941,
1.3041434288024902,
-0.3498521149158478,
-0.3896123170852661,
-0.44233062863349915,
-0.3230251669883728,
0.17943178117275238,
-0.3423774540424347,
-0.5749197006225586,
0.21926634013652802,
-0.5308447480201721,
0.32726559042930603,
1.405344009399414,
0.2999599874019623,
0.17551381886005402,
0.6674438714981079,
1.0781804323196411,
0.3018215596675873,
-0.13611319661140442,
-0.8394075036048889,
-1.4181981086730957,
1.9349483251571655,
-1.318307876586914,
1.9294099807739258,
0.6799939870834351,
-0.06050058454275131,
-1.8982388973236084,
-1.9590705633163452,
1.3882650136947632,
1.2670419216156006,
2.1370677947998047,
0.6980094909667969,
0.3184652328491211,
-0.841928243637085,
-0.5835028290748596,
0.31798362731933594,
-1.0736720561981201,
-0.7450332641601562,
0.08223195374011993,
2.26145339012146,
1.8083689212799072,
-0.5374149084091187,
-0.21869060397148132,
-1.1263861656188965,
1.3542295694351196,
-0.14416109025478363,
0.18766984343528748,
1.9148238897323608,
-0.4477631151676178,
-1.04158353805542,
1.1739976406097412,
-2.3011574745178223,
-0.04304930567741394,
1.957316279411316,
0.1848311573266983,
0.06287914514541626,
-1.3747942447662354,
-0.7262120246887207,
-0.211868017911911,
-0.36324459314346313,
-1.2776238918304443,
0.4729963541030884,
-0.2468988001346588,
-0.6727092862129211,
-1.517968773841858,
0.25448817014694214,
-0.944617748260498,
-1.5567951202392578,
0.24989952147006989,
1.8188579082489014,
1.8977001905441284,
-0.7453665137290955,
1.553952932357788,
-0.17082414031028748,
0.13665470480918884,
1.2835546731948853,
1.1320098638534546,
3.1804275512695312,
2.0285532474517822,
-1.1629399061203003,
0.7192322015762329,
-0.06420525163412094,
-0.47119835019111633,
1.2685052156448364,
-1.2171719074249268,
1.3596718311309814,
-0.3115256130695343,
-1.1883143186569214,
-1.3461639881134033,
0.8581916093826294,
0.3719775676727295,
0.10350403934717178,
-0.4601809084415436,
1.3486580848693848,
0.027297424152493477,
1.32810378074646,
0.580254077911377,
-0.3904329836368561,
0.6965916752815247,
-0.4370424151420593,
-0.5207597613334656,
1.6198489665985107,
0.37766045331954956,
-1.3323460817337036,
-2.2740988731384277,
-0.19596263766288757,
-0.7384796738624573,
0.12322389334440231,
-0.5937968492507935,
-0.9028434157371521,
1.7883250713348389,
0.4744257926940918,
-1.1621018648147583,
-0.3429763913154602,
-0.3137746751308441,
-0.634756326675415,
2.81107497215271,
-1.5027964115142822,
-0.3510979413986206,
-1.0547372102737427,
-0.552567183971405,
1.7383722066879272,
-1.3137078285217285,
-0.2364433854818344,
-0.9856942296028137,
-0.5396555662155151,
-1.2265666723251343,
-0.4923035800457001,
-0.11408483982086182,
-0.864372193813324,
0.8941576480865479,
0.17874428629875183,
-1.2043260335922241,
-0.30764320492744446,
-0.8867144584655762,
0.7774466872215271,
-0.1917467713356018,
0.3184717893600464,
1.9283547401428223,
0.41570398211479187,
-0.46020635962486267,
0.7499082684516907,
1.1811503171920776,
0.5409355759620667,
-0.7288850545883179,
0.2109232246875763,
-0.6428183913230896,
0.27969425916671753,
-1.1880229711532593,
0.23323333263397217,
-2.9734437465667725,
0.4792307913303375,
-0.14540937542915344,
-0.0929819792509079,
0.06728185713291168,
-1.3610174655914307,
1.0257058143615723,
2.51125431060791,
-1.182644009590149,
0.44392648339271545,
0.20715774595737457,
1.3171353340148926,
-1.5620782375335693,
0.3699304461479187,
-0.4298382103443146,
2.0657942295074463,
0.19590525329113007,
1.1539254188537598,
-0.4292680621147156,
-2.2106730937957764,
0.5813338160514832,
-1.2574406862258911,
-1.2884067296981812,
0.7484496235847473,
-0.8318337798118591,
-0.007716353517025709,
-1.3732463121414185,
-0.12643824517726898,
-0.7605177164077759,
-1.3491051197052002,
0.7372437715530396,
0.10388340801000595,
0.5720442533493042,
-0.6283858418464661,
0.30855703353881836,
-2.112199544906616,
-1.3165736198425293,
-0.30190804600715637,
-0.9555810689926147,
0.36075305938720703,
-0.3253318965435028,
0.6749415993690491,
-0.36409831047058105,
0.02654268406331539,
0.3376787602901459,
1.362251877784729,
3.4344642162323,
0.2081451416015625,
0.41575565934181213,
-0.1992265284061432,
-0.8230805397033691,
1.373068928718567,
0.916641354560852,
-0.039796359837055206,
-0.623958945274353,
-0.9358470439910889,
1.3056153059005737,
1.9544769525527954,
0.9602097868919373,
-0.0068833851255476475,
-0.7290645241737366,
-0.579843282699585,
-0.10560289025306702,
0.24894236028194427,
0.42431244254112244,
0.9314048290252686,
0.1790282279253006,
0.07343041896820068,
1.3881055116653442,
1.282694697380066,
-0.5050833821296692,
0.4610404372215271,
-0.7749569416046143,
-0.4026608169078827,
0.5698450207710266,
0.43756595253944397,
0.01378871314227581,
0.3048092722892761,
-0.9832318425178528,
-0.2578890025615692,
-0.42372581362724304,
-0.9802674651145935,
-0.7218021154403687,
-0.4093203544616699,
-0.35519954562187195,
1.73188054561615,
0.024017104879021645,
-0.5577201247215271,
-0.1435038298368454,
-0.6888335347175598,
-0.007233231794089079,
-0.9681903123855591,
0.2802968919277191,
-0.11674495041370392,
-0.19395099580287933,
0.07427234202623367,
1.7797478437423706,
-0.9875062704086304,
-2.075839042663574,
0.3854319453239441,
0.2420535832643509,
-0.30900686979293823,
0.2528466582298279,
1.453168511390686,
0.5202437043190002,
1.5497034788131714,
1.4402962923049927,
0.9667986631393433,
-0.8575513362884521,
-1.386885643005371,
0.6101711988449097,
0.9590999484062195,
-1.5036178827285767,
0.747168242931366,
0.0733458399772644,
-0.5803203582763672,
0.5662029385566711,
1.182072401046753,
0.5224725008010864,
-1.9241496324539185,
0.6429929733276367,
-0.9238001704216003,
0.7727198600769043,
0.8076921105384827,
0.6654767394065857,
0.27377212047576904,
0.7595288157463074,
-1.1770532131195068,
-1.2396719455718994,
-0.7671961188316345,
-0.6536884307861328,
1.8840861320495605,
-0.30185040831565857,
0.700878381729126,
-0.13089819252490997,
-1.3050400018692017,
-0.07262784242630005,
0.7721075415611267,
0.3890262544155121,
-0.39856550097465515,
0.7361322045326233,
-0.6324131488800049,
-1.0869477987289429,
-1.3560185432434082,
-0.43930932879447937,
-1.1747844219207764,
-0.9409534335136414,
1.1420552730560303,
0.8823559284210205,
0.18201225996017456,
1.9537556171417236,
0.7121712565422058,
0.35249194502830505,
-2.6167542934417725,
0.8124259114265442,
0.3043975234031677,
0.03703059256076813,
0.8452513813972473,
0.4166291058063507,
0.9108403325080872,
0.026681022718548775,
0.5125035643577576,
-2.476017713546753,
2.4163851737976074,
-0.2604875862598419,
0.5775759816169739,
-0.010090433992445469,
-0.14367909729480743,
1.135893702507019,
0.44766607880592346,
0.5243014693260193,
-1.0520085096359253,
0.6077701449394226,
-0.6338300704956055,
1.3367398977279663,
0.9354903101921082,
-0.7816447615623474,
0.05291001498699188,
1.3432270288467407,
0.5878040790557861,
-0.4992126226425171,
-0.873919665813446,
-1.0697791576385498,
0.8643837571144104,
1.7798510789871216,
0.022033551707863808,
-0.04988289624452591,
0.8748200535774231,
0.6031839847564697,
-1.3622075319290161,
0.19535382091999054,
-0.7432023882865906,
-0.7287881970405579,
1.5791257619857788,
1.9072065353393555,
-0.1820121705532074,
-0.024543002247810364,
-0.8091328144073486,
-1.2274930477142334,
0.8121070265769958,
0.15796297788619995,
0.04227789491415024,
0.6728583574295044,
-0.5994350910186768,
1.0991164445877075,
0.8686435222625732,
0.8614938855171204,
0.28329914808273315,
0.30346566438674927,
0.479110985994339,
-0.3257142901420593,
-1.1470320224761963,
-0.14468228816986084,
-1.088375210762024,
-2.531386137008667,
0.3964158594608307,
-0.3854038119316101,
-1.4814393520355225,
-0.006589705124497414,
-1.093788504600525,
0.8928642272949219,
-0.5059996843338013,
-0.9842283725738525,
-1.676108956336975,
0.1692894846200943,
-0.09136514365673065,
0.9078626036643982,
-1.4564993381500244,
-0.018547676503658295,
1.2049485445022583,
0.9497615694999695,
-0.8566223382949829,
0.9842635989189148,
0.1737629473209381,
1.023511528968811,
0.8885733485221863,
-0.39243775606155396,
0.47057583928108215,
-0.005430949851870537,
-1.386861801147461,
0.6073941588401794,
1.1925510168075562,
0.12084012478590012,
1.4682518243789673,
-0.5829356908798218,
-0.0987396165728569,
0.4223020672798157,
-0.34446340799331665,
-0.38067930936813354,
-0.6872870922088623,
0.7418732643127441,
0.05020248889923096,
-0.7543830275535583,
0.16506201028823853,
-0.05735798180103302,
-0.2885790765285492,
0.27723029255867004,
-1.4780094623565674,
-0.2212020456790924,
-0.4559805989265442,
-0.66203373670578,
-1.2036383152008057,
-0.029235098510980606,
1.3368077278137207,
-0.5753633975982666,
-0.1184527650475502,
0.5011845231056213,
0.3829285204410553,
0.45092204213142395,
0.5765402317047119,
-0.6237066984176636,
-0.27381932735443115,
-0.22515247762203217,
-0.3351150155067444,
0.46877384185791016,
1.3434267044067383,
-0.2014976590871811,
-0.9687215685844421,
0.7667931914329529,
-0.2972634732723236,
-0.02900885045528412,
1.9759953022003174,
0.152647465467453,
-0.8457313179969788,
0.18485918641090393,
-0.7022910714149475,
2.0333290100097656,
1.6499366760253906,
1.3001066446304321,
-0.046566203236579895,
-0.9518125057220459,
0.606835663318634,
-0.11997635662555695,
-0.3332230746746063,
0.872172474861145,
0.37052586674690247,
-0.21159043908119202,
-1.434623122215271,
0.6566310524940491,
1.1373051404953003,
-0.7512348890304565,
-0.9056708216667175,
-0.0010656220838427544,
-0.7452675104141235,
1.0912528038024902,
0.7186065912246704,
0.4632004201412201,
0.3432437479496002,
1.6592042446136475,
0.7639949917793274,
-0.3888615071773529,
0.45112910866737366,
0.468857079744339,
-0.03486825153231621,
-2.129671096801758,
-1.0710574388504028,
0.3275628685951233,
-0.5032926201820374,
-1.6610796451568604,
1.368016004562378,
-1.2533351182937622,
-0.7935380339622498,
0.5212384462356567,
0.026224179193377495,
1.5052568912506104,
0.3132365643978119,
1.461256742477417,
2.157597303390503,
0.9497478604316711,
0.37398961186408997,
1.3799272775650024,
-0.22755131125450134,
-0.40541771054267883,
1.8837664127349854,
-0.4326837956905365,
0.4292810261249542,
1.1268272399902344,
-0.39561837911605835,
-1.0361486673355103,
-0.6450796723365784,
-1.2110844850540161,
-0.6457929611206055,
1.0273761749267578,
0.06530983746051788,
-1.196819543838501,
0.2903064787387848,
1.3997985124588013,
0.05425456911325455,
-0.3219386339187622,
0.5071467757225037,
0.4101777970790863,
-0.8552923798561096,
-0.03280773013830185,
-0.8837753534317017,
0.5438143610954285,
-0.19400283694267273,
-0.42767050862312317,
0.4764973223209381,
0.4171440601348877,
1.2317386865615845,
-0.022385623306035995,
0.22410948574543,
1.1782928705215454,
-1.4226434230804443,
1.5121241807937622,
-0.6154672503471375,
0.0670633465051651,
-2.3932769298553467,
1.47732412815094,
-0.6417117714881897,
1.920387864112854,
-2.698580741882324,
0.3782482445240021,
-0.6652135252952576,
-0.4121335744857788,
0.4793383479118347,
-0.3028824031352997,
0.11024937778711319,
-0.2819693684577942,
-1.2782835960388184,
0.02284998632967472,
-0.7622652649879456,
0.4890972673892975,
1.0191316604614258,
1.27935791015625,
-1.0534498691558838,
-0.283939927816391,
-1.7221620082855225,
-0.1098613515496254,
-0.6567261219024658,
0.26577916741371155,
-2.0460102558135986,
-0.21319018304347992,
-1.9230124950408936,
-2.4082112312316895,
-1.3034074306488037,
-0.8365496397018433,
1.1232752799987793,
0.10352551192045212,
-0.8736971020698547,
1.1968954801559448,
-0.35456156730651855,
-1.9263859987258911,
1.146063208580017,
-2.1826283931732178
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | > ```python
> from functools import partial
> from datasets import Dataset
>
> def gen_from_iterable_dataset(iterable_ds)
> yield from iterable_ds
>
> ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
> ```
@mariosasko With these complex mapping functions, what hash will be used to cache this dataset?
| ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 70 | 44 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
> ```python
> from functools import partial
> from datasets import Dataset
>
> def gen_from_iterable_dataset(iterable_ds)
> yield from iterable_ds
>
> ds = Dataset.from_generator(partial(gen_from_iterable_dataset, iterable_ds), features=iterable_ds.features})
> ```
@mariosasko With these complex mapping functions, what hash will be used to cache this dataset?
| [
-1.1662027835845947,
-0.9806270599365234,
-0.7833579182624817,
1.5773303508758545,
-0.17129389941692352,
-1.3833595514297485,
0.24615921080112457,
-1.1211243867874146,
1.7406070232391357,
-0.8619069457054138,
0.36954694986343384,
-1.6909509897232056,
-0.010033241473138332,
-0.5954815149307251,
-0.7249501347541809,
-0.9520811438560486,
-0.3444795608520508,
-0.8413148522377014,
0.9840879440307617,
2.452301025390625,
1.2361259460449219,
-1.1675688028335571,
2.57302188873291,
0.6483533978462219,
-0.30499157309532166,
-0.9679819345474243,
0.487617164850235,
-0.004606378264725208,
-1.3131123781204224,
-0.5448696613311768,
-0.9618484973907471,
-0.07523904740810394,
-0.5726854801177979,
-0.5901971459388733,
-0.04794702306389809,
0.4065364599227905,
-0.3513891100883484,
-0.4395456910133362,
-0.43381768465042114,
-0.8808251619338989,
0.4664006531238556,
-0.2956814169883728,
1.0518815517425537,
-0.3858652710914612,
1.8893367052078247,
-0.5873902440071106,
0.4372142553329468,
0.6767821907997131,
1.3257837295532227,
0.1494414359331131,
-0.18393096327781677,
0.2789095938205719,
0.29975301027297974,
-0.01819702982902527,
0.40409335494041443,
1.067789912223816,
0.5727968215942383,
0.6195706725120544,
0.7447976469993591,
-2.195906162261963,
1.4125534296035767,
-1.0510447025299072,
0.34541353583335876,
1.2851916551589966,
-0.9693935513496399,
0.24403460323810577,
-1.6640278100967407,
-0.05686473473906517,
0.5578505396842957,
-2.2679061889648438,
0.24211345613002777,
-1.3711305856704712,
-0.5162816643714905,
0.9388853311538696,
0.42658212780952454,
-1.217515468597412,
-0.02180822193622589,
-0.3801238536834717,
0.9638527631759644,
0.6082961559295654,
1.0725270509719849,
-1.8521233797073364,
-0.06149057298898697,
-0.37813517451286316,
0.1953553408384323,
-1.3728984594345093,
-1.5576833486557007,
0.6136550307273865,
0.6561233401298523,
0.6480851769447327,
-0.08831644058227539,
1.1618473529815674,
-0.9375958442687988,
0.6448802351951599,
-0.9587343335151672,
-1.6195441484451294,
-1.3462365865707397,
-2.2668325901031494,
-2.2719123363494873,
0.6998183131217957,
-0.5181182622909546,
-0.6276211142539978,
2.0417163372039795,
-1.0696065425872803,
-1.769710898399353,
1.0929162502288818,
0.13565900921821594,
0.017921630293130875,
2.37467360496521,
0.18928296864032745,
-0.6381842494010925,
0.4679080843925476,
-0.6540116667747498,
0.8271026015281677,
-0.4050350487232208,
1.3697118759155273,
0.4568769633769989,
-1.1307780742645264,
1.5845272541046143,
-0.379680871963501,
0.5882062315940857,
-0.5798355937004089,
-0.5175488591194153,
-0.8536944389343262,
0.25400489568710327,
1.8190722465515137,
-0.2629106938838959,
1.6732572317123413,
-0.227670356631279,
-1.567511796951294,
-1.7112292051315308,
0.9103535413742065,
0.3667970895767212,
-0.8068828582763672,
0.16610661149024963,
-0.47101590037345886,
0.12012023478746414,
-0.08598481118679047,
1.1722134351730347,
1.2231866121292114,
0.6487089395523071,
-0.3624929189682007,
-0.8346097469329834,
0.2597443461418152,
-0.05584735795855522,
-0.7701416015625,
-1.6768581867218018,
-0.3152811825275421,
0.011155531741678715,
0.7561239004135132,
-1.0677666664123535,
1.7185617685317993,
0.8639441132545471,
1.9761110544204712,
1.043599009513855,
-0.2501634359359741,
1.4038857221603394,
0.013689356856048107,
1.7700451612472534,
-0.5779333710670471,
0.6998794674873352,
-0.3590650260448456,
-1.050992727279663,
0.8812559843063354,
-0.3966900408267975,
-1.900163173675537,
-0.7484912872314453,
-0.8766081929206848,
-0.13116419315338135,
-0.8006965517997742,
0.9584492444992065,
-0.3843223750591278,
-1.4521968364715576,
0.35062047839164734,
-0.7587083578109741,
0.19643455743789673,
-1.1769821643829346,
0.38082706928253174,
0.7370762825012207,
-0.6189435124397278,
0.052421934902668,
-0.30140379071235657,
-1.2571641206741333,
-0.46106553077697754,
0.342287540435791,
1.9724979400634766,
-0.6397136449813843,
0.9838135838508606,
0.991080105304718,
-0.690996527671814,
0.02718581259250641,
0.24769820272922516,
-0.1388038545846939,
0.7773702144622803,
-1.11636221408844,
-0.30799388885498047,
1.2208633422851562,
-0.2729358673095703,
-0.6555786728858948,
1.569517970085144,
0.6512612700462341,
-1.0296248197555542,
-0.08179619163274765,
-0.17056359350681305,
-0.7428658604621887,
-0.027965396642684937,
-1.6550129652023315,
0.08043592423200607,
0.418771892786026,
-1.6060811281204224,
-0.4518287777900696,
-0.1293688267469406,
1.31399405002594,
-0.15862281620502472,
1.3451879024505615,
-0.3020598888397217,
-0.26876771450042725,
-0.2884227931499481,
-0.3212414085865021,
0.129754900932312,
-0.23723594844341278,
-0.6168546080589294,
0.23863054811954498,
-0.6837019324302673,
0.3247511386871338,
1.4297813177108765,
0.2969379127025604,
0.045843373984098434,
0.49311721324920654,
1.138999581336975,
0.30846351385116577,
-0.10438047349452972,
-0.7983019351959229,
-1.593098759651184,
1.9979745149612427,
-1.420881748199463,
1.916576623916626,
0.6555226445198059,
-0.07510701566934586,
-1.7848567962646484,
-1.848992109298706,
1.376086950302124,
1.2610602378845215,
2.1546547412872314,
0.6699593663215637,
0.2656286060810089,
-0.7963719964027405,
-0.6267426609992981,
0.3421246409416199,
-0.9705638885498047,
-0.7208173871040344,
0.10745532810688019,
2.2726621627807617,
1.7245186567306519,
-0.41596803069114685,
-0.218382328748703,
-1.0853748321533203,
1.3642261028289795,
-0.1900809407234192,
0.2059498131275177,
1.966912031173706,
-0.3450686037540436,
-1.1187776327133179,
1.4146158695220947,
-2.3228535652160645,
0.09930378943681717,
2.0200066566467285,
0.2522774934768677,
0.09064900875091553,
-1.3418340682983398,
-0.674872875213623,
-0.3899272084236145,
-0.3326815366744995,
-1.3341615200042725,
0.46830883622169495,
-0.2737748622894287,
-0.6306511163711548,
-1.4991333484649658,
0.27999550104141235,
-0.9044229388237,
-1.6061153411865234,
0.29459813237190247,
1.8399295806884766,
2.015673875808716,
-0.6277099847793579,
1.5025111436843872,
-0.3273599147796631,
0.1802072823047638,
1.2253953218460083,
1.2037900686264038,
3.172329902648926,
1.9686849117279053,
-1.230776309967041,
0.7586111426353455,
-0.012670869007706642,
-0.526553213596344,
1.3303006887435913,
-1.343876838684082,
1.2610551118850708,
-0.2715131938457489,
-1.313951849937439,
-1.2824177742004395,
0.8938953280448914,
0.38410642743110657,
0.05775568634271622,
-0.5707594752311707,
1.3483731746673584,
-0.09657177329063416,
1.334547519683838,
0.5940268635749817,
-0.3607587516307831,
0.6010547876358032,
-0.5542744994163513,
-0.5989094376564026,
1.5536755323410034,
0.26266562938690186,
-1.4403586387634277,
-2.2606945037841797,
-0.16847199201583862,
-0.7196459174156189,
0.11882392317056656,
-0.6271764039993286,
-1.0068820714950562,
1.7476760149002075,
0.36935004591941833,
-1.1667925119400024,
-0.24620072543621063,
-0.3268241584300995,
-0.5369739532470703,
2.7437241077423096,
-1.3523645401000977,
-0.2902190387248993,
-1.1134942770004272,
-0.6952922940254211,
1.666100263595581,
-1.3774760961532593,
-0.2798832654953003,
-1.0417678356170654,
-0.5539250373840332,
-1.282847285270691,
-0.5013341307640076,
-0.016450855880975723,
-0.9380944967269897,
0.8574256896972656,
0.21725565195083618,
-1.185951828956604,
-0.339480459690094,
-0.8972907066345215,
0.908360481262207,
-0.16260597109794617,
0.32553741335868835,
1.8163022994995117,
0.3895469605922699,
-0.44965240359306335,
0.6770719885826111,
1.2411965131759644,
0.6502366065979004,
-0.8003872632980347,
0.11340723931789398,
-0.7469809651374817,
0.3603193759918213,
-1.2107819318771362,
0.2705240249633789,
-2.887397527694702,
0.6096831560134888,
-0.10091012716293335,
-0.13422855734825134,
-0.005666796118021011,
-1.4709891080856323,
1.092624545097351,
2.596677780151367,
-1.2304052114486694,
0.45985743403434753,
0.2824803292751312,
1.1977183818817139,
-1.5546218156814575,
0.38180840015411377,
-0.5364235639572144,
2.131488800048828,
0.25296878814697266,
1.2660974264144897,
-0.3452637791633606,
-2.340921401977539,
0.6814050674438477,
-1.2314026355743408,
-1.266733169555664,
0.745742678642273,
-0.9568997621536255,
0.03407082334160805,
-1.3966474533081055,
-0.12780334055423737,
-0.7938356399536133,
-1.2506173849105835,
0.8342708349227905,
0.15321829915046692,
0.5034341216087341,
-0.5489612221717834,
0.35833343863487244,
-2.1727182865142822,
-1.3614856004714966,
-0.20263822376728058,
-1.0160702466964722,
0.4763125777244568,
-0.3933620750904083,
0.6498717069625854,
-0.3224457800388336,
-0.026612304151058197,
0.5279319286346436,
1.4499645233154297,
3.462348699569702,
0.23160894215106964,
0.3675292432308197,
-0.15995585918426514,
-0.9048087000846863,
1.477405071258545,
0.8829569816589355,
-0.02840946614742279,
-0.48339661955833435,
-0.9959233999252319,
1.2416791915893555,
1.9999061822891235,
0.9480524063110352,
-0.004862214904278517,
-0.7773275971412659,
-0.6114962697029114,
-0.03879117593169212,
0.273650586605072,
0.4473511874675751,
0.8567256927490234,
0.16350920498371124,
0.14819610118865967,
1.3951621055603027,
1.1958739757537842,
-0.40589410066604614,
0.4559808075428009,
-0.8075273633003235,
-0.4223729372024536,
0.6581194400787354,
0.34288206696510315,
-0.10250191390514374,
0.4671081304550171,
-0.876922070980072,
-0.2308044582605362,
-0.383694052696228,
-0.8980360627174377,
-0.6977664828300476,
-0.45789235830307007,
-0.3194025456905365,
1.6650032997131348,
-0.07986700534820557,
-0.5691441297531128,
-0.09275836497545242,
-0.6841497421264648,
-0.12070457637310028,
-1.1041189432144165,
0.2708147466182709,
-0.12666943669319153,
-0.17224887013435364,
0.0016599968075752258,
1.6981558799743652,
-0.9807714223861694,
-2.1039226055145264,
0.3064473271369934,
0.3440450131893158,
-0.3203498423099518,
0.25937530398368835,
1.5320335626602173,
0.47610530257225037,
1.488612413406372,
1.4234580993652344,
1.0606811046600342,
-0.789498507976532,
-1.3283727169036865,
0.683235228061676,
0.8796848654747009,
-1.3561770915985107,
0.899019181728363,
-0.02519809454679489,
-0.5352945923805237,
0.5023702383041382,
1.167937159538269,
0.6407565474510193,
-1.8774346113204956,
0.7149621248245239,
-1.0082409381866455,
0.7873662710189819,
0.8026627898216248,
0.8029006123542786,
0.25037285685539246,
0.8516915440559387,
-1.2411112785339355,
-1.1119070053100586,
-0.6981042623519897,
-0.6705046892166138,
1.8531004190444946,
-0.33799758553504944,
0.6604201793670654,
-0.16967280209064484,
-1.27485191822052,
-0.05705593526363373,
0.802250862121582,
0.38979995250701904,
-0.4540015459060669,
0.7783355712890625,
-0.6958605051040649,
-1.0030416250228882,
-1.2895971536636353,
-0.4571076035499573,
-1.1075243949890137,
-0.919514000415802,
1.1749894618988037,
0.7401341199874878,
0.22435685992240906,
1.8936145305633545,
0.6288291811943054,
0.3438267409801483,
-2.5427498817443848,
0.7890388369560242,
0.20958931744098663,
0.039153121411800385,
0.8386260271072388,
0.395454078912735,
0.9896474480628967,
0.06925179064273834,
0.5379466414451599,
-2.3574273586273193,
2.3266546726226807,
-0.2244497537612915,
0.6422250270843506,
-0.0439738929271698,
-0.19469302892684937,
1.1168487071990967,
0.5650277733802795,
0.45697110891342163,
-1.0631444454193115,
0.746082067489624,
-0.7059037685394287,
1.244434118270874,
0.9660689234733582,
-0.8872241377830505,
0.02743290364742279,
1.3717495203018188,
0.49239611625671387,
-0.5546892285346985,
-0.9434763193130493,
-0.9075219035148621,
0.8466587066650391,
1.6315160989761353,
0.002111343666911125,
-0.04725245386362076,
0.8295775651931763,
0.7210718393325806,
-1.2541342973709106,
0.17499376833438873,
-0.681475043296814,
-0.7540919184684753,
1.6703776121139526,
1.9333158731460571,
-0.21076460182666779,
-0.03996798396110535,
-0.7814149856567383,
-1.058882236480713,
0.8252406120300293,
0.045828938484191895,
-0.0744113102555275,
0.5844791531562805,
-0.6576131582260132,
1.0210033655166626,
0.9098799228668213,
0.9541268348693848,
0.23397772014141083,
0.34581708908081055,
0.4721434414386749,
-0.2836192548274994,
-1.166067361831665,
-0.2542596757411957,
-1.182151436805725,
-2.634963274002075,
0.5204325318336487,
-0.4483604431152344,
-1.4047681093215942,
0.08612929284572601,
-1.1220930814743042,
1.0165798664093018,
-0.6202399730682373,
-0.9712463617324829,
-1.5494803190231323,
0.08313465863466263,
-0.11523723602294922,
0.8937206268310547,
-1.5142343044281006,
-0.1052510216832161,
1.179581880569458,
0.9097406268119812,
-0.7527827024459839,
1.026281476020813,
0.1642778217792511,
0.9400961399078369,
0.8880414366722107,
-0.40021204948425293,
0.5379873514175415,
0.11172983795404434,
-1.3782857656478882,
0.6107565760612488,
1.1625263690948486,
0.19023750722408295,
1.5003228187561035,
-0.499571293592453,
-0.051805440336465836,
0.3937571346759796,
-0.43559178709983826,
-0.40463966131210327,
-0.6352766752243042,
0.8058876395225525,
0.08615263551473618,
-0.8625120520591736,
0.056160397827625275,
-0.08640565723180771,
-0.24825404584407806,
0.15918520092964172,
-1.5503615140914917,
-0.19459637999534607,
-0.4667004644870758,
-0.600634753704071,
-1.3104115724563599,
-0.1418098360300064,
1.4045071601867676,
-0.7311533689498901,
-0.1226174384355545,
0.36935630440711975,
0.38064298033714294,
0.5232714414596558,
0.6384185552597046,
-0.6974753141403198,
-0.2667078375816345,
-0.3500038683414459,
-0.3477410078048706,
0.3756871521472931,
1.2953001260757446,
-0.14349976181983948,
-1.0625603199005127,
0.7034451961517334,
-0.26163309812545776,
0.015922077000141144,
1.9074474573135376,
0.08795265853404999,
-0.6787919998168945,
0.22374123334884644,
-0.6679933667182922,
1.903825044631958,
1.7099583148956299,
1.3530546426773071,
-0.1184382364153862,
-1.0285217761993408,
0.6622846126556396,
-0.22893781960010529,
-0.3628543019294739,
0.8414625525474548,
0.38306671380996704,
-0.18255512416362762,
-1.3909220695495605,
0.7795217633247375,
1.1478232145309448,
-0.8697078824043274,
-0.8630414009094238,
0.09075172990560532,
-0.752066969871521,
1.088390827178955,
0.5153290629386902,
0.3505302667617798,
0.3770503103733063,
1.644158959388733,
0.5872491002082825,
-0.4055609703063965,
0.5319625735282898,
0.44320234656333923,
-0.11858033388853073,
-2.112640380859375,
-1.1365910768508911,
0.3927100598812103,
-0.5012046098709106,
-1.541831612586975,
1.3829152584075928,
-1.1986384391784668,
-0.7872524261474609,
0.550313413143158,
0.10151553153991699,
1.4927783012390137,
0.28588294982910156,
1.5997689962387085,
2.1444947719573975,
0.8506217002868652,
0.410372257232666,
1.2949022054672241,
-0.18617194890975952,
-0.39376696944236755,
1.7188420295715332,
-0.382306843996048,
0.5171678066253662,
1.2057862281799316,
-0.31861287355422974,
-1.108053207397461,
-0.7650439739227295,
-1.2397414445877075,
-0.7068698406219482,
1.043931007385254,
0.0984167605638504,
-1.225674033164978,
0.23534727096557617,
1.485634207725525,
0.11956242471933365,
-0.18781667947769165,
0.5086172819137573,
0.41285333037376404,
-0.8282320499420166,
-0.15214474499225616,
-1.0228939056396484,
0.5533681511878967,
-0.31800130009651184,
-0.36920711398124695,
0.3222269117832184,
0.4635826349258423,
1.3048955202102661,
-0.024568140506744385,
0.13852863013744354,
1.1789729595184326,
-1.3594422340393066,
1.4190808534622192,
-0.6356598734855652,
0.14748899638652802,
-2.3273684978485107,
1.4016656875610352,
-0.7147387266159058,
1.9294466972351074,
-2.6675007343292236,
0.3968615233898163,
-0.6511297821998596,
-0.3985235393047333,
0.39941951632499695,
-0.3175419569015503,
0.1616087406873703,
-0.3059602677822113,
-1.0567207336425781,
0.007914242334663868,
-0.7258415222167969,
0.5697720646858215,
1.0726131200790405,
1.345566987991333,
-1.0893832445144653,
-0.31099069118499756,
-1.7158468961715698,
-0.20323234796524048,
-0.6677889227867126,
0.28385841846466064,
-1.9573534727096558,
-0.17482340335845947,
-1.999003529548645,
-2.5060324668884277,
-1.2239540815353394,
-0.7174437046051025,
1.1571946144104004,
0.11830984801054001,
-0.8785131573677063,
1.1977643966674805,
-0.3086986839771271,
-1.8363693952560425,
1.12955904006958,
-2.2007851600646973
] |
https://github.com/huggingface/datasets/issues/6012 | [FR] Transform Chaining, Lazy Mapping | The params passed to `Dataset.from_generator` will be used to compute the hash (`partial` encapsulates the `iterable_ds` value, so changing it will also change the hash) | ### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_ | 70 | 25 | [FR] Transform Chaining, Lazy Mapping
### Feature request
Currently using a `map` call processes and duplicates the whole dataset, which takes both time and disk space.
The solution is to allow lazy mapping, which is essentially a saved chain of transforms that are applied on the fly whenever a slice of the dataset is requested.
The API should look like `map`, as `set_transform` changes the current dataset while `map` returns another dataset.
### Motivation
Lazy processing allows lower disk usage and faster experimentation.
### Your contribution
_
The params passed to `Dataset.from_generator` will be used to compute the hash (`partial` encapsulates the `iterable_ds` value, so changing it will also change the hash) | [
-1.0984760522842407,
-0.9226612448692322,
-0.9080625772476196,
1.5355280637741089,
-0.2036859393119812,
-1.4001668691635132,
0.22569048404693604,
-1.1934378147125244,
1.8280458450317383,
-0.8923319578170776,
0.3684398829936981,
-1.6441292762756348,
-0.011517640203237534,
-0.6418879628181458,
-0.7160815596580505,
-0.9349855184555054,
-0.38089224696159363,
-0.7708922624588013,
1.0085091590881348,
2.4701056480407715,
1.1205425262451172,
-1.1550877094268799,
2.6455352306365967,
0.6849110126495361,
-0.23250509798526764,
-0.9313893914222717,
0.5081689357757568,
-0.06574936211109161,
-1.2626999616622925,
-0.6148015856742859,
-1.0080679655075073,
-0.07789341360330582,
-0.5029954314231873,
-0.6630391478538513,
-0.043260231614112854,
0.4333665370941162,
-0.3211061954498291,
-0.5573170781135559,
-0.44325679540634155,
-0.9117806553840637,
0.44524118304252625,
-0.2739522457122803,
0.9884143471717834,
-0.4840013086795807,
1.9386879205703735,
-0.5706285834312439,
0.3030461370944977,
0.7570433616638184,
1.410635232925415,
0.1363852471113205,
-0.19575844705104828,
0.30517831444740295,
0.3978816866874695,
-0.05582250654697418,
0.4173404276371002,
1.1031543016433716,
0.55450439453125,
0.7278541326522827,
0.8146201372146606,
-2.1335110664367676,
1.3711018562316895,
-1.074825406074524,
0.37912067770957947,
1.2584879398345947,
-1.049292802810669,
0.25206756591796875,
-1.6709039211273193,
-0.03231583535671234,
0.4755139648914337,
-2.291539430618286,
0.275155633687973,
-1.21957528591156,
-0.5408252477645874,
0.9549852609634399,
0.36590203642845154,
-1.2497014999389648,
0.021906353533267975,
-0.3452702760696411,
0.9624675512313843,
0.5531622767448425,
1.0528013706207275,
-1.798772931098938,
-0.03334805369377136,
-0.4384005069732666,
0.024025792255997658,
-1.4194496870040894,
-1.4458099603652954,
0.563413143157959,
0.7378613352775574,
0.5886473655700684,
-0.1230362206697464,
1.1320934295654297,
-0.9294691681861877,
0.7084797620773315,
-0.9100363254547119,
-1.7552495002746582,
-1.3034965991973877,
-2.133305311203003,
-2.2507805824279785,
0.7794204354286194,
-0.47506698966026306,
-0.6078572273254395,
2.092604875564575,
-0.9869795441627502,
-1.8210633993148804,
1.1178104877471924,
0.17793580889701843,
-0.07013817876577377,
2.3894264698028564,
0.23486976325511932,
-0.5640254616737366,
0.412178635597229,
-0.6281989216804504,
0.8350706696510315,
-0.6217664480209351,
1.3945038318634033,
0.3609526753425598,
-1.1637089252471924,
1.6889331340789795,
-0.4088756740093231,
0.6383090019226074,
-0.6266356706619263,
-0.4650247097015381,
-0.9108216166496277,
0.4209326505661011,
1.891218900680542,
-0.37773600220680237,
1.6274601221084595,
-0.3277657628059387,
-1.4938935041427612,
-1.722125768661499,
0.9397490620613098,
0.3203240931034088,
-0.7572372555732727,
0.17837417125701904,
-0.31795504689216614,
0.07163934409618378,
-0.11322492361068726,
1.2096328735351562,
1.213362216949463,
0.7246751189231873,
-0.2661985754966736,
-0.844622790813446,
0.2449730485677719,
-0.013718768954277039,
-0.7870509624481201,
-1.6459298133850098,
-0.4200073182582855,
0.027925489470362663,
0.6415700316429138,
-1.088932752609253,
1.7459574937820435,
0.9005093574523926,
1.9828780889511108,
0.9717400670051575,
-0.250126451253891,
1.3666725158691406,
0.018777860328555107,
1.8678263425827026,
-0.44456571340560913,
0.7239270806312561,
-0.33838632702827454,
-1.137979507446289,
0.9227839112281799,
-0.37038496136665344,
-1.8878073692321777,
-0.7847413420677185,
-0.9776451587677002,
-0.07045795023441315,
-0.6628087759017944,
1.0252571105957031,
-0.3485667407512665,
-1.3727340698242188,
0.225333109498024,
-0.7477289438247681,
0.11367512494325638,
-1.237181544303894,
0.3589491844177246,
0.7948884963989258,
-0.6538292169570923,
0.07935640215873718,
-0.279470294713974,
-1.2729580402374268,
-0.45851370692253113,
0.31959405541419983,
1.983363151550293,
-0.7869524955749512,
0.9497999548912048,
0.9948623776435852,
-0.7488080263137817,
-0.11136426031589508,
0.3136734068393707,
-0.2614675462245941,
0.7880352735519409,
-1.0942662954330444,
-0.31697362661361694,
1.1773368120193481,
-0.1589374542236328,
-0.7115314602851868,
1.4861749410629272,
0.6744177937507629,
-1.0907140970230103,
-0.047944679856300354,
-0.2411327213048935,
-0.7856091260910034,
0.0024297991767525673,
-1.623506784439087,
0.013777187094092369,
0.40984421968460083,
-1.5246248245239258,
-0.5168786644935608,
-0.12538574635982513,
1.307483196258545,
-0.06680426746606827,
1.3212471008300781,
-0.3125467598438263,
-0.38543030619621277,
-0.40174850821495056,
-0.31500715017318726,
0.1311202049255371,
-0.26747339963912964,
-0.6760441660881042,
0.2379947155714035,
-0.5209982395172119,
0.3555402457714081,
1.3989627361297607,
0.3219921886920929,
0.08037318289279938,
0.6690213680267334,
1.1160914897918701,
0.32400479912757874,
-0.12135832756757736,
-0.9067756533622742,
-1.4532731771469116,
1.9316225051879883,
-1.3680781126022339,
1.8793550729751587,
0.7040873765945435,
-0.009200516156852245,
-1.8469518423080444,
-1.942933440208435,
1.465476393699646,
1.291799783706665,
2.107677698135376,
0.7274821996688843,
0.2953397333621979,
-0.865996241569519,
-0.5860289335250854,
0.32067927718162537,
-1.0546655654907227,
-0.7560347318649292,
0.07367106527090073,
2.278489351272583,
1.7777438163757324,
-0.45266109704971313,
-0.2519426941871643,
-1.1319454908370972,
1.3285043239593506,
-0.16191688179969788,
0.2452676147222519,
1.8814029693603516,
-0.3855060338973999,
-1.0330078601837158,
1.1747335195541382,
-2.2895894050598145,
0.03726571053266525,
1.9869959354400635,
0.16358458995819092,
0.11160890012979507,
-1.3753718137741089,
-0.6726782321929932,
-0.23760777711868286,
-0.303907185792923,
-1.3250555992126465,
0.4918081760406494,
-0.24086809158325195,
-0.6420960426330566,
-1.4999841451644897,
0.278578519821167,
-0.9309441447257996,
-1.575184941291809,
0.21609005331993103,
1.871983528137207,
1.8986656665802002,
-0.6741158366203308,
1.6078591346740723,
-0.23397758603096008,
0.17129163444042206,
1.2672514915466309,
1.1469624042510986,
3.1359243392944336,
1.9724527597427368,
-1.1950563192367554,
0.6920351982116699,
-0.009652035310864449,
-0.47373124957084656,
1.3040423393249512,
-1.214516282081604,
1.3871405124664307,
-0.3190958797931671,
-1.211202621459961,
-1.3478739261627197,
0.8192808628082275,
0.41751670837402344,
0.10570493340492249,
-0.38634228706359863,
1.3307439088821411,
0.010175613686442375,
1.3263304233551025,
0.5948527455329895,
-0.4097605049610138,
0.7102653980255127,
-0.42724382877349854,
-0.5012738704681396,
1.5663080215454102,
0.34483790397644043,
-1.3013274669647217,
-2.2385964393615723,
-0.0989755168557167,
-0.7535969018936157,
0.11488458514213562,
-0.5693888068199158,
-0.8937254548072815,
1.753462553024292,
0.43865999579429626,
-1.144921064376831,
-0.3060217797756195,
-0.34021997451782227,
-0.6156067848205566,
2.7700839042663574,
-1.493147850036621,
-0.3495381474494934,
-1.0660206079483032,
-0.5646185874938965,
1.7196002006530762,
-1.3473068475723267,
-0.23470905423164368,
-1.0197172164916992,
-0.47014012932777405,
-1.2150338888168335,
-0.5559151768684387,
-0.06392670422792435,
-0.9012792706489563,
0.9306240081787109,
0.19280222058296204,
-1.2057230472564697,
-0.32906079292297363,
-0.8815985321998596,
0.7498849630355835,
-0.1560869663953781,
0.3008964955806732,
1.9020346403121948,
0.44560670852661133,
-0.4312659502029419,
0.7688575387001038,
1.1644548177719116,
0.5894776582717896,
-0.6736401915550232,
0.3461136519908905,
-0.651702344417572,
0.26875030994415283,
-1.2242681980133057,
0.2075013369321823,
-2.943732738494873,
0.44421347975730896,
-0.14665311574935913,
-0.09869249165058136,
0.023595379665493965,
-1.419437289237976,
1.0720936059951782,
2.554377317428589,
-1.2131282091140747,
0.4485251009464264,
0.23973657190799713,
1.3026107549667358,
-1.5885392427444458,
0.3433009088039398,
-0.4771042764186859,
2.0577316284179688,
0.18018077313899994,
1.184983730316162,
-0.4055332839488983,
-2.2019691467285156,
0.6010072231292725,
-1.27216374874115,
-1.3073415756225586,
0.7257479429244995,
-0.847097635269165,
-0.03937248885631561,
-1.3685405254364014,
-0.17821332812309265,
-0.7404896020889282,
-1.3505918979644775,
0.7566937804222107,
0.13587072491645813,
0.5412988066673279,
-0.5971068739891052,
0.32878297567367554,
-2.058276414871216,
-1.3521827459335327,
-0.27017390727996826,
-0.9742910265922546,
0.3781989812850952,
-0.34677568078041077,
0.7060727477073669,
-0.39848098158836365,
-0.01451769471168518,
0.4328218102455139,
1.3933073282241821,
3.4549481868743896,
0.25480586290359497,
0.4111495316028595,
-0.2462821751832962,
-0.8582888841629028,
1.4447455406188965,
0.9561099410057068,
-0.03026389330625534,
-0.5440384149551392,
-0.9706597924232483,
1.2374992370605469,
1.9978879690170288,
0.9429948329925537,
-0.038270216435194016,
-0.7479717135429382,
-0.6232679486274719,
-0.15362311899662018,
0.2589312493801117,
0.38144081830978394,
0.9192858934402466,
0.22666124999523163,
0.09182228893041611,
1.3350731134414673,
1.2130571603775024,
-0.5035989284515381,
0.4646123945713043,
-0.7500529289245605,
-0.38565829396247864,
0.6639760732650757,
0.4198295772075653,
0.0020912112668156624,
0.306540846824646,
-0.9593610763549805,
-0.26191261410713196,
-0.4137779176235199,
-0.938947856426239,
-0.7253288626670837,
-0.40923282504081726,
-0.35071036219596863,
1.7317150831222534,
-0.017729585990309715,
-0.5794399976730347,
-0.1704283058643341,
-0.7065742611885071,
0.015241719782352448,
-0.9972311854362488,
0.25786900520324707,
-0.14237621426582336,
-0.23044715821743011,
0.05529683083295822,
1.7640297412872314,
-1.024895429611206,
-2.0621347427368164,
0.37595945596694946,
0.23936118185520172,
-0.3005666732788086,
0.24004706740379333,
1.4730870723724365,
0.5211277604103088,
1.5665961503982544,
1.5044881105422974,
1.0060474872589111,
-0.8683688044548035,
-1.4196853637695312,
0.6336187124252319,
0.946578323841095,
-1.4311637878417969,
0.7069945931434631,
0.08601018041372299,
-0.5676783919334412,
0.5621832013130188,
1.162055492401123,
0.6013396382331848,
-1.94423508644104,
0.6668540835380554,
-0.9246779680252075,
0.7819622159004211,
0.818011999130249,
0.7094298601150513,
0.2875124216079712,
0.7342879772186279,
-1.1355396509170532,
-1.2310380935668945,
-0.669386088848114,
-0.6425787806510925,
1.868322491645813,
-0.3035930097103119,
0.6673845052719116,
-0.0980537086725235,
-1.3709924221038818,
-0.09662700444459915,
0.7171598672866821,
0.4258110821247101,
-0.4707697927951813,
0.7134549617767334,
-0.6905736923217773,
-1.0683447122573853,
-1.407813310623169,
-0.4707551598548889,
-1.1735392808914185,
-0.9967904686927795,
1.1072251796722412,
0.8409174680709839,
0.18248707056045532,
1.9076693058013916,
0.6799735426902771,
0.3279852271080017,
-2.5692429542541504,
0.8609389066696167,
0.3262135684490204,
0.001949426718056202,
0.7948845624923706,
0.46378636360168457,
0.9632211327552795,
0.006224384531378746,
0.5325371026992798,
-2.438469886779785,
2.4093217849731445,
-0.2269469052553177,
0.5457021594047546,
-0.012299391441047192,
-0.1964941769838333,
1.1867642402648926,
0.4585850238800049,
0.48525577783584595,
-1.0767817497253418,
0.6405129432678223,
-0.7105326056480408,
1.3576797246932983,
0.8795592188835144,
-0.817497193813324,
0.053506478667259216,
1.3572020530700684,
0.5999029874801636,
-0.5390911102294922,
-0.8662616610527039,
-1.0803313255310059,
0.8895457983016968,
1.6905659437179565,
-0.03313698619604111,
-0.006921548396348953,
0.8668578863143921,
0.626606285572052,
-1.3010728359222412,
0.19802996516227722,
-0.7144417762756348,
-0.7729782462120056,
1.605939507484436,
1.8423727750778198,
-0.21810489892959595,
-0.0717223733663559,
-0.8475139141082764,
-1.1198511123657227,
0.7676658630371094,
0.11671501398086548,
-0.021463243290781975,
0.66446852684021,
-0.6159009337425232,
1.0940003395080566,
0.9496690034866333,
0.8600080609321594,
0.2655216157436371,
0.3676030933856964,
0.4609530568122864,
-0.3283421993255615,
-1.143471360206604,
-0.14760687947273254,
-1.0985418558120728,
-2.658615827560425,
0.4418368935585022,
-0.39921581745147705,
-1.4277138710021973,
-0.011609872803092003,
-1.087039828300476,
0.9385510683059692,
-0.5622948408126831,
-1.0132203102111816,
-1.613837718963623,
0.14484724402427673,
-0.08449971675872803,
0.8584783673286438,
-1.4854553937911987,
-0.02284057065844536,
1.1941161155700684,
0.9705800414085388,
-0.8868159055709839,
1.015206217765808,
0.16667361557483673,
1.058006763458252,
0.8668110370635986,
-0.38146519660949707,
0.4525032937526703,
-0.035724274814128876,
-1.387712836265564,
0.5975205898284912,
1.1553374528884888,
0.09630203992128372,
1.4593368768692017,
-0.5749028325080872,
-0.0352143794298172,
0.4540245831012726,
-0.33529844880104065,
-0.4624215066432953,
-0.6778689622879028,
0.7727674841880798,
0.01624726504087448,
-0.802323043346405,
0.14993815124034882,
-0.03385760262608528,
-0.2611403465270996,
0.2037622183561325,
-1.4983776807785034,
-0.23117686808109283,
-0.4498208165168762,
-0.660674512386322,
-1.1779533624649048,
-0.061105310916900635,
1.3422412872314453,
-0.5574402213096619,
-0.19045904278755188,
0.48027825355529785,
0.367302805185318,
0.4640013575553894,
0.6105185151100159,
-0.6210885643959045,
-0.32287535071372986,
-0.25197914242744446,
-0.3714747726917267,
0.4641634225845337,
1.3953266143798828,
-0.18280403316020966,
-1.0147541761398315,
0.7375737428665161,
-0.29760870337486267,
-0.03811279684305191,
1.914876937866211,
0.1584170162677765,
-0.8501219153404236,
0.17638961970806122,
-0.69829922914505,
1.9658210277557373,
1.6869335174560547,
1.296879529953003,
-0.011062391102313995,
-0.9931484460830688,
0.650005042552948,
-0.16093836724758148,
-0.323623389005661,
0.8838037252426147,
0.34837397933006287,
-0.17847518622875214,
-1.4112215042114258,
0.6785626411437988,
1.217568039894104,
-0.7718803882598877,
-0.940121054649353,
0.008520008996129036,
-0.755763590335846,
1.0287026166915894,
0.6922270655632019,
0.40607044100761414,
0.35194632411003113,
1.589229941368103,
0.7223026752471924,
-0.3787092864513397,
0.48327457904815674,
0.44201573729515076,
-0.05018920451402664,
-2.144735813140869,
-1.091903567314148,
0.36315691471099854,
-0.4920075833797455,
-1.6616898775100708,
1.4161832332611084,
-1.2151970863342285,
-0.7363683581352234,
0.51026451587677,
0.10092382878065109,
1.5280563831329346,
0.2882779538631439,
1.476517915725708,
2.152622938156128,
0.8589277863502502,
0.33345380425453186,
1.3248512744903564,
-0.22013089060783386,
-0.41564738750457764,
1.855050802230835,
-0.4930849075317383,
0.4657333791255951,
1.1301594972610474,
-0.3505655825138092,
-1.0666919946670532,
-0.6316209435462952,
-1.2867844104766846,
-0.6886557936668396,
1.0166800022125244,
0.09522788226604462,
-1.2533289194107056,
0.2770518362522125,
1.3927463293075562,
0.10130179673433304,
-0.2792363464832306,
0.5038502216339111,
0.4499225914478302,
-0.8402905464172363,
-0.0898837149143219,
-0.8681840896606445,
0.5624628663063049,
-0.2180207371711731,
-0.36611106991767883,
0.47455915808677673,
0.45837098360061646,
1.2726985216140747,
-0.02818857505917549,
0.18954627215862274,
1.1364028453826904,
-1.3987376689910889,
1.5170979499816895,
-0.6295643448829651,
0.13665665686130524,
-2.3343021869659424,
1.4756124019622803,
-0.7092775106430054,
1.8623297214508057,
-2.6924920082092285,
0.3926551640033722,
-0.6535391211509705,
-0.35714250802993774,
0.47938069701194763,
-0.30393821001052856,
0.13096944987773895,
-0.29927879571914673,
-1.2608646154403687,
-0.01572539284825325,
-0.7362722754478455,
0.5419731140136719,
1.0519520044326782,
1.3159536123275757,
-1.076576590538025,
-0.34214746952056885,
-1.7380644083023071,
-0.09428061544895172,
-0.6100700497627258,
0.3566534221172333,
-2.0693740844726562,
-0.24616722762584686,
-1.955743432044983,
-2.3832149505615234,
-1.248046636581421,
-0.7547006011009216,
1.1786367893218994,
0.1298556923866272,
-0.8368055820465088,
1.2026150226593018,
-0.31416335701942444,
-1.8949463367462158,
1.0432398319244385,
-2.194737195968628
] |
https://github.com/huggingface/datasets/issues/6011 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index | Hi! You can do `ds.get_index("embeddings").faiss_index.metric_type` to get the metric type and then match the result with the FAISS metric [enum](https://github.com/facebookresearch/faiss/blob/43d86e30736ede853c384b24667fc3ab897d6ba9/faiss/MetricType.h#L22-L36) (should be L2). | ### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 71 | 23 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index
### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
Hi! You can do `ds.get_index("embeddings").faiss_index.metric_type` to get the metric type and then match the result with the FAISS metric [enum](https://github.com/facebookresearch/faiss/blob/43d86e30736ede853c384b24667fc3ab897d6ba9/faiss/MetricType.h#L22-L36) (should be L2). | [
-1.2446866035461426,
-0.98016756772995,
-0.6705538630485535,
1.5742006301879883,
-0.22045759856700897,
-1.1787488460540771,
0.13914144039154053,
-1.0054317712783813,
1.738943099975586,
-0.8767253756523132,
0.3254598081111908,
-1.6246047019958496,
0.0812084898352623,
-0.5420742034912109,
-0.8202046751976013,
-0.8559951186180115,
-0.3244331181049347,
-0.8811795711517334,
1.1890043020248413,
2.4745335578918457,
1.193381667137146,
-1.343591332435608,
2.7416136264801025,
0.6190023422241211,
-0.203236386179924,
-1.1043130159378052,
0.4922775328159332,
-0.15563467144966125,
-1.3663074970245361,
-0.5165343880653381,
-1.018614411354065,
-0.15839451551437378,
-0.6321862936019897,
-0.5615891814231873,
0.04785346984863281,
0.5101169347763062,
-0.31871363520622253,
-0.5493846535682678,
-0.5102746486663818,
-0.8822465538978577,
0.5066697001457214,
-0.3234190046787262,
0.8914341926574707,
-0.2619175314903259,
1.8430672883987427,
-0.5731731653213501,
0.47889721393585205,
0.688910722732544,
1.3585702180862427,
0.27030688524246216,
-0.0693487748503685,
0.35924291610717773,
0.34813499450683594,
-0.034425683319568634,
0.5936669111251831,
1.1847678422927856,
0.6403136849403381,
0.5137963891029358,
0.7103938460350037,
-2.2869255542755127,
1.4221371412277222,
-1.1518853902816772,
0.3169757127761841,
1.2846564054489136,
-0.9039952158927917,
0.28446823358535767,
-1.7901408672332764,
0.04997176304459572,
0.6351884007453918,
-2.144186019897461,
0.4276263415813446,
-1.3265353441238403,
-0.5060442090034485,
1.1255466938018799,
0.47840631008148193,
-1.2267241477966309,
0.01052733976393938,
-0.42676055431365967,
1.1080397367477417,
0.4414558708667755,
0.9530224800109863,
-1.6671682596206665,
-0.14635752141475677,
-0.3122510612010956,
0.1805945187807083,
-1.2617448568344116,
-1.5482194423675537,
0.6642901301383972,
0.5918089151382446,
0.6015364527702332,
-0.09602417051792145,
1.1553852558135986,
-1.0206602811813354,
0.7457916736602783,
-1.0714980363845825,
-1.7711834907531738,
-1.4693620204925537,
-2.3178231716156006,
-2.303910255432129,
0.6572233438491821,
-0.4254781901836395,
-0.5557504296302795,
2.131336212158203,
-0.945064127445221,
-1.7757914066314697,
1.203609824180603,
0.22659888863563538,
0.03201436623930931,
2.346583843231201,
0.1938960999250412,
-0.7177011370658875,
0.4938490688800812,
-0.8216152191162109,
0.8291798830032349,
-0.34548482298851013,
1.3281512260437012,
0.3654481768608093,
-1.1611394882202148,
1.586482286453247,
-0.2562587261199951,
0.5599040985107422,
-0.6544713377952576,
-0.5380995869636536,
-0.6474905014038086,
0.2592879831790924,
1.9246292114257812,
-0.2763505280017853,
1.5087885856628418,
-0.49056586623191833,
-1.4995511770248413,
-1.5800074338912964,
0.9657860994338989,
0.4335361123085022,
-0.7974583506584167,
0.21124957501888275,
-0.40596693754196167,
0.2236635684967041,
-0.03492027893662453,
1.2089120149612427,
1.3700464963912964,
0.7219740152359009,
-0.3505893349647522,
-0.8025187253952026,
0.08976642042398453,
-0.04277992993593216,
-0.7392174601554871,
-1.7765082120895386,
-0.43012282252311707,
0.04898185282945633,
0.6990894079208374,
-1.155916690826416,
1.755022644996643,
0.8541514277458191,
2.0182065963745117,
1.061972737312317,
-0.3439454436302185,
1.4759514331817627,
0.11177796870470047,
1.7863949537277222,
-0.5265685319900513,
0.6270904541015625,
-0.4476238787174225,
-1.124179482460022,
0.8660736680030823,
-0.2950439453125,
-2.0145177841186523,
-0.7853758335113525,
-0.7483530044555664,
-0.24605894088745117,
-0.8177260160446167,
0.9160526990890503,
-0.3160976767539978,
-1.563378095626831,
0.28666865825653076,
-0.81817626953125,
0.28642022609710693,
-1.1437923908233643,
0.2938714027404785,
0.6996365785598755,
-0.5686668753623962,
0.2029857039451599,
-0.24666321277618408,
-1.2118486166000366,
-0.5154703855514526,
0.352131724357605,
1.7842227220535278,
-0.6987946033477783,
0.8832847476005554,
1.059234619140625,
-0.6918977499008179,
-0.13047485053539276,
0.2832256555557251,
-0.2194374054670334,
0.8339398503303528,
-1.0435137748718262,
-0.4829423427581787,
1.2512701749801636,
-0.3241288661956787,
-0.5474799871444702,
1.426631212234497,
0.6399798393249512,
-1.0238707065582275,
-0.1684638261795044,
-0.1747099906206131,
-0.830334484577179,
0.03928675502538681,
-1.5570939779281616,
-0.16432975232601166,
0.578120231628418,
-1.6540544033050537,
-0.43053993582725525,
-0.04745753854513168,
1.3613725900650024,
-0.17030282318592072,
1.4023035764694214,
-0.4005362093448639,
-0.08699002861976624,
-0.24666719138622284,
-0.3407655358314514,
0.15622414648532867,
-0.23702116310596466,
-0.6003347039222717,
0.09976863116025925,
-0.6901686787605286,
0.2996678054332733,
1.5306236743927002,
0.37403568625450134,
0.016624249517917633,
0.38257238268852234,
1.224310278892517,
0.402095228433609,
0.020937591791152954,
-0.8117591142654419,
-1.506283164024353,
1.928544521331787,
-1.4756308794021606,
2.063401222229004,
0.717438817024231,
0.0010674353688955307,
-1.7269182205200195,
-1.8507683277130127,
1.277696967124939,
1.0743763446807861,
2.319436550140381,
0.552034854888916,
0.4458426833152771,
-0.8630408048629761,
-0.6760455965995789,
0.33831581473350525,
-1.0151281356811523,
-0.7943917512893677,
0.10433567315340042,
2.434709310531616,
1.7692586183547974,
-0.3226059675216675,
-0.19920741021633148,
-0.957844614982605,
1.5050486326217651,
-0.24205516278743744,
0.21790947020053864,
1.906430721282959,
-0.17678652703762054,
-1.0520161390304565,
1.2285956144332886,
-2.299382448196411,
0.2461477667093277,
2.1126797199249268,
0.21370260417461395,
0.13518650829792023,
-1.4816216230392456,
-0.5468378067016602,
-0.22069589793682098,
-0.3578007221221924,
-1.2519077062606812,
0.5010496973991394,
-0.24526457488536835,
-0.6904556155204773,
-1.4413154125213623,
0.1509554535150528,
-1.0731213092803955,
-1.5792360305786133,
0.12671029567718506,
1.9960145950317383,
2.1138556003570557,
-0.7555328011512756,
1.5784595012664795,
-0.32259809970855713,
0.15985055267810822,
1.3121538162231445,
1.2453261613845825,
2.9934375286102295,
1.8922384977340698,
-1.262915849685669,
0.6653768420219421,
-0.20820294320583344,
-0.49441275000572205,
1.115754246711731,
-1.2509132623672485,
1.3394256830215454,
-0.04404422268271446,
-1.1062302589416504,
-1.2918678522109985,
0.9730772376060486,
0.5466320514678955,
-0.0523948073387146,
-0.42592763900756836,
1.1980515718460083,
0.07098148763179779,
1.2731024026870728,
0.5675508379936218,
-0.34421610832214355,
0.6435050964355469,
-0.38034576177597046,
-0.5697340369224548,
1.4500001668930054,
0.2690768837928772,
-1.3674529790878296,
-2.152276039123535,
-0.19505541026592255,
-0.8804908394813538,
0.10022804886102676,
-0.5722053647041321,
-0.9647916555404663,
1.617895245552063,
0.31096768379211426,
-1.235807180404663,
-0.209995836019516,
-0.3342445492744446,
-0.592244565486908,
2.808656692504883,
-1.253350019454956,
-0.25484567880630493,
-1.0254311561584473,
-0.7697407603263855,
1.6397929191589355,
-1.2347609996795654,
-0.22755277156829834,
-1.0023261308670044,
-0.5520268678665161,
-1.2228492498397827,
-0.4764740765094757,
-0.019865553826093674,
-0.9603233933448792,
0.7597552537918091,
0.24859000742435455,
-1.3001724481582642,
-0.36744049191474915,
-0.787600040435791,
0.9761558771133423,
-0.1393989622592926,
0.16994404792785645,
1.9649626016616821,
0.2193697988986969,
-0.4263640344142914,
0.8350900411605835,
1.1533597707748413,
0.5917012691497803,
-0.4419701397418976,
0.24447648227214813,
-0.5222108960151672,
0.4330075979232788,
-1.3535637855529785,
0.3028586804866791,
-2.8737668991088867,
0.665982186794281,
-0.04849346727132797,
-0.1391526311635971,
-0.08857597410678864,
-1.3494213819503784,
1.048073172569275,
2.559910774230957,
-1.127012014389038,
0.5449926853179932,
0.3305371403694153,
1.2286218404769897,
-1.702017068862915,
0.2877688407897949,
-0.44930049777030945,
2.173067569732666,
0.29387131333351135,
1.2239347696304321,
-0.46234411001205444,
-2.4619078636169434,
0.5813496708869934,
-1.2552226781845093,
-1.01099693775177,
0.7439553141593933,
-0.8588004112243652,
0.06979108601808548,
-1.41829252243042,
-0.406999796628952,
-0.80462247133255,
-1.1246213912963867,
0.6660374402999878,
0.1569916307926178,
0.4209306240081787,
-0.5857942700386047,
0.3797041177749634,
-2.1521008014678955,
-1.4361320734024048,
-0.18712736666202545,
-0.9279009699821472,
0.4779355823993683,
-0.44289806485176086,
0.6811649203300476,
-0.18957866728305817,
0.008194300346076488,
0.33021292090415955,
1.6039016246795654,
3.3319854736328125,
0.22327978909015656,
0.2795765697956085,
-0.302421510219574,
-0.9358102083206177,
1.4357162714004517,
0.8812463283538818,
-0.16148772835731506,
-0.5909579992294312,
-1.0611666440963745,
1.3052369356155396,
1.9471677541732788,
0.8219244480133057,
-0.03817480430006981,
-0.8318862318992615,
-0.7824894785881042,
-0.08934500068426132,
0.14980396628379822,
0.42350059747695923,
0.8033030033111572,
0.17382490634918213,
0.16380611062049866,
1.383452296257019,
1.141109585762024,
-0.5103540420532227,
0.40968871116638184,
-0.8812676668167114,
-0.5095952153205872,
0.4513814151287079,
0.2426515370607376,
-0.12544389069080353,
0.2497626096010208,
-1.0416131019592285,
-0.15295979380607605,
-0.3748738169670105,
-0.9146203398704529,
-0.779035747051239,
-0.3610181212425232,
-0.30273008346557617,
1.6264044046401978,
0.1889420598745346,
-0.5309093594551086,
-0.048949308693408966,
-0.7461351156234741,
-0.0741412565112114,
-1.107032299041748,
0.23762662708759308,
-0.08185364305973053,
-0.19248929619789124,
-0.1399078220129013,
1.7165696620941162,
-0.8118707537651062,
-2.0061755180358887,
0.2233005315065384,
0.22999855875968933,
-0.24264037609100342,
0.13368943333625793,
1.692855954170227,
0.5033004879951477,
1.4229847192764282,
1.3673996925354004,
0.8674147129058838,
-0.575164794921875,
-1.4379464387893677,
0.7160336375236511,
0.9108533263206482,
-1.3485978841781616,
0.8811051249504089,
-0.033892687410116196,
-0.3988095223903656,
0.576076865196228,
1.3974733352661133,
0.58891761302948,
-2.0385823249816895,
0.8403609395027161,
-1.0245286226272583,
0.8169389367103577,
0.8061166405677795,
0.6809368133544922,
0.25585007667541504,
0.8721328377723694,
-1.1751325130462646,
-1.2119179964065552,
-0.6066612005233765,
-0.8575727939605713,
1.9443583488464355,
-0.35669663548469543,
0.6005248427391052,
-0.08624963462352753,
-1.3924431800842285,
-0.18818403780460358,
0.672185480594635,
0.2914235591888428,
-0.5128558874130249,
0.7391603589057922,
-0.7135871052742004,
-1.0425511598587036,
-1.3197377920150757,
-0.5128735899925232,
-1.1050180196762085,
-1.0247747898101807,
0.9462617635726929,
0.8487652540206909,
0.3486936688423157,
1.8145053386688232,
0.6129515171051025,
0.32310938835144043,
-2.5597870349884033,
0.873224139213562,
0.298965185880661,
-0.04272003099322319,
0.8535427451133728,
0.3982797861099243,
0.9818138480186462,
0.07359729707241058,
0.5375133752822876,
-2.3812479972839355,
2.3533802032470703,
-0.17326755821704865,
0.6617621183395386,
-0.0698808804154396,
-0.11960769444704056,
1.1765787601470947,
0.5517727732658386,
0.4852965772151947,
-1.0154132843017578,
0.7074934840202332,
-0.5864304304122925,
1.2749766111373901,
0.7189462184906006,
-0.7106549739837646,
-0.06203458830714226,
1.3262702226638794,
0.2908051908016205,
-0.7311459183692932,
-0.9420631527900696,
-1.0319818258285522,
0.9748057723045349,
1.6921026706695557,
0.030946362763643265,
-0.032187383621931076,
0.826738178730011,
0.6532778143882751,
-1.167551875114441,
0.12492004036903381,
-0.5817191004753113,
-0.8132523894309998,
1.5511014461517334,
2.1563844680786133,
-0.29124894738197327,
-0.24320824444293976,
-0.6314464807510376,
-1.2464492321014404,
0.6644303202629089,
0.03954590857028961,
0.03430851176381111,
0.5653318762779236,
-0.6109421253204346,
0.9467484354972839,
0.8320165276527405,
0.9370646476745605,
0.20379777252674103,
0.30531004071235657,
0.3412078320980072,
-0.3366928994655609,
-1.2296984195709229,
-0.2107468843460083,
-1.0403519868850708,
-2.586923122406006,
0.39270615577697754,
-0.16743725538253784,
-1.3564317226409912,
0.02508840709924698,
-0.9719966650009155,
0.830581784248352,
-0.6069040894508362,
-1.177301049232483,
-1.4066559076309204,
0.17187277972698212,
-0.03349006548523903,
0.8885069489479065,
-1.6572633981704712,
-0.06570898741483688,
1.1129270792007446,
0.9408416152000427,
-0.729101300239563,
1.0314167737960815,
0.19917425513267517,
1.0450794696807861,
0.8621546626091003,
-0.4078756272792816,
0.5740088820457458,
0.026209641247987747,
-1.3079339265823364,
0.43637749552726746,
1.1644309759140015,
0.11594182252883911,
1.5036221742630005,
-0.5537739396095276,
-0.04416540265083313,
0.43340209126472473,
-0.5573393106460571,
-0.5022484064102173,
-0.493193656206131,
0.6212842464447021,
0.04517499729990959,
-0.8453223705291748,
0.01692681759595871,
0.01983148604631424,
-0.2259196788072586,
0.2631461024284363,
-1.508989691734314,
-0.09245428442955017,
-0.38777586817741394,
-0.6223418116569519,
-1.2651194334030151,
-0.13213121891021729,
1.4808664321899414,
-0.7506508231163025,
-0.3220101594924927,
0.5137845277786255,
0.37866634130477905,
0.46343794465065,
0.6955186724662781,
-0.7190704345703125,
-0.3676428496837616,
-0.13789619505405426,
-0.28104332089424133,
0.40605247020721436,
1.3521803617477417,
-0.06576496362686157,
-0.873042643070221,
0.6756979823112488,
-0.34768086671829224,
0.14020280539989471,
1.8292750120162964,
0.09646977484226227,
-0.8324618339538574,
0.2203134447336197,
-0.7927459478378296,
2.032498836517334,
1.656224250793457,
1.3476231098175049,
-0.16786150634288788,
-1.000821590423584,
0.7048523426055908,
-0.3332459628582001,
-0.4025397300720215,
0.8242422342300415,
0.3011077046394348,
-0.2877929210662842,
-1.3456555604934692,
0.9179257750511169,
1.1609063148498535,
-0.8277788162231445,
-0.951770007610321,
0.1651899367570877,
-0.7957622408866882,
1.1050987243652344,
0.5938549637794495,
0.3303379714488983,
0.2870139181613922,
1.5851069688796997,
0.8445433378219604,
-0.3996357023715973,
0.5144104361534119,
0.4561321437358856,
-0.24923041462898254,
-2.1416990756988525,
-1.186134934425354,
0.2755085527896881,
-0.5690203309059143,
-1.6627973318099976,
1.34561288356781,
-1.093463659286499,
-1.0087199211120605,
0.5680510401725769,
-0.01745171844959259,
1.3865463733673096,
0.33018285036087036,
1.58362877368927,
2.015458822250366,
0.8763585090637207,
0.43494364619255066,
1.2787883281707764,
-0.3163240849971771,
-0.5021787881851196,
1.8064523935317993,
-0.5485610365867615,
0.47141382098197937,
1.081355094909668,
-0.39319100975990295,
-1.1341649293899536,
-0.7987667322158813,
-1.2862359285354614,
-0.8021889328956604,
1.0794858932495117,
0.1741427481174469,
-1.0884419679641724,
0.3052513897418976,
1.554690957069397,
0.06260702013969421,
-0.21412436664104462,
0.6077660918235779,
0.4840409457683563,
-0.7728356719017029,
0.021051689982414246,
-0.8652876615524292,
0.5157599449157715,
-0.24444271624088287,
-0.42353543639183044,
0.37686601281166077,
0.3720282018184662,
1.364410161972046,
-0.06274374574422836,
0.022397462278604507,
1.0035600662231445,
-1.457841396331787,
1.4594594240188599,
-0.6545855402946472,
0.3807184398174286,
-2.332242250442505,
1.3149900436401367,
-0.7538608908653259,
2.0406606197357178,
-2.647270679473877,
0.5291635394096375,
-0.6461689472198486,
-0.5799775719642639,
0.2988643944263458,
-0.31119397282600403,
0.1320510059595108,
-0.059006787836551666,
-1.1383923292160034,
-0.05728985369205475,
-0.6694406867027283,
0.530063807964325,
1.075736403465271,
1.446649193763733,
-1.1810001134872437,
-0.2736981213092804,
-1.7356784343719482,
-0.07132630050182343,
-0.6744586825370789,
0.2324146181344986,
-1.9548535346984863,
-0.15637999773025513,
-1.9837942123413086,
-2.2476930618286133,
-1.1595655679702759,
-0.6590107679367065,
1.061207890510559,
0.17742465436458588,
-0.8097509145736694,
1.2956305742263794,
-0.20984089374542236,
-1.7651976346969604,
1.0459407567977905,
-2.0338926315307617
] |
https://github.com/huggingface/datasets/issues/6011 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index | Ah! Thank you for pointing this out. FYI: the enum indicates it's using the inner product. Using `torch.inner` or `torch.dot` still produces a discrepancy compared to the built-in score. I think this is because of the compression/quantization that occurs with the FAISS index. | ### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1 | 71 | 43 | Documentation: wiki_dpr Dataset has no metric_type for Faiss Index
### Describe the bug
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
### Steps to reproduce the bug
System: Python 3.9.16, Transformers 4.30.2, WSL
After loading `wiki_dpr` using:
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # prints nothing because the value is None
```
the index does not have a defined `metric_type`. This is an issue because I do not know how the `scores` are being computed for `get_nearest_examples()`.
```py
from transformers import DPRQuestionEncoder, DPRContextEncoder, DPRQuestionEncoderTokenizer, DPRContextEncoderTokenizer
tokenizer = DPRQuestionEncoderTokenizer.from_pretrained("facebook/dpr-question_encoder-multiset-base")
encoder = DPRQuestionEncoder.from_pretrained("facebook/dpr-question_encoder-multiset-base")
def encode_question(query, tokenizer=tokenizer, encoder=encoder):
inputs = tokenizer(query, return_tensors='pt')
question_embedding = encoder(**inputs)[0].detach().numpy()
return question_embedding
def get_knn(query, k=5, tokenizer=tokenizer, encoder=encoder, verbose=False):
enc_question = encode_question(query, tokenizer, encoder)
topk_results = ds.get_nearest_examples(index_name='embeddings',
query=enc_question,
k=k)
a = torch.tensor(enc_question[0]).reshape(768)
b = torch.tensor(topk_results.examples['embeddings'][0])
print(a.shape, b.shape)
print(torch.dot(a, b))
print((a-b).pow(2).sum())
return topk_results
```
The [FAISS documentation](https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) suggests the metric is usually L2 distance (without the square root) or the inner product. I compute both for the sample query:
```py
query = """ it catapulted into popular culture along with a line of action figures and other toys by Bandai.[2] By 2001, the media franchise had generated over $6 billion in toy sales.
Despite initial criticism that its action violence targeted child audiences, the franchise has been commercially successful."""
get_knn(query,k=5)
```
Here, I get dot product of 80.6020 and L2 distance of 77.6616 and
```py
NearestExamplesResults(scores=array([76.20431 , 75.312416, 74.945404, 74.866394, 74.68506 ],
dtype=float32), examples={'id': ['3081096', '2004811', '8908258', '9594124', '286575'], 'text': ['actors, resulting in the "Power Rangers" franchise which has continued since then into sequel TV series (with "Power Rangers Beast Morphers" set to premiere in 2019), comic books, video games, and three feature films, with a further cinematic universe planned. Following from the success of "Power Rangers", Saban acquired the rights to more of Toei\'s library, creating "VR Troopers" and "Big Bad Beetleborgs" from several Metal Hero Series shows and "Masked Rider" from Kamen Rider Series footage. DIC Entertainment joined this boom by acquiring the rights to "Gridman the Hyper Agent" and turning it into "Superhuman Samurai Syber-Squad". In 2002,',
```
Doing `k=1` indicates the higher the outputted number, the better the match, so the metric should not be L2 distance. However, my manually computed inner product (80.6) has a discrepancy with the reported (76.2). Perhaps, this has to do with me using the `compressed` embeddings?
### Expected behavior
```py
ds = load_dataset(path='wiki_dpr', name='psgs_w100.multiset.compressed', split='train')
print(ds.get_index("embeddings").metric_type) # METRIC_INNER_PRODUCT
```
### Environment info
- `datasets` version: 2.12.0
- Platform: Linux-4.18.0-477.13.1.el8_8.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.16
- Huggingface_hub version: 0.14.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.1
Ah! Thank you for pointing this out. FYI: the enum indicates it's using the inner product. Using `torch.inner` or `torch.dot` still produces a discrepancy compared to the built-in score. I think this is because of the compression/quantization that occurs with the FAISS index. | [
-1.2446866035461426,
-0.98016756772995,
-0.6705538630485535,
1.5742006301879883,
-0.22045759856700897,
-1.1787488460540771,
0.13914144039154053,
-1.0054317712783813,
1.738943099975586,
-0.8767253756523132,
0.3254598081111908,
-1.6246047019958496,
0.0812084898352623,
-0.5420742034912109,
-0.8202046751976013,
-0.8559951186180115,
-0.3244331181049347,
-0.8811795711517334,
1.1890043020248413,
2.4745335578918457,
1.193381667137146,
-1.343591332435608,
2.7416136264801025,
0.6190023422241211,
-0.203236386179924,
-1.1043130159378052,
0.4922775328159332,
-0.15563467144966125,
-1.3663074970245361,
-0.5165343880653381,
-1.018614411354065,
-0.15839451551437378,
-0.6321862936019897,
-0.5615891814231873,
0.04785346984863281,
0.5101169347763062,
-0.31871363520622253,
-0.5493846535682678,
-0.5102746486663818,
-0.8822465538978577,
0.5066697001457214,
-0.3234190046787262,
0.8914341926574707,
-0.2619175314903259,
1.8430672883987427,
-0.5731731653213501,
0.47889721393585205,
0.688910722732544,
1.3585702180862427,
0.27030688524246216,
-0.0693487748503685,
0.35924291610717773,
0.34813499450683594,
-0.034425683319568634,
0.5936669111251831,
1.1847678422927856,
0.6403136849403381,
0.5137963891029358,
0.7103938460350037,
-2.2869255542755127,
1.4221371412277222,
-1.1518853902816772,
0.3169757127761841,
1.2846564054489136,
-0.9039952158927917,
0.28446823358535767,
-1.7901408672332764,
0.04997176304459572,
0.6351884007453918,
-2.144186019897461,
0.4276263415813446,
-1.3265353441238403,
-0.5060442090034485,
1.1255466938018799,
0.47840631008148193,
-1.2267241477966309,
0.01052733976393938,
-0.42676055431365967,
1.1080397367477417,
0.4414558708667755,
0.9530224800109863,
-1.6671682596206665,
-0.14635752141475677,
-0.3122510612010956,
0.1805945187807083,
-1.2617448568344116,
-1.5482194423675537,
0.6642901301383972,
0.5918089151382446,
0.6015364527702332,
-0.09602417051792145,
1.1553852558135986,
-1.0206602811813354,
0.7457916736602783,
-1.0714980363845825,
-1.7711834907531738,
-1.4693620204925537,
-2.3178231716156006,
-2.303910255432129,
0.6572233438491821,
-0.4254781901836395,
-0.5557504296302795,
2.131336212158203,
-0.945064127445221,
-1.7757914066314697,
1.203609824180603,
0.22659888863563538,
0.03201436623930931,
2.346583843231201,
0.1938960999250412,
-0.7177011370658875,
0.4938490688800812,
-0.8216152191162109,
0.8291798830032349,
-0.34548482298851013,
1.3281512260437012,
0.3654481768608093,
-1.1611394882202148,
1.586482286453247,
-0.2562587261199951,
0.5599040985107422,
-0.6544713377952576,
-0.5380995869636536,
-0.6474905014038086,
0.2592879831790924,
1.9246292114257812,
-0.2763505280017853,
1.5087885856628418,
-0.49056586623191833,
-1.4995511770248413,
-1.5800074338912964,
0.9657860994338989,
0.4335361123085022,
-0.7974583506584167,
0.21124957501888275,
-0.40596693754196167,
0.2236635684967041,
-0.03492027893662453,
1.2089120149612427,
1.3700464963912964,
0.7219740152359009,
-0.3505893349647522,
-0.8025187253952026,
0.08976642042398453,
-0.04277992993593216,
-0.7392174601554871,
-1.7765082120895386,
-0.43012282252311707,
0.04898185282945633,
0.6990894079208374,
-1.155916690826416,
1.755022644996643,
0.8541514277458191,
2.0182065963745117,
1.061972737312317,
-0.3439454436302185,
1.4759514331817627,
0.11177796870470047,
1.7863949537277222,
-0.5265685319900513,
0.6270904541015625,
-0.4476238787174225,
-1.124179482460022,
0.8660736680030823,
-0.2950439453125,
-2.0145177841186523,
-0.7853758335113525,
-0.7483530044555664,
-0.24605894088745117,
-0.8177260160446167,
0.9160526990890503,
-0.3160976767539978,
-1.563378095626831,
0.28666865825653076,
-0.81817626953125,
0.28642022609710693,
-1.1437923908233643,
0.2938714027404785,
0.6996365785598755,
-0.5686668753623962,
0.2029857039451599,
-0.24666321277618408,
-1.2118486166000366,
-0.5154703855514526,
0.352131724357605,
1.7842227220535278,
-0.6987946033477783,
0.8832847476005554,
1.059234619140625,
-0.6918977499008179,
-0.13047485053539276,
0.2832256555557251,
-0.2194374054670334,
0.8339398503303528,
-1.0435137748718262,
-0.4829423427581787,
1.2512701749801636,
-0.3241288661956787,
-0.5474799871444702,
1.426631212234497,
0.6399798393249512,
-1.0238707065582275,
-0.1684638261795044,
-0.1747099906206131,
-0.830334484577179,
0.03928675502538681,
-1.5570939779281616,
-0.16432975232601166,
0.578120231628418,
-1.6540544033050537,
-0.43053993582725525,
-0.04745753854513168,
1.3613725900650024,
-0.17030282318592072,
1.4023035764694214,
-0.4005362093448639,
-0.08699002861976624,
-0.24666719138622284,
-0.3407655358314514,
0.15622414648532867,
-0.23702116310596466,
-0.6003347039222717,
0.09976863116025925,
-0.6901686787605286,
0.2996678054332733,
1.5306236743927002,
0.37403568625450134,
0.016624249517917633,
0.38257238268852234,
1.224310278892517,
0.402095228433609,
0.020937591791152954,
-0.8117591142654419,
-1.506283164024353,
1.928544521331787,
-1.4756308794021606,
2.063401222229004,
0.717438817024231,
0.0010674353688955307,
-1.7269182205200195,
-1.8507683277130127,
1.277696967124939,
1.0743763446807861,
2.319436550140381,
0.552034854888916,
0.4458426833152771,
-0.8630408048629761,
-0.6760455965995789,
0.33831581473350525,
-1.0151281356811523,
-0.7943917512893677,
0.10433567315340042,
2.434709310531616,
1.7692586183547974,
-0.3226059675216675,
-0.19920741021633148,
-0.957844614982605,
1.5050486326217651,
-0.24205516278743744,
0.21790947020053864,
1.906430721282959,
-0.17678652703762054,
-1.0520161390304565,
1.2285956144332886,
-2.299382448196411,
0.2461477667093277,
2.1126797199249268,
0.21370260417461395,
0.13518650829792023,
-1.4816216230392456,
-0.5468378067016602,
-0.22069589793682098,
-0.3578007221221924,
-1.2519077062606812,
0.5010496973991394,
-0.24526457488536835,
-0.6904556155204773,
-1.4413154125213623,
0.1509554535150528,
-1.0731213092803955,
-1.5792360305786133,
0.12671029567718506,
1.9960145950317383,
2.1138556003570557,
-0.7555328011512756,
1.5784595012664795,
-0.32259809970855713,
0.15985055267810822,
1.3121538162231445,
1.2453261613845825,
2.9934375286102295,
1.8922384977340698,
-1.262915849685669,
0.6653768420219421,
-0.20820294320583344,
-0.49441275000572205,
1.115754246711731,
-1.2509132623672485,
1.3394256830215454,
-0.04404422268271446,
-1.1062302589416504,
-1.2918678522109985,
0.9730772376060486,
0.5466320514678955,
-0.0523948073387146,
-0.42592763900756836,
1.1980515718460083,
0.07098148763179779,
1.2731024026870728,
0.5675508379936218,
-0.34421610832214355,
0.6435050964355469,
-0.38034576177597046,
-0.5697340369224548,
1.4500001668930054,
0.2690768837928772,
-1.3674529790878296,
-2.152276039123535,
-0.19505541026592255,
-0.8804908394813538,
0.10022804886102676,
-0.5722053647041321,
-0.9647916555404663,
1.617895245552063,
0.31096768379211426,
-1.235807180404663,
-0.209995836019516,
-0.3342445492744446,
-0.592244565486908,
2.808656692504883,
-1.253350019454956,
-0.25484567880630493,
-1.0254311561584473,
-0.7697407603263855,
1.6397929191589355,
-1.2347609996795654,
-0.22755277156829834,
-1.0023261308670044,
-0.5520268678665161,
-1.2228492498397827,
-0.4764740765094757,
-0.019865553826093674,
-0.9603233933448792,
0.7597552537918091,
0.24859000742435455,
-1.3001724481582642,
-0.36744049191474915,
-0.787600040435791,
0.9761558771133423,
-0.1393989622592926,
0.16994404792785645,
1.9649626016616821,
0.2193697988986969,
-0.4263640344142914,
0.8350900411605835,
1.1533597707748413,
0.5917012691497803,
-0.4419701397418976,
0.24447648227214813,
-0.5222108960151672,
0.4330075979232788,
-1.3535637855529785,
0.3028586804866791,
-2.8737668991088867,
0.665982186794281,
-0.04849346727132797,
-0.1391526311635971,
-0.08857597410678864,
-1.3494213819503784,
1.048073172569275,
2.559910774230957,
-1.127012014389038,
0.5449926853179932,
0.3305371403694153,
1.2286218404769897,
-1.702017068862915,
0.2877688407897949,
-0.44930049777030945,
2.173067569732666,
0.29387131333351135,
1.2239347696304321,
-0.46234411001205444,
-2.4619078636169434,
0.5813496708869934,
-1.2552226781845093,
-1.01099693775177,
0.7439553141593933,
-0.8588004112243652,
0.06979108601808548,
-1.41829252243042,
-0.406999796628952,
-0.80462247133255,
-1.1246213912963867,
0.6660374402999878,
0.1569916307926178,
0.4209306240081787,
-0.5857942700386047,
0.3797041177749634,
-2.1521008014678955,
-1.4361320734024048,
-0.18712736666202545,
-0.9279009699821472,
0.4779355823993683,
-0.44289806485176086,
0.6811649203300476,
-0.18957866728305817,
0.008194300346076488,
0.33021292090415955,
1.6039016246795654,
3.3319854736328125,
0.22327978909015656,
0.2795765697956085,
-0.302421510219574,
-0.9358102083206177,
1.4357162714004517,
0.8812463283538818,
-0.16148772835731506,
-0.5909579992294312,
-1.0611666440963745,
1.3052369356155396,
1.9471677541732788,
0.8219244480133057,
-0.03817480430006981,
-0.8318862318992615,
-0.7824894785881042,
-0.08934500068426132,
0.14980396628379822,
0.42350059747695923,
0.8033030033111572,
0.17382490634918213,
0.16380611062049866,
1.383452296257019,
1.141109585762024,
-0.5103540420532227,
0.40968871116638184,
-0.8812676668167114,
-0.5095952153205872,
0.4513814151287079,
0.2426515370607376,
-0.12544389069080353,
0.2497626096010208,
-1.0416131019592285,
-0.15295979380607605,
-0.3748738169670105,
-0.9146203398704529,
-0.779035747051239,
-0.3610181212425232,
-0.30273008346557617,
1.6264044046401978,
0.1889420598745346,
-0.5309093594551086,
-0.048949308693408966,
-0.7461351156234741,
-0.0741412565112114,
-1.107032299041748,
0.23762662708759308,
-0.08185364305973053,
-0.19248929619789124,
-0.1399078220129013,
1.7165696620941162,
-0.8118707537651062,
-2.0061755180358887,
0.2233005315065384,
0.22999855875968933,
-0.24264037609100342,
0.13368943333625793,
1.692855954170227,
0.5033004879951477,
1.4229847192764282,
1.3673996925354004,
0.8674147129058838,
-0.575164794921875,
-1.4379464387893677,
0.7160336375236511,
0.9108533263206482,
-1.3485978841781616,
0.8811051249504089,
-0.033892687410116196,
-0.3988095223903656,
0.576076865196228,
1.3974733352661133,
0.58891761302948,
-2.0385823249816895,
0.8403609395027161,
-1.0245286226272583,
0.8169389367103577,
0.8061166405677795,
0.6809368133544922,
0.25585007667541504,
0.8721328377723694,
-1.1751325130462646,
-1.2119179964065552,
-0.6066612005233765,
-0.8575727939605713,
1.9443583488464355,
-0.35669663548469543,
0.6005248427391052,
-0.08624963462352753,
-1.3924431800842285,
-0.18818403780460358,
0.672185480594635,
0.2914235591888428,
-0.5128558874130249,
0.7391603589057922,
-0.7135871052742004,
-1.0425511598587036,
-1.3197377920150757,
-0.5128735899925232,
-1.1050180196762085,
-1.0247747898101807,
0.9462617635726929,
0.8487652540206909,
0.3486936688423157,
1.8145053386688232,
0.6129515171051025,
0.32310938835144043,
-2.5597870349884033,
0.873224139213562,
0.298965185880661,
-0.04272003099322319,
0.8535427451133728,
0.3982797861099243,
0.9818138480186462,
0.07359729707241058,
0.5375133752822876,
-2.3812479972839355,
2.3533802032470703,
-0.17326755821704865,
0.6617621183395386,
-0.0698808804154396,
-0.11960769444704056,
1.1765787601470947,
0.5517727732658386,
0.4852965772151947,
-1.0154132843017578,
0.7074934840202332,
-0.5864304304122925,
1.2749766111373901,
0.7189462184906006,
-0.7106549739837646,
-0.06203458830714226,
1.3262702226638794,
0.2908051908016205,
-0.7311459183692932,
-0.9420631527900696,
-1.0319818258285522,
0.9748057723045349,
1.6921026706695557,
0.030946362763643265,
-0.032187383621931076,
0.826738178730011,
0.6532778143882751,
-1.167551875114441,
0.12492004036903381,
-0.5817191004753113,
-0.8132523894309998,
1.5511014461517334,
2.1563844680786133,
-0.29124894738197327,
-0.24320824444293976,
-0.6314464807510376,
-1.2464492321014404,
0.6644303202629089,
0.03954590857028961,
0.03430851176381111,
0.5653318762779236,
-0.6109421253204346,
0.9467484354972839,
0.8320165276527405,
0.9370646476745605,
0.20379777252674103,
0.30531004071235657,
0.3412078320980072,
-0.3366928994655609,
-1.2296984195709229,
-0.2107468843460083,
-1.0403519868850708,
-2.586923122406006,
0.39270615577697754,
-0.16743725538253784,
-1.3564317226409912,
0.02508840709924698,
-0.9719966650009155,
0.830581784248352,
-0.6069040894508362,
-1.177301049232483,
-1.4066559076309204,
0.17187277972698212,
-0.03349006548523903,
0.8885069489479065,
-1.6572633981704712,
-0.06570898741483688,
1.1129270792007446,
0.9408416152000427,
-0.729101300239563,
1.0314167737960815,
0.19917425513267517,
1.0450794696807861,
0.8621546626091003,
-0.4078756272792816,
0.5740088820457458,
0.026209641247987747,
-1.3079339265823364,
0.43637749552726746,
1.1644309759140015,
0.11594182252883911,
1.5036221742630005,
-0.5537739396095276,
-0.04416540265083313,
0.43340209126472473,
-0.5573393106460571,
-0.5022484064102173,
-0.493193656206131,
0.6212842464447021,
0.04517499729990959,
-0.8453223705291748,
0.01692681759595871,
0.01983148604631424,
-0.2259196788072586,
0.2631461024284363,
-1.508989691734314,
-0.09245428442955017,
-0.38777586817741394,
-0.6223418116569519,
-1.2651194334030151,
-0.13213121891021729,
1.4808664321899414,
-0.7506508231163025,
-0.3220101594924927,
0.5137845277786255,
0.37866634130477905,
0.46343794465065,
0.6955186724662781,
-0.7190704345703125,
-0.3676428496837616,
-0.13789619505405426,
-0.28104332089424133,
0.40605247020721436,
1.3521803617477417,
-0.06576496362686157,
-0.873042643070221,
0.6756979823112488,
-0.34768086671829224,
0.14020280539989471,
1.8292750120162964,
0.09646977484226227,
-0.8324618339538574,
0.2203134447336197,
-0.7927459478378296,
2.032498836517334,
1.656224250793457,
1.3476231098175049,
-0.16786150634288788,
-1.000821590423584,
0.7048523426055908,
-0.3332459628582001,
-0.4025397300720215,
0.8242422342300415,
0.3011077046394348,
-0.2877929210662842,
-1.3456555604934692,
0.9179257750511169,
1.1609063148498535,
-0.8277788162231445,
-0.951770007610321,
0.1651899367570877,
-0.7957622408866882,
1.1050987243652344,
0.5938549637794495,
0.3303379714488983,
0.2870139181613922,
1.5851069688796997,
0.8445433378219604,
-0.3996357023715973,
0.5144104361534119,
0.4561321437358856,
-0.24923041462898254,
-2.1416990756988525,
-1.186134934425354,
0.2755085527896881,
-0.5690203309059143,
-1.6627973318099976,
1.34561288356781,
-1.093463659286499,
-1.0087199211120605,
0.5680510401725769,
-0.01745171844959259,
1.3865463733673096,
0.33018285036087036,
1.58362877368927,
2.015458822250366,
0.8763585090637207,
0.43494364619255066,
1.2787883281707764,
-0.3163240849971771,
-0.5021787881851196,
1.8064523935317993,
-0.5485610365867615,
0.47141382098197937,
1.081355094909668,
-0.39319100975990295,
-1.1341649293899536,
-0.7987667322158813,
-1.2862359285354614,
-0.8021889328956604,
1.0794858932495117,
0.1741427481174469,
-1.0884419679641724,
0.3052513897418976,
1.554690957069397,
0.06260702013969421,
-0.21412436664104462,
0.6077660918235779,
0.4840409457683563,
-0.7728356719017029,
0.021051689982414246,
-0.8652876615524292,
0.5157599449157715,
-0.24444271624088287,
-0.42353543639183044,
0.37686601281166077,
0.3720282018184662,
1.364410161972046,
-0.06274374574422836,
0.022397462278604507,
1.0035600662231445,
-1.457841396331787,
1.4594594240188599,
-0.6545855402946472,
0.3807184398174286,
-2.332242250442505,
1.3149900436401367,
-0.7538608908653259,
2.0406606197357178,
-2.647270679473877,
0.5291635394096375,
-0.6461689472198486,
-0.5799775719642639,
0.2988643944263458,
-0.31119397282600403,
0.1320510059595108,
-0.059006787836551666,
-1.1383923292160034,
-0.05728985369205475,
-0.6694406867027283,
0.530063807964325,
1.075736403465271,
1.446649193763733,
-1.1810001134872437,
-0.2736981213092804,
-1.7356784343719482,
-0.07132630050182343,
-0.6744586825370789,
0.2324146181344986,
-1.9548535346984863,
-0.15637999773025513,
-1.9837942123413086,
-2.2476930618286133,
-1.1595655679702759,
-0.6590107679367065,
1.061207890510559,
0.17742465436458588,
-0.8097509145736694,
1.2956305742263794,
-0.20984089374542236,
-1.7651976346969604,
1.0459407567977905,
-2.0338926315307617
] |
https://github.com/huggingface/datasets/issues/6010 | Improve `Dataset`'s string representation | Yes, feel free to work on this.
You can check the PyArrow Table `__repr__` and Polars DataFrame `__repr__`/`_repr_html_` implementations for some pointers/ideas. | Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows.
We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit. | 72 | 22 | Improve `Dataset`'s string representation
Currently, `Dataset.__repr__` outputs a dataset's column names and the number of rows. We could improve it by printing its features and the first few rows.
We should also implement `_repr_html_` to have a rich HTML representation in notebooks/Streamlit.
Yes, feel free to work on this.
You can check the PyArrow Table `__repr__` and Polars DataFrame `__repr__`/`_repr_html_` implementations for some pointers/ideas. | [
-1.2331368923187256,
-0.9081248641014099,
-0.7274177670478821,
1.6173560619354248,
-0.03533030301332474,
-1.423690676689148,
0.2735294699668884,
-1.1049844026565552,
1.79997980594635,
-0.8763689994812012,
0.3301575183868408,
-1.5405014753341675,
-0.10646504163742065,
-0.6693754196166992,
-0.8199439644813538,
-0.8683509826660156,
-0.3973592519760132,
-0.749863862991333,
1.0543169975280762,
2.326612949371338,
1.3000216484069824,
-1.3239734172821045,
2.617218255996704,
0.6748133897781372,
-0.2693953216075897,
-0.9761692881584167,
0.3843580484390259,
-0.13626611232757568,
-1.0699682235717773,
-0.5036640763282776,
-0.8059976100921631,
-0.04120374470949173,
-0.5696459412574768,
-0.39217492938041687,
-0.10338836908340454,
0.5507873296737671,
-0.3345613479614258,
-0.3448781967163086,
-0.5004321336746216,
-0.890937328338623,
0.32708102464675903,
-0.2838398814201355,
0.8632057905197144,
-0.4261881709098816,
1.8569567203521729,
-0.5156512260437012,
0.5987947583198547,
0.7480364441871643,
1.4380695819854736,
0.033114366233348846,
-0.06438988447189331,
0.19151635468006134,
0.4365975260734558,
-0.06314525008201599,
0.6142359972000122,
1.1486105918884277,
0.4936339557170868,
0.7475250363349915,
0.7036955952644348,
-2.3781533241271973,
1.4026341438293457,
-0.9726943373680115,
0.2408170998096466,
1.2996736764907837,
-0.9204508662223816,
0.07761192321777344,
-1.6398906707763672,
-0.02041037008166313,
0.620273768901825,
-2.234457015991211,
0.4356725215911865,
-1.3466405868530273,
-0.4218226671218872,
0.8905535340309143,
0.4517218768596649,
-1.2401715517044067,
0.06630405783653259,
-0.25162288546562195,
1.1286733150482178,
0.5425943732261658,
0.8539022207260132,
-1.7183648347854614,
0.060618165880441666,
-0.22138336300849915,
0.0635039210319519,
-1.346461296081543,
-1.5554208755493164,
0.5440778136253357,
0.512485146522522,
0.7404158711433411,
-0.04386496916413307,
1.052524209022522,
-1.0669834613800049,
0.7668341994285583,
-1.1067887544631958,
-1.4689799547195435,
-1.298598051071167,
-2.418830394744873,
-2.237863063812256,
0.7610378861427307,
-0.44761818647384644,
-0.5714594721794128,
2.168210506439209,
-0.8918843865394592,
-1.7267324924468994,
1.2116782665252686,
0.26129016280174255,
0.14628131687641144,
2.3494465351104736,
0.20798376202583313,
-0.711224377155304,
0.4695296883583069,
-0.7622001767158508,
0.830529510974884,
-0.37674573063850403,
1.3851553201675415,
0.5441029667854309,
-1.1357688903808594,
1.4792418479919434,
-0.29288890957832336,
0.7416462302207947,
-0.6219866275787354,
-0.6479233503341675,
-0.8180140852928162,
0.2848578095436096,
1.7150214910507202,
-0.11799827218055725,
1.4268790483474731,
-0.3430345058441162,
-1.3684108257293701,
-1.766099214553833,
1.0405157804489136,
0.4049907922744751,
-0.7227911949157715,
-0.0015685120597481728,
-0.389534056186676,
0.22052641212940216,
-0.14735238254070282,
1.2989051342010498,
1.387059211730957,
0.7235049605369568,
-0.5010368824005127,
-0.7536577582359314,
0.016007840633392334,
-0.0578283928334713,
-0.775924026966095,
-1.7102173566818237,
-0.2078864872455597,
0.16515928506851196,
0.4472845494747162,
-0.9984018206596375,
1.8030933141708374,
0.964368999004364,
2.0973093509674072,
0.86782306432724,
-0.19704174995422363,
1.4031732082366943,
-0.08514049649238586,
1.8280220031738281,
-0.429047554731369,
0.44741255044937134,
-0.2707875072956085,
-1.0258793830871582,
0.9177685379981995,
-0.29233038425445557,
-1.9878002405166626,
-0.9034202098846436,
-0.7812687754631042,
-0.2480819672346115,
-0.663462221622467,
0.8680487871170044,
-0.28900787234306335,
-1.3833177089691162,
0.03670196607708931,
-0.713450014591217,
0.23608821630477905,
-1.0716291666030884,
0.2752304673194885,
0.6418219804763794,
-0.6932731866836548,
-0.05234798789024353,
-0.27946820855140686,
-1.2800718545913696,
-0.5828937292098999,
0.5349389910697937,
1.7667148113250732,
-0.6276326775550842,
0.8018532395362854,
1.0836081504821777,
-0.7337323427200317,
-0.03618251532316208,
0.07472573220729828,
-0.18248626589775085,
0.6866595149040222,
-1.0710713863372803,
-0.3662862181663513,
1.2762506008148193,
-0.24391056597232819,
-0.9153516888618469,
1.615830659866333,
0.6740841865539551,
-0.9155534505844116,
-0.04745055362582207,
-0.2896561324596405,
-0.8504236936569214,
0.03215043246746063,
-1.5860437154769897,
-0.11103849112987518,
0.421954870223999,
-1.4948712587356567,
-0.38729581236839294,
-0.12384353578090668,
1.516433835029602,
-0.26851388812065125,
1.283121109008789,
-0.18892477452754974,
-0.19153814017772675,
-0.2359083741903305,
-0.4924514591693878,
0.07971413433551788,
-0.15837128460407257,
-0.44366809725761414,
0.05644400790333748,
-0.7549288868904114,
0.3824133276939392,
1.5012521743774414,
0.23817168176174164,
0.10726600885391235,
0.4061569571495056,
1.2017971277236938,
0.3254515826702118,
0.020246876403689384,
-0.79571533203125,
-1.5018967390060425,
1.9387959241867065,
-1.4137012958526611,
2.0064024925231934,
0.6488245725631714,
-0.10616819560527802,
-1.6607396602630615,
-1.9309805631637573,
1.2371021509170532,
1.0905349254608154,
2.119208335876465,
0.429207444190979,
0.2994062602519989,
-0.8258973956108093,
-0.7088654041290283,
0.3549470901489258,
-1.0522792339324951,
-0.5670886039733887,
0.12384147942066193,
2.192096710205078,
1.8056732416152954,
-0.37962597608566284,
-0.20754481852054596,
-0.9836248755455017,
1.4935652017593384,
-0.2661736309528351,
0.3417873680591583,
2.003483533859253,
-0.192900151014328,
-1.057253360748291,
1.3540297746658325,
-2.3636248111724854,
0.2813165783882141,
2.171560525894165,
0.272553950548172,
0.08685487508773804,
-1.3792990446090698,
-0.6201679706573486,
-0.18457701802253723,
-0.43367332220077515,
-1.289486050605774,
0.5654956102371216,
-0.36360180377960205,
-0.7340089082717896,
-1.2078911066055298,
0.3389263153076172,
-1.0207841396331787,
-1.7100818157196045,
0.28661006689071655,
2.1722214221954346,
2.024129867553711,
-0.5870504975318909,
1.5032809972763062,
-0.1908406764268875,
0.028401698917150497,
1.3148289918899536,
1.2911264896392822,
2.9444520473480225,
1.8937368392944336,
-1.20746648311615,
0.6036312580108643,
-0.12127113342285156,
-0.6465209126472473,
1.150356650352478,
-1.2459481954574585,
1.2493287324905396,
-0.0801091194152832,
-1.036613941192627,
-1.3913308382034302,
0.881120502948761,
0.572644829750061,
0.15398240089416504,
-0.5706894993782043,
1.2326080799102783,
0.006476668640971184,
1.2237610816955566,
0.5512811541557312,
-0.45164060592651367,
0.5976278185844421,
-0.35559162497520447,
-0.708229124546051,
1.6375658512115479,
0.35691356658935547,
-1.3657768964767456,
-2.349048614501953,
-0.17262326180934906,
-0.8740984201431274,
-0.08440415561199188,
-0.558296799659729,
-1.026972770690918,
1.685779333114624,
0.4381963014602661,
-1.282111644744873,
-0.1925508826971054,
-0.1646275520324707,
-0.5499332547187805,
2.911909341812134,
-1.0574322938919067,
-0.10984638333320618,
-1.0246944427490234,
-0.5180240869522095,
1.7391471862792969,
-1.317365050315857,
-0.32063284516334534,
-1.0795198678970337,
-0.5299824476242065,
-1.1523182392120361,
-0.4428296983242035,
0.02615029364824295,
-0.9482470154762268,
0.9235484600067139,
0.15060196816921234,
-1.3696664571762085,
-0.37600088119506836,
-0.8043060898780823,
1.0529671907424927,
-0.1990695595741272,
0.13094359636306763,
1.8026155233383179,
0.22156547009944916,
-0.44159603118896484,
0.7729869484901428,
1.142335057258606,
0.6234447360038757,
-0.5072128176689148,
0.22759105265140533,
-0.5902411937713623,
0.41826242208480835,
-1.2485055923461914,
0.3848625719547272,
-3.0052812099456787,
0.5685290098190308,
-0.14283104240894318,
-0.22585898637771606,
-0.229288250207901,
-1.533801555633545,
1.0281611680984497,
2.6387979984283447,
-1.2555503845214844,
0.5558794140815735,
0.32540515065193176,
1.1824090480804443,
-1.5680348873138428,
0.2903502583503723,
-0.4967523515224457,
2.0925896167755127,
0.07826012372970581,
1.1864712238311768,
-0.49570363759994507,
-2.300245523452759,
0.6535815000534058,
-1.2144055366516113,
-1.2567415237426758,
0.8741770386695862,
-1.065895676612854,
0.23421064019203186,
-1.3372753858566284,
-0.27245306968688965,
-0.9187332987785339,
-1.2199188470840454,
0.7586551308631897,
0.34278395771980286,
0.3740587532520294,
-0.6454721689224243,
0.314456045627594,
-2.162526845932007,
-1.3966741561889648,
-0.20950183272361755,
-0.925909698009491,
0.6563311219215393,
-0.44385671615600586,
0.4942139685153961,
-0.16835232079029083,
0.04772506281733513,
0.2852366864681244,
1.7523424625396729,
3.347252368927002,
0.11218206584453583,
0.25881481170654297,
-0.20856745541095734,
-0.8462061882019043,
1.4175026416778564,
0.920457124710083,
0.0030130380764603615,
-0.5955727696418762,
-1.0506922006607056,
1.2058359384536743,
2.115135431289673,
0.8825283646583557,
-0.06675057858228683,
-0.899246096611023,
-0.6079971194267273,
-0.1807849258184433,
0.10368798673152924,
0.575671374797821,
0.8802698850631714,
0.2164127677679062,
-0.059105440974235535,
1.185408115386963,
1.0760778188705444,
-0.3718745708465576,
0.4341283440589905,
-0.8924610614776611,
-0.42858073115348816,
0.2945031225681305,
0.260404497385025,
-0.13049165904521942,
0.380947083234787,
-0.7855294942855835,
-0.21799775958061218,
-0.3016471564769745,
-0.7820510864257812,
-0.7579540014266968,
-0.4813325107097626,
-0.6139857769012451,
1.6735146045684814,
0.10731112957000732,
-0.6223876476287842,
0.12184523046016693,
-0.6389467716217041,
-0.17550045251846313,
-1.0536154508590698,
0.23119185864925385,
-0.1576685905456543,
-0.11260336637496948,
-0.1017802357673645,
1.5257021188735962,
-0.9745891094207764,
-2.1169726848602295,
0.16007864475250244,
0.3197775185108185,
-0.3296208083629608,
0.2470717430114746,
1.7253614664077759,
0.43275871872901917,
1.511539340019226,
1.2545499801635742,
1.0105340480804443,
-0.7778052687644958,
-1.379236102104187,
0.7819138765335083,
0.8692806959152222,
-1.478061556816101,
0.8329728245735168,
0.0463777557015419,
-0.49032798409461975,
0.754455029964447,
1.1373302936553955,
0.45004889369010925,
-2.136732578277588,
0.8560612797737122,
-1.0906553268432617,
0.9985594153404236,
0.8184830546379089,
0.6239987015724182,
0.3969178795814514,
0.9385654330253601,
-0.9481256604194641,
-1.234001874923706,
-0.6816346645355225,
-0.9898961186408997,
1.9481815099716187,
-0.49576351046562195,
0.8027011156082153,
-0.031306907534599304,
-1.2717938423156738,
-0.1783108115196228,
0.8335545063018799,
0.4891507029533386,
-0.42661112546920776,
0.7687106728553772,
-0.7936456203460693,
-0.8736814856529236,
-1.3445320129394531,
-0.5159361958503723,
-1.1970669031143188,
-0.9781596064567566,
0.9603812098503113,
0.7798755168914795,
0.30513811111450195,
1.8854058980941772,
0.5764216780662537,
0.5167892575263977,
-2.4531397819519043,
0.841383695602417,
0.48702213168144226,
-0.08095405995845795,
0.5920559167861938,
0.46624213457107544,
1.0494104623794556,
-0.04643062502145767,
0.6307485699653625,
-2.4053449630737305,
2.364165782928467,
-0.31205031275749207,
0.45338162779808044,
-0.016253173351287842,
-0.30495017766952515,
1.1544082164764404,
0.4240262508392334,
0.6174092292785645,
-1.142194390296936,
0.7886651754379272,
-0.5308422446250916,
1.1993718147277832,
0.8580553531646729,
-0.7536241412162781,
-0.03465535491704941,
1.514436960220337,
0.39673474431037903,
-0.5997612476348877,
-0.9389119148254395,
-1.036978006362915,
0.8097317218780518,
1.5156242847442627,
-0.09661845862865448,
-0.05041195824742317,
0.8480212092399597,
0.6095481514930725,
-1.2150202989578247,
0.07568483054637909,
-0.6385686993598938,
-0.871756911277771,
1.5718854665756226,
2.0648226737976074,
-0.257369726896286,
-0.06617653369903564,
-0.8219590783119202,
-1.116446852684021,
0.6611382961273193,
-0.10369016230106354,
-0.2013160139322281,
0.3980822265148163,
-0.5097339749336243,
0.9841314554214478,
0.8156741857528687,
0.8690003752708435,
0.055521246045827866,
0.3810911774635315,
0.47779953479766846,
-0.35290196537971497,
-1.235977053642273,
-0.38003775477409363,
-1.1278449296951294,
-2.6598751544952393,
0.3710781931877136,
-0.36018210649490356,
-1.374834656715393,
-0.03233037143945694,
-1.0420541763305664,
0.8864753842353821,
-0.6034343838691711,
-1.15440833568573,
-1.493647575378418,
0.19001325964927673,
-0.05963984876871109,
0.8195111155509949,
-1.596946120262146,
-0.1814417988061905,
1.1966702938079834,
0.7421888709068298,
-0.8873574733734131,
0.9938505291938782,
0.12727205455303192,
1.088964819908142,
0.7935294508934021,
-0.5785643458366394,
0.6643819808959961,
0.04385959729552269,
-1.400555968284607,
0.6113134026527405,
1.209818959236145,
0.05788268521428108,
1.504119634628296,
-0.4193556606769562,
0.0805443823337555,
0.4198879897594452,
-0.7205280065536499,
-0.5217936038970947,
-0.415297269821167,
0.9039196968078613,
-0.023133300244808197,
-0.9127619862556458,
0.0881049782037735,
-0.14059476554393768,
-0.28277161717414856,
0.15620331466197968,
-1.559484839439392,
-0.29151439666748047,
-0.36611858010292053,
-0.5071629881858826,
-1.3989206552505493,
0.0325968936085701,
1.3233258724212646,
-0.5104524493217468,
-0.32306045293807983,
0.4005793035030365,
0.4591467082500458,
0.6311488151550293,
0.6949784755706787,
-0.8151988983154297,
-0.1130891889333725,
-0.4176183342933655,
-0.3067415952682495,
0.454673707485199,
1.4117945432662964,
-0.12207649648189545,
-0.902433454990387,
0.8141336441040039,
-0.36189475655555725,
-0.0407286211848259,
1.8858722448349,
0.02202891930937767,
-0.7419515252113342,
0.4214187562465668,
-0.7994956374168396,
1.9029093980789185,
1.7259379625320435,
1.2144992351531982,
-0.13218726217746735,
-1.0150541067123413,
0.6959786415100098,
-0.44926926493644714,
-0.30058810114860535,
0.8258644342422485,
0.3650793433189392,
-0.3291991055011749,
-1.3158756494522095,
0.7178239226341248,
1.1048941612243652,
-0.7003979086875916,
-0.9490376114845276,
0.0629296749830246,
-0.6877714395523071,
1.1216645240783691,
0.5153420567512512,
0.3684055507183075,
0.39249807596206665,
1.5598552227020264,
0.7729882001876831,
-0.34677714109420776,
0.5373820066452026,
0.6847002506256104,
-0.15268614888191223,
-2.0607573986053467,
-1.2466756105422974,
0.4132104516029358,
-0.591549813747406,
-1.5770875215530396,
1.4061002731323242,
-1.0655752420425415,
-1.058951497077942,
0.5923173427581787,
0.054645996540784836,
1.5884504318237305,
0.41493380069732666,
1.5853675603866577,
2.063005208969116,
0.7866358757019043,
0.5473559498786926,
1.48325514793396,
-0.3128051459789276,
-0.5078968405723572,
1.893912434577942,
-0.5322880744934082,
0.32554879784584045,
1.155434489250183,
-0.3145459294319153,
-1.1103899478912354,
-0.8664849400520325,
-1.2296628952026367,
-0.5270799398422241,
1.1709285974502563,
0.05517349764704704,
-1.0267385244369507,
0.3780848979949951,
1.6477307081222534,
0.1533750593662262,
-0.1933865249156952,
0.6062381267547607,
0.40178704261779785,
-0.7714630961418152,
-0.04430874064564705,
-0.8739581108093262,
0.5475152134895325,
-0.31052717566490173,
-0.3687204122543335,
0.40802571177482605,
0.43741169571876526,
1.2244423627853394,
-0.20015190541744232,
0.19169233739376068,
0.8559851050376892,
-1.4232220649719238,
1.315527319908142,
-0.5373323559761047,
0.25542983412742615,
-2.3459792137145996,
1.3654052019119263,
-0.627199649810791,
2.043151378631592,
-2.7147014141082764,
0.4274425506591797,
-0.5463802218437195,
-0.4937117099761963,
0.394957959651947,
-0.3231976628303528,
-0.008522155694663525,
-0.11505551636219025,
-1.1859530210494995,
0.14905263483524323,
-0.6915804743766785,
0.7024449706077576,
1.124629259109497,
1.2776408195495605,
-0.9699601531028748,
-0.25494512915611267,
-1.6216884851455688,
-0.1939750462770462,
-0.7562704086303711,
0.3977949023246765,
-2.129567861557007,
-0.2143051028251648,
-2.1074132919311523,
-2.3447694778442383,
-1.069988489151001,
-0.7330923676490784,
1.0220264196395874,
0.1134069412946701,
-0.7883963584899902,
1.2990670204162598,
-0.20630772411823273,
-1.856500267982483,
1.0006201267242432,
-1.9998522996902466
] |
https://github.com/huggingface/datasets/issues/6008 | Dataset.from_generator consistently freezes at ~1000 rows | By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
Our support for multi-dim arrays could be better, and we plan to improve it as part of https://github.com/huggingface/datasets/issues/5272. | ### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
| 73 | 64 | Dataset.from_generator consistently freezes at ~1000 rows
### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
Our support for multi-dim arrays could be better, and we plan to improve it as part of https://github.com/huggingface/datasets/issues/5272. | [
-1.2295646667480469,
-0.9581651091575623,
-0.7334016561508179,
1.3907345533370972,
-0.16734901070594788,
-1.2100038528442383,
0.15566909313201904,
-1.0667169094085693,
1.659063458442688,
-0.790022075176239,
0.31848087906837463,
-1.65096116065979,
0.0977749153971672,
-0.5201826095581055,
-0.7778099179267883,
-0.8594335317611694,
-0.46333974599838257,
-0.7646033763885498,
1.0708714723587036,
2.4930312633514404,
1.1807228326797485,
-1.356156587600708,
2.6932036876678467,
0.665052056312561,
-0.11190148442983627,
-1.0131559371948242,
0.5486469268798828,
0.026395753026008606,
-1.4206256866455078,
-0.37870821356773376,
-0.9271131157875061,
-0.08292467892169952,
-0.5709109306335449,
-0.616674542427063,
0.023482829332351685,
0.3961350917816162,
-0.24965190887451172,
-0.45091164112091064,
-0.5142200589179993,
-0.7703641653060913,
0.46651411056518555,
-0.3565744459629059,
0.9671398997306824,
-0.3334362208843231,
1.798467755317688,
-0.5255683064460754,
0.5301334261894226,
0.6745304465293884,
1.333662509918213,
0.25800153613090515,
-0.01979699544608593,
0.3485606014728546,
0.4219996929168701,
0.029989581555128098,
0.510144054889679,
1.1257894039154053,
0.7182778120040894,
0.4680924415588379,
0.7113099098205566,
-2.190079927444458,
1.3320375680923462,
-0.9908958077430725,
0.38101401925086975,
1.3813722133636475,
-0.9398031234741211,
0.34130293130874634,
-1.760605812072754,
-0.10048215836286545,
0.5148822069168091,
-2.25057315826416,
0.2515716552734375,
-1.2774510383605957,
-0.5063577890396118,
1.0824815034866333,
0.34040209650993347,
-1.2339907884597778,
0.11729944497346878,
-0.4580574631690979,
0.9852789640426636,
0.4025387763977051,
1.1816941499710083,
-1.6785588264465332,
-0.03965853154659271,
-0.30709442496299744,
0.11720233410596848,
-1.2208435535430908,
-1.53470778465271,
0.531586766242981,
0.6676393747329712,
0.5490767955780029,
-0.1408216655254364,
0.958264946937561,
-1.0104097127914429,
0.7730801105499268,
-0.9664350748062134,
-1.7126696109771729,
-1.3987330198287964,
-2.294722080230713,
-2.326061487197876,
0.7757543921470642,
-0.44565126299858093,
-0.5103834271430969,
2.043574333190918,
-1.0826334953308105,
-1.7716586589813232,
1.1891100406646729,
0.24252483248710632,
-0.04700346663594246,
2.3547637462615967,
0.19585463404655457,
-0.712637186050415,
0.5186799764633179,
-0.7533844113349915,
0.7504605054855347,
-0.3795267343521118,
1.3480311632156372,
0.3820367753505707,
-1.0527534484863281,
1.5850481986999512,
-0.3776010274887085,
0.5459778904914856,
-0.6858496069908142,
-0.4760236442089081,
-0.7655320167541504,
0.3230465352535248,
1.950440764427185,
-0.28615880012512207,
1.546055793762207,
-0.3179759979248047,
-1.5710800886154175,
-1.567008137702942,
0.8537966012954712,
0.5096765160560608,
-0.7384505271911621,
0.06180957704782486,
-0.31542491912841797,
0.09084214270114899,
0.005504831671714783,
1.0611902475357056,
1.2784008979797363,
0.77631014585495,
-0.34353676438331604,
-0.9359726905822754,
0.1910792887210846,
-0.0925191268324852,
-0.7252611517906189,
-1.723613977432251,
-0.35646846890449524,
0.09644021838903427,
0.6006192564964294,
-1.2249587774276733,
1.7373290061950684,
0.8973445296287537,
1.9360848665237427,
1.0241013765335083,
-0.3709554076194763,
1.522085189819336,
0.1530969738960266,
1.8814136981964111,
-0.4686819314956665,
0.6736941933631897,
-0.36502233147621155,
-1.1393166780471802,
0.8415868282318115,
-0.33469483256340027,
-2.0553996562957764,
-0.6508945822715759,
-0.8365024924278259,
-0.20704126358032227,
-0.7548584938049316,
0.9774402379989624,
-0.2409471869468689,
-1.3920738697052002,
0.27554401755332947,
-0.7418508529663086,
0.1425681710243225,
-1.2807562351226807,
0.35718104243278503,
0.7717676162719727,
-0.6800259947776794,
0.07916561514139175,
-0.3015071451663971,
-1.3186804056167603,
-0.4709288775920868,
0.3148767054080963,
1.8070186376571655,
-0.7950560450553894,
0.9653584361076355,
1.0512216091156006,
-0.6828341484069824,
-0.06396619975566864,
0.3885027766227722,
-0.30799803137779236,
0.8731548190116882,
-1.0887478590011597,
-0.4344245195388794,
1.163619041442871,
-0.19446313381195068,
-0.5542101263999939,
1.4211848974227905,
0.6942511200904846,
-1.0196887254714966,
-0.21712926030158997,
-0.0855262354016304,
-0.8367084264755249,
0.05197576805949211,
-1.6622166633605957,
-0.06879255175590515,
0.3762011229991913,
-1.5802208185195923,
-0.48641958832740784,
-0.21258383989334106,
1.26494562625885,
-0.1422499120235443,
1.4325419664382935,
-0.33227384090423584,
-0.18540939688682556,
-0.4510529339313507,
-0.3663023114204407,
0.12282318621873856,
-0.20622047781944275,
-0.5964195132255554,
0.2835135757923126,
-0.834808886051178,
0.38160771131515503,
1.4494415521621704,
0.3284391462802887,
0.038011230528354645,
0.5549063086509705,
1.0716428756713867,
0.38831883668899536,
-0.13142803311347961,
-0.8364784121513367,
-1.6000920534133911,
2.071927547454834,
-1.4526747465133667,
1.9819223880767822,
0.7446422576904297,
-0.03933372348546982,
-1.7686527967453003,
-1.8728622198104858,
1.3513582944869995,
1.128319501876831,
2.407747268676758,
0.5366812348365784,
0.44311368465423584,
-0.7912082672119141,
-0.6203247308731079,
0.3223719000816345,
-1.0177441835403442,
-0.7907423973083496,
0.17794734239578247,
2.318310499191284,
1.7138266563415527,
-0.37273263931274414,
-0.18295028805732727,
-1.0791246891021729,
1.3679330348968506,
-0.1722576916217804,
0.21437299251556396,
1.9647886753082275,
-0.2617056965827942,
-1.090965986251831,
1.2944601774215698,
-2.300736427307129,
0.19316056370735168,
1.9501221179962158,
0.25603801012039185,
0.04308917745947838,
-1.378993272781372,
-0.6662214994430542,
-0.2885676920413971,
-0.4126500189304352,
-1.231862187385559,
0.5098115801811218,
-0.23341193795204163,
-0.8023456335067749,
-1.4261722564697266,
0.11782821267843246,
-1.1762512922286987,
-1.711097002029419,
0.27457669377326965,
1.8654890060424805,
2.046377420425415,
-0.7154176831245422,
1.4999428987503052,
-0.2767043709754944,
0.21720898151397705,
1.2123754024505615,
1.168546438217163,
3.0917489528656006,
1.943267583847046,
-1.3083007335662842,
0.6547136902809143,
-0.10559239983558655,
-0.4459553062915802,
1.1757289171218872,
-1.173129677772522,
1.3162612915039062,
-0.12241347134113312,
-1.233069896697998,
-1.1708629131317139,
0.97279292345047,
0.46608278155326843,
0.08207714557647705,
-0.46735236048698425,
1.205397605895996,
0.04072993993759155,
1.3020198345184326,
0.5474075675010681,
-0.3317474126815796,
0.7019259929656982,
-0.34133094549179077,
-0.5309103727340698,
1.5131385326385498,
0.18226292729377747,
-1.43659508228302,
-2.326765537261963,
-0.2571893036365509,
-0.8667311072349548,
-0.01828780025243759,
-0.6149120926856995,
-0.9664829969406128,
1.6459596157073975,
0.4300661087036133,
-1.2113105058670044,
-0.2851785719394684,
-0.2962260842323303,
-0.6450000405311584,
2.6903979778289795,
-1.3982287645339966,
-0.24672654271125793,
-1.0015537738800049,
-0.6510265469551086,
1.5941561460494995,
-1.2223858833312988,
-0.24353021383285522,
-1.0176414251327515,
-0.5778072476387024,
-1.283080816268921,
-0.5587161779403687,
-0.012955650687217712,
-0.8870791792869568,
0.7871494889259338,
0.16168898344039917,
-1.1409515142440796,
-0.28840357065200806,
-0.9213846921920776,
0.8512352705001831,
-0.10825587809085846,
0.23898237943649292,
1.8454468250274658,
0.41860145330429077,
-0.3926524221897125,
0.7056586742401123,
1.1459691524505615,
0.6774388551712036,
-0.648274302482605,
0.2228579819202423,
-0.7300683856010437,
0.2826404273509979,
-1.2879337072372437,
0.3292830288410187,
-2.8033223152160645,
0.6111869812011719,
-0.10136491060256958,
-0.021716076880693436,
-0.04905010014772415,
-1.3160425424575806,
1.1031941175460815,
2.5828769207000732,
-1.1685138940811157,
0.5253599286079407,
0.32890504598617554,
1.1638399362564087,
-1.5778675079345703,
0.34694406390190125,
-0.43841812014579773,
2.071445941925049,
0.21833080053329468,
1.1267375946044922,
-0.4996155798435211,
-2.2833471298217773,
0.6207512617111206,
-1.2900620698928833,
-1.1332738399505615,
0.7346115708351135,
-0.863274872303009,
0.049561381340026855,
-1.3605595827102661,
-0.17458036541938782,
-0.829171895980835,
-1.2245641946792603,
0.6242345571517944,
0.08825584501028061,
0.4630589783191681,
-0.604486346244812,
0.39204370975494385,
-2.2041776180267334,
-1.325937271118164,
-0.25805729627609253,
-0.9586087465286255,
0.43612414598464966,
-0.3765629529953003,
0.7153446674346924,
-0.1990947425365448,
-0.03982856869697571,
0.36276543140411377,
1.3933632373809814,
3.406398296356201,
0.21089661121368408,
0.3503400385379791,
-0.12469679117202759,
-0.9530649185180664,
1.4331138134002686,
0.947876513004303,
-0.14804166555404663,
-0.5907177925109863,
-1.0359222888946533,
1.2753431797027588,
1.9841938018798828,
1.0772117376327515,
0.05215933173894882,
-0.8085293769836426,
-0.7543118000030518,
0.012560790404677391,
0.1546107828617096,
0.4396761655807495,
0.9532045722007751,
0.12842071056365967,
0.09838204830884933,
1.4634227752685547,
1.2034716606140137,
-0.3580710291862488,
0.38577619194984436,
-0.8106548190116882,
-0.5034505724906921,
0.5057395100593567,
0.36671552062034607,
0.0302559956908226,
0.36531862616539,
-1.092830777168274,
-0.22980931401252747,
-0.4035746455192566,
-0.9527701735496521,
-0.7326465845108032,
-0.38113197684288025,
-0.37948235869407654,
1.6985197067260742,
0.04867318645119667,
-0.5320968627929688,
-0.03916352987289429,
-0.7462443113327026,
-0.06169390678405762,
-1.0349352359771729,
0.288869708776474,
-0.12742924690246582,
-0.09068294614553452,
-0.08673285692930222,
1.7899686098098755,
-0.9538314342498779,
-2.1208040714263916,
0.19129639863967896,
0.16014540195465088,
-0.3455052375793457,
0.1966886818408966,
1.622283935546875,
0.5712451338768005,
1.4525885581970215,
1.3856552839279175,
0.9557756781578064,
-0.6716436147689819,
-1.3460510969161987,
0.723877489566803,
0.981247067451477,
-1.446874737739563,
0.7839645147323608,
0.013864142820239067,
-0.5650238990783691,
0.6432342529296875,
1.24479079246521,
0.462536096572876,
-2.027724266052246,
0.8268722295761108,
-0.9271887540817261,
0.7827416658401489,
0.7357771396636963,
0.7474591732025146,
0.14718061685562134,
0.7901706099510193,
-1.299342393875122,
-1.059807300567627,
-0.7402273416519165,
-0.6319953799247742,
1.9230618476867676,
-0.2647603154182434,
0.5676213502883911,
-0.24416521191596985,
-1.3352489471435547,
-0.03191174566745758,
0.6265980005264282,
0.31877896189689636,
-0.5336089730262756,
0.746056318283081,
-0.6459504961967468,
-1.1865991353988647,
-1.4142091274261475,
-0.460389643907547,
-1.0509986877441406,
-0.8934513926506042,
1.0391550064086914,
0.7687330842018127,
0.31366902589797974,
1.8157010078430176,
0.6818931102752686,
0.202366441488266,
-2.682100772857666,
0.9087935090065002,
0.2744593620300293,
-0.09681207686662674,
0.8522705435752869,
0.3048453629016876,
1.0406349897384644,
-0.08251935988664627,
0.5433818101882935,
-2.4121289253234863,
2.325249195098877,
-0.28419676423072815,
0.7133115530014038,
0.01697423867881298,
-0.16068699955940247,
1.1235532760620117,
0.598891019821167,
0.5728923082351685,
-1.0826512575149536,
0.6841112375259399,
-0.6499607563018799,
1.2403113842010498,
0.8622141480445862,
-0.8003010749816895,
-0.040568895637989044,
1.3028589487075806,
0.4843518137931824,
-0.4489406943321228,
-0.9194008111953735,
-0.9901406764984131,
0.948551595211029,
1.7626104354858398,
-0.07616996020078659,
0.02026117965579033,
0.8508935570716858,
0.6869852542877197,
-1.340303897857666,
0.04181160032749176,
-0.7292927503585815,
-0.7367013096809387,
1.6604132652282715,
2.081173896789551,
-0.08580315113067627,
-0.23762774467468262,
-0.7342431545257568,
-1.2922042608261108,
0.7540158629417419,
0.029997684061527252,
0.1191033348441124,
0.6592614054679871,
-0.575840175151825,
1.123228907585144,
0.9238897562026978,
0.9240918755531311,
0.2193949818611145,
0.21020293235778809,
0.26846766471862793,
-0.30680787563323975,
-1.1323168277740479,
-0.2050703465938568,
-1.0392953157424927,
-2.5532894134521484,
0.4938243329524994,
-0.2204081118106842,
-1.519890308380127,
0.051525432616472244,
-1.0113195180892944,
0.9067166447639465,
-0.519862711429596,
-1.068987488746643,
-1.5410934686660767,
0.19814330339431763,
-0.09181539714336395,
0.9488039612770081,
-1.6461246013641357,
-0.11711461842060089,
1.278438687324524,
0.9399526119232178,
-0.644779622554779,
0.9915511012077332,
0.2185494303703308,
1.0023841857910156,
0.881395697593689,
-0.3700593113899231,
0.4728330671787262,
0.14088580012321472,
-1.3537218570709229,
0.430538535118103,
1.1925020217895508,
0.19105854630470276,
1.4448091983795166,
-0.6295871138572693,
0.039974525570869446,
0.4003954529762268,
-0.4341413080692291,
-0.41943150758743286,
-0.6092233657836914,
0.6862061619758606,
-0.0123496288433671,
-0.8537147045135498,
0.03434302657842636,
-0.07264414429664612,
-0.13352134823799133,
0.1679660975933075,
-1.506250262260437,
-0.17185646295547485,
-0.3836981952190399,
-0.6778390407562256,
-1.205827236175537,
-0.09691330790519714,
1.3960487842559814,
-0.828528106212616,
-0.1627727746963501,
0.4711722433567047,
0.319825679063797,
0.5475980043411255,
0.6519448161125183,
-0.639102041721344,
-0.36461251974105835,
-0.1935361921787262,
-0.39864590764045715,
0.3021225333213806,
1.3655576705932617,
-0.10579156130552292,
-0.9478467106819153,
0.7194511890411377,
-0.33823832869529724,
0.08474092185497284,
1.9051246643066406,
0.08049532026052475,
-0.8681122660636902,
0.3519674241542816,
-0.6905664801597595,
1.9310330152511597,
1.761898159980774,
1.3323723077774048,
-0.1556585431098938,
-0.9743326902389526,
0.5580741167068481,
-0.2950049042701721,
-0.3980487883090973,
0.9307003021240234,
0.4519791007041931,
-0.1970684826374054,
-1.3773084878921509,
0.6826229095458984,
1.284765362739563,
-0.8797300457954407,
-0.829491138458252,
0.18132120370864868,
-0.7819796204566956,
1.1266496181488037,
0.6841948628425598,
0.3753644824028015,
0.23188495635986328,
1.6125940084457397,
0.7483774423599243,
-0.48985448479652405,
0.5800880193710327,
0.5167227387428284,
-0.16457751393318176,
-2.079571008682251,
-1.1291539669036865,
0.3394724130630493,
-0.5293823480606079,
-1.546945571899414,
1.3589389324188232,
-1.143066167831421,
-0.9560006856918335,
0.5468600392341614,
0.12502512335777283,
1.4382537603378296,
0.36557289958000183,
1.6132850646972656,
2.082313299179077,
0.8990024328231812,
0.36287179589271545,
1.3065134286880493,
-0.12581045925617218,
-0.4044736921787262,
1.77642822265625,
-0.4142669439315796,
0.5829251408576965,
1.0803818702697754,
-0.35263779759407043,
-1.0633909702301025,
-0.7860371470451355,
-1.2188383340835571,
-0.7011882662773132,
1.12128746509552,
0.10767968744039536,
-1.123989462852478,
0.26351383328437805,
1.5569467544555664,
0.11070063710212708,
-0.2635951638221741,
0.6547949910163879,
0.37554600834846497,
-0.7289888858795166,
-0.13758888840675354,
-0.9363789558410645,
0.5059527158737183,
-0.2700546383857727,
-0.38705599308013916,
0.35167571902275085,
0.49322327971458435,
1.3055212497711182,
-0.028405047953128815,
0.11035354435443878,
1.1948152780532837,
-1.4596422910690308,
1.4699571132659912,
-0.7195598483085632,
0.28790825605392456,
-2.3196449279785156,
1.3749736547470093,
-0.7491723299026489,
1.928736925125122,
-2.670541286468506,
0.41402092576026917,
-0.6120609641075134,
-0.45718914270401,
0.2948288917541504,
-0.3617379665374756,
0.1293591856956482,
-0.14192157983779907,
-1.1153029203414917,
-0.11065482348203659,
-0.7303063273429871,
0.5913349390029907,
1.1022344827651978,
1.343505859375,
-1.072890043258667,
-0.3421801030635834,
-1.7328581809997559,
-0.1592084765434265,
-0.6138616800308228,
0.3395732641220093,
-1.940005898475647,
-0.19386208057403564,
-1.906903624534607,
-2.3902432918548584,
-1.3147553205490112,
-0.846289873123169,
1.179764747619629,
0.1400289237499237,
-0.8262795805931091,
1.1709518432617188,
-0.4159453511238098,
-1.8744984865188599,
1.098649501800537,
-2.2105984687805176
] |
https://github.com/huggingface/datasets/issues/6008 | Dataset.from_generator consistently freezes at ~1000 rows | > By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
>
> Our support for multi-dim arrays could be better, and we plan to improve it as part of #5272.
Thanks for the explanation! The Image array was just for demonstration, I use PIL Images in practice. Does that make a difference? What's the best approach for a dataset with PIL Images as rows? | ### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
| 73 | 101 | Dataset.from_generator consistently freezes at ~1000 rows
### Describe the bug
Whenever I try to create a dataset which contains images using `Dataset.from_generator`, it freezes around 996 rows. I suppose it has something to do with memory consumption, but there's more memory available. I
Somehow it worked a few times but mostly this makes the datasets library much more cumbersome to work with because generators are the easiest way to turn an existing dataset into a Hugging Face dataset.
I've let it run in the frozen state for way longer than it can possibly take to load the actual dataset.
Let me know if you have ideas how to resolve it!
### Steps to reproduce the bug
```python
from datasets import Dataset
import numpy as np
def gen():
for row in range(10000):
yield {"i": np.random.rand(512, 512, 3)}
Dataset.from_generator(gen)
# -> 90% of the time gets stuck around 1000 rows
```
### Expected behavior
Should continue and go through all the examples yielded by the generator, or at least throw an error or somehow communicate what's going on.
### Environment info
- `datasets` version: 2.8.0
- Platform: Linux-5.15.0-52-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyArrow version: 12.0.1
- Pandas version: 1.5.1
> By default, we write data to disk (so it can be memory-mapped) every 1000 rows/samples. You can control this with the `writer_batch_size` parameter. Also, when working with fixed-size arrays, the `ArrayXD` feature types yield better performance (e.g., in your case, `features=datasets.Features({"i": datasets.Array3D(shape=(512,512,3), dtype="float32")})` should be faster).
>
> Our support for multi-dim arrays could be better, and we plan to improve it as part of #5272.
Thanks for the explanation! The Image array was just for demonstration, I use PIL Images in practice. Does that make a difference? What's the best approach for a dataset with PIL Images as rows? | [
-1.250273585319519,
-0.9448893070220947,
-0.7324300408363342,
1.3589116334915161,
-0.1858786940574646,
-1.1972534656524658,
0.16295599937438965,
-1.1114394664764404,
1.6671942472457886,
-0.8054486513137817,
0.3067043423652649,
-1.6433466672897339,
0.1131075769662857,
-0.508786141872406,
-0.7795752286911011,
-0.8770449161529541,
-0.4825984537601471,
-0.7749668955802917,
1.063828706741333,
2.5011584758758545,
1.1503549814224243,
-1.360543131828308,
2.67353892326355,
0.6677196621894836,
-0.10586384683847427,
-1.0198566913604736,
0.5620676279067993,
0.013842946849763393,
-1.4224205017089844,
-0.3773101568222046,
-0.9402835369110107,
-0.10813309252262115,
-0.5765058398246765,
-0.6147410273551941,
0.014124752022325993,
0.38234367966651917,
-0.23610804975032806,
-0.46548324823379517,
-0.4955235421657562,
-0.7541170716285706,
0.4545552730560303,
-0.36536723375320435,
0.9762126803398132,
-0.3306865096092224,
1.7981915473937988,
-0.5227108001708984,
0.5548867583274841,
0.6864635348320007,
1.3457775115966797,
0.2638983428478241,
-0.03973563387989998,
0.3426227271556854,
0.42317524552345276,
0.02049529179930687,
0.4794626235961914,
1.0952277183532715,
0.7050324082374573,
0.49610093235969543,
0.7152572870254517,
-2.1988794803619385,
1.3163344860076904,
-0.9974643588066101,
0.37837880849838257,
1.3959153890609741,
-0.9357293844223022,
0.37186798453330994,
-1.7720850706100464,
-0.07412751764059067,
0.512752115726471,
-2.253565788269043,
0.26433074474334717,
-1.286261796951294,
-0.5077399611473083,
1.0535480976104736,
0.34248942136764526,
-1.2216589450836182,
0.11764172464609146,
-0.45442357659339905,
0.9950413703918457,
0.39667725563049316,
1.1751855611801147,
-1.6857343912124634,
-0.03266759589314461,
-0.32141634821891785,
0.1377316415309906,
-1.2140079736709595,
-1.5352827310562134,
0.5646020174026489,
0.6865369081497192,
0.5259565114974976,
-0.12375715374946594,
0.9669373631477356,
-0.9967378973960876,
0.7597174644470215,
-0.9685648083686829,
-1.70914888381958,
-1.40275239944458,
-2.2783288955688477,
-2.314044952392578,
0.7529429793357849,
-0.4646376371383667,
-0.5331981182098389,
2.072092056274414,
-1.079714059829712,
-1.7743065357208252,
1.2052929401397705,
0.2326011210680008,
-0.06153164058923721,
2.372767925262451,
0.17656607925891876,
-0.7019830942153931,
0.5165160298347473,
-0.755920946598053,
0.7620437741279602,
-0.40452176332473755,
1.3526159524917603,
0.36174294352531433,
-1.0406960248947144,
1.5841176509857178,
-0.37722620368003845,
0.5700572729110718,
-0.6747630834579468,
-0.46775007247924805,
-0.7783358097076416,
0.3365437686443329,
1.9506895542144775,
-0.2656635642051697,
1.5374122858047485,
-0.30133214592933655,
-1.5795377492904663,
-1.5869181156158447,
0.8604720234870911,
0.5234490633010864,
-0.7307136058807373,
0.10310270637273788,
-0.2930876314640045,
0.09491513669490814,
0.008717996068298817,
1.0670560598373413,
1.3051515817642212,
0.7876055836677551,
-0.3396236300468445,
-0.9450037479400635,
0.1894087940454483,
-0.1119462326169014,
-0.7352109551429749,
-1.7414287328720093,
-0.3542986512184143,
0.07036944478750229,
0.6068578958511353,
-1.2129660844802856,
1.737353801727295,
0.8953619003295898,
1.9297728538513184,
1.019289255142212,
-0.36663103103637695,
1.5069305896759033,
0.18814370036125183,
1.8458247184753418,
-0.4687163233757019,
0.6901790499687195,
-0.38402459025382996,
-1.1356000900268555,
0.8358809947967529,
-0.33538419008255005,
-2.0377471446990967,
-0.6387596130371094,
-0.8453729152679443,
-0.22319389879703522,
-0.7626374959945679,
0.9571782350540161,
-0.2435077428817749,
-1.375589370727539,
0.31172072887420654,
-0.7283886671066284,
0.15381896495819092,
-1.2812079191207886,
0.38175490498542786,
0.754327654838562,
-0.6629311442375183,
0.08530648052692413,
-0.30099543929100037,
-1.339643120765686,
-0.4723498821258545,
0.3038727641105652,
1.7888376712799072,
-0.7986482381820679,
0.9569790959358215,
1.0471208095550537,
-0.684887707233429,
-0.08336178958415985,
0.3930813670158386,
-0.2804362177848816,
0.8712523579597473,
-1.0879015922546387,
-0.4357292652130127,
1.1694152355194092,
-0.2070329487323761,
-0.5232807397842407,
1.4079537391662598,
0.6648256778717041,
-1.015389084815979,
-0.20203949511051178,
-0.10465793311595917,
-0.8429242968559265,
0.05617782846093178,
-1.684497356414795,
-0.062010135501623154,
0.37047311663627625,
-1.6034958362579346,
-0.5100864768028259,
-0.20067386329174042,
1.2451465129852295,
-0.13744480907917023,
1.4464178085327148,
-0.33685606718063354,
-0.15483315289020538,
-0.4484228789806366,
-0.35915952920913696,
0.12134891003370285,
-0.21700221300125122,
-0.579396665096283,
0.2595326602458954,
-0.8262734413146973,
0.37969550490379333,
1.4439727067947388,
0.3201686143875122,
0.046467360109090805,
0.5351415276527405,
1.0530269145965576,
0.3733442723751068,
-0.13529877364635468,
-0.8603878617286682,
-1.5724494457244873,
2.0625245571136475,
-1.469865322113037,
1.9750306606292725,
0.7541896104812622,
-0.03196609765291214,
-1.7725262641906738,
-1.88102388381958,
1.370086908340454,
1.1442954540252686,
2.383279323577881,
0.5540844798088074,
0.43448957800865173,
-0.7899518609046936,
-0.6028194427490234,
0.31896668672561646,
-1.0295403003692627,
-0.7886794209480286,
0.1650415062904358,
2.3205597400665283,
1.6996417045593262,
-0.3717769980430603,
-0.179392009973526,
-1.0723985433578491,
1.3788771629333496,
-0.16953685879707336,
0.2187172919511795,
1.9657628536224365,
-0.2710685431957245,
-1.108641505241394,
1.2953355312347412,
-2.306948184967041,
0.17880423367023468,
1.9536629915237427,
0.26010414958000183,
0.0633377730846405,
-1.364511489868164,
-0.6596843600273132,
-0.28693655133247375,
-0.3945806324481964,
-1.2495460510253906,
0.5169540047645569,
-0.22552578151226044,
-0.7678648233413696,
-1.4394179582595825,
0.13912005722522736,
-1.1716502904891968,
-1.6974780559539795,
0.25125911831855774,
1.8756511211395264,
2.032315731048584,
-0.7168521285057068,
1.5092357397079468,
-0.30156755447387695,
0.21158435940742493,
1.2101054191589355,
1.1458569765090942,
3.0937514305114746,
1.9555482864379883,
-1.2895376682281494,
0.6310199499130249,
-0.1046619564294815,
-0.44360488653182983,
1.167448878288269,
-1.1723012924194336,
1.3235660791397095,
-0.09755833446979523,
-1.2091776132583618,
-1.1644327640533447,
0.9484612941741943,
0.4393339455127716,
0.09290016442537308,
-0.46209460496902466,
1.2114648818969727,
0.037760622799396515,
1.3113716840744019,
0.5355013012886047,
-0.33204805850982666,
0.7115362286567688,
-0.36495479941368103,
-0.5225668549537659,
1.528649091720581,
0.18618640303611755,
-1.435426115989685,
-2.336841344833374,
-0.2835361957550049,
-0.8487351536750793,
0.019842199981212616,
-0.6227395534515381,
-0.9853668808937073,
1.658461570739746,
0.41137194633483887,
-1.1950806379318237,
-0.2936437129974365,
-0.3091987669467926,
-0.657123327255249,
2.684523582458496,
-1.4166383743286133,
-0.2523207664489746,
-0.990477442741394,
-0.6540008783340454,
1.5826187133789062,
-1.2361642122268677,
-0.23077566921710968,
-1.028173804283142,
-0.5479710698127747,
-1.263283610343933,
-0.5626576542854309,
-0.025667473673820496,
-0.8907825946807861,
0.7895367741584778,
0.1864948272705078,
-1.1629613637924194,
-0.2722131609916687,
-0.8939672708511353,
0.8500544428825378,
-0.08598184585571289,
0.249932661652565,
1.84652578830719,
0.4226627051830292,
-0.3752567172050476,
0.7125917673110962,
1.1404390335083008,
0.6656516194343567,
-0.6447880268096924,
0.21881431341171265,
-0.7291713953018188,
0.306526780128479,
-1.2729336023330688,
0.3375948369503021,
-2.7967047691345215,
0.6157151460647583,
-0.0983402356505394,
-0.022063441574573517,
-0.03748657926917076,
-1.3247989416122437,
1.0718638896942139,
2.6085031032562256,
-1.1729950904846191,
0.508073091506958,
0.3181270658969879,
1.1877332925796509,
-1.5565006732940674,
0.33293524384498596,
-0.42829564213752747,
2.1041934490203857,
0.20642700791358948,
1.1235862970352173,
-0.4852910339832306,
-2.345487356185913,
0.6103078722953796,
-1.2726119756698608,
-1.17168390750885,
0.7263922095298767,
-0.825285017490387,
0.004834473133087158,
-1.3654367923736572,
-0.17874015867710114,
-0.8219099640846252,
-1.2108402252197266,
0.6426385641098022,
0.10477833449840546,
0.47410303354263306,
-0.6157208681106567,
0.37658846378326416,
-2.211611032485962,
-1.3277431726455688,
-0.25837650895118713,
-0.940611720085144,
0.4258885383605957,
-0.35593461990356445,
0.7296476364135742,
-0.21662548184394836,
-0.025083106011152267,
0.3718651831150055,
1.4026439189910889,
3.4026315212249756,
0.18130718171596527,
0.3583328425884247,
-0.1403278261423111,
-0.9532050490379333,
1.416841745376587,
0.9391891956329346,
-0.16302615404129028,
-0.6054912209510803,
-1.0467897653579712,
1.2513716220855713,
1.9815526008605957,
1.0362427234649658,
0.03900580108165741,
-0.8032516837120056,
-0.7220470309257507,
-0.008297675289213657,
0.1561013013124466,
0.4383133053779602,
0.9504988789558411,
0.13323338329792023,
0.10088475048542023,
1.4490914344787598,
1.1956411600112915,
-0.3643857538700104,
0.38051465153694153,
-0.8030728697776794,
-0.5355061888694763,
0.5177823901176453,
0.40672749280929565,
0.028098389506340027,
0.3433007001876831,
-1.055077314376831,
-0.22837121784687042,
-0.4014483392238617,
-0.9542123675346375,
-0.722272515296936,
-0.3759980797767639,
-0.3656857907772064,
1.6963837146759033,
0.07693549990653992,
-0.5351709127426147,
-0.05126634240150452,
-0.7406863570213318,
-0.053053922951221466,
-1.0452849864959717,
0.2823682129383087,
-0.14780162274837494,
-0.1080581322312355,
-0.0688340812921524,
1.7983278036117554,
-0.9360235333442688,
-2.092848777770996,
0.20443885028362274,
0.16200321912765503,
-0.34167051315307617,
0.19804342091083527,
1.6275856494903564,
0.5614778399467468,
1.4705173969268799,
1.390014886856079,
0.9501932263374329,
-0.6773578524589539,
-1.3569235801696777,
0.7379267811775208,
0.9661985635757446,
-1.4440960884094238,
0.7653791308403015,
0.04384146258234978,
-0.5616468787193298,
0.6306020021438599,
1.2269291877746582,
0.48176634311676025,
-2.0448014736175537,
0.8389509916305542,
-0.9602625370025635,
0.7723497152328491,
0.7528027296066284,
0.7529072761535645,
0.1489965170621872,
0.7917425036430359,
-1.2736623287200928,
-1.0519160032272339,
-0.749407947063446,
-0.6408292055130005,
1.9300752878189087,
-0.29006895422935486,
0.5514068007469177,
-0.2529616951942444,
-1.3356261253356934,
-0.05055002495646477,
0.6310096979141235,
0.3311925232410431,
-0.48803189396858215,
0.7375393509864807,
-0.6601917147636414,
-1.1963646411895752,
-1.4296612739562988,
-0.4628905951976776,
-1.0281453132629395,
-0.9098952412605286,
1.035158395767212,
0.7931239008903503,
0.31198757886886597,
1.813673973083496,
0.6766884922981262,
0.1836523711681366,
-2.6727590560913086,
0.9060043692588806,
0.282986581325531,
-0.11027159541845322,
0.8524155616760254,
0.3302180767059326,
1.0318173170089722,
-0.08118152618408203,
0.5296940207481384,
-2.4031753540039062,
2.332965135574341,
-0.2872016727924347,
0.7435672879219055,
0.005912148393690586,
-0.15217599272727966,
1.1186484098434448,
0.5997314453125,
0.572020411491394,
-1.0644259452819824,
0.6744056940078735,
-0.6519732475280762,
1.2509347200393677,
0.859914243221283,
-0.7764901518821716,
-0.04042539745569229,
1.3051621913909912,
0.47189322113990784,
-0.4844873249530792,
-0.9266998767852783,
-0.998871922492981,
0.939737856388092,
1.7748985290527344,
-0.0879833996295929,
0.04298718273639679,
0.8147870898246765,
0.6788748502731323,
-1.3511868715286255,
0.044439468532800674,
-0.7386642694473267,
-0.7631138563156128,
1.6441409587860107,
2.0639750957489014,
-0.07200103253126144,
-0.2173873335123062,
-0.7225250005722046,
-1.3363983631134033,
0.7615616321563721,
0.031033899635076523,
0.12472332268953323,
0.6331924200057983,
-0.5837731957435608,
1.0989004373550415,
0.9565294981002808,
0.9237762093544006,
0.24941708147525787,
0.23047316074371338,
0.2792780101299286,
-0.30278444290161133,
-1.1176806688308716,
-0.1792009174823761,
-1.026690125465393,
-2.5560009479522705,
0.5103908181190491,
-0.24080127477645874,
-1.5142556428909302,
0.035581495612859726,
-0.9859767556190491,
0.9113107919692993,
-0.5246493816375732,
-1.0523381233215332,
-1.5495896339416504,
0.1743461638689041,
-0.08235370367765427,
0.9467971324920654,
-1.6345572471618652,
-0.12011457979679108,
1.242918848991394,
0.9517928957939148,
-0.6535106301307678,
1.0021005868911743,
0.22440221905708313,
1.0111714601516724,
0.893558144569397,
-0.38975006341934204,
0.4738573133945465,
0.12311958521604538,
-1.326464056968689,
0.41169771552085876,
1.1797645092010498,
0.20003704726696014,
1.436968207359314,
-0.6307580471038818,
0.004546515643596649,
0.3942384123802185,
-0.4095262289047241,
-0.4081118106842041,
-0.6200881600379944,
0.6713208556175232,
-0.006123616360127926,
-0.8352233171463013,
0.027361828833818436,
-0.06716462224721909,
-0.14494968950748444,
0.1735685020685196,
-1.50016188621521,
-0.1549169421195984,
-0.3986145555973053,
-0.6643861532211304,
-1.2128552198410034,
-0.11439526826143265,
1.4329371452331543,
-0.803928792476654,
-0.168014794588089,
0.4733867347240448,
0.34578633308410645,
0.5368793606758118,
0.6590113043785095,
-0.6281971335411072,
-0.3702523112297058,
-0.20299196243286133,
-0.41221749782562256,
0.3015579283237457,
1.3838707208633423,
-0.11844663321971893,
-0.9436221122741699,
0.7139049172401428,
-0.3255447745323181,
0.05838250741362572,
1.8931655883789062,
0.1072569191455841,
-0.8551696538925171,
0.32970568537712097,
-0.6795881986618042,
1.9442030191421509,
1.7751834392547607,
1.3198151588439941,
-0.16930162906646729,
-0.9819841384887695,
0.5758112072944641,
-0.28794360160827637,
-0.37389522790908813,
0.9191129803657532,
0.47628137469291687,
-0.20536397397518158,
-1.3996269702911377,
0.7036831378936768,
1.2833839654922485,
-0.8768416047096252,
-0.8326958417892456,
0.16727733612060547,
-0.7730473279953003,
1.1064307689666748,
0.7037588953971863,
0.4092997908592224,
0.21010296046733856,
1.6466647386550903,
0.7626144886016846,
-0.5119802355766296,
0.5856737494468689,
0.5243396759033203,
-0.15779432654380798,
-2.089431047439575,
-1.161192774772644,
0.3275660276412964,
-0.5307068228721619,
-1.5532339811325073,
1.38347589969635,
-1.1507054567337036,
-0.9589405059814453,
0.5343631505966187,
0.1063130646944046,
1.4387953281402588,
0.37538981437683105,
1.5913621187210083,
2.0706822872161865,
0.9209503531455994,
0.4011448621749878,
1.3207987546920776,
-0.13884787261486053,
-0.4008486866950989,
1.7830179929733276,
-0.40238261222839355,
0.5345629453659058,
1.1266428232192993,
-0.34662309288978577,
-1.0473309755325317,
-0.787929356098175,
-1.2061065435409546,
-0.7177138924598694,
1.1211355924606323,
0.09121677279472351,
-1.1259543895721436,
0.2883385121822357,
1.5746604204177856,
0.10375567525625229,
-0.26768553256988525,
0.6505253314971924,
0.40081796050071716,
-0.7603662610054016,
-0.14320386946201324,
-0.9397585391998291,
0.5077486038208008,
-0.2800183892250061,
-0.39806073904037476,
0.374188631772995,
0.47262245416641235,
1.3230464458465576,
-0.032393280416727066,
0.11160075664520264,
1.1848769187927246,
-1.4540196657180786,
1.4515665769577026,
-0.7056740522384644,
0.2684152126312256,
-2.3091325759887695,
1.3824353218078613,
-0.7343898415565491,
1.9359078407287598,
-2.6795296669006348,
0.4147079586982727,
-0.6380599737167358,
-0.43702074885368347,
0.29197826981544495,
-0.3737485110759735,
0.13950127363204956,
-0.13957549631595612,
-1.1369305849075317,
-0.11872246861457825,
-0.7225321531295776,
0.5997980237007141,
1.0823657512664795,
1.3360373973846436,
-1.0640184879302979,
-0.3234650790691376,
-1.7039862871170044,
-0.16795173287391663,
-0.6103702783584595,
0.3247232735157013,
-1.9321873188018799,
-0.19605618715286255,
-1.9065238237380981,
-2.397778034210205,
-1.3224623203277588,
-0.8354617953300476,
1.1622309684753418,
0.10984980314970016,
-0.809814989566803,
1.192277193069458,
-0.4160153567790985,
-1.8872145414352417,
1.1098679304122925,
-2.202232837677002
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | This error means that one of the int32 (`Value("int32")`) columns in the dataset has a value that is out of the valid (int32) range.
I'll open a PR to print the name of a problematic column to make debugging such errors easier. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 74 | 42 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
This error means that one of the int32 (`Value("int32")`) columns in the dataset has a value that is out of the valid (int32) range.
I'll open a PR to print the name of a problematic column to make debugging such errors easier. | [
-1.1762616634368896,
-0.9247037172317505,
-0.6230241060256958,
1.4585685729980469,
-0.14434967935085297,
-1.2286900281906128,
0.1393262892961502,
-1.0940488576889038,
1.5033583641052246,
-0.7691389322280884,
0.19321289658546448,
-1.62937331199646,
-0.03561179339885712,
-0.6604982018470764,
-0.6882392168045044,
-0.8129012584686279,
-0.361989825963974,
-0.8227675557136536,
1.0431866645812988,
2.3925468921661377,
1.2505486011505127,
-1.408920168876648,
2.7824151515960693,
0.6825370788574219,
-0.20309175550937653,
-1.054370403289795,
0.521984875202179,
-0.03009789250791073,
-1.2089860439300537,
-0.4994511306285858,
-0.9603615999221802,
-0.04494495689868927,
-0.6983826756477356,
-0.2958213984966278,
-0.06136200577020645,
0.49751541018486023,
-0.2868650555610657,
-0.26016104221343994,
-0.6542292833328247,
-0.8028631806373596,
0.4872623682022095,
-0.30537691712379456,
0.9940378665924072,
-0.2985031008720398,
1.7195252180099487,
-0.5278900265693665,
0.5129393339157104,
0.7728586792945862,
1.2549495697021484,
0.1455172747373581,
-0.005483354441821575,
0.17838171124458313,
0.3448973000049591,
-0.022550689056515694,
0.5746480822563171,
1.1444342136383057,
0.6330298185348511,
0.598852813243866,
0.599375307559967,
-2.243001699447632,
1.3773010969161987,
-0.9879947304725647,
0.32696884870529175,
1.4226408004760742,
-0.8353627920150757,
0.38619914650917053,
-1.785841941833496,
-0.07360874116420746,
0.6276602745056152,
-2.237729549407959,
0.338153213262558,
-1.3090678453445435,
-0.5454554557800293,
0.9418737888336182,
0.43150123953819275,
-1.2069313526153564,
0.15500889718532562,
-0.47202345728874207,
1.104017734527588,
0.48756131529808044,
0.9366675615310669,
-1.7019485235214233,
-0.04209116846323013,
-0.16377580165863037,
0.1461993008852005,
-1.286113977432251,
-1.644670009613037,
0.6083168983459473,
0.5259932279586792,
0.6636841893196106,
-0.10380077362060547,
1.086626410484314,
-1.1188957691192627,
0.8417633175849915,
-1.0548826456069946,
-1.5459098815917969,
-1.3458787202835083,
-2.466904878616333,
-2.311518669128418,
0.6955347061157227,
-0.5233387351036072,
-0.44690626859664917,
2.088641881942749,
-0.966562032699585,
-1.6703218221664429,
1.1264820098876953,
0.30232757329940796,
0.04682980105280876,
2.3873140811920166,
0.24626603722572327,
-0.6891911029815674,
0.45248350501060486,
-0.8272844552993774,
0.8597055077552795,
-0.346079021692276,
1.3451508283615112,
0.50091153383255,
-1.0315046310424805,
1.5519105195999146,
-0.4789595603942871,
0.5700971484184265,
-0.60723876953125,
-0.5410104990005493,
-0.7463903427124023,
0.23539161682128906,
1.8108872175216675,
-0.24211794137954712,
1.5046766996383667,
-0.33385032415390015,
-1.523521900177002,
-1.5460160970687866,
0.952671229839325,
0.3560183048248291,
-0.9489750862121582,
0.0910845398902893,
-0.4977193772792816,
0.14318189024925232,
-0.13936716318130493,
1.1906111240386963,
1.2886799573898315,
0.6971879601478577,
-0.4024360477924347,
-0.7789167165756226,
0.10234799981117249,
-0.15253566205501556,
-0.7396536469459534,
-1.8579232692718506,
-0.24570123851299286,
0.12445428967475891,
0.6728820204734802,
-1.1261537075042725,
1.855181097984314,
0.934597909450531,
1.9521780014038086,
0.9943413734436035,
-0.48492303490638733,
1.3914802074432373,
0.04059218615293503,
1.8002259731292725,
-0.6067976951599121,
0.558914303779602,
-0.36773809790611267,
-1.1631113290786743,
0.9709139466285706,
-0.2738177478313446,
-2.009168863296509,
-0.745482861995697,
-0.7535560727119446,
-0.2692214846611023,
-0.7670236229896545,
0.9141814708709717,
-0.2732831537723541,
-1.4543362855911255,
0.12517136335372925,
-0.6119828820228577,
0.29110288619995117,
-1.1510542631149292,
0.285444974899292,
0.725890576839447,
-0.6120870113372803,
-0.07735779881477356,
-0.2089637815952301,
-1.330212950706482,
-0.5215833783149719,
0.48665526509284973,
1.8116934299468994,
-0.5667157173156738,
0.8790807723999023,
1.0090869665145874,
-0.6268512606620789,
0.0389397032558918,
0.1975218504667282,
-0.26886725425720215,
0.7261554002761841,
-1.0447674989700317,
-0.5574946999549866,
1.2064483165740967,
-0.38471826910972595,
-0.6486994028091431,
1.4577922821044922,
0.7289041876792908,
-1.118531346321106,
-0.24567911028862,
-0.2293718308210373,
-0.8800218105316162,
0.032976169139146805,
-1.4954297542572021,
-0.09434919059276581,
0.550826370716095,
-1.5789076089859009,
-0.31963446736335754,
-0.09841881692409515,
1.4366116523742676,
-0.19776298105716705,
1.472253441810608,
-0.37545710802078247,
-0.10168279707431793,
-0.2564363479614258,
-0.5066017508506775,
0.23084822297096252,
-0.14738857746124268,
-0.418671578168869,
0.08640749752521515,
-0.8375027179718018,
0.3157399892807007,
1.5394152402877808,
0.21569539606571198,
0.03482953459024429,
0.4134470224380493,
1.0643731355667114,
0.4102255702018738,
-0.007208403665572405,
-0.8875563144683838,
-1.50822913646698,
1.9638539552688599,
-1.4832971096038818,
1.9787298440933228,
0.7874236106872559,
-0.053156331181526184,
-1.7951339483261108,
-1.7672888040542603,
1.2673828601837158,
1.0972920656204224,
2.229739189147949,
0.47134125232696533,
0.3349563777446747,
-0.8238469958305359,
-0.694787859916687,
0.36256444454193115,
-0.9606155157089233,
-0.6255032420158386,
0.13999278843402863,
2.375483274459839,
1.834527611732483,
-0.45767688751220703,
-0.2720031440258026,
-0.8556336164474487,
1.4308830499649048,
-0.3380816578865051,
0.29439878463745117,
2.116771697998047,
-0.3589145243167877,
-1.0198100805282593,
1.3610142469406128,
-2.484593629837036,
0.36596888303756714,
2.1096596717834473,
0.340414434671402,
0.20163217186927795,
-1.3267980813980103,
-0.5849202871322632,
-0.37331536412239075,
-0.4684607684612274,
-1.2272006273269653,
0.5623845458030701,
-0.2827763855457306,
-0.7399104237556458,
-1.3986870050430298,
0.1945914775133133,
-1.1507538557052612,
-1.7531605958938599,
0.34805533289909363,
1.8999054431915283,
2.155256509780884,
-0.7588023543357849,
1.4698991775512695,
-0.38263317942619324,
0.09901097416877747,
1.2179597616195679,
1.374553918838501,
3.077659845352173,
1.810241937637329,
-1.337890386581421,
0.6596903204917908,
-0.17866995930671692,
-0.5034840106964111,
1.1124389171600342,
-1.0623687505722046,
1.2398581504821777,
-0.17071270942687988,
-1.2034655809402466,
-1.2868224382400513,
1.0398658514022827,
0.4674055874347687,
0.11945199966430664,
-0.5598062872886658,
1.2255289554595947,
0.13693910837173462,
1.3448519706726074,
0.6972441077232361,
-0.4765629768371582,
0.4724639058113098,
-0.348842591047287,
-0.6476726531982422,
1.570311427116394,
0.24667364358901978,
-1.5608203411102295,
-2.2581100463867188,
-0.2937113046646118,
-0.9053738713264465,
0.024227403104305267,
-0.6416811943054199,
-1.0239797830581665,
1.5580999851226807,
0.3897104561328888,
-1.1713966131210327,
-0.3151242136955261,
-0.2941959500312805,
-0.43520644307136536,
2.6904094219207764,
-1.2411267757415771,
-0.09997034072875977,
-0.9038124084472656,
-0.6579437851905823,
1.6498357057571411,
-1.3010914325714111,
-0.2625711262226105,
-1.1074391603469849,
-0.6877467036247253,
-1.2251993417739868,
-0.4133290946483612,
0.1027279645204544,
-0.9914187788963318,
0.7880914807319641,
0.22597111761569977,
-1.1758074760437012,
-0.3859699070453644,
-0.869469404220581,
1.0891849994659424,
-0.1976921409368515,
0.22708185017108917,
1.7629752159118652,
0.2566469609737396,
-0.47827866673469543,
0.8519090414047241,
1.2177010774612427,
0.658666729927063,
-0.6529871821403503,
-0.03931864723563194,
-0.6584813594818115,
0.45352044701576233,
-1.311294674873352,
0.2528330087661743,
-3.0593957901000977,
0.6207709908485413,
-0.10594996809959412,
-0.14613206684589386,
-0.1264810711145401,
-1.4249935150146484,
1.0488730669021606,
2.5046608448028564,
-1.256823182106018,
0.557610809803009,
0.47937580943107605,
1.112303614616394,
-1.6468981504440308,
0.27189692854881287,
-0.5080119371414185,
2.0675039291381836,
0.1439409703016281,
1.219714879989624,
-0.509819746017456,
-2.33502459526062,
0.6333411931991577,
-1.2520041465759277,
-1.0749415159225464,
0.7903345227241516,
-0.9026759266853333,
0.266679048538208,
-1.4419418573379517,
-0.18356449902057648,
-0.9756885766983032,
-1.26425039768219,
0.682779848575592,
0.14052636921405792,
0.3753029704093933,
-0.5856676697731018,
0.29137784242630005,
-2.1812310218811035,
-1.3824001550674438,
-0.12387068569660187,
-0.9447868466377258,
0.5564262270927429,
-0.521522581577301,
0.5821380615234375,
-0.0507662296295166,
0.06434029340744019,
0.32992276549339294,
1.6008200645446777,
3.381647825241089,
0.11128176748752594,
0.24053910374641418,
-0.21919837594032288,
-0.9459978342056274,
1.4442030191421509,
0.8860669136047363,
-0.054259538650512695,
-0.5533403158187866,
-0.95628422498703,
1.331786036491394,
2.009953498840332,
1.0018335580825806,
-0.00041266903281211853,
-0.840866208076477,
-0.6618966460227966,
-0.0342835858464241,
0.17438559234142303,
0.5765284895896912,
0.9152258038520813,
-0.04538838565349579,
0.01683579571545124,
1.3268201351165771,
1.1365312337875366,
-0.2748872935771942,
0.32656699419021606,
-0.9081598520278931,
-0.4110753536224365,
0.47190749645233154,
0.15363086760044098,
-0.019246606156229973,
0.5131422877311707,
-0.9745264053344727,
-0.21659646928310394,
-0.37573179602622986,
-0.7891838550567627,
-0.7009273767471313,
-0.41273149847984314,
-0.4948112666606903,
1.5993707180023193,
0.16738280653953552,
-0.5451816320419312,
0.12837930023670197,
-0.6797749996185303,
-0.21292631328105927,
-1.1282111406326294,
0.1143844872713089,
-0.0436401329934597,
-0.08609122037887573,
-0.2606874704360962,
1.6539226770401,
-0.9391069412231445,
-2.0718326568603516,
0.10969837009906769,
0.2958947420120239,
-0.23996345698833466,
0.16807478666305542,
1.7960474491119385,
0.4160701632499695,
1.3721204996109009,
1.3150990009307861,
0.9894079566001892,
-0.6445782780647278,
-1.2310564517974854,
0.8038755655288696,
1.0288286209106445,
-1.3874746561050415,
0.9144200086593628,
-0.15717990696430206,
-0.566368579864502,
0.8064784407615662,
1.2903642654418945,
0.44387632608413696,
-2.0211853981018066,
0.8644307255744934,
-1.1255707740783691,
0.9001458883285522,
0.7317468523979187,
0.6984953880310059,
0.28840622305870056,
0.8990054130554199,
-1.1707189083099365,
-1.100110650062561,
-0.6541128158569336,
-0.7138304114341736,
2.000624895095825,
-0.41026878356933594,
0.5623698830604553,
-0.15444160997867584,
-1.177638053894043,
-0.11211837828159332,
0.8766857981681824,
0.4166323244571686,
-0.44733235239982605,
0.799619734287262,
-0.6837254166603088,
-0.9884839653968811,
-1.214392066001892,
-0.37345167994499207,
-1.0620453357696533,
-0.944538950920105,
1.0505266189575195,
0.6895244717597961,
0.4158182144165039,
1.9431451559066772,
0.6253733038902283,
0.3246203362941742,
-2.527881383895874,
0.8415045142173767,
0.26492980122566223,
-0.11494213342666626,
0.8261486887931824,
0.3537510931491852,
1.1679987907409668,
0.08232831954956055,
0.623347818851471,
-2.4393272399902344,
2.260240077972412,
-0.20372778177261353,
0.6312507390975952,
0.017662402242422104,
-0.21254783868789673,
1.1736418008804321,
0.6529061794281006,
0.4578113257884979,
-1.104799509048462,
0.7180254459381104,
-0.4621584713459015,
1.1456851959228516,
0.9113523364067078,
-0.8403063416481018,
-0.007954923436045647,
1.4654054641723633,
0.49717220664024353,
-0.6057704091072083,
-0.9970691204071045,
-0.9322783350944519,
0.9453725814819336,
1.5767844915390015,
-0.07055024802684784,
-0.07633432745933533,
0.7159013152122498,
0.7023482322692871,
-1.161552906036377,
0.15889564156532288,
-0.5681635737419128,
-0.7004780769348145,
1.630713939666748,
2.0422074794769287,
-0.19017145037651062,
-0.06376352906227112,
-0.7494705319404602,
-1.3016865253448486,
0.7677284479141235,
-0.1436961144208908,
0.014877179637551308,
0.5492249131202698,
-0.5706297159194946,
0.977260410785675,
0.6360872983932495,
0.908020555973053,
0.06226002052426338,
0.281788170337677,
0.44643333554267883,
-0.3916984498500824,
-1.1745285987854004,
-0.33801478147506714,
-1.154611349105835,
-2.658339262008667,
0.3880119025707245,
-0.23700055480003357,
-1.4862537384033203,
0.01468132995069027,
-1.0090603828430176,
0.9358164668083191,
-0.6376942992210388,
-1.176125168800354,
-1.4712334871292114,
0.360334575176239,
-0.058599989861249924,
0.9662954807281494,
-1.6515558958053589,
-0.1993090957403183,
1.1927695274353027,
0.7741493582725525,
-0.668089747428894,
1.0016119480133057,
0.24964243173599243,
1.0362894535064697,
0.6340256333351135,
-0.4061689078807831,
0.6797285676002502,
0.06717504560947418,
-1.4208848476409912,
0.44545984268188477,
1.308998942375183,
0.14614665508270264,
1.3993756771087646,
-0.3841182589530945,
0.06869162619113922,
0.4404835104942322,
-0.6734300851821899,
-0.5397960543632507,
-0.28169190883636475,
0.6443631052970886,
0.007714562118053436,
-0.9254955053329468,
-0.11194711923599243,
-0.16906090080738068,
-0.41222140192985535,
0.1581481546163559,
-1.5041241645812988,
-0.29095155000686646,
-0.5302702784538269,
-0.364000529050827,
-1.4141911268234253,
-0.05780620872974396,
1.4289921522140503,
-0.589825451374054,
-0.3012985289096832,
0.5323160290718079,
0.4092912971973419,
0.530846118927002,
0.6732056736946106,
-0.7329305410385132,
-0.20324386656284332,
-0.34253111481666565,
-0.31672602891921997,
0.2989298701286316,
1.3095061779022217,
-0.05683958902955055,
-0.8636912703514099,
0.6179337501525879,
-0.3324441909790039,
0.14743833243846893,
1.9672505855560303,
0.09742502868175507,
-0.7733843326568604,
0.38436272740364075,
-0.721926212310791,
1.792765736579895,
1.7133984565734863,
1.1915749311447144,
-0.13933801651000977,
-0.8314000964164734,
0.6366088390350342,
-0.39892008900642395,
-0.3217827379703522,
0.86017906665802,
0.36420518159866333,
-0.28041326999664307,
-1.4190144538879395,
0.7639573812484741,
1.1921576261520386,
-0.737151026725769,
-0.7960771322250366,
0.1322237104177475,
-0.8050863146781921,
1.176648736000061,
0.4999254047870636,
0.38745731115341187,
0.3044775724411011,
1.6223217248916626,
0.7692764401435852,
-0.4872853755950928,
0.6458431482315063,
0.5187392234802246,
-0.28878292441368103,
-2.079724073410034,
-1.1608163118362427,
0.27273792028427124,
-0.5748294591903687,
-1.5655362606048584,
1.4023513793945312,
-1.114630937576294,
-1.096436619758606,
0.5460475087165833,
0.09677718579769135,
1.2447233200073242,
0.41991814970970154,
1.5688084363937378,
2.103789806365967,
0.8155777454376221,
0.5390207171440125,
1.2862434387207031,
-0.159376859664917,
-0.4521823227405548,
1.8795382976531982,
-0.38428014516830444,
0.5016838312149048,
1.1581175327301025,
-0.41211098432540894,
-1.102716088294983,
-0.7747728228569031,
-1.1682194471359253,
-0.6744353771209717,
1.1431742906570435,
0.07622934877872467,
-1.0421686172485352,
0.2716732621192932,
1.622120976448059,
0.08820609748363495,
-0.22200343012809753,
0.703283429145813,
0.32436659932136536,
-0.6908904314041138,
-0.11156781017780304,
-0.9416797757148743,
0.5537037253379822,
-0.28144145011901855,
-0.33987075090408325,
0.3591698706150055,
0.5387685894966125,
1.3376744985580444,
-0.11031661927700043,
0.18474337458610535,
0.9970057010650635,
-1.4650135040283203,
1.3844997882843018,
-0.5853704810142517,
0.30197423696517944,
-2.352820873260498,
1.2946250438690186,
-0.6360293626785278,
2.057718515396118,
-2.602847099304199,
0.38699036836624146,
-0.5870209336280823,
-0.5872631072998047,
0.3384493887424469,
-0.31612303853034973,
0.1045784205198288,
-0.14774683117866516,
-1.0302841663360596,
0.061932485550642014,
-0.6207203269004822,
0.6071435809135437,
1.1418060064315796,
1.4230051040649414,
-1.1044481992721558,
-0.2512376010417938,
-1.6623164415359497,
-0.18058790266513824,
-0.8065140247344971,
0.278721421957016,
-1.967067837715149,
-0.17367319762706757,
-1.9710816144943237,
-2.3137624263763428,
-1.2983721494674683,
-0.8526908159255981,
1.1133217811584473,
0.21200932562351227,
-0.9097946286201477,
1.317286729812622,
-0.31240472197532654,
-1.8182117938995361,
1.0673296451568604,
-2.159895181655884
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | I am afraid int32 is not the reason for this error.
I have submitted a commit to use int64 for all ints in the dataset:
https://huggingface.co/datasets/liwu/MNBVC/commit/857ac00d9eab96a6708ad6a82bd9001686042a9e
and I have updated my env to the latest datasets release:
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.13.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.11.2
- Huggingface_hub version: 0.13.4
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
But the error still exist
```
Downloading and preparing dataset mnbvc/news_peoples_daily to /Users/silver/.cache/huggingface/datasets/liwu___mnbvc/news_peoples_daily/0.0.1/ee380f6309fe9b8b0d1fb14d77118f132444f22c8c4b28bf5c1645312688e051...
Downloading data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 9070.40it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 2697.16it/s]
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1647, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1646 example = self.info.features.encode_example(record) if self.info.features is not None else record
-> 1647 writer.write(example, key)
1648 num_examples_progress_update += 1
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:490, in ArrowWriter.write(self, example, key, writer_batch_size)
488 self.hkey_record = []
--> 490 self.write_examples_on_file()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1656, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1655 num_shards = shard_id + 1
-> 1656 num_examples, num_bytes = writer.finalize()
1657 writer.close()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:584, in ArrowWriter.finalize(self, close_stream)
583 self.hkey_record = []
--> 584 self.write_examples_on_file()
585 # If schema is known, infer features even if no examples were written
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
Cell In[2], line 1
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
File ~/git/venv/lib/python3.11/site-packages/datasets/load.py:1809, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1806 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
1808 # Download and prepare data
-> 1809 builder_instance.download_and_prepare(
1810 download_config=download_config,
1811 download_mode=download_mode,
1812 verification_mode=verification_mode,
1813 try_from_hf_gcs=try_from_hf_gcs,
1814 num_proc=num_proc,
1815 storage_options=storage_options,
1816 )
1818 # Build dataset for splits
1819 keep_in_memory = (
1820 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1821 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:909, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
907 if num_proc is not None:
908 prepare_split_kwargs["num_proc"] = num_proc
--> 909 self._download_and_prepare(
910 dl_manager=dl_manager,
911 verification_mode=verification_mode,
912 **prepare_split_kwargs,
913 **download_and_prepare_kwargs,
914 )
915 # Sync info
916 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1670, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs)
1669 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs):
-> 1670 super()._download_and_prepare(
1671 dl_manager,
1672 verification_mode,
1673 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS
1674 or verification_mode == VerificationMode.ALL_CHECKS,
1675 **prepare_splits_kwargs,
1676 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1004, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1000 split_dict.add(split_generator.split_info)
1002 try:
1003 # Prepare split will record examples associated to the split
-> 1004 self._prepare_split(split_generator, **prepare_split_kwargs)
1005 except OSError as e:
1006 raise OSError(
1007 "Cannot find data file. "
1008 + (self.manual_download_instructions or "")
1009 + "\nOriginal error:\n"
1010 + str(e)
1011 ) from None
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1508, in GeneratorBasedBuilder._prepare_split(self, split_generator, check_duplicate_keys, file_format, num_proc, max_shard_size)
1506 job_id = 0
1507 with pbar:
-> 1508 for job_id, done, content in self._prepare_split_single(
1509 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
1510 ):
1511 if done:
1512 result = content
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1665, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1663 if isinstance(e, SchemaInferenceError) and e.__context__ is not None:
1664 e = e.__context__
-> 1665 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1667 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
Besides, it works fine when I am using streamed dataset. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 74 | 763 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
I am afraid int32 is not the reason for this error.
I have submitted a commit to use int64 for all ints in the dataset:
https://huggingface.co/datasets/liwu/MNBVC/commit/857ac00d9eab96a6708ad6a82bd9001686042a9e
and I have updated my env to the latest datasets release:
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.13.1
- Platform: macOS-13.2.1-arm64-arm-64bit
- Python version: 3.11.2
- Huggingface_hub version: 0.13.4
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
But the error still exist
```
Downloading and preparing dataset mnbvc/news_peoples_daily to /Users/silver/.cache/huggingface/datasets/liwu___mnbvc/news_peoples_daily/0.0.1/ee380f6309fe9b8b0d1fb14d77118f132444f22c8c4b28bf5c1645312688e051...
Downloading data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 9070.40it/s]
Extracting data files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 2697.16it/s]
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1647, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1646 example = self.info.features.encode_example(record) if self.info.features is not None else record
-> 1647 writer.write(example, key)
1648 num_examples_progress_update += 1
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:490, in ArrowWriter.write(self, example, key, writer_batch_size)
488 self.hkey_record = []
--> 490 self.write_examples_on_file()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1656, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1655 num_shards = shard_id + 1
-> 1656 num_examples, num_bytes = writer.finalize()
1657 writer.close()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:584, in ArrowWriter.finalize(self, close_stream)
583 self.hkey_record = []
--> 584 self.write_examples_on_file()
585 # If schema is known, infer features even if no examples were written
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:448, in ArrowWriter.write_examples_on_file(self)
444 batch_examples[col] = [
445 row[0][col].to_pylist()[0] if isinstance(row[0][col], (pa.Array, pa.ChunkedArray)) else row[0][col]
446 for row in self.current_examples
447 ]
--> 448 self.write_batch(batch_examples=batch_examples)
449 self.current_examples = []
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:553, in ArrowWriter.write_batch(self, batch_examples, writer_batch_size)
552 typed_sequence = OptimizedTypedSequence(col_values, type=col_type, try_type=col_try_type, col=col)
--> 553 arrays.append(pa.array(typed_sequence))
554 inferred_features[col] = typed_sequence.get_inferred_type()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:236, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:110, in pyarrow.lib._handle_arrow_array_protocol()
File ~/git/venv/lib/python3.11/site-packages/datasets/arrow_writer.py:189, in TypedSequence.__arrow_array__(self, type)
188 trying_cast_to_python_objects = True
--> 189 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
190 # use smaller integer precisions if possible
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:320, in pyarrow.lib.array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/array.pxi:39, in pyarrow.lib._sequence_to_array()
File ~/git/venv/lib/python3.11/site-packages/pyarrow/error.pxi:144, in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
The above exception was the direct cause of the following exception:
DatasetGenerationError Traceback (most recent call last)
Cell In[2], line 1
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
File ~/git/venv/lib/python3.11/site-packages/datasets/load.py:1809, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1806 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
1808 # Download and prepare data
-> 1809 builder_instance.download_and_prepare(
1810 download_config=download_config,
1811 download_mode=download_mode,
1812 verification_mode=verification_mode,
1813 try_from_hf_gcs=try_from_hf_gcs,
1814 num_proc=num_proc,
1815 storage_options=storage_options,
1816 )
1818 # Build dataset for splits
1819 keep_in_memory = (
1820 keep_in_memory if keep_in_memory is not None else is_small_dataset(builder_instance.info.dataset_size)
1821 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:909, in DatasetBuilder.download_and_prepare(self, output_dir, download_config, download_mode, verification_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, num_proc, storage_options, **download_and_prepare_kwargs)
907 if num_proc is not None:
908 prepare_split_kwargs["num_proc"] = num_proc
--> 909 self._download_and_prepare(
910 dl_manager=dl_manager,
911 verification_mode=verification_mode,
912 **prepare_split_kwargs,
913 **download_and_prepare_kwargs,
914 )
915 # Sync info
916 self.info.dataset_size = sum(split.num_bytes for split in self.info.splits.values())
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1670, in GeneratorBasedBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs)
1669 def _download_and_prepare(self, dl_manager, verification_mode, **prepare_splits_kwargs):
-> 1670 super()._download_and_prepare(
1671 dl_manager,
1672 verification_mode,
1673 check_duplicate_keys=verification_mode == VerificationMode.BASIC_CHECKS
1674 or verification_mode == VerificationMode.ALL_CHECKS,
1675 **prepare_splits_kwargs,
1676 )
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1004, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
1000 split_dict.add(split_generator.split_info)
1002 try:
1003 # Prepare split will record examples associated to the split
-> 1004 self._prepare_split(split_generator, **prepare_split_kwargs)
1005 except OSError as e:
1006 raise OSError(
1007 "Cannot find data file. "
1008 + (self.manual_download_instructions or "")
1009 + "\nOriginal error:\n"
1010 + str(e)
1011 ) from None
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1508, in GeneratorBasedBuilder._prepare_split(self, split_generator, check_duplicate_keys, file_format, num_proc, max_shard_size)
1506 job_id = 0
1507 with pbar:
-> 1508 for job_id, done, content in self._prepare_split_single(
1509 gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
1510 ):
1511 if done:
1512 result = content
File ~/git/venv/lib/python3.11/site-packages/datasets/builder.py:1665, in GeneratorBasedBuilder._prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, split_info, check_duplicate_keys, job_id)
1663 if isinstance(e, SchemaInferenceError) and e.__context__ is not None:
1664 e = e.__context__
-> 1665 raise DatasetGenerationError("An error occurred while generating the dataset") from e
1667 yield job_id, True, (total_num_examples, total_num_bytes, writer._features, num_shards, shard_lengths)
DatasetGenerationError: An error occurred while generating the dataset
```
Besides, it works fine when I am using streamed dataset. | [
-1.1762616634368896,
-0.9247037172317505,
-0.6230241060256958,
1.4585685729980469,
-0.14434967935085297,
-1.2286900281906128,
0.1393262892961502,
-1.0940488576889038,
1.5033583641052246,
-0.7691389322280884,
0.19321289658546448,
-1.62937331199646,
-0.03561179339885712,
-0.6604982018470764,
-0.6882392168045044,
-0.8129012584686279,
-0.361989825963974,
-0.8227675557136536,
1.0431866645812988,
2.3925468921661377,
1.2505486011505127,
-1.408920168876648,
2.7824151515960693,
0.6825370788574219,
-0.20309175550937653,
-1.054370403289795,
0.521984875202179,
-0.03009789250791073,
-1.2089860439300537,
-0.4994511306285858,
-0.9603615999221802,
-0.04494495689868927,
-0.6983826756477356,
-0.2958213984966278,
-0.06136200577020645,
0.49751541018486023,
-0.2868650555610657,
-0.26016104221343994,
-0.6542292833328247,
-0.8028631806373596,
0.4872623682022095,
-0.30537691712379456,
0.9940378665924072,
-0.2985031008720398,
1.7195252180099487,
-0.5278900265693665,
0.5129393339157104,
0.7728586792945862,
1.2549495697021484,
0.1455172747373581,
-0.005483354441821575,
0.17838171124458313,
0.3448973000049591,
-0.022550689056515694,
0.5746480822563171,
1.1444342136383057,
0.6330298185348511,
0.598852813243866,
0.599375307559967,
-2.243001699447632,
1.3773010969161987,
-0.9879947304725647,
0.32696884870529175,
1.4226408004760742,
-0.8353627920150757,
0.38619914650917053,
-1.785841941833496,
-0.07360874116420746,
0.6276602745056152,
-2.237729549407959,
0.338153213262558,
-1.3090678453445435,
-0.5454554557800293,
0.9418737888336182,
0.43150123953819275,
-1.2069313526153564,
0.15500889718532562,
-0.47202345728874207,
1.104017734527588,
0.48756131529808044,
0.9366675615310669,
-1.7019485235214233,
-0.04209116846323013,
-0.16377580165863037,
0.1461993008852005,
-1.286113977432251,
-1.644670009613037,
0.6083168983459473,
0.5259932279586792,
0.6636841893196106,
-0.10380077362060547,
1.086626410484314,
-1.1188957691192627,
0.8417633175849915,
-1.0548826456069946,
-1.5459098815917969,
-1.3458787202835083,
-2.466904878616333,
-2.311518669128418,
0.6955347061157227,
-0.5233387351036072,
-0.44690626859664917,
2.088641881942749,
-0.966562032699585,
-1.6703218221664429,
1.1264820098876953,
0.30232757329940796,
0.04682980105280876,
2.3873140811920166,
0.24626603722572327,
-0.6891911029815674,
0.45248350501060486,
-0.8272844552993774,
0.8597055077552795,
-0.346079021692276,
1.3451508283615112,
0.50091153383255,
-1.0315046310424805,
1.5519105195999146,
-0.4789595603942871,
0.5700971484184265,
-0.60723876953125,
-0.5410104990005493,
-0.7463903427124023,
0.23539161682128906,
1.8108872175216675,
-0.24211794137954712,
1.5046766996383667,
-0.33385032415390015,
-1.523521900177002,
-1.5460160970687866,
0.952671229839325,
0.3560183048248291,
-0.9489750862121582,
0.0910845398902893,
-0.4977193772792816,
0.14318189024925232,
-0.13936716318130493,
1.1906111240386963,
1.2886799573898315,
0.6971879601478577,
-0.4024360477924347,
-0.7789167165756226,
0.10234799981117249,
-0.15253566205501556,
-0.7396536469459534,
-1.8579232692718506,
-0.24570123851299286,
0.12445428967475891,
0.6728820204734802,
-1.1261537075042725,
1.855181097984314,
0.934597909450531,
1.9521780014038086,
0.9943413734436035,
-0.48492303490638733,
1.3914802074432373,
0.04059218615293503,
1.8002259731292725,
-0.6067976951599121,
0.558914303779602,
-0.36773809790611267,
-1.1631113290786743,
0.9709139466285706,
-0.2738177478313446,
-2.009168863296509,
-0.745482861995697,
-0.7535560727119446,
-0.2692214846611023,
-0.7670236229896545,
0.9141814708709717,
-0.2732831537723541,
-1.4543362855911255,
0.12517136335372925,
-0.6119828820228577,
0.29110288619995117,
-1.1510542631149292,
0.285444974899292,
0.725890576839447,
-0.6120870113372803,
-0.07735779881477356,
-0.2089637815952301,
-1.330212950706482,
-0.5215833783149719,
0.48665526509284973,
1.8116934299468994,
-0.5667157173156738,
0.8790807723999023,
1.0090869665145874,
-0.6268512606620789,
0.0389397032558918,
0.1975218504667282,
-0.26886725425720215,
0.7261554002761841,
-1.0447674989700317,
-0.5574946999549866,
1.2064483165740967,
-0.38471826910972595,
-0.6486994028091431,
1.4577922821044922,
0.7289041876792908,
-1.118531346321106,
-0.24567911028862,
-0.2293718308210373,
-0.8800218105316162,
0.032976169139146805,
-1.4954297542572021,
-0.09434919059276581,
0.550826370716095,
-1.5789076089859009,
-0.31963446736335754,
-0.09841881692409515,
1.4366116523742676,
-0.19776298105716705,
1.472253441810608,
-0.37545710802078247,
-0.10168279707431793,
-0.2564363479614258,
-0.5066017508506775,
0.23084822297096252,
-0.14738857746124268,
-0.418671578168869,
0.08640749752521515,
-0.8375027179718018,
0.3157399892807007,
1.5394152402877808,
0.21569539606571198,
0.03482953459024429,
0.4134470224380493,
1.0643731355667114,
0.4102255702018738,
-0.007208403665572405,
-0.8875563144683838,
-1.50822913646698,
1.9638539552688599,
-1.4832971096038818,
1.9787298440933228,
0.7874236106872559,
-0.053156331181526184,
-1.7951339483261108,
-1.7672888040542603,
1.2673828601837158,
1.0972920656204224,
2.229739189147949,
0.47134125232696533,
0.3349563777446747,
-0.8238469958305359,
-0.694787859916687,
0.36256444454193115,
-0.9606155157089233,
-0.6255032420158386,
0.13999278843402863,
2.375483274459839,
1.834527611732483,
-0.45767688751220703,
-0.2720031440258026,
-0.8556336164474487,
1.4308830499649048,
-0.3380816578865051,
0.29439878463745117,
2.116771697998047,
-0.3589145243167877,
-1.0198100805282593,
1.3610142469406128,
-2.484593629837036,
0.36596888303756714,
2.1096596717834473,
0.340414434671402,
0.20163217186927795,
-1.3267980813980103,
-0.5849202871322632,
-0.37331536412239075,
-0.4684607684612274,
-1.2272006273269653,
0.5623845458030701,
-0.2827763855457306,
-0.7399104237556458,
-1.3986870050430298,
0.1945914775133133,
-1.1507538557052612,
-1.7531605958938599,
0.34805533289909363,
1.8999054431915283,
2.155256509780884,
-0.7588023543357849,
1.4698991775512695,
-0.38263317942619324,
0.09901097416877747,
1.2179597616195679,
1.374553918838501,
3.077659845352173,
1.810241937637329,
-1.337890386581421,
0.6596903204917908,
-0.17866995930671692,
-0.5034840106964111,
1.1124389171600342,
-1.0623687505722046,
1.2398581504821777,
-0.17071270942687988,
-1.2034655809402466,
-1.2868224382400513,
1.0398658514022827,
0.4674055874347687,
0.11945199966430664,
-0.5598062872886658,
1.2255289554595947,
0.13693910837173462,
1.3448519706726074,
0.6972441077232361,
-0.4765629768371582,
0.4724639058113098,
-0.348842591047287,
-0.6476726531982422,
1.570311427116394,
0.24667364358901978,
-1.5608203411102295,
-2.2581100463867188,
-0.2937113046646118,
-0.9053738713264465,
0.024227403104305267,
-0.6416811943054199,
-1.0239797830581665,
1.5580999851226807,
0.3897104561328888,
-1.1713966131210327,
-0.3151242136955261,
-0.2941959500312805,
-0.43520644307136536,
2.6904094219207764,
-1.2411267757415771,
-0.09997034072875977,
-0.9038124084472656,
-0.6579437851905823,
1.6498357057571411,
-1.3010914325714111,
-0.2625711262226105,
-1.1074391603469849,
-0.6877467036247253,
-1.2251993417739868,
-0.4133290946483612,
0.1027279645204544,
-0.9914187788963318,
0.7880914807319641,
0.22597111761569977,
-1.1758074760437012,
-0.3859699070453644,
-0.869469404220581,
1.0891849994659424,
-0.1976921409368515,
0.22708185017108917,
1.7629752159118652,
0.2566469609737396,
-0.47827866673469543,
0.8519090414047241,
1.2177010774612427,
0.658666729927063,
-0.6529871821403503,
-0.03931864723563194,
-0.6584813594818115,
0.45352044701576233,
-1.311294674873352,
0.2528330087661743,
-3.0593957901000977,
0.6207709908485413,
-0.10594996809959412,
-0.14613206684589386,
-0.1264810711145401,
-1.4249935150146484,
1.0488730669021606,
2.5046608448028564,
-1.256823182106018,
0.557610809803009,
0.47937580943107605,
1.112303614616394,
-1.6468981504440308,
0.27189692854881287,
-0.5080119371414185,
2.0675039291381836,
0.1439409703016281,
1.219714879989624,
-0.509819746017456,
-2.33502459526062,
0.6333411931991577,
-1.2520041465759277,
-1.0749415159225464,
0.7903345227241516,
-0.9026759266853333,
0.266679048538208,
-1.4419418573379517,
-0.18356449902057648,
-0.9756885766983032,
-1.26425039768219,
0.682779848575592,
0.14052636921405792,
0.3753029704093933,
-0.5856676697731018,
0.29137784242630005,
-2.1812310218811035,
-1.3824001550674438,
-0.12387068569660187,
-0.9447868466377258,
0.5564262270927429,
-0.521522581577301,
0.5821380615234375,
-0.0507662296295166,
0.06434029340744019,
0.32992276549339294,
1.6008200645446777,
3.381647825241089,
0.11128176748752594,
0.24053910374641418,
-0.21919837594032288,
-0.9459978342056274,
1.4442030191421509,
0.8860669136047363,
-0.054259538650512695,
-0.5533403158187866,
-0.95628422498703,
1.331786036491394,
2.009953498840332,
1.0018335580825806,
-0.00041266903281211853,
-0.840866208076477,
-0.6618966460227966,
-0.0342835858464241,
0.17438559234142303,
0.5765284895896912,
0.9152258038520813,
-0.04538838565349579,
0.01683579571545124,
1.3268201351165771,
1.1365312337875366,
-0.2748872935771942,
0.32656699419021606,
-0.9081598520278931,
-0.4110753536224365,
0.47190749645233154,
0.15363086760044098,
-0.019246606156229973,
0.5131422877311707,
-0.9745264053344727,
-0.21659646928310394,
-0.37573179602622986,
-0.7891838550567627,
-0.7009273767471313,
-0.41273149847984314,
-0.4948112666606903,
1.5993707180023193,
0.16738280653953552,
-0.5451816320419312,
0.12837930023670197,
-0.6797749996185303,
-0.21292631328105927,
-1.1282111406326294,
0.1143844872713089,
-0.0436401329934597,
-0.08609122037887573,
-0.2606874704360962,
1.6539226770401,
-0.9391069412231445,
-2.0718326568603516,
0.10969837009906769,
0.2958947420120239,
-0.23996345698833466,
0.16807478666305542,
1.7960474491119385,
0.4160701632499695,
1.3721204996109009,
1.3150990009307861,
0.9894079566001892,
-0.6445782780647278,
-1.2310564517974854,
0.8038755655288696,
1.0288286209106445,
-1.3874746561050415,
0.9144200086593628,
-0.15717990696430206,
-0.566368579864502,
0.8064784407615662,
1.2903642654418945,
0.44387632608413696,
-2.0211853981018066,
0.8644307255744934,
-1.1255707740783691,
0.9001458883285522,
0.7317468523979187,
0.6984953880310059,
0.28840622305870056,
0.8990054130554199,
-1.1707189083099365,
-1.100110650062561,
-0.6541128158569336,
-0.7138304114341736,
2.000624895095825,
-0.41026878356933594,
0.5623698830604553,
-0.15444160997867584,
-1.177638053894043,
-0.11211837828159332,
0.8766857981681824,
0.4166323244571686,
-0.44733235239982605,
0.799619734287262,
-0.6837254166603088,
-0.9884839653968811,
-1.214392066001892,
-0.37345167994499207,
-1.0620453357696533,
-0.944538950920105,
1.0505266189575195,
0.6895244717597961,
0.4158182144165039,
1.9431451559066772,
0.6253733038902283,
0.3246203362941742,
-2.527881383895874,
0.8415045142173767,
0.26492980122566223,
-0.11494213342666626,
0.8261486887931824,
0.3537510931491852,
1.1679987907409668,
0.08232831954956055,
0.623347818851471,
-2.4393272399902344,
2.260240077972412,
-0.20372778177261353,
0.6312507390975952,
0.017662402242422104,
-0.21254783868789673,
1.1736418008804321,
0.6529061794281006,
0.4578113257884979,
-1.104799509048462,
0.7180254459381104,
-0.4621584713459015,
1.1456851959228516,
0.9113523364067078,
-0.8403063416481018,
-0.007954923436045647,
1.4654054641723633,
0.49717220664024353,
-0.6057704091072083,
-0.9970691204071045,
-0.9322783350944519,
0.9453725814819336,
1.5767844915390015,
-0.07055024802684784,
-0.07633432745933533,
0.7159013152122498,
0.7023482322692871,
-1.161552906036377,
0.15889564156532288,
-0.5681635737419128,
-0.7004780769348145,
1.630713939666748,
2.0422074794769287,
-0.19017145037651062,
-0.06376352906227112,
-0.7494705319404602,
-1.3016865253448486,
0.7677284479141235,
-0.1436961144208908,
0.014877179637551308,
0.5492249131202698,
-0.5706297159194946,
0.977260410785675,
0.6360872983932495,
0.908020555973053,
0.06226002052426338,
0.281788170337677,
0.44643333554267883,
-0.3916984498500824,
-1.1745285987854004,
-0.33801478147506714,
-1.154611349105835,
-2.658339262008667,
0.3880119025707245,
-0.23700055480003357,
-1.4862537384033203,
0.01468132995069027,
-1.0090603828430176,
0.9358164668083191,
-0.6376942992210388,
-1.176125168800354,
-1.4712334871292114,
0.360334575176239,
-0.058599989861249924,
0.9662954807281494,
-1.6515558958053589,
-0.1993090957403183,
1.1927695274353027,
0.7741493582725525,
-0.668089747428894,
1.0016119480133057,
0.24964243173599243,
1.0362894535064697,
0.6340256333351135,
-0.4061689078807831,
0.6797285676002502,
0.06717504560947418,
-1.4208848476409912,
0.44545984268188477,
1.308998942375183,
0.14614665508270264,
1.3993756771087646,
-0.3841182589530945,
0.06869162619113922,
0.4404835104942322,
-0.6734300851821899,
-0.5397960543632507,
-0.28169190883636475,
0.6443631052970886,
0.007714562118053436,
-0.9254955053329468,
-0.11194711923599243,
-0.16906090080738068,
-0.41222140192985535,
0.1581481546163559,
-1.5041241645812988,
-0.29095155000686646,
-0.5302702784538269,
-0.364000529050827,
-1.4141911268234253,
-0.05780620872974396,
1.4289921522140503,
-0.589825451374054,
-0.3012985289096832,
0.5323160290718079,
0.4092912971973419,
0.530846118927002,
0.6732056736946106,
-0.7329305410385132,
-0.20324386656284332,
-0.34253111481666565,
-0.31672602891921997,
0.2989298701286316,
1.3095061779022217,
-0.05683958902955055,
-0.8636912703514099,
0.6179337501525879,
-0.3324441909790039,
0.14743833243846893,
1.9672505855560303,
0.09742502868175507,
-0.7733843326568604,
0.38436272740364075,
-0.721926212310791,
1.792765736579895,
1.7133984565734863,
1.1915749311447144,
-0.13933801651000977,
-0.8314000964164734,
0.6366088390350342,
-0.39892008900642395,
-0.3217827379703522,
0.86017906665802,
0.36420518159866333,
-0.28041326999664307,
-1.4190144538879395,
0.7639573812484741,
1.1921576261520386,
-0.737151026725769,
-0.7960771322250366,
0.1322237104177475,
-0.8050863146781921,
1.176648736000061,
0.4999254047870636,
0.38745731115341187,
0.3044775724411011,
1.6223217248916626,
0.7692764401435852,
-0.4872853755950928,
0.6458431482315063,
0.5187392234802246,
-0.28878292441368103,
-2.079724073410034,
-1.1608163118362427,
0.27273792028427124,
-0.5748294591903687,
-1.5655362606048584,
1.4023513793945312,
-1.114630937576294,
-1.096436619758606,
0.5460475087165833,
0.09677718579769135,
1.2447233200073242,
0.41991814970970154,
1.5688084363937378,
2.103789806365967,
0.8155777454376221,
0.5390207171440125,
1.2862434387207031,
-0.159376859664917,
-0.4521823227405548,
1.8795382976531982,
-0.38428014516830444,
0.5016838312149048,
1.1581175327301025,
-0.41211098432540894,
-1.102716088294983,
-0.7747728228569031,
-1.1682194471359253,
-0.6744353771209717,
1.1431742906570435,
0.07622934877872467,
-1.0421686172485352,
0.2716732621192932,
1.622120976448059,
0.08820609748363495,
-0.22200343012809753,
0.703283429145813,
0.32436659932136536,
-0.6908904314041138,
-0.11156781017780304,
-0.9416797757148743,
0.5537037253379822,
-0.28144145011901855,
-0.33987075090408325,
0.3591698706150055,
0.5387685894966125,
1.3376744985580444,
-0.11031661927700043,
0.18474337458610535,
0.9970057010650635,
-1.4650135040283203,
1.3844997882843018,
-0.5853704810142517,
0.30197423696517944,
-2.352820873260498,
1.2946250438690186,
-0.6360293626785278,
2.057718515396118,
-2.602847099304199,
0.38699036836624146,
-0.5870209336280823,
-0.5872631072998047,
0.3384493887424469,
-0.31612303853034973,
0.1045784205198288,
-0.14774683117866516,
-1.0302841663360596,
0.061932485550642014,
-0.6207203269004822,
0.6071435809135437,
1.1418060064315796,
1.4230051040649414,
-1.1044481992721558,
-0.2512376010417938,
-1.6623164415359497,
-0.18058790266513824,
-0.8065140247344971,
0.278721421957016,
-1.967067837715149,
-0.17367319762706757,
-1.9710816144943237,
-2.3137624263763428,
-1.2983721494674683,
-0.8526908159255981,
1.1133217811584473,
0.21200932562351227,
-0.9097946286201477,
1.317286729812622,
-0.31240472197532654,
-1.8182117938995361,
1.0673296451568604,
-2.159895181655884
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | `simhash` is the problematic column - it has values such as `18329103420363166823` that are out of the int64 range. You can fix this by setting the feature type to `Value("string")` (it's advised to use this type for hash values in general)
> Besides, it works fine when I am using streamed dataset.
Streaming yields Python dictionaries from the script without converting them to the Arrow representation, as this conversion step is not that cheap performance-wise. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 74 | 75 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
`simhash` is the problematic column - it has values such as `18329103420363166823` that are out of the int64 range. You can fix this by setting the feature type to `Value("string")` (it's advised to use this type for hash values in general)
> Besides, it works fine when I am using streamed dataset.
Streaming yields Python dictionaries from the script without converting them to the Arrow representation, as this conversion step is not that cheap performance-wise. | [
-1.1762616634368896,
-0.9247037172317505,
-0.6230241060256958,
1.4585685729980469,
-0.14434967935085297,
-1.2286900281906128,
0.1393262892961502,
-1.0940488576889038,
1.5033583641052246,
-0.7691389322280884,
0.19321289658546448,
-1.62937331199646,
-0.03561179339885712,
-0.6604982018470764,
-0.6882392168045044,
-0.8129012584686279,
-0.361989825963974,
-0.8227675557136536,
1.0431866645812988,
2.3925468921661377,
1.2505486011505127,
-1.408920168876648,
2.7824151515960693,
0.6825370788574219,
-0.20309175550937653,
-1.054370403289795,
0.521984875202179,
-0.03009789250791073,
-1.2089860439300537,
-0.4994511306285858,
-0.9603615999221802,
-0.04494495689868927,
-0.6983826756477356,
-0.2958213984966278,
-0.06136200577020645,
0.49751541018486023,
-0.2868650555610657,
-0.26016104221343994,
-0.6542292833328247,
-0.8028631806373596,
0.4872623682022095,
-0.30537691712379456,
0.9940378665924072,
-0.2985031008720398,
1.7195252180099487,
-0.5278900265693665,
0.5129393339157104,
0.7728586792945862,
1.2549495697021484,
0.1455172747373581,
-0.005483354441821575,
0.17838171124458313,
0.3448973000049591,
-0.022550689056515694,
0.5746480822563171,
1.1444342136383057,
0.6330298185348511,
0.598852813243866,
0.599375307559967,
-2.243001699447632,
1.3773010969161987,
-0.9879947304725647,
0.32696884870529175,
1.4226408004760742,
-0.8353627920150757,
0.38619914650917053,
-1.785841941833496,
-0.07360874116420746,
0.6276602745056152,
-2.237729549407959,
0.338153213262558,
-1.3090678453445435,
-0.5454554557800293,
0.9418737888336182,
0.43150123953819275,
-1.2069313526153564,
0.15500889718532562,
-0.47202345728874207,
1.104017734527588,
0.48756131529808044,
0.9366675615310669,
-1.7019485235214233,
-0.04209116846323013,
-0.16377580165863037,
0.1461993008852005,
-1.286113977432251,
-1.644670009613037,
0.6083168983459473,
0.5259932279586792,
0.6636841893196106,
-0.10380077362060547,
1.086626410484314,
-1.1188957691192627,
0.8417633175849915,
-1.0548826456069946,
-1.5459098815917969,
-1.3458787202835083,
-2.466904878616333,
-2.311518669128418,
0.6955347061157227,
-0.5233387351036072,
-0.44690626859664917,
2.088641881942749,
-0.966562032699585,
-1.6703218221664429,
1.1264820098876953,
0.30232757329940796,
0.04682980105280876,
2.3873140811920166,
0.24626603722572327,
-0.6891911029815674,
0.45248350501060486,
-0.8272844552993774,
0.8597055077552795,
-0.346079021692276,
1.3451508283615112,
0.50091153383255,
-1.0315046310424805,
1.5519105195999146,
-0.4789595603942871,
0.5700971484184265,
-0.60723876953125,
-0.5410104990005493,
-0.7463903427124023,
0.23539161682128906,
1.8108872175216675,
-0.24211794137954712,
1.5046766996383667,
-0.33385032415390015,
-1.523521900177002,
-1.5460160970687866,
0.952671229839325,
0.3560183048248291,
-0.9489750862121582,
0.0910845398902893,
-0.4977193772792816,
0.14318189024925232,
-0.13936716318130493,
1.1906111240386963,
1.2886799573898315,
0.6971879601478577,
-0.4024360477924347,
-0.7789167165756226,
0.10234799981117249,
-0.15253566205501556,
-0.7396536469459534,
-1.8579232692718506,
-0.24570123851299286,
0.12445428967475891,
0.6728820204734802,
-1.1261537075042725,
1.855181097984314,
0.934597909450531,
1.9521780014038086,
0.9943413734436035,
-0.48492303490638733,
1.3914802074432373,
0.04059218615293503,
1.8002259731292725,
-0.6067976951599121,
0.558914303779602,
-0.36773809790611267,
-1.1631113290786743,
0.9709139466285706,
-0.2738177478313446,
-2.009168863296509,
-0.745482861995697,
-0.7535560727119446,
-0.2692214846611023,
-0.7670236229896545,
0.9141814708709717,
-0.2732831537723541,
-1.4543362855911255,
0.12517136335372925,
-0.6119828820228577,
0.29110288619995117,
-1.1510542631149292,
0.285444974899292,
0.725890576839447,
-0.6120870113372803,
-0.07735779881477356,
-0.2089637815952301,
-1.330212950706482,
-0.5215833783149719,
0.48665526509284973,
1.8116934299468994,
-0.5667157173156738,
0.8790807723999023,
1.0090869665145874,
-0.6268512606620789,
0.0389397032558918,
0.1975218504667282,
-0.26886725425720215,
0.7261554002761841,
-1.0447674989700317,
-0.5574946999549866,
1.2064483165740967,
-0.38471826910972595,
-0.6486994028091431,
1.4577922821044922,
0.7289041876792908,
-1.118531346321106,
-0.24567911028862,
-0.2293718308210373,
-0.8800218105316162,
0.032976169139146805,
-1.4954297542572021,
-0.09434919059276581,
0.550826370716095,
-1.5789076089859009,
-0.31963446736335754,
-0.09841881692409515,
1.4366116523742676,
-0.19776298105716705,
1.472253441810608,
-0.37545710802078247,
-0.10168279707431793,
-0.2564363479614258,
-0.5066017508506775,
0.23084822297096252,
-0.14738857746124268,
-0.418671578168869,
0.08640749752521515,
-0.8375027179718018,
0.3157399892807007,
1.5394152402877808,
0.21569539606571198,
0.03482953459024429,
0.4134470224380493,
1.0643731355667114,
0.4102255702018738,
-0.007208403665572405,
-0.8875563144683838,
-1.50822913646698,
1.9638539552688599,
-1.4832971096038818,
1.9787298440933228,
0.7874236106872559,
-0.053156331181526184,
-1.7951339483261108,
-1.7672888040542603,
1.2673828601837158,
1.0972920656204224,
2.229739189147949,
0.47134125232696533,
0.3349563777446747,
-0.8238469958305359,
-0.694787859916687,
0.36256444454193115,
-0.9606155157089233,
-0.6255032420158386,
0.13999278843402863,
2.375483274459839,
1.834527611732483,
-0.45767688751220703,
-0.2720031440258026,
-0.8556336164474487,
1.4308830499649048,
-0.3380816578865051,
0.29439878463745117,
2.116771697998047,
-0.3589145243167877,
-1.0198100805282593,
1.3610142469406128,
-2.484593629837036,
0.36596888303756714,
2.1096596717834473,
0.340414434671402,
0.20163217186927795,
-1.3267980813980103,
-0.5849202871322632,
-0.37331536412239075,
-0.4684607684612274,
-1.2272006273269653,
0.5623845458030701,
-0.2827763855457306,
-0.7399104237556458,
-1.3986870050430298,
0.1945914775133133,
-1.1507538557052612,
-1.7531605958938599,
0.34805533289909363,
1.8999054431915283,
2.155256509780884,
-0.7588023543357849,
1.4698991775512695,
-0.38263317942619324,
0.09901097416877747,
1.2179597616195679,
1.374553918838501,
3.077659845352173,
1.810241937637329,
-1.337890386581421,
0.6596903204917908,
-0.17866995930671692,
-0.5034840106964111,
1.1124389171600342,
-1.0623687505722046,
1.2398581504821777,
-0.17071270942687988,
-1.2034655809402466,
-1.2868224382400513,
1.0398658514022827,
0.4674055874347687,
0.11945199966430664,
-0.5598062872886658,
1.2255289554595947,
0.13693910837173462,
1.3448519706726074,
0.6972441077232361,
-0.4765629768371582,
0.4724639058113098,
-0.348842591047287,
-0.6476726531982422,
1.570311427116394,
0.24667364358901978,
-1.5608203411102295,
-2.2581100463867188,
-0.2937113046646118,
-0.9053738713264465,
0.024227403104305267,
-0.6416811943054199,
-1.0239797830581665,
1.5580999851226807,
0.3897104561328888,
-1.1713966131210327,
-0.3151242136955261,
-0.2941959500312805,
-0.43520644307136536,
2.6904094219207764,
-1.2411267757415771,
-0.09997034072875977,
-0.9038124084472656,
-0.6579437851905823,
1.6498357057571411,
-1.3010914325714111,
-0.2625711262226105,
-1.1074391603469849,
-0.6877467036247253,
-1.2251993417739868,
-0.4133290946483612,
0.1027279645204544,
-0.9914187788963318,
0.7880914807319641,
0.22597111761569977,
-1.1758074760437012,
-0.3859699070453644,
-0.869469404220581,
1.0891849994659424,
-0.1976921409368515,
0.22708185017108917,
1.7629752159118652,
0.2566469609737396,
-0.47827866673469543,
0.8519090414047241,
1.2177010774612427,
0.658666729927063,
-0.6529871821403503,
-0.03931864723563194,
-0.6584813594818115,
0.45352044701576233,
-1.311294674873352,
0.2528330087661743,
-3.0593957901000977,
0.6207709908485413,
-0.10594996809959412,
-0.14613206684589386,
-0.1264810711145401,
-1.4249935150146484,
1.0488730669021606,
2.5046608448028564,
-1.256823182106018,
0.557610809803009,
0.47937580943107605,
1.112303614616394,
-1.6468981504440308,
0.27189692854881287,
-0.5080119371414185,
2.0675039291381836,
0.1439409703016281,
1.219714879989624,
-0.509819746017456,
-2.33502459526062,
0.6333411931991577,
-1.2520041465759277,
-1.0749415159225464,
0.7903345227241516,
-0.9026759266853333,
0.266679048538208,
-1.4419418573379517,
-0.18356449902057648,
-0.9756885766983032,
-1.26425039768219,
0.682779848575592,
0.14052636921405792,
0.3753029704093933,
-0.5856676697731018,
0.29137784242630005,
-2.1812310218811035,
-1.3824001550674438,
-0.12387068569660187,
-0.9447868466377258,
0.5564262270927429,
-0.521522581577301,
0.5821380615234375,
-0.0507662296295166,
0.06434029340744019,
0.32992276549339294,
1.6008200645446777,
3.381647825241089,
0.11128176748752594,
0.24053910374641418,
-0.21919837594032288,
-0.9459978342056274,
1.4442030191421509,
0.8860669136047363,
-0.054259538650512695,
-0.5533403158187866,
-0.95628422498703,
1.331786036491394,
2.009953498840332,
1.0018335580825806,
-0.00041266903281211853,
-0.840866208076477,
-0.6618966460227966,
-0.0342835858464241,
0.17438559234142303,
0.5765284895896912,
0.9152258038520813,
-0.04538838565349579,
0.01683579571545124,
1.3268201351165771,
1.1365312337875366,
-0.2748872935771942,
0.32656699419021606,
-0.9081598520278931,
-0.4110753536224365,
0.47190749645233154,
0.15363086760044098,
-0.019246606156229973,
0.5131422877311707,
-0.9745264053344727,
-0.21659646928310394,
-0.37573179602622986,
-0.7891838550567627,
-0.7009273767471313,
-0.41273149847984314,
-0.4948112666606903,
1.5993707180023193,
0.16738280653953552,
-0.5451816320419312,
0.12837930023670197,
-0.6797749996185303,
-0.21292631328105927,
-1.1282111406326294,
0.1143844872713089,
-0.0436401329934597,
-0.08609122037887573,
-0.2606874704360962,
1.6539226770401,
-0.9391069412231445,
-2.0718326568603516,
0.10969837009906769,
0.2958947420120239,
-0.23996345698833466,
0.16807478666305542,
1.7960474491119385,
0.4160701632499695,
1.3721204996109009,
1.3150990009307861,
0.9894079566001892,
-0.6445782780647278,
-1.2310564517974854,
0.8038755655288696,
1.0288286209106445,
-1.3874746561050415,
0.9144200086593628,
-0.15717990696430206,
-0.566368579864502,
0.8064784407615662,
1.2903642654418945,
0.44387632608413696,
-2.0211853981018066,
0.8644307255744934,
-1.1255707740783691,
0.9001458883285522,
0.7317468523979187,
0.6984953880310059,
0.28840622305870056,
0.8990054130554199,
-1.1707189083099365,
-1.100110650062561,
-0.6541128158569336,
-0.7138304114341736,
2.000624895095825,
-0.41026878356933594,
0.5623698830604553,
-0.15444160997867584,
-1.177638053894043,
-0.11211837828159332,
0.8766857981681824,
0.4166323244571686,
-0.44733235239982605,
0.799619734287262,
-0.6837254166603088,
-0.9884839653968811,
-1.214392066001892,
-0.37345167994499207,
-1.0620453357696533,
-0.944538950920105,
1.0505266189575195,
0.6895244717597961,
0.4158182144165039,
1.9431451559066772,
0.6253733038902283,
0.3246203362941742,
-2.527881383895874,
0.8415045142173767,
0.26492980122566223,
-0.11494213342666626,
0.8261486887931824,
0.3537510931491852,
1.1679987907409668,
0.08232831954956055,
0.623347818851471,
-2.4393272399902344,
2.260240077972412,
-0.20372778177261353,
0.6312507390975952,
0.017662402242422104,
-0.21254783868789673,
1.1736418008804321,
0.6529061794281006,
0.4578113257884979,
-1.104799509048462,
0.7180254459381104,
-0.4621584713459015,
1.1456851959228516,
0.9113523364067078,
-0.8403063416481018,
-0.007954923436045647,
1.4654054641723633,
0.49717220664024353,
-0.6057704091072083,
-0.9970691204071045,
-0.9322783350944519,
0.9453725814819336,
1.5767844915390015,
-0.07055024802684784,
-0.07633432745933533,
0.7159013152122498,
0.7023482322692871,
-1.161552906036377,
0.15889564156532288,
-0.5681635737419128,
-0.7004780769348145,
1.630713939666748,
2.0422074794769287,
-0.19017145037651062,
-0.06376352906227112,
-0.7494705319404602,
-1.3016865253448486,
0.7677284479141235,
-0.1436961144208908,
0.014877179637551308,
0.5492249131202698,
-0.5706297159194946,
0.977260410785675,
0.6360872983932495,
0.908020555973053,
0.06226002052426338,
0.281788170337677,
0.44643333554267883,
-0.3916984498500824,
-1.1745285987854004,
-0.33801478147506714,
-1.154611349105835,
-2.658339262008667,
0.3880119025707245,
-0.23700055480003357,
-1.4862537384033203,
0.01468132995069027,
-1.0090603828430176,
0.9358164668083191,
-0.6376942992210388,
-1.176125168800354,
-1.4712334871292114,
0.360334575176239,
-0.058599989861249924,
0.9662954807281494,
-1.6515558958053589,
-0.1993090957403183,
1.1927695274353027,
0.7741493582725525,
-0.668089747428894,
1.0016119480133057,
0.24964243173599243,
1.0362894535064697,
0.6340256333351135,
-0.4061689078807831,
0.6797285676002502,
0.06717504560947418,
-1.4208848476409912,
0.44545984268188477,
1.308998942375183,
0.14614665508270264,
1.3993756771087646,
-0.3841182589530945,
0.06869162619113922,
0.4404835104942322,
-0.6734300851821899,
-0.5397960543632507,
-0.28169190883636475,
0.6443631052970886,
0.007714562118053436,
-0.9254955053329468,
-0.11194711923599243,
-0.16906090080738068,
-0.41222140192985535,
0.1581481546163559,
-1.5041241645812988,
-0.29095155000686646,
-0.5302702784538269,
-0.364000529050827,
-1.4141911268234253,
-0.05780620872974396,
1.4289921522140503,
-0.589825451374054,
-0.3012985289096832,
0.5323160290718079,
0.4092912971973419,
0.530846118927002,
0.6732056736946106,
-0.7329305410385132,
-0.20324386656284332,
-0.34253111481666565,
-0.31672602891921997,
0.2989298701286316,
1.3095061779022217,
-0.05683958902955055,
-0.8636912703514099,
0.6179337501525879,
-0.3324441909790039,
0.14743833243846893,
1.9672505855560303,
0.09742502868175507,
-0.7733843326568604,
0.38436272740364075,
-0.721926212310791,
1.792765736579895,
1.7133984565734863,
1.1915749311447144,
-0.13933801651000977,
-0.8314000964164734,
0.6366088390350342,
-0.39892008900642395,
-0.3217827379703522,
0.86017906665802,
0.36420518159866333,
-0.28041326999664307,
-1.4190144538879395,
0.7639573812484741,
1.1921576261520386,
-0.737151026725769,
-0.7960771322250366,
0.1322237104177475,
-0.8050863146781921,
1.176648736000061,
0.4999254047870636,
0.38745731115341187,
0.3044775724411011,
1.6223217248916626,
0.7692764401435852,
-0.4872853755950928,
0.6458431482315063,
0.5187392234802246,
-0.28878292441368103,
-2.079724073410034,
-1.1608163118362427,
0.27273792028427124,
-0.5748294591903687,
-1.5655362606048584,
1.4023513793945312,
-1.114630937576294,
-1.096436619758606,
0.5460475087165833,
0.09677718579769135,
1.2447233200073242,
0.41991814970970154,
1.5688084363937378,
2.103789806365967,
0.8155777454376221,
0.5390207171440125,
1.2862434387207031,
-0.159376859664917,
-0.4521823227405548,
1.8795382976531982,
-0.38428014516830444,
0.5016838312149048,
1.1581175327301025,
-0.41211098432540894,
-1.102716088294983,
-0.7747728228569031,
-1.1682194471359253,
-0.6744353771209717,
1.1431742906570435,
0.07622934877872467,
-1.0421686172485352,
0.2716732621192932,
1.622120976448059,
0.08820609748363495,
-0.22200343012809753,
0.703283429145813,
0.32436659932136536,
-0.6908904314041138,
-0.11156781017780304,
-0.9416797757148743,
0.5537037253379822,
-0.28144145011901855,
-0.33987075090408325,
0.3591698706150055,
0.5387685894966125,
1.3376744985580444,
-0.11031661927700043,
0.18474337458610535,
0.9970057010650635,
-1.4650135040283203,
1.3844997882843018,
-0.5853704810142517,
0.30197423696517944,
-2.352820873260498,
1.2946250438690186,
-0.6360293626785278,
2.057718515396118,
-2.602847099304199,
0.38699036836624146,
-0.5870209336280823,
-0.5872631072998047,
0.3384493887424469,
-0.31612303853034973,
0.1045784205198288,
-0.14774683117866516,
-1.0302841663360596,
0.061932485550642014,
-0.6207203269004822,
0.6071435809135437,
1.1418060064315796,
1.4230051040649414,
-1.1044481992721558,
-0.2512376010417938,
-1.6623164415359497,
-0.18058790266513824,
-0.8065140247344971,
0.278721421957016,
-1.967067837715149,
-0.17367319762706757,
-1.9710816144943237,
-2.3137624263763428,
-1.2983721494674683,
-0.8526908159255981,
1.1133217811584473,
0.21200932562351227,
-0.9097946286201477,
1.317286729812622,
-0.31240472197532654,
-1.8182117938995361,
1.0673296451568604,
-2.159895181655884
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | i am using uint64 for simhash
uint64 ranges up to about 3.69E19.
18329103420363166823 is less than this value.
moreover, our simhash algorithm use 64 bits. it should fit in uint64.
| ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 74 | 30 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
i am using uint64 for simhash
uint64 ranges up to about 3.69E19.
18329103420363166823 is less than this value.
moreover, our simhash algorithm use 64 bits. it should fit in uint64.
| [
-1.1762616634368896,
-0.9247037172317505,
-0.6230241060256958,
1.4585685729980469,
-0.14434967935085297,
-1.2286900281906128,
0.1393262892961502,
-1.0940488576889038,
1.5033583641052246,
-0.7691389322280884,
0.19321289658546448,
-1.62937331199646,
-0.03561179339885712,
-0.6604982018470764,
-0.6882392168045044,
-0.8129012584686279,
-0.361989825963974,
-0.8227675557136536,
1.0431866645812988,
2.3925468921661377,
1.2505486011505127,
-1.408920168876648,
2.7824151515960693,
0.6825370788574219,
-0.20309175550937653,
-1.054370403289795,
0.521984875202179,
-0.03009789250791073,
-1.2089860439300537,
-0.4994511306285858,
-0.9603615999221802,
-0.04494495689868927,
-0.6983826756477356,
-0.2958213984966278,
-0.06136200577020645,
0.49751541018486023,
-0.2868650555610657,
-0.26016104221343994,
-0.6542292833328247,
-0.8028631806373596,
0.4872623682022095,
-0.30537691712379456,
0.9940378665924072,
-0.2985031008720398,
1.7195252180099487,
-0.5278900265693665,
0.5129393339157104,
0.7728586792945862,
1.2549495697021484,
0.1455172747373581,
-0.005483354441821575,
0.17838171124458313,
0.3448973000049591,
-0.022550689056515694,
0.5746480822563171,
1.1444342136383057,
0.6330298185348511,
0.598852813243866,
0.599375307559967,
-2.243001699447632,
1.3773010969161987,
-0.9879947304725647,
0.32696884870529175,
1.4226408004760742,
-0.8353627920150757,
0.38619914650917053,
-1.785841941833496,
-0.07360874116420746,
0.6276602745056152,
-2.237729549407959,
0.338153213262558,
-1.3090678453445435,
-0.5454554557800293,
0.9418737888336182,
0.43150123953819275,
-1.2069313526153564,
0.15500889718532562,
-0.47202345728874207,
1.104017734527588,
0.48756131529808044,
0.9366675615310669,
-1.7019485235214233,
-0.04209116846323013,
-0.16377580165863037,
0.1461993008852005,
-1.286113977432251,
-1.644670009613037,
0.6083168983459473,
0.5259932279586792,
0.6636841893196106,
-0.10380077362060547,
1.086626410484314,
-1.1188957691192627,
0.8417633175849915,
-1.0548826456069946,
-1.5459098815917969,
-1.3458787202835083,
-2.466904878616333,
-2.311518669128418,
0.6955347061157227,
-0.5233387351036072,
-0.44690626859664917,
2.088641881942749,
-0.966562032699585,
-1.6703218221664429,
1.1264820098876953,
0.30232757329940796,
0.04682980105280876,
2.3873140811920166,
0.24626603722572327,
-0.6891911029815674,
0.45248350501060486,
-0.8272844552993774,
0.8597055077552795,
-0.346079021692276,
1.3451508283615112,
0.50091153383255,
-1.0315046310424805,
1.5519105195999146,
-0.4789595603942871,
0.5700971484184265,
-0.60723876953125,
-0.5410104990005493,
-0.7463903427124023,
0.23539161682128906,
1.8108872175216675,
-0.24211794137954712,
1.5046766996383667,
-0.33385032415390015,
-1.523521900177002,
-1.5460160970687866,
0.952671229839325,
0.3560183048248291,
-0.9489750862121582,
0.0910845398902893,
-0.4977193772792816,
0.14318189024925232,
-0.13936716318130493,
1.1906111240386963,
1.2886799573898315,
0.6971879601478577,
-0.4024360477924347,
-0.7789167165756226,
0.10234799981117249,
-0.15253566205501556,
-0.7396536469459534,
-1.8579232692718506,
-0.24570123851299286,
0.12445428967475891,
0.6728820204734802,
-1.1261537075042725,
1.855181097984314,
0.934597909450531,
1.9521780014038086,
0.9943413734436035,
-0.48492303490638733,
1.3914802074432373,
0.04059218615293503,
1.8002259731292725,
-0.6067976951599121,
0.558914303779602,
-0.36773809790611267,
-1.1631113290786743,
0.9709139466285706,
-0.2738177478313446,
-2.009168863296509,
-0.745482861995697,
-0.7535560727119446,
-0.2692214846611023,
-0.7670236229896545,
0.9141814708709717,
-0.2732831537723541,
-1.4543362855911255,
0.12517136335372925,
-0.6119828820228577,
0.29110288619995117,
-1.1510542631149292,
0.285444974899292,
0.725890576839447,
-0.6120870113372803,
-0.07735779881477356,
-0.2089637815952301,
-1.330212950706482,
-0.5215833783149719,
0.48665526509284973,
1.8116934299468994,
-0.5667157173156738,
0.8790807723999023,
1.0090869665145874,
-0.6268512606620789,
0.0389397032558918,
0.1975218504667282,
-0.26886725425720215,
0.7261554002761841,
-1.0447674989700317,
-0.5574946999549866,
1.2064483165740967,
-0.38471826910972595,
-0.6486994028091431,
1.4577922821044922,
0.7289041876792908,
-1.118531346321106,
-0.24567911028862,
-0.2293718308210373,
-0.8800218105316162,
0.032976169139146805,
-1.4954297542572021,
-0.09434919059276581,
0.550826370716095,
-1.5789076089859009,
-0.31963446736335754,
-0.09841881692409515,
1.4366116523742676,
-0.19776298105716705,
1.472253441810608,
-0.37545710802078247,
-0.10168279707431793,
-0.2564363479614258,
-0.5066017508506775,
0.23084822297096252,
-0.14738857746124268,
-0.418671578168869,
0.08640749752521515,
-0.8375027179718018,
0.3157399892807007,
1.5394152402877808,
0.21569539606571198,
0.03482953459024429,
0.4134470224380493,
1.0643731355667114,
0.4102255702018738,
-0.007208403665572405,
-0.8875563144683838,
-1.50822913646698,
1.9638539552688599,
-1.4832971096038818,
1.9787298440933228,
0.7874236106872559,
-0.053156331181526184,
-1.7951339483261108,
-1.7672888040542603,
1.2673828601837158,
1.0972920656204224,
2.229739189147949,
0.47134125232696533,
0.3349563777446747,
-0.8238469958305359,
-0.694787859916687,
0.36256444454193115,
-0.9606155157089233,
-0.6255032420158386,
0.13999278843402863,
2.375483274459839,
1.834527611732483,
-0.45767688751220703,
-0.2720031440258026,
-0.8556336164474487,
1.4308830499649048,
-0.3380816578865051,
0.29439878463745117,
2.116771697998047,
-0.3589145243167877,
-1.0198100805282593,
1.3610142469406128,
-2.484593629837036,
0.36596888303756714,
2.1096596717834473,
0.340414434671402,
0.20163217186927795,
-1.3267980813980103,
-0.5849202871322632,
-0.37331536412239075,
-0.4684607684612274,
-1.2272006273269653,
0.5623845458030701,
-0.2827763855457306,
-0.7399104237556458,
-1.3986870050430298,
0.1945914775133133,
-1.1507538557052612,
-1.7531605958938599,
0.34805533289909363,
1.8999054431915283,
2.155256509780884,
-0.7588023543357849,
1.4698991775512695,
-0.38263317942619324,
0.09901097416877747,
1.2179597616195679,
1.374553918838501,
3.077659845352173,
1.810241937637329,
-1.337890386581421,
0.6596903204917908,
-0.17866995930671692,
-0.5034840106964111,
1.1124389171600342,
-1.0623687505722046,
1.2398581504821777,
-0.17071270942687988,
-1.2034655809402466,
-1.2868224382400513,
1.0398658514022827,
0.4674055874347687,
0.11945199966430664,
-0.5598062872886658,
1.2255289554595947,
0.13693910837173462,
1.3448519706726074,
0.6972441077232361,
-0.4765629768371582,
0.4724639058113098,
-0.348842591047287,
-0.6476726531982422,
1.570311427116394,
0.24667364358901978,
-1.5608203411102295,
-2.2581100463867188,
-0.2937113046646118,
-0.9053738713264465,
0.024227403104305267,
-0.6416811943054199,
-1.0239797830581665,
1.5580999851226807,
0.3897104561328888,
-1.1713966131210327,
-0.3151242136955261,
-0.2941959500312805,
-0.43520644307136536,
2.6904094219207764,
-1.2411267757415771,
-0.09997034072875977,
-0.9038124084472656,
-0.6579437851905823,
1.6498357057571411,
-1.3010914325714111,
-0.2625711262226105,
-1.1074391603469849,
-0.6877467036247253,
-1.2251993417739868,
-0.4133290946483612,
0.1027279645204544,
-0.9914187788963318,
0.7880914807319641,
0.22597111761569977,
-1.1758074760437012,
-0.3859699070453644,
-0.869469404220581,
1.0891849994659424,
-0.1976921409368515,
0.22708185017108917,
1.7629752159118652,
0.2566469609737396,
-0.47827866673469543,
0.8519090414047241,
1.2177010774612427,
0.658666729927063,
-0.6529871821403503,
-0.03931864723563194,
-0.6584813594818115,
0.45352044701576233,
-1.311294674873352,
0.2528330087661743,
-3.0593957901000977,
0.6207709908485413,
-0.10594996809959412,
-0.14613206684589386,
-0.1264810711145401,
-1.4249935150146484,
1.0488730669021606,
2.5046608448028564,
-1.256823182106018,
0.557610809803009,
0.47937580943107605,
1.112303614616394,
-1.6468981504440308,
0.27189692854881287,
-0.5080119371414185,
2.0675039291381836,
0.1439409703016281,
1.219714879989624,
-0.509819746017456,
-2.33502459526062,
0.6333411931991577,
-1.2520041465759277,
-1.0749415159225464,
0.7903345227241516,
-0.9026759266853333,
0.266679048538208,
-1.4419418573379517,
-0.18356449902057648,
-0.9756885766983032,
-1.26425039768219,
0.682779848575592,
0.14052636921405792,
0.3753029704093933,
-0.5856676697731018,
0.29137784242630005,
-2.1812310218811035,
-1.3824001550674438,
-0.12387068569660187,
-0.9447868466377258,
0.5564262270927429,
-0.521522581577301,
0.5821380615234375,
-0.0507662296295166,
0.06434029340744019,
0.32992276549339294,
1.6008200645446777,
3.381647825241089,
0.11128176748752594,
0.24053910374641418,
-0.21919837594032288,
-0.9459978342056274,
1.4442030191421509,
0.8860669136047363,
-0.054259538650512695,
-0.5533403158187866,
-0.95628422498703,
1.331786036491394,
2.009953498840332,
1.0018335580825806,
-0.00041266903281211853,
-0.840866208076477,
-0.6618966460227966,
-0.0342835858464241,
0.17438559234142303,
0.5765284895896912,
0.9152258038520813,
-0.04538838565349579,
0.01683579571545124,
1.3268201351165771,
1.1365312337875366,
-0.2748872935771942,
0.32656699419021606,
-0.9081598520278931,
-0.4110753536224365,
0.47190749645233154,
0.15363086760044098,
-0.019246606156229973,
0.5131422877311707,
-0.9745264053344727,
-0.21659646928310394,
-0.37573179602622986,
-0.7891838550567627,
-0.7009273767471313,
-0.41273149847984314,
-0.4948112666606903,
1.5993707180023193,
0.16738280653953552,
-0.5451816320419312,
0.12837930023670197,
-0.6797749996185303,
-0.21292631328105927,
-1.1282111406326294,
0.1143844872713089,
-0.0436401329934597,
-0.08609122037887573,
-0.2606874704360962,
1.6539226770401,
-0.9391069412231445,
-2.0718326568603516,
0.10969837009906769,
0.2958947420120239,
-0.23996345698833466,
0.16807478666305542,
1.7960474491119385,
0.4160701632499695,
1.3721204996109009,
1.3150990009307861,
0.9894079566001892,
-0.6445782780647278,
-1.2310564517974854,
0.8038755655288696,
1.0288286209106445,
-1.3874746561050415,
0.9144200086593628,
-0.15717990696430206,
-0.566368579864502,
0.8064784407615662,
1.2903642654418945,
0.44387632608413696,
-2.0211853981018066,
0.8644307255744934,
-1.1255707740783691,
0.9001458883285522,
0.7317468523979187,
0.6984953880310059,
0.28840622305870056,
0.8990054130554199,
-1.1707189083099365,
-1.100110650062561,
-0.6541128158569336,
-0.7138304114341736,
2.000624895095825,
-0.41026878356933594,
0.5623698830604553,
-0.15444160997867584,
-1.177638053894043,
-0.11211837828159332,
0.8766857981681824,
0.4166323244571686,
-0.44733235239982605,
0.799619734287262,
-0.6837254166603088,
-0.9884839653968811,
-1.214392066001892,
-0.37345167994499207,
-1.0620453357696533,
-0.944538950920105,
1.0505266189575195,
0.6895244717597961,
0.4158182144165039,
1.9431451559066772,
0.6253733038902283,
0.3246203362941742,
-2.527881383895874,
0.8415045142173767,
0.26492980122566223,
-0.11494213342666626,
0.8261486887931824,
0.3537510931491852,
1.1679987907409668,
0.08232831954956055,
0.623347818851471,
-2.4393272399902344,
2.260240077972412,
-0.20372778177261353,
0.6312507390975952,
0.017662402242422104,
-0.21254783868789673,
1.1736418008804321,
0.6529061794281006,
0.4578113257884979,
-1.104799509048462,
0.7180254459381104,
-0.4621584713459015,
1.1456851959228516,
0.9113523364067078,
-0.8403063416481018,
-0.007954923436045647,
1.4654054641723633,
0.49717220664024353,
-0.6057704091072083,
-0.9970691204071045,
-0.9322783350944519,
0.9453725814819336,
1.5767844915390015,
-0.07055024802684784,
-0.07633432745933533,
0.7159013152122498,
0.7023482322692871,
-1.161552906036377,
0.15889564156532288,
-0.5681635737419128,
-0.7004780769348145,
1.630713939666748,
2.0422074794769287,
-0.19017145037651062,
-0.06376352906227112,
-0.7494705319404602,
-1.3016865253448486,
0.7677284479141235,
-0.1436961144208908,
0.014877179637551308,
0.5492249131202698,
-0.5706297159194946,
0.977260410785675,
0.6360872983932495,
0.908020555973053,
0.06226002052426338,
0.281788170337677,
0.44643333554267883,
-0.3916984498500824,
-1.1745285987854004,
-0.33801478147506714,
-1.154611349105835,
-2.658339262008667,
0.3880119025707245,
-0.23700055480003357,
-1.4862537384033203,
0.01468132995069027,
-1.0090603828430176,
0.9358164668083191,
-0.6376942992210388,
-1.176125168800354,
-1.4712334871292114,
0.360334575176239,
-0.058599989861249924,
0.9662954807281494,
-1.6515558958053589,
-0.1993090957403183,
1.1927695274353027,
0.7741493582725525,
-0.668089747428894,
1.0016119480133057,
0.24964243173599243,
1.0362894535064697,
0.6340256333351135,
-0.4061689078807831,
0.6797285676002502,
0.06717504560947418,
-1.4208848476409912,
0.44545984268188477,
1.308998942375183,
0.14614665508270264,
1.3993756771087646,
-0.3841182589530945,
0.06869162619113922,
0.4404835104942322,
-0.6734300851821899,
-0.5397960543632507,
-0.28169190883636475,
0.6443631052970886,
0.007714562118053436,
-0.9254955053329468,
-0.11194711923599243,
-0.16906090080738068,
-0.41222140192985535,
0.1581481546163559,
-1.5041241645812988,
-0.29095155000686646,
-0.5302702784538269,
-0.364000529050827,
-1.4141911268234253,
-0.05780620872974396,
1.4289921522140503,
-0.589825451374054,
-0.3012985289096832,
0.5323160290718079,
0.4092912971973419,
0.530846118927002,
0.6732056736946106,
-0.7329305410385132,
-0.20324386656284332,
-0.34253111481666565,
-0.31672602891921997,
0.2989298701286316,
1.3095061779022217,
-0.05683958902955055,
-0.8636912703514099,
0.6179337501525879,
-0.3324441909790039,
0.14743833243846893,
1.9672505855560303,
0.09742502868175507,
-0.7733843326568604,
0.38436272740364075,
-0.721926212310791,
1.792765736579895,
1.7133984565734863,
1.1915749311447144,
-0.13933801651000977,
-0.8314000964164734,
0.6366088390350342,
-0.39892008900642395,
-0.3217827379703522,
0.86017906665802,
0.36420518159866333,
-0.28041326999664307,
-1.4190144538879395,
0.7639573812484741,
1.1921576261520386,
-0.737151026725769,
-0.7960771322250366,
0.1322237104177475,
-0.8050863146781921,
1.176648736000061,
0.4999254047870636,
0.38745731115341187,
0.3044775724411011,
1.6223217248916626,
0.7692764401435852,
-0.4872853755950928,
0.6458431482315063,
0.5187392234802246,
-0.28878292441368103,
-2.079724073410034,
-1.1608163118362427,
0.27273792028427124,
-0.5748294591903687,
-1.5655362606048584,
1.4023513793945312,
-1.114630937576294,
-1.096436619758606,
0.5460475087165833,
0.09677718579769135,
1.2447233200073242,
0.41991814970970154,
1.5688084363937378,
2.103789806365967,
0.8155777454376221,
0.5390207171440125,
1.2862434387207031,
-0.159376859664917,
-0.4521823227405548,
1.8795382976531982,
-0.38428014516830444,
0.5016838312149048,
1.1581175327301025,
-0.41211098432540894,
-1.102716088294983,
-0.7747728228569031,
-1.1682194471359253,
-0.6744353771209717,
1.1431742906570435,
0.07622934877872467,
-1.0421686172485352,
0.2716732621192932,
1.622120976448059,
0.08820609748363495,
-0.22200343012809753,
0.703283429145813,
0.32436659932136536,
-0.6908904314041138,
-0.11156781017780304,
-0.9416797757148743,
0.5537037253379822,
-0.28144145011901855,
-0.33987075090408325,
0.3591698706150055,
0.5387685894966125,
1.3376744985580444,
-0.11031661927700043,
0.18474337458610535,
0.9970057010650635,
-1.4650135040283203,
1.3844997882843018,
-0.5853704810142517,
0.30197423696517944,
-2.352820873260498,
1.2946250438690186,
-0.6360293626785278,
2.057718515396118,
-2.602847099304199,
0.38699036836624146,
-0.5870209336280823,
-0.5872631072998047,
0.3384493887424469,
-0.31612303853034973,
0.1045784205198288,
-0.14774683117866516,
-1.0302841663360596,
0.061932485550642014,
-0.6207203269004822,
0.6071435809135437,
1.1418060064315796,
1.4230051040649414,
-1.1044481992721558,
-0.2512376010417938,
-1.6623164415359497,
-0.18058790266513824,
-0.8065140247344971,
0.278721421957016,
-1.967067837715149,
-0.17367319762706757,
-1.9710816144943237,
-2.3137624263763428,
-1.2983721494674683,
-0.8526908159255981,
1.1133217811584473,
0.21200932562351227,
-0.9097946286201477,
1.317286729812622,
-0.31240472197532654,
-1.8182117938995361,
1.0673296451568604,
-2.159895181655884
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | You are right. I overlooked the feature type.
This is a reproducer:
```python
import pyarrow as pa
from datasets.arrow_writer import TypedSequence
pa.array(TypedSequence([18329103420363166823], type=Value("uint64")))
```
`pa.array([18329103420363166823])` also fails with the same error, so it seems PyArrow does not always infer the correct type as NumPy does (`uint64` in this case).
I'll report this issue in the Arrow repo.
`pa.array([18329103420363166823], pa.uint64)` works, so maybe we can implement a temporary fix (supporting complex input such as `[{"image": pil_image, "num": uint64_value}]` would be hard though).
In the meantime, you should be able to bypass this error by returning the `simhash` values as NumPy scalars in the script:
```python
def _generate_examples(self, ...):
...
yield {..., "simhash": np.uint64(simhash), ...}
``` | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 74 | 114 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
You are right. I overlooked the feature type.
This is a reproducer:
```python
import pyarrow as pa
from datasets.arrow_writer import TypedSequence
pa.array(TypedSequence([18329103420363166823], type=Value("uint64")))
```
`pa.array([18329103420363166823])` also fails with the same error, so it seems PyArrow does not always infer the correct type as NumPy does (`uint64` in this case).
I'll report this issue in the Arrow repo.
`pa.array([18329103420363166823], pa.uint64)` works, so maybe we can implement a temporary fix (supporting complex input such as `[{"image": pil_image, "num": uint64_value}]` would be hard though).
In the meantime, you should be able to bypass this error by returning the `simhash` values as NumPy scalars in the script:
```python
def _generate_examples(self, ...):
...
yield {..., "simhash": np.uint64(simhash), ...}
``` | [
-1.1762616634368896,
-0.9247037172317505,
-0.6230241060256958,
1.4585685729980469,
-0.14434967935085297,
-1.2286900281906128,
0.1393262892961502,
-1.0940488576889038,
1.5033583641052246,
-0.7691389322280884,
0.19321289658546448,
-1.62937331199646,
-0.03561179339885712,
-0.6604982018470764,
-0.6882392168045044,
-0.8129012584686279,
-0.361989825963974,
-0.8227675557136536,
1.0431866645812988,
2.3925468921661377,
1.2505486011505127,
-1.408920168876648,
2.7824151515960693,
0.6825370788574219,
-0.20309175550937653,
-1.054370403289795,
0.521984875202179,
-0.03009789250791073,
-1.2089860439300537,
-0.4994511306285858,
-0.9603615999221802,
-0.04494495689868927,
-0.6983826756477356,
-0.2958213984966278,
-0.06136200577020645,
0.49751541018486023,
-0.2868650555610657,
-0.26016104221343994,
-0.6542292833328247,
-0.8028631806373596,
0.4872623682022095,
-0.30537691712379456,
0.9940378665924072,
-0.2985031008720398,
1.7195252180099487,
-0.5278900265693665,
0.5129393339157104,
0.7728586792945862,
1.2549495697021484,
0.1455172747373581,
-0.005483354441821575,
0.17838171124458313,
0.3448973000049591,
-0.022550689056515694,
0.5746480822563171,
1.1444342136383057,
0.6330298185348511,
0.598852813243866,
0.599375307559967,
-2.243001699447632,
1.3773010969161987,
-0.9879947304725647,
0.32696884870529175,
1.4226408004760742,
-0.8353627920150757,
0.38619914650917053,
-1.785841941833496,
-0.07360874116420746,
0.6276602745056152,
-2.237729549407959,
0.338153213262558,
-1.3090678453445435,
-0.5454554557800293,
0.9418737888336182,
0.43150123953819275,
-1.2069313526153564,
0.15500889718532562,
-0.47202345728874207,
1.104017734527588,
0.48756131529808044,
0.9366675615310669,
-1.7019485235214233,
-0.04209116846323013,
-0.16377580165863037,
0.1461993008852005,
-1.286113977432251,
-1.644670009613037,
0.6083168983459473,
0.5259932279586792,
0.6636841893196106,
-0.10380077362060547,
1.086626410484314,
-1.1188957691192627,
0.8417633175849915,
-1.0548826456069946,
-1.5459098815917969,
-1.3458787202835083,
-2.466904878616333,
-2.311518669128418,
0.6955347061157227,
-0.5233387351036072,
-0.44690626859664917,
2.088641881942749,
-0.966562032699585,
-1.6703218221664429,
1.1264820098876953,
0.30232757329940796,
0.04682980105280876,
2.3873140811920166,
0.24626603722572327,
-0.6891911029815674,
0.45248350501060486,
-0.8272844552993774,
0.8597055077552795,
-0.346079021692276,
1.3451508283615112,
0.50091153383255,
-1.0315046310424805,
1.5519105195999146,
-0.4789595603942871,
0.5700971484184265,
-0.60723876953125,
-0.5410104990005493,
-0.7463903427124023,
0.23539161682128906,
1.8108872175216675,
-0.24211794137954712,
1.5046766996383667,
-0.33385032415390015,
-1.523521900177002,
-1.5460160970687866,
0.952671229839325,
0.3560183048248291,
-0.9489750862121582,
0.0910845398902893,
-0.4977193772792816,
0.14318189024925232,
-0.13936716318130493,
1.1906111240386963,
1.2886799573898315,
0.6971879601478577,
-0.4024360477924347,
-0.7789167165756226,
0.10234799981117249,
-0.15253566205501556,
-0.7396536469459534,
-1.8579232692718506,
-0.24570123851299286,
0.12445428967475891,
0.6728820204734802,
-1.1261537075042725,
1.855181097984314,
0.934597909450531,
1.9521780014038086,
0.9943413734436035,
-0.48492303490638733,
1.3914802074432373,
0.04059218615293503,
1.8002259731292725,
-0.6067976951599121,
0.558914303779602,
-0.36773809790611267,
-1.1631113290786743,
0.9709139466285706,
-0.2738177478313446,
-2.009168863296509,
-0.745482861995697,
-0.7535560727119446,
-0.2692214846611023,
-0.7670236229896545,
0.9141814708709717,
-0.2732831537723541,
-1.4543362855911255,
0.12517136335372925,
-0.6119828820228577,
0.29110288619995117,
-1.1510542631149292,
0.285444974899292,
0.725890576839447,
-0.6120870113372803,
-0.07735779881477356,
-0.2089637815952301,
-1.330212950706482,
-0.5215833783149719,
0.48665526509284973,
1.8116934299468994,
-0.5667157173156738,
0.8790807723999023,
1.0090869665145874,
-0.6268512606620789,
0.0389397032558918,
0.1975218504667282,
-0.26886725425720215,
0.7261554002761841,
-1.0447674989700317,
-0.5574946999549866,
1.2064483165740967,
-0.38471826910972595,
-0.6486994028091431,
1.4577922821044922,
0.7289041876792908,
-1.118531346321106,
-0.24567911028862,
-0.2293718308210373,
-0.8800218105316162,
0.032976169139146805,
-1.4954297542572021,
-0.09434919059276581,
0.550826370716095,
-1.5789076089859009,
-0.31963446736335754,
-0.09841881692409515,
1.4366116523742676,
-0.19776298105716705,
1.472253441810608,
-0.37545710802078247,
-0.10168279707431793,
-0.2564363479614258,
-0.5066017508506775,
0.23084822297096252,
-0.14738857746124268,
-0.418671578168869,
0.08640749752521515,
-0.8375027179718018,
0.3157399892807007,
1.5394152402877808,
0.21569539606571198,
0.03482953459024429,
0.4134470224380493,
1.0643731355667114,
0.4102255702018738,
-0.007208403665572405,
-0.8875563144683838,
-1.50822913646698,
1.9638539552688599,
-1.4832971096038818,
1.9787298440933228,
0.7874236106872559,
-0.053156331181526184,
-1.7951339483261108,
-1.7672888040542603,
1.2673828601837158,
1.0972920656204224,
2.229739189147949,
0.47134125232696533,
0.3349563777446747,
-0.8238469958305359,
-0.694787859916687,
0.36256444454193115,
-0.9606155157089233,
-0.6255032420158386,
0.13999278843402863,
2.375483274459839,
1.834527611732483,
-0.45767688751220703,
-0.2720031440258026,
-0.8556336164474487,
1.4308830499649048,
-0.3380816578865051,
0.29439878463745117,
2.116771697998047,
-0.3589145243167877,
-1.0198100805282593,
1.3610142469406128,
-2.484593629837036,
0.36596888303756714,
2.1096596717834473,
0.340414434671402,
0.20163217186927795,
-1.3267980813980103,
-0.5849202871322632,
-0.37331536412239075,
-0.4684607684612274,
-1.2272006273269653,
0.5623845458030701,
-0.2827763855457306,
-0.7399104237556458,
-1.3986870050430298,
0.1945914775133133,
-1.1507538557052612,
-1.7531605958938599,
0.34805533289909363,
1.8999054431915283,
2.155256509780884,
-0.7588023543357849,
1.4698991775512695,
-0.38263317942619324,
0.09901097416877747,
1.2179597616195679,
1.374553918838501,
3.077659845352173,
1.810241937637329,
-1.337890386581421,
0.6596903204917908,
-0.17866995930671692,
-0.5034840106964111,
1.1124389171600342,
-1.0623687505722046,
1.2398581504821777,
-0.17071270942687988,
-1.2034655809402466,
-1.2868224382400513,
1.0398658514022827,
0.4674055874347687,
0.11945199966430664,
-0.5598062872886658,
1.2255289554595947,
0.13693910837173462,
1.3448519706726074,
0.6972441077232361,
-0.4765629768371582,
0.4724639058113098,
-0.348842591047287,
-0.6476726531982422,
1.570311427116394,
0.24667364358901978,
-1.5608203411102295,
-2.2581100463867188,
-0.2937113046646118,
-0.9053738713264465,
0.024227403104305267,
-0.6416811943054199,
-1.0239797830581665,
1.5580999851226807,
0.3897104561328888,
-1.1713966131210327,
-0.3151242136955261,
-0.2941959500312805,
-0.43520644307136536,
2.6904094219207764,
-1.2411267757415771,
-0.09997034072875977,
-0.9038124084472656,
-0.6579437851905823,
1.6498357057571411,
-1.3010914325714111,
-0.2625711262226105,
-1.1074391603469849,
-0.6877467036247253,
-1.2251993417739868,
-0.4133290946483612,
0.1027279645204544,
-0.9914187788963318,
0.7880914807319641,
0.22597111761569977,
-1.1758074760437012,
-0.3859699070453644,
-0.869469404220581,
1.0891849994659424,
-0.1976921409368515,
0.22708185017108917,
1.7629752159118652,
0.2566469609737396,
-0.47827866673469543,
0.8519090414047241,
1.2177010774612427,
0.658666729927063,
-0.6529871821403503,
-0.03931864723563194,
-0.6584813594818115,
0.45352044701576233,
-1.311294674873352,
0.2528330087661743,
-3.0593957901000977,
0.6207709908485413,
-0.10594996809959412,
-0.14613206684589386,
-0.1264810711145401,
-1.4249935150146484,
1.0488730669021606,
2.5046608448028564,
-1.256823182106018,
0.557610809803009,
0.47937580943107605,
1.112303614616394,
-1.6468981504440308,
0.27189692854881287,
-0.5080119371414185,
2.0675039291381836,
0.1439409703016281,
1.219714879989624,
-0.509819746017456,
-2.33502459526062,
0.6333411931991577,
-1.2520041465759277,
-1.0749415159225464,
0.7903345227241516,
-0.9026759266853333,
0.266679048538208,
-1.4419418573379517,
-0.18356449902057648,
-0.9756885766983032,
-1.26425039768219,
0.682779848575592,
0.14052636921405792,
0.3753029704093933,
-0.5856676697731018,
0.29137784242630005,
-2.1812310218811035,
-1.3824001550674438,
-0.12387068569660187,
-0.9447868466377258,
0.5564262270927429,
-0.521522581577301,
0.5821380615234375,
-0.0507662296295166,
0.06434029340744019,
0.32992276549339294,
1.6008200645446777,
3.381647825241089,
0.11128176748752594,
0.24053910374641418,
-0.21919837594032288,
-0.9459978342056274,
1.4442030191421509,
0.8860669136047363,
-0.054259538650512695,
-0.5533403158187866,
-0.95628422498703,
1.331786036491394,
2.009953498840332,
1.0018335580825806,
-0.00041266903281211853,
-0.840866208076477,
-0.6618966460227966,
-0.0342835858464241,
0.17438559234142303,
0.5765284895896912,
0.9152258038520813,
-0.04538838565349579,
0.01683579571545124,
1.3268201351165771,
1.1365312337875366,
-0.2748872935771942,
0.32656699419021606,
-0.9081598520278931,
-0.4110753536224365,
0.47190749645233154,
0.15363086760044098,
-0.019246606156229973,
0.5131422877311707,
-0.9745264053344727,
-0.21659646928310394,
-0.37573179602622986,
-0.7891838550567627,
-0.7009273767471313,
-0.41273149847984314,
-0.4948112666606903,
1.5993707180023193,
0.16738280653953552,
-0.5451816320419312,
0.12837930023670197,
-0.6797749996185303,
-0.21292631328105927,
-1.1282111406326294,
0.1143844872713089,
-0.0436401329934597,
-0.08609122037887573,
-0.2606874704360962,
1.6539226770401,
-0.9391069412231445,
-2.0718326568603516,
0.10969837009906769,
0.2958947420120239,
-0.23996345698833466,
0.16807478666305542,
1.7960474491119385,
0.4160701632499695,
1.3721204996109009,
1.3150990009307861,
0.9894079566001892,
-0.6445782780647278,
-1.2310564517974854,
0.8038755655288696,
1.0288286209106445,
-1.3874746561050415,
0.9144200086593628,
-0.15717990696430206,
-0.566368579864502,
0.8064784407615662,
1.2903642654418945,
0.44387632608413696,
-2.0211853981018066,
0.8644307255744934,
-1.1255707740783691,
0.9001458883285522,
0.7317468523979187,
0.6984953880310059,
0.28840622305870056,
0.8990054130554199,
-1.1707189083099365,
-1.100110650062561,
-0.6541128158569336,
-0.7138304114341736,
2.000624895095825,
-0.41026878356933594,
0.5623698830604553,
-0.15444160997867584,
-1.177638053894043,
-0.11211837828159332,
0.8766857981681824,
0.4166323244571686,
-0.44733235239982605,
0.799619734287262,
-0.6837254166603088,
-0.9884839653968811,
-1.214392066001892,
-0.37345167994499207,
-1.0620453357696533,
-0.944538950920105,
1.0505266189575195,
0.6895244717597961,
0.4158182144165039,
1.9431451559066772,
0.6253733038902283,
0.3246203362941742,
-2.527881383895874,
0.8415045142173767,
0.26492980122566223,
-0.11494213342666626,
0.8261486887931824,
0.3537510931491852,
1.1679987907409668,
0.08232831954956055,
0.623347818851471,
-2.4393272399902344,
2.260240077972412,
-0.20372778177261353,
0.6312507390975952,
0.017662402242422104,
-0.21254783868789673,
1.1736418008804321,
0.6529061794281006,
0.4578113257884979,
-1.104799509048462,
0.7180254459381104,
-0.4621584713459015,
1.1456851959228516,
0.9113523364067078,
-0.8403063416481018,
-0.007954923436045647,
1.4654054641723633,
0.49717220664024353,
-0.6057704091072083,
-0.9970691204071045,
-0.9322783350944519,
0.9453725814819336,
1.5767844915390015,
-0.07055024802684784,
-0.07633432745933533,
0.7159013152122498,
0.7023482322692871,
-1.161552906036377,
0.15889564156532288,
-0.5681635737419128,
-0.7004780769348145,
1.630713939666748,
2.0422074794769287,
-0.19017145037651062,
-0.06376352906227112,
-0.7494705319404602,
-1.3016865253448486,
0.7677284479141235,
-0.1436961144208908,
0.014877179637551308,
0.5492249131202698,
-0.5706297159194946,
0.977260410785675,
0.6360872983932495,
0.908020555973053,
0.06226002052426338,
0.281788170337677,
0.44643333554267883,
-0.3916984498500824,
-1.1745285987854004,
-0.33801478147506714,
-1.154611349105835,
-2.658339262008667,
0.3880119025707245,
-0.23700055480003357,
-1.4862537384033203,
0.01468132995069027,
-1.0090603828430176,
0.9358164668083191,
-0.6376942992210388,
-1.176125168800354,
-1.4712334871292114,
0.360334575176239,
-0.058599989861249924,
0.9662954807281494,
-1.6515558958053589,
-0.1993090957403183,
1.1927695274353027,
0.7741493582725525,
-0.668089747428894,
1.0016119480133057,
0.24964243173599243,
1.0362894535064697,
0.6340256333351135,
-0.4061689078807831,
0.6797285676002502,
0.06717504560947418,
-1.4208848476409912,
0.44545984268188477,
1.308998942375183,
0.14614665508270264,
1.3993756771087646,
-0.3841182589530945,
0.06869162619113922,
0.4404835104942322,
-0.6734300851821899,
-0.5397960543632507,
-0.28169190883636475,
0.6443631052970886,
0.007714562118053436,
-0.9254955053329468,
-0.11194711923599243,
-0.16906090080738068,
-0.41222140192985535,
0.1581481546163559,
-1.5041241645812988,
-0.29095155000686646,
-0.5302702784538269,
-0.364000529050827,
-1.4141911268234253,
-0.05780620872974396,
1.4289921522140503,
-0.589825451374054,
-0.3012985289096832,
0.5323160290718079,
0.4092912971973419,
0.530846118927002,
0.6732056736946106,
-0.7329305410385132,
-0.20324386656284332,
-0.34253111481666565,
-0.31672602891921997,
0.2989298701286316,
1.3095061779022217,
-0.05683958902955055,
-0.8636912703514099,
0.6179337501525879,
-0.3324441909790039,
0.14743833243846893,
1.9672505855560303,
0.09742502868175507,
-0.7733843326568604,
0.38436272740364075,
-0.721926212310791,
1.792765736579895,
1.7133984565734863,
1.1915749311447144,
-0.13933801651000977,
-0.8314000964164734,
0.6366088390350342,
-0.39892008900642395,
-0.3217827379703522,
0.86017906665802,
0.36420518159866333,
-0.28041326999664307,
-1.4190144538879395,
0.7639573812484741,
1.1921576261520386,
-0.737151026725769,
-0.7960771322250366,
0.1322237104177475,
-0.8050863146781921,
1.176648736000061,
0.4999254047870636,
0.38745731115341187,
0.3044775724411011,
1.6223217248916626,
0.7692764401435852,
-0.4872853755950928,
0.6458431482315063,
0.5187392234802246,
-0.28878292441368103,
-2.079724073410034,
-1.1608163118362427,
0.27273792028427124,
-0.5748294591903687,
-1.5655362606048584,
1.4023513793945312,
-1.114630937576294,
-1.096436619758606,
0.5460475087165833,
0.09677718579769135,
1.2447233200073242,
0.41991814970970154,
1.5688084363937378,
2.103789806365967,
0.8155777454376221,
0.5390207171440125,
1.2862434387207031,
-0.159376859664917,
-0.4521823227405548,
1.8795382976531982,
-0.38428014516830444,
0.5016838312149048,
1.1581175327301025,
-0.41211098432540894,
-1.102716088294983,
-0.7747728228569031,
-1.1682194471359253,
-0.6744353771209717,
1.1431742906570435,
0.07622934877872467,
-1.0421686172485352,
0.2716732621192932,
1.622120976448059,
0.08820609748363495,
-0.22200343012809753,
0.703283429145813,
0.32436659932136536,
-0.6908904314041138,
-0.11156781017780304,
-0.9416797757148743,
0.5537037253379822,
-0.28144145011901855,
-0.33987075090408325,
0.3591698706150055,
0.5387685894966125,
1.3376744985580444,
-0.11031661927700043,
0.18474337458610535,
0.9970057010650635,
-1.4650135040283203,
1.3844997882843018,
-0.5853704810142517,
0.30197423696517944,
-2.352820873260498,
1.2946250438690186,
-0.6360293626785278,
2.057718515396118,
-2.602847099304199,
0.38699036836624146,
-0.5870209336280823,
-0.5872631072998047,
0.3384493887424469,
-0.31612303853034973,
0.1045784205198288,
-0.14774683117866516,
-1.0302841663360596,
0.061932485550642014,
-0.6207203269004822,
0.6071435809135437,
1.1418060064315796,
1.4230051040649414,
-1.1044481992721558,
-0.2512376010417938,
-1.6623164415359497,
-0.18058790266513824,
-0.8065140247344971,
0.278721421957016,
-1.967067837715149,
-0.17367319762706757,
-1.9710816144943237,
-2.3137624263763428,
-1.2983721494674683,
-0.8526908159255981,
1.1133217811584473,
0.21200932562351227,
-0.9097946286201477,
1.317286729812622,
-0.31240472197532654,
-1.8182117938995361,
1.0673296451568604,
-2.159895181655884
] |
https://github.com/huggingface/datasets/issues/6007 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset | Thank you for checking this issue in detail.
However, it seems that using `np.uint64(simhash)` does not work. The same issue still exists.
https://huggingface.co/datasets/liwu/MNBVC/commit/1e44f1e400b7e61052647d44c99cdae3bae9c830
Anyway, we decide to use string type for these simhash values. Hope pyarrow can fix their bug soon. | ### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5 | 74 | 41 | Get an error "OverflowError: Python int too large to convert to C long" when loading a large dataset
### Describe the bug
When load a large dataset with the following code
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
```
We encountered the error: "OverflowError: Python int too large to convert to C long"
The error look something like:
```
OverflowError: Python int too large to convert to C long
During handling of the above exception, another exception occurred:
OverflowError Traceback (most recent call last)
<ipython-input-7-0ed8700e662d> in <module>
----> 1 dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', cache_dir='/sfs/MNBVC/.cache/')
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
1749 ignore_verifications=ignore_verifications,
1750 try_from_hf_gcs=try_from_hf_gcs,
-> 1751 use_auth_token=use_auth_token,
1752 )
1753
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
703 if not downloaded_from_gcs:
704 self._download_and_prepare(
--> 705 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
706 )
707 # Sync info
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos)
1225
1226 def _download_and_prepare(self, dl_manager, verify_infos):
-> 1227 super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
1228
1229 def _get_examples_iterable_for_split(self, split_generator: SplitGenerator) -> ExamplesIterable:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
791 try:
792 # Prepare split will record examples associated to the split
--> 793 self._prepare_split(split_generator, **prepare_split_kwargs)
794 except OSError as e:
795 raise OSError(
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys)
1219 writer.write(example, key)
1220 finally:
-> 1221 num_examples, num_bytes = writer.finalize()
1222
1223 split_generator.split_info.num_examples = num_examples
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in finalize(self, close_stream)
536 # Re-intializing to empty list for next batch
537 self.hkey_record = []
--> 538 self.write_examples_on_file()
539 if self.pa_writer is None:
540 if self.schema:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_examples_on_file(self)
407 # Since current_examples contains (example, key) tuples
408 batch_examples[col] = [row[0][col] for row in self.current_examples]
--> 409 self.write_batch(batch_examples=batch_examples)
410 self.current_examples = []
411
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in write_batch(self, batch_examples, writer_batch_size)
506 col_try_type = try_features[col] if try_features is not None and col in try_features else None
507 typed_sequence = OptimizedTypedSequence(batch_examples[col], type=col_type, try_type=col_try_type, col=col)
--> 508 arrays.append(pa.array(typed_sequence))
509 inferred_features[col] = typed_sequence.get_inferred_type()
510 schema = inferred_features.arrow_schema if self.pa_writer is None else self.schema
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._handle_arrow_array_protocol()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/datasets/arrow_writer.py in __arrow_array__(self, type)
180 else:
181 trying_cast_to_python_objects = True
--> 182 out = pa.array(cast_to_python_objects(data, only_1d_for_numpy=True))
183 # use smaller integer precisions if possible
184 if self.trying_int_optimization:
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib.array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()
/sfs/MNBVC/venv/lib64/python3.6/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
OverflowError: Python int too large to convert to C long
```
However, that dataset can be loaded in a streaming manner:
```python
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train', streaming=True)
for i in dataset:
pass # it work well
```
Another issue is reported in our dataset hub:
https://huggingface.co/datasets/liwu/MNBVC/discussions/2
### Steps to reproduce the bug
from datasets import load_dataset
dataset = load_dataset("liwu/MNBVC", 'news_peoples_daily', split='train')
### Expected behavior
the dataset can be safely loaded
### Environment info
- `datasets` version: 2.4.0
- Platform: Linux-3.10.0-1160.an7.x86_64-x86_64-with-centos-7.9
- Python version: 3.6.8
- PyArrow version: 6.0.1
- Pandas version: 1.1.5
Thank you for checking this issue in detail.
However, it seems that using `np.uint64(simhash)` does not work. The same issue still exists.
https://huggingface.co/datasets/liwu/MNBVC/commit/1e44f1e400b7e61052647d44c99cdae3bae9c830
Anyway, we decide to use string type for these simhash values. Hope pyarrow can fix their bug soon. | [
-1.1762616634368896,
-0.9247037172317505,
-0.6230241060256958,
1.4585685729980469,
-0.14434967935085297,
-1.2286900281906128,
0.1393262892961502,
-1.0940488576889038,
1.5033583641052246,
-0.7691389322280884,
0.19321289658546448,
-1.62937331199646,
-0.03561179339885712,
-0.6604982018470764,
-0.6882392168045044,
-0.8129012584686279,
-0.361989825963974,
-0.8227675557136536,
1.0431866645812988,
2.3925468921661377,
1.2505486011505127,
-1.408920168876648,
2.7824151515960693,
0.6825370788574219,
-0.20309175550937653,
-1.054370403289795,
0.521984875202179,
-0.03009789250791073,
-1.2089860439300537,
-0.4994511306285858,
-0.9603615999221802,
-0.04494495689868927,
-0.6983826756477356,
-0.2958213984966278,
-0.06136200577020645,
0.49751541018486023,
-0.2868650555610657,
-0.26016104221343994,
-0.6542292833328247,
-0.8028631806373596,
0.4872623682022095,
-0.30537691712379456,
0.9940378665924072,
-0.2985031008720398,
1.7195252180099487,
-0.5278900265693665,
0.5129393339157104,
0.7728586792945862,
1.2549495697021484,
0.1455172747373581,
-0.005483354441821575,
0.17838171124458313,
0.3448973000049591,
-0.022550689056515694,
0.5746480822563171,
1.1444342136383057,
0.6330298185348511,
0.598852813243866,
0.599375307559967,
-2.243001699447632,
1.3773010969161987,
-0.9879947304725647,
0.32696884870529175,
1.4226408004760742,
-0.8353627920150757,
0.38619914650917053,
-1.785841941833496,
-0.07360874116420746,
0.6276602745056152,
-2.237729549407959,
0.338153213262558,
-1.3090678453445435,
-0.5454554557800293,
0.9418737888336182,
0.43150123953819275,
-1.2069313526153564,
0.15500889718532562,
-0.47202345728874207,
1.104017734527588,
0.48756131529808044,
0.9366675615310669,
-1.7019485235214233,
-0.04209116846323013,
-0.16377580165863037,
0.1461993008852005,
-1.286113977432251,
-1.644670009613037,
0.6083168983459473,
0.5259932279586792,
0.6636841893196106,
-0.10380077362060547,
1.086626410484314,
-1.1188957691192627,
0.8417633175849915,
-1.0548826456069946,
-1.5459098815917969,
-1.3458787202835083,
-2.466904878616333,
-2.311518669128418,
0.6955347061157227,
-0.5233387351036072,
-0.44690626859664917,
2.088641881942749,
-0.966562032699585,
-1.6703218221664429,
1.1264820098876953,
0.30232757329940796,
0.04682980105280876,
2.3873140811920166,
0.24626603722572327,
-0.6891911029815674,
0.45248350501060486,
-0.8272844552993774,
0.8597055077552795,
-0.346079021692276,
1.3451508283615112,
0.50091153383255,
-1.0315046310424805,
1.5519105195999146,
-0.4789595603942871,
0.5700971484184265,
-0.60723876953125,
-0.5410104990005493,
-0.7463903427124023,
0.23539161682128906,
1.8108872175216675,
-0.24211794137954712,
1.5046766996383667,
-0.33385032415390015,
-1.523521900177002,
-1.5460160970687866,
0.952671229839325,
0.3560183048248291,
-0.9489750862121582,
0.0910845398902893,
-0.4977193772792816,
0.14318189024925232,
-0.13936716318130493,
1.1906111240386963,
1.2886799573898315,
0.6971879601478577,
-0.4024360477924347,
-0.7789167165756226,
0.10234799981117249,
-0.15253566205501556,
-0.7396536469459534,
-1.8579232692718506,
-0.24570123851299286,
0.12445428967475891,
0.6728820204734802,
-1.1261537075042725,
1.855181097984314,
0.934597909450531,
1.9521780014038086,
0.9943413734436035,
-0.48492303490638733,
1.3914802074432373,
0.04059218615293503,
1.8002259731292725,
-0.6067976951599121,
0.558914303779602,
-0.36773809790611267,
-1.1631113290786743,
0.9709139466285706,
-0.2738177478313446,
-2.009168863296509,
-0.745482861995697,
-0.7535560727119446,
-0.2692214846611023,
-0.7670236229896545,
0.9141814708709717,
-0.2732831537723541,
-1.4543362855911255,
0.12517136335372925,
-0.6119828820228577,
0.29110288619995117,
-1.1510542631149292,
0.285444974899292,
0.725890576839447,
-0.6120870113372803,
-0.07735779881477356,
-0.2089637815952301,
-1.330212950706482,
-0.5215833783149719,
0.48665526509284973,
1.8116934299468994,
-0.5667157173156738,
0.8790807723999023,
1.0090869665145874,
-0.6268512606620789,
0.0389397032558918,
0.1975218504667282,
-0.26886725425720215,
0.7261554002761841,
-1.0447674989700317,
-0.5574946999549866,
1.2064483165740967,
-0.38471826910972595,
-0.6486994028091431,
1.4577922821044922,
0.7289041876792908,
-1.118531346321106,
-0.24567911028862,
-0.2293718308210373,
-0.8800218105316162,
0.032976169139146805,
-1.4954297542572021,
-0.09434919059276581,
0.550826370716095,
-1.5789076089859009,
-0.31963446736335754,
-0.09841881692409515,
1.4366116523742676,
-0.19776298105716705,
1.472253441810608,
-0.37545710802078247,
-0.10168279707431793,
-0.2564363479614258,
-0.5066017508506775,
0.23084822297096252,
-0.14738857746124268,
-0.418671578168869,
0.08640749752521515,
-0.8375027179718018,
0.3157399892807007,
1.5394152402877808,
0.21569539606571198,
0.03482953459024429,
0.4134470224380493,
1.0643731355667114,
0.4102255702018738,
-0.007208403665572405,
-0.8875563144683838,
-1.50822913646698,
1.9638539552688599,
-1.4832971096038818,
1.9787298440933228,
0.7874236106872559,
-0.053156331181526184,
-1.7951339483261108,
-1.7672888040542603,
1.2673828601837158,
1.0972920656204224,
2.229739189147949,
0.47134125232696533,
0.3349563777446747,
-0.8238469958305359,
-0.694787859916687,
0.36256444454193115,
-0.9606155157089233,
-0.6255032420158386,
0.13999278843402863,
2.375483274459839,
1.834527611732483,
-0.45767688751220703,
-0.2720031440258026,
-0.8556336164474487,
1.4308830499649048,
-0.3380816578865051,
0.29439878463745117,
2.116771697998047,
-0.3589145243167877,
-1.0198100805282593,
1.3610142469406128,
-2.484593629837036,
0.36596888303756714,
2.1096596717834473,
0.340414434671402,
0.20163217186927795,
-1.3267980813980103,
-0.5849202871322632,
-0.37331536412239075,
-0.4684607684612274,
-1.2272006273269653,
0.5623845458030701,
-0.2827763855457306,
-0.7399104237556458,
-1.3986870050430298,
0.1945914775133133,
-1.1507538557052612,
-1.7531605958938599,
0.34805533289909363,
1.8999054431915283,
2.155256509780884,
-0.7588023543357849,
1.4698991775512695,
-0.38263317942619324,
0.09901097416877747,
1.2179597616195679,
1.374553918838501,
3.077659845352173,
1.810241937637329,
-1.337890386581421,
0.6596903204917908,
-0.17866995930671692,
-0.5034840106964111,
1.1124389171600342,
-1.0623687505722046,
1.2398581504821777,
-0.17071270942687988,
-1.2034655809402466,
-1.2868224382400513,
1.0398658514022827,
0.4674055874347687,
0.11945199966430664,
-0.5598062872886658,
1.2255289554595947,
0.13693910837173462,
1.3448519706726074,
0.6972441077232361,
-0.4765629768371582,
0.4724639058113098,
-0.348842591047287,
-0.6476726531982422,
1.570311427116394,
0.24667364358901978,
-1.5608203411102295,
-2.2581100463867188,
-0.2937113046646118,
-0.9053738713264465,
0.024227403104305267,
-0.6416811943054199,
-1.0239797830581665,
1.5580999851226807,
0.3897104561328888,
-1.1713966131210327,
-0.3151242136955261,
-0.2941959500312805,
-0.43520644307136536,
2.6904094219207764,
-1.2411267757415771,
-0.09997034072875977,
-0.9038124084472656,
-0.6579437851905823,
1.6498357057571411,
-1.3010914325714111,
-0.2625711262226105,
-1.1074391603469849,
-0.6877467036247253,
-1.2251993417739868,
-0.4133290946483612,
0.1027279645204544,
-0.9914187788963318,
0.7880914807319641,
0.22597111761569977,
-1.1758074760437012,
-0.3859699070453644,
-0.869469404220581,
1.0891849994659424,
-0.1976921409368515,
0.22708185017108917,
1.7629752159118652,
0.2566469609737396,
-0.47827866673469543,
0.8519090414047241,
1.2177010774612427,
0.658666729927063,
-0.6529871821403503,
-0.03931864723563194,
-0.6584813594818115,
0.45352044701576233,
-1.311294674873352,
0.2528330087661743,
-3.0593957901000977,
0.6207709908485413,
-0.10594996809959412,
-0.14613206684589386,
-0.1264810711145401,
-1.4249935150146484,
1.0488730669021606,
2.5046608448028564,
-1.256823182106018,
0.557610809803009,
0.47937580943107605,
1.112303614616394,
-1.6468981504440308,
0.27189692854881287,
-0.5080119371414185,
2.0675039291381836,
0.1439409703016281,
1.219714879989624,
-0.509819746017456,
-2.33502459526062,
0.6333411931991577,
-1.2520041465759277,
-1.0749415159225464,
0.7903345227241516,
-0.9026759266853333,
0.266679048538208,
-1.4419418573379517,
-0.18356449902057648,
-0.9756885766983032,
-1.26425039768219,
0.682779848575592,
0.14052636921405792,
0.3753029704093933,
-0.5856676697731018,
0.29137784242630005,
-2.1812310218811035,
-1.3824001550674438,
-0.12387068569660187,
-0.9447868466377258,
0.5564262270927429,
-0.521522581577301,
0.5821380615234375,
-0.0507662296295166,
0.06434029340744019,
0.32992276549339294,
1.6008200645446777,
3.381647825241089,
0.11128176748752594,
0.24053910374641418,
-0.21919837594032288,
-0.9459978342056274,
1.4442030191421509,
0.8860669136047363,
-0.054259538650512695,
-0.5533403158187866,
-0.95628422498703,
1.331786036491394,
2.009953498840332,
1.0018335580825806,
-0.00041266903281211853,
-0.840866208076477,
-0.6618966460227966,
-0.0342835858464241,
0.17438559234142303,
0.5765284895896912,
0.9152258038520813,
-0.04538838565349579,
0.01683579571545124,
1.3268201351165771,
1.1365312337875366,
-0.2748872935771942,
0.32656699419021606,
-0.9081598520278931,
-0.4110753536224365,
0.47190749645233154,
0.15363086760044098,
-0.019246606156229973,
0.5131422877311707,
-0.9745264053344727,
-0.21659646928310394,
-0.37573179602622986,
-0.7891838550567627,
-0.7009273767471313,
-0.41273149847984314,
-0.4948112666606903,
1.5993707180023193,
0.16738280653953552,
-0.5451816320419312,
0.12837930023670197,
-0.6797749996185303,
-0.21292631328105927,
-1.1282111406326294,
0.1143844872713089,
-0.0436401329934597,
-0.08609122037887573,
-0.2606874704360962,
1.6539226770401,
-0.9391069412231445,
-2.0718326568603516,
0.10969837009906769,
0.2958947420120239,
-0.23996345698833466,
0.16807478666305542,
1.7960474491119385,
0.4160701632499695,
1.3721204996109009,
1.3150990009307861,
0.9894079566001892,
-0.6445782780647278,
-1.2310564517974854,
0.8038755655288696,
1.0288286209106445,
-1.3874746561050415,
0.9144200086593628,
-0.15717990696430206,
-0.566368579864502,
0.8064784407615662,
1.2903642654418945,
0.44387632608413696,
-2.0211853981018066,
0.8644307255744934,
-1.1255707740783691,
0.9001458883285522,
0.7317468523979187,
0.6984953880310059,
0.28840622305870056,
0.8990054130554199,
-1.1707189083099365,
-1.100110650062561,
-0.6541128158569336,
-0.7138304114341736,
2.000624895095825,
-0.41026878356933594,
0.5623698830604553,
-0.15444160997867584,
-1.177638053894043,
-0.11211837828159332,
0.8766857981681824,
0.4166323244571686,
-0.44733235239982605,
0.799619734287262,
-0.6837254166603088,
-0.9884839653968811,
-1.214392066001892,
-0.37345167994499207,
-1.0620453357696533,
-0.944538950920105,
1.0505266189575195,
0.6895244717597961,
0.4158182144165039,
1.9431451559066772,
0.6253733038902283,
0.3246203362941742,
-2.527881383895874,
0.8415045142173767,
0.26492980122566223,
-0.11494213342666626,
0.8261486887931824,
0.3537510931491852,
1.1679987907409668,
0.08232831954956055,
0.623347818851471,
-2.4393272399902344,
2.260240077972412,
-0.20372778177261353,
0.6312507390975952,
0.017662402242422104,
-0.21254783868789673,
1.1736418008804321,
0.6529061794281006,
0.4578113257884979,
-1.104799509048462,
0.7180254459381104,
-0.4621584713459015,
1.1456851959228516,
0.9113523364067078,
-0.8403063416481018,
-0.007954923436045647,
1.4654054641723633,
0.49717220664024353,
-0.6057704091072083,
-0.9970691204071045,
-0.9322783350944519,
0.9453725814819336,
1.5767844915390015,
-0.07055024802684784,
-0.07633432745933533,
0.7159013152122498,
0.7023482322692871,
-1.161552906036377,
0.15889564156532288,
-0.5681635737419128,
-0.7004780769348145,
1.630713939666748,
2.0422074794769287,
-0.19017145037651062,
-0.06376352906227112,
-0.7494705319404602,
-1.3016865253448486,
0.7677284479141235,
-0.1436961144208908,
0.014877179637551308,
0.5492249131202698,
-0.5706297159194946,
0.977260410785675,
0.6360872983932495,
0.908020555973053,
0.06226002052426338,
0.281788170337677,
0.44643333554267883,
-0.3916984498500824,
-1.1745285987854004,
-0.33801478147506714,
-1.154611349105835,
-2.658339262008667,
0.3880119025707245,
-0.23700055480003357,
-1.4862537384033203,
0.01468132995069027,
-1.0090603828430176,
0.9358164668083191,
-0.6376942992210388,
-1.176125168800354,
-1.4712334871292114,
0.360334575176239,
-0.058599989861249924,
0.9662954807281494,
-1.6515558958053589,
-0.1993090957403183,
1.1927695274353027,
0.7741493582725525,
-0.668089747428894,
1.0016119480133057,
0.24964243173599243,
1.0362894535064697,
0.6340256333351135,
-0.4061689078807831,
0.6797285676002502,
0.06717504560947418,
-1.4208848476409912,
0.44545984268188477,
1.308998942375183,
0.14614665508270264,
1.3993756771087646,
-0.3841182589530945,
0.06869162619113922,
0.4404835104942322,
-0.6734300851821899,
-0.5397960543632507,
-0.28169190883636475,
0.6443631052970886,
0.007714562118053436,
-0.9254955053329468,
-0.11194711923599243,
-0.16906090080738068,
-0.41222140192985535,
0.1581481546163559,
-1.5041241645812988,
-0.29095155000686646,
-0.5302702784538269,
-0.364000529050827,
-1.4141911268234253,
-0.05780620872974396,
1.4289921522140503,
-0.589825451374054,
-0.3012985289096832,
0.5323160290718079,
0.4092912971973419,
0.530846118927002,
0.6732056736946106,
-0.7329305410385132,
-0.20324386656284332,
-0.34253111481666565,
-0.31672602891921997,
0.2989298701286316,
1.3095061779022217,
-0.05683958902955055,
-0.8636912703514099,
0.6179337501525879,
-0.3324441909790039,
0.14743833243846893,
1.9672505855560303,
0.09742502868175507,
-0.7733843326568604,
0.38436272740364075,
-0.721926212310791,
1.792765736579895,
1.7133984565734863,
1.1915749311447144,
-0.13933801651000977,
-0.8314000964164734,
0.6366088390350342,
-0.39892008900642395,
-0.3217827379703522,
0.86017906665802,
0.36420518159866333,
-0.28041326999664307,
-1.4190144538879395,
0.7639573812484741,
1.1921576261520386,
-0.737151026725769,
-0.7960771322250366,
0.1322237104177475,
-0.8050863146781921,
1.176648736000061,
0.4999254047870636,
0.38745731115341187,
0.3044775724411011,
1.6223217248916626,
0.7692764401435852,
-0.4872853755950928,
0.6458431482315063,
0.5187392234802246,
-0.28878292441368103,
-2.079724073410034,
-1.1608163118362427,
0.27273792028427124,
-0.5748294591903687,
-1.5655362606048584,
1.4023513793945312,
-1.114630937576294,
-1.096436619758606,
0.5460475087165833,
0.09677718579769135,
1.2447233200073242,
0.41991814970970154,
1.5688084363937378,
2.103789806365967,
0.8155777454376221,
0.5390207171440125,
1.2862434387207031,
-0.159376859664917,
-0.4521823227405548,
1.8795382976531982,
-0.38428014516830444,
0.5016838312149048,
1.1581175327301025,
-0.41211098432540894,
-1.102716088294983,
-0.7747728228569031,
-1.1682194471359253,
-0.6744353771209717,
1.1431742906570435,
0.07622934877872467,
-1.0421686172485352,
0.2716732621192932,
1.622120976448059,
0.08820609748363495,
-0.22200343012809753,
0.703283429145813,
0.32436659932136536,
-0.6908904314041138,
-0.11156781017780304,
-0.9416797757148743,
0.5537037253379822,
-0.28144145011901855,
-0.33987075090408325,
0.3591698706150055,
0.5387685894966125,
1.3376744985580444,
-0.11031661927700043,
0.18474337458610535,
0.9970057010650635,
-1.4650135040283203,
1.3844997882843018,
-0.5853704810142517,
0.30197423696517944,
-2.352820873260498,
1.2946250438690186,
-0.6360293626785278,
2.057718515396118,
-2.602847099304199,
0.38699036836624146,
-0.5870209336280823,
-0.5872631072998047,
0.3384493887424469,
-0.31612303853034973,
0.1045784205198288,
-0.14774683117866516,
-1.0302841663360596,
0.061932485550642014,
-0.6207203269004822,
0.6071435809135437,
1.1418060064315796,
1.4230051040649414,
-1.1044481992721558,
-0.2512376010417938,
-1.6623164415359497,
-0.18058790266513824,
-0.8065140247344971,
0.278721421957016,
-1.967067837715149,
-0.17367319762706757,
-1.9710816144943237,
-2.3137624263763428,
-1.2983721494674683,
-0.8526908159255981,
1.1133217811584473,
0.21200932562351227,
-0.9097946286201477,
1.317286729812622,
-0.31240472197532654,
-1.8182117938995361,
1.0673296451568604,
-2.159895181655884
] |
https://github.com/huggingface/datasets/issues/5997 | extend the map function so it can wrap around long text that does not fit in the context window | I just noticed the [docs](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2881C11-L2881C200) say:
>If batched is `True` and `batch_size` is `n > 1`, then the function takes a batch of `n` examples as input and can return a batch with `n` examples, or with an arbitrary number of examples.
so maybe this is a bug then. | ### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help | 78 | 49 | extend the map function so it can wrap around long text that does not fit in the context window
### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help
I just noticed the [docs](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2881C11-L2881C200) say:
>If batched is `True` and `batch_size` is `n > 1`, then the function takes a batch of `n` examples as input and can return a batch with `n` examples, or with an arbitrary number of examples.
so maybe this is a bug then. | [
-1.2166025638580322,
-0.9722899794578552,
-0.6985161304473877,
1.427617073059082,
-0.13356052339076996,
-1.2356170415878296,
0.14591366052627563,
-1.1391704082489014,
1.6443456411361694,
-0.7648441195487976,
0.2505376636981964,
-1.6911263465881348,
-0.14188256859779358,
-0.517962634563446,
-0.6827812194824219,
-0.9246981143951416,
-0.35639458894729614,
-0.8597300052642822,
1.019790768623352,
2.480632781982422,
1.2485073804855347,
-1.3777484893798828,
2.7444450855255127,
0.7121598124504089,
-0.23334087431430817,
-0.9995334148406982,
0.5758583545684814,
0.03464069217443466,
-1.223245620727539,
-0.48274728655815125,
-0.9774343967437744,
-0.03855539485812187,
-0.5761857032775879,
-0.4884428083896637,
0.06825186312198639,
0.4323905110359192,
-0.2636573910713196,
-0.2761514484882355,
-0.6057116985321045,
-0.772591233253479,
0.5086706280708313,
-0.3691103458404541,
0.9513857364654541,
-0.32053837180137634,
1.7728092670440674,
-0.6229838132858276,
0.4421302080154419,
0.7652153968811035,
1.3203712701797485,
0.1817668378353119,
0.019709546118974686,
0.22790934145450592,
0.3997880220413208,
-0.04348462074995041,
0.5423682928085327,
1.2068418264389038,
0.6527655124664307,
0.5339094400405884,
0.7144250273704529,
-2.2554197311401367,
1.2857038974761963,
-0.9669944643974304,
0.32953011989593506,
1.3645274639129639,
-0.8522913455963135,
0.380319744348526,
-1.8346549272537231,
-0.09183825552463531,
0.5647116899490356,
-2.258610248565674,
0.23907481133937836,
-1.323809027671814,
-0.5575573444366455,
0.9357355237007141,
0.31605440378189087,
-1.2392454147338867,
0.2200183868408203,
-0.4347860813140869,
1.0583661794662476,
0.4966001510620117,
1.120951533317566,
-1.749932885169983,
-0.06840859353542328,
-0.21027041971683502,
0.12337977439165115,
-1.2618449926376343,
-1.57327139377594,
0.5975277423858643,
0.5101959109306335,
0.5828303694725037,
-0.11335676163434982,
1.063184142112732,
-1.0440146923065186,
0.8013079166412354,
-0.9505916833877563,
-1.6817923784255981,
-1.4019807577133179,
-2.250971555709839,
-2.281952381134033,
0.7567247748374939,
-0.5418213605880737,
-0.4742338955402374,
1.9630998373031616,
-0.9666968584060669,
-1.696410059928894,
1.100064754486084,
0.3102186322212219,
0.1108943298459053,
2.414141893386841,
0.32214078307151794,
-0.7154701352119446,
0.42840874195098877,
-0.8003818988800049,
0.844386875629425,
-0.3349349796772003,
1.346828579902649,
0.47453823685646057,
-0.9874034523963928,
1.5847795009613037,
-0.4444900155067444,
0.5034924745559692,
-0.6534520387649536,
-0.4764472246170044,
-0.754146158695221,
0.2894860804080963,
1.8347266912460327,
-0.36802437901496887,
1.5517295598983765,
-0.31752416491508484,
-1.557708978652954,
-1.5029970407485962,
0.8202567100524902,
0.5309237837791443,
-0.8816314339637756,
0.06167195737361908,
-0.4458463490009308,
0.17697876691818237,
-0.05463770776987076,
1.2103556394577026,
1.2594223022460938,
0.74123215675354,
-0.3739878237247467,
-0.831913948059082,
0.1556914895772934,
-0.13461878895759583,
-0.7467656135559082,
-1.8019828796386719,
-0.37890875339508057,
0.23777714371681213,
0.644284188747406,
-1.2355446815490723,
1.772485375404358,
0.9454552531242371,
1.9657037258148193,
0.9520209431648254,
-0.4906747341156006,
1.4328700304031372,
0.022991934791207314,
1.8789163827896118,
-0.5522089600563049,
0.6666421890258789,
-0.3806804120540619,
-1.1719616651535034,
0.9056177735328674,
-0.31623923778533936,
-1.9473536014556885,
-0.804843544960022,
-0.7808870673179626,
-0.18416061997413635,
-0.7542668581008911,
0.8870508074760437,
-0.36861878633499146,
-1.4380414485931396,
0.14720013737678528,
-0.6958590745925903,
0.12177572399377823,
-1.2376089096069336,
0.22618307173252106,
0.6841542720794678,
-0.657296895980835,
0.031927578151226044,
-0.28193044662475586,
-1.261880874633789,
-0.5407517552375793,
0.1839565634727478,
1.9150197505950928,
-0.6486231088638306,
0.9563965797424316,
0.9614563584327698,
-0.7657002806663513,
0.04201558977365494,
0.29599830508232117,
-0.330081969499588,
0.7901484370231628,
-1.1202389001846313,
-0.5070539116859436,
1.1734106540679932,
-0.15201686322689056,
-0.6956855654716492,
1.4614057540893555,
0.7538911700248718,
-1.0174450874328613,
-0.28261798620224,
-0.23270048201084137,
-0.8129658699035645,
0.01654912531375885,
-1.5084035396575928,
-0.17447249591350555,
0.41493844985961914,
-1.441373348236084,
-0.4641861319541931,
-0.21877773106098175,
1.3538124561309814,
-0.20637139678001404,
1.4178115129470825,
-0.3371536433696747,
-0.21041160821914673,
-0.37745845317840576,
-0.49182429909706116,
0.14892792701721191,
-0.21931961178779602,
-0.6366053223609924,
0.24391114711761475,
-0.8750870227813721,
0.28826358914375305,
1.50423002243042,
0.33123865723609924,
-0.017307858914136887,
0.45655393600463867,
1.1244356632232666,
0.39582908153533936,
-0.04977226257324219,
-0.8950857520103455,
-1.4612904787063599,
1.9888322353363037,
-1.5243221521377563,
1.9588191509246826,
0.8238694071769714,
-0.04307632893323898,
-1.7885630130767822,
-1.8321168422698975,
1.294246792793274,
1.1675649881362915,
2.385721445083618,
0.5679405927658081,
0.3984829783439636,
-0.7899248600006104,
-0.683035135269165,
0.3399812579154968,
-1.0486369132995605,
-0.669922947883606,
0.16101142764091492,
2.3665716648101807,
1.8453409671783447,
-0.5656418204307556,
-0.21946504712104797,
-0.9653517007827759,
1.3628848791122437,
-0.19797354936599731,
0.23303550481796265,
1.9987072944641113,
-0.29996341466903687,
-1.0792732238769531,
1.2661110162734985,
-2.3484737873077393,
0.12335675209760666,
2.0548207759857178,
0.3128091096878052,
0.18060925602912903,
-1.3914391994476318,
-0.6924875378608704,
-0.31464684009552,
-0.4240116775035858,
-1.2657554149627686,
0.5483973026275635,
-0.22239284217357635,
-0.8714297413825989,
-1.5060685873031616,
0.11670345813035965,
-1.132217526435852,
-1.7263062000274658,
0.2646632492542267,
1.927724003791809,
2.1439242362976074,
-0.7832164168357849,
1.4756534099578857,
-0.34117284417152405,
0.059039123356342316,
1.2242213487625122,
1.2896782159805298,
3.003368854522705,
1.8593703508377075,
-1.2751907110214233,
0.7078196406364441,
-0.1899116337299347,
-0.512108325958252,
1.1517971754074097,
-1.1067891120910645,
1.1678558588027954,
-0.19100835919380188,
-1.1687116622924805,
-1.2203271389007568,
1.040063500404358,
0.45042499899864197,
0.01633669249713421,
-0.5393415093421936,
1.246932029724121,
0.1415116935968399,
1.3679487705230713,
0.6173400282859802,
-0.37538039684295654,
0.5684879422187805,
-0.3818801939487457,
-0.4750318229198456,
1.6534018516540527,
0.16590555012226105,
-1.449156403541565,
-2.3722212314605713,
-0.18617017567157745,
-0.9395772218704224,
0.042311057448387146,
-0.5863437056541443,
-1.0208932161331177,
1.6840753555297852,
0.39299625158309937,
-1.239668369293213,
-0.2650045156478882,
-0.3630236089229584,
-0.5575060844421387,
2.628718376159668,
-1.2711520195007324,
-0.18473710119724274,
-0.9040444493293762,
-0.5799856185913086,
1.6324942111968994,
-1.1674623489379883,
-0.17380590736865997,
-0.9957355856895447,
-0.5792425274848938,
-1.3693962097167969,
-0.4994325637817383,
0.060222841799259186,
-0.9455181956291199,
0.7618774175643921,
0.17031341791152954,
-1.0917214155197144,
-0.327169269323349,
-0.8436585664749146,
0.9967096447944641,
-0.11225894838571548,
0.17891180515289307,
1.9496158361434937,
0.3582511842250824,
-0.43123990297317505,
0.7539481520652771,
1.221834421157837,
0.5890848636627197,
-0.6635978817939758,
0.12223639339208603,
-0.6698088049888611,
0.3532566726207733,
-1.3674674034118652,
0.1578475832939148,
-2.9232029914855957,
0.7269130349159241,
-0.13424447178840637,
-0.14415663480758667,
0.022219376638531685,
-1.222449779510498,
1.0959280729293823,
2.585707426071167,
-1.2095237970352173,
0.46299391984939575,
0.3991733491420746,
1.2038942575454712,
-1.5597041845321655,
0.3127971291542053,
-0.43905600905418396,
2.0313608646392822,
0.2459334135055542,
1.2309598922729492,
-0.5410352349281311,
-2.220094919204712,
0.5616302490234375,
-1.239213228225708,
-1.1125168800354004,
0.8533455729484558,
-0.8829236030578613,
0.15352614223957062,
-1.5143253803253174,
-0.15502656996250153,
-0.9031116366386414,
-1.2519375085830688,
0.72852623462677,
0.10112061351537704,
0.37534594535827637,
-0.5886557698249817,
0.38483718037605286,
-2.152273654937744,
-1.4051271677017212,
-0.24221031367778778,
-0.9654675722122192,
0.5481072664260864,
-0.37203505635261536,
0.7233348488807678,
-0.12194967269897461,
0.03548024594783783,
0.291909396648407,
1.401009202003479,
3.3814539909362793,
0.24081584811210632,
0.25175413489341736,
-0.1845243275165558,
-1.0022052526474,
1.4756217002868652,
0.9814021587371826,
-0.10870932787656784,
-0.5086196660995483,
-1.0683435201644897,
1.251056432723999,
1.9818634986877441,
1.0205376148223877,
0.07491350919008255,
-0.8545359373092651,
-0.7120177745819092,
0.0067361388355493546,
0.20444431900978088,
0.44625210762023926,
0.8959065079689026,
0.018848825246095657,
0.07893189787864685,
1.470249056816101,
1.1541467905044556,
-0.37780508399009705,
0.39371246099472046,
-0.8691822290420532,
-0.39831867814064026,
0.48350274562835693,
0.22457224130630493,
0.03486409783363342,
0.4416511654853821,
-1.0396071672439575,
-0.2993975877761841,
-0.3284819722175598,
-0.9136383533477783,
-0.6970807313919067,
-0.43399590253829956,
-0.3897983133792877,
1.5542631149291992,
0.07542141526937485,
-0.4634702801704407,
0.0969017744064331,
-0.7627134919166565,
-0.11649659276008606,
-1.181173324584961,
0.2554126977920532,
-0.1199212297797203,
-0.06664972007274628,
-0.18816950917243958,
1.784174919128418,
-0.8410755395889282,
-2.0557894706726074,
0.17017225921154022,
0.35317450761795044,
-0.34745681285858154,
0.23166407644748688,
1.7214866876602173,
0.5178409218788147,
1.3841732740402222,
1.2682154178619385,
0.9688531756401062,
-0.5981484055519104,
-1.2513720989227295,
0.7224057912826538,
0.96424400806427,
-1.3783222436904907,
0.8855141401290894,
-0.09844518452882767,
-0.48001906275749207,
0.652736485004425,
1.305289626121521,
0.4233657717704773,
-1.9658281803131104,
0.830879271030426,
-0.9363168478012085,
0.8170276284217834,
0.7407962083816528,
0.7734100222587585,
0.1754944622516632,
0.8271588683128357,
-1.2377976179122925,
-1.171210527420044,
-0.7664824724197388,
-0.6299747824668884,
1.9492918252944946,
-0.19146548211574554,
0.6096842885017395,
-0.22184357047080994,
-1.2251999378204346,
-0.11303547769784927,
0.7421141862869263,
0.3261552155017853,
-0.4604843854904175,
0.9107536673545837,
-0.6195149421691895,
-0.946180522441864,
-1.2804690599441528,
-0.4095495343208313,
-1.0766146183013916,
-0.9222763180732727,
1.0813790559768677,
0.7806516885757446,
0.399128794670105,
1.9343128204345703,
0.6530673503875732,
0.3023611009120941,
-2.5964527130126953,
0.9107135534286499,
0.29755648970603943,
-0.07431835681200027,
0.9190365672111511,
0.33460330963134766,
1.104637622833252,
-0.0105834249407053,
0.578618586063385,
-2.4098215103149414,
2.2461886405944824,
-0.16843223571777344,
0.6799970865249634,
0.06438887864351273,
-0.17777636647224426,
1.1473214626312256,
0.5897118449211121,
0.5361572504043579,
-1.0812010765075684,
0.6061567068099976,
-0.5799499750137329,
1.1487778425216675,
0.9090904593467712,
-0.821736216545105,
0.015723148360848427,
1.3744268417358398,
0.5277044773101807,
-0.4337417483329773,
-0.9771600961685181,
-0.884512722492218,
1.0247381925582886,
1.6972295045852661,
-0.09243951737880707,
-0.009889080189168453,
0.856399655342102,
0.5786241888999939,
-1.2893701791763306,
0.03622829169034958,
-0.7159327864646912,
-0.6934162974357605,
1.6889647245407104,
2.0672223567962646,
-0.17703670263290405,
-0.172150656580925,
-0.665259838104248,
-1.3306385278701782,
0.7608976364135742,
-0.10082926601171494,
0.18480336666107178,
0.7201673984527588,
-0.6971701383590698,
1.0585877895355225,
0.7189964652061462,
0.9170400500297546,
0.198944553732872,
0.2838379144668579,
0.3266259431838989,
-0.3646436631679535,
-1.1509641408920288,
-0.21042759716510773,
-1.1410037279129028,
-2.5923454761505127,
0.43418487906455994,
-0.22350555658340454,
-1.4136128425598145,
0.0658685714006424,
-0.9971053004264832,
0.9586910605430603,
-0.5953951478004456,
-1.0942658185958862,
-1.4985671043395996,
0.31689780950546265,
-0.10579869896173477,
0.9988448023796082,
-1.6447101831436157,
-0.16180352866649628,
1.2175679206848145,
0.9141658544540405,
-0.6681399345397949,
0.9921359419822693,
0.26392489671707153,
1.030217170715332,
0.7711648941040039,
-0.3305725157260895,
0.5615589022636414,
-0.04399215430021286,
-1.3324668407440186,
0.39125367999076843,
1.1617119312286377,
0.19238527119159698,
1.410639762878418,
-0.4536671042442322,
0.0648195669054985,
0.4027266204357147,
-0.5598044991493225,
-0.48000895977020264,
-0.39460211992263794,
0.5962421298027039,
0.15634284913539886,
-1.0262163877487183,
-0.09801606833934784,
-0.05621106177568436,
-0.2729579508304596,
0.2090006321668625,
-1.421974778175354,
-0.2872177064418793,
-0.4392385482788086,
-0.5135618448257446,
-1.2268385887145996,
0.034830473363399506,
1.3219878673553467,
-0.7764761447906494,
-0.22340242564678192,
0.4969639778137207,
0.35235273838043213,
0.5579439401626587,
0.5785695910453796,
-0.7791990637779236,
-0.3505542278289795,
-0.2880153954029083,
-0.2997220456600189,
0.27123531699180603,
1.3340106010437012,
-0.12074611335992813,
-1.0047658681869507,
0.6462370157241821,
-0.33352768421173096,
0.13428834080696106,
2.0044851303100586,
0.02636113204061985,
-0.7772426009178162,
0.261722594499588,
-0.7324491143226624,
1.8158197402954102,
1.6892223358154297,
1.3443493843078613,
-0.14569617807865143,
-0.7542572021484375,
0.5778902173042297,
-0.3291868567466736,
-0.37949472665786743,
0.8860071301460266,
0.3232167959213257,
-0.15515506267547607,
-1.499990701675415,
0.6326157450675964,
1.296875,
-0.8090283870697021,
-0.7938146591186523,
0.10897563397884369,
-0.8024788498878479,
1.1778817176818848,
0.611502468585968,
0.3374863862991333,
0.29275622963905334,
1.5999163389205933,
0.774575412273407,
-0.4585084021091461,
0.48420003056526184,
0.5457634925842285,
-0.0994492694735527,
-2.133531332015991,
-1.1739624738693237,
0.2606363892555237,
-0.4603686034679413,
-1.6196540594100952,
1.379589557647705,
-1.1545861959457397,
-1.0220377445220947,
0.6122280955314636,
0.11239608377218246,
1.3243896961212158,
0.37141749262809753,
1.6127266883850098,
2.140860080718994,
0.8046546578407288,
0.3411138653755188,
1.2403995990753174,
-0.10127172619104385,
-0.46157440543174744,
1.7999905347824097,
-0.4443851709365845,
0.5015315413475037,
0.978516161441803,
-0.30904558300971985,
-1.0962166786193848,
-0.7557536959648132,
-1.240082025527954,
-0.7205211520195007,
1.1534630060195923,
0.11395726352930069,
-1.063114047050476,
0.25857582688331604,
1.5828325748443604,
0.05979456752538681,
-0.3090483844280243,
0.6713491082191467,
0.45674410462379456,
-0.8011326789855957,
0.015903832390904427,
-0.8958575129508972,
0.4551807641983032,
-0.08225154876708984,
-0.3534510135650635,
0.31694576144218445,
0.5034546256065369,
1.3668817281723022,
-0.04923126846551895,
0.1332620531320572,
1.150876522064209,
-1.34929621219635,
1.5321543216705322,
-0.6406397223472595,
0.3165002465248108,
-2.426652431488037,
1.4331802129745483,
-0.7491424083709717,
1.8919024467468262,
-2.6217799186706543,
0.42240211367607117,
-0.5129969120025635,
-0.4839644432067871,
0.20320333540439606,
-0.41372692584991455,
0.15414632856845856,
-0.15120428800582886,
-1.0735669136047363,
-0.007029123604297638,
-0.6834170818328857,
0.556928813457489,
1.0702356100082397,
1.4525165557861328,
-1.1637612581253052,
-0.27244773507118225,
-1.8107514381408691,
-0.08248702436685562,
-0.7645936608314514,
0.26248520612716675,
-1.9951926469802856,
-0.22447355091571808,
-1.8899847269058228,
-2.3947341442108154,
-1.397891879081726,
-0.7969294190406799,
1.1119906902313232,
0.17150098085403442,
-0.9036258459091187,
1.2130450010299683,
-0.3676567077636719,
-1.837427020072937,
1.0793927907943726,
-2.1965525150299072
] |
https://github.com/huggingface/datasets/issues/5997 | extend the map function so it can wrap around long text that does not fit in the context window | All the values in a batch must be of the same length. So one solution is dropping all the input columns:
```python
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True, remove_columns=data.column_names)
```
Another is padding/transforming the input columns to the tokenizer output's length (447). | ### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help | 78 | 46 | extend the map function so it can wrap around long text that does not fit in the context window
### Feature request
I understand `dataset` provides a [`map`](https://github.com/huggingface/datasets/blob/main/src/datasets/arrow_dataset.py#L2849) function. This function in turn takes in a callable that is used to tokenize the text on which a model is trained. Frequently this text will not fit within a models's context window. In this case it would be useful to wrap around the text into multiple rows with each row fitting the model's context window. I tried to do it using this code as example which in turn I have borrowed from [here](https://stackoverflow.com/a/76343993/147530):
```
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
```
but running the code gives me this error:
```
File "/llm/fine-tune.py", line 117, in <module>
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 580, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 545, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3087, in map
for rank, done, content in Dataset._map_single(**dataset_kwargs):
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 3480, in _map_single
writer.write_batch(batch)
File "/llm/.env/lib/python3.9/site-packages/datasets/arrow_writer.py", line 556, in write_batch
pa_table = pa.Table.from_arrays(arrays, schema=schema)
File "pyarrow/table.pxi", line 3798, in pyarrow.lib.Table.from_arrays
File "pyarrow/table.pxi", line 2962, in pyarrow.lib.Table.validate
File "pyarrow/error.pxi", line 100, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 394 but got length 447
```
The lambda function I have provided is correctly chopping up long text so it wraps around (and because of this 394 samples become 447 after wrap around) but the dataset `map` function does not like it.
### Motivation
please see above
### Your contribution
I'm afraid I don't have much knowledge to help
All the values in a batch must be of the same length. So one solution is dropping all the input columns:
```python
data = data.map(lambda samples: tokenizer(samples["text"], max_length=tokenizer.model_max_length, truncation=True, stride=4, return_overflowing_tokens=True), batched=True, remove_columns=data.column_names)
```
Another is padding/transforming the input columns to the tokenizer output's length (447). | [
-1.2166025638580322,
-0.9722899794578552,
-0.6985161304473877,
1.427617073059082,
-0.13356052339076996,
-1.2356170415878296,
0.14591366052627563,
-1.1391704082489014,
1.6443456411361694,
-0.7648441195487976,
0.2505376636981964,
-1.6911263465881348,
-0.14188256859779358,
-0.517962634563446,
-0.6827812194824219,
-0.9246981143951416,
-0.35639458894729614,
-0.8597300052642822,
1.019790768623352,
2.480632781982422,
1.2485073804855347,
-1.3777484893798828,
2.7444450855255127,
0.7121598124504089,
-0.23334087431430817,
-0.9995334148406982,
0.5758583545684814,
0.03464069217443466,
-1.223245620727539,
-0.48274728655815125,
-0.9774343967437744,
-0.03855539485812187,
-0.5761857032775879,
-0.4884428083896637,
0.06825186312198639,
0.4323905110359192,
-0.2636573910713196,
-0.2761514484882355,
-0.6057116985321045,
-0.772591233253479,
0.5086706280708313,
-0.3691103458404541,
0.9513857364654541,
-0.32053837180137634,
1.7728092670440674,
-0.6229838132858276,
0.4421302080154419,
0.7652153968811035,
1.3203712701797485,
0.1817668378353119,
0.019709546118974686,
0.22790934145450592,
0.3997880220413208,
-0.04348462074995041,
0.5423682928085327,
1.2068418264389038,
0.6527655124664307,
0.5339094400405884,
0.7144250273704529,
-2.2554197311401367,
1.2857038974761963,
-0.9669944643974304,
0.32953011989593506,
1.3645274639129639,
-0.8522913455963135,
0.380319744348526,
-1.8346549272537231,
-0.09183825552463531,
0.5647116899490356,
-2.258610248565674,
0.23907481133937836,
-1.323809027671814,
-0.5575573444366455,
0.9357355237007141,
0.31605440378189087,
-1.2392454147338867,
0.2200183868408203,
-0.4347860813140869,
1.0583661794662476,
0.4966001510620117,
1.120951533317566,
-1.749932885169983,
-0.06840859353542328,
-0.21027041971683502,
0.12337977439165115,
-1.2618449926376343,
-1.57327139377594,
0.5975277423858643,
0.5101959109306335,
0.5828303694725037,
-0.11335676163434982,
1.063184142112732,
-1.0440146923065186,
0.8013079166412354,
-0.9505916833877563,
-1.6817923784255981,
-1.4019807577133179,
-2.250971555709839,
-2.281952381134033,
0.7567247748374939,
-0.5418213605880737,
-0.4742338955402374,
1.9630998373031616,
-0.9666968584060669,
-1.696410059928894,
1.100064754486084,
0.3102186322212219,
0.1108943298459053,
2.414141893386841,
0.32214078307151794,
-0.7154701352119446,
0.42840874195098877,
-0.8003818988800049,
0.844386875629425,
-0.3349349796772003,
1.346828579902649,
0.47453823685646057,
-0.9874034523963928,
1.5847795009613037,
-0.4444900155067444,
0.5034924745559692,
-0.6534520387649536,
-0.4764472246170044,
-0.754146158695221,
0.2894860804080963,
1.8347266912460327,
-0.36802437901496887,
1.5517295598983765,
-0.31752416491508484,
-1.557708978652954,
-1.5029970407485962,
0.8202567100524902,
0.5309237837791443,
-0.8816314339637756,
0.06167195737361908,
-0.4458463490009308,
0.17697876691818237,
-0.05463770776987076,
1.2103556394577026,
1.2594223022460938,
0.74123215675354,
-0.3739878237247467,
-0.831913948059082,
0.1556914895772934,
-0.13461878895759583,
-0.7467656135559082,
-1.8019828796386719,
-0.37890875339508057,
0.23777714371681213,
0.644284188747406,
-1.2355446815490723,
1.772485375404358,
0.9454552531242371,
1.9657037258148193,
0.9520209431648254,
-0.4906747341156006,
1.4328700304031372,
0.022991934791207314,
1.8789163827896118,
-0.5522089600563049,
0.6666421890258789,
-0.3806804120540619,
-1.1719616651535034,
0.9056177735328674,
-0.31623923778533936,
-1.9473536014556885,
-0.804843544960022,
-0.7808870673179626,
-0.18416061997413635,
-0.7542668581008911,
0.8870508074760437,
-0.36861878633499146,
-1.4380414485931396,
0.14720013737678528,
-0.6958590745925903,
0.12177572399377823,
-1.2376089096069336,
0.22618307173252106,
0.6841542720794678,
-0.657296895980835,
0.031927578151226044,
-0.28193044662475586,
-1.261880874633789,
-0.5407517552375793,
0.1839565634727478,
1.9150197505950928,
-0.6486231088638306,
0.9563965797424316,
0.9614563584327698,
-0.7657002806663513,
0.04201558977365494,
0.29599830508232117,
-0.330081969499588,
0.7901484370231628,
-1.1202389001846313,
-0.5070539116859436,
1.1734106540679932,
-0.15201686322689056,
-0.6956855654716492,
1.4614057540893555,
0.7538911700248718,
-1.0174450874328613,
-0.28261798620224,
-0.23270048201084137,
-0.8129658699035645,
0.01654912531375885,
-1.5084035396575928,
-0.17447249591350555,
0.41493844985961914,
-1.441373348236084,
-0.4641861319541931,
-0.21877773106098175,
1.3538124561309814,
-0.20637139678001404,
1.4178115129470825,
-0.3371536433696747,
-0.21041160821914673,
-0.37745845317840576,
-0.49182429909706116,
0.14892792701721191,
-0.21931961178779602,
-0.6366053223609924,
0.24391114711761475,
-0.8750870227813721,
0.28826358914375305,
1.50423002243042,
0.33123865723609924,
-0.017307858914136887,
0.45655393600463867,
1.1244356632232666,
0.39582908153533936,
-0.04977226257324219,
-0.8950857520103455,
-1.4612904787063599,
1.9888322353363037,
-1.5243221521377563,
1.9588191509246826,
0.8238694071769714,
-0.04307632893323898,
-1.7885630130767822,
-1.8321168422698975,
1.294246792793274,
1.1675649881362915,
2.385721445083618,
0.5679405927658081,
0.3984829783439636,
-0.7899248600006104,
-0.683035135269165,
0.3399812579154968,
-1.0486369132995605,
-0.669922947883606,
0.16101142764091492,
2.3665716648101807,
1.8453409671783447,
-0.5656418204307556,
-0.21946504712104797,
-0.9653517007827759,
1.3628848791122437,
-0.19797354936599731,
0.23303550481796265,
1.9987072944641113,
-0.29996341466903687,
-1.0792732238769531,
1.2661110162734985,
-2.3484737873077393,
0.12335675209760666,
2.0548207759857178,
0.3128091096878052,
0.18060925602912903,
-1.3914391994476318,
-0.6924875378608704,
-0.31464684009552,
-0.4240116775035858,
-1.2657554149627686,
0.5483973026275635,
-0.22239284217357635,
-0.8714297413825989,
-1.5060685873031616,
0.11670345813035965,
-1.132217526435852,
-1.7263062000274658,
0.2646632492542267,
1.927724003791809,
2.1439242362976074,
-0.7832164168357849,
1.4756534099578857,
-0.34117284417152405,
0.059039123356342316,
1.2242213487625122,
1.2896782159805298,
3.003368854522705,
1.8593703508377075,
-1.2751907110214233,
0.7078196406364441,
-0.1899116337299347,
-0.512108325958252,
1.1517971754074097,
-1.1067891120910645,
1.1678558588027954,
-0.19100835919380188,
-1.1687116622924805,
-1.2203271389007568,
1.040063500404358,
0.45042499899864197,
0.01633669249713421,
-0.5393415093421936,
1.246932029724121,
0.1415116935968399,
1.3679487705230713,
0.6173400282859802,
-0.37538039684295654,
0.5684879422187805,
-0.3818801939487457,
-0.4750318229198456,
1.6534018516540527,
0.16590555012226105,
-1.449156403541565,
-2.3722212314605713,
-0.18617017567157745,
-0.9395772218704224,
0.042311057448387146,
-0.5863437056541443,
-1.0208932161331177,
1.6840753555297852,
0.39299625158309937,
-1.239668369293213,
-0.2650045156478882,
-0.3630236089229584,
-0.5575060844421387,
2.628718376159668,
-1.2711520195007324,
-0.18473710119724274,
-0.9040444493293762,
-0.5799856185913086,
1.6324942111968994,
-1.1674623489379883,
-0.17380590736865997,
-0.9957355856895447,
-0.5792425274848938,
-1.3693962097167969,
-0.4994325637817383,
0.060222841799259186,
-0.9455181956291199,
0.7618774175643921,
0.17031341791152954,
-1.0917214155197144,
-0.327169269323349,
-0.8436585664749146,
0.9967096447944641,
-0.11225894838571548,
0.17891180515289307,
1.9496158361434937,
0.3582511842250824,
-0.43123990297317505,
0.7539481520652771,
1.221834421157837,
0.5890848636627197,
-0.6635978817939758,
0.12223639339208603,
-0.6698088049888611,
0.3532566726207733,
-1.3674674034118652,
0.1578475832939148,
-2.9232029914855957,
0.7269130349159241,
-0.13424447178840637,
-0.14415663480758667,
0.022219376638531685,
-1.222449779510498,
1.0959280729293823,
2.585707426071167,
-1.2095237970352173,
0.46299391984939575,
0.3991733491420746,
1.2038942575454712,
-1.5597041845321655,
0.3127971291542053,
-0.43905600905418396,
2.0313608646392822,
0.2459334135055542,
1.2309598922729492,
-0.5410352349281311,
-2.220094919204712,
0.5616302490234375,
-1.239213228225708,
-1.1125168800354004,
0.8533455729484558,
-0.8829236030578613,
0.15352614223957062,
-1.5143253803253174,
-0.15502656996250153,
-0.9031116366386414,
-1.2519375085830688,
0.72852623462677,
0.10112061351537704,
0.37534594535827637,
-0.5886557698249817,
0.38483718037605286,
-2.152273654937744,
-1.4051271677017212,
-0.24221031367778778,
-0.9654675722122192,
0.5481072664260864,
-0.37203505635261536,
0.7233348488807678,
-0.12194967269897461,
0.03548024594783783,
0.291909396648407,
1.401009202003479,
3.3814539909362793,
0.24081584811210632,
0.25175413489341736,
-0.1845243275165558,
-1.0022052526474,
1.4756217002868652,
0.9814021587371826,
-0.10870932787656784,
-0.5086196660995483,
-1.0683435201644897,
1.251056432723999,
1.9818634986877441,
1.0205376148223877,
0.07491350919008255,
-0.8545359373092651,
-0.7120177745819092,
0.0067361388355493546,
0.20444431900978088,
0.44625210762023926,
0.8959065079689026,
0.018848825246095657,
0.07893189787864685,
1.470249056816101,
1.1541467905044556,
-0.37780508399009705,
0.39371246099472046,
-0.8691822290420532,
-0.39831867814064026,
0.48350274562835693,
0.22457224130630493,
0.03486409783363342,
0.4416511654853821,
-1.0396071672439575,
-0.2993975877761841,
-0.3284819722175598,
-0.9136383533477783,
-0.6970807313919067,
-0.43399590253829956,
-0.3897983133792877,
1.5542631149291992,
0.07542141526937485,
-0.4634702801704407,
0.0969017744064331,
-0.7627134919166565,
-0.11649659276008606,
-1.181173324584961,
0.2554126977920532,
-0.1199212297797203,
-0.06664972007274628,
-0.18816950917243958,
1.784174919128418,
-0.8410755395889282,
-2.0557894706726074,
0.17017225921154022,
0.35317450761795044,
-0.34745681285858154,
0.23166407644748688,
1.7214866876602173,
0.5178409218788147,
1.3841732740402222,
1.2682154178619385,
0.9688531756401062,
-0.5981484055519104,
-1.2513720989227295,
0.7224057912826538,
0.96424400806427,
-1.3783222436904907,
0.8855141401290894,
-0.09844518452882767,
-0.48001906275749207,
0.652736485004425,
1.305289626121521,
0.4233657717704773,
-1.9658281803131104,
0.830879271030426,
-0.9363168478012085,
0.8170276284217834,
0.7407962083816528,
0.7734100222587585,
0.1754944622516632,
0.8271588683128357,
-1.2377976179122925,
-1.171210527420044,
-0.7664824724197388,
-0.6299747824668884,
1.9492918252944946,
-0.19146548211574554,
0.6096842885017395,
-0.22184357047080994,
-1.2251999378204346,
-0.11303547769784927,
0.7421141862869263,
0.3261552155017853,
-0.4604843854904175,
0.9107536673545837,
-0.6195149421691895,
-0.946180522441864,
-1.2804690599441528,
-0.4095495343208313,
-1.0766146183013916,
-0.9222763180732727,
1.0813790559768677,
0.7806516885757446,
0.399128794670105,
1.9343128204345703,
0.6530673503875732,
0.3023611009120941,
-2.5964527130126953,
0.9107135534286499,
0.29755648970603943,
-0.07431835681200027,
0.9190365672111511,
0.33460330963134766,
1.104637622833252,
-0.0105834249407053,
0.578618586063385,
-2.4098215103149414,
2.2461886405944824,
-0.16843223571777344,
0.6799970865249634,
0.06438887864351273,
-0.17777636647224426,
1.1473214626312256,
0.5897118449211121,
0.5361572504043579,
-1.0812010765075684,
0.6061567068099976,
-0.5799499750137329,
1.1487778425216675,
0.9090904593467712,
-0.821736216545105,
0.015723148360848427,
1.3744268417358398,
0.5277044773101807,
-0.4337417483329773,
-0.9771600961685181,
-0.884512722492218,
1.0247381925582886,
1.6972295045852661,
-0.09243951737880707,
-0.009889080189168453,
0.856399655342102,
0.5786241888999939,
-1.2893701791763306,
0.03622829169034958,
-0.7159327864646912,
-0.6934162974357605,
1.6889647245407104,
2.0672223567962646,
-0.17703670263290405,
-0.172150656580925,
-0.665259838104248,
-1.3306385278701782,
0.7608976364135742,
-0.10082926601171494,
0.18480336666107178,
0.7201673984527588,
-0.6971701383590698,
1.0585877895355225,
0.7189964652061462,
0.9170400500297546,
0.198944553732872,
0.2838379144668579,
0.3266259431838989,
-0.3646436631679535,
-1.1509641408920288,
-0.21042759716510773,
-1.1410037279129028,
-2.5923454761505127,
0.43418487906455994,
-0.22350555658340454,
-1.4136128425598145,
0.0658685714006424,
-0.9971053004264832,
0.9586910605430603,
-0.5953951478004456,
-1.0942658185958862,
-1.4985671043395996,
0.31689780950546265,
-0.10579869896173477,
0.9988448023796082,
-1.6447101831436157,
-0.16180352866649628,
1.2175679206848145,
0.9141658544540405,
-0.6681399345397949,
0.9921359419822693,
0.26392489671707153,
1.030217170715332,
0.7711648941040039,
-0.3305725157260895,
0.5615589022636414,
-0.04399215430021286,
-1.3324668407440186,
0.39125367999076843,
1.1617119312286377,
0.19238527119159698,
1.410639762878418,
-0.4536671042442322,
0.0648195669054985,
0.4027266204357147,
-0.5598044991493225,
-0.48000895977020264,
-0.39460211992263794,
0.5962421298027039,
0.15634284913539886,
-1.0262163877487183,
-0.09801606833934784,
-0.05621106177568436,
-0.2729579508304596,
0.2090006321668625,
-1.421974778175354,
-0.2872177064418793,
-0.4392385482788086,
-0.5135618448257446,
-1.2268385887145996,
0.034830473363399506,
1.3219878673553467,
-0.7764761447906494,
-0.22340242564678192,
0.4969639778137207,
0.35235273838043213,
0.5579439401626587,
0.5785695910453796,
-0.7791990637779236,
-0.3505542278289795,
-0.2880153954029083,
-0.2997220456600189,
0.27123531699180603,
1.3340106010437012,
-0.12074611335992813,
-1.0047658681869507,
0.6462370157241821,
-0.33352768421173096,
0.13428834080696106,
2.0044851303100586,
0.02636113204061985,
-0.7772426009178162,
0.261722594499588,
-0.7324491143226624,
1.8158197402954102,
1.6892223358154297,
1.3443493843078613,
-0.14569617807865143,
-0.7542572021484375,
0.5778902173042297,
-0.3291868567466736,
-0.37949472665786743,
0.8860071301460266,
0.3232167959213257,
-0.15515506267547607,
-1.499990701675415,
0.6326157450675964,
1.296875,
-0.8090283870697021,
-0.7938146591186523,
0.10897563397884369,
-0.8024788498878479,
1.1778817176818848,
0.611502468585968,
0.3374863862991333,
0.29275622963905334,
1.5999163389205933,
0.774575412273407,
-0.4585084021091461,
0.48420003056526184,
0.5457634925842285,
-0.0994492694735527,
-2.133531332015991,
-1.1739624738693237,
0.2606363892555237,
-0.4603686034679413,
-1.6196540594100952,
1.379589557647705,
-1.1545861959457397,
-1.0220377445220947,
0.6122280955314636,
0.11239608377218246,
1.3243896961212158,
0.37141749262809753,
1.6127266883850098,
2.140860080718994,
0.8046546578407288,
0.3411138653755188,
1.2403995990753174,
-0.10127172619104385,
-0.46157440543174744,
1.7999905347824097,
-0.4443851709365845,
0.5015315413475037,
0.978516161441803,
-0.30904558300971985,
-1.0962166786193848,
-0.7557536959648132,
-1.240082025527954,
-0.7205211520195007,
1.1534630060195923,
0.11395726352930069,
-1.063114047050476,
0.25857582688331604,
1.5828325748443604,
0.05979456752538681,
-0.3090483844280243,
0.6713491082191467,
0.45674410462379456,
-0.8011326789855957,
0.015903832390904427,
-0.8958575129508972,
0.4551807641983032,
-0.08225154876708984,
-0.3534510135650635,
0.31694576144218445,
0.5034546256065369,
1.3668817281723022,
-0.04923126846551895,
0.1332620531320572,
1.150876522064209,
-1.34929621219635,
1.5321543216705322,
-0.6406397223472595,
0.3165002465248108,
-2.426652431488037,
1.4331802129745483,
-0.7491424083709717,
1.8919024467468262,
-2.6217799186706543,
0.42240211367607117,
-0.5129969120025635,
-0.4839644432067871,
0.20320333540439606,
-0.41372692584991455,
0.15414632856845856,
-0.15120428800582886,
-1.0735669136047363,
-0.007029123604297638,
-0.6834170818328857,
0.556928813457489,
1.0702356100082397,
1.4525165557861328,
-1.1637612581253052,
-0.27244773507118225,
-1.8107514381408691,
-0.08248702436685562,
-0.7645936608314514,
0.26248520612716675,
-1.9951926469802856,
-0.22447355091571808,
-1.8899847269058228,
-2.3947341442108154,
-1.397891879081726,
-0.7969294190406799,
1.1119906902313232,
0.17150098085403442,
-0.9036258459091187,
1.2130450010299683,
-0.3676567077636719,
-1.837427020072937,
1.0793927907943726,
-2.1965525150299072
] |
https://github.com/huggingface/datasets/issues/5993 | ValueError: Table schema does not match schema used to create file | We'll do a new release of `datasets` soon to make the fix available :)
In the meantime you can use `datasets` from source (main) | ### Describe the bug
Saving a dataset as parquet fails with a `ValueError: Table schema does not match schema used to create file` if the dataset was obtained out of a `.select_columns()` call with columns selected out of order.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_parquet("demo.parquet")
```
```shell
>>>
ValueError: Table schema does not match schema used to create file:
table:
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 vs.
file:
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
```
---
I think this is because after the `.select_columns()` call with out of order columns, the output dataset features' schema ends up being out of sync with the schema of the arrow table backing it.
```python
ds.features.arrow_schema
>>>
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
ds.data.schema
>>>
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53
```
So when we call `.to_parquet()`, the call behind the scenes to `datasets.io.parquet.ParquetDatasetWriter(...).write()` which initialises the backend `pyarrow.parquet.ParquetWriter` with `schema = self.dataset.features.arrow_schema` triggers `pyarrow` on write when [it checks](https://github.com/apache/arrow/blob/11b140a734a516e436adaddaeb35d23f30dcce44/python/pyarrow/parquet/core.py#L1086-L1090) that the `ParquetWriter` schema matches the schema of the table being written 🙌
https://github.com/huggingface/datasets/blob/6ed837325cb539a5deb99129e5ad181d0269e050/src/datasets/io/parquet.py#L139-L141
### Expected behavior
The dataset gets successfully saved as parquet.
*In the same way as it does if saving it as csv:
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_csv("demo.csv")
```
### Environment info
`python==3.11`
`datasets==2.13.1`
| 79 | 24 | ValueError: Table schema does not match schema used to create file
### Describe the bug
Saving a dataset as parquet fails with a `ValueError: Table schema does not match schema used to create file` if the dataset was obtained out of a `.select_columns()` call with columns selected out of order.
### Steps to reproduce the bug
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_parquet("demo.parquet")
```
```shell
>>>
ValueError: Table schema does not match schema used to create file:
table:
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53 vs.
file:
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
```
---
I think this is because after the `.select_columns()` call with out of order columns, the output dataset features' schema ends up being out of sync with the schema of the arrow table backing it.
```python
ds.features.arrow_schema
>>>
x1: int64
x2: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x1": {"dtype": "int64", "_type": "V' + 53
ds.data.schema
>>>
x2: int64
x1: int64
-- schema metadata --
huggingface: '{"info": {"features": {"x2": {"dtype": "int64", "_type": "V' + 53
```
So when we call `.to_parquet()`, the call behind the scenes to `datasets.io.parquet.ParquetDatasetWriter(...).write()` which initialises the backend `pyarrow.parquet.ParquetWriter` with `schema = self.dataset.features.arrow_schema` triggers `pyarrow` on write when [it checks](https://github.com/apache/arrow/blob/11b140a734a516e436adaddaeb35d23f30dcce44/python/pyarrow/parquet/core.py#L1086-L1090) that the `ParquetWriter` schema matches the schema of the table being written 🙌
https://github.com/huggingface/datasets/blob/6ed837325cb539a5deb99129e5ad181d0269e050/src/datasets/io/parquet.py#L139-L141
### Expected behavior
The dataset gets successfully saved as parquet.
*In the same way as it does if saving it as csv:
```python
import datasets
dataset = datasets.Dataset.from_dict(
{
"x1": [1, 2, 3],
"x2": [10, 11, 12],
}
)
ds = dataset.select_columns(["x2", "x1"])
ds.to_csv("demo.csv")
```
### Environment info
`python==3.11`
`datasets==2.13.1`
We'll do a new release of `datasets` soon to make the fix available :)
In the meantime you can use `datasets` from source (main) | [
-1.0608755350112915,
-0.7846618890762329,
-0.8049898743629456,
1.515763759613037,
-0.21944546699523926,
-1.2114038467407227,
0.180645152926445,
-1.179059624671936,
1.6224894523620605,
-0.6938053965568542,
0.3541068732738495,
-1.62127685546875,
0.026142217218875885,
-0.6055105924606323,
-0.7007458209991455,
-0.8156135678291321,
-0.49970710277557373,
-0.5842001438140869,
1.0069588422775269,
2.5694363117218018,
1.2886426448822021,
-1.5002555847167969,
2.5946688652038574,
0.7370298504829407,
-0.11839006841182709,
-0.9184973239898682,
0.4884122610092163,
0.004549138247966766,
-1.2590949535369873,
-0.21728554368019104,
-0.9324988126754761,
-0.18984058499336243,
-0.48321884870529175,
-0.5575252771377563,
-0.03863837942481041,
0.516867458820343,
-0.35477930307388306,
-0.5685765147209167,
-0.6202254891395569,
-0.8415974974632263,
0.43814975023269653,
-0.3406826853752136,
0.9896335005760193,
-0.4069129526615143,
1.6828428506851196,
-0.5005065202713013,
0.45948362350463867,
0.7728906273841858,
1.2207086086273193,
0.374053418636322,
0.12353852391242981,
0.3355766236782074,
0.40849143266677856,
-0.10777942836284637,
0.5390881299972534,
1.2005409002304077,
0.6627098321914673,
0.43203550577163696,
1.0269361734390259,
-2.184476137161255,
1.1149024963378906,
-1.1241730451583862,
0.12865601480007172,
1.447848916053772,
-0.8053637742996216,
0.3212525546550751,
-1.8978489637374878,
-0.04849196597933769,
0.4871813952922821,
-2.1458866596221924,
0.4098966419696808,
-1.264552354812622,
-0.6659066081047058,
1.0231363773345947,
0.3431868255138397,
-1.1365814208984375,
-0.04339621588587761,
-0.20250655710697174,
0.7842094302177429,
0.3936118185520172,
1.1936545372009277,
-1.6593775749206543,
0.1535462737083435,
-0.3606528639793396,
0.17600730061531067,
-1.1502199172973633,
-1.483183741569519,
0.570945143699646,
0.5310873985290527,
0.5648670792579651,
-0.08560249209403992,
0.955301821231842,
-1.1540476083755493,
0.7622595429420471,
-1.0161203145980835,
-1.7793728113174438,
-1.4336918592453003,
-2.2559163570404053,
-2.266718864440918,
0.7065908908843994,
-0.5673336982727051,
-0.4138711392879486,
1.9580682516098022,
-0.946934700012207,
-1.4965192079544067,
1.0898839235305786,
0.4079289138317108,
-0.0010387580841779709,
2.4121696949005127,
0.2973126769065857,
-0.7332366704940796,
0.5589222311973572,
-0.8271693587303162,
0.6601110696792603,
-0.2778053879737854,
1.2338175773620605,
0.4131993353366852,
-0.9417769908905029,
1.6176621913909912,
-0.3643191456794739,
0.601516604423523,
-0.5513356924057007,
-0.4828004539012909,
-0.5062044262886047,
0.31047627329826355,
1.7896822690963745,
-0.26616936922073364,
1.45430326461792,
-0.1623474657535553,
-1.6476315259933472,
-1.623475193977356,
0.9074981212615967,
0.49661609530448914,
-0.6827172040939331,
0.16932231187820435,
-0.3672817647457123,
0.057057276368141174,
-0.24243898689746857,
1.1633778810501099,
1.3481096029281616,
0.7903245091438293,
-0.28788310289382935,
-0.8372888565063477,
0.11530868709087372,
0.15343545377254486,
-0.9380470514297485,
-1.6212258338928223,
-0.31309959292411804,
0.2053065299987793,
0.535139262676239,
-1.2875592708587646,
1.8060612678527832,
0.8162586688995361,
1.9294475317001343,
0.8994649052619934,
-0.3218212127685547,
1.6255736351013184,
0.11641186475753784,
1.7825250625610352,
-0.4702492952346802,
0.49435171484947205,
-0.30050018429756165,
-1.181606411933899,
0.9160550832748413,
-0.34340324997901917,
-2.0819029808044434,
-0.7510969638824463,
-0.8361464142799377,
-0.27315691113471985,
-0.7162911295890808,
0.9262714982032776,
-0.17896796762943268,
-1.3149646520614624,
0.20713454484939575,
-0.7551175951957703,
-0.0755935087800026,
-1.2629557847976685,
0.34901002049446106,
0.6679010987281799,
-0.786268413066864,
0.13247813284397125,
-0.14007602632045746,
-1.2420097589492798,
-0.4112190902233124,
0.315091073513031,
1.9175575971603394,
-0.8108638525009155,
0.9388338923454285,
1.0655659437179565,
-0.6552338600158691,
0.08036897331476212,
0.21870602667331696,
-0.49909934401512146,
0.7609779238700867,
-1.1058375835418701,
-0.5985474586486816,
1.1726161241531372,
-0.03551440313458443,
-0.5711845755577087,
1.3945029973983765,
0.5704379081726074,
-1.0116420984268188,
-0.2823418974876404,
-0.10928551107645035,
-0.6202972531318665,
0.10941209644079208,
-1.538753867149353,
-0.0648861899971962,
0.38639357686042786,
-1.4813488721847534,
-0.5929495096206665,
-0.18479251861572266,
1.224163293838501,
-0.29163825511932373,
1.2877956628799438,
-0.44715410470962524,
-0.1860663741827011,
-0.3800649046897888,
-0.3486522138118744,
-0.026812441647052765,
-0.23390723764896393,
-0.6957489848136902,
0.08439979702234268,
-0.9152054190635681,
0.347921758890152,
1.3991549015045166,
0.2850179970264435,
0.08237305283546448,
0.5192033052444458,
1.138848900794983,
0.5351042151451111,
0.10061904042959213,
-0.8703242540359497,
-1.467861294746399,
2.0160679817199707,
-1.5044212341308594,
2.1516265869140625,
0.7253206968307495,
-0.024533163756132126,
-1.7923697233200073,
-2.0077641010284424,
1.3615994453430176,
1.2054623365402222,
2.400545835494995,
0.512892484664917,
0.37538641691207886,
-0.8275679349899292,
-0.6292492747306824,
0.3946871757507324,
-0.969566822052002,
-0.6441528797149658,
0.31214985251426697,
2.3919644355773926,
1.6827887296676636,
-0.4014340937137604,
-0.23278258740901947,
-0.8896836042404175,
1.423046350479126,
-0.046319711953401566,
0.21043546497821808,
2.0121939182281494,
-0.2492816001176834,
-1.0954707860946655,
1.3821805715560913,
-2.2893404960632324,
0.09828902781009674,
2.03245210647583,
0.30779510736465454,
0.0812465250492096,
-1.1580142974853516,
-0.748381495475769,
-0.340017706155777,
-0.48335957527160645,
-1.1360664367675781,
0.48897621035575867,
-0.15377487242221832,
-0.8469456434249878,
-1.32904052734375,
0.2604919672012329,
-1.1365773677825928,
-1.6187576055526733,
0.1468295156955719,
1.7753736972808838,
2.1483798027038574,
-0.9935808777809143,
1.459067940711975,
-0.24395518004894257,
-0.004619885701686144,
1.1613670587539673,
1.1593432426452637,
3.107022285461426,
1.7302217483520508,
-1.2405247688293457,
0.6069582104682922,
-0.15644489228725433,
-0.44357746839523315,
1.1465628147125244,
-1.2885608673095703,
1.3180540800094604,
-0.16616596281528473,
-1.0794912576675415,
-1.1039010286331177,
0.7861095666885376,
0.4168815612792969,
0.09730076789855957,
-0.5073679089546204,
0.9901522994041443,
0.11709088087081909,
1.3684781789779663,
0.6428880095481873,
-0.21005859971046448,
0.655157208442688,
-0.32624658942222595,
-0.38971754908561707,
1.547743797302246,
0.10045686364173889,
-1.4976385831832886,
-2.255260705947876,
-0.15655550360679626,
-0.974201500415802,
0.05454148352146149,
-0.5366701483726501,
-1.1134434938430786,
1.7470431327819824,
0.29824429750442505,
-1.2254304885864258,
-0.28009524941444397,
-0.4536677896976471,
-0.5140252113342285,
2.864046096801758,
-1.5420966148376465,
-0.2213093489408493,
-0.9884764552116394,
-0.6781615614891052,
1.738552212715149,
-1.0549954175949097,
-0.19433601200580597,
-1.0929816961288452,
-0.4131447672843933,
-1.4174785614013672,
-0.7280924916267395,
0.25889357924461365,
-0.860244870185852,
0.9375566244125366,
0.22953444719314575,
-1.2598613500595093,
-0.33818668127059937,
-0.9874650835990906,
0.8428580164909363,
-0.3627578616142273,
0.2583259046077728,
2.0081498622894287,
0.5152658224105835,
-0.16210031509399414,
0.7170259952545166,
1.1793527603149414,
0.6580229997634888,
-0.6240573525428772,
0.30683180689811707,
-0.6257546544075012,
0.35429105162620544,
-1.3303444385528564,
0.2395097315311432,
-2.661858320236206,
0.6252020597457886,
0.02815033122897148,
0.049600690603256226,
0.08662670105695724,
-1.3143047094345093,
1.1371034383773804,
2.5986146926879883,
-1.1843076944351196,
0.4866635501384735,
0.35904988646507263,
1.1723395586013794,
-1.6628272533416748,
0.1740988790988922,
-0.37093213200569153,
2.118166923522949,
0.07942080497741699,
1.0834453105926514,
-0.5246031284332275,
-2.3701257705688477,
0.704846203327179,
-1.3535313606262207,
-1.2375743389129639,
0.7805188894271851,
-0.9857674837112427,
0.1505601555109024,
-1.5200151205062866,
-0.2724219262599945,
-0.8457640409469604,
-1.1142973899841309,
0.5817583203315735,
0.07827756553888321,
0.4195426404476166,
-0.6198732852935791,
0.38619786500930786,
-2.352729558944702,
-1.5173040628433228,
-0.30511483550071716,
-0.9725154638290405,
0.5226853489875793,
-0.34998616576194763,
0.8908054828643799,
-0.27457958459854126,
-0.06558790802955627,
0.4483847916126251,
1.3934710025787354,
3.447176694869995,
0.2695286273956299,
0.30029237270355225,
-0.31494078040122986,
-1.0002042055130005,
1.584236741065979,
0.8269789218902588,
0.007076316513121128,
-0.5250213146209717,
-1.0830940008163452,
1.135654091835022,
2.074392318725586,
1.0250601768493652,
-0.05506245046854019,
-0.877909243106842,
-0.6530939340591431,
-0.04789618402719498,
0.19032007455825806,
0.4286118745803833,
0.9380927681922913,
-0.027670301496982574,
-0.03451332077383995,
1.4902007579803467,
1.213616967201233,
-0.3437912166118622,
0.21629081666469574,
-0.7005247473716736,
-0.486820250749588,
0.696142315864563,
0.2622508108615875,
0.15087749063968658,
0.39660710096359253,
-1.0045301914215088,
-0.36488980054855347,
-0.4884825050830841,
-0.8811451196670532,
-0.586786150932312,
-0.40203651785850525,
-0.2972096800804138,
1.5615496635437012,
0.14244188368320465,
-0.4975808262825012,
-0.04635735973715782,
-0.8804075717926025,
-0.09016856551170349,
-1.1182479858398438,
0.26655006408691406,
-0.22936010360717773,
-0.09866387397050858,
-0.29686471819877625,
1.8356335163116455,
-0.9609552025794983,
-2.0654501914978027,
0.16859719157218933,
0.2604238986968994,
-0.36711981892585754,
0.18239563703536987,
1.7229905128479004,
0.570530116558075,
1.4007532596588135,
1.201370358467102,
0.8998817801475525,
-0.6957605481147766,
-1.1805390119552612,
0.573789656162262,
1.0885839462280273,
-1.3629919290542603,
0.7262980341911316,
-0.04679897055029869,
-0.4128701984882355,
0.49222317337989807,
1.2836556434631348,
0.509000837802887,
-1.8689712285995483,
0.685157835483551,
-0.8930847644805908,
0.9281046390533447,
0.6896793842315674,
0.7516297101974487,
0.07199086993932724,
0.7149809002876282,
-1.1450258493423462,
-1.0088807344436646,
-0.7962184548377991,
-0.7427737712860107,
1.8950237035751343,
-0.33405449986457825,
0.5637409090995789,
-0.2876763939857483,
-1.2901318073272705,
-0.03025844320654869,
0.5850854516029358,
0.35332703590393066,
-0.4289477467536926,
0.7670128345489502,
-0.5936187505722046,
-0.9446750283241272,
-1.3435567617416382,
-0.4551294445991516,
-0.9942954778671265,
-0.9892235994338989,
1.0898383855819702,
0.8212757110595703,
0.35533079504966736,
1.8865571022033691,
0.8539281487464905,
0.17852236330509186,
-2.586883783340454,
0.9161428809165955,
0.25699493288993835,
-0.022078052163124084,
0.8902716636657715,
0.47700849175453186,
1.0807443857192993,
-0.18356311321258545,
0.5385017395019531,
-2.5066263675689697,
2.2581405639648438,
-0.08600776642560959,
0.8342779278755188,
0.018654484301805496,
-0.254067063331604,
0.8952049612998962,
0.5356178879737854,
0.29526087641716003,
-1.0802632570266724,
0.48656049370765686,
-0.5119451284408569,
1.215475082397461,
0.8050017952919006,
-0.7643961906433105,
0.0419086255133152,
1.2787911891937256,
0.519062340259552,
-0.5260573029518127,
-0.9748268127441406,
-0.7814666628837585,
0.9931525588035583,
1.6745649576187134,
-0.04540324583649635,
0.0590301975607872,
0.9356885552406311,
0.6528903841972351,
-1.278720498085022,
-0.15442121028900146,
-0.781389057636261,
-0.7128140330314636,
1.8049812316894531,
2.1296870708465576,
-0.12610085308551788,
-0.30960360169410706,
-0.7144588232040405,
-1.320277214050293,
0.8760741353034973,
-0.0873536467552185,
0.21993325650691986,
0.6054532527923584,
-0.7026015520095825,
1.213623046875,
0.7361044883728027,
0.8785320520401001,
0.2187485247850418,
0.38547345995903015,
0.3710540533065796,
-0.41408804059028625,
-1.1595287322998047,
-0.27726683020591736,
-1.1142164468765259,
-2.4716291427612305,
0.5073475241661072,
-0.228387713432312,
-1.3128761053085327,
-0.10866760462522507,
-0.9459016919136047,
1.0503809452056885,
-0.5921061635017395,
-0.8765403628349304,
-1.4368501901626587,
0.20657283067703247,
0.03909888491034508,
1.1139498949050903,
-1.4576364755630493,
-0.4071667492389679,
1.3255763053894043,
0.9546767473220825,
-0.8247665762901306,
0.7809942364692688,
0.13538651168346405,
1.1405887603759766,
0.7864342927932739,
-0.335117369890213,
0.47227200865745544,
0.008362057618796825,
-1.370086908340454,
0.32980072498321533,
1.1971008777618408,
0.12990164756774902,
1.6475850343704224,
-0.447964608669281,
0.02420257404446602,
0.37106382846832275,
-0.4508412480354309,
-0.4738442003726959,
-0.641368567943573,
0.6177831888198853,
-0.04421846568584442,
-1.0714685916900635,
-0.09076466411352158,
0.013364684768021107,
-0.13962116837501526,
0.10183118283748627,
-1.4414082765579224,
-0.10219935327768326,
-0.35014745593070984,
-0.6549401879310608,
-1.1315451860427856,
-0.17043837904930115,
1.226255178451538,
-0.7952089905738831,
-0.02119303308427334,
0.46740299463272095,
0.13812759518623352,
0.50868159532547,
0.5256855487823486,
-0.699268639087677,
-0.3671661913394928,
-0.24430415034294128,
-0.4271755814552307,
0.33699706196784973,
1.3687912225723267,
-0.012191595509648323,
-1.087314248085022,
0.7002928853034973,
-0.29301005601882935,
0.12839585542678833,
2.006356716156006,
0.05469946563243866,
-0.7393431067466736,
0.22430428862571716,
-0.6412020325660706,
1.8727792501449585,
1.7274633646011353,
1.3778321743011475,
-0.22769930958747864,
-0.9140611290931702,
0.7798982858657837,
-0.5108210444450378,
-0.357291579246521,
0.7958493232727051,
0.2441100925207138,
-0.19823037087917328,
-1.5019572973251343,
0.7604806423187256,
1.356218695640564,
-1.022180199623108,
-0.8343049883842468,
0.23453806340694427,
-0.7893069386482239,
1.0249073505401611,
0.6944555640220642,
0.3288941979408264,
0.4548985958099365,
1.6770890951156616,
0.7521708011627197,
-0.3469550609588623,
0.4474557340145111,
0.6536366939544678,
-0.06103484332561493,
-2.016425609588623,
-1.1715717315673828,
0.34469860792160034,
-0.560795247554779,
-1.5369236469268799,
1.4945337772369385,
-1.2775956392288208,
-1.0474004745483398,
0.541515052318573,
0.05422237515449524,
1.3970320224761963,
0.43532612919807434,
1.59662663936615,
2.04805326461792,
0.9112700819969177,
0.43535399436950684,
1.214145541191101,
-0.12205685675144196,
-0.4903043806552887,
1.755739688873291,
-0.5622014999389648,
0.46442580223083496,
1.0865602493286133,
-0.34149837493896484,
-1.1677579879760742,
-0.8653028607368469,
-1.365535855293274,
-0.9902693629264832,
1.318645715713501,
0.030686359852552414,
-1.1648266315460205,
0.29239246249198914,
1.7633037567138672,
-0.001770918257534504,
-0.47171276807785034,
0.7178041934967041,
0.34969642758369446,
-1.042452096939087,
-0.06789389252662659,
-0.8101369142532349,
0.644356369972229,
-0.12503179907798767,
-0.4119367003440857,
0.3384188115596771,
0.5294937491416931,
1.5079851150512695,
-0.21230104565620422,
0.057875022292137146,
1.068495273590088,
-1.478545069694519,
1.5588390827178955,
-0.7999293804168701,
0.1488337218761444,
-2.2003533840179443,
1.2773504257202148,
-0.7738344073295593,
1.9516698122024536,
-2.6638107299804688,
0.5451560020446777,
-0.3590545058250427,
-0.3836361765861511,
0.15120446681976318,
-0.385257363319397,
0.16381029784679413,
-0.019729793071746826,
-1.14686119556427,
-0.16597911715507507,
-0.6483065485954285,
0.6918169856071472,
1.1739360094070435,
1.474441647529602,
-1.069047212600708,
-0.43941470980644226,
-1.694502592086792,
-0.27721938490867615,
-0.6825268268585205,
0.08168898522853851,
-1.8960853815078735,
-0.21145662665367126,
-1.8748208284378052,
-2.318557024002075,
-1.2415502071380615,
-0.84950190782547,
1.1644195318222046,
0.10018273442983627,
-1.0188361406326294,
1.182279109954834,
-0.4313533902168274,
-1.768851399421692,
1.2409608364105225,
-2.14811635017395
] |
https://github.com/huggingface/datasets/issues/5989 | Set a rule on the config and split names | in this case we need to decide what to do with the existing datasets with white space characters (there shouldn't be a lot of them I think) | > should we actually allow characters like spaces? maybe it's better to add validation for whitespace symbols and directly in datasets and raise
https://github.com/huggingface/datasets-server/issues/853
| 80 | 27 | Set a rule on the config and split names
> should we actually allow characters like spaces? maybe it's better to add validation for whitespace symbols and directly in datasets and raise
https://github.com/huggingface/datasets-server/issues/853
in this case we need to decide what to do with the existing datasets with white space characters (there shouldn't be a lot of them I think) | [
-1.27675199508667,
-1.0438064336776733,
-0.8393822312355042,
1.3529144525527954,
-0.18654152750968933,
-1.3994945287704468,
0.08990339934825897,
-0.9783583283424377,
1.6607670783996582,
-0.8616364002227783,
0.39600419998168945,
-1.7273401021957397,
-0.09637703001499176,
-0.43120789527893066,
-0.7509663105010986,
-0.9635006785392761,
-0.5124953985214233,
-0.6743624806404114,
0.9944080114364624,
2.489333152770996,
1.1661299467086792,
-1.4694617986679077,
2.8718841075897217,
0.7201347947120667,
-0.21534548699855804,
-0.9665200710296631,
0.6655107736587524,
-0.023037591949105263,
-1.2593135833740234,
-0.3932501971721649,
-1.0104360580444336,
0.16806559264659882,
-0.4302690327167511,
-0.4744442403316498,
-0.10696496814489365,
0.3724730908870697,
-0.18909840285778046,
-0.4674031138420105,
-0.4310738146305084,
-0.8148089051246643,
0.3349423408508301,
-0.2984902858734131,
0.8693625926971436,
-0.3728685975074768,
1.7840474843978882,
-0.41831326484680176,
0.28733906149864197,
0.6578060984611511,
1.361411690711975,
0.23244653642177582,
0.01800053007900715,
0.2198544442653656,
0.3671196401119232,
-0.17134277522563934,
0.49019333720207214,
1.3080506324768066,
0.5361664891242981,
0.6078107953071594,
0.722077488899231,
-2.0967440605163574,
1.3336737155914307,
-0.9644737839698792,
0.29079949855804443,
1.2818503379821777,
-1.0283219814300537,
0.5042014122009277,
-1.6893280744552612,
-0.10183581709861755,
0.5360492467880249,
-2.349483013153076,
0.15898004174232483,
-1.1970340013504028,
-0.5085795521736145,
0.8511192202568054,
0.24028244614601135,
-1.226863145828247,
0.22089843451976776,
-0.419569730758667,
1.1034454107284546,
0.6693458557128906,
1.2581002712249756,
-1.5451741218566895,
0.17332527041435242,
-0.2487289011478424,
-0.017142461612820625,
-1.292940616607666,
-1.51496160030365,
0.5136007070541382,
0.6119517087936401,
0.7617416381835938,
0.03335903584957123,
0.9676706790924072,
-0.9146760106086731,
0.7666252851486206,
-0.7244401574134827,
-1.4711790084838867,
-1.3073564767837524,
-2.3393983840942383,
-2.2734787464141846,
0.8985961079597473,
-0.5054056644439697,
-0.5286508202552795,
1.8983973264694214,
-1.064139723777771,
-1.9151633977890015,
1.1615720987319946,
0.2525886297225952,
0.12318317592144012,
2.5023655891418457,
0.2056003361940384,
-0.7199046611785889,
0.43849050998687744,
-0.7278054356575012,
0.961454451084137,
-0.5291494727134705,
1.3749492168426514,
0.5333248972892761,
-0.9288066029548645,
1.6714149713516235,
-0.6088709831237793,
0.6227704286575317,
-0.6191208958625793,
-0.650442898273468,
-0.817824125289917,
0.31797006726264954,
1.8162091970443726,
-0.38320744037628174,
1.6209274530410767,
-0.4033966660499573,
-1.5747630596160889,
-1.5574631690979004,
0.897534191608429,
0.5186389684677124,
-0.8594257235527039,
0.12992851436138153,
-0.3194512128829956,
-0.014368302188813686,
0.06838881969451904,
1.022081732749939,
1.1488527059555054,
0.6323431730270386,
-0.24126864969730377,
-0.9385561943054199,
0.21426358819007874,
-0.07014581561088562,
-0.6250285506248474,
-1.8487662076950073,
-0.24428197741508484,
0.15548881888389587,
0.5786199569702148,
-1.1456774473190308,
1.6140342950820923,
0.8879006505012512,
1.9951376914978027,
0.951341450214386,
-0.342081218957901,
1.4010059833526611,
-0.018604977056384087,
1.9375935792922974,
-0.514684796333313,
0.6163776516914368,
-0.1860816925764084,
-1.135523796081543,
0.8420715928077698,
-0.4693760275840759,
-1.9471548795700073,
-0.7801108360290527,
-0.8082361221313477,
-0.22241146862506866,
-0.7222415804862976,
0.9732851982116699,
-0.4272465705871582,
-1.3717151880264282,
0.2190285325050354,
-0.5307348370552063,
0.184902623295784,
-1.2045189142227173,
0.3186890184879303,
0.8417589664459229,
-0.6576091647148132,
-0.138091579079628,
-0.30426469445228577,
-1.266607403755188,
-0.43251723051071167,
0.4076557755470276,
1.9944252967834473,
-0.768510103225708,
0.7951918840408325,
0.9490194320678711,
-0.8022592067718506,
0.047030724585056305,
0.2215624302625656,
-0.23058971762657166,
0.754563570022583,
-1.1154073476791382,
-0.40679946541786194,
1.2482738494873047,
-0.2072894424200058,
-0.6435100436210632,
1.4881178140640259,
0.879546046257019,
-0.9154782891273499,
-0.148769810795784,
-0.16962552070617676,
-0.8098093867301941,
-0.11029615253210068,
-1.5231019258499146,
-0.12311610579490662,
0.16571557521820068,
-1.4356298446655273,
-0.5859772562980652,
-0.30579984188079834,
1.1898974180221558,
-0.08861346542835236,
1.3530654907226562,
-0.3987518548965454,
-0.1637706309556961,
-0.4445495307445526,
-0.6064047813415527,
0.25371015071868896,
-0.3130722939968109,
-0.6246168613433838,
0.20347465574741364,
-0.8131677508354187,
0.20819176733493805,
1.5885134935379028,
0.4572104811668396,
0.1215822845697403,
0.5951886773109436,
1.0384891033172607,
0.37372642755508423,
-0.12338124215602875,
-0.7616426348686218,
-1.5094281435012817,
2.0933048725128174,
-1.4983692169189453,
1.9050766229629517,
0.746874213218689,
-0.055694304406642914,
-1.788415789604187,
-1.8179869651794434,
1.2866311073303223,
1.1636700630187988,
2.26749587059021,
0.49444326758384705,
0.3754555881023407,
-0.795066237449646,
-0.7143650650978088,
0.27531132102012634,
-0.9887067079544067,
-0.8115182518959045,
0.05622190237045288,
2.219921350479126,
1.8292185068130493,
-0.5606231093406677,
-0.16857580840587616,
-1.0899931192398071,
1.3484556674957275,
-0.0370442196726799,
0.23614144325256348,
1.8536139726638794,
-0.390082448720932,
-1.1832575798034668,
1.2311283349990845,
-2.410353422164917,
0.08422564715147018,
1.958062767982483,
0.35048505663871765,
0.08048060536384583,
-1.4568850994110107,
-0.7934297323226929,
-0.21034623682498932,
-0.4575757384300232,
-1.2396485805511475,
0.5950483679771423,
-0.3672730624675751,
-0.7480990290641785,
-1.4069404602050781,
0.117536261677742,
-1.135850191116333,
-1.6333060264587402,
0.5093021392822266,
1.9802279472351074,
2.0739147663116455,
-0.9213836789131165,
1.5683000087738037,
-0.18525266647338867,
0.1323098987340927,
1.2327684164047241,
1.1376800537109375,
3.1097412109375,
1.9132750034332275,
-1.1660557985305786,
0.7884460091590881,
-0.09074541926383972,
-0.49705085158348083,
1.1887664794921875,
-1.0476042032241821,
1.3141149282455444,
-0.26944440603256226,
-1.0868375301361084,
-1.211408257484436,
0.903709352016449,
0.5290529727935791,
0.16573353111743927,
-0.5106426477432251,
1.261372685432434,
0.015171660110354424,
1.2901443243026733,
0.46405333280563354,
-0.4285048246383667,
0.4488638639450073,
-0.3692206144332886,
-0.609843909740448,
1.6811630725860596,
0.15719063580036163,
-1.3949247598648071,
-2.3239080905914307,
-0.12656277418136597,
-0.7441883087158203,
-0.008046486414968967,
-0.6134206652641296,
-1.0103670358657837,
1.6896260976791382,
0.4853580594062805,
-1.212798833847046,
-0.3993375599384308,
-0.3538343906402588,
-0.573015034198761,
2.5551257133483887,
-1.4750851392745972,
-0.20610401034355164,
-0.8369454145431519,
-0.3638816773891449,
1.6161448955535889,
-1.2139232158660889,
-0.16833467781543732,
-0.9503920078277588,
-0.6046092510223389,
-1.4348393678665161,
-0.47972264885902405,
-0.04286515712738037,
-0.8814948201179504,
0.643063485622406,
0.07147587090730667,
-1.079757809638977,
-0.2986757755279541,
-0.9370032548904419,
0.9012625217437744,
-0.10988444089889526,
0.3465351164340973,
1.9706144332885742,
0.4079184830188751,
-0.38371267914772034,
0.7418752312660217,
1.1757241487503052,
0.5606981515884399,
-0.8069184422492981,
0.06267931312322617,
-0.8011035323143005,
0.44895729422569275,
-1.410731315612793,
0.10383640974760056,
-3.1186141967773438,
0.6094906330108643,
-0.10990001261234283,
-0.1756112277507782,
-0.08071547001600266,
-1.3447238206863403,
1.1321921348571777,
2.600507974624634,
-1.2322909832000732,
0.5401424765586853,
0.3322908580303192,
1.33064603805542,
-1.5820777416229248,
0.3043053448200226,
-0.4344621002674103,
2.026277542114258,
0.18391087651252747,
1.225296139717102,
-0.5366868376731873,
-2.108184814453125,
0.5593439340591431,
-1.1112614870071411,
-1.1356254816055298,
0.8036329746246338,
-0.931444525718689,
0.03947632759809494,
-1.4088923931121826,
-0.11260131001472473,
-0.9424083232879639,
-1.2022660970687866,
0.8321600556373596,
0.2964894771575928,
0.34666919708251953,
-0.7057604789733887,
0.4728044867515564,
-2.2367873191833496,
-1.3367856740951538,
-0.19179539382457733,
-0.864538848400116,
0.5009329915046692,
-0.33562156558036804,
0.5937732458114624,
-0.1199021115899086,
0.057934150099754333,
0.28046268224716187,
1.2953848838806152,
3.3774428367614746,
0.2411109209060669,
0.42937952280044556,
-0.09946615993976593,
-0.89701247215271,
1.5594538450241089,
0.9816938638687134,
-0.15118096768856049,
-0.5405349135398865,
-0.9133586287498474,
1.3588076829910278,
1.9276752471923828,
1.0226997137069702,
0.10949387401342392,
-0.8191053867340088,
-0.5690662860870361,
-0.06966699659824371,
0.07892131060361862,
0.3844590187072754,
0.9994549751281738,
-0.13881222903728485,
0.09876038134098053,
1.423548936843872,
1.3114689588546753,
-0.4402976632118225,
0.5115614533424377,
-0.8773540258407593,
-0.3470825254917145,
0.4224480986595154,
0.2940528094768524,
-0.031179532408714294,
0.4234507977962494,
-1.0111550092697144,
-0.2278117537498474,
-0.3548703193664551,
-0.8779414892196655,
-0.7105174660682678,
-0.39256376028060913,
-0.3264128267765045,
1.5876824855804443,
0.10540129244327545,
-0.7075400948524475,
0.0320662260055542,
-0.8230859041213989,
-0.06753607839345932,
-1.0890016555786133,
0.22358818352222443,
-0.1840580403804779,
-0.036374226212501526,
-0.10707741975784302,
1.69325852394104,
-1.079459309577942,
-2.253051996231079,
0.26676973700523376,
0.3125062584877014,
-0.43376806378364563,
0.09125185757875443,
1.5602381229400635,
0.3631511926651001,
1.4203298091888428,
1.3779584169387817,
0.947964608669281,
-0.6060032844543457,
-1.2065155506134033,
0.7341503500938416,
0.9168907403945923,
-1.4351617097854614,
0.8567046523094177,
0.022616446018218994,
-0.556370735168457,
0.8481274247169495,
1.1406984329223633,
0.42878958582878113,
-2.0003979206085205,
0.8855658173561096,
-0.8545488715171814,
0.8630188703536987,
0.6821938157081604,
0.8120406270027161,
0.2595876157283783,
0.9942559003829956,
-1.1770060062408447,
-1.2649415731430054,
-0.8878765106201172,
-0.7504296898841858,
1.9022570848464966,
-0.2352653443813324,
0.5271410942077637,
-0.21135975420475006,
-1.080629587173462,
-0.18180212378501892,
0.7053260803222656,
0.27482789754867554,
-0.35879024863243103,
0.8511716723442078,
-0.6852213144302368,
-1.1778017282485962,
-1.312731385231018,
-0.46583905816078186,
-1.0084093809127808,
-0.9142467975616455,
0.9784607887268066,
0.7715970277786255,
0.38390395045280457,
1.981533169746399,
0.5182173252105713,
0.29251912236213684,
-2.491544246673584,
0.7853241562843323,
0.43213745951652527,
0.056884557008743286,
0.8723611235618591,
0.2982724905014038,
1.1012307405471802,
-0.06779925525188446,
0.4228378236293793,
-2.2516751289367676,
2.110323667526245,
-0.3560422956943512,
0.7493105530738831,
-0.049972496926784515,
-0.09643392264842987,
1.072967529296875,
0.46688297390937805,
0.6154376864433289,
-1.1852126121520996,
0.7304617166519165,
-0.5109974145889282,
1.1793767213821411,
0.984127938747406,
-0.8645345568656921,
0.09991537034511566,
1.4666692018508911,
0.5015408396720886,
-0.40845248103141785,
-0.8424609899520874,
-0.8453885912895203,
0.9271484613418579,
1.741145372390747,
0.07864966243505478,
0.15619055926799774,
0.8678743839263916,
0.6423507332801819,
-1.367509126663208,
-0.1425698846578598,
-0.7502442598342896,
-0.6585090160369873,
1.8095113039016724,
1.9730098247528076,
0.01961788348853588,
-0.08655665069818497,
-0.6602800488471985,
-1.298890233039856,
0.8144525289535522,
-0.010309162549674511,
0.13360564410686493,
0.8237515687942505,
-0.7896122336387634,
1.2360886335372925,
0.6711445450782776,
0.7168213129043579,
0.03861585259437561,
0.2581958472728729,
0.5667306780815125,
-0.2426350861787796,
-1.0408236980438232,
-0.31631994247436523,
-1.230175495147705,
-2.429521322250366,
0.3209160566329956,
-0.31202155351638794,
-1.4796934127807617,
0.0282887015491724,
-1.0283092260360718,
0.9680009484291077,
-0.6025680899620056,
-0.943888783454895,
-1.4370979070663452,
0.29999780654907227,
-0.08623842895030975,
0.7617044448852539,
-1.6425338983535767,
-0.11446774750947952,
1.316791296005249,
0.918583333492279,
-0.5942863821983337,
1.1736137866973877,
0.35004761815071106,
1.0676294565200806,
0.7718175053596497,
-0.4855940341949463,
0.3212253749370575,
0.033071644604206085,
-1.386623501777649,
0.3825734257698059,
1.2443450689315796,
0.06091156601905823,
1.4046220779418945,
-0.5759696960449219,
0.008651040494441986,
0.3915369212627411,
-0.5597853064537048,
-0.5925969481468201,
-0.4942835867404938,
0.7426917552947998,
-0.04150121659040451,
-0.9412634968757629,
0.047030478715896606,
-0.22462603449821472,
-0.26672089099884033,
0.3045654594898224,
-1.563368320465088,
-0.48253509402275085,
-0.45871996879577637,
-0.45464223623275757,
-1.296900987625122,
0.15225005149841309,
1.4501001834869385,
-0.7626233696937561,
-0.16801294684410095,
0.554823100566864,
0.487699955701828,
0.36587759852409363,
0.672780454158783,
-0.6552151441574097,
-0.12758521735668182,
-0.35328540205955505,
-0.1686638444662094,
0.2743423283100128,
1.2872827053070068,
-0.2894603908061981,
-1.0016834735870361,
0.6674351692199707,
-0.33110761642456055,
0.057618796825408936,
1.9675450325012207,
0.02233785018324852,
-0.7228043675422668,
0.34386342763900757,
-0.8070061802864075,
1.9023029804229736,
1.664341688156128,
1.4404499530792236,
-0.08112622052431107,
-0.7442964911460876,
0.5967464447021484,
-0.24152295291423798,
-0.3233547806739807,
0.9225563406944275,
0.4908047318458557,
-0.2250351458787918,
-1.5415807962417603,
0.3802635967731476,
1.162315011024475,
-0.8813006281852722,
-0.7567046880722046,
-0.06364554166793823,
-0.7083392143249512,
1.102962851524353,
0.7654231786727905,
0.42018863558769226,
0.32952794432640076,
1.6553399562835693,
0.724676787853241,
-0.5300517082214355,
0.42368316650390625,
0.631270170211792,
-0.045599907636642456,
-2.116800546646118,
-0.899019181728363,
0.32246509194374084,
-0.3659883141517639,
-1.5647743940353394,
1.2439239025115967,
-1.1112638711929321,
-0.9796092510223389,
0.547493040561676,
0.11826860904693604,
1.4121774435043335,
0.31089767813682556,
1.5917737483978271,
2.0868890285491943,
0.8508682250976562,
0.20919907093048096,
1.2888847589492798,
-0.19370877742767334,
-0.35204413533210754,
1.9373688697814941,
-0.3585270643234253,
0.4740905165672302,
0.9957053661346436,
-0.4625512361526489,
-1.0071003437042236,
-0.7956209778785706,
-1.1333483457565308,
-0.682601809501648,
1.1774957180023193,
0.1148819550871849,
-1.1874719858169556,
0.18404090404510498,
1.4539881944656372,
0.05081115663051605,
-0.31373533606529236,
0.6651525497436523,
0.5458934903144836,
-0.6960771679878235,
-0.03594241291284561,
-0.9942564964294434,
0.516004204750061,
-0.22001731395721436,
-0.4801216125488281,
0.24830086529254913,
0.4674992859363556,
1.1845676898956299,
-0.0815473198890686,
0.15306244790554047,
1.2137482166290283,
-1.3993114233016968,
1.4707274436950684,
-0.8142831325531006,
0.20311672985553741,
-2.465095043182373,
1.5996352434158325,
-0.7561663389205933,
1.8744866847991943,
-2.848886489868164,
0.5128850340843201,
-0.48397642374038696,
-0.534679651260376,
0.45083683729171753,
-0.41951465606689453,
0.055741406977176666,
-0.15636779367923737,
-0.9474842548370361,
-0.004579736851155758,
-0.6739258170127869,
0.5738109946250916,
1.1386518478393555,
1.2356905937194824,
-1.1042884588241577,
-0.3215731382369995,
-1.6944955587387085,
-0.21247483789920807,
-0.6750335097312927,
0.38046133518218994,
-2.144146680831909,
-0.16772159934043884,
-1.9194915294647217,
-2.3738324642181396,
-1.268689751625061,
-0.763719379901886,
1.076446533203125,
0.302313894033432,
-1.0043514966964722,
1.1734360456466675,
-0.4811442494392395,
-1.8593074083328247,
1.223776936531067,
-2.166576385498047
] |
https://github.com/huggingface/datasets/issues/5988 | ConnectionError: Couldn't reach dataset_infos.json | Unfortunately, I can't reproduce the error. What does the following code return for you?
```python
import requests
from huggingface_hub import hf_hub_url
r = requests.get(hf_hub_url("codeparrot/codeparrot-clean-train", "dataset_infos.json", repo_type="dataset"))
```
Also, can you provide more info about your network (region, proxies, etc.)? | ### Describe the bug
I'm trying to load codeparrot/codeparrot-clean-train, but get the following error:
ConnectionError: Couldn't reach https://huggingface.co/datasets/codeparrot/codeparrot-clean-train/resolve/main/dataset_infos.json (ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))))
### Steps to reproduce the bug
train_data = load_dataset('codeparrot/codeparrot-clean-train', split='train')
### Expected behavior
download the dataset
### Environment info
centos7 | 81 | 39 | ConnectionError: Couldn't reach dataset_infos.json
### Describe the bug
I'm trying to load codeparrot/codeparrot-clean-train, but get the following error:
ConnectionError: Couldn't reach https://huggingface.co/datasets/codeparrot/codeparrot-clean-train/resolve/main/dataset_infos.json (ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))))
### Steps to reproduce the bug
train_data = load_dataset('codeparrot/codeparrot-clean-train', split='train')
### Expected behavior
download the dataset
### Environment info
centos7
Unfortunately, I can't reproduce the error. What does the following code return for you?
```python
import requests
from huggingface_hub import hf_hub_url
r = requests.get(hf_hub_url("codeparrot/codeparrot-clean-train", "dataset_infos.json", repo_type="dataset"))
```
Also, can you provide more info about your network (region, proxies, etc.)? | [
-1.2075880765914917,
-1.0715672969818115,
-0.766392707824707,
1.5733826160430908,
-0.22550630569458008,
-1.1779232025146484,
0.04055429995059967,
-1.0047173500061035,
1.5180195569992065,
-0.7864373922348022,
0.22923125326633453,
-1.7453511953353882,
-0.060092560946941376,
-0.6615644693374634,
-0.7385545969009399,
-0.834074854850769,
-0.31954067945480347,
-0.7796596884727478,
1.070286750793457,
2.501511573791504,
1.2217296361923218,
-1.3490172624588013,
2.8311691284179688,
0.6756736636161804,
-0.09994522482156754,
-1.0824507474899292,
0.4713679552078247,
-0.11823081225156784,
-1.142419695854187,
-0.5898934006690979,
-1.0624253749847412,
-0.042947933077812195,
-0.5909244418144226,
-0.4204421639442444,
0.061662428081035614,
0.424121618270874,
-0.2328241467475891,
-0.3910770118236542,
-0.5617936849594116,
-0.7344812154769897,
0.46080100536346436,
-0.354129433631897,
0.9288831949234009,
-0.4149218499660492,
1.8353800773620605,
-0.5608208179473877,
0.36408761143684387,
0.654694139957428,
1.3233113288879395,
0.2811465859413147,
-0.00547071686014533,
0.4555402100086212,
0.4287739396095276,
0.0263106357306242,
0.5552830100059509,
1.1856977939605713,
0.5803309082984924,
0.4997347295284271,
0.6570601463317871,
-2.223452568054199,
1.25596022605896,
-0.9862836003303528,
0.2560868561267853,
1.3854446411132812,
-0.9393237829208374,
0.3712942898273468,
-1.8176957368850708,
-0.027796680107712746,
0.6255061626434326,
-2.1904773712158203,
0.2865862548351288,
-1.3417447805404663,
-0.5576890707015991,
1.0133386850357056,
0.44313663244247437,
-1.38694429397583,
0.08892453461885452,
-0.4103981852531433,
1.1044161319732666,
0.44384682178497314,
1.0081918239593506,
-1.697497844696045,
0.0032698316499590874,
-0.25321221351623535,
0.07361031323671341,
-1.2754477262496948,
-1.5396226644515991,
0.5639380216598511,
0.6444248557090759,
0.6985027194023132,
-0.15985888242721558,
0.9776548743247986,
-1.1300922632217407,
0.7970718145370483,
-0.9856961965560913,
-1.7036991119384766,
-1.456563949584961,
-2.4308700561523438,
-2.3278143405914307,
0.7972950339317322,
-0.46446776390075684,
-0.5154398679733276,
2.071676731109619,
-1.0203906297683716,
-1.8404924869537354,
1.231667160987854,
0.3467477560043335,
-0.013795806095004082,
2.4322855472564697,
0.33077341318130493,
-0.835189938545227,
0.4784355163574219,
-0.7487472295761108,
0.9008920192718506,
-0.4305635094642639,
1.4672096967697144,
0.4455406963825226,
-0.9935029149055481,
1.6926419734954834,
-0.4005674719810486,
0.5854615569114685,
-0.5469595193862915,
-0.5314874649047852,
-0.753018319606781,
0.3050461411476135,
1.9727939367294312,
-0.21004648506641388,
1.4966472387313843,
-0.36631345748901367,
-1.5317015647888184,
-1.6101552248001099,
0.912190318107605,
0.3818160593509674,
-0.946908175945282,
0.2165232002735138,
-0.38698896765708923,
0.15714490413665771,
-0.07507676631212234,
1.1489475965499878,
1.2970603704452515,
0.7011660933494568,
-0.3870057165622711,
-0.8324454426765442,
0.12692831456661224,
-0.09631012380123138,
-0.6853398084640503,
-1.7076562643051147,
-0.334975004196167,
0.15830227732658386,
0.6402744054794312,
-1.2495253086090088,
1.648616909980774,
0.849028468132019,
1.9280883073806763,
0.9885934591293335,
-0.29116931557655334,
1.3808449506759644,
0.09631465375423431,
1.8585801124572754,
-0.5809673070907593,
0.5009732246398926,
-0.3657199740409851,
-1.198652982711792,
0.7505970597267151,
-0.42478397488594055,
-2.0413296222686768,
-0.7734550833702087,
-0.902112603187561,
-0.18945501744747162,
-0.7851252555847168,
0.9323415160179138,
-0.3712509870529175,
-1.4550172090530396,
0.2978382408618927,
-0.7501751780509949,
0.217752143740654,
-1.2840299606323242,
0.25571635365486145,
0.7154552340507507,
-0.685399055480957,
0.04995623975992203,
-0.27520081400871277,
-1.2771979570388794,
-0.48584428429603577,
0.34140682220458984,
1.9584100246429443,
-0.7980517745018005,
0.9276821613311768,
0.9398562908172607,
-0.6621277332305908,
0.0065868813544511795,
0.37683743238449097,
-0.18625397980213165,
0.782952070236206,
-1.0713804960250854,
-0.4745381772518158,
1.1779365539550781,
-0.3214648962020874,
-0.5658257603645325,
1.3764262199401855,
0.9065688252449036,
-1.0728992223739624,
-0.27488166093826294,
-0.1519031524658203,
-0.7678132057189941,
-0.030657554045319557,
-1.6247395277023315,
-0.16528959572315216,
0.3975954055786133,
-1.4784377813339233,
-0.5257603526115417,
-0.2545352280139923,
1.3226250410079956,
-0.11270454525947571,
1.4362868070602417,
-0.3748032748699188,
-0.16374631226062775,
-0.20257079601287842,
-0.545089066028595,
0.23859266936779022,
-0.20908036828041077,
-0.5281132459640503,
0.13685892522335052,
-0.733489990234375,
0.3517454266548157,
1.4794540405273438,
0.3283747434616089,
0.09935493767261505,
0.5803961753845215,
1.1810853481292725,
0.39711812138557434,
-0.010986004024744034,
-0.9324710965156555,
-1.543160319328308,
1.9914568662643433,
-1.4639102220535278,
2.019821882247925,
0.7358346581459045,
-0.05621924251317978,
-1.8065096139907837,
-1.7986763715744019,
1.3700995445251465,
1.197110652923584,
2.2675933837890625,
0.6579940915107727,
0.36825239658355713,
-0.9782079458236694,
-0.6999008655548096,
0.22710882127285004,
-0.9287891387939453,
-0.7493330240249634,
0.14607147872447968,
2.4468963146209717,
1.7881988286972046,
-0.42460036277770996,
-0.17916978895664215,
-1.0012563467025757,
1.3622797727584839,
-0.43085435032844543,
0.3246767818927765,
1.985587239265442,
-0.26649245619773865,
-1.0111525058746338,
1.3170403242111206,
-2.3402369022369385,
0.24825800955295563,
2.1204118728637695,
0.22465623915195465,
0.1406737118959427,
-1.4824233055114746,
-0.7056524753570557,
-0.2970156967639923,
-0.388802707195282,
-1.234826683998108,
0.4923296868801117,
-0.3929130733013153,
-0.8869312405586243,
-1.4628984928131104,
0.12147864699363708,
-1.0578091144561768,
-1.545047402381897,
0.25415077805519104,
1.920360803604126,
2.0629048347473145,
-0.6287499666213989,
1.5619539022445679,
-0.2631801664829254,
0.21868838369846344,
1.3708655834197998,
1.281325101852417,
3.063739061355591,
1.8108752965927124,
-1.268237829208374,
0.8198942542076111,
-0.15825428068637848,
-0.45444801449775696,
1.195793867111206,
-1.0911366939544678,
1.2398312091827393,
-0.18870621919631958,
-1.2090755701065063,
-1.147732138633728,
0.9663103222846985,
0.5005510449409485,
-0.018343038856983185,
-0.5179585218429565,
1.2743061780929565,
0.0754568800330162,
1.2605245113372803,
0.5984285473823547,
-0.46099239587783813,
0.44580981135368347,
-0.34338170289993286,
-0.5873315930366516,
1.5069202184677124,
0.15262001752853394,
-1.5968137979507446,
-2.2528178691864014,
-0.2068776786327362,
-0.9284060597419739,
-0.1089109480381012,
-0.6491702198982239,
-1.046645164489746,
1.5711179971694946,
0.38788875937461853,
-1.140118956565857,
-0.3132275342941284,
-0.34261155128479004,
-0.4943258464336395,
2.678354501724243,
-1.3102325201034546,
-0.3055941164493561,
-0.9270617961883545,
-0.5492458939552307,
1.7008341550827026,
-1.1588784456253052,
-0.1901543140411377,
-1.084366798400879,
-0.6562126278877258,
-1.3119951486587524,
-0.5604975819587708,
0.005969111807644367,
-0.8731698989868164,
0.8034923672676086,
0.1398618072271347,
-1.0911141633987427,
-0.22674183547496796,
-0.865940272808075,
0.9546610713005066,
-0.16321220993995667,
0.20328710973262787,
1.9268829822540283,
0.3232511579990387,
-0.42236319184303284,
0.8706967234611511,
1.2184826135635376,
0.6545924544334412,
-0.5943370461463928,
0.16991861164569855,
-0.5548233389854431,
0.37951231002807617,
-1.307326316833496,
0.28874829411506653,
-2.9364066123962402,
0.7067071795463562,
-0.025537552312016487,
-0.23990851640701294,
-0.038299448788166046,
-1.3503127098083496,
1.0430303812026978,
2.436929702758789,
-1.220024824142456,
0.49300721287727356,
0.25986379384994507,
1.2472271919250488,
-1.676741361618042,
0.197238028049469,
-0.5251075625419617,
2.030789852142334,
0.12850430607795715,
1.2195731401443481,
-0.4696735441684723,
-2.2359094619750977,
0.7363596558570862,
-1.2703348398208618,
-1.0574688911437988,
0.7088897228240967,
-0.8798231482505798,
0.175994873046875,
-1.4236576557159424,
-0.18115530908107758,
-0.9002097249031067,
-1.2695372104644775,
0.7541826963424683,
0.23207272589206696,
0.4088657796382904,
-0.5265830755233765,
0.3971967399120331,
-2.134613275527954,
-1.4492079019546509,
-0.10520537197589874,
-0.9144559502601624,
0.5168887376785278,
-0.4370095133781433,
0.7285300493240356,
-0.18320967257022858,
0.000029889866709709167,
0.3503267168998718,
1.525632619857788,
3.3632242679595947,
0.09437604248523712,
0.2774254083633423,
-0.13989371061325073,
-1.002151608467102,
1.4663031101226807,
0.9268316030502319,
-0.18716029822826385,
-0.5452039241790771,
-1.0993093252182007,
1.3104286193847656,
2.0416369438171387,
1.0042052268981934,
0.11550171673297882,
-0.8076112866401672,
-0.6524571180343628,
0.04906809329986572,
0.17809318006038666,
0.4856860935688019,
0.8767156600952148,
0.0227531548589468,
0.1153363287448883,
1.436061143875122,
1.1146316528320312,
-0.4185950458049774,
0.4139128029346466,
-0.8251539468765259,
-0.44024163484573364,
0.543283224105835,
0.23600874841213226,
0.006096109747886658,
0.3967966139316559,
-0.9996346831321716,
-0.22550827264785767,
-0.39137470722198486,
-0.8833581209182739,
-0.7029853463172913,
-0.4319201409816742,
-0.4649582803249359,
1.5346602201461792,
0.04015194624662399,
-0.5716712474822998,
-0.041757732629776,
-0.7494678497314453,
-0.14587779343128204,
-1.0499831438064575,
0.12340132892131805,
-0.06102515757083893,
-0.13508941233158112,
-0.16523896157741547,
1.6642824411392212,
-0.9691433906555176,
-2.1211907863616943,
0.15208278596401215,
0.369427889585495,
-0.2151142656803131,
0.18689703941345215,
1.676141619682312,
0.4097338616847992,
1.4223686456680298,
1.3649402856826782,
0.8979127407073975,
-0.6562060713768005,
-1.255655288696289,
0.6879884600639343,
0.9480570554733276,
-1.4739176034927368,
0.8807200789451599,
-0.11825893074274063,
-0.5752577185630798,
0.7057293653488159,
1.2626044750213623,
0.42183011770248413,
-1.8259708881378174,
0.8033127188682556,
-0.9911582469940186,
0.8156919479370117,
0.7024446129798889,
0.7767301797866821,
0.294766366481781,
0.8741289377212524,
-1.1864533424377441,
-1.1749528646469116,
-0.759418785572052,
-0.621743381023407,
1.8735909461975098,
-0.1935614049434662,
0.4054865837097168,
-0.12560325860977173,
-1.2441540956497192,
-0.1239486038684845,
0.7937618494033813,
0.34182292222976685,
-0.3865811228752136,
0.7548213005065918,
-0.7683046460151672,
-1.0006376504898071,
-1.3677752017974854,
-0.4173741042613983,
-0.9401241540908813,
-1.0128318071365356,
1.0733672380447388,
0.8103513121604919,
0.3320229947566986,
1.9046437740325928,
0.619062066078186,
0.2183062732219696,
-2.5169520378112793,
0.9681822657585144,
0.2587921619415283,
-0.07136499881744385,
0.9177321195602417,
0.27902501821517944,
1.1704580783843994,
0.01936073787510395,
0.5511130690574646,
-2.322695016860962,
2.1952881813049316,
-0.22634117305278778,
0.6213553547859192,
-0.10139904171228409,
-0.07870230823755264,
1.143293857574463,
0.49795475602149963,
0.5058524012565613,
-1.0877149105072021,
0.7461599111557007,
-0.44713887572288513,
1.0981756448745728,
0.9545213580131531,
-0.9275776147842407,
0.03269233554601669,
1.3712983131408691,
0.393966943025589,
-0.5451579093933105,
-0.966467559337616,
-0.7798773050308228,
0.9461379647254944,
1.59938645362854,
-0.12579084932804108,
0.03749149292707443,
0.8321157097816467,
0.497301310300827,
-1.2928905487060547,
0.11013307422399521,
-0.5482182502746582,
-0.7528358101844788,
1.6701133251190186,
2.0135278701782227,
-0.16524142026901245,
-0.06081588566303253,
-0.735445499420166,
-1.3512523174285889,
0.7601659893989563,
-0.12034181505441666,
0.04826005548238754,
0.7412719130516052,
-0.6236088871955872,
1.021388053894043,
0.7302936315536499,
0.9853671193122864,
0.10045060515403748,
0.2651888430118561,
0.42481979727745056,
-0.3046693205833435,
-1.2265170812606812,
-0.31151148676872253,
-1.0733472108840942,
-2.5268778800964355,
0.37502554059028625,
-0.2661149203777313,
-1.371443748474121,
0.1859315037727356,
-0.9568921327590942,
0.9755792617797852,
-0.5849573612213135,
-1.1203136444091797,
-1.4481585025787354,
0.28475329279899597,
-0.09333314746618271,
0.7938586473464966,
-1.6661341190338135,
-0.15817156434059143,
1.3239434957504272,
0.9149870872497559,
-0.646080493927002,
0.9232136011123657,
0.33727172017097473,
1.0358657836914062,
0.82098388671875,
-0.36614057421684265,
0.616776168346405,
0.01578230783343315,
-1.3752741813659668,
0.58183354139328,
1.2097958326339722,
0.20730279386043549,
1.4057576656341553,
-0.4394766092300415,
-0.028686748817563057,
0.47329622507095337,
-0.5860471725463867,
-0.37532660365104675,
-0.4556995630264282,
0.5146039724349976,
0.019547114148736,
-0.9144777655601501,
-0.008111677132546902,
-0.07594297081232071,
-0.2502422332763672,
0.18878525495529175,
-1.510042428970337,
-0.1928652971982956,
-0.36905038356781006,
-0.5165654420852661,
-1.3015168905258179,
-0.07751471549272537,
1.3591676950454712,
-0.7259246706962585,
-0.2561388611793518,
0.605370819568634,
0.36056631803512573,
0.5564343333244324,
0.6534374952316284,
-0.6665027737617493,
-0.2090781331062317,
-0.3070738613605499,
-0.3780287206172943,
0.2325858324766159,
1.3099414110183716,
-0.10080574452877045,
-1.0890010595321655,
0.6970541477203369,
-0.36393389105796814,
0.043548308312892914,
1.8036904335021973,
0.06945503503084183,
-0.8344722390174866,
0.3230549097061157,
-0.5774114727973938,
2.0603373050689697,
1.735628604888916,
1.2594350576400757,
-0.22607779502868652,
-0.9153506755828857,
0.6083145141601562,
-0.25767916440963745,
-0.2896902561187744,
0.8658714890480042,
0.4707346260547638,
-0.24963194131851196,
-1.3679845333099365,
0.783577024936676,
1.2409230470657349,
-0.9213927984237671,
-0.790727972984314,
0.11232243478298187,
-0.8122296333312988,
1.0174267292022705,
0.7073560357093811,
0.4020833969116211,
0.2453514188528061,
1.6602851152420044,
0.7364833950996399,
-0.552076518535614,
0.5058459639549255,
0.5790396332740784,
-0.11842816323041916,
-2.0970380306243896,
-1.065913438796997,
0.3846622705459595,
-0.41401419043540955,
-1.5954056978225708,
1.3123760223388672,
-1.0907249450683594,
-0.9110863208770752,
0.5660647749900818,
0.19201083481311798,
1.3296672105789185,
0.36565956473350525,
1.5036031007766724,
2.114739418029785,
0.793907105922699,
0.41059011220932007,
1.2344032526016235,
-0.09931881725788116,
-0.40328511595726013,
1.8247750997543335,
-0.34341171383857727,
0.5553770065307617,
1.0954562425613403,
-0.4607756435871124,
-1.1462770700454712,
-0.7867556214332581,
-1.2730900049209595,
-0.6433554291725159,
1.0381278991699219,
0.19540083408355713,
-1.1668164730072021,
0.2356436550617218,
1.5408226251602173,
0.11019621789455414,
-0.29979461431503296,
0.6705363988876343,
0.4352124035358429,
-0.7100697159767151,
-0.0146276680752635,
-0.9367640018463135,
0.44984084367752075,
-0.15468282997608185,
-0.30485594272613525,
0.3987557888031006,
0.4078538119792938,
1.3851187229156494,
-0.02153700217604637,
0.1345093697309494,
1.1757370233535767,
-1.3974566459655762,
1.3726122379302979,
-0.714179277420044,
0.3108330965042114,
-2.4027886390686035,
1.278430461883545,
-0.8041813969612122,
1.9114837646484375,
-2.6393399238586426,
0.4372291564941406,
-0.6910088658332825,
-0.48410362005233765,
0.22706547379493713,
-0.31038960814476013,
0.18380099534988403,
-0.11468523740768433,
-1.052066445350647,
0.054052479565143585,
-0.680284857749939,
0.6389034986495972,
1.1023311614990234,
1.4090681076049805,
-1.1227785348892212,
-0.15871170163154602,
-1.7384312152862549,
-0.18242843449115753,
-0.8472386598587036,
0.3686472773551941,
-2.0639476776123047,
-0.12024305015802383,
-1.8899927139282227,
-2.3631591796875,
-1.3406572341918945,
-0.8480343222618103,
1.2022814750671387,
0.11775559186935425,
-0.8989234566688538,
1.3381644487380981,
-0.3327530324459076,
-1.8141447305679321,
0.9689241051673889,
-2.146589517593384
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | Can you explain your use case for `max_shard_size`?
On some systems, there is a limit to the size of a memory-mapped file, so we could consider exposing this parameter in `load_dataset`. | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 82 | 31 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Can you explain your use case for `max_shard_size`?
On some systems, there is a limit to the size of a memory-mapped file, so we could consider exposing this parameter in `load_dataset`. | [
-1.1667712926864624,
-0.892246663570404,
-0.7626250386238098,
1.3871655464172363,
0.019118674099445343,
-1.2542994022369385,
0.14093641936779022,
-1.066645622253418,
1.647641658782959,
-0.7935915589332581,
0.23111723363399506,
-1.6947063207626343,
-0.08435486257076263,
-0.6723871827125549,
-0.7163954973220825,
-0.8900449872016907,
-0.30459386110305786,
-0.7214945554733276,
0.9740992188453674,
2.4807662963867188,
1.2586474418640137,
-1.2890609502792358,
2.7224578857421875,
0.6957509517669678,
-0.38299083709716797,
-1.0028730630874634,
0.4558212459087372,
-0.02262618951499462,
-1.143242597579956,
-0.41778576374053955,
-0.8977760076522827,
0.012578788213431835,
-0.5167005658149719,
-0.5124277472496033,
0.040450844913721085,
0.4902520477771759,
-0.32535862922668457,
-0.3175603151321411,
-0.5165350437164307,
-0.8083482980728149,
0.45423686504364014,
-0.37268027663230896,
0.9118630886077881,
-0.37356704473495483,
1.857542872428894,
-0.615501344203949,
0.4084571599960327,
0.7200511693954468,
1.3662176132202148,
0.0743853971362114,
0.045714329928159714,
0.22295349836349487,
0.3133464455604553,
-0.040944576263427734,
0.44651129841804504,
1.150894045829773,
0.5895033478736877,
0.5029018521308899,
0.5675638318061829,
-2.181569814682007,
1.4025168418884277,
-0.9011293649673462,
0.1996222287416458,
1.390979290008545,
-0.9809899926185608,
0.3677966296672821,
-1.7274935245513916,
-0.0647798404097557,
0.5537451505661011,
-2.2736451625823975,
0.2495352178812027,
-1.3523660898208618,
-0.5613763332366943,
0.9580044746398926,
0.3162471652030945,
-1.3084185123443604,
0.14593321084976196,
-0.5215906500816345,
1.1504911184310913,
0.5751810073852539,
1.0883539915084839,
-1.7269413471221924,
-0.07611244171857834,
-0.1898149698972702,
-0.01075409259647131,
-1.422091007232666,
-1.5453431606292725,
0.5525785684585571,
0.6708613634109497,
0.7149757742881775,
0.006282351911067963,
0.9653440117835999,
-0.9506150484085083,
0.7226851582527161,
-0.9054139256477356,
-1.6983311176300049,
-1.3693007230758667,
-2.3328709602355957,
-2.356093406677246,
0.80191969871521,
-0.453113317489624,
-0.5371772646903992,
2.0437583923339844,
-1.114011287689209,
-1.837824821472168,
1.1169090270996094,
0.2037978321313858,
-0.028526686131954193,
2.408277988433838,
0.3514932692050934,
-0.7314504384994507,
0.38768282532691956,
-0.6914380788803101,
0.8081507086753845,
-0.488948792219162,
1.3290636539459229,
0.5516906380653381,
-0.9948242902755737,
1.555245041847229,
-0.49451571702957153,
0.5134386420249939,
-0.735124945640564,
-0.51116943359375,
-0.8758909106254578,
0.35816866159439087,
1.9152451753616333,
-0.36287835240364075,
1.6474522352218628,
-0.3700420558452606,
-1.5324645042419434,
-1.5836424827575684,
0.8716345429420471,
0.4396187663078308,
-0.789383053779602,
0.16898053884506226,
-0.4898439943790436,
0.0813480019569397,
-0.05601213872432709,
1.0821726322174072,
1.191734790802002,
0.704804003238678,
-0.3040071129798889,
-0.7965920567512512,
0.30443239212036133,
-0.039013512432575226,
-0.6936081647872925,
-1.80630362033844,
-0.3047811985015869,
0.22578567266464233,
0.5804905295372009,
-1.2752933502197266,
1.713466763496399,
0.8152751922607422,
1.9528599977493286,
1.059682011604309,
-0.2599520683288574,
1.483089804649353,
-0.02447313815355301,
1.9832574129104614,
-0.39924073219299316,
0.6677384972572327,
-0.26587972044944763,
-1.1576786041259766,
0.8347503542900085,
-0.4703978896141052,
-2.002624750137329,
-0.8413460850715637,
-0.8412909507751465,
-0.12295296788215637,
-0.8436800241470337,
0.886650562286377,
-0.2831493318080902,
-1.4088006019592285,
0.2206355631351471,
-0.6822373867034912,
0.2717578113079071,
-1.2859379053115845,
0.23907925188541412,
0.7442827820777893,
-0.5348772406578064,
-0.07197414338588715,
-0.3193539083003998,
-1.2552490234375,
-0.33484530448913574,
0.2833437919616699,
1.9215726852416992,
-0.6817090511322021,
0.9466954469680786,
0.9686639308929443,
-0.6210921406745911,
0.018941521644592285,
0.3105858564376831,
-0.26179417967796326,
0.8248263597488403,
-1.0314960479736328,
-0.23145100474357605,
1.2169445753097534,
-0.19739042222499847,
-0.743496298789978,
1.4475332498550415,
0.8927103877067566,
-1.0373544692993164,
-0.15133258700370789,
-0.18743516504764557,
-0.6883928179740906,
-0.07286032289266586,
-1.5816982984542847,
-0.07637505233287811,
0.4234897494316101,
-1.3353577852249146,
-0.36255350708961487,
-0.1919209212064743,
1.3152332305908203,
-0.20104199647903442,
1.4406614303588867,
-0.3593656122684479,
-0.1303626149892807,
-0.370624303817749,
-0.4468058943748474,
0.05889033153653145,
-0.2301933616399765,
-0.6402419209480286,
0.18036748468875885,
-0.7546303868293762,
0.3308338224887848,
1.3861432075500488,
0.41033658385276794,
0.1026114970445633,
0.5422440767288208,
1.1266990900039673,
0.281059205532074,
-0.07984130084514618,
-0.8484985828399658,
-1.6012078523635864,
2.042790412902832,
-1.3748489618301392,
1.952003836631775,
0.8087508082389832,
-0.07341951131820679,
-1.776175856590271,
-1.8382751941680908,
1.2634299993515015,
1.2117952108383179,
2.318859815597534,
0.49294590950012207,
0.3971748650074005,
-0.8057667016983032,
-0.7859098315238953,
0.30246639251708984,
-0.9930972456932068,
-0.61150723695755,
0.11416091024875641,
2.4212610721588135,
1.76457941532135,
-0.5000400543212891,
-0.24720212817192078,
-1.0349526405334473,
1.240182638168335,
-0.22760288417339325,
0.21677228808403015,
2.026273488998413,
-0.3443702161312103,
-1.0785847902297974,
1.2091848850250244,
-2.2814509868621826,
0.11533278226852417,
2.0360324382781982,
0.21624787151813507,
-0.006725586950778961,
-1.421742558479309,
-0.634415328502655,
-0.3469548523426056,
-0.31703853607177734,
-1.232817530632019,
0.5612342953681946,
-0.2734498083591461,
-0.8221443295478821,
-1.4781670570373535,
0.14309339225292206,
-1.1124125719070435,
-1.6842976808547974,
0.2625516951084137,
1.888681411743164,
1.9999268054962158,
-0.8005459308624268,
1.5279620885849,
-0.16470301151275635,
0.062314923852682114,
1.2901222705841064,
1.2747807502746582,
3.2145795822143555,
1.7442201375961304,
-1.4132357835769653,
0.772741436958313,
-0.11835477501153946,
-0.47637540102005005,
1.2088478803634644,
-1.0841909646987915,
1.2070624828338623,
-0.24366596341133118,
-1.2744791507720947,
-1.3540114164352417,
0.9870958924293518,
0.5087055563926697,
0.05232715234160423,
-0.49589255452156067,
1.3551406860351562,
0.0048623112961649895,
1.446821689605713,
0.6194342970848083,
-0.414038747549057,
0.6464717388153076,
-0.33771735429763794,
-0.528537929058075,
1.5602734088897705,
0.2605973184108734,
-1.4595180749893188,
-2.3050127029418945,
-0.26025891304016113,
-0.7954464554786682,
-0.07652989774942398,
-0.6829350590705872,
-1.0935457944869995,
1.630796194076538,
0.47549161314964294,
-1.2515772581100464,
-0.3730349838733673,
-0.29709121584892273,
-0.5764613151550293,
2.6773841381073,
-1.482195496559143,
-0.12716838717460632,
-1.043839454650879,
-0.4951556324958801,
1.6801841259002686,
-1.2066450119018555,
-0.1834695190191269,
-0.9782912731170654,
-0.7085509300231934,
-1.280749797821045,
-0.5281826257705688,
-0.14606347680091858,
-0.9596813917160034,
0.7184820771217346,
0.11541861295700073,
-1.0771194696426392,
-0.12123492360115051,
-0.8969432711601257,
0.9394798278808594,
-0.17350949347019196,
0.286958783864975,
1.779747724533081,
0.5079206824302673,
-0.46635496616363525,
0.7672385573387146,
1.1251835823059082,
0.5111809968948364,
-0.7919303774833679,
0.10916759818792343,
-0.7922806143760681,
0.26681289076805115,
-1.360144853591919,
0.2988876402378082,
-2.9372987747192383,
0.5835794806480408,
-0.2363203763961792,
-0.12278035283088684,
-0.047399405390024185,
-1.3387256860733032,
1.1631070375442505,
2.5802323818206787,
-1.2130231857299805,
0.5958366394042969,
0.33125725388526917,
1.2739384174346924,
-1.6547482013702393,
0.35769855976104736,
-0.45432260632514954,
2.058990955352783,
0.17025551199913025,
1.2650840282440186,
-0.4840799868106842,
-2.1203300952911377,
0.5633432269096375,
-1.2790454626083374,
-1.1148481369018555,
0.9182528257369995,
-0.8558111786842346,
0.15681539475917816,
-1.3048657178878784,
-0.2549208998680115,
-0.8587806224822998,
-1.3013954162597656,
0.7798154354095459,
0.08878899365663528,
0.48680922389030457,
-0.5626450181007385,
0.36855271458625793,
-2.1717350482940674,
-1.3291089534759521,
-0.2218565046787262,
-0.9395791888237,
0.4144517481327057,
-0.3248063623905182,
0.5780153870582581,
-0.18524688482284546,
0.0789882242679596,
0.3611777126789093,
1.3367252349853516,
3.3898227214813232,
0.3012625277042389,
0.25346481800079346,
-0.05446616932749748,
-0.9160321950912476,
1.417677879333496,
0.8984869718551636,
-0.16060219705104828,
-0.5837695598602295,
-0.9160581827163696,
1.3320661783218384,
1.9939639568328857,
1.057288408279419,
0.09739512205123901,
-0.8355793356895447,
-0.7067397236824036,
0.050797197967767715,
0.2155379205942154,
0.4398140609264374,
0.8685644268989563,
0.028893299400806427,
0.18267908692359924,
1.3452329635620117,
1.2557125091552734,
-0.4090407192707062,
0.432350754737854,
-0.9166833758354187,
-0.41083839535713196,
0.3827430307865143,
0.2882190942764282,
0.007382816635072231,
0.39292752742767334,
-1.005037546157837,
-0.2559290826320648,
-0.33227118849754333,
-0.8830896019935608,
-0.8160985708236694,
-0.46219903230667114,
-0.4150211811065674,
1.5901087522506714,
0.14418837428092957,
-0.4172029495239258,
0.0007247952744364738,
-0.7423811554908752,
-0.1807689517736435,
-1.1688228845596313,
0.19811458885669708,
-0.10109167546033859,
-0.1203247457742691,
0.025578778237104416,
1.695573091506958,
-1.020212173461914,
-2.147031545639038,
0.25831252336502075,
0.19182293117046356,
-0.3890242278575897,
0.08644826710224152,
1.7814650535583496,
0.5602315664291382,
1.4198614358901978,
1.2847487926483154,
1.0141494274139404,
-0.7931878566741943,
-1.1994376182556152,
0.7105768918991089,
0.9124932289123535,
-1.4520817995071411,
0.8687885999679565,
-0.009683727286756039,
-0.5680482387542725,
0.7120859026908875,
1.2580162286758423,
0.3809928894042969,
-1.9814536571502686,
0.7382473349571228,
-0.9369028210639954,
0.7179238200187683,
0.6943691372871399,
0.8138030171394348,
0.34188777208328247,
0.8532588481903076,
-1.2293628454208374,
-1.2011585235595703,
-0.7840700745582581,
-0.6165446043014526,
1.9470152854919434,
-0.20574918389320374,
0.5617629289627075,
-0.08819834887981415,
-1.2562601566314697,
-0.105214923620224,
0.8250239491462708,
0.36857762932777405,
-0.3631831109523773,
0.8527950644493103,
-0.7327741980552673,
-1.061396598815918,
-1.410254955291748,
-0.500068724155426,
-0.9630760550498962,
-0.924952507019043,
1.0717417001724243,
0.8397068977355957,
0.3322659730911255,
1.8900439739227295,
0.593131422996521,
0.2975325584411621,
-2.619292736053467,
0.8594777584075928,
0.2813158631324768,
-0.05625738948583603,
0.8690197467803955,
0.3235972821712494,
1.1621540784835815,
0.04790962487459183,
0.45775893330574036,
-2.422791004180908,
2.1713123321533203,
-0.2603490650653839,
0.5756585001945496,
-0.04099252074956894,
-0.13596150279045105,
1.132434368133545,
0.521495521068573,
0.5387688279151917,
-1.1346349716186523,
0.831704318523407,
-0.5320559144020081,
1.0988597869873047,
0.9447116255760193,
-0.9028030037879944,
0.08878984302282333,
1.4208488464355469,
0.41141247749328613,
-0.5108301639556885,
-0.9134102463722229,
-0.8588415384292603,
0.932094395160675,
1.6316806077957153,
-0.039777737110853195,
0.016648419201374054,
0.9057018160820007,
0.5783593058586121,
-1.26936936378479,
0.1455918252468109,
-0.6572660207748413,
-0.6910868883132935,
1.7346932888031006,
2.104172706604004,
-0.10968837887048721,
-0.20800204575061798,
-0.8363862633705139,
-1.1409258842468262,
0.8177233934402466,
-0.07434260845184326,
0.08634433895349503,
0.6355037689208984,
-0.6845795512199402,
1.149611473083496,
0.7399432063102722,
0.9603736996650696,
0.06094038113951683,
0.30709707736968994,
0.4894501566886902,
-0.2621077299118042,
-1.1273843050003052,
-0.25364264845848083,
-1.1176671981811523,
-2.5453693866729736,
0.5271435976028442,
-0.3165763318538666,
-1.4959794282913208,
0.07318112254142761,
-1.0427281856536865,
0.8833703398704529,
-0.6816595196723938,
-1.0493981838226318,
-1.4889665842056274,
0.29397907853126526,
-0.20329974591732025,
0.8633603453636169,
-1.606679916381836,
-0.12984658777713776,
1.3159499168395996,
0.8549056649208069,
-0.5234189629554749,
1.050711989402771,
0.24980269372463226,
1.0051368474960327,
0.8515884876251221,
-0.38914936780929565,
0.5507164597511292,
0.0850854367017746,
-1.3562545776367188,
0.43426039814949036,
1.3068195581436157,
0.14576846361160278,
1.5510748624801636,
-0.45551830530166626,
0.07932790368795395,
0.4423580467700958,
-0.47113022208213806,
-0.42946571111679077,
-0.4492878317832947,
0.7376244068145752,
0.19360174238681793,
-0.9580715894699097,
0.01836339756846428,
-0.16592663526535034,
-0.2643629312515259,
0.27516746520996094,
-1.5271155834197998,
-0.271298348903656,
-0.3530745804309845,
-0.5953097939491272,
-1.2718000411987305,
0.047709815204143524,
1.324721097946167,
-0.7628506422042847,
-0.19113409519195557,
0.47632184624671936,
0.396186500787735,
0.5545807480812073,
0.5954973101615906,
-0.6781489849090576,
-0.29190295934677124,
-0.36896654963493347,
-0.27962973713874817,
0.31719210743904114,
1.2163126468658447,
-0.10698633641004562,
-1.0114072561264038,
0.6785828471183777,
-0.41860902309417725,
0.09325883537530899,
1.9859541654586792,
0.14078135788440704,
-0.7682415843009949,
0.21921689808368683,
-0.7408316731452942,
2.0103747844696045,
1.630284070968628,
1.369940996170044,
-0.021221399307250977,
-0.9691341519355774,
0.6132250428199768,
-0.17713263630867004,
-0.33541834354400635,
1.0043721199035645,
0.4942624568939209,
-0.18746492266654968,
-1.4061720371246338,
0.5553302764892578,
1.1526092290878296,
-0.8531187176704407,
-0.7531327605247498,
-0.08387207984924316,
-0.8610866069793701,
1.123490810394287,
0.667750358581543,
0.26322466135025024,
0.19111284613609314,
1.6199629306793213,
0.6415545344352722,
-0.5471473932266235,
0.5250773429870605,
0.34799501299858093,
-0.15110832452774048,
-2.1206648349761963,
-0.97907555103302,
0.35774677991867065,
-0.2602406442165375,
-1.591873049736023,
1.309632658958435,
-1.0759999752044678,
-0.9171528220176697,
0.47748705744743347,
0.17950467765331268,
1.4807884693145752,
0.2780454754829407,
1.6249977350234985,
2.0950636863708496,
0.8974986672401428,
0.23745955526828766,
1.3111940622329712,
-0.08014454692602158,
-0.4463984966278076,
1.7663823366165161,
-0.4321107566356659,
0.45914965867996216,
0.908923864364624,
-0.42369312047958374,
-1.1686694622039795,
-0.8152530789375305,
-1.123694896697998,
-0.6497964262962341,
1.1919384002685547,
0.15966227650642395,
-1.0711678266525269,
0.23790773749351501,
1.5989789962768555,
0.07755863666534424,
-0.2307027131319046,
0.6628892421722412,
0.4676009714603424,
-0.742784321308136,
-0.010732368566095829,
-0.9190732836723328,
0.5155672430992126,
-0.021448224782943726,
-0.2748333811759949,
0.28337541222572327,
0.5068637132644653,
1.2172561883926392,
-0.05644514784216881,
0.16051343083381653,
1.2353323698043823,
-1.3576698303222656,
1.452064871788025,
-0.5369036197662354,
0.23809263110160828,
-2.4133098125457764,
1.352155327796936,
-0.8220806121826172,
1.8552372455596924,
-2.599666118621826,
0.3850567638874054,
-0.6217535734176636,
-0.42220547795295715,
0.3355836570262909,
-0.4138788878917694,
0.19537384808063507,
-0.16457368433475494,
-1.1012018918991089,
-0.12303296476602554,
-0.8293679356575012,
0.6488037705421448,
1.045365571975708,
1.298167109489441,
-1.0994583368301392,
-0.1286768615245819,
-1.754992961883545,
-0.19665555655956268,
-0.7831616401672363,
0.24723614752292633,
-1.9536155462265015,
-0.0680154487490654,
-2.067692756652832,
-2.361544132232666,
-1.4119527339935303,
-0.7863192558288574,
1.0350018739700317,
0.16706684231758118,
-0.9569308161735535,
1.1821646690368652,
-0.3279072642326355,
-1.817751169204712,
1.0864864587783813,
-2.1708648204803467
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | In my use case, users may choose a proper size to balance the cost and benefit of using large shard size. (On azure blob or hdfs which may automatically download the shard from background) | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 82 | 34 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
In my use case, users may choose a proper size to balance the cost and benefit of using large shard size. (On azure blob or hdfs which may automatically download the shard from background) | [
-1.156877040863037,
-0.8758366107940674,
-0.7630264759063721,
1.3710792064666748,
-0.014597775414586067,
-1.2574185132980347,
0.09686551988124847,
-1.0795725584030151,
1.6235390901565552,
-0.8011085987091064,
0.19693367183208466,
-1.6533048152923584,
-0.058789875358343124,
-0.612985372543335,
-0.7151581048965454,
-0.9068396687507629,
-0.31021299958229065,
-0.7307368516921997,
1.0221034288406372,
2.5057551860809326,
1.2772959470748901,
-1.297340989112854,
2.7662928104400635,
0.7013595104217529,
-0.38985157012939453,
-0.9976337552070618,
0.46126195788383484,
-0.03277181088924408,
-1.1806246042251587,
-0.43194514513015747,
-0.9176765084266663,
0.027616798877716064,
-0.49024251103401184,
-0.5009257197380066,
0.04289795458316803,
0.45274442434310913,
-0.29810115694999695,
-0.3300561308860779,
-0.5232251286506653,
-0.813091516494751,
0.4668666124343872,
-0.3824845552444458,
0.8766027092933655,
-0.37437570095062256,
1.8769429922103882,
-0.587300717830658,
0.38909414410591125,
0.6870570778846741,
1.3836947679519653,
0.07780532538890839,
0.031852446496486664,
0.2548099756240845,
0.31240618228912354,
-0.05366074666380882,
0.4175328314304352,
1.1792820692062378,
0.5801025629043579,
0.4685138761997223,
0.5977063179016113,
-2.137411594390869,
1.3959863185882568,
-0.8909868597984314,
0.1815386563539505,
1.3922683000564575,
-0.9962839484214783,
0.3545287549495697,
-1.7305318117141724,
-0.09221234917640686,
0.5605146884918213,
-2.3211445808410645,
0.2167007476091385,
-1.3524610996246338,
-0.581630289554596,
0.9916544556617737,
0.3164936602115631,
-1.2859083414077759,
0.13116982579231262,
-0.5674354434013367,
1.140540361404419,
0.6014009714126587,
1.1302168369293213,
-1.7201297283172607,
-0.09848535060882568,
-0.15360653400421143,
-0.015102490782737732,
-1.4640363454818726,
-1.5663055181503296,
0.5763192772865295,
0.6828018426895142,
0.7208793759346008,
0.048612598329782486,
0.9836362600326538,
-0.9025201797485352,
0.7267994284629822,
-0.8627746105194092,
-1.6958236694335938,
-1.3975781202316284,
-2.3683791160583496,
-2.3188555240631104,
0.8122830390930176,
-0.4485771358013153,
-0.5259115695953369,
2.0289745330810547,
-1.1575310230255127,
-1.8515084981918335,
1.1261446475982666,
0.1956431120634079,
-0.053161412477493286,
2.4276955127716064,
0.3262507915496826,
-0.7321840524673462,
0.3785236179828644,
-0.6850096583366394,
0.8195980787277222,
-0.481376588344574,
1.352419376373291,
0.549893856048584,
-0.9593640565872192,
1.5711702108383179,
-0.45527124404907227,
0.5214802622795105,
-0.7399039268493652,
-0.49611303210258484,
-0.8686211109161377,
0.37132740020751953,
1.933746099472046,
-0.3959212005138397,
1.658909797668457,
-0.36401450634002686,
-1.5576502084732056,
-1.5849919319152832,
0.8662474155426025,
0.45309144258499146,
-0.7761973738670349,
0.18170328438282013,
-0.4802047312259674,
0.07453098893165588,
-0.019419893622398376,
1.054462194442749,
1.1944842338562012,
0.7036014795303345,
-0.2888422906398773,
-0.8283583521842957,
0.3178052008152008,
-0.03662135452032089,
-0.6626524925231934,
-1.7950507402420044,
-0.33034348487854004,
0.21416489779949188,
0.6173428893089294,
-1.2755756378173828,
1.7001521587371826,
0.8157888054847717,
1.9733940362930298,
1.0715340375900269,
-0.28302669525146484,
1.467492699623108,
0.004134168848395348,
1.931166172027588,
-0.4014529585838318,
0.7009320855140686,
-0.2655738592147827,
-1.1585233211517334,
0.8117268681526184,
-0.4607768654823303,
-1.9863369464874268,
-0.8140950798988342,
-0.8462501764297485,
-0.14141173660755157,
-0.8322620987892151,
0.8840664625167847,
-0.33052921295166016,
-1.384808897972107,
0.22998389601707458,
-0.6640806198120117,
0.2730383276939392,
-1.2820887565612793,
0.2576795518398285,
0.7772863507270813,
-0.559539258480072,
-0.06666840612888336,
-0.30133262276649475,
-1.2574418783187866,
-0.3545747399330139,
0.2756974995136261,
1.973509430885315,
-0.6793587803840637,
0.9473463892936707,
0.9726672768592834,
-0.6371908187866211,
0.05493507161736488,
0.31557023525238037,
-0.2583308815956116,
0.8417903780937195,
-1.0150184631347656,
-0.2089584767818451,
1.216504454612732,
-0.22932802140712738,
-0.6839109659194946,
1.4231094121932983,
0.8943597078323364,
-1.0612473487854004,
-0.17646518349647522,
-0.16671563684940338,
-0.7106938362121582,
-0.06759916245937347,
-1.5517064332962036,
-0.08997826278209686,
0.4159972369670868,
-1.3565571308135986,
-0.3837883174419403,
-0.19630122184753418,
1.3401848077774048,
-0.19601906836032867,
1.4627567529678345,
-0.37387996912002563,
-0.15677261352539062,
-0.38077542185783386,
-0.4568535387516022,
0.08782105147838593,
-0.23036989569664001,
-0.6615656018257141,
0.176012322306633,
-0.7921602129936218,
0.307847797870636,
1.4271442890167236,
0.40369275212287903,
0.12420743703842163,
0.5676791667938232,
1.1077860593795776,
0.2841302156448364,
-0.11274279654026031,
-0.8335917592048645,
-1.6128095388412476,
2.052119731903076,
-1.3696924448013306,
1.9486976861953735,
0.8224667906761169,
-0.09351837635040283,
-1.7670459747314453,
-1.8545633554458618,
1.2377115488052368,
1.198554515838623,
2.301762342453003,
0.5233751535415649,
0.4135165512561798,
-0.7881914973258972,
-0.7832126617431641,
0.29842060804367065,
-0.9728856086730957,
-0.652408242225647,
0.10179370641708374,
2.3929426670074463,
1.7558032274246216,
-0.5144104957580566,
-0.21305646002292633,
-1.0191586017608643,
1.242205023765564,
-0.19794024527072906,
0.2117442637681961,
1.9931509494781494,
-0.31653261184692383,
-1.0819066762924194,
1.1763263940811157,
-2.2616007328033447,
0.1096290647983551,
2.022315263748169,
0.21133635938167572,
-0.007715080864727497,
-1.4227837324142456,
-0.657359778881073,
-0.3827754259109497,
-0.3352115750312805,
-1.2107033729553223,
0.5717196464538574,
-0.2838539481163025,
-0.8353835344314575,
-1.484903335571289,
0.11083760857582092,
-1.1221609115600586,
-1.6920188665390015,
0.24467070400714874,
1.8812930583953857,
2.015774965286255,
-0.8078686594963074,
1.5067129135131836,
-0.17357419431209564,
0.04572535306215286,
1.2559888362884521,
1.2853996753692627,
3.2509474754333496,
1.7225348949432373,
-1.3812363147735596,
0.7778471112251282,
-0.09868216514587402,
-0.4659227728843689,
1.160117745399475,
-1.0888570547103882,
1.208681583404541,
-0.2632422149181366,
-1.2772455215454102,
-1.324865698814392,
0.9854631423950195,
0.4956725835800171,
0.07021798193454742,
-0.4880061149597168,
1.3575884103775024,
-0.0059177465736866,
1.451724886894226,
0.5854741334915161,
-0.39630022644996643,
0.6285092234611511,
-0.31316107511520386,
-0.5435861945152283,
1.5623825788497925,
0.2505393326282501,
-1.4622572660446167,
-2.3065056800842285,
-0.2596041262149811,
-0.774116039276123,
-0.046859897673130035,
-0.6808485388755798,
-1.097359538078308,
1.6101256608963013,
0.48480334877967834,
-1.2203782796859741,
-0.39776986837387085,
-0.31869080662727356,
-0.5761998295783997,
2.6752655506134033,
-1.492143154144287,
-0.15039055049419403,
-1.0235148668289185,
-0.4675288796424866,
1.657730221748352,
-1.2125849723815918,
-0.15626655519008636,
-0.9611907601356506,
-0.6974419951438904,
-1.274492621421814,
-0.5615684986114502,
-0.1732245534658432,
-0.9475452899932861,
0.7210792303085327,
0.1244656890630722,
-1.0434389114379883,
-0.11753427982330322,
-0.9122017025947571,
0.9462159276008606,
-0.16682246327400208,
0.252204954624176,
1.7745448350906372,
0.48404303193092346,
-0.44479984045028687,
0.7963169813156128,
1.143064022064209,
0.5107972621917725,
-0.7965452075004578,
0.09029492735862732,
-0.7998988032341003,
0.2724500298500061,
-1.36025071144104,
0.310972660779953,
-2.9261269569396973,
0.5976101160049438,
-0.23580612242221832,
-0.13083307445049286,
-0.025782596319913864,
-1.3026782274246216,
1.1470431089401245,
2.6130571365356445,
-1.205645203590393,
0.5900431871414185,
0.3280993700027466,
1.2665828466415405,
-1.656512975692749,
0.3401055932044983,
-0.4312213957309723,
2.0666606426239014,
0.18283535540103912,
1.3014603853225708,
-0.5238053202629089,
-2.1166296005249023,
0.5800561904907227,
-1.272279143333435,
-1.1108593940734863,
0.8810901641845703,
-0.8855888843536377,
0.16019251942634583,
-1.3001258373260498,
-0.22368653118610382,
-0.8403409719467163,
-1.2897553443908691,
0.7251946926116943,
0.0666733980178833,
0.49851441383361816,
-0.5378718376159668,
0.37247127294540405,
-2.16715931892395,
-1.3522275686264038,
-0.21771855652332306,
-0.9718288779258728,
0.42885470390319824,
-0.36099788546562195,
0.6202179789543152,
-0.1755605936050415,
0.06913813948631287,
0.3610925078392029,
1.3471662998199463,
3.3799691200256348,
0.277209609746933,
0.2396981120109558,
-0.05311986431479454,
-0.9094201922416687,
1.4198414087295532,
0.879706621170044,
-0.19141052663326263,
-0.5836364030838013,
-0.9023783802986145,
1.3301347494125366,
1.9858049154281616,
1.0718995332717896,
0.07249292731285095,
-0.8340834975242615,
-0.7214978337287903,
0.0696294754743576,
0.23881983757019043,
0.46474742889404297,
0.8590394258499146,
-0.012320180423557758,
0.1814481019973755,
1.3679530620574951,
1.2709304094314575,
-0.43203940987586975,
0.4436917304992676,
-0.9237536787986755,
-0.42522284388542175,
0.3777773380279541,
0.2816145420074463,
0.013657493516802788,
0.41339465975761414,
-0.9776977896690369,
-0.23688571155071259,
-0.3297484815120697,
-0.8817474246025085,
-0.793011486530304,
-0.4280674159526825,
-0.41540583968162537,
1.5878547430038452,
0.14685456454753876,
-0.41127851605415344,
0.0017096055671572685,
-0.7535011172294617,
-0.15889723598957062,
-1.1543209552764893,
0.2027427703142166,
-0.09983733296394348,
-0.1251334249973297,
-0.0033452031202614307,
1.6979314088821411,
-1.033677339553833,
-2.1761929988861084,
0.24916242063045502,
0.1878933161497116,
-0.42696237564086914,
0.08028917014598846,
1.7507054805755615,
0.5500451326370239,
1.3941688537597656,
1.319523572921753,
0.9743608236312866,
-0.7925739884376526,
-1.1807005405426025,
0.7289212942123413,
0.9137166738510132,
-1.4636125564575195,
0.8546867966651917,
-0.04431585595011711,
-0.5924625396728516,
0.7170604467391968,
1.2665894031524658,
0.39864060282707214,
-1.9492703676223755,
0.7797039747238159,
-0.913506269454956,
0.7265588045120239,
0.6956391930580139,
0.7927435040473938,
0.3468322455883026,
0.8713841438293457,
-1.2538983821868896,
-1.1774319410324097,
-0.7854986786842346,
-0.6199985146522522,
1.949715495109558,
-0.17426252365112305,
0.5221390128135681,
-0.1276344656944275,
-1.231858491897583,
-0.08900433778762817,
0.7782093286514282,
0.3559112846851349,
-0.34904494881629944,
0.8765471577644348,
-0.7373415231704712,
-1.0969921350479126,
-1.3886860609054565,
-0.5079637765884399,
-0.9644104838371277,
-0.9298524856567383,
1.0776833295822144,
0.8188782334327698,
0.3445156514644623,
1.9035422801971436,
0.5720911622047424,
0.27337318658828735,
-2.602114677429199,
0.8685457110404968,
0.29745563864707947,
-0.04699889197945595,
0.8803398609161377,
0.26375612616539,
1.1673755645751953,
0.03712858259677887,
0.4235897660255432,
-2.4206504821777344,
2.1475608348846436,
-0.26660647988319397,
0.6262128353118896,
-0.02203686162829399,
-0.08775216341018677,
1.112079381942749,
0.5463868379592896,
0.5350763201713562,
-1.1488590240478516,
0.8391807675361633,
-0.5643698573112488,
1.1116634607315063,
0.9072155356407166,
-0.9059478044509888,
0.09717616438865662,
1.4163047075271606,
0.4153243899345398,
-0.5295765995979309,
-0.9211682081222534,
-0.8740690350532532,
0.9292951822280884,
1.651755452156067,
-0.05404668301343918,
0.09473977982997894,
0.870298445224762,
0.5709138512611389,
-1.297041654586792,
0.1164797991514206,
-0.6423854231834412,
-0.698115348815918,
1.7199745178222656,
2.1032845973968506,
-0.08589935302734375,
-0.20738215744495392,
-0.8280894160270691,
-1.180359959602356,
0.8373059034347534,
-0.0749310553073883,
0.12310189008712769,
0.6429975032806396,
-0.6622716188430786,
1.1535288095474243,
0.7604045867919922,
0.9655149579048157,
0.0420418456196785,
0.2759990394115448,
0.4763807952404022,
-0.24508896470069885,
-1.1036803722381592,
-0.2867668867111206,
-1.1258617639541626,
-2.525012493133545,
0.5334352254867554,
-0.3093535602092743,
-1.4794999361038208,
0.08124330639839172,
-1.0447577238082886,
0.8751910924911499,
-0.6954702734947205,
-1.0021384954452515,
-1.4937593936920166,
0.28888145089149475,
-0.23112915456295013,
0.8547990918159485,
-1.60637629032135,
-0.1403537094593048,
1.3389486074447632,
0.8864365220069885,
-0.4838912785053253,
1.0751878023147583,
0.2697552740573883,
0.9928372502326965,
0.8150438070297241,
-0.389693945646286,
0.5570434331893921,
0.08356977999210358,
-1.370216965675354,
0.44068360328674316,
1.3443479537963867,
0.18392311036586761,
1.5420210361480713,
-0.4566502869129181,
0.0484016090631485,
0.4152960479259491,
-0.4539458751678467,
-0.46781447529792786,
-0.42805206775665283,
0.748576283454895,
0.17669251561164856,
-0.9551785588264465,
0.031962793320417404,
-0.2048073261976242,
-0.2926482856273651,
0.2817075848579407,
-1.5413386821746826,
-0.2859564423561096,
-0.3709231913089752,
-0.5720620155334473,
-1.259069800376892,
0.04266096279025078,
1.3564348220825195,
-0.818418025970459,
-0.21226930618286133,
0.46214520931243896,
0.4230981469154358,
0.5471906065940857,
0.6068006157875061,
-0.6583144664764404,
-0.2860197424888611,
-0.36166080832481384,
-0.27679213881492615,
0.3190484642982483,
1.2115775346755981,
-0.10769984126091003,
-0.9759118556976318,
0.6654127836227417,
-0.36824625730514526,
0.0948125571012497,
1.975109338760376,
0.1339539885520935,
-0.7480195760726929,
0.17311246693134308,
-0.7371299266815186,
1.984230875968933,
1.601218342781067,
1.4014345407485962,
-0.05468298867344856,
-0.9727713465690613,
0.5676423907279968,
-0.1370488852262497,
-0.33155640959739685,
0.970477819442749,
0.5370187759399414,
-0.19042959809303284,
-1.4314619302749634,
0.5155810713768005,
1.1014987230300903,
-0.8872966170310974,
-0.7016924619674683,
-0.10688009858131409,
-0.8654794096946716,
1.091384768486023,
0.6895948052406311,
0.2775980234146118,
0.16309933364391327,
1.667099118232727,
0.6860048174858093,
-0.5601344704627991,
0.511090874671936,
0.3458748161792755,
-0.14701510965824127,
-2.1201257705688477,
-0.9444416761398315,
0.3487721383571625,
-0.2564091384410858,
-1.5947328805923462,
1.2986112833023071,
-1.0728204250335693,
-0.9060201048851013,
0.4598948061466217,
0.19878283143043518,
1.4809458255767822,
0.2488071471452713,
1.65285062789917,
2.0844554901123047,
0.9064903259277344,
0.20625388622283936,
1.2910970449447632,
-0.07865546643733978,
-0.41840314865112305,
1.7403420209884644,
-0.41428685188293457,
0.4619283080101013,
0.9124937057495117,
-0.45011210441589355,
-1.1370943784713745,
-0.8076666593551636,
-1.1399353742599487,
-0.6409857273101807,
1.1912826299667358,
0.18007248640060425,
-1.1009472608566284,
0.2221989929676056,
1.5831780433654785,
0.08368998765945435,
-0.21608339250087738,
0.6687666177749634,
0.5105559229850769,
-0.7449685335159302,
-0.029105499386787415,
-0.921559751033783,
0.503621518611908,
-0.005717952735722065,
-0.32513320446014404,
0.26898789405822754,
0.4954380989074707,
1.2433370351791382,
-0.07219263911247253,
0.14062349498271942,
1.2735711336135864,
-1.3751112222671509,
1.4129610061645508,
-0.5870615243911743,
0.23239994049072266,
-2.39582896232605,
1.3600316047668457,
-0.8409853577613831,
1.8607043027877808,
-2.6298139095306396,
0.3999263644218445,
-0.6391858458518982,
-0.4099747836589813,
0.3369098901748657,
-0.42467883229255676,
0.19759534299373627,
-0.18535366654396057,
-1.0526094436645508,
-0.1563849151134491,
-0.7889351844787598,
0.6618521809577942,
1.111904263496399,
1.3139146566390991,
-1.0622544288635254,
-0.1318470537662506,
-1.7608610391616821,
-0.20617394149303436,
-0.7989522218704224,
0.2606563866138458,
-1.9772952795028687,
-0.09560346603393555,
-2.0670387744903564,
-2.353558301925659,
-1.3835680484771729,
-0.7671363949775696,
1.0478774309158325,
0.1505807340145111,
-0.956015408039093,
1.1951590776443481,
-0.34436938166618347,
-1.7835257053375244,
1.1419622898101807,
-2.205542802810669
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | But `load_dataset` doesn't support caching (and reading) Arrow datasets from remote storage.
`load_datset_builder` + `download_and_prepare` is not equal to `load_dataset`. The latter has one more step, `builder.as_dataset`, that memory-maps Arrow files, which only works for local files. | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 82 | 37 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
But `load_dataset` doesn't support caching (and reading) Arrow datasets from remote storage.
`load_datset_builder` + `download_and_prepare` is not equal to `load_dataset`. The latter has one more step, `builder.as_dataset`, that memory-maps Arrow files, which only works for local files. | [
-1.1383790969848633,
-0.9131957292556763,
-0.7357158660888672,
1.398040533065796,
0.005705824121832848,
-1.2577794790267944,
0.15515029430389404,
-1.0687634944915771,
1.6676853895187378,
-0.7875409722328186,
0.229391947388649,
-1.6868003606796265,
-0.06290261447429657,
-0.6306044459342957,
-0.6896172165870667,
-0.9009379148483276,
-0.32030370831489563,
-0.7192142009735107,
1.0240124464035034,
2.4622457027435303,
1.2344633340835571,
-1.304573893547058,
2.686997890472412,
0.6706660389900208,
-0.3861871361732483,
-0.9948811531066895,
0.440774142742157,
-0.021178271621465683,
-1.1997748613357544,
-0.389037162065506,
-0.8612390160560608,
-0.00041644368320703506,
-0.5038555264472961,
-0.5356224775314331,
0.04663841053843498,
0.4935544431209564,
-0.4115084409713745,
-0.3494327962398529,
-0.5199369788169861,
-0.8406087756156921,
0.4268118739128113,
-0.3726445734500885,
0.9137938022613525,
-0.343452513217926,
1.864698052406311,
-0.5884124636650085,
0.42583057284355164,
0.6967936158180237,
1.3293678760528564,
0.07520900666713715,
0.04562459513545036,
0.24741177260875702,
0.3023310899734497,
0.003551485948264599,
0.47168228030204773,
1.1479600667953491,
0.5535364151000977,
0.4875105023384094,
0.6063475012779236,
-2.2090041637420654,
1.3468949794769287,
-0.8606102466583252,
0.2060173898935318,
1.3996587991714478,
-0.9908413887023926,
0.31729480624198914,
-1.7330477237701416,
-0.06391309201717377,
0.5470357537269592,
-2.274068593978882,
0.24193774163722992,
-1.390579342842102,
-0.507148265838623,
1.0255763530731201,
0.38012710213661194,
-1.2304059267044067,
0.17142562568187714,
-0.49737420678138733,
1.0978456735610962,
0.5700231790542603,
1.0857102870941162,
-1.718026876449585,
-0.0881209522485733,
-0.19833575189113617,
0.04673166945576668,
-1.4246091842651367,
-1.543672800064087,
0.5184339880943298,
0.7065872550010681,
0.7371126413345337,
-0.03978902846574783,
1.006672978401184,
-0.9759504795074463,
0.6684466600418091,
-0.953129768371582,
-1.720898985862732,
-1.3880534172058105,
-2.321214437484741,
-2.3919172286987305,
0.8140152096748352,
-0.4583723247051239,
-0.513464093208313,
2.025575876235962,
-1.0856690406799316,
-1.8233861923217773,
1.1478493213653564,
0.2234685719013214,
-0.054487768560647964,
2.3934085369110107,
0.323411762714386,
-0.6968660354614258,
0.43950313329696655,
-0.708119809627533,
0.7706254124641418,
-0.38329410552978516,
1.3610223531723022,
0.5643137693405151,
-1.022646188735962,
1.566076397895813,
-0.43973156809806824,
0.5698370337486267,
-0.7275697588920593,
-0.5112574100494385,
-0.8862242102622986,
0.34143543243408203,
1.9238990545272827,
-0.35426169633865356,
1.6859564781188965,
-0.371780663728714,
-1.5450453758239746,
-1.596932053565979,
0.8705136179924011,
0.4088945984840393,
-0.7507506012916565,
0.12594404816627502,
-0.48053646087646484,
0.0847024917602539,
-0.054799627512693405,
1.134459376335144,
1.2281681299209595,
0.6780093908309937,
-0.3372049927711487,
-0.7742013335227966,
0.3139002025127411,
-0.025959279388189316,
-0.6997340321540833,
-1.7694121599197388,
-0.3098715543746948,
0.22394569218158722,
0.5579057931900024,
-1.2417194843292236,
1.710018515586853,
0.8253886103630066,
1.9623043537139893,
1.0283770561218262,
-0.2844226062297821,
1.4769991636276245,
-0.010671616531908512,
1.9683775901794434,
-0.4102543592453003,
0.6630212068557739,
-0.22774004936218262,
-1.1461650133132935,
0.8406270146369934,
-0.4432928264141083,
-2.0321125984191895,
-0.8236938714981079,
-0.8519133925437927,
-0.11575768887996674,
-0.7880738377571106,
0.8653005957603455,
-0.2670464813709259,
-1.5255358219146729,
0.1695479452610016,
-0.677567183971405,
0.25593164563179016,
-1.2868404388427734,
0.23943977057933807,
0.7652678489685059,
-0.58973628282547,
-0.07232517004013062,
-0.27272486686706543,
-1.248329758644104,
-0.3355634808540344,
0.3310721516609192,
1.950062870979309,
-0.6696282029151917,
0.951265811920166,
0.9830577373504639,
-0.6469149589538574,
0.04909971356391907,
0.23687227070331573,
-0.2646302282810211,
0.8091773986816406,
-1.028842568397522,
-0.24731309711933136,
1.2365580797195435,
-0.20768022537231445,
-0.7164179086685181,
1.4599589109420776,
0.861308217048645,
-1.01985764503479,
-0.13944067060947418,
-0.16701553761959076,
-0.6817554235458374,
-0.055295225232839584,
-1.555895209312439,
-0.08312994241714478,
0.39934271574020386,
-1.3717578649520874,
-0.3549445867538452,
-0.19989946484565735,
1.3008723258972168,
-0.22311881184577942,
1.4274204969406128,
-0.3770068287849426,
-0.140795037150383,
-0.378874808549881,
-0.46078822016716003,
0.08010946214199066,
-0.2315954566001892,
-0.6190309524536133,
0.15911337733268738,
-0.7577498555183411,
0.36017271876335144,
1.4100980758666992,
0.39746329188346863,
0.1588432788848877,
0.5384942293167114,
1.1183218955993652,
0.3044714033603668,
-0.0891263484954834,
-0.8262651562690735,
-1.630791425704956,
2.030559539794922,
-1.3544245958328247,
1.9609177112579346,
0.7455560564994812,
-0.07115691900253296,
-1.7614327669143677,
-1.8435816764831543,
1.259190320968628,
1.171794056892395,
2.330662727355957,
0.4875588119029999,
0.38684797286987305,
-0.8210386633872986,
-0.7694336771965027,
0.28780969977378845,
-0.9404374957084656,
-0.6254841089248657,
0.12534190714359283,
2.39042592048645,
1.744768738746643,
-0.4937252998352051,
-0.23464809358119965,
-1.0438177585601807,
1.2880489826202393,
-0.26095497608184814,
0.2572997212409973,
2.0264010429382324,
-0.2972479462623596,
-1.0544079542160034,
1.2570106983184814,
-2.2843735218048096,
0.15752841532230377,
2.0177600383758545,
0.21346136927604675,
0.022001095116138458,
-1.413958191871643,
-0.6476248502731323,
-0.3507046103477478,
-0.34899258613586426,
-1.2604343891143799,
0.4990259110927582,
-0.26615220308303833,
-0.8008970022201538,
-1.4736158847808838,
0.15684525668621063,
-1.1220539808273315,
-1.6982907056808472,
0.22177399694919586,
1.8756992816925049,
1.9624786376953125,
-0.7859430909156799,
1.5226008892059326,
-0.16875499486923218,
0.11690886318683624,
1.3104853630065918,
1.2792764902114868,
3.1623988151550293,
1.7607500553131104,
-1.3758177757263184,
0.7912713289260864,
-0.11731705069541931,
-0.46721151471138,
1.2465790510177612,
-1.0797898769378662,
1.2468340396881104,
-0.23794953525066376,
-1.2914910316467285,
-1.366194725036621,
0.9848209619522095,
0.5433916449546814,
0.05493197217583656,
-0.489721417427063,
1.3471037149429321,
0.022838842123746872,
1.4158966541290283,
0.6177394390106201,
-0.4369123578071594,
0.6773560047149658,
-0.32989051938056946,
-0.5738139152526855,
1.556497573852539,
0.2651486396789551,
-1.4524165391921997,
-2.306124448776245,
-0.2965870201587677,
-0.8191967010498047,
-0.06597106158733368,
-0.6776021122932434,
-1.0588299036026,
1.6342101097106934,
0.46582362055778503,
-1.2442669868469238,
-0.33587831258773804,
-0.2766401171684265,
-0.5280870795249939,
2.7261300086975098,
-1.3927841186523438,
-0.11687901616096497,
-1.030334234237671,
-0.5651223659515381,
1.7044274806976318,
-1.1839945316314697,
-0.187838613986969,
-1.0141774415969849,
-0.6838715076446533,
-1.2557618618011475,
-0.505138635635376,
-0.12733158469200134,
-0.9584916234016418,
0.7560321092605591,
0.13193227350711823,
-1.125602126121521,
-0.23366202414035797,
-0.9330522418022156,
0.9841365814208984,
-0.1862151324748993,
0.2591606080532074,
1.7731879949569702,
0.5069424510002136,
-0.46846020221710205,
0.7964721918106079,
1.1037805080413818,
0.5172085762023926,
-0.7797419428825378,
0.17164458334445953,
-0.7737042903900146,
0.27165499329566956,
-1.3828028440475464,
0.2721923887729645,
-2.954054117202759,
0.5843102931976318,
-0.24967961013317108,
-0.1029987782239914,
-0.054459113627672195,
-1.3593621253967285,
1.1268261671066284,
2.584711790084839,
-1.2215889692306519,
0.5588241815567017,
0.3495302200317383,
1.261659860610962,
-1.6421542167663574,
0.31367483735084534,
-0.46315065026283264,
2.071329355239868,
0.19498638808727264,
1.2626628875732422,
-0.4884439706802368,
-2.103980302810669,
0.5665082335472107,
-1.2691556215286255,
-1.1012998819351196,
0.904400646686554,
-0.9102256298065186,
0.2061280459165573,
-1.3163833618164062,
-0.26955366134643555,
-0.8169087767601013,
-1.2841860055923462,
0.7355021238327026,
0.0955171138048172,
0.4865497350692749,
-0.5367796421051025,
0.3937619626522064,
-2.173186779022217,
-1.3642950057983398,
-0.20325665175914764,
-0.9665616154670715,
0.4333180785179138,
-0.31861039996147156,
0.6216739416122437,
-0.18532323837280273,
0.03747715801000595,
0.33608874678611755,
1.3883706331253052,
3.388458728790283,
0.27106890082359314,
0.20045843720436096,
-0.06956747174263,
-0.9158539772033691,
1.4453425407409668,
0.9032326936721802,
-0.15899059176445007,
-0.5249614119529724,
-0.9352139830589294,
1.3087393045425415,
2.0116355419158936,
1.0820975303649902,
0.011696673929691315,
-0.7851544618606567,
-0.7122280597686768,
0.06583765149116516,
0.19120043516159058,
0.4548047184944153,
0.8574984669685364,
0.08190420269966125,
0.17606081068515778,
1.371174693107605,
1.2493529319763184,
-0.4136039614677429,
0.48178502917289734,
-0.9248118996620178,
-0.44261685013771057,
0.3807855546474457,
0.2742929458618164,
0.05993526801466942,
0.4331989884376526,
-1.0409247875213623,
-0.19332177937030792,
-0.3501822054386139,
-0.8877901434898376,
-0.795545756816864,
-0.48802727460861206,
-0.45077916979789734,
1.6073577404022217,
0.12447218596935272,
-0.4457397758960724,
-0.017201900482177734,
-0.7370925545692444,
-0.13365916907787323,
-1.1202709674835205,
0.23673510551452637,
-0.11876574158668518,
-0.10486003756523132,
0.0006802240386605263,
1.67098867893219,
-1.027056097984314,
-2.118117094039917,
0.25293421745300293,
0.18829521536827087,
-0.42198213934898376,
0.10773356258869171,
1.7495561838150024,
0.5226384401321411,
1.4315905570983887,
1.3138946294784546,
1.0273321866989136,
-0.7700249552726746,
-1.228129267692566,
0.7104278206825256,
0.9316374063491821,
-1.394280195236206,
0.8486558198928833,
-0.020394857972860336,
-0.5580773949623108,
0.6954703330993652,
1.2787716388702393,
0.39671561121940613,
-2.0112180709838867,
0.7546314001083374,
-0.9453113079071045,
0.7201235890388489,
0.7342022657394409,
0.7948789000511169,
0.29117387533187866,
0.8681522011756897,
-1.2236614227294922,
-1.2029730081558228,
-0.7324885725975037,
-0.6365922689437866,
1.903856873512268,
-0.19556912779808044,
0.5677024722099304,
-0.0847899466753006,
-1.2728036642074585,
-0.0756247341632843,
0.8327954411506653,
0.4146481156349182,
-0.41920000314712524,
0.8511398434638977,
-0.6938285827636719,
-1.0354773998260498,
-1.350143313407898,
-0.4891468584537506,
-1.051308274269104,
-0.9529066681861877,
1.036648154258728,
0.7707020044326782,
0.3395550549030304,
1.8658225536346436,
0.5928348302841187,
0.3501814305782318,
-2.6421988010406494,
0.8504641056060791,
0.25500190258026123,
-0.01760704815387726,
0.839926540851593,
0.3003518879413605,
1.1609445810317993,
0.002927422523498535,
0.501340925693512,
-2.3803257942199707,
2.1700003147125244,
-0.2602092921733856,
0.5393635630607605,
-0.03112468682229519,
-0.10628548264503479,
1.1066601276397705,
0.5344522595405579,
0.4948228895664215,
-1.1752663850784302,
0.8272180557250977,
-0.5867494940757751,
1.0983823537826538,
0.9292958378791809,
-0.933038592338562,
0.05203773453831673,
1.430397629737854,
0.4223664104938507,
-0.5192102789878845,
-0.9329636693000793,
-0.9005500078201294,
0.922217607498169,
1.6030808687210083,
-0.0877837985754013,
-0.025741197168827057,
0.8933087587356567,
0.6309530138969421,
-1.278174638748169,
0.13031801581382751,
-0.6502306461334229,
-0.668602466583252,
1.7073148488998413,
2.0748276710510254,
-0.1312839388847351,
-0.21509744226932526,
-0.8076867461204529,
-1.126233696937561,
0.7891965508460999,
-0.05794990062713623,
0.08407390117645264,
0.6608636379241943,
-0.6856814622879028,
1.1319485902786255,
0.7172023057937622,
0.9446816444396973,
0.054725442081689835,
0.2768922448158264,
0.46551206707954407,
-0.2576972246170044,
-1.1719874143600464,
-0.2749885618686676,
-1.1016649007797241,
-2.5582730770111084,
0.5160449743270874,
-0.3365146815776825,
-1.4741872549057007,
0.09414047002792358,
-1.0689430236816406,
0.9072952270507812,
-0.6743072867393494,
-1.0941064357757568,
-1.4974530935287476,
0.2985483407974243,
-0.1944054365158081,
0.8536083102226257,
-1.5798556804656982,
-0.08073301613330841,
1.283121943473816,
0.8708651661872864,
-0.5697346925735474,
1.065142035484314,
0.26166197657585144,
1.0188034772872925,
0.8329207897186279,
-0.3856678903102875,
0.586106538772583,
0.06520141661167145,
-1.340442180633545,
0.4479561448097229,
1.2766427993774414,
0.1687612235546112,
1.5761109590530396,
-0.48284223675727844,
0.07438184320926666,
0.42939305305480957,
-0.5066500306129456,
-0.45336881279945374,
-0.48280081152915955,
0.7079968452453613,
0.11918698251247406,
-0.9505622982978821,
0.04680520296096802,
-0.10600192844867706,
-0.26181113719940186,
0.2806224226951599,
-1.534610390663147,
-0.22601567208766937,
-0.36354243755340576,
-0.5755335688591003,
-1.2591934204101562,
0.012712482362985611,
1.3518062829971313,
-0.730507493019104,
-0.21467523276805878,
0.4628514349460602,
0.39231598377227783,
0.5487650632858276,
0.5950814485549927,
-0.6558739542961121,
-0.2558521032333374,
-0.3868218660354614,
-0.2791483998298645,
0.34420090913772583,
1.2332713603973389,
-0.11637453734874725,
-1.0147608518600464,
0.7170570492744446,
-0.4094339907169342,
0.10877189040184021,
1.984805941581726,
0.1398523896932602,
-0.7621152997016907,
0.18505968153476715,
-0.7655202746391296,
1.9385164976119995,
1.6992731094360352,
1.3858575820922852,
-0.034689001739025116,
-0.996013343334198,
0.5740686058998108,
-0.22802181541919708,
-0.3354891836643219,
1.0153480768203735,
0.46965569257736206,
-0.17356665432453156,
-1.3668006658554077,
0.6033620238304138,
1.1717253923416138,
-0.8255301713943481,
-0.7400798797607422,
-0.0397343635559082,
-0.8706204295158386,
1.1155760288238525,
0.6558338403701782,
0.27022114396095276,
0.186423659324646,
1.57207190990448,
0.6469812393188477,
-0.463539719581604,
0.5198686122894287,
0.38078925013542175,
-0.19907766580581665,
-2.090341567993164,
-1.0375239849090576,
0.35725632309913635,
-0.366000235080719,
-1.6248258352279663,
1.3093550205230713,
-1.0936834812164307,
-0.9335834383964539,
0.4706539213657379,
0.1517730951309204,
1.4854809045791626,
0.32387274503707886,
1.6382026672363281,
2.135300636291504,
0.9246727824211121,
0.24580912292003632,
1.2804937362670898,
-0.0797119289636612,
-0.49307575821876526,
1.7673630714416504,
-0.4199727773666382,
0.4538426101207733,
0.9183669090270996,
-0.4019879698753357,
-1.1132586002349854,
-0.8474870324134827,
-1.143380880355835,
-0.6167395114898682,
1.1734275817871094,
0.15301738679409027,
-1.1129016876220703,
0.24163393676280975,
1.5846526622772217,
0.08129483461380005,
-0.24330730736255646,
0.7168404459953308,
0.4267580509185791,
-0.7848782539367676,
-0.027349624782800674,
-0.9028654098510742,
0.4691697061061859,
-0.09506218135356903,
-0.2701427638530731,
0.2496027797460556,
0.4922691881656647,
1.2425345182418823,
-0.06044718250632286,
0.14262230694293976,
1.2730647325515747,
-1.3156658411026,
1.4250776767730713,
-0.5734283328056335,
0.286967933177948,
-2.3986382484436035,
1.3394683599472046,
-0.8436716794967651,
1.8415933847427368,
-2.611037254333496,
0.43824437260627747,
-0.6133593916893005,
-0.4610760807991028,
0.36572083830833435,
-0.43709617853164673,
0.19888043403625488,
-0.1272699385881424,
-1.1375612020492554,
-0.1118391752243042,
-0.787958025932312,
0.619318425655365,
1.0735523700714111,
1.3125861883163452,
-1.0953439474105835,
-0.1977827250957489,
-1.7630685567855835,
-0.20258767902851105,
-0.7775307297706604,
0.3308698832988739,
-1.9595049619674683,
-0.09939871728420258,
-2.035851240158081,
-2.416574001312256,
-1.3633965253829956,
-0.7738959789276123,
1.0337660312652588,
0.1412094086408615,
-0.9085720181465149,
1.2135863304138184,
-0.31871217489242554,
-1.8271801471710205,
1.1286615133285522,
-2.198453903198242
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | Thanks. So if I want to use `IterableDataset` and control the size of single arrow file, how should I organize the data loader? Maybe `load_dataset_build` + `download_and_prepare` + `builder.as_dataset` + `dataset.to_iterable_dataset`? | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 82 | 31 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Thanks. So if I want to use `IterableDataset` and control the size of single arrow file, how should I organize the data loader? Maybe `load_dataset_build` + `download_and_prepare` + `builder.as_dataset` + `dataset.to_iterable_dataset`? | [
-1.1550884246826172,
-0.9025545120239258,
-0.7589713335037231,
1.3852728605270386,
-0.021519210189580917,
-1.266884684562683,
0.18890294432640076,
-1.0570131540298462,
1.6823533773422241,
-0.7994966506958008,
0.20543327927589417,
-1.6655173301696777,
-0.08192796260118484,
-0.6227731704711914,
-0.7310542464256287,
-0.9124042987823486,
-0.3645465672016144,
-0.7094940543174744,
0.9979314804077148,
2.459935188293457,
1.2092053890228271,
-1.3356202840805054,
2.661865711212158,
0.6845377087593079,
-0.34503453969955444,
-0.9933680295944214,
0.4068746268749237,
0.019672300666570663,
-1.1413716077804565,
-0.3992936909198761,
-0.8902006149291992,
-0.012756174430251122,
-0.5005083680152893,
-0.5517460703849792,
0.043113984167575836,
0.4965464472770691,
-0.3705815374851227,
-0.3735874891281128,
-0.521216869354248,
-0.8157618045806885,
0.4676697850227356,
-0.3954502046108246,
0.9185991883277893,
-0.3543291389942169,
1.8529131412506104,
-0.5619515180587769,
0.4417191743850708,
0.7432832717895508,
1.344129204750061,
0.06204352527856827,
0.06269784271717072,
0.24269531667232513,
0.3201177418231964,
-0.0017012846656143665,
0.43175870180130005,
1.1589972972869873,
0.5366802215576172,
0.505881130695343,
0.5998201966285706,
-2.2143986225128174,
1.345163106918335,
-0.8933987021446228,
0.21844185888767242,
1.3945622444152832,
-0.9712634682655334,
0.3312469720840454,
-1.7512714862823486,
-0.057455454021692276,
0.5490391254425049,
-2.282951593399048,
0.25905367732048035,
-1.3898956775665283,
-0.5246608853340149,
1.0169202089309692,
0.32268014550209045,
-1.2423075437545776,
0.1507469266653061,
-0.5078226923942566,
1.1608405113220215,
0.5780189037322998,
1.1045193672180176,
-1.7219200134277344,
-0.08472143113613129,
-0.2222680151462555,
0.03777249529957771,
-1.4385626316070557,
-1.5303847789764404,
0.5167388319969177,
0.6943264007568359,
0.730934739112854,
-0.015068810433149338,
0.9983482360839844,
-0.9195921421051025,
0.7078133821487427,
-0.9392266869544983,
-1.6913219690322876,
-1.3754550218582153,
-2.2970824241638184,
-2.3640618324279785,
0.7859476804733276,
-0.4595661759376526,
-0.504097580909729,
2.01716685295105,
-1.101538062095642,
-1.8445653915405273,
1.135459542274475,
0.2189675122499466,
-0.031484875828027725,
2.3369553089141846,
0.330145925283432,
-0.7060519456863403,
0.41630324721336365,
-0.6741834282875061,
0.7709367275238037,
-0.4112547039985657,
1.3209660053253174,
0.5859481692314148,
-1.0162779092788696,
1.5561258792877197,
-0.4357345700263977,
0.5584532618522644,
-0.7602857947349548,
-0.5228747129440308,
-0.9021553993225098,
0.3530687093734741,
1.896851658821106,
-0.36880648136138916,
1.6771228313446045,
-0.36296185851097107,
-1.5559645891189575,
-1.6162832975387573,
0.9390897154808044,
0.45158836245536804,
-0.7506448030471802,
0.09986412525177002,
-0.4802914261817932,
0.08056517690420151,
-0.08722449839115143,
1.0934168100357056,
1.202921986579895,
0.7151138782501221,
-0.3324351906776428,
-0.8034948706626892,
0.3086424469947815,
-0.017801066860556602,
-0.7027566432952881,
-1.7868460416793823,
-0.2934044897556305,
0.2378406971693039,
0.5403647422790527,
-1.2343907356262207,
1.6922863721847534,
0.806719958782196,
1.9414784908294678,
1.0429755449295044,
-0.2572406828403473,
1.4825912714004517,
-0.005333523266017437,
1.9827086925506592,
-0.3837816119194031,
0.6476681232452393,
-0.2169646918773651,
-1.1297638416290283,
0.8246914744377136,
-0.4288156032562256,
-2.0617282390594482,
-0.8287091851234436,
-0.8772872686386108,
-0.12220076471567154,
-0.7917444109916687,
0.8475571274757385,
-0.28538748621940613,
-1.5086054801940918,
0.1647345870733261,
-0.6291537284851074,
0.24303244054317474,
-1.2644115686416626,
0.25685712695121765,
0.7627905607223511,
-0.572938859462738,
-0.07561048865318298,
-0.2952669560909271,
-1.2576566934585571,
-0.34766432642936707,
0.3229384422302246,
1.93802809715271,
-0.6675639152526855,
0.9560301303863525,
1.0018682479858398,
-0.7001832127571106,
0.05846066772937775,
0.25445735454559326,
-0.24748766422271729,
0.8062418699264526,
-1.043389081954956,
-0.18089300394058228,
1.2348605394363403,
-0.21115510165691376,
-0.7387540340423584,
1.4555883407592773,
0.869631290435791,
-1.0252763032913208,
-0.13613861799240112,
-0.1684175282716751,
-0.6802670359611511,
-0.07471361011266708,
-1.5489479303359985,
-0.06006317958235741,
0.3977435231208801,
-1.3328933715820312,
-0.39247938990592957,
-0.23859722912311554,
1.3080424070358276,
-0.22494010627269745,
1.4320933818817139,
-0.33618563413619995,
-0.1539919674396515,
-0.37109872698783875,
-0.48371437191963196,
0.06433466076850891,
-0.23588959872722626,
-0.634822428226471,
0.13287954032421112,
-0.7708799839019775,
0.3380405008792877,
1.400229573249817,
0.41735637187957764,
0.10512343794107437,
0.5341706275939941,
1.1178473234176636,
0.30371373891830444,
-0.05976613983511925,
-0.8374790549278259,
-1.5912500619888306,
1.9963608980178833,
-1.3554826974868774,
1.971697211265564,
0.7077971696853638,
-0.11153503507375717,
-1.7499111890792847,
-1.8453469276428223,
1.269892692565918,
1.1800477504730225,
2.338583469390869,
0.5013307332992554,
0.388719379901886,
-0.799242377281189,
-0.7652637958526611,
0.28184399008750916,
-0.9676838517189026,
-0.6083179116249084,
0.12647268176078796,
2.374209403991699,
1.7440298795700073,
-0.5218060612678528,
-0.23992276191711426,
-1.043391227722168,
1.2472182512283325,
-0.2338455617427826,
0.2472955733537674,
2.0253984928131104,
-0.32233282923698425,
-1.0585740804672241,
1.2202198505401611,
-2.271275520324707,
0.1534906029701233,
2.0216188430786133,
0.22587238252162933,
0.016857095062732697,
-1.4232573509216309,
-0.6242445707321167,
-0.3294791281223297,
-0.3536728024482727,
-1.243922472000122,
0.5709561705589294,
-0.2781390845775604,
-0.779577910900116,
-1.4447354078292847,
0.17742282152175903,
-1.093464732170105,
-1.693981409072876,
0.2524944543838501,
1.9001140594482422,
1.9488259553909302,
-0.7681488990783691,
1.5191572904586792,
-0.2086816281080246,
0.13685567677021027,
1.2926359176635742,
1.292241096496582,
3.1947007179260254,
1.7898913621902466,
-1.371492862701416,
0.7792685031890869,
-0.11496762186288834,
-0.4886319041252136,
1.226448893547058,
-1.0909706354141235,
1.2372299432754517,
-0.24489498138427734,
-1.272727370262146,
-1.3474417924880981,
1.0023330450057983,
0.5730865597724915,
0.08845872431993484,
-0.5165076851844788,
1.3581740856170654,
0.012149187736213207,
1.4211713075637817,
0.6004435420036316,
-0.46533358097076416,
0.7030244469642639,
-0.3368005156517029,
-0.542847752571106,
1.5446213483810425,
0.2609599828720093,
-1.4434090852737427,
-2.3231875896453857,
-0.2958587408065796,
-0.8280222415924072,
-0.05855492874979973,
-0.6746097207069397,
-1.0669946670532227,
1.6558924913406372,
0.46833062171936035,
-1.2584961652755737,
-0.34719687700271606,
-0.29245632886886597,
-0.5618171691894531,
2.686288356781006,
-1.4308629035949707,
-0.13952729105949402,
-1.0119335651397705,
-0.5369063019752502,
1.6925843954086304,
-1.1789047718048096,
-0.1770375669002533,
-0.9858406186103821,
-0.7180884480476379,
-1.2992347478866577,
-0.5342574715614319,
-0.10106995701789856,
-0.9669193029403687,
0.7867980003356934,
0.1336480677127838,
-1.1119390726089478,
-0.1763375997543335,
-0.9293219447135925,
0.9646907448768616,
-0.16236072778701782,
0.2861737608909607,
1.7799495458602905,
0.5256900191307068,
-0.43256303668022156,
0.7782957553863525,
1.1000193357467651,
0.5215272307395935,
-0.8019410967826843,
0.1385408639907837,
-0.7862637639045715,
0.23841498792171478,
-1.368299126625061,
0.2742089331150055,
-2.9479048252105713,
0.6014845371246338,
-0.23226016759872437,
-0.07618296146392822,
-0.03604923561215401,
-1.3477140665054321,
1.1232877969741821,
2.617244005203247,
-1.228937029838562,
0.5320417284965515,
0.36721867322921753,
1.2622525691986084,
-1.6306511163711548,
0.32072585821151733,
-0.45117679238319397,
2.0658977031707764,
0.18612051010131836,
1.2975629568099976,
-0.5018867254257202,
-2.1082100868225098,
0.5435778498649597,
-1.2564756870269775,
-1.1668952703475952,
0.9334343075752258,
-0.8662826418876648,
0.17969059944152832,
-1.319536566734314,
-0.24969710409641266,
-0.8083181381225586,
-1.2876518964767456,
0.7862138748168945,
0.1202511191368103,
0.5060338973999023,
-0.578425407409668,
0.381395161151886,
-2.1718766689300537,
-1.3613948822021484,
-0.24427786469459534,
-0.9529358744621277,
0.43258243799209595,
-0.30077433586120605,
0.6085668206214905,
-0.1713847666978836,
0.05708882212638855,
0.3401077687740326,
1.3680800199508667,
3.3999030590057373,
0.2841554880142212,
0.23421265184879303,
-0.06872831284999847,
-0.9042105674743652,
1.469459891319275,
0.9044317603111267,
-0.163238063454628,
-0.5403070449829102,
-0.920667290687561,
1.2703851461410522,
2.024451494216919,
1.117438793182373,
0.01304954569786787,
-0.8441293835639954,
-0.7085504531860352,
0.05385851860046387,
0.18516305088996887,
0.4556993246078491,
0.8472059369087219,
0.08330520242452621,
0.17465132474899292,
1.3569490909576416,
1.2235008478164673,
-0.43224188685417175,
0.4650801718235016,
-0.9053403735160828,
-0.4515211284160614,
0.39311718940734863,
0.2780478596687317,
0.05807211995124817,
0.41768747568130493,
-1.0294784307479858,
-0.18803150951862335,
-0.38593119382858276,
-0.8936653137207031,
-0.7896528244018555,
-0.5068182945251465,
-0.4421955943107605,
1.6023995876312256,
0.1309364289045334,
-0.44392332434654236,
-0.005813327152282,
-0.7351568937301636,
-0.14258180558681488,
-1.131746530532837,
0.25894516706466675,
-0.12759967148303986,
-0.1055283397436142,
0.0003688102588057518,
1.6951369047164917,
-1.028842806816101,
-2.1313107013702393,
0.2495584338903427,
0.21370507776737213,
-0.41171273589134216,
0.1400284618139267,
1.717140555381775,
0.5021803379058838,
1.4174097776412964,
1.2944505214691162,
1.02553129196167,
-0.7981138229370117,
-1.1826106309890747,
0.7059721946716309,
0.909184992313385,
-1.4273086786270142,
0.799713671207428,
0.009520086459815502,
-0.5642189979553223,
0.7211595177650452,
1.2762000560760498,
0.37054795026779175,
-2.001688003540039,
0.7446479201316833,
-0.9067327380180359,
0.7079353928565979,
0.6964040398597717,
0.8020319938659668,
0.321330189704895,
0.8611451983451843,
-1.2227340936660767,
-1.1885522603988647,
-0.7716356515884399,
-0.6407802700996399,
1.9111753702163696,
-0.1935500204563141,
0.5740254521369934,
-0.0735495463013649,
-1.2625740766525269,
-0.07267803698778152,
0.8113178610801697,
0.41487646102905273,
-0.3947031497955322,
0.8205085396766663,
-0.6796543002128601,
-1.0017188787460327,
-1.3728793859481812,
-0.5100100040435791,
-1.0410947799682617,
-0.9619351625442505,
1.0287508964538574,
0.7905830144882202,
0.34445351362228394,
1.8350908756256104,
0.6178432703018188,
0.3269506096839905,
-2.6702072620391846,
0.8547277450561523,
0.28631529211997986,
-0.04685952886939049,
0.8607692122459412,
0.2966007888317108,
1.1509374380111694,
0.018133167177438736,
0.5062149167060852,
-2.411325216293335,
2.15938663482666,
-0.26448267698287964,
0.5253324508666992,
-0.04770402982831001,
-0.14831946790218353,
1.0927742719650269,
0.5164412260055542,
0.49634867906570435,
-1.2001608610153198,
0.852076530456543,
-0.5863388180732727,
1.0816569328308105,
0.9122022986412048,
-0.9247696399688721,
0.05639803409576416,
1.4629755020141602,
0.44345879554748535,
-0.4730413556098938,
-0.9127216339111328,
-0.8863503932952881,
0.9177466034889221,
1.6081739664077759,
-0.12159020453691483,
-0.032613519579172134,
0.9186094403266907,
0.6109537482261658,
-1.2894278764724731,
0.1366291046142578,
-0.650191605091095,
-0.6601701378822327,
1.7107408046722412,
2.097529411315918,
-0.09914105385541916,
-0.22757507860660553,
-0.8326228857040405,
-1.1324412822723389,
0.8145608305931091,
-0.052651990205049515,
0.07088487595319748,
0.6265705823898315,
-0.7040039300918579,
1.1405013799667358,
0.7302221655845642,
0.9612550735473633,
0.020999182015657425,
0.3038296699523926,
0.46523478627204895,
-0.25164994597435,
-1.146794080734253,
-0.26376426219940186,
-1.1138590574264526,
-2.520002841949463,
0.5017251968383789,
-0.3002733886241913,
-1.4736833572387695,
0.06944961845874786,
-1.0660861730575562,
0.9247643351554871,
-0.6970618367195129,
-1.0644230842590332,
-1.5232815742492676,
0.2689754366874695,
-0.17827820777893066,
0.8591365218162537,
-1.610573172569275,
-0.11317921429872513,
1.3269537687301636,
0.8762406706809998,
-0.5768823623657227,
1.068677544593811,
0.2558395266532898,
0.9748205542564392,
0.8321095108985901,
-0.4121110737323761,
0.5781971216201782,
0.07860683649778366,
-1.3653992414474487,
0.48155051469802856,
1.2716047763824463,
0.1943877637386322,
1.5986838340759277,
-0.5129414796829224,
0.05780845135450363,
0.4166816174983978,
-0.5056792497634888,
-0.44449859857559204,
-0.5061737298965454,
0.719623327255249,
0.15037117898464203,
-0.9930900931358337,
0.07063675671815872,
-0.12131758779287338,
-0.25754377245903015,
0.2715924084186554,
-1.5297354459762573,
-0.22864408791065216,
-0.33390364050865173,
-0.5838175415992737,
-1.2541565895080566,
0.054446905851364136,
1.3302171230316162,
-0.7772286534309387,
-0.17270460724830627,
0.4816328287124634,
0.4254462718963623,
0.5280857682228088,
0.5764774084091187,
-0.664972186088562,
-0.2568824589252472,
-0.41042447090148926,
-0.2935522198677063,
0.33833047747612,
1.2413979768753052,
-0.13982534408569336,
-1.0440847873687744,
0.7246685028076172,
-0.40934282541275024,
0.09774067252874374,
1.9606465101242065,
0.15166248381137848,
-0.7368864417076111,
0.20747308433055878,
-0.7560147047042847,
1.9686380624771118,
1.683504343032837,
1.3963773250579834,
-0.046144839376211166,
-0.9757581949234009,
0.5587638020515442,
-0.2393815964460373,
-0.3267696797847748,
1.033103346824646,
0.5088621973991394,
-0.16626273095607758,
-1.3872114419937134,
0.6029711365699768,
1.1928858757019043,
-0.8562538623809814,
-0.7228838205337524,
-0.06304947286844254,
-0.8387613296508789,
1.0959707498550415,
0.6433743238449097,
0.2877110540866852,
0.19235345721244812,
1.5752477645874023,
0.6396627426147461,
-0.48661357164382935,
0.5443453788757324,
0.4126758575439453,
-0.14205341041088104,
-2.1122896671295166,
-1.0324193239212036,
0.3684103190898895,
-0.3079536557197571,
-1.5943944454193115,
1.3185168504714966,
-1.0745846033096313,
-0.956273078918457,
0.49794578552246094,
0.16433025896549225,
1.5389533042907715,
0.3062558174133301,
1.6501224040985107,
2.1402273178100586,
0.9268162846565247,
0.2720475196838379,
1.2974269390106201,
-0.1020059660077095,
-0.46737122535705566,
1.755327582359314,
-0.4181068539619446,
0.40856143832206726,
0.9243959784507751,
-0.39773228764533997,
-1.1241720914840698,
-0.8448848128318787,
-1.1931350231170654,
-0.6049464344978333,
1.1611472368240356,
0.13751138746738434,
-1.1102913618087769,
0.24311788380146027,
1.6293710470199585,
0.08361130207777023,
-0.2600002586841583,
0.7392497062683105,
0.41311120986938477,
-0.7884734869003296,
-0.024596594274044037,
-0.9131301641464233,
0.4905342757701874,
-0.06665603816509247,
-0.2702425718307495,
0.2381039261817932,
0.49709558486938477,
1.2180993556976318,
-0.08239999413490295,
0.15807633101940155,
1.2546452283859253,
-1.3273981809616089,
1.4271013736724854,
-0.523859977722168,
0.26127177476882935,
-2.4117658138275146,
1.3451573848724365,
-0.8534793257713318,
1.8220641613006592,
-2.5881190299987793,
0.4013136923313141,
-0.6280988454818726,
-0.4416244924068451,
0.37726110219955444,
-0.4335325360298157,
0.17531637847423553,
-0.1421833336353302,
-1.098806381225586,
-0.14122097194194794,
-0.7910887002944946,
0.640694260597229,
1.078620195388794,
1.3215044736862183,
-1.0895832777023315,
-0.18779462575912476,
-1.7460235357284546,
-0.2076987475156784,
-0.7540498375892639,
0.3503398001194,
-1.9868618249893188,
-0.08734319359064102,
-2.028212785720825,
-2.402296781539917,
-1.3819496631622314,
-0.773597776889801,
1.0184638500213623,
0.14191386103630066,
-0.9069555997848511,
1.190051555633545,
-0.3201232850551605,
-1.8420644998550415,
1.1385283470153809,
-2.188167095184326
] |
https://github.com/huggingface/datasets/issues/5987 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare | Yes, this should work.
I think we can expose `max_shard_size` in `load_dataset`, so feel free to open a PR. | ### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1 | 82 | 19 | Why max_shard_size is not supported in load_dataset and passed to download_and_prepare
### Describe the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
What I can to is break the `load_dataset` and use `load_datset_builder` + `download_and_prepare` instead.
### Steps to reproduce the bug
https://github.com/huggingface/datasets/blob/a8a797cc92e860c8d0df71e0aa826f4d2690713e/src/datasets/load.py#L1809
### Expected behavior
Users can define the max shard size.
### Environment info
datasets==2.13.1
Yes, this should work.
I think we can expose `max_shard_size` in `load_dataset`, so feel free to open a PR. | [
-1.1455744504928589,
-0.8890768885612488,
-0.7615994215011597,
1.3700419664382935,
0.0012721186503767967,
-1.2493071556091309,
0.14259852468967438,
-1.0736006498336792,
1.6271016597747803,
-0.7977352142333984,
0.20961318910121918,
-1.6789262294769287,
-0.07621723413467407,
-0.6806959509849548,
-0.697247326374054,
-0.8973063230514526,
-0.2963870167732239,
-0.6968954801559448,
0.9835131168365479,
2.4841232299804688,
1.239351511001587,
-1.2708828449249268,
2.7203569412231445,
0.6983875632286072,
-0.3967621326446533,
-0.9914639592170715,
0.4640762209892273,
-0.030662929639220238,
-1.1639710664749146,
-0.43064427375793457,
-0.8839917778968811,
0.018250614404678345,
-0.4947650134563446,
-0.5266430377960205,
0.02187635749578476,
0.5026741027832031,
-0.337162047624588,
-0.2899675667285919,
-0.5213046073913574,
-0.8161083459854126,
0.4630298316478729,
-0.40248751640319824,
0.9061142802238464,
-0.3768879473209381,
1.8648402690887451,
-0.5887643694877625,
0.412013977766037,
0.7075560092926025,
1.3397221565246582,
0.057689372450113297,
0.04360685870051384,
0.25175124406814575,
0.3262447714805603,
-0.008980515412986279,
0.42575427889823914,
1.1558574438095093,
0.5581772923469543,
0.4849895238876343,
0.6062166690826416,
-2.1662518978118896,
1.3823282718658447,
-0.8575165867805481,
0.17880892753601074,
1.4187736511230469,
-0.9692273139953613,
0.3451765775680542,
-1.7309130430221558,
-0.09587058424949646,
0.5614204406738281,
-2.314128875732422,
0.24848757684230804,
-1.4068584442138672,
-0.5732897520065308,
0.9985827803611755,
0.35495495796203613,
-1.2585017681121826,
0.11421366035938263,
-0.5221127867698669,
1.1462383270263672,
0.5977209210395813,
1.0785971879959106,
-1.712238073348999,
-0.0890226662158966,
-0.18658015131950378,
-0.014522195793688297,
-1.4418491125106812,
-1.5322717428207397,
0.5483089685440063,
0.676933228969574,
0.7381228804588318,
0.014022676274180412,
0.981942355632782,
-0.9259997010231018,
0.6912478804588318,
-0.8845398426055908,
-1.7068395614624023,
-1.368579387664795,
-2.383293867111206,
-2.359978199005127,
0.8128353953361511,
-0.43717989325523376,
-0.5157643556594849,
2.007981061935425,
-1.1492280960083008,
-1.8541752099990845,
1.1343408823013306,
0.17744885385036469,
-0.027416212484240532,
2.3916680812835693,
0.37197011709213257,
-0.7309551239013672,
0.40279415249824524,
-0.700118899345398,
0.7899733185768127,
-0.4412030875682831,
1.3455795049667358,
0.5853636860847473,
-0.9666513800621033,
1.5611227750778198,
-0.472903311252594,
0.5259542465209961,
-0.7630860209465027,
-0.4970621168613434,
-0.8700293302536011,
0.36758431792259216,
1.8997286558151245,
-0.36869922280311584,
1.6432956457138062,
-0.36407437920570374,
-1.5661699771881104,
-1.5883362293243408,
0.8773163557052612,
0.4446856379508972,
-0.757326602935791,
0.1496419906616211,
-0.48353302478790283,
0.09970766305923462,
-0.039879653602838516,
1.1203693151474,
1.215396761894226,
0.7066826820373535,
-0.3097641170024872,
-0.8095056414604187,
0.308998167514801,
-0.025060005486011505,
-0.7034727334976196,
-1.8235851526260376,
-0.3130522668361664,
0.24519257247447968,
0.5826341509819031,
-1.2411733865737915,
1.7102760076522827,
0.8156465888023376,
1.959792137145996,
1.067472219467163,
-0.23657219111919403,
1.4792308807373047,
-0.02513769268989563,
1.9812721014022827,
-0.3990301787853241,
0.6585216522216797,
-0.24581149220466614,
-1.1476863622665405,
0.826671838760376,
-0.4365277886390686,
-1.998490333557129,
-0.8243768215179443,
-0.8732837438583374,
-0.1567644476890564,
-0.8349204063415527,
0.8712206482887268,
-0.32670900225639343,
-1.420375108718872,
0.21569901704788208,
-0.6890793442726135,
0.25267308950424194,
-1.2678678035736084,
0.23057959973812103,
0.7641745209693909,
-0.5560895800590515,
-0.0866861641407013,
-0.31148481369018555,
-1.263885736465454,
-0.3175550699234009,
0.2974322736263275,
1.9474091529846191,
-0.6477383375167847,
0.9322435855865479,
0.9504193067550659,
-0.616591215133667,
0.0254962295293808,
0.3081788420677185,
-0.2506605386734009,
0.7738125920295715,
-1.0549734830856323,
-0.19799084961414337,
1.2056546211242676,
-0.20506127178668976,
-0.7337862253189087,
1.4499293565750122,
0.9173902273178101,
-1.0305572748184204,
-0.1606898158788681,
-0.1684623807668686,
-0.6813713312149048,
-0.07066722214221954,
-1.5832502841949463,
-0.10942921042442322,
0.44641634821891785,
-1.326500415802002,
-0.3851396441459656,
-0.18618477880954742,
1.3350695371627808,
-0.20794233679771423,
1.438448190689087,
-0.35477057099342346,
-0.13942483067512512,
-0.3928925395011902,
-0.4876963496208191,
0.06334760785102844,
-0.19964639842510223,
-0.6275025010108948,
0.1490868628025055,
-0.7741944193840027,
0.33955204486846924,
1.4169492721557617,
0.3967117667198181,
0.13373887538909912,
0.5272054672241211,
1.1305476427078247,
0.27445995807647705,
-0.07876290380954742,
-0.8405476808547974,
-1.6207215785980225,
2.056633472442627,
-1.3650612831115723,
1.9410916566848755,
0.7662423253059387,
-0.06197924539446831,
-1.7602314949035645,
-1.848639965057373,
1.2641888856887817,
1.1706616878509521,
2.2971699237823486,
0.4784005880355835,
0.3951481580734253,
-0.7854791283607483,
-0.7794744372367859,
0.29888126254081726,
-0.9767728447914124,
-0.6322404742240906,
0.12260414659976959,
2.411179542541504,
1.7595536708831787,
-0.4945847690105438,
-0.2372497320175171,
-1.0408351421356201,
1.2139114141464233,
-0.21197183430194855,
0.18349550664424896,
2.033688545227051,
-0.31188303232192993,
-1.0726139545440674,
1.168853998184204,
-2.27243709564209,
0.09831380844116211,
2.0482871532440186,
0.22610090672969818,
0.03275368735194206,
-1.4047507047653198,
-0.6247979998588562,
-0.35592004656791687,
-0.3420610725879669,
-1.2361412048339844,
0.5936917066574097,
-0.28881338238716125,
-0.8486359119415283,
-1.4549692869186401,
0.14969967305660248,
-1.1271798610687256,
-1.7034175395965576,
0.2548733055591583,
1.8668638467788696,
2.0207138061523438,
-0.788843035697937,
1.5200515985488892,
-0.15030023455619812,
0.08338800072669983,
1.2969975471496582,
1.2813925743103027,
3.2126142978668213,
1.7681810855865479,
-1.38601553440094,
0.7735337018966675,
-0.11696533858776093,
-0.46416860818862915,
1.2050904035568237,
-1.07845139503479,
1.2164627313613892,
-0.267352432012558,
-1.2877241373062134,
-1.3407819271087646,
0.9881865382194519,
0.5393449664115906,
0.05216458439826965,
-0.49579447507858276,
1.3739508390426636,
-0.001734985038638115,
1.4258124828338623,
0.5963772535324097,
-0.395746111869812,
0.673061728477478,
-0.33094069361686707,
-0.5507588982582092,
1.5389565229415894,
0.29503920674324036,
-1.4689189195632935,
-2.3153774738311768,
-0.2671931982040405,
-0.80544513463974,
-0.0893671065568924,
-0.660898745059967,
-1.0767021179199219,
1.6294692754745483,
0.4688781797885895,
-1.2459344863891602,
-0.35782158374786377,
-0.2838110029697418,
-0.5694224834442139,
2.7024083137512207,
-1.4840153455734253,
-0.14067955315113068,
-1.0466241836547852,
-0.5105361938476562,
1.693452000617981,
-1.209955096244812,
-0.17201392352581024,
-0.9872794151306152,
-0.6936334371566772,
-1.27716064453125,
-0.5210352540016174,
-0.1718345433473587,
-0.9527212381362915,
0.7255938053131104,
0.12242935597896576,
-1.0770741701126099,
-0.12353791296482086,
-0.9502837061882019,
0.9596254229545593,
-0.16917486488819122,
0.27551257610321045,
1.7748156785964966,
0.4957749545574188,
-0.4603065848350525,
0.7636061906814575,
1.1240884065628052,
0.503415584564209,
-0.7980758547782898,
0.11953172087669373,
-0.7843266725540161,
0.2543485462665558,
-1.3642668724060059,
0.3098132014274597,
-2.939858913421631,
0.5797655582427979,
-0.22840283811092377,
-0.13017113506793976,
-0.031764060258865356,
-1.3157899379730225,
1.1517373323440552,
2.5935492515563965,
-1.2531213760375977,
0.5930525064468384,
0.3401225209236145,
1.2822816371917725,
-1.644898533821106,
0.3514319360256195,
-0.4579463303089142,
2.0749881267547607,
0.1937699168920517,
1.2659252882003784,
-0.4941282272338867,
-2.1170318126678467,
0.5843992233276367,
-1.2819607257843018,
-1.109256386756897,
0.8766581416130066,
-0.8581857681274414,
0.15250679850578308,
-1.2976850271224976,
-0.2386724352836609,
-0.8385826945304871,
-1.2840713262557983,
0.7682107090950012,
0.08282318711280823,
0.5266084671020508,
-0.5464829802513123,
0.35112783312797546,
-2.163783550262451,
-1.338213324546814,
-0.2135958969593048,
-0.9784238338470459,
0.4262087941169739,
-0.329196959733963,
0.5991970300674438,
-0.1994510442018509,
0.06286169588565826,
0.3646727502346039,
1.3510392904281616,
3.4172635078430176,
0.2736193537712097,
0.2318880409002304,
-0.056536439806222916,
-0.8967506289482117,
1.3919588327407837,
0.9030989408493042,
-0.16841964423656464,
-0.565047025680542,
-0.8920886516571045,
1.3246983289718628,
1.996827244758606,
1.0577812194824219,
0.07218445837497711,
-0.8482226729393005,
-0.7402617335319519,
0.08213573694229126,
0.2306908518075943,
0.4268401861190796,
0.8380911350250244,
0.0417063906788826,
0.14234420657157898,
1.3401424884796143,
1.2264599800109863,
-0.41345998644828796,
0.4464562237262726,
-0.9367660284042358,
-0.39180877804756165,
0.39086011052131653,
0.2695026695728302,
0.03623301535844803,
0.40001893043518066,
-0.9919581413269043,
-0.21746481955051422,
-0.3393758535385132,
-0.8711917400360107,
-0.8154614567756653,
-0.441463828086853,
-0.42472249269485474,
1.5856550931930542,
0.1392824500799179,
-0.4195531904697418,
0.02544596791267395,
-0.7277636528015137,
-0.16714276373386383,
-1.152233600616455,
0.19524189829826355,
-0.11264412105083466,
-0.12237660586833954,
0.03588533028960228,
1.6786587238311768,
-1.0093826055526733,
-2.1666719913482666,
0.259744256734848,
0.19710637629032135,
-0.41069459915161133,
0.09359540045261383,
1.7601834535598755,
0.5488484501838684,
1.4052445888519287,
1.2820340394973755,
1.0241162776947021,
-0.7949099540710449,
-1.1764657497406006,
0.7325085401535034,
0.9088513255119324,
-1.4713226556777954,
0.8456236720085144,
-0.03195994347333908,
-0.563274621963501,
0.7389931082725525,
1.2582790851593018,
0.37290361523628235,
-1.9752494096755981,
0.737458348274231,
-0.9260041117668152,
0.7242371439933777,
0.7039276361465454,
0.7949180006980896,
0.34513550996780396,
0.8829740881919861,
-1.2181707620620728,
-1.1779110431671143,
-0.7811906337738037,
-0.6097192764282227,
1.961022138595581,
-0.1683771163225174,
0.5574840307235718,
-0.09597912430763245,
-1.2488234043121338,
-0.07287120819091797,
0.7988808155059814,
0.35227495431900024,
-0.371494323015213,
0.8393255472183228,
-0.7412549257278442,
-1.065457820892334,
-1.3878593444824219,
-0.5189957618713379,
-0.9805915951728821,
-0.9588019847869873,
1.0514932870864868,
0.8204811215400696,
0.35214710235595703,
1.8838870525360107,
0.5926122665405273,
0.31172165274620056,
-2.605287790298462,
0.847354531288147,
0.27474817633628845,
-0.01791295036673546,
0.8822025060653687,
0.30512332916259766,
1.1927827596664429,
0.0010017966851592064,
0.46036452054977417,
-2.426302671432495,
2.171372652053833,
-0.29677268862724304,
0.5486987829208374,
-0.013308444060385227,
-0.10940968990325928,
1.1001629829406738,
0.5133197903633118,
0.5395077466964722,
-1.1522125005722046,
0.8559203743934631,
-0.5560591816902161,
1.0842716693878174,
0.9395408034324646,
-0.916739821434021,
0.09368465840816498,
1.4382452964782715,
0.40842288732528687,
-0.5223844647407532,
-0.8915810585021973,
-0.8848673105239868,
0.8950093984603882,
1.6176329851150513,
-0.06066387891769409,
-0.001042896881699562,
0.8999207615852356,
0.5623395442962646,
-1.2720741033554077,
0.12799721956253052,
-0.6399084329605103,
-0.6722496747970581,
1.720642328262329,
2.1010215282440186,
-0.13638964295387268,
-0.20279648900032043,
-0.839576005935669,
-1.145335078239441,
0.8185758590698242,
-0.06113573536276817,
0.08717049658298492,
0.6433758735656738,
-0.6598199009895325,
1.146546721458435,
0.7391448616981506,
0.9471299648284912,
0.04696303606033325,
0.3226713538169861,
0.48352834582328796,
-0.28288453817367554,
-1.1367799043655396,
-0.3074222207069397,
-1.113287329673767,
-2.535316228866577,
0.5374621152877808,
-0.3321247398853302,
-1.482662558555603,
0.08569860458374023,
-1.0568547248840332,
0.8913417458534241,
-0.6945598721504211,
-1.0202558040618896,
-1.491296410560608,
0.29426151514053345,
-0.19664187729358673,
0.8699251413345337,
-1.6434745788574219,
-0.13252389430999756,
1.3317234516143799,
0.8635890483856201,
-0.5373323559761047,
1.0700024366378784,
0.27136579155921936,
1.033717393875122,
0.8222686648368835,
-0.42408883571624756,
0.5523003935813904,
0.07400794327259064,
-1.3789948225021362,
0.46642571687698364,
1.3032753467559814,
0.14941586554050446,
1.522028923034668,
-0.451323926448822,
0.07121919095516205,
0.4153333604335785,
-0.4799564480781555,
-0.43799087405204773,
-0.4367845356464386,
0.7640056610107422,
0.19977062940597534,
-0.9542429447174072,
0.018933171406388283,
-0.1601528525352478,
-0.2855120301246643,
0.30027422308921814,
-1.532009482383728,
-0.291480153799057,
-0.36073949933052063,
-0.5902734398841858,
-1.2710750102996826,
0.02013501152396202,
1.3128727674484253,
-0.790492594242096,
-0.19189882278442383,
0.5016958117485046,
0.4015521705150604,
0.5572996735572815,
0.6054490208625793,
-0.6831611394882202,
-0.281578928232193,
-0.3917969763278961,
-0.29416242241859436,
0.33622562885284424,
1.2029727697372437,
-0.10255363583564758,
-1.022564172744751,
0.6914044618606567,
-0.40349888801574707,
0.1120728999376297,
1.9694936275482178,
0.1279556155204773,
-0.7828905582427979,
0.1726129651069641,
-0.7447784543037415,
1.9997886419296265,
1.614258050918579,
1.3866243362426758,
-0.019944466650485992,
-0.9625191688537598,
0.57579505443573,
-0.15378142893314362,
-0.33954307436943054,
0.9903530478477478,
0.509178876876831,
-0.18578216433525085,
-1.4023492336273193,
0.5748266577720642,
1.1286929845809937,
-0.8522384166717529,
-0.7502545714378357,
-0.10510818660259247,
-0.8544796705245972,
1.1018414497375488,
0.6501918435096741,
0.2809934914112091,
0.1788012534379959,
1.6125785112380981,
0.6481842398643494,
-0.5531795024871826,
0.510924756526947,
0.3664969503879547,
-0.12712404131889343,
-2.1371521949768066,
-0.9731804132461548,
0.3515491485595703,
-0.24840444326400757,
-1.6018271446228027,
1.305925965309143,
-1.0923569202423096,
-0.9293797612190247,
0.48167601227760315,
0.19516810774803162,
1.4947497844696045,
0.2725651264190674,
1.6475809812545776,
2.0992014408111572,
0.8820388317108154,
0.23734238743782043,
1.317874550819397,
-0.0905078649520874,
-0.448407918214798,
1.7420674562454224,
-0.43136724829673767,
0.45414963364601135,
0.8695998191833496,
-0.4238910675048828,
-1.1432782411575317,
-0.8167492747306824,
-1.1472545862197876,
-0.6293439865112305,
1.1868995428085327,
0.1701284945011139,
-1.082521915435791,
0.23384308815002441,
1.6053837537765503,
0.06430463492870331,
-0.23206926882266998,
0.6757696866989136,
0.4902540445327759,
-0.7572293877601624,
-0.02094183675944805,
-0.9476718306541443,
0.5256230235099792,
-0.009972753003239632,
-0.27279213070869446,
0.277571439743042,
0.5129286050796509,
1.2263048887252808,
-0.06688013672828674,
0.1772669404745102,
1.2423774003982544,
-1.326988697052002,
1.4397282600402832,
-0.5208179950714111,
0.24549929797649384,
-2.3991665840148926,
1.3400804996490479,
-0.8353193402290344,
1.8471423387527466,
-2.603914976119995,
0.40459564328193665,
-0.6358351707458496,
-0.4365863502025604,
0.32748740911483765,
-0.41102129220962524,
0.19295446574687958,
-0.15685626864433289,
-1.0818055868148804,
-0.1377769261598587,
-0.7962439060211182,
0.6611501574516296,
1.0967048406600952,
1.3115609884262085,
-1.0700268745422363,
-0.12204036116600037,
-1.7618730068206787,
-0.20631279051303864,
-0.7962746620178223,
0.25788217782974243,
-1.9682375192642212,
-0.058539655059576035,
-2.0692179203033447,
-2.386296272277832,
-1.4165796041488647,
-0.7842246890068054,
1.0551857948303223,
0.16958582401275635,
-0.9463229179382324,
1.1931898593902588,
-0.31421399116516113,
-1.809420108795166,
1.1194348335266113,
-2.1684069633483887
] |
https://github.com/huggingface/datasets/issues/5985 | Cannot reuse tokenizer object for dataset map | This is a known issue: https://github.com/huggingface/datasets/issues/3847.
Fixing this requires significant work - rewriting the `tokenizers` lib to make them immutable.
The current solution is to pass `cache_file_name` to `map` to use that file for caching or calling a tokenizer before `map` (with the same set of parameters as the ones in the map transform) | ### Describe the bug
Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both.
Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same.
But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change.
### Steps to reproduce the bug
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
t.save_pretrained("tok1")
th1 = hash(dumps(t))
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
t.save_pretrained("tok2")
th2 = hash(dumps(t))
assert th1 == th2 # Assertion Error
```
But if you use just the hash of the object without dumps, the hashes don't change
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
th1 = hash(t) # Just hash no dumps
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
th2 = hash(t) # Just hash no dumps
assert th1 == th2 # This is OK
```
This causes situations such as the following
1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt`
```python
from transformers import AutoTokenizer
import datasets
class TokenizeMapper(object):
"""Mapper for tokenizer.
This is needed because the caching mechanism of HuggingFace does not work on
lambdas. Each time a new lambda will be created by a new process which will
lead to a different hash.
This way we can have a universal mapper object in init and reuse it with the same
hash for each process.
"""
def __init__(self, tokenizer):
"""Initialize the tokenizer."""
self.tokenizer = tokenizer
def __call__(self, examples, **kwargs):
"""Run the mapper."""
texts = examples["text"]
tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True)
batch_outputs = {
"input_ids": tt.input_ids,
"attention_mask": tt.attention_mask,
}
return batch_outputs
t = AutoTokenizer.from_pretrained('bert-base-uncased')
mapper = TokenizeMapper(t)
ds = datasets.load_dataset("text", data_files="lines.txt")
mds1 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
mds2 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
```
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Expected behavior
We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset.
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-6.1.31_1-x86_64-with-glibc2.36
- Python version: 3.9.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2 | 83 | 54 | Cannot reuse tokenizer object for dataset map
### Describe the bug
Related to https://github.com/huggingface/transformers/issues/24441. Not sure if this is a tokenizer issue or caching issue, so filing in both.
Passing the tokenizer to the dataset map function causes the tokenizer to be fingerprinted weirdly. After calling the tokenizer with arguments like padding and truncation the tokenizer object changes interanally, even though the hash remains the same.
But dumps is able to detect that internal change which causes the tokenizer object's fingerprint to change.
### Steps to reproduce the bug
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
t.save_pretrained("tok1")
th1 = hash(dumps(t))
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
t.save_pretrained("tok2")
th2 = hash(dumps(t))
assert th1 == th2 # Assertion Error
```
But if you use just the hash of the object without dumps, the hashes don't change
```python
from transformers import AutoTokenizer
from datasets.utils.py_utils import dumps # Huggingface datasets
t = AutoTokenizer.from_pretrained('bert-base-uncased')
th1 = hash(t) # Just hash no dumps
text = "This is an example text"
ttext = t(text, max_length=512, padding="max_length", truncation=True)
th2 = hash(t) # Just hash no dumps
assert th1 == th2 # This is OK
```
This causes situations such as the following
1. Create a text file like this `yes "This is an example text" | head -n 10000 > lines.txt`
```python
from transformers import AutoTokenizer
import datasets
class TokenizeMapper(object):
"""Mapper for tokenizer.
This is needed because the caching mechanism of HuggingFace does not work on
lambdas. Each time a new lambda will be created by a new process which will
lead to a different hash.
This way we can have a universal mapper object in init and reuse it with the same
hash for each process.
"""
def __init__(self, tokenizer):
"""Initialize the tokenizer."""
self.tokenizer = tokenizer
def __call__(self, examples, **kwargs):
"""Run the mapper."""
texts = examples["text"]
tt = self.tokenizer(texts, max_length=256, padding="max_length", truncation=True)
batch_outputs = {
"input_ids": tt.input_ids,
"attention_mask": tt.attention_mask,
}
return batch_outputs
t = AutoTokenizer.from_pretrained('bert-base-uncased')
mapper = TokenizeMapper(t)
ds = datasets.load_dataset("text", data_files="lines.txt")
mds1 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
mds2 = ds.map(
mapper,
batched=False,
remove_columns=["text"],
).with_format("torch")
```
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Expected behavior
We should be able to initialize a tokenizer. And reusing it should let us reuse the same map computation for the same dataset.
The second call to map should reuse the cached processed dataset from mds1, but it instead it redoes the tokenization because of the behavior of dumps.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-6.1.31_1-x86_64-with-glibc2.36
- Python version: 3.9.16
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
This is a known issue: https://github.com/huggingface/datasets/issues/3847.
Fixing this requires significant work - rewriting the `tokenizers` lib to make them immutable.
The current solution is to pass `cache_file_name` to `map` to use that file for caching or calling a tokenizer before `map` (with the same set of parameters as the ones in the map transform) | [
-1.2028992176055908,
-0.9571101069450378,
-0.6974862813949585,
1.5286940336227417,
-0.17066217958927155,
-1.188740611076355,
0.09444975107908249,
-1.1103932857513428,
1.6462217569351196,
-0.88872891664505,
0.3760341703891754,
-1.627423882484436,
0.03271350637078285,
-0.49448704719543457,
-0.7029278874397278,
-0.8109974265098572,
-0.4280395805835724,
-0.7228034138679504,
1.1338523626327515,
2.4506583213806152,
1.1769688129425049,
-1.3956754207611084,
2.807891368865967,
0.7062195539474487,
-0.27410897612571716,
-0.9754249453544617,
0.49137935042381287,
-0.029974233359098434,
-1.3107627630233765,
-0.5185332298278809,
-0.9666470885276794,
-0.060155823826789856,
-0.5369237065315247,
-0.5747197866439819,
0.035692647099494934,
0.42404529452323914,
-0.29629844427108765,
-0.5106250643730164,
-0.5718297958374023,
-0.8331369161605835,
0.47082871198654175,
-0.33517423272132874,
0.8349354863166809,
-0.3237367570400238,
1.9389898777008057,
-0.5157192945480347,
0.39517712593078613,
0.6868579387664795,
1.410456895828247,
0.23783957958221436,
-0.04916597902774811,
0.3519480526447296,
0.38823506236076355,
-0.11648396402597427,
0.5833396315574646,
1.1092573404312134,
0.6605895161628723,
0.568173885345459,
0.791431188583374,
-2.135831594467163,
1.384026288986206,
-1.0586135387420654,
0.2933376431465149,
1.3613433837890625,
-0.9285355806350708,
0.42804208397865295,
-1.738229751586914,
0.036400262266397476,
0.556756317615509,
-2.263808488845825,
0.3028245270252228,
-1.2675464153289795,
-0.4745148718357086,
1.1196372509002686,
0.33697405457496643,
-1.2795761823654175,
0.13534393906593323,
-0.39300844073295593,
1.0903561115264893,
0.4133625626564026,
1.0804442167282104,
-1.679479718208313,
0.02580079808831215,
-0.2747899293899536,
0.06693948805332184,
-1.2948538064956665,
-1.5811121463775635,
0.5482823252677917,
0.5892391800880432,
0.5642584562301636,
-0.09450331330299377,
1.144910216331482,
-0.9359868764877319,
0.7213925123214722,
-0.9192142486572266,
-1.7333564758300781,
-1.4306855201721191,
-2.2743067741394043,
-2.2363595962524414,
0.7206023335456848,
-0.4599035978317261,
-0.579298198223114,
2.042623519897461,
-1.067652702331543,
-1.825298547744751,
1.1171305179595947,
0.2401360422372818,
-0.03069242835044861,
2.3739378452301025,
0.20087021589279175,
-0.7325968146324158,
0.40218430757522583,
-0.7362654805183411,
0.8815628886222839,
-0.4477384686470032,
1.3876479864120483,
0.5213474631309509,
-1.0644760131835938,
1.5886390209197998,
-0.29841887950897217,
0.4958445131778717,
-0.6199896335601807,
-0.45066723227500916,
-0.744406521320343,
0.35722196102142334,
1.897189974784851,
-0.3374469578266144,
1.51609468460083,
-0.42279261350631714,
-1.5759879350662231,
-1.6135118007659912,
0.8340685367584229,
0.5982168316841125,
-0.8503574132919312,
0.19532524049282074,
-0.4227578639984131,
0.0021468857303261757,
-0.07553796470165253,
1.1955413818359375,
1.3395576477050781,
0.711520254611969,
-0.2841818928718567,
-0.7725116014480591,
0.16774708032608032,
-0.05841493606567383,
-0.6912128329277039,
-1.8037776947021484,
-0.45635172724723816,
0.11716342717409134,
0.606207549571991,
-1.186513066291809,
1.7172445058822632,
0.9052574038505554,
1.8415673971176147,
1.0390667915344238,
-0.3334238827228546,
1.4536606073379517,
0.05303533002734184,
1.771221399307251,
-0.45715466141700745,
0.7779513597488403,
-0.3163585066795349,
-1.1858876943588257,
0.7415167093276978,
-0.35536450147628784,
-1.9517130851745605,
-0.8453822731971741,
-0.7207598090171814,
-0.1275814175605774,
-0.7132524251937866,
0.8757770657539368,
-0.32702741026878357,
-1.4795247316360474,
0.18613669276237488,
-0.6854098439216614,
0.28028178215026855,
-1.2077555656433105,
0.3646070659160614,
0.7699704170227051,
-0.6861392855644226,
0.10491645336151123,
-0.28800398111343384,
-1.2013871669769287,
-0.44983530044555664,
0.21373865008354187,
1.9206490516662598,
-0.8683348298072815,
0.9414472579956055,
0.9678651690483093,
-0.7127714157104492,
0.049489594995975494,
0.38251355290412903,
-0.30728578567504883,
0.910829484462738,
-1.0445053577423096,
-0.4258502125740051,
1.1981861591339111,
-0.2363795042037964,
-0.5536835193634033,
1.3959784507751465,
0.7552525401115417,
-1.0398311614990234,
-0.1593632698059082,
-0.14457044005393982,
-0.9512263536453247,
0.04682837799191475,
-1.5603097677230835,
-0.10523150861263275,
0.3651801347732544,
-1.5147348642349243,
-0.5119296312332153,
-0.2471107542514801,
1.2926503419876099,
-0.21645723283290863,
1.4212262630462646,
-0.44907161593437195,
-0.1601177603006363,
-0.35389426350593567,
-0.3702901303768158,
0.2069411426782608,
-0.24640844762325287,
-0.678047776222229,
0.23403231799602509,
-0.7458957433700562,
0.3767152428627014,
1.3957926034927368,
0.3615509271621704,
-0.020372070372104645,
0.5200732350349426,
1.1661394834518433,
0.44658154249191284,
-0.10018141567707062,
-0.7742561101913452,
-1.5882351398468018,
1.8630478382110596,
-1.4984732866287231,
2.0433309078216553,
0.8405606746673584,
-0.004948897287249565,
-1.71511709690094,
-1.8507490158081055,
1.3793708086013794,
1.1557505130767822,
2.3524410724639893,
0.5842462778091431,
0.3978321850299835,
-0.8703482747077942,
-0.7427613139152527,
0.35031795501708984,
-1.057651400566101,
-0.7028234004974365,
0.09822860360145569,
2.3185625076293945,
1.8202579021453857,
-0.45254042744636536,
-0.3072572648525238,
-1.060542345046997,
1.3410433530807495,
-0.18904784321784973,
0.19851268827915192,
1.9150272607803345,
-0.25832974910736084,
-1.0585185289382935,
1.3532981872558594,
-2.3913960456848145,
0.18756699562072754,
2.0093770027160645,
0.17959782481193542,
0.14910456538200378,
-1.3962310552597046,
-0.6919980049133301,
-0.2103579044342041,
-0.33772027492523193,
-1.2479115724563599,
0.49635347723960876,
-0.15985456109046936,
-0.7913836240768433,
-1.4480206966400146,
0.22567379474639893,
-1.1956768035888672,
-1.5550999641418457,
0.2604586184024811,
1.9433270692825317,
2.026848077774048,
-0.698383092880249,
1.538237452507019,
-0.2763637602329254,
0.13608549535274506,
1.2546699047088623,
1.3225464820861816,
3.166548252105713,
1.7609957456588745,
-1.357484221458435,
0.5867737531661987,
-0.1471477746963501,
-0.5315870642662048,
1.1297342777252197,
-1.1549625396728516,
1.3296607732772827,
-0.06696786731481552,
-1.117197036743164,
-1.2893047332763672,
0.849528431892395,
0.4966452419757843,
0.045342713594436646,
-0.3943937122821808,
1.2459399700164795,
0.11293477565050125,
1.3958972692489624,
0.46963340044021606,
-0.34503936767578125,
0.675838053226471,
-0.38940319418907166,
-0.5037137269973755,
1.4223411083221436,
0.20132650434970856,
-1.381688117980957,
-2.103984832763672,
-0.10010167956352234,
-0.8188945055007935,
0.16343319416046143,
-0.6186978220939636,
-0.9860119223594666,
1.6175366640090942,
0.44907692074775696,
-1.234950304031372,
-0.30941078066825867,
-0.36272767186164856,
-0.5959402322769165,
2.561824083328247,
-1.3579515218734741,
-0.23571640253067017,
-0.9792070388793945,
-0.6129146814346313,
1.5765269994735718,
-1.1441454887390137,
-0.27618318796157837,
-1.025821328163147,
-0.538723349571228,
-1.2649598121643066,
-0.5732080340385437,
0.0013656988739967346,
-0.8977746963500977,
0.8108798265457153,
0.12330511957406998,
-1.1336283683776855,
-0.3272860050201416,
-0.8452757000923157,
0.9482698440551758,
-0.09814362972974777,
0.11752565950155258,
1.8680975437164307,
0.35336512327194214,
-0.3434160351753235,
0.8176366090774536,
1.2024946212768555,
0.5731285810470581,
-0.5622397065162659,
0.271389365196228,
-0.59238201379776,
0.3551977872848511,
-1.4336267709732056,
0.3314993977546692,
-2.9174959659576416,
0.6957883238792419,
-0.034852880984544754,
-0.07695484906435013,
-0.02742958441376686,
-1.316168189048767,
1.0606328248977661,
2.579279899597168,
-1.0706911087036133,
0.4394741654396057,
0.34324970841407776,
1.141898512840271,
-1.6555112600326538,
0.3786383867263794,
-0.44169366359710693,
2.036159038543701,
0.23356997966766357,
1.260819673538208,
-0.47406917810440063,
-2.3292627334594727,
0.6640538573265076,
-1.3516488075256348,
-1.1313351392745972,
0.8699151873588562,
-0.7614049911499023,
-0.024511512368917465,
-1.371285080909729,
-0.31417909264564514,
-0.7711039185523987,
-1.195054054260254,
0.6725556254386902,
0.09632697701454163,
0.4012151062488556,
-0.49310630559921265,
0.41051289439201355,
-2.1872079372406006,
-1.33096444606781,
-0.24588802456855774,
-0.9966737627983093,
0.44991108775138855,
-0.4834350049495697,
0.6464020013809204,
-0.2691817879676819,
0.07547052949666977,
0.2874438166618347,
1.4050953388214111,
3.387132167816162,
0.23738303780555725,
0.35986849665641785,
-0.20290249586105347,
-0.939998984336853,
1.4631596803665161,
0.921267032623291,
-0.20617394149303436,
-0.6083447933197021,
-1.0831022262573242,
1.2312660217285156,
1.865218162536621,
0.9844553470611572,
-0.02910507842898369,
-0.8843892812728882,
-0.8386561274528503,
-0.10621648281812668,
0.1290174424648285,
0.4190903306007385,
0.9123444557189941,
0.15779224038124084,
0.1444597989320755,
1.445210337638855,
1.2287800312042236,
-0.4770796597003937,
0.3583129048347473,
-0.794704258441925,
-0.5423321723937988,
0.500667929649353,
0.33882132172584534,
-0.012702662497758865,
0.30850696563720703,
-0.9662588238716125,
-0.14799344539642334,
-0.4179837107658386,
-0.9320237636566162,
-0.7578951716423035,
-0.37589457631111145,
-0.30578216910362244,
1.5957571268081665,
0.1826978623867035,
-0.5222058296203613,
-0.07109512388706207,
-0.8221824169158936,
-0.17205239832401276,
-1.024700403213501,
0.28053736686706543,
-0.015233894810080528,
-0.18609243631362915,
-0.15935541689395905,
1.7024242877960205,
-0.939760684967041,
-2.104879379272461,
0.2192503660917282,
0.24022066593170166,
-0.2630537748336792,
0.0789434090256691,
1.6782664060592651,
0.4858837127685547,
1.452030897140503,
1.3608219623565674,
0.9350325465202332,
-0.6617688536643982,
-1.228118658065796,
0.6686611175537109,
0.9857907891273499,
-1.433713436126709,
0.7635602355003357,
-0.060321610420942307,
-0.533152163028717,
0.598912239074707,
1.3887296915054321,
0.5663848519325256,
-1.8748321533203125,
0.8184942603111267,
-0.9724804162979126,
0.7494043111801147,
0.7928165197372437,
0.6460862159729004,
0.21230778098106384,
0.7519970536231995,
-1.1958236694335938,
-1.1874637603759766,
-0.6534450650215149,
-0.6783262491226196,
1.9708869457244873,
-0.3319389224052429,
0.5500566959381104,
-0.21769903600215912,
-1.360055923461914,
-0.18683992326259613,
0.7047988772392273,
0.262691855430603,
-0.509126603603363,
0.7968737483024597,
-0.6574459671974182,
-1.092452883720398,
-1.385524868965149,
-0.395887553691864,
-1.0597779750823975,
-0.9052594304084778,
0.9837276339530945,
0.8725292682647705,
0.25668400526046753,
1.8937712907791138,
0.6645462512969971,
0.22747009992599487,
-2.717299461364746,
0.8772156834602356,
0.2514696419239044,
-0.03628639504313469,
0.9427300691604614,
0.3167039155960083,
1.0113224983215332,
-0.0038557667285203934,
0.5092599391937256,
-2.449241876602173,
2.314990758895874,
-0.2021559327840805,
0.6765730977058411,
0.012404107488691807,
-0.17958319187164307,
1.1906309127807617,
0.6332833766937256,
0.5474839806556702,
-1.0780397653579712,
0.7007538676261902,
-0.5941184759140015,
1.2581924200057983,
0.8074042201042175,
-0.8317919373512268,
-0.10478324443101883,
1.3375093936920166,
0.44532105326652527,
-0.5296540260314941,
-0.9224419593811035,
-1.0524845123291016,
0.9739693403244019,
1.7971185445785522,
-0.030922912061214447,
-0.009957979433238506,
0.7906580567359924,
0.6222928166389465,
-1.28990638256073,
0.04184325411915779,
-0.6117200255393982,
-0.7414005994796753,
1.7000787258148193,
2.0890798568725586,
-0.16562247276306152,
-0.3280007243156433,
-0.6664745211601257,
-1.2114827632904053,
0.7591079473495483,
-0.013149247504770756,
0.13069674372673035,
0.7036542892456055,
-0.6846954226493835,
1.177005648612976,
0.8399878740310669,
0.865949809551239,
0.22680439054965973,
0.27004823088645935,
0.40753448009490967,
-0.3123724162578583,
-1.2812597751617432,
-0.22763018310070038,
-1.0654922723770142,
-2.5600812435150146,
0.359323114156723,
-0.20147690176963806,
-1.405034065246582,
0.06615287810564041,
-1.0035862922668457,
0.8828828930854797,
-0.6384647488594055,
-1.1169958114624023,
-1.5519037246704102,
0.13105985522270203,
-0.0585256889462471,
0.8649113774299622,
-1.6425038576126099,
-0.04766909405589104,
1.2562265396118164,
0.9472318887710571,
-0.6653794050216675,
1.0296745300292969,
0.1727466583251953,
1.0962128639221191,
0.8903502225875854,
-0.2831857204437256,
0.5153454542160034,
-0.031645312905311584,
-1.3699471950531006,
0.39163437485694885,
1.195641040802002,
0.26982033252716064,
1.478987693786621,
-0.5558190941810608,
0.027622021734714508,
0.4260913133621216,
-0.5429847836494446,
-0.5262585282325745,
-0.4516420066356659,
0.7070967555046082,
0.09598800539970398,
-0.8585801720619202,
0.029328666627407074,
-0.08293844014406204,
-0.27773842215538025,
0.13067933917045593,
-1.5629078149795532,
-0.18607307970523834,
-0.3726160526275635,
-0.6640714406967163,
-1.1507902145385742,
-0.090110644698143,
1.4176772832870483,
-0.7758374810218811,
-0.20931032299995422,
0.5277226567268372,
0.2821507155895233,
0.42974942922592163,
0.6392393708229065,
-0.6790279150009155,
-0.3346324861049652,
-0.1792362779378891,
-0.3931102454662323,
0.3714863061904907,
1.375357747077942,
-0.09402906894683838,
-0.9314962029457092,
0.637715756893158,
-0.3544149398803711,
0.10219120234251022,
1.8868147134780884,
0.041648756712675095,
-0.8348472714424133,
0.246863454580307,
-0.7833367586135864,
1.9853273630142212,
1.709179162979126,
1.3552554845809937,
-0.12674054503440857,
-1.0046495199203491,
0.6527774333953857,
-0.32318124175071716,
-0.3213441073894501,
0.9469743371009827,
0.3981974720954895,
-0.11090953648090363,
-1.4431650638580322,
0.7086585760116577,
1.2199437618255615,
-0.9280786514282227,
-0.8225671052932739,
0.06349222362041473,
-0.8707616329193115,
1.023289442062378,
0.6729651689529419,
0.3805963695049286,
0.2523833215236664,
1.6725027561187744,
0.8045811057090759,
-0.42698538303375244,
0.5625483393669128,
0.4829830229282379,
-0.175387904047966,
-2.105980634689331,
-1.0565602779388428,
0.3379824161529541,
-0.5633473992347717,
-1.6372287273406982,
1.3683829307556152,
-1.1497360467910767,
-0.9463914632797241,
0.5629254579544067,
0.05781867355108261,
1.4705162048339844,
0.3221263587474823,
1.5624840259552002,
2.110023021697998,
0.8186413049697876,
0.3280954360961914,
1.161453127861023,
-0.24314485490322113,
-0.4569361209869385,
1.711133360862732,
-0.4992610812187195,
0.4596456289291382,
1.0455855131149292,
-0.3189476430416107,
-1.0060827732086182,
-0.7821168303489685,
-1.192672610282898,
-0.8048416376113892,
1.1564655303955078,
0.16867290437221527,
-1.1546871662139893,
0.27708908915519714,
1.5779540538787842,
0.10252837091684341,
-0.25208204984664917,
0.6285252571105957,
0.5159761309623718,
-0.7992638945579529,
-0.021797094494104385,
-0.8559257388114929,
0.49307021498680115,
-0.1847599297761917,
-0.403903990983963,
0.31019166111946106,
0.46364259719848633,
1.3016473054885864,
-0.07804261147975922,
0.17909836769104004,
1.1110810041427612,
-1.4282631874084473,
1.5212455987930298,
-0.7182829976081848,
0.3887379765510559,
-2.4468319416046143,
1.5385912656784058,
-0.8266134262084961,
1.947434425354004,
-2.5795888900756836,
0.48727479577064514,
-0.5832659602165222,
-0.4955691397190094,
0.3049895167350769,
-0.42324066162109375,
0.10734130442142487,
-0.14158689975738525,
-1.1624513864517212,
-0.10630112141370773,
-0.5868387818336487,
0.6805088520050049,
1.1343461275100708,
1.3719947338104248,
-1.1584718227386475,
-0.1958920657634735,
-1.7828691005706787,
-0.08578282594680786,
-0.7329334616661072,
0.2900497317314148,
-2.0313796997070312,
-0.2646370530128479,
-1.9187875986099243,
-2.3486087322235107,
-1.2676112651824951,
-0.7073491811752319,
1.1228317022323608,
0.10142122954130173,
-0.8036680817604065,
1.2213131189346313,
-0.4166223108768463,
-1.8032686710357666,
1.1823629140853882,
-2.098257303237915
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
@lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
PS: I don't expect significant speed-up for local, uncompressed Arrow files. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 84 | 86 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
@lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
PS: I don't expect significant speed-up for local, uncompressed Arrow files. | [
-1.2722200155258179,
-1.0042494535446167,
-0.7117017507553101,
1.4626505374908447,
-0.18122969567775726,
-1.1339530944824219,
0.12321453541517258,
-1.0155266523361206,
1.6622917652130127,
-0.7735460996627808,
0.3303607404232025,
-1.6428782939910889,
0.0573490709066391,
-0.5427433848381042,
-0.7305470108985901,
-0.8609184622764587,
-0.46967074275016785,
-0.7957655787467957,
1.0506422519683838,
2.514603614807129,
1.1506199836730957,
-1.4280210733413696,
2.68860125541687,
0.6681514978408813,
-0.23941685259342194,
-1.0565810203552246,
0.5622681379318237,
0.01666930876672268,
-1.3123198747634888,
-0.4455769956111908,
-0.9658658504486084,
-0.06941556185483932,
-0.5798362493515015,
-0.4519968628883362,
0.045419201254844666,
0.36775967478752136,
-0.20187659561634064,
-0.4296016991138458,
-0.6141335368156433,
-0.7073800563812256,
0.4851152300834656,
-0.4335823953151703,
1.000372290611267,
-0.3056603968143463,
1.8073787689208984,
-0.5400161743164062,
0.5164080262184143,
0.7273718118667603,
1.3979897499084473,
0.21072424948215485,
-0.01086608786135912,
0.3713665008544922,
0.4359150826931,
-0.01936444640159607,
0.4941619634628296,
1.1004712581634521,
0.6426156759262085,
0.4590253233909607,
0.6587638854980469,
-2.2996981143951416,
1.3213832378387451,
-1.0052319765090942,
0.3702452778816223,
1.3063859939575195,
-0.9177719354629517,
0.4348716139793396,
-1.7672837972640991,
-0.04342024028301239,
0.6369837522506714,
-2.2512669563293457,
0.2067188322544098,
-1.2525532245635986,
-0.4140785038471222,
1.0344401597976685,
0.3611401915550232,
-1.2497857809066772,
0.12131065875291824,
-0.5108895897865295,
1.0472859144210815,
0.4168948829174042,
1.1654329299926758,
-1.657199740409851,
-0.023316465318202972,
-0.32315534353256226,
0.16209028661251068,
-1.2615365982055664,
-1.5009785890579224,
0.6052737236022949,
0.7053725719451904,
0.4752534329891205,
-0.0936354249715805,
1.0220524072647095,
-1.0081623792648315,
0.7989321351051331,
-0.9835723042488098,
-1.6922465562820435,
-1.4812440872192383,
-2.2407357692718506,
-2.283993721008301,
0.7310309410095215,
-0.4231324791908264,
-0.5496231317520142,
2.0082433223724365,
-1.0347297191619873,
-1.7569142580032349,
1.1902148723602295,
0.23796296119689941,
0.040489837527275085,
2.3885529041290283,
0.16274838149547577,
-0.6819621324539185,
0.39797672629356384,
-0.7674630880355835,
0.7640189528465271,
-0.40285834670066833,
1.3900781869888306,
0.38579460978507996,
-0.9847204685211182,
1.5801522731781006,
-0.34948641061782837,
0.5615662336349487,
-0.6218483448028564,
-0.4929860830307007,
-0.7916468381881714,
0.31942665576934814,
1.9391615390777588,
-0.3179131746292114,
1.559660792350769,
-0.3832888603210449,
-1.5826828479766846,
-1.6102116107940674,
0.8520535826683044,
0.506351113319397,
-0.7494339942932129,
0.05792928487062454,
-0.41752418875694275,
0.20011937618255615,
-0.046185947954654694,
1.0680376291275024,
1.2700517177581787,
0.7105521559715271,
-0.35388392210006714,
-0.9419785141944885,
0.1857306957244873,
-0.12990453839302063,
-0.7129488587379456,
-1.8031119108200073,
-0.34632378816604614,
0.1004556193947792,
0.6525562405586243,
-1.1689729690551758,
1.6808453798294067,
0.9684444665908813,
1.9278658628463745,
1.022173285484314,
-0.3439590632915497,
1.563007116317749,
0.11089833825826645,
1.8535826206207275,
-0.5236019492149353,
0.6147603988647461,
-0.4014054834842682,
-1.1620043516159058,
0.7657592296600342,
-0.3289749324321747,
-2.0601744651794434,
-0.7379122376441956,
-0.781920850276947,
-0.25301143527030945,
-0.7880447506904602,
0.8689380884170532,
-0.24427509307861328,
-1.393450140953064,
0.2977888286113739,
-0.7518018484115601,
0.1585492044687271,
-1.2027723789215088,
0.36804741621017456,
0.676469624042511,
-0.6650428771972656,
0.08896461874246597,
-0.28813329339027405,
-1.2785084247589111,
-0.4531794786453247,
0.23111511766910553,
1.8469027280807495,
-0.7625523805618286,
0.9072206020355225,
1.0006686449050903,
-0.6769078969955444,
-0.022934067994356155,
0.29520097374916077,
-0.30553504824638367,
0.8263527750968933,
-1.0485981702804565,
-0.4345247745513916,
1.2208303213119507,
-0.21983514726161957,
-0.5709907412528992,
1.4597426652908325,
0.7007099986076355,
-0.9914294481277466,
-0.2833902835845947,
-0.11946528404951096,
-0.7655632495880127,
0.015827883034944534,
-1.6739140748977661,
-0.14466500282287598,
0.3736461102962494,
-1.5373705625534058,
-0.4171566367149353,
-0.21632727980613708,
1.2488319873809814,
-0.06837783008813858,
1.4471502304077148,
-0.35452917218208313,
-0.1270417422056198,
-0.376245379447937,
-0.38750529289245605,
0.12982697784900665,
-0.20308975875377655,
-0.543494462966919,
0.2575179934501648,
-0.8218129873275757,
0.405952513217926,
1.48683762550354,
0.3843064308166504,
0.01219315454363823,
0.5196945667266846,
1.0104774236679077,
0.4018685519695282,
-0.007146946154534817,
-0.8403788208961487,
-1.5807538032531738,
2.0466318130493164,
-1.4722559452056885,
1.9705368280410767,
0.8051187992095947,
-0.01610085740685463,
-1.8129632472991943,
-1.8591946363449097,
1.322405219078064,
1.1243886947631836,
2.3746495246887207,
0.5708692669868469,
0.4180220663547516,
-0.7524073719978333,
-0.6141529083251953,
0.3379935920238495,
-1.0117151737213135,
-0.76608806848526,
0.16047947108745575,
2.390251636505127,
1.7390861511230469,
-0.47976863384246826,
-0.13213875889778137,
-1.021979808807373,
1.3980131149291992,
-0.12225761264562607,
0.23696671426296234,
2.030424118041992,
-0.17827650904655457,
-1.1095621585845947,
1.2929327487945557,
-2.364954948425293,
0.18373587727546692,
1.9744582176208496,
0.2858371138572693,
0.08463362604379654,
-1.4258389472961426,
-0.5759090781211853,
-0.25131019949913025,
-0.32770219445228577,
-1.2388488054275513,
0.579046905040741,
-0.24436356127262115,
-0.8017579913139343,
-1.4527355432510376,
0.13398759067058563,
-1.183832049369812,
-1.659702181816101,
0.263875812292099,
1.8415544033050537,
2.0648012161254883,
-0.7058205604553223,
1.4531090259552002,
-0.2780679166316986,
0.1746896505355835,
1.227177619934082,
1.1738444566726685,
3.1315791606903076,
1.9406706094741821,
-1.3381813764572144,
0.6461803913116455,
-0.19076889753341675,
-0.4901440739631653,
1.1398054361343384,
-1.218390941619873,
1.2975943088531494,
-0.1577678918838501,
-1.1853934526443481,
-1.191691517829895,
1.0219556093215942,
0.5170896053314209,
0.03574533015489578,
-0.5001433491706848,
1.248339295387268,
0.08350569754838943,
1.2834584712982178,
0.46849361062049866,
-0.34664925932884216,
0.6007205247879028,
-0.4145088493824005,
-0.502549946308136,
1.587336778640747,
0.23245804011821747,
-1.4434406757354736,
-2.314060926437378,
-0.207453653216362,
-0.8574928045272827,
0.061239928007125854,
-0.6154338121414185,
-0.9508365988731384,
1.6231034994125366,
0.3469720780849457,
-1.3087177276611328,
-0.2808378040790558,
-0.3304625153541565,
-0.6023391485214233,
2.6626241207122803,
-1.3548303842544556,
-0.29767540097236633,
-0.9744821786880493,
-0.609261691570282,
1.583113431930542,
-1.2246479988098145,
-0.2471124529838562,
-0.9756850004196167,
-0.5746766328811646,
-1.2219771146774292,
-0.587131917476654,
-0.016086520627141,
-0.934276282787323,
0.7784995436668396,
0.22693540155887604,
-1.1409543752670288,
-0.33884820342063904,
-0.855514407157898,
0.9088883996009827,
-0.12186215817928314,
0.21956263482570648,
1.828315019607544,
0.39026087522506714,
-0.39863109588623047,
0.7359718084335327,
1.119370460510254,
0.6329604983329773,
-0.6585394740104675,
0.16177840530872345,
-0.7405712008476257,
0.2953334152698517,
-1.308976173400879,
0.2999759614467621,
-2.876542806625366,
0.5991459488868713,
-0.07887031883001328,
-0.06160419434309006,
-0.04154098033905029,
-1.2663474082946777,
1.0586217641830444,
2.650092601776123,
-1.1435866355895996,
0.4854237139225006,
0.3358433246612549,
1.1956413984298706,
-1.577401041984558,
0.3446817994117737,
-0.4477865993976593,
2.126826524734497,
0.259790301322937,
1.2501016855239868,
-0.4880006015300751,
-2.3364875316619873,
0.6428224444389343,
-1.2733060121536255,
-1.167966365814209,
0.7412412166595459,
-0.9140681624412537,
0.030568687245249748,
-1.4065462350845337,
-0.2616678774356842,
-0.8050419688224792,
-1.2522108554840088,
0.6821186542510986,
0.1810702383518219,
0.42045292258262634,
-0.5889780521392822,
0.301490843296051,
-2.215771436691284,
-1.388054370880127,
-0.2530578374862671,
-0.9844533205032349,
0.43739399313926697,
-0.3772578239440918,
0.7522885203361511,
-0.15399673581123352,
-0.03194989636540413,
0.3106335699558258,
1.3712726831436157,
3.424180746078491,
0.25290998816490173,
0.37365373969078064,
-0.21132859587669373,
-0.9551642537117004,
1.414727807044983,
0.8669108748435974,
-0.1799183040857315,
-0.5533320903778076,
-1.0801913738250732,
1.234699010848999,
1.9458374977111816,
0.9365826845169067,
0.06658414751291275,
-0.8128722906112671,
-0.7310728430747986,
-0.018556375056505203,
0.17089834809303284,
0.4853336215019226,
0.8717976808547974,
0.03285803645849228,
0.14573289453983307,
1.4338518381118774,
1.2325271368026733,
-0.4145205020904541,
0.304104208946228,
-0.8127986192703247,
-0.42776280641555786,
0.5371214747428894,
0.27538901567459106,
0.01985965482890606,
0.36750903725624084,
-0.9878688454627991,
-0.18943852186203003,
-0.3711000084877014,
-0.9642508625984192,
-0.7515404224395752,
-0.3911917805671692,
-0.3040391206741333,
1.6343951225280762,
0.1278594732284546,
-0.44707173109054565,
-0.056768134236335754,
-0.7223209142684937,
-0.09905097633600235,
-1.0918320417404175,
0.24569174647331238,
-0.02588564343750477,
-0.059314578771591187,
-0.10164136439561844,
1.7991055250167847,
-0.9158304333686829,
-2.113662004470825,
0.27719560265541077,
0.2286423146724701,
-0.33091291785240173,
0.21150065958499908,
1.6509151458740234,
0.520207405090332,
1.4089421033859253,
1.3370003700256348,
0.9587265849113464,
-0.649689793586731,
-1.2658814191818237,
0.68382328748703,
0.9668151140213013,
-1.4297596216201782,
0.8150798082351685,
0.022019075229763985,
-0.541831374168396,
0.6895689964294434,
1.2352880239486694,
0.4320927560329437,
-2.06447172164917,
0.8108863830566406,
-0.9667462110519409,
0.7852201461791992,
0.7454180121421814,
0.720815896987915,
0.19461821019649506,
0.801978588104248,
-1.2702142000198364,
-1.1507031917572021,
-0.8118294477462769,
-0.6471076607704163,
2.025444746017456,
-0.21973392367362976,
0.6056118011474609,
-0.15134146809577942,
-1.378415822982788,
-0.0751737430691719,
0.6679912805557251,
0.29082605242729187,
-0.46042773127555847,
0.8242756724357605,
-0.6806084513664246,
-1.1623040437698364,
-1.3865889310836792,
-0.463182657957077,
-1.1035879850387573,
-0.931538462638855,
1.087243914604187,
0.7717291712760925,
0.2874242961406708,
1.8393406867980957,
0.5738046169281006,
0.2906542718410492,
-2.7625844478607178,
0.9183869957923889,
0.2826249599456787,
-0.08324376493692398,
0.9138835072517395,
0.2859498858451843,
1.0403724908828735,
-0.015222189016640186,
0.5380229949951172,
-2.4400618076324463,
2.270190477371216,
-0.23546040058135986,
0.7250683903694153,
-0.03980350121855736,
-0.09708455204963684,
1.0298867225646973,
0.5691698789596558,
0.5822837948799133,
-1.069862723350525,
0.6677879691123962,
-0.5718070864677429,
1.1574558019638062,
0.8690969944000244,
-0.7705594301223755,
-0.058304958045482635,
1.3549656867980957,
0.470641553401947,
-0.48387041687965393,
-0.8706720471382141,
-0.9139851927757263,
0.9217685461044312,
1.7953639030456543,
-0.10826388746500015,
0.003970595076680183,
0.8404437303543091,
0.6345041990280151,
-1.323279857635498,
0.06650803983211517,
-0.7469552755355835,
-0.7480261325836182,
1.5469123125076294,
2.0933218002319336,
-0.11832237988710403,
-0.17275694012641907,
-0.7100037932395935,
-1.2946847677230835,
0.7018381357192993,
-0.028387000784277916,
0.19138243794441223,
0.6336215138435364,
-0.631848156452179,
1.1167092323303223,
0.8345109224319458,
1.0158028602600098,
0.1530473381280899,
0.22680772840976715,
0.38198474049568176,
-0.3200165331363678,
-1.0946824550628662,
-0.24765971302986145,
-1.0429404973983765,
-2.490067958831787,
0.4844173491001129,
-0.15885815024375916,
-1.412601351737976,
0.040318407118320465,
-0.9898247718811035,
0.9061407446861267,
-0.5638411641120911,
-1.0861852169036865,
-1.529450535774231,
0.22279998660087585,
-0.11610805988311768,
0.9606161713600159,
-1.6935867071151733,
-0.10150200873613358,
1.1401021480560303,
0.9342861771583557,
-0.6035685539245605,
1.0838536024093628,
0.34798872470855713,
1.0085651874542236,
0.8723386526107788,
-0.3914128839969635,
0.5284438133239746,
0.10297726094722748,
-1.2663283348083496,
0.42127689719200134,
1.1389567852020264,
0.22437812387943268,
1.4189777374267578,
-0.5912593007087708,
0.004962512291967869,
0.4122569262981415,
-0.6196878552436829,
-0.4416523277759552,
-0.4675573408603668,
0.6844934225082397,
0.06081177294254303,
-0.9610579609870911,
0.005963732488453388,
-0.15402443706989288,
-0.21481452882289886,
0.17710445821285248,
-1.4796143770217896,
-0.1980341225862503,
-0.3741016983985901,
-0.5865076780319214,
-1.2395246028900146,
-0.11854423582553864,
1.4534746408462524,
-0.8186025023460388,
-0.18101508915424347,
0.5115613341331482,
0.3876579701900482,
0.5569167137145996,
0.6023949980735779,
-0.6520376205444336,
-0.38759151101112366,
-0.15668797492980957,
-0.3273533880710602,
0.3405073285102844,
1.3359856605529785,
-0.10321495682001114,
-0.991694986820221,
0.7365580797195435,
-0.3313320577144623,
0.1001974567770958,
1.905481219291687,
0.13114428520202637,
-0.7822655439376831,
0.2993633449077606,
-0.7321767807006836,
1.8900798559188843,
1.7150871753692627,
1.410662293434143,
-0.09915763139724731,
-0.9896774888038635,
0.6324214339256287,
-0.35598450899124146,
-0.39620351791381836,
0.8145769238471985,
0.44997549057006836,
-0.21920117735862732,
-1.4080177545547485,
0.6498308777809143,
1.2812879085540771,
-0.8791540265083313,
-0.7662900686264038,
0.12415719777345657,
-0.7742565870285034,
1.1453639268875122,
0.6355764865875244,
0.37887442111968994,
0.1293003410100937,
1.6488311290740967,
0.7700762152671814,
-0.5255101323127747,
0.5982223153114319,
0.5083940625190735,
-0.15620538592338562,
-2.1687417030334473,
-1.1003564596176147,
0.3478395938873291,
-0.40414687991142273,
-1.5491454601287842,
1.3633273839950562,
-1.1737853288650513,
-0.9634613990783691,
0.5320719480514526,
0.11642169207334518,
1.4447546005249023,
0.3715931177139282,
1.5946274995803833,
2.1282055377960205,
0.8949146866798401,
0.39107781648635864,
1.3361157178878784,
-0.138702392578125,
-0.43179941177368164,
1.8521032333374023,
-0.39418888092041016,
0.47383570671081543,
1.0880616903305054,
-0.33065876364707947,
-1.0187407732009888,
-0.7698001861572266,
-1.2093020677566528,
-0.7007901668548584,
1.126165509223938,
0.06271640956401825,
-1.1166847944259644,
0.2953210175037384,
1.565261721611023,
0.10676243901252747,
-0.27681225538253784,
0.6013832688331604,
0.40434563159942627,
-0.7490062117576599,
-0.0675748735666275,
-0.9327051043510437,
0.4645809233188629,
-0.2719855308532715,
-0.3262091279029846,
0.35396608710289,
0.48266541957855225,
1.2344317436218262,
0.01170499250292778,
0.054896824061870575,
1.1813650131225586,
-1.436424732208252,
1.4855479001998901,
-0.6258549690246582,
0.2792610228061676,
-2.3616812229156494,
1.3695119619369507,
-0.7932133674621582,
1.9331283569335938,
-2.6517727375030518,
0.42750000953674316,
-0.6918460726737976,
-0.47751304507255554,
0.3012557327747345,
-0.302374929189682,
0.12718266248703003,
-0.19850224256515503,
-1.1543647050857544,
-0.1034555584192276,
-0.7071831226348877,
0.5730754137039185,
1.102777123451233,
1.3255256414413452,
-1.1872612237930298,
-0.27164286375045776,
-1.755068302154541,
-0.13828136026859283,
-0.7063237428665161,
0.3522467017173767,
-1.9852485656738281,
-0.1841922551393509,
-1.9207196235656738,
-2.31191086769104,
-1.321560263633728,
-0.788330078125,
1.093634843826294,
0.12094510346651077,
-0.8930922746658325,
1.1883506774902344,
-0.34697574377059937,
-1.8521665334701538,
1.0722925662994385,
-2.162872076034546
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | Alternatively we could support multiprocessing map for iterable datasets and let the user do the CPU intensive task there ?
This way it would work on arrow data but also on any iterable dataset | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 84 | 34 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
Alternatively we could support multiprocessing map for iterable datasets and let the user do the CPU intensive task there ?
This way it would work on arrow data but also on any iterable dataset | [
-1.2930774688720703,
-0.9910337924957275,
-0.7255672216415405,
1.526046633720398,
-0.1592738926410675,
-1.1472687721252441,
0.11867375671863556,
-0.9848904013633728,
1.6729685068130493,
-0.8105013966560364,
0.3395719826221466,
-1.6655104160308838,
0.06508108973503113,
-0.5228061676025391,
-0.7107124924659729,
-0.9491106271743774,
-0.4547087252140045,
-0.791900634765625,
1.0715265274047852,
2.531301498413086,
1.1022882461547852,
-1.4698786735534668,
2.6521706581115723,
0.6496388912200928,
-0.23496446013450623,
-1.068695068359375,
0.5710049271583557,
0.04989860579371452,
-1.295385718345642,
-0.4114653766155243,
-0.934450626373291,
-0.13204078376293182,
-0.6003163456916809,
-0.4755265712738037,
0.06756755709648132,
0.3655288517475128,
-0.20284011960029602,
-0.4261851906776428,
-0.5503279566764832,
-0.7474364042282104,
0.4600974917411804,
-0.4239271879196167,
0.9883094429969788,
-0.33673328161239624,
1.8194406032562256,
-0.5126718878746033,
0.4717389643192291,
0.7394908666610718,
1.3635950088500977,
0.2536231279373169,
-0.009962059557437897,
0.3433265686035156,
0.37845665216445923,
-0.07169844210147858,
0.4453405737876892,
1.0497548580169678,
0.6198999285697937,
0.4638693928718567,
0.6402627229690552,
-2.2901759147644043,
1.3445756435394287,
-1.0143184661865234,
0.40350839495658875,
1.3674077987670898,
-0.9629518389701843,
0.4389662742614746,
-1.7352043390274048,
-0.03361884877085686,
0.6282488107681274,
-2.21929931640625,
0.23522120714187622,
-1.1931846141815186,
-0.39207080006599426,
1.049081563949585,
0.3455287218093872,
-1.2270663976669312,
0.08376993238925934,
-0.4833696782588959,
1.0874766111373901,
0.4200579822063446,
1.1761376857757568,
-1.6802624464035034,
0.01232377253472805,
-0.32768896222114563,
0.18012459576129913,
-1.356152057647705,
-1.4765123128890991,
0.5845151543617249,
0.7361211776733398,
0.5145769119262695,
-0.05195571482181549,
1.0137240886688232,
-0.9707493185997009,
0.7439748048782349,
-0.9845021963119507,
-1.6402572393417358,
-1.4511570930480957,
-2.2789344787597656,
-2.351189374923706,
0.741820752620697,
-0.43722206354141235,
-0.5808602571487427,
1.986893892288208,
-1.0475194454193115,
-1.7625445127487183,
1.205486536026001,
0.23732209205627441,
0.02302694320678711,
2.401965856552124,
0.14234018325805664,
-0.7021392583847046,
0.4060223698616028,
-0.7643887996673584,
0.7744625210762024,
-0.40406525135040283,
1.3631725311279297,
0.4707067906856537,
-1.0121406316757202,
1.5296483039855957,
-0.3532857596874237,
0.5846549272537231,
-0.6237523555755615,
-0.507544219493866,
-0.8645663857460022,
0.32900556921958923,
1.9135500192642212,
-0.2600003182888031,
1.6035926342010498,
-0.3293086290359497,
-1.5688014030456543,
-1.622093677520752,
0.8877607583999634,
0.48981526494026184,
-0.7424409985542297,
0.09436880052089691,
-0.39105096459388733,
0.20585092902183533,
-0.03828124701976776,
1.024355173110962,
1.2434098720550537,
0.6601664423942566,
-0.3565749526023865,
-0.9343963265419006,
0.23337219655513763,
-0.13113774359226227,
-0.6874110102653503,
-1.790756106376648,
-0.37012454867362976,
0.08061318099498749,
0.6483887434005737,
-1.1810617446899414,
1.6370054483413696,
0.9158561825752258,
1.923478603363037,
1.006871223449707,
-0.3088725209236145,
1.5659505128860474,
0.0944327712059021,
1.8992211818695068,
-0.4953966438770294,
0.6569808721542358,
-0.3660764694213867,
-1.1648427248001099,
0.7678652405738831,
-0.37607747316360474,
-2.0631871223449707,
-0.7716480493545532,
-0.7837415337562561,
-0.1864444613456726,
-0.7864245176315308,
0.8817657232284546,
-0.23227128386497498,
-1.4560614824295044,
0.3326787054538727,
-0.7287933230400085,
0.24102692306041718,
-1.2166428565979004,
0.389731228351593,
0.6732127070426941,
-0.6531140804290771,
0.06476038694381714,
-0.31939464807510376,
-1.2310646772384644,
-0.4653295874595642,
0.22572191059589386,
1.840397834777832,
-0.7602475881576538,
0.9327112436294556,
0.9885808229446411,
-0.6843539476394653,
-0.01228644885122776,
0.23414228856563568,
-0.2867085337638855,
0.8708924055099487,
-1.0748047828674316,
-0.43966877460479736,
1.2647587060928345,
-0.2377106100320816,
-0.5763146877288818,
1.489707589149475,
0.7148811221122742,
-0.9925170540809631,
-0.22275587916374207,
-0.1674497127532959,
-0.7586072087287903,
-0.02226731926202774,
-1.6439045667648315,
-0.08528049290180206,
0.35639116168022156,
-1.5219463109970093,
-0.3901403248310089,
-0.2298111915588379,
1.2265828847885132,
-0.09592112898826599,
1.4364432096481323,
-0.3908967971801758,
-0.17095260322093964,
-0.3800577223300934,
-0.39304009079933167,
0.13045862317085266,
-0.24362923204898834,
-0.5753834843635559,
0.2260695844888687,
-0.788495659828186,
0.43490344285964966,
1.4625005722045898,
0.42233866453170776,
0.028615564107894897,
0.5097441077232361,
1.0656051635742188,
0.32157033681869507,
0.0055047012865543365,
-0.8240604400634766,
-1.5809520483016968,
2.040194034576416,
-1.4600094556808472,
1.960296392440796,
0.788851261138916,
-0.02497214637696743,
-1.7626476287841797,
-1.8075690269470215,
1.348162293434143,
1.1749767065048218,
2.3654966354370117,
0.6160100698471069,
0.37811583280563354,
-0.80389004945755,
-0.6147506237030029,
0.30104589462280273,
-1.0225201845169067,
-0.77564936876297,
0.1909828931093216,
2.3840456008911133,
1.6987348794937134,
-0.4367119073867798,
-0.11256279051303864,
-1.0281654596328735,
1.4271962642669678,
-0.14287959039211273,
0.22840644419193268,
2.052638053894043,
-0.1536729782819748,
-1.1650809049606323,
1.2960436344146729,
-2.361701250076294,
0.1129351258277893,
2.012018918991089,
0.3254142105579376,
0.05919339880347252,
-1.4488837718963623,
-0.6168540120124817,
-0.2833850085735321,
-0.27499574422836304,
-1.2531206607818604,
0.5676730871200562,
-0.2684960663318634,
-0.6991747617721558,
-1.440418004989624,
0.1323365420103073,
-1.1202574968338013,
-1.6204636096954346,
0.22160370647907257,
1.7812809944152832,
2.0823922157287598,
-0.7237727046012878,
1.4678953886032104,
-0.24482694268226624,
0.2167702168226242,
1.2209643125534058,
1.1545157432556152,
3.140123128890991,
1.935776710510254,
-1.3310706615447998,
0.629676878452301,
-0.17931896448135376,
-0.5021666884422302,
1.1930394172668457,
-1.2446528673171997,
1.3112210035324097,
-0.15860460698604584,
-1.2113312482833862,
-1.2396711111068726,
1.0209922790527344,
0.5254942178726196,
0.06272456049919128,
-0.5660156011581421,
1.27672278881073,
0.040045835077762604,
1.2991678714752197,
0.42405733466148376,
-0.32077139616012573,
0.5513489842414856,
-0.47378674149513245,
-0.5297950506210327,
1.6188604831695557,
0.23911575973033905,
-1.4423315525054932,
-2.3410086631774902,
-0.2327175885438919,
-0.8020101189613342,
0.014073986560106277,
-0.6279310584068298,
-0.9726104736328125,
1.6289888620376587,
0.3463333547115326,
-1.3240300416946411,
-0.27304500341415405,
-0.34767717123031616,
-0.6752409934997559,
2.6799428462982178,
-1.3489885330200195,
-0.2834582030773163,
-0.9338479042053223,
-0.6558524370193481,
1.5719430446624756,
-1.2349926233291626,
-0.23684236407279968,
-0.9890813827514648,
-0.6140770316123962,
-1.2272800207138062,
-0.576854944229126,
-0.024334849789738655,
-0.9851702451705933,
0.7748692035675049,
0.2407861351966858,
-1.1570388078689575,
-0.31397342681884766,
-0.8640381693840027,
0.8454260230064392,
-0.100918710231781,
0.2871762216091156,
1.7671948671340942,
0.4229657053947449,
-0.3790840208530426,
0.7442975044250488,
1.102878212928772,
0.6513255834579468,
-0.7196144461631775,
0.12314125895500183,
-0.7502858638763428,
0.27076518535614014,
-1.237943172454834,
0.30798375606536865,
-2.8877370357513428,
0.58281010389328,
-0.05358994007110596,
-0.0669718012213707,
-0.05362461507320404,
-1.1891674995422363,
1.052927017211914,
2.6674258708953857,
-1.1740853786468506,
0.5271244049072266,
0.3193208575248718,
1.1921660900115967,
-1.6438852548599243,
0.3471718728542328,
-0.4488164484500885,
2.1341099739074707,
0.24981394410133362,
1.2586510181427002,
-0.48265695571899414,
-2.3667304515838623,
0.6082497239112854,
-1.2770730257034302,
-1.2078219652175903,
0.7916728258132935,
-0.9498676657676697,
0.035597190260887146,
-1.4070088863372803,
-0.29076841473579407,
-0.7568012475967407,
-1.274815320968628,
0.7188501358032227,
0.16160140931606293,
0.4467441737651825,
-0.5635237097740173,
0.3039185106754303,
-2.287262201309204,
-1.4248669147491455,
-0.25915247201919556,
-1.0334949493408203,
0.4355478584766388,
-0.4345835745334625,
0.759774923324585,
-0.16618774831295013,
-0.034098491072654724,
0.29807013273239136,
1.3889769315719604,
3.4139039516448975,
0.2949731945991516,
0.4229580760002136,
-0.13457146286964417,
-0.9419277906417847,
1.4454820156097412,
0.8557095527648926,
-0.1909368634223938,
-0.5216339230537415,
-1.0524139404296875,
1.2376105785369873,
1.9210280179977417,
0.9426424503326416,
0.02670912817120552,
-0.8191927075386047,
-0.6969789266586304,
-0.06199706345796585,
0.12399156391620636,
0.4747147858142853,
0.7903788685798645,
0.020803840830922127,
0.18588508665561676,
1.456375241279602,
1.2279995679855347,
-0.42966118454933167,
0.2954760193824768,
-0.7950198650360107,
-0.483185738325119,
0.5987979769706726,
0.27356112003326416,
-0.010135730728507042,
0.38537266850471497,
-0.9573333859443665,
-0.14243440330028534,
-0.3754822015762329,
-0.9835625290870667,
-0.7318801879882812,
-0.45597898960113525,
-0.31868597865104675,
1.6740347146987915,
0.10208341479301453,
-0.467713326215744,
-0.0735289454460144,
-0.7298303246498108,
-0.11587141454219818,
-1.1170793771743774,
0.26459717750549316,
-0.04690834507346153,
-0.07980187237262726,
-0.11732330918312073,
1.8044466972351074,
-0.9552077054977417,
-2.1433444023132324,
0.27748429775238037,
0.29086458683013916,
-0.32231763005256653,
0.17426005005836487,
1.6338448524475098,
0.4547278881072998,
1.4352697134017944,
1.3643195629119873,
0.9815254211425781,
-0.7363826036453247,
-1.3102178573608398,
0.6741345524787903,
0.9872018098831177,
-1.4031341075897217,
0.8164342641830444,
-0.011458907276391983,
-0.5313072204589844,
0.6439864039421082,
1.2547508478164673,
0.4716216027736664,
-1.99728262424469,
0.8017718195915222,
-1.0156322717666626,
0.767298698425293,
0.7601969838142395,
0.7459880113601685,
0.12662237882614136,
0.7800317406654358,
-1.2731528282165527,
-1.1415044069290161,
-0.8301863074302673,
-0.6825448274612427,
1.989058256149292,
-0.23815137147903442,
0.6318686604499817,
-0.13995157182216644,
-1.3600369691848755,
-0.027686597779393196,
0.6635292768478394,
0.32070687413215637,
-0.3543866276741028,
0.8205983638763428,
-0.6767684817314148,
-1.1801860332489014,
-1.4178882837295532,
-0.4294646680355072,
-1.115405559539795,
-0.9507089257240295,
1.106720209121704,
0.7396358251571655,
0.2075258195400238,
1.7575961351394653,
0.6080195307731628,
0.27610060572624207,
-2.7628042697906494,
0.9110861420631409,
0.23478169739246368,
-0.03988470509648323,
0.8833088278770447,
0.28160253167152405,
1.0421142578125,
0.013841908425092697,
0.5343492031097412,
-2.4315590858459473,
2.287170886993408,
-0.260916531085968,
0.6966690421104431,
-0.07056844979524612,
-0.12277495861053467,
1.0144778490066528,
0.576695442199707,
0.5627720952033997,
-1.0617122650146484,
0.7014721035957336,
-0.5653098821640015,
1.1515201330184937,
0.8644174933433533,
-0.7968952059745789,
-0.0837172120809555,
1.3193943500518799,
0.42515790462493896,
-0.4746894836425781,
-0.896116316318512,
-0.8969864845275879,
0.9474251866340637,
1.7694740295410156,
-0.10265569388866425,
-0.0005259988829493523,
0.8515163660049438,
0.609503984451294,
-1.2852591276168823,
0.05187093839049339,
-0.7288703322410583,
-0.770231306552887,
1.576651930809021,
2.0829336643218994,
-0.0768839567899704,
-0.17428886890411377,
-0.6908012628555298,
-1.2461310625076294,
0.6861605644226074,
0.029059380292892456,
0.12314286828041077,
0.6162369251251221,
-0.6239660978317261,
1.095564603805542,
0.8802667856216431,
1.012178897857666,
0.18935491144657135,
0.1827697455883026,
0.3888562321662903,
-0.270637184381485,
-1.1254993677139282,
-0.22571684420108795,
-1.0384891033172607,
-2.4717228412628174,
0.4297587275505066,
-0.18764612078666687,
-1.407437801361084,
0.01751299574971199,
-0.9562450647354126,
0.9599771499633789,
-0.5792968273162842,
-1.0713711977005005,
-1.569257378578186,
0.20232760906219482,
-0.13654661178588867,
0.9671232104301453,
-1.6790188550949097,
-0.10551068186759949,
1.1327955722808838,
0.9240149855613708,
-0.6086207628250122,
1.125603199005127,
0.29728445410728455,
0.9518207311630249,
0.8829940557479858,
-0.39604777097702026,
0.5711581707000732,
0.1532244235277176,
-1.2593553066253662,
0.4613149166107178,
1.1012786626815796,
0.2108028382062912,
1.4655640125274658,
-0.5934737324714661,
-0.061851322650909424,
0.35376715660095215,
-0.605008602142334,
-0.4033118486404419,
-0.5322730541229248,
0.7388741970062256,
0.11675916612148285,
-0.9118763208389282,
0.08166171610355377,
-0.14265072345733643,
-0.17277175188064575,
0.23266951739788055,
-1.5120346546173096,
-0.1730816513299942,
-0.3608590066432953,
-0.5851912498474121,
-1.2231131792068481,
-0.10356160998344421,
1.4865440130233765,
-0.8557729125022888,
-0.14498905837535858,
0.4978857636451721,
0.42374640703201294,
0.5568091869354248,
0.5937926769256592,
-0.6480453610420227,
-0.32894179224967957,
-0.1989959329366684,
-0.30170324444770813,
0.32825183868408203,
1.2616137266159058,
-0.09420301020145416,
-0.99759840965271,
0.8122612833976746,
-0.29586878418922424,
0.08303219079971313,
1.844588041305542,
0.16473768651485443,
-0.806983232498169,
0.29462286829948425,
-0.7413041591644287,
1.9108840227127075,
1.6851654052734375,
1.4630407094955444,
-0.10055528581142426,
-1.0129327774047852,
0.6272355318069458,
-0.34681862592697144,
-0.38214781880378723,
0.8169400095939636,
0.4868440330028534,
-0.20561079680919647,
-1.4018423557281494,
0.7029974460601807,
1.2579069137573242,
-0.8398457169532776,
-0.8117627501487732,
0.16286836564540863,
-0.7474147081375122,
1.1326431035995483,
0.6561586260795593,
0.4146479666233063,
0.16242778301239014,
1.710874319076538,
0.7541044354438782,
-0.534686267375946,
0.5891749262809753,
0.5028817057609558,
-0.16792993247509003,
-2.0744822025299072,
-1.093444585800171,
0.3938409388065338,
-0.404388427734375,
-1.505427360534668,
1.320277214050293,
-1.1448944807052612,
-0.9208765625953674,
0.5774433016777039,
0.057341333478689194,
1.485835313796997,
0.33791765570640564,
1.591912865638733,
2.1153929233551025,
0.9122086763381958,
0.3651886284351349,
1.324361801147461,
-0.19911766052246094,
-0.42300713062286377,
1.8480074405670166,
-0.34661704301834106,
0.44074058532714844,
1.109185814857483,
-0.3451037108898163,
-1.0110822916030884,
-0.7493659853935242,
-1.2082254886627197,
-0.6475350856781006,
1.0813708305358887,
0.09574152529239655,
-1.1450047492980957,
0.24510571360588074,
1.5943657159805298,
0.10523417592048645,
-0.2410029023885727,
0.5999443531036377,
0.4206612706184387,
-0.8171091675758362,
-0.027675876393914223,
-0.9520863890647888,
0.43619173765182495,
-0.2990812659263611,
-0.27198806405067444,
0.31657853722572327,
0.5011279582977295,
1.246690273284912,
0.03849863260984421,
0.05248814448714256,
1.175575852394104,
-1.369659423828125,
1.4436761140823364,
-0.615806519985199,
0.26130354404449463,
-2.305914878845215,
1.3375749588012695,
-0.7821255326271057,
1.9047420024871826,
-2.6711370944976807,
0.44560685753822327,
-0.7517940998077393,
-0.49593067169189453,
0.34934020042419434,
-0.3893977701663971,
0.13458240032196045,
-0.201597198843956,
-1.130407691001892,
-0.09698627889156342,
-0.7501111030578613,
0.5823181867599487,
1.1205428838729858,
1.2982311248779297,
-1.1725047826766968,
-0.2847469747066498,
-1.746186375617981,
-0.13570255041122437,
-0.6719304919242859,
0.39940664172172546,
-1.9728522300720215,
-0.18396911025047302,
-1.9289636611938477,
-2.296358585357666,
-1.3072367906570435,
-0.7521356344223022,
1.0977725982666016,
0.11631636321544647,
-0.9202346801757812,
1.1790448427200317,
-0.33403313159942627,
-1.806668758392334,
1.13107430934906,
-2.114612340927124
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
>
> @lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
>
> PS: I don't expect significant speed-up for local, uncompressed Arrow files.
Could you explain why you'd need to change the arrow format?
When we use streaming datasets we simply determine the number of worker shards and then add some modulo logic at the appropriate place. Worst case scenario, you'd skip streaming entries according to the number of shards.
For PyTorch, I'd be happy to provide an implementation or a sketch thereof, if you point me toward what the testing requirements would be for such a PR. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 84 | 166 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> For this to be possible, we would have to switch from the "Streaming" Arrow format to the "Random Access" (IPC/Feather) format, which allows reading arbitrary record batches (explained [here](https://arrow.apache.org/docs/python/ipc.html)). We could then use these batches to construct shards.
>
> @lhoestq @albertvillanova Do you think this use case is worth the switch? Also, we currently shard files, not inner row groups/chunks. Should we also support sharding row groups (e.g. if the number of input files is 1)?
>
> PS: I don't expect significant speed-up for local, uncompressed Arrow files.
Could you explain why you'd need to change the arrow format?
When we use streaming datasets we simply determine the number of worker shards and then add some modulo logic at the appropriate place. Worst case scenario, you'd skip streaming entries according to the number of shards.
For PyTorch, I'd be happy to provide an implementation or a sketch thereof, if you point me toward what the testing requirements would be for such a PR. | [
-1.260818600654602,
-0.9999709725379944,
-0.7243804931640625,
1.4688150882720947,
-0.18056587874889374,
-1.1385947465896606,
0.12061722576618195,
-1.045296549797058,
1.6740645170211792,
-0.7648347020149231,
0.31842389702796936,
-1.6494494676589966,
0.04562801867723465,
-0.5448074340820312,
-0.7384002804756165,
-0.8489407300949097,
-0.45446550846099854,
-0.7997099757194519,
1.039903998374939,
2.5114121437072754,
1.155630350112915,
-1.4083404541015625,
2.6742799282073975,
0.6859226226806641,
-0.24656111001968384,
-1.0662838220596313,
0.5698586702346802,
0.0070672594010829926,
-1.3036668300628662,
-0.449540376663208,
-0.9771504998207092,
-0.0777381882071495,
-0.5924034714698792,
-0.472901850938797,
0.03451511263847351,
0.36440855264663696,
-0.2273135483264923,
-0.41280612349510193,
-0.6140519380569458,
-0.7091861367225647,
0.4792615473270416,
-0.45619043707847595,
0.991713285446167,
-0.3034426271915436,
1.7764153480529785,
-0.5454692840576172,
0.5279242396354675,
0.739665150642395,
1.388851523399353,
0.22274573147296906,
-0.012013373896479607,
0.3658152222633362,
0.4270319640636444,
-0.019789591431617737,
0.47936704754829407,
1.0945770740509033,
0.6330554485321045,
0.4654199182987213,
0.673772931098938,
-2.314037561416626,
1.3145792484283447,
-0.9926092028617859,
0.3731756806373596,
1.2749457359313965,
-0.8936255574226379,
0.45107221603393555,
-1.7943843603134155,
-0.022069863975048065,
0.6551764607429504,
-2.2640628814697266,
0.2186463326215744,
-1.2650951147079468,
-0.4199564456939697,
1.0087010860443115,
0.3529736399650574,
-1.2336490154266357,
0.10891460627317429,
-0.5001076459884644,
1.0480116605758667,
0.4199783205986023,
1.1516302824020386,
-1.661885380744934,
-0.02004319801926613,
-0.3074023425579071,
0.1790628880262375,
-1.2464611530303955,
-1.5004920959472656,
0.6130410432815552,
0.6943919062614441,
0.4949876666069031,
-0.0902843326330185,
1.0241105556488037,
-0.9807808995246887,
0.7714435458183289,
-0.9603301882743835,
-1.7069547176361084,
-1.4697121381759644,
-2.234262704849243,
-2.2658958435058594,
0.7085429430007935,
-0.4565499424934387,
-0.5413526892662048,
2.025986909866333,
-1.0438592433929443,
-1.7717068195343018,
1.1818586587905884,
0.2533552348613739,
0.05594310909509659,
2.396977186203003,
0.14839619398117065,
-0.6736123561859131,
0.43505752086639404,
-0.7647318243980408,
0.7617116570472717,
-0.41289961338043213,
1.3880189657211304,
0.375823974609375,
-0.9668200612068176,
1.5921095609664917,
-0.3743836581707001,
0.5664605498313904,
-0.6306643486022949,
-0.4947507381439209,
-0.7965326309204102,
0.3161699175834656,
1.9533601999282837,
-0.3245449960231781,
1.550309419631958,
-0.38349881768226624,
-1.5689743757247925,
-1.618754267692566,
0.8454731702804565,
0.5124088525772095,
-0.7836995124816895,
0.07950419187545776,
-0.4439825415611267,
0.19405701756477356,
-0.05148763954639435,
1.0613082647323608,
1.282967209815979,
0.7214776277542114,
-0.33918190002441406,
-0.9336099624633789,
0.194051131606102,
-0.12714393436908722,
-0.7157222032546997,
-1.8181039094924927,
-0.33836665749549866,
0.11614416539669037,
0.6673920750617981,
-1.1502724885940552,
1.6624048948287964,
0.9609385132789612,
1.9541058540344238,
1.0310144424438477,
-0.3489454686641693,
1.546406865119934,
0.11016388982534409,
1.8598016500473022,
-0.5371541380882263,
0.6399747729301453,
-0.4207454323768616,
-1.1472104787826538,
0.76714688539505,
-0.33071956038475037,
-2.047435998916626,
-0.7120037078857422,
-0.7899081707000732,
-0.25544309616088867,
-0.7807421684265137,
0.8721970319747925,
-0.2484450787305832,
-1.3742069005966187,
0.3010709583759308,
-0.7510203719139099,
0.1588110625743866,
-1.2134917974472046,
0.3751627504825592,
0.6932748556137085,
-0.6429767608642578,
0.08743081241846085,
-0.29396605491638184,
-1.2900915145874023,
-0.4718877077102661,
0.2291107326745987,
1.8464035987854004,
-0.750532865524292,
0.894220232963562,
0.9914147853851318,
-0.6757680773735046,
-0.018156347796320915,
0.3213960528373718,
-0.29574185609817505,
0.8116149306297302,
-1.051692008972168,
-0.431131511926651,
1.2232959270477295,
-0.22595034539699554,
-0.5787457227706909,
1.4393690824508667,
0.684725821018219,
-0.9904897809028625,
-0.284670889377594,
-0.11872851103544235,
-0.758781909942627,
-0.006923967972397804,
-1.6787831783294678,
-0.13665105402469635,
0.36963221430778503,
-1.5533812046051025,
-0.44249072670936584,
-0.22862030565738678,
1.2521253824234009,
-0.04955614358186722,
1.441144585609436,
-0.33949074149131775,
-0.11102896928787231,
-0.36778271198272705,
-0.3867126405239105,
0.12592944502830505,
-0.23812761902809143,
-0.5473983883857727,
0.23079423606395721,
-0.8219730257987976,
0.39354977011680603,
1.504886269569397,
0.3662346601486206,
0.015123151242733002,
0.5069953799247742,
1.0286633968353271,
0.3997749984264374,
-0.035507675260305405,
-0.8406960368156433,
-1.5801019668579102,
2.033205986022949,
-1.4763988256454468,
1.968477725982666,
0.812000572681427,
-0.02759501338005066,
-1.8111048936843872,
-1.872337818145752,
1.3076764345169067,
1.1247169971466064,
2.366426944732666,
0.5990021228790283,
0.39334192872047424,
-0.7554206252098083,
-0.6044146418571472,
0.34281259775161743,
-1.0032238960266113,
-0.7824716567993164,
0.14123661816120148,
2.404853105545044,
1.7386447191238403,
-0.49840694665908813,
-0.14303714036941528,
-1.003257393836975,
1.3937963247299194,
-0.12137362360954285,
0.26207903027534485,
2.028961420059204,
-0.18194493651390076,
-1.0965118408203125,
1.302711009979248,
-2.3564910888671875,
0.18310563266277313,
1.9587388038635254,
0.28095802664756775,
0.10361872613430023,
-1.411098837852478,
-0.5844131708145142,
-0.25585034489631653,
-0.33257004618644714,
-1.2333112955093384,
0.569449245929718,
-0.23593811690807343,
-0.8077508807182312,
-1.4578067064285278,
0.13056549429893494,
-1.1470166444778442,
-1.6513019800186157,
0.2586090564727783,
1.866724967956543,
2.07271671295166,
-0.7218819856643677,
1.4678447246551514,
-0.30604153871536255,
0.1642341911792755,
1.2293148040771484,
1.1828866004943848,
3.146937608718872,
1.9520453214645386,
-1.3358107805252075,
0.6374249458312988,
-0.19844277203083038,
-0.4901128113269806,
1.1558183431625366,
-1.2098740339279175,
1.2901748418807983,
-0.15048368275165558,
-1.196677565574646,
-1.1967889070510864,
1.011631727218628,
0.5150815844535828,
0.04666488617658615,
-0.4968768358230591,
1.2487900257110596,
0.08358585089445114,
1.2977269887924194,
0.47643786668777466,
-0.35159364342689514,
0.6032599210739136,
-0.3972773551940918,
-0.4919280707836151,
1.5801044702529907,
0.23093202710151672,
-1.4670753479003906,
-2.3230648040771484,
-0.20336514711380005,
-0.8605449795722961,
0.07152832299470901,
-0.6199058294296265,
-0.9713344573974609,
1.6123332977294922,
0.32746702432632446,
-1.2811211347579956,
-0.2874116897583008,
-0.3398527204990387,
-0.599224328994751,
2.6477272510528564,
-1.345583438873291,
-0.2918992340564728,
-0.9757261872291565,
-0.6034088730812073,
1.6023401021957397,
-1.2342422008514404,
-0.2515428066253662,
-0.9921280741691589,
-0.5692330002784729,
-1.213822841644287,
-0.5665138959884644,
-0.014773892238736153,
-0.9416487812995911,
0.7832350134849548,
0.2547960877418518,
-1.1482850313186646,
-0.32767900824546814,
-0.8556607365608215,
0.9009318947792053,
-0.11187590658664703,
0.23029141128063202,
1.8507022857666016,
0.39160168170928955,
-0.41495171189308167,
0.7485992312431335,
1.1185537576675415,
0.615428626537323,
-0.6600279211997986,
0.13765758275985718,
-0.7304750680923462,
0.32533782720565796,
-1.3274333477020264,
0.28476443886756897,
-2.872828960418701,
0.6169521808624268,
-0.06709486246109009,
-0.05844876170158386,
-0.018651723861694336,
-1.281193733215332,
1.0461636781692505,
2.669518232345581,
-1.1509230136871338,
0.5052604675292969,
0.32812005281448364,
1.2043356895446777,
-1.5766479969024658,
0.33663976192474365,
-0.46482595801353455,
2.1379401683807373,
0.23868566751480103,
1.2412692308425903,
-0.47363290190696716,
-2.349410057067871,
0.6477975249290466,
-1.244802474975586,
-1.183387041091919,
0.7408203482627869,
-0.9275986552238464,
0.007454045116901398,
-1.4277418851852417,
-0.2520945072174072,
-0.8172873258590698,
-1.2444795370101929,
0.7026045918464661,
0.15340828895568848,
0.42641642689704895,
-0.60296231508255,
0.2889735698699951,
-2.230482578277588,
-1.3865152597427368,
-0.2605706751346588,
-0.9774684309959412,
0.4445751905441284,
-0.37835395336151123,
0.7549962997436523,
-0.16261091828346252,
-0.02665994130074978,
0.3162817060947418,
1.378293752670288,
3.4018948078155518,
0.2530774176120758,
0.36289799213409424,
-0.21710819005966187,
-0.9551138877868652,
1.4007532596588135,
0.8762432336807251,
-0.19914154708385468,
-0.5606024861335754,
-1.0564420223236084,
1.2301632165908813,
1.9566466808319092,
0.9297263026237488,
0.06823191791772842,
-0.8261268138885498,
-0.7220355868339539,
-0.007996516302227974,
0.1740322709083557,
0.4879780411720276,
0.891625702381134,
0.023882301524281502,
0.1478271186351776,
1.4145948886871338,
1.2401511669158936,
-0.4016714096069336,
0.3159829080104828,
-0.81084805727005,
-0.43089860677719116,
0.5534547567367554,
0.2999413013458252,
0.021633680909872055,
0.35017380118370056,
-0.9834660291671753,
-0.1793479323387146,
-0.35716935992240906,
-0.9526428580284119,
-0.7574057579040527,
-0.3839126527309418,
-0.28932395577430725,
1.6405185461044312,
0.14227347075939178,
-0.43655431270599365,
-0.03849618881940842,
-0.7285767197608948,
-0.08707089722156525,
-1.081233024597168,
0.23408925533294678,
-0.03459932655096054,
-0.08407685160636902,
-0.09966520965099335,
1.770684838294983,
-0.9186625480651855,
-2.1082189083099365,
0.29798269271850586,
0.23924505710601807,
-0.33982303738594055,
0.22572512924671173,
1.6746783256530762,
0.525443434715271,
1.4258900880813599,
1.3485196828842163,
0.9536951184272766,
-0.6526764035224915,
-1.239427924156189,
0.6788813471794128,
0.9718892574310303,
-1.4081976413726807,
0.8178297877311707,
0.03428657352924347,
-0.5518964529037476,
0.6777153611183167,
1.2367892265319824,
0.4462892413139343,
-2.0533037185668945,
0.8321239352226257,
-0.9804097414016724,
0.7906190752983093,
0.744604229927063,
0.7585394978523254,
0.2039593756198883,
0.803667426109314,
-1.2433143854141235,
-1.150173306465149,
-0.817507803440094,
-0.6662002205848694,
2.0148260593414307,
-0.23316363990306854,
0.5876097083091736,
-0.1335727572441101,
-1.3825955390930176,
-0.08323757350444794,
0.6739440560340881,
0.29886165261268616,
-0.44820019602775574,
0.828467845916748,
-0.6840775012969971,
-1.165639877319336,
-1.363003134727478,
-0.47065117955207825,
-1.0827245712280273,
-0.9351251125335693,
1.0849554538726807,
0.7726333141326904,
0.2874986529350281,
1.8328834772109985,
0.5724979639053345,
0.28234052658081055,
-2.770880937576294,
0.9282892346382141,
0.28970667719841003,
-0.10132236778736115,
0.9109380841255188,
0.31313657760620117,
1.0361075401306152,
-0.029606062918901443,
0.5401083827018738,
-2.4244132041931152,
2.2503864765167236,
-0.22773262858390808,
0.7322708964347839,
-0.034681662917137146,
-0.0985458716750145,
1.0045900344848633,
0.5454294085502625,
0.5670772194862366,
-1.0479958057403564,
0.677115797996521,
-0.5787795186042786,
1.1732958555221558,
0.8717055320739746,
-0.7616943717002869,
-0.04078371077775955,
1.3520197868347168,
0.46457532048225403,
-0.5068143606185913,
-0.8755650520324707,
-0.903173565864563,
0.9220723509788513,
1.8158090114593506,
-0.11537323147058487,
0.0010329065844416618,
0.8147028684616089,
0.6228355169296265,
-1.3200072050094604,
0.05898655951023102,
-0.7596878409385681,
-0.7383471727371216,
1.5488231182098389,
2.0689172744750977,
-0.09691637754440308,
-0.1740342527627945,
-0.7131085991859436,
-1.2980427742004395,
0.6896498799324036,
-0.022786207497119904,
0.1795525997877121,
0.6229796409606934,
-0.6220977306365967,
1.114164113998413,
0.828274667263031,
1.0150834321975708,
0.16417622566223145,
0.25374314188957214,
0.3957529366016388,
-0.3249296545982361,
-1.0856070518493652,
-0.2571455240249634,
-1.0554673671722412,
-2.485410451889038,
0.5006701350212097,
-0.167161762714386,
-1.42454993724823,
0.02770894579589367,
-0.9715230464935303,
0.9219783544540405,
-0.5642231106758118,
-1.0925337076187134,
-1.5276718139648438,
0.21127983927726746,
-0.11932127922773361,
0.9458580613136292,
-1.6731890439987183,
-0.0999445915222168,
1.1300981044769287,
0.953014612197876,
-0.6272285580635071,
1.084038257598877,
0.34833306074142456,
1.022860050201416,
0.8840141296386719,
-0.41429781913757324,
0.5215672254562378,
0.08720686286687851,
-1.2581387758255005,
0.4191141426563263,
1.1369924545288086,
0.22915087640285492,
1.4228299856185913,
-0.5955135226249695,
-0.028896862640976906,
0.4091036319732666,
-0.5934630632400513,
-0.43094485998153687,
-0.4729766845703125,
0.6825574636459351,
0.06523080170154572,
-0.951208770275116,
0.0057672178372740746,
-0.15102382004261017,
-0.2099958062171936,
0.18060548603534698,
-1.4876723289489746,
-0.1902187019586563,
-0.3790978491306305,
-0.5915700197219849,
-1.2291803359985352,
-0.10506045818328857,
1.4715064764022827,
-0.8274440765380859,
-0.19280506670475006,
0.5032821297645569,
0.385239839553833,
0.529854416847229,
0.5859982371330261,
-0.6523811221122742,
-0.3761862516403198,
-0.16891682147979736,
-0.32917550206184387,
0.3194810450077057,
1.3389158248901367,
-0.08985161036252975,
-0.9913090467453003,
0.7336086630821228,
-0.34014374017715454,
0.098561130464077,
1.8926451206207275,
0.12528268992900848,
-0.7824801802635193,
0.2773889899253845,
-0.724367618560791,
1.8732506036758423,
1.7005634307861328,
1.3997063636779785,
-0.09907486289739609,
-0.9895552396774292,
0.6526139974594116,
-0.35304129123687744,
-0.39183399081230164,
0.8137869834899902,
0.44924625754356384,
-0.22604158520698547,
-1.4142106771469116,
0.662635087966919,
1.2682689428329468,
-0.8880906701087952,
-0.7708650827407837,
0.11324605345726013,
-0.7797102928161621,
1.1515039205551147,
0.657620370388031,
0.3645457327365875,
0.13256974518299103,
1.668243646621704,
0.78025221824646,
-0.5237590074539185,
0.6117339730262756,
0.4990229606628418,
-0.17432646453380585,
-2.168769121170044,
-1.1012794971466064,
0.33005860447883606,
-0.3849595785140991,
-1.5377870798110962,
1.3686773777008057,
-1.1931602954864502,
-0.9640105962753296,
0.5066397190093994,
0.1207963079214096,
1.4283571243286133,
0.3710758686065674,
1.5900273323059082,
2.136333703994751,
0.9038100838661194,
0.39563652873039246,
1.3367997407913208,
-0.1492471694946289,
-0.4368266761302948,
1.836290955543518,
-0.38682350516319275,
0.48936694860458374,
1.0976307392120361,
-0.35214775800704956,
-1.018471360206604,
-0.7618213891983032,
-1.2193851470947266,
-0.7141051292419434,
1.1442127227783203,
0.0682012289762497,
-1.1098929643630981,
0.29772746562957764,
1.573046326637268,
0.11121058464050293,
-0.28834664821624756,
0.6166878938674927,
0.40509921312332153,
-0.7632168531417847,
-0.0674896389245987,
-0.9347640872001648,
0.4677064120769501,
-0.2880738377571106,
-0.33772629499435425,
0.3433345556259155,
0.4819052219390869,
1.2417463064193726,
-0.0008063875138759613,
0.053243331611156464,
1.1746221780776978,
-1.414523959159851,
1.4819530248641968,
-0.6319259405136108,
0.2715928554534912,
-2.3770275115966797,
1.392316222190857,
-0.7916718125343323,
1.9436396360397339,
-2.6432509422302246,
0.4373394548892975,
-0.6951456069946289,
-0.4704330861568451,
0.3058207333087921,
-0.2959640622138977,
0.13521422445774078,
-0.18895745277404785,
-1.15896737575531,
-0.08369241654872894,
-0.6942945122718811,
0.58803790807724,
1.0965834856033325,
1.3080230951309204,
-1.18832266330719,
-0.24919988214969635,
-1.756574273109436,
-0.15194721519947052,
-0.7193198204040527,
0.33873236179351807,
-1.9828063249588013,
-0.18873897194862366,
-1.9259955883026123,
-2.3101961612701416,
-1.3127797842025757,
-0.7845966815948486,
1.0861589908599854,
0.1102311909198761,
-0.8910503387451172,
1.2080258131027222,
-0.35114002227783203,
-1.847861647605896,
1.0737276077270508,
-2.1625146865844727
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > Could you explain why you'd need to change the arrow format?
This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 84 | 60 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> Could you explain why you'd need to change the arrow format?
This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file. | [
-1.276227593421936,
-0.99857097864151,
-0.7925878763198853,
1.5177205801010132,
-0.15580245852470398,
-1.1787209510803223,
0.09802591800689697,
-0.994713544845581,
1.717312216758728,
-0.8311251401901245,
0.30623769760131836,
-1.661065697669983,
0.06183387339115143,
-0.5193572640419006,
-0.7058320045471191,
-0.9280915260314941,
-0.43616366386413574,
-0.7962385416030884,
1.0662785768508911,
2.526252031326294,
1.09821617603302,
-1.4451179504394531,
2.6702828407287598,
0.6623409390449524,
-0.23099789023399353,
-1.0698847770690918,
0.5582494735717773,
0.0603424534201622,
-1.2482752799987793,
-0.4493335783481598,
-0.9423356652259827,
-0.07662338018417358,
-0.5966017842292786,
-0.4904247224330902,
0.04473911598324776,
0.35581067204475403,
-0.27630582451820374,
-0.4359027147293091,
-0.5776807069778442,
-0.7657930850982666,
0.4616449773311615,
-0.42734724283218384,
0.9672607183456421,
-0.3278762698173523,
1.8170756101608276,
-0.4966118633747101,
0.462746798992157,
0.7646147012710571,
1.3805935382843018,
0.21244502067565918,
-0.007711196783930063,
0.343503475189209,
0.4020906686782837,
-0.05586972087621689,
0.44777703285217285,
1.0752676725387573,
0.5994452238082886,
0.4694567918777466,
0.6552478075027466,
-2.311864137649536,
1.3614394664764404,
-0.9984195232391357,
0.4024634063243866,
1.3147152662277222,
-0.9781668186187744,
0.4553523063659668,
-1.7565603256225586,
-0.02594393491744995,
0.6281242966651917,
-2.25077486038208,
0.2381359040737152,
-1.2230745553970337,
-0.41743090748786926,
1.0248442888259888,
0.35249555110931396,
-1.2142410278320312,
0.10339484363794327,
-0.5066709518432617,
1.1145848035812378,
0.4332374036312103,
1.166869878768921,
-1.6811200380325317,
-0.0014541386626660824,
-0.29717203974723816,
0.13153713941574097,
-1.3163295984268188,
-1.4589885473251343,
0.5848990082740784,
0.7119478583335876,
0.5014024972915649,
-0.04429570212960243,
1.015012264251709,
-0.9496602416038513,
0.7414096593856812,
-0.9695073962211609,
-1.6734031438827515,
-1.4440217018127441,
-2.2616143226623535,
-2.319789171218872,
0.7346611022949219,
-0.41181865334510803,
-0.5653718113899231,
2.015824794769287,
-1.0351208448410034,
-1.7968716621398926,
1.2181588411331177,
0.25385451316833496,
0.019626108929514885,
2.382322311401367,
0.17612364888191223,
-0.6997431516647339,
0.39880603551864624,
-0.7629105448722839,
0.7893187403678894,
-0.450263112783432,
1.3895140886306763,
0.44409269094467163,
-1.0173752307891846,
1.5620932579040527,
-0.375449538230896,
0.5936421155929565,
-0.6652348041534424,
-0.49233517050743103,
-0.83699631690979,
0.3483387529850006,
1.9220561981201172,
-0.2919079661369324,
1.5976260900497437,
-0.35735753178596497,
-1.5501563549041748,
-1.6315776109695435,
0.8566871285438538,
0.4830632209777832,
-0.7598885893821716,
0.09868897497653961,
-0.4155774712562561,
0.19863063097000122,
-0.039851829409599304,
1.038509488105774,
1.2676607370376587,
0.6609627604484558,
-0.3446844220161438,
-0.935107946395874,
0.2166650891304016,
-0.13388845324516296,
-0.6546531915664673,
-1.8241732120513916,
-0.3577885031700134,
0.112332783639431,
0.6542062163352966,
-1.1768434047698975,
1.57994544506073,
0.9330624341964722,
1.9520214796066284,
1.0265992879867554,
-0.3232686519622803,
1.5472756624221802,
0.09293735772371292,
1.8953906297683716,
-0.47648122906684875,
0.6762530207633972,
-0.3734939396381378,
-1.1740933656692505,
0.779159665107727,
-0.3546437621116638,
-2.062342882156372,
-0.7617066502571106,
-0.785696804523468,
-0.22026774287223816,
-0.7626728415489197,
0.8867785930633545,
-0.23896265029907227,
-1.399725317955017,
0.33246034383773804,
-0.7455101013183594,
0.196599543094635,
-1.196190595626831,
0.3508888781070709,
0.6808479428291321,
-0.6173921227455139,
0.07810872793197632,
-0.3332415819168091,
-1.2657264471054077,
-0.46476730704307556,
0.2587111294269562,
1.8282039165496826,
-0.7527310848236084,
0.9438880085945129,
1.0045002698898315,
-0.7008596658706665,
-0.001386262010782957,
0.2325494885444641,
-0.28418833017349243,
0.8719704747200012,
-1.0506645441055298,
-0.4270661473274231,
1.254270076751709,
-0.22707241773605347,
-0.5922107696533203,
1.4792611598968506,
0.6713546514511108,
-0.9755908846855164,
-0.21775928139686584,
-0.14896279573440552,
-0.7954182624816895,
-0.02297823876142502,
-1.6485755443572998,
-0.13687431812286377,
0.33949577808380127,
-1.526117205619812,
-0.41642245650291443,
-0.2343834638595581,
1.2592982053756714,
-0.06265968084335327,
1.4389539957046509,
-0.3893987536430359,
-0.1674279272556305,
-0.37934252619743347,
-0.38075101375579834,
0.14148294925689697,
-0.2248988151550293,
-0.556183397769928,
0.22878298163414001,
-0.7973310351371765,
0.3841470777988434,
1.4620009660720825,
0.40742892026901245,
0.04262848570942879,
0.5320879220962524,
1.0575103759765625,
0.337225079536438,
-0.00927792675793171,
-0.7993651032447815,
-1.5725990533828735,
2.0106327533721924,
-1.4570790529251099,
1.996962547302246,
0.7723205089569092,
0.0014780797064304352,
-1.7856395244598389,
-1.8408427238464355,
1.3494539260864258,
1.1453280448913574,
2.3699140548706055,
0.6196029782295227,
0.37918615341186523,
-0.8089864253997803,
-0.6386971473693848,
0.31192469596862793,
-1.050152063369751,
-0.7762197256088257,
0.13311055302619934,
2.3858697414398193,
1.7131218910217285,
-0.4513843357563019,
-0.08949240297079086,
-1.0105748176574707,
1.444222092628479,
-0.13896113634109497,
0.23230165243148804,
2.0435750484466553,
-0.164129376411438,
-1.0949313640594482,
1.2732013463974,
-2.3449788093566895,
0.11710917204618454,
1.9817554950714111,
0.3049684166908264,
0.07923392206430435,
-1.4424129724502563,
-0.6266072392463684,
-0.26459845900535583,
-0.2753863036632538,
-1.2637847661972046,
0.5659241080284119,
-0.2832283675670624,
-0.7404974699020386,
-1.471036434173584,
0.1462676227092743,
-1.0846420526504517,
-1.6149176359176636,
0.21309733390808105,
1.852647066116333,
2.0613293647766113,
-0.6910649538040161,
1.5128072500228882,
-0.2704184055328369,
0.17360058426856995,
1.241410255432129,
1.1542885303497314,
3.142425775527954,
1.9456580877304077,
-1.3394882678985596,
0.6183348298072815,
-0.12670442461967468,
-0.508704662322998,
1.1689233779907227,
-1.2124888896942139,
1.3456745147705078,
-0.1740749478340149,
-1.1947102546691895,
-1.268339991569519,
1.035819172859192,
0.5484214425086975,
0.05612082779407501,
-0.5524526834487915,
1.288136601448059,
0.009831639006733894,
1.2922663688659668,
0.42085739970207214,
-0.36989203095436096,
0.5957497358322144,
-0.46101483702659607,
-0.5304245948791504,
1.6176384687423706,
0.23579421639442444,
-1.4251312017440796,
-2.3170759677886963,
-0.22704526782035828,
-0.8032692670822144,
0.019477907568216324,
-0.621863842010498,
-0.9750997424125671,
1.6189768314361572,
0.35703611373901367,
-1.3076956272125244,
-0.30956608057022095,
-0.3950957655906677,
-0.690275251865387,
2.6576974391937256,
-1.3544983863830566,
-0.2951684594154358,
-0.9542514085769653,
-0.6007868647575378,
1.5671241283416748,
-1.250141978263855,
-0.2538816034793854,
-0.950456976890564,
-0.6246102452278137,
-1.2133008241653442,
-0.5816779732704163,
-0.028087612241506577,
-0.9769048690795898,
0.7847217321395874,
0.21007922291755676,
-1.1517823934555054,
-0.29182350635528564,
-0.8233196139335632,
0.8521860241889954,
-0.12389148771762848,
0.25638726353645325,
1.8259943723678589,
0.39154642820358276,
-0.3962976336479187,
0.7494094371795654,
1.0974304676055908,
0.6184951663017273,
-0.7002571225166321,
0.16254353523254395,
-0.7059515118598938,
0.2848956286907196,
-1.266464352607727,
0.3147973120212555,
-2.918886423110962,
0.5961115956306458,
-0.06294873356819153,
-0.037743404507637024,
-0.02503022737801075,
-1.198252558708191,
1.0357892513275146,
2.669023275375366,
-1.183251142501831,
0.5072365999221802,
0.309957355260849,
1.1843467950820923,
-1.610998511314392,
0.3620905876159668,
-0.42135992646217346,
2.1274335384368896,
0.2217094600200653,
1.2680621147155762,
-0.4886898100376129,
-2.3536741733551025,
0.6141819357872009,
-1.2447412014007568,
-1.1967953443527222,
0.797902524471283,
-0.9067543745040894,
0.0034999223425984383,
-1.3986537456512451,
-0.29668328166007996,
-0.7676839828491211,
-1.29048490524292,
0.7153142094612122,
0.17160794138908386,
0.4358052909374237,
-0.5702039003372192,
0.2798444330692291,
-2.281001091003418,
-1.391461730003357,
-0.25357556343078613,
-1.0157859325408936,
0.42516496777534485,
-0.3878709673881531,
0.7318956255912781,
-0.16339111328125,
0.009331801906228065,
0.28268322348594666,
1.3839406967163086,
3.3904263973236084,
0.25914251804351807,
0.4121991693973541,
-0.182521253824234,
-0.9314762353897095,
1.4137741327285767,
0.8744076490402222,
-0.16666775941848755,
-0.5285862684249878,
-1.0672194957733154,
1.22026526927948,
1.9355806112289429,
0.9170247316360474,
0.04252224043011665,
-0.8286051750183105,
-0.6885949969291687,
-0.037574052810668945,
0.13645735383033752,
0.49567270278930664,
0.8130462169647217,
0.04659755900502205,
0.1663544774055481,
1.4315776824951172,
1.2187628746032715,
-0.41936859488487244,
0.30262744426727295,
-0.802871584892273,
-0.4435419738292694,
0.54784095287323,
0.3109840452671051,
0.005488465540111065,
0.3202834725379944,
-0.9583385586738586,
-0.14024722576141357,
-0.3835265338420868,
-0.977022647857666,
-0.7519404888153076,
-0.4167955815792084,
-0.31490036845207214,
1.6625136137008667,
0.14619484543800354,
-0.43581193685531616,
-0.08720728754997253,
-0.7375293374061584,
-0.09802661836147308,
-1.1018966436386108,
0.26965779066085815,
-0.026108896359801292,
-0.09584618359804153,
-0.08714098483324051,
1.7950407266616821,
-0.9528602361679077,
-2.1479437351226807,
0.2846592366695404,
0.2636449635028839,
-0.32157501578330994,
0.18497109413146973,
1.6406248807907104,
0.5020906329154968,
1.414489984512329,
1.3448513746261597,
0.9577997922897339,
-0.71749347448349,
-1.278939962387085,
0.6482241153717041,
0.96871417760849,
-1.4046357870101929,
0.820862889289856,
0.02702714502811432,
-0.5261245965957642,
0.694852888584137,
1.284413456916809,
0.4892002046108246,
-2.036771059036255,
0.7984713912010193,
-0.9918848872184753,
0.7643603086471558,
0.7368393540382385,
0.7244175672531128,
0.158294677734375,
0.7869721055030823,
-1.2708841562271118,
-1.1662653684616089,
-0.8246113061904907,
-0.6993725299835205,
1.9895386695861816,
-0.23255270719528198,
0.5953817963600159,
-0.14991003274917603,
-1.3929123878479004,
-0.019107529893517494,
0.6555531024932861,
0.33054324984550476,
-0.3989827334880829,
0.8091682195663452,
-0.677484393119812,
-1.1677782535552979,
-1.408636450767517,
-0.436583936214447,
-1.1054898500442505,
-0.9387762546539307,
1.0791726112365723,
0.7873201370239258,
0.19764944911003113,
1.7816710472106934,
0.563247561454773,
0.26907846331596375,
-2.7696123123168945,
0.9370216727256775,
0.27225711941719055,
-0.048809897154569626,
0.8985998630523682,
0.2866860628128052,
1.02596116065979,
0.0040587689727544785,
0.4821300804615021,
-2.4242539405822754,
2.2479827404022217,
-0.2572649419307709,
0.7044327259063721,
-0.06194020062685013,
-0.10991545021533966,
1.0161480903625488,
0.5341529250144958,
0.5694798231124878,
-1.0466275215148926,
0.7146055698394775,
-0.5516163110733032,
1.1828984022140503,
0.9120380878448486,
-0.7595130801200867,
-0.09612391889095306,
1.3737486600875854,
0.44187429547309875,
-0.49663209915161133,
-0.8601596355438232,
-0.9325383901596069,
0.9215863347053528,
1.8115870952606201,
-0.097675621509552,
0.025647815316915512,
0.8135836720466614,
0.5908846855163574,
-1.3088364601135254,
0.09444405138492584,
-0.771818995475769,
-0.7454288601875305,
1.5412564277648926,
2.04790997505188,
-0.08494938910007477,
-0.17337524890899658,
-0.7102221250534058,
-1.2619802951812744,
0.6775604486465454,
0.01717505417764187,
0.1385582685470581,
0.6087730526924133,
-0.6335610747337341,
1.0953415632247925,
0.8391270637512207,
0.9945003986358643,
0.1322213113307953,
0.2281607687473297,
0.4045572578907013,
-0.2878842353820801,
-1.1199597120285034,
-0.24779018759727478,
-1.036318302154541,
-2.4577252864837646,
0.4716329276561737,
-0.14831990003585815,
-1.4149407148361206,
-0.00947111938148737,
-0.9698927402496338,
0.9611782431602478,
-0.5430505871772766,
-1.0832306146621704,
-1.5524178743362427,
0.1874479353427887,
-0.11767067015171051,
0.95302814245224,
-1.643822431564331,
-0.08019412308931351,
1.1796860694885254,
0.9258737564086914,
-0.6621221899986267,
1.131657600402832,
0.3066222071647644,
0.9701243042945862,
0.867402195930481,
-0.4194883704185486,
0.5334409475326538,
0.10148965567350388,
-1.2576932907104492,
0.46887636184692383,
1.0861631631851196,
0.2233383059501648,
1.4556142091751099,
-0.5980601906776428,
-0.07604886591434479,
0.38379010558128357,
-0.5753248333930969,
-0.4265423119068146,
-0.5188152194023132,
0.704477071762085,
0.09540184587240219,
-0.886884868144989,
0.10596431791782379,
-0.11178981512784958,
-0.2116757333278656,
0.23572883009910583,
-1.4978474378585815,
-0.19778743386268616,
-0.35990944504737854,
-0.5929751992225647,
-1.232734203338623,
-0.09276898205280304,
1.4782085418701172,
-0.8232634663581848,
-0.16431424021720886,
0.4914117455482483,
0.4435795545578003,
0.5527669191360474,
0.5871946811676025,
-0.6407874226570129,
-0.3349493145942688,
-0.1852317750453949,
-0.2852034568786621,
0.336284875869751,
1.2973664999008179,
-0.10805584490299225,
-0.9905253052711487,
0.7994481325149536,
-0.3515092730522156,
0.07278085500001907,
1.871532917022705,
0.15344330668449402,
-0.8165423274040222,
0.2886715531349182,
-0.719463586807251,
1.8980308771133423,
1.6942718029022217,
1.4554773569107056,
-0.09786679595708847,
-1.0029652118682861,
0.6378093957901001,
-0.3270176351070404,
-0.3954319655895233,
0.8433536291122437,
0.49507325887680054,
-0.21039479970932007,
-1.4094295501708984,
0.6967997550964355,
1.2487468719482422,
-0.8619341850280762,
-0.8177905678749084,
0.12559112906455994,
-0.7642086148262024,
1.102746605873108,
0.6771535277366638,
0.40724411606788635,
0.1378077268600464,
1.685234785079956,
0.7476015686988831,
-0.5210970640182495,
0.5937384366989136,
0.4814159572124481,
-0.1575746238231659,
-2.1226718425750732,
-1.0791754722595215,
0.3662458658218384,
-0.3947352468967438,
-1.5253602266311646,
1.3628991842269897,
-1.15050208568573,
-0.9703934788703918,
0.5395642518997192,
0.08846748620271683,
1.4794758558273315,
0.3183159828186035,
1.5801657438278198,
2.1344003677368164,
0.920001745223999,
0.3620709180831909,
1.3323750495910645,
-0.20540034770965576,
-0.4479497969150543,
1.8306394815444946,
-0.37906473875045776,
0.4509049654006958,
1.1029396057128906,
-0.36344265937805176,
-1.010387897491455,
-0.7304797768592834,
-1.1957091093063354,
-0.6575116515159607,
1.1047255992889404,
0.1249946877360344,
-1.103501558303833,
0.23827171325683594,
1.5842174291610718,
0.15236830711364746,
-0.2636988162994385,
0.6078976392745972,
0.43789929151535034,
-0.8117079734802246,
-0.026828790083527565,
-0.9600552320480347,
0.45542970299720764,
-0.27249428629875183,
-0.2866288125514984,
0.3729848861694336,
0.4763640761375427,
1.2387871742248535,
0.02138417586684227,
0.045129600912332535,
1.16933274269104,
-1.3845492601394653,
1.4714325666427612,
-0.6044633388519287,
0.26489487290382385,
-2.3466873168945312,
1.3667151927947998,
-0.75753253698349,
1.9169347286224365,
-2.6426637172698975,
0.44480660557746887,
-0.7612378001213074,
-0.46787047386169434,
0.3592934310436249,
-0.36096814274787903,
0.13515424728393555,
-0.2094174325466156,
-1.1500327587127686,
-0.09463250637054443,
-0.7228302955627441,
0.5489286780357361,
1.1653558015823364,
1.3293063640594482,
-1.208513617515564,
-0.25208941102027893,
-1.7320029735565186,
-0.16767635941505432,
-0.7022297382354736,
0.40007421374320984,
-2.0101137161254883,
-0.19844672083854675,
-1.8960938453674316,
-2.316784143447876,
-1.2918729782104492,
-0.7699509263038635,
1.0849168300628662,
0.1054554432630539,
-0.9306624531745911,
1.1840726137161255,
-0.3344367444515228,
-1.8320690393447876,
1.1171902418136597,
-2.0963382720947266
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > > Could you explain why you'd need to change the arrow format?
>
> This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
I guess I don't understand why you'd need to subset the dataset in the first place.
It seems sufficient to figure out how to offset or skip rows.
For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That's one way to do it, where of course you'd need to account for gpu sharding as well.
Otherwise, how did you implement worker/node/GPU sharding for iterable/streaming data where you do not have index information or prior splits (e.g. files)? | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 84 | 158 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> > Could you explain why you'd need to change the arrow format?
>
> This way workers have random access to the location of the file where its dataset subset starts. Currently we're using the Arrow streaming format which doesn't include the metadata of the record batches offsets. This is needed here to efficiently split a dataset made of one single file.
I guess I don't understand why you'd need to subset the dataset in the first place.
It seems sufficient to figure out how to offset or skip rows.
For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That's one way to do it, where of course you'd need to account for gpu sharding as well.
Otherwise, how did you implement worker/node/GPU sharding for iterable/streaming data where you do not have index information or prior splits (e.g. files)? | [
-1.2853049039840698,
-1.0223995447158813,
-0.7925288677215576,
1.5095816850662231,
-0.18036487698554993,
-1.185708999633789,
0.09943601489067078,
-1.0317564010620117,
1.721103310585022,
-0.8183504343032837,
0.28840750455856323,
-1.6421458721160889,
0.06645350903272629,
-0.5130965113639832,
-0.7404292821884155,
-0.9074398875236511,
-0.4495055377483368,
-0.8246093988418579,
1.0484070777893066,
2.5236082077026367,
1.118196964263916,
-1.4452704191207886,
2.6795597076416016,
0.6874589920043945,
-0.1938227117061615,
-1.092259407043457,
0.5650584101676941,
0.005756278522312641,
-1.2615517377853394,
-0.4698190689086914,
-0.9579826593399048,
-0.0791005939245224,
-0.6000293493270874,
-0.474880576133728,
0.038001567125320435,
0.36719298362731934,
-0.2563236951828003,
-0.4324195981025696,
-0.5661355257034302,
-0.7283405661582947,
0.4720209240913391,
-0.4419694244861603,
0.9964390397071838,
-0.3026890754699707,
1.7883658409118652,
-0.4797452390193939,
0.5068920254707336,
0.7641705870628357,
1.404597520828247,
0.2025107741355896,
0.023166140541434288,
0.3020518124103546,
0.400996595621109,
-0.05413901060819626,
0.43472787737846375,
1.0967345237731934,
0.6171832084655762,
0.46259310841560364,
0.6899054646492004,
-2.309685468673706,
1.3244929313659668,
-0.9822331666946411,
0.42948010563850403,
1.277158498764038,
-0.917888343334198,
0.45411765575408936,
-1.7842572927474976,
-0.0212201289832592,
0.6312366127967834,
-2.249938488006592,
0.24819503724575043,
-1.2208530902862549,
-0.40661540627479553,
1.0105035305023193,
0.3183043897151947,
-1.2284178733825684,
0.14417439699172974,
-0.5153173208236694,
1.0917662382125854,
0.4477432668209076,
1.1589587926864624,
-1.6611210107803345,
0.03395305573940277,
-0.28429991006851196,
0.16812114417552948,
-1.2650066614151,
-1.4799909591674805,
0.6063088774681091,
0.6866402626037598,
0.4975225329399109,
-0.05662707984447479,
1.0194333791732788,
-1.0117908716201782,
0.7447907328605652,
-0.9684363007545471,
-1.688004970550537,
-1.4336328506469727,
-2.2555859088897705,
-2.3174970149993896,
0.7204713225364685,
-0.4202641546726227,
-0.5318554639816284,
2.045726776123047,
-1.0301591157913208,
-1.7675362825393677,
1.1968599557876587,
0.25423920154571533,
0.044331446290016174,
2.3697102069854736,
0.15821395814418793,
-0.7065339088439941,
0.4350668489933014,
-0.7471820116043091,
0.79893559217453,
-0.47736066579818726,
1.3900574445724487,
0.37877440452575684,
-0.9953619837760925,
1.5857656002044678,
-0.39719074964523315,
0.6220952868461609,
-0.6706622242927551,
-0.495734840631485,
-0.8484805822372437,
0.3404860496520996,
1.923301339149475,
-0.29567012190818787,
1.579894781112671,
-0.3781944513320923,
-1.5567348003387451,
-1.6342318058013916,
0.8753710389137268,
0.5040776133537292,
-0.7608454823493958,
0.1021125465631485,
-0.4331057667732239,
0.18228760361671448,
-0.06202011555433273,
1.0357723236083984,
1.2687036991119385,
0.670897364616394,
-0.3313755393028259,
-0.9384069442749023,
0.19836197793483734,
-0.176629900932312,
-0.6783208847045898,
-1.8436294794082642,
-0.35749563574790955,
0.11824170500040054,
0.6643046736717224,
-1.1523933410644531,
1.61470365524292,
0.9343900680541992,
1.9591026306152344,
1.0498754978179932,
-0.3231588304042816,
1.5477423667907715,
0.10530603677034378,
1.8706865310668945,
-0.5000802278518677,
0.654053807258606,
-0.38337722420692444,
-1.1356704235076904,
0.7624651789665222,
-0.38040485978126526,
-2.067223310470581,
-0.7087793946266174,
-0.7579526305198669,
-0.22107264399528503,
-0.7361977100372314,
0.8873981833457947,
-0.2561414837837219,
-1.392909288406372,
0.32379651069641113,
-0.7214339375495911,
0.17956937849521637,
-1.1889313459396362,
0.3733702301979065,
0.7013100981712341,
-0.6323273777961731,
0.06185619533061981,
-0.3183063268661499,
-1.2857576608657837,
-0.47675731778144836,
0.2793872058391571,
1.8352077007293701,
-0.7585524320602417,
0.9175826907157898,
1.0212016105651855,
-0.6677564382553101,
-0.03307158872485161,
0.2865135967731476,
-0.3092995285987854,
0.8320342898368835,
-1.0580979585647583,
-0.4504189193248749,
1.2280352115631104,
-0.24804028868675232,
-0.5669015645980835,
1.4347811937332153,
0.6604107022285461,
-1.0043975114822388,
-0.21226835250854492,
-0.12713970243930817,
-0.81568843126297,
-0.008550016209483147,
-1.6353065967559814,
-0.15091149508953094,
0.36088258028030396,
-1.568576693534851,
-0.4390474557876587,
-0.23684409260749817,
1.2191128730773926,
-0.04340711236000061,
1.4413397312164307,
-0.3503473699092865,
-0.15128852427005768,
-0.3604069650173187,
-0.4007314443588257,
0.14262208342552185,
-0.25386911630630493,
-0.571527898311615,
0.21269315481185913,
-0.8187277913093567,
0.39600902795791626,
1.4786112308502197,
0.3919883668422699,
0.01855541206896305,
0.5219404697418213,
1.0605010986328125,
0.3554319739341736,
-0.011803582310676575,
-0.7841806411743164,
-1.5663808584213257,
1.9820740222930908,
-1.462447166442871,
2.0114431381225586,
0.8096763491630554,
-0.024403654038906097,
-1.8259210586547852,
-1.840010643005371,
1.3507856130599976,
1.1331931352615356,
2.370002508163452,
0.6119203567504883,
0.37841683626174927,
-0.8030058741569519,
-0.6488139033317566,
0.3337381184101105,
-1.0288068056106567,
-0.7814934849739075,
0.104767344892025,
2.3940999507904053,
1.7170289754867554,
-0.4635714292526245,
-0.10572371631860733,
-1.000632405281067,
1.4255919456481934,
-0.1391206830739975,
0.2691665589809418,
2.029981851577759,
-0.18646976351737976,
-1.0682991743087769,
1.2801311016082764,
-2.371426582336426,
0.16274312138557434,
1.9512102603912354,
0.2960061728954315,
0.08711544424295425,
-1.4183522462844849,
-0.5850011110305786,
-0.2370070070028305,
-0.3045249879360199,
-1.2626488208770752,
0.5700371861457825,
-0.2750253975391388,
-0.7630795836448669,
-1.465798258781433,
0.1377784162759781,
-1.12363600730896,
-1.6055874824523926,
0.22881856560707092,
1.8999321460723877,
2.0743794441223145,
-0.6837672591209412,
1.5190309286117554,
-0.28279542922973633,
0.18344978988170624,
1.2156141996383667,
1.18267822265625,
3.132375717163086,
1.944838523864746,
-1.308940052986145,
0.5821999311447144,
-0.16131673753261566,
-0.5123416781425476,
1.1290953159332275,
-1.1701411008834839,
1.330710530281067,
-0.18055903911590576,
-1.1991143226623535,
-1.2220640182495117,
1.0391569137573242,
0.5464778542518616,
0.06382840871810913,
-0.5179281830787659,
1.2441036701202393,
0.025051051750779152,
1.2909637689590454,
0.46447888016700745,
-0.37760940194129944,
0.6122943162918091,
-0.4436550438404083,
-0.534988522529602,
1.589887022972107,
0.2024802267551422,
-1.4339525699615479,
-2.3099615573883057,
-0.22789938747882843,
-0.8066271543502808,
0.03428787738084793,
-0.6266029477119446,
-1.000226616859436,
1.586738109588623,
0.3257540166378021,
-1.2979552745819092,
-0.3166239857673645,
-0.35031670331954956,
-0.6507207751274109,
2.6351799964904785,
-1.355234146118164,
-0.303288996219635,
-0.9496426582336426,
-0.618216335773468,
1.551626443862915,
-1.257262945175171,
-0.2545548975467682,
-0.97325199842453,
-0.6232629418373108,
-1.2172400951385498,
-0.5884421467781067,
0.01158873550593853,
-0.9290822744369507,
0.820656418800354,
0.26796382665634155,
-1.1550816297531128,
-0.284648597240448,
-0.8571893572807312,
0.8720046877861023,
-0.10612202435731888,
0.24325032532215118,
1.8380768299102783,
0.3769929111003876,
-0.4137361943721771,
0.7524261474609375,
1.1119933128356934,
0.6163008213043213,
-0.7031014561653137,
0.11136242002248764,
-0.7303755879402161,
0.32961371541023254,
-1.293127417564392,
0.3076833486557007,
-2.900214433670044,
0.6214209198951721,
-0.03645551949739456,
-0.08258724957704544,
0.013989878818392754,
-1.248256802558899,
1.0061558485031128,
2.686919927597046,
-1.1815900802612305,
0.5016668438911438,
0.3189038634300232,
1.2123429775238037,
-1.5916647911071777,
0.3343445360660553,
-0.4286678433418274,
2.1235921382904053,
0.20481418073177338,
1.2811065912246704,
-0.5121952295303345,
-2.3863072395324707,
0.6043175458908081,
-1.2468637228012085,
-1.2124276161193848,
0.7631893754005432,
-0.9281188249588013,
0.007299967110157013,
-1.4194371700286865,
-0.28004181385040283,
-0.818570613861084,
-1.2715847492218018,
0.6948111057281494,
0.1761699914932251,
0.42882582545280457,
-0.5923914313316345,
0.2677461504936218,
-2.245213508605957,
-1.3752634525299072,
-0.23051977157592773,
-0.983374297618866,
0.43986448645591736,
-0.39595827460289,
0.729941189289093,
-0.1727081835269928,
-0.018312565982341766,
0.2746986448764801,
1.3721625804901123,
3.3770973682403564,
0.23605877161026,
0.3865794837474823,
-0.24117985367774963,
-0.9349607229232788,
1.4214799404144287,
0.8815003633499146,
-0.1634415090084076,
-0.5353838801383972,
-1.048850417137146,
1.2530016899108887,
1.9402779340744019,
0.9075093269348145,
0.051393963396549225,
-0.8269237279891968,
-0.6577566266059875,
-0.05229363590478897,
0.14598260819911957,
0.4696198105812073,
0.8743199706077576,
0.012389648705720901,
0.14786773920059204,
1.4317524433135986,
1.2540632486343384,
-0.40095266699790955,
0.3186277747154236,
-0.7972740530967712,
-0.44477134943008423,
0.5324488878250122,
0.316402792930603,
-0.01968967542052269,
0.31733545660972595,
-0.9657883644104004,
-0.1318512260913849,
-0.4079970121383667,
-0.9576475024223328,
-0.7476030588150024,
-0.39953291416168213,
-0.2807523012161255,
1.6759556531906128,
0.17997215688228607,
-0.4550846517086029,
-0.06986045092344284,
-0.7120971083641052,
-0.09568898379802704,
-1.0749765634536743,
0.24323274195194244,
-0.07231579720973969,
-0.10280656069517136,
-0.08739155530929565,
1.7773022651672363,
-0.9405183792114258,
-2.1049866676330566,
0.27310848236083984,
0.23353220522403717,
-0.29866090416908264,
0.19763606786727905,
1.6466962099075317,
0.5064705610275269,
1.455172061920166,
1.3719626665115356,
0.9667180180549622,
-0.717765748500824,
-1.2458913326263428,
0.6710516214370728,
0.96916264295578,
-1.3905683755874634,
0.828463077545166,
0.034146301448345184,
-0.5656999349594116,
0.705729067325592,
1.28412663936615,
0.46691828966140747,
-2.064142942428589,
0.840199887752533,
-1.001813530921936,
0.7837915420532227,
0.744814395904541,
0.7332873940467834,
0.184054896235466,
0.8095186352729797,
-1.2483693361282349,
-1.1607482433319092,
-0.8234344720840454,
-0.712796688079834,
2.0305957794189453,
-0.2123730480670929,
0.5964363217353821,
-0.1245490163564682,
-1.3994289636611938,
-0.06785586476325989,
0.643860399723053,
0.35135141015052795,
-0.3808240592479706,
0.7891866564750671,
-0.7054159641265869,
-1.1629713773727417,
-1.4064898490905762,
-0.4448367953300476,
-1.0860280990600586,
-0.9349047541618347,
1.084608793258667,
0.7984892725944519,
0.24210621416568756,
1.8008677959442139,
0.5758188962936401,
0.2762839198112488,
-2.7369887828826904,
0.9217755198478699,
0.30108094215393066,
-0.09606494009494781,
0.8868116736412048,
0.31216880679130554,
1.017613172531128,
0.0127206239849329,
0.5141854882240295,
-2.421853542327881,
2.244041681289673,
-0.2669110894203186,
0.7495542764663696,
-0.07413997501134872,
-0.1039162203669548,
1.0292495489120483,
0.528128445148468,
0.5834965705871582,
-1.0524438619613647,
0.7110530138015747,
-0.5557818412780762,
1.1951534748077393,
0.9209027886390686,
-0.763238787651062,
-0.055951401591300964,
1.3544381856918335,
0.4256792366504669,
-0.5382523536682129,
-0.8792599439620972,
-0.9088687300682068,
0.9194291234016418,
1.8476059436798096,
-0.08001115918159485,
0.022208720445632935,
0.7999005317687988,
0.635320246219635,
-1.3218940496444702,
0.08638187497854233,
-0.7741488218307495,
-0.7603470087051392,
1.5512546300888062,
2.043036699295044,
-0.11683003604412079,
-0.15005750954151154,
-0.6747919321060181,
-1.2919814586639404,
0.684124767780304,
0.014808772131800652,
0.1166812852025032,
0.5889942049980164,
-0.626095712184906,
1.0879786014556885,
0.8390549421310425,
0.9723448753356934,
0.12549927830696106,
0.24867798388004303,
0.43544691801071167,
-0.30147209763526917,
-1.058057427406311,
-0.2348867952823639,
-1.0417840480804443,
-2.4533467292785645,
0.4848853051662445,
-0.14030882716178894,
-1.4350723028182983,
-0.006901359651237726,
-0.9163981080055237,
0.9675788879394531,
-0.5221357345581055,
-1.1128755807876587,
-1.5503863096237183,
0.19275958836078644,
-0.11588303744792938,
0.9489060640335083,
-1.664411187171936,
-0.07139991223812103,
1.139858603477478,
0.9306438565254211,
-0.6300255060195923,
1.1226577758789062,
0.31556862592697144,
0.9840272068977356,
0.8334634900093079,
-0.4344763457775116,
0.49552977085113525,
0.08191829919815063,
-1.2564245462417603,
0.43683281540870667,
1.115910291671753,
0.20995773375034332,
1.4007669687271118,
-0.6056600213050842,
-0.09629106521606445,
0.3906344473361969,
-0.5621042847633362,
-0.42289477586746216,
-0.503173828125,
0.7088479995727539,
0.06870528310537338,
-0.8734972476959229,
0.04140770435333252,
-0.09949620813131332,
-0.2313000112771988,
0.20295457541942596,
-1.51384699344635,
-0.1719319075345993,
-0.36754661798477173,
-0.5809714198112488,
-1.2220818996429443,
-0.06695792824029922,
1.480082392692566,
-0.8143244385719299,
-0.23201707005500793,
0.488659530878067,
0.4562018811702728,
0.5371788740158081,
0.5812047719955444,
-0.6422153115272522,
-0.3556152880191803,
-0.1647641956806183,
-0.2981722354888916,
0.28758078813552856,
1.3402281999588013,
-0.10816395282745361,
-0.993346095085144,
0.7465688586235046,
-0.3848620355129242,
0.05418889969587326,
1.8662108182907104,
0.16651272773742676,
-0.8133129477500916,
0.2795272767543793,
-0.7415353059768677,
1.8812062740325928,
1.700127363204956,
1.4382935762405396,
-0.10298475623130798,
-0.9634007215499878,
0.6469777822494507,
-0.33780598640441895,
-0.3885931074619293,
0.857694685459137,
0.46508246660232544,
-0.2064828723669052,
-1.445251703262329,
0.6867995262145996,
1.228385090827942,
-0.8708222508430481,
-0.7863725423812866,
0.10523862391710281,
-0.7789636850357056,
1.13212251663208,
0.6813929080963135,
0.40308576822280884,
0.1377735584974289,
1.6697150468826294,
0.7765002250671387,
-0.5372781753540039,
0.6157717108726501,
0.4974268674850464,
-0.1949945092201233,
-2.1191041469573975,
-1.1098424196243286,
0.33616065979003906,
-0.3832922875881195,
-1.5474352836608887,
1.378843903541565,
-1.1466761827468872,
-0.9507956504821777,
0.5013568997383118,
0.09102774411439896,
1.4343295097351074,
0.36069944500923157,
1.566092610359192,
2.1302683353424072,
0.9085191488265991,
0.414365291595459,
1.3310115337371826,
-0.2107873409986496,
-0.4536616802215576,
1.858122706413269,
-0.4109556972980499,
0.47233766317367554,
1.1138719320297241,
-0.37006181478500366,
-1.0261459350585938,
-0.7169435620307922,
-1.1869468688964844,
-0.6411934494972229,
1.1241554021835327,
0.0938371941447258,
-1.095738172531128,
0.26364654302597046,
1.6196681261062622,
0.12247233837842941,
-0.28902652859687805,
0.6281158328056335,
0.44397372007369995,
-0.7566515803337097,
-0.04619235545396805,
-0.9031530022621155,
0.46177226305007935,
-0.3059220314025879,
-0.30474111437797546,
0.3592165410518646,
0.4929037094116211,
1.2458151578903198,
0.008052360266447067,
0.015882963314652443,
1.1614863872528076,
-1.4122463464736938,
1.4523377418518066,
-0.6276842951774597,
0.28552448749542236,
-2.3635125160217285,
1.3839901685714722,
-0.7761768102645874,
1.9561889171600342,
-2.622222423553467,
0.4229712188243866,
-0.7412645816802979,
-0.48099347949028015,
0.3528120517730713,
-0.338718980550766,
0.10573010891675949,
-0.19205617904663086,
-1.1385157108306885,
-0.06770867854356766,
-0.6991730332374573,
0.56829833984375,
1.161171555519104,
1.310133695602417,
-1.1865564584732056,
-0.24735957384109497,
-1.7221955060958862,
-0.1673542559146881,
-0.712825357913971,
0.3760311007499695,
-2.0025722980499268,
-0.2241368442773819,
-1.9065841436386108,
-2.302701234817505,
-1.2938880920410156,
-0.7884454131126404,
1.0837839841842651,
0.1195327416062355,
-0.9563478827476501,
1.2432329654693604,
-0.32758456468582153,
-1.8518588542938232,
1.1005815267562866,
-2.1101109981536865
] |
https://github.com/huggingface/datasets/issues/5984 | AutoSharding IterableDataset's when num_workers > 1 | > For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That works indeed ! And what we meant is that you can make it even faster to instantiate. Indeed using RecordBatchStreamReader you need to get the list of all the record batches in each worker, whereas you could just get the list of record batches per worker if you use the record batches locations in the Arrow IPC file footer. This would be especially appreciated to have a fast instantiation in case you have tens of thousands of Arrow files for example. | ### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR. | 84 | 110 | AutoSharding IterableDataset's when num_workers > 1
### Feature request
Minimal Example
```
import torch
from datasets import IterableDataset
d = IterableDataset.from_file(<file_name>)
dl = torch.utils.data.dataloader.DataLoader(d,num_workers=3)
for sample in dl:
print(sample)
```
Warning:
Too many dataloader workers: 2 (max is dataset.n_shards=1). Stopping 1 dataloader workers.
To parallelize data loading, we give each process some shards (or data sources) to process. Therefore it's unnecessary to have a number of workers greater than dataset.n_shards=1. To enable more parallelism, please split the dataset in more files than 1.
Expected Behavior:
Dataset is sharded each cpu uses subset (contiguously - so you can do checkpoint loading/saving)
### Motivation
I have a lot of unused cpu's and would like to be able to shard iterable datasets with pytorch's dataloader when num_workers > 1. This is for a very large single file. I am aware that we can use the `split_dataset_by_node` to ensure that each node (for distributed) gets different shards, but we should extend it so that this also continues for multiple workers.
### Your contribution
If someone points me to what needs to change, I can create a PR.
> For instance, using pyArrow, you could use RecordBatchStreamReader to zero-copy iterate over records with read_next_batch and then only initiate the next step for records modulo worker shard.
That works indeed ! And what we meant is that you can make it even faster to instantiate. Indeed using RecordBatchStreamReader you need to get the list of all the record batches in each worker, whereas you could just get the list of record batches per worker if you use the record batches locations in the Arrow IPC file footer. This would be especially appreciated to have a fast instantiation in case you have tens of thousands of Arrow files for example. | [
-1.2533196210861206,
-0.9782845973968506,
-0.7525156736373901,
1.5078414678573608,
-0.15806618332862854,
-1.1748424768447876,
0.12436971068382263,
-1.0564632415771484,
1.7192676067352295,
-0.8123056888580322,
0.3315477669239044,
-1.6334238052368164,
0.09490970522165298,
-0.5523947477340698,
-0.7244417667388916,
-0.8904232978820801,
-0.44794386625289917,
-0.8216744661331177,
1.0755233764648438,
2.534432888031006,
1.1582865715026855,
-1.4342761039733887,
2.6833810806274414,
0.6603215932846069,
-0.2066306471824646,
-1.083344578742981,
0.5780470371246338,
-0.015156077221035957,
-1.3011443614959717,
-0.4474134147167206,
-0.9349826574325562,
-0.11107400804758072,
-0.6195614337921143,
-0.4517795443534851,
0.022153297439217567,
0.37987202405929565,
-0.21682648360729218,
-0.4209845960140228,
-0.5639379024505615,
-0.7595012187957764,
0.4780377745628357,
-0.4467190206050873,
0.9797439575195312,
-0.3065226674079895,
1.788766860961914,
-0.4956594407558441,
0.4977059066295624,
0.7392430305480957,
1.3786522150039673,
0.21446293592453003,
-0.004440607037395239,
0.29906409978866577,
0.3888685405254364,
-0.07764749974012375,
0.45942163467407227,
1.094726800918579,
0.6545495986938477,
0.4837704598903656,
0.6869357824325562,
-2.2803730964660645,
1.3406240940093994,
-0.9896813631057739,
0.4096240997314453,
1.2832319736480713,
-0.9337249994277954,
0.42947766184806824,
-1.785240888595581,
-0.08481757342815399,
0.6217218637466431,
-2.2237563133239746,
0.24719926714897156,
-1.2333756685256958,
-0.41253095865249634,
1.0022094249725342,
0.32262757420539856,
-1.277585744857788,
0.14805568754673004,
-0.4737677276134491,
1.076902151107788,
0.4134306013584137,
1.165631890296936,
-1.7117191553115845,
0.031318873167037964,
-0.31005364656448364,
0.15227261185646057,
-1.2755273580551147,
-1.489426612854004,
0.5862468481063843,
0.6932195425033569,
0.4842134714126587,
-0.09201166778802872,
1.047771692276001,
-1.0499578714370728,
0.7824661731719971,
-0.9661462306976318,
-1.6679377555847168,
-1.4389444589614868,
-2.2841525077819824,
-2.323535203933716,
0.7000075578689575,
-0.4366139769554138,
-0.5266786813735962,
2.0408620834350586,
-1.0410492420196533,
-1.7199368476867676,
1.1745885610580444,
0.2581188380718231,
0.015326041728258133,
2.3719451427459717,
0.1868741363286972,
-0.6919999122619629,
0.3948710262775421,
-0.7661291360855103,
0.803455114364624,
-0.47910577058792114,
1.381374478340149,
0.37340864539146423,
-1.0088415145874023,
1.5914037227630615,
-0.3975231647491455,
0.5752809047698975,
-0.6546109914779663,
-0.4877467453479767,
-0.81287682056427,
0.31830936670303345,
1.910866141319275,
-0.30573856830596924,
1.5814405679702759,
-0.3508763611316681,
-1.5654226541519165,
-1.6102880239486694,
0.8530634641647339,
0.504115104675293,
-0.7369316816329956,
0.10185260325670242,
-0.373544305562973,
0.1811313033103943,
-0.0469084195792675,
1.0481210947036743,
1.2651339769363403,
0.6738238334655762,
-0.3807089626789093,
-0.9217351675033569,
0.19704464077949524,
-0.17590241134166718,
-0.6953421831130981,
-1.818721890449524,
-0.3444458246231079,
0.09396291524171829,
0.6515002250671387,
-1.1646119356155396,
1.6616299152374268,
0.9650087356567383,
1.9512823820114136,
1.0270464420318604,
-0.305704802274704,
1.524541974067688,
0.08424124866724014,
1.862320065498352,
-0.49257177114486694,
0.6543642282485962,
-0.38248205184936523,
-1.1541827917099,
0.7647706270217896,
-0.35379886627197266,
-2.0499045848846436,
-0.7031309604644775,
-0.7673211097717285,
-0.21863195300102234,
-0.7426400184631348,
0.8880188465118408,
-0.25512754917144775,
-1.3712090253829956,
0.3244261145591736,
-0.7319396734237671,
0.1701752096414566,
-1.2015190124511719,
0.37237274646759033,
0.6718536615371704,
-0.6611669063568115,
0.083778977394104,
-0.28058791160583496,
-1.2468762397766113,
-0.4651902914047241,
0.2415425181388855,
1.8407180309295654,
-0.7727537155151367,
0.9391663074493408,
1.0088167190551758,
-0.6515754461288452,
-0.03403744846582413,
0.28537413477897644,
-0.32136544585227966,
0.8492350578308105,
-1.0572582483291626,
-0.4623301029205322,
1.2295281887054443,
-0.20674553513526917,
-0.5401164293289185,
1.4624028205871582,
0.6894255876541138,
-0.9919285774230957,
-0.22781121730804443,
-0.12190380692481995,
-0.8260238170623779,
0.019237877801060677,
-1.6511659622192383,
-0.12350042909383774,
0.3980094790458679,
-1.5317412614822388,
-0.4072222113609314,
-0.21527348458766937,
1.2200512886047363,
-0.07728524506092072,
1.43699312210083,
-0.35831156373023987,
-0.15620076656341553,
-0.3680950105190277,
-0.38785025477409363,
0.1337529420852661,
-0.19358278810977936,
-0.5319076776504517,
0.2407083511352539,
-0.8186649084091187,
0.39818957448005676,
1.4858732223510742,
0.349276065826416,
0.0443827249109745,
0.4939521253108978,
1.0271730422973633,
0.3436863422393799,
0.005921141244471073,
-0.8062275648117065,
-1.5525920391082764,
2.0107040405273438,
-1.4457852840423584,
1.999475121498108,
0.8716076612472534,
-0.0007577268406748772,
-1.8472760915756226,
-1.8360514640808105,
1.3370953798294067,
1.1401612758636475,
2.3877451419830322,
0.5702667236328125,
0.39935025572776794,
-0.8060992956161499,
-0.6177337169647217,
0.3750210404396057,
-1.046325922012329,
-0.7707841396331787,
0.1667311191558838,
2.3899033069610596,
1.6944454908370972,
-0.435956209897995,
-0.11062377691268921,
-1.0108205080032349,
1.404685139656067,
-0.10060624033212662,
0.2392948716878891,
2.0313546657562256,
-0.20090921223163605,
-1.1389663219451904,
1.2721582651138306,
-2.3613412380218506,
0.1508340984582901,
1.9807442426681519,
0.330625057220459,
0.08213925361633301,
-1.4080229997634888,
-0.5727705955505371,
-0.2617342174053192,
-0.3245946764945984,
-1.23121976852417,
0.584964394569397,
-0.27841469645500183,
-0.7950844764709473,
-1.4780162572860718,
0.13810615241527557,
-1.1687884330749512,
-1.6283979415893555,
0.2554417550563812,
1.8496201038360596,
2.0722341537475586,
-0.7083734273910522,
1.497355341911316,
-0.2808237075805664,
0.19547432661056519,
1.1856906414031982,
1.1732769012451172,
3.1264030933380127,
1.9316326379776,
-1.3258662223815918,
0.5788534879684448,
-0.16618087887763977,
-0.4889640510082245,
1.1168140172958374,
-1.1913751363754272,
1.3047341108322144,
-0.1767837107181549,
-1.2007168531417847,
-1.1879228353500366,
1.0161340236663818,
0.5215343236923218,
0.04962039366364479,
-0.5469824075698853,
1.2491120100021362,
0.06333509832620621,
1.3053064346313477,
0.4625609517097473,
-0.2994844615459442,
0.61250901222229,
-0.4453982412815094,
-0.5257076025009155,
1.5899665355682373,
0.23309262096881866,
-1.4297293424606323,
-2.3237621784210205,
-0.19730596244335175,
-0.7882132530212402,
0.018223410472273827,
-0.6471965312957764,
-0.9930248260498047,
1.596449375152588,
0.3198142647743225,
-1.3460936546325684,
-0.32022470235824585,
-0.349137544631958,
-0.6171371936798096,
2.638063430786133,
-1.3578236103057861,
-0.2711828649044037,
-0.9617732763290405,
-0.6235817670822144,
1.5632210969924927,
-1.2485827207565308,
-0.2639848291873932,
-0.9815527200698853,
-0.6024210453033447,
-1.2326337099075317,
-0.58797287940979,
0.019803669303655624,
-0.897743821144104,
0.8079695701599121,
0.2876674234867096,
-1.1565097570419312,
-0.30907005071640015,
-0.8330984115600586,
0.84688401222229,
-0.13030949234962463,
0.2286044806241989,
1.793546199798584,
0.3881407678127289,
-0.3687956929206848,
0.7390644550323486,
1.0942373275756836,
0.6309987306594849,
-0.6839169263839722,
0.1405029445886612,
-0.7246713638305664,
0.3260091543197632,
-1.255040168762207,
0.3099988102912903,
-2.892536163330078,
0.620843768119812,
-0.05998067557811737,
-0.0808340534567833,
0.0010921843349933624,
-1.2697851657867432,
0.9892401695251465,
2.6679906845092773,
-1.174252986907959,
0.5109277963638306,
0.31003183126449585,
1.2075449228286743,
-1.6216291189193726,
0.3138209581375122,
-0.45048823952674866,
2.121425151824951,
0.23975007236003876,
1.2954015731811523,
-0.5457569360733032,
-2.3386757373809814,
0.5773676633834839,
-1.2688089609146118,
-1.202968716621399,
0.7723283767700195,
-0.9258378744125366,
0.01925557479262352,
-1.395391821861267,
-0.2698172926902771,
-0.7977383136749268,
-1.2885162830352783,
0.6986410617828369,
0.17789462208747864,
0.42080849409103394,
-0.5738730430603027,
0.26203903555870056,
-2.2412002086639404,
-1.3459116220474243,
-0.23197849094867706,
-1.0012457370758057,
0.4284142255783081,
-0.40066054463386536,
0.7287025451660156,
-0.164640873670578,
-0.02674623765051365,
0.3262028992176056,
1.3759962320327759,
3.4199488162994385,
0.23268868029117584,
0.3661714196205139,
-0.22792121767997742,
-0.9499841928482056,
1.421366572380066,
0.8755136728286743,
-0.1793663501739502,
-0.5355948209762573,
-1.0897605419158936,
1.2521122694015503,
1.918696403503418,
0.9065779447555542,
0.04246469587087631,
-0.8078856468200684,
-0.7012693881988525,
-0.04501620680093765,
0.1426883339881897,
0.448151558637619,
0.8622788190841675,
0.01099243015050888,
0.13914147019386292,
1.4509190320968628,
1.2511481046676636,
-0.4313209056854248,
0.2744429111480713,
-0.7875674962997437,
-0.4460701048374176,
0.5091880559921265,
0.31142458319664,
0.023660574108362198,
0.3392150104045868,
-0.9425313472747803,
-0.18290087580680847,
-0.4238709509372711,
-0.969928503036499,
-0.7431468963623047,
-0.4116148352622986,
-0.29231324791908264,
1.665143370628357,
0.14295221865177155,
-0.4653204679489136,
-0.03970899060368538,
-0.68744957447052,
-0.09726947546005249,
-1.0518056154251099,
0.2457219958305359,
-0.058403246104717255,
-0.10589072108268738,
-0.10450351238250732,
1.8118716478347778,
-0.9246805906295776,
-2.126021146774292,
0.29457610845565796,
0.210721954703331,
-0.30031439661979675,
0.1898859292268753,
1.655837893486023,
0.499316543340683,
1.4219392538070679,
1.3460071086883545,
0.9655426740646362,
-0.716280460357666,
-1.2471762895584106,
0.717621922492981,
0.9929642677307129,
-1.4328540563583374,
0.818672776222229,
-0.007315791677683592,
-0.5388027429580688,
0.7139714956283569,
1.2433792352676392,
0.4709491729736328,
-2.0552546977996826,
0.8440954685211182,
-1.0146656036376953,
0.7686856985092163,
0.74686598777771,
0.7303588390350342,
0.1746656894683838,
0.7604902982711792,
-1.2746130228042603,
-1.1689631938934326,
-0.7942869663238525,
-0.7100609540939331,
2.025653123855591,
-0.21492445468902588,
0.6018813848495483,
-0.16049619019031525,
-1.3876243829727173,
-0.06835970282554626,
0.671512246131897,
0.30116674304008484,
-0.4002889096736908,
0.7690345048904419,
-0.690367579460144,
-1.1258825063705444,
-1.4414970874786377,
-0.4389924705028534,
-1.1163610219955444,
-0.9464904069900513,
1.0896575450897217,
0.7598226070404053,
0.2704707980155945,
1.8218134641647339,
0.585173487663269,
0.2827971279621124,
-2.718548536300659,
0.9255537986755371,
0.29707035422325134,
-0.0824461281299591,
0.9256730079650879,
0.3129982352256775,
0.9902967214584351,
-0.0026728403754532337,
0.5191147327423096,
-2.4684572219848633,
2.2951221466064453,
-0.2631140947341919,
0.7394288778305054,
-0.07640663534402847,
-0.13662639260292053,
1.0385745763778687,
0.5454490184783936,
0.5588428974151611,
-1.0483580827713013,
0.6734052896499634,
-0.5523366928100586,
1.1625823974609375,
0.8640716075897217,
-0.7995423078536987,
-0.06497305631637573,
1.3279485702514648,
0.4368566870689392,
-0.5184121131896973,
-0.850435733795166,
-0.9320547580718994,
0.9123853445053101,
1.8367314338684082,
-0.08870156109333038,
0.004928005859255791,
0.8234734535217285,
0.630947470664978,
-1.2949984073638916,
0.06082666665315628,
-0.7848174571990967,
-0.8139739036560059,
1.5585039854049683,
2.039562702178955,
-0.11188796162605286,
-0.15033486485481262,
-0.6679742336273193,
-1.2785240411758423,
0.7199689149856567,
0.013578038662672043,
0.12493446469306946,
0.5846723318099976,
-0.6435143947601318,
1.1136106252670288,
0.8621577024459839,
0.9568952322006226,
0.15905450284481049,
0.21980896592140198,
0.42301619052886963,
-0.3069772720336914,
-1.0919495820999146,
-0.21675752103328705,
-1.048262596130371,
-2.4965929985046387,
0.4980904757976532,
-0.12982214987277985,
-1.4290745258331299,
0.030509445816278458,
-0.9296454191207886,
0.9322898387908936,
-0.5193055868148804,
-1.102750301361084,
-1.5469650030136108,
0.1954583376646042,
-0.12501707673072815,
0.9657595157623291,
-1.6728267669677734,
-0.08923984318971634,
1.1673054695129395,
0.9273525476455688,
-0.6239228248596191,
1.111380934715271,
0.2959296703338623,
0.9928014278411865,
0.8583385944366455,
-0.41936013102531433,
0.524643063545227,
0.10344284027814865,
-1.2834786176681519,
0.40710777044296265,
1.1335246562957764,
0.19960498809814453,
1.4251160621643066,
-0.5767691135406494,
-0.051080066710710526,
0.38665711879730225,
-0.5742963552474976,
-0.40937045216560364,
-0.514136791229248,
0.7008668184280396,
0.08712645620107651,
-0.8882030248641968,
0.06560290604829788,
-0.13827626407146454,
-0.221398264169693,
0.20942924916744232,
-1.5087597370147705,
-0.15158173441886902,
-0.3540610074996948,
-0.5642786026000977,
-1.2269716262817383,
-0.11554338037967682,
1.476982831954956,
-0.7987022399902344,
-0.2061634659767151,
0.5016599893569946,
0.4471501410007477,
0.5581934452056885,
0.598047137260437,
-0.6381969451904297,
-0.4015008509159088,
-0.1528007686138153,
-0.31990647315979004,
0.306635320186615,
1.3515223264694214,
-0.07442675530910492,
-0.9734759330749512,
0.7903389930725098,
-0.38080698251724243,
0.08155027776956558,
1.87641179561615,
0.18205097317695618,
-0.8335785865783691,
0.30162644386291504,
-0.7190171480178833,
1.8952549695968628,
1.7314616441726685,
1.4171782732009888,
-0.07116758823394775,
-0.9727181196212769,
0.6472787857055664,
-0.3554496765136719,
-0.3767787218093872,
0.895942211151123,
0.4587249457836151,
-0.17975248396396637,
-1.4475998878479004,
0.6730875968933105,
1.266610860824585,
-0.865752100944519,
-0.788081169128418,
0.11322426050901413,
-0.763986349105835,
1.1330674886703491,
0.681084156036377,
0.39837509393692017,
0.1541578322649002,
1.669106364250183,
0.7776496410369873,
-0.501717209815979,
0.6392426490783691,
0.4942295253276825,
-0.1832374483346939,
-2.1324849128723145,
-1.1171923875808716,
0.3690056800842285,
-0.39987584948539734,
-1.5364292860031128,
1.3841675519943237,
-1.148481011390686,
-0.9773826599121094,
0.5274492502212524,
0.04975966736674309,
1.44344162940979,
0.37297186255455017,
1.5624827146530151,
2.1178417205810547,
0.8895488977432251,
0.3878297805786133,
1.3381330966949463,
-0.20292572677135468,
-0.43713220953941345,
1.8568776845932007,
-0.4184708595275879,
0.46247410774230957,
1.0806907415390015,
-0.33464470505714417,
-1.026347279548645,
-0.7238878011703491,
-1.191045880317688,
-0.6712080240249634,
1.1431884765625,
0.057945720851421356,
-1.0998998880386353,
0.27766022086143494,
1.6399856805801392,
0.12276190519332886,
-0.30291303992271423,
0.6142551898956299,
0.3864933252334595,
-0.7692770957946777,
-0.03128891438245773,
-0.8917255401611328,
0.47388607263565063,
-0.3050965964794159,
-0.3151548206806183,
0.35531294345855713,
0.5021157264709473,
1.245855689048767,
-0.011880587786436081,
0.0062840888276696205,
1.167686104774475,
-1.4117964506149292,
1.4391915798187256,
-0.6357886791229248,
0.24344992637634277,
-2.34316086769104,
1.3817719221115112,
-0.7512418031692505,
1.9241397380828857,
-2.6699705123901367,
0.4437939524650574,
-0.6966044902801514,
-0.4831063151359558,
0.35351327061653137,
-0.319997638463974,
0.1631203293800354,
-0.22638998925685883,
-1.1194878816604614,
-0.11127999424934387,
-0.698275089263916,
0.5867265462875366,
1.1263952255249023,
1.3022383451461792,
-1.166353464126587,
-0.25125789642333984,
-1.719035029411316,
-0.1057034283876419,
-0.7044967412948608,
0.3428668677806854,
-1.991839051246643,
-0.21452775597572327,
-1.9151498079299927,
-2.3150112628936768,
-1.3237237930297852,
-0.765756368637085,
1.1064685583114624,
0.10768460482358932,
-0.9133118391036987,
1.1924960613250732,
-0.34386011958122253,
-1.8515607118606567,
1.0803745985031128,
-2.1487205028533936
] |
https://github.com/huggingface/datasets/issues/5982 | 404 on Datasets Documentation Page | This wasn’t working for me a bit earlier, but it looks to be back up now | ### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co | 85 | 16 | 404 on Datasets Documentation Page
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
This wasn’t working for me a bit earlier, but it looks to be back up now | [
-1.1377549171447754,
-0.9042715430259705,
-0.9018322825431824,
1.4404480457305908,
-0.013669992797076702,
-1.3308595418930054,
0.09693342447280884,
-1.0025190114974976,
1.7147923707962036,
-0.6859037280082703,
0.14928947389125824,
-1.6416269540786743,
-0.030035853385925293,
-0.5038421750068665,
-0.6124894022941589,
-0.9577497839927673,
-0.3682023584842682,
-0.8083897233009338,
1.027207851409912,
2.6576619148254395,
1.1935889720916748,
-1.353139877319336,
2.7544589042663574,
0.8096200823783875,
-0.1761951446533203,
-0.9906638264656067,
0.5595484375953674,
0.009111681021749973,
-1.3938663005828857,
-0.48917773365974426,
-0.9354674220085144,
-0.005965236574411392,
-0.38659560680389404,
-0.5199379920959473,
0.10636261105537415,
0.40300461649894714,
-0.1874772012233734,
-0.4092622399330139,
-0.5972936153411865,
-0.6815478801727295,
0.29258838295936584,
-0.3643649220466614,
0.90700763463974,
-0.5054030418395996,
1.92530357837677,
-0.4946765601634979,
0.42038485407829285,
0.6670543551445007,
1.3961127996444702,
0.19336621463298798,
-0.022236164659261703,
0.30126622319221497,
0.3586548864841461,
-0.20393551886081696,
0.4102056920528412,
1.0691899061203003,
0.5219361782073975,
0.566278338432312,
0.4934086203575134,
-2.024548053741455,
1.3938575983047485,
-0.8995140194892883,
0.24407322704792023,
1.5541025400161743,
-1.0845022201538086,
0.35601773858070374,
-1.6697884798049927,
0.027628835290670395,
0.659511923789978,
-2.3215601444244385,
0.2095663845539093,
-1.091962456703186,
-0.6344095468521118,
1.0449355840682983,
0.38680487871170044,
-1.278560757637024,
0.07733184844255447,
-0.5086826682090759,
1.0190892219543457,
0.48309794068336487,
1.173783302307129,
-1.6431655883789062,
0.1324775218963623,
-0.2884102463722229,
-0.26367080211639404,
-1.449150562286377,
-1.5483746528625488,
0.5082237720489502,
0.7199498414993286,
0.7935497760772705,
0.06724783033132553,
0.7977135181427002,
-0.85741126537323,
0.6917324066162109,
-0.7584834098815918,
-1.710310459136963,
-1.3192496299743652,
-2.4627845287323,
-2.2287373542785645,
0.8709092140197754,
-0.4184747040271759,
-0.5671323537826538,
1.9889090061187744,
-0.9746748805046082,
-1.9279859066009521,
1.1038975715637207,
0.3233419358730316,
-0.03190993517637253,
2.4156365394592285,
0.37956541776657104,
-0.6671769022941589,
0.29560044407844543,
-0.5570339560508728,
0.8652238249778748,
-0.5784041285514832,
1.3486820459365845,
0.37707602977752686,
-1.0545941591262817,
1.5012660026550293,
-0.4883943498134613,
0.751436710357666,
-0.7683290243148804,
-0.42924612760543823,
-0.8762165904045105,
0.37304186820983887,
1.8602172136306763,
-0.3709510564804077,
1.5773042440414429,
-0.43718278408050537,
-1.6055887937545776,
-1.6847280263900757,
0.7928438782691956,
0.3839085102081299,
-0.786529004573822,
0.2396831512451172,
-0.4373374879360199,
-0.044724904000759125,
-0.07242324948310852,
1.0430845022201538,
1.2350530624389648,
0.4141610860824585,
-0.17019793391227722,
-0.897992730140686,
0.2824689447879791,
-0.033995356410741806,
-0.654556930065155,
-1.7583088874816895,
-0.3115118443965912,
0.23516711592674255,
0.4690646827220917,
-1.3078007698059082,
1.7192678451538086,
0.8357567191123962,
2.0140087604522705,
0.9743193984031677,
-0.25405916571617126,
1.4195349216461182,
0.10323583334684372,
1.9368785619735718,
-0.532347559928894,
0.7399483323097229,
-0.1476791352033615,
-1.1758383512496948,
0.788108229637146,
-0.631316602230072,
-1.9602314233779907,
-0.7804250717163086,
-0.9644528031349182,
-0.15779592096805573,
-0.6461278796195984,
1.0103490352630615,
-0.26515090465545654,
-1.240289330482483,
0.2180912047624588,
-0.7466664910316467,
0.2007734477519989,
-1.2629541158676147,
0.1126992255449295,
0.7934869527816772,
-0.6127815842628479,
0.02260572835803032,
-0.2554721534252167,
-1.4011917114257812,
-0.401437371969223,
0.4367331266403198,
1.9396061897277832,
-0.7737659811973572,
0.9442306756973267,
0.9988267421722412,
-0.802771806716919,
0.12075778841972351,
0.3811991214752197,
-0.34788942337036133,
0.8923215270042419,
-1.1700634956359863,
-0.2308393269777298,
1.2064987421035767,
-0.27341729402542114,
-0.6896407604217529,
1.559118390083313,
0.7049952745437622,
-1.123377799987793,
-0.060289520770311356,
-0.09758534282445908,
-0.8369723558425903,
0.009296639822423458,
-1.705735683441162,
-0.10772030055522919,
0.09356847405433655,
-1.4317156076431274,
-0.6749241352081299,
-0.23072858154773712,
1.3422294855117798,
-0.04118874669075012,
1.3381671905517578,
-0.30004388093948364,
-0.17442172765731812,
-0.4275961220264435,
-0.47187313437461853,
0.12240202724933624,
-0.3706863522529602,
-0.5156612396240234,
0.3269149661064148,
-0.8137116432189941,
0.2881918251514435,
1.4362318515777588,
0.3711855709552765,
0.15772271156311035,
0.7215473651885986,
0.9336603879928589,
0.32348349690437317,
-0.3110533654689789,
-0.847446620464325,
-1.6565272808074951,
2.015331745147705,
-1.257388949394226,
1.9138529300689697,
0.8218033313751221,
-0.14826644957065582,
-1.7328288555145264,
-1.9149339199066162,
1.4142600297927856,
1.2150384187698364,
2.2917749881744385,
0.5859786868095398,
0.41314247250556946,
-0.7761569023132324,
-0.770229697227478,
0.158331498503685,
-0.9328082799911499,
-0.7722053527832031,
0.07465756684541702,
2.1985490322113037,
1.8612092733383179,
-0.48868587613105774,
-0.19560346007347107,
-1.0918387174606323,
1.155342698097229,
-0.3070469796657562,
0.08951206505298615,
2.048367500305176,
-0.2821829915046692,
-0.9167354106903076,
1.2594677209854126,
-2.3194637298583984,
0.17501221597194672,
1.965794563293457,
0.20123735070228577,
0.1404704749584198,
-1.5639795064926147,
-0.7454596161842346,
-0.3268985450267792,
-0.2611771821975708,
-1.1830518245697021,
0.6267711520195007,
-0.19514323770999908,
-0.9387244582176208,
-1.4438122510910034,
0.11938856542110443,
-1.0400245189666748,
-1.715678334236145,
0.33511510491371155,
1.8894836902618408,
1.904320478439331,
-0.9088878631591797,
1.4840718507766724,
-0.07894156873226166,
-0.002553839236497879,
1.290526032447815,
1.120681881904602,
3.2237164974212646,
1.9864275455474854,
-1.173850417137146,
0.7980305552482605,
-0.0013345219194889069,
-0.48281025886535645,
1.237534523010254,
-1.0986005067825317,
1.2593052387237549,
-0.283709317445755,
-1.259405493736267,
-1.346727967262268,
0.9178441166877747,
0.5903136134147644,
0.11013542115688324,
-0.6187331080436707,
1.4287437200546265,
-0.07845934480428696,
1.26949143409729,
0.4823511242866516,
-0.5181012153625488,
0.5248346924781799,
-0.34622761607170105,
-0.5001730918884277,
1.5387601852416992,
0.3428945541381836,
-1.5641478300094604,
-2.1997671127319336,
-0.2620111107826233,
-0.8181723952293396,
-0.2068530172109604,
-0.7855953574180603,
-1.0235449075698853,
1.5267034769058228,
0.5528333783149719,
-1.096177339553833,
-0.44772738218307495,
-0.24208644032478333,
-0.6578836441040039,
2.7878456115722656,
-1.455357551574707,
-0.19834639132022858,
-0.98138827085495,
-0.2757713496685028,
1.6894893646240234,
-1.223476767539978,
-0.2438088208436966,
-1.1493887901306152,
-0.773249089717865,
-1.1805496215820312,
-0.42212721705436707,
-0.058235183358192444,
-0.9191828966140747,
0.8020181059837341,
-0.05914904922246933,
-1.1701266765594482,
-0.05624214932322502,
-0.9624968767166138,
0.9818755388259888,
-0.03479652851819992,
0.1966821402311325,
1.8875679969787598,
0.42253148555755615,
-0.4860322177410126,
0.7001841068267822,
1.304384708404541,
0.562900722026825,
-0.7783263921737671,
0.19437873363494873,
-0.6711963415145874,
0.26157084107398987,
-1.4482648372650146,
0.1542329639196396,
-2.849799633026123,
0.5768362283706665,
-0.14001664519309998,
-0.10746265947818756,
-0.00581978727132082,
-1.1791679859161377,
1.1813267469406128,
2.474877119064331,
-1.1375696659088135,
0.5297341346740723,
0.3397914171218872,
1.2542186975479126,
-1.481075644493103,
0.4381846785545349,
-0.43181896209716797,
1.9371682405471802,
-0.003192801494151354,
1.082208514213562,
-0.44490987062454224,
-2.0477020740509033,
0.6713716983795166,
-1.3615583181381226,
-0.9463473558425903,
0.7819216847419739,
-0.8241670727729797,
0.09096991270780563,
-1.4133703708648682,
-0.04217134043574333,
-0.7241154909133911,
-1.2780026197433472,
0.6928045749664307,
0.09477675706148148,
0.34781619906425476,
-0.5030825138092041,
0.3791983425617218,
-2.2049643993377686,
-1.3456318378448486,
-0.27351540327072144,
-0.9695584177970886,
0.3880276083946228,
-0.31929340958595276,
0.6290448904037476,
-0.15551389753818512,
0.1323731690645218,
0.34266018867492676,
1.2268390655517578,
3.289599657058716,
0.12870557606220245,
0.38661444187164307,
-0.040457069873809814,
-1.0061640739440918,
1.4646614789962769,
1.012080430984497,
-0.14289405941963196,
-0.6705876588821411,
-0.871440589427948,
1.375123381614685,
1.9913731813430786,
1.2163276672363281,
0.09714465588331223,
-1.0440654754638672,
-0.739138662815094,
0.03849725425243378,
0.14072012901306152,
0.41987037658691406,
0.900063693523407,
-0.04594480246305466,
0.05309350788593292,
1.5509103536605835,
1.166829228401184,
-0.36445561051368713,
0.6094380021095276,
-0.9002414345741272,
-0.3849101960659027,
0.39925819635391235,
0.41822999715805054,
0.15632763504981995,
0.405239999294281,
-0.941003680229187,
-0.3110203146934509,
-0.24075114727020264,
-0.8193018436431885,
-0.817007303237915,
-0.4417794644832611,
-0.32735753059387207,
1.8117393255233765,
0.06347543746232986,
-0.5389829874038696,
-0.11121923476457596,
-0.7574208974838257,
-0.07680033147335052,
-1.0836286544799805,
0.386677086353302,
-0.002704470884054899,
0.0012472234666347504,
-0.08388561755418777,
1.6137434244155884,
-1.2032079696655273,
-2.331209421157837,
0.1592405140399933,
0.30452027916908264,
-0.34962013363838196,
0.10287052392959595,
1.6529842615127563,
0.5289635062217712,
1.4435229301452637,
1.2859314680099487,
1.005563497543335,
-0.7964699268341064,
-1.338165044784546,
0.6658262014389038,
1.0255866050720215,
-1.461488962173462,
0.924708902835846,
-0.1148734912276268,
-0.5903900861740112,
0.7364214658737183,
1.26884126663208,
0.42621728777885437,
-1.7753857374191284,
0.8648707270622253,
-0.8970834016799927,
0.9316250681877136,
0.583339512348175,
0.8782292604446411,
0.2283180058002472,
0.752359926700592,
-1.406263828277588,
-1.3100494146347046,
-0.8035593628883362,
-0.5467029809951782,
1.9504075050354004,
-0.253734290599823,
0.5139555931091309,
-0.22421330213546753,
-1.2723066806793213,
-0.09253481775522232,
0.7132449746131897,
0.37188005447387695,
-0.3627220690250397,
0.9093344807624817,
-0.6909827589988708,
-1.0750843286514282,
-1.4507759809494019,
-0.5323466062545776,
-1.0203474760055542,
-0.7991441488265991,
1.0500699281692505,
0.7112867832183838,
0.4593658745288849,
1.8466001749038696,
0.5113630890846252,
0.43397119641304016,
-2.5734901428222656,
1.020041823387146,
0.18725426495075226,
0.0005111405625939369,
0.859869122505188,
0.2822129428386688,
1.0837559700012207,
-0.02016870491206646,
0.428249716758728,
-2.2309951782226562,
2.2649405002593994,
-0.2492597997188568,
0.4972161650657654,
0.010077659972012043,
-0.10978694260120392,
1.1230970621109009,
0.5419530868530273,
0.6478747725486755,
-1.1356583833694458,
0.7915045619010925,
-0.42794138193130493,
1.1339303255081177,
0.9445871710777283,
-0.8638411164283752,
-0.056386157870292664,
1.2789552211761475,
0.47679603099823,
-0.3946805000305176,
-1.001928687095642,
-0.8048517107963562,
1.080916404724121,
1.6276248693466187,
0.04285389184951782,
0.16146637499332428,
0.8658809661865234,
0.37568822503089905,
-1.2798364162445068,
0.10978834331035614,
-0.7665238976478577,
-0.5638525485992432,
1.6127252578735352,
2.004394054412842,
0.055123116821050644,
-0.14254233241081238,
-0.787736713886261,
-1.198816180229187,
0.6318751573562622,
-0.10338271409273148,
0.09247539937496185,
0.7333574891090393,
-0.6158432960510254,
1.0406197309494019,
0.7118714451789856,
0.9911695122718811,
-0.11888325959444046,
0.2756679952144623,
0.5106284022331238,
-0.3383534848690033,
-1.3061093091964722,
-0.331789493560791,
-1.0573996305465698,
-2.3499507904052734,
0.39784079790115356,
-0.33267247676849365,
-1.4736971855163574,
0.031951919198036194,
-1.189717411994934,
1.0694499015808105,
-0.6060134768486023,
-0.9042420983314514,
-1.6056349277496338,
0.23557107150554657,
-0.33318519592285156,
0.8665580749511719,
-1.501555323600769,
-0.2260778546333313,
1.3107928037643433,
0.8138813972473145,
-0.6641652584075928,
1.0157885551452637,
0.16488081216812134,
1.0076271295547485,
0.83248370885849,
-0.26393401622772217,
0.43532437086105347,
0.27277493476867676,
-1.3318812847137451,
0.5891387462615967,
1.2115534543991089,
0.20099060237407684,
1.3403912782669067,
-0.6161092519760132,
0.03410802781581879,
0.4416540265083313,
-0.4647316634654999,
-0.445963978767395,
-0.5140496492385864,
0.762486457824707,
0.20520387589931488,
-0.9614697694778442,
-0.07934442162513733,
-0.24423745274543762,
-0.19434653222560883,
0.2090340405702591,
-1.693177580833435,
-0.2641524076461792,
-0.2965286672115326,
-0.5235697627067566,
-1.2514991760253906,
0.08111993968486786,
1.3549638986587524,
-0.7649766802787781,
-0.2983708679676056,
0.5696678161621094,
0.47114649415016174,
0.5601031184196472,
0.7265504002571106,
-0.6428439617156982,
-0.09240561723709106,
-0.3099632263183594,
-0.2921857237815857,
0.33302730321884155,
1.3496520519256592,
-0.042598068714141846,
-0.9694945216178894,
0.689400851726532,
-0.503821611404419,
0.08986418694257736,
2.079378128051758,
0.05119512975215912,
-0.8462147116661072,
0.3096679151058197,
-0.7391392588615417,
2.103867769241333,
1.5917787551879883,
1.3757779598236084,
-0.06443503499031067,
-0.8960130214691162,
0.6393556594848633,
-0.06591090559959412,
-0.29351332783699036,
0.9428822994232178,
0.4868176281452179,
-0.39721572399139404,
-1.4596009254455566,
0.5074012875556946,
1.246979832649231,
-0.9796134829521179,
-0.8837575912475586,
0.08670077472925186,
-0.8923466205596924,
1.067626714706421,
0.8734768629074097,
0.4407246708869934,
0.15633083879947662,
1.551874041557312,
0.6868276596069336,
-0.6376188397407532,
0.34627434611320496,
0.41758519411087036,
-0.127681702375412,
-1.8688775300979614,
-0.8576936721801758,
0.48387065529823303,
-0.4313974678516388,
-1.4548581838607788,
1.2491014003753662,
-1.113770842552185,
-0.7900434136390686,
0.3757188618183136,
0.1592816263437271,
1.4342679977416992,
0.27114543318748474,
1.6073942184448242,
2.0749149322509766,
0.8980616331100464,
0.12273889780044556,
1.3331983089447021,
-0.17502205073833466,
-0.2782520055770874,
1.7745873928070068,
-0.2958143949508667,
0.4711045026779175,
1.0122098922729492,
-0.468736469745636,
-1.0342788696289062,
-0.7595309615135193,
-1.2174348831176758,
-0.5814370512962341,
1.171046495437622,
0.23680470883846283,
-1.180480718612671,
0.1904304027557373,
1.376041293144226,
0.08156168460845947,
-0.22813323140144348,
0.6275312900543213,
0.5658083558082581,
-0.8859792351722717,
-0.014870937913656235,
-0.8575937747955322,
0.5649787783622742,
-0.09826726466417313,
-0.41529425978660583,
0.30758440494537354,
0.5068527460098267,
1.3424052000045776,
-0.04505830630660057,
0.19583943486213684,
1.2148340940475464,
-1.3115962743759155,
1.509689450263977,
-0.6827012896537781,
0.12206797301769257,
-2.4051308631896973,
1.406605839729309,
-0.6039348840713501,
1.816762089729309,
-2.6623377799987793,
0.4990469217300415,
-0.6102897524833679,
-0.4685869812965393,
0.2957514822483063,
-0.4094720780849457,
0.13232305645942688,
-0.20882123708724976,
-1.1195893287658691,
-0.09699912369251251,
-0.6484537124633789,
0.594788134098053,
1.224165678024292,
1.3209599256515503,
-1.1256541013717651,
-0.18304288387298584,
-1.7826567888259888,
-0.15739397704601288,
-0.8558502793312073,
0.3760139048099518,
-1.993070363998413,
-0.17788052558898926,
-1.8198503255844116,
-2.4297053813934326,
-1.422228455543518,
-0.7630780339241028,
1.1747835874557495,
0.27698177099227905,
-1.1125400066375732,
1.2232180833816528,
-0.42297810316085815,
-1.7560986280441284,
0.9299392700195312,
-2.2601675987243652
] |
https://github.com/huggingface/datasets/issues/5982 | 404 on Datasets Documentation Page | We had a minor issue updating the docs after the latest release. It should work now :). | ### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co | 85 | 17 | 404 on Datasets Documentation Page
### Describe the bug
Getting a 404 from the Hugging Face Datasets docs page:
https://huggingface.co/docs/datasets/index
### Steps to reproduce the bug
1. Go to URL https://huggingface.co/docs/datasets/index
2. Notice 404 not found
### Expected behavior
URL should either show docs or redirect to new location
### Environment info
hugginface.co
We had a minor issue updating the docs after the latest release. It should work now :). | [
-1.1287442445755005,
-0.8819176554679871,
-0.9169610738754272,
1.4683111906051636,
0.0002528224140405655,
-1.3768349885940552,
0.10183793306350708,
-1.0247750282287598,
1.7479331493377686,
-0.6829609274864197,
0.1444196254014969,
-1.6774234771728516,
-0.035665273666381836,
-0.5227884650230408,
-0.636643648147583,
-0.9010599851608276,
-0.39404264092445374,
-0.7979886531829834,
0.9812371730804443,
2.614281177520752,
1.249449610710144,
-1.2671352624893188,
2.7423887252807617,
0.8586363196372986,
-0.16803008317947388,
-0.9972515106201172,
0.5805196762084961,
-0.031230617314577103,
-1.4412578344345093,
-0.512440025806427,
-0.9308046102523804,
0.02072065696120262,
-0.38580265641212463,
-0.5584973692893982,
0.12821584939956665,
0.354147344827652,
-0.23204603791236877,
-0.4290509521961212,
-0.6058279275894165,
-0.6639963984489441,
0.2775309085845947,
-0.2870515286922455,
0.9096187353134155,
-0.5221372246742249,
1.9762331247329712,
-0.5148579478263855,
0.43268606066703796,
0.698428750038147,
1.4366647005081177,
0.1875486820936203,
-0.05304818972945213,
0.3417949676513672,
0.3585507273674011,
-0.10023663938045502,
0.41158756613731384,
1.0583890676498413,
0.5226626396179199,
0.5280764698982239,
0.6149351596832275,
-2.032843828201294,
1.3444353342056274,
-0.9294975399971008,
0.2537820339202881,
1.5702213048934937,
-1.064618706703186,
0.25481855869293213,
-1.6538755893707275,
0.03188197687268257,
0.6683498620986938,
-2.3405961990356445,
0.20760755240917206,
-1.136931300163269,
-0.5721070766448975,
1.0651556253433228,
0.44141799211502075,
-1.2687983512878418,
0.06148238852620125,
-0.48920413851737976,
0.999103307723999,
0.5623610019683838,
1.254325270652771,
-1.6595228910446167,
0.07814981043338776,
-0.30430394411087036,
-0.2602294385433197,
-1.4066327810287476,
-1.5018219947814941,
0.4870627820491791,
0.7427046895027161,
0.7921298742294312,
0.03524531424045563,
0.7730414867401123,
-0.842930793762207,
0.7238865494728088,
-0.7171469926834106,
-1.8023158311843872,
-1.3281071186065674,
-2.4167070388793945,
-2.254129409790039,
0.846226692199707,
-0.43850943446159363,
-0.5515475869178772,
2.033095121383667,
-0.978216290473938,
-1.9553306102752686,
1.0916063785552979,
0.25659698247909546,
0.013679983094334602,
2.3746206760406494,
0.4012727439403534,
-0.6675928831100464,
0.2888684570789337,
-0.5387113690376282,
0.8776835799217224,
-0.511708676815033,
1.2927491664886475,
0.39092811942100525,
-1.0476393699645996,
1.5404256582260132,
-0.49741584062576294,
0.7272396683692932,
-0.7304261326789856,
-0.41992831230163574,
-0.8541954159736633,
0.3392068147659302,
1.8822519779205322,
-0.35914310812950134,
1.6466515064239502,
-0.41763100028038025,
-1.6179397106170654,
-1.713767409324646,
0.7395339012145996,
0.41253402829170227,
-0.787553608417511,
0.2180381864309311,
-0.3902476131916046,
-0.05865876004099846,
-0.06078588217496872,
1.1033508777618408,
1.2781132459640503,
0.4707297682762146,
-0.1788625866174698,
-0.8999184370040894,
0.26918932795524597,
-0.025844713672995567,
-0.7304959297180176,
-1.7082304954528809,
-0.3305646479129791,
0.22701863944530487,
0.5015864372253418,
-1.2828456163406372,
1.7026323080062866,
0.8310952186584473,
2.0339622497558594,
0.9539689421653748,
-0.23568136990070343,
1.3964345455169678,
0.07821972668170929,
1.9782565832138062,
-0.5130377411842346,
0.7053608894348145,
-0.17123627662658691,
-1.1619168519973755,
0.7395291328430176,
-0.5989823937416077,
-1.9727226495742798,
-0.7792030572891235,
-0.9401240944862366,
-0.15559393167495728,
-0.5990087389945984,
1.0216505527496338,
-0.28891220688819885,
-1.1972397565841675,
0.23989079892635345,
-0.7569372653961182,
0.2161691039800644,
-1.3282018899917603,
0.12502998113632202,
0.8289563655853271,
-0.6435216069221497,
0.00485375989228487,
-0.20832523703575134,
-1.4422612190246582,
-0.4140383005142212,
0.40554866194725037,
1.924291968345642,
-0.7694088816642761,
0.9589107632637024,
0.9558103084564209,
-0.8005805015563965,
0.09671971201896667,
0.37344199419021606,
-0.3579045236110687,
0.8877496719360352,
-1.1505011320114136,
-0.22749945521354675,
1.2110928297042847,
-0.27533864974975586,
-0.7041690349578857,
1.5780272483825684,
0.7292798757553101,
-1.1034948825836182,
-0.059364624321460724,
-0.11518371105194092,
-0.8456432223320007,
0.01632736623287201,
-1.6892940998077393,
-0.06900211423635483,
0.12517467141151428,
-1.4100126028060913,
-0.6930835843086243,
-0.20663438737392426,
1.3820908069610596,
-0.02407611906528473,
1.3138062953948975,
-0.35037025809288025,
-0.17074702680110931,
-0.45317697525024414,
-0.42447853088378906,
0.14963674545288086,
-0.35287222266197205,
-0.5307993292808533,
0.36135411262512207,
-0.8063674569129944,
0.2633928656578064,
1.4038965702056885,
0.37084871530532837,
0.18842512369155884,
0.7004695534706116,
0.9507606625556946,
0.3142658770084381,
-0.2790893316268921,
-0.8236581087112427,
-1.6510324478149414,
2.09023380279541,
-1.208483338356018,
1.8957701921463013,
0.7297379970550537,
-0.125035360455513,
-1.7752585411071777,
-1.9570960998535156,
1.4159420728683472,
1.2300803661346436,
2.2542431354522705,
0.5765255689620972,
0.43740078806877136,
-0.75992751121521,
-0.7420471906661987,
0.15829195082187653,
-0.9003576040267944,
-0.7790185213088989,
0.016211632639169693,
2.2225289344787598,
1.8048064708709717,
-0.4883173704147339,
-0.17199864983558655,
-1.0909839868545532,
1.1333593130111694,
-0.28533196449279785,
0.051107246428728104,
1.9989807605743408,
-0.24849803745746613,
-0.9677475690841675,
1.2654461860656738,
-2.3222694396972656,
0.18098150193691254,
2.018022060394287,
0.18036116659641266,
0.13621218502521515,
-1.5534712076187134,
-0.7468256950378418,
-0.3015821874141693,
-0.2431202530860901,
-1.1430929899215698,
0.6648578643798828,
-0.23410937190055847,
-0.9895869493484497,
-1.400149941444397,
0.08791659772396088,
-1.0023193359375,
-1.783277153968811,
0.35538843274116516,
1.841914176940918,
1.8619840145111084,
-0.8308201432228088,
1.4626103639602661,
-0.049400344491004944,
-0.012907028198242188,
1.302794098854065,
1.1986256837844849,
3.2312002182006836,
1.995309829711914,
-1.2165406942367554,
0.7791853547096252,
0.04284819960594177,
-0.46242496371269226,
1.243671178817749,
-1.1372296810150146,
1.2769535779953003,
-0.24024266004562378,
-1.331296682357788,
-1.3527323007583618,
0.9126128554344177,
0.5777068734169006,
0.11089788377285004,
-0.6331260800361633,
1.4394147396087646,
-0.13654255867004395,
1.239861249923706,
0.54336017370224,
-0.4956411123275757,
0.5103100538253784,
-0.3388162851333618,
-0.46855318546295166,
1.5295262336730957,
0.35835346579551697,
-1.5246318578720093,
-2.2693967819213867,
-0.2458438277244568,
-0.8144972920417786,
-0.2012639194726944,
-0.8020658493041992,
-0.9951632022857666,
1.5565288066864014,
0.5598562359809875,
-1.1051043272018433,
-0.47364911437034607,
-0.28441378474235535,
-0.6621599197387695,
2.7936880588531494,
-1.4817103147506714,
-0.18963780999183655,
-1.006695032119751,
-0.30449098348617554,
1.7158215045928955,
-1.261879801750183,
-0.2834634482860565,
-1.184269905090332,
-0.8134932518005371,
-1.1948401927947998,
-0.4718847870826721,
-0.08219796419143677,
-0.8843671083450317,
0.8090765476226807,
-0.025841159746050835,
-1.142490267753601,
-0.08323253691196442,
-1.0196670293807983,
0.9395889043807983,
-0.059232164174318314,
0.1445472240447998,
1.9224952459335327,
0.4632146954536438,
-0.4334601163864136,
0.6675614714622498,
1.3344439268112183,
0.6002657413482666,
-0.7421931028366089,
0.2134513407945633,
-0.6379026770591736,
0.24227139353752136,
-1.4755011796951294,
0.17053894698619843,
-2.8385157585144043,
0.5801725387573242,
-0.18286195397377014,
-0.09622795879840851,
-0.02765505388379097,
-1.1629829406738281,
1.185056447982788,
2.48091721534729,
-1.1569207906723022,
0.49300289154052734,
0.30371445417404175,
1.2671784162521362,
-1.476447343826294,
0.3500745892524719,
-0.4727707505226135,
1.9959535598754883,
0.00710122287273407,
1.089367389678955,
-0.4448598325252533,
-2.0056681632995605,
0.7129120230674744,
-1.3486943244934082,
-0.9524173140525818,
0.7959347367286682,
-0.7856636643409729,
0.13381214439868927,
-1.4002070426940918,
-0.037574924528598785,
-0.7332538366317749,
-1.299269676208496,
0.6907848119735718,
0.12304168939590454,
0.36591073870658875,
-0.5352665185928345,
0.33448874950408936,
-2.1994030475616455,
-1.348705768585205,
-0.20674099028110504,
-1.0331071615219116,
0.3901272118091583,
-0.3188466429710388,
0.6045423150062561,
-0.17639315128326416,
0.11617262661457062,
0.3683609962463379,
1.2440032958984375,
3.3268842697143555,
0.15729066729545593,
0.3482952117919922,
-0.06817466020584106,
-0.9764117002487183,
1.4811850786209106,
1.0259190797805786,
-0.24570181965827942,
-0.6430444717407227,
-0.8500207662582397,
1.337603211402893,
1.9710216522216797,
1.2079683542251587,
0.09251616895198822,
-1.0078990459442139,
-0.7252413034439087,
0.05421432480216026,
0.15893001854419708,
0.46232300996780396,
0.9070108532905579,
0.01711522974073887,
-0.006126146763563156,
1.5446330308914185,
1.110012173652649,
-0.3467271029949188,
0.6410900354385376,
-0.8956279158592224,
-0.45870164036750793,
0.4408109188079834,
0.47831207513809204,
0.15040631592273712,
0.44109809398651123,
-0.9617214202880859,
-0.2715660333633423,
-0.24143807590007782,
-0.8073319792747498,
-0.7866889238357544,
-0.4173550307750702,
-0.33120283484458923,
1.7315665483474731,
0.029708176851272583,
-0.5528513193130493,
-0.15735574066638947,
-0.7844937443733215,
-0.03823469951748848,
-1.0769470930099487,
0.4546326994895935,
-0.06660301238298416,
0.024551138281822205,
-0.04636422544717789,
1.5614104270935059,
-1.1569138765335083,
-2.293429374694824,
0.16204039752483368,
0.28104621171951294,
-0.3753044009208679,
0.09132562577724457,
1.6308118104934692,
0.5220398306846619,
1.4366530179977417,
1.3344608545303345,
0.9952250719070435,
-0.7761802077293396,
-1.3240747451782227,
0.6501086354255676,
1.0026811361312866,
-1.496248483657837,
0.836329996585846,
-0.1343507468700409,
-0.6422944068908691,
0.7418939471244812,
1.2728300094604492,
0.3754383325576782,
-1.795685052871704,
0.9198386669158936,
-0.8687597513198853,
0.938846230506897,
0.6322444677352905,
0.8840828537940979,
0.20648424327373505,
0.7425698041915894,
-1.4070806503295898,
-1.3022332191467285,
-0.7912893891334534,
-0.6039904952049255,
1.9069308042526245,
-0.2156354933977127,
0.4692622125148773,
-0.2736339569091797,
-1.2637237310409546,
-0.13211488723754883,
0.6556236147880554,
0.3155745267868042,
-0.3345627188682556,
0.9455062747001648,
-0.6768110394477844,
-1.0926811695098877,
-1.4330408573150635,
-0.5409466624259949,
-0.9990783929824829,
-0.8196395635604858,
1.070344090461731,
0.7536950707435608,
0.4481021463871002,
1.7895969152450562,
0.5136052370071411,
0.37577101588249207,
-2.5573959350585938,
0.9632067084312439,
0.19131004810333252,
-0.03627242520451546,
0.8435860872268677,
0.3053912818431854,
1.106368064880371,
-0.07893645763397217,
0.447267085313797,
-2.209545612335205,
2.279806137084961,
-0.28971996903419495,
0.461787611246109,
0.009630061686038971,
-0.08433136343955994,
1.1131517887115479,
0.5350039005279541,
0.6308621764183044,
-1.1019169092178345,
0.8000040650367737,
-0.48796597123146057,
1.1176080703735352,
0.9066311120986938,
-0.8854621052742004,
-0.06429856270551682,
1.3321453332901,
0.49170035123825073,
-0.40486952662467957,
-0.9722831845283508,
-0.8554401397705078,
1.0675610303878784,
1.6059435606002808,
0.07020683586597443,
0.15541616082191467,
0.8499943614006042,
0.42051202058792114,
-1.3077788352966309,
0.10848188400268555,
-0.7594017386436462,
-0.615510106086731,
1.6327987909317017,
2.002673625946045,
0.057905782014131546,
-0.14796295762062073,
-0.8094164133071899,
-1.2182438373565674,
0.5931248664855957,
-0.09045891463756561,
0.09307436645030975,
0.7184991836547852,
-0.5968857407569885,
1.0496556758880615,
0.7847440838813782,
0.9872604012489319,
-0.13313372433185577,
0.2617209553718567,
0.41574305295944214,
-0.31347477436065674,
-1.3652056455612183,
-0.3460565507411957,
-1.0440126657485962,
-2.258845090866089,
0.45106205344200134,
-0.3239295780658722,
-1.5234458446502686,
0.0722554624080658,
-1.200433611869812,
1.0471662282943726,
-0.624709963798523,
-0.8798865079879761,
-1.5816140174865723,
0.2087998390197754,
-0.29905176162719727,
0.8400042057037354,
-1.4629874229431152,
-0.19565565884113312,
1.337241291999817,
0.8209100365638733,
-0.6608840823173523,
0.9948493242263794,
0.21035660803318024,
1.0223747491836548,
0.8518702387809753,
-0.3014269471168518,
0.38118186593055725,
0.32815390825271606,
-1.3574576377868652,
0.5767778754234314,
1.175716519355774,
0.23202376067638397,
1.3754349946975708,
-0.6288540959358215,
0.04819951578974724,
0.45516493916511536,
-0.41622650623321533,
-0.4535192549228668,
-0.5471261143684387,
0.7074166536331177,
0.2086135596036911,
-0.9488192200660706,
-0.03828614205121994,
-0.24058058857917786,
-0.21437036991119385,
0.21018657088279724,
-1.6755421161651611,
-0.25887933373451233,
-0.28247570991516113,
-0.533223032951355,
-1.1994556188583374,
0.08513900637626648,
1.3601182699203491,
-0.7575199604034424,
-0.2708398997783661,
0.5387527346611023,
0.4419519901275635,
0.5995872020721436,
0.7228075861930847,
-0.5995469093322754,
-0.07504509389400482,
-0.3252105414867401,
-0.34610337018966675,
0.2612093985080719,
1.3204342126846313,
-0.06792724877595901,
-0.9934384822845459,
0.6598527431488037,
-0.45292773842811584,
0.09330648183822632,
2.0970611572265625,
0.024534843862056732,
-0.8766907453536987,
0.28738996386528015,
-0.7232156991958618,
2.092573642730713,
1.5641423463821411,
1.37440824508667,
-0.0772709846496582,
-0.9547580480575562,
0.5987065434455872,
-0.08988995850086212,
-0.26711809635162354,
0.9243005514144897,
0.5319055318832397,
-0.3788253366947174,
-1.3994125127792358,
0.4908258318901062,
1.216378927230835,
-0.9917017221450806,
-0.8860682249069214,
0.08681283891201019,
-0.875069797039032,
1.0120173692703247,
0.8802485466003418,
0.402035117149353,
0.17580285668373108,
1.5401531457901,
0.680931568145752,
-0.6044023633003235,
0.33119115233421326,
0.4359113276004791,
-0.08951704204082489,
-1.821116328239441,
-0.8388165235519409,
0.48950353264808655,
-0.42688554525375366,
-1.528233289718628,
1.2575119733810425,
-1.1463713645935059,
-0.779884397983551,
0.34224820137023926,
0.1796610951423645,
1.4568886756896973,
0.29860585927963257,
1.6378427743911743,
2.022927761077881,
0.9302191138267517,
0.14186428487300873,
1.3567399978637695,
-0.0777977705001831,
-0.26766437292099,
1.7512221336364746,
-0.28710705041885376,
0.49432438611984253,
1.0346057415008545,
-0.49198246002197266,
-1.0594497919082642,
-0.7815155386924744,
-1.2291184663772583,
-0.5919585824012756,
1.178196907043457,
0.21267865598201752,
-1.1954485177993774,
0.22990287840366364,
1.403885841369629,
0.12271913886070251,
-0.24195674061775208,
0.6096761226654053,
0.5288465023040771,
-0.9162423014640808,
-0.0604502335190773,
-0.8749921917915344,
0.5211264491081238,
-0.058431368321180344,
-0.46787068247795105,
0.33775708079338074,
0.4895969033241272,
1.3358219861984253,
0.0011168532073497772,
0.19421230256557465,
1.2203788757324219,
-1.3155869245529175,
1.5057753324508667,
-0.6743574738502502,
0.1212841272354126,
-2.3803117275238037,
1.4584558010101318,
-0.663651168346405,
1.798846960067749,
-2.6733529567718506,
0.5002488493919373,
-0.630234956741333,
-0.4409469664096832,
0.3076454997062683,
-0.44063764810562134,
0.16712956130504608,
-0.21940390765666962,
-1.133092999458313,
-0.12017650902271271,
-0.696713387966156,
0.5767611265182495,
1.2688747644424438,
1.340097188949585,
-1.08208167552948,
-0.24827249348163605,
-1.7807161808013916,
-0.21315903961658478,
-0.80362468957901,
0.417904257774353,
-1.9623874425888062,
-0.15185856819152832,
-1.836808443069458,
-2.427518129348755,
-1.3860739469528198,
-0.7699516415596008,
1.2052558660507202,
0.2696935832500458,
-1.0654003620147705,
1.1911247968673706,
-0.36529210209846497,
-1.6917093992233276,
0.855917751789093,
-2.279021739959717
] |
https://github.com/huggingface/datasets/issues/5981 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel | I think it's more likely that this issue is related to PyTorch than Datasets, as PyTorch (on import) registers functions to execute when forking a process. Maybe this is the culprit: https://github.com/pytorch/pytorch/issues/99625 | ### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel | 86 | 32 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
I think it's more likely that this issue is related to PyTorch than Datasets, as PyTorch (on import) registers functions to execute when forking a process. Maybe this is the culprit: https://github.com/pytorch/pytorch/issues/99625 | [
-1.2496554851531982,
-0.9369532465934753,
-0.7304201126098633,
1.3868989944458008,
-0.23190772533416748,
-1.2447021007537842,
0.1300009787082672,
-1.1338328123092651,
1.6795960664749146,
-0.7587761878967285,
0.2993144392967224,
-1.6179988384246826,
0.09134577214717865,
-0.54747474193573,
-0.6946514844894409,
-0.8288896083831787,
-0.42443522810935974,
-0.8069019317626953,
1.0916928052902222,
2.496846914291382,
1.2160593271255493,
-1.4346014261245728,
2.6876509189605713,
0.7444043159484863,
-0.24786441028118134,
-0.9035404324531555,
0.578155517578125,
0.002724418416619301,
-1.3704438209533691,
-0.48280230164527893,
-0.918004035949707,
-0.036244045943021774,
-0.5404199361801147,
-0.46274638175964355,
0.08445379883050919,
0.33098873496055603,
-0.21643327176570892,
-0.4131343364715576,
-0.5216487646102905,
-0.7374775409698486,
0.4837293028831482,
-0.39371833205223083,
0.964699387550354,
-0.3715108633041382,
1.7509585618972778,
-0.5298720002174377,
0.44128280878067017,
0.7386959791183472,
1.3209880590438843,
0.16211174428462982,
-0.05951099097728729,
0.32169994711875916,
0.41405612230300903,
-0.07557352632284164,
0.4946023225784302,
1.2029811143875122,
0.6316015124320984,
0.43229934573173523,
0.7586647272109985,
-2.1682753562927246,
1.2599384784698486,
-0.9202399253845215,
0.3076621890068054,
1.3438031673431396,
-0.9317667484283447,
0.417418897151947,
-1.7616260051727295,
-0.02516108751296997,
0.5552957653999329,
-2.304074287414551,
0.21225586533546448,
-1.2295708656311035,
-0.482122540473938,
0.9969448447227478,
0.2884232699871063,
-1.269094467163086,
0.18760153651237488,
-0.5443480014801025,
1.0086580514907837,
0.4279562532901764,
1.1625080108642578,
-1.6807861328125,
-0.0996745377779007,
-0.3013325333595276,
0.1552778035402298,
-1.3428555727005005,
-1.4846197366714478,
0.5127001404762268,
0.6697257161140442,
0.5012916922569275,
-0.11979606747627258,
1.013219952583313,
-0.9945188164710999,
0.8439663648605347,
-0.9480711817741394,
-1.6744413375854492,
-1.418093204498291,
-2.2500667572021484,
-2.1983232498168945,
0.7954909801483154,
-0.532914936542511,
-0.47964727878570557,
2.0874626636505127,
-1.0799616575241089,
-1.801228404045105,
1.218105435371399,
0.2524367868900299,
0.022493455559015274,
2.3463425636291504,
0.19457682967185974,
-0.7949062585830688,
0.4876455068588257,
-0.6892645359039307,
0.7877563238143921,
-0.545533299446106,
1.3000446557998657,
0.36138322949409485,
-0.9554595351219177,
1.5113613605499268,
-0.48961955308914185,
0.6289807558059692,
-0.6826876997947693,
-0.5543164610862732,
-0.761146605014801,
0.41531699895858765,
1.9634500741958618,
-0.33605360984802246,
1.5553044080734253,
-0.37963175773620605,
-1.6258183717727661,
-1.6440578699111938,
0.8493288159370422,
0.6484847664833069,
-0.6950958371162415,
0.14412936568260193,
-0.3300896883010864,
0.056851182132959366,
-0.06371360272169113,
1.0559155941009521,
1.3463175296783447,
0.7311707139015198,
-0.2560775578022003,
-0.9173839092254639,
0.19929490983486176,
-0.18830794095993042,
-0.6429191827774048,
-1.819454550743103,
-0.34936511516571045,
0.18290698528289795,
0.5953282713890076,
-1.3120112419128418,
1.7409319877624512,
0.9952911734580994,
2.0276620388031006,
0.9817304015159607,
-0.30836251378059387,
1.498248815536499,
0.14568345248699188,
1.7904603481292725,
-0.4042743444442749,
0.6754785180091858,
-0.41684573888778687,
-1.140488862991333,
0.890217661857605,
-0.31647416949272156,
-2.0053212642669678,
-0.7030441761016846,
-0.8169105648994446,
-0.22481094300746918,
-0.7788003087043762,
0.9642364382743835,
-0.2728481888771057,
-1.3253077268600464,
0.2969941198825836,
-0.7376214861869812,
0.07261910289525986,
-1.196746587753296,
0.2700982987880707,
0.6814137697219849,
-0.6389196515083313,
0.027455341070890427,
-0.2006441205739975,
-1.3027704954147339,
-0.443205863237381,
0.23808330297470093,
1.8204272985458374,
-0.8465002179145813,
0.972174882888794,
1.0307317972183228,
-0.6368727087974548,
0.07168139517307281,
0.3971523344516754,
-0.39204081892967224,
0.851189136505127,
-1.0502439737319946,
-0.3176497519016266,
1.1741801500320435,
-0.17275072634220123,
-0.5350353717803955,
1.4038677215576172,
0.6820642352104187,
-1.0376547574996948,
-0.22939908504486084,
-0.1289074718952179,
-0.8896992802619934,
0.020940180867910385,
-1.6537132263183594,
-0.13558140397071838,
0.2742048501968384,
-1.531412124633789,
-0.4668619632720947,
-0.2205474078655243,
1.278609037399292,
-0.13699591159820557,
1.4836156368255615,
-0.4085005819797516,
-0.0967646986246109,
-0.4109683334827423,
-0.47623535990715027,
0.14901825785636902,
-0.22345149517059326,
-0.637085497379303,
0.2364262342453003,
-0.8024742007255554,
0.30782637000083923,
1.4206756353378296,
0.3515836000442505,
0.026681069284677505,
0.5190709829330444,
1.0498106479644775,
0.37385451793670654,
-0.055701326578855515,
-0.9016979932785034,
-1.5457366704940796,
2.032393217086792,
-1.4928593635559082,
2.0027916431427,
0.825839638710022,
0.02723091095685959,
-1.798795223236084,
-1.929731845855713,
1.3254413604736328,
1.1167535781860352,
2.286529064178467,
0.5528631806373596,
0.37889784574508667,
-0.782159686088562,
-0.695630669593811,
0.33869537711143494,
-1.0639904737472534,
-0.809855580329895,
0.06405729055404663,
2.4390029907226562,
1.6643110513687134,
-0.44670891761779785,
-0.1989310085773468,
-0.9288330674171448,
1.4009926319122314,
-0.105152428150177,
0.2251908779144287,
1.9999843835830688,
-0.20293180644512177,
-1.0538604259490967,
1.2251359224319458,
-2.3389995098114014,
0.18561848998069763,
1.9486907720565796,
0.27074459195137024,
0.17188984155654907,
-1.3562772274017334,
-0.6434932947158813,
-0.25713440775871277,
-0.45312440395355225,
-1.2051637172698975,
0.5514012575149536,
-0.3241307735443115,
-0.8295629024505615,
-1.4422835111618042,
0.16277897357940674,
-1.2095835208892822,
-1.654083251953125,
0.2751747667789459,
1.9251594543457031,
2.0769617557525635,
-0.7837660312652588,
1.5272287130355835,
-0.32710862159729004,
0.05561578646302223,
1.2243432998657227,
1.2350850105285645,
3.125135898590088,
1.911175012588501,
-1.2551366090774536,
0.6098597645759583,
-0.2038365751504898,
-0.4124471843242645,
1.0737364292144775,
-1.142699122428894,
1.2915135622024536,
-0.10872665792703629,
-1.1845048666000366,
-1.1208657026290894,
0.9239354729652405,
0.5152503848075867,
0.15937091410160065,
-0.48664674162864685,
1.2406268119812012,
0.07670406997203827,
1.3493366241455078,
0.5071917772293091,
-0.30267900228500366,
0.6618563532829285,
-0.379830002784729,
-0.5636439919471741,
1.525280237197876,
0.1176733672618866,
-1.4570438861846924,
-2.328198194503784,
-0.20362529158592224,
-0.8257858157157898,
-0.0073185330256819725,
-0.637005090713501,
-1.0146400928497314,
1.6049433946609497,
0.34231582283973694,
-1.2747178077697754,
-0.23690707981586456,
-0.3099140524864197,
-0.5474039912223816,
2.6068897247314453,
-1.4992172718048096,
-0.2199026346206665,
-0.956994354724884,
-0.5124185681343079,
1.5804407596588135,
-1.248510718345642,
-0.24834796786308289,
-1.068743348121643,
-0.5389865040779114,
-1.2405674457550049,
-0.5904672145843506,
-0.06807427108287811,
-0.9171645641326904,
0.784670889377594,
0.25524696707725525,
-1.1576194763183594,
-0.31198176741600037,
-0.8940016627311707,
0.8653877973556519,
0.01696450635790825,
0.2706219255924225,
1.892830491065979,
0.3947021961212158,
-0.36510056257247925,
0.7328822016716003,
1.199540138244629,
0.6034320592880249,
-0.6268425583839417,
0.1369476020336151,
-0.6528241634368896,
0.4274851679801941,
-1.2903532981872559,
0.2314770370721817,
-2.8069076538085938,
0.7002737522125244,
-0.0695946216583252,
-0.10350623726844788,
-0.005301161669194698,
-1.346009373664856,
1.0669368505477905,
2.7024378776550293,
-1.0759739875793457,
0.47627249360084534,
0.3310399651527405,
1.207049012184143,
-1.6020101308822632,
0.3433278799057007,
-0.4407678544521332,
2.133345365524292,
0.18294264376163483,
1.1901919841766357,
-0.4802466928958893,
-2.3336427211761475,
0.5808389782905579,
-1.237883448600769,
-1.1880838871002197,
0.8118108510971069,
-0.7867207527160645,
0.0436251126229763,
-1.4550036191940308,
-0.17359808087348938,
-0.8372124433517456,
-1.2048176527023315,
0.6714826226234436,
0.18782775104045868,
0.4702485203742981,
-0.6334338784217834,
0.34127309918403625,
-2.2083516120910645,
-1.3770687580108643,
-0.2694438695907593,
-0.9156135320663452,
0.5255404710769653,
-0.31629785895347595,
0.737605094909668,
-0.16500981152057648,
0.045189470052719116,
0.38446682691574097,
1.3824777603149414,
3.425192356109619,
0.1513192057609558,
0.31828057765960693,
-0.26407289505004883,
-0.9186105132102966,
1.4038679599761963,
0.9997699856758118,
-0.2166202962398529,
-0.6168762445449829,
-0.9922822713851929,
1.2276157140731812,
1.9998379945755005,
0.9721026420593262,
0.02017543837428093,
-0.8213391900062561,
-0.7625648379325867,
-0.025638267397880554,
0.11249755322933197,
0.5032016038894653,
0.9877642393112183,
0.03630993887782097,
0.08723509311676025,
1.4817423820495605,
1.1660088300704956,
-0.4202132523059845,
0.3933742642402649,
-0.83567214012146,
-0.4393511116504669,
0.5068315267562866,
0.41806820034980774,
0.0595349557697773,
0.3297956883907318,
-0.9053331017494202,
-0.2541276812553406,
-0.34969112277030945,
-0.9961427450180054,
-0.7276299595832825,
-0.3893185555934906,
-0.3222809433937073,
1.7419660091400146,
0.1223101019859314,
-0.40653929114341736,
-0.018635500222444534,
-0.7255570292472839,
-0.06818500906229019,
-1.0779598951339722,
0.305976003408432,
-0.1409689337015152,
-0.05594901740550995,
-0.06445901840925217,
1.7901350259780884,
-0.922298789024353,
-2.0459468364715576,
0.24573713541030884,
0.23024499416351318,
-0.3086869418621063,
0.20335255563259125,
1.684962511062622,
0.5973765254020691,
1.453199028968811,
1.2969547510147095,
0.9143499135971069,
-0.6906986236572266,
-1.3117882013320923,
0.7004081606864929,
0.9681937098503113,
-1.4520807266235352,
0.7071775197982788,
0.004653513431549072,
-0.4932507574558258,
0.6739985346794128,
1.3208141326904297,
0.5239319801330566,
-2.061572313308716,
0.8151466250419617,
-0.9281800985336304,
0.8148376941680908,
0.7515201568603516,
0.7557370662689209,
0.25196388363838196,
0.7745082974433899,
-1.310015082359314,
-1.1690672636032104,
-0.7631956338882446,
-0.6726637482643127,
2.0086376667022705,
-0.2336500734090805,
0.5214792490005493,
-0.20870882272720337,
-1.3771655559539795,
-0.14878737926483154,
0.6710228323936462,
0.32542914152145386,
-0.33493518829345703,
0.7049499154090881,
-0.7410106062889099,
-1.107067584991455,
-1.4648441076278687,
-0.41135087609291077,
-0.9222659468650818,
-0.977228581905365,
1.0128087997436523,
0.7918792963027954,
0.3110341727733612,
1.9202635288238525,
0.5954186320304871,
0.28219011425971985,
-2.6041693687438965,
0.9882183074951172,
0.31049808859825134,
-0.14328685402870178,
0.9273508787155151,
0.22024887800216675,
1.0332279205322266,
-0.002724563702940941,
0.5757074356079102,
-2.421882390975952,
2.2748451232910156,
-0.22172801196575165,
0.7213812470436096,
0.02857578545808792,
-0.15730200707912445,
1.0646119117736816,
0.6271631121635437,
0.5615155696868896,
-1.100206971168518,
0.6744051575660706,
-0.7007373571395874,
1.2382657527923584,
0.8465636968612671,
-0.8457129597663879,
0.008344084955751896,
1.3082247972488403,
0.39585134387016296,
-0.5525015592575073,
-0.9137187004089355,
-0.9851541519165039,
0.9346296191215515,
1.7881431579589844,
-0.08129439502954483,
0.012472179718315601,
0.7516831755638123,
0.6471748352050781,
-1.4041314125061035,
0.10161901265382767,
-0.8096791505813599,
-0.7722116708755493,
1.6094622611999512,
1.9959501028060913,
-0.06098555400967598,
-0.16319985687732697,
-0.7169173955917358,
-1.3104557991027832,
0.7403313517570496,
-0.012661255896091461,
0.18049123883247375,
0.5375035405158997,
-0.6430454850196838,
1.1713829040527344,
0.9066904783248901,
0.9105513691902161,
0.14161604642868042,
0.24981006979942322,
0.3336731493473053,
-0.3178354501724243,
-1.1247494220733643,
-0.28891509771347046,
-1.0517321825027466,
-2.6035821437835693,
0.38234177231788635,
-0.20518559217453003,
-1.4603732824325562,
0.016681652516126633,
-0.9866037964820862,
0.8578700423240662,
-0.5658125281333923,
-1.1316051483154297,
-1.5460129976272583,
0.21341507136821747,
-0.14411190152168274,
0.8848318457603455,
-1.5620540380477905,
-0.14812931418418884,
1.2016252279281616,
0.9516790509223938,
-0.6296328902244568,
1.0693047046661377,
0.22569380700588226,
0.9421817064285278,
0.8466616272926331,
-0.40005162358283997,
0.4794403314590454,
0.07283090054988861,
-1.3170645236968994,
0.4522310197353363,
1.1932940483093262,
0.20829711854457855,
1.3856734037399292,
-0.6393051147460938,
0.004139757715165615,
0.3914358913898468,
-0.5027619004249573,
-0.4506320059299469,
-0.5547241568565369,
0.7255512475967407,
0.12556107342243195,
-0.9117255806922913,
-0.022532856091856956,
-0.13314877450466156,
-0.28926172852516174,
0.22984308004379272,
-1.4516565799713135,
-0.13911816477775574,
-0.3835517168045044,
-0.554914116859436,
-1.2815662622451782,
0.03147513419389725,
1.3980531692504883,
-0.7687643766403198,
-0.16628557443618774,
0.479046493768692,
0.4045940935611725,
0.5184080600738525,
0.7755421996116638,
-0.7039514183998108,
-0.4187728464603424,
-0.24022522568702698,
-0.3034406006336212,
0.2581767439842224,
1.3262913227081299,
-0.03473522886633873,
-1.0103299617767334,
0.7069124579429626,
-0.4319702982902527,
0.01772349327802658,
1.9456188678741455,
0.11624537408351898,
-0.7808927297592163,
0.34624215960502625,
-0.7468394637107849,
1.8711488246917725,
1.7157999277114868,
1.281022071838379,
-0.07845847308635712,
-0.977736234664917,
0.6846318244934082,
-0.2611069977283478,
-0.32064133882522583,
1.0114644765853882,
0.4360540509223938,
-0.273315966129303,
-1.4427998065948486,
0.5724431276321411,
1.203717827796936,
-0.8046002984046936,
-0.7748218774795532,
0.03386242315173149,
-0.8363367915153503,
1.0919922590255737,
0.7615997791290283,
0.4288320541381836,
0.26119503378868103,
1.6600935459136963,
0.7837945222854614,
-0.5730447173118591,
0.5589990019798279,
0.4657810628414154,
-0.1763095110654831,
-2.122002124786377,
-1.0744719505310059,
0.3438607156276703,
-0.4100356996059418,
-1.534675121307373,
1.439168095588684,
-1.0964434146881104,
-0.9561381340026855,
0.49512243270874023,
0.04271160438656807,
1.358553409576416,
0.2832183837890625,
1.60648775100708,
2.0959277153015137,
0.900648295879364,
0.3207016885280609,
1.2413322925567627,
-0.13036002218723297,
-0.41796958446502686,
1.8223291635513306,
-0.44715195894241333,
0.4765298664569855,
1.008424162864685,
-0.3523772060871124,
-1.0141867399215698,
-0.7410483956336975,
-1.193632960319519,
-0.727595865726471,
1.1605665683746338,
0.07734592258930206,
-1.0691266059875488,
0.25775399804115295,
1.6295502185821533,
0.11260109394788742,
-0.29968222975730896,
0.6412267684936523,
0.5102062225341797,
-0.829412043094635,
-0.1129634901881218,
-0.9220620393753052,
0.452857106924057,
-0.10337527841329575,
-0.34187331795692444,
0.36087697744369507,
0.45977896451950073,
1.3194363117218018,
-0.04394790902733803,
0.09617045521736145,
1.1434842348098755,
-1.4588733911514282,
1.4500237703323364,
-0.7147017121315002,
0.28788527846336365,
-2.32930850982666,
1.3928172588348389,
-0.7777834534645081,
1.920954704284668,
-2.631635904312134,
0.3952416181564331,
-0.6409314274787903,
-0.4269620478153229,
0.3380570709705353,
-0.32895195484161377,
0.1709107607603073,
-0.17822733521461487,
-1.0614451169967651,
-0.07369719445705414,
-0.7231046557426453,
0.665551483631134,
1.0851929187774658,
1.2471576929092407,
-1.0810612440109253,
-0.2736836075782776,
-1.6795166730880737,
-0.16141796112060547,
-0.703357994556427,
0.37544330954551697,
-2.0460610389709473,
-0.12975487112998962,
-2.086848258972168,
-2.3258731365203857,
-1.4089432954788208,
-0.8059500455856323,
1.1655547618865967,
0.17389516532421112,
-0.8727100491523743,
1.1799873113632202,
-0.3736458122730255,
-1.8317124843597412,
1.0710307359695435,
-2.162555456161499
] |
https://github.com/huggingface/datasets/issues/5981 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel | From reading that ticket, it may be down in mkl? Is it worth hotfixing in the meantime, with the express intention of turning it off? I know that's a horribly crufty solution, but it's also deeply frustrating to be limited to 2 cores for operations as simple as filtration. | ### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel | 86 | 49 | Only two cores are getting used in sagemaker with pytorch 3.10 kernel
### Describe the bug
When using the newer pytorch 3.10 kernel, only 2 cores are being used by huggingface filter and map functions. The Pytorch 3.9 kernel would use as many cores as specified in the num_proc field.
We have solved this in our own code by placing the following snippet in the code that is called inside subprocesses:
```os.sched_setaffinity(0, {i for i in range(1000)})```
The problem, as near as we can tell, us that once upon a time, cpu affinity was set using a bitmask ("0xfffff" and the like), and affinity recently changed to a list of processors rather than to using the mask. As such, only processors 1 and 17 are shown to be working in htop.
![Selection_072](https://github.com/huggingface/datasets/assets/107141022/04c5a824-5321-4531-afca-7bc84dff36b4)
When running functions via `map`, the above resetting of affinity works to spread across the cores. When using `filter`, however, only two cores are active.
### Steps to reproduce the bug
Repro steps:
1. Create an aws sagemaker instance
2. use the pytorch 3_10 kernel
3. Load a dataset
4. run a filter operation
5. watch as only 2 cores are used when num_proc > 2
6. run a map operation
7. watch as only 2 cores are used when num_proc > 2
8. run a map operation with processor affinity reset inside the function called via map
9. Watch as all cores run
### Expected behavior
All specified cores are used via the num_proc argument.
### Environment info
AWS sagemaker with the following init script run in the terminal after instance creation:
conda init bash
bash
conda activate pytorch_p310
pip install Wand PyPDF pytesseract datasets seqeval pdfplumber transformers pymupdf sentencepiece timm donut-python accelerate optimum xgboost
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
sudo yum -y install htop
sudo yum -y update
sudo yum -y install wget libstdc++ autoconf automake libtool autoconf-archive pkg-config gcc gcc-c++ make libjpeg-devel libpng-devel libtiff-devel zlib-devel
From reading that ticket, it may be down in mkl? Is it worth hotfixing in the meantime, with the express intention of turning it off? I know that's a horribly crufty solution, but it's also deeply frustrating to be limited to 2 cores for operations as simple as filtration. | [
-1.2496554851531982,
-0.9369532465934753,
-0.7304201126098633,
1.3868989944458008,
-0.23190772533416748,
-1.2447021007537842,
0.1300009787082672,
-1.1338328123092651,
1.6795960664749146,
-0.7587761878967285,
0.2993144392967224,
-1.6179988384246826,
0.09134577214717865,
-0.54747474193573,
-0.6946514844894409,
-0.8288896083831787,
-0.42443522810935974,
-0.8069019317626953,
1.0916928052902222,
2.496846914291382,
1.2160593271255493,
-1.4346014261245728,
2.6876509189605713,
0.7444043159484863,
-0.24786441028118134,
-0.9035404324531555,
0.578155517578125,
0.002724418416619301,
-1.3704438209533691,
-0.48280230164527893,
-0.918004035949707,
-0.036244045943021774,
-0.5404199361801147,
-0.46274638175964355,
0.08445379883050919,
0.33098873496055603,
-0.21643327176570892,
-0.4131343364715576,
-0.5216487646102905,
-0.7374775409698486,
0.4837293028831482,
-0.39371833205223083,
0.964699387550354,
-0.3715108633041382,
1.7509585618972778,
-0.5298720002174377,
0.44128280878067017,
0.7386959791183472,
1.3209880590438843,
0.16211174428462982,
-0.05951099097728729,
0.32169994711875916,
0.41405612230300903,
-0.07557352632284164,
0.4946023225784302,
1.2029811143875122,
0.6316015124320984,
0.43229934573173523,
0.7586647272109985,
-2.1682753562927246,
1.2599384784698486,
-0.9202399253845215,
0.3076621890068054,
1.3438031673431396,
-0.9317667484283447,
0.417418897151947,
-1.7616260051727295,
-0.02516108751296997,
0.5552957653999329,
-2.304074287414551,
0.21225586533546448,
-1.2295708656311035,
-0.482122540473938,
0.9969448447227478,
0.2884232699871063,
-1.269094467163086,
0.18760153651237488,
-0.5443480014801025,
1.0086580514907837,
0.4279562532901764,
1.1625080108642578,
-1.6807861328125,
-0.0996745377779007,
-0.3013325333595276,
0.1552778035402298,
-1.3428555727005005,
-1.4846197366714478,
0.5127001404762268,
0.6697257161140442,
0.5012916922569275,
-0.11979606747627258,
1.013219952583313,
-0.9945188164710999,
0.8439663648605347,
-0.9480711817741394,
-1.6744413375854492,
-1.418093204498291,
-2.2500667572021484,
-2.1983232498168945,
0.7954909801483154,
-0.532914936542511,
-0.47964727878570557,
2.0874626636505127,
-1.0799616575241089,
-1.801228404045105,
1.218105435371399,
0.2524367868900299,
0.022493455559015274,
2.3463425636291504,
0.19457682967185974,
-0.7949062585830688,
0.4876455068588257,
-0.6892645359039307,
0.7877563238143921,
-0.545533299446106,
1.3000446557998657,
0.36138322949409485,
-0.9554595351219177,
1.5113613605499268,
-0.48961955308914185,
0.6289807558059692,
-0.6826876997947693,
-0.5543164610862732,
-0.761146605014801,
0.41531699895858765,
1.9634500741958618,
-0.33605360984802246,
1.5553044080734253,
-0.37963175773620605,
-1.6258183717727661,
-1.6440578699111938,
0.8493288159370422,
0.6484847664833069,
-0.6950958371162415,
0.14412936568260193,
-0.3300896883010864,
0.056851182132959366,
-0.06371360272169113,
1.0559155941009521,
1.3463175296783447,
0.7311707139015198,
-0.2560775578022003,
-0.9173839092254639,
0.19929490983486176,
-0.18830794095993042,
-0.6429191827774048,
-1.819454550743103,
-0.34936511516571045,
0.18290698528289795,
0.5953282713890076,
-1.3120112419128418,
1.7409319877624512,
0.9952911734580994,
2.0276620388031006,
0.9817304015159607,
-0.30836251378059387,
1.498248815536499,
0.14568345248699188,
1.7904603481292725,
-0.4042743444442749,
0.6754785180091858,
-0.41684573888778687,
-1.140488862991333,
0.890217661857605,
-0.31647416949272156,
-2.0053212642669678,
-0.7030441761016846,
-0.8169105648994446,
-0.22481094300746918,
-0.7788003087043762,
0.9642364382743835,
-0.2728481888771057,
-1.3253077268600464,
0.2969941198825836,
-0.7376214861869812,
0.07261910289525986,
-1.196746587753296,
0.2700982987880707,
0.6814137697219849,
-0.6389196515083313,
0.027455341070890427,
-0.2006441205739975,
-1.3027704954147339,
-0.443205863237381,
0.23808330297470093,
1.8204272985458374,
-0.8465002179145813,
0.972174882888794,
1.0307317972183228,
-0.6368727087974548,
0.07168139517307281,
0.3971523344516754,
-0.39204081892967224,
0.851189136505127,
-1.0502439737319946,
-0.3176497519016266,
1.1741801500320435,
-0.17275072634220123,
-0.5350353717803955,
1.4038677215576172,
0.6820642352104187,
-1.0376547574996948,
-0.22939908504486084,
-0.1289074718952179,
-0.8896992802619934,
0.020940180867910385,
-1.6537132263183594,
-0.13558140397071838,
0.2742048501968384,
-1.531412124633789,
-0.4668619632720947,
-0.2205474078655243,
1.278609037399292,
-0.13699591159820557,
1.4836156368255615,
-0.4085005819797516,
-0.0967646986246109,
-0.4109683334827423,
-0.47623535990715027,
0.14901825785636902,
-0.22345149517059326,
-0.637085497379303,
0.2364262342453003,
-0.8024742007255554,
0.30782637000083923,
1.4206756353378296,
0.3515836000442505,
0.026681069284677505,
0.5190709829330444,
1.0498106479644775,
0.37385451793670654,
-0.055701326578855515,
-0.9016979932785034,
-1.5457366704940796,
2.032393217086792,
-1.4928593635559082,
2.0027916431427,
0.825839638710022,
0.02723091095685959,
-1.798795223236084,
-1.929731845855713,
1.3254413604736328,
1.1167535781860352,
2.286529064178467,
0.5528631806373596,
0.37889784574508667,
-0.782159686088562,
-0.695630669593811,
0.33869537711143494,
-1.0639904737472534,
-0.809855580329895,
0.06405729055404663,
2.4390029907226562,
1.6643110513687134,
-0.44670891761779785,
-0.1989310085773468,
-0.9288330674171448,
1.4009926319122314,
-0.105152428150177,
0.2251908779144287,
1.9999843835830688,
-0.20293180644512177,
-1.0538604259490967,
1.2251359224319458,
-2.3389995098114014,
0.18561848998069763,
1.9486907720565796,
0.27074459195137024,
0.17188984155654907,
-1.3562772274017334,
-0.6434932947158813,
-0.25713440775871277,
-0.45312440395355225,
-1.2051637172698975,
0.5514012575149536,
-0.3241307735443115,
-0.8295629024505615,
-1.4422835111618042,
0.16277897357940674,
-1.2095835208892822,
-1.654083251953125,
0.2751747667789459,
1.9251594543457031,
2.0769617557525635,
-0.7837660312652588,
1.5272287130355835,
-0.32710862159729004,
0.05561578646302223,
1.2243432998657227,
1.2350850105285645,
3.125135898590088,
1.911175012588501,
-1.2551366090774536,
0.6098597645759583,
-0.2038365751504898,
-0.4124471843242645,
1.0737364292144775,
-1.142699122428894,
1.2915135622024536,
-0.10872665792703629,
-1.1845048666000366,
-1.1208657026290894,
0.9239354729652405,
0.5152503848075867,
0.15937091410160065,
-0.48664674162864685,
1.2406268119812012,
0.07670406997203827,
1.3493366241455078,
0.5071917772293091,
-0.30267900228500366,
0.6618563532829285,
-0.379830002784729,
-0.5636439919471741,
1.525280237197876,
0.1176733672618866,
-1.4570438861846924,
-2.328198194503784,
-0.20362529158592224,
-0.8257858157157898,
-0.0073185330256819725,
-0.637005090713501,
-1.0146400928497314,
1.6049433946609497,
0.34231582283973694,
-1.2747178077697754,
-0.23690707981586456,
-0.3099140524864197,
-0.5474039912223816,
2.6068897247314453,
-1.4992172718048096,
-0.2199026346206665,
-0.956994354724884,
-0.5124185681343079,
1.5804407596588135,
-1.248510718345642,
-0.24834796786308289,
-1.068743348121643,
-0.5389865040779114,
-1.2405674457550049,
-0.5904672145843506,
-0.06807427108287811,
-0.9171645641326904,
0.784670889377594,
0.25524696707725525,
-1.1576194763183594,
-0.31198176741600037,
-0.8940016627311707,
0.8653877973556519,
0.01696450635790825,
0.2706219255924225,
1.892830491065979,
0.3947021961212158,
-0.36510056257247925,
0.7328822016716003,
1.199540138244629,
0.6034320592880249,
-0.6268425583839417,
0.1369476020336151,
-0.6528241634368896,
0.4274851679801941,
-1.2903532981872559,
0.2314770370721817,
-2.8069076538085938,
0.7002737522125244,
-0.0695946216583252,
-0.10350623726844788,
-0.005301161669194698,
-1.346009373664856,
1.0669368505477905,
2.7024378776550293,
-1.0759739875793457,
0.47627249360084534,
0.3310399651527405,
1.207049012184143,
-1.6020101308822632,
0.3433278799057007,
-0.4407678544521332,
2.133345365524292,
0.18294264376163483,
1.1901919841766357,
-0.4802466928958893,
-2.3336427211761475,
0.5808389782905579,
-1.237883448600769,
-1.1880838871002197,
0.8118108510971069,
-0.7867207527160645,
0.0436251126229763,
-1.4550036191940308,
-0.17359808087348938,
-0.8372124433517456,
-1.2048176527023315,
0.6714826226234436,
0.18782775104045868,
0.4702485203742981,
-0.6334338784217834,
0.34127309918403625,
-2.2083516120910645,
-1.3770687580108643,
-0.2694438695907593,
-0.9156135320663452,
0.5255404710769653,
-0.31629785895347595,
0.737605094909668,
-0.16500981152057648,
0.045189470052719116,
0.38446682691574097,
1.3824777603149414,
3.425192356109619,
0.1513192057609558,
0.31828057765960693,
-0.26407289505004883,
-0.9186105132102966,
1.4038679599761963,
0.9997699856758118,
-0.2166202962398529,
-0.6168762445449829,
-0.9922822713851929,
1.2276157140731812,
1.9998379945755005,
0.9721026420593262,
0.02017543837428093,
-0.8213391900062561,
-0.7625648379325867,
-0.025638267397880554,
0.11249755322933197,
0.5032016038894653,
0.9877642393112183,
0.03630993887782097,
0.08723509311676025,
1.4817423820495605,
1.1660088300704956,
-0.4202132523059845,
0.3933742642402649,
-0.83567214012146,
-0.4393511116504669,
0.5068315267562866,
0.41806820034980774,
0.0595349557697773,
0.3297956883907318,
-0.9053331017494202,
-0.2541276812553406,
-0.34969112277030945,
-0.9961427450180054,
-0.7276299595832825,
-0.3893185555934906,
-0.3222809433937073,
1.7419660091400146,
0.1223101019859314,
-0.40653929114341736,
-0.018635500222444534,
-0.7255570292472839,
-0.06818500906229019,
-1.0779598951339722,
0.305976003408432,
-0.1409689337015152,
-0.05594901740550995,
-0.06445901840925217,
1.7901350259780884,
-0.922298789024353,
-2.0459468364715576,
0.24573713541030884,
0.23024499416351318,
-0.3086869418621063,
0.20335255563259125,
1.684962511062622,
0.5973765254020691,
1.453199028968811,
1.2969547510147095,
0.9143499135971069,
-0.6906986236572266,
-1.3117882013320923,
0.7004081606864929,
0.9681937098503113,
-1.4520807266235352,
0.7071775197982788,
0.004653513431549072,
-0.4932507574558258,
0.6739985346794128,
1.3208141326904297,
0.5239319801330566,
-2.061572313308716,
0.8151466250419617,
-0.9281800985336304,
0.8148376941680908,
0.7515201568603516,
0.7557370662689209,
0.25196388363838196,
0.7745082974433899,
-1.310015082359314,
-1.1690672636032104,
-0.7631956338882446,
-0.6726637482643127,
2.0086376667022705,
-0.2336500734090805,
0.5214792490005493,
-0.20870882272720337,
-1.3771655559539795,
-0.14878737926483154,
0.6710228323936462,
0.32542914152145386,
-0.33493518829345703,
0.7049499154090881,
-0.7410106062889099,
-1.107067584991455,
-1.4648441076278687,
-0.41135087609291077,
-0.9222659468650818,
-0.977228581905365,
1.0128087997436523,
0.7918792963027954,
0.3110341727733612,
1.9202635288238525,
0.5954186320304871,
0.28219011425971985,
-2.6041693687438965,
0.9882183074951172,
0.31049808859825134,
-0.14328685402870178,
0.9273508787155151,
0.22024887800216675,
1.0332279205322266,
-0.002724563702940941,
0.5757074356079102,
-2.421882390975952,
2.2748451232910156,
-0.22172801196575165,
0.7213812470436096,
0.02857578545808792,
-0.15730200707912445,
1.0646119117736816,
0.6271631121635437,
0.5615155696868896,
-1.100206971168518,
0.6744051575660706,
-0.7007373571395874,
1.2382657527923584,
0.8465636968612671,
-0.8457129597663879,
0.008344084955751896,
1.3082247972488403,
0.39585134387016296,
-0.5525015592575073,
-0.9137187004089355,
-0.9851541519165039,
0.9346296191215515,
1.7881431579589844,
-0.08129439502954483,
0.012472179718315601,
0.7516831755638123,
0.6471748352050781,
-1.4041314125061035,
0.10161901265382767,
-0.8096791505813599,
-0.7722116708755493,
1.6094622611999512,
1.9959501028060913,
-0.06098555400967598,
-0.16319985687732697,
-0.7169173955917358,
-1.3104557991027832,
0.7403313517570496,
-0.012661255896091461,
0.18049123883247375,
0.5375035405158997,
-0.6430454850196838,
1.1713829040527344,
0.9066904783248901,
0.9105513691902161,
0.14161604642868042,
0.24981006979942322,
0.3336731493473053,
-0.3178354501724243,
-1.1247494220733643,
-0.28891509771347046,
-1.0517321825027466,
-2.6035821437835693,
0.38234177231788635,
-0.20518559217453003,
-1.4603732824325562,
0.016681652516126633,
-0.9866037964820862,
0.8578700423240662,
-0.5658125281333923,
-1.1316051483154297,
-1.5460129976272583,
0.21341507136821747,
-0.14411190152168274,
0.8848318457603455,
-1.5620540380477905,
-0.14812931418418884,
1.2016252279281616,
0.9516790509223938,
-0.6296328902244568,
1.0693047046661377,
0.22569380700588226,
0.9421817064285278,
0.8466616272926331,
-0.40005162358283997,
0.4794403314590454,
0.07283090054988861,
-1.3170645236968994,
0.4522310197353363,
1.1932940483093262,
0.20829711854457855,
1.3856734037399292,
-0.6393051147460938,
0.004139757715165615,
0.3914358913898468,
-0.5027619004249573,
-0.4506320059299469,
-0.5547241568565369,
0.7255512475967407,
0.12556107342243195,
-0.9117255806922913,
-0.022532856091856956,
-0.13314877450466156,
-0.28926172852516174,
0.22984308004379272,
-1.4516565799713135,
-0.13911816477775574,
-0.3835517168045044,
-0.554914116859436,
-1.2815662622451782,
0.03147513419389725,
1.3980531692504883,
-0.7687643766403198,
-0.16628557443618774,
0.479046493768692,
0.4045940935611725,
0.5184080600738525,
0.7755421996116638,
-0.7039514183998108,
-0.4187728464603424,
-0.24022522568702698,
-0.3034406006336212,
0.2581767439842224,
1.3262913227081299,
-0.03473522886633873,
-1.0103299617767334,
0.7069124579429626,
-0.4319702982902527,
0.01772349327802658,
1.9456188678741455,
0.11624537408351898,
-0.7808927297592163,
0.34624215960502625,
-0.7468394637107849,
1.8711488246917725,
1.7157999277114868,
1.281022071838379,
-0.07845847308635712,
-0.977736234664917,
0.6846318244934082,
-0.2611069977283478,
-0.32064133882522583,
1.0114644765853882,
0.4360540509223938,
-0.273315966129303,
-1.4427998065948486,
0.5724431276321411,
1.203717827796936,
-0.8046002984046936,
-0.7748218774795532,
0.03386242315173149,
-0.8363367915153503,
1.0919922590255737,
0.7615997791290283,
0.4288320541381836,
0.26119503378868103,
1.6600935459136963,
0.7837945222854614,
-0.5730447173118591,
0.5589990019798279,
0.4657810628414154,
-0.1763095110654831,
-2.122002124786377,
-1.0744719505310059,
0.3438607156276703,
-0.4100356996059418,
-1.534675121307373,
1.439168095588684,
-1.0964434146881104,
-0.9561381340026855,
0.49512243270874023,
0.04271160438656807,
1.358553409576416,
0.2832183837890625,
1.60648775100708,
2.0959277153015137,
0.900648295879364,
0.3207016885280609,
1.2413322925567627,
-0.13036002218723297,
-0.41796958446502686,
1.8223291635513306,
-0.44715195894241333,
0.4765298664569855,
1.008424162864685,
-0.3523772060871124,
-1.0141867399215698,
-0.7410483956336975,
-1.193632960319519,
-0.727595865726471,
1.1605665683746338,
0.07734592258930206,
-1.0691266059875488,
0.25775399804115295,
1.6295502185821533,
0.11260109394788742,
-0.29968222975730896,
0.6412267684936523,
0.5102062225341797,
-0.829412043094635,
-0.1129634901881218,
-0.9220620393753052,
0.452857106924057,
-0.10337527841329575,
-0.34187331795692444,
0.36087697744369507,
0.45977896451950073,
1.3194363117218018,
-0.04394790902733803,
0.09617045521736145,
1.1434842348098755,
-1.4588733911514282,
1.4500237703323364,
-0.7147017121315002,
0.28788527846336365,
-2.32930850982666,
1.3928172588348389,
-0.7777834534645081,
1.920954704284668,
-2.631635904312134,
0.3952416181564331,
-0.6409314274787903,
-0.4269620478153229,
0.3380570709705353,
-0.32895195484161377,
0.1709107607603073,
-0.17822733521461487,
-1.0614451169967651,
-0.07369719445705414,
-0.7231046557426453,
0.665551483631134,
1.0851929187774658,
1.2471576929092407,
-1.0810612440109253,
-0.2736836075782776,
-1.6795166730880737,
-0.16141796112060547,
-0.703357994556427,
0.37544330954551697,
-2.0460610389709473,
-0.12975487112998962,
-2.086848258972168,
-2.3258731365203857,
-1.4089432954788208,
-0.8059500455856323,
1.1655547618865967,
0.17389516532421112,
-0.8727100491523743,
1.1799873113632202,
-0.3736458122730255,
-1.8317124843597412,
1.0710307359695435,
-2.162555456161499
] |
https://github.com/huggingface/datasets/issues/5980 | Viewing dataset card returns “502 Bad Gateway” | Yes, it seems to be working now. In case it's helpful, the outage lasted several days. It was failing as late as yesterday morning. | The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the “Files and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
| 87 | 24 | Viewing dataset card returns “502 Bad Gateway”
The url is: https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams
I am able to successfully view the “Files and versions” tab: [Confirm-Labs/pile_ngrams_trigrams at main](https://huggingface.co/datasets/Confirm-Labs/pile_ngrams_trigrams/tree/main)
Any help would be appreciated! Thanks! I hope this is the right place to report an issue like this.
Yes, it seems to be working now. In case it's helpful, the outage lasted several days. It was failing as late as yesterday morning. | [
-1.3354039192199707,
-0.8307977318763733,
-0.8228456377983093,
1.4607224464416504,
-0.029169749468564987,
-1.3349915742874146,
-0.04360922798514366,
-0.8613360524177551,
1.5837246179580688,
-0.8044963479042053,
0.4009316861629486,
-1.5934637784957886,
-0.0289352685213089,
-0.5162830352783203,
-0.7625961899757385,
-0.86872798204422,
-0.3886517584323883,
-0.8197518587112427,
1.0324432849884033,
2.538644313812256,
1.2502249479293823,
-1.5207520723342896,
2.7843165397644043,
0.6326109170913696,
-0.16402123868465424,
-1.1731629371643066,
0.6625690460205078,
0.11756036430597305,
-1.360875129699707,
-0.45915502309799194,
-0.9526898264884949,
0.03679872304201126,
-0.5047377347946167,
-0.4309234023094177,
0.05276761204004288,
0.3863379657268524,
-0.08847632259130478,
-0.276034951210022,
-0.49616706371307373,
-0.7075123190879822,
0.46275022625923157,
-0.3691989481449127,
1.0129691362380981,
-0.3182283341884613,
1.7555739879608154,
-0.535903811454773,
0.32176634669303894,
0.6779462695121765,
1.3064770698547363,
0.16526804864406586,
-0.07416501641273499,
0.2400631159543991,
0.4076091945171356,
-0.05349394306540489,
0.3746947944164276,
1.092296838760376,
0.5407858490943909,
0.5759541988372803,
0.7465820908546448,
-2.0988664627075195,
1.4982017278671265,
-0.8920692205429077,
0.22839823365211487,
1.4271382093429565,
-1.0698521137237549,
0.32993364334106445,
-1.7590727806091309,
-0.031785715371370316,
0.6531264781951904,
-2.3015666007995605,
0.17241445183753967,
-1.1162364482879639,
-0.5139130353927612,
0.9346269965171814,
0.2552849054336548,
-1.3325529098510742,
0.0770832970738411,
-0.497732013463974,
0.9871581196784973,
0.4882202446460724,
1.1278491020202637,
-1.725069284439087,
0.13923904299736023,
-0.22906337678432465,
-0.06808117777109146,
-1.4891437292099,
-1.569928765296936,
0.41740381717681885,
0.6025274991989136,
0.7022914886474609,
-0.04384098947048187,
0.9028475880622864,
-0.9442921876907349,
0.8544644713401794,
-0.8701940774917603,
-1.5741891860961914,
-1.3630595207214355,
-2.438624620437622,
-2.29805326461792,
0.7158387303352356,
-0.5026788711547852,
-0.49941566586494446,
1.9804147481918335,
-1.006919026374817,
-1.7977713346481323,
1.0603097677230835,
0.3518073856830597,
0.17321835458278656,
2.4133894443511963,
0.2507784068584442,
-0.6986802816390991,
0.3778935372829437,
-0.5748937129974365,
0.8596121072769165,
-0.3123634457588196,
1.3258694410324097,
0.5324084758758545,
-0.9752129912376404,
1.7309612035751343,
-0.45105963945388794,
0.48090997338294983,
-0.696596086025238,
-0.5711550712585449,
-0.9034441709518433,
0.33779868483543396,
1.8680503368377686,
-0.3159867525100708,
1.6503093242645264,
-0.3858167827129364,
-1.6029689311981201,
-1.594545841217041,
0.66282719373703,
0.5055885910987854,
-0.8104873299598694,
0.08745507895946503,
-0.4550751745700836,
0.08880654722452164,
-0.005861364305019379,
1.0907495021820068,
1.216684341430664,
0.5961369872093201,
-0.2589982748031616,
-0.9604347944259644,
0.234498530626297,
-0.08811067044734955,
-0.6421714425086975,
-1.8205629587173462,
-0.2766365110874176,
0.1587619036436081,
0.7342218160629272,
-1.1727617979049683,
1.798521637916565,
0.9802811145782471,
2.0609633922576904,
0.9032344818115234,
-0.25082454085350037,
1.441157579421997,
-0.13361528515815735,
1.8335667848587036,
-0.5736001133918762,
0.632180392742157,
-0.27041661739349365,
-1.072563886642456,
0.8860146999359131,
-0.3678492605686188,
-1.953458309173584,
-0.7954850196838379,
-0.9104674458503723,
-0.1441858410835266,
-0.5922516584396362,
1.0740573406219482,
-0.25688910484313965,
-1.2280969619750977,
0.10809389501810074,
-0.6350399255752563,
0.10135556012392044,
-1.1689940690994263,
0.11547056585550308,
0.7881678342819214,
-0.6962200403213501,
-0.09923391789197922,
-0.24613837897777557,
-1.3557640314102173,
-0.5504509210586548,
0.3979411721229553,
1.9883079528808594,
-0.6851564645767212,
1.0071756839752197,
0.9289540648460388,
-0.6676433682441711,
0.1321173459291458,
0.2515624165534973,
-0.29128825664520264,
0.8458966016769409,
-1.101461410522461,
-0.44155147671699524,
1.0631321668624878,
-0.27980878949165344,
-0.7560880780220032,
1.5171912908554077,
0.777895987033844,
-0.9913192391395569,
-0.22071853280067444,
-0.1667942851781845,
-0.7448660731315613,
0.04384971037507057,
-1.5384281873703003,
-0.08032194525003433,
0.19390608370304108,
-1.533519983291626,
-0.44739267230033875,
-0.1250142753124237,
1.428306221961975,
-0.18224482238292694,
1.4556565284729004,
-0.21882717311382294,
-0.33889472484588623,
-0.39051660895347595,
-0.4837605953216553,
0.15065132081508636,
-0.17979510128498077,
-0.5786828994750977,
0.28534790873527527,
-0.8755484223365784,
0.34587201476097107,
1.5120856761932373,
0.35321158170700073,
0.028445862233638763,
0.5298845767974854,
1.10822594165802,
0.31516867876052856,
-0.0012658517807722092,
-0.9535064101219177,
-1.6080294847488403,
2.0940282344818115,
-1.5177327394485474,
1.9737745523452759,
0.7742456793785095,
-0.09749896079301834,
-1.7560837268829346,
-1.7441374063491821,
1.419307827949524,
1.1580787897109985,
2.3062899112701416,
0.5569032430648804,
0.1591223180294037,
-0.7706058621406555,
-0.7299386858940125,
0.41713204979896545,
-1.0730738639831543,
-0.7651842832565308,
0.0690341368317604,
2.2519490718841553,
1.7638012170791626,
-0.5734948515892029,
-0.18647482991218567,
-0.867626428604126,
1.2367335557937622,
-0.08358374238014221,
0.23090966045856476,
2.0180094242095947,
-0.26764559745788574,
-1.1425244808197021,
1.2725123167037964,
-2.469322681427002,
0.2579594552516937,
2.0471744537353516,
0.3533233106136322,
0.1634913980960846,
-1.4147623777389526,
-0.6261467933654785,
-0.3006576895713806,
-0.39763563871383667,
-1.3373844623565674,
0.5710492134094238,
-0.27334290742874146,
-1.0047208070755005,
-1.2786144018173218,
0.13051344454288483,
-1.235094428062439,
-1.8060905933380127,
0.5046583414077759,
1.8069431781768799,
2.1617536544799805,
-0.7588817477226257,
1.4657827615737915,
-0.16019006073474884,
0.07072169333696365,
1.2064557075500488,
1.2840256690979004,
3.0929806232452393,
1.8984694480895996,
-1.0910555124282837,
0.6443021297454834,
-0.11682205647230148,
-0.45824161171913147,
1.1388497352600098,
-1.0397881269454956,
1.1942710876464844,
-0.18724064528942108,
-1.2094523906707764,
-1.3414114713668823,
0.9521254301071167,
0.40006768703460693,
-0.025882966816425323,
-0.5954501032829285,
1.340271234512329,
0.07682955265045166,
1.2240173816680908,
0.5148066282272339,
-0.43729010224342346,
0.5179222226142883,
-0.4197819232940674,
-0.5422724485397339,
1.5976731777191162,
0.15147638320922852,
-1.5043994188308716,
-2.2313380241394043,
-0.24532335996627808,
-0.767436683177948,
-0.1432381570339203,
-0.7108550667762756,
-1.0569322109222412,
1.6230316162109375,
0.4209023118019104,
-1.2186297178268433,
-0.3447294533252716,
-0.4802190661430359,
-0.7147128582000732,
2.692850112915039,
-1.3747503757476807,
-0.13584105670452118,
-1.00757896900177,
-0.37752288579940796,
1.6085946559906006,
-1.2654002904891968,
-0.19845522940158844,
-1.0409669876098633,
-0.6856405735015869,
-1.3601875305175781,
-0.49210262298583984,
-0.07873719930648804,
-0.840693473815918,
0.6467114686965942,
0.07986713945865631,
-1.1031019687652588,
-0.288641095161438,
-0.8349494934082031,
0.864830493927002,
-0.14059047400951385,
0.18447905778884888,
1.7876975536346436,
0.3416408598423004,
-0.4056868851184845,
0.7505520582199097,
1.1851354837417603,
0.7489614486694336,
-0.6091626882553101,
0.15969881415367126,
-0.5803548097610474,
0.3349519670009613,
-1.3716684579849243,
0.3138100206851959,
-3.0119099617004395,
0.6551980376243591,
-0.06613924354314804,
-0.05343588441610336,
-0.09399165958166122,
-1.2230247259140015,
1.3378492593765259,
2.5828282833099365,
-1.1773601770401,
0.5542498230934143,
0.3642779588699341,
1.0487796068191528,
-1.6303355693817139,
0.2656725347042084,
-0.5456175208091736,
2.1066536903381348,
0.05996909365057945,
1.0920701026916504,
-0.6141020059585571,
-2.114126682281494,
0.6460558772087097,
-1.2693212032318115,
-0.9545862078666687,
0.8333185911178589,
-0.8733677864074707,
0.24707837402820587,
-1.434175968170166,
-0.09913484007120132,
-1.1035408973693848,
-1.2559818029403687,
0.7418299913406372,
0.0675453171133995,
0.3319101333618164,
-0.5086021423339844,
0.25637000799179077,
-2.162264347076416,
-1.3201217651367188,
-0.27718210220336914,
-1.0501580238342285,
0.46324068307876587,
-0.38455483317375183,
0.5144472122192383,
-0.008261134847998619,
0.15252596139907837,
0.2555168867111206,
1.3351564407348633,
3.3713290691375732,
0.1334543377161026,
0.4522894322872162,
-0.07693945616483688,
-0.8771278262138367,
1.5809710025787354,
1.16938054561615,
-0.004498329479247332,
-0.6645084023475647,
-0.9514412879943848,
1.417364239692688,
2.056243896484375,
1.0983712673187256,
0.05580022558569908,
-0.9270174503326416,
-0.7184976935386658,
0.07148995250463486,
0.17004072666168213,
0.6122285723686218,
1.018681526184082,
-0.049263205379247665,
0.017459195107221603,
1.4030903577804565,
1.1990480422973633,
-0.3487997353076935,
0.2958468496799469,
-0.9809871912002563,
-0.29900723695755005,
0.3341306746006012,
0.293670117855072,
-0.0031197802163660526,
0.5349329113960266,
-0.9302172064781189,
-0.1842442899942398,
-0.14990289509296417,
-0.9424542784690857,
-0.6196273565292358,
-0.47133463621139526,
-0.488057404756546,
1.7263972759246826,
0.010040265507996082,
-0.45383137464523315,
0.05919845029711723,
-0.7746848464012146,
-0.08793319761753082,
-1.0898782014846802,
0.22011364996433258,
-0.09764978289604187,
0.022738534957170486,
-0.11202389746904373,
1.7607429027557373,
-0.9959031939506531,
-2.2857489585876465,
0.23146305978298187,
0.22580493986606598,
-0.4083431363105774,
0.11489343643188477,
1.6346909999847412,
0.5734755992889404,
1.3787140846252441,
1.3357478380203247,
1.0369312763214111,
-0.6108701825141907,
-1.2632285356521606,
0.637175440788269,
1.0314302444458008,
-1.4076108932495117,
0.9884156584739685,
-0.2192295491695404,
-0.4514809846878052,
0.6930840015411377,
1.3333673477172852,
0.4197368621826172,
-2.0154929161071777,
0.8744389414787292,
-0.9058852791786194,
0.9893035292625427,
0.6546592116355896,
0.8165348768234253,
0.25209760665893555,
0.9082894325256348,
-1.2207292318344116,
-1.1268730163574219,
-0.7987894415855408,
-0.7312865257263184,
1.870707631111145,
-0.2873479425907135,
0.5534637570381165,
-0.14244748651981354,
-1.1392621994018555,
-0.188991516828537,
0.6975817084312439,
0.272151380777359,
-0.19170595705509186,
0.9838458895683289,
-0.6725702881813049,
-1.1897891759872437,
-1.4684034585952759,
-0.49512186646461487,
-0.8344466090202332,
-0.8824681639671326,
0.9957363605499268,
0.6063418388366699,
0.3272946774959564,
1.926539421081543,
0.540696382522583,
0.32546892762184143,
-2.6535346508026123,
0.8397834897041321,
0.2900405824184418,
0.07109136134386063,
0.8651741147041321,
0.3178344666957855,
1.1402524709701538,
-0.08877094835042953,
0.5414060950279236,
-2.407073497772217,
2.3548014163970947,
-0.3442026674747467,
0.7076642513275146,
0.048921842128038406,
-0.15358026325702667,
1.1405802965164185,
0.6410804986953735,
0.6529017686843872,
-1.169477939605713,
0.71830815076828,
-0.5788304805755615,
1.1753462553024292,
0.8473691344261169,
-0.7368181347846985,
0.09662971645593643,
1.325329303741455,
0.4747481048107147,
-0.4614960253238678,
-0.9825053215026855,
-0.8043727278709412,
0.9395291209220886,
1.6844786405563354,
0.011052309535443783,
0.032151591032743454,
0.73121178150177,
0.609484851360321,
-1.147688865661621,
-0.026485353708267212,
-0.6837707757949829,
-0.7586851716041565,
1.6816877126693726,
1.9352333545684814,
-0.030224643647670746,
-0.1324983835220337,
-0.7818413972854614,
-1.2304750680923462,
0.6232002377510071,
-0.0298369862139225,
-0.0068276431411504745,
0.6376998424530029,
-0.6432933807373047,
1.2075917720794678,
0.6872014403343201,
0.9088925719261169,
-0.1348138153553009,
0.39539414644241333,
0.42771172523498535,
-0.32664623856544495,
-1.2598333358764648,
-0.4573664367198944,
-1.1437742710113525,
-2.5315840244293213,
0.4375053942203522,
-0.2230953425168991,
-1.418624758720398,
-0.06580088287591934,
-1.092612862586975,
0.8602844476699829,
-0.5989626049995422,
-1.09907865524292,
-1.4063963890075684,
0.149009570479393,
-0.25644636154174805,
0.7922256588935852,
-1.5013797283172607,
-0.2048105150461197,
1.266116976737976,
0.7628679275512695,
-0.646140456199646,
1.0949804782867432,
0.15479278564453125,
1.009075403213501,
0.7289435863494873,
-0.39842408895492554,
0.48876479268074036,
0.16546215116977692,
-1.4377144575119019,
0.49107271432876587,
1.1021368503570557,
0.13414663076400757,
1.3973968029022217,
-0.45532000064849854,
0.06897203624248505,
0.44500672817230225,
-0.6109198331832886,
-0.5354095101356506,
-0.6169971823692322,
0.8370880484580994,
-0.0017189811915159225,
-0.9381522536277771,
0.005203596316277981,
-0.2510213553905487,
-0.15022888779640198,
0.17856425046920776,
-1.5436460971832275,
-0.28735312819480896,
-0.33438634872436523,
-0.4422416090965271,
-1.327510952949524,
0.08610391616821289,
1.3318175077438354,
-0.7269770503044128,
-0.20928451418876648,
0.45722535252571106,
0.4129515290260315,
0.5469486713409424,
0.6843233108520508,
-0.6690363883972168,
-0.2660627067089081,
-0.2683425545692444,
-0.2863348424434662,
0.35239094495773315,
1.0973172187805176,
-0.13427497446537018,
-0.9562771320343018,
0.6907135844230652,
-0.3586214482784271,
0.11054041236639023,
2.075690746307373,
-0.05185813829302788,
-0.7755388617515564,
0.3840580880641937,
-0.6863231658935547,
1.8101468086242676,
1.5049562454223633,
1.2112112045288086,
-0.15765978395938873,
-0.8295441269874573,
0.6496302485466003,
-0.23557311296463013,
-0.2413545399904251,
0.8033620715141296,
0.6066620945930481,
-0.36842548847198486,
-1.425420880317688,
0.44444867968559265,
1.3336509466171265,
-0.9108717441558838,
-0.7626886367797852,
0.1180906817317009,
-0.8698874115943909,
0.9863373041152954,
0.745416522026062,
0.41542428731918335,
0.34605616331100464,
1.7036949396133423,
0.5880669355392456,
-0.5160658359527588,
0.32848331332206726,
0.44337931275367737,
-0.21793679893016815,
-1.9206812381744385,
-0.9329632520675659,
0.2972579598426819,
-0.5576732158660889,
-1.5240153074264526,
1.3693065643310547,
-1.1402236223220825,
-0.9647941589355469,
0.5388577580451965,
0.104653000831604,
1.4309253692626953,
0.39944350719451904,
1.6954768896102905,
2.025071144104004,
0.7878566980361938,
0.32229745388031006,
1.3312808275222778,
-0.059047747403383255,
-0.38279959559440613,
1.96758234500885,
-0.4585781395435333,
0.5745119452476501,
1.093931794166565,
-0.40231698751449585,
-1.0671061277389526,
-0.8188510537147522,
-1.1007709503173828,
-0.6052876114845276,
1.1727296113967896,
0.15491004288196564,
-1.2006443738937378,
0.2354709804058075,
1.4779475927352905,
0.2366338074207306,
-0.18850307166576385,
0.5658589601516724,
0.4037321209907532,
-0.7097751498222351,
-0.08121617138385773,
-0.9736152291297913,
0.5943899154663086,
-0.1253119856119156,
-0.3430754244327545,
0.3429907262325287,
0.4947218894958496,
1.2154841423034668,
-0.06906174123287201,
0.2704472541809082,
1.2761108875274658,
-1.3368382453918457,
1.4926830530166626,
-0.5993618965148926,
0.29778653383255005,
-2.4049196243286133,
1.4954837560653687,
-0.7120603919029236,
2.003931760787964,
-2.651841163635254,
0.3335316777229309,
-0.6499199271202087,
-0.526542067527771,
0.47065311670303345,
-0.30924004316329956,
0.1483793407678604,
-0.19059783220291138,
-1.0402454137802124,
0.03881813958287239,
-0.773769736289978,
0.5821593403816223,
1.1965700387954712,
1.209032416343689,
-0.9542286396026611,
-0.31035342812538147,
-1.8149104118347168,
-0.30443909764289856,
-0.7411290407180786,
0.3811996281147003,
-2.084796190261841,
-0.18734820187091827,
-1.967347264289856,
-2.2074925899505615,
-1.4509700536727905,
-0.8928492665290833,
1.1019774675369263,
0.21588285267353058,
-0.9330824613571167,
1.090583324432373,
-0.3036569058895111,
-1.6566851139068604,
0.9648547768592834,
-2.127098321914673
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Hi ! can you try to set the upper case environment variables `HTTP_PROXY` and `HTTPS_PROXY` ?
We use `aiohttp` for streaming and it uses case sensitive environment variables | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 28 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Hi ! can you try to set the upper case environment variables `HTTP_PROXY` and `HTTPS_PROXY` ?
We use `aiohttp` for streaming and it uses case sensitive environment variables | [
-1.1328250169754028,
-0.9262996315956116,
-0.7292640805244446,
1.5353056192398071,
-0.14597174525260925,
-1.252512812614441,
0.14620441198349,
-1.016616702079773,
1.701948881149292,
-0.7980216145515442,
0.3459324538707733,
-1.6870357990264893,
0.054382506757974625,
-0.6008292436599731,
-0.72538161277771,
-0.8610400557518005,
-0.36330822110176086,
-0.6787172555923462,
1.0318669080734253,
2.4806668758392334,
1.1798142194747925,
-1.3981772661209106,
2.658280372619629,
0.7165788412094116,
-0.1920560598373413,
-0.9943009614944458,
0.5282593369483948,
-0.01944378949701786,
-1.3331677913665771,
-0.3363700807094574,
-0.8969913125038147,
-0.07786484807729721,
-0.5665531754493713,
-0.5581783652305603,
0.021423395723104477,
0.4499206244945526,
-0.3323651850223541,
-0.5375383496284485,
-0.5089471340179443,
-0.812593400478363,
0.4391951262950897,
-0.3935089707374573,
0.8656091094017029,
-0.36844611167907715,
1.7882508039474487,
-0.5843991637229919,
0.4901643991470337,
0.7554565072059631,
1.2790635824203491,
0.15640512108802795,
0.05342385545372963,
0.2887512147426605,
0.4085296094417572,
0.023177918046712875,
0.5289717316627502,
1.1143792867660522,
0.6260157227516174,
0.5112771391868591,
0.6713321805000305,
-2.24545955657959,
1.2340971231460571,
-0.9566346406936646,
0.3092779517173767,
1.2942137718200684,
-0.952315628528595,
0.34138575196266174,
-1.7948755025863647,
-0.04394629970192909,
0.5733035802841187,
-2.21806001663208,
0.24184630811214447,
-1.3123949766159058,
-0.5469431281089783,
1.0399048328399658,
0.32796695828437805,
-1.1842293739318848,
0.09304798394441605,
-0.3969748616218567,
1.0439766645431519,
0.5013035535812378,
1.1673237085342407,
-1.668026328086853,
-0.07771572470664978,
-0.28260141611099243,
0.16183824837207794,
-1.3142845630645752,
-1.5398238897323608,
0.5211755633354187,
0.6799276471138,
0.605577290058136,
-0.11303337663412094,
0.9562668800354004,
-0.9447488188743591,
0.8122867941856384,
-0.9859774112701416,
-1.7902461290359497,
-1.4297164678573608,
-2.3215994834899902,
-2.31070613861084,
0.7427259087562561,
-0.3656575679779053,
-0.43820273876190186,
2.0856130123138428,
-1.055964708328247,
-1.7854238748550415,
1.133048176765442,
0.24933235347270966,
-0.0763745903968811,
2.337484836578369,
0.1987633854150772,
-0.7318621277809143,
0.48079708218574524,
-0.7925129532814026,
0.6724855303764343,
-0.395925372838974,
1.3149374723434448,
0.43909507989883423,
-1.0483105182647705,
1.563180685043335,
-0.3824838101863861,
0.6165773272514343,
-0.7310256958007812,
-0.4264034628868103,
-0.6953052282333374,
0.2757691740989685,
1.9183062314987183,
-0.35328611731529236,
1.5322157144546509,
-0.31912100315093994,
-1.4993939399719238,
-1.6160646677017212,
0.8690503835678101,
0.5227935314178467,
-0.7209296226501465,
0.16414161026477814,
-0.3455359637737274,
0.12253127247095108,
-0.0903453528881073,
1.0872594118118286,
1.2012672424316406,
0.8198685050010681,
-0.28945136070251465,
-0.8362158536911011,
0.2576106786727905,
-0.004102810751646757,
-0.7381725907325745,
-1.7446907758712769,
-0.32573914527893066,
0.19730661809444427,
0.6172357797622681,
-1.1834638118743896,
1.7572027444839478,
0.887211263179779,
1.9138540029525757,
1.0285358428955078,
-0.33541157841682434,
1.4589967727661133,
0.11153557896614075,
1.918408751487732,
-0.4388990104198456,
0.6674585938453674,
-0.3594176471233368,
-1.1840012073516846,
0.720064103603363,
-0.3311138153076172,
-2.0566203594207764,
-0.6843507289886475,
-0.849560022354126,
-0.1388641595840454,
-0.7371495366096497,
0.9603370428085327,
-0.2876790463924408,
-1.3973844051361084,
0.19369539618492126,
-0.7868698835372925,
0.13720965385437012,
-1.25935697555542,
0.3028721213340759,
0.7736377716064453,
-0.6386813521385193,
0.15702880918979645,
-0.29969388246536255,
-1.242143988609314,
-0.5371440649032593,
0.3863823115825653,
1.8524807691574097,
-0.7883539795875549,
0.9616352915763855,
0.9864776730537415,
-0.736134946346283,
-0.005273271817713976,
0.3808801770210266,
-0.33754029870033264,
0.8534011244773865,
-1.0167940855026245,
-0.39333805441856384,
1.1860116720199585,
-0.16846804320812225,
-0.7121037840843201,
1.4693143367767334,
0.7687010765075684,
-0.9884759783744812,
-0.20086663961410522,
-0.16937091946601868,
-0.8119881749153137,
-0.004342195577919483,
-1.6673431396484375,
-0.08637652546167374,
0.3219308853149414,
-1.5209931135177612,
-0.5102639198303223,
-0.20010650157928467,
1.3377383947372437,
-0.07794568687677383,
1.37942636013031,
-0.28439629077911377,
-0.17402160167694092,
-0.3836260735988617,
-0.33821168541908264,
0.1683734506368637,
-0.23902535438537598,
-0.6473321318626404,
0.2742687463760376,
-0.7475629448890686,
0.32580041885375977,
1.387744426727295,
0.2624041438102722,
0.06845176219940186,
0.5331353545188904,
1.0729191303253174,
0.37369924783706665,
-0.03868652880191803,
-0.9243104457855225,
-1.530289649963379,
1.9766465425491333,
-1.378437876701355,
2.0495684146881104,
0.7754615545272827,
-0.09748156368732452,
-1.8579305410385132,
-1.973738670349121,
1.3720781803131104,
1.116275668144226,
2.38899564743042,
0.5493035316467285,
0.44133666157722473,
-0.8362308144569397,
-0.6264113783836365,
0.32686716318130493,
-0.9636704325675964,
-0.7968902587890625,
0.0957789197564125,
2.4215457439422607,
1.7358280420303345,
-0.4204903542995453,
-0.23485642671585083,
-1.083333969116211,
1.396165370941162,
-0.11778077483177185,
0.22592951357364655,
2.0049335956573486,
-0.25273779034614563,
-1.0063632726669312,
1.26832115650177,
-2.340245008468628,
0.1589273065328598,
2.0157196521759033,
0.17261596024036407,
0.02915884181857109,
-1.3873755931854248,
-0.6936593651771545,
-0.21870237588882446,
-0.4676806628704071,
-1.2096631526947021,
0.5428932905197144,
-0.2499576359987259,
-0.7726678848266602,
-1.455123782157898,
0.16322959959506989,
-1.1105189323425293,
-1.6878960132598877,
0.15296347439289093,
1.8634169101715088,
1.9741344451904297,
-0.7888726592063904,
1.536199927330017,
-0.3114869296550751,
0.1182149276137352,
1.2912237644195557,
1.2338600158691406,
3.1660711765289307,
1.9465854167938232,
-1.3703633546829224,
0.7357723712921143,
-0.06598716974258423,
-0.45770835876464844,
1.1549688577651978,
-1.2253639698028564,
1.260399580001831,
-0.23846517503261566,
-1.1367719173431396,
-1.2218109369277954,
0.949704110622406,
0.576541006565094,
0.06581225991249084,
-0.47536998987197876,
1.2006229162216187,
0.10262539237737656,
1.3558810949325562,
0.5406867265701294,
-0.3734147846698761,
0.6942324638366699,
-0.39754265546798706,
-0.4600411355495453,
1.5546724796295166,
0.17112509906291962,
-1.3146374225616455,
-2.3106272220611572,
-0.2178010195493698,
-0.9259463548660278,
0.0010941121727228165,
-0.605006754398346,
-0.9647965431213379,
1.6181789636611938,
0.41988635063171387,
-1.2016364336013794,
-0.22555261850357056,
-0.3797578513622284,
-0.5795813202857971,
2.6966443061828613,
-1.4502218961715698,
-0.2601882815361023,
-1.0776090621948242,
-0.5478760004043579,
1.6320158243179321,
-1.2011680603027344,
-0.20496904850006104,
-1.08938729763031,
-0.5655738711357117,
-1.3510785102844238,
-0.5316077470779419,
0.032180313020944595,
-0.8805689811706543,
0.949410617351532,
0.17133828997612,
-1.1855438947677612,
-0.2883068025112152,
-0.8801257610321045,
0.8873867392539978,
-0.07831458002328873,
0.2454097718000412,
1.901777744293213,
0.45438265800476074,
-0.38617900013923645,
0.6630518436431885,
1.1274515390396118,
0.6274437308311462,
-0.6612169146537781,
0.3530852198600769,
-0.6274657249450684,
0.3132138252258301,
-1.397568702697754,
0.24379102885723114,
-2.8509104251861572,
0.6238977909088135,
-0.02885723114013672,
-0.037938620895147324,
-0.06604306399822235,
-1.2674518823623657,
1.0439573526382446,
2.594482421875,
-1.1787322759628296,
0.4336889088153839,
0.33816173672676086,
1.1748274564743042,
-1.5262222290039062,
0.27065467834472656,
-0.4335183799266815,
2.0909361839294434,
0.15313585102558136,
1.204799771308899,
-0.44585931301116943,
-2.245999574661255,
0.5770151019096375,
-1.2468678951263428,
-1.12031888961792,
0.8211739659309387,
-0.7864118814468384,
0.0708787739276886,
-1.3496993780136108,
-0.21737629175186157,
-0.8090423941612244,
-1.2178934812545776,
0.7237542867660522,
0.1320810168981552,
0.5335529446601868,
-0.6592420935630798,
0.3674388825893402,
-2.16679310798645,
-1.339935302734375,
-0.27921655774116516,
-0.8787113428115845,
0.45132720470428467,
-0.3463589549064636,
0.7192667126655579,
-0.17708028852939606,
0.0035210559144616127,
0.35444003343582153,
1.375573754310608,
3.396516799926758,
0.15644846856594086,
0.3164832890033722,
-0.1793626993894577,
-0.9856464862823486,
1.4332910776138306,
0.8995163440704346,
-0.14201620221138,
-0.5476658344268799,
-1.1004045009613037,
1.1910535097122192,
1.9572668075561523,
1.1105393171310425,
0.08259610831737518,
-0.8181639909744263,
-0.7986481189727783,
0.058191459625959396,
0.1623019278049469,
0.4943447411060333,
0.9334340691566467,
0.1032213345170021,
0.10955943167209625,
1.4242159128189087,
1.1737021207809448,
-0.3631531298160553,
0.3909244239330292,
-0.8134362697601318,
-0.4734039604663849,
0.5048384070396423,
0.3440244197845459,
-0.01214077789336443,
0.2941634953022003,
-1.0916942358016968,
-0.1827094703912735,
-0.4033563435077667,
-0.8836175203323364,
-0.7262417674064636,
-0.4266948401927948,
-0.3476831614971161,
1.6549475193023682,
0.11242803931236267,
-0.4662809669971466,
-0.009918753057718277,
-0.7995623350143433,
-0.060465335845947266,
-1.0486700534820557,
0.33724674582481384,
-0.17890973389148712,
-0.06330764293670654,
-0.14307023584842682,
1.7735228538513184,
-0.9648408889770508,
-2.0635712146759033,
0.2295183390378952,
0.2125236690044403,
-0.3461984395980835,
0.20003730058670044,
1.688174843788147,
0.5599733591079712,
1.3303240537643433,
1.3226615190505981,
0.9733729362487793,
-0.6295647621154785,
-1.2996714115142822,
0.6428054571151733,
1.0021851062774658,
-1.403948187828064,
0.7425952553749084,
0.02285643294453621,
-0.5007690191268921,
0.6357905268669128,
1.2806570529937744,
0.4602759778499603,
-2.0159096717834473,
0.6969423294067383,
-0.9199330806732178,
0.7480189204216003,
0.7096890211105347,
0.7613326907157898,
0.1577368527650833,
0.7485283613204956,
-1.2084832191467285,
-1.153564453125,
-0.6288034319877625,
-0.6932016015052795,
1.9546245336532593,
-0.2614021897315979,
0.5684712529182434,
-0.1945168823003769,
-1.3732335567474365,
-0.1194334626197815,
0.7589763402938843,
0.3958359658718109,
-0.5295628309249878,
0.8021794557571411,
-0.6286965608596802,
-1.0421040058135986,
-1.3169876337051392,
-0.4829503297805786,
-1.029890537261963,
-0.9285309910774231,
1.0164706707000732,
0.8461052179336548,
0.3349733054637909,
1.9163017272949219,
0.6775925755500793,
0.18132762610912323,
-2.6494717597961426,
0.842061460018158,
0.34865137934684753,
-0.02900584414601326,
0.8906606435775757,
0.2642115354537964,
1.0295840501785278,
-0.00621337816119194,
0.5885766744613647,
-2.4032766819000244,
2.30387282371521,
-0.1701163649559021,
0.6379566788673401,
-0.038185928016901016,
-0.12010467797517776,
1.040402889251709,
0.457975834608078,
0.5715985298156738,
-1.0211960077285767,
0.7060806155204773,
-0.6253908276557922,
1.2733099460601807,
0.8167147636413574,
-0.837385892868042,
-0.02966611087322235,
1.3468061685562134,
0.49771079421043396,
-0.498146653175354,
-0.8808964490890503,
-1.0264782905578613,
0.9019085168838501,
1.8140538930892944,
-0.05978475883603096,
0.0056545315310359,
0.899788498878479,
0.641550600528717,
-1.3460440635681152,
0.0365762896835804,
-0.8003246784210205,
-0.7156909108161926,
1.6722904443740845,
2.1157491207122803,
-0.08470211178064346,
-0.26404261589050293,
-0.7907899022102356,
-1.2301979064941406,
0.8252612352371216,
0.011972124688327312,
0.10502010583877563,
0.7213957905769348,
-0.6385988593101501,
1.148573398590088,
0.8594728112220764,
0.9642577767372131,
0.16497479379177094,
0.22778090834617615,
0.31834226846694946,
-0.35073423385620117,
-1.2134519815444946,
-0.21570903062820435,
-1.044999122619629,
-2.544365644454956,
0.5038525462150574,
-0.20775069296360016,
-1.4242316484451294,
-0.050091903656721115,
-1.0377944707870483,
0.8732382655143738,
-0.5669580698013306,
-1.0953837633132935,
-1.4679229259490967,
0.18033695220947266,
-0.13747911155223846,
0.8894314169883728,
-1.5880744457244873,
-0.049635812640190125,
1.2459684610366821,
0.9447277784347534,
-0.6906375885009766,
0.9377354979515076,
0.1787818819284439,
1.0377191305160522,
0.9112460017204285,
-0.3148096799850464,
0.46588265895843506,
0.0996168851852417,
-1.3667911291122437,
0.390636146068573,
1.1642206907272339,
0.22606857120990753,
1.5137414932250977,
-0.6253900527954102,
0.04610161855816841,
0.4087187647819519,
-0.4550859034061432,
-0.48377785086631775,
-0.6336333751678467,
0.6771955490112305,
0.015660986304283142,
-0.9286112785339355,
0.09661848098039627,
0.00863275770097971,
-0.23008756339550018,
0.15092088282108307,
-1.43696129322052,
-0.12189895659685135,
-0.33949196338653564,
-0.7169713377952576,
-1.2507448196411133,
0.020995184779167175,
1.3127506971359253,
-0.7760728001594543,
-0.191830113530159,
0.5043659210205078,
0.28321191668510437,
0.5138610005378723,
0.5809497237205505,
-0.6647937297821045,
-0.3427368402481079,
-0.1370590329170227,
-0.35197046399116516,
0.35136619210243225,
1.4117741584777832,
-0.06795481592416763,
-1.00163733959198,
0.737798810005188,
-0.41390514373779297,
0.14162667095661163,
1.9746142625808716,
0.059752438217401505,
-0.8106555938720703,
0.2536509335041046,
-0.7415169477462769,
1.9031546115875244,
1.732853651046753,
1.350055456161499,
-0.10203197598457336,
-1.0079827308654785,
0.6128009557723999,
-0.3439475893974304,
-0.37267613410949707,
0.9938678741455078,
0.40279510617256165,
-0.19719886779785156,
-1.3181805610656738,
0.6184412240982056,
1.2637611627578735,
-0.9241097569465637,
-0.8793784976005554,
0.16442322731018066,
-0.8350664973258972,
1.0233347415924072,
0.7242597341537476,
0.3754093647003174,
0.25761914253234863,
1.5186116695404053,
0.8090554475784302,
-0.4394778907299042,
0.5606745481491089,
0.4970642626285553,
-0.18947595357894897,
-2.125736713409424,
-1.0788952112197876,
0.3495572507381439,
-0.5467211604118347,
-1.632201910018921,
1.3684611320495605,
-1.2339613437652588,
-0.9767268300056458,
0.5812558531761169,
0.04068704694509506,
1.451417088508606,
0.32071295380592346,
1.6108464002609253,
2.0285427570343018,
0.9307094216346741,
0.3704806864261627,
1.2733513116836548,
-0.23801720142364502,
-0.46658003330230713,
1.765367865562439,
-0.5466914176940918,
0.49379417300224304,
1.0295965671539307,
-0.32681453227996826,
-1.0990371704101562,
-0.7961249351501465,
-1.1944825649261475,
-0.7170513272285461,
1.2318720817565918,
0.08900964260101318,
-1.0671298503875732,
0.36052122712135315,
1.589064598083496,
0.06948330253362656,
-0.31996065378189087,
0.6985999941825867,
0.3912847340106964,
-0.8289461135864258,
-0.02476637437939644,
-0.9158610105514526,
0.5206171870231628,
-0.1709347814321518,
-0.3552468419075012,
0.35608893632888794,
0.45775970816612244,
1.3171353340148926,
-0.05796912685036659,
0.09654413163661957,
1.293373942375183,
-1.3605377674102783,
1.5000957250595093,
-0.6348260045051575,
0.24171410501003265,
-2.394282341003418,
1.3987177610397339,
-0.8469273447990417,
1.8309065103530884,
-2.6306140422821045,
0.47716841101646423,
-0.5602322220802307,
-0.42743441462516785,
0.2761507034301758,
-0.36328747868537903,
0.10649650543928146,
-0.16605043411254883,
-1.1463879346847534,
-0.15851201117038727,
-0.7860161662101746,
0.5585912466049194,
1.192601203918457,
1.3378318548202515,
-1.1096713542938232,
-0.296090692281723,
-1.7758620977401733,
-0.19209277629852295,
-0.7852720618247986,
0.3828912675380707,
-1.9514734745025635,
-0.19196008145809174,
-1.9565579891204834,
-2.45373272895813,
-1.3168421983718872,
-0.7974638938903809,
1.0720113515853882,
0.10977619141340256,
-0.8314269185066223,
0.9939706325531006,
-0.40263545513153076,
-1.8394116163253784,
1.1079481840133667,
-2.211916208267212
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Hi, thanks for the quick reply.
I set the uppercase env variables with
`
os.environ['HTTP_PROXY'] = "http://example.com:xxxx"
os.environ['HTTPS_PROXY'] = "http://example.com:xxxx"
`
However, I still get the same error.
One thing that could be helpfull: When downloading a dataset without streaming i get the following message:
_HF google storage unreachable. Downloading and preparing it from source_.
The download does however work as expected.
| ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 62 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Hi, thanks for the quick reply.
I set the uppercase env variables with
`
os.environ['HTTP_PROXY'] = "http://example.com:xxxx"
os.environ['HTTPS_PROXY'] = "http://example.com:xxxx"
`
However, I still get the same error.
One thing that could be helpfull: When downloading a dataset without streaming i get the following message:
_HF google storage unreachable. Downloading and preparing it from source_.
The download does however work as expected.
| [
-1.1652055978775024,
-0.9145930409431458,
-0.7317737936973572,
1.494977593421936,
-0.19083118438720703,
-1.2333896160125732,
0.13574133813381195,
-1.042526125907898,
1.6910085678100586,
-0.7597364187240601,
0.26119810342788696,
-1.682085633277893,
0.04578769579529762,
-0.5548456311225891,
-0.7288190126419067,
-0.8282175660133362,
-0.3647632896900177,
-0.7018214464187622,
1.0402616262435913,
2.4697580337524414,
1.1836259365081787,
-1.4059709310531616,
2.703291416168213,
0.7232142686843872,
-0.1587066650390625,
-1.0368156433105469,
0.5796508193016052,
-0.007729338947683573,
-1.377484679222107,
-0.35956519842147827,
-0.9105859994888306,
-0.06462112069129944,
-0.549494206905365,
-0.5183175206184387,
0.024322759360074997,
0.4353543221950531,
-0.3043643534183502,
-0.51767897605896,
-0.5398644208908081,
-0.7674554586410522,
0.46022358536720276,
-0.3812463879585266,
0.8761857748031616,
-0.366476833820343,
1.7829283475875854,
-0.5983332395553589,
0.46587619185447693,
0.7661360502243042,
1.3052963018417358,
0.1708560585975647,
0.05866871029138565,
0.299995094537735,
0.44263792037963867,
0.041094522923231125,
0.5179075598716736,
1.103492021560669,
0.6280879974365234,
0.4653310477733612,
0.705277681350708,
-2.2409307956695557,
1.2164497375488281,
-0.9436582922935486,
0.31254419684410095,
1.3179051876068115,
-0.9145940542221069,
0.3602852523326874,
-1.7964006662368774,
-0.0067245839163661,
0.5915589332580566,
-2.189927577972412,
0.26926642656326294,
-1.2978624105453491,
-0.5625082850456238,
1.0250179767608643,
0.32203513383865356,
-1.173653244972229,
0.1326846182346344,
-0.4447282552719116,
1.059852957725525,
0.5079293847084045,
1.164762258529663,
-1.6399210691452026,
-0.07121451944112778,
-0.23407840728759766,
0.17183609306812286,
-1.2905917167663574,
-1.5423202514648438,
0.511232852935791,
0.7118730545043945,
0.5991538763046265,
-0.12962932884693146,
0.9404271245002747,
-0.9856483936309814,
0.8351407647132874,
-1.0019198656082153,
-1.7903465032577515,
-1.451024055480957,
-2.3262696266174316,
-2.2506351470947266,
0.7620798945426941,
-0.37682047486305237,
-0.42972108721733093,
2.0622398853302,
-1.0243985652923584,
-1.76925528049469,
1.1458901166915894,
0.23682503402233124,
-0.012405605986714363,
2.3253142833709717,
0.1571849286556244,
-0.7664421796798706,
0.48612502217292786,
-0.7858952879905701,
0.6939773559570312,
-0.3496876358985901,
1.2880829572677612,
0.43059802055358887,
-0.9845368266105652,
1.5872645378112793,
-0.4052419364452362,
0.6158052086830139,
-0.6979597210884094,
-0.4398510754108429,
-0.6610859036445618,
0.2573777735233307,
1.931596279144287,
-0.3251200318336487,
1.5682340860366821,
-0.3224584460258484,
-1.5367618799209595,
-1.610831379890442,
0.8568301200866699,
0.5462583899497986,
-0.733491063117981,
0.12894150614738464,
-0.362411230802536,
0.13596849143505096,
-0.10880115628242493,
1.0743297338485718,
1.2477389574050903,
0.8260489106178284,
-0.29497596621513367,
-0.8242728114128113,
0.21755725145339966,
-0.029325388371944427,
-0.7474169731140137,
-1.7380423545837402,
-0.3162907063961029,
0.18066434562206268,
0.6730862855911255,
-1.2130706310272217,
1.7519255876541138,
0.8790192604064941,
1.9206972122192383,
1.0294984579086304,
-0.3797980844974518,
1.484184980392456,
0.11723681539297104,
1.8897135257720947,
-0.5013512969017029,
0.645524799823761,
-0.3576985001564026,
-1.1699455976486206,
0.7466614246368408,
-0.3246515691280365,
-2.0524656772613525,
-0.6927463412284851,
-0.8172328472137451,
-0.15473252534866333,
-0.7334652543067932,
0.9378666281700134,
-0.3277313709259033,
-1.4036935567855835,
0.1915043592453003,
-0.8024100661277771,
0.1356901228427887,
-1.221436858177185,
0.26925477385520935,
0.7969556450843811,
-0.6205689907073975,
0.16696786880493164,
-0.2691713273525238,
-1.2905139923095703,
-0.5085391998291016,
0.3975515067577362,
1.816225290298462,
-0.7642033100128174,
0.9169266223907471,
0.9730474948883057,
-0.737846851348877,
0.023882601410150528,
0.37345966696739197,
-0.35181164741516113,
0.8214921355247498,
-1.0096917152404785,
-0.4459127187728882,
1.1619336605072021,
-0.18543027341365814,
-0.6933889985084534,
1.4537692070007324,
0.7688481211662292,
-1.001957893371582,
-0.22992290556430817,
-0.15387338399887085,
-0.8705337643623352,
-0.03184438496828079,
-1.6623494625091553,
-0.10873182862997055,
0.31952735781669617,
-1.546124815940857,
-0.5093799829483032,
-0.19249284267425537,
1.3279736042022705,
-0.07723014801740646,
1.4218156337738037,
-0.2727026045322418,
-0.15640462934970856,
-0.35297709703445435,
-0.33567753434181213,
0.1882329136133194,
-0.24640056490898132,
-0.6355277299880981,
0.255072683095932,
-0.8221478462219238,
0.31929728388786316,
1.3861716985702515,
0.31851834058761597,
0.03852156549692154,
0.5171771049499512,
1.0811858177185059,
0.4003128111362457,
-0.041604749858379364,
-0.9190292358398438,
-1.5137989521026611,
1.986390233039856,
-1.3898462057113647,
2.045832872390747,
0.772165060043335,
-0.10092984884977341,
-1.8818347454071045,
-1.9578381776809692,
1.3459279537200928,
1.0932934284210205,
2.368332624435425,
0.5217711329460144,
0.43991392850875854,
-0.8288144469261169,
-0.6542012691497803,
0.30306917428970337,
-0.9611826539039612,
-0.7812869548797607,
0.11194552481174469,
2.4405856132507324,
1.7504690885543823,
-0.43864405155181885,
-0.2369842380285263,
-1.0506749153137207,
1.386453628540039,
-0.11096249520778656,
0.256561815738678,
2.013852119445801,
-0.20304076373577118,
-0.9978505373001099,
1.2804076671600342,
-2.3693907260894775,
0.20820125937461853,
2.0364160537719727,
0.1735747903585434,
0.08378449082374573,
-1.3792914152145386,
-0.6860159039497375,
-0.23177939653396606,
-0.4730921983718872,
-1.175135612487793,
0.588425874710083,
-0.2498604953289032,
-0.7897264361381531,
-1.4443250894546509,
0.14570780098438263,
-1.1230506896972656,
-1.7323095798492432,
0.18373507261276245,
1.8899834156036377,
1.9932446479797363,
-0.8102034330368042,
1.5229382514953613,
-0.3193514347076416,
0.10483046621084213,
1.2841992378234863,
1.2462691068649292,
3.1330578327178955,
1.962633490562439,
-1.331001877784729,
0.7204083800315857,
-0.10065948963165283,
-0.4330953061580658,
1.1042486429214478,
-1.2325831651687622,
1.2610111236572266,
-0.2095339000225067,
-1.141464352607727,
-1.1765307188034058,
0.9744170904159546,
0.5683234333992004,
0.06391764432191849,
-0.44219642877578735,
1.1791354417800903,
0.09005124866962433,
1.3916985988616943,
0.5809918642044067,
-0.3765895664691925,
0.6518597602844238,
-0.37454819679260254,
-0.4547457993030548,
1.5455939769744873,
0.13426728546619415,
-1.3238095045089722,
-2.3026304244995117,
-0.25848188996315,
-0.9068458676338196,
0.00760605838149786,
-0.6029590964317322,
-0.9827932715415955,
1.6261136531829834,
0.39749136567115784,
-1.2221698760986328,
-0.23576222360134125,
-0.3877129852771759,
-0.5494415760040283,
2.679229497909546,
-1.4479272365570068,
-0.2523488402366638,
-1.057496190071106,
-0.5580158233642578,
1.6301727294921875,
-1.1883729696273804,
-0.20864415168762207,
-1.0984793901443481,
-0.5671717524528503,
-1.3706644773483276,
-0.5199176073074341,
0.053815893828868866,
-0.8868465423583984,
0.9148192405700684,
0.172963947057724,
-1.1794917583465576,
-0.301339328289032,
-0.8691619038581848,
0.9216356873512268,
-0.06107906624674797,
0.20516958832740784,
1.9282053709030151,
0.4079514741897583,
-0.3700866997241974,
0.6875470280647278,
1.1461914777755737,
0.6331214904785156,
-0.6541020274162292,
0.3178476393222809,
-0.6292432546615601,
0.34524005651474,
-1.4407949447631836,
0.19826069474220276,
-2.8315539360046387,
0.6355277299880981,
-0.015769202262163162,
-0.04466069117188454,
-0.05696062371134758,
-1.278769612312317,
1.0725065469741821,
2.641954183578491,
-1.1850039958953857,
0.43668651580810547,
0.38749101758003235,
1.2113956212997437,
-1.50698721408844,
0.28131651878356934,
-0.4441160261631012,
2.087411403656006,
0.17718659341335297,
1.2051787376403809,
-0.4743717312812805,
-2.280923366546631,
0.6104234457015991,
-1.2614190578460693,
-1.1123178005218506,
0.7983580827713013,
-0.8074963092803955,
0.1055314838886261,
-1.4231816530227661,
-0.21774782240390778,
-0.8323538303375244,
-1.211845874786377,
0.6949062943458557,
0.1643964797258377,
0.48484036326408386,
-0.6933092474937439,
0.3581153154373169,
-2.18827748298645,
-1.3276903629302979,
-0.2493327111005783,
-0.8874658942222595,
0.47959965467453003,
-0.3663831353187561,
0.7064840197563171,
-0.1555328518152237,
-0.0008966987952589989,
0.3033360540866852,
1.3671109676361084,
3.422757863998413,
0.15528340637683868,
0.2593516409397125,
-0.21667611598968506,
-0.9880282878875732,
1.4567906856536865,
0.9174943566322327,
-0.14835457503795624,
-0.5430377125740051,
-1.093331217765808,
1.1609526872634888,
1.9794282913208008,
1.0979126691818237,
0.07168273627758026,
-0.8412800431251526,
-0.7943799495697021,
0.06782998144626617,
0.18257635831832886,
0.49670472741127014,
0.9594464898109436,
0.07954021543264389,
0.07099878042936325,
1.4638671875,
1.1590980291366577,
-0.3247460722923279,
0.3847128450870514,
-0.8565055131912231,
-0.519209086894989,
0.510221540927887,
0.3458687365055084,
-0.03421035036444664,
0.3274298906326294,
-1.1088355779647827,
-0.15748369693756104,
-0.3953247666358948,
-0.8629575967788696,
-0.7007800340652466,
-0.39458128809928894,
-0.316307008266449,
1.6183022260665894,
0.15606699883937836,
-0.4971468150615692,
-0.015942269936203957,
-0.7965410947799683,
-0.09624737501144409,
-1.041131615638733,
0.3303908407688141,
-0.1893409639596939,
-0.04380201920866966,
-0.17260777950286865,
1.7401096820831299,
-0.9342960119247437,
-2.024610757827759,
0.19392704963684082,
0.23360411822795868,
-0.30073946714401245,
0.21236523985862732,
1.6777077913284302,
0.5581048727035522,
1.3189054727554321,
1.339430332183838,
0.9533100724220276,
-0.5922839045524597,
-1.3312184810638428,
0.6457653045654297,
0.9871672987937927,
-1.3846800327301025,
0.7396457195281982,
-0.02914295718073845,
-0.5402801036834717,
0.6303825378417969,
1.32522451877594,
0.4416958689689636,
-2.057253837585449,
0.747342050075531,
-0.9113631248474121,
0.7352706789970398,
0.7378748655319214,
0.7580915093421936,
0.16293753683567047,
0.7689105868339539,
-1.2006579637527466,
-1.1209369897842407,
-0.6668724417686462,
-0.7053900361061096,
1.953519344329834,
-0.2883912920951843,
0.572162926197052,
-0.1701599508523941,
-1.3600496053695679,
-0.13608334958553314,
0.722253680229187,
0.35734498500823975,
-0.5335850715637207,
0.8117191195487976,
-0.6542924642562866,
-1.0681666135787964,
-1.2638506889343262,
-0.4927760064601898,
-0.9694402813911438,
-0.906832218170166,
1.0277069807052612,
0.8270494937896729,
0.3529452979564667,
1.9211909770965576,
0.6513720750808716,
0.2087843418121338,
-2.6663055419921875,
0.8225760459899902,
0.3340029716491699,
-0.04065462946891785,
0.8988372087478638,
0.2523305118083954,
1.0179518461227417,
-0.009017862379550934,
0.5771869421005249,
-2.4127306938171387,
2.3054380416870117,
-0.21499685943126678,
0.6700500249862671,
-0.04274102300405502,
-0.11239467561244965,
1.0728272199630737,
0.5204587578773499,
0.5782374739646912,
-0.9949751496315002,
0.7031155228614807,
-0.6307328939437866,
1.278544306755066,
0.8354566693305969,
-0.805147647857666,
-0.025437265634536743,
1.3459447622299194,
0.47731855511665344,
-0.5271458625793457,
-0.8987798690795898,
-0.9776834845542908,
0.9189156293869019,
1.8235647678375244,
-0.06246120482683182,
0.020607728511095047,
0.8841115832328796,
0.630098283290863,
-1.3372455835342407,
0.015985742211341858,
-0.8104879856109619,
-0.6989532709121704,
1.677994728088379,
2.1154446601867676,
-0.09823092818260193,
-0.25223901867866516,
-0.7627801299095154,
-1.2709132432937622,
0.7811785936355591,
-0.0003384556621313095,
0.1387418955564499,
0.7141037583351135,
-0.6547601819038391,
1.1116806268692017,
0.795610249042511,
0.9852675199508667,
0.1302584856748581,
0.25615063309669495,
0.26733168959617615,
-0.32462775707244873,
-1.2203631401062012,
-0.2642286717891693,
-1.0317387580871582,
-2.5181403160095215,
0.47385719418525696,
-0.17868179082870483,
-1.4540334939956665,
-0.032680489122867584,
-1.0414714813232422,
0.903982937335968,
-0.5745460391044617,
-1.1070475578308105,
-1.4616632461547852,
0.20803681015968323,
-0.12164292484521866,
0.9006096124649048,
-1.6068795919418335,
-0.08891251683235168,
1.2196881771087646,
0.9434230923652649,
-0.6835628151893616,
0.9866499304771423,
0.21007828414440155,
1.065200686454773,
0.8799232840538025,
-0.31351563334465027,
0.4446776807308197,
0.0920214056968689,
-1.3381181955337524,
0.4142042398452759,
1.1421993970870972,
0.21931637823581696,
1.508285403251648,
-0.6070310473442078,
0.056626006960868835,
0.4342215359210968,
-0.4806685149669647,
-0.4934181272983551,
-0.5955448150634766,
0.6945698261260986,
0.02517779916524887,
-0.9504615664482117,
0.011694268323481083,
-0.022575655952095985,
-0.2476000189781189,
0.1400468498468399,
-1.4464179277420044,
-0.13776232302188873,
-0.3616969883441925,
-0.6715663075447083,
-1.234544038772583,
0.04427571967244148,
1.3176541328430176,
-0.7835761904716492,
-0.2316478192806244,
0.4745369255542755,
0.27860185503959656,
0.5198987722396851,
0.6129426956176758,
-0.6762890219688416,
-0.34793388843536377,
-0.14527733623981476,
-0.33354029059410095,
0.33473652601242065,
1.4242876768112183,
-0.07377687841653824,
-1.0039161443710327,
0.7057145237922668,
-0.4307335913181305,
0.15292508900165558,
1.969509482383728,
0.03959790989756584,
-0.7931806445121765,
0.24157972633838654,
-0.7332746982574463,
1.881588101387024,
1.7018362283706665,
1.365027666091919,
-0.1467883586883545,
-0.9664912223815918,
0.6080325841903687,
-0.32111993432044983,
-0.3929556608200073,
0.9350159168243408,
0.42581167817115784,
-0.20386923849582672,
-1.3533226251602173,
0.641360878944397,
1.2433300018310547,
-0.937886655330658,
-0.8259016871452332,
0.17089837789535522,
-0.8255928158760071,
1.072446346282959,
0.72185879945755,
0.35751694440841675,
0.25916969776153564,
1.5282255411148071,
0.8140618205070496,
-0.458972692489624,
0.5571634769439697,
0.5233927369117737,
-0.17500530183315277,
-2.141185998916626,
-1.0889887809753418,
0.34332048892974854,
-0.5051323771476746,
-1.6557084321975708,
1.378736138343811,
-1.2315171957015991,
-0.958472490310669,
0.5591873526573181,
0.05760667473077774,
1.3869438171386719,
0.32823121547698975,
1.6179509162902832,
2.0050759315490723,
0.9338163137435913,
0.39486923813819885,
1.2474725246429443,
-0.2016727328300476,
-0.47738102078437805,
1.766001582145691,
-0.5357164740562439,
0.5208978056907654,
1.0321447849273682,
-0.334245502948761,
-1.0799673795700073,
-0.7914096713066101,
-1.2198628187179565,
-0.6864403486251831,
1.2199574708938599,
0.07651016116142273,
-1.0899301767349243,
0.3275149464607239,
1.5679125785827637,
0.056670933961868286,
-0.3427243232727051,
0.6930069923400879,
0.4328429698944092,
-0.7963038086891174,
-0.057638514786958694,
-0.8868142366409302,
0.48958489298820496,
-0.17048051953315735,
-0.3799155652523041,
0.3417576551437378,
0.4584326446056366,
1.3627697229385376,
-0.07144863158464432,
0.10200726240873337,
1.2750418186187744,
-1.387420415878296,
1.497323751449585,
-0.6401664614677429,
0.284040629863739,
-2.400364637374878,
1.3978296518325806,
-0.8589098453521729,
1.8535000085830688,
-2.629187822341919,
0.47022512555122375,
-0.5669784545898438,
-0.40598398447036743,
0.2430347353219986,
-0.35230782628059387,
0.09151578694581985,
-0.12958425283432007,
-1.1341601610183716,
-0.11610627919435501,
-0.7789140343666077,
0.5586966276168823,
1.1670031547546387,
1.3644187450408936,
-1.113121747970581,
-0.2683344781398773,
-1.7628041505813599,
-0.24073319137096405,
-0.8225058317184448,
0.37647685408592224,
-1.9689310789108276,
-0.22164587676525116,
-1.9652929306030273,
-2.4043772220611572,
-1.3074555397033691,
-0.799649178981781,
1.06640625,
0.10807852447032928,
-0.8249350786209106,
1.0282162427902222,
-0.41501033306121826,
-1.832693338394165,
1.1121366024017334,
-2.1969709396362305
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Are you able to use `aiohttp` to get the file at `https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json` using your proxy ? | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 16 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Are you able to use `aiohttp` to get the file at `https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json` using your proxy ? | [
-1.112959861755371,
-0.9259433746337891,
-0.7630180716514587,
1.5316376686096191,
-0.1310124397277832,
-1.2482497692108154,
0.12726178765296936,
-0.999457597732544,
1.683218002319336,
-0.7414509057998657,
0.2998110353946686,
-1.7038589715957642,
0.012864062562584877,
-0.5900685787200928,
-0.715489387512207,
-0.8612679839134216,
-0.3617854416370392,
-0.6846144795417786,
0.9980223178863525,
2.5000622272491455,
1.2123373746871948,
-1.38909912109375,
2.678734064102173,
0.7308942079544067,
-0.20519006252288818,
-0.9949010610580444,
0.5566007494926453,
0.004420217126607895,
-1.2955961227416992,
-0.34562426805496216,
-0.8848212361335754,
-0.08158557116985321,
-0.5518704056739807,
-0.5539945363998413,
0.04649233818054199,
0.4500768184661865,
-0.3077346682548523,
-0.4849064350128174,
-0.5504510998725891,
-0.7819174528121948,
0.45711401104927063,
-0.37445083260536194,
0.8728064894676208,
-0.3743754029273987,
1.7870985269546509,
-0.5905281901359558,
0.4527757465839386,
0.7570445537567139,
1.2860385179519653,
0.15775355696678162,
0.08399650454521179,
0.29989901185035706,
0.41445669531822205,
0.02965238131582737,
0.5229985117912292,
1.1166143417358398,
0.6053903102874756,
0.49791496992111206,
0.6763800978660583,
-2.261003017425537,
1.237125039100647,
-0.9191531538963318,
0.30009549856185913,
1.2980948686599731,
-0.91460782289505,
0.3498172163963318,
-1.8106192350387573,
-0.04999493807554245,
0.5859066843986511,
-2.211115598678589,
0.23489932715892792,
-1.3062875270843506,
-0.562023401260376,
1.0116921663284302,
0.31880512833595276,
-1.1973689794540405,
0.10659588128328323,
-0.4269656836986542,
1.0470608472824097,
0.5357826948165894,
1.1859451532363892,
-1.67396879196167,
-0.0709281861782074,
-0.260740727186203,
0.1562727689743042,
-1.2946586608886719,
-1.5622199773788452,
0.5233635306358337,
0.6804503798484802,
0.6148107647895813,
-0.11528287082910538,
0.9186966419219971,
-0.9349965453147888,
0.8256468772888184,
-0.9796162843704224,
-1.810030221939087,
-1.4514000415802002,
-2.3301923274993896,
-2.3266611099243164,
0.7631818652153015,
-0.3773418366909027,
-0.42190128564834595,
2.042132616043091,
-1.0472030639648438,
-1.8151350021362305,
1.090404748916626,
0.26230818033218384,
-0.058649495244026184,
2.3431830406188965,
0.2071104794740677,
-0.7386758923530579,
0.4343944191932678,
-0.7854525446891785,
0.6701257228851318,
-0.3650403618812561,
1.3199821710586548,
0.45788687467575073,
-1.028086543083191,
1.6110610961914062,
-0.40689510107040405,
0.6166986227035522,
-0.724871039390564,
-0.41629859805107117,
-0.6967155933380127,
0.26168838143348694,
1.9110920429229736,
-0.36788037419319153,
1.5424141883850098,
-0.34192609786987305,
-1.5136958360671997,
-1.6087779998779297,
0.8525586128234863,
0.5222731828689575,
-0.7467168569564819,
0.1511390060186386,
-0.3797262907028198,
0.10554343461990356,
-0.08011756837368011,
1.075642704963684,
1.199379563331604,
0.8061182498931885,
-0.32210275530815125,
-0.821578323841095,
0.25516989827156067,
-0.006928391754627228,
-0.7348535060882568,
-1.7774736881256104,
-0.32423722743988037,
0.2361217737197876,
0.6233434081077576,
-1.2034379243850708,
1.7506202459335327,
0.8651076555252075,
1.9459075927734375,
1.0267709493637085,
-0.35732603073120117,
1.4588483572006226,
0.07291653752326965,
1.9381498098373413,
-0.4597778022289276,
0.6478633880615234,
-0.36952829360961914,
-1.1886707544326782,
0.7378748059272766,
-0.32447072863578796,
-2.062100410461426,
-0.7182003855705261,
-0.8434149026870728,
-0.14913557469844818,
-0.746996283531189,
0.9535587430000305,
-0.2865641117095947,
-1.3943250179290771,
0.17905671894550323,
-0.7832133769989014,
0.131149560213089,
-1.2845709323883057,
0.26849669218063354,
0.7800585031509399,
-0.6493435502052307,
0.14961257576942444,
-0.29844847321510315,
-1.2678834199905396,
-0.5412499308586121,
0.4024752378463745,
1.8519397974014282,
-0.7465433478355408,
0.9561320543289185,
0.9821398854255676,
-0.7495499849319458,
0.03818787634372711,
0.3781212866306305,
-0.3429639935493469,
0.8462843894958496,
-0.9899275898933411,
-0.39977535605430603,
1.171021819114685,
-0.17998106777668,
-0.7379941344261169,
1.453934907913208,
0.809387743473053,
-1.0053761005401611,
-0.21535809338092804,
-0.18910805881023407,
-0.8314064741134644,
-0.01565736159682274,
-1.6517391204833984,
-0.10148278623819351,
0.28676506876945496,
-1.5040712356567383,
-0.49833813309669495,
-0.2088901847600937,
1.3452556133270264,
-0.07174639403820038,
1.373799204826355,
-0.25820761919021606,
-0.180462047457695,
-0.38325658440589905,
-0.3437834084033966,
0.16392841935157776,
-0.23886556923389435,
-0.6491413116455078,
0.3041350245475769,
-0.7641956806182861,
0.32584092020988464,
1.3967514038085938,
0.2889159321784973,
0.07048182189464569,
0.53179931640625,
1.0860012769699097,
0.3684035539627075,
-0.05260159820318222,
-0.9305340051651001,
-1.5336560010910034,
1.9749215841293335,
-1.3722554445266724,
2.0155303478240967,
0.7485814690589905,
-0.11612202972173691,
-1.879019856452942,
-1.9601500034332275,
1.360884428024292,
1.1179718971252441,
2.3940024375915527,
0.5623530745506287,
0.4319364130496979,
-0.8322322964668274,
-0.6657324433326721,
0.31365033984184265,
-0.9631047248840332,
-0.7880884408950806,
0.09903080761432648,
2.420180559158325,
1.75884211063385,
-0.46678024530410767,
-0.2406197190284729,
-1.0846751928329468,
1.3541312217712402,
-0.1418202817440033,
0.23645883798599243,
2.0260510444641113,
-0.2500428557395935,
-0.9663927555084229,
1.2772457599639893,
-2.3442306518554688,
0.18985816836357117,
1.9949742555618286,
0.1590338498353958,
0.07154052704572678,
-1.3957648277282715,
-0.6952885389328003,
-0.24183784425258636,
-0.4896794855594635,
-1.194441318511963,
0.5470142364501953,
-0.23789918422698975,
-0.8137557506561279,
-1.456508755683899,
0.14555056393146515,
-1.109007477760315,
-1.7100173234939575,
0.1957303136587143,
1.8600549697875977,
1.9931880235671997,
-0.79437655210495,
1.5001647472381592,
-0.286670446395874,
0.11281703412532806,
1.3274048566818237,
1.260154128074646,
3.159721851348877,
1.9356586933135986,
-1.3733855485916138,
0.7521483302116394,
-0.06556571274995804,
-0.45677614212036133,
1.1583877801895142,
-1.2028160095214844,
1.224107265472412,
-0.28523141145706177,
-1.1556750535964966,
-1.224948763847351,
0.981488049030304,
0.5757186412811279,
0.058002255856990814,
-0.4730599820613861,
1.2127732038497925,
0.11406056582927704,
1.355987548828125,
0.5785388946533203,
-0.41674724221229553,
0.6651758551597595,
-0.3606385886669159,
-0.44439759850502014,
1.5787937641143799,
0.17996203899383545,
-1.359487771987915,
-2.3230233192443848,
-0.23787522315979004,
-0.9360370635986328,
-0.04000837728381157,
-0.5914416313171387,
-0.9910086393356323,
1.6001920700073242,
0.4357590079307556,
-1.1964118480682373,
-0.23538459837436676,
-0.37647345662117004,
-0.572608232498169,
2.680927038192749,
-1.4276317358016968,
-0.2369285672903061,
-1.064406156539917,
-0.5226889252662659,
1.6351873874664307,
-1.1853255033493042,
-0.18734754621982574,
-1.0792378187179565,
-0.6018272638320923,
-1.3663058280944824,
-0.528412938117981,
0.03266027569770813,
-0.8850151300430298,
0.9145008325576782,
0.15114827454090118,
-1.1581412553787231,
-0.26843172311782837,
-0.88932865858078,
0.923809289932251,
-0.10764434933662415,
0.2534703314304352,
1.8983168601989746,
0.4580104649066925,
-0.3742164969444275,
0.6743196845054626,
1.1263139247894287,
0.6056777238845825,
-0.645716667175293,
0.3325713276863098,
-0.6393954157829285,
0.30263349413871765,
-1.4176781177520752,
0.22097209095954895,
-2.8442654609680176,
0.624792218208313,
-0.05531306564807892,
-0.05452880263328552,
-0.05783358961343765,
-1.266030192375183,
1.0631097555160522,
2.5880517959594727,
-1.1895945072174072,
0.439576655626297,
0.34174349904060364,
1.1628544330596924,
-1.517435073852539,
0.25587666034698486,
-0.43775445222854614,
2.0877177715301514,
0.13328228890895844,
1.2128732204437256,
-0.4417543113231659,
-2.2057271003723145,
0.5836372375488281,
-1.2340586185455322,
-1.070852518081665,
0.8218307495117188,
-0.7793499827384949,
0.11148310452699661,
-1.3794221878051758,
-0.18331338465213776,
-0.8276169896125793,
-1.2434526681900024,
0.7252627611160278,
0.1379275918006897,
0.5228462219238281,
-0.6520567536354065,
0.3740461468696594,
-2.144174337387085,
-1.3467674255371094,
-0.2698271870613098,
-0.8893287181854248,
0.4834279716014862,
-0.3222229480743408,
0.7103557586669922,
-0.15120156109333038,
0.0016867360100150108,
0.3326253592967987,
1.3612548112869263,
3.4200799465179443,
0.1505264937877655,
0.29288217425346375,
-0.15554390847682953,
-0.9927428960800171,
1.425493836402893,
0.9153985381126404,
-0.14870280027389526,
-0.5404764413833618,
-1.074770212173462,
1.1842654943466187,
1.980878233909607,
1.1730095148086548,
0.10864072293043137,
-0.8554403781890869,
-0.8282912373542786,
0.0648382306098938,
0.18575873970985413,
0.48638680577278137,
0.9314517378807068,
0.06592053174972534,
0.08836474269628525,
1.4278664588928223,
1.1886755228042603,
-0.3292689919471741,
0.4096386432647705,
-0.8664965033531189,
-0.4509688913822174,
0.5071221590042114,
0.3228349983692169,
0.007876301184296608,
0.3217267096042633,
-1.1191710233688354,
-0.1839972287416458,
-0.38664573431015015,
-0.8645700216293335,
-0.7412105798721313,
-0.43226608633995056,
-0.35844284296035767,
1.6310127973556519,
0.11307763308286667,
-0.47818270325660706,
-0.009416316635906696,
-0.7818189859390259,
-0.07869643718004227,
-1.0331170558929443,
0.3344826102256775,
-0.18260854482650757,
-0.04232264310121536,
-0.1624022126197815,
1.7522404193878174,
-0.9986222386360168,
-2.0820364952087402,
0.24834044277668,
0.24272312223911285,
-0.3885914087295532,
0.21091759204864502,
1.684317708015442,
0.5462037324905396,
1.3298256397247314,
1.3212687969207764,
0.983932614326477,
-0.6414920687675476,
-1.2774181365966797,
0.6312557458877563,
1.001478910446167,
-1.400091290473938,
0.759716272354126,
-0.0182054340839386,
-0.5170853137969971,
0.6370691061019897,
1.2954779863357544,
0.4264841079711914,
-2.0170130729675293,
0.720754861831665,
-0.8873421549797058,
0.7326391935348511,
0.6938459873199463,
0.7860662937164307,
0.1766018271446228,
0.736009418964386,
-1.2310101985931396,
-1.1315878629684448,
-0.6577597260475159,
-0.66680908203125,
1.9376981258392334,
-0.22428405284881592,
0.5556076765060425,
-0.17262308299541473,
-1.3631136417388916,
-0.12484285235404968,
0.754997968673706,
0.40431904792785645,
-0.5355501770973206,
0.8297924995422363,
-0.5893011689186096,
-1.0311394929885864,
-1.2859094142913818,
-0.46111443638801575,
-1.0209786891937256,
-0.9023733139038086,
1.0054360628128052,
0.8378101587295532,
0.35475441813468933,
1.9155930280685425,
0.6305598020553589,
0.20326730608940125,
-2.6877641677856445,
0.8559809327125549,
0.32943791151046753,
-0.01248192973434925,
0.9187135696411133,
0.2670799493789673,
1.0483280420303345,
-0.03209879994392395,
0.6028211712837219,
-2.386655330657959,
2.295910120010376,
-0.1598101258277893,
0.6319674849510193,
-0.02896522544324398,
-0.13207699358463287,
1.0318633317947388,
0.4563750922679901,
0.5702630281448364,
-1.0442899465560913,
0.71066814661026,
-0.6223256587982178,
1.2241859436035156,
0.81280118227005,
-0.8419429063796997,
-0.019458789378404617,
1.352174162864685,
0.508246123790741,
-0.46137580275535583,
-0.891603410243988,
-0.9679586291313171,
0.9356479048728943,
1.8083189725875854,
-0.06530124694108963,
0.0073240939527750015,
0.9155136346817017,
0.613923192024231,
-1.3537565469741821,
0.04049704968929291,
-0.7849175333976746,
-0.6750638484954834,
1.6558585166931152,
2.109647274017334,
-0.0848286896944046,
-0.24757443368434906,
-0.8055793046951294,
-1.2382380962371826,
0.7996907830238342,
0.007900049909949303,
0.11804616451263428,
0.7555957436561584,
-0.6383171677589417,
1.1727768182754517,
0.7946779131889343,
0.9735774397850037,
0.12929299473762512,
0.25596359372138977,
0.314473956823349,
-0.34685221314430237,
-1.2164688110351562,
-0.2657078802585602,
-1.0429960489273071,
-2.4971139430999756,
0.5152729749679565,
-0.22233816981315613,
-1.4284648895263672,
-0.03427634760737419,
-1.0380253791809082,
0.8956034779548645,
-0.5591102242469788,
-1.0850446224212646,
-1.4568771123886108,
0.22480541467666626,
-0.14363138377666473,
0.898753821849823,
-1.5991718769073486,
-0.05222402513027191,
1.2505176067352295,
0.9306291341781616,
-0.6602298021316528,
0.9472532272338867,
0.19797112047672272,
1.0187700986862183,
0.8978001475334167,
-0.2983906865119934,
0.4630199074745178,
0.08483909070491791,
-1.3600797653198242,
0.38208499550819397,
1.167029619216919,
0.23082002997398376,
1.4876052141189575,
-0.610720694065094,
0.06582003831863403,
0.421082079410553,
-0.4764535427093506,
-0.5017120838165283,
-0.5932891964912415,
0.6825926899909973,
0.04451555758714676,
-0.9780684113502502,
0.06400834023952484,
-0.00008585304021835327,
-0.21326054632663727,
0.14404268562793732,
-1.4243659973144531,
-0.1442737728357315,
-0.3233011066913605,
-0.6959527730941772,
-1.2465468645095825,
0.03842983394861221,
1.3000022172927856,
-0.7840190529823303,
-0.19480399787425995,
0.5242365002632141,
0.28857532143592834,
0.525073766708374,
0.5525754690170288,
-0.6767296195030212,
-0.3191780745983124,
-0.1663448065519333,
-0.3504961133003235,
0.3484767973423004,
1.3720630407333374,
-0.06154969334602356,
-1.0177868604660034,
0.7422387003898621,
-0.4361478090286255,
0.1495341807603836,
1.9965304136276245,
0.05572586506605148,
-0.8185620903968811,
0.25968530774116516,
-0.7175028920173645,
1.883049726486206,
1.7338635921478271,
1.3559645414352417,
-0.10387080907821655,
-0.9831535816192627,
0.5759851932525635,
-0.3143356740474701,
-0.36337047815322876,
0.9933576583862305,
0.38781559467315674,
-0.22327148914337158,
-1.3367853164672852,
0.5902152061462402,
1.2900216579437256,
-0.9403786063194275,
-0.8593418598175049,
0.16820326447486877,
-0.8641628623008728,
1.0503511428833008,
0.7268696427345276,
0.360507071018219,
0.23637011647224426,
1.4913698434829712,
0.7788047790527344,
-0.4414843022823334,
0.5511411428451538,
0.48667269945144653,
-0.19530339539051056,
-2.099527597427368,
-1.062735676765442,
0.3416127562522888,
-0.5092291235923767,
-1.6156885623931885,
1.3579678535461426,
-1.2521483898162842,
-0.9578691124916077,
0.5802028775215149,
0.06841292977333069,
1.4278056621551514,
0.3217651844024658,
1.6243914365768433,
2.0346720218658447,
0.9233205914497375,
0.3663657009601593,
1.2735830545425415,
-0.2097589373588562,
-0.45669275522232056,
1.7616654634475708,
-0.5328376889228821,
0.5182523727416992,
1.0165270566940308,
-0.3448721170425415,
-1.0947754383087158,
-0.8072311878204346,
-1.1882001161575317,
-0.7047163844108582,
1.2606254816055298,
0.08833127468824387,
-1.0588631629943848,
0.3379266560077667,
1.5880074501037598,
0.0802035704255104,
-0.31269630789756775,
0.6886031031608582,
0.4153233766555786,
-0.822445273399353,
-0.012985257431864738,
-0.9189231395721436,
0.49564069509506226,
-0.1563006341457367,
-0.34399062395095825,
0.34864282608032227,
0.47221365571022034,
1.313653826713562,
-0.04979611933231354,
0.10478908568620682,
1.311592698097229,
-1.3417271375656128,
1.5382680892944336,
-0.6391515731811523,
0.2467488795518875,
-2.4241325855255127,
1.4085279703140259,
-0.8552571535110474,
1.8279577493667603,
-2.6063032150268555,
0.4535411596298218,
-0.5538369417190552,
-0.4097929298877716,
0.23268835246562958,
-0.3426463305950165,
0.09656915068626404,
-0.17408987879753113,
-1.1381635665893555,
-0.14926299452781677,
-0.8087819218635559,
0.5302467346191406,
1.2055022716522217,
1.383408784866333,
-1.1026544570922852,
-0.30111560225486755,
-1.7963454723358154,
-0.21305988729000092,
-0.8017618060112,
0.39979803562164307,
-1.955091118812561,
-0.18766266107559204,
-1.9411327838897705,
-2.4475631713867188,
-1.3457657098770142,
-0.7939170598983765,
1.0714197158813477,
0.107815682888031,
-0.84535151720047,
1.0055814981460571,
-0.4301252067089081,
-1.8501518964767456,
1.0924642086029053,
-2.2348506450653076
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | It only works when passing trust_env=True when creating the ClientSession, as well as setting ssl=False.
Working Example:
```
import os
os.environ['HTTP_PROXY'] = "xyz"
os.environ['HTTPS_PROXY'] = "xyz"
import asyncio
import aiohttp
async def download_pep(url):
async with aiohttp.ClientSession(trust_env=True) as session:
print("1")
async with session.get(url, ssl=False) as resp:
print("2")
content = await resp.text()
print(content)
return content
asyncio.run(download_pep("https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json"))
```
SSL Verification has been a problem with other packages as well. Usually I circumvent the problem by setting
```
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
```
(probably not the best idea for security), although here aiohttp does not seem to use this default context. | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 98 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
It only works when passing trust_env=True when creating the ClientSession, as well as setting ssl=False.
Working Example:
```
import os
os.environ['HTTP_PROXY'] = "xyz"
os.environ['HTTPS_PROXY'] = "xyz"
import asyncio
import aiohttp
async def download_pep(url):
async with aiohttp.ClientSession(trust_env=True) as session:
print("1")
async with session.get(url, ssl=False) as resp:
print("2")
content = await resp.text()
print(content)
return content
asyncio.run(download_pep("https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json"))
```
SSL Verification has been a problem with other packages as well. Usually I circumvent the problem by setting
```
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
```
(probably not the best idea for security), although here aiohttp does not seem to use this default context. | [
-1.2191312313079834,
-0.9455177783966064,
-0.7175590395927429,
1.541937232017517,
-0.20577563345432281,
-1.2038577795028687,
0.14631536602973938,
-1.0083062648773193,
1.6711292266845703,
-0.8074891567230225,
0.3124035596847534,
-1.6812998056411743,
0.011736181564629078,
-0.5787494778633118,
-0.7007496356964111,
-0.799746572971344,
-0.36202308535575867,
-0.6871348023414612,
1.0693323612213135,
2.5064830780029297,
1.1988297700881958,
-1.4053064584732056,
2.7188541889190674,
0.7521512508392334,
-0.18610000610351562,
-1.0002543926239014,
0.5357973575592041,
-0.02511875331401825,
-1.3261020183563232,
-0.3781221807003021,
-0.9317575693130493,
-0.047188010066747665,
-0.5149445533752441,
-0.5163475871086121,
0.04008512198925018,
0.4443422257900238,
-0.2889021635055542,
-0.5117905735969543,
-0.5697509050369263,
-0.7609032988548279,
0.4675425589084625,
-0.40389910340309143,
0.8712452054023743,
-0.36104342341423035,
1.7606903314590454,
-0.6120631098747253,
0.45925837755203247,
0.7483067512512207,
1.2914648056030273,
0.1503317952156067,
0.0349673256278038,
0.3449532687664032,
0.3876381516456604,
0.013005212880671024,
0.5810946822166443,
1.1414135694503784,
0.6218499541282654,
0.47118738293647766,
0.7282933592796326,
-2.2324867248535156,
1.2257024049758911,
-0.9825167059898376,
0.31025418639183044,
1.2845076322555542,
-0.927851140499115,
0.3900446593761444,
-1.790433645248413,
-0.004408250097185373,
0.5571370720863342,
-2.2026844024658203,
0.27354100346565247,
-1.3252735137939453,
-0.5702292323112488,
1.0232758522033691,
0.3346315324306488,
-1.163138747215271,
0.1153893768787384,
-0.4387936592102051,
1.0173419713974,
0.48381951451301575,
1.1279759407043457,
-1.6464804410934448,
-0.06672148406505585,
-0.2357943207025528,
0.19302186369895935,
-1.2950522899627686,
-1.5346851348876953,
0.547390878200531,
0.7127515077590942,
0.5884498953819275,
-0.1316114068031311,
0.9928082227706909,
-1.0040245056152344,
0.8389677405357361,
-1.0014352798461914,
-1.7833850383758545,
-1.4869385957717896,
-2.2989754676818848,
-2.24629282951355,
0.7349828481674194,
-0.41301780939102173,
-0.4581913352012634,
2.0634021759033203,
-1.0490940809249878,
-1.8215643167495728,
1.1822196245193481,
0.21832630038261414,
-0.009797353297472,
2.3649141788482666,
0.20076574385166168,
-0.728320300579071,
0.48954153060913086,
-0.785531759262085,
0.7350379228591919,
-0.35190874338150024,
1.26742684841156,
0.3911017179489136,
-0.9630417227745056,
1.5943028926849365,
-0.3934684693813324,
0.6291763782501221,
-0.6612319946289062,
-0.44895675778388977,
-0.6866979002952576,
0.3066774904727936,
1.9493597745895386,
-0.30494511127471924,
1.5252447128295898,
-0.3918748199939728,
-1.5496667623519897,
-1.6338438987731934,
0.8224430680274963,
0.5585232973098755,
-0.7062650322914124,
0.13986289501190186,
-0.37143638730049133,
0.12529155611991882,
-0.05146687477827072,
1.085316777229309,
1.2718017101287842,
0.8076696395874023,
-0.2654000520706177,
-0.8100006580352783,
0.24675019085407257,
-0.002772469073534012,
-0.7313030362129211,
-1.716217041015625,
-0.32018885016441345,
0.21272331476211548,
0.6384019255638123,
-1.2068153619766235,
1.7675789594650269,
0.9242196679115295,
1.9178812503814697,
1.0436861515045166,
-0.308444619178772,
1.471372127532959,
0.1054081842303276,
1.9001905918121338,
-0.4511280655860901,
0.6331904530525208,
-0.3919267952442169,
-1.1880234479904175,
0.7533068656921387,
-0.3408980071544647,
-2.078854560852051,
-0.7362831830978394,
-0.7688809037208557,
-0.17588762938976288,
-0.7451441884040833,
0.9609687924385071,
-0.32870951294898987,
-1.3800374269485474,
0.18218056857585907,
-0.8101094365119934,
0.14076773822307587,
-1.2049814462661743,
0.253840833902359,
0.7609089612960815,
-0.6605820059776306,
0.18059051036834717,
-0.28948232531547546,
-1.2716395854949951,
-0.5067304968833923,
0.3823343813419342,
1.8661704063415527,
-0.7838014960289001,
0.8886446952819824,
0.996505618095398,
-0.738981306552887,
0.013740305788815022,
0.34137964248657227,
-0.34080806374549866,
0.7989025115966797,
-0.9805199503898621,
-0.40997785329818726,
1.1820085048675537,
-0.1671173870563507,
-0.6784514784812927,
1.454129695892334,
0.7428081631660461,
-1.0040751695632935,
-0.256930947303772,
-0.14645589888095856,
-0.8468847274780273,
-0.038088176399469376,
-1.6539404392242432,
-0.14183266460895538,
0.34855735301971436,
-1.5205168724060059,
-0.49450647830963135,
-0.21102623641490936,
1.3290133476257324,
-0.07265623658895493,
1.4049961566925049,
-0.3277687132358551,
-0.11042440682649612,
-0.3302149772644043,
-0.37120887637138367,
0.1768903285264969,
-0.2513764500617981,
-0.6602020263671875,
0.24104918539524078,
-0.7914695739746094,
0.3258860111236572,
1.41266930103302,
0.3138163685798645,
0.06403333693742752,
0.5093762278556824,
1.1143953800201416,
0.4409691393375397,
-0.061408814042806625,
-0.8988219499588013,
-1.5377439260482788,
1.9381004571914673,
-1.4242881536483765,
2.048006296157837,
0.7501618266105652,
-0.045202381908893585,
-1.869718313217163,
-1.9511007070541382,
1.320481538772583,
1.1206386089324951,
2.3549561500549316,
0.5210316777229309,
0.39793530106544495,
-0.8409252762794495,
-0.6595872640609741,
0.3073529005050659,
-0.978320300579071,
-0.8059225082397461,
0.086445651948452,
2.431511878967285,
1.7888908386230469,
-0.4620901942253113,
-0.20961377024650574,
-1.0169378519058228,
1.3957394361495972,
-0.1337483525276184,
0.2474464625120163,
2.0213992595672607,
-0.17442288994789124,
-0.9960546493530273,
1.3174593448638916,
-2.371387243270874,
0.19383332133293152,
2.010866403579712,
0.18201075494289398,
0.10861622542142868,
-1.3527517318725586,
-0.6766887903213501,
-0.23816503584384918,
-0.44043317437171936,
-1.1965771913528442,
0.5726312398910522,
-0.24790500104427338,
-0.7825044989585876,
-1.4418407678604126,
0.1636705845594406,
-1.1175339221954346,
-1.6880518198013306,
0.17096833884716034,
1.87120521068573,
2.0279271602630615,
-0.7934558987617493,
1.5509579181671143,
-0.35195282101631165,
0.09439884126186371,
1.2870416641235352,
1.240386962890625,
3.107276201248169,
1.9585309028625488,
-1.2980047464370728,
0.6816360354423523,
-0.12678375840187073,
-0.42848408222198486,
1.128320336341858,
-1.2235209941864014,
1.2646596431732178,
-0.17613671720027924,
-1.1353223323822021,
-1.1738901138305664,
0.9436352849006653,
0.5119098424911499,
0.05033263564109802,
-0.4372040629386902,
1.198276400566101,
0.10639263689517975,
1.3955271244049072,
0.5832241773605347,
-0.3791584074497223,
0.6605095863342285,
-0.35860753059387207,
-0.452824205160141,
1.5373926162719727,
0.14326249063014984,
-1.3876689672470093,
-2.2640299797058105,
-0.1997317671775818,
-0.902009904384613,
0.01948389783501625,
-0.6019018292427063,
-0.9830944538116455,
1.6192480325698853,
0.3473675549030304,
-1.211997389793396,
-0.1878983974456787,
-0.3921765983104706,
-0.5144933462142944,
2.6753058433532715,
-1.4554541110992432,
-0.2801372706890106,
-1.0692765712738037,
-0.5639331340789795,
1.6279656887054443,
-1.2058515548706055,
-0.19495390355587006,
-1.0699265003204346,
-0.5246890783309937,
-1.3318915367126465,
-0.5442774295806885,
0.02357248216867447,
-0.9256236553192139,
0.913367509841919,
0.17787840962409973,
-1.1918845176696777,
-0.3054831922054291,
-0.8871363997459412,
0.9323524832725525,
-0.08623757213354111,
0.2136945128440857,
1.9441434144973755,
0.35908961296081543,
-0.35324907302856445,
0.766769289970398,
1.1393401622772217,
0.6061211824417114,
-0.6178171634674072,
0.31856271624565125,
-0.6321470737457275,
0.4104551374912262,
-1.4444291591644287,
0.2210605889558792,
-2.835216760635376,
0.6330063939094543,
-0.0103429164737463,
-0.07590673118829727,
-0.05723914876580238,
-1.2972913980484009,
1.0705857276916504,
2.6312198638916016,
-1.1825469732284546,
0.4575880765914917,
0.3506350517272949,
1.2220051288604736,
-1.511547565460205,
0.2666514813899994,
-0.4314473867416382,
2.0580687522888184,
0.17836333811283112,
1.217637062072754,
-0.46077820658683777,
-2.27274227142334,
0.6190964579582214,
-1.2579258680343628,
-1.1197513341903687,
0.7779501080513,
-0.8270683288574219,
0.09567661583423615,
-1.3733869791030884,
-0.20194217562675476,
-0.8599969148635864,
-1.1622391939163208,
0.6662590503692627,
0.18675468862056732,
0.44319427013397217,
-0.6518214344978333,
0.3778248727321625,
-2.2135777473449707,
-1.3501856327056885,
-0.2818038761615753,
-0.9075634479522705,
0.4835359752178192,
-0.3432401418685913,
0.6922115683555603,
-0.17246714234352112,
-0.02457820065319538,
0.3383384644985199,
1.4130184650421143,
3.3879787921905518,
0.14829818904399872,
0.3070601522922516,
-0.2332783192396164,
-0.9831879734992981,
1.4624513387680054,
0.9091765284538269,
-0.1609337031841278,
-0.5437690615653992,
-1.1098653078079224,
1.17927885055542,
1.9621976613998413,
1.0712120532989502,
0.03506473824381828,
-0.8704079389572144,
-0.8518750071525574,
0.03891271725296974,
0.1503995656967163,
0.4971057176589966,
1.0032331943511963,
0.09016057848930359,
0.08148624747991562,
1.4774188995361328,
1.145220160484314,
-0.3633244037628174,
0.38582688570022583,
-0.8488689064979553,
-0.47432491183280945,
0.5085007548332214,
0.30851981043815613,
-0.06075263023376465,
0.3153287470340729,
-1.0646599531173706,
-0.15981538593769073,
-0.3836323022842407,
-0.8483190536499023,
-0.7511007785797119,
-0.39492928981781006,
-0.3360072374343872,
1.6177183389663696,
0.17191700637340546,
-0.4935697913169861,
-0.03230566903948784,
-0.7890376448631287,
-0.09815747290849686,
-1.0275460481643677,
0.34060728549957275,
-0.17403721809387207,
-0.09599395841360092,
-0.17285090684890747,
1.7376549243927002,
-0.9300337433815002,
-2.0009543895721436,
0.22189077734947205,
0.20478928089141846,
-0.27040982246398926,
0.2133319228887558,
1.699521541595459,
0.5887932777404785,
1.347884178161621,
1.339094877243042,
0.9200826287269592,
-0.5766057968139648,
-1.3018678426742554,
0.6618691086769104,
0.9598114490509033,
-1.4027996063232422,
0.7507692575454712,
-0.035115648061037064,
-0.482671320438385,
0.6114277839660645,
1.3363476991653442,
0.47529542446136475,
-2.0193941593170166,
0.7359476089477539,
-0.985740602016449,
0.750351071357727,
0.7393416166305542,
0.7513817548751831,
0.17949308454990387,
0.7626456022262573,
-1.1675316095352173,
-1.1552188396453857,
-0.6652275919914246,
-0.7009758353233337,
1.9508899450302124,
-0.29760369658470154,
0.578542172908783,
-0.19139957427978516,
-1.3871395587921143,
-0.13757726550102234,
0.7111082077026367,
0.31846457719802856,
-0.5067926645278931,
0.8567553758621216,
-0.6593282222747803,
-1.0672165155410767,
-1.2877856492996216,
-0.5105413794517517,
-0.9747353196144104,
-0.9488645792007446,
1.0196318626403809,
0.8185145258903503,
0.3224494159221649,
1.9151263236999512,
0.6603058576583862,
0.22471983730793,
-2.6543474197387695,
0.8592521548271179,
0.3107450008392334,
-0.008032873272895813,
0.9012978672981262,
0.2933289408683777,
0.9975751638412476,
-0.031676243990659714,
0.5749996304512024,
-2.4279210567474365,
2.3116164207458496,
-0.18341097235679626,
0.7049852609634399,
-0.01767142489552498,
-0.09275715053081512,
1.0327805280685425,
0.5168653130531311,
0.5661617517471313,
-0.9990392327308655,
0.6521678566932678,
-0.6455084085464478,
1.2969727516174316,
0.8051902055740356,
-0.7993524670600891,
-0.037096213549375534,
1.3597629070281982,
0.42235317826271057,
-0.5357316732406616,
-0.8961755633354187,
-0.9950264096260071,
0.942011833190918,
1.8376119136810303,
-0.0755317285656929,
-0.011506937444210052,
0.8294393420219421,
0.6268540620803833,
-1.3435670137405396,
-0.014258015900850296,
-0.7790311574935913,
-0.7026927471160889,
1.6370645761489868,
2.1215932369232178,
-0.11303272843360901,
-0.28598538041114807,
-0.719987690448761,
-1.2648550271987915,
0.7999798059463501,
-0.003691289108246565,
0.13128267228603363,
0.729328453540802,
-0.6403725147247314,
1.1280312538146973,
0.8311172127723694,
0.9834590554237366,
0.14595328271389008,
0.25399112701416016,
0.31751999258995056,
-0.35361069440841675,
-1.2147995233535767,
-0.267373263835907,
-1.0471519231796265,
-2.5384104251861572,
0.45517465472221375,
-0.19760726392269135,
-1.4504108428955078,
0.0202876515686512,
-1.028327226638794,
0.9112666845321655,
-0.5899655222892761,
-1.1089835166931152,
-1.4918229579925537,
0.2066524624824524,
-0.09260756522417068,
0.8900877237319946,
-1.5947498083114624,
-0.11911047995090485,
1.2122796773910522,
0.9622226357460022,
-0.6993178129196167,
0.9678820371627808,
0.2232195883989334,
1.0596997737884521,
0.8789337873458862,
-0.32791465520858765,
0.4450394809246063,
0.03468216955661774,
-1.323689341545105,
0.3719843327999115,
1.1728687286376953,
0.22354412078857422,
1.5132849216461182,
-0.614051878452301,
0.04647532105445862,
0.4159514605998993,
-0.571904182434082,
-0.45048195123672485,
-0.5949187874794006,
0.6791016459465027,
0.011446957476437092,
-0.9694854021072388,
-0.029333677142858505,
-0.016412902623414993,
-0.2444218397140503,
0.13276293873786926,
-1.4483405351638794,
-0.0957622081041336,
-0.3542371392250061,
-0.6860327124595642,
-1.2382380962371826,
0.03569817543029785,
1.3460513353347778,
-0.8083453178405762,
-0.18201392889022827,
0.46652448177337646,
0.29092028737068176,
0.5072672963142395,
0.6139783263206482,
-0.7114863395690918,
-0.3372393250465393,
-0.1558016985654831,
-0.34857356548309326,
0.3502490222454071,
1.4111807346343994,
-0.04045701399445534,
-1.0294946432113647,
0.69405198097229,
-0.44165903329849243,
0.13893432915210724,
1.9621754884719849,
0.040848180651664734,
-0.7955709099769592,
0.2559519112110138,
-0.7637536525726318,
1.8963172435760498,
1.7024171352386475,
1.338528037071228,
-0.13397489488124847,
-0.9574721455574036,
0.6283109784126282,
-0.33883601427078247,
-0.3392871618270874,
0.9144977927207947,
0.4288957118988037,
-0.25710779428482056,
-1.3483998775482178,
0.6742956638336182,
1.238735318183899,
-0.8959985971450806,
-0.8097890615463257,
0.13110074400901794,
-0.8120494484901428,
1.0544376373291016,
0.7569624185562134,
0.32058122754096985,
0.26823458075523376,
1.5371700525283813,
0.8431668877601624,
-0.471150279045105,
0.5597279667854309,
0.5359814167022705,
-0.17130187153816223,
-2.159315586090088,
-1.0418039560317993,
0.35282978415489197,
-0.4600889980792999,
-1.6376359462738037,
1.393630862236023,
-1.2277098894119263,
-0.9610303640365601,
0.5760595202445984,
0.062020495533943176,
1.3799508810043335,
0.33779188990592957,
1.5850765705108643,
2.0160114765167236,
0.9239842891693115,
0.40351828932762146,
1.230384111404419,
-0.236146941781044,
-0.4899193346500397,
1.7209383249282837,
-0.5337612628936768,
0.508411169052124,
1.0046987533569336,
-0.3227982223033905,
-1.0513458251953125,
-0.8132678866386414,
-1.2418677806854248,
-0.7613239288330078,
1.2017040252685547,
0.11384806782007217,
-1.0757558345794678,
0.33105596899986267,
1.5497419834136963,
0.11001840233802795,
-0.32135212421417236,
0.6788730025291443,
0.42410361766815186,
-0.8146800398826599,
-0.07748021930456161,
-0.8459806442260742,
0.4630400836467743,
-0.17484150826931,
-0.3700604736804962,
0.35288840532302856,
0.4206138253211975,
1.3585904836654663,
-0.04985804855823517,
0.08394861966371536,
1.2366634607315063,
-1.3779720067977905,
1.5107910633087158,
-0.6631194353103638,
0.2943378686904907,
-2.391378164291382,
1.4087787866592407,
-0.861535370349884,
1.863940954208374,
-2.6263115406036377,
0.48103320598602295,
-0.5667496919631958,
-0.42965731024742126,
0.22981375455856323,
-0.3220462203025818,
0.09677968174219131,
-0.1158539354801178,
-1.1592745780944824,
-0.12121593207120895,
-0.7422531247138977,
0.5848883986473083,
1.1258348226547241,
1.356772541999817,
-1.0998153686523438,
-0.29385775327682495,
-1.7783833742141724,
-0.2318192422389984,
-0.84709233045578,
0.3693343997001648,
-1.9892760515213013,
-0.2389288693666458,
-1.963951826095581,
-2.3958959579467773,
-1.301173448562622,
-0.7841908931732178,
1.1171845197677612,
0.1160142719745636,
-0.7920587062835693,
1.0744012594223022,
-0.39733952283859253,
-1.8473857641220093,
1.1223031282424927,
-2.1915132999420166
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | We do pass `trust_env` as well. Could you share the full stack trace you get when streaming using `datasets` ? That could help locate where we might have forgotten to pass `trust_env` | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 32 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
We do pass `trust_env` as well. Could you share the full stack trace you get when streaming using `datasets` ? That could help locate where we might have forgotten to pass `trust_env` | [
-1.1229842901229858,
-0.9108546376228333,
-0.7340460419654846,
1.5227887630462646,
-0.15582476556301117,
-1.2407156229019165,
0.13597705960273743,
-1.0367779731750488,
1.706481695175171,
-0.7707103490829468,
0.31936755776405334,
-1.6957956552505493,
0.05604110658168793,
-0.5969083309173584,
-0.7193339467048645,
-0.8432850241661072,
-0.3706320822238922,
-0.6844418048858643,
1.0265963077545166,
2.4902498722076416,
1.1717309951782227,
-1.3816354274749756,
2.657280921936035,
0.7221571803092957,
-0.19258840382099152,
-0.9830153584480286,
0.5523229241371155,
-0.010500261560082436,
-1.3238624334335327,
-0.3586283028125763,
-0.903563380241394,
-0.08654510974884033,
-0.5493994951248169,
-0.5517439842224121,
0.027216868475079536,
0.4268328547477722,
-0.34218859672546387,
-0.5138857364654541,
-0.5334810018539429,
-0.797511875629425,
0.45376113057136536,
-0.3759905695915222,
0.8719180226325989,
-0.3755461573600769,
1.7963595390319824,
-0.6028550267219543,
0.4799044728279114,
0.7531960010528564,
1.3078765869140625,
0.15143048763275146,
0.04907584190368652,
0.31377503275871277,
0.40745076537132263,
0.01947147026658058,
0.5419925451278687,
1.0975258350372314,
0.619526743888855,
0.5010169148445129,
0.6935849785804749,
-2.248666286468506,
1.2523229122161865,
-0.9568622708320618,
0.2922074794769287,
1.3054076433181763,
-0.9191042184829712,
0.35155224800109863,
-1.7694740295410156,
-0.035097286105155945,
0.5438297986984253,
-2.2186224460601807,
0.2460395246744156,
-1.326131820678711,
-0.5437447428703308,
1.020887017250061,
0.32235196232795715,
-1.1806775331497192,
0.12257292121648788,
-0.3934054672718048,
1.0525555610656738,
0.4986048936843872,
1.165582537651062,
-1.6527057886123657,
-0.07851120829582214,
-0.2806764543056488,
0.13774220645427704,
-1.292568564414978,
-1.5396151542663574,
0.5215630531311035,
0.6750643849372864,
0.5908839702606201,
-0.12746800482273102,
0.9504107236862183,
-0.9466858506202698,
0.8116028904914856,
-0.9948165416717529,
-1.8136639595031738,
-1.4379843473434448,
-2.3042047023773193,
-2.292269229888916,
0.7568092346191406,
-0.3793624937534332,
-0.4371873736381531,
2.0693488121032715,
-1.0553592443466187,
-1.8071752786636353,
1.1433244943618774,
0.24818487465381622,
-0.07450556755065918,
2.3314385414123535,
0.21072475612163544,
-0.7316644787788391,
0.4729567766189575,
-0.8055421710014343,
0.6802657842636108,
-0.3644260764122009,
1.308995246887207,
0.43406009674072266,
-1.0300981998443604,
1.5807969570159912,
-0.4070524275302887,
0.6272182464599609,
-0.716852605342865,
-0.40992841124534607,
-0.6877501606941223,
0.2954530417919159,
1.9232769012451172,
-0.326353520154953,
1.5460059642791748,
-0.3391280770301819,
-1.5179054737091064,
-1.6094489097595215,
0.8511078953742981,
0.5220513939857483,
-0.7150211334228516,
0.1633674055337906,
-0.33488908410072327,
0.12990978360176086,
-0.06551558524370193,
1.1118799448013306,
1.2269922494888306,
0.8016129732131958,
-0.31516802310943604,
-0.829031229019165,
0.24549858272075653,
-0.011739937588572502,
-0.7453771233558655,
-1.7422511577606201,
-0.3594089448451996,
0.2032250165939331,
0.6191586852073669,
-1.1948883533477783,
1.748927116394043,
0.8726949691772461,
1.9200897216796875,
1.040673017501831,
-0.3599857687950134,
1.4527864456176758,
0.10608626157045364,
1.9382140636444092,
-0.4589298963546753,
0.6609525084495544,
-0.38558706641197205,
-1.2003778219223022,
0.7484602928161621,
-0.3188733756542206,
-2.0586495399475098,
-0.7101889252662659,
-0.8353908061981201,
-0.15112082660198212,
-0.7469897270202637,
0.9640684723854065,
-0.29584455490112305,
-1.3892935514450073,
0.20429101586341858,
-0.8016189336776733,
0.12068978697061539,
-1.2707469463348389,
0.30259889364242554,
0.7918998599052429,
-0.6342030167579651,
0.15312644839286804,
-0.28493303060531616,
-1.2632883787155151,
-0.5119255185127258,
0.3751862645149231,
1.8419784307479858,
-0.782718300819397,
0.9405657649040222,
0.988179087638855,
-0.7571015954017639,
0.010597623884677887,
0.3787127733230591,
-0.3457363545894623,
0.8279786705970764,
-0.9855326414108276,
-0.3920848071575165,
1.191145658493042,
-0.1803169995546341,
-0.6979610323905945,
1.458493947982788,
0.7728711366653442,
-0.9956756234169006,
-0.20485235750675201,
-0.19523939490318298,
-0.8593564629554749,
-0.030131898820400238,
-1.6601848602294922,
-0.11606510728597641,
0.31092727184295654,
-1.517026662826538,
-0.4968528151512146,
-0.187162384390831,
1.3226584196090698,
-0.06958053261041641,
1.362175464630127,
-0.2827121317386627,
-0.18090471625328064,
-0.39346688985824585,
-0.3701810836791992,
0.17944541573524475,
-0.23261700570583344,
-0.6657638549804688,
0.3081754446029663,
-0.7505668997764587,
0.315310001373291,
1.3769209384918213,
0.29404953122138977,
0.06683269143104553,
0.5117059350013733,
1.084597110748291,
0.3705260157585144,
-0.060733385384082794,
-0.9086688756942749,
-1.5401960611343384,
1.9839049577713013,
-1.3678771257400513,
2.0241522789001465,
0.7494969367980957,
-0.06606962531805038,
-1.8631759881973267,
-1.9521960020065308,
1.3808693885803223,
1.112446665763855,
2.3903753757476807,
0.5516920685768127,
0.42364662885665894,
-0.8323296904563904,
-0.6403622031211853,
0.31256303191185,
-0.9879443645477295,
-0.799511194229126,
0.06562182307243347,
2.4359779357910156,
1.7458033561706543,
-0.44116517901420593,
-0.21346628665924072,
-1.0600394010543823,
1.3918509483337402,
-0.11453027278184891,
0.21884043514728546,
2.0049095153808594,
-0.24163350462913513,
-0.9873186945915222,
1.2871711254119873,
-2.350564956665039,
0.18622508645057678,
2.0106897354125977,
0.18573293089866638,
0.06928034126758575,
-1.3613747358322144,
-0.6924193501472473,
-0.22894082963466644,
-0.44390958547592163,
-1.1900568008422852,
0.569284975528717,
-0.23159925639629364,
-0.7755743861198425,
-1.458913803100586,
0.15277622640132904,
-1.1121525764465332,
-1.7033846378326416,
0.18708476424217224,
1.8798158168792725,
1.9944342374801636,
-0.785685122013092,
1.5329269170761108,
-0.3093166649341583,
0.13029730319976807,
1.3060065507888794,
1.2262712717056274,
3.1493473052978516,
1.9599672555923462,
-1.3572818040847778,
0.7154923677444458,
-0.06604214012622833,
-0.472598671913147,
1.159523367881775,
-1.2167452573776245,
1.2736825942993164,
-0.23596727848052979,
-1.1387574672698975,
-1.2326953411102295,
0.9485259056091309,
0.5560457110404968,
0.06234366446733475,
-0.4526861608028412,
1.2129786014556885,
0.09243614226579666,
1.3718644380569458,
0.5600410103797913,
-0.37068721652030945,
0.6873693466186523,
-0.3689582347869873,
-0.4282495081424713,
1.5636649131774902,
0.1773098260164261,
-1.329720377922058,
-2.3272316455841064,
-0.2285531759262085,
-0.9161095023155212,
0.0016909772530198097,
-0.6108883023262024,
-0.9742593765258789,
1.603440284729004,
0.4273124933242798,
-1.2150964736938477,
-0.24990443885326385,
-0.37264007329940796,
-0.5766645669937134,
2.689840316772461,
-1.4635915756225586,
-0.250774085521698,
-1.085280418395996,
-0.5535872578620911,
1.6047543287277222,
-1.2013789415359497,
-0.19553980231285095,
-1.0709257125854492,
-0.5665291547775269,
-1.336114525794983,
-0.5103383660316467,
0.01248328946530819,
-0.9171581864356995,
0.9130607843399048,
0.15584951639175415,
-1.1764211654663086,
-0.29283037781715393,
-0.9130451679229736,
0.8966502547264099,
-0.09532049298286438,
0.23742789030075073,
1.8961801528930664,
0.436326801776886,
-0.3824799060821533,
0.6701650023460388,
1.138322353363037,
0.6282763481140137,
-0.6474703550338745,
0.34938761591911316,
-0.6368145942687988,
0.31875112652778625,
-1.4272987842559814,
0.2232905626296997,
-2.8455095291137695,
0.6209909319877625,
-0.043741971254348755,
-0.06684169918298721,
-0.0746043249964714,
-1.2837129831314087,
1.0709009170532227,
2.616248607635498,
-1.1795353889465332,
0.4473437964916229,
0.33104780316352844,
1.1802657842636108,
-1.5123343467712402,
0.27803170680999756,
-0.4230959415435791,
2.0784246921539307,
0.15615224838256836,
1.2040702104568481,
-0.4354492723941803,
-2.2340378761291504,
0.5942777395248413,
-1.2433946132659912,
-1.1150470972061157,
0.8332303166389465,
-0.7830992341041565,
0.08194442838430405,
-1.352178692817688,
-0.18644502758979797,
-0.8187776207923889,
-1.237349510192871,
0.7090287804603577,
0.15164056420326233,
0.5046075582504272,
-0.6586350202560425,
0.35556560754776,
-2.16676664352417,
-1.338993787765503,
-0.27077925205230713,
-0.9014033675193787,
0.4796418845653534,
-0.32693400979042053,
0.703640878200531,
-0.16252702474594116,
-0.009128413163125515,
0.33857396245002747,
1.39595627784729,
3.408184051513672,
0.16398097574710846,
0.3150160610675812,
-0.1780063360929489,
-0.9779404401779175,
1.4401097297668457,
0.9258738160133362,
-0.1477612406015396,
-0.5287064909934998,
-1.0854192972183228,
1.1429433822631836,
1.9610239267349243,
1.1270074844360352,
0.053619384765625,
-0.8567190170288086,
-0.8143327832221985,
0.06410197168588638,
0.16628240048885345,
0.4751201272010803,
0.9465351104736328,
0.1181507483124733,
0.07750499248504639,
1.4327019453048706,
1.1609123945236206,
-0.36073926091194153,
0.39535456895828247,
-0.8345176577568054,
-0.47500503063201904,
0.5082699060440063,
0.3715774118900299,
-0.0013181613758206367,
0.29301363229751587,
-1.0748660564422607,
-0.16185730695724487,
-0.3861485719680786,
-0.8562940359115601,
-0.7563303709030151,
-0.4462131857872009,
-0.358320415019989,
1.6372143030166626,
0.10433339327573776,
-0.5005755424499512,
-0.03138618916273117,
-0.7879763841629028,
-0.05913890153169632,
-1.0401123762130737,
0.3399409055709839,
-0.17407305538654327,
-0.07519614696502686,
-0.14291799068450928,
1.758931279182434,
-0.9715880155563354,
-2.056227207183838,
0.23777619004249573,
0.2237394154071808,
-0.3558043837547302,
0.19034262001514435,
1.6740448474884033,
0.5622941851615906,
1.3261297941207886,
1.327646017074585,
0.9760947823524475,
-0.6404649019241333,
-1.3023754358291626,
0.6530534029006958,
0.9758399128913879,
-1.3953922986984253,
0.7372621893882751,
0.020986558869481087,
-0.5092456340789795,
0.6187617778778076,
1.2917895317077637,
0.4470940828323364,
-2.0101306438446045,
0.7169462442398071,
-0.9042307138442993,
0.7524482011795044,
0.7168360948562622,
0.7489334344863892,
0.17289413511753082,
0.7499589323997498,
-1.2140690088272095,
-1.1405149698257446,
-0.67812579870224,
-0.6742798089981079,
1.967542052268982,
-0.25904613733291626,
0.5763226747512817,
-0.17193321883678436,
-1.3693732023239136,
-0.1292397826910019,
0.7478031516075134,
0.40111246705055237,
-0.5353236198425293,
0.8020182251930237,
-0.6240161657333374,
-1.0521842241287231,
-1.3005650043487549,
-0.48199525475502014,
-1.021323323249817,
-0.9197520613670349,
1.028994083404541,
0.8323348164558411,
0.3479776382446289,
1.8948501348495483,
0.6484010219573975,
0.2107299119234085,
-2.6585612297058105,
0.8649849891662598,
0.3328655958175659,
-0.041393548250198364,
0.8779299855232239,
0.28156566619873047,
1.0082411766052246,
-0.037971027195453644,
0.5761393904685974,
-2.4042694568634033,
2.3155808448791504,
-0.17015987634658813,
0.6173518300056458,
-0.0438617467880249,
-0.12319222837686539,
1.038753628730774,
0.46297454833984375,
0.5637708306312561,
-1.030944585800171,
0.7039482593536377,
-0.6185755133628845,
1.2742164134979248,
0.8295343518257141,
-0.8290583491325378,
-0.014386891387403011,
1.369314193725586,
0.5016546845436096,
-0.5190389156341553,
-0.8761094808578491,
-0.996817409992218,
0.9299070239067078,
1.8179808855056763,
-0.08072779327630997,
-0.024030037224292755,
0.8958517909049988,
0.6394102573394775,
-1.3576774597167969,
0.04603360593318939,
-0.7757161259651184,
-0.7154415845870972,
1.6330820322036743,
2.127051591873169,
-0.07898586243391037,
-0.25589269399642944,
-0.7961145639419556,
-1.2396360635757446,
0.804954469203949,
0.05059170722961426,
0.10775908082723618,
0.7279744744300842,
-0.6346704363822937,
1.1523029804229736,
0.8489044308662415,
0.9407066702842712,
0.17261312901973724,
0.22332105040550232,
0.31244271993637085,
-0.3381403088569641,
-1.1974444389343262,
-0.25099536776542664,
-1.053271770477295,
-2.512115955352783,
0.5095841884613037,
-0.19438529014587402,
-1.447893500328064,
-0.036435093730688095,
-1.0525531768798828,
0.8937104344367981,
-0.5623438358306885,
-1.0833264589309692,
-1.4865704774856567,
0.20273247361183167,
-0.10912208259105682,
0.884009063243866,
-1.594703197479248,
-0.05993732810020447,
1.2283380031585693,
0.9448624849319458,
-0.6916362047195435,
0.9659575819969177,
0.19611860811710358,
1.0313607454299927,
0.9139611124992371,
-0.33038830757141113,
0.4686632752418518,
0.09511332958936691,
-1.3562310934066772,
0.3774362802505493,
1.1607403755187988,
0.2180088758468628,
1.4931977987289429,
-0.6157107949256897,
0.07596709579229355,
0.412913054227829,
-0.46991464495658875,
-0.5034663677215576,
-0.6318100094795227,
0.6854150891304016,
0.06249702721834183,
-0.9569172859191895,
0.05189114809036255,
0.0111490897834301,
-0.21784678101539612,
0.1573970764875412,
-1.4472886323928833,
-0.14613105356693268,
-0.33506259322166443,
-0.7229418754577637,
-1.2172991037368774,
0.001619568094611168,
1.3247451782226562,
-0.7654202580451965,
-0.17433445155620575,
0.5057551860809326,
0.2924535274505615,
0.5080103874206543,
0.5797524452209473,
-0.678159236907959,
-0.3274828791618347,
-0.1605301797389984,
-0.3408408761024475,
0.3537347614765167,
1.4061130285263062,
-0.04648160934448242,
-1.0140098333358765,
0.7237494587898254,
-0.4133913218975067,
0.1265510469675064,
1.9801363945007324,
0.05098870396614075,
-0.8504313230514526,
0.2552337944507599,
-0.739841103553772,
1.9113237857818604,
1.7365448474884033,
1.3675670623779297,
-0.09271557629108429,
-0.9980138540267944,
0.6139000654220581,
-0.32481056451797485,
-0.36232614517211914,
1.0004860162734985,
0.3765794336795807,
-0.23240821063518524,
-1.339807152748108,
0.6098443269729614,
1.2915053367614746,
-0.9232345223426819,
-0.8687481880187988,
0.15222100913524628,
-0.8515478372573853,
1.0440754890441895,
0.7169262766838074,
0.34246906638145447,
0.24680708348751068,
1.5071690082550049,
0.8168398141860962,
-0.42947471141815186,
0.5804017782211304,
0.49783939123153687,
-0.18979284167289734,
-2.11850643157959,
-1.0796008110046387,
0.37567541003227234,
-0.5366485118865967,
-1.6348952054977417,
1.3944222927093506,
-1.244227647781372,
-0.9627180099487305,
0.5907925367355347,
0.0482843816280365,
1.4431684017181396,
0.3215659558773041,
1.6078797578811646,
2.0462920665740967,
0.9221469759941101,
0.3746483623981476,
1.2673590183258057,
-0.25354230403900146,
-0.4587354362010956,
1.7336896657943726,
-0.5361212491989136,
0.48520293831825256,
1.0167014598846436,
-0.3306025266647339,
-1.1028114557266235,
-0.8050670027732849,
-1.1907693147659302,
-0.7232056260108948,
1.2342826128005981,
0.09897210448980331,
-1.068077802658081,
0.34423089027404785,
1.6019967794418335,
0.07446562498807907,
-0.3214528560638428,
0.6821212768554688,
0.4276908338069916,
-0.8153544664382935,
-0.031066710129380226,
-0.9118759036064148,
0.49199801683425903,
-0.1676344871520996,
-0.3375779986381531,
0.35996338725090027,
0.46546825766563416,
1.3090722560882568,
-0.051156409084796906,
0.10944324731826782,
1.2604091167449951,
-1.3786803483963013,
1.518373966217041,
-0.6296815276145935,
0.2648581564426422,
-2.3930587768554688,
1.413148283958435,
-0.8389769196510315,
1.8278394937515259,
-2.6135072708129883,
0.46253448724746704,
-0.5816506743431091,
-0.42388415336608887,
0.24413155019283295,
-0.35098615288734436,
0.09509401768445969,
-0.14560769498348236,
-1.162115216255188,
-0.15122762322425842,
-0.8172359466552734,
0.5416350364685059,
1.1828008890151978,
1.3630263805389404,
-1.0983165502548218,
-0.31351855397224426,
-1.753525972366333,
-0.20644621551036835,
-0.7601419687271118,
0.39362049102783203,
-1.9542843103408813,
-0.2072504162788391,
-1.9482687711715698,
-2.434077501296997,
-1.3082520961761475,
-0.7811880707740784,
1.0866062641143799,
0.08541397005319595,
-0.8248706459999084,
1.012104868888855,
-0.42269599437713623,
-1.8624718189239502,
1.1147258281707764,
-2.2038700580596924
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Is there a way to disable ssl verification when streaming a dataset. I suspect this might be the isssue with my proxy.
Here you go:
```
FileNotFoundError Traceback (most recent call last)
Cell In[8], line 3
1 from datasets import load_dataset
----> 3 ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
5 sample = next(iter(ds))
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1788 # Return iterable dataset in case of streaming
1789 if streaming:
-> 1790 return builder_instance.as_streaming_dataset(split=split)
1792 # Some datasets are already processed on the HF google storage
1793 # Don't try downloading from Google storage for the packaged datasets as text, json, csv or pandas
1794 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281), in DatasetBuilder.as_streaming_dataset(self, split, base_path)
1274 dl_manager = StreamingDownloadManager(
1275 base_path=base_path or self.base_path,
1276 download_config=DownloadConfig(use_auth_token=self.use_auth_token, storage_options=self.storage_options),
1277 dataset_name=self.name,
1278 data_dir=self.config.data_dir,
1279 )
1280 self._check_manual_download(dl_manager)
-> 1281 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1282 # By default, return all splits
1283 if split is None:
File [~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120), in Voxpopuli._split_generators(self, dl_manager)
118 def _split_generators(self, dl_manager):
119 n_shards_path = dl_manager.download_and_extract(_N_SHARDS_FILE)
--> 120 with open(n_shards_path) as f:
121 n_shards = json.load(f)
123 if self.config.name == "en_accented":
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71), in extend_module_for_streaming..wrap_auth..wrapper(*args, **kwargs)
69 @wraps(function)
70 def wrapper(*args, **kwargs):
---> 71 return function(*args, use_auth_token=use_auth_token, **kwargs)
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517), in xopen(file, mode, use_auth_token, *args, **kwargs)
515 except FileNotFoundError:
516 if file.startswith(config.HF_ENDPOINT):
--> 517 raise FileNotFoundError(
518 file + "\nIf the repo is private or gated, make sure to log in with `huggingface-cli login`."
519 ) from None
520 else:
521 raise
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
``` | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 282 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Is there a way to disable ssl verification when streaming a dataset. I suspect this might be the isssue with my proxy.
Here you go:
```
FileNotFoundError Traceback (most recent call last)
Cell In[8], line 3
1 from datasets import load_dataset
----> 3 ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
5 sample = next(iter(ds))
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/load.py:1790), in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, num_proc, storage_options, **config_kwargs)
1788 # Return iterable dataset in case of streaming
1789 if streaming:
-> 1790 return builder_instance.as_streaming_dataset(split=split)
1792 # Some datasets are already processed on the HF google storage
1793 # Don't try downloading from Google storage for the packaged datasets as text, json, csv or pandas
1794 try_from_hf_gcs = path not in _PACKAGED_DATASETS_MODULES
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/builder.py:1281), in DatasetBuilder.as_streaming_dataset(self, split, base_path)
1274 dl_manager = StreamingDownloadManager(
1275 base_path=base_path or self.base_path,
1276 download_config=DownloadConfig(use_auth_token=self.use_auth_token, storage_options=self.storage_options),
1277 dataset_name=self.name,
1278 data_dir=self.config.data_dir,
1279 )
1280 self._check_manual_download(dl_manager)
-> 1281 splits_generators = {sg.name: sg for sg in self._split_generators(dl_manager)}
1282 # By default, return all splits
1283 if split is None:
File [~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.cache/huggingface/modules/datasets_modules/datasets/facebook--voxpopuli/b5ff837284f0778eefe0f642734e142d8c3f574eba8c9c8a4b13602297f73604/voxpopuli.py:120), in Voxpopuli._split_generators(self, dl_manager)
118 def _split_generators(self, dl_manager):
119 n_shards_path = dl_manager.download_and_extract(_N_SHARDS_FILE)
--> 120 with open(n_shards_path) as f:
121 n_shards = json.load(f)
123 if self.config.name == "en_accented":
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/streaming.py:71), in extend_module_for_streaming..wrap_auth..wrapper(*args, **kwargs)
69 @wraps(function)
70 def wrapper(*args, **kwargs):
---> 71 return function(*args, use_auth_token=use_auth_token, **kwargs)
File [~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517](https://vscode-remote+ssh-002dremote-002bml-002er-002dsoftware-002eat.vscode-resource.vscode-cdn.net/home/wrsbri/projects/audio_course/~/.conda/envs/audio_hf/lib/python3.10/site-packages/datasets/download/streaming_download_manager.py:517), in xopen(file, mode, use_auth_token, *args, **kwargs)
515 except FileNotFoundError:
516 if file.startswith(config.HF_ENDPOINT):
--> 517 raise FileNotFoundError(
518 file + "\nIf the repo is private or gated, make sure to log in with `huggingface-cli login`."
519 ) from None
520 else:
521 raise
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
``` | [
-1.1815084218978882,
-0.925840437412262,
-0.7315706610679626,
1.493782639503479,
-0.16325236856937408,
-1.2414581775665283,
0.14606760442256927,
-1.0385851860046387,
1.6837711334228516,
-0.7822200655937195,
0.2837538421154022,
-1.6916148662567139,
0.023688331246376038,
-0.5762766599655151,
-0.7088252902030945,
-0.8549655079841614,
-0.37019363045692444,
-0.7222813367843628,
1.041475534439087,
2.5037729740142822,
1.2083334922790527,
-1.3770930767059326,
2.735210418701172,
0.7372365593910217,
-0.20835356414318085,
-0.9918431043624878,
0.5458581447601318,
0.0013405699282884598,
-1.3367887735366821,
-0.3702259659767151,
-0.9327898025512695,
-0.06184082105755806,
-0.5303457975387573,
-0.5563916563987732,
0.03206690028309822,
0.43313080072402954,
-0.31552770733833313,
-0.49300381541252136,
-0.5476362705230713,
-0.7415079474449158,
0.4717266261577606,
-0.37185484170913696,
0.8871843218803406,
-0.35250943899154663,
1.7795257568359375,
-0.5981044173240662,
0.4622105062007904,
0.741974413394928,
1.3033015727996826,
0.18105976283550262,
0.07047241181135178,
0.32857275009155273,
0.39723512530326843,
0.02253730222582817,
0.545337438583374,
1.1549211740493774,
0.6424636840820312,
0.477472186088562,
0.7268785834312439,
-2.219980478286743,
1.2442433834075928,
-0.9230559468269348,
0.3114176094532013,
1.277909517288208,
-0.9267951846122742,
0.36963969469070435,
-1.787577509880066,
-0.025774847716093063,
0.5734716653823853,
-2.2208189964294434,
0.24673697352409363,
-1.3119192123413086,
-0.5513818860054016,
1.007746934890747,
0.31169435381889343,
-1.187669277191162,
0.12179164588451385,
-0.4539177715778351,
1.046897530555725,
0.49365898966789246,
1.197554349899292,
-1.6361602544784546,
-0.06618763506412506,
-0.24835878610610962,
0.1759166717529297,
-1.2808595895767212,
-1.5617473125457764,
0.5644773840904236,
0.6738051772117615,
0.6243345141410828,
-0.13157178461551666,
0.9420900344848633,
-0.9601485133171082,
0.8025739192962646,
-0.974824845790863,
-1.7851823568344116,
-1.458614468574524,
-2.317215919494629,
-2.273627519607544,
0.7678666114807129,
-0.4027124047279358,
-0.4486519992351532,
2.042421579360962,
-1.0685533285140991,
-1.7932605743408203,
1.1100038290023804,
0.25395694375038147,
-0.045202966779470444,
2.3489325046539307,
0.22331489622592926,
-0.7524293065071106,
0.5012598037719727,
-0.7709490060806274,
0.6844452619552612,
-0.34982725977897644,
1.3135104179382324,
0.4115377962589264,
-1.01963210105896,
1.597566843032837,
-0.4108889400959015,
0.6279804110527039,
-0.7094622254371643,
-0.4226643443107605,
-0.7033568620681763,
0.265214204788208,
1.9156858921051025,
-0.3474353551864624,
1.5546091794967651,
-0.32375529408454895,
-1.5282039642333984,
-1.6219154596328735,
0.8355916142463684,
0.5163291096687317,
-0.7294309139251709,
0.17720989882946014,
-0.4012170135974884,
0.1077338233590126,
-0.05481483042240143,
1.0869886875152588,
1.2223786115646362,
0.7876953482627869,
-0.26775434613227844,
-0.8402553200721741,
0.2414049208164215,
-0.028451472520828247,
-0.7300847768783569,
-1.7584233283996582,
-0.3215950131416321,
0.1993793547153473,
0.6304303407669067,
-1.2010531425476074,
1.7313436269760132,
0.8954501152038574,
1.926306962966919,
1.0551502704620361,
-0.3738391697406769,
1.4898145198822021,
0.10656621307134628,
1.88472580909729,
-0.4814830720424652,
0.657687783241272,
-0.3657360374927521,
-1.1835055351257324,
0.7097203731536865,
-0.33257636427879333,
-2.0662028789520264,
-0.6804644465446472,
-0.785036563873291,
-0.14546799659729004,
-0.7704408764839172,
0.9590758085250854,
-0.3244217038154602,
-1.4060845375061035,
0.19831043481826782,
-0.7818816900253296,
0.1258174329996109,
-1.26055908203125,
0.27961406111717224,
0.7482500672340393,
-0.6454282999038696,
0.13345859944820404,
-0.2935953438282013,
-1.2640149593353271,
-0.5128834843635559,
0.3456701636314392,
1.8322347402572632,
-0.7679576873779297,
0.9363529682159424,
1.0039252042770386,
-0.7262310981750488,
0.0061879632994532585,
0.39135614037513733,
-0.3262467086315155,
0.8462203741073608,
-0.9954374432563782,
-0.3983709514141083,
1.195050835609436,
-0.16162225604057312,
-0.6538747549057007,
1.4458147287368774,
0.7532239556312561,
-1.0055186748504639,
-0.22737200558185577,
-0.16947141289710999,
-0.8685672283172607,
-0.0250365249812603,
-1.6391232013702393,
-0.11840072274208069,
0.327460378408432,
-1.518954873085022,
-0.4939785301685333,
-0.20017766952514648,
1.329392433166504,
-0.06482924520969391,
1.3955751657485962,
-0.29971256852149963,
-0.16282695531845093,
-0.3548324406147003,
-0.34838107228279114,
0.17393487691879272,
-0.2451343834400177,
-0.6505097150802612,
0.25623300671577454,
-0.7599706649780273,
0.31504252552986145,
1.4363787174224854,
0.30190473794937134,
0.05877342075109482,
0.5379164814949036,
1.0829366445541382,
0.38301071524620056,
-0.07294540107250214,
-0.8831958770751953,
-1.522068738937378,
1.9572726488113403,
-1.3873541355133057,
2.0111708641052246,
0.7865594625473022,
-0.10391668230295181,
-1.8662723302841187,
-1.941162109375,
1.3489378690719604,
1.1348956823349,
2.4257593154907227,
0.551200270652771,
0.39253902435302734,
-0.8085680603981018,
-0.6574974060058594,
0.3073898255825043,
-0.9505863189697266,
-0.8041611313819885,
0.11502570658922195,
2.4201505184173584,
1.7905176877975464,
-0.4633008539676666,
-0.23211027681827545,
-1.055011510848999,
1.3756171464920044,
-0.16682401299476624,
0.23674875497817993,
1.994400143623352,
-0.2386193871498108,
-0.9959418773651123,
1.3012244701385498,
-2.332913637161255,
0.17174272239208221,
1.9881116151809692,
0.17271533608436584,
0.054632432758808136,
-1.376847267150879,
-0.6957130432128906,
-0.24103645980358124,
-0.4659445881843567,
-1.2198084592819214,
0.5454163551330566,
-0.2325913906097412,
-0.771716296672821,
-1.4479612112045288,
0.12559716403484344,
-1.102421760559082,
-1.700081706047058,
0.1817682385444641,
1.848545789718628,
2.0156853199005127,
-0.8024092316627502,
1.4778889417648315,
-0.33315035700798035,
0.14533092081546783,
1.2645692825317383,
1.2535954713821411,
3.1532580852508545,
1.9478627443313599,
-1.3411353826522827,
0.7185673713684082,
-0.10737145692110062,
-0.4599030613899231,
1.1347624063491821,
-1.2202318906784058,
1.2406448125839233,
-0.21433761715888977,
-1.1694388389587402,
-1.2257311344146729,
0.9575520753860474,
0.551853358745575,
0.03764230012893677,
-0.4786335825920105,
1.2117637395858765,
0.0894348993897438,
1.3694767951965332,
0.586668074131012,
-0.38934606313705444,
0.6564967036247253,
-0.3293249011039734,
-0.46365875005722046,
1.5710811614990234,
0.1629783660173416,
-1.369748592376709,
-2.304413080215454,
-0.2134283035993576,
-0.930202841758728,
-0.0035715019330382347,
-0.613021731376648,
-0.9893569946289062,
1.6240910291671753,
0.4140157699584961,
-1.1850030422210693,
-0.22244267165660858,
-0.3708406090736389,
-0.5580888390541077,
2.672633409500122,
-1.4132938385009766,
-0.24818146228790283,
-1.0588351488113403,
-0.540156900882721,
1.6241353750228882,
-1.1764274835586548,
-0.22635725140571594,
-1.074103593826294,
-0.5768908262252808,
-1.3331233263015747,
-0.5155178904533386,
0.012240192852914333,
-0.8950713872909546,
0.8914855122566223,
0.1751878708600998,
-1.1882137060165405,
-0.30452874302864075,
-0.8964731693267822,
0.9427553415298462,
-0.10494586825370789,
0.23191872239112854,
1.9181934595108032,
0.4098348021507263,
-0.3947124183177948,
0.6898939609527588,
1.151492953300476,
0.6016159057617188,
-0.6648104786872864,
0.28415951132774353,
-0.6643097996711731,
0.33133143186569214,
-1.4158601760864258,
0.22838523983955383,
-2.862962245941162,
0.6451108455657959,
-0.02697766199707985,
-0.04852855205535889,
-0.06504300236701965,
-1.2790155410766602,
1.043531894683838,
2.609360456466675,
-1.1490302085876465,
0.4308030903339386,
0.3740474283695221,
1.1987125873565674,
-1.5384124517440796,
0.24281930923461914,
-0.4654960036277771,
2.0707597732543945,
0.1612827032804489,
1.2144044637680054,
-0.42746701836586,
-2.261549711227417,
0.5694721341133118,
-1.2418051958084106,
-1.1132479906082153,
0.8134930729866028,
-0.8108508586883545,
0.09709978848695755,
-1.387219786643982,
-0.17309385538101196,
-0.8306840658187866,
-1.2131489515304565,
0.7153462767601013,
0.14992934465408325,
0.5111482739448547,
-0.650399386882782,
0.3555815517902374,
-2.1747820377349854,
-1.3410059213638306,
-0.24410425126552582,
-0.8844857215881348,
0.4907563626766205,
-0.36173805594444275,
0.7111440300941467,
-0.15130263566970825,
-0.02550506591796875,
0.33391720056533813,
1.3837134838104248,
3.374037265777588,
0.15129238367080688,
0.2891892194747925,
-0.18145325779914856,
-0.9707256555557251,
1.4397141933441162,
0.8789922595024109,
-0.16872946918010712,
-0.5596421360969543,
-1.077880620956421,
1.2039523124694824,
1.9371132850646973,
1.1308289766311646,
0.10507169365882874,
-0.8568358421325684,
-0.792349636554718,
0.0511418841779232,
0.17345398664474487,
0.4710865616798401,
0.9536011219024658,
0.05654001981019974,
0.09073526412248611,
1.4491324424743652,
1.1597933769226074,
-0.3340080678462982,
0.41015195846557617,
-0.8335909843444824,
-0.4874478578567505,
0.5169376730918884,
0.31074926257133484,
-0.00531182624399662,
0.3157970607280731,
-1.1149152517318726,
-0.19517076015472412,
-0.37027865648269653,
-0.8620867133140564,
-0.7185562252998352,
-0.40328308939933777,
-0.3311879336833954,
1.6057806015014648,
0.08915077149868011,
-0.4960733950138092,
-0.033113978803157806,
-0.7854042649269104,
-0.10947834700345993,
-1.030381441116333,
0.3321498930454254,
-0.16423562169075012,
-0.06858842819929123,
-0.16348116099834442,
1.7144877910614014,
-0.9521450400352478,
-2.0759546756744385,
0.22154174745082855,
0.2364034801721573,
-0.31254521012306213,
0.18828143179416656,
1.6589579582214355,
0.5812095999717712,
1.3462307453155518,
1.3445237874984741,
0.967587411403656,
-0.6310530304908752,
-1.2927169799804688,
0.668179452419281,
0.980998158454895,
-1.3693854808807373,
0.7674588561058044,
-0.03733595833182335,
-0.5549616813659668,
0.6179178953170776,
1.3059619665145874,
0.43160563707351685,
-2.025754451751709,
0.7427482008934021,
-0.909142017364502,
0.7210062742233276,
0.7231082916259766,
0.7820299863815308,
0.18970896303653717,
0.7779417634010315,
-1.2183760404586792,
-1.1576062440872192,
-0.6618438959121704,
-0.6826735138893127,
1.9521688222885132,
-0.23785191774368286,
0.580086886882782,
-0.21649789810180664,
-1.3596681356430054,
-0.08694802969694138,
0.720767080783844,
0.37238654494285583,
-0.5361690521240234,
0.8132134675979614,
-0.6324507594108582,
-1.0583069324493408,
-1.2895318269729614,
-0.46524283289909363,
-1.014639139175415,
-0.9157170057296753,
1.0184605121612549,
0.8413280248641968,
0.3462861180305481,
1.9080380201339722,
0.6561685800552368,
0.1876121163368225,
-2.6643900871276855,
0.8340271711349487,
0.3265075087547302,
-0.042474500834941864,
0.8959038853645325,
0.28229960799217224,
1.0194988250732422,
-0.017548568546772003,
0.5746729969978333,
-2.4132909774780273,
2.2718114852905273,
-0.1815398633480072,
0.6556171178817749,
-0.03938423842191696,
-0.13180159032344818,
1.0347108840942383,
0.5052154660224915,
0.5797656178474426,
-1.0019869804382324,
0.6981571316719055,
-0.5838461518287659,
1.2439689636230469,
0.8503022789955139,
-0.830478847026825,
0.00007887277752161026,
1.3565499782562256,
0.4967438876628876,
-0.4931066632270813,
-0.906629741191864,
-0.9700385928153992,
0.9273850321769714,
1.8184512853622437,
-0.04509556666016579,
0.025671280920505524,
0.870563268661499,
0.6699633598327637,
-1.3490389585494995,
0.0012635597959160805,
-0.7731434106826782,
-0.709221363067627,
1.6700031757354736,
2.1289310455322266,
-0.08899924904108047,
-0.25086331367492676,
-0.7592046856880188,
-1.2574201822280884,
0.8304203152656555,
0.012595702894032001,
0.134961798787117,
0.7442705035209656,
-0.6591202020645142,
1.1399942636489868,
0.816763162612915,
0.9580042362213135,
0.17108261585235596,
0.22902588546276093,
0.3187759220600128,
-0.3241386413574219,
-1.2002832889556885,
-0.2465178370475769,
-1.0382076501846313,
-2.4980437755584717,
0.47741326689720154,
-0.18508876860141754,
-1.4399839639663696,
0.010942556895315647,
-1.0182135105133057,
0.8772907257080078,
-0.5781913995742798,
-1.0855157375335693,
-1.4798693656921387,
0.21935205161571503,
-0.11984822899103165,
0.8805089592933655,
-1.5983003377914429,
-0.07764382660388947,
1.2275733947753906,
0.9474055767059326,
-0.6539914608001709,
0.9503974318504333,
0.21406666934490204,
1.0319668054580688,
0.9101897478103638,
-0.3288596570491791,
0.47955775260925293,
0.07932647317647934,
-1.348740577697754,
0.3834083378314972,
1.1819788217544556,
0.2373332977294922,
1.5306204557418823,
-0.6026646494865417,
0.02541542798280716,
0.40483567118644714,
-0.48854589462280273,
-0.48452112078666687,
-0.5978252291679382,
0.6788618564605713,
0.030363813042640686,
-0.9624508619308472,
-0.005594565998762846,
-0.0019800057634711266,
-0.24026277661323547,
0.15517637133598328,
-1.4440547227859497,
-0.11712335795164108,
-0.35386574268341064,
-0.6993952393531799,
-1.2612708806991577,
0.015049119479954243,
1.341033697128296,
-0.8147454857826233,
-0.19292816519737244,
0.4788758456707001,
0.30296677350997925,
0.5205817222595215,
0.5813814997673035,
-0.7108325958251953,
-0.3300933837890625,
-0.14735783636569977,
-0.3568990230560303,
0.32635197043418884,
1.3838460445404053,
-0.07315532863140106,
-1.003474473953247,
0.6868782043457031,
-0.4044135808944702,
0.13705167174339294,
1.993289828300476,
0.06767574697732925,
-0.7780449986457825,
0.26627615094184875,
-0.7437226176261902,
1.8886584043502808,
1.7187210321426392,
1.3714499473571777,
-0.12063002586364746,
-0.9575107097625732,
0.593076229095459,
-0.32493022084236145,
-0.40016618371009827,
0.9569954872131348,
0.3743428587913513,
-0.21676018834114075,
-1.3756012916564941,
0.6353265047073364,
1.2837815284729004,
-0.8892061710357666,
-0.8258959054946899,
0.11732126772403717,
-0.8476429581642151,
1.0874370336532593,
0.7061998248100281,
0.34461429715156555,
0.259650319814682,
1.5496898889541626,
0.7937750220298767,
-0.46221956610679626,
0.5590918660163879,
0.5212066769599915,
-0.17560991644859314,
-2.127711296081543,
-1.0737698078155518,
0.33861130475997925,
-0.4771521985530853,
-1.6333173513412476,
1.352358102798462,
-1.2401351928710938,
-0.9746439456939697,
0.5730020999908447,
0.07881557196378708,
1.4009093046188354,
0.3364199995994568,
1.6092033386230469,
2.074958324432373,
0.9336696863174438,
0.37925198674201965,
1.2403490543365479,
-0.22183416783809662,
-0.44225093722343445,
1.7524904012680054,
-0.49049001932144165,
0.5321655869483948,
1.0065864324569702,
-0.3627360761165619,
-1.102929711341858,
-0.8055023550987244,
-1.2177159786224365,
-0.7056829333305359,
1.21525239944458,
0.10019266605377197,
-1.0622262954711914,
0.33260229229927063,
1.5763235092163086,
0.07672486454248428,
-0.3279727101325989,
0.7215452790260315,
0.42051610350608826,
-0.7892904281616211,
-0.03336002677679062,
-0.923789918422699,
0.4931868016719818,
-0.19343169033527374,
-0.38028714060783386,
0.3258230686187744,
0.5097963213920593,
1.3379896879196167,
-0.036297693848609924,
0.07618726789951324,
1.3007760047912598,
-1.3539716005325317,
1.4800535440444946,
-0.6739910244941711,
0.24709594249725342,
-2.408078670501709,
1.423926591873169,
-0.8504336476325989,
1.855657696723938,
-2.624586820602417,
0.5031696557998657,
-0.5602362751960754,
-0.4332180917263031,
0.23482078313827515,
-0.34275636076927185,
0.10944563150405884,
-0.1320154368877411,
-1.1420013904571533,
-0.10561945289373398,
-0.7810134887695312,
0.5401458144187927,
1.1838607788085938,
1.3766508102416992,
-1.1321583986282349,
-0.2944508492946625,
-1.7627794742584229,
-0.22576025128364563,
-0.7815462350845337,
0.33717355132102966,
-1.9707890748977661,
-0.22401385009288788,
-1.9569627046585083,
-2.455082654953003,
-1.318835735321045,
-0.8056105971336365,
1.1036828756332397,
0.1406823992729187,
-0.8680823445320129,
1.0614473819732666,
-0.4424871802330017,
-1.8675202131271362,
1.123729944229126,
-2.223421573638916
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | > Is there a way to disable ssl verification when streaming a dataset.
I don't think so.
We use `fsspec` HTTPFileSystem implementation that is based on `aiohttp`. If you register a subclass of HTTPFileSystem that has SSL disabled by default it could work, but I wouldn't recommended it because it can raise security issues. | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 54 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
> Is there a way to disable ssl verification when streaming a dataset.
I don't think so.
We use `fsspec` HTTPFileSystem implementation that is based on `aiohttp`. If you register a subclass of HTTPFileSystem that has SSL disabled by default it could work, but I wouldn't recommended it because it can raise security issues. | [
-1.1618425846099854,
-0.948574960231781,
-0.7503646016120911,
1.5005621910095215,
-0.13020296394824982,
-1.2288545370101929,
0.14287069439888,
-1.0150938034057617,
1.6790480613708496,
-0.7882221937179565,
0.3233664929866791,
-1.6925697326660156,
-0.002328345086425543,
-0.5882375836372375,
-0.6961323022842407,
-0.8539982438087463,
-0.36875781416893005,
-0.7175296545028687,
1.059633731842041,
2.5024709701538086,
1.160465121269226,
-1.4238264560699463,
2.6922991275787354,
0.7285133004188538,
-0.15448495745658875,
-1.002107858657837,
0.538353443145752,
-0.015994932502508163,
-1.3512457609176636,
-0.3738480508327484,
-0.9148646593093872,
-0.0691690444946289,
-0.5519539713859558,
-0.5342348217964172,
0.01611146330833435,
0.39554527401924133,
-0.312752366065979,
-0.5118215084075928,
-0.5406191349029541,
-0.7730571031570435,
0.4285702109336853,
-0.3860979378223419,
0.8960392475128174,
-0.3539521098136902,
1.7736576795578003,
-0.5585007667541504,
0.46220770478248596,
0.759084165096283,
1.2925305366516113,
0.19423674046993256,
0.062404315918684006,
0.30019763112068176,
0.4238126277923584,
0.000980759970843792,
0.5377355217933655,
1.101946473121643,
0.623977780342102,
0.48702776432037354,
0.6879798769950867,
-2.2467477321624756,
1.262676477432251,
-0.9522072672843933,
0.3137362003326416,
1.2981423139572144,
-0.9055083394050598,
0.3433799147605896,
-1.7938590049743652,
-0.03001270815730095,
0.5670605897903442,
-2.2069201469421387,
0.2236163467168808,
-1.3161239624023438,
-0.5131781101226807,
1.0015414953231812,
0.3265452980995178,
-1.1983933448791504,
0.12120859324932098,
-0.39366650581359863,
1.0197076797485352,
0.4640350341796875,
1.1912317276000977,
-1.6787371635437012,
-0.10073186457157135,
-0.28540870547294617,
0.16569481790065765,
-1.2690706253051758,
-1.5601813793182373,
0.5092929601669312,
0.6948773860931396,
0.5951620936393738,
-0.12154827266931534,
0.9357627630233765,
-0.9561634659767151,
0.7923920154571533,
-0.9941269755363464,
-1.7760281562805176,
-1.4763433933258057,
-2.289332628250122,
-2.3173000812530518,
0.7559211254119873,
-0.40273135900497437,
-0.43021106719970703,
2.035592555999756,
-1.0536926984786987,
-1.806334376335144,
1.1315412521362305,
0.23372748494148254,
-0.035443663597106934,
2.3291053771972656,
0.19787941873073578,
-0.7420284152030945,
0.4955585300922394,
-0.7881547212600708,
0.6799507141113281,
-0.3673568069934845,
1.3412460088729858,
0.4203324615955353,
-1.0167008638381958,
1.6013941764831543,
-0.37980788946151733,
0.6209613084793091,
-0.7062841057777405,
-0.4369598627090454,
-0.7001155018806458,
0.27384451031684875,
1.914903998374939,
-0.3196091949939728,
1.5629981756210327,
-0.35169917345046997,
-1.545222282409668,
-1.636988639831543,
0.8496266007423401,
0.530138373374939,
-0.7460709810256958,
0.1379707306623459,
-0.35070493817329407,
0.1330312192440033,
-0.07056864351034164,
1.0827769041061401,
1.253296971321106,
0.8096996545791626,
-0.29425323009490967,
-0.8501597046852112,
0.24085018038749695,
-0.02647753804922104,
-0.7289589047431946,
-1.7497755289077759,
-0.3481566607952118,
0.18975062668323517,
0.6342499256134033,
-1.2026439905166626,
1.764424443244934,
0.891026496887207,
1.916416049003601,
1.0478349924087524,
-0.3461526334285736,
1.4835470914840698,
0.11944471299648285,
1.9110002517700195,
-0.4420755207538605,
0.6416505575180054,
-0.3733965754508972,
-1.1611617803573608,
0.7602558135986328,
-0.32013675570487976,
-2.0764942169189453,
-0.6907138824462891,
-0.8159552216529846,
-0.17038831114768982,
-0.7576450109481812,
0.9411362409591675,
-0.2860759496688843,
-1.3858698606491089,
0.2326691448688507,
-0.7965342402458191,
0.16009476780891418,
-1.2414968013763428,
0.29532819986343384,
0.7575928568840027,
-0.6499990820884705,
0.1730337142944336,
-0.29863259196281433,
-1.2775472402572632,
-0.4975728690624237,
0.36357176303863525,
1.8307753801345825,
-0.7886491417884827,
0.9089366793632507,
1.0096385478973389,
-0.7100588083267212,
-0.00900165643543005,
0.39828431606292725,
-0.31634223461151123,
0.849496066570282,
-1.0027244091033936,
-0.3789544701576233,
1.1760960817337036,
-0.1485525220632553,
-0.6591112017631531,
1.4373000860214233,
0.7771188020706177,
-0.9913479089736938,
-0.2009982466697693,
-0.15020689368247986,
-0.8593689799308777,
0.002824936993420124,
-1.6902374029159546,
-0.10154451429843903,
0.31331437826156616,
-1.5305848121643066,
-0.4923561215400696,
-0.2143373042345047,
1.319804072380066,
-0.06772919744253159,
1.372756838798523,
-0.3056930601596832,
-0.1509934514760971,
-0.3968750536441803,
-0.36671608686447144,
0.1914096176624298,
-0.27912870049476624,
-0.6315059661865234,
0.29412323236465454,
-0.7516788840293884,
0.34935155510902405,
1.4043699502944946,
0.31596875190734863,
0.024725012481212616,
0.5063794255256653,
1.0805871486663818,
0.38612812757492065,
-0.041752055287361145,
-0.8841050863265991,
-1.5033488273620605,
1.9967111349105835,
-1.4059258699417114,
2.0165627002716064,
0.770365297794342,
-0.07048813253641129,
-1.8626770973205566,
-1.9673603773117065,
1.3543431758880615,
1.092398762702942,
2.377044200897217,
0.5743240714073181,
0.43517547845840454,
-0.8523220419883728,
-0.6187725067138672,
0.31547605991363525,
-0.9476284384727478,
-0.8231568932533264,
0.0973457396030426,
2.4230916500091553,
1.7499926090240479,
-0.4587947726249695,
-0.1980336457490921,
-1.0542937517166138,
1.40086030960083,
-0.15146267414093018,
0.24081411957740784,
2.0360968112945557,
-0.22430960834026337,
-1.0211983919143677,
1.3022775650024414,
-2.3384792804718018,
0.1972699761390686,
1.9986971616744995,
0.18026196956634521,
0.06162029132246971,
-1.3966679573059082,
-0.7162503600120544,
-0.21169383823871613,
-0.4454210102558136,
-1.1897552013397217,
0.54753178358078,
-0.22465099394321442,
-0.7836821675300598,
-1.4803369045257568,
0.1748090386390686,
-1.1019515991210938,
-1.6887050867080688,
0.18605205416679382,
1.8506202697753906,
1.9901974201202393,
-0.7994532585144043,
1.4949474334716797,
-0.29280734062194824,
0.14176934957504272,
1.3004302978515625,
1.1847522258758545,
3.162116050720215,
1.969337821006775,
-1.340834379196167,
0.7085238099098206,
-0.08667963743209839,
-0.462246835231781,
1.124263048171997,
-1.213106393814087,
1.2484066486358643,
-0.21698345243930817,
-1.1512656211853027,
-1.1995540857315063,
0.9614836573600769,
0.5510340332984924,
0.05235251411795616,
-0.4776201546192169,
1.185591697692871,
0.07118523865938187,
1.3416194915771484,
0.5379307866096497,
-0.37540408968925476,
0.6693628430366516,
-0.3606618642807007,
-0.4832073748111725,
1.5461283922195435,
0.1911296397447586,
-1.356268286705017,
-2.3061885833740234,
-0.23034976422786713,
-0.9145088195800781,
-0.020704202353954315,
-0.5967710018157959,
-0.9660899043083191,
1.6195276975631714,
0.4200606644153595,
-1.2085024118423462,
-0.23556648194789886,
-0.3854965269565582,
-0.5660637021064758,
2.685991048812866,
-1.4434335231781006,
-0.26118549704551697,
-1.059691309928894,
-0.543752908706665,
1.622360348701477,
-1.2056958675384521,
-0.20897260308265686,
-1.0637856721878052,
-0.5461033582687378,
-1.3220422267913818,
-0.5189777612686157,
-0.0072527797892689705,
-0.8518475294113159,
0.9023728966712952,
0.2162114679813385,
-1.160966396331787,
-0.2832118272781372,
-0.8895326256752014,
0.8795613050460815,
-0.07774585485458374,
0.24878168106079102,
1.8883159160614014,
0.40853819251060486,
-0.34931814670562744,
0.6805827021598816,
1.1373493671417236,
0.6108026504516602,
-0.6385519504547119,
0.3250006139278412,
-0.6499818563461304,
0.3026118278503418,
-1.3921462297439575,
0.23883888125419617,
-2.8295466899871826,
0.617169976234436,
-0.023379063233733177,
-0.07387031614780426,
-0.06588944792747498,
-1.2921032905578613,
1.0862195491790771,
2.5968923568725586,
-1.175524353981018,
0.45381230115890503,
0.3521852493286133,
1.2006088495254517,
-1.5296285152435303,
0.2885390520095825,
-0.44145867228507996,
2.1046302318573,
0.19934126734733582,
1.177726149559021,
-0.4368695020675659,
-2.312957525253296,
0.5585374236106873,
-1.2354987859725952,
-1.1151440143585205,
0.8059898018836975,
-0.8073701858520508,
0.06945578753948212,
-1.382609248161316,
-0.20956483483314514,
-0.8196226358413696,
-1.1999744176864624,
0.7042298316955566,
0.13081005215644836,
0.5199264883995056,
-0.6665396690368652,
0.35711824893951416,
-2.1889967918395996,
-1.349745750427246,
-0.2590043842792511,
-0.8979772925376892,
0.47496187686920166,
-0.335923969745636,
0.7043462991714478,
-0.17567476630210876,
-0.0255410298705101,
0.32313671708106995,
1.3873772621154785,
3.402214288711548,
0.16054129600524902,
0.35509800910949707,
-0.18633796274662018,
-0.9625219702720642,
1.4076677560806274,
0.8801735639572144,
-0.14840392768383026,
-0.5462778210639954,
-1.099939227104187,
1.1925690174102783,
1.9743022918701172,
1.1142849922180176,
0.0763772651553154,
-0.8359283208847046,
-0.8044726848602295,
0.05697881057858467,
0.18422742187976837,
0.4792042076587677,
0.9486707448959351,
0.11085520684719086,
0.06881352514028549,
1.4421665668487549,
1.16640305519104,
-0.3413393795490265,
0.3995526134967804,
-0.8302106261253357,
-0.47331616282463074,
0.5122933387756348,
0.3191736936569214,
0.0176348015666008,
0.31583353877067566,
-1.0951486825942993,
-0.1764419674873352,
-0.397377610206604,
-0.8781217336654663,
-0.7488266825675964,
-0.43944594264030457,
-0.31796446442604065,
1.6377326250076294,
0.10289032012224197,
-0.5229290127754211,
-0.028450138866901398,
-0.7592651844024658,
-0.09168745577335358,
-1.032951831817627,
0.32768261432647705,
-0.15338991582393646,
-0.06829395145177841,
-0.11215668171644211,
1.7418830394744873,
-0.9512138366699219,
-2.036048412322998,
0.2192583829164505,
0.22492535412311554,
-0.3323598802089691,
0.2151768058538437,
1.6510573625564575,
0.5348290801048279,
1.3493622541427612,
1.3571369647979736,
0.9667417407035828,
-0.6403715014457703,
-1.3266927003860474,
0.6260696649551392,
0.9746213555335999,
-1.3973385095596313,
0.7463020086288452,
-0.03785291314125061,
-0.5245944261550903,
0.6143108606338501,
1.3046854734420776,
0.44910264015197754,
-2.028073310852051,
0.719097912311554,
-0.9001384973526001,
0.7413424849510193,
0.7123485803604126,
0.7685158848762512,
0.16691502928733826,
0.724307656288147,
-1.2367784976959229,
-1.1270822286605835,
-0.6655685901641846,
-0.6866673231124878,
1.9244762659072876,
-0.26930543780326843,
0.592396080493927,
-0.17273570597171783,
-1.3936171531677246,
-0.09344403445720673,
0.7327629327774048,
0.39065298438072205,
-0.5353875756263733,
0.7849218845367432,
-0.6436651945114136,
-1.0948433876037598,
-1.3163483142852783,
-0.4598408341407776,
-1.0295987129211426,
-0.9132938981056213,
1.0437768697738647,
0.8544554710388184,
0.3341078758239746,
1.8897639513015747,
0.6599512100219727,
0.21726638078689575,
-2.70131516456604,
0.863004207611084,
0.3063353896141052,
-0.027664877474308014,
0.9309162497520447,
0.28907445073127747,
0.9998384714126587,
-0.03353853151202202,
0.6004897356033325,
-2.4049222469329834,
2.3301873207092285,
-0.20678584277629852,
0.6651469469070435,
-0.07945387810468674,
-0.11019979417324066,
1.0429989099502563,
0.4588513970375061,
0.5934001207351685,
-1.0387704372406006,
0.7016187310218811,
-0.6070465445518494,
1.224920392036438,
0.8335458636283875,
-0.8152896165847778,
0.009030654095113277,
1.320542812347412,
0.4610481858253479,
-0.49463269114494324,
-0.9001705646514893,
-0.9961013197898865,
0.929885983467102,
1.8238600492477417,
-0.07591290026903152,
-0.027495115995407104,
0.8922914862632751,
0.6277907490730286,
-1.3889847993850708,
0.03956076130270958,
-0.7699711918830872,
-0.7251525521278381,
1.6551417112350464,
2.117802143096924,
-0.07876788079738617,
-0.2461051046848297,
-0.7727901339530945,
-1.2885304689407349,
0.7867356538772583,
0.04834625497460365,
0.09417680650949478,
0.6834112405776978,
-0.6265317797660828,
1.1807185411453247,
0.8476461172103882,
0.9834955334663391,
0.17712576687335968,
0.24024944007396698,
0.3188238739967346,
-0.34359440207481384,
-1.2090259790420532,
-0.25201040506362915,
-1.044926404953003,
-2.517347574234009,
0.4811185300350189,
-0.20212148129940033,
-1.4449011087417603,
-0.020421667024493217,
-0.9962068796157837,
0.8663676381111145,
-0.5533989667892456,
-1.0839617252349854,
-1.4747076034545898,
0.1864376664161682,
-0.10843080282211304,
0.900294840335846,
-1.611145257949829,
-0.07467607408761978,
1.236499309539795,
0.9649376273155212,
-0.669118344783783,
0.9659557342529297,
0.21379731595516205,
1.0138171911239624,
0.9091780185699463,
-0.3333730101585388,
0.4706149697303772,
0.09571032226085663,
-1.3422719240188599,
0.41664889454841614,
1.1725252866744995,
0.25532251596450806,
1.492713451385498,
-0.6562816500663757,
0.06272568553686142,
0.4233427941799164,
-0.46902838349342346,
-0.45467638969421387,
-0.6283389329910278,
0.715447187423706,
0.03256469964981079,
-0.9360303282737732,
0.04055283963680267,
0.003583683632314205,
-0.1794377565383911,
0.1442549079656601,
-1.4355746507644653,
-0.13172130286693573,
-0.3545582890510559,
-0.6909549236297607,
-1.2238235473632812,
-0.02024417743086815,
1.317345142364502,
-0.7792643904685974,
-0.184518963098526,
0.5159263014793396,
0.29438239336013794,
0.5203956961631775,
0.5860854387283325,
-0.6505764126777649,
-0.35959115624427795,
-0.1412251740694046,
-0.35633501410484314,
0.36285924911499023,
1.3804497718811035,
-0.07700128853321075,
-1.0055062770843506,
0.7460893988609314,
-0.42348045110702515,
0.13776639103889465,
1.9944638013839722,
0.05841286852955818,
-0.815791130065918,
0.2643587291240692,
-0.7165547609329224,
1.9175488948822021,
1.757901906967163,
1.3628681898117065,
-0.11496618390083313,
-1.013907790184021,
0.624561607837677,
-0.3161393702030182,
-0.38690701127052307,
0.9782877564430237,
0.42072370648384094,
-0.21258805692195892,
-1.335906744003296,
0.6096705794334412,
1.2800931930541992,
-0.9243558049201965,
-0.8392706513404846,
0.10644235461950302,
-0.8460862636566162,
1.0617121458053589,
0.6945621371269226,
0.36444973945617676,
0.2499396800994873,
1.529503345489502,
0.77606201171875,
-0.4412889778614044,
0.5773062109947205,
0.5100962519645691,
-0.19116204977035522,
-2.1236062049865723,
-1.1203533411026,
0.34480738639831543,
-0.4931761920452118,
-1.6337876319885254,
1.3781154155731201,
-1.2570542097091675,
-0.955783486366272,
0.5895965099334717,
0.08129604160785675,
1.4316259622573853,
0.33231228590011597,
1.5982329845428467,
2.0625884532928467,
0.9300331473350525,
0.3738318681716919,
1.2500783205032349,
-0.24644258618354797,
-0.45771926641464233,
1.783223032951355,
-0.48259270191192627,
0.5040093660354614,
1.0121691226959229,
-0.3381466567516327,
-1.0727189779281616,
-0.7948319315910339,
-1.2067948579788208,
-0.7044418454170227,
1.2157033681869507,
0.07335258275270462,
-1.0652105808258057,
0.3629673421382904,
1.5724481344223022,
0.052373647689819336,
-0.35088813304901123,
0.6623721122741699,
0.4300336241722107,
-0.7993330359458923,
-0.02477135881781578,
-0.9563454389572144,
0.5178636312484741,
-0.19768144190311432,
-0.37702980637550354,
0.353302538394928,
0.4324871003627777,
1.3144400119781494,
-0.03269079327583313,
0.08246909081935883,
1.2967864274978638,
-1.3642040491104126,
1.5129927396774292,
-0.6556524634361267,
0.23843587934970856,
-2.392397880554199,
1.4238539934158325,
-0.8344724774360657,
1.8646703958511353,
-2.618494749069214,
0.4816136956214905,
-0.5651742815971375,
-0.4081205427646637,
0.2546822428703308,
-0.3353431820869446,
0.10151318460702896,
-0.17890965938568115,
-1.1394850015640259,
-0.15966877341270447,
-0.7990321516990662,
0.5327039957046509,
1.1496394872665405,
1.355080246925354,
-1.0820395946502686,
-0.2920915484428406,
-1.7453393936157227,
-0.1931777149438858,
-0.7753854393959045,
0.3511858582496643,
-1.9459900856018066,
-0.1917225420475006,
-1.9668262004852295,
-2.4420416355133057,
-1.2990912199020386,
-0.7801089286804199,
1.080762505531311,
0.11774399876594543,
-0.8269772529602051,
1.039365530014038,
-0.4072103798389435,
-1.8661534786224365,
1.1253070831298828,
-2.1832072734832764
] |
https://github.com/huggingface/datasets/issues/5975 | Streaming Dataset behind Proxy - FileNotFoundError | Okay thanks for your help! I guess I have to figure out how to improve the proxy environment / see if I can make it work with ssl connections. | ### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
| 88 | 29 | Streaming Dataset behind Proxy - FileNotFoundError
### Describe the bug
When trying to stream a dataset i get the following error after a few minutes of waiting.
```
FileNotFoundError: https://huggingface.co/datasets/facebook/voxpopuli/resolve/main/data/n_files.json
If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
I have already set the proxy environment variables. Downloading a Dataset without streaming works as expected.
Still i suspect that this is connected to being behind a proxy.
Is there a way to set the proxy for streaming datasets? Possibly a keyword argument that gets passed to ffspec?
### Steps to reproduce the bug
This is the code i use.
```
import os
os.environ['http_proxy'] = "http://example.com:xxxx"
os.environ['https_proxy'] = "http://example.com:xxxx"
from datasets import load_dataset
ds = load_dataset("facebook/voxpopuli", name="de", streaming=True)
```
### Expected behavior
I would expect the streaming functionality to use the set proxy settings.
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-73-generic-x86_64-with-glibc2.35
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- PyArrow version: 11.0.0
- Pandas version: 2.0.2
Okay thanks for your help! I guess I have to figure out how to improve the proxy environment / see if I can make it work with ssl connections. | [
-1.157892107963562,
-0.9252168536186218,
-0.7460533976554871,
1.5095735788345337,
-0.13901129364967346,
-1.2163783311843872,
0.14984646439552307,
-1.0154544115066528,
1.6935484409332275,
-0.7794073224067688,
0.32730284333229065,
-1.6974042654037476,
0.04927517846226692,
-0.5636087656021118,
-0.7054790258407593,
-0.8697057962417603,
-0.3847270905971527,
-0.6807427406311035,
1.034656047821045,
2.507594108581543,
1.1766709089279175,
-1.412389874458313,
2.6795871257781982,
0.7246164083480835,
-0.1897415667772293,
-1.0040616989135742,
0.5479271411895752,
0.01627165451645851,
-1.3289693593978882,
-0.3398384153842926,
-0.9013630151748657,
-0.06236964836716652,
-0.5694181323051453,
-0.5489659905433655,
0.04792558401823044,
0.4201890528202057,
-0.30554914474487305,
-0.5061041116714478,
-0.5189637541770935,
-0.7841247320175171,
0.45367947220802307,
-0.37071529030799866,
0.8755974769592285,
-0.36392471194267273,
1.7998301982879639,
-0.572593092918396,
0.4825032651424408,
0.7749086618423462,
1.301659345626831,
0.158992737531662,
0.07292263954877853,
0.3103026747703552,
0.41881251335144043,
0.014929178170859814,
0.5194330811500549,
1.0753552913665771,
0.606086790561676,
0.5032229423522949,
0.6747475266456604,
-2.2308828830718994,
1.2502140998840332,
-0.9510533809661865,
0.2965855598449707,
1.344785451889038,
-0.9407143592834473,
0.3569435775279999,
-1.7669204473495483,
-0.03821168839931488,
0.566781759262085,
-2.2248003482818604,
0.22289793193340302,
-1.2903624773025513,
-0.5523865818977356,
1.0255836248397827,
0.3160442113876343,
-1.1994657516479492,
0.1010034903883934,
-0.41680774092674255,
1.0494486093521118,
0.5109729766845703,
1.1923182010650635,
-1.652220606803894,
-0.04734257236123085,
-0.2717728018760681,
0.1532926708459854,
-1.322951316833496,
-1.538405179977417,
0.5050150156021118,
0.6896430253982544,
0.6037479639053345,
-0.09055975824594498,
0.91816246509552,
-0.9523348808288574,
0.8200183510780334,
-0.949681282043457,
-1.7763992547988892,
-1.4380470514297485,
-2.3513853549957275,
-2.3019936084747314,
0.7571095824241638,
-0.3701047897338867,
-0.44579705595970154,
2.0581281185150146,
-1.073068380355835,
-1.792404294013977,
1.1569428443908691,
0.2512747347354889,
-0.06346642225980759,
2.3501405715942383,
0.2019408792257309,
-0.7291492819786072,
0.4701136648654938,
-0.8032371401786804,
0.6994702816009521,
-0.3750966787338257,
1.30050790309906,
0.4549495577812195,
-1.0419158935546875,
1.5798389911651611,
-0.40055322647094727,
0.6196101307868958,
-0.7081320881843567,
-0.4119269847869873,
-0.7133340835571289,
0.2678755223751068,
1.902848243713379,
-0.3404889404773712,
1.54274582862854,
-0.330183207988739,
-1.517752766609192,
-1.6223031282424927,
0.8465566635131836,
0.5241925120353699,
-0.7331903576850891,
0.16991658508777618,
-0.3389747142791748,
0.1174205094575882,
-0.06320331245660782,
1.0774822235107422,
1.2389341592788696,
0.7871720194816589,
-0.2996124029159546,
-0.8734534382820129,
0.25275474786758423,
-0.018946748226881027,
-0.7395157217979431,
-1.7579721212387085,
-0.3460004925727844,
0.18240170180797577,
0.641359806060791,
-1.1960852146148682,
1.7562555074691772,
0.8889350295066833,
1.9133785963058472,
1.01377272605896,
-0.3613017499446869,
1.4739677906036377,
0.10251231491565704,
1.9127477407455444,
-0.44675424695014954,
0.6786666512489319,
-0.35418787598609924,
-1.1767926216125488,
0.7034686207771301,
-0.34062230587005615,
-2.054302215576172,
-0.7276715636253357,
-0.8348778486251831,
-0.16695213317871094,
-0.7376218438148499,
0.9567809104919434,
-0.29527655243873596,
-1.3971335887908936,
0.22545500099658966,
-0.7666670083999634,
0.14288775622844696,
-1.274773120880127,
0.31091368198394775,
0.7677643895149231,
-0.6254541873931885,
0.14086362719535828,
-0.30547553300857544,
-1.2576316595077515,
-0.5110336542129517,
0.3800208270549774,
1.8367840051651,
-0.7656514644622803,
0.9732111096382141,
0.9687628746032715,
-0.737173318862915,
0.006074603646993637,
0.38962435722351074,
-0.33407318592071533,
0.8794053196907043,
-1.0124952793121338,
-0.3959171175956726,
1.1605874300003052,
-0.1728256642818451,
-0.6966909170150757,
1.470572829246521,
0.768902599811554,
-0.9921581745147705,
-0.21415825188159943,
-0.19143302738666534,
-0.8283047080039978,
-0.01786389946937561,
-1.6582469940185547,
-0.09641537815332413,
0.2997283935546875,
-1.4892321825027466,
-0.5131139159202576,
-0.20284079015254974,
1.326452374458313,
-0.08532706648111343,
1.381252408027649,
-0.29756221175193787,
-0.18946368992328644,
-0.40338918566703796,
-0.3448934257030487,
0.21216145157814026,
-0.22827906906604767,
-0.6575647592544556,
0.28406450152397156,
-0.7596666812896729,
0.3550507724285126,
1.3821195363998413,
0.2916671335697174,
0.06957357376813889,
0.5139138102531433,
1.0835151672363281,
0.3641713261604309,
-0.03909923881292343,
-0.9195213317871094,
-1.5385844707489014,
1.9966182708740234,
-1.3761814832687378,
2.0313236713409424,
0.769398033618927,
-0.10694032907485962,
-1.8536137342453003,
-1.9310545921325684,
1.3738771677017212,
1.1210248470306396,
2.387812376022339,
0.5525400638580322,
0.4291916787624359,
-0.833656907081604,
-0.6538006663322449,
0.30059781670570374,
-0.972915530204773,
-0.8194291591644287,
0.09785757213830948,
2.413149356842041,
1.745041847229004,
-0.43939220905303955,
-0.20801298320293427,
-1.0868022441864014,
1.3886661529541016,
-0.12207554280757904,
0.21784278750419617,
2.0322303771972656,
-0.25014668703079224,
-1.0122214555740356,
1.280569076538086,
-2.3542771339416504,
0.1727173775434494,
2.000197172164917,
0.18469160795211792,
0.060773249715566635,
-1.407678484916687,
-0.7114482522010803,
-0.22741229832172394,
-0.45507603883743286,
-1.2035582065582275,
0.5692064762115479,
-0.24037237465381622,
-0.7818044424057007,
-1.4478651285171509,
0.16054946184158325,
-1.1150434017181396,
-1.7042192220687866,
0.1819116771221161,
1.8324260711669922,
2.0187089443206787,
-0.789875864982605,
1.5091280937194824,
-0.27887237071990967,
0.12155640125274658,
1.3008753061294556,
1.2210127115249634,
3.1522154808044434,
1.960335373878479,
-1.3504610061645508,
0.7072646021842957,
-0.08271118253469467,
-0.46513932943344116,
1.158010721206665,
-1.2030246257781982,
1.2594728469848633,
-0.20425355434417725,
-1.1612883806228638,
-1.2356353998184204,
0.9602820873260498,
0.5631969571113586,
0.05349155142903328,
-0.4564313590526581,
1.1998929977416992,
0.11154814064502716,
1.3806195259094238,
0.5398399233818054,
-0.36693957448005676,
0.6745446920394897,
-0.39312249422073364,
-0.4466838240623474,
1.5659551620483398,
0.15038354694843292,
-1.3461086750030518,
-2.3144640922546387,
-0.24045313894748688,
-0.9140998125076294,
-0.00306888809427619,
-0.6217052340507507,
-0.9813706874847412,
1.6000748872756958,
0.43649426102638245,
-1.1997454166412354,
-0.2578126788139343,
-0.40308910608291626,
-0.5969525575637817,
2.6622493267059326,
-1.4475789070129395,
-0.26342248916625977,
-1.0576950311660767,
-0.5505301356315613,
1.591062068939209,
-1.2112977504730225,
-0.20702262222766876,
-1.084196925163269,
-0.5886661410331726,
-1.3552067279815674,
-0.5217224955558777,
0.016940221190452576,
-0.8956484794616699,
0.896544873714447,
0.16689254343509674,
-1.143371820449829,
-0.28178417682647705,
-0.8939363956451416,
0.8730611205101013,
-0.08343160152435303,
0.25259217619895935,
1.880660057067871,
0.4397610127925873,
-0.35970252752304077,
0.6632990837097168,
1.1295114755630493,
0.6123090982437134,
-0.6764152646064758,
0.32470816373825073,
-0.6398571729660034,
0.32028600573539734,
-1.3794867992401123,
0.2471545785665512,
-2.8405938148498535,
0.6376123428344727,
-0.030306898057460785,
-0.07071829587221146,
-0.08303655683994293,
-1.2559727430343628,
1.0863267183303833,
2.5903429985046387,
-1.1754708290100098,
0.4482194185256958,
0.341455340385437,
1.1997077465057373,
-1.518970251083374,
0.26549404859542847,
-0.4410925805568695,
2.100616693496704,
0.16277992725372314,
1.2034944295883179,
-0.44966867566108704,
-2.264392614364624,
0.5790193676948547,
-1.2401984930038452,
-1.0989677906036377,
0.8237041234970093,
-0.7739465236663818,
0.06788378953933716,
-1.3493279218673706,
-0.20503805577754974,
-0.8097811341285706,
-1.221447467803955,
0.6977603435516357,
0.13763631880283356,
0.5483624339103699,
-0.6540769934654236,
0.35255733132362366,
-2.2129249572753906,
-1.3316137790679932,
-0.24365219473838806,
-0.893406867980957,
0.46043625473976135,
-0.35029974579811096,
0.7137814164161682,
-0.16214096546173096,
0.01706388220191002,
0.33161506056785583,
1.3745596408843994,
3.401650905609131,
0.17260606586933136,
0.33623746037483215,
-0.14613941311836243,
-0.975455105304718,
1.4382094144821167,
0.8969520926475525,
-0.1593545377254486,
-0.5490387678146362,
-1.100780963897705,
1.1743916273117065,
1.9575690031051636,
1.1246126890182495,
0.10263539850711823,
-0.847465455532074,
-0.7906762957572937,
0.0515870526432991,
0.1687200516462326,
0.4841662347316742,
0.9241273999214172,
0.07627250254154205,
0.0876072347164154,
1.4472765922546387,
1.178292155265808,
-0.36178725957870483,
0.4115612208843231,
-0.8187806010246277,
-0.4853537678718567,
0.5126628875732422,
0.33911046385765076,
0.00491863489151001,
0.2947164475917816,
-1.0763384103775024,
-0.1642865091562271,
-0.3887050151824951,
-0.8997623920440674,
-0.7313166260719299,
-0.42656010389328003,
-0.3433234691619873,
1.6380243301391602,
0.12004116177558899,
-0.4946191906929016,
-0.028920162469148636,
-0.8181849718093872,
-0.0666438564658165,
-1.0488033294677734,
0.33595845103263855,
-0.18290352821350098,
-0.057519663125276566,
-0.1350555121898651,
1.7834200859069824,
-0.9687133431434631,
-2.0824673175811768,
0.22264482080936432,
0.24007952213287354,
-0.35399559140205383,
0.19322790205478668,
1.650813102722168,
0.5483232140541077,
1.343633770942688,
1.3183293342590332,
0.9621437191963196,
-0.6367117762565613,
-1.3094223737716675,
0.6620457172393799,
0.9824036359786987,
-1.400329351425171,
0.7315770983695984,
-0.00025343988090753555,
-0.5215669274330139,
0.6262283325195312,
1.288285493850708,
0.4191778004169464,
-2.0066752433776855,
0.7275938987731934,
-0.9095974564552307,
0.75760418176651,
0.719646155834198,
0.7541854381561279,
0.15826483070850372,
0.7579707503318787,
-1.2334283590316772,
-1.1322822570800781,
-0.6668076515197754,
-0.6767266988754272,
1.9736993312835693,
-0.2655484080314636,
0.5833326578140259,
-0.2013498991727829,
-1.358933687210083,
-0.09491102397441864,
0.7208008170127869,
0.37298375368118286,
-0.5099769234657288,
0.823702871799469,
-0.6374399065971375,
-1.0798147916793823,
-1.3388291597366333,
-0.4636949300765991,
-1.0094144344329834,
-0.9202474355697632,
1.0392115116119385,
0.822763979434967,
0.3155171871185303,
1.8886467218399048,
0.6580193638801575,
0.19434534013271332,
-2.680248737335205,
0.8392279744148254,
0.319745272397995,
-0.012070286087691784,
0.8933294415473938,
0.2677593231201172,
1.0241707563400269,
-0.025724735110998154,
0.5670034885406494,
-2.381972074508667,
2.3113670349121094,
-0.19814079999923706,
0.6503435373306274,
-0.04302211105823517,
-0.13340027630329132,
1.0575603246688843,
0.4867155849933624,
0.5907468199729919,
-1.033287763595581,
0.7162770628929138,
-0.6149905920028687,
1.2718400955200195,
0.8124592304229736,
-0.826170802116394,
-0.019263312220573425,
1.3624707460403442,
0.4897655248641968,
-0.4600905478000641,
-0.881417989730835,
-0.9946485757827759,
0.9165683388710022,
1.8247889280319214,
-0.05851731821894646,
0.010410039685666561,
0.8776330351829529,
0.6607354283332825,
-1.3802433013916016,
0.014585147611796856,
-0.8011346459388733,
-0.7035465836524963,
1.6633163690567017,
2.1372697353363037,
-0.05961586534976959,
-0.2810322642326355,
-0.7978668808937073,
-1.2534444332122803,
0.7950882315635681,
0.019860506057739258,
0.13354609906673431,
0.7242234945297241,
-0.6584882140159607,
1.1478992700576782,
0.8422285914421082,
0.9634621143341064,
0.16582262516021729,
0.22326627373695374,
0.27841252088546753,
-0.332141637802124,
-1.208368182182312,
-0.24999719858169556,
-1.0501927137374878,
-2.5138187408447266,
0.47923845052719116,
-0.21623870730400085,
-1.457172155380249,
-0.02628527209162712,
-1.0212328433990479,
0.8877274990081787,
-0.5687516331672668,
-1.0661489963531494,
-1.4797923564910889,
0.2007407546043396,
-0.13818353414535522,
0.8939496278762817,
-1.5899096727371216,
-0.0690491795539856,
1.2400667667388916,
0.9490175843238831,
-0.6578801870346069,
0.9703978896141052,
0.1862703263759613,
1.0223610401153564,
0.9032748937606812,
-0.3387221693992615,
0.4601018726825714,
0.10568602383136749,
-1.3583630323410034,
0.3959181308746338,
1.1454044580459595,
0.2429792732000351,
1.5103144645690918,
-0.609362781047821,
0.0638175681233406,
0.4009093940258026,
-0.46058982610702515,
-0.486521452665329,
-0.5955044031143188,
0.6978197693824768,
0.036671675741672516,
-0.9583139419555664,
0.08821359276771545,
0.00781292375177145,
-0.210377037525177,
0.1630362868309021,
-1.4506222009658813,
-0.15053217113018036,
-0.3533417284488678,
-0.7157635688781738,
-1.2504980564117432,
0.023438379168510437,
1.3176480531692505,
-0.8005897998809814,
-0.16675637662410736,
0.4850408136844635,
0.30769529938697815,
0.5225225687026978,
0.5991495251655579,
-0.6721028089523315,
-0.3433937430381775,
-0.1576743721961975,
-0.3180750608444214,
0.328687459230423,
1.3596667051315308,
-0.08596161752939224,
-1.0048748254776,
0.7144395112991333,
-0.3949447572231293,
0.16535553336143494,
1.994734525680542,
0.06421094387769699,
-0.8257449269294739,
0.2696007788181305,
-0.728378176689148,
1.9158416986465454,
1.7172002792358398,
1.371533989906311,
-0.10953030735254288,
-1.0005922317504883,
0.5920184254646301,
-0.32784613966941833,
-0.36119508743286133,
0.9865168333053589,
0.41527819633483887,
-0.1972200721502304,
-1.3233810663223267,
0.6094949841499329,
1.2865453958511353,
-0.9164972305297852,
-0.8795592188835144,
0.1652868241071701,
-0.8595892786979675,
1.040689468383789,
0.7280442118644714,
0.3776666224002838,
0.24154521524906158,
1.5305306911468506,
0.7888054251670837,
-0.464173287153244,
0.5793510675430298,
0.48284420371055603,
-0.18197478353977203,
-2.1182730197906494,
-1.0742480754852295,
0.3329503536224365,
-0.538499116897583,
-1.6099063158035278,
1.3587936162948608,
-1.2271499633789062,
-0.9592157602310181,
0.5899999737739563,
0.06748774647712708,
1.432266116142273,
0.3151038587093353,
1.6170669794082642,
2.029318332672119,
0.9332626461982727,
0.36011746525764465,
1.2598260641098022,
-0.21284182369709015,
-0.4618608057498932,
1.765620231628418,
-0.517737865447998,
0.49279963970184326,
1.0642738342285156,
-0.3624523878097534,
-1.0725973844528198,
-0.8163159489631653,
-1.1595804691314697,
-0.7118018269538879,
1.2260273694992065,
0.10604003816843033,
-1.0554372072219849,
0.32489535212516785,
1.6000044345855713,
0.06787484884262085,
-0.3276212811470032,
0.6801391839981079,
0.42769673466682434,
-0.8049776554107666,
-0.02137477695941925,
-0.9396530389785767,
0.5044301748275757,
-0.1940157413482666,
-0.37159568071365356,
0.34369486570358276,
0.44202956557273865,
1.3140223026275635,
-0.060394492000341415,
0.09620834141969681,
1.312143325805664,
-1.3540663719177246,
1.4918420314788818,
-0.6209186315536499,
0.2503364384174347,
-2.3886890411376953,
1.410767912864685,
-0.8341450095176697,
1.8322423696517944,
-2.6190855503082275,
0.46472615003585815,
-0.5873220562934875,
-0.41359245777130127,
0.2650768458843231,
-0.3565371036529541,
0.11287661641836166,
-0.17049723863601685,
-1.1438429355621338,
-0.16641342639923096,
-0.8162069916725159,
0.5356968641281128,
1.1973999738693237,
1.3416026830673218,
-1.0959702730178833,
-0.28024595975875854,
-1.7542942762374878,
-0.20581908524036407,
-0.7934930324554443,
0.3935548663139343,
-1.9490424394607544,
-0.23178842663764954,
-1.9629424810409546,
-2.4491403102874756,
-1.321104645729065,
-0.7988618016242981,
1.0828300714492798,
0.10980232059955597,
-0.8291482925415039,
1.0124950408935547,
-0.4214133322238922,
-1.8353759050369263,
1.1003313064575195,
-2.200852870941162
] |
https://github.com/huggingface/datasets/issues/5971 | Docs: make "repository structure" easier to find | Loading a local dataset also works the same way when `data_files` are not specified, so I agree we should make this info easier to discover
cc @stevhliu | The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages. | 89 | 27 | Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
Loading a local dataset also works the same way when `data_files` are not specified, so I agree we should make this info easier to discover
cc @stevhliu | [
-1.140047550201416,
-0.8816279768943787,
-0.907818078994751,
1.4849075078964233,
-0.22360658645629883,
-1.2636231184005737,
-0.014722542837262154,
-1.1463297605514526,
1.7633721828460693,
-0.8426515460014343,
0.3225611448287964,
-1.550175428390503,
-0.06916023045778275,
-0.46705204248428345,
-0.7492716312408447,
-0.9545934796333313,
-0.4288569390773773,
-0.8321847915649414,
1.109799861907959,
2.55466365814209,
1.0417590141296387,
-1.536143183708191,
2.742480754852295,
0.8045647144317627,
-0.11629270017147064,
-0.9799151420593262,
0.5522589087486267,
0.07075376063585281,
-1.1605017185211182,
-0.4975697994232178,
-0.907182514667511,
0.03607958182692528,
-0.4275013208389282,
-0.4908822774887085,
0.032069478183984756,
0.41343221068382263,
-0.09062983095645905,
-0.551342248916626,
-0.5125506520271301,
-0.6239532828330994,
0.4171925485134125,
-0.4227917492389679,
0.8207268118858337,
-0.5104329586029053,
1.9348844289779663,
-0.4675515592098236,
0.29801344871520996,
0.6803497672080994,
1.391034722328186,
0.21160218119621277,
0.1126769483089447,
0.24393442273139954,
0.32745155692100525,
-0.036166802048683167,
0.383222758769989,
1.0921345949172974,
0.5035590529441833,
0.7316412925720215,
0.7674433588981628,
-2.044243097305298,
1.296105146408081,
-1.0580753087997437,
0.290031373500824,
1.4146755933761597,
-0.949712336063385,
0.35577285289764404,
-1.6960997581481934,
-0.0016708187758922577,
0.5770615339279175,
-2.32070255279541,
0.3195728361606598,
-1.0860265493392944,
-0.5543085932731628,
0.9409835338592529,
0.2968803644180298,
-1.2805360555648804,
0.30947524309158325,
-0.39635130763053894,
1.0141496658325195,
0.5302554965019226,
1.1259832382202148,
-1.646871566772461,
0.3161410391330719,
-0.3796216547489166,
-0.08403898775577545,
-1.3974708318710327,
-1.5321351289749146,
0.4698079824447632,
0.5959750413894653,
0.6545317769050598,
-0.1107766255736351,
0.8458659648895264,
-0.9165927171707153,
0.704148530960083,
-0.8891042470932007,
-1.4584141969680786,
-1.2792381048202515,
-2.3460142612457275,
-2.3234028816223145,
0.8963144421577454,
-0.43980374932289124,
-0.5460305213928223,
1.9477133750915527,
-0.921973705291748,
-1.7383450269699097,
1.163027048110962,
0.3360193967819214,
0.1178598627448082,
2.48402738571167,
0.2189074605703354,
-0.6353700757026672,
0.3740732967853546,
-0.7424746751785278,
1.0908277034759521,
-0.48997238278388977,
1.390558123588562,
0.5871940851211548,
-0.9590794444084167,
1.662826657295227,
-0.35292375087738037,
0.7349555492401123,
-0.6973360180854797,
-0.6308649182319641,
-1.0274839401245117,
0.3418579399585724,
1.8945075273513794,
-0.3081169128417969,
1.6083768606185913,
-0.43408194184303284,
-1.5857683420181274,
-1.7235528230667114,
0.9649155735969543,
0.4321076273918152,
-0.7360194325447083,
0.11022309958934784,
-0.3792448937892914,
-0.011568721383810043,
-0.06444475799798965,
1.1199184656143188,
1.1588612794876099,
0.6712782382965088,
-0.29997774958610535,
-0.9449540972709656,
-0.04530751705169678,
0.03364870697259903,
-0.7225229740142822,
-1.8566668033599854,
-0.32554519176483154,
0.04420852288603783,
0.45618435740470886,
-1.2308863401412964,
1.6712417602539062,
0.9633880853652954,
1.9613854885101318,
0.8659986853599548,
-0.2974640429019928,
1.4973151683807373,
-0.0964227020740509,
1.9638160467147827,
-0.5063861012458801,
0.5970609784126282,
-0.19465325772762299,
-1.1815855503082275,
0.7981446981430054,
-0.4119545817375183,
-2.051445245742798,
-0.9466989636421204,
-0.8753982186317444,
-0.29527804255485535,
-0.6175479888916016,
0.9464621543884277,
-0.3343847692012787,
-1.3928909301757812,
0.07637757807970047,
-0.5139449834823608,
0.07890856266021729,
-1.1653896570205688,
0.2939460873603821,
0.7693049907684326,
-0.6644221544265747,
-0.11281348019838333,
-0.25207751989364624,
-1.3830491304397583,
-0.4665943682193756,
0.31763285398483276,
2.018406629562378,
-0.7548189163208008,
0.8452270030975342,
0.9192875027656555,
-0.8408971428871155,
0.06678849458694458,
0.23735803365707397,
-0.3258380591869354,
0.7800126671791077,
-1.146112084388733,
-0.3781137466430664,
1.223151445388794,
-0.10169026255607605,
-0.6353298425674438,
1.5367940664291382,
0.6363067030906677,
-0.9920057654380798,
-0.08732625097036362,
-0.2177101969718933,
-0.9041939973831177,
-0.09321910887956619,
-1.519311547279358,
-0.15892153978347778,
0.09706178307533264,
-1.4384574890136719,
-0.5913307070732117,
-0.3762471377849579,
1.17755126953125,
-0.19909483194351196,
1.2278639078140259,
-0.31724289059638977,
-0.16922859847545624,
-0.33261263370513916,
-0.4519314765930176,
0.2871897220611572,
-0.3051542639732361,
-0.6077282428741455,
0.2456049621105194,
-0.885846734046936,
0.3019980192184448,
1.5206600427627563,
0.4453529417514801,
0.14559438824653625,
0.45740827918052673,
0.9914657473564148,
0.42155519127845764,
-0.04208426550030708,
-0.7358359098434448,
-1.6207737922668457,
1.9779599905014038,
-1.415664792060852,
1.9187893867492676,
0.7076422572135925,
-0.06047099828720093,
-1.8290696144104004,
-1.9044606685638428,
1.3579277992248535,
1.2114710807800293,
2.331636428833008,
0.4828440248966217,
0.22177812457084656,
-0.8578951358795166,
-0.8361855745315552,
0.31948256492614746,
-0.9822884798049927,
-0.7281777262687683,
0.06553509086370468,
2.1927731037139893,
1.716804027557373,
-0.4846200942993164,
-0.20335090160369873,
-1.0921772718429565,
1.2619836330413818,
-0.13941699266433716,
0.28358393907546997,
2.0230705738067627,
-0.2410387247800827,
-1.1248767375946045,
1.2249946594238281,
-2.2963054180145264,
0.16529226303100586,
1.9919230937957764,
0.3894842565059662,
0.24457216262817383,
-1.519262671470642,
-0.7635653614997864,
-0.15797045826911926,
-0.4093191921710968,
-1.2163280248641968,
0.6747738718986511,
-0.3242526054382324,
-0.8796327710151672,
-1.3990871906280518,
0.11645454913377762,
-1.2120344638824463,
-1.6376745700836182,
0.4464283287525177,
1.9302514791488647,
2.018505334854126,
-0.7252317070960999,
1.4922147989273071,
-0.17101208865642548,
0.017510123550891876,
1.2080144882202148,
1.1661778688430786,
2.9794535636901855,
1.7452768087387085,
-1.0978285074234009,
0.606092631816864,
-0.17477326095104218,
-0.5548490881919861,
1.3103934526443481,
-1.058900237083435,
1.3040645122528076,
-0.2850082814693451,
-0.9632803797721863,
-1.2423704862594604,
0.8099076747894287,
0.5470150709152222,
0.21411718428134918,
-0.41663414239883423,
1.2793124914169312,
0.017002876847982407,
1.2176332473754883,
0.6215021014213562,
-0.47243332862854004,
0.45286422967910767,
-0.45615294575691223,
-0.5941340327262878,
1.5582444667816162,
0.268648624420166,
-1.510221004486084,
-2.1974406242370605,
-0.15583458542823792,
-0.8564749360084534,
0.09507544338703156,
-0.581240177154541,
-0.9693350195884705,
1.6616806983947754,
0.41890743374824524,
-1.2370970249176025,
-0.21263979375362396,
-0.2555380165576935,
-0.6179870367050171,
2.659841775894165,
-1.3105679750442505,
-0.15325747430324554,
-0.8249617218971252,
-0.42299729585647583,
1.625604510307312,
-1.2409546375274658,
-0.2628686726093292,
-0.910018265247345,
-0.58291095495224,
-1.372588038444519,
-0.3758247494697571,
0.07314955443143845,
-0.9738712906837463,
0.8683435916900635,
0.10552240908145905,
-0.97756028175354,
-0.25100234150886536,
-0.8466583490371704,
0.9415544867515564,
0.046318892389535904,
0.39765870571136475,
1.9044749736785889,
0.46866849064826965,
-0.3426574766635895,
0.7437765598297119,
1.231998324394226,
0.6644721031188965,
-0.6890724897384644,
0.2607880234718323,
-0.6808184385299683,
0.30014723539352417,
-1.2902334928512573,
0.25336140394210815,
-2.953125238418579,
0.6077545881271362,
-0.05404367670416832,
-0.14876382052898407,
0.012080459855496883,
-1.3159080743789673,
1.1573734283447266,
2.5856051445007324,
-1.1926063299179077,
0.389687180519104,
0.3225874602794647,
1.3539296388626099,
-1.4175740480422974,
0.3681337237358093,
-0.4387611150741577,
2.1126465797424316,
0.23386259377002716,
1.0630744695663452,
-0.5260429978370667,
-2.2541987895965576,
0.6989705562591553,
-1.3531850576400757,
-1.1775882244110107,
0.7616174221038818,
-0.917570173740387,
0.1249563917517662,
-1.5656030178070068,
-0.1849481612443924,
-0.9822806119918823,
-1.2561607360839844,
0.7529887557029724,
0.22926320135593414,
0.35860058665275574,
-0.5523651242256165,
0.3829204738140106,
-2.172499418258667,
-1.4209564924240112,
-0.2930871546268463,
-0.9276206493377686,
0.6006665825843811,
-0.31781312823295593,
0.5990037322044373,
-0.1391637623310089,
0.257140189409256,
0.39124783873558044,
1.4154926538467407,
3.3920090198516846,
0.22212019562721252,
0.4010034203529358,
-0.13785721361637115,
-0.9485514163970947,
1.4069969654083252,
1.0546963214874268,
-0.06984710693359375,
-0.7488691806793213,
-0.9619764685630798,
1.312856912612915,
2.046567440032959,
1.018351674079895,
0.021883796900510788,
-0.876403272151947,
-0.6669183373451233,
-0.058370109647512436,
0.20270481705665588,
0.4548453986644745,
0.9898267984390259,
-0.03276536613702774,
0.10750056058168411,
1.4684749841690063,
1.2852120399475098,
-0.41762617230415344,
0.40741822123527527,
-0.8732940554618835,
-0.38083910942077637,
0.513870120048523,
0.288210391998291,
0.05340385437011719,
0.5241269469261169,
-0.9198986291885376,
-0.2996256351470947,
-0.31265968084335327,
-0.9530271887779236,
-0.63726407289505,
-0.5233023762702942,
-0.5107736587524414,
1.6198781728744507,
0.08194931596517563,
-0.6729753017425537,
-0.13522322475910187,
-0.7520699501037598,
-0.10320573300123215,
-1.1008360385894775,
0.32261940836906433,
-0.1410330832004547,
-0.12660877406597137,
-0.12020847946405411,
1.693047046661377,
-1.0420727729797363,
-2.1495540142059326,
0.26436394453048706,
0.4068489670753479,
-0.44551920890808105,
0.17039988934993744,
1.6501832008361816,
0.4417341947555542,
1.4895116090774536,
1.1980640888214111,
0.8617149591445923,
-0.63698810338974,
-1.3752171993255615,
0.6298279762268066,
1.007542371749878,
-1.3692350387573242,
0.8266249299049377,
-0.003951393533498049,
-0.5979570150375366,
0.7438340783119202,
1.2134894132614136,
0.36227473616600037,
-2.0041911602020264,
0.8253422379493713,
-0.7881550788879395,
0.9435350298881531,
0.6446585655212402,
0.7804861068725586,
0.19049394130706787,
0.874488890171051,
-1.284115195274353,
-1.2233408689498901,
-0.9046854972839355,
-0.6929592490196228,
2.0647661685943604,
-0.15411289036273956,
0.5337350368499756,
-0.09112901985645294,
-1.13374662399292,
-0.1568959653377533,
0.6024032831192017,
0.3662005066871643,
-0.46386513113975525,
0.8649492263793945,
-0.7786295413970947,
-1.177094578742981,
-1.4614883661270142,
-0.586173951625824,
-1.0274518728256226,
-0.8303115963935852,
1.0991514921188354,
0.8045571446418762,
0.29617467522621155,
1.9370049238204956,
0.5798859000205994,
0.35065916180610657,
-2.6216299533843994,
0.8859624266624451,
0.33831000328063965,
0.0003327224403619766,
0.718059778213501,
0.3200225234031677,
1.0055819749832153,
-0.00865655392408371,
0.5476053953170776,
-2.2796311378479004,
2.3077051639556885,
-0.3083919286727905,
0.6267284750938416,
-0.0391324944794178,
-0.2589804232120514,
1.1822419166564941,
0.6111046671867371,
0.6501259803771973,
-1.2437331676483154,
0.6889289617538452,
-0.4312339723110199,
1.1549148559570312,
0.8783102035522461,
-0.8131583333015442,
-0.06626427918672562,
1.4087721109390259,
0.4789246618747711,
-0.41884416341781616,
-0.8263040781021118,
-0.7529217600822449,
0.8701906800270081,
1.7221521139144897,
-0.15623776614665985,
0.050947610288858414,
0.8133664131164551,
0.49300479888916016,
-1.3342825174331665,
-0.017337575554847717,
-0.8049706816673279,
-0.7733507752418518,
1.5719618797302246,
2.04306960105896,
-0.11062516272068024,
-0.028504785150289536,
-0.7181269526481628,
-1.0951651334762573,
0.7236457467079163,
-0.09322648495435715,
0.10528354346752167,
0.5272455811500549,
-0.6578203439712524,
0.9994646310806274,
0.8440557718276978,
0.9235867857933044,
-0.18822360038757324,
0.35784393548965454,
0.5396639108657837,
-0.23504601418972015,
-1.1646260023117065,
-0.47423863410949707,
-1.1207897663116455,
-2.5361454486846924,
0.39095017313957214,
-0.33865484595298767,
-1.5326908826828003,
0.027559753507375717,
-1.076364278793335,
1.0208240747451782,
-0.5233498215675354,
-1.0663297176361084,
-1.4960702657699585,
0.19239196181297302,
-0.1311153918504715,
0.8603364825248718,
-1.641444444656372,
-0.06911012530326843,
1.2234057188034058,
0.8750038743019104,
-0.6595385074615479,
1.0648335218429565,
0.3009517192840576,
1.0395089387893677,
0.8700847625732422,
-0.41690903902053833,
0.4255894124507904,
0.16205012798309326,
-1.35354483127594,
0.45379912853240967,
1.1338934898376465,
0.12566813826560974,
1.2832136154174805,
-0.5376108884811401,
0.07992193102836609,
0.475955992937088,
-0.6969789266586304,
-0.357774019241333,
-0.5197151899337769,
0.7689161896705627,
0.03406846523284912,
-1.0315533876419067,
-0.07009456306695938,
-0.11346480995416641,
-0.16590455174446106,
0.3036916255950928,
-1.4999682903289795,
-0.46487244963645935,
-0.5041752457618713,
-0.37988683581352234,
-1.3218868970870972,
0.021413005888462067,
1.418667197227478,
-0.6271963119506836,
-0.1442207396030426,
0.4747808277606964,
0.5127649307250977,
0.6063941717147827,
0.707817554473877,
-0.7313872575759888,
-0.2656182050704956,
-0.29951176047325134,
-0.36384403705596924,
0.205296128988266,
1.320421814918518,
-0.2676241099834442,
-0.985107958316803,
0.7652338743209839,
-0.33621129393577576,
0.09020203351974487,
2.00067400932312,
0.06804592162370682,
-0.7484529614448547,
0.48964619636535645,
-0.7865532636642456,
1.9257341623306274,
1.713950514793396,
1.3970239162445068,
-0.030523475259542465,
-0.8176804780960083,
0.5379064679145813,
-0.302860289812088,
-0.3817698359489441,
0.8571248650550842,
0.52447110414505,
-0.24950535595417023,
-1.3315551280975342,
0.6004220843315125,
1.320581078529358,
-0.9404049515724182,
-0.8773480653762817,
-0.0047371103428304195,
-0.7256868481636047,
1.1291208267211914,
0.7609343528747559,
0.5135210752487183,
0.31265029311180115,
1.5968296527862549,
0.6801334023475647,
-0.6259827613830566,
0.5626589059829712,
0.5015637874603271,
-0.025941219180822372,
-1.9705839157104492,
-0.9616929888725281,
0.45441168546676636,
-0.44223180413246155,
-1.5183618068695068,
1.297223687171936,
-1.0704034566879272,
-0.8979197144508362,
0.57513427734375,
0.06115118786692619,
1.4604309797286987,
0.4534863829612732,
1.5245957374572754,
2.0716471672058105,
0.7804653644561768,
0.16886964440345764,
1.408529281616211,
-0.09258657693862915,
-0.5165377855300903,
1.9833844900131226,
-0.48198607563972473,
0.4564363658428192,
1.08036208152771,
-0.2704082727432251,
-0.937368631362915,
-0.6875301599502563,
-1.2109172344207764,
-0.5946839451789856,
1.1491223573684692,
0.12314746528863907,
-1.2043282985687256,
0.1861398071050644,
1.712372064590454,
0.04686115309596062,
-0.3677891492843628,
0.6314428448677063,
0.5119408369064331,
-0.8030540347099304,
-0.21136391162872314,
-1.08296537399292,
0.4803372621536255,
-0.20974411070346832,
-0.38220712542533875,
0.3121148347854614,
0.41834717988967896,
1.157855749130249,
-0.11699683964252472,
0.22989441454410553,
1.0740737915039062,
-1.3985179662704468,
1.4602925777435303,
-0.6778318881988525,
0.22051812708377838,
-2.4777402877807617,
1.5299875736236572,
-0.5963781476020813,
1.9937467575073242,
-2.6749789714813232,
0.4770025610923767,
-0.5991050004959106,
-0.532707154750824,
0.3541480600833893,
-0.38483288884162903,
0.14970672130584717,
-0.149495929479599,
-1.0425790548324585,
0.044335246086120605,
-0.7148655652999878,
0.598058819770813,
1.1527800559997559,
1.2050834894180298,
-1.0801975727081299,
-0.32394081354141235,
-1.7418079376220703,
-0.18191586434841156,
-0.7207129597663879,
0.3543094992637634,
-2.128164768218994,
-0.2560112476348877,
-1.9371392726898193,
-2.3605966567993164,
-1.352612853050232,
-0.8184739947319031,
1.1907398700714111,
0.24550333619117737,
-0.9984806776046753,
1.1031594276428223,
-0.3293021023273468,
-1.8584462404251099,
1.0144109725952148,
-2.021864175796509
] |
https://github.com/huggingface/datasets/issues/5971 | Docs: make "repository structure" easier to find | @benjaminbrown038 Yes, it is. Maybe @stevhliu can give some pointers on improving this doc page's discoverability. | The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages. | 89 | 16 | Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
@benjaminbrown038 Yes, it is. Maybe @stevhliu can give some pointers on improving this doc page's discoverability. | [
-1.219228982925415,
-0.9178181886672974,
-0.9359124302864075,
1.5995855331420898,
-0.1926112174987793,
-1.2372485399246216,
-0.08507048338651657,
-1.0285688638687134,
1.8024802207946777,
-0.8626110553741455,
0.33971840143203735,
-1.560288667678833,
-0.15687528252601624,
-0.41684192419052124,
-0.7771521210670471,
-0.9287599921226501,
-0.40033280849456787,
-0.8620896935462952,
1.0969667434692383,
2.562190532684326,
1.024588942527771,
-1.4647703170776367,
2.7524850368499756,
0.8395063877105713,
-0.11321265250444412,
-0.9636610150337219,
0.5826517343521118,
0.04011186957359314,
-1.1649339199066162,
-0.48666006326675415,
-0.9673838019371033,
0.09434238076210022,
-0.3592323660850525,
-0.45392608642578125,
0.0848359614610672,
0.3390008211135864,
-0.050675150007009506,
-0.5115282535552979,
-0.48190635442733765,
-0.6701908707618713,
0.29511159658432007,
-0.41991645097732544,
0.8645683526992798,
-0.4985358715057373,
1.8736623525619507,
-0.4330556392669678,
0.3385081887245178,
0.6888900399208069,
1.365227460861206,
0.23516632616519928,
0.05324937403202057,
0.23239579796791077,
0.3663690686225891,
-0.10830269753932953,
0.45417702198028564,
1.1740412712097168,
0.5055974721908569,
0.6608054041862488,
0.7267246246337891,
-2.1680495738983154,
1.4089102745056152,
-1.1405247449874878,
0.3520353436470032,
1.461883783340454,
-0.9936305284500122,
0.40881025791168213,
-1.656062364578247,
0.020185070112347603,
0.6185131669044495,
-2.316608190536499,
0.3672330379486084,
-1.0646663904190063,
-0.5347086191177368,
0.9235743880271912,
0.2923046946525574,
-1.2760238647460938,
0.29334741830825806,
-0.3471640944480896,
1.0345771312713623,
0.4530615210533142,
1.1101548671722412,
-1.6219805479049683,
0.26991701126098633,
-0.30901551246643066,
-0.05437421798706055,
-1.3853665590286255,
-1.5589302778244019,
0.46962934732437134,
0.5516148209571838,
0.7665106654167175,
-0.09822583198547363,
0.779767632484436,
-0.9161219000816345,
0.7395447492599487,
-0.8229399919509888,
-1.4908843040466309,
-1.2943040132522583,
-2.3569657802581787,
-2.308393716812134,
0.8916027545928955,
-0.447026789188385,
-0.5411558151245117,
1.9144654273986816,
-0.987727165222168,
-1.7260864973068237,
1.2339251041412354,
0.34244686365127563,
0.10266005992889404,
2.518422842025757,
0.2856607437133789,
-0.6921443939208984,
0.3587528467178345,
-0.8006618022918701,
1.1043245792388916,
-0.5141186118125916,
1.3663725852966309,
0.5581588745117188,
-0.8864696621894836,
1.5890884399414062,
-0.4430956244468689,
0.6248754262924194,
-0.6341988444328308,
-0.6138212084770203,
-1.0159107446670532,
0.3482516407966614,
1.779740333557129,
-0.2762112021446228,
1.598306655883789,
-0.4118846654891968,
-1.558174729347229,
-1.7075732946395874,
0.8972288966178894,
0.4480172395706177,
-0.7082026600837708,
0.15245497226715088,
-0.37434810400009155,
0.035300180315971375,
-0.09505448490381241,
1.1275137662887573,
1.1669740676879883,
0.6614968180656433,
-0.2974100708961487,
-1.0092616081237793,
-0.056134987622499466,
0.007347607985138893,
-0.7009153366088867,
-1.8255891799926758,
-0.28961819410324097,
0.07900068163871765,
0.4530390501022339,
-1.3064727783203125,
1.6520110368728638,
0.9839125871658325,
2.0192174911499023,
0.8762897849082947,
-0.2627723217010498,
1.4622877836227417,
-0.0015718555077910423,
1.9539856910705566,
-0.5078184008598328,
0.5957494378089905,
-0.23011407256126404,
-1.14449143409729,
0.8209576606750488,
-0.47924280166625977,
-2.0266151428222656,
-0.9335102438926697,
-0.8491142392158508,
-0.33594441413879395,
-0.5716830492019653,
0.9582918882369995,
-0.34310662746429443,
-1.3741830587387085,
0.06721459329128265,
-0.5477799773216248,
0.026582401245832443,
-1.1429349184036255,
0.342845618724823,
0.7518394589424133,
-0.6109234690666199,
-0.06329013407230377,
-0.18823714554309845,
-1.431187629699707,
-0.38637590408325195,
0.3616558313369751,
2.073625326156616,
-0.7425049543380737,
0.8942245841026306,
0.9619073271751404,
-0.8463720679283142,
0.0063047343865036964,
0.273614764213562,
-0.3556980490684509,
0.7578391432762146,
-1.0905312299728394,
-0.40461742877960205,
1.2719979286193848,
-0.10861002653837204,
-0.6693481206893921,
1.5317051410675049,
0.6260952353477478,
-1.00698983669281,
-0.18320855498313904,
-0.15715518593788147,
-0.8454774022102356,
-0.10551246255636215,
-1.4981287717819214,
-0.18752609193325043,
0.10976365208625793,
-1.4093538522720337,
-0.5997137427330017,
-0.33960938453674316,
1.2892956733703613,
-0.1698015332221985,
1.2085552215576172,
-0.24860775470733643,
-0.1591828167438507,
-0.346005380153656,
-0.474714994430542,
0.2735828161239624,
-0.34433799982070923,
-0.577713131904602,
0.32907527685165405,
-0.8482428193092346,
0.3291019797325134,
1.5244371891021729,
0.4360266327857971,
0.0625571757555008,
0.48603206872940063,
0.9296722412109375,
0.4898715019226074,
0.017817676067352295,
-0.809760570526123,
-1.5727019309997559,
2.040102243423462,
-1.4227479696273804,
1.9355885982513428,
0.7325848937034607,
-0.10774055123329163,
-1.8123475313186646,
-1.9229557514190674,
1.267276406288147,
1.2480720281600952,
2.354360342025757,
0.5538228750228882,
0.2693495750427246,
-0.7979680299758911,
-0.7762242555618286,
0.30326253175735474,
-1.0215818881988525,
-0.7675986886024475,
0.08913593739271164,
2.2370874881744385,
1.686537742614746,
-0.5034046173095703,
-0.14417323470115662,
-1.072380781173706,
1.3154269456863403,
-0.15444399416446686,
0.2547590732574463,
2.020369052886963,
-0.17357151210308075,
-1.1407078504562378,
1.2016876935958862,
-2.2843267917633057,
0.16889721155166626,
1.9851963520050049,
0.3799857497215271,
0.19071421027183533,
-1.6392951011657715,
-0.7818987965583801,
-0.15137773752212524,
-0.39986342191696167,
-1.1608753204345703,
0.7100955843925476,
-0.32060855627059937,
-0.9207578301429749,
-1.401620864868164,
0.06142432242631912,
-1.180452823638916,
-1.6678671836853027,
0.3704293966293335,
1.8917813301086426,
2.0861568450927734,
-0.7721934914588928,
1.4773063659667969,
-0.12075407058000565,
-0.08584403991699219,
1.1563748121261597,
1.1599903106689453,
2.946472644805908,
1.748428463935852,
-1.1339049339294434,
0.6245830059051514,
-0.16237924993038177,
-0.5375534892082214,
1.2960232496261597,
-1.0934985876083374,
1.2787855863571167,
-0.202413871884346,
-0.9625243544578552,
-1.1741762161254883,
0.8229953646659851,
0.4925147294998169,
0.09317374974489212,
-0.45715612173080444,
1.2846482992172241,
0.011927399784326553,
1.2925955057144165,
0.5886494517326355,
-0.4338288903236389,
0.41907763481140137,
-0.46124958992004395,
-0.5643186569213867,
1.562712550163269,
0.21171700954437256,
-1.5642532110214233,
-2.197216272354126,
-0.14320191740989685,
-0.7933349013328552,
0.021167099475860596,
-0.5510956048965454,
-0.9939525127410889,
1.6845808029174805,
0.4974011182785034,
-1.194022536277771,
-0.27226197719573975,
-0.23471593856811523,
-0.6066631078720093,
2.5981929302215576,
-1.2912788391113281,
-0.17164236307144165,
-0.855684757232666,
-0.35560208559036255,
1.6210170984268188,
-1.2117348909378052,
-0.28346383571624756,
-0.9374339580535889,
-0.616073489189148,
-1.330379843711853,
-0.4383307099342346,
0.049469348043203354,
-0.9573890566825867,
0.8198832869529724,
0.10251015424728394,
-0.9824959635734558,
-0.2389858514070511,
-0.8702605962753296,
0.9347332119941711,
0.08953075110912323,
0.3048033118247986,
1.9492225646972656,
0.43074846267700195,
-0.4174443483352661,
0.724435031414032,
1.2651166915893555,
0.6288065910339355,
-0.6767206192016602,
0.2731027603149414,
-0.6695553660392761,
0.3343222141265869,
-1.315353274345398,
0.23467551171779633,
-3.0072882175445557,
0.5575751066207886,
-0.015280523337423801,
-0.18787653744220734,
-0.016463153064250946,
-1.2296119928359985,
1.274859070777893,
2.4805219173431396,
-1.167654037475586,
0.522193968296051,
0.2927337884902954,
1.372359275817871,
-1.5110052824020386,
0.3715888261795044,
-0.4061617851257324,
2.122744083404541,
0.17737308144569397,
1.0827841758728027,
-0.5350016951560974,
-2.2577097415924072,
0.7454923391342163,
-1.4033324718475342,
-1.0656709671020508,
0.7238500714302063,
-1.0052790641784668,
0.13260474801063538,
-1.4979766607284546,
-0.15678030252456665,
-0.9572319984436035,
-1.309997320175171,
0.7325964570045471,
0.20110772550106049,
0.36165904998779297,
-0.5489252209663391,
0.3743443489074707,
-2.228801965713501,
-1.3710535764694214,
-0.31889909505844116,
-1.0014182329177856,
0.6270126700401306,
-0.3442322611808777,
0.635806679725647,
-0.13727208971977234,
0.1960393786430359,
0.4003591537475586,
1.3709474802017212,
3.301604747772217,
0.20078860223293304,
0.4500223398208618,
-0.0818033516407013,
-0.9865332245826721,
1.3373873233795166,
1.0664608478546143,
-0.12625756859779358,
-0.8105326890945435,
-1.0005072355270386,
1.41688871383667,
1.997734546661377,
1.0460846424102783,
0.10120876133441925,
-0.9165955781936646,
-0.73223477602005,
0.027579106390476227,
0.1948796957731247,
0.4735758900642395,
1.0069528818130493,
-0.016129206866025925,
0.10767678916454315,
1.4770127534866333,
1.3129209280014038,
-0.37801510095596313,
0.3759862184524536,
-0.8877092003822327,
-0.3370322585105896,
0.4102747440338135,
0.2885625958442688,
-0.08060936629772186,
0.5486512184143066,
-0.9191088080406189,
-0.3686510920524597,
-0.22169968485832214,
-0.8915343880653381,
-0.6543567180633545,
-0.5007611513137817,
-0.4713815450668335,
1.6351215839385986,
0.12317769229412079,
-0.6354302763938904,
-0.124480701982975,
-0.7775434851646423,
-0.0654754787683487,
-1.143409252166748,
0.3158029317855835,
-0.0758974477648735,
-0.1117136999964714,
-0.1915905922651291,
1.746994972229004,
-0.9848833084106445,
-2.1523492336273193,
0.17036038637161255,
0.4016491174697876,
-0.40733444690704346,
0.14342842996120453,
1.7025892734527588,
0.4328598380088806,
1.4448049068450928,
1.2605257034301758,
0.8887720108032227,
-0.672720730304718,
-1.3663464784622192,
0.6025854349136353,
1.022854208946228,
-1.3669719696044922,
0.9003088474273682,
-0.11502507328987122,
-0.508594274520874,
0.7059810757637024,
1.2870784997940063,
0.32170236110687256,
-1.9187532663345337,
0.8723217248916626,
-0.7982478737831116,
1.0064582824707031,
0.620979368686676,
0.7926754355430603,
0.18233567476272583,
0.7873599529266357,
-1.2685730457305908,
-1.2272536754608154,
-0.9115292429924011,
-0.7089698910713196,
2.05621075630188,
-0.16337765753269196,
0.5439099669456482,
-0.13507342338562012,
-1.1478837728500366,
-0.1844300776720047,
0.6009189486503601,
0.35445594787597656,
-0.41009271144866943,
0.8657400608062744,
-0.7655547261238098,
-1.2518539428710938,
-1.479019045829773,
-0.6399443745613098,
-0.9900386333465576,
-0.7931349277496338,
1.151469349861145,
0.7991673350334167,
0.29095447063446045,
2.0024118423461914,
0.5925723314285278,
0.39932727813720703,
-2.603370428085327,
0.8866791725158691,
0.37455785274505615,
-0.03506683558225632,
0.7350276112556458,
0.3096697926521301,
0.9960695505142212,
-0.06907179951667786,
0.529127299785614,
-2.3523690700531006,
2.2528235912323,
-0.27643781900405884,
0.7214086055755615,
0.0709574893116951,
-0.22428563237190247,
1.160029649734497,
0.559384286403656,
0.7238544821739197,
-1.220418095588684,
0.635934054851532,
-0.4226154685020447,
1.2521905899047852,
0.8908964395523071,
-0.784055233001709,
-0.09119992703199387,
1.385146975517273,
0.3860306143760681,
-0.3888275623321533,
-0.7911219000816345,
-0.8079131245613098,
0.9256052374839783,
1.7063994407653809,
-0.1427122950553894,
0.1818663328886032,
0.7627880573272705,
0.4532238245010376,
-1.316970705986023,
-0.06002640351653099,
-0.8259702920913696,
-0.7658426761627197,
1.5112439393997192,
2.1408700942993164,
-0.11433440446853638,
-0.059490375220775604,
-0.7116689682006836,
-1.1661584377288818,
0.7013573050498962,
-0.13060571253299713,
0.11035444587469101,
0.5375790596008301,
-0.524163007736206,
0.9772827625274658,
0.8348288536071777,
0.9577919840812683,
-0.1393796056509018,
0.39508485794067383,
0.5433902740478516,
-0.3349918723106384,
-1.0893293619155884,
-0.3870420455932617,
-1.1222538948059082,
-2.571789026260376,
0.4028146266937256,
-0.2893579602241516,
-1.4667459726333618,
0.04112612083554268,
-1.0358295440673828,
0.9758400321006775,
-0.5574312806129456,
-1.0200608968734741,
-1.428524136543274,
0.16282224655151367,
-0.20590327680110931,
0.8306078314781189,
-1.6711907386779785,
-0.16031639277935028,
1.2553009986877441,
0.9093535542488098,
-0.6744297742843628,
1.1186352968215942,
0.23492853343486786,
1.0444165468215942,
0.8400263786315918,
-0.4882161617279053,
0.43395286798477173,
0.13243336975574493,
-1.3435684442520142,
0.46169400215148926,
1.1690844297409058,
0.11572498828172684,
1.3300607204437256,
-0.561212420463562,
0.038817573338747025,
0.5304075479507446,
-0.7354363203048706,
-0.3685588240623474,
-0.4758833050727844,
0.8729114532470703,
0.01665410026907921,
-0.9841837286949158,
-0.03580627217888832,
-0.1469832956790924,
-0.18403840065002441,
0.2356129139661789,
-1.5096653699874878,
-0.48781919479370117,
-0.48547422885894775,
-0.3653743863105774,
-1.3507457971572876,
-0.0007916847243905067,
1.333721399307251,
-0.684451699256897,
-0.15642665326595306,
0.48000282049179077,
0.46889418363571167,
0.6127656698226929,
0.7496722340583801,
-0.7358701825141907,
-0.2980058193206787,
-0.28169846534729004,
-0.2731127142906189,
0.2765742540359497,
1.4276388883590698,
-0.2233273684978485,
-0.9785758852958679,
0.6492545008659363,
-0.3332357406616211,
0.04706733673810959,
1.9890590906143188,
0.026547838002443314,
-0.7425423860549927,
0.4972512125968933,
-0.7131921052932739,
2.0384268760681152,
1.6250629425048828,
1.3896950483322144,
-0.11143184453248978,
-0.8274678587913513,
0.5313270688056946,
-0.27506881952285767,
-0.4284537434577942,
0.770121693611145,
0.5599180459976196,
-0.2640618085861206,
-1.400611400604248,
0.4893030524253845,
1.2561997175216675,
-0.9818999767303467,
-0.8478618264198303,
0.025090418756008148,
-0.7315604090690613,
1.1387709379196167,
0.8074567317962646,
0.4199175238609314,
0.281901478767395,
1.610782504081726,
0.7864310145378113,
-0.7411026954650879,
0.5696415305137634,
0.4725169539451599,
-0.04042346403002739,
-1.9142993688583374,
-0.8320263624191284,
0.4328225255012512,
-0.43358492851257324,
-1.451080322265625,
1.3578249216079712,
-1.0181045532226562,
-0.9068458080291748,
0.5416145324707031,
0.046409305185079575,
1.442399501800537,
0.4407535791397095,
1.5181488990783691,
2.0983994007110596,
0.7936258316040039,
0.14704804122447968,
1.3985058069229126,
-0.21844537556171417,
-0.5237079858779907,
1.982145071029663,
-0.3943599462509155,
0.4585410952568054,
1.003251314163208,
-0.2800564169883728,
-0.9475423097610474,
-0.6836528778076172,
-1.2403244972229004,
-0.6467514038085938,
1.1873756647109985,
0.14987501502037048,
-1.1337379217147827,
0.1495324671268463,
1.624056339263916,
0.020670877769589424,
-0.34624505043029785,
0.6231763958930969,
0.5616003274917603,
-0.7814534902572632,
-0.20882420241832733,
-1.0387436151504517,
0.47946006059646606,
-0.1737707406282425,
-0.40867894887924194,
0.22108440101146698,
0.37028950452804565,
1.1533955335617065,
-0.09359689056873322,
0.22169364988803864,
1.0304927825927734,
-1.3549295663833618,
1.495013952255249,
-0.6904701590538025,
0.2142152041196823,
-2.488510847091675,
1.4652897119522095,
-0.6366005539894104,
1.9790170192718506,
-2.7084720134735107,
0.44443029165267944,
-0.5312818288803101,
-0.49145418405532837,
0.2758888602256775,
-0.38388150930404663,
0.14771869778633118,
-0.17750923335552216,
-1.0739374160766602,
0.08661646395921707,
-0.7091862559318542,
0.5517203211784363,
1.1112600564956665,
1.13821280002594,
-1.1106258630752563,
-0.3294079303741455,
-1.7887293100357056,
-0.11832880973815918,
-0.7884188890457153,
0.24454231560230255,
-2.1157429218292236,
-0.3315001130104065,
-1.9410614967346191,
-2.264525890350342,
-1.3513455390930176,
-0.8465216755867004,
1.2609803676605225,
0.26146334409713745,
-1.009825348854065,
1.0820153951644897,
-0.32323145866394043,
-1.8284997940063477,
0.9142388701438904,
-2.0328078269958496
] |
https://github.com/huggingface/datasets/issues/5971 | Docs: make "repository structure" easier to find | I think we can add a version of the [Main use-case](https://huggingface.co/docs/datasets/repository_structure#main-usecase) section to the [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset) tutorial.
Currently, it doesn't tell you *how* to structure the repository; it only tells you how to create it. So adding the "main use-case" will help bridge the gap and make it easier to find. We should also add a link to the [Structure your repository](https://huggingface.co/docs/datasets/repository_structure) guide for users who want to learn about the other options. | The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages. | 89 | 77 | Docs: make "repository structure" easier to find
The page https://huggingface.co/docs/datasets/repository_structure explains how to create a simple repository structure without a dataset script.
It's the simplest way to create a dataset and should be easier to find, particularly on the docs' first pages.
I think we can add a version of the [Main use-case](https://huggingface.co/docs/datasets/repository_structure#main-usecase) section to the [Share a dataset to the Hub](https://huggingface.co/docs/datasets/upload_dataset) tutorial.
Currently, it doesn't tell you *how* to structure the repository; it only tells you how to create it. So adding the "main use-case" will help bridge the gap and make it easier to find. We should also add a link to the [Structure your repository](https://huggingface.co/docs/datasets/repository_structure) guide for users who want to learn about the other options. | [
-1.1545050144195557,
-0.9247868061065674,
-0.9575984477996826,
1.4997795820236206,
-0.06284741312265396,
-1.3806933164596558,
-0.15269207954406738,
-1.0607870817184448,
1.6985700130462646,
-0.7459540367126465,
0.31383180618286133,
-1.6252093315124512,
-0.013567131012678146,
-0.4986473321914673,
-0.7745649218559265,
-0.9051052331924438,
-0.40048640966415405,
-0.8268703818321228,
0.9205148220062256,
2.5919406414031982,
1.0990935564041138,
-1.4475643634796143,
2.7636618614196777,
0.7756564021110535,
-0.0441393107175827,
-1.0111111402511597,
0.5961986184120178,
0.010165255516767502,
-1.2299447059631348,
-0.5402510762214661,
-0.9379895329475403,
0.07525800913572311,
-0.44508397579193115,
-0.5518777966499329,
0.10655476152896881,
0.3590904772281647,
-0.12751536071300507,
-0.32260340452194214,
-0.6205127835273743,
-0.6965792179107666,
0.4087204337120056,
-0.34958258271217346,
0.9624539613723755,
-0.492090106010437,
1.8637895584106445,
-0.47088855504989624,
0.3515970706939697,
0.6785821318626404,
1.369760513305664,
0.17464953660964966,
0.07843385636806488,
0.264896422624588,
0.4150391221046448,
0.042135026305913925,
0.4600387215614319,
1.1534385681152344,
0.6086428761482239,
0.5490329265594482,
0.7192674279212952,
-2.144186496734619,
1.3603222370147705,
-0.9967052936553955,
0.3238231837749481,
1.4014768600463867,
-0.9130668044090271,
0.35778775811195374,
-1.6877548694610596,
-0.026791125535964966,
0.6306294798851013,
-2.388516902923584,
0.21739986538887024,
-1.2506908178329468,
-0.5500455498695374,
0.9160414338111877,
0.22448641061782837,
-1.2902246713638306,
0.228458434343338,
-0.5045165419578552,
1.0296659469604492,
0.6036184430122375,
1.144413948059082,
-1.7145761251449585,
0.07126500457525253,
-0.26814547181129456,
-0.07884591817855835,
-1.3770099878311157,
-1.5610055923461914,
0.49748536944389343,
0.6141828298568726,
0.7073225975036621,
-0.03060520626604557,
0.8431208729743958,
-0.941109299659729,
0.8374842405319214,
-0.8436188101768494,
-1.6448018550872803,
-1.3416305780410767,
-2.294388771057129,
-2.298807382583618,
0.8748407363891602,
-0.46688008308410645,
-0.4978494942188263,
1.9521942138671875,
-0.9824438691139221,
-1.7753273248672485,
1.1358038187026978,
0.34083470702171326,
0.11987897008657455,
2.442300796508789,
0.17560061812400818,
-0.7242389917373657,
0.37705960869789124,
-0.622617781162262,
0.9502766132354736,
-0.4220358729362488,
1.3225749731063843,
0.5919189453125,
-0.9552362561225891,
1.5979974269866943,
-0.5219174027442932,
0.5515462756156921,
-0.7100303173065186,
-0.5741024017333984,
-0.9448317289352417,
0.3529815375804901,
1.8719265460968018,
-0.3403932750225067,
1.660853624343872,
-0.3101186752319336,
-1.564886450767517,
-1.6434415578842163,
0.8615089058876038,
0.4209398925304413,
-0.833635151386261,
0.030549880117177963,
-0.3652954697608948,
0.05386817455291748,
-0.13153599202632904,
1.136214256286621,
1.1434791088104248,
0.6394026279449463,
-0.29582372307777405,
-0.9031359553337097,
0.06917698681354523,
-0.09314316511154175,
-0.6963393688201904,
-1.8308781385421753,
-0.35781919956207275,
0.28794530034065247,
0.5439682006835938,
-1.2940285205841064,
1.6804062128067017,
0.8703557848930359,
1.9212273359298706,
0.9651522636413574,
-0.2150186002254486,
1.4714628458023071,
-0.007930375635623932,
1.9195131063461304,
-0.5858129858970642,
0.6156236529350281,
-0.2531411051750183,
-1.1130213737487793,
0.7929654717445374,
-0.4754813313484192,
-2.0029501914978027,
-0.7860521674156189,
-0.917696475982666,
-0.1985684633255005,
-0.6165990829467773,
0.9319890141487122,
-0.34301310777664185,
-1.3061659336090088,
0.21815869212150574,
-0.6571966409683228,
0.04800092801451683,
-1.147896409034729,
0.2752314805984497,
0.784268319606781,
-0.6714250445365906,
-0.07521054148674011,
-0.2355210781097412,
-1.4140689373016357,
-0.4833405613899231,
0.3573407828807831,
1.971601963043213,
-0.7412881851196289,
0.9058374762535095,
0.9643188714981079,
-0.7513512372970581,
0.05895944684743881,
0.405619740486145,
-0.3165561556816101,
0.8615228533744812,
-1.0996044874191284,
-0.3624253273010254,
1.1641545295715332,
-0.154044508934021,
-0.6702393889427185,
1.573228120803833,
0.7506139874458313,
-0.9881168603897095,
-0.19492590427398682,
-0.14735224843025208,
-0.8710634708404541,
-0.009533675387501717,
-1.5654869079589844,
-0.23279428482055664,
0.11548791080713272,
-1.4691928625106812,
-0.574882984161377,
-0.23943409323692322,
1.2350045442581177,
-0.17089375853538513,
1.315711498260498,
-0.3460041582584381,
-0.26786670088768005,
-0.38047781586647034,
-0.5186073184013367,
0.14888164401054382,
-0.29425865411758423,
-0.6630233526229858,
0.2986936867237091,
-0.8366052508354187,
0.3333108723163605,
1.446211338043213,
0.4514022171497345,
0.1334807574748993,
0.5006515979766846,
1.0510878562927246,
0.3691415786743164,
-0.031131010502576828,
-0.8507253527641296,
-1.6717053651809692,
2.069162607192993,
-1.4449125528335571,
1.9930106401443481,
0.7578311562538147,
-0.06251702457666397,
-1.7822906970977783,
-1.8660938739776611,
1.3714892864227295,
1.1468569040298462,
2.354633331298828,
0.5389140248298645,
0.2341282069683075,
-0.8530660271644592,
-0.7203620076179504,
0.3566208481788635,
-0.9982423782348633,
-0.7691278457641602,
0.022275324910879135,
2.298866033554077,
1.8284931182861328,
-0.5174638628959656,
-0.24047842621803284,
-1.0195375680923462,
1.2857369184494019,
-0.19758006930351257,
0.22539588809013367,
2.0229923725128174,
-0.2240656316280365,
-1.0337592363357544,
1.2602447271347046,
-2.274285316467285,
0.1644274890422821,
2.04651141166687,
0.336466521024704,
0.1579815149307251,
-1.5312288999557495,
-0.722125232219696,
-0.29183876514434814,
-0.4090920090675354,
-1.1748557090759277,
0.6000164747238159,
-0.3723144829273224,
-0.8943966031074524,
-1.426086664199829,
0.013321513310074806,
-1.223966360092163,
-1.650974154472351,
0.3926064968109131,
1.8497369289398193,
2.0103766918182373,
-0.6535860896110535,
1.5199731588363647,
-0.17966404557228088,
0.08310838043689728,
1.2921316623687744,
1.2958378791809082,
3.1846885681152344,
1.8117762804031372,
-1.208213210105896,
0.648321807384491,
-0.1823374330997467,
-0.44618067145347595,
1.2606323957443237,
-1.0275365114212036,
1.253963828086853,
-0.23562371730804443,
-1.1738395690917969,
-1.2292572259902954,
1.0446770191192627,
0.4965567886829376,
0.039560917764902115,
-0.6482038497924805,
1.2331006526947021,
-0.0541454516351223,
1.2360059022903442,
0.537037193775177,
-0.49450361728668213,
0.4184962213039398,
-0.40193840861320496,
-0.6057844161987305,
1.481735348701477,
0.16845202445983887,
-1.5912095308303833,
-2.269167184829712,
-0.1687149703502655,
-0.8319933414459229,
-0.03192263841629028,
-0.6145003437995911,
-1.0202761888504028,
1.6958945989608765,
0.40816354751586914,
-1.290419101715088,
-0.2988668978214264,
-0.30974718928337097,
-0.6224390268325806,
2.631504774093628,
-1.3445857763290405,
-0.1958482265472412,
-0.9966089725494385,
-0.44618573784828186,
1.5836495161056519,
-1.3275798559188843,
-0.20581895112991333,
-0.9373260140419006,
-0.749764621257782,
-1.3223141431808472,
-0.46034669876098633,
-0.027759548276662827,
-0.957377016544342,
0.7700053453445435,
0.04085768014192581,
-0.9070884585380554,
-0.15328961610794067,
-0.8982872366905212,
0.8908981084823608,
-0.07299299538135529,
0.23266395926475525,
1.9852761030197144,
0.46327489614486694,
-0.43087419867515564,
0.6210551857948303,
1.2105010747909546,
0.6912835240364075,
-0.7216804623603821,
0.1864292323589325,
-0.6454706788063049,
0.2853185832500458,
-1.3856204748153687,
0.31769710779190063,
-2.905209541320801,
0.6412433385848999,
0.015534885227680206,
-0.1076369360089302,
0.07962800562381744,
-1.2095221281051636,
1.1179670095443726,
2.522566080093384,
-1.1646995544433594,
0.39715731143951416,
0.3402753472328186,
1.1894395351409912,
-1.5930923223495483,
0.3610649108886719,
-0.4009464681148529,
2.093416929244995,
0.16496771574020386,
1.1149715185165405,
-0.48039954900741577,
-2.172992706298828,
0.6846081018447876,
-1.240160584449768,
-1.0131124258041382,
0.731917142868042,
-0.8836051225662231,
0.19300958514213562,
-1.503498911857605,
-0.06623730063438416,
-0.9222906827926636,
-1.2126381397247314,
0.7742484211921692,
0.10898876190185547,
0.3833860456943512,
-0.5279713869094849,
0.3275073766708374,
-2.061594009399414,
-1.3772164583206177,
-0.20631647109985352,
-0.9399855136871338,
0.634829044342041,
-0.30789899826049805,
0.5623932480812073,
-0.09812185913324356,
0.1698419451713562,
0.3051982522010803,
1.3698420524597168,
3.4496235847473145,
0.2759469151496887,
0.4013318121433258,
-0.052317067980766296,
-0.979306697845459,
1.3916727304458618,
1.0373144149780273,
-0.08337580412626266,
-0.6590374708175659,
-0.9863152503967285,
1.4312950372695923,
1.9797921180725098,
1.0774312019348145,
0.15660274028778076,
-0.8560620546340942,
-0.8227075338363647,
0.03330431878566742,
0.2274506688117981,
0.4707235097885132,
0.9104066491127014,
-0.025456242263317108,
0.14558902382850647,
1.5014803409576416,
1.334342360496521,
-0.3147697448730469,
0.34634438157081604,
-0.888579249382019,
-0.4026525020599365,
0.45138728618621826,
0.34822797775268555,
0.0278472863137722,
0.5195053219795227,
-1.0041171312332153,
-0.2819284498691559,
-0.38342732191085815,
-0.9567447900772095,
-0.5891919732093811,
-0.5340838432312012,
-0.4085372984409332,
1.615247130393982,
0.06180349737405777,
-0.46178433299064636,
-0.07730758190155029,
-0.8145142197608948,
-0.20740261673927307,
-1.1331082582473755,
0.29868412017822266,
-0.05245218798518181,
-0.112173892557621,
-0.1525323987007141,
1.7252488136291504,
-0.998346209526062,
-2.177940845489502,
0.2393224537372589,
0.21424061059951782,
-0.4570462107658386,
0.16318005323410034,
1.6021924018859863,
0.43626993894577026,
1.376196265220642,
1.3513118028640747,
0.8914902806282043,
-0.6247500777244568,
-1.2718734741210938,
0.6173898577690125,
0.9599847793579102,
-1.4118250608444214,
1.0178717374801636,
-0.1345738172531128,
-0.5791887044906616,
0.7957680225372314,
1.3068755865097046,
0.335216760635376,
-1.8221640586853027,
0.8355703353881836,
-0.7315265536308289,
0.8735009431838989,
0.6583705544471741,
0.7579701542854309,
0.22850137948989868,
0.7992677092552185,
-1.359588623046875,
-1.227839469909668,
-0.8922882676124573,
-0.6212888360023499,
1.92690110206604,
-0.10263287276029587,
0.47031375765800476,
-0.1871255338191986,
-1.255771517753601,
-0.19195085763931274,
0.6933591365814209,
0.4018784165382385,
-0.3978496789932251,
0.9259902834892273,
-0.7512731552124023,
-1.1398369073867798,
-1.4229744672775269,
-0.5150306820869446,
-0.8769623041152954,
-0.8117473721504211,
1.1198010444641113,
0.8509284257888794,
0.3347918689250946,
1.9721142053604126,
0.5776166915893555,
0.3228764832019806,
-2.621161937713623,
0.9029037356376648,
0.2826053500175476,
0.0001786043867468834,
0.8676154017448425,
0.2629380524158478,
1.091821312904358,
-0.043730832636356354,
0.5190095901489258,
-2.2630081176757812,
2.1605148315429688,
-0.27336615324020386,
0.684622585773468,
-0.05247989296913147,
-0.21228235960006714,
1.1538140773773193,
0.5465193390846252,
0.6623567342758179,
-1.2114990949630737,
0.7422424554824829,
-0.47304248809814453,
1.0751235485076904,
0.8887964487075806,
-0.8097584843635559,
-0.02453797124326229,
1.395897626876831,
0.5295971035957336,
-0.45819926261901855,
-0.8431140780448914,
-0.8039342164993286,
0.8679179549217224,
1.7753593921661377,
0.005373208783566952,
0.017494257539510727,
0.9145316481590271,
0.5683104395866394,
-1.310471534729004,
0.13378861546516418,
-0.7127208113670349,
-0.6307961940765381,
1.6107802391052246,
2.0453312397003174,
-0.022451773285865784,
-0.10771992057561874,
-0.7227950692176819,
-1.1534749269485474,
0.6509301662445068,
-0.03181144595146179,
0.13155561685562134,
0.6186927556991577,
-0.6264792680740356,
1.0650287866592407,
0.8563108444213867,
1.0277976989746094,
-0.116121806204319,
0.37748458981513977,
0.4715551435947418,
-0.3655041754245758,
-1.1916162967681885,
-0.4419948160648346,
-1.1012940406799316,
-2.537935495376587,
0.482639878988266,
-0.29665181040763855,
-1.5140987634658813,
0.0043989503756165504,
-1.070594072341919,
0.9729558825492859,
-0.5840118527412415,
-1.0209732055664062,
-1.4587376117706299,
0.25791704654693604,
-0.19418582320213318,
0.8567774891853333,
-1.595345139503479,
-0.15154650807380676,
1.2433079481124878,
0.8443040251731873,
-0.5483576655387878,
0.9896976947784424,
0.23557251691818237,
1.027532696723938,
0.8444134593009949,
-0.4877482056617737,
0.39637497067451477,
0.22838440537452698,
-1.4236571788787842,
0.3959263563156128,
1.0874674320220947,
0.18612077832221985,
1.2847213745117188,
-0.480197548866272,
0.1259905993938446,
0.4874938130378723,
-0.5904521346092224,
-0.3431980311870575,
-0.5359162092208862,
0.8370897173881531,
0.0855925977230072,
-0.9816103577613831,
-0.03328706696629524,
-0.15678837895393372,
-0.2661159336566925,
0.1919769048690796,
-1.501412034034729,
-0.3697274923324585,
-0.3844650387763977,
-0.4862101674079895,
-1.3243829011917114,
-0.014730921946465969,
1.3247566223144531,
-0.7696343064308167,
-0.17469820380210876,
0.5128952264785767,
0.4420853555202484,
0.5674629211425781,
0.698327362537384,
-0.6084156036376953,
-0.2662525773048401,
-0.3398273289203644,
-0.38245540857315063,
0.20877858996391296,
1.2305715084075928,
-0.2141578197479248,
-0.9714023470878601,
0.7793397903442383,
-0.3347925543785095,
0.0782293751835823,
1.9730654954910278,
0.02287512645125389,
-0.7630298733711243,
0.41968315839767456,
-0.6716322898864746,
1.937997579574585,
1.727048397064209,
1.3777216672897339,
-0.09615686535835266,
-0.8480430841445923,
0.5134549140930176,
-0.21243059635162354,
-0.3628416359424591,
0.8869357109069824,
0.5109081864356995,
-0.19029295444488525,
-1.390116572380066,
0.5325571298599243,
1.2487266063690186,
-1.0005894899368286,
-0.7144659161567688,
0.06295134127140045,
-0.8445656299591064,
1.0472050905227661,
0.7495337724685669,
0.44467654824256897,
0.24583566188812256,
1.6134402751922607,
0.6085273027420044,
-0.5918019413948059,
0.44207996129989624,
0.4965575039386749,
-0.10827673226594925,
-2.0140633583068848,
-0.9218010306358337,
0.3142612874507904,
-0.4169343411922455,
-1.5522619485855103,
1.2646147012710571,
-1.1653786897659302,
-0.8337105512619019,
0.5134279727935791,
0.10521231591701508,
1.4300013780593872,
0.33134427666664124,
1.6674503087997437,
2.1252939701080322,
0.7404718995094299,
0.24619320034980774,
1.316699743270874,
-0.010077916085720062,
-0.4353561997413635,
1.8991639614105225,
-0.3412265479564667,
0.6486939787864685,
0.9963200688362122,
-0.40085840225219727,
-1.0169830322265625,
-0.6783337593078613,
-1.1631312370300293,
-0.5836125016212463,
1.1564658880233765,
0.09933914989233017,
-1.1034767627716064,
0.13940054178237915,
1.6175929307937622,
0.12094961851835251,
-0.2804628610610962,
0.5223063230514526,
0.47718653082847595,
-0.6647478938102722,
-0.15967512130737305,
-1.0068624019622803,
0.5572196841239929,
-0.035400405526161194,
-0.2925302982330322,
0.3470086455345154,
0.3851451575756073,
1.1858229637145996,
-0.05560734122991562,
0.20145156979560852,
1.1828242540359497,
-1.36686110496521,
1.4943509101867676,
-0.650957465171814,
0.21031835675239563,
-2.513690233230591,
1.5127829313278198,
-0.759816586971283,
1.942402958869934,
-2.5251803398132324,
0.4026884436607361,
-0.6540032029151917,
-0.5067360401153564,
0.33370667695999146,
-0.3686372637748718,
0.08591174334287643,
-0.12470431625843048,
-1.052350401878357,
0.04282701015472412,
-0.7585238218307495,
0.5841286778450012,
1.2662559747695923,
1.3114155530929565,
-1.1183462142944336,
-0.28648659586906433,
-1.7985252141952515,
-0.18633753061294556,
-0.8620708584785461,
0.3430897891521454,
-2.048548460006714,
-0.11793890595436096,
-1.8743643760681152,
-2.487255096435547,
-1.570622205734253,
-0.8737225532531738,
1.109575629234314,
0.2735328674316406,
-0.9642559885978699,
1.1422239542007446,
-0.3445057272911072,
-1.800568699836731,
0.928345799446106,
-2.1415836811065674
] |
https://github.com/huggingface/datasets/issues/5970 | description disappearing from Info when Uploading a Dataset Created with `from_dict` | Here's a minimal way to reproduce the bug, for the sake of convenience.
````
from datasets import Dataset, DatasetInfo, load_dataset
episodes_dict = {"test":[1,2,3],"test2": [1,2,4]}
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description="test_str")
)
print(hugging_face_dataset.info)
hugging_face_dataset.push_to_hub("balisujohn/minari_test", private=True)
redownloaded_dataset= load_dataset("balisujohn/minari_test")["train"]
print(redownloaded_dataset.info)
````
| ### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 90 | 37 | description disappearing from Info when Uploading a Dataset Created with `from_dict`
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Here's a minimal way to reproduce the bug, for the sake of convenience.
````
from datasets import Dataset, DatasetInfo, load_dataset
episodes_dict = {"test":[1,2,3],"test2": [1,2,4]}
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description="test_str")
)
print(hugging_face_dataset.info)
hugging_face_dataset.push_to_hub("balisujohn/minari_test", private=True)
redownloaded_dataset= load_dataset("balisujohn/minari_test")["train"]
print(redownloaded_dataset.info)
````
| [
-1.1197547912597656,
-0.9006969928741455,
-0.6646706461906433,
1.5309312343597412,
-0.09635613113641739,
-1.2994064092636108,
0.15888339281082153,
-1.0190112590789795,
1.6555839776992798,
-0.7660810947418213,
0.31741446256637573,
-1.616299033164978,
0.01939825341105461,
-0.5953345894813538,
-0.6892465949058533,
-0.8689283132553101,
-0.36132490634918213,
-0.7762224674224854,
1.0641694068908691,
2.4189157485961914,
1.2432196140289307,
-1.2866337299346924,
2.666778326034546,
0.7132063508033752,
-0.3181259036064148,
-0.984214723110199,
0.5201334953308105,
-0.007246213499456644,
-1.2216295003890991,
-0.4853174686431885,
-0.8750953674316406,
-0.12062232196331024,
-0.5529861450195312,
-0.4604030251502991,
-0.010207791812717915,
0.5414740443229675,
-0.34738457202911377,
-0.46248769760131836,
-0.6318086385726929,
-0.7534525394439697,
0.5162943005561829,
-0.31292128562927246,
0.9010441899299622,
-0.3489897847175598,
1.8093897104263306,
-0.677156925201416,
0.423164427280426,
0.7666544914245605,
1.2933839559555054,
0.14474554359912872,
-0.05642179399728775,
0.2643359303474426,
0.34313833713531494,
0.03013969212770462,
0.5365752577781677,
1.1529650688171387,
0.6588956713676453,
0.5640764832496643,
0.7240158319473267,
-2.2352466583251953,
1.3314298391342163,
-0.9771565794944763,
0.28218984603881836,
1.32127046585083,
-0.9274638295173645,
0.3561660051345825,
-1.8328229188919067,
0.011273806914687157,
0.5474156141281128,
-2.2121341228485107,
0.31222003698349,
-1.3702270984649658,
-0.4989938735961914,
0.9667088389396667,
0.32671988010406494,
-1.1928313970565796,
0.15523624420166016,
-0.42478054761886597,
1.058548927307129,
0.48092103004455566,
0.9952688217163086,
-1.7165929079055786,
-0.11025755107402802,
-0.2484237402677536,
0.14165253937244415,
-1.333284616470337,
-1.62495756149292,
0.5822303295135498,
0.6568464040756226,
0.6739636659622192,
-0.1135675311088562,
1.0589001178741455,
-1.0568183660507202,
0.7531308531761169,
-1.0154856443405151,
-1.7142025232315063,
-1.404956340789795,
-2.2364418506622314,
-2.231335163116455,
0.725699245929718,
-0.49686843156814575,
-0.5130793452262878,
2.080920696258545,
-1.041693091392517,
-1.7205016613006592,
1.0816255807876587,
0.2759963870048523,
0.03734920173883438,
2.375336170196533,
0.2175222486257553,
-0.764385998249054,
0.4760313034057617,
-0.7263823747634888,
0.6953431963920593,
-0.406515896320343,
1.2927559614181519,
0.46259111166000366,
-1.0316616296768188,
1.5461567640304565,
-0.3496376872062683,
0.6326998472213745,
-0.7095138430595398,
-0.5027786493301392,
-0.7997144460678101,
0.28209882974624634,
1.9091814756393433,
-0.3073951005935669,
1.517762303352356,
-0.2861440181732178,
-1.5203323364257812,
-1.5836002826690674,
0.9242998957633972,
0.44298624992370605,
-0.7765561938285828,
0.10338632017374039,
-0.5427218079566956,
0.17576301097869873,
-0.1003970205783844,
1.148270845413208,
1.229180097579956,
0.7688446044921875,
-0.3629607558250427,
-0.8344371318817139,
0.1456567496061325,
-0.05951376631855965,
-0.7175052762031555,
-1.7867138385772705,
-0.2787398099899292,
0.21202468872070312,
0.6026866436004639,
-1.1024073362350464,
1.7716022729873657,
0.8868682980537415,
1.9727551937103271,
1.0296963453292847,
-0.3891027569770813,
1.3889349699020386,
0.04908177629113197,
1.901876449584961,
-0.5476500988006592,
0.6409515738487244,
-0.3926464915275574,
-1.1496607065200806,
0.892864465713501,
-0.3251514434814453,
-2.047274589538574,
-0.7645353674888611,
-0.744652271270752,
-0.13268721103668213,
-0.7605148553848267,
0.9019858241081238,
-0.330516517162323,
-1.4465914964675903,
0.1204347014427185,
-0.696514368057251,
0.21389739215373993,
-1.233221173286438,
0.2687336206436157,
0.7282323241233826,
-0.6175913214683533,
0.032815754413604736,
-0.20811359584331512,
-1.2671135663986206,
-0.5023359060287476,
0.39972102642059326,
1.8881478309631348,
-0.6656264662742615,
0.9411123991012573,
1.0614774227142334,
-0.7001334428787231,
0.09718712419271469,
0.31925880908966064,
-0.27218031883239746,
0.7527816891670227,
-1.059532642364502,
-0.4546544551849365,
1.2383226156234741,
-0.24034945666790009,
-0.7101535201072693,
1.4860056638717651,
0.7494006752967834,
-1.022665023803711,
-0.24288135766983032,
-0.19608478248119354,
-0.8708084225654602,
0.06547430157661438,
-1.600441575050354,
-0.010189646854996681,
0.490619421005249,
-1.5019501447677612,
-0.3986930251121521,
-0.173346146941185,
1.3310872316360474,
-0.16336709260940552,
1.3683773279190063,
-0.27649104595184326,
-0.13834866881370544,
-0.3437805771827698,
-0.43021059036254883,
0.15515606105327606,
-0.2008606642484665,
-0.6190184354782104,
0.16488267481327057,
-0.7269814014434814,
0.3491916060447693,
1.407191514968872,
0.2689533233642578,
0.05156701058149338,
0.5110460519790649,
1.1510978937149048,
0.26948708295822144,
-0.11917955428361893,
-0.8856248259544373,
-1.5676296949386597,
1.9591342210769653,
-1.421096920967102,
2.0292773246765137,
0.7185197472572327,
-0.06010951101779938,
-1.796425223350525,
-1.9185529947280884,
1.3222161531448364,
1.1009308099746704,
2.3400752544403076,
0.5096915364265442,
0.3957555890083313,
-0.7639061212539673,
-0.6948837041854858,
0.2869737148284912,
-0.9698477983474731,
-0.6927518248558044,
0.15676693618297577,
2.3654425144195557,
1.779374599456787,
-0.4879046678543091,
-0.267073392868042,
-0.9886696338653564,
1.3662409782409668,
-0.1985088586807251,
0.24501551687717438,
2.04764723777771,
-0.24339812994003296,
-1.030314564704895,
1.3082820177078247,
-2.378875970840454,
0.2690374255180359,
2.0541703701019287,
0.24429704248905182,
0.1502343863248825,
-1.3770320415496826,
-0.5896919369697571,
-0.3182358741760254,
-0.4105982184410095,
-1.2779830694198608,
0.4837821125984192,
-0.2565193772315979,
-0.7572225332260132,
-1.3885297775268555,
0.19363273680210114,
-1.1129484176635742,
-1.6859657764434814,
0.29677754640579224,
1.9340834617614746,
1.9576592445373535,
-0.7491100430488586,
1.5317754745483398,
-0.308988094329834,
0.14143502712249756,
1.2591010332107544,
1.2788294553756714,
3.105156660079956,
1.9123287200927734,
-1.2854286432266235,
0.7165496349334717,
-0.2134629487991333,
-0.4849631190299988,
1.2251101732254028,
-1.2585378885269165,
1.1911996603012085,
-0.23290151357650757,
-1.175144910812378,
-1.2269515991210938,
0.9662107229232788,
0.47463691234588623,
0.13287799060344696,
-0.4995238184928894,
1.19442880153656,
0.07648709416389465,
1.388217568397522,
0.6190322041511536,
-0.4314308762550354,
0.6132185459136963,
-0.3599613308906555,
-0.4850243330001831,
1.5571844577789307,
0.21016864478588104,
-1.4158722162246704,
-2.276189088821411,
-0.225283682346344,
-0.8672033548355103,
0.040028270334005356,
-0.6948484778404236,
-0.9857825040817261,
1.645281434059143,
0.32622992992401123,
-1.3037852048873901,
-0.25336167216300964,
-0.2777408957481384,
-0.5200467109680176,
2.74230694770813,
-1.374255895614624,
-0.1814136654138565,
-1.096256971359253,
-0.6589963436126709,
1.6787621974945068,
-1.2379415035247803,
-0.2777426242828369,
-1.04534113407135,
-0.5488131046295166,
-1.2269413471221924,
-0.459964394569397,
-0.005310351494699717,
-0.9964407682418823,
0.8339274525642395,
0.1823568046092987,
-1.2250081300735474,
-0.3776911497116089,
-0.860097348690033,
1.0187156200408936,
-0.1726693958044052,
0.17187827825546265,
1.796709656715393,
0.3452370762825012,
-0.42130643129348755,
0.8116374015808105,
1.1005196571350098,
0.6355893015861511,
-0.6750796437263489,
0.1740475744009018,
-0.653327226638794,
0.31109297275543213,
-1.3434500694274902,
0.30885380506515503,
-2.8091564178466797,
0.6751301884651184,
-0.07751749455928802,
-0.06260855495929718,
-0.055305205285549164,
-1.3953850269317627,
1.0552865266799927,
2.6196813583374023,
-1.1631594896316528,
0.4893590211868286,
0.32934999465942383,
1.155110239982605,
-1.627637505531311,
0.3115648627281189,
-0.49223560094833374,
2.0386972427368164,
0.12078766524791718,
1.25899338722229,
-0.40369242429733276,
-2.2956464290618896,
0.5756064653396606,
-1.2965519428253174,
-1.112300992012024,
0.8182899951934814,
-0.8816011548042297,
0.16395354270935059,
-1.3592324256896973,
-0.23128454387187958,
-1.002353310585022,
-1.2321772575378418,
0.6921364068984985,
0.1740039885044098,
0.40102314949035645,
-0.6082146763801575,
0.34523266553878784,
-2.2195897102355957,
-1.3529824018478394,
-0.26053810119628906,
-1.0282745361328125,
0.5343649387359619,
-0.4096844792366028,
0.6522158980369568,
-0.1219940036535263,
0.04958205670118332,
0.34334510564804077,
1.5524436235427856,
3.3644912242889404,
0.1627993881702423,
0.24110610783100128,
-0.18823564052581787,
-0.9800251722335815,
1.4433796405792236,
0.9014419913291931,
-0.06154465675354004,
-0.6361417174339294,
-0.996522068977356,
1.1949691772460938,
2.033656358718872,
1.0383150577545166,
-0.0302718635648489,
-0.8349120020866394,
-0.8045149445533752,
0.01173466257750988,
0.1916125863790512,
0.4253707528114319,
0.91758131980896,
0.09652569890022278,
0.09048730134963989,
1.3556264638900757,
1.1435050964355469,
-0.35340416431427,
0.3694658875465393,
-0.8374081254005432,
-0.3859206438064575,
0.49331700801849365,
0.31792348623275757,
0.00507387425750494,
0.35787826776504517,
-1.0380234718322754,
-0.22308841347694397,
-0.36877650022506714,
-0.837015688419342,
-0.8218191266059875,
-0.449815034866333,
-0.40061241388320923,
1.6407440900802612,
0.05792748183012009,
-0.5180035829544067,
-0.0362488329410553,
-0.6490139961242676,
-0.11715513467788696,
-1.0857516527175903,
0.2732470631599426,
-0.14889782667160034,
-0.10859277844429016,
-0.11360040307044983,
1.5962198972702026,
-0.9651179909706116,
-2.0582849979400635,
0.23081286251544952,
0.22126084566116333,
-0.27513301372528076,
0.17672720551490784,
1.7428004741668701,
0.4945152997970581,
1.3695186376571655,
1.3956620693206787,
1.0092755556106567,
-0.7475060224533081,
-1.29470956325531,
0.7118685841560364,
0.9481641054153442,
-1.3851855993270874,
0.8663760423660278,
-0.05966860428452492,
-0.5404493808746338,
0.6452904343605042,
1.3192919492721558,
0.5044515132904053,
-1.983285903930664,
0.7507719993591309,
-1.0824323892593384,
0.7492348551750183,
0.7393615245819092,
0.7082449197769165,
0.2209697663784027,
0.8925477862358093,
-1.1753029823303223,
-1.110190510749817,
-0.6359038352966309,
-0.7124530076980591,
1.8962303400039673,
-0.28494173288345337,
0.6102598309516907,
-0.12307970970869064,
-1.2931044101715088,
-0.12063882499933243,
0.8427798748016357,
0.4393162727355957,
-0.5388510227203369,
0.7928356528282166,
-0.6601504683494568,
-1.0209109783172607,
-1.1575902700424194,
-0.45187807083129883,
-1.0302982330322266,
-0.902474582195282,
1.0389809608459473,
0.8009462356567383,
0.37291204929351807,
1.8803108930587769,
0.6882680654525757,
0.38622862100601196,
-2.6166253089904785,
0.8691647052764893,
0.3441607356071472,
-0.1268153041601181,
0.8135260343551636,
0.3359612226486206,
1.071998119354248,
0.011651022359728813,
0.6264720559120178,
-2.4184539318084717,
2.319756269454956,
-0.2052799016237259,
0.6453514099121094,
-0.026122137904167175,
-0.24164831638336182,
1.0870132446289062,
0.5030501484870911,
0.535453736782074,
-1.0889296531677246,
0.6995797157287598,
-0.5657982230186462,
1.179263949394226,
0.783516526222229,
-0.8676024675369263,
0.020382264629006386,
1.3984495401382446,
0.4363868832588196,
-0.5934534072875977,
-0.9751476645469666,
-0.9520360827445984,
0.8951727151870728,
1.7017711400985718,
-0.07744046300649643,
-0.0009199660271406174,
0.916189968585968,
0.6780791282653809,
-1.2000949382781982,
0.07086446136236191,
-0.6854293942451477,
-0.716391384601593,
1.6723644733428955,
2.05981183052063,
-0.1348681002855301,
-0.11140333861112595,
-0.824215829372406,
-1.192379117012024,
0.8047267198562622,
0.005804358050227165,
0.0006012413650751114,
0.5899715423583984,
-0.589651346206665,
1.0528829097747803,
0.7653383016586304,
1.024472713470459,
0.11033859848976135,
0.3189469575881958,
0.4708828926086426,
-0.3965635299682617,
-1.1769393682479858,
-0.28957825899124146,
-1.1237431764602661,
-2.5464096069335938,
0.4611457586288452,
-0.20912468433380127,
-1.4658604860305786,
0.06737983971834183,
-1.0515447854995728,
0.886747419834137,
-0.6284857392311096,
-1.1345633268356323,
-1.4769090414047241,
0.2568877935409546,
-0.13120624423027039,
0.8816968202590942,
-1.6612610816955566,
-0.14712144434452057,
1.1627360582351685,
0.8441925048828125,
-0.6793007254600525,
0.8845709562301636,
0.17702127993106842,
0.9940072298049927,
0.8954969048500061,
-0.3534766435623169,
0.5885148048400879,
0.04388527199625969,
-1.313787817955017,
0.5285460352897644,
1.2428117990493774,
0.15125532448291779,
1.4082989692687988,
-0.46006613969802856,
-0.007600134238600731,
0.4354698657989502,
-0.557892382144928,
-0.41954493522644043,
-0.5526222586631775,
0.7255339622497559,
0.05630883574485779,
-0.8914698958396912,
0.014031507074832916,
-0.053877897560596466,
-0.2546592056751251,
0.23347310721874237,
-1.5215370655059814,
-0.20828483998775482,
-0.39873361587524414,
-0.6355276107788086,
-1.2836586236953735,
-0.07688090950250626,
1.4024932384490967,
-0.7586808204650879,
-0.23001104593276978,
0.47067660093307495,
0.3603694438934326,
0.5637772083282471,
0.5873419046401978,
-0.7066757082939148,
-0.24608458578586578,
-0.27115845680236816,
-0.3652178645133972,
0.3737252950668335,
1.415742039680481,
-0.0853973999619484,
-0.9703449606895447,
0.7264295816421509,
-0.3743121027946472,
0.10482019186019897,
2.0084502696990967,
0.09680194407701492,
-0.7937962412834167,
0.30802929401397705,
-0.7015296220779419,
1.8723739385604858,
1.7695631980895996,
1.314774990081787,
-0.16235826909542084,
-0.9806545972824097,
0.6011756658554077,
-0.3750879764556885,
-0.3664082884788513,
0.8599615097045898,
0.3328142762184143,
-0.33035576343536377,
-1.3913624286651611,
0.8126917481422424,
1.291076898574829,
-0.8066293001174927,
-0.7980605959892273,
0.12926539778709412,
-0.7978423237800598,
1.1851876974105835,
0.5753217339515686,
0.3549042344093323,
0.283743679523468,
1.5843114852905273,
0.7310979962348938,
-0.4044346809387207,
0.5160126090049744,
0.5274491906166077,
-0.26260262727737427,
-2.1311838626861572,
-1.0872567892074585,
0.41072577238082886,
-0.5202569365501404,
-1.6081080436706543,
1.3918836116790771,
-1.158003568649292,
-1.0065456628799438,
0.5186852812767029,
0.09324858337640762,
1.3997225761413574,
0.3618488907814026,
1.624122977256775,
2.098376512527466,
0.8663557767868042,
0.5097835063934326,
1.2312378883361816,
-0.1983702927827835,
-0.5059031844139099,
1.75566565990448,
-0.44916170835494995,
0.5085096955299377,
1.089052677154541,
-0.3598743677139282,
-1.1579723358154297,
-0.8120644092559814,
-1.1870678663253784,
-0.686460554599762,
1.2631429433822632,
0.10557639598846436,
-1.069525957107544,
0.2943407893180847,
1.5774439573287964,
0.09061319380998611,
-0.20684371888637543,
0.7673436403274536,
0.3752950429916382,
-0.7828859686851501,
-0.1227002963423729,
-0.8634330034255981,
0.5161378383636475,
-0.19270654022693634,
-0.28480106592178345,
0.33993685245513916,
0.5311934351921082,
1.2499271631240845,
-0.03677446395158768,
0.1152769923210144,
1.1262056827545166,
-1.4315450191497803,
1.4771497249603271,
-0.697196364402771,
0.30377525091171265,
-2.4574978351593018,
1.3920058012008667,
-0.7534664869308472,
1.924708604812622,
-2.5976345539093018,
0.4414592981338501,
-0.5788370966911316,
-0.5269114375114441,
0.2126719057559967,
-0.3061904311180115,
0.034641608595848083,
-0.1760452836751938,
-1.0676392316818237,
-0.05936719849705696,
-0.7199799418449402,
0.64410400390625,
1.1028456687927246,
1.4070103168487549,
-1.092431664466858,
-0.20669808983802795,
-1.7408952713012695,
-0.20448680222034454,
-0.7230970859527588,
0.3162422776222229,
-1.993825912475586,
-0.12675264477729797,
-2.060204029083252,
-2.3318610191345215,
-1.3008747100830078,
-0.8620014190673828,
1.0914735794067383,
0.18766196072101593,
-0.8502678871154785,
1.1916853189468384,
-0.36745160818099976,
-1.9079457521438599,
1.186323881149292,
-2.1843457221984863
] |
https://github.com/huggingface/datasets/issues/5970 | description disappearing from Info when Uploading a Dataset Created with `from_dict` | Thanks for reporting !
For now I would recommend uploading a separate JSON file for your metadata.
Alternatively you can upload a second configuration of the dataset containing your metadata but this feature is not released yet (though you can already use it from [here](https://github.com/huggingface/datasets/pull/5331), it will be released soon) | ### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
| 90 | 50 | description disappearing from Info when Uploading a Dataset Created with `from_dict`
### Describe the bug
When uploading a dataset created locally using `from_dict` with a specified `description` field. It appears before upload, but is missing after upload and re-download.
### Steps to reproduce the bug
I think the most relevant pattern in the code might be the following lines:
```
description_json_str = json.dumps(
{
"dataset_id": dataset.spec.dataset_id,
"env_name": dataset.spec.env_spec.id,
"action_space": serialize_space(dataset.spec.action_space),
"observation_space": serialize_space(dataset.spec.observation_space),
}
)
hugging_face_dataset = Dataset.from_dict(
episodes_dict, info=DatasetInfo(description=description_json_str)
)
```
Which comes from this function https://github.com/balisujohn/minarai/blob/8e023727f0a8488c4451651d9f7a79b981412c40/minari/integrations/hugging_face.py#L39
To replicate,
clone this branch of my Minari fork https://github.com/balisujohn/minarai/tree/dev-huggingface then run
```
python3.8 -m venv env
source env/bin/activate
python3 -m pip install -e .
python3 -m pip install pytest
```
The change the hugging face repo path in the test called `test_hugging_face_push_and_pull_dataset` in `tests/integrations/test_hugging_face.py` to one you have permissions to write to.
Then run:
```
pytest tests/integrations/test_hugging_face.py::test_hugging_face_push_and_pull_dataset
```
### Expected behavior
DATASET INFO BEFORE UPLOADING
DatasetInfo(description='{"dataset_id": "dummy-combo-test-v0", "env_name": "DummyComboEnv-v0", "action_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}]}", "observation_space": "{\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"component_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [-1.0], \\"high\\": [1.0]}, \\"component_2\\": {\\"type\\": \\"Dict\\", \\"subspaces\\": {\\"subcomponent_1\\": {\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [2.0], \\"high\\": [3.0]}, \\"subcomponent_2\\": {\\"type\\": \\"Tuple\\", \\"subspaces\\": [{\\"type\\": \\"Box\\", \\"dtype\\": \\"float32\\", \\"shape\\": [1], \\"low\\": [4.0], \\"high\\": [5.0]}, {\\"type\\": \\"Discrete\\", \\"dtype\\": \\"int64\\", \\"start\\": 0, \\"n\\": 10}]}}}}}]}]}"}', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits=None, download_checksums=None, download_size=None, post_processing_size=None, dataset_size=None, size_in_bytes=None)
...
DATASET INFO AFTER UPLOADING AND DOWNLOADING
DatasetInfo(description='', citation='', homepage='', license='', features={'observations': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': {'component_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'component_2': {'subcomponent_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), 'subcomponent_2': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Value(dtype='int64', id=None)}}}}}, 'actions': {'_index_0': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None), '_index_1': Sequence(feature=Value(dtype='float32', id=None), length=-1, id=None)}, 'rewards': Value(dtype='int64', id=None), 'truncations': Value(dtype='bool', id=None), 'terminations': Value(dtype='bool', id=None), 'episode_ids': Value(dtype='int64', id=None)}, post_processed=None, supervised_keys=None, task_templates=None, builder_name=None, config_name=None, version=None, splits={'train': SplitInfo(name='train', num_bytes=4846, num_examples=60, shard_lengths=None, dataset_name='parquet')}, download_checksums={'https://huggingface.co/datasets/balisujohn/minari_test/resolve/8217b614ff9ba5edc1a30c7df430e92a46f65363/data/train-00000-of-00001-7c5900b93b35745e.parquet': {'num_bytes': 9052, 'checksum': None}}, download_size=9052, post_processing_size=None, dataset_size=4846, size_in_bytes=13898)
...
### Environment info
- `datasets` version: 2.13.0
- Platform: Linux-5.15.0-75-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.1
- Pandas version: 2.0.2
Thanks for reporting !
For now I would recommend uploading a separate JSON file for your metadata.
Alternatively you can upload a second configuration of the dataset containing your metadata but this feature is not released yet (though you can already use it from [here](https://github.com/huggingface/datasets/pull/5331), it will be released soon) | [
-1.1197547912597656,
-0.9006969928741455,
-0.6646706461906433,
1.5309312343597412,
-0.09635613113641739,
-1.2994064092636108,
0.15888339281082153,
-1.0190112590789795,
1.6555839776992798,
-0.7660810947418213,
0.31741446256637573,
-1.616299033164978,
0.01939825341105461,
-0.5953345894813538,
-0.6892465949058533,
-0.8689283132553101,
-0.36132490634918213,
-0.7762224674224854,
1.0641694068908691,
2.4189157485961914,
1.2432196140289307,
-1.2866337299346924,
2.666778326034546,
0.7132063508033752,
-0.3181259036064148,
-0.984214723110199,
0.5201334953308105,
-0.007246213499456644,
-1.2216295003890991,
-0.4853174686431885,
-0.8750953674316406,
-0.12062232196331024,
-0.5529861450195312,
-0.4604030251502991,
-0.010207791812717915,
0.5414740443229675,
-0.34738457202911377,
-0.46248769760131836,
-0.6318086385726929,
-0.7534525394439697,
0.5162943005561829,
-0.31292128562927246,
0.9010441899299622,
-0.3489897847175598,
1.8093897104263306,
-0.677156925201416,
0.423164427280426,
0.7666544914245605,
1.2933839559555054,
0.14474554359912872,
-0.05642179399728775,
0.2643359303474426,
0.34313833713531494,
0.03013969212770462,
0.5365752577781677,
1.1529650688171387,
0.6588956713676453,
0.5640764832496643,
0.7240158319473267,
-2.2352466583251953,
1.3314298391342163,
-0.9771565794944763,
0.28218984603881836,
1.32127046585083,
-0.9274638295173645,
0.3561660051345825,
-1.8328229188919067,
0.011273806914687157,
0.5474156141281128,
-2.2121341228485107,
0.31222003698349,
-1.3702270984649658,
-0.4989938735961914,
0.9667088389396667,
0.32671988010406494,
-1.1928313970565796,
0.15523624420166016,
-0.42478054761886597,
1.058548927307129,
0.48092103004455566,
0.9952688217163086,
-1.7165929079055786,
-0.11025755107402802,
-0.2484237402677536,
0.14165253937244415,
-1.333284616470337,
-1.62495756149292,
0.5822303295135498,
0.6568464040756226,
0.6739636659622192,
-0.1135675311088562,
1.0589001178741455,
-1.0568183660507202,
0.7531308531761169,
-1.0154856443405151,
-1.7142025232315063,
-1.404956340789795,
-2.2364418506622314,
-2.231335163116455,
0.725699245929718,
-0.49686843156814575,
-0.5130793452262878,
2.080920696258545,
-1.041693091392517,
-1.7205016613006592,
1.0816255807876587,
0.2759963870048523,
0.03734920173883438,
2.375336170196533,
0.2175222486257553,
-0.764385998249054,
0.4760313034057617,
-0.7263823747634888,
0.6953431963920593,
-0.406515896320343,
1.2927559614181519,
0.46259111166000366,
-1.0316616296768188,
1.5461567640304565,
-0.3496376872062683,
0.6326998472213745,
-0.7095138430595398,
-0.5027786493301392,
-0.7997144460678101,
0.28209882974624634,
1.9091814756393433,
-0.3073951005935669,
1.517762303352356,
-0.2861440181732178,
-1.5203323364257812,
-1.5836002826690674,
0.9242998957633972,
0.44298624992370605,
-0.7765561938285828,
0.10338632017374039,
-0.5427218079566956,
0.17576301097869873,
-0.1003970205783844,
1.148270845413208,
1.229180097579956,
0.7688446044921875,
-0.3629607558250427,
-0.8344371318817139,
0.1456567496061325,
-0.05951376631855965,
-0.7175052762031555,
-1.7867138385772705,
-0.2787398099899292,
0.21202468872070312,
0.6026866436004639,
-1.1024073362350464,
1.7716022729873657,
0.8868682980537415,
1.9727551937103271,
1.0296963453292847,
-0.3891027569770813,
1.3889349699020386,
0.04908177629113197,
1.901876449584961,
-0.5476500988006592,
0.6409515738487244,
-0.3926464915275574,
-1.1496607065200806,
0.892864465713501,
-0.3251514434814453,
-2.047274589538574,
-0.7645353674888611,
-0.744652271270752,
-0.13268721103668213,
-0.7605148553848267,
0.9019858241081238,
-0.330516517162323,
-1.4465914964675903,
0.1204347014427185,
-0.696514368057251,
0.21389739215373993,
-1.233221173286438,
0.2687336206436157,
0.7282323241233826,
-0.6175913214683533,
0.032815754413604736,
-0.20811359584331512,
-1.2671135663986206,
-0.5023359060287476,
0.39972102642059326,
1.8881478309631348,
-0.6656264662742615,
0.9411123991012573,
1.0614774227142334,
-0.7001334428787231,
0.09718712419271469,
0.31925880908966064,
-0.27218031883239746,
0.7527816891670227,
-1.059532642364502,
-0.4546544551849365,
1.2383226156234741,
-0.24034945666790009,
-0.7101535201072693,
1.4860056638717651,
0.7494006752967834,
-1.022665023803711,
-0.24288135766983032,
-0.19608478248119354,
-0.8708084225654602,
0.06547430157661438,
-1.600441575050354,
-0.010189646854996681,
0.490619421005249,
-1.5019501447677612,
-0.3986930251121521,
-0.173346146941185,
1.3310872316360474,
-0.16336709260940552,
1.3683773279190063,
-0.27649104595184326,
-0.13834866881370544,
-0.3437805771827698,
-0.43021059036254883,
0.15515606105327606,
-0.2008606642484665,
-0.6190184354782104,
0.16488267481327057,
-0.7269814014434814,
0.3491916060447693,
1.407191514968872,
0.2689533233642578,
0.05156701058149338,
0.5110460519790649,
1.1510978937149048,
0.26948708295822144,
-0.11917955428361893,
-0.8856248259544373,
-1.5676296949386597,
1.9591342210769653,
-1.421096920967102,
2.0292773246765137,
0.7185197472572327,
-0.06010951101779938,
-1.796425223350525,
-1.9185529947280884,
1.3222161531448364,
1.1009308099746704,
2.3400752544403076,
0.5096915364265442,
0.3957555890083313,
-0.7639061212539673,
-0.6948837041854858,
0.2869737148284912,
-0.9698477983474731,
-0.6927518248558044,
0.15676693618297577,
2.3654425144195557,
1.779374599456787,
-0.4879046678543091,
-0.267073392868042,
-0.9886696338653564,
1.3662409782409668,
-0.1985088586807251,
0.24501551687717438,
2.04764723777771,
-0.24339812994003296,
-1.030314564704895,
1.3082820177078247,
-2.378875970840454,
0.2690374255180359,
2.0541703701019287,
0.24429704248905182,
0.1502343863248825,
-1.3770320415496826,
-0.5896919369697571,
-0.3182358741760254,
-0.4105982184410095,
-1.2779830694198608,
0.4837821125984192,
-0.2565193772315979,
-0.7572225332260132,
-1.3885297775268555,
0.19363273680210114,
-1.1129484176635742,
-1.6859657764434814,
0.29677754640579224,
1.9340834617614746,
1.9576592445373535,
-0.7491100430488586,
1.5317754745483398,
-0.308988094329834,
0.14143502712249756,
1.2591010332107544,
1.2788294553756714,
3.105156660079956,
1.9123287200927734,
-1.2854286432266235,
0.7165496349334717,
-0.2134629487991333,
-0.4849631190299988,
1.2251101732254028,
-1.2585378885269165,
1.1911996603012085,
-0.23290151357650757,
-1.175144910812378,
-1.2269515991210938,
0.9662107229232788,
0.47463691234588623,
0.13287799060344696,
-0.4995238184928894,
1.19442880153656,
0.07648709416389465,
1.388217568397522,
0.6190322041511536,
-0.4314308762550354,
0.6132185459136963,
-0.3599613308906555,
-0.4850243330001831,
1.5571844577789307,
0.21016864478588104,
-1.4158722162246704,
-2.276189088821411,
-0.225283682346344,
-0.8672033548355103,
0.040028270334005356,
-0.6948484778404236,
-0.9857825040817261,
1.645281434059143,
0.32622992992401123,
-1.3037852048873901,
-0.25336167216300964,
-0.2777408957481384,
-0.5200467109680176,
2.74230694770813,
-1.374255895614624,
-0.1814136654138565,
-1.096256971359253,
-0.6589963436126709,
1.6787621974945068,
-1.2379415035247803,
-0.2777426242828369,
-1.04534113407135,
-0.5488131046295166,
-1.2269413471221924,
-0.459964394569397,
-0.005310351494699717,
-0.9964407682418823,
0.8339274525642395,
0.1823568046092987,
-1.2250081300735474,
-0.3776911497116089,
-0.860097348690033,
1.0187156200408936,
-0.1726693958044052,
0.17187827825546265,
1.796709656715393,
0.3452370762825012,
-0.42130643129348755,
0.8116374015808105,
1.1005196571350098,
0.6355893015861511,
-0.6750796437263489,
0.1740475744009018,
-0.653327226638794,
0.31109297275543213,
-1.3434500694274902,
0.30885380506515503,
-2.8091564178466797,
0.6751301884651184,
-0.07751749455928802,
-0.06260855495929718,
-0.055305205285549164,
-1.3953850269317627,
1.0552865266799927,
2.6196813583374023,
-1.1631594896316528,
0.4893590211868286,
0.32934999465942383,
1.155110239982605,
-1.627637505531311,
0.3115648627281189,
-0.49223560094833374,
2.0386972427368164,
0.12078766524791718,
1.25899338722229,
-0.40369242429733276,
-2.2956464290618896,
0.5756064653396606,
-1.2965519428253174,
-1.112300992012024,
0.8182899951934814,
-0.8816011548042297,
0.16395354270935059,
-1.3592324256896973,
-0.23128454387187958,
-1.002353310585022,
-1.2321772575378418,
0.6921364068984985,
0.1740039885044098,
0.40102314949035645,
-0.6082146763801575,
0.34523266553878784,
-2.2195897102355957,
-1.3529824018478394,
-0.26053810119628906,
-1.0282745361328125,
0.5343649387359619,
-0.4096844792366028,
0.6522158980369568,
-0.1219940036535263,
0.04958205670118332,
0.34334510564804077,
1.5524436235427856,
3.3644912242889404,
0.1627993881702423,
0.24110610783100128,
-0.18823564052581787,
-0.9800251722335815,
1.4433796405792236,
0.9014419913291931,
-0.06154465675354004,
-0.6361417174339294,
-0.996522068977356,
1.1949691772460938,
2.033656358718872,
1.0383150577545166,
-0.0302718635648489,
-0.8349120020866394,
-0.8045149445533752,
0.01173466257750988,
0.1916125863790512,
0.4253707528114319,
0.91758131980896,
0.09652569890022278,
0.09048730134963989,
1.3556264638900757,
1.1435050964355469,
-0.35340416431427,
0.3694658875465393,
-0.8374081254005432,
-0.3859206438064575,
0.49331700801849365,
0.31792348623275757,
0.00507387425750494,
0.35787826776504517,
-1.0380234718322754,
-0.22308841347694397,
-0.36877650022506714,
-0.837015688419342,
-0.8218191266059875,
-0.449815034866333,
-0.40061241388320923,
1.6407440900802612,
0.05792748183012009,
-0.5180035829544067,
-0.0362488329410553,
-0.6490139961242676,
-0.11715513467788696,
-1.0857516527175903,
0.2732470631599426,
-0.14889782667160034,
-0.10859277844429016,
-0.11360040307044983,
1.5962198972702026,
-0.9651179909706116,
-2.0582849979400635,
0.23081286251544952,
0.22126084566116333,
-0.27513301372528076,
0.17672720551490784,
1.7428004741668701,
0.4945152997970581,
1.3695186376571655,
1.3956620693206787,
1.0092755556106567,
-0.7475060224533081,
-1.29470956325531,
0.7118685841560364,
0.9481641054153442,
-1.3851855993270874,
0.8663760423660278,
-0.05966860428452492,
-0.5404493808746338,
0.6452904343605042,
1.3192919492721558,
0.5044515132904053,
-1.983285903930664,
0.7507719993591309,
-1.0824323892593384,
0.7492348551750183,
0.7393615245819092,
0.7082449197769165,
0.2209697663784027,
0.8925477862358093,
-1.1753029823303223,
-1.110190510749817,
-0.6359038352966309,
-0.7124530076980591,
1.8962303400039673,
-0.28494173288345337,
0.6102598309516907,
-0.12307970970869064,
-1.2931044101715088,
-0.12063882499933243,
0.8427798748016357,
0.4393162727355957,
-0.5388510227203369,
0.7928356528282166,
-0.6601504683494568,
-1.0209109783172607,
-1.1575902700424194,
-0.45187807083129883,
-1.0302982330322266,
-0.902474582195282,
1.0389809608459473,
0.8009462356567383,
0.37291204929351807,
1.8803108930587769,
0.6882680654525757,
0.38622862100601196,
-2.6166253089904785,
0.8691647052764893,
0.3441607356071472,
-0.1268153041601181,
0.8135260343551636,
0.3359612226486206,
1.071998119354248,
0.011651022359728813,
0.6264720559120178,
-2.4184539318084717,
2.319756269454956,
-0.2052799016237259,
0.6453514099121094,
-0.026122137904167175,
-0.24164831638336182,
1.0870132446289062,
0.5030501484870911,
0.535453736782074,
-1.0889296531677246,
0.6995797157287598,
-0.5657982230186462,
1.179263949394226,
0.783516526222229,
-0.8676024675369263,
0.020382264629006386,
1.3984495401382446,
0.4363868832588196,
-0.5934534072875977,
-0.9751476645469666,
-0.9520360827445984,
0.8951727151870728,
1.7017711400985718,
-0.07744046300649643,
-0.0009199660271406174,
0.916189968585968,
0.6780791282653809,
-1.2000949382781982,
0.07086446136236191,
-0.6854293942451477,
-0.716391384601593,
1.6723644733428955,
2.05981183052063,
-0.1348681002855301,
-0.11140333861112595,
-0.824215829372406,
-1.192379117012024,
0.8047267198562622,
0.005804358050227165,
0.0006012413650751114,
0.5899715423583984,
-0.589651346206665,
1.0528829097747803,
0.7653383016586304,
1.024472713470459,
0.11033859848976135,
0.3189469575881958,
0.4708828926086426,
-0.3965635299682617,
-1.1769393682479858,
-0.28957825899124146,
-1.1237431764602661,
-2.5464096069335938,
0.4611457586288452,
-0.20912468433380127,
-1.4658604860305786,
0.06737983971834183,
-1.0515447854995728,
0.886747419834137,
-0.6284857392311096,
-1.1345633268356323,
-1.4769090414047241,
0.2568877935409546,
-0.13120624423027039,
0.8816968202590942,
-1.6612610816955566,
-0.14712144434452057,
1.1627360582351685,
0.8441925048828125,
-0.6793007254600525,
0.8845709562301636,
0.17702127993106842,
0.9940072298049927,
0.8954969048500061,
-0.3534766435623169,
0.5885148048400879,
0.04388527199625969,
-1.313787817955017,
0.5285460352897644,
1.2428117990493774,
0.15125532448291779,
1.4082989692687988,
-0.46006613969802856,
-0.007600134238600731,
0.4354698657989502,
-0.557892382144928,
-0.41954493522644043,
-0.5526222586631775,
0.7255339622497559,
0.05630883574485779,
-0.8914698958396912,
0.014031507074832916,
-0.053877897560596466,
-0.2546592056751251,
0.23347310721874237,
-1.5215370655059814,
-0.20828483998775482,
-0.39873361587524414,
-0.6355276107788086,
-1.2836586236953735,
-0.07688090950250626,
1.4024932384490967,
-0.7586808204650879,
-0.23001104593276978,
0.47067660093307495,
0.3603694438934326,
0.5637772083282471,
0.5873419046401978,
-0.7066757082939148,
-0.24608458578586578,
-0.27115845680236816,
-0.3652178645133972,
0.3737252950668335,
1.415742039680481,
-0.0853973999619484,
-0.9703449606895447,
0.7264295816421509,
-0.3743121027946472,
0.10482019186019897,
2.0084502696990967,
0.09680194407701492,
-0.7937962412834167,
0.30802929401397705,
-0.7015296220779419,
1.8723739385604858,
1.7695631980895996,
1.314774990081787,
-0.16235826909542084,
-0.9806545972824097,
0.6011756658554077,
-0.3750879764556885,
-0.3664082884788513,
0.8599615097045898,
0.3328142762184143,
-0.33035576343536377,
-1.3913624286651611,
0.8126917481422424,
1.291076898574829,
-0.8066293001174927,
-0.7980605959892273,
0.12926539778709412,
-0.7978423237800598,
1.1851876974105835,
0.5753217339515686,
0.3549042344093323,
0.283743679523468,
1.5843114852905273,
0.7310979962348938,
-0.4044346809387207,
0.5160126090049744,
0.5274491906166077,
-0.26260262727737427,
-2.1311838626861572,
-1.0872567892074585,
0.41072577238082886,
-0.5202569365501404,
-1.6081080436706543,
1.3918836116790771,
-1.158003568649292,
-1.0065456628799438,
0.5186852812767029,
0.09324858337640762,
1.3997225761413574,
0.3618488907814026,
1.624122977256775,
2.098376512527466,
0.8663557767868042,
0.5097835063934326,
1.2312378883361816,
-0.1983702927827835,
-0.5059031844139099,
1.75566565990448,
-0.44916170835494995,
0.5085096955299377,
1.089052677154541,
-0.3598743677139282,
-1.1579723358154297,
-0.8120644092559814,
-1.1870678663253784,
-0.686460554599762,
1.2631429433822632,
0.10557639598846436,
-1.069525957107544,
0.2943407893180847,
1.5774439573287964,
0.09061319380998611,
-0.20684371888637543,
0.7673436403274536,
0.3752950429916382,
-0.7828859686851501,
-0.1227002963423729,
-0.8634330034255981,
0.5161378383636475,
-0.19270654022693634,
-0.28480106592178345,
0.33993685245513916,
0.5311934351921082,
1.2499271631240845,
-0.03677446395158768,
0.1152769923210144,
1.1262056827545166,
-1.4315450191497803,
1.4771497249603271,
-0.697196364402771,
0.30377525091171265,
-2.4574978351593018,
1.3920058012008667,
-0.7534664869308472,
1.924708604812622,
-2.5976345539093018,
0.4414592981338501,
-0.5788370966911316,
-0.5269114375114441,
0.2126719057559967,
-0.3061904311180115,
0.034641608595848083,
-0.1760452836751938,
-1.0676392316818237,
-0.05936719849705696,
-0.7199799418449402,
0.64410400390625,
1.1028456687927246,
1.4070103168487549,
-1.092431664466858,
-0.20669808983802795,
-1.7408952713012695,
-0.20448680222034454,
-0.7230970859527588,
0.3162422776222229,
-1.993825912475586,
-0.12675264477729797,
-2.060204029083252,
-2.3318610191345215,
-1.3008747100830078,
-0.8620014190673828,
1.0914735794067383,
0.18766196072101593,
-0.8502678871154785,
1.1916853189468384,
-0.36745160818099976,
-1.9079457521438599,
1.186323881149292,
-2.1843457221984863
] |
https://github.com/huggingface/datasets/issues/5968 | Common Voice datasets still need `use_auth_token=True` | The issue commes from the dataset itself and is not related to the `datasets` lib
see https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/blob/2c475b3b88e0f2e5828f830a4b91618a25ff20b7/common_voice_6_1.py#L148-L152 | ### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
``` | 91 | 17 | Common Voice datasets still need `use_auth_token=True`
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
```
The issue commes from the dataset itself and is not related to the `datasets` lib
see https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/blob/2c475b3b88e0f2e5828f830a4b91618a25ff20b7/common_voice_6_1.py#L148-L152 | [
-1.203703761100769,
-0.9037898778915405,
-0.6641753911972046,
1.4331305027008057,
-0.10892482101917267,
-1.2703930139541626,
0.18527674674987793,
-1.0941673517227173,
1.6223810911178589,
-0.8136656880378723,
0.2819025218486786,
-1.6294913291931152,
-0.024662110954523087,
-0.5569484829902649,
-0.7494125366210938,
-0.90347820520401,
-0.4210415482521057,
-0.749717652797699,
1.0044879913330078,
2.419548273086548,
1.303164005279541,
-1.2697781324386597,
2.7235727310180664,
0.7021927237510681,
-0.23778830468654633,
-0.9681321382522583,
0.4454536437988281,
0.013308010064065456,
-1.2268571853637695,
-0.4639313519001007,
-0.9011366963386536,
-0.05264623090624809,
-0.6070125699043274,
-0.4253869652748108,
0.05425551161170006,
0.540846049785614,
-0.33082666993141174,
-0.3499695956707001,
-0.5570611357688904,
-0.8183115124702454,
0.463508278131485,
-0.3482148051261902,
0.892361044883728,
-0.37212589383125305,
1.801204800605774,
-0.6180117726325989,
0.4992477595806122,
0.7573660612106323,
1.2680250406265259,
0.14914344251155853,
0.0179748572409153,
0.28065115213394165,
0.3425258696079254,
-0.020230907946825027,
0.5518485903739929,
1.1651328802108765,
0.6313962936401367,
0.5986954569816589,
0.6491182446479797,
-2.2328455448150635,
1.3215593099594116,
-0.9899231791496277,
0.2828981876373291,
1.3760074377059937,
-0.9231792688369751,
0.3049083352088928,
-1.7759850025177002,
-0.02829698845744133,
0.6086143255233765,
-2.2780120372772217,
0.3015274107456207,
-1.3522530794143677,
-0.4882184863090515,
1.0477956533432007,
0.42095980048179626,
-1.2118233442306519,
0.19304783642292023,
-0.44594648480415344,
1.1378891468048096,
0.4890255033969879,
1.0178837776184082,
-1.66971755027771,
-0.09371205419301987,
-0.2223932445049286,
0.07916883379220963,
-1.3372219800949097,
-1.6232503652572632,
0.5291146039962769,
0.5741609930992126,
0.6114488244056702,
-0.0826067179441452,
1.082506775856018,
-1.039169430732727,
0.8218309283256531,
-1.0966466665267944,
-1.6349276304244995,
-1.4028881788253784,
-2.3564443588256836,
-2.2746946811676025,
0.7415336966514587,
-0.4670751690864563,
-0.4626792073249817,
2.0820841789245605,
-1.034942626953125,
-1.7052371501922607,
1.046898603439331,
0.20570561289787292,
0.02934350073337555,
2.284675121307373,
0.2479410171508789,
-0.7584146857261658,
0.40233147144317627,
-0.7708507180213928,
0.7662385106086731,
-0.2932361960411072,
1.3241225481033325,
0.4762412905693054,
-1.1030441522598267,
1.5365986824035645,
-0.43014955520629883,
0.6485269069671631,
-0.6261868476867676,
-0.6004035472869873,
-0.7192162871360779,
0.2506318986415863,
1.8922818899154663,
-0.242426335811615,
1.571389079093933,
-0.3361062705516815,
-1.5375901460647583,
-1.601325511932373,
0.8347819447517395,
0.4599026143550873,
-0.8132210373878479,
0.03907858207821846,
-0.4580725431442261,
0.12410588562488556,
-0.1262243539094925,
1.1665467023849487,
1.308379054069519,
0.7525387406349182,
-0.4585823714733124,
-0.8170148134231567,
0.12028752267360687,
-0.0023623215965926647,
-0.6842954158782959,
-1.7748123407363892,
-0.35293281078338623,
0.21037328243255615,
0.600086510181427,
-1.1297008991241455,
1.7679070234298706,
0.9064129590988159,
1.9719669818878174,
0.980117678642273,
-0.3178212642669678,
1.4276394844055176,
0.07210437208414078,
1.8327207565307617,
-0.5055833458900452,
0.6488632559776306,
-0.33436691761016846,
-1.142432689666748,
0.8229421973228455,
-0.3644406795501709,
-2.0426177978515625,
-0.7899312376976013,
-0.7975062131881714,
-0.145045667886734,
-0.7446814775466919,
0.8913992047309875,
-0.30432769656181335,
-1.4914706945419312,
0.13784576952457428,
-0.6440697312355042,
0.181977316737175,
-1.2188719511032104,
0.248491108417511,
0.7659503817558289,
-0.6505115628242493,
0.04364200681447983,
-0.21457059681415558,
-1.2207252979278564,
-0.4489229619503021,
0.4378211796283722,
1.910628080368042,
-0.609630286693573,
0.9090647101402283,
1.0427772998809814,
-0.7015394568443298,
0.07050321251153946,
0.2568214237689972,
-0.2787044048309326,
0.7813931703567505,
-1.0525431632995605,
-0.40788137912750244,
1.1795504093170166,
-0.2887255847454071,
-0.6874065399169922,
1.4846885204315186,
0.7288141846656799,
-1.038415789604187,
-0.2048851102590561,
-0.173325315117836,
-0.8261868953704834,
0.08886206895112991,
-1.4893956184387207,
-0.11151405423879623,
0.4242595136165619,
-1.5199209451675415,
-0.4150395095348358,
-0.17015580832958221,
1.4507968425750732,
-0.24555394053459167,
1.3644496202468872,
-0.3130762279033661,
-0.1285714954137802,
-0.24230095744132996,
-0.5058712363243103,
0.15062612295150757,
-0.21696820855140686,
-0.5177181363105774,
0.16068215668201447,
-0.7581157684326172,
0.31604743003845215,
1.47330904006958,
0.2493084967136383,
-0.005881838966161013,
0.4204085171222687,
1.11421537399292,
0.3474147915840149,
-0.10137958824634552,
-0.9037795662879944,
-1.580960750579834,
1.946392297744751,
-1.4104055166244507,
1.9948064088821411,
0.7598249912261963,
-0.0842285305261612,
-1.7457983493804932,
-1.830185890197754,
1.2118891477584839,
1.0863748788833618,
2.3180642127990723,
0.510199248790741,
0.3710488975048065,
-0.825004518032074,
-0.7611685991287231,
0.3680753707885742,
-1.0071899890899658,
-0.6456377506256104,
0.1832740604877472,
2.356442928314209,
1.7885586023330688,
-0.3961423635482788,
-0.20976433157920837,
-0.92052161693573,
1.3020567893981934,
-0.2705746591091156,
0.27023079991340637,
2.0571842193603516,
-0.26417720317840576,
-1.0441023111343384,
1.2809491157531738,
-2.365025758743286,
0.2709759473800659,
2.050513505935669,
0.28021240234375,
0.1452871710062027,
-1.3964335918426514,
-0.6246121525764465,
-0.36723724007606506,
-0.3885159194469452,
-1.270157814025879,
0.5129113793373108,
-0.2286793291568756,
-0.7893635630607605,
-1.3616713285446167,
0.16833408176898956,
-1.1242783069610596,
-1.6736990213394165,
0.34426337480545044,
2.008113145828247,
2.012080192565918,
-0.7408981323242188,
1.5226333141326904,
-0.38763245940208435,
0.058776941150426865,
1.2422236204147339,
1.3420697450637817,
3.1037495136260986,
1.8235341310501099,
-1.2857660055160522,
0.6714886426925659,
-0.16126367449760437,
-0.451825886964798,
1.1606693267822266,
-1.1281819343566895,
1.2485095262527466,
-0.14993970096111298,
-1.1821777820587158,
-1.3456023931503296,
1.0268644094467163,
0.4988059103488922,
0.03846357390284538,
-0.5262728333473206,
1.2649669647216797,
0.1353624016046524,
1.41646146774292,
0.5682764053344727,
-0.4626992642879486,
0.6167733669281006,
-0.36143800616264343,
-0.6336732506752014,
1.4810882806777954,
0.23746684193611145,
-1.4903607368469238,
-2.3104360103607178,
-0.28887879848480225,
-0.8548263311386108,
0.016782745718955994,
-0.6265046000480652,
-1.0297173261642456,
1.6755383014678955,
0.3810388147830963,
-1.2332024574279785,
-0.26682549715042114,
-0.28917452692985535,
-0.47135359048843384,
2.6954331398010254,
-1.223541498184204,
-0.0947219505906105,
-0.9974714517593384,
-0.6680871844291687,
1.6769278049468994,
-1.2852250337600708,
-0.26973849534988403,
-1.0758814811706543,
-0.5860001444816589,
-1.2107001543045044,
-0.44830724596977234,
0.06479772180318832,
-0.9857044219970703,
0.8432793617248535,
0.1599220186471939,
-1.1500849723815918,
-0.33905062079429626,
-0.8705408573150635,
1.033563256263733,
-0.14891572296619415,
0.12044772505760193,
1.8433382511138916,
0.26705852150917053,
-0.40205514430999756,
0.7684613466262817,
1.1745219230651855,
0.5873652696609497,
-0.6808740496635437,
0.05778041109442711,
-0.6524841785430908,
0.34632205963134766,
-1.3537318706512451,
0.25502073764801025,
-2.9623355865478516,
0.6257009506225586,
-0.1503952145576477,
-0.08999443054199219,
-0.11196736991405487,
-1.4154317378997803,
1.0731121301651,
2.588223934173584,
-1.168566346168518,
0.5204069018363953,
0.4493555426597595,
1.153000831604004,
-1.6600912809371948,
0.37783002853393555,
-0.5582231283187866,
2.097416400909424,
0.19511491060256958,
1.314926028251648,
-0.5291374921798706,
-2.2392640113830566,
0.6264855265617371,
-1.1791647672653198,
-1.2094268798828125,
0.8696553111076355,
-0.8757717609405518,
0.22705969214439392,
-1.3607807159423828,
-0.28498607873916626,
-0.8995087146759033,
-1.227064847946167,
0.6272063255310059,
0.11261735111474991,
0.4319824278354645,
-0.6014643311500549,
0.3358422815799713,
-2.250440835952759,
-1.335016131401062,
-0.16336199641227722,
-0.9053933620452881,
0.45598337054252625,
-0.41479140520095825,
0.5664103627204895,
-0.10367889702320099,
0.09931638091802597,
0.35054320096969604,
1.5543015003204346,
3.386444568634033,
0.16123522818088531,
0.15024910867214203,
-0.18234284222126007,
-0.9343513250350952,
1.4482214450836182,
0.8810474276542664,
-0.0921090692281723,
-0.5629312992095947,
-0.9965377449989319,
1.2509112358093262,
2.0211052894592285,
1.0539979934692383,
-0.08402573317289352,
-0.8536745309829712,
-0.8077582716941833,
-0.04181307926774025,
0.10390716791152954,
0.5003376007080078,
0.8594276309013367,
0.046972859650850296,
0.05552982911467552,
1.402881145477295,
1.1535193920135498,
-0.3576924502849579,
0.3737548589706421,
-0.9558154940605164,
-0.44414883852005005,
0.3789437413215637,
0.310994952917099,
-0.015891574323177338,
0.3958287835121155,
-0.9989857077598572,
-0.17232076823711395,
-0.3930785059928894,
-0.7859497666358948,
-0.7487006783485413,
-0.46987468004226685,
-0.4331788122653961,
1.6415483951568604,
0.10435889661312103,
-0.46166375279426575,
0.007728704251348972,
-0.7272020578384399,
-0.16277346014976501,
-1.1174585819244385,
0.33469659090042114,
-0.06781522929668427,
-0.11725381016731262,
-0.17802992463111877,
1.6047831773757935,
-0.9883700609207153,
-2.036008596420288,
0.23360510170459747,
0.28564488887786865,
-0.38036060333251953,
0.12112388014793396,
1.7296961545944214,
0.4697412848472595,
1.3943626880645752,
1.3073512315750122,
0.9856252074241638,
-0.5921511650085449,
-1.2699629068374634,
0.6619505882263184,
0.9181371331214905,
-1.3791097402572632,
0.8344388604164124,
-0.09419570863246918,
-0.4771050810813904,
0.7118819952011108,
1.2911070585250854,
0.5126060843467712,
-1.960554599761963,
0.8471984267234802,
-0.9481600522994995,
0.7544118762016296,
0.8184962272644043,
0.7148568630218506,
0.24341106414794922,
0.8647053241729736,
-1.113215446472168,
-1.2121659517288208,
-0.6708477735519409,
-0.7170233726501465,
1.9291468858718872,
-0.3318950831890106,
0.5971501469612122,
-0.21715734899044037,
-1.2325764894485474,
-0.11984021216630936,
0.7957050800323486,
0.44081833958625793,
-0.4774559438228607,
0.8240125775337219,
-0.5972731709480286,
-0.9677516222000122,
-1.3160297870635986,
-0.42625242471694946,
-1.0447452068328857,
-0.9941843152046204,
0.9236321449279785,
0.7510861158370972,
0.42759329080581665,
1.9375404119491577,
0.6493358016014099,
0.45035606622695923,
-2.5916194915771484,
0.8674840927124023,
0.28506070375442505,
-0.06982512772083282,
0.8915762305259705,
0.33434951305389404,
1.0668264627456665,
0.06651279330253601,
0.5664118528366089,
-2.4477028846740723,
2.3191614151000977,
-0.2329527586698532,
0.5808327794075012,
-0.022140521556138992,
-0.23694615066051483,
1.1672329902648926,
0.597109317779541,
0.4728698432445526,
-1.1349904537200928,
0.8015183806419373,
-0.5604812502861023,
1.1438745260238647,
0.8600060939788818,
-0.8871649503707886,
0.0037903590127825737,
1.4998314380645752,
0.4624086022377014,
-0.5287607908248901,
-0.9249299168586731,
-0.9757853746414185,
0.9084990620613098,
1.653123378753662,
-0.06489443778991699,
-0.05256221443414688,
0.8385593295097351,
0.6412298083305359,
-1.1943320035934448,
0.06991004198789597,
-0.6872746348381042,
-0.7502988576889038,
1.6769481897354126,
2.015068769454956,
-0.1322876214981079,
-0.19803211092948914,
-0.746634304523468,
-1.2368699312210083,
0.7384060621261597,
-0.09550443291664124,
0.008330508135259151,
0.5954721570014954,
-0.5600395798683167,
1.018014907836914,
0.7508633136749268,
0.9847411513328552,
0.06637199968099594,
0.32736337184906006,
0.46356725692749023,
-0.36120450496673584,
-1.1813733577728271,
-0.3203933835029602,
-1.0801410675048828,
-2.6102113723754883,
0.44947102665901184,
-0.2655591368675232,
-1.4324718713760376,
0.05923452600836754,
-1.0375434160232544,
0.9416410326957703,
-0.6681656241416931,
-1.1541454792022705,
-1.526611089706421,
0.25244128704071045,
-0.06986279785633087,
0.9146400690078735,
-1.5986469984054565,
-0.17674778401851654,
1.160054326057434,
0.8195247054100037,
-0.6282233595848083,
0.9571031332015991,
0.1909414380788803,
1.0251572132110596,
0.7586897015571594,
-0.422657310962677,
0.6112169027328491,
0.047463588416576385,
-1.43027925491333,
0.4854714870452881,
1.2691174745559692,
0.2023804783821106,
1.5138849020004272,
-0.4436023533344269,
0.052415426820516586,
0.43499645590782166,
-0.678283154964447,
-0.5123240351676941,
-0.42090633511543274,
0.7623202800750732,
0.08537952601909637,
-0.9704867005348206,
-0.04360179230570793,
-0.11774987727403641,
-0.2858598530292511,
0.18832659721374512,
-1.5115784406661987,
-0.21450845897197723,
-0.42295756936073303,
-0.5523668527603149,
-1.2993465662002563,
-0.039160944521427155,
1.4337115287780762,
-0.6975349187850952,
-0.27818217873573303,
0.5212850570678711,
0.41910603642463684,
0.47554853558540344,
0.7163244485855103,
-0.8020234704017639,
-0.206727534532547,
-0.3447079360485077,
-0.30729275941848755,
0.34758424758911133,
1.305271029472351,
-0.06482972949743271,
-0.9425327777862549,
0.6000896692276001,
-0.3938497006893158,
0.14696525037288666,
1.9768873453140259,
0.07645711302757263,
-0.6974523067474365,
0.3172260820865631,
-0.7501044273376465,
1.8801254034042358,
1.7276787757873535,
1.3064442873001099,
-0.022208966314792633,
-0.9115062355995178,
0.5755824446678162,
-0.32398220896720886,
-0.3719404339790344,
0.9149118661880493,
0.4427316188812256,
-0.255443274974823,
-1.409358024597168,
0.7495871782302856,
1.1766891479492188,
-0.8612216711044312,
-0.7889338135719299,
0.16754589974880219,
-0.8352558612823486,
1.1640352010726929,
0.566990852355957,
0.36754941940307617,
0.3195783793926239,
1.5826314687728882,
0.7898041605949402,
-0.4270273447036743,
0.5313796401023865,
0.4830748736858368,
-0.25494009256362915,
-2.1248905658721924,
-1.0883923768997192,
0.395778089761734,
-0.5471893548965454,
-1.5760974884033203,
1.4822971820831299,
-1.1024478673934937,
-1.059430718421936,
0.47394174337387085,
0.11740022897720337,
1.3726608753204346,
0.33350130915641785,
1.7098315954208374,
2.077767848968506,
0.865052342414856,
0.4462515711784363,
1.2929768562316895,
-0.12648873031139374,
-0.4742247462272644,
1.8001294136047363,
-0.47919192910194397,
0.4677603244781494,
1.0984437465667725,
-0.3027491569519043,
-1.089463233947754,
-0.8029991388320923,
-1.2048596143722534,
-0.7016392946243286,
1.1541246175765991,
0.06513804942369461,
-1.112478256225586,
0.2916399836540222,
1.5925847291946411,
0.13137149810791016,
-0.21992619335651398,
0.667209804058075,
0.34533676505088806,
-0.763087809085846,
-0.08962799608707428,
-0.9536442756652832,
0.542198121547699,
-0.21134963631629944,
-0.33563196659088135,
0.24185499548912048,
0.4519444406032562,
1.3712836503982544,
-0.09141379594802856,
0.13099876046180725,
1.0817101001739502,
-1.4560669660568237,
1.4509519338607788,
-0.6398915648460388,
0.347301721572876,
-2.403917074203491,
1.3558355569839478,
-0.7485767602920532,
1.9438365697860718,
-2.602623462677002,
0.4366450011730194,
-0.5391595959663391,
-0.5359954237937927,
0.3272228240966797,
-0.4045344591140747,
0.1166810542345047,
-0.05791361257433891,
-1.1590187549591064,
0.006544130854308605,
-0.7477865219116211,
0.6601991653442383,
1.1474957466125488,
1.467839002609253,
-1.1798332929611206,
-0.19945292174816132,
-1.6693564653396606,
-0.14735455811023712,
-0.7573379278182983,
0.31890740990638733,
-1.984216570854187,
-0.11319002509117126,
-1.9486011266708374,
-2.4034974575042725,
-1.2786352634429932,
-0.790370523929596,
1.0776764154434204,
0.1824074685573578,
-0.8472331762313843,
1.2356996536254883,
-0.3342554569244385,
-1.8275567293167114,
1.1160378456115723,
-2.1744422912597656
] |
https://github.com/huggingface/datasets/issues/5968 | Common Voice datasets still need `use_auth_token=True` | Addressed in:
* `mozilla-foundation/common_voice_1_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_1_0/discussions/4)
* `mozilla-foundation/common_voice_2_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_2_0/discussions/3)
* `mozilla-foundation/common_voice_3_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_3_0/discussions/3)
* `mozilla-foundation/common_voice_4_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_4_0/discussions/3)
* `mozilla-foundation/common_voice_5_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_0/discussions/3)
* `mozilla-foundation/common_voice_5_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_1/discussions/3)
* `mozilla-foundation/common_voice_6_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_0/discussions/3)
* `mozilla-foundation/common_voice_6_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/discussions/3)
* `mozilla-foundation/common_voice_7_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/discussions/3)
* `mozilla-foundation/common_voice_8_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0/discussions/7)
* `mozilla-foundation/common_voice_9_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_9_0/discussions/8)
* `mozilla-foundation/common_voice_10_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_10_0/discussions/7) | ### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
``` | 91 | 38 | Common Voice datasets still need `use_auth_token=True`
### Describe the bug
We don't need to pass `use_auth_token=True` anymore to download gated datasets or models, so the following should work if correctly logged in.
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
However it throws an error - probably because something weird is hardcoded into the dataset loading script.
### Steps to reproduce the bug
1.)
```
huggingface-cli login
```
2.) Make sure that you have accepted the license here:
https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1
3.) Run:
```py
from datasets import load_dataset
load_dataset("mozilla-foundation/common_voice_6_1", "tr", split="train+validation")
```
4.) You'll get:
```
File ~/hf/lib/python3.10/site-packages/datasets/builder.py:963, in DatasetBuilder._download_and_prepare(self, dl_manager, verification_mode, **prepare_split_kwargs)
961 split_dict = SplitDict(dataset_name=self.name)
962 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs)
--> 963 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
965 # Checksums verification
966 if verification_mode == VerificationMode.ALL_CHECKS and dl_manager.record_checksums:
File ~/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_6_1/f4d7854c466f5bd4908988dbd39044ec4fc634d89e0515ab0c51715c0127ffe3/common_voice_6_1.py:150, in CommonVoice._split_generators(self, dl_manager)
148 hf_auth_token = dl_manager.download_config.use_auth_token
149 if hf_auth_token is None:
--> 150 raise ConnectionError(
151 "Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset"
152 )
154 bundle_url_template = STATS["bundleURLTemplate"]
155 bundle_version = bundle_url_template.split("/")[0]
ConnectionError: Please set use_auth_token=True or use_auth_token='<TOKEN>' to download this dataset
```
### Expected behavior
One should not have to pass `use_auth_token=True`. Also see discussion here: https://github.com/huggingface/blog/pull/1243#discussion_r1235131150
### Environment info
```
- `datasets` version: 2.13.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
```
Addressed in:
* `mozilla-foundation/common_voice_1_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_1_0/discussions/4)
* `mozilla-foundation/common_voice_2_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_2_0/discussions/3)
* `mozilla-foundation/common_voice_3_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_3_0/discussions/3)
* `mozilla-foundation/common_voice_4_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_4_0/discussions/3)
* `mozilla-foundation/common_voice_5_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_0/discussions/3)
* `mozilla-foundation/common_voice_5_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_5_1/discussions/3)
* `mozilla-foundation/common_voice_6_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_0/discussions/3)
* `mozilla-foundation/common_voice_6_1` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_6_1/discussions/3)
* `mozilla-foundation/common_voice_7_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_7_0/discussions/3)
* `mozilla-foundation/common_voice_8_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_8_0/discussions/7)
* `mozilla-foundation/common_voice_9_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_9_0/discussions/8)
* `mozilla-foundation/common_voice_10_0` [PR](https://huggingface.co/datasets/mozilla-foundation/common_voice_10_0/discussions/7) | [
-1.203703761100769,
-0.9037898778915405,
-0.6641753911972046,
1.4331305027008057,
-0.10892482101917267,
-1.2703930139541626,
0.18527674674987793,
-1.0941673517227173,
1.6223810911178589,
-0.8136656880378723,
0.2819025218486786,
-1.6294913291931152,
-0.024662110954523087,
-0.5569484829902649,
-0.7494125366210938,
-0.90347820520401,
-0.4210415482521057,
-0.749717652797699,
1.0044879913330078,
2.419548273086548,
1.303164005279541,
-1.2697781324386597,
2.7235727310180664,
0.7021927237510681,
-0.23778830468654633,
-0.9681321382522583,
0.4454536437988281,
0.013308010064065456,
-1.2268571853637695,
-0.4639313519001007,
-0.9011366963386536,
-0.05264623090624809,
-0.6070125699043274,
-0.4253869652748108,
0.05425551161170006,
0.540846049785614,
-0.33082666993141174,
-0.3499695956707001,
-0.5570611357688904,
-0.8183115124702454,
0.463508278131485,
-0.3482148051261902,
0.892361044883728,
-0.37212589383125305,
1.801204800605774,
-0.6180117726325989,
0.4992477595806122,
0.7573660612106323,
1.2680250406265259,
0.14914344251155853,
0.0179748572409153,
0.28065115213394165,
0.3425258696079254,
-0.020230907946825027,
0.5518485903739929,
1.1651328802108765,
0.6313962936401367,
0.5986954569816589,
0.6491182446479797,
-2.2328455448150635,
1.3215593099594116,
-0.9899231791496277,
0.2828981876373291,
1.3760074377059937,
-0.9231792688369751,
0.3049083352088928,
-1.7759850025177002,
-0.02829698845744133,
0.6086143255233765,
-2.2780120372772217,
0.3015274107456207,
-1.3522530794143677,
-0.4882184863090515,
1.0477956533432007,
0.42095980048179626,
-1.2118233442306519,
0.19304783642292023,
-0.44594648480415344,
1.1378891468048096,
0.4890255033969879,
1.0178837776184082,
-1.66971755027771,
-0.09371205419301987,
-0.2223932445049286,
0.07916883379220963,
-1.3372219800949097,
-1.6232503652572632,
0.5291146039962769,
0.5741609930992126,
0.6114488244056702,
-0.0826067179441452,
1.082506775856018,
-1.039169430732727,
0.8218309283256531,
-1.0966466665267944,
-1.6349276304244995,
-1.4028881788253784,
-2.3564443588256836,
-2.2746946811676025,
0.7415336966514587,
-0.4670751690864563,
-0.4626792073249817,
2.0820841789245605,
-1.034942626953125,
-1.7052371501922607,
1.046898603439331,
0.20570561289787292,
0.02934350073337555,
2.284675121307373,
0.2479410171508789,
-0.7584146857261658,
0.40233147144317627,
-0.7708507180213928,
0.7662385106086731,
-0.2932361960411072,
1.3241225481033325,
0.4762412905693054,
-1.1030441522598267,
1.5365986824035645,
-0.43014955520629883,
0.6485269069671631,
-0.6261868476867676,
-0.6004035472869873,
-0.7192162871360779,
0.2506318986415863,
1.8922818899154663,
-0.242426335811615,
1.571389079093933,
-0.3361062705516815,
-1.5375901460647583,
-1.601325511932373,
0.8347819447517395,
0.4599026143550873,
-0.8132210373878479,
0.03907858207821846,
-0.4580725431442261,
0.12410588562488556,
-0.1262243539094925,
1.1665467023849487,
1.308379054069519,
0.7525387406349182,
-0.4585823714733124,
-0.8170148134231567,
0.12028752267360687,
-0.0023623215965926647,
-0.6842954158782959,
-1.7748123407363892,
-0.35293281078338623,
0.21037328243255615,
0.600086510181427,
-1.1297008991241455,
1.7679070234298706,
0.9064129590988159,
1.9719669818878174,
0.980117678642273,
-0.3178212642669678,
1.4276394844055176,
0.07210437208414078,
1.8327207565307617,
-0.5055833458900452,
0.6488632559776306,
-0.33436691761016846,
-1.142432689666748,
0.8229421973228455,
-0.3644406795501709,
-2.0426177978515625,
-0.7899312376976013,
-0.7975062131881714,
-0.145045667886734,
-0.7446814775466919,
0.8913992047309875,
-0.30432769656181335,
-1.4914706945419312,
0.13784576952457428,
-0.6440697312355042,
0.181977316737175,
-1.2188719511032104,
0.248491108417511,
0.7659503817558289,
-0.6505115628242493,
0.04364200681447983,
-0.21457059681415558,
-1.2207252979278564,
-0.4489229619503021,
0.4378211796283722,
1.910628080368042,
-0.609630286693573,
0.9090647101402283,
1.0427772998809814,
-0.7015394568443298,
0.07050321251153946,
0.2568214237689972,
-0.2787044048309326,
0.7813931703567505,
-1.0525431632995605,
-0.40788137912750244,
1.1795504093170166,
-0.2887255847454071,
-0.6874065399169922,
1.4846885204315186,
0.7288141846656799,
-1.038415789604187,
-0.2048851102590561,
-0.173325315117836,
-0.8261868953704834,
0.08886206895112991,
-1.4893956184387207,
-0.11151405423879623,
0.4242595136165619,
-1.5199209451675415,
-0.4150395095348358,
-0.17015580832958221,
1.4507968425750732,
-0.24555394053459167,
1.3644496202468872,
-0.3130762279033661,
-0.1285714954137802,
-0.24230095744132996,
-0.5058712363243103,
0.15062612295150757,
-0.21696820855140686,
-0.5177181363105774,
0.16068215668201447,
-0.7581157684326172,
0.31604743003845215,
1.47330904006958,
0.2493084967136383,
-0.005881838966161013,
0.4204085171222687,
1.11421537399292,
0.3474147915840149,
-0.10137958824634552,
-0.9037795662879944,
-1.580960750579834,
1.946392297744751,
-1.4104055166244507,
1.9948064088821411,
0.7598249912261963,
-0.0842285305261612,
-1.7457983493804932,
-1.830185890197754,
1.2118891477584839,
1.0863748788833618,
2.3180642127990723,
0.510199248790741,
0.3710488975048065,
-0.825004518032074,
-0.7611685991287231,
0.3680753707885742,
-1.0071899890899658,
-0.6456377506256104,
0.1832740604877472,
2.356442928314209,
1.7885586023330688,
-0.3961423635482788,
-0.20976433157920837,
-0.92052161693573,
1.3020567893981934,
-0.2705746591091156,
0.27023079991340637,
2.0571842193603516,
-0.26417720317840576,
-1.0441023111343384,
1.2809491157531738,
-2.365025758743286,
0.2709759473800659,
2.050513505935669,
0.28021240234375,
0.1452871710062027,
-1.3964335918426514,
-0.6246121525764465,
-0.36723724007606506,
-0.3885159194469452,
-1.270157814025879,
0.5129113793373108,
-0.2286793291568756,
-0.7893635630607605,
-1.3616713285446167,
0.16833408176898956,
-1.1242783069610596,
-1.6736990213394165,
0.34426337480545044,
2.008113145828247,
2.012080192565918,
-0.7408981323242188,
1.5226333141326904,
-0.38763245940208435,
0.058776941150426865,
1.2422236204147339,
1.3420697450637817,
3.1037495136260986,
1.8235341310501099,
-1.2857660055160522,
0.6714886426925659,
-0.16126367449760437,
-0.451825886964798,
1.1606693267822266,
-1.1281819343566895,
1.2485095262527466,
-0.14993970096111298,
-1.1821777820587158,
-1.3456023931503296,
1.0268644094467163,
0.4988059103488922,
0.03846357390284538,
-0.5262728333473206,
1.2649669647216797,
0.1353624016046524,
1.41646146774292,
0.5682764053344727,
-0.4626992642879486,
0.6167733669281006,
-0.36143800616264343,
-0.6336732506752014,
1.4810882806777954,
0.23746684193611145,
-1.4903607368469238,
-2.3104360103607178,
-0.28887879848480225,
-0.8548263311386108,
0.016782745718955994,
-0.6265046000480652,
-1.0297173261642456,
1.6755383014678955,
0.3810388147830963,
-1.2332024574279785,
-0.26682549715042114,
-0.28917452692985535,
-0.47135359048843384,
2.6954331398010254,
-1.223541498184204,
-0.0947219505906105,
-0.9974714517593384,
-0.6680871844291687,
1.6769278049468994,
-1.2852250337600708,
-0.26973849534988403,
-1.0758814811706543,
-0.5860001444816589,
-1.2107001543045044,
-0.44830724596977234,
0.06479772180318832,
-0.9857044219970703,
0.8432793617248535,
0.1599220186471939,
-1.1500849723815918,
-0.33905062079429626,
-0.8705408573150635,
1.033563256263733,
-0.14891572296619415,
0.12044772505760193,
1.8433382511138916,
0.26705852150917053,
-0.40205514430999756,
0.7684613466262817,
1.1745219230651855,
0.5873652696609497,
-0.6808740496635437,
0.05778041109442711,
-0.6524841785430908,
0.34632205963134766,
-1.3537318706512451,
0.25502073764801025,
-2.9623355865478516,
0.6257009506225586,
-0.1503952145576477,
-0.08999443054199219,
-0.11196736991405487,
-1.4154317378997803,
1.0731121301651,
2.588223934173584,
-1.168566346168518,
0.5204069018363953,
0.4493555426597595,
1.153000831604004,
-1.6600912809371948,
0.37783002853393555,
-0.5582231283187866,
2.097416400909424,
0.19511491060256958,
1.314926028251648,
-0.5291374921798706,
-2.2392640113830566,
0.6264855265617371,
-1.1791647672653198,
-1.2094268798828125,
0.8696553111076355,
-0.8757717609405518,
0.22705969214439392,
-1.3607807159423828,
-0.28498607873916626,
-0.8995087146759033,
-1.227064847946167,
0.6272063255310059,
0.11261735111474991,
0.4319824278354645,
-0.6014643311500549,
0.3358422815799713,
-2.250440835952759,
-1.335016131401062,
-0.16336199641227722,
-0.9053933620452881,
0.45598337054252625,
-0.41479140520095825,
0.5664103627204895,
-0.10367889702320099,
0.09931638091802597,
0.35054320096969604,
1.5543015003204346,
3.386444568634033,
0.16123522818088531,
0.15024910867214203,
-0.18234284222126007,
-0.9343513250350952,
1.4482214450836182,
0.8810474276542664,
-0.0921090692281723,
-0.5629312992095947,
-0.9965377449989319,
1.2509112358093262,
2.0211052894592285,
1.0539979934692383,
-0.08402573317289352,
-0.8536745309829712,
-0.8077582716941833,
-0.04181307926774025,
0.10390716791152954,
0.5003376007080078,
0.8594276309013367,
0.046972859650850296,
0.05552982911467552,
1.402881145477295,
1.1535193920135498,
-0.3576924502849579,
0.3737548589706421,
-0.9558154940605164,
-0.44414883852005005,
0.3789437413215637,
0.310994952917099,
-0.015891574323177338,
0.3958287835121155,
-0.9989857077598572,
-0.17232076823711395,
-0.3930785059928894,
-0.7859497666358948,
-0.7487006783485413,
-0.46987468004226685,
-0.4331788122653961,
1.6415483951568604,
0.10435889661312103,
-0.46166375279426575,
0.007728704251348972,
-0.7272020578384399,
-0.16277346014976501,
-1.1174585819244385,
0.33469659090042114,
-0.06781522929668427,
-0.11725381016731262,
-0.17802992463111877,
1.6047831773757935,
-0.9883700609207153,
-2.036008596420288,
0.23360510170459747,
0.28564488887786865,
-0.38036060333251953,
0.12112388014793396,
1.7296961545944214,
0.4697412848472595,
1.3943626880645752,
1.3073512315750122,
0.9856252074241638,
-0.5921511650085449,
-1.2699629068374634,
0.6619505882263184,
0.9181371331214905,
-1.3791097402572632,
0.8344388604164124,
-0.09419570863246918,
-0.4771050810813904,
0.7118819952011108,
1.2911070585250854,
0.5126060843467712,
-1.960554599761963,
0.8471984267234802,
-0.9481600522994995,
0.7544118762016296,
0.8184962272644043,
0.7148568630218506,
0.24341106414794922,
0.8647053241729736,
-1.113215446472168,
-1.2121659517288208,
-0.6708477735519409,
-0.7170233726501465,
1.9291468858718872,
-0.3318950831890106,
0.5971501469612122,
-0.21715734899044037,
-1.2325764894485474,
-0.11984021216630936,
0.7957050800323486,
0.44081833958625793,
-0.4774559438228607,
0.8240125775337219,
-0.5972731709480286,
-0.9677516222000122,
-1.3160297870635986,
-0.42625242471694946,
-1.0447452068328857,
-0.9941843152046204,
0.9236321449279785,
0.7510861158370972,
0.42759329080581665,
1.9375404119491577,
0.6493358016014099,
0.45035606622695923,
-2.5916194915771484,
0.8674840927124023,
0.28506070375442505,
-0.06982512772083282,
0.8915762305259705,
0.33434951305389404,
1.0668264627456665,
0.06651279330253601,
0.5664118528366089,
-2.4477028846740723,
2.3191614151000977,
-0.2329527586698532,
0.5808327794075012,
-0.022140521556138992,
-0.23694615066051483,
1.1672329902648926,
0.597109317779541,
0.4728698432445526,
-1.1349904537200928,
0.8015183806419373,
-0.5604812502861023,
1.1438745260238647,
0.8600060939788818,
-0.8871649503707886,
0.0037903590127825737,
1.4998314380645752,
0.4624086022377014,
-0.5287607908248901,
-0.9249299168586731,
-0.9757853746414185,
0.9084990620613098,
1.653123378753662,
-0.06489443778991699,
-0.05256221443414688,
0.8385593295097351,
0.6412298083305359,
-1.1943320035934448,
0.06991004198789597,
-0.6872746348381042,
-0.7502988576889038,
1.6769481897354126,
2.015068769454956,
-0.1322876214981079,
-0.19803211092948914,
-0.746634304523468,
-1.2368699312210083,
0.7384060621261597,
-0.09550443291664124,
0.008330508135259151,
0.5954721570014954,
-0.5600395798683167,
1.018014907836914,
0.7508633136749268,
0.9847411513328552,
0.06637199968099594,
0.32736337184906006,
0.46356725692749023,
-0.36120450496673584,
-1.1813733577728271,
-0.3203933835029602,
-1.0801410675048828,
-2.6102113723754883,
0.44947102665901184,
-0.2655591368675232,
-1.4324718713760376,
0.05923452600836754,
-1.0375434160232544,
0.9416410326957703,
-0.6681656241416931,
-1.1541454792022705,
-1.526611089706421,
0.25244128704071045,
-0.06986279785633087,
0.9146400690078735,
-1.5986469984054565,
-0.17674778401851654,
1.160054326057434,
0.8195247054100037,
-0.6282233595848083,
0.9571031332015991,
0.1909414380788803,
1.0251572132110596,
0.7586897015571594,
-0.422657310962677,
0.6112169027328491,
0.047463588416576385,
-1.43027925491333,
0.4854714870452881,
1.2691174745559692,
0.2023804783821106,
1.5138849020004272,
-0.4436023533344269,
0.052415426820516586,
0.43499645590782166,
-0.678283154964447,
-0.5123240351676941,
-0.42090633511543274,
0.7623202800750732,
0.08537952601909637,
-0.9704867005348206,
-0.04360179230570793,
-0.11774987727403641,
-0.2858598530292511,
0.18832659721374512,
-1.5115784406661987,
-0.21450845897197723,
-0.42295756936073303,
-0.5523668527603149,
-1.2993465662002563,
-0.039160944521427155,
1.4337115287780762,
-0.6975349187850952,
-0.27818217873573303,
0.5212850570678711,
0.41910603642463684,
0.47554853558540344,
0.7163244485855103,
-0.8020234704017639,
-0.206727534532547,
-0.3447079360485077,
-0.30729275941848755,
0.34758424758911133,
1.305271029472351,
-0.06482972949743271,
-0.9425327777862549,
0.6000896692276001,
-0.3938497006893158,
0.14696525037288666,
1.9768873453140259,
0.07645711302757263,
-0.6974523067474365,
0.3172260820865631,
-0.7501044273376465,
1.8801254034042358,
1.7276787757873535,
1.3064442873001099,
-0.022208966314792633,
-0.9115062355995178,
0.5755824446678162,
-0.32398220896720886,
-0.3719404339790344,
0.9149118661880493,
0.4427316188812256,
-0.255443274974823,
-1.409358024597168,
0.7495871782302856,
1.1766891479492188,
-0.8612216711044312,
-0.7889338135719299,
0.16754589974880219,
-0.8352558612823486,
1.1640352010726929,
0.566990852355957,
0.36754941940307617,
0.3195783793926239,
1.5826314687728882,
0.7898041605949402,
-0.4270273447036743,
0.5313796401023865,
0.4830748736858368,
-0.25494009256362915,
-2.1248905658721924,
-1.0883923768997192,
0.395778089761734,
-0.5471893548965454,
-1.5760974884033203,
1.4822971820831299,
-1.1024478673934937,
-1.059430718421936,
0.47394174337387085,
0.11740022897720337,
1.3726608753204346,
0.33350130915641785,
1.7098315954208374,
2.077767848968506,
0.865052342414856,
0.4462515711784363,
1.2929768562316895,
-0.12648873031139374,
-0.4742247462272644,
1.8001294136047363,
-0.47919192910194397,
0.4677603244781494,
1.0984437465667725,
-0.3027491569519043,
-1.089463233947754,
-0.8029991388320923,
-1.2048596143722534,
-0.7016392946243286,
1.1541246175765991,
0.06513804942369461,
-1.112478256225586,
0.2916399836540222,
1.5925847291946411,
0.13137149810791016,
-0.21992619335651398,
0.667209804058075,
0.34533676505088806,
-0.763087809085846,
-0.08962799608707428,
-0.9536442756652832,
0.542198121547699,
-0.21134963631629944,
-0.33563196659088135,
0.24185499548912048,
0.4519444406032562,
1.3712836503982544,
-0.09141379594802856,
0.13099876046180725,
1.0817101001739502,
-1.4560669660568237,
1.4509519338607788,
-0.6398915648460388,
0.347301721572876,
-2.403917074203491,
1.3558355569839478,
-0.7485767602920532,
1.9438365697860718,
-2.602623462677002,
0.4366450011730194,
-0.5391595959663391,
-0.5359954237937927,
0.3272228240966797,
-0.4045344591140747,
0.1166810542345047,
-0.05791361257433891,
-1.1590187549591064,
0.006544130854308605,
-0.7477865219116211,
0.6601991653442383,
1.1474957466125488,
1.467839002609253,
-1.1798332929611206,
-0.19945292174816132,
-1.6693564653396606,
-0.14735455811023712,
-0.7573379278182983,
0.31890740990638733,
-1.984216570854187,
-0.11319002509117126,
-1.9486011266708374,
-2.4034974575042725,
-1.2786352634429932,
-0.790370523929596,
1.0776764154434204,
0.1824074685573578,
-0.8472331762313843,
1.2356996536254883,
-0.3342554569244385,
-1.8275567293167114,
1.1160378456115723,
-2.1744422912597656
] |
https://github.com/huggingface/datasets/issues/5967 | Config name / split name lost after map with multiproc | This must be due to DatasetInfo.from_merge which drops them and is used in `concatenate_datasets`.
And you're experiencing this issue because multiprocessing does concatenate the resulting datasets from each process.
Maybe they should be kept if all the subdatasets share the same values for config_name and split | ### Describe the bug
Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc
### Steps to reproduce the bug
```python
from datasets import Audio, load_dataset
from transformers import AutoFeatureExtractor
import numpy as np
# load dummy dataset
libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
# make train / test splits
libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1)
# example feature extractor
model_id = "ntu-spml/distilhubert"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True)
sampling_rate = feature_extractor.sampling_rate
libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate))
max_duration = 30.0
def preprocess_function(examples):
audio_arrays = [x["array"] for x in examples["audio"]]
inputs = feature_extractor(
audio_arrays,
sampling_rate=feature_extractor.sampling_rate,
max_length=int(feature_extractor.sampling_rate * max_duration),
truncation=True,
return_attention_mask=True,
)
return inputs
# single proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1
)
print(10 * "=" ,"Single processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
# multi proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2
)
print(10 * "=" ,"Multi processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
```
**Print Output:**
```
========== Single processing ==========
Config name before: clean Split name before: validation
Config name after: clean Split name after: validation
========== Multi processing ==========
Config name before: clean Split name before: validation
Config name after: None Split name after: None
```
=> we can see that the config/split names are lost in the multiprocessing setting
### Expected behavior
Should retain both config / split names in the multiproc setting
### Environment info
- `datasets` version: 2.13.1.dev0
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2 | 92 | 46 | Config name / split name lost after map with multiproc
### Describe the bug
Performing a `.map` method on a dataset loses it's config name / split name only if run with multiproc
### Steps to reproduce the bug
```python
from datasets import Audio, load_dataset
from transformers import AutoFeatureExtractor
import numpy as np
# load dummy dataset
libri = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean")
# make train / test splits
libri = libri["validation"].train_test_split(seed=42, shuffle=True, test_size=0.1)
# example feature extractor
model_id = "ntu-spml/distilhubert"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id, do_normalize=True, return_attention_mask=True)
sampling_rate = feature_extractor.sampling_rate
libri = libri.cast_column("audio", Audio(sampling_rate=sampling_rate))
max_duration = 30.0
def preprocess_function(examples):
audio_arrays = [x["array"] for x in examples["audio"]]
inputs = feature_extractor(
audio_arrays,
sampling_rate=feature_extractor.sampling_rate,
max_length=int(feature_extractor.sampling_rate * max_duration),
truncation=True,
return_attention_mask=True,
)
return inputs
# single proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=1
)
print(10 * "=" ,"Single processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
# multi proc map
libri_encoded = libri.map(
preprocess_function, remove_columns=["audio", "file"], batched=True, num_proc=2
)
print(10 * "=" ,"Multi processing", 10 * "=")
print("Config name before: ", libri["train"].config_name, " Split name before: ", libri["train"].split)
print("Config name after: ", libri_encoded["train"].config_name, " Split name after: ", libri_encoded["train"].split)
```
**Print Output:**
```
========== Single processing ==========
Config name before: clean Split name before: validation
Config name after: clean Split name after: validation
========== Multi processing ==========
Config name before: clean Split name before: validation
Config name after: None Split name after: None
```
=> we can see that the config/split names are lost in the multiprocessing setting
### Expected behavior
Should retain both config / split names in the multiproc setting
### Environment info
- `datasets` version: 2.13.1.dev0
- Platform: Linux-5.15.0-67-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.15.1
- PyArrow version: 12.0.0
- Pandas version: 2.0.2
This must be due to DatasetInfo.from_merge which drops them and is used in `concatenate_datasets`.
And you're experiencing this issue because multiprocessing does concatenate the resulting datasets from each process.
Maybe they should be kept if all the subdatasets share the same values for config_name and split | [
-1.280849814414978,
-0.9218475818634033,
-0.5353645086288452,
1.5277557373046875,
-0.14567795395851135,
-1.098649263381958,
0.23686836659908295,
-1.1041470766067505,
1.5833228826522827,
-0.8155375719070435,
0.41122856736183167,
-1.618893027305603,
0.008044875226914883,
-0.6312916278839111,
-0.6867110133171082,
-0.9237492680549622,
-0.3422497808933258,
-0.6397114396095276,
1.1019976139068604,
2.447845697402954,
1.311843991279602,
-1.3270208835601807,
2.681246519088745,
0.7769871950149536,
-0.21591028571128845,
-0.8943057060241699,
0.617786705493927,
0.07272666692733765,
-1.2345836162567139,
-0.5324721932411194,
-0.9815642833709717,
-0.07410436868667603,
-0.5829907059669495,
-0.3558904528617859,
-0.11719704419374466,
0.35997557640075684,
-0.3548271059989929,
-0.3219447135925293,
-0.6472563743591309,
-0.851467490196228,
0.40543892979621887,
-0.39438602328300476,
0.9477488398551941,
-0.33958733081817627,
1.8030540943145752,
-0.6606531739234924,
0.5523744821548462,
0.7416260838508606,
1.1041309833526611,
0.2293398380279541,
0.02387351170182228,
0.33665597438812256,
0.4631166160106659,
-0.11581260710954666,
0.5891581773757935,
1.2286938428878784,
0.711630642414093,
0.5838007926940918,
0.7318748831748962,
-2.1485435962677,
1.26579749584198,
-1.0663301944732666,
0.23073527216911316,
1.4049018621444702,
-0.872884213924408,
0.44089946150779724,
-1.7333928346633911,
-0.020918864756822586,
0.6412500739097595,
-2.2785511016845703,
0.3756844699382782,
-1.3673001527786255,
-0.5955835580825806,
0.970454216003418,
0.43484118580818176,
-1.1946864128112793,
0.10338570177555084,
-0.45492348074913025,
1.0770398378372192,
0.3905802369117737,
1.0059157609939575,
-1.6626189947128296,
-0.08200319111347198,
-0.2791118323802948,
0.06669414043426514,
-1.265127420425415,
-1.569763422012329,
0.6227043271064758,
0.5382482409477234,
0.5322979092597961,
-0.1116260215640068,
1.140803575515747,
-1.2018803358078003,
0.896236777305603,
-1.0846285820007324,
-1.5838544368743896,
-1.4901202917099,
-2.43184232711792,
-2.210423231124878,
0.756136953830719,
-0.4776219427585602,
-0.6194488406181335,
2.0871126651763916,
-1.0300829410552979,
-1.5413446426391602,
1.1273249387741089,
0.11264225095510483,
0.09869854152202606,
2.484649658203125,
0.23940891027450562,
-0.694811224937439,
0.4581020772457123,
-0.8659547567367554,
0.7579700946807861,
-0.32836827635765076,
1.2863659858703613,
0.44744253158569336,
-1.0316115617752075,
1.5212138891220093,
-0.37826281785964966,
0.5758659839630127,
-0.6025196313858032,
-0.6484276056289673,
-0.6698154211044312,
0.18504944443702698,
1.9107261896133423,
-0.2760929763317108,
1.4715163707733154,
-0.21351738274097443,
-1.5131070613861084,
-1.6684982776641846,
0.94871586561203,
0.4136767089366913,
-0.8304245471954346,
0.03413385897874832,
-0.4052230417728424,
0.20242728292942047,
-0.09580901265144348,
1.2212623357772827,
1.3912492990493774,
0.6927112936973572,
-0.39598071575164795,
-0.796586275100708,
0.06213231012225151,
-0.16997651755809784,
-0.807934582233429,
-1.6778289079666138,
-0.36828914284706116,
0.004988500848412514,
0.6745523810386658,
-1.2783533334732056,
1.7908141613006592,
0.9740392565727234,
1.7976175546646118,
1.005743384361267,
-0.3861757814884186,
1.4161320924758911,
0.07285447418689728,
1.7531183958053589,
-0.5968729257583618,
0.6116005778312683,
-0.3870832920074463,
-1.1499518156051636,
0.8325983881950378,
-0.3058929741382599,
-1.9727660417556763,
-0.8592498898506165,
-0.658112645149231,
-0.17955723404884338,
-0.8284613490104675,
0.8956830501556396,
-0.3064762353897095,
-1.4420725107192993,
0.15831446647644043,
-0.7609404921531677,
0.10813166946172714,
-1.2064223289489746,
0.24796102941036224,
0.6053583025932312,
-0.6070586442947388,
0.13956749439239502,
-0.17841996252536774,
-1.1416584253311157,
-0.45191195607185364,
0.26956644654273987,
1.9435794353485107,
-0.6192338466644287,
0.8852331042289734,
1.0225880146026611,
-0.6839213967323303,
-0.01141164917498827,
0.2547655999660492,
-0.19925729930400848,
0.8277426362037659,
-1.068206548690796,
-0.601128339767456,
1.228148341178894,
-0.2397322803735733,
-0.6092174649238586,
1.5238418579101562,
0.6794351935386658,
-1.0468708276748657,
-0.2997138798236847,
-0.08336181193590164,
-0.833061158657074,
0.11311234533786774,
-1.4719207286834717,
-0.16824254393577576,
0.5171988606452942,
-1.5234636068344116,
-0.4392075836658478,
-0.19192513823509216,
1.2885255813598633,
-0.3003147542476654,
1.486128568649292,
-0.3831164240837097,
-0.23162703216075897,
-0.24821865558624268,
-0.45444735884666443,
0.09586096554994583,
-0.16808123886585236,
-0.5733783841133118,
0.10823456197977066,
-0.7914949655532837,
0.3381437063217163,
1.5139882564544678,
0.2878112494945526,
0.019801218062639236,
0.4367561340332031,
1.0983256101608276,
0.4587130546569824,
-0.09698228538036346,
-0.9581583738327026,
-1.4456257820129395,
1.8802257776260376,
-1.4590684175491333,
2.068615436553955,
0.8212223649024963,
-0.026281386613845825,
-1.7487162351608276,
-1.8226990699768066,
1.1516742706298828,
1.1782132387161255,
2.2771756649017334,
0.40532609820365906,
0.3134247958660126,
-0.8462210893630981,
-0.6807505488395691,
0.4207099974155426,
-1.0938934087753296,
-0.640873908996582,
0.26163771748542786,
2.396141290664673,
1.8068068027496338,
-0.3586170971393585,
-0.15664136409759521,
-0.958339512348175,
1.4289530515670776,
-0.10630523413419724,
0.19668178260326385,
1.9755959510803223,
-0.25099167227745056,
-1.129427433013916,
1.30547297000885,
-2.348496913909912,
0.13025842607021332,
2.047374725341797,
0.36770790815353394,
0.11886373907327652,
-1.3121507167816162,
-0.678586483001709,
-0.4935391843318939,
-0.44892728328704834,
-1.1862913370132446,
0.48514842987060547,
-0.223830908536911,
-0.7279843688011169,
-1.3954046964645386,
0.17737743258476257,
-1.0859805345535278,
-1.7070796489715576,
0.22100959718227386,
1.8740278482437134,
2.0785574913024902,
-0.8018633723258972,
1.5072782039642334,
-0.356216162443161,
-0.00722848204895854,
1.1405829191207886,
1.4002742767333984,
3.067270040512085,
1.862062931060791,
-1.2320753335952759,
0.6163856387138367,
-0.28197115659713745,
-0.356868714094162,
1.0593228340148926,
-1.205134630203247,
1.3005306720733643,
-0.06650269031524658,
-1.1250056028366089,
-1.2796930074691772,
0.9845572710037231,
0.4019574820995331,
-0.02296820655465126,
-0.49680015444755554,
1.1714800596237183,
0.16117224097251892,
1.412615180015564,
0.5942213535308838,
-0.28393012285232544,
0.5448395013809204,
-0.3611062169075012,
-0.5591917634010315,
1.581895112991333,
0.18825167417526245,
-1.552565097808838,
-2.2124600410461426,
-0.21820902824401855,
-0.8403242826461792,
0.09896892309188843,
-0.5743108987808228,
-1.1046350002288818,
1.771317481994629,
0.28512337803840637,
-1.3301892280578613,
-0.29397597908973694,
-0.29043644666671753,
-0.5129339694976807,
2.8514764308929443,
-1.3389378786087036,
-0.22278644144535065,
-1.0412224531173706,
-0.7349650263786316,
1.6436527967453003,
-1.2606041431427002,
-0.2322162389755249,
-1.029909372329712,
-0.5749911069869995,
-1.2659093141555786,
-0.4205705523490906,
0.1506645828485489,
-1.044765830039978,
0.756593644618988,
0.21922099590301514,
-1.1885546445846558,
-0.45376142859458923,
-0.8763653039932251,
0.9502125382423401,
-0.12607380747795105,
0.1669514775276184,
1.8997366428375244,
0.2211126685142517,
-0.3661307692527771,
0.7849289178848267,
1.232354760169983,
0.6998476982116699,
-0.6476336717605591,
0.03736204281449318,
-0.6073991060256958,
0.41153672337532043,
-1.2421789169311523,
0.2909506559371948,
-2.855846405029297,
0.5751978158950806,
-0.1428980529308319,
-0.139326274394989,
0.0037333648651838303,
-1.3055846691131592,
1.089276909828186,
2.516417980194092,
-1.1710700988769531,
0.5406186580657959,
0.34306350350379944,
1.150783896446228,
-1.7252641916275024,
0.4170942008495331,
-0.40932825207710266,
2.007960796356201,
0.29473939538002014,
1.247670292854309,
-0.5043915510177612,
-2.3054230213165283,
0.6624969244003296,
-1.169723629951477,
-1.175405502319336,
0.7667428255081177,
-0.8891428709030151,
0.2327609360218048,
-1.3417552709579468,
-0.2880938947200775,
-0.8257377743721008,
-1.2169411182403564,
0.6070302724838257,
0.19510182738304138,
0.3967908024787903,
-0.5501547455787659,
0.3074894845485687,
-2.3337655067443848,
-1.338598608970642,
-0.181891068816185,
-0.954897940158844,
0.5429457426071167,
-0.5196595788002014,
0.6045198440551758,
-0.18666496872901917,
0.022817235440015793,
0.37711402773857117,
1.6023480892181396,
3.4715356826782227,
0.2294655740261078,
0.3667403757572174,
-0.19931809604167938,
-0.9446205496788025,
1.4558091163635254,
0.8502161502838135,
-0.011930732056498528,
-0.5677042603492737,
-1.1018576622009277,
1.2650928497314453,
1.8703148365020752,
0.8579816818237305,
0.006624261848628521,
-0.8992134928703308,
-0.6988853216171265,
-0.10627122223377228,
0.1854594349861145,
0.43487298488616943,
0.9915828108787537,
0.08481918275356293,
0.06494682282209396,
1.5091345310211182,
1.1924244165420532,
-0.4353758692741394,
0.2122580111026764,
-0.8536537885665894,
-0.5064213275909424,
0.442373126745224,
0.2660282254219055,
-0.03386784344911575,
0.40313851833343506,
-0.9574445486068726,
-0.3025586009025574,
-0.40843552350997925,
-0.8513622283935547,
-0.706358015537262,
-0.34240278601646423,
-0.369587779045105,
1.653351068496704,
0.1485770046710968,
-0.4890657365322113,
0.05063233897089958,
-0.7544613480567932,
-0.23459091782569885,
-1.1339466571807861,
0.16330891847610474,
-0.039904676377773285,
-0.16694825887680054,
-0.16299226880073547,
1.7850841283798218,
-0.8222984671592712,
-2.0617220401763916,
0.20578625798225403,
0.3090533912181854,
-0.17269212007522583,
0.2432839721441269,
1.6788256168365479,
0.5067756175994873,
1.397024393081665,
1.1521655321121216,
0.8528211116790771,
-0.6536673307418823,
-1.3749887943267822,
0.6705025434494019,
0.9936473965644836,
-1.3593237400054932,
0.8204143643379211,
-0.10082406550645828,
-0.4699707627296448,
0.5406363010406494,
1.250423789024353,
0.5519131422042847,
-1.8635311126708984,
0.8320286273956299,
-1.0300405025482178,
0.8205404281616211,
0.7715244293212891,
0.5933933258056641,
0.28946030139923096,
0.8888077735900879,
-1.1311750411987305,
-1.0995417833328247,
-0.632936418056488,
-0.6719866394996643,
1.9834356307983398,
-0.3848063051700592,
0.6555883288383484,
-0.3200777471065521,
-1.1808092594146729,
-0.022706439718604088,
0.6838347315788269,
0.300097793340683,
-0.4840586483478546,
0.8052082061767578,
-0.6578683257102966,
-1.0145981311798096,
-1.3987582921981812,
-0.420034259557724,
-1.0667821168899536,
-1.0531152486801147,
1.0615514516830444,
0.6488471031188965,
0.23384737968444824,
1.9418772459030151,
0.6681405901908875,
0.3030775785446167,
-2.6191203594207764,
0.9135653376579285,
0.1960386037826538,
-0.06719888746738434,
0.9276453256607056,
0.3964143693447113,
1.0369541645050049,
-0.011048458516597748,
0.564652681350708,
-2.611013889312744,
2.4648382663726807,
-0.20770877599716187,
0.7002184987068176,
-0.0030304407700896263,
-0.15537641942501068,
1.2220920324325562,
0.7446466684341431,
0.45566293597221375,
-0.9880445599555969,
0.5504430532455444,
-0.4603792428970337,
1.2721587419509888,
0.9261371493339539,
-0.7611104249954224,
0.03342800587415695,
1.3681354522705078,
0.46894583106040955,
-0.5448862314224243,
-0.8979023098945618,
-0.9380680322647095,
0.8863649964332581,
1.6463117599487305,
0.05822955444455147,
-0.09946153312921524,
0.7529035210609436,
0.6436724066734314,
-1.1331672668457031,
0.14681550860404968,
-0.6452655792236328,
-0.8119540214538574,
1.5799511671066284,
2.1382503509521484,
-0.23192119598388672,
-0.28918221592903137,
-0.5750441551208496,
-1.3190793991088867,
0.8174566030502319,
-0.117610864341259,
0.24503667652606964,
0.5737009048461914,
-0.6364841461181641,
0.9574986100196838,
0.7477654218673706,
0.9489403367042542,
0.3501237630844116,
0.269915372133255,
0.49737653136253357,
-0.41991451382637024,
-1.2045860290527344,
-0.19706368446350098,
-1.1312448978424072,
-2.6780598163604736,
0.33186113834381104,
-0.18064408004283905,
-1.3287299871444702,
0.0726185142993927,
-1.0647003650665283,
0.884101390838623,
-0.5971385836601257,
-1.1655724048614502,
-1.5572155714035034,
0.1718830168247223,
-0.02338240295648575,
1.0227564573287964,
-1.6573315858840942,
-0.35958123207092285,
1.1910192966461182,
0.8564037680625916,
-0.6925899982452393,
0.9970847964286804,
0.14927923679351807,
1.074399709701538,
0.7600527405738831,
-0.3905036747455597,
0.6111978888511658,
-0.026472654193639755,
-1.4109528064727783,
0.4413536787033081,
1.2352097034454346,
0.21669599413871765,
1.5641940832138062,
-0.44693416357040405,
0.05678967013955116,
0.3939855396747589,
-0.6565974354743958,
-0.4774147868156433,
-0.3414765000343323,
0.6019358038902283,
0.07490292191505432,
-0.9661206007003784,
-0.15737134218215942,
-0.12767358124256134,
-0.33729127049446106,
0.12532252073287964,
-1.4018192291259766,
-0.07809244096279144,
-0.46611538529396057,
-0.5685551762580872,
-1.2634462118148804,
-0.11805418878793716,
1.4577691555023193,
-0.7714223861694336,
-0.19013264775276184,
0.4528930187225342,
0.3303546607494354,
0.5692138671875,
0.6734241247177124,
-0.8117832541465759,
-0.3443828225135803,
-0.18232908844947815,
-0.28428223729133606,
0.4027043282985687,
1.3699616193771362,
-0.12743623554706573,
-0.9324235916137695,
0.5780648589134216,
-0.3126261830329895,
0.20374062657356262,
1.9602323770523071,
0.0056863874197006226,
-0.7101069688796997,
0.2879994213581085,
-0.743246853351593,
1.9275325536727905,
1.6870074272155762,
1.2264958620071411,
-0.14525417983531952,
-0.7520086169242859,
0.6750775575637817,
-0.38058266043663025,
-0.40867868065834045,
0.7809416651725769,
0.35470050573349,
-0.29525625705718994,
-1.5116868019104004,
0.7283598184585571,
1.220524549484253,
-0.7905014157295227,
-0.8115811347961426,
0.25347191095352173,
-0.7324830889701843,
1.1477668285369873,
0.44358399510383606,
0.3662671148777008,
0.4008429944515228,
1.756262183189392,
0.8416955471038818,
-0.46977323293685913,
0.49285784363746643,
0.49540600180625916,
-0.2389296293258667,
-2.212528944015503,
-1.211923360824585,
0.33143556118011475,
-0.6675859689712524,
-1.4883168935775757,
1.4561843872070312,
-1.040603518486023,
-1.0379928350448608,
0.6475904583930969,
0.026186726987361908,
1.3066738843917847,
0.37442919611930847,
1.52812659740448,
2.0507290363311768,
0.7600387930870056,
0.4888528287410736,
1.1835020780563354,
-0.14073699712753296,
-0.5435897707939148,
1.828083872795105,
-0.44397076964378357,
0.4571555256843567,
1.103629469871521,
-0.2834538519382477,
-1.1222103834152222,
-0.7265709042549133,
-1.2760272026062012,
-0.7567479610443115,
1.1877267360687256,
0.10537919402122498,
-1.0554097890853882,
0.24973644316196442,
1.5414243936538696,
0.05845880135893822,
-0.31255608797073364,
0.6429970264434814,
0.34352749586105347,
-0.7382293939590454,
-0.04641076549887657,
-0.883734405040741,
0.5959120392799377,
-0.2212488353252411,
-0.4114302396774292,
0.21432004868984222,
0.45389485359191895,
1.4396932125091553,
-0.09223514050245285,
0.1796765774488449,
1.0324487686157227,
-1.5340139865875244,
1.5660147666931152,
-0.5847309827804565,
0.2995780110359192,
-2.271230459213257,
1.3330049514770508,
-0.6904618740081787,
1.9573380947113037,
-2.6406803131103516,
0.4293549954891205,
-0.508124589920044,
-0.5781145691871643,
0.2724432051181793,
-0.39047372341156006,
0.23449762165546417,
-0.1429455727338791,
-1.1181399822235107,
0.05900353565812111,
-0.6181113719940186,
0.6492123603820801,
1.0817115306854248,
1.4104602336883545,
-1.1568926572799683,
-0.21250934898853302,
-1.7247936725616455,
-0.003511173650622368,
-0.8620354533195496,
0.20145542919635773,
-2.015995979309082,
-0.1968335658311844,
-1.8495734930038452,
-2.3492298126220703,
-1.2252029180526733,
-0.7684635519981384,
1.0481961965560913,
0.2083732634782791,
-0.8613174557685852,
1.375710129737854,
-0.2771034836769104,
-1.7856266498565674,
1.1283111572265625,
-2.1162891387939453
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | Thanks for reporting!
Specifying the target features explicitly should avoid this error:
```python
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
features=datasets.Features({"texts": datasets.Sequence(datasets.Value("string"))})
)
```
This error stems from our type promotion not handling the nested case. But this promotion/casting allocates memory in most scenarios, which can be problematic for large datasets, so explicitly passing the features is the optimal solution. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 93 | 61 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
Thanks for reporting!
Specifying the target features explicitly should avoid this error:
```python
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
features=datasets.Features({"texts": datasets.Sequence(datasets.Value("string"))})
)
```
This error stems from our type promotion not handling the nested case. But this promotion/casting allocates memory in most scenarios, which can be problematic for large datasets, so explicitly passing the features is the optimal solution. | [
-1.2985907793045044,
-0.9267287254333496,
-0.8369069695472717,
1.5886588096618652,
-0.14439642429351807,
-1.2454571723937988,
0.09860274940729141,
-1.0885096788406372,
1.6895076036453247,
-0.82481449842453,
0.3724417984485626,
-1.6597967147827148,
0.105898417532444,
-0.6402835249900818,
-0.8305851817131042,
-0.857441246509552,
-0.4628458321094513,
-0.6678993701934814,
1.0556823015213013,
2.506619453430176,
1.2020514011383057,
-1.5332905054092407,
2.711271047592163,
0.7533167600631714,
-0.1400606483221054,
-0.9915424585342407,
0.490201860666275,
0.004855241626501083,
-1.2866060733795166,
-0.4336113929748535,
-0.95222008228302,
-0.05474454164505005,
-0.5237808227539062,
-0.5302958488464355,
-0.040886010974645615,
0.4677298665046692,
-0.2647625505924225,
-0.4626535475254059,
-0.6116095185279846,
-0.7539842128753662,
0.4230386018753052,
-0.31062987446784973,
0.9372473359107971,
-0.2629343271255493,
1.7723318338394165,
-0.5383051633834839,
0.4302073121070862,
0.7109066843986511,
1.4519753456115723,
0.17891448736190796,
-0.005793728865683079,
0.35893353819847107,
0.3497188687324524,
-0.10899192094802856,
0.5117256045341492,
1.2120026350021362,
0.7107320427894592,
0.48652464151382446,
0.7909186482429504,
-2.15018892288208,
1.3636338710784912,
-1.113553524017334,
0.39914804697036743,
1.3078314065933228,
-1.0150877237319946,
0.294615775346756,
-1.7613714933395386,
-0.09161873161792755,
0.6080009937286377,
-2.2382166385650635,
0.3036453425884247,
-1.1903995275497437,
-0.46505290269851685,
1.004631519317627,
0.35340458154678345,
-1.2022852897644043,
0.17023220658302307,
-0.45808666944503784,
1.0384801626205444,
0.3909091055393219,
1.1231733560562134,
-1.744705080986023,
0.061435140669345856,
-0.2722025513648987,
0.10916394740343094,
-1.2204456329345703,
-1.5984692573547363,
0.5510377883911133,
0.6602328419685364,
0.5676543712615967,
-0.09744244813919067,
0.9699937701225281,
-1.0912606716156006,
0.7693831324577332,
-0.9733037948608398,
-1.6385103464126587,
-1.4411014318466187,
-2.2992212772369385,
-2.170001268386841,
0.6910991072654724,
-0.47560441493988037,
-0.6067492365837097,
2.1013336181640625,
-0.9639813303947449,
-1.6731855869293213,
1.1270800828933716,
0.2246619611978531,
0.053567372262477875,
2.430847406387329,
0.16543622314929962,
-0.7632919549942017,
0.5100871324539185,
-0.7238879799842834,
0.8439627885818481,
-0.37888291478157043,
1.315221905708313,
0.4316851496696472,
-0.9838986992835999,
1.6286532878875732,
-0.3212954103946686,
0.49006378650665283,
-0.6485760807991028,
-0.4865405559539795,
-0.724682629108429,
0.37321069836616516,
1.8204103708267212,
-0.300319105386734,
1.5307798385620117,
-0.3285508453845978,
-1.5091099739074707,
-1.6466025114059448,
0.9347464442253113,
0.5834619998931885,
-0.7230839133262634,
0.12637849152088165,
-0.4431934654712677,
0.1629071980714798,
-0.11249500513076782,
1.191419243812561,
1.2291195392608643,
0.6356744170188904,
-0.37251031398773193,
-0.9164263606071472,
0.15456590056419373,
-0.07971448451280594,
-0.7256786823272705,
-1.7475810050964355,
-0.2918073832988739,
0.1907857060432434,
0.65353924036026,
-1.204881191253662,
1.7829476594924927,
0.9021657109260559,
1.8846298456192017,
1.0018566846847534,
-0.3060522675514221,
1.435085415840149,
0.04823146387934685,
1.7965445518493652,
-0.5244499444961548,
0.6683063507080078,
-0.30217576026916504,
-1.1218504905700684,
0.8729066848754883,
-0.3575437068939209,
-2.0980892181396484,
-0.7972162365913391,
-0.753498911857605,
-0.14308689534664154,
-0.7398854494094849,
1.0308377742767334,
-0.3040805459022522,
-1.3399211168289185,
0.25710782408714294,
-0.7166621088981628,
0.10926763713359833,
-1.182822346687317,
0.2575671970844269,
0.5954967737197876,
-0.640868067741394,
0.06450155377388,
-0.2140519618988037,
-1.3077874183654785,
-0.4330248534679413,
0.2631135880947113,
1.9185047149658203,
-0.7563229203224182,
0.8643680214881897,
1.0465258359909058,
-0.6520311236381531,
-0.01362437754869461,
0.31320321559906006,
-0.34723755717277527,
1.0033107995986938,
-1.0795605182647705,
-0.5039026141166687,
1.190269947052002,
-0.13337957859039307,
-0.5596657395362854,
1.5067576169967651,
0.654680609703064,
-0.9348692297935486,
-0.25738072395324707,
-0.08318561315536499,
-0.9467619061470032,
0.0695967897772789,
-1.6042488813400269,
-0.12825436890125275,
0.4477936923503876,
-1.602195143699646,
-0.4562782943248749,
-0.1694020926952362,
1.2720801830291748,
-0.2032938003540039,
1.4403109550476074,
-0.3551887571811676,
-0.09159315377473831,
-0.3293093144893646,
-0.33214205503463745,
0.08593139797449112,
-0.1406273990869522,
-0.5879557728767395,
0.18693140149116516,
-0.8177807927131653,
0.3467068076133728,
1.4170355796813965,
0.39129579067230225,
0.11575648188591003,
0.5235120058059692,
1.125555157661438,
0.357972115278244,
-0.06964004039764404,
-0.8099437355995178,
-1.5472415685653687,
2.022566556930542,
-1.4557528495788574,
2.040156364440918,
0.8343071341514587,
0.007068387232720852,
-1.7888849973678589,
-1.856006145477295,
1.4633420705795288,
1.2057708501815796,
2.408007860183716,
0.5014539361000061,
0.3827192187309265,
-0.8163942098617554,
-0.6103691458702087,
0.31608012318611145,
-1.0296249389648438,
-0.7472514510154724,
0.1729574054479599,
2.347461223602295,
1.848684310913086,
-0.3710002601146698,
-0.17968638241291046,
-1.011318564414978,
1.337084412574768,
-0.19007042050361633,
0.17950524389743805,
1.9062856435775757,
-0.2031944990158081,
-1.034480333328247,
1.2808418273925781,
-2.410008668899536,
0.11523789912462234,
1.9898951053619385,
0.313675194978714,
0.09194256365299225,
-1.3139971494674683,
-0.568689227104187,
-0.3719123899936676,
-0.39085152745246887,
-1.2532974481582642,
0.5975121855735779,
-0.24819886684417725,
-0.821467936038971,
-1.3869191408157349,
0.20084498822689056,
-1.1813571453094482,
-1.6675622463226318,
0.2926473617553711,
1.8372639417648315,
2.166182041168213,
-0.8316110372543335,
1.623299241065979,
-0.31980329751968384,
0.2179000824689865,
1.148813009262085,
1.1991451978683472,
3.0726003646850586,
1.8576879501342773,
-1.3281970024108887,
0.5341362357139587,
-0.15376147627830505,
-0.45173150300979614,
1.0890263319015503,
-1.2639516592025757,
1.2838454246520996,
-0.07710655778646469,
-1.2077900171279907,
-1.192153811454773,
1.0135475397109985,
0.4728859066963196,
0.02409755438566208,
-0.5247027277946472,
1.1644861698150635,
0.00010141171514987946,
1.3400753736495972,
0.5970748066902161,
-0.2691934108734131,
0.5172516107559204,
-0.4364621937274933,
-0.5368980765342712,
1.5539023876190186,
0.08326764404773712,
-1.455985426902771,
-2.2521936893463135,
-0.14221163094043732,
-0.8083841800689697,
0.07044165581464767,
-0.6714946031570435,
-1.0345983505249023,
1.7026418447494507,
0.2705955505371094,
-1.2773083448410034,
-0.3084907531738281,
-0.3964633345603943,
-0.6253989338874817,
2.6536810398101807,
-1.374171257019043,
-0.313547819852829,
-1.053989052772522,
-0.6233115196228027,
1.6236518621444702,
-1.1374412775039673,
-0.21116256713867188,
-1.02310049533844,
-0.590596079826355,
-1.2977180480957031,
-0.5497629046440125,
0.008357002399861813,
-0.9014479517936707,
0.7411566972732544,
0.1576886624097824,
-1.186486005783081,
-0.31449225544929504,
-0.7887275815010071,
0.8692007064819336,
-0.19493603706359863,
0.2015620321035385,
1.8073365688323975,
0.40083447098731995,
-0.33169499039649963,
0.7598397135734558,
1.2367769479751587,
0.6966572403907776,
-0.5882166028022766,
0.11123427003622055,
-0.6186265349388123,
0.36093151569366455,
-1.3127418756484985,
0.2945638597011566,
-2.8112709522247314,
0.6708303689956665,
-0.0046733058989048,
-0.04276588559150696,
0.00007204432040452957,
-1.289366602897644,
1.1116644144058228,
2.6533491611480713,
-1.2097854614257812,
0.4482062757015228,
0.3628636300563812,
1.1599007844924927,
-1.5997507572174072,
0.3347401022911072,
-0.4372861683368683,
2.1294989585876465,
0.19221541285514832,
1.1923351287841797,
-0.48000583052635193,
-2.243983745574951,
0.606026828289032,
-1.336493968963623,
-1.1515378952026367,
0.7665218710899353,
-0.8952502012252808,
0.2130245864391327,
-1.449036955833435,
-0.2499333769083023,
-0.905393123626709,
-1.1172236204147339,
0.6775263547897339,
0.053730495274066925,
0.33606773614883423,
-0.6304527521133423,
0.3179716467857361,
-2.185148000717163,
-1.3195253610610962,
-0.21996164321899414,
-1.0153136253356934,
0.5053921341896057,
-0.40437692403793335,
0.7403178811073303,
-0.16319769620895386,
0.025136716663837433,
0.320801317691803,
1.37566077709198,
3.456914186477661,
0.26669439673423767,
0.3908328413963318,
-0.2258804887533188,
-0.8739920854568481,
1.4620951414108276,
0.9311540722846985,
-0.11838424950838089,
-0.5903385877609253,
-1.0465960502624512,
1.3282901048660278,
1.9191842079162598,
0.9282707571983337,
0.005185240879654884,
-0.8662284016609192,
-0.7174929976463318,
0.0007259612902998924,
0.14289066195487976,
0.38333097100257874,
0.9060524702072144,
-0.002241989132016897,
0.026850592344999313,
1.5101819038391113,
1.2218595743179321,
-0.4196956753730774,
0.3274066150188446,
-0.8603459596633911,
-0.43900808691978455,
0.4823092818260193,
0.3065623641014099,
0.013712103478610516,
0.39616164565086365,
-1.0277444124221802,
-0.314547061920166,
-0.42016878724098206,
-0.8974500298500061,
-0.6720967888832092,
-0.39863425493240356,
-0.32573944330215454,
1.7253775596618652,
0.16685612499713898,
-0.5554803609848022,
-0.03579207509756088,
-0.7903496026992798,
-0.12561705708503723,
-1.047523856163025,
0.3140750527381897,
-0.084393210709095,
-0.133726105093956,
-0.17098650336265564,
1.8101507425308228,
-0.8919436931610107,
-2.147474527359009,
0.2427135854959488,
0.24158309400081635,
-0.3152279853820801,
0.14667953550815582,
1.6729931831359863,
0.5681214332580566,
1.4217219352722168,
1.364059567451477,
0.8652629256248474,
-0.6969408988952637,
-1.2948566675186157,
0.6935797333717346,
1.0085864067077637,
-1.3980201482772827,
0.8404038548469543,
-0.10280831903219223,
-0.5588845610618591,
0.6063855290412903,
1.3465893268585205,
0.493252694606781,
-2.0152783393859863,
0.8316147327423096,
-0.9499216079711914,
0.7751625776290894,
0.6444974541664124,
0.6027455925941467,
0.18580801784992218,
0.7603845000267029,
-1.2470669746398926,
-1.174184799194336,
-0.7681983113288879,
-0.7070483565330505,
1.9678714275360107,
-0.327117383480072,
0.6285597085952759,
-0.2063278704881668,
-1.3519561290740967,
-0.14356237649917603,
0.681030809879303,
0.309135377407074,
-0.4336215853691101,
0.8704191446304321,
-0.6871887445449829,
-1.1060746908187866,
-1.3767279386520386,
-0.4046643078327179,
-0.9688367247581482,
-0.8977196216583252,
1.116520643234253,
0.7663977146148682,
0.3020358085632324,
1.901672124862671,
0.7169406414031982,
0.17776693403720856,
-2.503521680831909,
0.8395881652832031,
0.3658256232738495,
-0.0996040403842926,
0.8448334336280823,
0.38179251551628113,
0.94901442527771,
0.04276307672262192,
0.5034083127975464,
-2.421308755874634,
2.2346622943878174,
-0.18791130185127258,
0.7509867548942566,
-0.08073457330465317,
-0.2200785130262375,
1.0912336111068726,
0.5537135004997253,
0.5312159657478333,
-1.01982581615448,
0.5992252230644226,
-0.5278802514076233,
1.2477344274520874,
0.843262791633606,
-0.713264524936676,
-0.08799192309379578,
1.3030426502227783,
0.49311554431915283,
-0.5102707743644714,
-1.001108169555664,
-0.8582352995872498,
0.9615069627761841,
1.7880089282989502,
-0.005894489586353302,
0.06010184437036514,
0.7843865156173706,
0.6330240368843079,
-1.214956283569336,
-0.02118889056146145,
-0.7882879376411438,
-0.8197891712188721,
1.6748170852661133,
2.0856997966766357,
-0.2140486240386963,
-0.20863021910190582,
-0.6316953897476196,
-1.3180866241455078,
0.793519139289856,
-0.14931470155715942,
0.17407239973545074,
0.6527786254882812,
-0.6362492442131042,
1.012874960899353,
0.8503817319869995,
0.9042131900787354,
0.10642751306295395,
0.1968083530664444,
0.43146687746047974,
-0.3059348165988922,
-1.1368920803070068,
-0.2487216740846634,
-1.1357938051223755,
-2.4648189544677734,
0.37872597575187683,
-0.21201808750629425,
-1.4058271646499634,
0.01808587834239006,
-0.9699106812477112,
0.9867225289344788,
-0.48214027285575867,
-1.0514386892318726,
-1.5104814767837524,
0.23515033721923828,
-0.01948671229183674,
0.9662050008773804,
-1.5726152658462524,
-0.20666836202144623,
1.1835436820983887,
0.8885385394096375,
-0.6768686771392822,
0.9846268892288208,
0.1965656727552414,
1.0597633123397827,
0.8316989541053772,
-0.4004698097705841,
0.4796369671821594,
0.06970851868391037,
-1.3329979181289673,
0.5183899998664856,
1.107794165611267,
0.11480586975812912,
1.495187759399414,
-0.4167396128177643,
-0.05515557527542114,
0.42304375767707825,
-0.5743582844734192,
-0.42176780104637146,
-0.49581924080848694,
0.721985936164856,
0.03289152309298515,
-0.8921493291854858,
-0.09615308046340942,
-0.009704195894300938,
-0.30482447147369385,
0.17850492894649506,
-1.5073727369308472,
-0.1090635284781456,
-0.39824873208999634,
-0.6334313154220581,
-1.2097821235656738,
-0.08446558564901352,
1.4075325727462769,
-0.8307328224182129,
-0.2509987950325012,
0.462909996509552,
0.44931238889694214,
0.5176354646682739,
0.7305521965026855,
-0.6367781162261963,
-0.3496297001838684,
-0.19330675899982452,
-0.34529340267181396,
0.352260023355484,
1.3233716487884521,
-0.13216331601142883,
-0.903475821018219,
0.685526430606842,
-0.3317953944206238,
0.036826204508543015,
1.873707890510559,
0.08104118704795837,
-0.7680811285972595,
0.37539011240005493,
-0.6875462532043457,
1.937465786933899,
1.7116830348968506,
1.306148648262024,
-0.16160085797309875,
-0.9551324248313904,
0.6784752011299133,
-0.3614403009414673,
-0.4038184881210327,
0.856834352016449,
0.37712910771369934,
-0.16394786536693573,
-1.5491994619369507,
0.6549744009971619,
1.2325479984283447,
-0.8825353384017944,
-0.8066456913948059,
0.09262505173683167,
-0.8063204288482666,
1.0741462707519531,
0.6530025601387024,
0.37012866139411926,
0.318053275346756,
1.6606905460357666,
0.7915253639221191,
-0.5109909176826477,
0.4508340656757355,
0.5811027884483337,
-0.15401591360569,
-2.159181833267212,
-1.1269842386245728,
0.23683713376522064,
-0.4740442931652069,
-1.5185623168945312,
1.29901123046875,
-1.1659657955169678,
-0.9858759045600891,
0.5173313021659851,
0.00917822029441595,
1.4127693176269531,
0.3377137780189514,
1.5567580461502075,
2.0666182041168213,
0.8315495848655701,
0.36854037642478943,
1.3062641620635986,
-0.17163927853107452,
-0.45751067996025085,
1.8363643884658813,
-0.4547731876373291,
0.4625938832759857,
1.0881049633026123,
-0.33405959606170654,
-1.1347506046295166,
-0.7322438955307007,
-1.2141001224517822,
-0.7867571711540222,
1.126724362373352,
0.0293772853910923,
-1.1318315267562866,
0.2832834720611572,
1.575126051902771,
0.12032480537891388,
-0.37620851397514343,
0.5024079084396362,
0.4091237485408783,
-0.7536768317222595,
-0.10161325335502625,
-0.8094041347503662,
0.6084088683128357,
-0.21503715217113495,
-0.3439335525035858,
0.3577706813812256,
0.4309636056423187,
1.3509477376937866,
-0.03221989795565605,
0.17802831530570984,
1.1183643341064453,
-1.5115100145339966,
1.4312421083450317,
-0.6013274788856506,
0.2871963381767273,
-2.393439292907715,
1.4377273321151733,
-0.730556070804596,
1.985466718673706,
-2.772545099258423,
0.49579739570617676,
-0.6119492053985596,
-0.5176381468772888,
0.3142983317375183,
-0.2982322871685028,
0.13951124250888824,
-0.12301289290189743,
-1.1110882759094238,
-0.09247075766324997,
-0.550094723701477,
0.6007397174835205,
1.1553544998168945,
1.2565302848815918,
-1.0408310890197754,
-0.2276003509759903,
-1.6616857051849365,
-0.1704186499118805,
-0.7540231943130493,
0.14082874357700348,
-2.039489507675171,
-0.15521495044231415,
-1.9049155712127686,
-2.362349033355713,
-1.3328328132629395,
-0.8062987923622131,
1.122866153717041,
0.24659894406795502,
-0.9822059273719788,
1.2836687564849854,
-0.43340015411376953,
-1.8301459550857544,
1.1420960426330566,
-2.2007734775543213
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | Hi @mariosasko thanks for the context, this is helpful to know. Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Feels like something that would be easy to implement and could save memory / deal with this case in a standardized way. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 93 | 61 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
Hi @mariosasko thanks for the context, this is helpful to know. Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Feels like something that would be easy to implement and could save memory / deal with this case in a standardized way. | [
-1.2985907793045044,
-0.9267287254333496,
-0.8369069695472717,
1.5886588096618652,
-0.14439642429351807,
-1.2454571723937988,
0.09860274940729141,
-1.0885096788406372,
1.6895076036453247,
-0.82481449842453,
0.3724417984485626,
-1.6597967147827148,
0.105898417532444,
-0.6402835249900818,
-0.8305851817131042,
-0.857441246509552,
-0.4628458321094513,
-0.6678993701934814,
1.0556823015213013,
2.506619453430176,
1.2020514011383057,
-1.5332905054092407,
2.711271047592163,
0.7533167600631714,
-0.1400606483221054,
-0.9915424585342407,
0.490201860666275,
0.004855241626501083,
-1.2866060733795166,
-0.4336113929748535,
-0.95222008228302,
-0.05474454164505005,
-0.5237808227539062,
-0.5302958488464355,
-0.040886010974645615,
0.4677298665046692,
-0.2647625505924225,
-0.4626535475254059,
-0.6116095185279846,
-0.7539842128753662,
0.4230386018753052,
-0.31062987446784973,
0.9372473359107971,
-0.2629343271255493,
1.7723318338394165,
-0.5383051633834839,
0.4302073121070862,
0.7109066843986511,
1.4519753456115723,
0.17891448736190796,
-0.005793728865683079,
0.35893353819847107,
0.3497188687324524,
-0.10899192094802856,
0.5117256045341492,
1.2120026350021362,
0.7107320427894592,
0.48652464151382446,
0.7909186482429504,
-2.15018892288208,
1.3636338710784912,
-1.113553524017334,
0.39914804697036743,
1.3078314065933228,
-1.0150877237319946,
0.294615775346756,
-1.7613714933395386,
-0.09161873161792755,
0.6080009937286377,
-2.2382166385650635,
0.3036453425884247,
-1.1903995275497437,
-0.46505290269851685,
1.004631519317627,
0.35340458154678345,
-1.2022852897644043,
0.17023220658302307,
-0.45808666944503784,
1.0384801626205444,
0.3909091055393219,
1.1231733560562134,
-1.744705080986023,
0.061435140669345856,
-0.2722025513648987,
0.10916394740343094,
-1.2204456329345703,
-1.5984692573547363,
0.5510377883911133,
0.6602328419685364,
0.5676543712615967,
-0.09744244813919067,
0.9699937701225281,
-1.0912606716156006,
0.7693831324577332,
-0.9733037948608398,
-1.6385103464126587,
-1.4411014318466187,
-2.2992212772369385,
-2.170001268386841,
0.6910991072654724,
-0.47560441493988037,
-0.6067492365837097,
2.1013336181640625,
-0.9639813303947449,
-1.6731855869293213,
1.1270800828933716,
0.2246619611978531,
0.053567372262477875,
2.430847406387329,
0.16543622314929962,
-0.7632919549942017,
0.5100871324539185,
-0.7238879799842834,
0.8439627885818481,
-0.37888291478157043,
1.315221905708313,
0.4316851496696472,
-0.9838986992835999,
1.6286532878875732,
-0.3212954103946686,
0.49006378650665283,
-0.6485760807991028,
-0.4865405559539795,
-0.724682629108429,
0.37321069836616516,
1.8204103708267212,
-0.300319105386734,
1.5307798385620117,
-0.3285508453845978,
-1.5091099739074707,
-1.6466025114059448,
0.9347464442253113,
0.5834619998931885,
-0.7230839133262634,
0.12637849152088165,
-0.4431934654712677,
0.1629071980714798,
-0.11249500513076782,
1.191419243812561,
1.2291195392608643,
0.6356744170188904,
-0.37251031398773193,
-0.9164263606071472,
0.15456590056419373,
-0.07971448451280594,
-0.7256786823272705,
-1.7475810050964355,
-0.2918073832988739,
0.1907857060432434,
0.65353924036026,
-1.204881191253662,
1.7829476594924927,
0.9021657109260559,
1.8846298456192017,
1.0018566846847534,
-0.3060522675514221,
1.435085415840149,
0.04823146387934685,
1.7965445518493652,
-0.5244499444961548,
0.6683063507080078,
-0.30217576026916504,
-1.1218504905700684,
0.8729066848754883,
-0.3575437068939209,
-2.0980892181396484,
-0.7972162365913391,
-0.753498911857605,
-0.14308689534664154,
-0.7398854494094849,
1.0308377742767334,
-0.3040805459022522,
-1.3399211168289185,
0.25710782408714294,
-0.7166621088981628,
0.10926763713359833,
-1.182822346687317,
0.2575671970844269,
0.5954967737197876,
-0.640868067741394,
0.06450155377388,
-0.2140519618988037,
-1.3077874183654785,
-0.4330248534679413,
0.2631135880947113,
1.9185047149658203,
-0.7563229203224182,
0.8643680214881897,
1.0465258359909058,
-0.6520311236381531,
-0.01362437754869461,
0.31320321559906006,
-0.34723755717277527,
1.0033107995986938,
-1.0795605182647705,
-0.5039026141166687,
1.190269947052002,
-0.13337957859039307,
-0.5596657395362854,
1.5067576169967651,
0.654680609703064,
-0.9348692297935486,
-0.25738072395324707,
-0.08318561315536499,
-0.9467619061470032,
0.0695967897772789,
-1.6042488813400269,
-0.12825436890125275,
0.4477936923503876,
-1.602195143699646,
-0.4562782943248749,
-0.1694020926952362,
1.2720801830291748,
-0.2032938003540039,
1.4403109550476074,
-0.3551887571811676,
-0.09159315377473831,
-0.3293093144893646,
-0.33214205503463745,
0.08593139797449112,
-0.1406273990869522,
-0.5879557728767395,
0.18693140149116516,
-0.8177807927131653,
0.3467068076133728,
1.4170355796813965,
0.39129579067230225,
0.11575648188591003,
0.5235120058059692,
1.125555157661438,
0.357972115278244,
-0.06964004039764404,
-0.8099437355995178,
-1.5472415685653687,
2.022566556930542,
-1.4557528495788574,
2.040156364440918,
0.8343071341514587,
0.007068387232720852,
-1.7888849973678589,
-1.856006145477295,
1.4633420705795288,
1.2057708501815796,
2.408007860183716,
0.5014539361000061,
0.3827192187309265,
-0.8163942098617554,
-0.6103691458702087,
0.31608012318611145,
-1.0296249389648438,
-0.7472514510154724,
0.1729574054479599,
2.347461223602295,
1.848684310913086,
-0.3710002601146698,
-0.17968638241291046,
-1.011318564414978,
1.337084412574768,
-0.19007042050361633,
0.17950524389743805,
1.9062856435775757,
-0.2031944990158081,
-1.034480333328247,
1.2808418273925781,
-2.410008668899536,
0.11523789912462234,
1.9898951053619385,
0.313675194978714,
0.09194256365299225,
-1.3139971494674683,
-0.568689227104187,
-0.3719123899936676,
-0.39085152745246887,
-1.2532974481582642,
0.5975121855735779,
-0.24819886684417725,
-0.821467936038971,
-1.3869191408157349,
0.20084498822689056,
-1.1813571453094482,
-1.6675622463226318,
0.2926473617553711,
1.8372639417648315,
2.166182041168213,
-0.8316110372543335,
1.623299241065979,
-0.31980329751968384,
0.2179000824689865,
1.148813009262085,
1.1991451978683472,
3.0726003646850586,
1.8576879501342773,
-1.3281970024108887,
0.5341362357139587,
-0.15376147627830505,
-0.45173150300979614,
1.0890263319015503,
-1.2639516592025757,
1.2838454246520996,
-0.07710655778646469,
-1.2077900171279907,
-1.192153811454773,
1.0135475397109985,
0.4728859066963196,
0.02409755438566208,
-0.5247027277946472,
1.1644861698150635,
0.00010141171514987946,
1.3400753736495972,
0.5970748066902161,
-0.2691934108734131,
0.5172516107559204,
-0.4364621937274933,
-0.5368980765342712,
1.5539023876190186,
0.08326764404773712,
-1.455985426902771,
-2.2521936893463135,
-0.14221163094043732,
-0.8083841800689697,
0.07044165581464767,
-0.6714946031570435,
-1.0345983505249023,
1.7026418447494507,
0.2705955505371094,
-1.2773083448410034,
-0.3084907531738281,
-0.3964633345603943,
-0.6253989338874817,
2.6536810398101807,
-1.374171257019043,
-0.313547819852829,
-1.053989052772522,
-0.6233115196228027,
1.6236518621444702,
-1.1374412775039673,
-0.21116256713867188,
-1.02310049533844,
-0.590596079826355,
-1.2977180480957031,
-0.5497629046440125,
0.008357002399861813,
-0.9014479517936707,
0.7411566972732544,
0.1576886624097824,
-1.186486005783081,
-0.31449225544929504,
-0.7887275815010071,
0.8692007064819336,
-0.19493603706359863,
0.2015620321035385,
1.8073365688323975,
0.40083447098731995,
-0.33169499039649963,
0.7598397135734558,
1.2367769479751587,
0.6966572403907776,
-0.5882166028022766,
0.11123427003622055,
-0.6186265349388123,
0.36093151569366455,
-1.3127418756484985,
0.2945638597011566,
-2.8112709522247314,
0.6708303689956665,
-0.0046733058989048,
-0.04276588559150696,
0.00007204432040452957,
-1.289366602897644,
1.1116644144058228,
2.6533491611480713,
-1.2097854614257812,
0.4482062757015228,
0.3628636300563812,
1.1599007844924927,
-1.5997507572174072,
0.3347401022911072,
-0.4372861683368683,
2.1294989585876465,
0.19221541285514832,
1.1923351287841797,
-0.48000583052635193,
-2.243983745574951,
0.606026828289032,
-1.336493968963623,
-1.1515378952026367,
0.7665218710899353,
-0.8952502012252808,
0.2130245864391327,
-1.449036955833435,
-0.2499333769083023,
-0.905393123626709,
-1.1172236204147339,
0.6775263547897339,
0.053730495274066925,
0.33606773614883423,
-0.6304527521133423,
0.3179716467857361,
-2.185148000717163,
-1.3195253610610962,
-0.21996164321899414,
-1.0153136253356934,
0.5053921341896057,
-0.40437692403793335,
0.7403178811073303,
-0.16319769620895386,
0.025136716663837433,
0.320801317691803,
1.37566077709198,
3.456914186477661,
0.26669439673423767,
0.3908328413963318,
-0.2258804887533188,
-0.8739920854568481,
1.4620951414108276,
0.9311540722846985,
-0.11838424950838089,
-0.5903385877609253,
-1.0465960502624512,
1.3282901048660278,
1.9191842079162598,
0.9282707571983337,
0.005185240879654884,
-0.8662284016609192,
-0.7174929976463318,
0.0007259612902998924,
0.14289066195487976,
0.38333097100257874,
0.9060524702072144,
-0.002241989132016897,
0.026850592344999313,
1.5101819038391113,
1.2218595743179321,
-0.4196956753730774,
0.3274066150188446,
-0.8603459596633911,
-0.43900808691978455,
0.4823092818260193,
0.3065623641014099,
0.013712103478610516,
0.39616164565086365,
-1.0277444124221802,
-0.314547061920166,
-0.42016878724098206,
-0.8974500298500061,
-0.6720967888832092,
-0.39863425493240356,
-0.32573944330215454,
1.7253775596618652,
0.16685612499713898,
-0.5554803609848022,
-0.03579207509756088,
-0.7903496026992798,
-0.12561705708503723,
-1.047523856163025,
0.3140750527381897,
-0.084393210709095,
-0.133726105093956,
-0.17098650336265564,
1.8101507425308228,
-0.8919436931610107,
-2.147474527359009,
0.2427135854959488,
0.24158309400081635,
-0.3152279853820801,
0.14667953550815582,
1.6729931831359863,
0.5681214332580566,
1.4217219352722168,
1.364059567451477,
0.8652629256248474,
-0.6969408988952637,
-1.2948566675186157,
0.6935797333717346,
1.0085864067077637,
-1.3980201482772827,
0.8404038548469543,
-0.10280831903219223,
-0.5588845610618591,
0.6063855290412903,
1.3465893268585205,
0.493252694606781,
-2.0152783393859863,
0.8316147327423096,
-0.9499216079711914,
0.7751625776290894,
0.6444974541664124,
0.6027455925941467,
0.18580801784992218,
0.7603845000267029,
-1.2470669746398926,
-1.174184799194336,
-0.7681983113288879,
-0.7070483565330505,
1.9678714275360107,
-0.327117383480072,
0.6285597085952759,
-0.2063278704881668,
-1.3519561290740967,
-0.14356237649917603,
0.681030809879303,
0.309135377407074,
-0.4336215853691101,
0.8704191446304321,
-0.6871887445449829,
-1.1060746908187866,
-1.3767279386520386,
-0.4046643078327179,
-0.9688367247581482,
-0.8977196216583252,
1.116520643234253,
0.7663977146148682,
0.3020358085632324,
1.901672124862671,
0.7169406414031982,
0.17776693403720856,
-2.503521680831909,
0.8395881652832031,
0.3658256232738495,
-0.0996040403842926,
0.8448334336280823,
0.38179251551628113,
0.94901442527771,
0.04276307672262192,
0.5034083127975464,
-2.421308755874634,
2.2346622943878174,
-0.18791130185127258,
0.7509867548942566,
-0.08073457330465317,
-0.2200785130262375,
1.0912336111068726,
0.5537135004997253,
0.5312159657478333,
-1.01982581615448,
0.5992252230644226,
-0.5278802514076233,
1.2477344274520874,
0.843262791633606,
-0.713264524936676,
-0.08799192309379578,
1.3030426502227783,
0.49311554431915283,
-0.5102707743644714,
-1.001108169555664,
-0.8582352995872498,
0.9615069627761841,
1.7880089282989502,
-0.005894489586353302,
0.06010184437036514,
0.7843865156173706,
0.6330240368843079,
-1.214956283569336,
-0.02118889056146145,
-0.7882879376411438,
-0.8197891712188721,
1.6748170852661133,
2.0856997966766357,
-0.2140486240386963,
-0.20863021910190582,
-0.6316953897476196,
-1.3180866241455078,
0.793519139289856,
-0.14931470155715942,
0.17407239973545074,
0.6527786254882812,
-0.6362492442131042,
1.012874960899353,
0.8503817319869995,
0.9042131900787354,
0.10642751306295395,
0.1968083530664444,
0.43146687746047974,
-0.3059348165988922,
-1.1368920803070068,
-0.2487216740846634,
-1.1357938051223755,
-2.4648189544677734,
0.37872597575187683,
-0.21201808750629425,
-1.4058271646499634,
0.01808587834239006,
-0.9699106812477112,
0.9867225289344788,
-0.48214027285575867,
-1.0514386892318726,
-1.5104814767837524,
0.23515033721923828,
-0.01948671229183674,
0.9662050008773804,
-1.5726152658462524,
-0.20666836202144623,
1.1835436820983887,
0.8885385394096375,
-0.6768686771392822,
0.9846268892288208,
0.1965656727552414,
1.0597633123397827,
0.8316989541053772,
-0.4004698097705841,
0.4796369671821594,
0.06970851868391037,
-1.3329979181289673,
0.5183899998664856,
1.107794165611267,
0.11480586975812912,
1.495187759399414,
-0.4167396128177643,
-0.05515557527542114,
0.42304375767707825,
-0.5743582844734192,
-0.42176780104637146,
-0.49581924080848694,
0.721985936164856,
0.03289152309298515,
-0.8921493291854858,
-0.09615308046340942,
-0.009704195894300938,
-0.30482447147369385,
0.17850492894649506,
-1.5073727369308472,
-0.1090635284781456,
-0.39824873208999634,
-0.6334313154220581,
-1.2097821235656738,
-0.08446558564901352,
1.4075325727462769,
-0.8307328224182129,
-0.2509987950325012,
0.462909996509552,
0.44931238889694214,
0.5176354646682739,
0.7305521965026855,
-0.6367781162261963,
-0.3496297001838684,
-0.19330675899982452,
-0.34529340267181396,
0.352260023355484,
1.3233716487884521,
-0.13216331601142883,
-0.903475821018219,
0.685526430606842,
-0.3317953944206238,
0.036826204508543015,
1.873707890510559,
0.08104118704795837,
-0.7680811285972595,
0.37539011240005493,
-0.6875462532043457,
1.937465786933899,
1.7116830348968506,
1.306148648262024,
-0.16160085797309875,
-0.9551324248313904,
0.6784752011299133,
-0.3614403009414673,
-0.4038184881210327,
0.856834352016449,
0.37712910771369934,
-0.16394786536693573,
-1.5491994619369507,
0.6549744009971619,
1.2325479984283447,
-0.8825353384017944,
-0.8066456913948059,
0.09262505173683167,
-0.8063204288482666,
1.0741462707519531,
0.6530025601387024,
0.37012866139411926,
0.318053275346756,
1.6606905460357666,
0.7915253639221191,
-0.5109909176826477,
0.4508340656757355,
0.5811027884483337,
-0.15401591360569,
-2.159181833267212,
-1.1269842386245728,
0.23683713376522064,
-0.4740442931652069,
-1.5185623168945312,
1.29901123046875,
-1.1659657955169678,
-0.9858759045600891,
0.5173313021659851,
0.00917822029441595,
1.4127693176269531,
0.3377137780189514,
1.5567580461502075,
2.0666182041168213,
0.8315495848655701,
0.36854037642478943,
1.3062641620635986,
-0.17163927853107452,
-0.45751067996025085,
1.8363643884658813,
-0.4547731876373291,
0.4625938832759857,
1.0881049633026123,
-0.33405959606170654,
-1.1347506046295166,
-0.7322438955307007,
-1.2141001224517822,
-0.7867571711540222,
1.126724362373352,
0.0293772853910923,
-1.1318315267562866,
0.2832834720611572,
1.575126051902771,
0.12032480537891388,
-0.37620851397514343,
0.5024079084396362,
0.4091237485408783,
-0.7536768317222595,
-0.10161325335502625,
-0.8094041347503662,
0.6084088683128357,
-0.21503715217113495,
-0.3439335525035858,
0.3577706813812256,
0.4309636056423187,
1.3509477376937866,
-0.03221989795565605,
0.17802831530570984,
1.1183643341064453,
-1.5115100145339966,
1.4312421083450317,
-0.6013274788856506,
0.2871963381767273,
-2.393439292907715,
1.4377273321151733,
-0.730556070804596,
1.985466718673706,
-2.772545099258423,
0.49579739570617676,
-0.6119492053985596,
-0.5176381468772888,
0.3142983317375183,
-0.2982322871685028,
0.13951124250888824,
-0.12301289290189743,
-1.1110882759094238,
-0.09247075766324997,
-0.550094723701477,
0.6007397174835205,
1.1553544998168945,
1.2565302848815918,
-1.0408310890197754,
-0.2276003509759903,
-1.6616857051849365,
-0.1704186499118805,
-0.7540231943130493,
0.14082874357700348,
-2.039489507675171,
-0.15521495044231415,
-1.9049155712127686,
-2.362349033355713,
-1.3328328132629395,
-0.8062987923622131,
1.122866153717041,
0.24659894406795502,
-0.9822059273719788,
1.2836687564849854,
-0.43340015411376953,
-1.8301459550857544,
1.1420960426330566,
-2.2007734775543213
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | > . Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Interesting proposal! Yes, we could consider doing this if the (return) type hint is `TypedDict`, and raise an error that type hints are incorrect if the cast using the inferred types fails. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 93 | 62 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
> . Would it be worth having some logic to generate this explicit feature specification automatically if a type annotation for a .map returns a dataclass that can be inferred?
Interesting proposal! Yes, we could consider doing this if the (return) type hint is `TypedDict`, and raise an error that type hints are incorrect if the cast using the inferred types fails. | [
-1.2985907793045044,
-0.9267287254333496,
-0.8369069695472717,
1.5886588096618652,
-0.14439642429351807,
-1.2454571723937988,
0.09860274940729141,
-1.0885096788406372,
1.6895076036453247,
-0.82481449842453,
0.3724417984485626,
-1.6597967147827148,
0.105898417532444,
-0.6402835249900818,
-0.8305851817131042,
-0.857441246509552,
-0.4628458321094513,
-0.6678993701934814,
1.0556823015213013,
2.506619453430176,
1.2020514011383057,
-1.5332905054092407,
2.711271047592163,
0.7533167600631714,
-0.1400606483221054,
-0.9915424585342407,
0.490201860666275,
0.004855241626501083,
-1.2866060733795166,
-0.4336113929748535,
-0.95222008228302,
-0.05474454164505005,
-0.5237808227539062,
-0.5302958488464355,
-0.040886010974645615,
0.4677298665046692,
-0.2647625505924225,
-0.4626535475254059,
-0.6116095185279846,
-0.7539842128753662,
0.4230386018753052,
-0.31062987446784973,
0.9372473359107971,
-0.2629343271255493,
1.7723318338394165,
-0.5383051633834839,
0.4302073121070862,
0.7109066843986511,
1.4519753456115723,
0.17891448736190796,
-0.005793728865683079,
0.35893353819847107,
0.3497188687324524,
-0.10899192094802856,
0.5117256045341492,
1.2120026350021362,
0.7107320427894592,
0.48652464151382446,
0.7909186482429504,
-2.15018892288208,
1.3636338710784912,
-1.113553524017334,
0.39914804697036743,
1.3078314065933228,
-1.0150877237319946,
0.294615775346756,
-1.7613714933395386,
-0.09161873161792755,
0.6080009937286377,
-2.2382166385650635,
0.3036453425884247,
-1.1903995275497437,
-0.46505290269851685,
1.004631519317627,
0.35340458154678345,
-1.2022852897644043,
0.17023220658302307,
-0.45808666944503784,
1.0384801626205444,
0.3909091055393219,
1.1231733560562134,
-1.744705080986023,
0.061435140669345856,
-0.2722025513648987,
0.10916394740343094,
-1.2204456329345703,
-1.5984692573547363,
0.5510377883911133,
0.6602328419685364,
0.5676543712615967,
-0.09744244813919067,
0.9699937701225281,
-1.0912606716156006,
0.7693831324577332,
-0.9733037948608398,
-1.6385103464126587,
-1.4411014318466187,
-2.2992212772369385,
-2.170001268386841,
0.6910991072654724,
-0.47560441493988037,
-0.6067492365837097,
2.1013336181640625,
-0.9639813303947449,
-1.6731855869293213,
1.1270800828933716,
0.2246619611978531,
0.053567372262477875,
2.430847406387329,
0.16543622314929962,
-0.7632919549942017,
0.5100871324539185,
-0.7238879799842834,
0.8439627885818481,
-0.37888291478157043,
1.315221905708313,
0.4316851496696472,
-0.9838986992835999,
1.6286532878875732,
-0.3212954103946686,
0.49006378650665283,
-0.6485760807991028,
-0.4865405559539795,
-0.724682629108429,
0.37321069836616516,
1.8204103708267212,
-0.300319105386734,
1.5307798385620117,
-0.3285508453845978,
-1.5091099739074707,
-1.6466025114059448,
0.9347464442253113,
0.5834619998931885,
-0.7230839133262634,
0.12637849152088165,
-0.4431934654712677,
0.1629071980714798,
-0.11249500513076782,
1.191419243812561,
1.2291195392608643,
0.6356744170188904,
-0.37251031398773193,
-0.9164263606071472,
0.15456590056419373,
-0.07971448451280594,
-0.7256786823272705,
-1.7475810050964355,
-0.2918073832988739,
0.1907857060432434,
0.65353924036026,
-1.204881191253662,
1.7829476594924927,
0.9021657109260559,
1.8846298456192017,
1.0018566846847534,
-0.3060522675514221,
1.435085415840149,
0.04823146387934685,
1.7965445518493652,
-0.5244499444961548,
0.6683063507080078,
-0.30217576026916504,
-1.1218504905700684,
0.8729066848754883,
-0.3575437068939209,
-2.0980892181396484,
-0.7972162365913391,
-0.753498911857605,
-0.14308689534664154,
-0.7398854494094849,
1.0308377742767334,
-0.3040805459022522,
-1.3399211168289185,
0.25710782408714294,
-0.7166621088981628,
0.10926763713359833,
-1.182822346687317,
0.2575671970844269,
0.5954967737197876,
-0.640868067741394,
0.06450155377388,
-0.2140519618988037,
-1.3077874183654785,
-0.4330248534679413,
0.2631135880947113,
1.9185047149658203,
-0.7563229203224182,
0.8643680214881897,
1.0465258359909058,
-0.6520311236381531,
-0.01362437754869461,
0.31320321559906006,
-0.34723755717277527,
1.0033107995986938,
-1.0795605182647705,
-0.5039026141166687,
1.190269947052002,
-0.13337957859039307,
-0.5596657395362854,
1.5067576169967651,
0.654680609703064,
-0.9348692297935486,
-0.25738072395324707,
-0.08318561315536499,
-0.9467619061470032,
0.0695967897772789,
-1.6042488813400269,
-0.12825436890125275,
0.4477936923503876,
-1.602195143699646,
-0.4562782943248749,
-0.1694020926952362,
1.2720801830291748,
-0.2032938003540039,
1.4403109550476074,
-0.3551887571811676,
-0.09159315377473831,
-0.3293093144893646,
-0.33214205503463745,
0.08593139797449112,
-0.1406273990869522,
-0.5879557728767395,
0.18693140149116516,
-0.8177807927131653,
0.3467068076133728,
1.4170355796813965,
0.39129579067230225,
0.11575648188591003,
0.5235120058059692,
1.125555157661438,
0.357972115278244,
-0.06964004039764404,
-0.8099437355995178,
-1.5472415685653687,
2.022566556930542,
-1.4557528495788574,
2.040156364440918,
0.8343071341514587,
0.007068387232720852,
-1.7888849973678589,
-1.856006145477295,
1.4633420705795288,
1.2057708501815796,
2.408007860183716,
0.5014539361000061,
0.3827192187309265,
-0.8163942098617554,
-0.6103691458702087,
0.31608012318611145,
-1.0296249389648438,
-0.7472514510154724,
0.1729574054479599,
2.347461223602295,
1.848684310913086,
-0.3710002601146698,
-0.17968638241291046,
-1.011318564414978,
1.337084412574768,
-0.19007042050361633,
0.17950524389743805,
1.9062856435775757,
-0.2031944990158081,
-1.034480333328247,
1.2808418273925781,
-2.410008668899536,
0.11523789912462234,
1.9898951053619385,
0.313675194978714,
0.09194256365299225,
-1.3139971494674683,
-0.568689227104187,
-0.3719123899936676,
-0.39085152745246887,
-1.2532974481582642,
0.5975121855735779,
-0.24819886684417725,
-0.821467936038971,
-1.3869191408157349,
0.20084498822689056,
-1.1813571453094482,
-1.6675622463226318,
0.2926473617553711,
1.8372639417648315,
2.166182041168213,
-0.8316110372543335,
1.623299241065979,
-0.31980329751968384,
0.2179000824689865,
1.148813009262085,
1.1991451978683472,
3.0726003646850586,
1.8576879501342773,
-1.3281970024108887,
0.5341362357139587,
-0.15376147627830505,
-0.45173150300979614,
1.0890263319015503,
-1.2639516592025757,
1.2838454246520996,
-0.07710655778646469,
-1.2077900171279907,
-1.192153811454773,
1.0135475397109985,
0.4728859066963196,
0.02409755438566208,
-0.5247027277946472,
1.1644861698150635,
0.00010141171514987946,
1.3400753736495972,
0.5970748066902161,
-0.2691934108734131,
0.5172516107559204,
-0.4364621937274933,
-0.5368980765342712,
1.5539023876190186,
0.08326764404773712,
-1.455985426902771,
-2.2521936893463135,
-0.14221163094043732,
-0.8083841800689697,
0.07044165581464767,
-0.6714946031570435,
-1.0345983505249023,
1.7026418447494507,
0.2705955505371094,
-1.2773083448410034,
-0.3084907531738281,
-0.3964633345603943,
-0.6253989338874817,
2.6536810398101807,
-1.374171257019043,
-0.313547819852829,
-1.053989052772522,
-0.6233115196228027,
1.6236518621444702,
-1.1374412775039673,
-0.21116256713867188,
-1.02310049533844,
-0.590596079826355,
-1.2977180480957031,
-0.5497629046440125,
0.008357002399861813,
-0.9014479517936707,
0.7411566972732544,
0.1576886624097824,
-1.186486005783081,
-0.31449225544929504,
-0.7887275815010071,
0.8692007064819336,
-0.19493603706359863,
0.2015620321035385,
1.8073365688323975,
0.40083447098731995,
-0.33169499039649963,
0.7598397135734558,
1.2367769479751587,
0.6966572403907776,
-0.5882166028022766,
0.11123427003622055,
-0.6186265349388123,
0.36093151569366455,
-1.3127418756484985,
0.2945638597011566,
-2.8112709522247314,
0.6708303689956665,
-0.0046733058989048,
-0.04276588559150696,
0.00007204432040452957,
-1.289366602897644,
1.1116644144058228,
2.6533491611480713,
-1.2097854614257812,
0.4482062757015228,
0.3628636300563812,
1.1599007844924927,
-1.5997507572174072,
0.3347401022911072,
-0.4372861683368683,
2.1294989585876465,
0.19221541285514832,
1.1923351287841797,
-0.48000583052635193,
-2.243983745574951,
0.606026828289032,
-1.336493968963623,
-1.1515378952026367,
0.7665218710899353,
-0.8952502012252808,
0.2130245864391327,
-1.449036955833435,
-0.2499333769083023,
-0.905393123626709,
-1.1172236204147339,
0.6775263547897339,
0.053730495274066925,
0.33606773614883423,
-0.6304527521133423,
0.3179716467857361,
-2.185148000717163,
-1.3195253610610962,
-0.21996164321899414,
-1.0153136253356934,
0.5053921341896057,
-0.40437692403793335,
0.7403178811073303,
-0.16319769620895386,
0.025136716663837433,
0.320801317691803,
1.37566077709198,
3.456914186477661,
0.26669439673423767,
0.3908328413963318,
-0.2258804887533188,
-0.8739920854568481,
1.4620951414108276,
0.9311540722846985,
-0.11838424950838089,
-0.5903385877609253,
-1.0465960502624512,
1.3282901048660278,
1.9191842079162598,
0.9282707571983337,
0.005185240879654884,
-0.8662284016609192,
-0.7174929976463318,
0.0007259612902998924,
0.14289066195487976,
0.38333097100257874,
0.9060524702072144,
-0.002241989132016897,
0.026850592344999313,
1.5101819038391113,
1.2218595743179321,
-0.4196956753730774,
0.3274066150188446,
-0.8603459596633911,
-0.43900808691978455,
0.4823092818260193,
0.3065623641014099,
0.013712103478610516,
0.39616164565086365,
-1.0277444124221802,
-0.314547061920166,
-0.42016878724098206,
-0.8974500298500061,
-0.6720967888832092,
-0.39863425493240356,
-0.32573944330215454,
1.7253775596618652,
0.16685612499713898,
-0.5554803609848022,
-0.03579207509756088,
-0.7903496026992798,
-0.12561705708503723,
-1.047523856163025,
0.3140750527381897,
-0.084393210709095,
-0.133726105093956,
-0.17098650336265564,
1.8101507425308228,
-0.8919436931610107,
-2.147474527359009,
0.2427135854959488,
0.24158309400081635,
-0.3152279853820801,
0.14667953550815582,
1.6729931831359863,
0.5681214332580566,
1.4217219352722168,
1.364059567451477,
0.8652629256248474,
-0.6969408988952637,
-1.2948566675186157,
0.6935797333717346,
1.0085864067077637,
-1.3980201482772827,
0.8404038548469543,
-0.10280831903219223,
-0.5588845610618591,
0.6063855290412903,
1.3465893268585205,
0.493252694606781,
-2.0152783393859863,
0.8316147327423096,
-0.9499216079711914,
0.7751625776290894,
0.6444974541664124,
0.6027455925941467,
0.18580801784992218,
0.7603845000267029,
-1.2470669746398926,
-1.174184799194336,
-0.7681983113288879,
-0.7070483565330505,
1.9678714275360107,
-0.327117383480072,
0.6285597085952759,
-0.2063278704881668,
-1.3519561290740967,
-0.14356237649917603,
0.681030809879303,
0.309135377407074,
-0.4336215853691101,
0.8704191446304321,
-0.6871887445449829,
-1.1060746908187866,
-1.3767279386520386,
-0.4046643078327179,
-0.9688367247581482,
-0.8977196216583252,
1.116520643234253,
0.7663977146148682,
0.3020358085632324,
1.901672124862671,
0.7169406414031982,
0.17776693403720856,
-2.503521680831909,
0.8395881652832031,
0.3658256232738495,
-0.0996040403842926,
0.8448334336280823,
0.38179251551628113,
0.94901442527771,
0.04276307672262192,
0.5034083127975464,
-2.421308755874634,
2.2346622943878174,
-0.18791130185127258,
0.7509867548942566,
-0.08073457330465317,
-0.2200785130262375,
1.0912336111068726,
0.5537135004997253,
0.5312159657478333,
-1.01982581615448,
0.5992252230644226,
-0.5278802514076233,
1.2477344274520874,
0.843262791633606,
-0.713264524936676,
-0.08799192309379578,
1.3030426502227783,
0.49311554431915283,
-0.5102707743644714,
-1.001108169555664,
-0.8582352995872498,
0.9615069627761841,
1.7880089282989502,
-0.005894489586353302,
0.06010184437036514,
0.7843865156173706,
0.6330240368843079,
-1.214956283569336,
-0.02118889056146145,
-0.7882879376411438,
-0.8197891712188721,
1.6748170852661133,
2.0856997966766357,
-0.2140486240386963,
-0.20863021910190582,
-0.6316953897476196,
-1.3180866241455078,
0.793519139289856,
-0.14931470155715942,
0.17407239973545074,
0.6527786254882812,
-0.6362492442131042,
1.012874960899353,
0.8503817319869995,
0.9042131900787354,
0.10642751306295395,
0.1968083530664444,
0.43146687746047974,
-0.3059348165988922,
-1.1368920803070068,
-0.2487216740846634,
-1.1357938051223755,
-2.4648189544677734,
0.37872597575187683,
-0.21201808750629425,
-1.4058271646499634,
0.01808587834239006,
-0.9699106812477112,
0.9867225289344788,
-0.48214027285575867,
-1.0514386892318726,
-1.5104814767837524,
0.23515033721923828,
-0.01948671229183674,
0.9662050008773804,
-1.5726152658462524,
-0.20666836202144623,
1.1835436820983887,
0.8885385394096375,
-0.6768686771392822,
0.9846268892288208,
0.1965656727552414,
1.0597633123397827,
0.8316989541053772,
-0.4004698097705841,
0.4796369671821594,
0.06970851868391037,
-1.3329979181289673,
0.5183899998664856,
1.107794165611267,
0.11480586975812912,
1.495187759399414,
-0.4167396128177643,
-0.05515557527542114,
0.42304375767707825,
-0.5743582844734192,
-0.42176780104637146,
-0.49581924080848694,
0.721985936164856,
0.03289152309298515,
-0.8921493291854858,
-0.09615308046340942,
-0.009704195894300938,
-0.30482447147369385,
0.17850492894649506,
-1.5073727369308472,
-0.1090635284781456,
-0.39824873208999634,
-0.6334313154220581,
-1.2097821235656738,
-0.08446558564901352,
1.4075325727462769,
-0.8307328224182129,
-0.2509987950325012,
0.462909996509552,
0.44931238889694214,
0.5176354646682739,
0.7305521965026855,
-0.6367781162261963,
-0.3496297001838684,
-0.19330675899982452,
-0.34529340267181396,
0.352260023355484,
1.3233716487884521,
-0.13216331601142883,
-0.903475821018219,
0.685526430606842,
-0.3317953944206238,
0.036826204508543015,
1.873707890510559,
0.08104118704795837,
-0.7680811285972595,
0.37539011240005493,
-0.6875462532043457,
1.937465786933899,
1.7116830348968506,
1.306148648262024,
-0.16160085797309875,
-0.9551324248313904,
0.6784752011299133,
-0.3614403009414673,
-0.4038184881210327,
0.856834352016449,
0.37712910771369934,
-0.16394786536693573,
-1.5491994619369507,
0.6549744009971619,
1.2325479984283447,
-0.8825353384017944,
-0.8066456913948059,
0.09262505173683167,
-0.8063204288482666,
1.0741462707519531,
0.6530025601387024,
0.37012866139411926,
0.318053275346756,
1.6606905460357666,
0.7915253639221191,
-0.5109909176826477,
0.4508340656757355,
0.5811027884483337,
-0.15401591360569,
-2.159181833267212,
-1.1269842386245728,
0.23683713376522064,
-0.4740442931652069,
-1.5185623168945312,
1.29901123046875,
-1.1659657955169678,
-0.9858759045600891,
0.5173313021659851,
0.00917822029441595,
1.4127693176269531,
0.3377137780189514,
1.5567580461502075,
2.0666182041168213,
0.8315495848655701,
0.36854037642478943,
1.3062641620635986,
-0.17163927853107452,
-0.45751067996025085,
1.8363643884658813,
-0.4547731876373291,
0.4625938832759857,
1.0881049633026123,
-0.33405959606170654,
-1.1347506046295166,
-0.7322438955307007,
-1.2141001224517822,
-0.7867571711540222,
1.126724362373352,
0.0293772853910923,
-1.1318315267562866,
0.2832834720611572,
1.575126051902771,
0.12032480537891388,
-0.37620851397514343,
0.5024079084396362,
0.4091237485408783,
-0.7536768317222595,
-0.10161325335502625,
-0.8094041347503662,
0.6084088683128357,
-0.21503715217113495,
-0.3439335525035858,
0.3577706813812256,
0.4309636056423187,
1.3509477376937866,
-0.03221989795565605,
0.17802831530570984,
1.1183643341064453,
-1.5115100145339966,
1.4312421083450317,
-0.6013274788856506,
0.2871963381767273,
-2.393439292907715,
1.4377273321151733,
-0.730556070804596,
1.985466718673706,
-2.772545099258423,
0.49579739570617676,
-0.6119492053985596,
-0.5176381468772888,
0.3142983317375183,
-0.2982322871685028,
0.13951124250888824,
-0.12301289290189743,
-1.1110882759094238,
-0.09247075766324997,
-0.550094723701477,
0.6007397174835205,
1.1553544998168945,
1.2565302848815918,
-1.0408310890197754,
-0.2276003509759903,
-1.6616857051849365,
-0.1704186499118805,
-0.7540231943130493,
0.14082874357700348,
-2.039489507675171,
-0.15521495044231415,
-1.9049155712127686,
-2.362349033355713,
-1.3328328132629395,
-0.8062987923622131,
1.122866153717041,
0.24659894406795502,
-0.9822059273719788,
1.2836687564849854,
-0.43340015411376953,
-1.8301459550857544,
1.1420960426330566,
-2.2007734775543213
] |
https://github.com/huggingface/datasets/issues/5965 | "Couldn't cast array of type" in complex datasets | @mariosasko Put up an initial PR to implement this proposal. Let me know your thoughts on direction and what else should be in-scope here. | ### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux | 93 | 24 | "Couldn't cast array of type" in complex datasets
### Describe the bug
When doing a map of a dataset with complex types, sometimes `datasets` is unable to interpret the valid schema of a returned datasets.map() function. This often comes from conflicting types, like when both empty lists and filled lists are competing for the same field value.
This is prone to happen in batch mapping, when the mapper returns a sequence of null/empty values and other batches are non-null. A workaround is to manually cast the new batch to a pyarrow table (like implemented in this [workaround](https://github.com/piercefreeman/lassen/pull/3)) but it feels like this ideally should be solved at the core library level.
Note that the reproduction case only throws this error if the first datapoint has the empty list. If it is processed later, datasets already detects its representation as list-type and therefore allows the empty list to be provided.
### Steps to reproduce the bug
A trivial reproduction case:
```python
from typing import Iterator, Any
import pandas as pd
from datasets import Dataset
def batch_to_examples(batch: dict[str, list[Any]]) -> Iterator[dict[str, Any]]:
for i in range(next(iter(lengths))):
yield {feature: values[i] for feature, values in batch.items()}
def examples_to_batch(examples) -> dict[str, list[Any]]:
batch = {}
for example in examples:
for feature, value in example.items():
if feature not in batch:
batch[feature] = []
batch[feature].append(value)
return batch
def batch_process(examples, explicit_schema: bool):
new_examples = []
for example in batch_to_examples(examples):
new_examples.append(dict(texts=example["raw_text"].split()))
return examples_to_batch(new_examples)
df = pd.DataFrame(
[
{"raw_text": ""},
{"raw_text": "This is a test"},
{"raw_text": "This is another test"},
]
)
dataset = Dataset.from_pandas(df)
# datasets won't be able to typehint a dataset that starts with an empty example.
with pytest.raises(TypeError, match="Couldn't cast array of type"):
dataset = dataset.map(
batch_process,
batched=True,
batch_size=1,
num_proc=1,
remove_columns=dataset.column_names,
)
```
This results in crashes like:
```bash
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 2109, in cast_array_to_feature
return array_cast(array, feature(), allow_number_to_str=allow_number_to_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1819, in wrapper
return func(array, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/piercefreeman/Library/Caches/pypoetry/virtualenvs/example-9kBqeSPy-py3.11/lib/python3.11/site-packages/datasets/table.py", line 1998, in array_cast
raise TypeError(f"Couldn't cast array of type {array.type} to {pa_type}")
TypeError: Couldn't cast array of type string to null
```
### Expected behavior
The code should successfully map and create a new dataset without error.
### Environment info
Mac OSX, Linux
@mariosasko Put up an initial PR to implement this proposal. Let me know your thoughts on direction and what else should be in-scope here. | [
-1.2985907793045044,
-0.9267287254333496,
-0.8369069695472717,
1.5886588096618652,
-0.14439642429351807,
-1.2454571723937988,
0.09860274940729141,
-1.0885096788406372,
1.6895076036453247,
-0.82481449842453,
0.3724417984485626,
-1.6597967147827148,
0.105898417532444,
-0.6402835249900818,
-0.8305851817131042,
-0.857441246509552,
-0.4628458321094513,
-0.6678993701934814,
1.0556823015213013,
2.506619453430176,
1.2020514011383057,
-1.5332905054092407,
2.711271047592163,
0.7533167600631714,
-0.1400606483221054,
-0.9915424585342407,
0.490201860666275,
0.004855241626501083,
-1.2866060733795166,
-0.4336113929748535,
-0.95222008228302,
-0.05474454164505005,
-0.5237808227539062,
-0.5302958488464355,
-0.040886010974645615,
0.4677298665046692,
-0.2647625505924225,
-0.4626535475254059,
-0.6116095185279846,
-0.7539842128753662,
0.4230386018753052,
-0.31062987446784973,
0.9372473359107971,
-0.2629343271255493,
1.7723318338394165,
-0.5383051633834839,
0.4302073121070862,
0.7109066843986511,
1.4519753456115723,
0.17891448736190796,
-0.005793728865683079,
0.35893353819847107,
0.3497188687324524,
-0.10899192094802856,
0.5117256045341492,
1.2120026350021362,
0.7107320427894592,
0.48652464151382446,
0.7909186482429504,
-2.15018892288208,
1.3636338710784912,
-1.113553524017334,
0.39914804697036743,
1.3078314065933228,
-1.0150877237319946,
0.294615775346756,
-1.7613714933395386,
-0.09161873161792755,
0.6080009937286377,
-2.2382166385650635,
0.3036453425884247,
-1.1903995275497437,
-0.46505290269851685,
1.004631519317627,
0.35340458154678345,
-1.2022852897644043,
0.17023220658302307,
-0.45808666944503784,
1.0384801626205444,
0.3909091055393219,
1.1231733560562134,
-1.744705080986023,
0.061435140669345856,
-0.2722025513648987,
0.10916394740343094,
-1.2204456329345703,
-1.5984692573547363,
0.5510377883911133,
0.6602328419685364,
0.5676543712615967,
-0.09744244813919067,
0.9699937701225281,
-1.0912606716156006,
0.7693831324577332,
-0.9733037948608398,
-1.6385103464126587,
-1.4411014318466187,
-2.2992212772369385,
-2.170001268386841,
0.6910991072654724,
-0.47560441493988037,
-0.6067492365837097,
2.1013336181640625,
-0.9639813303947449,
-1.6731855869293213,
1.1270800828933716,
0.2246619611978531,
0.053567372262477875,
2.430847406387329,
0.16543622314929962,
-0.7632919549942017,
0.5100871324539185,
-0.7238879799842834,
0.8439627885818481,
-0.37888291478157043,
1.315221905708313,
0.4316851496696472,
-0.9838986992835999,
1.6286532878875732,
-0.3212954103946686,
0.49006378650665283,
-0.6485760807991028,
-0.4865405559539795,
-0.724682629108429,
0.37321069836616516,
1.8204103708267212,
-0.300319105386734,
1.5307798385620117,
-0.3285508453845978,
-1.5091099739074707,
-1.6466025114059448,
0.9347464442253113,
0.5834619998931885,
-0.7230839133262634,
0.12637849152088165,
-0.4431934654712677,
0.1629071980714798,
-0.11249500513076782,
1.191419243812561,
1.2291195392608643,
0.6356744170188904,
-0.37251031398773193,
-0.9164263606071472,
0.15456590056419373,
-0.07971448451280594,
-0.7256786823272705,
-1.7475810050964355,
-0.2918073832988739,
0.1907857060432434,
0.65353924036026,
-1.204881191253662,
1.7829476594924927,
0.9021657109260559,
1.8846298456192017,
1.0018566846847534,
-0.3060522675514221,
1.435085415840149,
0.04823146387934685,
1.7965445518493652,
-0.5244499444961548,
0.6683063507080078,
-0.30217576026916504,
-1.1218504905700684,
0.8729066848754883,
-0.3575437068939209,
-2.0980892181396484,
-0.7972162365913391,
-0.753498911857605,
-0.14308689534664154,
-0.7398854494094849,
1.0308377742767334,
-0.3040805459022522,
-1.3399211168289185,
0.25710782408714294,
-0.7166621088981628,
0.10926763713359833,
-1.182822346687317,
0.2575671970844269,
0.5954967737197876,
-0.640868067741394,
0.06450155377388,
-0.2140519618988037,
-1.3077874183654785,
-0.4330248534679413,
0.2631135880947113,
1.9185047149658203,
-0.7563229203224182,
0.8643680214881897,
1.0465258359909058,
-0.6520311236381531,
-0.01362437754869461,
0.31320321559906006,
-0.34723755717277527,
1.0033107995986938,
-1.0795605182647705,
-0.5039026141166687,
1.190269947052002,
-0.13337957859039307,
-0.5596657395362854,
1.5067576169967651,
0.654680609703064,
-0.9348692297935486,
-0.25738072395324707,
-0.08318561315536499,
-0.9467619061470032,
0.0695967897772789,
-1.6042488813400269,
-0.12825436890125275,
0.4477936923503876,
-1.602195143699646,
-0.4562782943248749,
-0.1694020926952362,
1.2720801830291748,
-0.2032938003540039,
1.4403109550476074,
-0.3551887571811676,
-0.09159315377473831,
-0.3293093144893646,
-0.33214205503463745,
0.08593139797449112,
-0.1406273990869522,
-0.5879557728767395,
0.18693140149116516,
-0.8177807927131653,
0.3467068076133728,
1.4170355796813965,
0.39129579067230225,
0.11575648188591003,
0.5235120058059692,
1.125555157661438,
0.357972115278244,
-0.06964004039764404,
-0.8099437355995178,
-1.5472415685653687,
2.022566556930542,
-1.4557528495788574,
2.040156364440918,
0.8343071341514587,
0.007068387232720852,
-1.7888849973678589,
-1.856006145477295,
1.4633420705795288,
1.2057708501815796,
2.408007860183716,
0.5014539361000061,
0.3827192187309265,
-0.8163942098617554,
-0.6103691458702087,
0.31608012318611145,
-1.0296249389648438,
-0.7472514510154724,
0.1729574054479599,
2.347461223602295,
1.848684310913086,
-0.3710002601146698,
-0.17968638241291046,
-1.011318564414978,
1.337084412574768,
-0.19007042050361633,
0.17950524389743805,
1.9062856435775757,
-0.2031944990158081,
-1.034480333328247,
1.2808418273925781,
-2.410008668899536,
0.11523789912462234,
1.9898951053619385,
0.313675194978714,
0.09194256365299225,
-1.3139971494674683,
-0.568689227104187,
-0.3719123899936676,
-0.39085152745246887,
-1.2532974481582642,
0.5975121855735779,
-0.24819886684417725,
-0.821467936038971,
-1.3869191408157349,
0.20084498822689056,
-1.1813571453094482,
-1.6675622463226318,
0.2926473617553711,
1.8372639417648315,
2.166182041168213,
-0.8316110372543335,
1.623299241065979,
-0.31980329751968384,
0.2179000824689865,
1.148813009262085,
1.1991451978683472,
3.0726003646850586,
1.8576879501342773,
-1.3281970024108887,
0.5341362357139587,
-0.15376147627830505,
-0.45173150300979614,
1.0890263319015503,
-1.2639516592025757,
1.2838454246520996,
-0.07710655778646469,
-1.2077900171279907,
-1.192153811454773,
1.0135475397109985,
0.4728859066963196,
0.02409755438566208,
-0.5247027277946472,
1.1644861698150635,
0.00010141171514987946,
1.3400753736495972,
0.5970748066902161,
-0.2691934108734131,
0.5172516107559204,
-0.4364621937274933,
-0.5368980765342712,
1.5539023876190186,
0.08326764404773712,
-1.455985426902771,
-2.2521936893463135,
-0.14221163094043732,
-0.8083841800689697,
0.07044165581464767,
-0.6714946031570435,
-1.0345983505249023,
1.7026418447494507,
0.2705955505371094,
-1.2773083448410034,
-0.3084907531738281,
-0.3964633345603943,
-0.6253989338874817,
2.6536810398101807,
-1.374171257019043,
-0.313547819852829,
-1.053989052772522,
-0.6233115196228027,
1.6236518621444702,
-1.1374412775039673,
-0.21116256713867188,
-1.02310049533844,
-0.590596079826355,
-1.2977180480957031,
-0.5497629046440125,
0.008357002399861813,
-0.9014479517936707,
0.7411566972732544,
0.1576886624097824,
-1.186486005783081,
-0.31449225544929504,
-0.7887275815010071,
0.8692007064819336,
-0.19493603706359863,
0.2015620321035385,
1.8073365688323975,
0.40083447098731995,
-0.33169499039649963,
0.7598397135734558,
1.2367769479751587,
0.6966572403907776,
-0.5882166028022766,
0.11123427003622055,
-0.6186265349388123,
0.36093151569366455,
-1.3127418756484985,
0.2945638597011566,
-2.8112709522247314,
0.6708303689956665,
-0.0046733058989048,
-0.04276588559150696,
0.00007204432040452957,
-1.289366602897644,
1.1116644144058228,
2.6533491611480713,
-1.2097854614257812,
0.4482062757015228,
0.3628636300563812,
1.1599007844924927,
-1.5997507572174072,
0.3347401022911072,
-0.4372861683368683,
2.1294989585876465,
0.19221541285514832,
1.1923351287841797,
-0.48000583052635193,
-2.243983745574951,
0.606026828289032,
-1.336493968963623,
-1.1515378952026367,
0.7665218710899353,
-0.8952502012252808,
0.2130245864391327,
-1.449036955833435,
-0.2499333769083023,
-0.905393123626709,
-1.1172236204147339,
0.6775263547897339,
0.053730495274066925,
0.33606773614883423,
-0.6304527521133423,
0.3179716467857361,
-2.185148000717163,
-1.3195253610610962,
-0.21996164321899414,
-1.0153136253356934,
0.5053921341896057,
-0.40437692403793335,
0.7403178811073303,
-0.16319769620895386,
0.025136716663837433,
0.320801317691803,
1.37566077709198,
3.456914186477661,
0.26669439673423767,
0.3908328413963318,
-0.2258804887533188,
-0.8739920854568481,
1.4620951414108276,
0.9311540722846985,
-0.11838424950838089,
-0.5903385877609253,
-1.0465960502624512,
1.3282901048660278,
1.9191842079162598,
0.9282707571983337,
0.005185240879654884,
-0.8662284016609192,
-0.7174929976463318,
0.0007259612902998924,
0.14289066195487976,
0.38333097100257874,
0.9060524702072144,
-0.002241989132016897,
0.026850592344999313,
1.5101819038391113,
1.2218595743179321,
-0.4196956753730774,
0.3274066150188446,
-0.8603459596633911,
-0.43900808691978455,
0.4823092818260193,
0.3065623641014099,
0.013712103478610516,
0.39616164565086365,
-1.0277444124221802,
-0.314547061920166,
-0.42016878724098206,
-0.8974500298500061,
-0.6720967888832092,
-0.39863425493240356,
-0.32573944330215454,
1.7253775596618652,
0.16685612499713898,
-0.5554803609848022,
-0.03579207509756088,
-0.7903496026992798,
-0.12561705708503723,
-1.047523856163025,
0.3140750527381897,
-0.084393210709095,
-0.133726105093956,
-0.17098650336265564,
1.8101507425308228,
-0.8919436931610107,
-2.147474527359009,
0.2427135854959488,
0.24158309400081635,
-0.3152279853820801,
0.14667953550815582,
1.6729931831359863,
0.5681214332580566,
1.4217219352722168,
1.364059567451477,
0.8652629256248474,
-0.6969408988952637,
-1.2948566675186157,
0.6935797333717346,
1.0085864067077637,
-1.3980201482772827,
0.8404038548469543,
-0.10280831903219223,
-0.5588845610618591,
0.6063855290412903,
1.3465893268585205,
0.493252694606781,
-2.0152783393859863,
0.8316147327423096,
-0.9499216079711914,
0.7751625776290894,
0.6444974541664124,
0.6027455925941467,
0.18580801784992218,
0.7603845000267029,
-1.2470669746398926,
-1.174184799194336,
-0.7681983113288879,
-0.7070483565330505,
1.9678714275360107,
-0.327117383480072,
0.6285597085952759,
-0.2063278704881668,
-1.3519561290740967,
-0.14356237649917603,
0.681030809879303,
0.309135377407074,
-0.4336215853691101,
0.8704191446304321,
-0.6871887445449829,
-1.1060746908187866,
-1.3767279386520386,
-0.4046643078327179,
-0.9688367247581482,
-0.8977196216583252,
1.116520643234253,
0.7663977146148682,
0.3020358085632324,
1.901672124862671,
0.7169406414031982,
0.17776693403720856,
-2.503521680831909,
0.8395881652832031,
0.3658256232738495,
-0.0996040403842926,
0.8448334336280823,
0.38179251551628113,
0.94901442527771,
0.04276307672262192,
0.5034083127975464,
-2.421308755874634,
2.2346622943878174,
-0.18791130185127258,
0.7509867548942566,
-0.08073457330465317,
-0.2200785130262375,
1.0912336111068726,
0.5537135004997253,
0.5312159657478333,
-1.01982581615448,
0.5992252230644226,
-0.5278802514076233,
1.2477344274520874,
0.843262791633606,
-0.713264524936676,
-0.08799192309379578,
1.3030426502227783,
0.49311554431915283,
-0.5102707743644714,
-1.001108169555664,
-0.8582352995872498,
0.9615069627761841,
1.7880089282989502,
-0.005894489586353302,
0.06010184437036514,
0.7843865156173706,
0.6330240368843079,
-1.214956283569336,
-0.02118889056146145,
-0.7882879376411438,
-0.8197891712188721,
1.6748170852661133,
2.0856997966766357,
-0.2140486240386963,
-0.20863021910190582,
-0.6316953897476196,
-1.3180866241455078,
0.793519139289856,
-0.14931470155715942,
0.17407239973545074,
0.6527786254882812,
-0.6362492442131042,
1.012874960899353,
0.8503817319869995,
0.9042131900787354,
0.10642751306295395,
0.1968083530664444,
0.43146687746047974,
-0.3059348165988922,
-1.1368920803070068,
-0.2487216740846634,
-1.1357938051223755,
-2.4648189544677734,
0.37872597575187683,
-0.21201808750629425,
-1.4058271646499634,
0.01808587834239006,
-0.9699106812477112,
0.9867225289344788,
-0.48214027285575867,
-1.0514386892318726,
-1.5104814767837524,
0.23515033721923828,
-0.01948671229183674,
0.9662050008773804,
-1.5726152658462524,
-0.20666836202144623,
1.1835436820983887,
0.8885385394096375,
-0.6768686771392822,
0.9846268892288208,
0.1965656727552414,
1.0597633123397827,
0.8316989541053772,
-0.4004698097705841,
0.4796369671821594,
0.06970851868391037,
-1.3329979181289673,
0.5183899998664856,
1.107794165611267,
0.11480586975812912,
1.495187759399414,
-0.4167396128177643,
-0.05515557527542114,
0.42304375767707825,
-0.5743582844734192,
-0.42176780104637146,
-0.49581924080848694,
0.721985936164856,
0.03289152309298515,
-0.8921493291854858,
-0.09615308046340942,
-0.009704195894300938,
-0.30482447147369385,
0.17850492894649506,
-1.5073727369308472,
-0.1090635284781456,
-0.39824873208999634,
-0.6334313154220581,
-1.2097821235656738,
-0.08446558564901352,
1.4075325727462769,
-0.8307328224182129,
-0.2509987950325012,
0.462909996509552,
0.44931238889694214,
0.5176354646682739,
0.7305521965026855,
-0.6367781162261963,
-0.3496297001838684,
-0.19330675899982452,
-0.34529340267181396,
0.352260023355484,
1.3233716487884521,
-0.13216331601142883,
-0.903475821018219,
0.685526430606842,
-0.3317953944206238,
0.036826204508543015,
1.873707890510559,
0.08104118704795837,
-0.7680811285972595,
0.37539011240005493,
-0.6875462532043457,
1.937465786933899,
1.7116830348968506,
1.306148648262024,
-0.16160085797309875,
-0.9551324248313904,
0.6784752011299133,
-0.3614403009414673,
-0.4038184881210327,
0.856834352016449,
0.37712910771369934,
-0.16394786536693573,
-1.5491994619369507,
0.6549744009971619,
1.2325479984283447,
-0.8825353384017944,
-0.8066456913948059,
0.09262505173683167,
-0.8063204288482666,
1.0741462707519531,
0.6530025601387024,
0.37012866139411926,
0.318053275346756,
1.6606905460357666,
0.7915253639221191,
-0.5109909176826477,
0.4508340656757355,
0.5811027884483337,
-0.15401591360569,
-2.159181833267212,
-1.1269842386245728,
0.23683713376522064,
-0.4740442931652069,
-1.5185623168945312,
1.29901123046875,
-1.1659657955169678,
-0.9858759045600891,
0.5173313021659851,
0.00917822029441595,
1.4127693176269531,
0.3377137780189514,
1.5567580461502075,
2.0666182041168213,
0.8315495848655701,
0.36854037642478943,
1.3062641620635986,
-0.17163927853107452,
-0.45751067996025085,
1.8363643884658813,
-0.4547731876373291,
0.4625938832759857,
1.0881049633026123,
-0.33405959606170654,
-1.1347506046295166,
-0.7322438955307007,
-1.2141001224517822,
-0.7867571711540222,
1.126724362373352,
0.0293772853910923,
-1.1318315267562866,
0.2832834720611572,
1.575126051902771,
0.12032480537891388,
-0.37620851397514343,
0.5024079084396362,
0.4091237485408783,
-0.7536768317222595,
-0.10161325335502625,
-0.8094041347503662,
0.6084088683128357,
-0.21503715217113495,
-0.3439335525035858,
0.3577706813812256,
0.4309636056423187,
1.3509477376937866,
-0.03221989795565605,
0.17802831530570984,
1.1183643341064453,
-1.5115100145339966,
1.4312421083450317,
-0.6013274788856506,
0.2871963381767273,
-2.393439292907715,
1.4377273321151733,
-0.730556070804596,
1.985466718673706,
-2.772545099258423,
0.49579739570617676,
-0.6119492053985596,
-0.5176381468772888,
0.3142983317375183,
-0.2982322871685028,
0.13951124250888824,
-0.12301289290189743,
-1.1110882759094238,
-0.09247075766324997,
-0.550094723701477,
0.6007397174835205,
1.1553544998168945,
1.2565302848815918,
-1.0408310890197754,
-0.2276003509759903,
-1.6616857051849365,
-0.1704186499118805,
-0.7540231943130493,
0.14082874357700348,
-2.039489507675171,
-0.15521495044231415,
-1.9049155712127686,
-2.362349033355713,
-1.3328328132629395,
-0.8062987923622131,
1.122866153717041,
0.24659894406795502,
-0.9822059273719788,
1.2836687564849854,
-0.43340015411376953,
-1.8301459550857544,
1.1420960426330566,
-2.2007734775543213
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | i got error using method from_spark when using multi-node Spark cluster. seems could only use "from_spark" in local? | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 94 | 18 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
i got error using method from_spark when using multi-node Spark cluster. seems could only use "from_spark" in local? | [
-1.2310693264007568,
-0.9906632900238037,
-0.635561466217041,
1.4529298543930054,
-0.16379669308662415,
-1.166024923324585,
0.13897590339183807,
-1.0807207822799683,
1.5118030309677124,
-0.6884455680847168,
0.24126824736595154,
-1.6125189065933228,
-0.11440496146678925,
-0.45459726452827454,
-0.6764232516288757,
-0.9181524515151978,
-0.4403718411922455,
-0.8709037899971008,
1.034029483795166,
2.539928436279297,
1.3562208414077759,
-1.358117938041687,
2.764885663986206,
0.6818593144416809,
-0.2708154022693634,
-1.1080896854400635,
0.5722270607948303,
0.09710371494293213,
-1.25690758228302,
-0.42186084389686584,
-0.9621079564094543,
-0.05910792201757431,
-0.5973240733146667,
-0.42256489396095276,
0.04797923564910889,
0.3462635576725006,
-0.24552325904369354,
-0.26832306385040283,
-0.5903307795524597,
-0.7292190194129944,
0.5961126089096069,
-0.35625043511390686,
0.9648796916007996,
-0.25301477313041687,
1.7660945653915405,
-0.6657438278198242,
0.5513856410980225,
0.7556774616241455,
1.2577228546142578,
0.2196265459060669,
0.021325109526515007,
0.32527777552604675,
0.3846597373485565,
0.0642324909567833,
0.5764076709747314,
1.154802918434143,
0.6083068251609802,
0.46473413705825806,
0.5801188349723816,
-2.1999425888061523,
1.2855368852615356,
-0.9289824962615967,
0.23248961567878723,
1.2504396438598633,
-0.846335232257843,
0.35997751355171204,
-1.8196256160736084,
-0.13419084250926971,
0.6518609523773193,
-2.2768568992614746,
0.26953163743019104,
-1.2969622611999512,
-0.5370709300041199,
1.0005749464035034,
0.325682133436203,
-1.20705246925354,
0.1524674892425537,
-0.5144984126091003,
1.0487116575241089,
0.46640869975090027,
1.1023991107940674,
-1.688827633857727,
-0.06539487093687057,
-0.1567727029323578,
0.15617944300174713,
-1.2044366598129272,
-1.6268306970596313,
0.586466372013092,
0.5288886427879333,
0.6895463466644287,
-0.04786274582147598,
0.9990171790122986,
-1.1048202514648438,
0.9042912721633911,
-0.9897563457489014,
-1.569977045059204,
-1.4335830211639404,
-2.4283533096313477,
-2.385385036468506,
0.7641058564186096,
-0.5279769897460938,
-0.5138412117958069,
2.031874656677246,
-0.9219640493392944,
-1.7502797842025757,
1.0723403692245483,
0.30750441551208496,
0.06888796389102936,
2.4096436500549316,
0.16164757311344147,
-0.7534145712852478,
0.456682026386261,
-0.7354311347007751,
0.7614443898200989,
-0.292292982339859,
1.3471187353134155,
0.49787840247154236,
-1.014295220375061,
1.607005000114441,
-0.42606812715530396,
0.4654960036277771,
-0.6671419739723206,
-0.5104341506958008,
-0.768370509147644,
0.1978776752948761,
1.8062958717346191,
-0.3327290117740631,
1.581626057624817,
-0.2787124812602997,
-1.5179768800735474,
-1.5760118961334229,
0.8033867478370667,
0.555688202381134,
-0.8396463990211487,
0.02952919341623783,
-0.4971292018890381,
0.1174103319644928,
-0.015949461609125137,
1.0875849723815918,
1.2219232320785522,
0.7331318259239197,
-0.35349807143211365,
-0.8690019845962524,
0.18620051443576813,
-0.22784307599067688,
-0.7262066006660461,
-1.8565163612365723,
-0.35688114166259766,
0.17857159674167633,
0.6512244939804077,
-1.2701404094696045,
1.7576324939727783,
0.8815938234329224,
2.001554250717163,
0.9571516513824463,
-0.4037027657032013,
1.4625500440597534,
0.05729380249977112,
1.807897925376892,
-0.5525468587875366,
0.6312992572784424,
-0.3494947850704193,
-1.1802716255187988,
0.8086940050125122,
-0.3156043589115143,
-2.0378170013427734,
-0.8441451191902161,
-0.6758065223693848,
-0.17465847730636597,
-0.7792279124259949,
0.876672625541687,
-0.2050868421792984,
-1.485385775566101,
0.15487520396709442,
-0.7065630555152893,
0.20861858129501343,
-1.264041543006897,
0.2523624897003174,
0.6737518310546875,
-0.7602121233940125,
0.04332279413938522,
-0.25279197096824646,
-1.252586841583252,
-0.5305940508842468,
0.2506829798221588,
1.9276373386383057,
-0.6620750427246094,
0.8809418678283691,
1.035671591758728,
-0.6829857230186462,
0.1230962872505188,
0.24234691262245178,
-0.2948535978794098,
0.804052472114563,
-1.0805659294128418,
-0.4813981354236603,
1.2067980766296387,
-0.23259341716766357,
-0.6762599945068359,
1.4188345670700073,
0.7562242746353149,
-1.0551376342773438,
-0.2762543261051178,
-0.19638492166996002,
-0.8662853837013245,
-0.0005861930549144745,
-1.5899957418441772,
-0.15523558855056763,
0.32836660742759705,
-1.5218364000320435,
-0.3349071741104126,
-0.23455502092838287,
1.4563878774642944,
-0.21053029596805573,
1.4877668619155884,
-0.2968365550041199,
-0.1837998330593109,
-0.32472795248031616,
-0.3839401304721832,
0.19735150039196014,
-0.15467721223831177,
-0.571088969707489,
0.24353089928627014,
-0.8825139403343201,
0.29056137800216675,
1.4807387590408325,
0.36457276344299316,
0.12704986333847046,
0.46070486307144165,
1.0726633071899414,
0.3553793132305145,
-0.07433181256055832,
-0.79521644115448,
-1.5526673793792725,
2.018916368484497,
-1.4179686307907104,
1.9360370635986328,
0.861536979675293,
-0.13025371730327606,
-1.825316309928894,
-1.7776637077331543,
1.1584867238998413,
1.1424535512924194,
2.4445676803588867,
0.5422031283378601,
0.3975287973880768,
-0.7575923204421997,
-0.721553385257721,
0.38836291432380676,
-0.9532207250595093,
-0.6847277283668518,
0.19093747437000275,
2.378073215484619,
1.825438380241394,
-0.48895660042762756,
-0.18947669863700867,
-0.9628154039382935,
1.2952172756195068,
-0.24756059050559998,
0.26339247822761536,
2.0919580459594727,
-0.3003012239933014,
-1.1344573497772217,
1.3921171426773071,
-2.4352433681488037,
0.2912601828575134,
2.055870294570923,
0.3367568552494049,
0.08421950787305832,
-1.466916799545288,
-0.6661214828491211,
-0.2901611030101776,
-0.4914761483669281,
-1.2075520753860474,
0.5456690192222595,
-0.29644209146499634,
-0.9602513909339905,
-1.4700406789779663,
-0.05179945379495621,
-1.1361229419708252,
-1.8147344589233398,
0.4180440306663513,
1.8213144540786743,
2.0269317626953125,
-0.7867727279663086,
1.2993457317352295,
-0.24210618436336517,
-0.02200373075902462,
1.2494947910308838,
1.3445199728012085,
3.0701401233673096,
1.8956043720245361,
-1.3130236864089966,
0.7263866066932678,
-0.19888533651828766,
-0.48363903164863586,
1.1316570043563843,
-1.2353522777557373,
1.112249732017517,
-0.20355570316314697,
-1.2813493013381958,
-1.2790769338607788,
1.1147708892822266,
0.44463542103767395,
0.024818575009703636,
-0.49992597103118896,
1.2311692237854004,
0.21000900864601135,
1.3810935020446777,
0.6211148500442505,
-0.35180729627609253,
0.5269709229469299,
-0.3899880647659302,
-0.572237491607666,
1.6181747913360596,
0.18169762194156647,
-1.4880528450012207,
-2.3762619495391846,
-0.27685976028442383,
-0.9579898118972778,
-0.07394657284021378,
-0.5786532163619995,
-1.0498276948928833,
1.5959841012954712,
0.3690345287322998,
-1.24394690990448,
-0.28601762652397156,
-0.2700057625770569,
-0.5350310802459717,
2.6511600017547607,
-1.2541645765304565,
-0.12558630108833313,
-0.9590204954147339,
-0.5353021025657654,
1.621770977973938,
-1.1737926006317139,
-0.22271642088890076,
-1.0914030075073242,
-0.6788643598556519,
-1.277864933013916,
-0.5317266583442688,
0.05050075054168701,
-0.9845787286758423,
0.7255631685256958,
0.2155614048242569,
-1.0757561922073364,
-0.3268296420574188,
-0.7754097580909729,
1.075668215751648,
-0.029234111309051514,
0.1691483110189438,
1.8604669570922852,
0.3472762107849121,
-0.43166568875312805,
0.7121777534484863,
1.1772897243499756,
0.5981717705726624,
-0.6380322575569153,
0.0730767622590065,
-0.7307494282722473,
0.3242531418800354,
-1.3903417587280273,
0.244431734085083,
-2.8941757678985596,
0.7327929139137268,
-0.1473311483860016,
-0.10082688927650452,
-0.08760970830917358,
-1.3462496995925903,
1.0941168069839478,
2.6057679653167725,
-1.1001451015472412,
0.5403391122817993,
0.4503423273563385,
1.0495880842208862,
-1.570772409439087,
0.3235878646373749,
-0.45649734139442444,
2.0700931549072266,
0.20148390531539917,
1.2294116020202637,
-0.49387428164482117,
-2.2143239974975586,
0.7133310437202454,
-1.2332667112350464,
-1.1177407503128052,
0.7711191773414612,
-0.9708767533302307,
0.31354016065597534,
-1.4139207601547241,
-0.1373196244239807,
-0.9481400847434998,
-1.2850029468536377,
0.6442403793334961,
0.1351652592420578,
0.44852215051651,
-0.5362771153450012,
0.4366539716720581,
-2.1733524799346924,
-1.3153854608535767,
-0.19280187785625458,
-0.9917511940002441,
0.5278427600860596,
-0.3586319386959076,
0.6105261445045471,
-0.10347796231508255,
0.06346655637025833,
0.352370023727417,
1.4293562173843384,
3.3500590324401855,
0.21330620348453522,
0.14654222130775452,
-0.03542938828468323,
-1.0481265783309937,
1.433021903038025,
0.8798255324363708,
-0.17352984845638275,
-0.5867992639541626,
-1.005658745765686,
1.2196694612503052,
2.0898776054382324,
1.0741225481033325,
0.1117384284734726,
-0.8145327568054199,
-0.7248276472091675,
0.041137389838695526,
0.22611534595489502,
0.5534849762916565,
1.030189871788025,
-0.06219068169593811,
0.07495057582855225,
1.4681007862091064,
1.2770369052886963,
-0.3039071261882782,
0.3784821331501007,
-0.9389981031417847,
-0.5342757105827332,
0.4113939106464386,
0.18506766855716705,
-0.023695576936006546,
0.5071184635162354,
-1.1222550868988037,
-0.29341012239456177,
-0.29123520851135254,
-0.8925517201423645,
-0.7710319757461548,
-0.35927262902259827,
-0.47020983695983887,
1.5644837617874146,
0.05275851488113403,
-0.41792845726013184,
0.04966247081756592,
-0.6320037245750427,
-0.1826396882534027,
-1.1208752393722534,
0.21254923939704895,
-0.08991897106170654,
-0.052930936217308044,
-0.15921761095523834,
1.6834763288497925,
-0.8205147385597229,
-2.1096279621124268,
0.18247301876544952,
0.259961873292923,
-0.32423850893974304,
0.20722907781600952,
1.7080981731414795,
0.5018050670623779,
1.3660045862197876,
1.2968019247055054,
0.9211600422859192,
-0.5485666990280151,
-1.231949806213379,
0.7274045348167419,
0.9889190793037415,
-1.2942135334014893,
0.8999581336975098,
-0.1737610548734665,
-0.4686139225959778,
0.6348978281021118,
1.3327895402908325,
0.4126802682876587,
-1.9921451807022095,
0.9254145622253418,
-0.9051188230514526,
0.7954290509223938,
0.6638160347938538,
0.7775458693504333,
0.16337880492210388,
0.8392165899276733,
-1.295127272605896,
-1.050054907798767,
-0.6975744366645813,
-0.6381588578224182,
1.8986181020736694,
-0.2844100892543793,
0.5741700530052185,
-0.21580472588539124,
-1.2411473989486694,
-0.14106298983097076,
0.7509230375289917,
0.29450103640556335,
-0.4237319529056549,
0.8790549039840698,
-0.5888895392417908,
-0.9984052181243896,
-1.2659902572631836,
-0.3402005136013031,
-1.0373128652572632,
-0.7647220492362976,
1.0766865015029907,
0.7949812412261963,
0.3664328455924988,
1.9666550159454346,
0.5486884713172913,
0.3104490637779236,
-2.693850040435791,
0.9151737689971924,
0.2813722789287567,
-0.0753418430685997,
0.9072942137718201,
0.18407487869262695,
1.11861252784729,
0.03610383719205856,
0.58974689245224,
-2.3818159103393555,
2.2376952171325684,
-0.16918623447418213,
0.6922537088394165,
0.09818127006292343,
-0.1899314969778061,
1.1133126020431519,
0.621599555015564,
0.6246492266654968,
-1.0382916927337646,
0.714009702205658,
-0.5625420808792114,
1.0867211818695068,
0.8967736959457397,
-0.8353918194770813,
0.043609052896499634,
1.3535419702529907,
0.5191431045532227,
-0.3586480915546417,
-0.9186354875564575,
-0.8102644681930542,
0.9315093755722046,
1.7225549221038818,
-0.05396771430969238,
-0.02284833788871765,
0.9113067388534546,
0.611033022403717,
-1.2595264911651611,
-0.01448056846857071,
-0.7831894755363464,
-0.6804018020629883,
1.7492032051086426,
2.1194231510162354,
-0.10253854095935822,
-0.2860225737094879,
-0.6582567095756531,
-1.2656687498092651,
0.8297669291496277,
-0.13786499202251434,
0.16854330897331238,
0.6876881718635559,
-0.6034857630729675,
1.1138993501663208,
0.6185423731803894,
1.037636637687683,
0.10181127488613129,
0.2583724856376648,
0.2723815143108368,
-0.3248552083969116,
-1.2081804275512695,
-0.3074205815792084,
-1.0998882055282593,
-2.569044828414917,
0.4588477611541748,
-0.21268829703330994,
-1.5626481771469116,
0.12543131411075592,
-1.0232354402542114,
0.8628585934638977,
-0.6089209318161011,
-1.0631804466247559,
-1.4433826208114624,
0.3353983759880066,
-0.21612600982189178,
0.9703767895698547,
-1.6751974821090698,
-0.1532789021730423,
1.2209404706954956,
0.7842285633087158,
-0.5457006692886353,
0.8890199661254883,
0.2780531942844391,
1.0599113702774048,
0.7960147857666016,
-0.3629331588745117,
0.6071127653121948,
0.05039914697408676,
-1.303989291191101,
0.334484726190567,
1.2235490083694458,
0.15955349802970886,
1.4840184450149536,
-0.44213151931762695,
0.08542885631322861,
0.4279271364212036,
-0.6918087005615234,
-0.5168874263763428,
-0.38397738337516785,
0.7258176207542419,
-0.006291531957685947,
-1.0790632963180542,
-0.1453753113746643,
-0.09775307774543762,
-0.2907750904560089,
0.16022183001041412,
-1.453532099723816,
-0.23988080024719238,
-0.39098820090293884,
-0.5302101969718933,
-1.3144036531448364,
0.06675982475280762,
1.294813871383667,
-0.8327134251594543,
-0.20101891458034515,
0.4483867883682251,
0.3537513315677643,
0.5822009444236755,
0.6645277142524719,
-0.7526430487632751,
-0.36940157413482666,
-0.30431708693504333,
-0.31470340490341187,
0.32701772451400757,
1.292202115058899,
-0.06261944770812988,
-0.9966762661933899,
0.7119587659835815,
-0.33344566822052,
0.18148937821388245,
1.9948314428329468,
0.04326161742210388,
-0.7216731309890747,
0.3241766393184662,
-0.6459623575210571,
1.7712173461914062,
1.674687147140503,
1.3394376039505005,
-0.13018055260181427,
-0.8445996046066284,
0.5393049120903015,
-0.3479917645454407,
-0.3242150545120239,
0.8503502607345581,
0.4491100311279297,
-0.13701844215393066,
-1.3228352069854736,
0.5971409678459167,
1.2655158042907715,
-0.8223305940628052,
-0.7157028913497925,
0.09796500205993652,
-0.8937450051307678,
1.2242014408111572,
0.5829155445098877,
0.323798269033432,
0.196983203291893,
1.520845651626587,
0.8032078742980957,
-0.46590378880500793,
0.5396592617034912,
0.508318305015564,
-0.19774316251277924,
-2.071136713027954,
-1.0242918729782104,
0.2923823297023773,
-0.49057960510253906,
-1.6174558401107788,
1.3011237382888794,
-1.1649936437606812,
-0.9808071851730347,
0.515261709690094,
0.06197656691074371,
1.3265165090560913,
0.3835143446922302,
1.749237298965454,
2.1003360748291016,
0.9820948243141174,
0.37198904156684875,
1.3288228511810303,
0.011484963819384575,
-0.4716341197490692,
1.8919838666915894,
-0.3562229871749878,
0.5634000897407532,
1.0807288885116577,
-0.3675486743450165,
-1.0537265539169312,
-0.8087710738182068,
-1.1712887287139893,
-0.6232223510742188,
1.194881796836853,
0.12049812078475952,
-1.058850884437561,
0.22943779826164246,
1.5348482131958008,
0.08737317472696304,
-0.24820959568023682,
0.6688483953475952,
0.38859009742736816,
-0.6971911787986755,
-0.07945847511291504,
-0.8110536932945251,
0.419003427028656,
-0.17110389471054077,
-0.35525012016296387,
0.15542103350162506,
0.4974505603313446,
1.2963939905166626,
-0.10308754444122314,
0.09562506526708603,
1.12509286403656,
-1.396459698677063,
1.5590471029281616,
-0.6258876919746399,
0.3344953656196594,
-2.433871269226074,
1.3476078510284424,
-0.8371008634567261,
1.8876023292541504,
-2.5991828441619873,
0.4914713203907013,
-0.49860379099845886,
-0.43849384784698486,
0.21133621037006378,
-0.4231027364730835,
0.10811421275138855,
-0.1501072496175766,
-1.0390173196792603,
-0.054797932505607605,
-0.7463549375534058,
0.6028361916542053,
1.128595232963562,
1.3476911783218384,
-1.1552413702011108,
-0.29287949204444885,
-1.7549837827682495,
-0.2569117546081543,
-0.7688835263252258,
0.35544508695602417,
-1.907318115234375,
-0.11038769781589508,
-2.0228145122528076,
-2.3030331134796143,
-1.3370946645736694,
-0.8996936678886414,
1.045236349105835,
0.10068309307098389,
-0.9881912469863892,
1.1279914379119873,
-0.38182735443115234,
-1.8603591918945312,
1.173082947731018,
-2.211935520172119
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | cc @maddiedawson it looks like there an issue with `_validate_cache_dir` ?
It looks like the function passed to mapPartitions has a reference to the Spark dataset builder, and therefore contains the SparkContext itself.
I think it can be fixed by defining `create_cache_and_write_probe` outside the Spark dataset builder, and pass a `partial(create_cache_and_write_probe, cache_dir=self._cache_dir)` to `mapPartitions` | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 94 | 54 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
cc @maddiedawson it looks like there an issue with `_validate_cache_dir` ?
It looks like the function passed to mapPartitions has a reference to the Spark dataset builder, and therefore contains the SparkContext itself.
I think it can be fixed by defining `create_cache_and_write_probe` outside the Spark dataset builder, and pass a `partial(create_cache_and_write_probe, cache_dir=self._cache_dir)` to `mapPartitions` | [
-1.2310693264007568,
-0.9906632900238037,
-0.635561466217041,
1.4529298543930054,
-0.16379669308662415,
-1.166024923324585,
0.13897590339183807,
-1.0807207822799683,
1.5118030309677124,
-0.6884455680847168,
0.24126824736595154,
-1.6125189065933228,
-0.11440496146678925,
-0.45459726452827454,
-0.6764232516288757,
-0.9181524515151978,
-0.4403718411922455,
-0.8709037899971008,
1.034029483795166,
2.539928436279297,
1.3562208414077759,
-1.358117938041687,
2.764885663986206,
0.6818593144416809,
-0.2708154022693634,
-1.1080896854400635,
0.5722270607948303,
0.09710371494293213,
-1.25690758228302,
-0.42186084389686584,
-0.9621079564094543,
-0.05910792201757431,
-0.5973240733146667,
-0.42256489396095276,
0.04797923564910889,
0.3462635576725006,
-0.24552325904369354,
-0.26832306385040283,
-0.5903307795524597,
-0.7292190194129944,
0.5961126089096069,
-0.35625043511390686,
0.9648796916007996,
-0.25301477313041687,
1.7660945653915405,
-0.6657438278198242,
0.5513856410980225,
0.7556774616241455,
1.2577228546142578,
0.2196265459060669,
0.021325109526515007,
0.32527777552604675,
0.3846597373485565,
0.0642324909567833,
0.5764076709747314,
1.154802918434143,
0.6083068251609802,
0.46473413705825806,
0.5801188349723816,
-2.1999425888061523,
1.2855368852615356,
-0.9289824962615967,
0.23248961567878723,
1.2504396438598633,
-0.846335232257843,
0.35997751355171204,
-1.8196256160736084,
-0.13419084250926971,
0.6518609523773193,
-2.2768568992614746,
0.26953163743019104,
-1.2969622611999512,
-0.5370709300041199,
1.0005749464035034,
0.325682133436203,
-1.20705246925354,
0.1524674892425537,
-0.5144984126091003,
1.0487116575241089,
0.46640869975090027,
1.1023991107940674,
-1.688827633857727,
-0.06539487093687057,
-0.1567727029323578,
0.15617944300174713,
-1.2044366598129272,
-1.6268306970596313,
0.586466372013092,
0.5288886427879333,
0.6895463466644287,
-0.04786274582147598,
0.9990171790122986,
-1.1048202514648438,
0.9042912721633911,
-0.9897563457489014,
-1.569977045059204,
-1.4335830211639404,
-2.4283533096313477,
-2.385385036468506,
0.7641058564186096,
-0.5279769897460938,
-0.5138412117958069,
2.031874656677246,
-0.9219640493392944,
-1.7502797842025757,
1.0723403692245483,
0.30750441551208496,
0.06888796389102936,
2.4096436500549316,
0.16164757311344147,
-0.7534145712852478,
0.456682026386261,
-0.7354311347007751,
0.7614443898200989,
-0.292292982339859,
1.3471187353134155,
0.49787840247154236,
-1.014295220375061,
1.607005000114441,
-0.42606812715530396,
0.4654960036277771,
-0.6671419739723206,
-0.5104341506958008,
-0.768370509147644,
0.1978776752948761,
1.8062958717346191,
-0.3327290117740631,
1.581626057624817,
-0.2787124812602997,
-1.5179768800735474,
-1.5760118961334229,
0.8033867478370667,
0.555688202381134,
-0.8396463990211487,
0.02952919341623783,
-0.4971292018890381,
0.1174103319644928,
-0.015949461609125137,
1.0875849723815918,
1.2219232320785522,
0.7331318259239197,
-0.35349807143211365,
-0.8690019845962524,
0.18620051443576813,
-0.22784307599067688,
-0.7262066006660461,
-1.8565163612365723,
-0.35688114166259766,
0.17857159674167633,
0.6512244939804077,
-1.2701404094696045,
1.7576324939727783,
0.8815938234329224,
2.001554250717163,
0.9571516513824463,
-0.4037027657032013,
1.4625500440597534,
0.05729380249977112,
1.807897925376892,
-0.5525468587875366,
0.6312992572784424,
-0.3494947850704193,
-1.1802716255187988,
0.8086940050125122,
-0.3156043589115143,
-2.0378170013427734,
-0.8441451191902161,
-0.6758065223693848,
-0.17465847730636597,
-0.7792279124259949,
0.876672625541687,
-0.2050868421792984,
-1.485385775566101,
0.15487520396709442,
-0.7065630555152893,
0.20861858129501343,
-1.264041543006897,
0.2523624897003174,
0.6737518310546875,
-0.7602121233940125,
0.04332279413938522,
-0.25279197096824646,
-1.252586841583252,
-0.5305940508842468,
0.2506829798221588,
1.9276373386383057,
-0.6620750427246094,
0.8809418678283691,
1.035671591758728,
-0.6829857230186462,
0.1230962872505188,
0.24234691262245178,
-0.2948535978794098,
0.804052472114563,
-1.0805659294128418,
-0.4813981354236603,
1.2067980766296387,
-0.23259341716766357,
-0.6762599945068359,
1.4188345670700073,
0.7562242746353149,
-1.0551376342773438,
-0.2762543261051178,
-0.19638492166996002,
-0.8662853837013245,
-0.0005861930549144745,
-1.5899957418441772,
-0.15523558855056763,
0.32836660742759705,
-1.5218364000320435,
-0.3349071741104126,
-0.23455502092838287,
1.4563878774642944,
-0.21053029596805573,
1.4877668619155884,
-0.2968365550041199,
-0.1837998330593109,
-0.32472795248031616,
-0.3839401304721832,
0.19735150039196014,
-0.15467721223831177,
-0.571088969707489,
0.24353089928627014,
-0.8825139403343201,
0.29056137800216675,
1.4807387590408325,
0.36457276344299316,
0.12704986333847046,
0.46070486307144165,
1.0726633071899414,
0.3553793132305145,
-0.07433181256055832,
-0.79521644115448,
-1.5526673793792725,
2.018916368484497,
-1.4179686307907104,
1.9360370635986328,
0.861536979675293,
-0.13025371730327606,
-1.825316309928894,
-1.7776637077331543,
1.1584867238998413,
1.1424535512924194,
2.4445676803588867,
0.5422031283378601,
0.3975287973880768,
-0.7575923204421997,
-0.721553385257721,
0.38836291432380676,
-0.9532207250595093,
-0.6847277283668518,
0.19093747437000275,
2.378073215484619,
1.825438380241394,
-0.48895660042762756,
-0.18947669863700867,
-0.9628154039382935,
1.2952172756195068,
-0.24756059050559998,
0.26339247822761536,
2.0919580459594727,
-0.3003012239933014,
-1.1344573497772217,
1.3921171426773071,
-2.4352433681488037,
0.2912601828575134,
2.055870294570923,
0.3367568552494049,
0.08421950787305832,
-1.466916799545288,
-0.6661214828491211,
-0.2901611030101776,
-0.4914761483669281,
-1.2075520753860474,
0.5456690192222595,
-0.29644209146499634,
-0.9602513909339905,
-1.4700406789779663,
-0.05179945379495621,
-1.1361229419708252,
-1.8147344589233398,
0.4180440306663513,
1.8213144540786743,
2.0269317626953125,
-0.7867727279663086,
1.2993457317352295,
-0.24210618436336517,
-0.02200373075902462,
1.2494947910308838,
1.3445199728012085,
3.0701401233673096,
1.8956043720245361,
-1.3130236864089966,
0.7263866066932678,
-0.19888533651828766,
-0.48363903164863586,
1.1316570043563843,
-1.2353522777557373,
1.112249732017517,
-0.20355570316314697,
-1.2813493013381958,
-1.2790769338607788,
1.1147708892822266,
0.44463542103767395,
0.024818575009703636,
-0.49992597103118896,
1.2311692237854004,
0.21000900864601135,
1.3810935020446777,
0.6211148500442505,
-0.35180729627609253,
0.5269709229469299,
-0.3899880647659302,
-0.572237491607666,
1.6181747913360596,
0.18169762194156647,
-1.4880528450012207,
-2.3762619495391846,
-0.27685976028442383,
-0.9579898118972778,
-0.07394657284021378,
-0.5786532163619995,
-1.0498276948928833,
1.5959841012954712,
0.3690345287322998,
-1.24394690990448,
-0.28601762652397156,
-0.2700057625770569,
-0.5350310802459717,
2.6511600017547607,
-1.2541645765304565,
-0.12558630108833313,
-0.9590204954147339,
-0.5353021025657654,
1.621770977973938,
-1.1737926006317139,
-0.22271642088890076,
-1.0914030075073242,
-0.6788643598556519,
-1.277864933013916,
-0.5317266583442688,
0.05050075054168701,
-0.9845787286758423,
0.7255631685256958,
0.2155614048242569,
-1.0757561922073364,
-0.3268296420574188,
-0.7754097580909729,
1.075668215751648,
-0.029234111309051514,
0.1691483110189438,
1.8604669570922852,
0.3472762107849121,
-0.43166568875312805,
0.7121777534484863,
1.1772897243499756,
0.5981717705726624,
-0.6380322575569153,
0.0730767622590065,
-0.7307494282722473,
0.3242531418800354,
-1.3903417587280273,
0.244431734085083,
-2.8941757678985596,
0.7327929139137268,
-0.1473311483860016,
-0.10082688927650452,
-0.08760970830917358,
-1.3462496995925903,
1.0941168069839478,
2.6057679653167725,
-1.1001451015472412,
0.5403391122817993,
0.4503423273563385,
1.0495880842208862,
-1.570772409439087,
0.3235878646373749,
-0.45649734139442444,
2.0700931549072266,
0.20148390531539917,
1.2294116020202637,
-0.49387428164482117,
-2.2143239974975586,
0.7133310437202454,
-1.2332667112350464,
-1.1177407503128052,
0.7711191773414612,
-0.9708767533302307,
0.31354016065597534,
-1.4139207601547241,
-0.1373196244239807,
-0.9481400847434998,
-1.2850029468536377,
0.6442403793334961,
0.1351652592420578,
0.44852215051651,
-0.5362771153450012,
0.4366539716720581,
-2.1733524799346924,
-1.3153854608535767,
-0.19280187785625458,
-0.9917511940002441,
0.5278427600860596,
-0.3586319386959076,
0.6105261445045471,
-0.10347796231508255,
0.06346655637025833,
0.352370023727417,
1.4293562173843384,
3.3500590324401855,
0.21330620348453522,
0.14654222130775452,
-0.03542938828468323,
-1.0481265783309937,
1.433021903038025,
0.8798255324363708,
-0.17352984845638275,
-0.5867992639541626,
-1.005658745765686,
1.2196694612503052,
2.0898776054382324,
1.0741225481033325,
0.1117384284734726,
-0.8145327568054199,
-0.7248276472091675,
0.041137389838695526,
0.22611534595489502,
0.5534849762916565,
1.030189871788025,
-0.06219068169593811,
0.07495057582855225,
1.4681007862091064,
1.2770369052886963,
-0.3039071261882782,
0.3784821331501007,
-0.9389981031417847,
-0.5342757105827332,
0.4113939106464386,
0.18506766855716705,
-0.023695576936006546,
0.5071184635162354,
-1.1222550868988037,
-0.29341012239456177,
-0.29123520851135254,
-0.8925517201423645,
-0.7710319757461548,
-0.35927262902259827,
-0.47020983695983887,
1.5644837617874146,
0.05275851488113403,
-0.41792845726013184,
0.04966247081756592,
-0.6320037245750427,
-0.1826396882534027,
-1.1208752393722534,
0.21254923939704895,
-0.08991897106170654,
-0.052930936217308044,
-0.15921761095523834,
1.6834763288497925,
-0.8205147385597229,
-2.1096279621124268,
0.18247301876544952,
0.259961873292923,
-0.32423850893974304,
0.20722907781600952,
1.7080981731414795,
0.5018050670623779,
1.3660045862197876,
1.2968019247055054,
0.9211600422859192,
-0.5485666990280151,
-1.231949806213379,
0.7274045348167419,
0.9889190793037415,
-1.2942135334014893,
0.8999581336975098,
-0.1737610548734665,
-0.4686139225959778,
0.6348978281021118,
1.3327895402908325,
0.4126802682876587,
-1.9921451807022095,
0.9254145622253418,
-0.9051188230514526,
0.7954290509223938,
0.6638160347938538,
0.7775458693504333,
0.16337880492210388,
0.8392165899276733,
-1.295127272605896,
-1.050054907798767,
-0.6975744366645813,
-0.6381588578224182,
1.8986181020736694,
-0.2844100892543793,
0.5741700530052185,
-0.21580472588539124,
-1.2411473989486694,
-0.14106298983097076,
0.7509230375289917,
0.29450103640556335,
-0.4237319529056549,
0.8790549039840698,
-0.5888895392417908,
-0.9984052181243896,
-1.2659902572631836,
-0.3402005136013031,
-1.0373128652572632,
-0.7647220492362976,
1.0766865015029907,
0.7949812412261963,
0.3664328455924988,
1.9666550159454346,
0.5486884713172913,
0.3104490637779236,
-2.693850040435791,
0.9151737689971924,
0.2813722789287567,
-0.0753418430685997,
0.9072942137718201,
0.18407487869262695,
1.11861252784729,
0.03610383719205856,
0.58974689245224,
-2.3818159103393555,
2.2376952171325684,
-0.16918623447418213,
0.6922537088394165,
0.09818127006292343,
-0.1899314969778061,
1.1133126020431519,
0.621599555015564,
0.6246492266654968,
-1.0382916927337646,
0.714009702205658,
-0.5625420808792114,
1.0867211818695068,
0.8967736959457397,
-0.8353918194770813,
0.043609052896499634,
1.3535419702529907,
0.5191431045532227,
-0.3586480915546417,
-0.9186354875564575,
-0.8102644681930542,
0.9315093755722046,
1.7225549221038818,
-0.05396771430969238,
-0.02284833788871765,
0.9113067388534546,
0.611033022403717,
-1.2595264911651611,
-0.01448056846857071,
-0.7831894755363464,
-0.6804018020629883,
1.7492032051086426,
2.1194231510162354,
-0.10253854095935822,
-0.2860225737094879,
-0.6582567095756531,
-1.2656687498092651,
0.8297669291496277,
-0.13786499202251434,
0.16854330897331238,
0.6876881718635559,
-0.6034857630729675,
1.1138993501663208,
0.6185423731803894,
1.037636637687683,
0.10181127488613129,
0.2583724856376648,
0.2723815143108368,
-0.3248552083969116,
-1.2081804275512695,
-0.3074205815792084,
-1.0998882055282593,
-2.569044828414917,
0.4588477611541748,
-0.21268829703330994,
-1.5626481771469116,
0.12543131411075592,
-1.0232354402542114,
0.8628585934638977,
-0.6089209318161011,
-1.0631804466247559,
-1.4433826208114624,
0.3353983759880066,
-0.21612600982189178,
0.9703767895698547,
-1.6751974821090698,
-0.1532789021730423,
1.2209404706954956,
0.7842285633087158,
-0.5457006692886353,
0.8890199661254883,
0.2780531942844391,
1.0599113702774048,
0.7960147857666016,
-0.3629331588745117,
0.6071127653121948,
0.05039914697408676,
-1.303989291191101,
0.334484726190567,
1.2235490083694458,
0.15955349802970886,
1.4840184450149536,
-0.44213151931762695,
0.08542885631322861,
0.4279271364212036,
-0.6918087005615234,
-0.5168874263763428,
-0.38397738337516785,
0.7258176207542419,
-0.006291531957685947,
-1.0790632963180542,
-0.1453753113746643,
-0.09775307774543762,
-0.2907750904560089,
0.16022183001041412,
-1.453532099723816,
-0.23988080024719238,
-0.39098820090293884,
-0.5302101969718933,
-1.3144036531448364,
0.06675982475280762,
1.294813871383667,
-0.8327134251594543,
-0.20101891458034515,
0.4483867883682251,
0.3537513315677643,
0.5822009444236755,
0.6645277142524719,
-0.7526430487632751,
-0.36940157413482666,
-0.30431708693504333,
-0.31470340490341187,
0.32701772451400757,
1.292202115058899,
-0.06261944770812988,
-0.9966762661933899,
0.7119587659835815,
-0.33344566822052,
0.18148937821388245,
1.9948314428329468,
0.04326161742210388,
-0.7216731309890747,
0.3241766393184662,
-0.6459623575210571,
1.7712173461914062,
1.674687147140503,
1.3394376039505005,
-0.13018055260181427,
-0.8445996046066284,
0.5393049120903015,
-0.3479917645454407,
-0.3242150545120239,
0.8503502607345581,
0.4491100311279297,
-0.13701844215393066,
-1.3228352069854736,
0.5971409678459167,
1.2655158042907715,
-0.8223305940628052,
-0.7157028913497925,
0.09796500205993652,
-0.8937450051307678,
1.2242014408111572,
0.5829155445098877,
0.323798269033432,
0.196983203291893,
1.520845651626587,
0.8032078742980957,
-0.46590378880500793,
0.5396592617034912,
0.508318305015564,
-0.19774316251277924,
-2.071136713027954,
-1.0242918729782104,
0.2923823297023773,
-0.49057960510253906,
-1.6174558401107788,
1.3011237382888794,
-1.1649936437606812,
-0.9808071851730347,
0.515261709690094,
0.06197656691074371,
1.3265165090560913,
0.3835143446922302,
1.749237298965454,
2.1003360748291016,
0.9820948243141174,
0.37198904156684875,
1.3288228511810303,
0.011484963819384575,
-0.4716341197490692,
1.8919838666915894,
-0.3562229871749878,
0.5634000897407532,
1.0807288885116577,
-0.3675486743450165,
-1.0537265539169312,
-0.8087710738182068,
-1.1712887287139893,
-0.6232223510742188,
1.194881796836853,
0.12049812078475952,
-1.058850884437561,
0.22943779826164246,
1.5348482131958008,
0.08737317472696304,
-0.24820959568023682,
0.6688483953475952,
0.38859009742736816,
-0.6971911787986755,
-0.07945847511291504,
-0.8110536932945251,
0.419003427028656,
-0.17110389471054077,
-0.35525012016296387,
0.15542103350162506,
0.4974505603313446,
1.2963939905166626,
-0.10308754444122314,
0.09562506526708603,
1.12509286403656,
-1.396459698677063,
1.5590471029281616,
-0.6258876919746399,
0.3344953656196594,
-2.433871269226074,
1.3476078510284424,
-0.8371008634567261,
1.8876023292541504,
-2.5991828441619873,
0.4914713203907013,
-0.49860379099845886,
-0.43849384784698486,
0.21133621037006378,
-0.4231027364730835,
0.10811421275138855,
-0.1501072496175766,
-1.0390173196792603,
-0.054797932505607605,
-0.7463549375534058,
0.6028361916542053,
1.128595232963562,
1.3476911783218384,
-1.1552413702011108,
-0.29287949204444885,
-1.7549837827682495,
-0.2569117546081543,
-0.7688835263252258,
0.35544508695602417,
-1.907318115234375,
-0.11038769781589508,
-2.0228145122528076,
-2.3030331134796143,
-1.3370946645736694,
-0.8996936678886414,
1.045236349105835,
0.10068309307098389,
-0.9881912469863892,
1.1279914379119873,
-0.38182735443115234,
-1.8603591918945312,
1.173082947731018,
-2.211935520172119
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | Just saw this; thanks for flagging! Your proposed solution sounds good. I can prepare a PR | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 94 | 16 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
Just saw this; thanks for flagging! Your proposed solution sounds good. I can prepare a PR | [
-1.2310693264007568,
-0.9906632900238037,
-0.635561466217041,
1.4529298543930054,
-0.16379669308662415,
-1.166024923324585,
0.13897590339183807,
-1.0807207822799683,
1.5118030309677124,
-0.6884455680847168,
0.24126824736595154,
-1.6125189065933228,
-0.11440496146678925,
-0.45459726452827454,
-0.6764232516288757,
-0.9181524515151978,
-0.4403718411922455,
-0.8709037899971008,
1.034029483795166,
2.539928436279297,
1.3562208414077759,
-1.358117938041687,
2.764885663986206,
0.6818593144416809,
-0.2708154022693634,
-1.1080896854400635,
0.5722270607948303,
0.09710371494293213,
-1.25690758228302,
-0.42186084389686584,
-0.9621079564094543,
-0.05910792201757431,
-0.5973240733146667,
-0.42256489396095276,
0.04797923564910889,
0.3462635576725006,
-0.24552325904369354,
-0.26832306385040283,
-0.5903307795524597,
-0.7292190194129944,
0.5961126089096069,
-0.35625043511390686,
0.9648796916007996,
-0.25301477313041687,
1.7660945653915405,
-0.6657438278198242,
0.5513856410980225,
0.7556774616241455,
1.2577228546142578,
0.2196265459060669,
0.021325109526515007,
0.32527777552604675,
0.3846597373485565,
0.0642324909567833,
0.5764076709747314,
1.154802918434143,
0.6083068251609802,
0.46473413705825806,
0.5801188349723816,
-2.1999425888061523,
1.2855368852615356,
-0.9289824962615967,
0.23248961567878723,
1.2504396438598633,
-0.846335232257843,
0.35997751355171204,
-1.8196256160736084,
-0.13419084250926971,
0.6518609523773193,
-2.2768568992614746,
0.26953163743019104,
-1.2969622611999512,
-0.5370709300041199,
1.0005749464035034,
0.325682133436203,
-1.20705246925354,
0.1524674892425537,
-0.5144984126091003,
1.0487116575241089,
0.46640869975090027,
1.1023991107940674,
-1.688827633857727,
-0.06539487093687057,
-0.1567727029323578,
0.15617944300174713,
-1.2044366598129272,
-1.6268306970596313,
0.586466372013092,
0.5288886427879333,
0.6895463466644287,
-0.04786274582147598,
0.9990171790122986,
-1.1048202514648438,
0.9042912721633911,
-0.9897563457489014,
-1.569977045059204,
-1.4335830211639404,
-2.4283533096313477,
-2.385385036468506,
0.7641058564186096,
-0.5279769897460938,
-0.5138412117958069,
2.031874656677246,
-0.9219640493392944,
-1.7502797842025757,
1.0723403692245483,
0.30750441551208496,
0.06888796389102936,
2.4096436500549316,
0.16164757311344147,
-0.7534145712852478,
0.456682026386261,
-0.7354311347007751,
0.7614443898200989,
-0.292292982339859,
1.3471187353134155,
0.49787840247154236,
-1.014295220375061,
1.607005000114441,
-0.42606812715530396,
0.4654960036277771,
-0.6671419739723206,
-0.5104341506958008,
-0.768370509147644,
0.1978776752948761,
1.8062958717346191,
-0.3327290117740631,
1.581626057624817,
-0.2787124812602997,
-1.5179768800735474,
-1.5760118961334229,
0.8033867478370667,
0.555688202381134,
-0.8396463990211487,
0.02952919341623783,
-0.4971292018890381,
0.1174103319644928,
-0.015949461609125137,
1.0875849723815918,
1.2219232320785522,
0.7331318259239197,
-0.35349807143211365,
-0.8690019845962524,
0.18620051443576813,
-0.22784307599067688,
-0.7262066006660461,
-1.8565163612365723,
-0.35688114166259766,
0.17857159674167633,
0.6512244939804077,
-1.2701404094696045,
1.7576324939727783,
0.8815938234329224,
2.001554250717163,
0.9571516513824463,
-0.4037027657032013,
1.4625500440597534,
0.05729380249977112,
1.807897925376892,
-0.5525468587875366,
0.6312992572784424,
-0.3494947850704193,
-1.1802716255187988,
0.8086940050125122,
-0.3156043589115143,
-2.0378170013427734,
-0.8441451191902161,
-0.6758065223693848,
-0.17465847730636597,
-0.7792279124259949,
0.876672625541687,
-0.2050868421792984,
-1.485385775566101,
0.15487520396709442,
-0.7065630555152893,
0.20861858129501343,
-1.264041543006897,
0.2523624897003174,
0.6737518310546875,
-0.7602121233940125,
0.04332279413938522,
-0.25279197096824646,
-1.252586841583252,
-0.5305940508842468,
0.2506829798221588,
1.9276373386383057,
-0.6620750427246094,
0.8809418678283691,
1.035671591758728,
-0.6829857230186462,
0.1230962872505188,
0.24234691262245178,
-0.2948535978794098,
0.804052472114563,
-1.0805659294128418,
-0.4813981354236603,
1.2067980766296387,
-0.23259341716766357,
-0.6762599945068359,
1.4188345670700073,
0.7562242746353149,
-1.0551376342773438,
-0.2762543261051178,
-0.19638492166996002,
-0.8662853837013245,
-0.0005861930549144745,
-1.5899957418441772,
-0.15523558855056763,
0.32836660742759705,
-1.5218364000320435,
-0.3349071741104126,
-0.23455502092838287,
1.4563878774642944,
-0.21053029596805573,
1.4877668619155884,
-0.2968365550041199,
-0.1837998330593109,
-0.32472795248031616,
-0.3839401304721832,
0.19735150039196014,
-0.15467721223831177,
-0.571088969707489,
0.24353089928627014,
-0.8825139403343201,
0.29056137800216675,
1.4807387590408325,
0.36457276344299316,
0.12704986333847046,
0.46070486307144165,
1.0726633071899414,
0.3553793132305145,
-0.07433181256055832,
-0.79521644115448,
-1.5526673793792725,
2.018916368484497,
-1.4179686307907104,
1.9360370635986328,
0.861536979675293,
-0.13025371730327606,
-1.825316309928894,
-1.7776637077331543,
1.1584867238998413,
1.1424535512924194,
2.4445676803588867,
0.5422031283378601,
0.3975287973880768,
-0.7575923204421997,
-0.721553385257721,
0.38836291432380676,
-0.9532207250595093,
-0.6847277283668518,
0.19093747437000275,
2.378073215484619,
1.825438380241394,
-0.48895660042762756,
-0.18947669863700867,
-0.9628154039382935,
1.2952172756195068,
-0.24756059050559998,
0.26339247822761536,
2.0919580459594727,
-0.3003012239933014,
-1.1344573497772217,
1.3921171426773071,
-2.4352433681488037,
0.2912601828575134,
2.055870294570923,
0.3367568552494049,
0.08421950787305832,
-1.466916799545288,
-0.6661214828491211,
-0.2901611030101776,
-0.4914761483669281,
-1.2075520753860474,
0.5456690192222595,
-0.29644209146499634,
-0.9602513909339905,
-1.4700406789779663,
-0.05179945379495621,
-1.1361229419708252,
-1.8147344589233398,
0.4180440306663513,
1.8213144540786743,
2.0269317626953125,
-0.7867727279663086,
1.2993457317352295,
-0.24210618436336517,
-0.02200373075902462,
1.2494947910308838,
1.3445199728012085,
3.0701401233673096,
1.8956043720245361,
-1.3130236864089966,
0.7263866066932678,
-0.19888533651828766,
-0.48363903164863586,
1.1316570043563843,
-1.2353522777557373,
1.112249732017517,
-0.20355570316314697,
-1.2813493013381958,
-1.2790769338607788,
1.1147708892822266,
0.44463542103767395,
0.024818575009703636,
-0.49992597103118896,
1.2311692237854004,
0.21000900864601135,
1.3810935020446777,
0.6211148500442505,
-0.35180729627609253,
0.5269709229469299,
-0.3899880647659302,
-0.572237491607666,
1.6181747913360596,
0.18169762194156647,
-1.4880528450012207,
-2.3762619495391846,
-0.27685976028442383,
-0.9579898118972778,
-0.07394657284021378,
-0.5786532163619995,
-1.0498276948928833,
1.5959841012954712,
0.3690345287322998,
-1.24394690990448,
-0.28601762652397156,
-0.2700057625770569,
-0.5350310802459717,
2.6511600017547607,
-1.2541645765304565,
-0.12558630108833313,
-0.9590204954147339,
-0.5353021025657654,
1.621770977973938,
-1.1737926006317139,
-0.22271642088890076,
-1.0914030075073242,
-0.6788643598556519,
-1.277864933013916,
-0.5317266583442688,
0.05050075054168701,
-0.9845787286758423,
0.7255631685256958,
0.2155614048242569,
-1.0757561922073364,
-0.3268296420574188,
-0.7754097580909729,
1.075668215751648,
-0.029234111309051514,
0.1691483110189438,
1.8604669570922852,
0.3472762107849121,
-0.43166568875312805,
0.7121777534484863,
1.1772897243499756,
0.5981717705726624,
-0.6380322575569153,
0.0730767622590065,
-0.7307494282722473,
0.3242531418800354,
-1.3903417587280273,
0.244431734085083,
-2.8941757678985596,
0.7327929139137268,
-0.1473311483860016,
-0.10082688927650452,
-0.08760970830917358,
-1.3462496995925903,
1.0941168069839478,
2.6057679653167725,
-1.1001451015472412,
0.5403391122817993,
0.4503423273563385,
1.0495880842208862,
-1.570772409439087,
0.3235878646373749,
-0.45649734139442444,
2.0700931549072266,
0.20148390531539917,
1.2294116020202637,
-0.49387428164482117,
-2.2143239974975586,
0.7133310437202454,
-1.2332667112350464,
-1.1177407503128052,
0.7711191773414612,
-0.9708767533302307,
0.31354016065597534,
-1.4139207601547241,
-0.1373196244239807,
-0.9481400847434998,
-1.2850029468536377,
0.6442403793334961,
0.1351652592420578,
0.44852215051651,
-0.5362771153450012,
0.4366539716720581,
-2.1733524799346924,
-1.3153854608535767,
-0.19280187785625458,
-0.9917511940002441,
0.5278427600860596,
-0.3586319386959076,
0.6105261445045471,
-0.10347796231508255,
0.06346655637025833,
0.352370023727417,
1.4293562173843384,
3.3500590324401855,
0.21330620348453522,
0.14654222130775452,
-0.03542938828468323,
-1.0481265783309937,
1.433021903038025,
0.8798255324363708,
-0.17352984845638275,
-0.5867992639541626,
-1.005658745765686,
1.2196694612503052,
2.0898776054382324,
1.0741225481033325,
0.1117384284734726,
-0.8145327568054199,
-0.7248276472091675,
0.041137389838695526,
0.22611534595489502,
0.5534849762916565,
1.030189871788025,
-0.06219068169593811,
0.07495057582855225,
1.4681007862091064,
1.2770369052886963,
-0.3039071261882782,
0.3784821331501007,
-0.9389981031417847,
-0.5342757105827332,
0.4113939106464386,
0.18506766855716705,
-0.023695576936006546,
0.5071184635162354,
-1.1222550868988037,
-0.29341012239456177,
-0.29123520851135254,
-0.8925517201423645,
-0.7710319757461548,
-0.35927262902259827,
-0.47020983695983887,
1.5644837617874146,
0.05275851488113403,
-0.41792845726013184,
0.04966247081756592,
-0.6320037245750427,
-0.1826396882534027,
-1.1208752393722534,
0.21254923939704895,
-0.08991897106170654,
-0.052930936217308044,
-0.15921761095523834,
1.6834763288497925,
-0.8205147385597229,
-2.1096279621124268,
0.18247301876544952,
0.259961873292923,
-0.32423850893974304,
0.20722907781600952,
1.7080981731414795,
0.5018050670623779,
1.3660045862197876,
1.2968019247055054,
0.9211600422859192,
-0.5485666990280151,
-1.231949806213379,
0.7274045348167419,
0.9889190793037415,
-1.2942135334014893,
0.8999581336975098,
-0.1737610548734665,
-0.4686139225959778,
0.6348978281021118,
1.3327895402908325,
0.4126802682876587,
-1.9921451807022095,
0.9254145622253418,
-0.9051188230514526,
0.7954290509223938,
0.6638160347938538,
0.7775458693504333,
0.16337880492210388,
0.8392165899276733,
-1.295127272605896,
-1.050054907798767,
-0.6975744366645813,
-0.6381588578224182,
1.8986181020736694,
-0.2844100892543793,
0.5741700530052185,
-0.21580472588539124,
-1.2411473989486694,
-0.14106298983097076,
0.7509230375289917,
0.29450103640556335,
-0.4237319529056549,
0.8790549039840698,
-0.5888895392417908,
-0.9984052181243896,
-1.2659902572631836,
-0.3402005136013031,
-1.0373128652572632,
-0.7647220492362976,
1.0766865015029907,
0.7949812412261963,
0.3664328455924988,
1.9666550159454346,
0.5486884713172913,
0.3104490637779236,
-2.693850040435791,
0.9151737689971924,
0.2813722789287567,
-0.0753418430685997,
0.9072942137718201,
0.18407487869262695,
1.11861252784729,
0.03610383719205856,
0.58974689245224,
-2.3818159103393555,
2.2376952171325684,
-0.16918623447418213,
0.6922537088394165,
0.09818127006292343,
-0.1899314969778061,
1.1133126020431519,
0.621599555015564,
0.6246492266654968,
-1.0382916927337646,
0.714009702205658,
-0.5625420808792114,
1.0867211818695068,
0.8967736959457397,
-0.8353918194770813,
0.043609052896499634,
1.3535419702529907,
0.5191431045532227,
-0.3586480915546417,
-0.9186354875564575,
-0.8102644681930542,
0.9315093755722046,
1.7225549221038818,
-0.05396771430969238,
-0.02284833788871765,
0.9113067388534546,
0.611033022403717,
-1.2595264911651611,
-0.01448056846857071,
-0.7831894755363464,
-0.6804018020629883,
1.7492032051086426,
2.1194231510162354,
-0.10253854095935822,
-0.2860225737094879,
-0.6582567095756531,
-1.2656687498092651,
0.8297669291496277,
-0.13786499202251434,
0.16854330897331238,
0.6876881718635559,
-0.6034857630729675,
1.1138993501663208,
0.6185423731803894,
1.037636637687683,
0.10181127488613129,
0.2583724856376648,
0.2723815143108368,
-0.3248552083969116,
-1.2081804275512695,
-0.3074205815792084,
-1.0998882055282593,
-2.569044828414917,
0.4588477611541748,
-0.21268829703330994,
-1.5626481771469116,
0.12543131411075592,
-1.0232354402542114,
0.8628585934638977,
-0.6089209318161011,
-1.0631804466247559,
-1.4433826208114624,
0.3353983759880066,
-0.21612600982189178,
0.9703767895698547,
-1.6751974821090698,
-0.1532789021730423,
1.2209404706954956,
0.7842285633087158,
-0.5457006692886353,
0.8890199661254883,
0.2780531942844391,
1.0599113702774048,
0.7960147857666016,
-0.3629331588745117,
0.6071127653121948,
0.05039914697408676,
-1.303989291191101,
0.334484726190567,
1.2235490083694458,
0.15955349802970886,
1.4840184450149536,
-0.44213151931762695,
0.08542885631322861,
0.4279271364212036,
-0.6918087005615234,
-0.5168874263763428,
-0.38397738337516785,
0.7258176207542419,
-0.006291531957685947,
-1.0790632963180542,
-0.1453753113746643,
-0.09775307774543762,
-0.2907750904560089,
0.16022183001041412,
-1.453532099723816,
-0.23988080024719238,
-0.39098820090293884,
-0.5302101969718933,
-1.3144036531448364,
0.06675982475280762,
1.294813871383667,
-0.8327134251594543,
-0.20101891458034515,
0.4483867883682251,
0.3537513315677643,
0.5822009444236755,
0.6645277142524719,
-0.7526430487632751,
-0.36940157413482666,
-0.30431708693504333,
-0.31470340490341187,
0.32701772451400757,
1.292202115058899,
-0.06261944770812988,
-0.9966762661933899,
0.7119587659835815,
-0.33344566822052,
0.18148937821388245,
1.9948314428329468,
0.04326161742210388,
-0.7216731309890747,
0.3241766393184662,
-0.6459623575210571,
1.7712173461914062,
1.674687147140503,
1.3394376039505005,
-0.13018055260181427,
-0.8445996046066284,
0.5393049120903015,
-0.3479917645454407,
-0.3242150545120239,
0.8503502607345581,
0.4491100311279297,
-0.13701844215393066,
-1.3228352069854736,
0.5971409678459167,
1.2655158042907715,
-0.8223305940628052,
-0.7157028913497925,
0.09796500205993652,
-0.8937450051307678,
1.2242014408111572,
0.5829155445098877,
0.323798269033432,
0.196983203291893,
1.520845651626587,
0.8032078742980957,
-0.46590378880500793,
0.5396592617034912,
0.508318305015564,
-0.19774316251277924,
-2.071136713027954,
-1.0242918729782104,
0.2923823297023773,
-0.49057960510253906,
-1.6174558401107788,
1.3011237382888794,
-1.1649936437606812,
-0.9808071851730347,
0.515261709690094,
0.06197656691074371,
1.3265165090560913,
0.3835143446922302,
1.749237298965454,
2.1003360748291016,
0.9820948243141174,
0.37198904156684875,
1.3288228511810303,
0.011484963819384575,
-0.4716341197490692,
1.8919838666915894,
-0.3562229871749878,
0.5634000897407532,
1.0807288885116577,
-0.3675486743450165,
-1.0537265539169312,
-0.8087710738182068,
-1.1712887287139893,
-0.6232223510742188,
1.194881796836853,
0.12049812078475952,
-1.058850884437561,
0.22943779826164246,
1.5348482131958008,
0.08737317472696304,
-0.24820959568023682,
0.6688483953475952,
0.38859009742736816,
-0.6971911787986755,
-0.07945847511291504,
-0.8110536932945251,
0.419003427028656,
-0.17110389471054077,
-0.35525012016296387,
0.15542103350162506,
0.4974505603313446,
1.2963939905166626,
-0.10308754444122314,
0.09562506526708603,
1.12509286403656,
-1.396459698677063,
1.5590471029281616,
-0.6258876919746399,
0.3344953656196594,
-2.433871269226074,
1.3476078510284424,
-0.8371008634567261,
1.8876023292541504,
-2.5991828441619873,
0.4914713203907013,
-0.49860379099845886,
-0.43849384784698486,
0.21133621037006378,
-0.4231027364730835,
0.10811421275138855,
-0.1501072496175766,
-1.0390173196792603,
-0.054797932505607605,
-0.7463549375534058,
0.6028361916542053,
1.128595232963562,
1.3476911783218384,
-1.1552413702011108,
-0.29287949204444885,
-1.7549837827682495,
-0.2569117546081543,
-0.7688835263252258,
0.35544508695602417,
-1.907318115234375,
-0.11038769781589508,
-2.0228145122528076,
-2.3030331134796143,
-1.3370946645736694,
-0.8996936678886414,
1.045236349105835,
0.10068309307098389,
-0.9881912469863892,
1.1279914379119873,
-0.38182735443115234,
-1.8603591918945312,
1.173082947731018,
-2.211935520172119
] |
https://github.com/huggingface/datasets/issues/5963 | Got an error _pickle.PicklingError use Dataset.from_spark. | @maddiedawson can you show me the demo ,so i can test in local .before your PR | python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
| 94 | 16 | Got an error _pickle.PicklingError use Dataset.from_spark.
python 3.9.2
Got an error _pickle.PicklingError use Dataset.from_spark.
Did the dataset import load data from spark dataframe using multi-node Spark cluster
df = spark.read.parquet(args.input_data).repartition(50)
ds = Dataset.from_spark(df, keep_in_memory=True,
cache_dir="/pnc-data/data/nuplan/t5_spark/cache_data")
ds.save_to_disk(args.output_data)
Error :
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transforma
tion. SparkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/16 21:17:20 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
_Originally posted by @yanzia12138 in https://github.com/huggingface/datasets/issues/5701#issuecomment-1594674306_
W
Traceback (most recent call last):
File "/home/work/main.py", line 100, in <module>
run(args)
File "/home/work/main.py", line 80, in run
ds = Dataset.from_spark(df1, keep_in_memory=True,
File "/home/work/.local/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 1281, in from_spark
return SparkDatasetReader(
File "/home/work/.local/lib/python3.9/site-packages/datasets/io/spark.py", line 53, in read
self.builder.download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 909, in download_and_prepare
self._download_and_prepare(
File "/home/work/.local/lib/python3.9/site-packages/datasets/builder.py", line 1004, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 254, in _prepare_split
self._validate_cache_dir()
File "/home/work/.local/lib/python3.9/site-packages/datasets/packaged_modules/spark/spark.py", line 122, in _validate_cache_dir
self._spark.sparkContext.parallelize(range(1), 1).mapPartitions(create_cache_and_write_probe).collect()
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 950, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2951, in _jrdd
wrapped_func = _wrap_function(self.ctx, self.func, self._prev_jrdd_deserializer,
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2830, in _wrap_function
pickled_command, broadcast_vars, env, includes = _prepare_for_python_RDD(sc, command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/rdd.py", line 2816, in _prepare_for_python_RDD
pickled_command = ser.dumps(command)
File "/home/work/.local/lib/python3.9/site-packages/pyspark/serializers.py", line 447, in dumps
raise pickle.PicklingError(msg)
_pickle.PicklingError: Could not serialize object: RuntimeError: It appears that you are attempting to reference SparkContext from a broadcast variable, action, or transformation. S
parkContext can only be used on the driver, not in code that it run on workers. For more information, see SPARK-5063.
23/06/19 13:51:21 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed (this is expected if the application is shutting down.)
@maddiedawson can you show me the demo ,so i can test in local .before your PR | [
-1.2310693264007568,
-0.9906632900238037,
-0.635561466217041,
1.4529298543930054,
-0.16379669308662415,
-1.166024923324585,
0.13897590339183807,
-1.0807207822799683,
1.5118030309677124,
-0.6884455680847168,
0.24126824736595154,
-1.6125189065933228,
-0.11440496146678925,
-0.45459726452827454,
-0.6764232516288757,
-0.9181524515151978,
-0.4403718411922455,
-0.8709037899971008,
1.034029483795166,
2.539928436279297,
1.3562208414077759,
-1.358117938041687,
2.764885663986206,
0.6818593144416809,
-0.2708154022693634,
-1.1080896854400635,
0.5722270607948303,
0.09710371494293213,
-1.25690758228302,
-0.42186084389686584,
-0.9621079564094543,
-0.05910792201757431,
-0.5973240733146667,
-0.42256489396095276,
0.04797923564910889,
0.3462635576725006,
-0.24552325904369354,
-0.26832306385040283,
-0.5903307795524597,
-0.7292190194129944,
0.5961126089096069,
-0.35625043511390686,
0.9648796916007996,
-0.25301477313041687,
1.7660945653915405,
-0.6657438278198242,
0.5513856410980225,
0.7556774616241455,
1.2577228546142578,
0.2196265459060669,
0.021325109526515007,
0.32527777552604675,
0.3846597373485565,
0.0642324909567833,
0.5764076709747314,
1.154802918434143,
0.6083068251609802,
0.46473413705825806,
0.5801188349723816,
-2.1999425888061523,
1.2855368852615356,
-0.9289824962615967,
0.23248961567878723,
1.2504396438598633,
-0.846335232257843,
0.35997751355171204,
-1.8196256160736084,
-0.13419084250926971,
0.6518609523773193,
-2.2768568992614746,
0.26953163743019104,
-1.2969622611999512,
-0.5370709300041199,
1.0005749464035034,
0.325682133436203,
-1.20705246925354,
0.1524674892425537,
-0.5144984126091003,
1.0487116575241089,
0.46640869975090027,
1.1023991107940674,
-1.688827633857727,
-0.06539487093687057,
-0.1567727029323578,
0.15617944300174713,
-1.2044366598129272,
-1.6268306970596313,
0.586466372013092,
0.5288886427879333,
0.6895463466644287,
-0.04786274582147598,
0.9990171790122986,
-1.1048202514648438,
0.9042912721633911,
-0.9897563457489014,
-1.569977045059204,
-1.4335830211639404,
-2.4283533096313477,
-2.385385036468506,
0.7641058564186096,
-0.5279769897460938,
-0.5138412117958069,
2.031874656677246,
-0.9219640493392944,
-1.7502797842025757,
1.0723403692245483,
0.30750441551208496,
0.06888796389102936,
2.4096436500549316,
0.16164757311344147,
-0.7534145712852478,
0.456682026386261,
-0.7354311347007751,
0.7614443898200989,
-0.292292982339859,
1.3471187353134155,
0.49787840247154236,
-1.014295220375061,
1.607005000114441,
-0.42606812715530396,
0.4654960036277771,
-0.6671419739723206,
-0.5104341506958008,
-0.768370509147644,
0.1978776752948761,
1.8062958717346191,
-0.3327290117740631,
1.581626057624817,
-0.2787124812602997,
-1.5179768800735474,
-1.5760118961334229,
0.8033867478370667,
0.555688202381134,
-0.8396463990211487,
0.02952919341623783,
-0.4971292018890381,
0.1174103319644928,
-0.015949461609125137,
1.0875849723815918,
1.2219232320785522,
0.7331318259239197,
-0.35349807143211365,
-0.8690019845962524,
0.18620051443576813,
-0.22784307599067688,
-0.7262066006660461,
-1.8565163612365723,
-0.35688114166259766,
0.17857159674167633,
0.6512244939804077,
-1.2701404094696045,
1.7576324939727783,
0.8815938234329224,
2.001554250717163,
0.9571516513824463,
-0.4037027657032013,
1.4625500440597534,
0.05729380249977112,
1.807897925376892,
-0.5525468587875366,
0.6312992572784424,
-0.3494947850704193,
-1.1802716255187988,
0.8086940050125122,
-0.3156043589115143,
-2.0378170013427734,
-0.8441451191902161,
-0.6758065223693848,
-0.17465847730636597,
-0.7792279124259949,
0.876672625541687,
-0.2050868421792984,
-1.485385775566101,
0.15487520396709442,
-0.7065630555152893,
0.20861858129501343,
-1.264041543006897,
0.2523624897003174,
0.6737518310546875,
-0.7602121233940125,
0.04332279413938522,
-0.25279197096824646,
-1.252586841583252,
-0.5305940508842468,
0.2506829798221588,
1.9276373386383057,
-0.6620750427246094,
0.8809418678283691,
1.035671591758728,
-0.6829857230186462,
0.1230962872505188,
0.24234691262245178,
-0.2948535978794098,
0.804052472114563,
-1.0805659294128418,
-0.4813981354236603,
1.2067980766296387,
-0.23259341716766357,
-0.6762599945068359,
1.4188345670700073,
0.7562242746353149,
-1.0551376342773438,
-0.2762543261051178,
-0.19638492166996002,
-0.8662853837013245,
-0.0005861930549144745,
-1.5899957418441772,
-0.15523558855056763,
0.32836660742759705,
-1.5218364000320435,
-0.3349071741104126,
-0.23455502092838287,
1.4563878774642944,
-0.21053029596805573,
1.4877668619155884,
-0.2968365550041199,
-0.1837998330593109,
-0.32472795248031616,
-0.3839401304721832,
0.19735150039196014,
-0.15467721223831177,
-0.571088969707489,
0.24353089928627014,
-0.8825139403343201,
0.29056137800216675,
1.4807387590408325,
0.36457276344299316,
0.12704986333847046,
0.46070486307144165,
1.0726633071899414,
0.3553793132305145,
-0.07433181256055832,
-0.79521644115448,
-1.5526673793792725,
2.018916368484497,
-1.4179686307907104,
1.9360370635986328,
0.861536979675293,
-0.13025371730327606,
-1.825316309928894,
-1.7776637077331543,
1.1584867238998413,
1.1424535512924194,
2.4445676803588867,
0.5422031283378601,
0.3975287973880768,
-0.7575923204421997,
-0.721553385257721,
0.38836291432380676,
-0.9532207250595093,
-0.6847277283668518,
0.19093747437000275,
2.378073215484619,
1.825438380241394,
-0.48895660042762756,
-0.18947669863700867,
-0.9628154039382935,
1.2952172756195068,
-0.24756059050559998,
0.26339247822761536,
2.0919580459594727,
-0.3003012239933014,
-1.1344573497772217,
1.3921171426773071,
-2.4352433681488037,
0.2912601828575134,
2.055870294570923,
0.3367568552494049,
0.08421950787305832,
-1.466916799545288,
-0.6661214828491211,
-0.2901611030101776,
-0.4914761483669281,
-1.2075520753860474,
0.5456690192222595,
-0.29644209146499634,
-0.9602513909339905,
-1.4700406789779663,
-0.05179945379495621,
-1.1361229419708252,
-1.8147344589233398,
0.4180440306663513,
1.8213144540786743,
2.0269317626953125,
-0.7867727279663086,
1.2993457317352295,
-0.24210618436336517,
-0.02200373075902462,
1.2494947910308838,
1.3445199728012085,
3.0701401233673096,
1.8956043720245361,
-1.3130236864089966,
0.7263866066932678,
-0.19888533651828766,
-0.48363903164863586,
1.1316570043563843,
-1.2353522777557373,
1.112249732017517,
-0.20355570316314697,
-1.2813493013381958,
-1.2790769338607788,
1.1147708892822266,
0.44463542103767395,
0.024818575009703636,
-0.49992597103118896,
1.2311692237854004,
0.21000900864601135,
1.3810935020446777,
0.6211148500442505,
-0.35180729627609253,
0.5269709229469299,
-0.3899880647659302,
-0.572237491607666,
1.6181747913360596,
0.18169762194156647,
-1.4880528450012207,
-2.3762619495391846,
-0.27685976028442383,
-0.9579898118972778,
-0.07394657284021378,
-0.5786532163619995,
-1.0498276948928833,
1.5959841012954712,
0.3690345287322998,
-1.24394690990448,
-0.28601762652397156,
-0.2700057625770569,
-0.5350310802459717,
2.6511600017547607,
-1.2541645765304565,
-0.12558630108833313,
-0.9590204954147339,
-0.5353021025657654,
1.621770977973938,
-1.1737926006317139,
-0.22271642088890076,
-1.0914030075073242,
-0.6788643598556519,
-1.277864933013916,
-0.5317266583442688,
0.05050075054168701,
-0.9845787286758423,
0.7255631685256958,
0.2155614048242569,
-1.0757561922073364,
-0.3268296420574188,
-0.7754097580909729,
1.075668215751648,
-0.029234111309051514,
0.1691483110189438,
1.8604669570922852,
0.3472762107849121,
-0.43166568875312805,
0.7121777534484863,
1.1772897243499756,
0.5981717705726624,
-0.6380322575569153,
0.0730767622590065,
-0.7307494282722473,
0.3242531418800354,
-1.3903417587280273,
0.244431734085083,
-2.8941757678985596,
0.7327929139137268,
-0.1473311483860016,
-0.10082688927650452,
-0.08760970830917358,
-1.3462496995925903,
1.0941168069839478,
2.6057679653167725,
-1.1001451015472412,
0.5403391122817993,
0.4503423273563385,
1.0495880842208862,
-1.570772409439087,
0.3235878646373749,
-0.45649734139442444,
2.0700931549072266,
0.20148390531539917,
1.2294116020202637,
-0.49387428164482117,
-2.2143239974975586,
0.7133310437202454,
-1.2332667112350464,
-1.1177407503128052,
0.7711191773414612,
-0.9708767533302307,
0.31354016065597534,
-1.4139207601547241,
-0.1373196244239807,
-0.9481400847434998,
-1.2850029468536377,
0.6442403793334961,
0.1351652592420578,
0.44852215051651,
-0.5362771153450012,
0.4366539716720581,
-2.1733524799346924,
-1.3153854608535767,
-0.19280187785625458,
-0.9917511940002441,
0.5278427600860596,
-0.3586319386959076,
0.6105261445045471,
-0.10347796231508255,
0.06346655637025833,
0.352370023727417,
1.4293562173843384,
3.3500590324401855,
0.21330620348453522,
0.14654222130775452,
-0.03542938828468323,
-1.0481265783309937,
1.433021903038025,
0.8798255324363708,
-0.17352984845638275,
-0.5867992639541626,
-1.005658745765686,
1.2196694612503052,
2.0898776054382324,
1.0741225481033325,
0.1117384284734726,
-0.8145327568054199,
-0.7248276472091675,
0.041137389838695526,
0.22611534595489502,
0.5534849762916565,
1.030189871788025,
-0.06219068169593811,
0.07495057582855225,
1.4681007862091064,
1.2770369052886963,
-0.3039071261882782,
0.3784821331501007,
-0.9389981031417847,
-0.5342757105827332,
0.4113939106464386,
0.18506766855716705,
-0.023695576936006546,
0.5071184635162354,
-1.1222550868988037,
-0.29341012239456177,
-0.29123520851135254,
-0.8925517201423645,
-0.7710319757461548,
-0.35927262902259827,
-0.47020983695983887,
1.5644837617874146,
0.05275851488113403,
-0.41792845726013184,
0.04966247081756592,
-0.6320037245750427,
-0.1826396882534027,
-1.1208752393722534,
0.21254923939704895,
-0.08991897106170654,
-0.052930936217308044,
-0.15921761095523834,
1.6834763288497925,
-0.8205147385597229,
-2.1096279621124268,
0.18247301876544952,
0.259961873292923,
-0.32423850893974304,
0.20722907781600952,
1.7080981731414795,
0.5018050670623779,
1.3660045862197876,
1.2968019247055054,
0.9211600422859192,
-0.5485666990280151,
-1.231949806213379,
0.7274045348167419,
0.9889190793037415,
-1.2942135334014893,
0.8999581336975098,
-0.1737610548734665,
-0.4686139225959778,
0.6348978281021118,
1.3327895402908325,
0.4126802682876587,
-1.9921451807022095,
0.9254145622253418,
-0.9051188230514526,
0.7954290509223938,
0.6638160347938538,
0.7775458693504333,
0.16337880492210388,
0.8392165899276733,
-1.295127272605896,
-1.050054907798767,
-0.6975744366645813,
-0.6381588578224182,
1.8986181020736694,
-0.2844100892543793,
0.5741700530052185,
-0.21580472588539124,
-1.2411473989486694,
-0.14106298983097076,
0.7509230375289917,
0.29450103640556335,
-0.4237319529056549,
0.8790549039840698,
-0.5888895392417908,
-0.9984052181243896,
-1.2659902572631836,
-0.3402005136013031,
-1.0373128652572632,
-0.7647220492362976,
1.0766865015029907,
0.7949812412261963,
0.3664328455924988,
1.9666550159454346,
0.5486884713172913,
0.3104490637779236,
-2.693850040435791,
0.9151737689971924,
0.2813722789287567,
-0.0753418430685997,
0.9072942137718201,
0.18407487869262695,
1.11861252784729,
0.03610383719205856,
0.58974689245224,
-2.3818159103393555,
2.2376952171325684,
-0.16918623447418213,
0.6922537088394165,
0.09818127006292343,
-0.1899314969778061,
1.1133126020431519,
0.621599555015564,
0.6246492266654968,
-1.0382916927337646,
0.714009702205658,
-0.5625420808792114,
1.0867211818695068,
0.8967736959457397,
-0.8353918194770813,
0.043609052896499634,
1.3535419702529907,
0.5191431045532227,
-0.3586480915546417,
-0.9186354875564575,
-0.8102644681930542,
0.9315093755722046,
1.7225549221038818,
-0.05396771430969238,
-0.02284833788871765,
0.9113067388534546,
0.611033022403717,
-1.2595264911651611,
-0.01448056846857071,
-0.7831894755363464,
-0.6804018020629883,
1.7492032051086426,
2.1194231510162354,
-0.10253854095935822,
-0.2860225737094879,
-0.6582567095756531,
-1.2656687498092651,
0.8297669291496277,
-0.13786499202251434,
0.16854330897331238,
0.6876881718635559,
-0.6034857630729675,
1.1138993501663208,
0.6185423731803894,
1.037636637687683,
0.10181127488613129,
0.2583724856376648,
0.2723815143108368,
-0.3248552083969116,
-1.2081804275512695,
-0.3074205815792084,
-1.0998882055282593,
-2.569044828414917,
0.4588477611541748,
-0.21268829703330994,
-1.5626481771469116,
0.12543131411075592,
-1.0232354402542114,
0.8628585934638977,
-0.6089209318161011,
-1.0631804466247559,
-1.4433826208114624,
0.3353983759880066,
-0.21612600982189178,
0.9703767895698547,
-1.6751974821090698,
-0.1532789021730423,
1.2209404706954956,
0.7842285633087158,
-0.5457006692886353,
0.8890199661254883,
0.2780531942844391,
1.0599113702774048,
0.7960147857666016,
-0.3629331588745117,
0.6071127653121948,
0.05039914697408676,
-1.303989291191101,
0.334484726190567,
1.2235490083694458,
0.15955349802970886,
1.4840184450149536,
-0.44213151931762695,
0.08542885631322861,
0.4279271364212036,
-0.6918087005615234,
-0.5168874263763428,
-0.38397738337516785,
0.7258176207542419,
-0.006291531957685947,
-1.0790632963180542,
-0.1453753113746643,
-0.09775307774543762,
-0.2907750904560089,
0.16022183001041412,
-1.453532099723816,
-0.23988080024719238,
-0.39098820090293884,
-0.5302101969718933,
-1.3144036531448364,
0.06675982475280762,
1.294813871383667,
-0.8327134251594543,
-0.20101891458034515,
0.4483867883682251,
0.3537513315677643,
0.5822009444236755,
0.6645277142524719,
-0.7526430487632751,
-0.36940157413482666,
-0.30431708693504333,
-0.31470340490341187,
0.32701772451400757,
1.292202115058899,
-0.06261944770812988,
-0.9966762661933899,
0.7119587659835815,
-0.33344566822052,
0.18148937821388245,
1.9948314428329468,
0.04326161742210388,
-0.7216731309890747,
0.3241766393184662,
-0.6459623575210571,
1.7712173461914062,
1.674687147140503,
1.3394376039505005,
-0.13018055260181427,
-0.8445996046066284,
0.5393049120903015,
-0.3479917645454407,
-0.3242150545120239,
0.8503502607345581,
0.4491100311279297,
-0.13701844215393066,
-1.3228352069854736,
0.5971409678459167,
1.2655158042907715,
-0.8223305940628052,
-0.7157028913497925,
0.09796500205993652,
-0.8937450051307678,
1.2242014408111572,
0.5829155445098877,
0.323798269033432,
0.196983203291893,
1.520845651626587,
0.8032078742980957,
-0.46590378880500793,
0.5396592617034912,
0.508318305015564,
-0.19774316251277924,
-2.071136713027954,
-1.0242918729782104,
0.2923823297023773,
-0.49057960510253906,
-1.6174558401107788,
1.3011237382888794,
-1.1649936437606812,
-0.9808071851730347,
0.515261709690094,
0.06197656691074371,
1.3265165090560913,
0.3835143446922302,
1.749237298965454,
2.1003360748291016,
0.9820948243141174,
0.37198904156684875,
1.3288228511810303,
0.011484963819384575,
-0.4716341197490692,
1.8919838666915894,
-0.3562229871749878,
0.5634000897407532,
1.0807288885116577,
-0.3675486743450165,
-1.0537265539169312,
-0.8087710738182068,
-1.1712887287139893,
-0.6232223510742188,
1.194881796836853,
0.12049812078475952,
-1.058850884437561,
0.22943779826164246,
1.5348482131958008,
0.08737317472696304,
-0.24820959568023682,
0.6688483953475952,
0.38859009742736816,
-0.6971911787986755,
-0.07945847511291504,
-0.8110536932945251,
0.419003427028656,
-0.17110389471054077,
-0.35525012016296387,
0.15542103350162506,
0.4974505603313446,
1.2963939905166626,
-0.10308754444122314,
0.09562506526708603,
1.12509286403656,
-1.396459698677063,
1.5590471029281616,
-0.6258876919746399,
0.3344953656196594,
-2.433871269226074,
1.3476078510284424,
-0.8371008634567261,
1.8876023292541504,
-2.5991828441619873,
0.4914713203907013,
-0.49860379099845886,
-0.43849384784698486,
0.21133621037006378,
-0.4231027364730835,
0.10811421275138855,
-0.1501072496175766,
-1.0390173196792603,
-0.054797932505607605,
-0.7463549375534058,
0.6028361916542053,
1.128595232963562,
1.3476911783218384,
-1.1552413702011108,
-0.29287949204444885,
-1.7549837827682495,
-0.2569117546081543,
-0.7688835263252258,
0.35544508695602417,
-1.907318115234375,
-0.11038769781589508,
-2.0228145122528076,
-2.3030331134796143,
-1.3370946645736694,
-0.8996936678886414,
1.045236349105835,
0.10068309307098389,
-0.9881912469863892,
1.1279914379119873,
-0.38182735443115234,
-1.8603591918945312,
1.173082947731018,
-2.211935520172119
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | Does "number of shards" refer to the total number of data?
my config:
nproc_per_node=2
ds=ds['train'] = load_dataset(streaming=True).take(50000)
I'm test again: in prepare_data(), data have the same for each GPU
| There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 95 | 29 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
Does "number of shards" refer to the total number of data?
my config:
nproc_per_node=2
ds=ds['train'] = load_dataset(streaming=True).take(50000)
I'm test again: in prepare_data(), data have the same for each GPU
| [
-1.3151814937591553,
-1.005530834197998,
-0.8520548343658447,
1.561637282371521,
-0.2870224714279175,
-1.1709349155426025,
0.0386207289993763,
-1.1139782667160034,
1.6581729650497437,
-0.9041574001312256,
0.311153769493103,
-1.689592719078064,
0.05364992842078209,
-0.5493146777153015,
-0.8311466574668884,
-0.9544662237167358,
-0.42195749282836914,
-0.7984225153923035,
0.9679312705993652,
2.4075820446014404,
1.2007150650024414,
-1.3467769622802734,
2.6796066761016846,
0.6956186890602112,
-0.2073916345834732,
-1.0271570682525635,
0.5971279144287109,
0.04484115168452263,
-1.1575409173965454,
-0.4777163863182068,
-0.961422324180603,
0.009761805646121502,
-0.5646603107452393,
-0.44105905294418335,
0.029061250388622284,
0.38498252630233765,
-0.23064471781253815,
-0.3340108394622803,
-0.44141408801078796,
-0.8056262731552124,
0.5004693865776062,
-0.35571321845054626,
0.9377717971801758,
-0.3376512825489044,
1.8960005044937134,
-0.5383161306381226,
0.3476087152957916,
0.6951016783714294,
1.3367464542388916,
0.23776599764823914,
-0.04794854298233986,
0.16980092227458954,
0.4034276306629181,
-0.06064845994114876,
0.4694027006626129,
1.21161687374115,
0.5950899720191956,
0.47508710622787476,
0.6941139101982117,
-2.220867395401001,
1.3761409521102905,
-1.0875332355499268,
0.32289862632751465,
1.397666573524475,
-1.00737464427948,
0.3458908200263977,
-1.7214996814727783,
-0.015582343563437462,
0.5561895966529846,
-2.2593183517456055,
0.23211200535297394,
-1.2507845163345337,
-0.526661217212677,
0.9615773558616638,
0.2518155574798584,
-1.2326313257217407,
0.20354090631008148,
-0.44114014506340027,
1.1152516603469849,
0.5034772753715515,
1.1091028451919556,
-1.6011648178100586,
-0.06132931262254715,
-0.2527061104774475,
0.06855959445238113,
-1.4101426601409912,
-1.4595383405685425,
0.5176945924758911,
0.6283840537071228,
0.5359270572662354,
-0.05029420182108879,
1.013582468032837,
-0.9738942980766296,
0.8400367498397827,
-0.9100262522697449,
-1.4909361600875854,
-1.393736481666565,
-2.3033053874969482,
-2.2049264907836914,
0.742408275604248,
-0.49226441979408264,
-0.6335834264755249,
1.992565393447876,
-1.0816994905471802,
-1.7668474912643433,
1.1916424036026,
0.27645641565322876,
0.12202166765928268,
2.456605911254883,
0.1802167147397995,
-0.7105271816253662,
0.40496575832366943,
-0.7447689771652222,
0.8121951222419739,
-0.44125548005104065,
1.4567660093307495,
0.5184443593025208,
-1.0251494646072388,
1.5310827493667603,
-0.49114254117012024,
0.4471878111362457,
-0.6059722304344177,
-0.6198573112487793,
-0.8510303497314453,
0.342678964138031,
1.8399145603179932,
-0.3422316908836365,
1.6150336265563965,
-0.3324415385723114,
-1.5544477701187134,
-1.6511353254318237,
0.9486414790153503,
0.43658512830734253,
-0.8327479958534241,
0.12311951071023941,
-0.37709352374076843,
0.1557932198047638,
-0.10050272196531296,
1.0510976314544678,
1.1949290037155151,
0.6823537349700928,
-0.3011385202407837,
-0.8232589960098267,
0.23139846324920654,
-0.1116209477186203,
-0.6251654624938965,
-1.8461494445800781,
-0.3586024045944214,
0.1148182675242424,
0.6928524971008301,
-1.2002019882202148,
1.6384236812591553,
0.9465282559394836,
1.895180106163025,
0.9777437448501587,
-0.31861862540245056,
1.5413881540298462,
0.020994313061237335,
1.7755810022354126,
-0.5135923624038696,
0.6806864738464355,
-0.3681253492832184,
-1.1758878231048584,
0.800828754901886,
-0.36096620559692383,
-2.002770185470581,
-0.8363019227981567,
-0.8390058875083923,
-0.1727144569158554,
-0.8617501854896545,
0.9477717280387878,
-0.34777015447616577,
-1.4405629634857178,
0.3043326437473297,
-0.6432210206985474,
0.18265752494335175,
-1.1369285583496094,
0.4264417886734009,
0.7774333953857422,
-0.625132143497467,
0.006890464574098587,
-0.1457517445087433,
-1.1934404373168945,
-0.4348137676715851,
0.22960513830184937,
1.921575903892517,
-0.8251331448554993,
0.9040361046791077,
0.9651822447776794,
-0.6920568346977234,
0.051867127418518066,
0.3226245939731598,
-0.2764279246330261,
0.807601273059845,
-0.9376454949378967,
-0.4468505382537842,
1.2433853149414062,
-0.2310751974582672,
-0.6362674832344055,
1.5651978254318237,
0.8116818070411682,
-0.9322274923324585,
-0.18294963240623474,
-0.19406916201114655,
-0.789664626121521,
-0.0787246972322464,
-1.5213749408721924,
-0.12055184692144394,
0.2370615452528,
-1.4471619129180908,
-0.4689725935459137,
-0.19555440545082092,
1.3334965705871582,
-0.2276461124420166,
1.5132790803909302,
-0.4113709330558777,
-0.19182011485099792,
-0.37049371004104614,
-0.41106247901916504,
0.20693935453891754,
-0.18632151186466217,
-0.6798334717750549,
0.2715167999267578,
-0.8412880301475525,
0.29884836077690125,
1.3652065992355347,
0.48676109313964844,
0.061057478189468384,
0.5319018363952637,
1.1332017183303833,
0.41609305143356323,
0.012005091644823551,
-0.8910817503929138,
-1.5194460153579712,
2.021637439727783,
-1.5098063945770264,
2.0100979804992676,
0.8482344150543213,
-0.08321816474199295,
-1.731355905532837,
-1.8119879961013794,
1.2567311525344849,
1.2485700845718384,
2.378385066986084,
0.6433008909225464,
0.35376325249671936,
-0.8968189358711243,
-0.6709213852882385,
0.4152018129825592,
-1.1050388813018799,
-0.7128505706787109,
0.062083758413791656,
2.337231159210205,
1.8254389762878418,
-0.4680883586406708,
-0.2123524397611618,
-0.9852468371391296,
1.3507922887802124,
-0.16229356825351715,
0.2192181646823883,
1.9599311351776123,
-0.23210658133029938,
-1.1003493070602417,
1.2962454557418823,
-2.401841163635254,
0.09720959514379501,
1.992501974105835,
0.3820648491382599,
-0.007345294579863548,
-1.5166363716125488,
-0.6350388526916504,
-0.25120359659194946,
-0.4603920876979828,
-1.2389545440673828,
0.5719283819198608,
-0.34928378462791443,
-0.7921862602233887,
-1.4511077404022217,
0.16838234663009644,
-1.1923993825912476,
-1.6149406433105469,
0.3518109917640686,
1.8409913778305054,
2.1452109813690186,
-0.7693344950675964,
1.5507482290267944,
-0.26119306683540344,
0.22163675725460052,
1.3130203485488892,
1.2709650993347168,
3.1667842864990234,
1.9203580617904663,
-1.2733901739120483,
0.5407710671424866,
-0.2263200432062149,
-0.5618559122085571,
1.146226406097412,
-1.238749384880066,
1.2532100677490234,
-0.17824238538742065,
-1.2239679098129272,
-1.2642803192138672,
1.0087640285491943,
0.4418822228908539,
0.07014855742454529,
-0.5065245032310486,
1.2505284547805786,
0.011571819894015789,
1.3436757326126099,
0.5328289270401001,
-0.3167547583580017,
0.4504010081291199,
-0.45778805017471313,
-0.5301789045333862,
1.597364068031311,
0.18216915428638458,
-1.3578741550445557,
-2.2357561588287354,
-0.19747158885002136,
-0.8222880363464355,
-0.11810177564620972,
-0.5213410258293152,
-1.0350394248962402,
1.5990467071533203,
0.37817761301994324,
-1.344070315361023,
-0.31032368540763855,
-0.36271440982818604,
-0.6874514222145081,
2.604789972305298,
-1.4962942600250244,
-0.23680026829242706,
-0.974256694316864,
-0.5579419732093811,
1.6830885410308838,
-1.196865200996399,
-0.1408105492591858,
-1.0030452013015747,
-0.691588282585144,
-1.3999035358428955,
-0.5335816740989685,
-0.06962282955646515,
-0.9244211912155151,
0.8173962831497192,
0.16708023846149445,
-1.0820322036743164,
-0.35567861795425415,
-0.7887059450149536,
0.8484091758728027,
-0.08848100155591965,
0.3206326365470886,
1.8979777097702026,
0.4000404477119446,
-0.4725452661514282,
0.6719433665275574,
1.1010068655014038,
0.6644547581672668,
-0.66440749168396,
0.15588778257369995,
-0.7483928799629211,
0.3499436378479004,
-1.312965989112854,
0.2808477282524109,
-2.9509849548339844,
0.69758141040802,
0.024463623762130737,
-0.1755049079656601,
-0.07588637620210648,
-1.2504773139953613,
1.1302614212036133,
2.5537760257720947,
-1.1340224742889404,
0.39617103338241577,
0.2850567102432251,
1.2946027517318726,
-1.7208664417266846,
0.32232728600502014,
-0.4054630696773529,
2.123506784439087,
0.20414018630981445,
1.306242823600769,
-0.4531002938747406,
-2.3320200443267822,
0.6485406756401062,
-1.2772815227508545,
-1.1537460088729858,
0.7958261966705322,
-0.8654820322990417,
0.02047508955001831,
-1.4436891078948975,
-0.2406873255968094,
-0.9103173613548279,
-1.2665653228759766,
0.8070206046104431,
0.2035038024187088,
0.46177029609680176,
-0.5478725433349609,
0.3216126561164856,
-2.1929163932800293,
-1.3488826751708984,
-0.1851423978805542,
-0.8840577006340027,
0.5010742545127869,
-0.41948917508125305,
0.7155676484107971,
-0.15912273526191711,
0.042003028094768524,
0.39293715357780457,
1.3878768682479858,
3.374091625213623,
0.34122419357299805,
0.44359278678894043,
-0.1227172464132309,
-0.8864530324935913,
1.4691212177276611,
0.9294755458831787,
-0.20922265946865082,
-0.579298198223114,
-0.9656146168708801,
1.2405452728271484,
1.8835281133651733,
0.9350457191467285,
0.04472140967845917,
-0.7584471106529236,
-0.6953943371772766,
-0.10371948033571243,
0.10346972197294235,
0.5307660102844238,
0.8551248908042908,
-0.054380688816308975,
0.17260296642780304,
1.4570246934890747,
1.2189065217971802,
-0.37918540835380554,
0.3046291172504425,
-0.7705406546592712,
-0.4640791714191437,
0.5183232426643372,
0.3376709818840027,
-0.1368943750858307,
0.42368242144584656,
-1.0612165927886963,
-0.29219377040863037,
-0.3487582504749298,
-0.9379526972770691,
-0.6727134585380554,
-0.45294269919395447,
-0.32686343789100647,
1.590846300125122,
0.19257202744483948,
-0.4925324022769928,
-0.06057405844330788,
-0.9174865484237671,
-0.23052461445331573,
-1.1574698686599731,
0.19902026653289795,
-0.11008560657501221,
-0.10744098573923111,
-0.13407540321350098,
1.7955876588821411,
-0.8519043922424316,
-2.137089490890503,
0.2758861482143402,
0.30838635563850403,
-0.338555246591568,
0.17067870497703552,
1.6139453649520874,
0.39427462220191956,
1.3430525064468384,
1.3015698194503784,
0.9876998662948608,
-0.6274551749229431,
-1.30968177318573,
0.7352167963981628,
0.9211929440498352,
-1.4576349258422852,
0.8859420418739319,
-0.028108064085245132,
-0.48268362879753113,
0.6586881875991821,
1.1954429149627686,
0.44024181365966797,
-1.9461894035339355,
0.798047661781311,
-0.9426066279411316,
0.7452320456504822,
0.6971856355667114,
0.7019723057746887,
0.25779229402542114,
0.8746270537376404,
-1.2766571044921875,
-1.1570930480957031,
-0.756067156791687,
-0.6970665454864502,
1.9376739263534546,
-0.22943979501724243,
0.6075661778450012,
-0.14229483902454376,
-1.2751262187957764,
-0.13195034861564636,
0.6702271699905396,
0.2474116086959839,
-0.32192370295524597,
0.9394966959953308,
-0.7406293153762817,
-1.129697322845459,
-1.4280954599380493,
-0.38817039132118225,
-0.955332338809967,
-0.9452642798423767,
1.0726984739303589,
0.9119955897331238,
0.19559632241725922,
1.8963267803192139,
0.5617834329605103,
0.22697073221206665,
-2.6550180912017822,
0.8201797604560852,
0.2940044105052948,
-0.058248646557331085,
0.8427472710609436,
0.22329892218112946,
1.0051062107086182,
0.10286178439855576,
0.4769253134727478,
-2.463160991668701,
2.2482032775878906,
-0.2506342828273773,
0.699048638343811,
-0.0814044177532196,
-0.14576710760593414,
1.1857082843780518,
0.5888885855674744,
0.6241827011108398,
-1.0966953039169312,
0.7428063154220581,
-0.5623195767402649,
1.1973490715026855,
1.0343657732009888,
-0.7652537822723389,
0.037944354116916656,
1.3838744163513184,
0.48424482345581055,
-0.5372189283370972,
-0.9075202345848083,
-0.8857783079147339,
0.851115882396698,
1.8072693347930908,
0.05901641398668289,
0.03893948718905449,
0.8337799310684204,
0.6267809271812439,
-1.2681810855865479,
0.1224338486790657,
-0.7646996378898621,
-0.7555870413780212,
1.6569164991378784,
2.0635488033294678,
-0.1364070475101471,
-0.16169315576553345,
-0.7145628929138184,
-1.1988933086395264,
0.7757933139801025,
0.02756844460964203,
0.17708218097686768,
0.661162257194519,
-0.7362071871757507,
1.041786551475525,
0.9339631795883179,
0.9347177147865295,
0.18500517308712006,
0.2603049576282501,
0.3841448426246643,
-0.31263723969459534,
-1.0784595012664795,
-0.2643182873725891,
-1.1727094650268555,
-2.5670006275177,
0.41107800602912903,
-0.20899227261543274,
-1.3286985158920288,
0.014533826150000095,
-1.0424342155456543,
0.9099712371826172,
-0.5897815823554993,
-1.1393907070159912,
-1.505650520324707,
0.15860150754451752,
-0.08895795047283173,
0.8491791486740112,
-1.5964664220809937,
-0.06849098205566406,
1.2439885139465332,
0.9103022217750549,
-0.601612389087677,
1.0918999910354614,
0.30236977338790894,
1.0496835708618164,
0.8450976610183716,
-0.4260137975215912,
0.5510208606719971,
0.14332611858844757,
-1.3990174531936646,
0.46935921907424927,
1.177382230758667,
0.08969289809465408,
1.5145461559295654,
-0.5717633962631226,
0.06893729418516159,
0.39449429512023926,
-0.63893061876297,
-0.46912682056427,
-0.526131272315979,
0.7681238055229187,
0.10496862977743149,
-0.8463996648788452,
0.09199676662683487,
-0.11655504256486893,
-0.32118460536003113,
0.1493234783411026,
-1.4909225702285767,
-0.22159205377101898,
-0.359881192445755,
-0.5093827843666077,
-1.2950270175933838,
0.06624483317136765,
1.4251792430877686,
-0.810084879398346,
-0.21627473831176758,
0.4805247485637665,
0.39805811643600464,
0.546764075756073,
0.6232296228408813,
-0.6618098616600037,
-0.345211923122406,
-0.21577131748199463,
-0.23325040936470032,
0.3097088932991028,
1.3350688219070435,
-0.18485327064990997,
-0.9133011102676392,
0.7088130712509155,
-0.2603314518928528,
-0.016775887459516525,
1.9687139987945557,
0.10786943137645721,
-0.6979249119758606,
0.3003050982952118,
-0.7480815052986145,
1.9066338539123535,
1.6264008283615112,
1.3724085092544556,
-0.13050159811973572,
-0.881523072719574,
0.6068578362464905,
-0.3077210783958435,
-0.369403600692749,
0.7735692858695984,
0.46149760484695435,
-0.18194124102592468,
-1.4528608322143555,
0.5707119107246399,
1.1481722593307495,
-0.9695855975151062,
-0.6763492226600647,
0.09927303344011307,
-0.7771594524383545,
1.099472165107727,
0.6135599613189697,
0.4874388873577118,
0.24284914135932922,
1.7036763429641724,
0.7209203243255615,
-0.5249767303466797,
0.4609861373901367,
0.5200949907302856,
-0.02453400194644928,
-2.1139473915100098,
-1.0898985862731934,
0.3677854537963867,
-0.41271570324897766,
-1.5487140417099,
1.3004740476608276,
-1.160866379737854,
-0.9119105935096741,
0.5881515741348267,
0.07948894798755646,
1.427028775215149,
0.2641444206237793,
1.6470973491668701,
2.1293628215789795,
0.8622096180915833,
0.31335556507110596,
1.3339228630065918,
-0.12131208181381226,
-0.4256511330604553,
1.8615285158157349,
-0.4444992244243622,
0.4888148903846741,
1.1061854362487793,
-0.30375969409942627,
-1.0435194969177246,
-0.6867935657501221,
-1.187231421470642,
-0.5011825561523438,
1.138679027557373,
0.15717801451683044,
-1.0497105121612549,
0.14816755056381226,
1.510053038597107,
-0.010938029736280441,
-0.2633930444717407,
0.5546832084655762,
0.494194895029068,
-0.738341212272644,
0.005605638958513737,
-0.848484992980957,
0.5260682702064514,
-0.20736709237098694,
-0.36785587668418884,
0.32374387979507446,
0.40904417634010315,
1.2301377058029175,
-0.05773857235908508,
0.0903104692697525,
1.292847752571106,
-1.3892674446105957,
1.494577169418335,
-0.6528629064559937,
0.16189002990722656,
-2.4050042629241943,
1.4061847925186157,
-0.826334536075592,
1.9632097482681274,
-2.609707832336426,
0.4268873929977417,
-0.6675640940666199,
-0.45288148522377014,
0.410084068775177,
-0.44972774386405945,
0.08862921595573425,
-0.1865936666727066,
-1.0316420793533325,
0.03671044856309891,
-0.6902945637702942,
0.48179879784584045,
1.1696653366088867,
1.3419309854507446,
-1.2118836641311646,
-0.2956428825855255,
-1.7052228450775146,
-0.16697174310684204,
-0.7714817523956299,
0.3287360966205597,
-2.034140110015869,
-0.2106749415397644,
-1.9725382328033447,
-2.252781867980957,
-1.4058948755264282,
-0.8159328103065491,
1.0073342323303223,
0.17368805408477783,
-0.8990288376808167,
1.1471699476242065,
-0.3607403039932251,
-1.7850229740142822,
1.009166955947876,
-2.0034737586975098
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | The number of shards is `ds.n_shards`. It corresponds generally to the number of files the dataset is made of, to be able to distribute to several nodes.
**You don't end up with the same data per GPU**. But all the samples are going through your preprocessing function you pass to map. They are just skipped afterwards to only keep 1 sample out of n(GPUs) | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 95 | 64 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
The number of shards is `ds.n_shards`. It corresponds generally to the number of files the dataset is made of, to be able to distribute to several nodes.
**You don't end up with the same data per GPU**. But all the samples are going through your preprocessing function you pass to map. They are just skipped afterwards to only keep 1 sample out of n(GPUs) | [
-1.2678229808807373,
-1.0063120126724243,
-0.9001365900039673,
1.4884265661239624,
-0.3024507761001587,
-1.197389006614685,
0.05919710919260979,
-1.1104072332382202,
1.6811506748199463,
-0.8838645219802856,
0.33307945728302,
-1.6826832294464111,
0.05256294086575508,
-0.5151649117469788,
-0.8403987288475037,
-0.9132705926895142,
-0.4294268488883972,
-0.8376798629760742,
0.9205992817878723,
2.461684226989746,
1.1412752866744995,
-1.3299716711044312,
2.6180129051208496,
0.6464965343475342,
-0.18531280755996704,
-1.0005602836608887,
0.5872111320495605,
0.07116052508354187,
-1.1618247032165527,
-0.5120226740837097,
-0.8950145244598389,
0.015203249640762806,
-0.5546510219573975,
-0.47014471888542175,
0.11176346987485886,
0.35914045572280884,
-0.1924094706773758,
-0.3250453472137451,
-0.43387705087661743,
-0.7839146256446838,
0.5205217599868774,
-0.3899247944355011,
0.9854382872581482,
-0.3227904140949249,
1.9183130264282227,
-0.5195709466934204,
0.3915151059627533,
0.733846127986908,
1.372722864151001,
0.2553436756134033,
-0.06536456197500229,
0.1525048464536667,
0.4266722500324249,
-0.03940272703766823,
0.39535844326019287,
1.181780457496643,
0.5800898671150208,
0.4855397939682007,
0.6860401630401611,
-2.2496490478515625,
1.4050812721252441,
-1.09003746509552,
0.3484269380569458,
1.402867078781128,
-0.9956000447273254,
0.3269274830818176,
-1.8007982969284058,
-0.00429205596446991,
0.5608102679252625,
-2.2886838912963867,
0.23926055431365967,
-1.2280786037445068,
-0.5068393349647522,
0.9715949296951294,
0.22860361635684967,
-1.2620660066604614,
0.25920358300209045,
-0.4450914263725281,
1.0532959699630737,
0.511319637298584,
1.1406322717666626,
-1.648120641708374,
-0.09846827387809753,
-0.27071210741996765,
0.0910179540514946,
-1.3933178186416626,
-1.4942797422409058,
0.5654371976852417,
0.6407913565635681,
0.46071869134902954,
-0.06366142630577087,
0.9581856727600098,
-0.9888678193092346,
0.8827270269393921,
-0.911292314529419,
-1.504358172416687,
-1.3729007244110107,
-2.2008283138275146,
-2.2215423583984375,
0.7808004021644592,
-0.4911951422691345,
-0.5907440185546875,
1.9692554473876953,
-1.0882725715637207,
-1.7152667045593262,
1.1814144849777222,
0.3095730245113373,
0.13786478340625763,
2.4368042945861816,
0.17906539142131805,
-0.642503559589386,
0.3644503355026245,
-0.7060121893882751,
0.8425306677818298,
-0.48414191603660583,
1.4229832887649536,
0.48601290583610535,
-1.04692542552948,
1.5700956583023071,
-0.5105099081993103,
0.4495481252670288,
-0.6614062190055847,
-0.635211706161499,
-0.876987636089325,
0.4013703763484955,
1.8404772281646729,
-0.343718022108078,
1.6284903287887573,
-0.3844732642173767,
-1.5371047258377075,
-1.6599634885787964,
0.9504322409629822,
0.47505509853363037,
-0.8321714401245117,
0.029170982539653778,
-0.3721829950809479,
0.1624528169631958,
-0.10927005112171173,
1.03616201877594,
1.1936604976654053,
0.672866940498352,
-0.3035433292388916,
-0.8460647463798523,
0.2207650989294052,
-0.10485563427209854,
-0.6283082962036133,
-1.8784971237182617,
-0.4057838022708893,
0.12292838096618652,
0.6950436234474182,
-1.1969026327133179,
1.6506860256195068,
0.9848347902297974,
1.926841378211975,
0.9648807644844055,
-0.3645595908164978,
1.5357519388198853,
0.045545510947704315,
1.784305453300476,
-0.5135015249252319,
0.7197383046150208,
-0.40581443905830383,
-1.127433180809021,
0.8051794171333313,
-0.33851051330566406,
-2.0156311988830566,
-0.8294235467910767,
-0.8776032328605652,
-0.2244919389486313,
-0.7945626974105835,
0.9460583329200745,
-0.2939574718475342,
-1.3739049434661865,
0.2638687193393707,
-0.6280236840248108,
0.1284336894750595,
-1.1561192274093628,
0.4502313733100891,
0.8030834794044495,
-0.6510178446769714,
0.03273659572005272,
-0.1806923896074295,
-1.2407104969024658,
-0.4642600119113922,
0.22857412695884705,
1.9277557134628296,
-0.7993195652961731,
0.9249301552772522,
0.923520028591156,
-0.6723589301109314,
0.04499814659357071,
0.35265061259269714,
-0.338268518447876,
0.8000633716583252,
-0.9738240242004395,
-0.4144260585308075,
1.2101343870162964,
-0.24666458368301392,
-0.5996357798576355,
1.533656358718872,
0.7479562163352966,
-0.9452968835830688,
-0.17402109503746033,
-0.21940037608146667,
-0.7565787434577942,
-0.022566795349121094,
-1.5449633598327637,
-0.11824401468038559,
0.14488987624645233,
-1.455081582069397,
-0.5079483985900879,
-0.2485627979040146,
1.3269554376602173,
-0.2218344658613205,
1.509635329246521,
-0.4145193099975586,
-0.23009438812732697,
-0.3812561631202698,
-0.3945090174674988,
0.1772582083940506,
-0.23123842477798462,
-0.7379693984985352,
0.29864805936813354,
-0.8245422840118408,
0.3152543902397156,
1.3697270154953003,
0.5525087118148804,
0.03935439884662628,
0.5321255326271057,
1.089435338973999,
0.3862517476081848,
0.045129891484975815,
-0.9039794206619263,
-1.536043405532837,
2.047987937927246,
-1.5304715633392334,
2.017376184463501,
0.853469729423523,
-0.07165087759494781,
-1.7240947484970093,
-1.8130512237548828,
1.2487051486968994,
1.2266285419464111,
2.3822522163391113,
0.6647446751594543,
0.3706296682357788,
-0.8723788261413574,
-0.6395771503448486,
0.4810529053211212,
-1.0701204538345337,
-0.6984089612960815,
0.03036349266767502,
2.312896728515625,
1.770081877708435,
-0.5124536752700806,
-0.1963147521018982,
-1.0433675050735474,
1.3676018714904785,
-0.160824254155159,
0.2571018636226654,
1.9791638851165771,
-0.24446724355220795,
-1.1294984817504883,
1.2588598728179932,
-2.365438222885132,
0.12818588316440582,
1.9462897777557373,
0.33442258834838867,
-0.010069068521261215,
-1.5084006786346436,
-0.577340841293335,
-0.2545044422149658,
-0.3816700279712677,
-1.2351696491241455,
0.5656278133392334,
-0.34152865409851074,
-0.823796808719635,
-1.4958008527755737,
0.13466638326644897,
-1.2404733896255493,
-1.592738389968872,
0.396420955657959,
1.8671122789382935,
2.07180118560791,
-0.7267864942550659,
1.5200624465942383,
-0.2333177924156189,
0.15244175493717194,
1.3020309209823608,
1.2698317766189575,
3.164264678955078,
1.8824784755706787,
-1.2663466930389404,
0.4841179847717285,
-0.23163381218910217,
-0.5584285259246826,
1.1515108346939087,
-1.158848524093628,
1.2561548948287964,
-0.1973099410533905,
-1.2092093229293823,
-1.2499321699142456,
0.9983210563659668,
0.4562123119831085,
0.09751521795988083,
-0.49822521209716797,
1.2477036714553833,
0.015115573070943356,
1.3469856977462769,
0.5466737151145935,
-0.3678823411464691,
0.504837691783905,
-0.48439130187034607,
-0.5190432071685791,
1.6011677980422974,
0.2035468965768814,
-1.3940049409866333,
-2.272916555404663,
-0.20018881559371948,
-0.828650951385498,
-0.0693965032696724,
-0.5358673930168152,
-1.0222079753875732,
1.6289317607879639,
0.4031686782836914,
-1.3548699617385864,
-0.3178267776966095,
-0.3798353374004364,
-0.7263481020927429,
2.5779738426208496,
-1.5307893753051758,
-0.26749929785728455,
-0.9696205854415894,
-0.5334708094596863,
1.6554659605026245,
-1.2407972812652588,
-0.1556580364704132,
-0.9837902188301086,
-0.6730841994285583,
-1.3449618816375732,
-0.5235814452171326,
-0.09273017942905426,
-0.8968924283981323,
0.8378114104270935,
0.17284367978572845,
-1.0675119161605835,
-0.36223751306533813,
-0.8096678256988525,
0.777366042137146,
-0.0642261728644371,
0.3438684046268463,
1.8854737281799316,
0.4730781614780426,
-0.4043910503387451,
0.6689051985740662,
1.1113307476043701,
0.6360328197479248,
-0.6488457918167114,
0.16724886000156403,
-0.780661404132843,
0.3233462870121002,
-1.2987699508666992,
0.31289249658584595,
-2.906297206878662,
0.6634177565574646,
-0.02018861100077629,
-0.17514705657958984,
-0.055437371134757996,
-1.2720842361450195,
1.1541608572006226,
2.566190004348755,
-1.1288790702819824,
0.38317224383354187,
0.2381281852722168,
1.2745475769042969,
-1.6944077014923096,
0.33181220293045044,
-0.3708488643169403,
2.1345810890197754,
0.24342340230941772,
1.260114073753357,
-0.49941179156303406,
-2.2986559867858887,
0.6147856712341309,
-1.2336208820343018,
-1.156376838684082,
0.7507019639015198,
-0.8538234829902649,
-0.042486321181058884,
-1.461018443107605,
-0.20496736466884613,
-0.8823184370994568,
-1.3006395101547241,
0.8137034773826599,
0.17247726023197174,
0.4974462687969208,
-0.5453569293022156,
0.3241138160228729,
-2.1699440479278564,
-1.3708025217056274,
-0.2531479299068451,
-0.8887537121772766,
0.5181492567062378,
-0.3631805181503296,
0.7816919684410095,
-0.16987603902816772,
0.06867361068725586,
0.4069962203502655,
1.3733861446380615,
3.366076946258545,
0.3400128185749054,
0.4919501841068268,
-0.19208475947380066,
-0.8600624799728394,
1.458299994468689,
0.9688902497291565,
-0.14982743561267853,
-0.589512825012207,
-0.9433120489120483,
1.2402147054672241,
1.9403955936431885,
0.9378770589828491,
0.08306116610765457,
-0.7614358067512512,
-0.6873887777328491,
-0.12154757976531982,
0.09228435903787613,
0.5049099326133728,
0.8987329602241516,
-0.016155878081917763,
0.21816779673099518,
1.4501557350158691,
1.3380407094955444,
-0.42085593938827515,
0.3229904770851135,
-0.7101418375968933,
-0.44956836104393005,
0.5227736234664917,
0.39054977893829346,
-0.0915711373090744,
0.4185554087162018,
-1.0669792890548706,
-0.28828752040863037,
-0.38779255747795105,
-0.9804026484489441,
-0.6742527484893799,
-0.45942223072052,
-0.34642109274864197,
1.6654218435287476,
0.14461754262447357,
-0.448812335729599,
-0.08011695742607117,
-0.8732481598854065,
-0.17137020826339722,
-1.1411523818969727,
0.24781391024589539,
-0.091360904276371,
-0.10624881833791733,
-0.09727567434310913,
1.8091975450515747,
-0.8772112131118774,
-2.1282291412353516,
0.3110734522342682,
0.27235928177833557,
-0.39888107776641846,
0.16232453286647797,
1.6109702587127686,
0.40615904331207275,
1.3731745481491089,
1.3482645750045776,
0.9866098165512085,
-0.6532978415489197,
-1.3072148561477661,
0.6668341755867004,
0.8888237476348877,
-1.5069631338119507,
0.8413118124008179,
0.05957360193133354,
-0.4852926731109619,
0.7053282856941223,
1.2276023626327515,
0.4533950388431549,
-1.9699058532714844,
0.8258141279220581,
-0.9210880994796753,
0.7565624713897705,
0.6925597190856934,
0.6918126344680786,
0.27070921659469604,
0.8440627455711365,
-1.2987905740737915,
-1.1599704027175903,
-0.7450380921363831,
-0.6481340527534485,
1.9580717086791992,
-0.1887759417295456,
0.5834560990333557,
-0.13313670456409454,
-1.2927627563476562,
-0.1644827425479889,
0.6659166216850281,
0.32230281829833984,
-0.3109923303127289,
0.8892542123794556,
-0.689945638179779,
-1.1280860900878906,
-1.4584102630615234,
-0.4020073413848877,
-0.9811283349990845,
-0.9212597012519836,
1.0559167861938477,
0.9587728977203369,
0.2182024121284485,
1.874131441116333,
0.5180151462554932,
0.20242565870285034,
-2.687121629714966,
0.8226959109306335,
0.3235052227973938,
-0.1195349246263504,
0.9164465665817261,
0.2322935312986374,
1.0245847702026367,
0.09235860407352448,
0.5188156962394714,
-2.4923930168151855,
2.25252628326416,
-0.26292210817337036,
0.7475296258926392,
-0.06792507320642471,
-0.14350135624408722,
1.2230632305145264,
0.5664986968040466,
0.6020432710647583,
-1.1505465507507324,
0.7409913539886475,
-0.6147518754005432,
1.1823018789291382,
1.0235506296157837,
-0.7780119180679321,
0.04773911088705063,
1.3651611804962158,
0.4984622299671173,
-0.5321099162101746,
-0.903559684753418,
-0.8613733053207397,
0.8221799731254578,
1.8595106601715088,
-0.008137563243508339,
0.048710718750953674,
0.8189115524291992,
0.6413127183914185,
-1.2826943397521973,
0.1540786176919937,
-0.799877405166626,
-0.793623685836792,
1.5741888284683228,
2.0353856086730957,
-0.08583349734544754,
-0.16194197535514832,
-0.6945577263832092,
-1.1617815494537354,
0.7381437420845032,
0.05259069800376892,
0.1976623684167862,
0.5872686505317688,
-0.7819131016731262,
1.1012811660766602,
0.9385948777198792,
0.969325065612793,
0.11672810465097427,
0.30163827538490295,
0.3592776656150818,
-0.34331783652305603,
-1.028773307800293,
-0.24659208953380585,
-1.1540101766586304,
-2.5697286128997803,
0.4644166827201843,
-0.3023115396499634,
-1.3829715251922607,
-0.010778093710541725,
-1.021491289138794,
0.890034556388855,
-0.6031745672225952,
-1.1689276695251465,
-1.588196873664856,
0.13679561018943787,
-0.11190298944711685,
0.8869505524635315,
-1.6131619215011597,
-0.0569433867931366,
1.2141780853271484,
0.8886677026748657,
-0.5811998248100281,
1.101089358329773,
0.3265186548233032,
1.02805495262146,
0.8647300004959106,
-0.41454029083251953,
0.45709365606307983,
0.17262151837348938,
-1.365415334701538,
0.4531713128089905,
1.1677184104919434,
0.11721260845661163,
1.4848315715789795,
-0.6228095293045044,
0.14779433608055115,
0.4138259291648865,
-0.5442331433296204,
-0.48831436038017273,
-0.5100168585777283,
0.8262720704078674,
0.06435845047235489,
-0.8624405264854431,
0.11675810068845749,
-0.14919786155223846,
-0.25895652174949646,
0.1347624808549881,
-1.4684706926345825,
-0.25944188237190247,
-0.37459641695022583,
-0.46787863969802856,
-1.2621476650238037,
0.03439054638147354,
1.412313461303711,
-0.7781385779380798,
-0.2080993950366974,
0.49667462706565857,
0.469014048576355,
0.5766579508781433,
0.6236159205436707,
-0.6316218972206116,
-0.41995200514793396,
-0.19898401200771332,
-0.2177366465330124,
0.29727280139923096,
1.3057893514633179,
-0.243763729929924,
-0.9141461253166199,
0.6940229535102844,
-0.29953473806381226,
-0.023290179669857025,
1.9693808555603027,
0.10192600637674332,
-0.7226596474647522,
0.33346858620643616,
-0.6823006868362427,
1.879697561264038,
1.6716991662979126,
1.3496142625808716,
-0.0558307059109211,
-0.9791865348815918,
0.5860081315040588,
-0.30406737327575684,
-0.3389185965061188,
0.7994962334632874,
0.48562389612197876,
-0.1976921111345291,
-1.454941987991333,
0.5334010720252991,
1.1730555295944214,
-0.9872188568115234,
-0.7181907296180725,
0.10654698312282562,
-0.7964717745780945,
1.1141592264175415,
0.603764533996582,
0.5199463963508606,
0.19310981035232544,
1.6608893871307373,
0.6442652344703674,
-0.5048539638519287,
0.48442256450653076,
0.4495846927165985,
-0.09203650057315826,
-2.0881526470184326,
-1.1437089443206787,
0.35847631096839905,
-0.35279229283332825,
-1.5175687074661255,
1.336491584777832,
-1.1763548851013184,
-0.8856897950172424,
0.535775899887085,
0.13160952925682068,
1.446460247039795,
0.2788234353065491,
1.660212755203247,
2.123072385787964,
0.9014108180999756,
0.2979813814163208,
1.4030390977859497,
-0.07956425845623016,
-0.44697558879852295,
1.8819462060928345,
-0.47493427991867065,
0.49571773409843445,
1.1590858697891235,
-0.3051259517669678,
-1.0442866086959839,
-0.65467369556427,
-1.1297016143798828,
-0.5017481446266174,
1.1743505001068115,
0.14103008806705475,
-1.0335426330566406,
0.14532113075256348,
1.5243550539016724,
-0.004086257889866829,
-0.2618936002254486,
0.5033701658248901,
0.5008286237716675,
-0.6951486468315125,
-0.05336545407772064,
-0.8754426836967468,
0.5030979514122009,
-0.21834753453731537,
-0.35416048765182495,
0.3422206938266754,
0.4307510256767273,
1.2235060930252075,
-0.08316239714622498,
0.05802248790860176,
1.3247517347335815,
-1.4318710565567017,
1.4995193481445312,
-0.6431069374084473,
0.17227555811405182,
-2.3903920650482178,
1.4204437732696533,
-0.786961555480957,
1.9477864503860474,
-2.541438341140747,
0.3564646542072296,
-0.6638563275337219,
-0.4485737383365631,
0.4138461947441101,
-0.3796074688434601,
0.11845284700393677,
-0.20891410112380981,
-1.0287044048309326,
-0.006780476775020361,
-0.7115467190742493,
0.46895354986190796,
1.1602648496627808,
1.3181586265563965,
-1.2042112350463867,
-0.330487459897995,
-1.7107994556427002,
-0.16798318922519684,
-0.7669845223426819,
0.34829333424568176,
-2.0095326900482178,
-0.23483753204345703,
-1.9735095500946045,
-2.212918281555176,
-1.5151286125183105,
-0.8359174728393555,
0.984946072101593,
0.1700204610824585,
-0.887593150138855,
1.1291046142578125,
-0.35508158802986145,
-1.7845163345336914,
0.9545499086380005,
-2.054229974746704
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Where can I print the actual training data for each GPU? | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 95 | 37 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Where can I print the actual training data for each GPU? | [
-1.2814726829528809,
-1.0265742540359497,
-0.894279420375824,
1.5347840785980225,
-0.3046250343322754,
-1.218792200088501,
0.02639261819422245,
-1.163316249847412,
1.679372787475586,
-0.9323546290397644,
0.27844855189323425,
-1.6602498292922974,
0.07635831832885742,
-0.5470353960990906,
-0.8728718161582947,
-0.9216479659080505,
-0.4016525447368622,
-0.8814784288406372,
0.9136179685592651,
2.442466974258423,
1.1704728603363037,
-1.2995554208755493,
2.653388738632202,
0.6649799346923828,
-0.25856781005859375,
-1.010347843170166,
0.6156622767448425,
0.02506936527788639,
-1.1245583295822144,
-0.5148566365242004,
-0.9746751189231873,
0.03764393925666809,
-0.5753535032272339,
-0.47055912017822266,
0.08082215487957001,
0.3886372447013855,
-0.2036748230457306,
-0.24443913996219635,
-0.43171143531799316,
-0.8053616285324097,
0.49286678433418274,
-0.36432668566703796,
1.0296051502227783,
-0.3359111249446869,
1.8956871032714844,
-0.5125719308853149,
0.3182721436023712,
0.6938459277153015,
1.3415884971618652,
0.22209545969963074,
-0.06550911068916321,
0.07944225519895554,
0.4373329281806946,
-0.04397042095661163,
0.39720264077186584,
1.1537712812423706,
0.5673940181732178,
0.47995489835739136,
0.6672930121421814,
-2.21751070022583,
1.3724615573883057,
-1.050229787826538,
0.2747218906879425,
1.4371681213378906,
-0.9846751689910889,
0.3779667913913727,
-1.7398313283920288,
-0.03497176989912987,
0.5124005079269409,
-2.2855122089385986,
0.1816626936197281,
-1.2135381698608398,
-0.5394205451011658,
0.9767250418663025,
0.2192428857088089,
-1.269289493560791,
0.2273320108652115,
-0.4349282681941986,
1.0746289491653442,
0.5479415655136108,
1.1421387195587158,
-1.6180676221847534,
-0.04974084347486496,
-0.2569086253643036,
0.07894033938646317,
-1.45209801197052,
-1.4815419912338257,
0.5869893431663513,
0.6913323402404785,
0.4767475426197052,
-0.07139049470424652,
1.0055891275405884,
-0.946677565574646,
0.8789491653442383,
-0.8513835072517395,
-1.4992854595184326,
-1.3638499975204468,
-2.2784411907196045,
-2.2585010528564453,
0.742224931716919,
-0.5572711229324341,
-0.6270717978477478,
2.0430943965911865,
-1.115592122077942,
-1.737582802772522,
1.2136632204055786,
0.23249250650405884,
0.15757378935813904,
2.4514222145080566,
0.22766810655593872,
-0.6598454117774963,
0.38159823417663574,
-0.6854186058044434,
0.8340842723846436,
-0.44046610593795776,
1.4316524267196655,
0.522139847278595,
-1.0334193706512451,
1.5549495220184326,
-0.4966265857219696,
0.39351707696914673,
-0.58773273229599,
-0.6300970315933228,
-0.8629394769668579,
0.4063466489315033,
1.8162144422531128,
-0.36061522364616394,
1.6013306379318237,
-0.3085508644580841,
-1.5280972719192505,
-1.6752660274505615,
0.9606859087944031,
0.47779229283332825,
-0.8619397878646851,
0.0935375913977623,
-0.3659511208534241,
0.12339875102043152,
-0.07774204760789871,
1.077150821685791,
1.1849100589752197,
0.6854692697525024,
-0.2996467351913452,
-0.8177233934402466,
0.25780192017555237,
-0.11112698912620544,
-0.6401205658912659,
-1.8315232992172241,
-0.3759709894657135,
0.12763887643814087,
0.7318544983863831,
-1.1668013334274292,
1.6726007461547852,
0.9636035561561584,
1.893192172050476,
0.974157989025116,
-0.29403021931648254,
1.514922857284546,
0.0007968535646796227,
1.7567591667175293,
-0.46894121170043945,
0.656288206577301,
-0.42659831047058105,
-1.1969196796417236,
0.8299292325973511,
-0.35880929231643677,
-1.943100094795227,
-0.7941670417785645,
-0.9202455878257751,
-0.2229696810245514,
-0.8212454319000244,
0.9374924302101135,
-0.29709070920944214,
-1.3591573238372803,
0.3079041540622711,
-0.6078516244888306,
0.15849699079990387,
-1.1518337726593018,
0.45184165239334106,
0.7890141010284424,
-0.652086615562439,
-0.04345618933439255,
-0.1700914055109024,
-1.2360634803771973,
-0.5024075508117676,
0.19694668054580688,
1.964847207069397,
-0.838517427444458,
0.9347101449966431,
0.9134292006492615,
-0.6819295883178711,
-0.0030913986265659332,
0.34722083806991577,
-0.3411606550216675,
0.8006297945976257,
-0.9619752764701843,
-0.4132029414176941,
1.191780924797058,
-0.2520030736923218,
-0.5955811738967896,
1.5453790426254272,
0.7598187923431396,
-0.9318524599075317,
-0.21020212769508362,
-0.22825761139392853,
-0.7414357662200928,
-0.08872851729393005,
-1.5471440553665161,
-0.13859449326992035,
0.20102235674858093,
-1.4447212219238281,
-0.5072801113128662,
-0.18002502620220184,
1.3452510833740234,
-0.1867847442626953,
1.4935611486434937,
-0.39869827032089233,
-0.2451353818178177,
-0.407411128282547,
-0.43747013807296753,
0.2243042141199112,
-0.19099821150302887,
-0.6948940753936768,
0.2802107334136963,
-0.857689619064331,
0.3234618604183197,
1.3367148637771606,
0.5046430826187134,
0.02758714370429516,
0.5423638820648193,
1.110572338104248,
0.42192044854164124,
0.06743315607309341,
-0.9119142889976501,
-1.5095763206481934,
2.007114887237549,
-1.535163402557373,
1.984133005142212,
0.8599074482917786,
-0.06437782198190689,
-1.7522603273391724,
-1.8351020812988281,
1.2562546730041504,
1.2274081707000732,
2.2915077209472656,
0.6657106280326843,
0.327260285615921,
-0.8516093492507935,
-0.6141165494918823,
0.4835396707057953,
-1.0771386623382568,
-0.6964569687843323,
0.012626545503735542,
2.2966840267181396,
1.7907239198684692,
-0.5174372792243958,
-0.2355177253484726,
-0.9652253985404968,
1.331098198890686,
-0.1218399703502655,
0.19642773270606995,
1.9989073276519775,
-0.29440099000930786,
-1.1347360610961914,
1.2687273025512695,
-2.369677782058716,
0.10154329985380173,
1.9798858165740967,
0.34464573860168457,
-0.012516284361481667,
-1.513927936553955,
-0.6060503721237183,
-0.2000562995672226,
-0.5007979273796082,
-1.2171094417572021,
0.6329392194747925,
-0.3818527162075043,
-0.7911751866340637,
-1.4827152490615845,
0.15538126230239868,
-1.2397702932357788,
-1.6533534526824951,
0.35445234179496765,
1.8464590311050415,
2.1897754669189453,
-0.736625611782074,
1.568933129310608,
-0.22306187450885773,
0.22393211722373962,
1.3194868564605713,
1.258108139038086,
3.1830556392669678,
1.916388988494873,
-1.2556098699569702,
0.5177027583122253,
-0.21323162317276,
-0.547003448009491,
1.1811648607254028,
-1.141223430633545,
1.2362637519836426,
-0.24671414494514465,
-1.2725368738174438,
-1.2600882053375244,
0.9968249797821045,
0.4440355896949768,
0.08054759353399277,
-0.49232757091522217,
1.2510724067687988,
0.038824647665023804,
1.3606586456298828,
0.5432705879211426,
-0.33202171325683594,
0.46624109148979187,
-0.48598337173461914,
-0.5199838280677795,
1.5838477611541748,
0.21093706786632538,
-1.3213270902633667,
-2.27457594871521,
-0.22710733115673065,
-0.7779583930969238,
-0.08826883882284164,
-0.534806489944458,
-1.0101094245910645,
1.576125979423523,
0.42239144444465637,
-1.3417576551437378,
-0.3321987986564636,
-0.39052554965019226,
-0.6953662037849426,
2.5608713626861572,
-1.546981692314148,
-0.22658368945121765,
-0.9570629000663757,
-0.5437139272689819,
1.674554705619812,
-1.2584662437438965,
-0.16721312701702118,
-1.0157477855682373,
-0.7204552292823792,
-1.411131501197815,
-0.5385257601737976,
-0.10424179583787918,
-0.9179927110671997,
0.823276162147522,
0.14606788754463196,
-1.0468192100524902,
-0.3288227617740631,
-0.8068921566009521,
0.8192947506904602,
-0.1090194582939148,
0.35117536783218384,
1.9280012845993042,
0.46591395139694214,
-0.48811566829681396,
0.6312741041183472,
1.062090516090393,
0.6562201380729675,
-0.6821234226226807,
0.13139836490154266,
-0.7840787172317505,
0.3669320046901703,
-1.3083175420761108,
0.303154855966568,
-2.950444221496582,
0.6834335923194885,
0.030367029830813408,
-0.19029279053211212,
-0.05586563050746918,
-1.2462149858474731,
1.0938557386398315,
2.5534005165100098,
-1.158568024635315,
0.3791717290878296,
0.24308398365974426,
1.2940289974212646,
-1.7077196836471558,
0.30292531847953796,
-0.3842337429523468,
2.132204294204712,
0.1896210014820099,
1.2868561744689941,
-0.42640000581741333,
-2.2882425785064697,
0.6569679379463196,
-1.2787182331085205,
-1.171554684638977,
0.7707144021987915,
-0.8060885667800903,
-0.06537644565105438,
-1.4461332559585571,
-0.19972912967205048,
-0.928510844707489,
-1.3022860288619995,
0.8798255920410156,
0.14425930380821228,
0.5021373629570007,
-0.5528438091278076,
0.34419870376586914,
-2.1424241065979004,
-1.36899733543396,
-0.210322305560112,
-0.8550081849098206,
0.47963690757751465,
-0.39705565571784973,
0.74950110912323,
-0.1906929910182953,
0.10628843307495117,
0.4164994955062866,
1.3767579793930054,
3.396498441696167,
0.33946913480758667,
0.46402376890182495,
-0.16723096370697021,
-0.901455819606781,
1.4407581090927124,
0.9470087289810181,
-0.19808776676654816,
-0.5881155729293823,
-0.9587447643280029,
1.2157145738601685,
1.9063743352890015,
0.9227351546287537,
0.09247007966041565,
-0.7936158180236816,
-0.6677661538124084,
-0.09883309155702591,
0.13405337929725647,
0.5797925591468811,
0.8690991997718811,
-0.04411737620830536,
0.1786613017320633,
1.4255645275115967,
1.2434650659561157,
-0.3762260377407074,
0.32222041487693787,
-0.7242060899734497,
-0.48013490438461304,
0.49886706471443176,
0.3699462115764618,
-0.09855970740318298,
0.43246087431907654,
-1.027206540107727,
-0.2969099283218384,
-0.34662824869155884,
-1.0216660499572754,
-0.6461784839630127,
-0.45349258184432983,
-0.34644368290901184,
1.5731185674667358,
0.1641579568386078,
-0.44720783829689026,
-0.07721962034702301,
-0.881824791431427,
-0.19393350183963776,
-1.1635462045669556,
0.19707822799682617,
-0.12561090290546417,
-0.14113152027130127,
-0.12094376236200333,
1.785804033279419,
-0.8405318260192871,
-2.081026554107666,
0.32776468992233276,
0.3096260130405426,
-0.3855836093425751,
0.18275423347949982,
1.5855573415756226,
0.37513065338134766,
1.3800779581069946,
1.3545842170715332,
1.0129976272583008,
-0.6528146266937256,
-1.329192042350769,
0.7121415138244629,
0.8864290714263916,
-1.530978798866272,
0.8786543607711792,
0.020223695784807205,
-0.4847704768180847,
0.6732387542724609,
1.1968175172805786,
0.4205178916454315,
-1.929712176322937,
0.8332672119140625,
-0.9431716799736023,
0.742473840713501,
0.6907724142074585,
0.7491061091423035,
0.26147446036338806,
0.836478054523468,
-1.2634326219558716,
-1.1441650390625,
-0.7419921159744263,
-0.6632647514343262,
1.9617186784744263,
-0.20507243275642395,
0.5858161449432373,
-0.1622125804424286,
-1.2602375745773315,
-0.13895024359226227,
0.6479095816612244,
0.2563428282737732,
-0.24815519154071808,
0.9168074727058411,
-0.7531666159629822,
-1.1042823791503906,
-1.4389935731887817,
-0.35766610503196716,
-0.9565492868423462,
-0.9369586110115051,
1.082135796546936,
0.9437596797943115,
0.20290130376815796,
1.8966063261032104,
0.5069167613983154,
0.22373296320438385,
-2.6527631282806396,
0.8027406334877014,
0.34062013030052185,
-0.07425209134817123,
0.8662552237510681,
0.19619068503379822,
1.0406123399734497,
0.05971730500459671,
0.4746934771537781,
-2.4540419578552246,
2.2402889728546143,
-0.24641087651252747,
0.706506609916687,
-0.04218025505542755,
-0.15543133020401,
1.2133216857910156,
0.5841479301452637,
0.6353935599327087,
-1.1421897411346436,
0.7828754782676697,
-0.5747846364974976,
1.190479040145874,
1.0279552936553955,
-0.7728466987609863,
0.06734064966440201,
1.4138821363449097,
0.5365859866142273,
-0.5344268083572388,
-0.8632560968399048,
-0.8883617520332336,
0.8240250945091248,
1.8263407945632935,
0.030597658827900887,
0.01856820285320282,
0.8112722039222717,
0.6599423289299011,
-1.2750346660614014,
0.18258726596832275,
-0.7816296219825745,
-0.7969993352890015,
1.6013609170913696,
2.0422556400299072,
-0.1103041023015976,
-0.14539355039596558,
-0.7502299547195435,
-1.1590420007705688,
0.8012919425964355,
0.07088996469974518,
0.12599623203277588,
0.6318129897117615,
-0.7492421269416809,
1.1158744096755981,
0.9529305696487427,
0.9618902802467346,
0.16213224828243256,
0.30611109733581543,
0.34912174940109253,
-0.2815985381603241,
-1.0423974990844727,
-0.24209308624267578,
-1.1099853515625,
-2.603210687637329,
0.4814275801181793,
-0.286784291267395,
-1.3437936305999756,
0.0007233284413814545,
-0.994709849357605,
0.8920036554336548,
-0.5865285992622375,
-1.1577657461166382,
-1.580828070640564,
0.15551313757896423,
-0.12035799771547318,
0.9120401740074158,
-1.617207407951355,
-0.05174225568771362,
1.2577475309371948,
0.8986698389053345,
-0.6350893378257751,
1.0694859027862549,
0.3072427809238434,
1.0238887071609497,
0.8544989228248596,
-0.4333674907684326,
0.49977388978004456,
0.17175808548927307,
-1.3827848434448242,
0.44549229741096497,
1.191204309463501,
0.11460958421230316,
1.501314401626587,
-0.5794081091880798,
0.10011234879493713,
0.39511218667030334,
-0.5698873996734619,
-0.4276943504810333,
-0.5143548846244812,
0.8336409330368042,
0.09898785501718521,
-0.8147619366645813,
0.12450242042541504,
-0.16284528374671936,
-0.33577778935432434,
0.18268714845180511,
-1.5135788917541504,
-0.2503921687602997,
-0.383608877658844,
-0.4933752715587616,
-1.2978466749191284,
0.05375392735004425,
1.413488507270813,
-0.8069829344749451,
-0.16502872109413147,
0.4829401969909668,
0.3983999192714691,
0.5469236969947815,
0.5974462628364563,
-0.623796284198761,
-0.3782164752483368,
-0.2431376576423645,
-0.24987806379795074,
0.27903854846954346,
1.3337628841400146,
-0.18189717829227448,
-0.9026609659194946,
0.6816425919532776,
-0.22409161925315857,
-0.03616201505064964,
1.9724392890930176,
0.11115109920501709,
-0.7302302718162537,
0.31276369094848633,
-0.6980120539665222,
1.8735202550888062,
1.5828580856323242,
1.333164930343628,
-0.06032545864582062,
-0.9568746089935303,
0.6121543049812317,
-0.27959778904914856,
-0.3173567056655884,
0.8514131307601929,
0.4840715229511261,
-0.22057630121707916,
-1.4380292892456055,
0.5545101165771484,
1.1242175102233887,
-0.9942283630371094,
-0.6760441660881042,
0.021008944138884544,
-0.7338017225265503,
1.068371057510376,
0.6178239583969116,
0.5276550650596619,
0.24238869547843933,
1.679719090461731,
0.6921845078468323,
-0.5720731019973755,
0.474753737449646,
0.466257244348526,
-0.03252348303794861,
-2.078824043273926,
-1.0889434814453125,
0.3966001272201538,
-0.3755735158920288,
-1.5277297496795654,
1.2926658391952515,
-1.1690046787261963,
-0.9138015508651733,
0.5707188248634338,
0.07675237208604813,
1.4479588270187378,
0.2520902752876282,
1.6689262390136719,
2.136522054672241,
0.8481199145317078,
0.2866227328777313,
1.3934935331344604,
-0.09884437173604965,
-0.4080997705459595,
1.8553842306137085,
-0.46884673833847046,
0.4743556082248688,
1.136588454246521,
-0.2804923355579376,
-0.9996088743209839,
-0.6788445115089417,
-1.1403734683990479,
-0.4980361759662628,
1.14785635471344,
0.14631164073944092,
-1.0265575647354126,
0.1514672338962555,
1.5351330041885376,
0.0018720915541052818,
-0.22393928468227386,
0.5515285730361938,
0.5194779634475708,
-0.7066590189933777,
-0.016963671892881393,
-0.8164756894111633,
0.5064535737037659,
-0.2209542840719223,
-0.35068070888519287,
0.3847491145133972,
0.4023081362247467,
1.2270222902297974,
-0.08255304396152496,
0.08692510426044464,
1.2807356119155884,
-1.4063050746917725,
1.483742594718933,
-0.5754124522209167,
0.10700555890798569,
-2.4285778999328613,
1.4487601518630981,
-0.8598740696907043,
2.0023858547210693,
-2.590825319290161,
0.3752458989620209,
-0.6627524495124817,
-0.46029579639434814,
0.4050791561603546,
-0.39260584115982056,
0.09803226590156555,
-0.231539785861969,
-0.9851880073547363,
0.024451112374663353,
-0.7426701188087463,
0.5313993692398071,
1.191124677658081,
1.3347342014312744,
-1.199270248413086,
-0.311822772026062,
-1.7323601245880127,
-0.19771245121955872,
-0.6963130831718445,
0.35447031259536743,
-2.000540018081665,
-0.21846307814121246,
-2.0381364822387695,
-2.267521619796753,
-1.4522697925567627,
-0.8536509871482849,
1.0090945959091187,
0.1290692687034607,
-0.937049925327301,
1.1020219326019287,
-0.3390962779521942,
-1.8091217279434204,
0.99360191822052,
-2.0124874114990234
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | > For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Yes exactly :)
> Where can I print the actual training data for each GPU?
You should call print in the data_collator | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 95 | 49 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
> For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
Is my understanding correct?
Yes exactly :)
> Where can I print the actual training data for each GPU?
You should call print in the data_collator | [
-1.2916134595870972,
-0.9722844958305359,
-0.8775379657745361,
1.524162769317627,
-0.27531495690345764,
-1.2007114887237549,
0.037220969796180725,
-1.1679022312164307,
1.6707935333251953,
-0.9344051480293274,
0.27244827151298523,
-1.6547763347625732,
0.07098191976547241,
-0.5177021622657776,
-0.8760262131690979,
-0.9348008036613464,
-0.42018911242485046,
-0.8671707510948181,
0.8945601582527161,
2.4314427375793457,
1.1947349309921265,
-1.3027037382125854,
2.6449100971221924,
0.6655640602111816,
-0.25346922874450684,
-1.0124976634979248,
0.6134470701217651,
0.013403886929154396,
-1.134261131286621,
-0.5086539387702942,
-0.979663610458374,
0.036422260105609894,
-0.6001296639442444,
-0.4691120684146881,
0.08264188468456268,
0.3624598979949951,
-0.22124943137168884,
-0.24158033728599548,
-0.44159600138664246,
-0.8265703320503235,
0.49655014276504517,
-0.37168392539024353,
1.0042212009429932,
-0.3628174066543579,
1.8859831094741821,
-0.5392953753471375,
0.3457500636577606,
0.6916269659996033,
1.346335530281067,
0.21610969305038452,
-0.06931570172309875,
0.13150927424430847,
0.42316076159477234,
-0.03660847619175911,
0.41862112283706665,
1.16017746925354,
0.5705012083053589,
0.457724928855896,
0.6670542359352112,
-2.2117919921875,
1.369416356086731,
-1.0542715787887573,
0.2726305425167084,
1.4149192571640015,
-0.9470594525337219,
0.38417279720306396,
-1.757040023803711,
-0.038502976298332214,
0.5150550603866577,
-2.306755781173706,
0.1768438220024109,
-1.2396175861358643,
-0.5355592370033264,
0.9899368286132812,
0.2346881628036499,
-1.2623803615570068,
0.21750305593013763,
-0.43740272521972656,
1.069808840751648,
0.5276165008544922,
1.1458125114440918,
-1.6332437992095947,
-0.06542475521564484,
-0.25619572401046753,
0.07197314500808716,
-1.4220551252365112,
-1.4879724979400635,
0.5688201189041138,
0.6711075901985168,
0.46931400895118713,
-0.0643785148859024,
1.0102804899215698,
-0.9629086256027222,
0.864302396774292,
-0.8675006628036499,
-1.5360567569732666,
-1.383581280708313,
-2.2722301483154297,
-2.2380263805389404,
0.730221688747406,
-0.5643027424812317,
-0.6070904731750488,
2.07030987739563,
-1.1243609189987183,
-1.7442642450332642,
1.1950305700302124,
0.2454201877117157,
0.1356809288263321,
2.4736015796661377,
0.22688309848308563,
-0.6820682287216187,
0.4175974726676941,
-0.6852198243141174,
0.8071739673614502,
-0.4391687214374542,
1.429306149482727,
0.5267464518547058,
-1.026737928390503,
1.567680835723877,
-0.49550166726112366,
0.397391676902771,
-0.5788885354995728,
-0.6359767317771912,
-0.8456793427467346,
0.39751124382019043,
1.819892406463623,
-0.34776490926742554,
1.6177133321762085,
-0.2706349790096283,
-1.5134865045547485,
-1.6588443517684937,
0.9580491781234741,
0.47302985191345215,
-0.8617215156555176,
0.1049758791923523,
-0.3678271472454071,
0.11222368478775024,
-0.07849930226802826,
1.0686198472976685,
1.1850054264068604,
0.6797537803649902,
-0.3004987835884094,
-0.8227013349533081,
0.2754076421260834,
-0.06854601949453354,
-0.6369957327842712,
-1.8246421813964844,
-0.36735638976097107,
0.12333768606185913,
0.7179181575775146,
-1.1741174459457397,
1.6634052991867065,
0.9672805070877075,
1.8970528841018677,
0.9837711453437805,
-0.3004043996334076,
1.5027203559875488,
0.008053155615925789,
1.7630228996276855,
-0.4596303701400757,
0.6744534373283386,
-0.41219019889831543,
-1.1971780061721802,
0.8091118931770325,
-0.37268367409706116,
-1.9521641731262207,
-0.7784474492073059,
-0.900093674659729,
-0.19411592185497284,
-0.8151395916938782,
0.9538265466690063,
-0.2993319034576416,
-1.349867582321167,
0.30507728457450867,
-0.6404881477355957,
0.13937649130821228,
-1.1814218759536743,
0.44063588976860046,
0.7821649312973022,
-0.6562947034835815,
-0.032784998416900635,
-0.18789750337600708,
-1.2363061904907227,
-0.45762720704078674,
0.20183022320270538,
1.9534293413162231,
-0.8372852802276611,
0.9403619766235352,
0.9223278760910034,
-0.6753489375114441,
-0.002765272743999958,
0.3412637412548065,
-0.3330942392349243,
0.8112199902534485,
-0.9358161687850952,
-0.4328766465187073,
1.1901553869247437,
-0.24669328331947327,
-0.6136341691017151,
1.510728120803833,
0.7516266703605652,
-0.9443669319152832,
-0.22082242369651794,
-0.23713244497776031,
-0.754547119140625,
-0.07295413315296173,
-1.5557819604873657,
-0.12460100650787354,
0.21939386427402496,
-1.4736202955245972,
-0.4841269850730896,
-0.16732901334762573,
1.3518186807632446,
-0.19114907085895538,
1.5152446031570435,
-0.39342159032821655,
-0.2267541140317917,
-0.40240970253944397,
-0.45384305715560913,
0.23315881192684174,
-0.18033277988433838,
-0.6806505918502808,
0.29833081364631653,
-0.8484154939651489,
0.3215104043483734,
1.326610803604126,
0.4977826476097107,
0.005720390938222408,
0.5273934006690979,
1.095125675201416,
0.40593287348747253,
0.03687579557299614,
-0.909713625907898,
-1.5013645887374878,
2.030020236968994,
-1.4987339973449707,
1.9941105842590332,
0.8537459969520569,
-0.09469184279441833,
-1.755901575088501,
-1.8501713275909424,
1.2652664184570312,
1.205718994140625,
2.305814266204834,
0.6702409386634827,
0.3511449992656708,
-0.8522301912307739,
-0.6418942809104919,
0.5005466938018799,
-1.0653965473175049,
-0.706602156162262,
0.006260824389755726,
2.3165271282196045,
1.7862896919250488,
-0.4928143322467804,
-0.23183976113796234,
-0.9525175094604492,
1.3331663608551025,
-0.15743191540241241,
0.20115482807159424,
1.9976305961608887,
-0.2712406516075134,
-1.1362261772155762,
1.2799561023712158,
-2.3567566871643066,
0.09300461411476135,
2.000321865081787,
0.344862163066864,
-0.02051188051700592,
-1.525289535522461,
-0.5955380797386169,
-0.23433846235275269,
-0.49354425072669983,
-1.213395118713379,
0.6283743977546692,
-0.3697720766067505,
-0.8167034387588501,
-1.4639034271240234,
0.1615935117006302,
-1.2101001739501953,
-1.6573946475982666,
0.34397128224372864,
1.8716477155685425,
2.1955628395080566,
-0.7315241694450378,
1.5456994771957397,
-0.23845410346984863,
0.18965579569339752,
1.2995989322662354,
1.266160011291504,
3.1983642578125,
1.9017865657806396,
-1.2917121648788452,
0.5118780136108398,
-0.21160806715488434,
-0.5590857863426208,
1.2039794921875,
-1.1603844165802002,
1.2585411071777344,
-0.23791560530662537,
-1.2925535440444946,
-1.2460271120071411,
1.006627082824707,
0.418788880109787,
0.08248096704483032,
-0.5267831683158875,
1.262577772140503,
0.0007905410602688789,
1.3697991371154785,
0.5263419151306152,
-0.318338006734848,
0.45964112877845764,
-0.4719278812408447,
-0.5346518754959106,
1.5868507623672485,
0.1751043200492859,
-1.343970775604248,
-2.282503128051758,
-0.21321402490139008,
-0.7779331803321838,
-0.09553198516368866,
-0.5603363513946533,
-1.023298740386963,
1.5731112957000732,
0.40244054794311523,
-1.3266656398773193,
-0.3621438145637512,
-0.40092653036117554,
-0.6829459071159363,
2.5880839824676514,
-1.5460851192474365,
-0.19828951358795166,
-0.974820613861084,
-0.5235167741775513,
1.6899839639663696,
-1.2403823137283325,
-0.13415910303592682,
-1.00287926197052,
-0.7152717709541321,
-1.4286937713623047,
-0.543895423412323,
-0.11639294028282166,
-0.9144980907440186,
0.8028890490531921,
0.18525183200836182,
-1.0599931478500366,
-0.3266254663467407,
-0.8079445958137512,
0.8191860914230347,
-0.09697428345680237,
0.3281930088996887,
1.915560245513916,
0.43591681122779846,
-0.46608683466911316,
0.6394474506378174,
1.0718756914138794,
0.6757017374038696,
-0.6635537147521973,
0.10947611927986145,
-0.7788312435150146,
0.3764815926551819,
-1.3067809343338013,
0.285836786031723,
-2.9307210445404053,
0.7054693698883057,
0.015440847724676132,
-0.16562838852405548,
-0.04782760143280029,
-1.2291080951690674,
1.088690161705017,
2.573953628540039,
-1.156402826309204,
0.3885686695575714,
0.26237761974334717,
1.2396585941314697,
-1.6907061338424683,
0.2731526792049408,
-0.4218336045742035,
2.148015260696411,
0.17312149703502655,
1.3060495853424072,
-0.4191172122955322,
-2.3092825412750244,
0.642044186592102,
-1.2723243236541748,
-1.1670594215393066,
0.8015299439430237,
-0.8253316879272461,
-0.03510371595621109,
-1.4354180097579956,
-0.20482908189296722,
-0.9582505822181702,
-1.2815455198287964,
0.8733454942703247,
0.15398472547531128,
0.5225960612297058,
-0.5394306182861328,
0.33895841240882874,
-2.167764186859131,
-1.3771106004714966,
-0.24754883348941803,
-0.8749798536300659,
0.4945679306983948,
-0.3831413984298706,
0.7303171753883362,
-0.17116937041282654,
0.07830187678337097,
0.4264848828315735,
1.3458836078643799,
3.3848605155944824,
0.3283954858779907,
0.4419214129447937,
-0.15519113838672638,
-0.9241634607315063,
1.4201922416687012,
0.9494733810424805,
-0.183062344789505,
-0.5795770883560181,
-0.939045250415802,
1.2348860502243042,
1.90142822265625,
0.9212372303009033,
0.07018150389194489,
-0.8069470524787903,
-0.655830979347229,
-0.09411337971687317,
0.13429826498031616,
0.610967218875885,
0.8731068968772888,
-0.05467243492603302,
0.19510681927204132,
1.4159951210021973,
1.2500768899917603,
-0.3689728379249573,
0.32223600149154663,
-0.7192570567131042,
-0.4738779366016388,
0.4972034692764282,
0.34464260935783386,
-0.07971839606761932,
0.44662103056907654,
-0.9937059879302979,
-0.2962615489959717,
-0.35967203974723816,
-1.0076855421066284,
-0.6541829109191895,
-0.43705081939697266,
-0.3547689616680145,
1.5732914209365845,
0.1567060351371765,
-0.4317798316478729,
-0.059246718883514404,
-0.8900837302207947,
-0.17809154093265533,
-1.142088770866394,
0.21195030212402344,
-0.09662298858165741,
-0.12190733850002289,
-0.1165558248758316,
1.7577481269836426,
-0.8576279878616333,
-2.075289249420166,
0.29233717918395996,
0.3141990602016449,
-0.40433910489082336,
0.17172349989414215,
1.603468894958496,
0.39644914865493774,
1.4077318906784058,
1.3524153232574463,
1.0104445219039917,
-0.6520711183547974,
-1.3114129304885864,
0.6984990835189819,
0.9092928171157837,
-1.5278167724609375,
0.8783310055732727,
-0.010192488320171833,
-0.5008403658866882,
0.660197377204895,
1.2021198272705078,
0.4327339828014374,
-1.9227746725082397,
0.8625747561454773,
-0.9227932691574097,
0.7406778931617737,
0.6678877472877502,
0.7496498823165894,
0.28036779165267944,
0.8285638093948364,
-1.2704594135284424,
-1.1404213905334473,
-0.7438697218894958,
-0.6483615636825562,
1.9410030841827393,
-0.2284926176071167,
0.5788801908493042,
-0.1755266785621643,
-1.2578357458114624,
-0.13581520318984985,
0.6662265062332153,
0.29882314801216125,
-0.25690901279449463,
0.9195448756217957,
-0.7404084205627441,
-1.1138746738433838,
-1.4324527978897095,
-0.34409937262535095,
-0.9389532804489136,
-0.9343766570091248,
1.0652068853378296,
0.9398149251937866,
0.23281969130039215,
1.9165161848068237,
0.5289087295532227,
0.22023385763168335,
-2.644252300262451,
0.8295440673828125,
0.3377551734447479,
-0.11054535210132599,
0.8419496417045593,
0.2059115767478943,
1.0159350633621216,
0.06717380881309509,
0.4784686267375946,
-2.463103771209717,
2.2187840938568115,
-0.23595763742923737,
0.7191781997680664,
-0.022084439173340797,
-0.1462763249874115,
1.189195156097412,
0.5852460861206055,
0.6283785104751587,
-1.1028509140014648,
0.8078896403312683,
-0.5856195092201233,
1.2222578525543213,
1.0519911050796509,
-0.7708916068077087,
0.0852859765291214,
1.4340291023254395,
0.5158992409706116,
-0.5285388827323914,
-0.8782310485839844,
-0.8663643002510071,
0.8266366124153137,
1.8013925552368164,
0.042556751519441605,
0.007835006341338158,
0.815011203289032,
0.6410485506057739,
-1.2859450578689575,
0.1959899663925171,
-0.782800018787384,
-0.8075342774391174,
1.5896967649459839,
2.0390374660491943,
-0.12938116490840912,
-0.13562560081481934,
-0.7610976696014404,
-1.1861701011657715,
0.7867714166641235,
0.05914060398936272,
0.12052330374717712,
0.6375341415405273,
-0.7204158902168274,
1.094871997833252,
0.9330152869224548,
0.953210711479187,
0.1556888222694397,
0.2926141321659088,
0.35715389251708984,
-0.2904878854751587,
-1.0349833965301514,
-0.24507591128349304,
-1.1164169311523438,
-2.599513530731201,
0.4633995294570923,
-0.27811160683631897,
-1.3458492755889893,
0.008322704583406448,
-0.9841423034667969,
0.8826056718826294,
-0.5782477855682373,
-1.1208988428115845,
-1.5558279752731323,
0.15152941644191742,
-0.10872034728527069,
0.9190098643302917,
-1.6354944705963135,
-0.07090441882610321,
1.2411842346191406,
0.9146333336830139,
-0.6199771761894226,
1.0544215440750122,
0.32709500193595886,
1.0446457862854004,
0.8504279851913452,
-0.44148364663124084,
0.5178593993186951,
0.16483885049819946,
-1.3753029108047485,
0.4751574993133545,
1.1995177268981934,
0.11262665688991547,
1.4864845275878906,
-0.5532736778259277,
0.057326216250658035,
0.3933151662349701,
-0.5398551821708679,
-0.43099841475486755,
-0.5302042365074158,
0.8336707353591919,
0.09697730839252472,
-0.834077000617981,
0.10686512291431427,
-0.1831175535917282,
-0.3081202208995819,
0.18007232248783112,
-1.5126395225524902,
-0.25049999356269836,
-0.368614137172699,
-0.49148261547088623,
-1.2869852781295776,
0.046274583786726,
1.4207794666290283,
-0.8149030208587646,
-0.17619237303733826,
0.49315863847732544,
0.3969115614891052,
0.5684834718704224,
0.5819900035858154,
-0.6379307508468628,
-0.3861653506755829,
-0.2665128707885742,
-0.23407430946826935,
0.28751853108406067,
1.3192238807678223,
-0.17148391902446747,
-0.9130614995956421,
0.6744092702865601,
-0.24096612632274628,
-0.05810290202498436,
1.986965537071228,
0.10405701398849487,
-0.7182409167289734,
0.3179832994937897,
-0.6824782490730286,
1.882157325744629,
1.5828814506530762,
1.3328627347946167,
-0.08026492595672607,
-0.9751121997833252,
0.6164396405220032,
-0.3151872158050537,
-0.327472448348999,
0.8184241652488708,
0.4873933792114258,
-0.18684881925582886,
-1.4634206295013428,
0.5346269011497498,
1.1164461374282837,
-0.9969393014907837,
-0.6721938252449036,
0.025293748825788498,
-0.7367991209030151,
1.0675851106643677,
0.6447458863258362,
0.5123437643051147,
0.231246218085289,
1.6992298364639282,
0.7001171112060547,
-0.5383806824684143,
0.4641070067882538,
0.45742276310920715,
-0.07412520051002502,
-2.0866990089416504,
-1.0889272689819336,
0.40106987953186035,
-0.3585473299026489,
-1.5263925790786743,
1.3220360279083252,
-1.1949968338012695,
-0.9105184078216553,
0.5659496188163757,
0.08840200304985046,
1.4411838054656982,
0.23455499112606049,
1.673146367073059,
2.1270434856414795,
0.8695740699768066,
0.303460031747818,
1.3991461992263794,
-0.09154073894023895,
-0.3971765339374542,
1.8219910860061646,
-0.4817543625831604,
0.4784906208515167,
1.126588225364685,
-0.3044324219226837,
-1.0110591650009155,
-0.7046344876289368,
-1.1489201784133911,
-0.518079936504364,
1.158306360244751,
0.12039095163345337,
-1.012387990951538,
0.14888161420822144,
1.543731689453125,
0.025658167898654938,
-0.23424001038074493,
0.5478947162628174,
0.5155820250511169,
-0.7175819873809814,
-0.028222300112247467,
-0.8373985290527344,
0.4996548295021057,
-0.1950649470090866,
-0.3437420427799225,
0.36805713176727295,
0.39742234349250793,
1.2413594722747803,
-0.08542424440383911,
0.1014011949300766,
1.2798707485198975,
-1.3649895191192627,
1.4833976030349731,
-0.5834730267524719,
0.12557685375213623,
-2.4211134910583496,
1.4408166408538818,
-0.8528411984443665,
1.9816169738769531,
-2.5944344997406006,
0.3915332853794098,
-0.6831974387168884,
-0.423114150762558,
0.40340477228164673,
-0.418768048286438,
0.11342345178127289,
-0.24713192880153656,
-1.008194088935852,
0.02046002820134163,
-0.7394708395004272,
0.5356496572494507,
1.1605442762374878,
1.349908709526062,
-1.1944011449813843,
-0.31305673718452454,
-1.7150731086730957,
-0.1849294751882553,
-0.7156918048858643,
0.32674360275268555,
-1.9853113889694214,
-0.19904394447803497,
-2.054201126098633,
-2.283921003341675,
-1.4401954412460327,
-0.8181015849113464,
1.0274028778076172,
0.14279061555862427,
-0.9436990022659302,
1.1384869813919067,
-0.33106210827827454,
-1.8070882558822632,
0.9986401796340942,
-2.036287784576416
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | I print out n_shards, and under multiple GPUs, this value is always 1.
Is this value correct? | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 95 | 17 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
I print out n_shards, and under multiple GPUs, this value is always 1.
Is this value correct? | [
-1.3005017042160034,
-1.0508544445037842,
-0.9182925224304199,
1.578803300857544,
-0.3087109327316284,
-1.221313238143921,
-0.0003458186984062195,
-1.1123732328414917,
1.6605112552642822,
-0.894683301448822,
0.3373599350452423,
-1.6900578737258911,
0.033128365874290466,
-0.5358169674873352,
-0.8002862930297852,
-0.9181464314460754,
-0.37695956230163574,
-0.8796120882034302,
0.908582329750061,
2.450357437133789,
1.166947841644287,
-1.3183649778366089,
2.650456190109253,
0.6508305072784424,
-0.22756925225257874,
-1.0111150741577148,
0.630798876285553,
0.04156927764415741,
-1.1410248279571533,
-0.5106320381164551,
-0.9392669200897217,
0.013676418922841549,
-0.5544071793556213,
-0.47364678978919983,
0.046107158064842224,
0.3773414194583893,
-0.1968364417552948,
-0.24689991772174835,
-0.4008151590824127,
-0.8138977289199829,
0.5069131851196289,
-0.3701523542404175,
0.9991915822029114,
-0.31352323293685913,
1.9099102020263672,
-0.5018568634986877,
0.3271687924861908,
0.7058020234107971,
1.321624755859375,
0.21271808445453644,
-0.04659115523099899,
0.09166562557220459,
0.42011722922325134,
-0.070809505879879,
0.3954553008079529,
1.1456749439239502,
0.5711743831634521,
0.4580730199813843,
0.705436646938324,
-2.2392666339874268,
1.390774130821228,
-1.0791072845458984,
0.32680952548980713,
1.4157721996307373,
-1.0120549201965332,
0.327282577753067,
-1.7424713373184204,
0.007934330962598324,
0.5389235615730286,
-2.2493362426757812,
0.2053399682044983,
-1.2052650451660156,
-0.5259199142456055,
0.959104061126709,
0.2642098069190979,
-1.273659586906433,
0.17082825303077698,
-0.3992454409599304,
1.0397236347198486,
0.5266242027282715,
1.1253706216812134,
-1.6072626113891602,
-0.049873750656843185,
-0.2929295599460602,
0.0805366039276123,
-1.4197636842727661,
-1.4819812774658203,
0.5378814935684204,
0.6134142279624939,
0.5215625166893005,
-0.06394592672586441,
0.9950107932090759,
-0.9507639408111572,
0.8289984464645386,
-0.8833814263343811,
-1.4900389909744263,
-1.3774349689483643,
-2.3166933059692383,
-2.241577625274658,
0.7514026165008545,
-0.5314483046531677,
-0.6020018458366394,
1.969091773033142,
-1.100900411605835,
-1.7446560859680176,
1.1961381435394287,
0.2939704358577728,
0.1794695109128952,
2.4252259731292725,
0.24822771549224854,
-0.6823351383209229,
0.39042025804519653,
-0.738640546798706,
0.8280444741249084,
-0.42458805441856384,
1.4317394495010376,
0.5212655663490295,
-1.05013906955719,
1.5158488750457764,
-0.5057941675186157,
0.40752747654914856,
-0.6243169903755188,
-0.6223565936088562,
-0.891747236251831,
0.36872148513793945,
1.7549560070037842,
-0.333365797996521,
1.5900917053222656,
-0.33086270093917847,
-1.5104180574417114,
-1.6883138418197632,
0.9190722703933716,
0.5008193850517273,
-0.8335268497467041,
0.07140503823757172,
-0.37642043828964233,
0.1143830269575119,
-0.08090700954198837,
1.0742114782333374,
1.190743088722229,
0.6516026258468628,
-0.3140999376773834,
-0.8604156970977783,
0.24919193983078003,
-0.11720813065767288,
-0.6293339729309082,
-1.8658479452133179,
-0.36095696687698364,
0.11556773632764816,
0.7494198083877563,
-1.1572670936584473,
1.6770408153533936,
0.9897364377975464,
1.9084984064102173,
0.9576730728149414,
-0.2869798243045807,
1.519742727279663,
-0.01739429496228695,
1.7614094018936157,
-0.4995259940624237,
0.688530445098877,
-0.4023818075656891,
-1.12471342086792,
0.8329392671585083,
-0.35670146346092224,
-1.9334899187088013,
-0.8522335886955261,
-0.9015706181526184,
-0.2116200178861618,
-0.7937672734260559,
0.9566335678100586,
-0.3334324061870575,
-1.3668190240859985,
0.3046659827232361,
-0.6331982612609863,
0.10356428474187851,
-1.1214145421981812,
0.4388866424560547,
0.7442821264266968,
-0.6360408663749695,
-0.005997565574944019,
-0.15407085418701172,
-1.2027212381362915,
-0.48536747694015503,
0.2306627333164215,
1.9697061777114868,
-0.8239848613739014,
0.9664660096168518,
0.943087100982666,
-0.6930350065231323,
0.0618613138794899,
0.3562730848789215,
-0.2867458462715149,
0.8123921155929565,
-0.9716730117797852,
-0.3945840895175934,
1.2073601484298706,
-0.23741407692432404,
-0.6406098008155823,
1.5883814096450806,
0.7664231061935425,
-0.9326766729354858,
-0.17556990683078766,
-0.23826871812343597,
-0.7296004295349121,
-0.0800522193312645,
-1.5085906982421875,
-0.14126475155353546,
0.16907672584056854,
-1.4415545463562012,
-0.5001415014266968,
-0.22994877398014069,
1.3726414442062378,
-0.1719648241996765,
1.4603835344314575,
-0.3996809422969818,
-0.2632692754268646,
-0.37025099992752075,
-0.40833479166030884,
0.19678817689418793,
-0.24254725873470306,
-0.6604868769645691,
0.3246338367462158,
-0.8522951602935791,
0.3082530200481415,
1.3593056201934814,
0.48995697498321533,
0.05110526457428932,
0.5145442485809326,
1.1070005893707275,
0.4400467872619629,
0.10364697128534317,
-0.8930692076683044,
-1.4946184158325195,
2.033060073852539,
-1.5505458116531372,
1.9854373931884766,
0.8466322422027588,
-0.05666152760386467,
-1.7554203271865845,
-1.8506689071655273,
1.2734105587005615,
1.2492471933364868,
2.349848508834839,
0.6723343133926392,
0.3106321692466736,
-0.8953413963317871,
-0.6223523020744324,
0.4631936848163605,
-1.0862468481063843,
-0.7006648778915405,
0.019137222319841385,
2.337829113006592,
1.7725615501403809,
-0.4944929778575897,
-0.20764954388141632,
-0.9919672012329102,
1.3639482259750366,
-0.08572299778461456,
0.21565790474414825,
2.0249414443969727,
-0.2719309329986572,
-1.1642485857009888,
1.2584353685379028,
-2.3815665245056152,
0.08906038105487823,
1.9873789548873901,
0.3389049172401428,
-0.0020346613600850105,
-1.5219824314117432,
-0.6356548070907593,
-0.22766254842281342,
-0.4799441695213318,
-1.2453020811080933,
0.6539087295532227,
-0.3581671416759491,
-0.8426596522331238,
-1.501033067703247,
0.15864616632461548,
-1.228218674659729,
-1.669965386390686,
0.39474979043006897,
1.8293499946594238,
2.1853315830230713,
-0.7287355661392212,
1.5521031618118286,
-0.18997885286808014,
0.1673818677663803,
1.354040503501892,
1.2886579036712646,
3.1526265144348145,
1.9073903560638428,
-1.2408339977264404,
0.515904426574707,
-0.21235352754592896,
-0.5571838021278381,
1.150925874710083,
-1.1767092943191528,
1.2471728324890137,
-0.20419049263000488,
-1.2224969863891602,
-1.2827638387680054,
0.9641628861427307,
0.4361213743686676,
0.0460696816444397,
-0.4828062951564789,
1.2876617908477783,
0.050222594290971756,
1.306916356086731,
0.5432482957839966,
-0.303274542093277,
0.47602012753486633,
-0.5151216983795166,
-0.5318503975868225,
1.5941179990768433,
0.22242936491966248,
-1.3670504093170166,
-2.2522475719451904,
-0.2020542025566101,
-0.810400128364563,
-0.10686177015304565,
-0.5256490111351013,
-1.0182188749313354,
1.6137266159057617,
0.38707515597343445,
-1.3489105701446533,
-0.27721908688545227,
-0.3898453414440155,
-0.6777485013008118,
2.5505871772766113,
-1.4765774011611938,
-0.2662091851234436,
-0.9732995629310608,
-0.5266441106796265,
1.6578344106674194,
-1.2581048011779785,
-0.17195121943950653,
-1.0144550800323486,
-0.7156571745872498,
-1.3749557733535767,
-0.4924600124359131,
-0.0765109658241272,
-0.9203505516052246,
0.7965788841247559,
0.16225379705429077,
-1.048082947731018,
-0.3268180787563324,
-0.8346959352493286,
0.8049507737159729,
-0.023643458262085915,
0.3664786219596863,
1.896708607673645,
0.4370782971382141,
-0.4065822958946228,
0.6554452180862427,
1.1081513166427612,
0.642839252948761,
-0.6909066438674927,
0.14862778782844543,
-0.7534250020980835,
0.3654474914073944,
-1.2757673263549805,
0.33480289578437805,
-2.992464780807495,
0.6876875758171082,
-0.008268994279205799,
-0.2120256870985031,
-0.07080944627523422,
-1.2610852718353271,
1.1977565288543701,
2.5197837352752686,
-1.1236827373504639,
0.3978440761566162,
0.24122509360313416,
1.2774577140808105,
-1.6856285333633423,
0.3561685085296631,
-0.4156368374824524,
2.1421351432800293,
0.20779739320278168,
1.3027962446212769,
-0.43265441060066223,
-2.326875925064087,
0.6438959836959839,
-1.2489049434661865,
-1.1168400049209595,
0.7340270280838013,
-0.8245016932487488,
-0.01465543732047081,
-1.4437001943588257,
-0.19368694722652435,
-0.9002628922462463,
-1.3192882537841797,
0.8394928574562073,
0.1846718192100525,
0.49061962962150574,
-0.5304030776023865,
0.3381583094596863,
-2.1569607257843018,
-1.3993207216262817,
-0.19522243738174438,
-0.8596859574317932,
0.484315425157547,
-0.40906915068626404,
0.7541565299034119,
-0.1926829218864441,
0.07878109067678452,
0.4203190803527832,
1.3773711919784546,
3.4143526554107666,
0.3101785480976105,
0.5382078886032104,
-0.13725882768630981,
-0.9035515785217285,
1.4631145000457764,
0.9881536960601807,
-0.1678890436887741,
-0.5864763259887695,
-0.9987865090370178,
1.2222325801849365,
1.9457647800445557,
0.933753252029419,
0.07176552712917328,
-0.7701483964920044,
-0.6646522879600525,
-0.08555266261100769,
0.12901917099952698,
0.5740110874176025,
0.871431291103363,
-0.03547729179263115,
0.1742294728755951,
1.4709984064102173,
1.2410247325897217,
-0.3804745376110077,
0.2829892337322235,
-0.7544647455215454,
-0.4306235909461975,
0.4921046197414398,
0.34216395020484924,
-0.11079560220241547,
0.4649110436439514,
-1.0594894886016846,
-0.30378738045692444,
-0.3012203872203827,
-0.9831933975219727,
-0.6805999875068665,
-0.48106539249420166,
-0.358509361743927,
1.5976933240890503,
0.13734424114227295,
-0.45682743191719055,
-0.05465833842754364,
-0.9044619798660278,
-0.19206804037094116,
-1.150901198387146,
0.1688113957643509,
-0.14140044152736664,
-0.09677379578351974,
-0.10369858890771866,
1.810212254524231,
-0.8578335046768188,
-2.137828826904297,
0.32906681299209595,
0.32366859912872314,
-0.3686080276966095,
0.1931302845478058,
1.5731083154678345,
0.43933895230293274,
1.3576973676681519,
1.3143882751464844,
1.0306755304336548,
-0.6489194631576538,
-1.3443191051483154,
0.6906415224075317,
0.9153291583061218,
-1.4904645681381226,
0.8752307891845703,
-0.012472383677959442,
-0.4647648334503174,
0.6821179986000061,
1.2175780534744263,
0.4499422311782837,
-1.9390332698822021,
0.7927286624908447,
-0.9091367721557617,
0.8149100542068481,
0.7129124999046326,
0.7360147833824158,
0.22484058141708374,
0.8093000054359436,
-1.3022140264511108,
-1.1577335596084595,
-0.7121455073356628,
-0.7109400629997253,
1.9459384679794312,
-0.18183235824108124,
0.5845428705215454,
-0.19264234602451324,
-1.252443552017212,
-0.16260339319705963,
0.6342176795005798,
0.2427549660205841,
-0.31008750200271606,
0.8964346051216125,
-0.7448283433914185,
-1.1154603958129883,
-1.4736790657043457,
-0.3825255036354065,
-0.9532575607299805,
-0.9379851222038269,
1.0845048427581787,
0.894605278968811,
0.23035025596618652,
1.9200403690338135,
0.5573034286499023,
0.2359716147184372,
-2.6592648029327393,
0.8251839280128479,
0.3529578149318695,
-0.037089549005031586,
0.8884444832801819,
0.22574058175086975,
1.0639585256576538,
0.12092337757349014,
0.5152841806411743,
-2.4532289505004883,
2.249584436416626,
-0.27315443754196167,
0.6895558834075928,
-0.04767639935016632,
-0.1400175839662552,
1.1891331672668457,
0.5636988282203674,
0.6138679385185242,
-1.1251283884048462,
0.7787003517150879,
-0.5935910940170288,
1.1709703207015991,
1.0046792030334473,
-0.760432243347168,
0.056235410273075104,
1.3882384300231934,
0.5281058549880981,
-0.5416317582130432,
-0.8261083960533142,
-0.8865007162094116,
0.8087118268013,
1.8557047843933105,
0.013994495384395123,
0.06266720592975616,
0.7854347229003906,
0.5865422487258911,
-1.248990774154663,
0.09612563997507095,
-0.7918639779090881,
-0.7761110663414001,
1.6403502225875854,
2.042990207672119,
-0.13545484840869904,
-0.15026694536209106,
-0.7396265864372253,
-1.1593940258026123,
0.7616880536079407,
0.06507493555545807,
0.11501732468605042,
0.586945116519928,
-0.753484845161438,
1.0741052627563477,
0.924497663974762,
0.9702365398406982,
0.1571463644504547,
0.2931142747402191,
0.3612712621688843,
-0.32254379987716675,
-1.0322262048721313,
-0.30010825395584106,
-1.1635105609893799,
-2.6096463203430176,
0.4554389715194702,
-0.28349870443344116,
-1.3786017894744873,
-0.015222650021314621,
-1.0193610191345215,
0.8980616927146912,
-0.5769076943397522,
-1.0940890312194824,
-1.5276685953140259,
0.13871346414089203,
-0.1585814654827118,
0.8847101330757141,
-1.6356828212738037,
-0.06927640736103058,
1.2735415697097778,
0.9021463990211487,
-0.6591625809669495,
1.1029447317123413,
0.31215187907218933,
1.0191718339920044,
0.8464069962501526,
-0.44827035069465637,
0.5064149498939514,
0.1901596188545227,
-1.3790754079818726,
0.44463667273521423,
1.1930980682373047,
0.09460335224866867,
1.5214612483978271,
-0.5723204612731934,
0.12283391505479813,
0.4120630621910095,
-0.555176317691803,
-0.474124550819397,
-0.5174800157546997,
0.8316354751586914,
0.09813525527715683,
-0.8618864417076111,
0.13908934593200684,
-0.1252593994140625,
-0.2945384085178375,
0.12462063878774643,
-1.5005719661712646,
-0.2834254503250122,
-0.3871537148952484,
-0.48262250423431396,
-1.3313262462615967,
0.05290257930755615,
1.3826504945755005,
-0.7337629795074463,
-0.1858004778623581,
0.45005154609680176,
0.44546133279800415,
0.5527423024177551,
0.6470087170600891,
-0.641085684299469,
-0.41300636529922485,
-0.22238054871559143,
-0.213169664144516,
0.3168695569038391,
1.2760891914367676,
-0.18521735072135925,
-0.9471246004104614,
0.7010552883148193,
-0.23454438149929047,
0.0033001676201820374,
1.9490572214126587,
0.061776503920555115,
-0.7208417057991028,
0.31959524750709534,
-0.6821903586387634,
1.9160538911819458,
1.588262915611267,
1.3198566436767578,
-0.05042784661054611,
-0.9592161774635315,
0.6225412487983704,
-0.26427316665649414,
-0.35336124897003174,
0.8406819701194763,
0.4589273929595947,
-0.22209133207798004,
-1.4281905889511108,
0.5253182053565979,
1.1790385246276855,
-0.9945794343948364,
-0.7002873420715332,
0.05542872101068497,
-0.7594795227050781,
1.0920597314834595,
0.5913129448890686,
0.5291255116462708,
0.25007688999176025,
1.6674809455871582,
0.6650298833847046,
-0.5621320009231567,
0.4804338216781616,
0.39510443806648254,
-0.026963558048009872,
-2.043400764465332,
-1.0922691822052002,
0.3927024304866791,
-0.4412286877632141,
-1.508274793624878,
1.2817378044128418,
-1.1638679504394531,
-0.8911529779434204,
0.5877139568328857,
0.07659370452165604,
1.4511559009552002,
0.2850502133369446,
1.6517159938812256,
2.1304728984832764,
0.828380823135376,
0.30222731828689575,
1.35966157913208,
-0.1311381608247757,
-0.4462462365627289,
1.8797762393951416,
-0.44738489389419556,
0.48701876401901245,
1.1318395137786865,
-0.2889288365840912,
-1.0050536394119263,
-0.7057048678398132,
-1.1336411237716675,
-0.49198421835899353,
1.097265601158142,
0.165562704205513,
-1.068327784538269,
0.15226159989833832,
1.4992707967758179,
0.028230901807546616,
-0.24812093377113342,
0.51612389087677,
0.5098710656166077,
-0.7376620173454285,
-0.041418369859457016,
-0.8704463243484497,
0.5311818718910217,
-0.24491874873638153,
-0.38416579365730286,
0.3652798533439636,
0.4130805730819702,
1.229689359664917,
-0.08215100318193436,
0.09722995012998581,
1.2946388721466064,
-1.390177607536316,
1.541392207145691,
-0.5926475524902344,
0.16650213301181793,
-2.3749635219573975,
1.4043605327606201,
-0.8197438716888428,
2.006796360015869,
-2.5745584964752197,
0.32629626989364624,
-0.6372312307357788,
-0.4931565225124359,
0.4159257113933563,
-0.35908105969429016,
0.14915025234222412,
-0.26143404841423035,
-1.0026811361312866,
0.029980722814798355,
-0.7361183762550354,
0.4476895332336426,
1.181702971458435,
1.3067479133605957,
-1.176232933998108,
-0.3155335485935211,
-1.7223212718963623,
-0.21385441720485687,
-0.7545768618583679,
0.301727831363678,
-2.0430376529693604,
-0.21488021314144135,
-2.0002686977386475,
-2.2488553524017334,
-1.4473319053649902,
-0.9041357040405273,
1.0463993549346924,
0.19404050707817078,
-0.9289871454238892,
1.1012860536575317,
-0.29967001080513,
-1.7880010604858398,
0.9731913208961487,
-2.009500026702881
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | Yes it's correct, and it explains why you always have the same data passed to your map function (the data can't be split).
But after being passed to `map`, each GPU keeps one example out of n(GPUs) so that you don't end up with duplicate data across GPUs | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 95 | 48 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
Yes it's correct, and it explains why you always have the same data passed to your map function (the data can't be split).
But after being passed to `map`, each GPU keeps one example out of n(GPUs) so that you don't end up with duplicate data across GPUs | [
-1.301995873451233,
-1.0149139165878296,
-0.9143907427787781,
1.528552532196045,
-0.3020041286945343,
-1.169840693473816,
0.012213091365993023,
-1.1171860694885254,
1.675626277923584,
-0.9014577269554138,
0.32801762223243713,
-1.6770966053009033,
0.036001402884721756,
-0.5480501055717468,
-0.8469662070274353,
-0.9289455413818359,
-0.438019722700119,
-0.8764238357543945,
0.925881028175354,
2.4596641063690186,
1.133872151374817,
-1.3487184047698975,
2.663196563720703,
0.6724503040313721,
-0.19296251237392426,
-1.0058860778808594,
0.6028777360916138,
0.00640565250068903,
-1.1588590145111084,
-0.5373137593269348,
-0.9304377436637878,
0.00808365922421217,
-0.563245952129364,
-0.4807114601135254,
0.0886315405368805,
0.3790093958377838,
-0.2149922251701355,
-0.31085556745529175,
-0.39709943532943726,
-0.8153253793716431,
0.511295735836029,
-0.3772052228450775,
0.9674456715583801,
-0.32045015692710876,
1.899916648864746,
-0.5087772607803345,
0.32875993847846985,
0.7070329785346985,
1.3600026369094849,
0.2580469250679016,
-0.03420429304242134,
0.1679658144712448,
0.4313751459121704,
-0.06306823343038559,
0.44564691185951233,
1.1811726093292236,
0.583554208278656,
0.462248831987381,
0.693014919757843,
-2.236105442047119,
1.3591784238815308,
-1.0964241027832031,
0.31961601972579956,
1.3917213678359985,
-0.9690511226654053,
0.3689020276069641,
-1.751456379890442,
-0.010324443690478802,
0.5387796759605408,
-2.274308681488037,
0.22149279713630676,
-1.1955782175064087,
-0.48900553584098816,
0.9671578407287598,
0.21799986064434052,
-1.2529323101043701,
0.2771446406841278,
-0.39742448925971985,
1.1025503873825073,
0.47646763920783997,
1.1358115673065186,
-1.6446588039398193,
-0.04679546132683754,
-0.2640030086040497,
0.0928771123290062,
-1.3931416273117065,
-1.4565279483795166,
0.5137551426887512,
0.649485170841217,
0.5048764944076538,
-0.0533268004655838,
0.9994438290596008,
-0.9553235173225403,
0.8346331715583801,
-0.8687798380851746,
-1.508992075920105,
-1.37687087059021,
-2.2245078086853027,
-2.2296998500823975,
0.7637849450111389,
-0.508424699306488,
-0.595652163028717,
1.96067214012146,
-1.1079238653182983,
-1.737791657447815,
1.1896681785583496,
0.34081050753593445,
0.09979426115751266,
2.4409232139587402,
0.23895271122455597,
-0.7030372619628906,
0.40171200037002563,
-0.7048412561416626,
0.8626809120178223,
-0.47993865609169006,
1.4499049186706543,
0.4977109730243683,
-0.9988529682159424,
1.5418106317520142,
-0.5338015556335449,
0.44098442792892456,
-0.6114799380302429,
-0.6240976452827454,
-0.8839622735977173,
0.40675088763237,
1.8458143472671509,
-0.3365062177181244,
1.6034386157989502,
-0.34858810901641846,
-1.5450611114501953,
-1.6604701280593872,
0.949147641658783,
0.4715375304222107,
-0.82374507188797,
0.06922890990972519,
-0.36200836300849915,
0.15918946266174316,
-0.0974607840180397,
1.0545480251312256,
1.1866976022720337,
0.6691024303436279,
-0.29271161556243896,
-0.8618392944335938,
0.2445935159921646,
-0.10362087190151215,
-0.6072522401809692,
-1.8495612144470215,
-0.39604130387306213,
0.11646378040313721,
0.6932451128959656,
-1.176104187965393,
1.6456977128982544,
0.958389163017273,
1.914620041847229,
0.9920032620429993,
-0.2972264587879181,
1.540117859840393,
0.04691585898399353,
1.795149326324463,
-0.5052484273910522,
0.6959368586540222,
-0.39056652784347534,
-1.1707305908203125,
0.8198984265327454,
-0.3771694600582123,
-1.9706838130950928,
-0.7921290993690491,
-0.8618786931037903,
-0.1941509246826172,
-0.8070977926254272,
0.9295341968536377,
-0.337336927652359,
-1.40367591381073,
0.2863025963306427,
-0.6765480637550354,
0.14475299417972565,
-1.1582441329956055,
0.44019556045532227,
0.8016415238380432,
-0.6229668855667114,
0.03463860973715782,
-0.1516769677400589,
-1.2372429370880127,
-0.44334086775779724,
0.2153494656085968,
1.9790467023849487,
-0.8212588429450989,
0.9497098326683044,
0.9601958394050598,
-0.6869127154350281,
-0.006455034948885441,
0.3380202054977417,
-0.32389479875564575,
0.7943446040153503,
-0.9878446459770203,
-0.4127708375453949,
1.2458776235580444,
-0.20564715564250946,
-0.6167474985122681,
1.4915436506271362,
0.7703700661659241,
-0.9390795826911926,
-0.2003910392522812,
-0.22868987917900085,
-0.7569478750228882,
-0.06323807686567307,
-1.5684025287628174,
-0.13214518129825592,
0.21676680445671082,
-1.4339162111282349,
-0.5244269967079163,
-0.2149670124053955,
1.2931787967681885,
-0.19980089366436005,
1.5042431354522705,
-0.439682275056839,
-0.22264374792575836,
-0.36369895935058594,
-0.46459245681762695,
0.2211494892835617,
-0.24455706775188446,
-0.7120229601860046,
0.2745625376701355,
-0.8367024064064026,
0.35585546493530273,
1.3674484491348267,
0.5041744112968445,
0.026819493621587753,
0.5402606129646301,
1.1302322149276733,
0.4351007044315338,
0.0829082727432251,
-0.878262996673584,
-1.5165457725524902,
2.063427686691284,
-1.4810059070587158,
2.004648447036743,
0.8186510801315308,
-0.05562891066074371,
-1.7348653078079224,
-1.806350827217102,
1.2585599422454834,
1.246649980545044,
2.331181526184082,
0.6861059069633484,
0.3488784432411194,
-0.8707218170166016,
-0.6301670670509338,
0.44175100326538086,
-1.0981485843658447,
-0.7227811813354492,
0.0437476821243763,
2.346127986907959,
1.7855561971664429,
-0.49350106716156006,
-0.23373062908649445,
-0.9745290279388428,
1.343571424484253,
-0.18652570247650146,
0.22498008608818054,
1.991323471069336,
-0.2125972956418991,
-1.1303781270980835,
1.2565977573394775,
-2.3979640007019043,
0.1196315810084343,
1.9665178060531616,
0.3620658814907074,
0.0031058285385370255,
-1.5266814231872559,
-0.6415766477584839,
-0.19791777431964874,
-0.42168793082237244,
-1.232832670211792,
0.6223836541175842,
-0.36892274022102356,
-0.8543150424957275,
-1.472212553024292,
0.16477681696414948,
-1.1899380683898926,
-1.6300426721572876,
0.3545773923397064,
1.8441526889801025,
2.1560769081115723,
-0.7316413521766663,
1.559487223625183,
-0.21388208866119385,
0.21784299612045288,
1.3301348686218262,
1.2549214363098145,
3.169480085372925,
1.8669260740280151,
-1.2355623245239258,
0.4808785319328308,
-0.22089643776416779,
-0.5815502405166626,
1.1890294551849365,
-1.195200800895691,
1.2528669834136963,
-0.20920708775520325,
-1.2345376014709473,
-1.2408205270767212,
0.9714022874832153,
0.4689984917640686,
0.07777703553438187,
-0.473174512386322,
1.25180184841156,
-0.009046672843396664,
1.331119179725647,
0.5550039410591125,
-0.331358402967453,
0.4776274263858795,
-0.4549143314361572,
-0.5287353992462158,
1.5889225006103516,
0.18059009313583374,
-1.3378468751907349,
-2.262932538986206,
-0.1863079071044922,
-0.7740116119384766,
-0.12487233430147171,
-0.5293623208999634,
-1.0025771856307983,
1.6023238897323608,
0.37701281905174255,
-1.3295249938964844,
-0.3379778265953064,
-0.35264408588409424,
-0.6882055401802063,
2.5800247192382812,
-1.5059947967529297,
-0.273204505443573,
-0.9576159715652466,
-0.5516321063041687,
1.6445010900497437,
-1.2235699892044067,
-0.15453335642814636,
-1.0058714151382446,
-0.6929431557655334,
-1.3825739622116089,
-0.5462717413902283,
-0.09948829561471939,
-0.9086366891860962,
0.8182308673858643,
0.20880019664764404,
-1.0534510612487793,
-0.3027556240558624,
-0.8580194115638733,
0.7917054891586304,
-0.10049640387296677,
0.34091952443122864,
1.902256727218628,
0.4448533356189728,
-0.4179285168647766,
0.6831120252609253,
1.0942955017089844,
0.6656150221824646,
-0.6720901727676392,
0.12589490413665771,
-0.7749682664871216,
0.32097265124320984,
-1.3134878873825073,
0.2847999036312103,
-2.923967123031616,
0.6704550981521606,
0.021190863102674484,
-0.20476916432380676,
-0.04628915339708328,
-1.2445483207702637,
1.1373591423034668,
2.5454814434051514,
-1.1454888582229614,
0.42076602578163147,
0.2517423927783966,
1.3017990589141846,
-1.6995526552200317,
0.32582786679267883,
-0.38003411889076233,
2.1386775970458984,
0.23052571713924408,
1.3082256317138672,
-0.4543788433074951,
-2.3265137672424316,
0.6643776893615723,
-1.280381679534912,
-1.1716909408569336,
0.7177783846855164,
-0.8716880679130554,
-0.03491934388875961,
-1.4556206464767456,
-0.19093219935894012,
-0.9358586072921753,
-1.298687219619751,
0.8396138548851013,
0.15936893224716187,
0.46017852425575256,
-0.5109553933143616,
0.3482237160205841,
-2.1507632732391357,
-1.395326018333435,
-0.20135416090488434,
-0.8771389126777649,
0.5200470089912415,
-0.38661032915115356,
0.7563343644142151,
-0.20211365818977356,
0.015648409724235535,
0.3944751024246216,
1.3659954071044922,
3.403573513031006,
0.35456618666648865,
0.48975473642349243,
-0.15587352216243744,
-0.9101921319961548,
1.431547999382019,
0.9631355404853821,
-0.19946250319480896,
-0.5812326669692993,
-0.954109251499176,
1.2457414865493774,
1.9482489824295044,
0.9556728005409241,
0.05786047503352165,
-0.778296947479248,
-0.6944694519042969,
-0.08849579840898514,
0.0802588239312172,
0.5202564597129822,
0.8622095584869385,
-0.020283404737710953,
0.1948746144771576,
1.432217001914978,
1.2527823448181152,
-0.3841773271560669,
0.2888060212135315,
-0.7007842063903809,
-0.4268253743648529,
0.5134565830230713,
0.35447362065315247,
-0.10827992111444473,
0.4353685677051544,
-1.0448027849197388,
-0.2777772545814514,
-0.35712751746177673,
-0.9767712950706482,
-0.6910256743431091,
-0.4675304889678955,
-0.3041365444660187,
1.598695993423462,
0.17819784581661224,
-0.47359025478363037,
-0.07703708857297897,
-0.9052013754844666,
-0.16389623284339905,
-1.1274423599243164,
0.21659721434116364,
-0.15157827734947205,
-0.13467198610305786,
-0.11681301891803741,
1.7858690023422241,
-0.8412089347839355,
-2.093015432357788,
0.28578442335128784,
0.308181494474411,
-0.37723177671432495,
0.1506238430738449,
1.6117128133773804,
0.41496023535728455,
1.3593472242355347,
1.3643585443496704,
1.0016851425170898,
-0.6511085629463196,
-1.3008700609207153,
0.7289620637893677,
0.8988164663314819,
-1.521713376045227,
0.8483803868293762,
0.010433078743517399,
-0.4828546643257141,
0.6737276315689087,
1.219779372215271,
0.4494211673736572,
-1.924802541732788,
0.7959277629852295,
-0.9294874668121338,
0.7797794938087463,
0.6814954876899719,
0.7136253118515015,
0.2573266923427582,
0.832467794418335,
-1.306854486465454,
-1.162993311882019,
-0.740705132484436,
-0.6590936183929443,
1.9542815685272217,
-0.19683369994163513,
0.5824220776557922,
-0.16389381885528564,
-1.2738004922866821,
-0.17300646007061005,
0.6799483299255371,
0.26078999042510986,
-0.322674036026001,
0.876950204372406,
-0.7297114729881287,
-1.1417289972305298,
-1.4723154306411743,
-0.37216344475746155,
-0.9635587930679321,
-0.9158062934875488,
1.0478156805038452,
0.9112558960914612,
0.2106831669807434,
1.9024056196212769,
0.583378791809082,
0.2175586074590683,
-2.6739583015441895,
0.8272563219070435,
0.31880849599838257,
-0.0988774448633194,
0.8824224472045898,
0.23024635016918182,
1.0146424770355225,
0.06891366839408875,
0.5037397146224976,
-2.4854214191436768,
2.2205333709716797,
-0.2504570484161377,
0.7269452214241028,
-0.052759211510419846,
-0.161199152469635,
1.1883193254470825,
0.548626184463501,
0.6157484650611877,
-1.1523445844650269,
0.7623195648193359,
-0.600263237953186,
1.199070692062378,
1.0359220504760742,
-0.8014627695083618,
0.06541790813207626,
1.4219051599502563,
0.4784013330936432,
-0.5485279560089111,
-0.8662372827529907,
-0.8692762851715088,
0.8506421446800232,
1.8333262205123901,
0.0007841121405363083,
0.013397428207099438,
0.8212791681289673,
0.590570330619812,
-1.2994871139526367,
0.15831522643566132,
-0.7732263207435608,
-0.7938668131828308,
1.656396746635437,
2.0252974033355713,
-0.12806449830532074,
-0.16633395850658417,
-0.7097992300987244,
-1.2051746845245361,
0.7352819442749023,
0.09695696085691452,
0.15245816111564636,
0.6189529299736023,
-0.7465338706970215,
1.1118446588516235,
0.9306893944740295,
0.9425014853477478,
0.13847458362579346,
0.2678898870944977,
0.3897808790206909,
-0.36476171016693115,
-1.024458408355713,
-0.2803860604763031,
-1.1419280767440796,
-2.5854010581970215,
0.4677076041698456,
-0.26099443435668945,
-1.3895763158798218,
0.01812177151441574,
-0.9717909097671509,
0.9007852077484131,
-0.5973808765411377,
-1.0991089344024658,
-1.564261555671692,
0.18842534720897675,
-0.1045255959033966,
0.8953665494918823,
-1.6360397338867188,
-0.07330074906349182,
1.2266120910644531,
0.9240723848342896,
-0.6335884928703308,
1.0833234786987305,
0.2793610692024231,
1.0415858030319214,
0.8923568725585938,
-0.4481508135795593,
0.5106022357940674,
0.18847210705280304,
-1.3999369144439697,
0.45682772994041443,
1.203261375427246,
0.10825733840465546,
1.4908124208450317,
-0.5685621500015259,
0.09383191168308258,
0.38315561413764954,
-0.5988461971282959,
-0.45968934893608093,
-0.5361981987953186,
0.8112345337867737,
0.09005273133516312,
-0.8228335380554199,
0.0622674934566021,
-0.11303527653217316,
-0.270301878452301,
0.1377437710762024,
-1.5412440299987793,
-0.26548656821250916,
-0.36447441577911377,
-0.5150589346885681,
-1.251263976097107,
0.034845687448978424,
1.3993163108825684,
-0.7665595412254333,
-0.20138145983219147,
0.5036516785621643,
0.41465240716934204,
0.550555944442749,
0.5791885852813721,
-0.6417785286903381,
-0.41638821363449097,
-0.22098419070243835,
-0.22954028844833374,
0.30945250391960144,
1.3399419784545898,
-0.18001390993595123,
-0.9185149669647217,
0.686211884021759,
-0.28984978795051575,
-0.03541016951203346,
1.9301347732543945,
0.09910690039396286,
-0.7345895767211914,
0.31244292855262756,
-0.6992329359054565,
1.907067060470581,
1.6167454719543457,
1.3489134311676025,
-0.05959654599428177,
-0.950056254863739,
0.5891830325126648,
-0.28366225957870483,
-0.361519455909729,
0.8209942579269409,
0.4637277126312256,
-0.19820037484169006,
-1.4669724702835083,
0.5492991209030151,
1.1587553024291992,
-0.9876675605773926,
-0.710740327835083,
0.08083309978246689,
-0.765826404094696,
1.1005390882492065,
0.6008181571960449,
0.5108213424682617,
0.23411226272583008,
1.6890580654144287,
0.7130588293075562,
-0.5440222024917603,
0.5039120316505432,
0.45307406783103943,
-0.07008551061153412,
-2.0941050052642822,
-1.1010465621948242,
0.4152742326259613,
-0.3600766360759735,
-1.5268404483795166,
1.3170709609985352,
-1.131347894668579,
-0.8925281167030334,
0.6002111434936523,
0.11459348350763321,
1.430885910987854,
0.2838897705078125,
1.6265335083007812,
2.1667428016662598,
0.8250513672828674,
0.2761978805065155,
1.3547132015228271,
-0.13818857073783875,
-0.41590699553489685,
1.8642669916152954,
-0.44422268867492676,
0.4981025159358978,
1.0834306478500366,
-0.31301528215408325,
-1.0208619832992554,
-0.6850482225418091,
-1.1812283992767334,
-0.5241091251373291,
1.1214189529418945,
0.14229749143123627,
-1.052868127822876,
0.1416231244802475,
1.5534189939498901,
-0.02429066225886345,
-0.2974993884563446,
0.5674638748168945,
0.5168824791908264,
-0.727441668510437,
0.0003533223643898964,
-0.8668195605278015,
0.49503156542778015,
-0.15558171272277832,
-0.3355744779109955,
0.34480926394462585,
0.42231494188308716,
1.2264968156814575,
-0.05980709567666054,
0.05874698981642723,
1.2698822021484375,
-1.3834259510040283,
1.518361210823059,
-0.6297269463539124,
0.16454870998859406,
-2.40920090675354,
1.3857649564743042,
-0.8255182504653931,
1.9818302392959595,
-2.53178334236145,
0.3654929995536804,
-0.6468368768692017,
-0.47653713822364807,
0.41119444370269775,
-0.3770134150981903,
0.11945449560880661,
-0.23247794806957245,
-1.025613784790039,
0.021835628896951675,
-0.739579439163208,
0.4893254041671753,
1.16367506980896,
1.348476529121399,
-1.2018706798553467,
-0.3109496533870697,
-1.7441880702972412,
-0.14635246992111206,
-0.7443185448646545,
0.33830973505973816,
-2.0065460205078125,
-0.21629293262958527,
-1.9875640869140625,
-2.2233054637908936,
-1.454540729522705,
-0.8217759728431702,
1.0017764568328857,
0.1297154426574707,
-0.9118434190750122,
1.1441296339035034,
-0.3448619842529297,
-1.8320608139038086,
0.9609494209289551,
-2.0201101303100586
] |
https://github.com/huggingface/datasets/issues/5961 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway | > > For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
> > Is my understanding correct?
>
> Yes exactly :)
>
> > Where can I print the actual training data for each GPU?
>
> You should call print in the data_collator
OK, when printing the train data in the data collator, each GPU sees different data.
Thanks for your reply | There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
| 95 | 77 | IterableDataset: split by node and map may preprocess samples that will be skipped anyway
There are two ways an iterable dataset can be split by node:
1. if the number of shards is a factor of number of GPUs: in that case the shards are evenly distributed per GPU
2. otherwise, each GPU iterate on the data and at the end keeps 1 sample out of n(GPUs) - skipping the others.
In case 2. it's therefore possible to have the same examples passed to `prepare_dataset` for each GPU.
This doesn't sound optimized though, because it runs the preprocessing on samples that won't be used in the end.
Could you open a new issue so that we can discuss about this and find a solution ?
_Originally posted by @lhoestq in https://github.com/huggingface/datasets/issues/5360#issuecomment-1592729051_
> > For each GPU, although see the same data in prepare_data(), the actual training data will not be the same in the end.
> > Is my understanding correct?
>
> Yes exactly :)
>
> > Where can I print the actual training data for each GPU?
>
> You should call print in the data_collator
OK, when printing the train data in the data collator, each GPU sees different data.
Thanks for your reply | [
-1.2737915515899658,
-0.9806118607521057,
-0.8476207256317139,
1.4983807802200317,
-0.25904354453086853,
-1.1911344528198242,
0.04219388589262962,
-1.1984113454818726,
1.6631784439086914,
-0.905015230178833,
0.24431303143501282,
-1.6776543855667114,
0.03420163691043854,
-0.4930900037288666,
-0.858250617980957,
-0.9771718382835388,
-0.42050445079803467,
-0.8615962862968445,
0.8945125341415405,
2.4388322830200195,
1.2269296646118164,
-1.336064338684082,
2.613438844680786,
0.6756110787391663,
-0.22239966690540314,
-1.0354793071746826,
0.6448065042495728,
0.012930537573993206,
-1.134198546409607,
-0.5116003751754761,
-0.9675688743591309,
0.030666347593069077,
-0.6248787641525269,
-0.44348111748695374,
0.05825922265648842,
0.33893969655036926,
-0.2329571545124054,
-0.2204405814409256,
-0.4499228596687317,
-0.830003559589386,
0.43664368987083435,
-0.39079082012176514,
0.9688306450843811,
-0.3566416800022125,
1.801863670349121,
-0.5260657072067261,
0.3820856511592865,
0.7187551259994507,
1.329382061958313,
0.2638098895549774,
-0.09147867560386658,
0.13196414709091187,
0.4080609679222107,
-0.07114493101835251,
0.3749142289161682,
1.1166143417358398,
0.562829315662384,
0.4686560332775116,
0.6342107653617859,
-2.249258041381836,
1.320522665977478,
-1.0088753700256348,
0.2760979235172272,
1.4159138202667236,
-0.9247583150863647,
0.41260266304016113,
-1.799052119255066,
-0.04118848964571953,
0.5638272762298584,
-2.3173153400421143,
0.16721723973751068,
-1.2347197532653809,
-0.5352815985679626,
0.9617405533790588,
0.2217840850353241,
-1.2769588232040405,
0.17022553086280823,
-0.42922401428222656,
1.0880252122879028,
0.5335005521774292,
1.1536816358566284,
-1.6803898811340332,
-0.05433625727891922,
-0.2818492650985718,
0.09758900105953217,
-1.3789582252502441,
-1.5405093431472778,
0.5891014337539673,
0.7116116285324097,
0.46711471676826477,
-0.052181050181388855,
0.9776530265808105,
-0.9414905905723572,
0.8482774496078491,
-0.8739914894104004,
-1.5238978862762451,
-1.353709101676941,
-2.2537684440612793,
-2.235136032104492,
0.7006122469902039,
-0.6214626431465149,
-0.5905746221542358,
2.072612762451172,
-1.1042382717132568,
-1.768122911453247,
1.2041655778884888,
0.2804218828678131,
0.11571932584047318,
2.4957613945007324,
0.21120579540729523,
-0.656374454498291,
0.41171640157699585,
-0.6885583996772766,
0.7923105359077454,
-0.41494861245155334,
1.4237926006317139,
0.5101092457771301,
-1.0257346630096436,
1.6285536289215088,
-0.5178067088127136,
0.40579211711883545,
-0.5969759821891785,
-0.6200965642929077,
-0.8334845900535583,
0.36659830808639526,
1.8322813510894775,
-0.3452819585800171,
1.64260733127594,
-0.2642408311367035,
-1.4918674230575562,
-1.686067819595337,
0.9707503914833069,
0.46807754039764404,
-0.8822199702262878,
0.11505469679832458,
-0.3697321116924286,
0.12323806434869766,
-0.07372456789016724,
1.033145546913147,
1.2277944087982178,
0.6734456419944763,
-0.335846871137619,
-0.8569449782371521,
0.230315700173378,
-0.08385374397039413,
-0.6422562599182129,
-1.8470549583435059,
-0.3450133204460144,
0.06902866065502167,
0.7244364619255066,
-1.1649616956710815,
1.6744091510772705,
0.9558836221694946,
1.9184989929199219,
0.9598855972290039,
-0.3504500091075897,
1.5000585317611694,
0.05331919342279434,
1.7812680006027222,
-0.47708660364151,
0.6844213604927063,
-0.39535361528396606,
-1.1572723388671875,
0.8438410758972168,
-0.35800766944885254,
-1.9183738231658936,
-0.7559088468551636,
-0.9029703736305237,
-0.20377711951732635,
-0.8256037831306458,
0.9650596976280212,
-0.21102677285671234,
-1.3473166227340698,
0.3609054386615753,
-0.6521689891815186,
0.13084499537944794,
-1.2198032140731812,
0.4505917429924011,
0.7758073210716248,
-0.6265494227409363,
-0.01953119784593582,
-0.23305189609527588,
-1.2765820026397705,
-0.4943528175354004,
0.1650930643081665,
1.9501734972000122,
-0.7961804270744324,
0.9286306500434875,
0.9382901191711426,
-0.6971123218536377,
0.0037991786375641823,
0.33372220396995544,
-0.3112803101539612,
0.8286404609680176,
-0.9766339659690857,
-0.4177597463130951,
1.1942061185836792,
-0.27540871500968933,
-0.5886708498001099,
1.4719276428222656,
0.713212788105011,
-0.9564228653907776,
-0.1933719366788864,
-0.23536884784698486,
-0.7245224118232727,
-0.05645013973116875,
-1.5940033197402954,
-0.08254881948232651,
0.20767301321029663,
-1.4895532131195068,
-0.5060127973556519,
-0.17355258762836456,
1.382872223854065,
-0.17946363985538483,
1.5031585693359375,
-0.38050979375839233,
-0.18419678509235382,
-0.40000417828559875,
-0.42901304364204407,
0.20896591246128082,
-0.2097914069890976,
-0.6536595821380615,
0.3160686790943146,
-0.8738101720809937,
0.2960272431373596,
1.358933448791504,
0.5147464275360107,
-0.01243823952972889,
0.500221312046051,
1.0878435373306274,
0.4002304673194885,
-0.010782656259834766,
-0.9171529412269592,
-1.4851950407028198,
2.0506913661956787,
-1.5139492750167847,
1.9895920753479004,
0.8218153119087219,
-0.09023549407720566,
-1.7718883752822876,
-1.872668743133545,
1.2558865547180176,
1.1930885314941406,
2.3249998092651367,
0.698402464389801,
0.36872443556785583,
-0.8199721574783325,
-0.6380972862243652,
0.4553021788597107,
-1.0470008850097656,
-0.7455632090568542,
0.027870342135429382,
2.2907967567443848,
1.750356674194336,
-0.52613765001297,
-0.1692282259464264,
-0.9219672679901123,
1.318748950958252,
-0.137766033411026,
0.21963296830654144,
1.9624568223953247,
-0.2964540719985962,
-1.178360104560852,
1.2751736640930176,
-2.3563318252563477,
0.11009476333856583,
1.9916563034057617,
0.3231089413166046,
0.011953105218708515,
-1.4642833471298218,
-0.6254586577415466,
-0.24224819242954254,
-0.5000043511390686,
-1.1862578392028809,
0.6279187202453613,
-0.3752557933330536,
-0.7815235257148743,
-1.485028862953186,
0.15780994296073914,
-1.1583456993103027,
-1.6628942489624023,
0.2972683012485504,
1.8586006164550781,
2.1976184844970703,
-0.7733303308486938,
1.5389597415924072,
-0.2608959972858429,
0.17146840691566467,
1.2688602209091187,
1.2462412118911743,
3.159397840499878,
1.9003987312316895,
-1.3050813674926758,
0.5187770128250122,
-0.1987386792898178,
-0.5314554572105408,
1.2521226406097412,
-1.139090895652771,
1.229917049407959,
-0.27000072598457336,
-1.3381234407424927,
-1.2763020992279053,
1.0186883211135864,
0.4067162573337555,
0.05835450813174248,
-0.5521027445793152,
1.2563998699188232,
0.01778702810406685,
1.3798350095748901,
0.5174020528793335,
-0.33441808819770813,
0.48323553800582886,
-0.48155996203422546,
-0.5354398488998413,
1.6199814081192017,
0.1769174039363861,
-1.3663872480392456,
-2.3391380310058594,
-0.2288922220468521,
-0.8124825954437256,
-0.05665360018610954,
-0.588689923286438,
-1.0465970039367676,
1.5772517919540405,
0.4373711943626404,
-1.286832332611084,
-0.3822138011455536,
-0.41354265809059143,
-0.6645827293395996,
2.564912796020508,
-1.5183302164077759,
-0.20136107504367828,
-0.9487056732177734,
-0.5356411337852478,
1.6487973928451538,
-1.244713544845581,
-0.13028529286384583,
-1.0192325115203857,
-0.6995986104011536,
-1.4181007146835327,
-0.5244140028953552,
-0.08072397112846375,
-0.9182398319244385,
0.8103498816490173,
0.24077393114566803,
-1.0854127407073975,
-0.31205958127975464,
-0.8169856667518616,
0.8003413081169128,
-0.10334350913763046,
0.37754878401756287,
1.893251657485962,
0.4352150857448578,
-0.45546814799308777,
0.6448970437049866,
1.0682003498077393,
0.6758692860603333,
-0.6388406157493591,
0.07419304549694061,
-0.7798884510993958,
0.4173252284526825,
-1.2915798425674438,
0.2440495789051056,
-2.9532926082611084,
0.7223502993583679,
0.012933631427586079,
-0.11797579377889633,
-0.05785084888339043,
-1.2828352451324463,
1.105277419090271,
2.5975875854492188,
-1.1566129922866821,
0.4069734811782837,
0.2837511897087097,
1.2709147930145264,
-1.6513649225234985,
0.2648122012615204,
-0.4321475028991699,
2.222296714782715,
0.16627152264118195,
1.2919875383377075,
-0.39800670742988586,
-2.328437566757202,
0.622916579246521,
-1.2241895198822021,
-1.1824538707733154,
0.8079667687416077,
-0.8223975300788879,
-0.07173570245504379,
-1.471847414970398,
-0.18517599999904633,
-0.9395723342895508,
-1.2599014043807983,
0.8928433656692505,
0.1023271456360817,
0.5287198424339294,
-0.5677468180656433,
0.33439895510673523,
-2.1758668422698975,
-1.3557885885238647,
-0.2440062016248703,
-0.877446174621582,
0.47357437014579773,
-0.36235979199409485,
0.7764567136764526,
-0.16692037880420685,
0.07575318962335587,
0.4230330288410187,
1.3605930805206299,
3.384567975997925,
0.31965792179107666,
0.4441157579421997,
-0.16737043857574463,
-0.9232977032661438,
1.4360471963882446,
0.9119279384613037,
-0.19460786879062653,
-0.5593528151512146,
-0.9572795629501343,
1.2356599569320679,
1.9023314714431763,
0.8814657330513,
0.0993511751294136,
-0.8333490490913391,
-0.608773946762085,
-0.10715026408433914,
0.1905115395784378,
0.5926225781440735,
0.8792990446090698,
-0.050358135253190994,
0.18031597137451172,
1.401516318321228,
1.2847126722335815,
-0.3738701045513153,
0.4027229845523834,
-0.7520327568054199,
-0.5016136765480042,
0.5243284106254578,
0.36911845207214355,
-0.023739980533719063,
0.41382896900177,
-0.9736742973327637,
-0.29210448265075684,
-0.3378194272518158,
-0.9683998227119446,
-0.6519820094108582,
-0.42712488770484924,
-0.3526999056339264,
1.5900181531906128,
0.13686034083366394,
-0.4552226662635803,
-0.03360797464847565,
-0.8754172921180725,
-0.17355379462242126,
-1.1962230205535889,
0.23112502694129944,
-0.12241180986166,
-0.09117137640714645,
-0.13231003284454346,
1.7466915845870972,
-0.8615458607673645,
-2.056152582168579,
0.2797340452671051,
0.3847803473472595,
-0.4504718780517578,
0.2150176763534546,
1.6414848566055298,
0.38634932041168213,
1.428866982460022,
1.3477282524108887,
1.0302767753601074,
-0.6767513751983643,
-1.2729710340499878,
0.6864280700683594,
0.8848783373832703,
-1.50760018825531,
0.8936091065406799,
0.041385602205991745,
-0.5274903774261475,
0.6139389276504517,
1.1981645822525024,
0.42017319798469543,
-1.9468690156936646,
0.9052990078926086,
-0.9063710570335388,
0.76957106590271,
0.6518871784210205,
0.7958239316940308,
0.235099196434021,
0.8283620476722717,
-1.2806273698806763,
-1.1256932020187378,
-0.7549009919166565,
-0.6051145195960999,
1.8757127523422241,
-0.2280246615409851,
0.5456230640411377,
-0.18433019518852234,
-1.2555205821990967,
-0.08963572978973389,
0.642546534538269,
0.30382344126701355,
-0.24044018983840942,
0.8895238041877747,
-0.7057914733886719,
-1.1197128295898438,
-1.409672737121582,
-0.3322467505931854,
-0.9648746252059937,
-0.9375065565109253,
1.0876661539077759,
0.8910208344459534,
0.2243494689464569,
1.9188320636749268,
0.4685481786727905,
0.21945355832576752,
-2.6581342220306396,
0.8667712211608887,
0.32553210854530334,
-0.16984225809574127,
0.8634124994277954,
0.2605995833873749,
1.050197720527649,
0.04331353306770325,
0.5008417367935181,
-2.4383113384246826,
2.2229714393615723,
-0.2396424114704132,
0.7312028408050537,
0.00809547957032919,
-0.1257229596376419,
1.1359518766403198,
0.5963709950447083,
0.6035050749778748,
-1.1061365604400635,
0.8126682043075562,
-0.5946288108825684,
1.2074223756790161,
1.0489435195922852,
-0.7935949563980103,
0.08433251827955246,
1.370429277420044,
0.5424602031707764,
-0.5311709642410278,
-0.9026056528091431,
-0.8131051659584045,
0.8412673473358154,
1.8046568632125854,
0.0016535567119717598,
0.002801087684929371,
0.7713606357574463,
0.6531199812889099,
-1.2828419208526611,
0.20857742428779602,
-0.7816449999809265,
-0.8069246411323547,
1.588595986366272,
1.9775117635726929,
-0.09580554068088531,
-0.13898654282093048,
-0.7556841373443604,
-1.2543001174926758,
0.8279772400856018,
0.043431755155324936,
0.14001834392547607,
0.6202781200408936,
-0.7316398024559021,
1.0770717859268188,
0.905943751335144,
0.9769552946090698,
0.18905861675739288,
0.3255850374698639,
0.41322341561317444,
-0.26825234293937683,
-0.9818127751350403,
-0.18967315554618835,
-1.126298189163208,
-2.5828466415405273,
0.49222853779792786,
-0.2924676537513733,
-1.3148273229599,
-0.03881516680121422,
-0.9520264267921448,
0.9193649291992188,
-0.5852536559104919,
-1.1335771083831787,
-1.552887201309204,
0.16498081386089325,
-0.1263970285654068,
0.947574257850647,
-1.6055372953414917,
-0.05668255314230919,
1.2204519510269165,
0.9414311647415161,
-0.6389181017875671,
1.0876387357711792,
0.3734579384326935,
1.0534201860427856,
0.8494682908058167,
-0.4509906470775604,
0.507889449596405,
0.1459597498178482,
-1.3335884809494019,
0.4412825107574463,
1.1759892702102661,
0.1504637897014618,
1.4552335739135742,
-0.5754703879356384,
0.03109297901391983,
0.38603824377059937,
-0.5111467838287354,
-0.4639557898044586,
-0.5267331600189209,
0.8236123323440552,
0.07720673084259033,
-0.8881523013114929,
0.09277694672346115,
-0.17956775426864624,
-0.27100974321365356,
0.19295641779899597,
-1.5219157934188843,
-0.18086400628089905,
-0.3980691134929657,
-0.4380705952644348,
-1.284264326095581,
0.007815307937562466,
1.4474387168884277,
-0.8181787133216858,
-0.16973276436328888,
0.46928611397743225,
0.391621470451355,
0.5639734268188477,
0.5588331818580627,
-0.6051331162452698,
-0.3853505253791809,
-0.3157605230808258,
-0.25236859917640686,
0.26825928688049316,
1.2739711999893188,
-0.19172368943691254,
-0.9117408990859985,
0.6723470687866211,
-0.22960077226161957,
-0.04673086479306221,
1.9840576648712158,
0.14901505410671234,
-0.7441940307617188,
0.26381969451904297,
-0.6239216327667236,
1.859021544456482,
1.6141893863677979,
1.3612220287322998,
-0.11078990250825882,
-0.9756782054901123,
0.6319968700408936,
-0.34714221954345703,
-0.3523177206516266,
0.7720325589179993,
0.5276616215705872,
-0.18744051456451416,
-1.484067440032959,
0.5501735210418701,
1.1364963054656982,
-0.967276930809021,
-0.6576051115989685,
0.0039768945425748825,
-0.7237772941589355,
1.061031460762024,
0.7011047601699829,
0.5205156207084656,
0.24931097030639648,
1.6819522380828857,
0.6948480606079102,
-0.5524260997772217,
0.4732598662376404,
0.44870713353157043,
-0.10309400409460068,
-2.062305450439453,
-1.1493529081344604,
0.3628354072570801,
-0.3523959815502167,
-1.5035713911056519,
1.3525841236114502,
-1.1931642293930054,
-0.9122337102890015,
0.5319719910621643,
0.11329540610313416,
1.4265202283859253,
0.24527522921562195,
1.7203102111816406,
2.137195110321045,
0.8727607727050781,
0.29405641555786133,
1.3852286338806152,
-0.08395957946777344,
-0.38834089040756226,
1.8432215452194214,
-0.46211206912994385,
0.45675238966941833,
1.1944637298583984,
-0.3023509085178375,
-1.015467643737793,
-0.7329182028770447,
-1.160205602645874,
-0.5604822635650635,
1.170982003211975,
0.11849508434534073,
-1.0068695545196533,
0.17342372238636017,
1.582068920135498,
-0.012376504018902779,
-0.2686147689819336,
0.5751693844795227,
0.49953553080558777,
-0.6858314871788025,
-0.03317834809422493,
-0.8701331615447998,
0.5480723977088928,
-0.2202228605747223,
-0.3364541828632355,
0.3418715298175812,
0.36103305220603943,
1.2910958528518677,
-0.05375238135457039,
0.12072386592626572,
1.285044550895691,
-1.3557828664779663,
1.4583549499511719,
-0.5810451507568359,
0.11320339143276215,
-2.390958786010742,
1.4448573589324951,
-0.8437438011169434,
1.9476609230041504,
-2.6164891719818115,
0.41784366965293884,
-0.6655660271644592,
-0.40103602409362793,
0.4008125364780426,
-0.4297466576099396,
0.14904062449932098,
-0.2766300439834595,
-1.0300625562667847,
-0.008855859749019146,
-0.7079760432243347,
0.5230743288993835,
1.1211618185043335,
1.3478211164474487,
-1.1649876832962036,
-0.29119664430618286,
-1.7078783512115479,
-0.17897404730319977,
-0.7116698026657104,
0.3517565429210663,
-1.9627642631530762,
-0.2492024302482605,
-2.065730094909668,
-2.307960033416748,
-1.3823254108428955,
-0.8036484718322754,
1.0048625469207764,
0.09858964383602142,
-0.922967791557312,
1.1633275747299194,
-0.3578236401081085,
-1.8197925090789795,
1.0054630041122437,
-2.042846202850342
] |
https://github.com/huggingface/datasets/issues/5955 | Strange bug in loading local JSON files, using load_dataset | This is the actual error:
```
Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
```
Which means some samples are incorrectly formatted.
PyArrow, a storage backend that we use under the hood, requires that all the list elements have the same level of nesting (same number of dimensions) or are `None`.
```python
import pyarrow as pa
pa.array([[1, 2, 3], 2]) # ArrowInvalid: cannot mix list and non-list, non-null values
pa.array([[1, 2, 3], [2]]) # works
``` | ### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
``` | 97 | 84 | Strange bug in loading local JSON files, using load_dataset
### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
```
This is the actual error:
```
Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
```
Which means some samples are incorrectly formatted.
PyArrow, a storage backend that we use under the hood, requires that all the list elements have the same level of nesting (same number of dimensions) or are `None`.
```python
import pyarrow as pa
pa.array([[1, 2, 3], 2]) # ArrowInvalid: cannot mix list and non-list, non-null values
pa.array([[1, 2, 3], [2]]) # works
``` | [
-1.261521816253662,
-0.8761289119720459,
-0.6570723056793213,
1.5805954933166504,
-0.12507109344005585,
-1.1568385362625122,
0.06908607482910156,
-0.9558650255203247,
1.6588393449783325,
-0.7801931500434875,
0.3194959759712219,
-1.6809179782867432,
-0.02950652316212654,
-0.6814336180686951,
-0.6699648499488831,
-0.8517307043075562,
-0.3696342706680298,
-0.6937656402587891,
1.1007078886032104,
2.457598924636841,
1.1440929174423218,
-1.3548461198806763,
2.8141062259674072,
0.6726444363594055,
-0.1584710031747818,
-0.8689991235733032,
0.45497390627861023,
-0.0017754379659891129,
-1.2474792003631592,
-0.3606644868850708,
-1.0301910638809204,
-0.1758367419242859,
-0.5664284825325012,
-0.5640654563903809,
0.08060377091169357,
0.43394795060157776,
-0.24059152603149414,
-0.43607082962989807,
-0.527765691280365,
-0.7314417958259583,
0.5228244662284851,
-0.2991287112236023,
0.8971638083457947,
-0.30048587918281555,
1.827991247177124,
-0.560801088809967,
0.5116254091262817,
0.615630030632019,
1.209886908531189,
0.2612447142601013,
-0.011296775192022324,
0.47532838582992554,
0.36363711953163147,
0.11546627432107925,
0.6282190084457397,
1.1601669788360596,
0.7040712237358093,
0.48069992661476135,
0.8054446578025818,
-2.1618828773498535,
1.2659406661987305,
-1.0270360708236694,
0.23926034569740295,
1.3120986223220825,
-1.0448126792907715,
0.5663004517555237,
-1.7389241456985474,
-0.09192901849746704,
0.48895135521888733,
-2.1611337661743164,
0.13534747064113617,
-1.3139572143554688,
-0.5044914484024048,
1.038723349571228,
0.43200522661209106,
-1.2194148302078247,
-0.024459119886159897,
-0.4458046555519104,
0.9502843618392944,
0.31270089745521545,
1.1390697956085205,
-1.692231297492981,
-0.034079182893037796,
-0.3029017746448517,
0.2574809491634369,
-1.2035685777664185,
-1.5092222690582275,
0.6401326656341553,
0.6152669787406921,
0.6119202971458435,
-0.14538031816482544,
0.9920867085456848,
-1.2059683799743652,
0.8187751770019531,
-1.0896655321121216,
-1.748563528060913,
-1.447861909866333,
-2.328005790710449,
-2.407602310180664,
0.7657380700111389,
-0.4361203908920288,
-0.4022144079208374,
2.084202766418457,
-1.0048205852508545,
-1.6972213983535767,
1.1715102195739746,
0.284162700176239,
-0.11929483711719513,
2.487316370010376,
0.25852763652801514,
-0.8363862037658691,
0.6159499883651733,
-0.8644751310348511,
0.7136865258216858,
-0.28590190410614014,
1.2841033935546875,
0.4273547828197479,
-0.9469225406646729,
1.617275357246399,
-0.361096054315567,
0.5371482372283936,
-0.6020190715789795,
-0.42475709319114685,
-0.6592268943786621,
0.2645360231399536,
1.971511960029602,
-0.19846183061599731,
1.4559236764907837,
-0.2715396285057068,
-1.4943586587905884,
-1.4967740774154663,
0.8291183114051819,
0.37336477637290955,
-0.873365044593811,
0.17725440859794617,
-0.4320184588432312,
0.13658909499645233,
0.06248961389064789,
1.1926188468933105,
1.3123043775558472,
0.8390451669692993,
-0.33830004930496216,
-0.8790960311889648,
0.11060362309217453,
-0.07181155681610107,
-0.6857652068138123,
-1.6859437227249146,
-0.35881727933883667,
0.036666251718997955,
0.6780294179916382,
-1.2023416757583618,
1.7406007051467896,
0.9367175102233887,
1.8952187299728394,
1.0474635362625122,
-0.4027078151702881,
1.528472661972046,
0.10509014129638672,
1.9205474853515625,
-0.557277262210846,
0.6023003458976746,
-0.4769968092441559,
-1.2032209634780884,
0.7383908033370972,
-0.29041004180908203,
-2.0842435359954834,
-0.6036657691001892,
-0.8526449203491211,
-0.1993395835161209,
-0.8968707323074341,
0.9957835078239441,
-0.2627650499343872,
-1.4875952005386353,
0.3205997049808502,
-0.7468872666358948,
0.10766637325286865,
-1.274591326713562,
0.3377961218357086,
0.7257318496704102,
-0.6626811623573303,
0.15998238325119019,
-0.32814666628837585,
-1.3430099487304688,
-0.5275050401687622,
0.3427722752094269,
1.8297709226608276,
-0.8359079360961914,
0.9521046280860901,
1.0723596811294556,
-0.6343088150024414,
-0.016449004411697388,
0.3773069977760315,
-0.2995994985103607,
0.8561336994171143,
-1.013044834136963,
-0.5848836898803711,
1.1831448078155518,
-0.3133004605770111,
-0.4611002504825592,
1.3206515312194824,
0.6587397456169128,
-1.0209752321243286,
-0.32036134600639343,
-0.1143418699502945,
-0.8624293208122253,
0.05348357558250427,
-1.6119561195373535,
-0.1698005646467209,
0.33930593729019165,
-1.5458617210388184,
-0.5985324382781982,
-0.17374758422374725,
1.2254760265350342,
-0.011881007812917233,
1.3242360353469849,
-0.30494552850723267,
-0.2278958261013031,
-0.39820748567581177,
-0.4868178963661194,
0.17978151142597198,
-0.20545218884944916,
-0.5023238062858582,
0.2424136996269226,
-0.7754210829734802,
0.2249520868062973,
1.4693944454193115,
0.3284851312637329,
0.03396572172641754,
0.5123655796051025,
1.1864417791366577,
0.48749467730522156,
-0.14383432269096375,
-0.9264287948608398,
-1.5762776136398315,
2.0763702392578125,
-1.650367259979248,
1.9535375833511353,
0.6280181407928467,
-0.09407789260149002,
-1.7588573694229126,
-1.9092048406600952,
1.3974663019180298,
1.1162749528884888,
2.395214796066284,
0.5715634226799011,
0.3859408497810364,
-0.8687216639518738,
-0.6929188370704651,
0.41489002108573914,
-0.907355546951294,
-0.8026922941207886,
0.13022814691066742,
2.403771162033081,
1.7722927331924438,
-0.44263702630996704,
-0.1567961424589157,
-0.9565431475639343,
1.4586220979690552,
-0.2772412598133087,
0.2724594473838806,
1.985031247138977,
-0.3341692090034485,
-1.0197114944458008,
1.3480796813964844,
-2.4400713443756104,
0.18657243251800537,
1.964296579360962,
0.3307720124721527,
0.09761383384466171,
-1.3859031200408936,
-0.7015736103057861,
-0.20648296177387238,
-0.459770530462265,
-1.2719172239303589,
0.4257948696613312,
-0.26984092593193054,
-0.8643459677696228,
-1.4891127347946167,
0.07849591970443726,
-1.1544358730316162,
-1.6663947105407715,
0.2014635056257248,
1.8204407691955566,
2.198221206665039,
-0.8105966448783875,
1.51059091091156,
-0.2856500744819641,
0.2675289213657379,
1.2257437705993652,
1.1640584468841553,
3.1281373500823975,
1.9448801279067993,
-1.233502745628357,
0.5790723562240601,
-0.17716412246227264,
-0.42584967613220215,
1.1485499143600464,
-1.209877371788025,
1.2618739604949951,
-0.15366311371326447,
-1.184622049331665,
-1.1324501037597656,
0.9476999640464783,
0.3536575138568878,
-0.071727454662323,
-0.46636515855789185,
1.1869348287582397,
0.1644601672887802,
1.2940329313278198,
0.6403459310531616,
-0.28627297282218933,
0.5332563519477844,
-0.3824135363101959,
-0.40120717883110046,
1.5343867540359497,
0.19442521035671234,
-1.4858076572418213,
-2.2227447032928467,
-0.21336142718791962,
-0.9203304052352905,
0.09260937571525574,
-0.6464768052101135,
-1.005117416381836,
1.5861583948135376,
0.3810187876224518,
-1.0820273160934448,
-0.13616269826889038,
-0.4010241627693176,
-0.56832355260849,
2.705404043197632,
-1.3444329500198364,
-0.3184260129928589,
-0.917280912399292,
-0.6699422597885132,
1.5728992223739624,
-1.0973567962646484,
-0.17836584150791168,
-1.024634599685669,
-0.5603274703025818,
-1.3192431926727295,
-0.48293983936309814,
-0.026557913050055504,
-0.8993407487869263,
0.8598586916923523,
0.08827870339155197,
-1.1935031414031982,
-0.27982768416404724,
-1.0091673135757446,
0.8098953366279602,
-0.2041025608778,
0.17099644243717194,
1.864851713180542,
0.1918269544839859,
-0.36258840560913086,
0.8690600991249084,
1.274312973022461,
0.7219942808151245,
-0.5815858840942383,
0.2507379651069641,
-0.6588525176048279,
0.40438246726989746,
-1.152167558670044,
0.3332817554473877,
-2.8332486152648926,
0.5667965412139893,
-0.04460854083299637,
-0.09930436313152313,
-0.05886584520339966,
-1.3110591173171997,
1.0645054578781128,
2.5161690711975098,
-1.1616230010986328,
0.5502133369445801,
0.23252828419208527,
1.294962763786316,
-1.6211997270584106,
0.16906361281871796,
-0.5636290907859802,
2.1293773651123047,
0.1902441382408142,
1.0823900699615479,
-0.47795939445495605,
-2.3463199138641357,
0.6126782894134521,
-1.3069552183151245,
-1.0608576536178589,
0.6973811984062195,
-0.8802317380905151,
0.20649895071983337,
-1.3181167840957642,
-0.12315414100885391,
-0.872317373752594,
-1.1808089017868042,
0.4549177587032318,
0.1846478432416916,
0.504738986492157,
-0.5900018811225891,
0.25813305377960205,
-2.2824575901031494,
-1.4634406566619873,
-0.17200742661952972,
-0.939455509185791,
0.46654054522514343,
-0.4846227467060089,
0.8555940985679626,
-0.1652667224407196,
-0.10698094218969345,
0.3377073407173157,
1.5000858306884766,
3.238717555999756,
0.0827874094247818,
0.3172057867050171,
-0.23957036435604095,
-1.0570868253707886,
1.5136104822158813,
0.946184515953064,
-0.21085894107818604,
-0.5382005572319031,
-1.1117664575576782,
1.293690800666809,
1.980799913406372,
1.0347394943237305,
-0.025576144456863403,
-0.8064067363739014,
-0.6896909475326538,
0.10737556219100952,
0.25128260254859924,
0.582175076007843,
1.0205364227294922,
0.04786568135023117,
0.0944538563489914,
1.4985759258270264,
1.0834672451019287,
-0.3328154385089874,
0.3456248939037323,
-0.7951582074165344,
-0.40319111943244934,
0.5711438059806824,
0.19101440906524658,
0.016339031979441643,
0.1933584064245224,
-1.0979926586151123,
-0.26988041400909424,
-0.3924497663974762,
-0.858364462852478,
-0.6984702348709106,
-0.330898255109787,
-0.4403357207775116,
1.6877622604370117,
0.027766617015004158,
-0.5664269328117371,
-0.10652170330286026,
-0.7694409489631653,
-0.14844101667404175,
-0.993342936038971,
0.3218625485897064,
-0.17653228342533112,
-0.039700642228126526,
-0.16212332248687744,
1.8134472370147705,
-0.9536073207855225,
-2.1734423637390137,
0.19347096979618073,
0.25621938705444336,
-0.23388366401195526,
0.1527591347694397,
1.5735647678375244,
0.6530553102493286,
1.4142032861709595,
1.458081603050232,
1.002166986465454,
-0.6620426177978516,
-1.3778268098831177,
0.6933024525642395,
0.9338277578353882,
-1.3998422622680664,
0.8144235014915466,
-0.15364332497119904,
-0.5779061317443848,
0.5055577754974365,
1.3189494609832764,
0.44982168078422546,
-1.9477143287658691,
0.8640334010124207,
-1.1391881704330444,
0.8726749420166016,
0.7483217716217041,
0.6971050500869751,
0.10475336760282516,
0.7639822959899902,
-1.2365186214447021,
-1.0380933284759521,
-0.6922038793563843,
-0.68814617395401,
1.918787956237793,
-0.24161389470100403,
0.4793764650821686,
-0.17430999875068665,
-1.3018946647644043,
0.13906726241111755,
0.6331502199172974,
0.2766129970550537,
-0.416873961687088,
0.7867105603218079,
-0.7195471525192261,
-1.141068935394287,
-1.361321210861206,
-0.42300528287887573,
-1.0477887392044067,
-0.9702447652816772,
1.017802119255066,
0.6956936717033386,
0.33673539757728577,
1.8837934732437134,
0.7184901237487793,
0.2683715224266052,
-2.607337713241577,
1.0086338520050049,
0.2912817597389221,
-0.10870438814163208,
0.8383635878562927,
0.31246304512023926,
1.0989958047866821,
-0.12553885579109192,
0.6153671741485596,
-2.3785922527313232,
2.31796932220459,
-0.19509297609329224,
0.8095869421958923,
0.11492057889699936,
-0.054615266621112823,
1.016013503074646,
0.6154590845108032,
0.558180034160614,
-1.043175220489502,
0.6918274760246277,
-0.5894743800163269,
1.1638818979263306,
0.9265890717506409,
-0.7525409460067749,
0.11270797997713089,
1.1774808168411255,
0.47646453976631165,
-0.5708230137825012,
-0.9881578683853149,
-0.9519064426422119,
0.9290968775749207,
1.7745145559310913,
-0.08009424805641174,
0.038864463567733765,
0.8791437149047852,
0.6264440417289734,
-1.2438673973083496,
-0.01040168572217226,
-0.5969836711883545,
-0.6340975761413574,
1.7377479076385498,
2.0736451148986816,
-0.16990910470485687,
-0.0823630765080452,
-0.6258959770202637,
-1.414801836013794,
0.7304542660713196,
0.05328933149576187,
0.14251674711704254,
0.8608571290969849,
-0.6343177556991577,
1.1097975969314575,
0.8719444870948792,
0.9242278337478638,
0.24900823831558228,
0.16798782348632812,
0.2829188406467438,
-0.30528759956359863,
-1.1578139066696167,
-0.2914353609085083,
-0.9338111877441406,
-2.5164809226989746,
0.40067896246910095,
-0.2867915630340576,
-1.4063520431518555,
0.04812847822904587,
-0.8941572308540344,
0.9439178705215454,
-0.45544856786727905,
-1.0630028247833252,
-1.4123064279556274,
0.1909901350736618,
-0.060273341834545135,
0.9188966751098633,
-1.6065560579299927,
-0.1946742981672287,
1.241573691368103,
0.9644115567207336,
-0.6614351272583008,
0.9693978428840637,
0.27608251571655273,
0.9950647950172424,
0.7717990279197693,
-0.3286917507648468,
0.4707718789577484,
0.12158340960741043,
-1.3136931657791138,
0.4283921420574188,
1.2977187633514404,
0.16217616200447083,
1.4889339208602905,
-0.46274611353874207,
-0.08161856979131699,
0.39127010107040405,
-0.47346004843711853,
-0.5124450325965881,
-0.5960175395011902,
0.6253304481506348,
-0.08176544308662415,
-0.9056519269943237,
-0.04783713072538376,
0.09453363716602325,
-0.17391350865364075,
0.1314408928155899,
-1.4719263315200806,
-0.12263103574514389,
-0.5129852890968323,
-0.6089410185813904,
-1.2235077619552612,
-0.12396255135536194,
1.285967469215393,
-0.9009244441986084,
-0.11948011815547943,
0.5168768167495728,
0.2602485418319702,
0.5113921165466309,
0.6358038783073425,
-0.6886894702911377,
-0.2851482033729553,
-0.16989311575889587,
-0.36559566855430603,
0.25565478205680847,
1.3111505508422852,
-0.08981680124998093,
-1.0505928993225098,
0.6097690463066101,
-0.33887308835983276,
0.11090686917304993,
1.8173025846481323,
0.01993614435195923,
-0.8282533884048462,
0.327262818813324,
-0.7287620902061462,
1.936132788658142,
1.5621827840805054,
1.3931732177734375,
-0.21282844245433807,
-0.8995688557624817,
0.6244773268699646,
-0.4230826795101166,
-0.41132351756095886,
0.7290918827056885,
0.3368971645832062,
-0.2882671654224396,
-1.4027420282363892,
0.8090912699699402,
1.2376947402954102,
-0.9319534301757812,
-0.724785327911377,
0.2935999929904938,
-0.7292456030845642,
1.127079725265503,
0.7003483772277832,
0.35994186997413635,
0.2908884286880493,
1.6935030221939087,
0.8182955384254456,
-0.5612345337867737,
0.4542849063873291,
0.5108022689819336,
-0.1326330006122589,
-2.018397569656372,
-1.2115380764007568,
0.2427455484867096,
-0.626372754573822,
-1.524949550628662,
1.424963355064392,
-1.2118630409240723,
-0.9366492629051208,
0.6115095615386963,
0.12843981385231018,
1.3368526697158813,
0.38421085476875305,
1.5795018672943115,
2.0247862339019775,
0.8740792870521545,
0.5951521396636963,
1.2109849452972412,
-0.19585682451725006,
-0.3900591731071472,
1.6986607313156128,
-0.4149568974971771,
0.6681704521179199,
1.0745288133621216,
-0.3606646955013275,
-1.0749961137771606,
-0.7653651833534241,
-1.2397818565368652,
-0.7246217727661133,
1.0151848793029785,
0.07984186708927155,
-1.1279264688491821,
0.31496453285217285,
1.5150067806243896,
0.17286789417266846,
-0.3475860059261322,
0.6083451509475708,
0.39169275760650635,
-0.7545374631881714,
-0.11357871443033218,
-1.063352346420288,
0.532152533531189,
-0.420360803604126,
-0.45499733090400696,
0.21288934350013733,
0.4607427418231964,
1.3413525819778442,
0.12499134987592697,
0.15743134915828705,
1.265806794166565,
-1.3793236017227173,
1.4624344110488892,
-0.8757950663566589,
0.34611207246780396,
-2.3281712532043457,
1.4044835567474365,
-0.917565107345581,
1.9493012428283691,
-2.698496103286743,
0.5051674246788025,
-0.49175310134887695,
-0.45367172360420227,
0.15294156968593597,
-0.17535735666751862,
0.13181720674037933,
-0.06923525035381317,
-1.142612338066101,
-0.025980086997151375,
-0.7552972435951233,
0.4967346787452698,
1.1996235847473145,
1.4377202987670898,
-0.9918610453605652,
-0.29292717576026917,
-1.7000110149383545,
-0.0899776965379715,
-0.6530140042304993,
0.23771460354328156,
-1.924970269203186,
-0.18818026781082153,
-1.8621251583099365,
-2.348630428314209,
-1.2841590642929077,
-1.002188801765442,
1.2946237325668335,
0.09126049280166626,
-0.9565513134002686,
1.3020910024642944,
-0.3889583647251129,
-1.801072597503662,
1.139441967010498,
-2.1270365715026855
] |
https://github.com/huggingface/datasets/issues/5955 | Strange bug in loading local JSON files, using load_dataset | @mariosasko
I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
thank you for your reply. | ### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
``` | 97 | 72 | Strange bug in loading local JSON files, using load_dataset
### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
```
@mariosasko
I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
thank you for your reply. | [
-1.261521816253662,
-0.8761289119720459,
-0.6570723056793213,
1.5805954933166504,
-0.12507109344005585,
-1.1568385362625122,
0.06908607482910156,
-0.9558650255203247,
1.6588393449783325,
-0.7801931500434875,
0.3194959759712219,
-1.6809179782867432,
-0.02950652316212654,
-0.6814336180686951,
-0.6699648499488831,
-0.8517307043075562,
-0.3696342706680298,
-0.6937656402587891,
1.1007078886032104,
2.457598924636841,
1.1440929174423218,
-1.3548461198806763,
2.8141062259674072,
0.6726444363594055,
-0.1584710031747818,
-0.8689991235733032,
0.45497390627861023,
-0.0017754379659891129,
-1.2474792003631592,
-0.3606644868850708,
-1.0301910638809204,
-0.1758367419242859,
-0.5664284825325012,
-0.5640654563903809,
0.08060377091169357,
0.43394795060157776,
-0.24059152603149414,
-0.43607082962989807,
-0.527765691280365,
-0.7314417958259583,
0.5228244662284851,
-0.2991287112236023,
0.8971638083457947,
-0.30048587918281555,
1.827991247177124,
-0.560801088809967,
0.5116254091262817,
0.615630030632019,
1.209886908531189,
0.2612447142601013,
-0.011296775192022324,
0.47532838582992554,
0.36363711953163147,
0.11546627432107925,
0.6282190084457397,
1.1601669788360596,
0.7040712237358093,
0.48069992661476135,
0.8054446578025818,
-2.1618828773498535,
1.2659406661987305,
-1.0270360708236694,
0.23926034569740295,
1.3120986223220825,
-1.0448126792907715,
0.5663004517555237,
-1.7389241456985474,
-0.09192901849746704,
0.48895135521888733,
-2.1611337661743164,
0.13534747064113617,
-1.3139572143554688,
-0.5044914484024048,
1.038723349571228,
0.43200522661209106,
-1.2194148302078247,
-0.024459119886159897,
-0.4458046555519104,
0.9502843618392944,
0.31270089745521545,
1.1390697956085205,
-1.692231297492981,
-0.034079182893037796,
-0.3029017746448517,
0.2574809491634369,
-1.2035685777664185,
-1.5092222690582275,
0.6401326656341553,
0.6152669787406921,
0.6119202971458435,
-0.14538031816482544,
0.9920867085456848,
-1.2059683799743652,
0.8187751770019531,
-1.0896655321121216,
-1.748563528060913,
-1.447861909866333,
-2.328005790710449,
-2.407602310180664,
0.7657380700111389,
-0.4361203908920288,
-0.4022144079208374,
2.084202766418457,
-1.0048205852508545,
-1.6972213983535767,
1.1715102195739746,
0.284162700176239,
-0.11929483711719513,
2.487316370010376,
0.25852763652801514,
-0.8363862037658691,
0.6159499883651733,
-0.8644751310348511,
0.7136865258216858,
-0.28590190410614014,
1.2841033935546875,
0.4273547828197479,
-0.9469225406646729,
1.617275357246399,
-0.361096054315567,
0.5371482372283936,
-0.6020190715789795,
-0.42475709319114685,
-0.6592268943786621,
0.2645360231399536,
1.971511960029602,
-0.19846183061599731,
1.4559236764907837,
-0.2715396285057068,
-1.4943586587905884,
-1.4967740774154663,
0.8291183114051819,
0.37336477637290955,
-0.873365044593811,
0.17725440859794617,
-0.4320184588432312,
0.13658909499645233,
0.06248961389064789,
1.1926188468933105,
1.3123043775558472,
0.8390451669692993,
-0.33830004930496216,
-0.8790960311889648,
0.11060362309217453,
-0.07181155681610107,
-0.6857652068138123,
-1.6859437227249146,
-0.35881727933883667,
0.036666251718997955,
0.6780294179916382,
-1.2023416757583618,
1.7406007051467896,
0.9367175102233887,
1.8952187299728394,
1.0474635362625122,
-0.4027078151702881,
1.528472661972046,
0.10509014129638672,
1.9205474853515625,
-0.557277262210846,
0.6023003458976746,
-0.4769968092441559,
-1.2032209634780884,
0.7383908033370972,
-0.29041004180908203,
-2.0842435359954834,
-0.6036657691001892,
-0.8526449203491211,
-0.1993395835161209,
-0.8968707323074341,
0.9957835078239441,
-0.2627650499343872,
-1.4875952005386353,
0.3205997049808502,
-0.7468872666358948,
0.10766637325286865,
-1.274591326713562,
0.3377961218357086,
0.7257318496704102,
-0.6626811623573303,
0.15998238325119019,
-0.32814666628837585,
-1.3430099487304688,
-0.5275050401687622,
0.3427722752094269,
1.8297709226608276,
-0.8359079360961914,
0.9521046280860901,
1.0723596811294556,
-0.6343088150024414,
-0.016449004411697388,
0.3773069977760315,
-0.2995994985103607,
0.8561336994171143,
-1.013044834136963,
-0.5848836898803711,
1.1831448078155518,
-0.3133004605770111,
-0.4611002504825592,
1.3206515312194824,
0.6587397456169128,
-1.0209752321243286,
-0.32036134600639343,
-0.1143418699502945,
-0.8624293208122253,
0.05348357558250427,
-1.6119561195373535,
-0.1698005646467209,
0.33930593729019165,
-1.5458617210388184,
-0.5985324382781982,
-0.17374758422374725,
1.2254760265350342,
-0.011881007812917233,
1.3242360353469849,
-0.30494552850723267,
-0.2278958261013031,
-0.39820748567581177,
-0.4868178963661194,
0.17978151142597198,
-0.20545218884944916,
-0.5023238062858582,
0.2424136996269226,
-0.7754210829734802,
0.2249520868062973,
1.4693944454193115,
0.3284851312637329,
0.03396572172641754,
0.5123655796051025,
1.1864417791366577,
0.48749467730522156,
-0.14383432269096375,
-0.9264287948608398,
-1.5762776136398315,
2.0763702392578125,
-1.650367259979248,
1.9535375833511353,
0.6280181407928467,
-0.09407789260149002,
-1.7588573694229126,
-1.9092048406600952,
1.3974663019180298,
1.1162749528884888,
2.395214796066284,
0.5715634226799011,
0.3859408497810364,
-0.8687216639518738,
-0.6929188370704651,
0.41489002108573914,
-0.907355546951294,
-0.8026922941207886,
0.13022814691066742,
2.403771162033081,
1.7722927331924438,
-0.44263702630996704,
-0.1567961424589157,
-0.9565431475639343,
1.4586220979690552,
-0.2772412598133087,
0.2724594473838806,
1.985031247138977,
-0.3341692090034485,
-1.0197114944458008,
1.3480796813964844,
-2.4400713443756104,
0.18657243251800537,
1.964296579360962,
0.3307720124721527,
0.09761383384466171,
-1.3859031200408936,
-0.7015736103057861,
-0.20648296177387238,
-0.459770530462265,
-1.2719172239303589,
0.4257948696613312,
-0.26984092593193054,
-0.8643459677696228,
-1.4891127347946167,
0.07849591970443726,
-1.1544358730316162,
-1.6663947105407715,
0.2014635056257248,
1.8204407691955566,
2.198221206665039,
-0.8105966448783875,
1.51059091091156,
-0.2856500744819641,
0.2675289213657379,
1.2257437705993652,
1.1640584468841553,
3.1281373500823975,
1.9448801279067993,
-1.233502745628357,
0.5790723562240601,
-0.17716412246227264,
-0.42584967613220215,
1.1485499143600464,
-1.209877371788025,
1.2618739604949951,
-0.15366311371326447,
-1.184622049331665,
-1.1324501037597656,
0.9476999640464783,
0.3536575138568878,
-0.071727454662323,
-0.46636515855789185,
1.1869348287582397,
0.1644601672887802,
1.2940329313278198,
0.6403459310531616,
-0.28627297282218933,
0.5332563519477844,
-0.3824135363101959,
-0.40120717883110046,
1.5343867540359497,
0.19442521035671234,
-1.4858076572418213,
-2.2227447032928467,
-0.21336142718791962,
-0.9203304052352905,
0.09260937571525574,
-0.6464768052101135,
-1.005117416381836,
1.5861583948135376,
0.3810187876224518,
-1.0820273160934448,
-0.13616269826889038,
-0.4010241627693176,
-0.56832355260849,
2.705404043197632,
-1.3444329500198364,
-0.3184260129928589,
-0.917280912399292,
-0.6699422597885132,
1.5728992223739624,
-1.0973567962646484,
-0.17836584150791168,
-1.024634599685669,
-0.5603274703025818,
-1.3192431926727295,
-0.48293983936309814,
-0.026557913050055504,
-0.8993407487869263,
0.8598586916923523,
0.08827870339155197,
-1.1935031414031982,
-0.27982768416404724,
-1.0091673135757446,
0.8098953366279602,
-0.2041025608778,
0.17099644243717194,
1.864851713180542,
0.1918269544839859,
-0.36258840560913086,
0.8690600991249084,
1.274312973022461,
0.7219942808151245,
-0.5815858840942383,
0.2507379651069641,
-0.6588525176048279,
0.40438246726989746,
-1.152167558670044,
0.3332817554473877,
-2.8332486152648926,
0.5667965412139893,
-0.04460854083299637,
-0.09930436313152313,
-0.05886584520339966,
-1.3110591173171997,
1.0645054578781128,
2.5161690711975098,
-1.1616230010986328,
0.5502133369445801,
0.23252828419208527,
1.294962763786316,
-1.6211997270584106,
0.16906361281871796,
-0.5636290907859802,
2.1293773651123047,
0.1902441382408142,
1.0823900699615479,
-0.47795939445495605,
-2.3463199138641357,
0.6126782894134521,
-1.3069552183151245,
-1.0608576536178589,
0.6973811984062195,
-0.8802317380905151,
0.20649895071983337,
-1.3181167840957642,
-0.12315414100885391,
-0.872317373752594,
-1.1808089017868042,
0.4549177587032318,
0.1846478432416916,
0.504738986492157,
-0.5900018811225891,
0.25813305377960205,
-2.2824575901031494,
-1.4634406566619873,
-0.17200742661952972,
-0.939455509185791,
0.46654054522514343,
-0.4846227467060089,
0.8555940985679626,
-0.1652667224407196,
-0.10698094218969345,
0.3377073407173157,
1.5000858306884766,
3.238717555999756,
0.0827874094247818,
0.3172057867050171,
-0.23957036435604095,
-1.0570868253707886,
1.5136104822158813,
0.946184515953064,
-0.21085894107818604,
-0.5382005572319031,
-1.1117664575576782,
1.293690800666809,
1.980799913406372,
1.0347394943237305,
-0.025576144456863403,
-0.8064067363739014,
-0.6896909475326538,
0.10737556219100952,
0.25128260254859924,
0.582175076007843,
1.0205364227294922,
0.04786568135023117,
0.0944538563489914,
1.4985759258270264,
1.0834672451019287,
-0.3328154385089874,
0.3456248939037323,
-0.7951582074165344,
-0.40319111943244934,
0.5711438059806824,
0.19101440906524658,
0.016339031979441643,
0.1933584064245224,
-1.0979926586151123,
-0.26988041400909424,
-0.3924497663974762,
-0.858364462852478,
-0.6984702348709106,
-0.330898255109787,
-0.4403357207775116,
1.6877622604370117,
0.027766617015004158,
-0.5664269328117371,
-0.10652170330286026,
-0.7694409489631653,
-0.14844101667404175,
-0.993342936038971,
0.3218625485897064,
-0.17653228342533112,
-0.039700642228126526,
-0.16212332248687744,
1.8134472370147705,
-0.9536073207855225,
-2.1734423637390137,
0.19347096979618073,
0.25621938705444336,
-0.23388366401195526,
0.1527591347694397,
1.5735647678375244,
0.6530553102493286,
1.4142032861709595,
1.458081603050232,
1.002166986465454,
-0.6620426177978516,
-1.3778268098831177,
0.6933024525642395,
0.9338277578353882,
-1.3998422622680664,
0.8144235014915466,
-0.15364332497119904,
-0.5779061317443848,
0.5055577754974365,
1.3189494609832764,
0.44982168078422546,
-1.9477143287658691,
0.8640334010124207,
-1.1391881704330444,
0.8726749420166016,
0.7483217716217041,
0.6971050500869751,
0.10475336760282516,
0.7639822959899902,
-1.2365186214447021,
-1.0380933284759521,
-0.6922038793563843,
-0.68814617395401,
1.918787956237793,
-0.24161389470100403,
0.4793764650821686,
-0.17430999875068665,
-1.3018946647644043,
0.13906726241111755,
0.6331502199172974,
0.2766129970550537,
-0.416873961687088,
0.7867105603218079,
-0.7195471525192261,
-1.141068935394287,
-1.361321210861206,
-0.42300528287887573,
-1.0477887392044067,
-0.9702447652816772,
1.017802119255066,
0.6956936717033386,
0.33673539757728577,
1.8837934732437134,
0.7184901237487793,
0.2683715224266052,
-2.607337713241577,
1.0086338520050049,
0.2912817597389221,
-0.10870438814163208,
0.8383635878562927,
0.31246304512023926,
1.0989958047866821,
-0.12553885579109192,
0.6153671741485596,
-2.3785922527313232,
2.31796932220459,
-0.19509297609329224,
0.8095869421958923,
0.11492057889699936,
-0.054615266621112823,
1.016013503074646,
0.6154590845108032,
0.558180034160614,
-1.043175220489502,
0.6918274760246277,
-0.5894743800163269,
1.1638818979263306,
0.9265890717506409,
-0.7525409460067749,
0.11270797997713089,
1.1774808168411255,
0.47646453976631165,
-0.5708230137825012,
-0.9881578683853149,
-0.9519064426422119,
0.9290968775749207,
1.7745145559310913,
-0.08009424805641174,
0.038864463567733765,
0.8791437149047852,
0.6264440417289734,
-1.2438673973083496,
-0.01040168572217226,
-0.5969836711883545,
-0.6340975761413574,
1.7377479076385498,
2.0736451148986816,
-0.16990910470485687,
-0.0823630765080452,
-0.6258959770202637,
-1.414801836013794,
0.7304542660713196,
0.05328933149576187,
0.14251674711704254,
0.8608571290969849,
-0.6343177556991577,
1.1097975969314575,
0.8719444870948792,
0.9242278337478638,
0.24900823831558228,
0.16798782348632812,
0.2829188406467438,
-0.30528759956359863,
-1.1578139066696167,
-0.2914353609085083,
-0.9338111877441406,
-2.5164809226989746,
0.40067896246910095,
-0.2867915630340576,
-1.4063520431518555,
0.04812847822904587,
-0.8941572308540344,
0.9439178705215454,
-0.45544856786727905,
-1.0630028247833252,
-1.4123064279556274,
0.1909901350736618,
-0.060273341834545135,
0.9188966751098633,
-1.6065560579299927,
-0.1946742981672287,
1.241573691368103,
0.9644115567207336,
-0.6614351272583008,
0.9693978428840637,
0.27608251571655273,
0.9950647950172424,
0.7717990279197693,
-0.3286917507648468,
0.4707718789577484,
0.12158340960741043,
-1.3136931657791138,
0.4283921420574188,
1.2977187633514404,
0.16217616200447083,
1.4889339208602905,
-0.46274611353874207,
-0.08161856979131699,
0.39127010107040405,
-0.47346004843711853,
-0.5124450325965881,
-0.5960175395011902,
0.6253304481506348,
-0.08176544308662415,
-0.9056519269943237,
-0.04783713072538376,
0.09453363716602325,
-0.17391350865364075,
0.1314408928155899,
-1.4719263315200806,
-0.12263103574514389,
-0.5129852890968323,
-0.6089410185813904,
-1.2235077619552612,
-0.12396255135536194,
1.285967469215393,
-0.9009244441986084,
-0.11948011815547943,
0.5168768167495728,
0.2602485418319702,
0.5113921165466309,
0.6358038783073425,
-0.6886894702911377,
-0.2851482033729553,
-0.16989311575889587,
-0.36559566855430603,
0.25565478205680847,
1.3111505508422852,
-0.08981680124998093,
-1.0505928993225098,
0.6097690463066101,
-0.33887308835983276,
0.11090686917304993,
1.8173025846481323,
0.01993614435195923,
-0.8282533884048462,
0.327262818813324,
-0.7287620902061462,
1.936132788658142,
1.5621827840805054,
1.3931732177734375,
-0.21282844245433807,
-0.8995688557624817,
0.6244773268699646,
-0.4230826795101166,
-0.41132351756095886,
0.7290918827056885,
0.3368971645832062,
-0.2882671654224396,
-1.4027420282363892,
0.8090912699699402,
1.2376947402954102,
-0.9319534301757812,
-0.724785327911377,
0.2935999929904938,
-0.7292456030845642,
1.127079725265503,
0.7003483772277832,
0.35994186997413635,
0.2908884286880493,
1.6935030221939087,
0.8182955384254456,
-0.5612345337867737,
0.4542849063873291,
0.5108022689819336,
-0.1326330006122589,
-2.018397569656372,
-1.2115380764007568,
0.2427455484867096,
-0.626372754573822,
-1.524949550628662,
1.424963355064392,
-1.2118630409240723,
-0.9366492629051208,
0.6115095615386963,
0.12843981385231018,
1.3368526697158813,
0.38421085476875305,
1.5795018672943115,
2.0247862339019775,
0.8740792870521545,
0.5951521396636963,
1.2109849452972412,
-0.19585682451725006,
-0.3900591731071472,
1.6986607313156128,
-0.4149568974971771,
0.6681704521179199,
1.0745288133621216,
-0.3606646955013275,
-1.0749961137771606,
-0.7653651833534241,
-1.2397818565368652,
-0.7246217727661133,
1.0151848793029785,
0.07984186708927155,
-1.1279264688491821,
0.31496453285217285,
1.5150067806243896,
0.17286789417266846,
-0.3475860059261322,
0.6083451509475708,
0.39169275760650635,
-0.7545374631881714,
-0.11357871443033218,
-1.063352346420288,
0.532152533531189,
-0.420360803604126,
-0.45499733090400696,
0.21288934350013733,
0.4607427418231964,
1.3413525819778442,
0.12499134987592697,
0.15743134915828705,
1.265806794166565,
-1.3793236017227173,
1.4624344110488892,
-0.8757950663566589,
0.34611207246780396,
-2.3281712532043457,
1.4044835567474365,
-0.917565107345581,
1.9493012428283691,
-2.698496103286743,
0.5051674246788025,
-0.49175310134887695,
-0.45367172360420227,
0.15294156968593597,
-0.17535735666751862,
0.13181720674037933,
-0.06923525035381317,
-1.142612338066101,
-0.025980086997151375,
-0.7552972435951233,
0.4967346787452698,
1.1996235847473145,
1.4377202987670898,
-0.9918610453605652,
-0.29292717576026917,
-1.7000110149383545,
-0.0899776965379715,
-0.6530140042304993,
0.23771460354328156,
-1.924970269203186,
-0.18818026781082153,
-1.8621251583099365,
-2.348630428314209,
-1.2841590642929077,
-1.002188801765442,
1.2946237325668335,
0.09126049280166626,
-0.9565513134002686,
1.3020910024642944,
-0.3889583647251129,
-1.801072597503662,
1.139441967010498,
-2.1270365715026855
] |
https://github.com/huggingface/datasets/issues/5955 | Strange bug in loading local JSON files, using load_dataset | Our JSON loader does the following in your case:
```python
import json
import pyarrow as pa
with open(file, encoding="utf-8") as f:
dataset = json.load(f)
keys = set().union(*[row.keys() for row in dataset])
mapping = {col: [row.get(col) for row in dataset] for col in keys}
pa_table = pa.Table.from_pydict(mapping) # the ArrowInvalid error comes from here
```
So if this code throws an error with correctly-formatted JSON, then this is an Arrow bug and should be reported in their repo.
> I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
You should shuffle the data to make sure that's not the case | ### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
``` | 97 | 156 | Strange bug in loading local JSON files, using load_dataset
### Describe the bug
I am using 'load_dataset 'loads a JSON file, but I found a strange bug: an error will be reported when the length of the JSON file exceeds 160000 (uncertain exact number). I have checked the data through the following code and there are no issues. So I cannot determine the true reason for this error.
The data is a list containing a dictionary. As follows:
[
{'input': 'someting...', 'target': 'someting...', 'type': 'someting...', 'history': ['someting...', ...]},
...
]
### Steps to reproduce the bug
```
import json
from datasets import load_dataset
path = "target.json"
temp_path = "temp.json"
with open(path, "r") as f:
data = json.load(f)
print(f"\n-------the JSON file length is: {len(data)}-------\n")
with open(temp_path, "w") as f:
json.dump(data[:160000], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works when the JSON file length is 160000-------\n")
with open(temp_path, "w") as f:
json.dump(data[160000:], f)
dataset = load_dataset("json", data_files=temp_path)
print("\n-------This works and eliminates data issues-------\n")
with open(temp_path, "w") as f:
json.dump(data[:170000], f)
dataset = load_dataset("json", data_files=temp_path)
```
### Expected behavior
```
-------the JSON file length is: 173049-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3328.81it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 639.47it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-acf3c7f418c5f4b4/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 265.85it/s]
-------This works when the JSON file length is 160000-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 2038.05it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 794.83it/s]
Dataset json downloaded and prepared to /root/.cache/huggingface/datasets/json/default-a42f04b263ceea6a/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 681.00it/s]
-------This works and eliminates data issues-------
Downloading and preparing dataset json/default to /root/.cache/huggingface/datasets/json/default-63f391c89599c7b0/0.0.0/e347ab1c932092252e717ff3f949105a4dd28b27e842dd53157d2f72e276c2e4...
Downloading data files: 100%|███████████████████| 1/1 [00:00<00:00, 3682.44it/s]
Extracting data files: 100%|█████████████████████| 1/1 [00:00<00:00, 788.70it/s]
Generating train split: 0 examples [00:00, ? examples/s]Failed to read file '/home/lakala/hjc/code/pycode/glm/temp.json' with error <class 'pyarrow.lib.ArrowInvalid'>: cannot mix list and non-list, non-null values
Traceback (most recent call last):
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
for _, table in generator:
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(f"Not able to read records in the JSON file at {file}.") from None
ValueError: Not able to read records in the JSON file at /home/lakala/hjc/code/pycode/glm/temp.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lakala/hjc/code/pycode/glm/test.py", line 22, in <module>
dataset = load_dataset("json", data_files=temp_path)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/home/lakala/conda/envs/glm/lib/python3.8/site-packages/datasets/builder.py", line 1891, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
```
### Environment info
```
Ubuntu==22.04
python==3.8
pytorch-transformers==1.2.0
transformers== 4.27.1
datasets==2.12.0
numpy==1.24.3
pandas==1.5.3
```
Our JSON loader does the following in your case:
```python
import json
import pyarrow as pa
with open(file, encoding="utf-8") as f:
dataset = json.load(f)
keys = set().union(*[row.keys() for row in dataset])
mapping = {col: [row.get(col) for row in dataset] for col in keys}
pa_table = pa.Table.from_pydict(mapping) # the ArrowInvalid error comes from here
```
So if this code throws an error with correctly-formatted JSON, then this is an Arrow bug and should be reported in their repo.
> I used the same operation to check the original data before and after slicing.
This is reflected in my code.
160000 is not a specific number.
I can also get output using 150000.
This doesn't seem to align very well with what you said.
Because if only some sample formats are incorrect.
So there should be an error in one of the front and back slices.
You should shuffle the data to make sure that's not the case | [
-1.261521816253662,
-0.8761289119720459,
-0.6570723056793213,
1.5805954933166504,
-0.12507109344005585,
-1.1568385362625122,
0.06908607482910156,
-0.9558650255203247,
1.6588393449783325,
-0.7801931500434875,
0.3194959759712219,
-1.6809179782867432,
-0.02950652316212654,
-0.6814336180686951,
-0.6699648499488831,
-0.8517307043075562,
-0.3696342706680298,
-0.6937656402587891,
1.1007078886032104,
2.457598924636841,
1.1440929174423218,
-1.3548461198806763,
2.8141062259674072,
0.6726444363594055,
-0.1584710031747818,
-0.8689991235733032,
0.45497390627861023,
-0.0017754379659891129,
-1.2474792003631592,
-0.3606644868850708,
-1.0301910638809204,
-0.1758367419242859,
-0.5664284825325012,
-0.5640654563903809,
0.08060377091169357,
0.43394795060157776,
-0.24059152603149414,
-0.43607082962989807,
-0.527765691280365,
-0.7314417958259583,
0.5228244662284851,
-0.2991287112236023,
0.8971638083457947,
-0.30048587918281555,
1.827991247177124,
-0.560801088809967,
0.5116254091262817,
0.615630030632019,
1.209886908531189,
0.2612447142601013,
-0.011296775192022324,
0.47532838582992554,
0.36363711953163147,
0.11546627432107925,
0.6282190084457397,
1.1601669788360596,
0.7040712237358093,
0.48069992661476135,
0.8054446578025818,
-2.1618828773498535,
1.2659406661987305,
-1.0270360708236694,
0.23926034569740295,
1.3120986223220825,
-1.0448126792907715,
0.5663004517555237,
-1.7389241456985474,
-0.09192901849746704,
0.48895135521888733,
-2.1611337661743164,
0.13534747064113617,
-1.3139572143554688,
-0.5044914484024048,
1.038723349571228,
0.43200522661209106,
-1.2194148302078247,
-0.024459119886159897,
-0.4458046555519104,
0.9502843618392944,
0.31270089745521545,
1.1390697956085205,
-1.692231297492981,
-0.034079182893037796,
-0.3029017746448517,
0.2574809491634369,
-1.2035685777664185,
-1.5092222690582275,
0.6401326656341553,
0.6152669787406921,
0.6119202971458435,
-0.14538031816482544,
0.9920867085456848,
-1.2059683799743652,
0.8187751770019531,
-1.0896655321121216,
-1.748563528060913,
-1.447861909866333,
-2.328005790710449,
-2.407602310180664,
0.7657380700111389,
-0.4361203908920288,
-0.4022144079208374,
2.084202766418457,
-1.0048205852508545,
-1.6972213983535767,
1.1715102195739746,
0.284162700176239,
-0.11929483711719513,
2.487316370010376,
0.25852763652801514,
-0.8363862037658691,
0.6159499883651733,
-0.8644751310348511,
0.7136865258216858,
-0.28590190410614014,
1.2841033935546875,
0.4273547828197479,
-0.9469225406646729,
1.617275357246399,
-0.361096054315567,
0.5371482372283936,
-0.6020190715789795,
-0.42475709319114685,
-0.6592268943786621,
0.2645360231399536,
1.971511960029602,
-0.19846183061599731,
1.4559236764907837,
-0.2715396285057068,
-1.4943586587905884,
-1.4967740774154663,
0.8291183114051819,
0.37336477637290955,
-0.873365044593811,
0.17725440859794617,
-0.4320184588432312,
0.13658909499645233,
0.06248961389064789,
1.1926188468933105,
1.3123043775558472,
0.8390451669692993,
-0.33830004930496216,
-0.8790960311889648,
0.11060362309217453,
-0.07181155681610107,
-0.6857652068138123,
-1.6859437227249146,
-0.35881727933883667,
0.036666251718997955,
0.6780294179916382,
-1.2023416757583618,
1.7406007051467896,
0.9367175102233887,
1.8952187299728394,
1.0474635362625122,
-0.4027078151702881,
1.528472661972046,
0.10509014129638672,
1.9205474853515625,
-0.557277262210846,
0.6023003458976746,
-0.4769968092441559,
-1.2032209634780884,
0.7383908033370972,
-0.29041004180908203,
-2.0842435359954834,
-0.6036657691001892,
-0.8526449203491211,
-0.1993395835161209,
-0.8968707323074341,
0.9957835078239441,
-0.2627650499343872,
-1.4875952005386353,
0.3205997049808502,
-0.7468872666358948,
0.10766637325286865,
-1.274591326713562,
0.3377961218357086,
0.7257318496704102,
-0.6626811623573303,
0.15998238325119019,
-0.32814666628837585,
-1.3430099487304688,
-0.5275050401687622,
0.3427722752094269,
1.8297709226608276,
-0.8359079360961914,
0.9521046280860901,
1.0723596811294556,
-0.6343088150024414,
-0.016449004411697388,
0.3773069977760315,
-0.2995994985103607,
0.8561336994171143,
-1.013044834136963,
-0.5848836898803711,
1.1831448078155518,
-0.3133004605770111,
-0.4611002504825592,
1.3206515312194824,
0.6587397456169128,
-1.0209752321243286,
-0.32036134600639343,
-0.1143418699502945,
-0.8624293208122253,
0.05348357558250427,
-1.6119561195373535,
-0.1698005646467209,
0.33930593729019165,
-1.5458617210388184,
-0.5985324382781982,
-0.17374758422374725,
1.2254760265350342,
-0.011881007812917233,
1.3242360353469849,
-0.30494552850723267,
-0.2278958261013031,
-0.39820748567581177,
-0.4868178963661194,
0.17978151142597198,
-0.20545218884944916,
-0.5023238062858582,
0.2424136996269226,
-0.7754210829734802,
0.2249520868062973,
1.4693944454193115,
0.3284851312637329,
0.03396572172641754,
0.5123655796051025,
1.1864417791366577,
0.48749467730522156,
-0.14383432269096375,
-0.9264287948608398,
-1.5762776136398315,
2.0763702392578125,
-1.650367259979248,
1.9535375833511353,
0.6280181407928467,
-0.09407789260149002,
-1.7588573694229126,
-1.9092048406600952,
1.3974663019180298,
1.1162749528884888,
2.395214796066284,
0.5715634226799011,
0.3859408497810364,
-0.8687216639518738,
-0.6929188370704651,
0.41489002108573914,
-0.907355546951294,
-0.8026922941207886,
0.13022814691066742,
2.403771162033081,
1.7722927331924438,
-0.44263702630996704,
-0.1567961424589157,
-0.9565431475639343,
1.4586220979690552,
-0.2772412598133087,
0.2724594473838806,
1.985031247138977,
-0.3341692090034485,
-1.0197114944458008,
1.3480796813964844,
-2.4400713443756104,
0.18657243251800537,
1.964296579360962,
0.3307720124721527,
0.09761383384466171,
-1.3859031200408936,
-0.7015736103057861,
-0.20648296177387238,
-0.459770530462265,
-1.2719172239303589,
0.4257948696613312,
-0.26984092593193054,
-0.8643459677696228,
-1.4891127347946167,
0.07849591970443726,
-1.1544358730316162,
-1.6663947105407715,
0.2014635056257248,
1.8204407691955566,
2.198221206665039,
-0.8105966448783875,
1.51059091091156,
-0.2856500744819641,
0.2675289213657379,
1.2257437705993652,
1.1640584468841553,
3.1281373500823975,
1.9448801279067993,
-1.233502745628357,
0.5790723562240601,
-0.17716412246227264,
-0.42584967613220215,
1.1485499143600464,
-1.209877371788025,
1.2618739604949951,
-0.15366311371326447,
-1.184622049331665,
-1.1324501037597656,
0.9476999640464783,
0.3536575138568878,
-0.071727454662323,
-0.46636515855789185,
1.1869348287582397,
0.1644601672887802,
1.2940329313278198,
0.6403459310531616,
-0.28627297282218933,
0.5332563519477844,
-0.3824135363101959,
-0.40120717883110046,
1.5343867540359497,
0.19442521035671234,
-1.4858076572418213,
-2.2227447032928467,
-0.21336142718791962,
-0.9203304052352905,
0.09260937571525574,
-0.6464768052101135,
-1.005117416381836,
1.5861583948135376,
0.3810187876224518,
-1.0820273160934448,
-0.13616269826889038,
-0.4010241627693176,
-0.56832355260849,
2.705404043197632,
-1.3444329500198364,
-0.3184260129928589,
-0.917280912399292,
-0.6699422597885132,
1.5728992223739624,
-1.0973567962646484,
-0.17836584150791168,
-1.024634599685669,
-0.5603274703025818,
-1.3192431926727295,
-0.48293983936309814,
-0.026557913050055504,
-0.8993407487869263,
0.8598586916923523,
0.08827870339155197,
-1.1935031414031982,
-0.27982768416404724,
-1.0091673135757446,
0.8098953366279602,
-0.2041025608778,
0.17099644243717194,
1.864851713180542,
0.1918269544839859,
-0.36258840560913086,
0.8690600991249084,
1.274312973022461,
0.7219942808151245,
-0.5815858840942383,
0.2507379651069641,
-0.6588525176048279,
0.40438246726989746,
-1.152167558670044,
0.3332817554473877,
-2.8332486152648926,
0.5667965412139893,
-0.04460854083299637,
-0.09930436313152313,
-0.05886584520339966,
-1.3110591173171997,
1.0645054578781128,
2.5161690711975098,
-1.1616230010986328,
0.5502133369445801,
0.23252828419208527,
1.294962763786316,
-1.6211997270584106,
0.16906361281871796,
-0.5636290907859802,
2.1293773651123047,
0.1902441382408142,
1.0823900699615479,
-0.47795939445495605,
-2.3463199138641357,
0.6126782894134521,
-1.3069552183151245,
-1.0608576536178589,
0.6973811984062195,
-0.8802317380905151,
0.20649895071983337,
-1.3181167840957642,
-0.12315414100885391,
-0.872317373752594,
-1.1808089017868042,
0.4549177587032318,
0.1846478432416916,
0.504738986492157,
-0.5900018811225891,
0.25813305377960205,
-2.2824575901031494,
-1.4634406566619873,
-0.17200742661952972,
-0.939455509185791,
0.46654054522514343,
-0.4846227467060089,
0.8555940985679626,
-0.1652667224407196,
-0.10698094218969345,
0.3377073407173157,
1.5000858306884766,
3.238717555999756,
0.0827874094247818,
0.3172057867050171,
-0.23957036435604095,
-1.0570868253707886,
1.5136104822158813,
0.946184515953064,
-0.21085894107818604,
-0.5382005572319031,
-1.1117664575576782,
1.293690800666809,
1.980799913406372,
1.0347394943237305,
-0.025576144456863403,
-0.8064067363739014,
-0.6896909475326538,
0.10737556219100952,
0.25128260254859924,
0.582175076007843,
1.0205364227294922,
0.04786568135023117,
0.0944538563489914,
1.4985759258270264,
1.0834672451019287,
-0.3328154385089874,
0.3456248939037323,
-0.7951582074165344,
-0.40319111943244934,
0.5711438059806824,
0.19101440906524658,
0.016339031979441643,
0.1933584064245224,
-1.0979926586151123,
-0.26988041400909424,
-0.3924497663974762,
-0.858364462852478,
-0.6984702348709106,
-0.330898255109787,
-0.4403357207775116,
1.6877622604370117,
0.027766617015004158,
-0.5664269328117371,
-0.10652170330286026,
-0.7694409489631653,
-0.14844101667404175,
-0.993342936038971,
0.3218625485897064,
-0.17653228342533112,
-0.039700642228126526,
-0.16212332248687744,
1.8134472370147705,
-0.9536073207855225,
-2.1734423637390137,
0.19347096979618073,
0.25621938705444336,
-0.23388366401195526,
0.1527591347694397,
1.5735647678375244,
0.6530553102493286,
1.4142032861709595,
1.458081603050232,
1.002166986465454,
-0.6620426177978516,
-1.3778268098831177,
0.6933024525642395,
0.9338277578353882,
-1.3998422622680664,
0.8144235014915466,
-0.15364332497119904,
-0.5779061317443848,
0.5055577754974365,
1.3189494609832764,
0.44982168078422546,
-1.9477143287658691,
0.8640334010124207,
-1.1391881704330444,
0.8726749420166016,
0.7483217716217041,
0.6971050500869751,
0.10475336760282516,
0.7639822959899902,
-1.2365186214447021,
-1.0380933284759521,
-0.6922038793563843,
-0.68814617395401,
1.918787956237793,
-0.24161389470100403,
0.4793764650821686,
-0.17430999875068665,
-1.3018946647644043,
0.13906726241111755,
0.6331502199172974,
0.2766129970550537,
-0.416873961687088,
0.7867105603218079,
-0.7195471525192261,
-1.141068935394287,
-1.361321210861206,
-0.42300528287887573,
-1.0477887392044067,
-0.9702447652816772,
1.017802119255066,
0.6956936717033386,
0.33673539757728577,
1.8837934732437134,
0.7184901237487793,
0.2683715224266052,
-2.607337713241577,
1.0086338520050049,
0.2912817597389221,
-0.10870438814163208,
0.8383635878562927,
0.31246304512023926,
1.0989958047866821,
-0.12553885579109192,
0.6153671741485596,
-2.3785922527313232,
2.31796932220459,
-0.19509297609329224,
0.8095869421958923,
0.11492057889699936,
-0.054615266621112823,
1.016013503074646,
0.6154590845108032,
0.558180034160614,
-1.043175220489502,
0.6918274760246277,
-0.5894743800163269,
1.1638818979263306,
0.9265890717506409,
-0.7525409460067749,
0.11270797997713089,
1.1774808168411255,
0.47646453976631165,
-0.5708230137825012,
-0.9881578683853149,
-0.9519064426422119,
0.9290968775749207,
1.7745145559310913,
-0.08009424805641174,
0.038864463567733765,
0.8791437149047852,
0.6264440417289734,
-1.2438673973083496,
-0.01040168572217226,
-0.5969836711883545,
-0.6340975761413574,
1.7377479076385498,
2.0736451148986816,
-0.16990910470485687,
-0.0823630765080452,
-0.6258959770202637,
-1.414801836013794,
0.7304542660713196,
0.05328933149576187,
0.14251674711704254,
0.8608571290969849,
-0.6343177556991577,
1.1097975969314575,
0.8719444870948792,
0.9242278337478638,
0.24900823831558228,
0.16798782348632812,
0.2829188406467438,
-0.30528759956359863,
-1.1578139066696167,
-0.2914353609085083,
-0.9338111877441406,
-2.5164809226989746,
0.40067896246910095,
-0.2867915630340576,
-1.4063520431518555,
0.04812847822904587,
-0.8941572308540344,
0.9439178705215454,
-0.45544856786727905,
-1.0630028247833252,
-1.4123064279556274,
0.1909901350736618,
-0.060273341834545135,
0.9188966751098633,
-1.6065560579299927,
-0.1946742981672287,
1.241573691368103,
0.9644115567207336,
-0.6614351272583008,
0.9693978428840637,
0.27608251571655273,
0.9950647950172424,
0.7717990279197693,
-0.3286917507648468,
0.4707718789577484,
0.12158340960741043,
-1.3136931657791138,
0.4283921420574188,
1.2977187633514404,
0.16217616200447083,
1.4889339208602905,
-0.46274611353874207,
-0.08161856979131699,
0.39127010107040405,
-0.47346004843711853,
-0.5124450325965881,
-0.5960175395011902,
0.6253304481506348,
-0.08176544308662415,
-0.9056519269943237,
-0.04783713072538376,
0.09453363716602325,
-0.17391350865364075,
0.1314408928155899,
-1.4719263315200806,
-0.12263103574514389,
-0.5129852890968323,
-0.6089410185813904,
-1.2235077619552612,
-0.12396255135536194,
1.285967469215393,
-0.9009244441986084,
-0.11948011815547943,
0.5168768167495728,
0.2602485418319702,
0.5113921165466309,
0.6358038783073425,
-0.6886894702911377,
-0.2851482033729553,
-0.16989311575889587,
-0.36559566855430603,
0.25565478205680847,
1.3111505508422852,
-0.08981680124998093,
-1.0505928993225098,
0.6097690463066101,
-0.33887308835983276,
0.11090686917304993,
1.8173025846481323,
0.01993614435195923,
-0.8282533884048462,
0.327262818813324,
-0.7287620902061462,
1.936132788658142,
1.5621827840805054,
1.3931732177734375,
-0.21282844245433807,
-0.8995688557624817,
0.6244773268699646,
-0.4230826795101166,
-0.41132351756095886,
0.7290918827056885,
0.3368971645832062,
-0.2882671654224396,
-1.4027420282363892,
0.8090912699699402,
1.2376947402954102,
-0.9319534301757812,
-0.724785327911377,
0.2935999929904938,
-0.7292456030845642,
1.127079725265503,
0.7003483772277832,
0.35994186997413635,
0.2908884286880493,
1.6935030221939087,
0.8182955384254456,
-0.5612345337867737,
0.4542849063873291,
0.5108022689819336,
-0.1326330006122589,
-2.018397569656372,
-1.2115380764007568,
0.2427455484867096,
-0.626372754573822,
-1.524949550628662,
1.424963355064392,
-1.2118630409240723,
-0.9366492629051208,
0.6115095615386963,
0.12843981385231018,
1.3368526697158813,
0.38421085476875305,
1.5795018672943115,
2.0247862339019775,
0.8740792870521545,
0.5951521396636963,
1.2109849452972412,
-0.19585682451725006,
-0.3900591731071472,
1.6986607313156128,
-0.4149568974971771,
0.6681704521179199,
1.0745288133621216,
-0.3606646955013275,
-1.0749961137771606,
-0.7653651833534241,
-1.2397818565368652,
-0.7246217727661133,
1.0151848793029785,
0.07984186708927155,
-1.1279264688491821,
0.31496453285217285,
1.5150067806243896,
0.17286789417266846,
-0.3475860059261322,
0.6083451509475708,
0.39169275760650635,
-0.7545374631881714,
-0.11357871443033218,
-1.063352346420288,
0.532152533531189,
-0.420360803604126,
-0.45499733090400696,
0.21288934350013733,
0.4607427418231964,
1.3413525819778442,
0.12499134987592697,
0.15743134915828705,
1.265806794166565,
-1.3793236017227173,
1.4624344110488892,
-0.8757950663566589,
0.34611207246780396,
-2.3281712532043457,
1.4044835567474365,
-0.917565107345581,
1.9493012428283691,
-2.698496103286743,
0.5051674246788025,
-0.49175310134887695,
-0.45367172360420227,
0.15294156968593597,
-0.17535735666751862,
0.13181720674037933,
-0.06923525035381317,
-1.142612338066101,
-0.025980086997151375,
-0.7552972435951233,
0.4967346787452698,
1.1996235847473145,
1.4377202987670898,
-0.9918610453605652,
-0.29292717576026917,
-1.7000110149383545,
-0.0899776965379715,
-0.6530140042304993,
0.23771460354328156,
-1.924970269203186,
-0.18818026781082153,
-1.8621251583099365,
-2.348630428314209,
-1.2841590642929077,
-1.002188801765442,
1.2946237325668335,
0.09126049280166626,
-0.9565513134002686,
1.3020910024642944,
-0.3889583647251129,
-1.801072597503662,
1.139441967010498,
-2.1270365715026855
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | cc @sanchit-gandhi @Vaibhavs10 @lhoestq - this is mainly for demos that use Common Voice datasets as done here: https://github.com/facebookresearch/fairseq/tree/main/examples/mms#-transformers
| ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 98 | 19 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
cc @sanchit-gandhi @Vaibhavs10 @lhoestq - this is mainly for demos that use Common Voice datasets as done here: https://github.com/facebookresearch/fairseq/tree/main/examples/mms#-transformers
| [
-1.1828274726867676,
-0.9026130437850952,
-0.7007205486297607,
1.4918862581253052,
-0.16695676743984222,
-1.2437304258346558,
0.17341256141662598,
-1.1007229089736938,
1.6143853664398193,
-0.7065113186836243,
0.3441532850265503,
-1.661779522895813,
-0.027343031018972397,
-0.5935344696044922,
-0.7206245064735413,
-0.8954644203186035,
-0.39952337741851807,
-0.7853767275810242,
1.0343458652496338,
2.5070574283599854,
1.300734281539917,
-1.3665800094604492,
2.6775400638580322,
0.7429079413414001,
-0.19725960493087769,
-1.0163896083831787,
0.47270986437797546,
0.015035844407975674,
-1.2210841178894043,
-0.4706616997718811,
-0.9842897653579712,
-0.15871669352054596,
-0.5803332328796387,
-0.491342157125473,
0.012897047214210033,
0.4741268455982208,
-0.34339627623558044,
-0.4016497731208801,
-0.6365978121757507,
-0.8139573335647583,
0.5109125971794128,
-0.3990551233291626,
0.9373750686645508,
-0.39379236102104187,
1.7595661878585815,
-0.6399240493774414,
0.5307283401489258,
0.6991985440254211,
1.3614529371261597,
0.25187236070632935,
0.021014761179685593,
0.366153359413147,
0.3992851972579956,
-0.015706742182374,
0.5597294569015503,
1.1503703594207764,
0.6677371859550476,
0.5657486915588379,
0.6978853344917297,
-2.168440818786621,
1.2148187160491943,
-1.0213199853897095,
0.22229363024234772,
1.35579252243042,
-0.8980667591094971,
0.29853734374046326,
-1.840829849243164,
-0.07107150554656982,
0.586391270160675,
-2.250816583633423,
0.32909145951271057,
-1.3293213844299316,
-0.5205864310264587,
1.0414053201675415,
0.38768261671066284,
-1.2085999250411987,
0.13837769627571106,
-0.3965558111667633,
1.0000231266021729,
0.37672311067581177,
1.087527871131897,
-1.6977148056030273,
-0.04950243607163429,
-0.2954119145870209,
0.16167202591896057,
-1.2016074657440186,
-1.5443000793457031,
0.5520419478416443,
0.6047496199607849,
0.6043242812156677,
-0.14586909115314484,
1.0022751092910767,
-1.0447444915771484,
0.8300107717514038,
-1.0592257976531982,
-1.6926565170288086,
-1.450780987739563,
-2.31787371635437,
-2.3031468391418457,
0.8233427405357361,
-0.49040451645851135,
-0.490403950214386,
2.1111087799072266,
-0.9769635200500488,
-1.7101110219955444,
1.0866941213607788,
0.22226323187351227,
0.008990242145955563,
2.353113889694214,
0.18779554963111877,
-0.7382688522338867,
0.5168718099594116,
-0.7975025177001953,
0.7917007207870483,
-0.33400407433509827,
1.3525224924087524,
0.44004857540130615,
-1.0550216436386108,
1.6110038757324219,
-0.42425230145454407,
0.6153708100318909,
-0.6346820592880249,
-0.5369406342506409,
-0.7312363386154175,
0.34551483392715454,
1.9347267150878906,
-0.2625371217727661,
1.5362733602523804,
-0.28174543380737305,
-1.5526316165924072,
-1.56728994846344,
0.8585458397865295,
0.4610655605792999,
-0.78755784034729,
0.1241912767291069,
-0.36728528141975403,
0.15473482012748718,
-0.0650850385427475,
1.0958178043365479,
1.2712734937667847,
0.77194744348526,
-0.3294888436794281,
-0.8551146388053894,
0.15747959911823273,
-0.06610029935836792,
-0.8253520131111145,
-1.701064944267273,
-0.39435791969299316,
0.14412935078144073,
0.5747928023338318,
-1.2452032566070557,
1.8180640935897827,
0.863358736038208,
1.9626117944717407,
1.0007808208465576,
-0.36318451166152954,
1.459964394569397,
0.10277964174747467,
1.877610206604004,
-0.5074834227561951,
0.6225380301475525,
-0.41203680634498596,
-1.1939488649368286,
0.7939448356628418,
-0.3601102828979492,
-2.0819318294525146,
-0.7692029476165771,
-0.7130545377731323,
-0.15074306726455688,
-0.7786163091659546,
0.8931905627250671,
-0.28742527961730957,
-1.4205323457717896,
0.20344685018062592,
-0.6996225118637085,
0.13967332243919373,
-1.2729148864746094,
0.2881692945957184,
0.6900242567062378,
-0.6968272924423218,
0.12704983353614807,
-0.25884413719177246,
-1.2034562826156616,
-0.5093647837638855,
0.3356810510158539,
1.9109835624694824,
-0.6585962772369385,
0.8772408366203308,
0.9799489974975586,
-0.7590792179107666,
0.05293457955121994,
0.3273511528968811,
-0.2935117185115814,
0.784736156463623,
-1.065429449081421,
-0.4326285123825073,
1.2355133295059204,
-0.21470175683498383,
-0.6449156999588013,
1.376617431640625,
0.7180616855621338,
-1.0343316793441772,
-0.1903437227010727,
-0.21003474295139313,
-0.8710001707077026,
0.10095492005348206,
-1.549053430557251,
-0.09455213695764542,
0.4187508523464203,
-1.5144604444503784,
-0.44911521673202515,
-0.17775623500347137,
1.2960563898086548,
-0.182645782828331,
1.3476999998092651,
-0.3641112446784973,
-0.1762835830450058,
-0.28726720809936523,
-0.4083321988582611,
0.10600775480270386,
-0.240911602973938,
-0.5956906080245972,
0.17925551533699036,
-0.7356035113334656,
0.35877421498298645,
1.3964755535125732,
0.26602041721343994,
0.035304415971040726,
0.4602185785770416,
1.0812928676605225,
0.3725210130214691,
-0.10177768021821976,
-0.9507840275764465,
-1.5213706493377686,
1.9626268148422241,
-1.4023637771606445,
1.9890878200531006,
0.8226905465126038,
-0.02710508182644844,
-1.769094467163086,
-1.8507033586502075,
1.2683258056640625,
1.1660449504852295,
2.3695783615112305,
0.5843609571456909,
0.3734484314918518,
-0.8652307391166687,
-0.6623716950416565,
0.31421372294425964,
-1.0146417617797852,
-0.7487269639968872,
0.17420387268066406,
2.4351372718811035,
1.7780979871749878,
-0.46730557084083557,
-0.24188372492790222,
-0.9967747330665588,
1.3778162002563477,
-0.24016475677490234,
0.2161768227815628,
1.9926973581314087,
-0.25952133536338806,
-1.0238648653030396,
1.3362493515014648,
-2.3251943588256836,
0.1597655713558197,
2.056899309158325,
0.29283463954925537,
0.12248589843511581,
-1.393673062324524,
-0.677661657333374,
-0.2610149681568146,
-0.4240751266479492,
-1.186432957649231,
0.4712829291820526,
-0.2414107322692871,
-0.714587926864624,
-1.4137924909591675,
0.15026971697807312,
-1.1156842708587646,
-1.63609778881073,
0.231045201420784,
1.897569179534912,
1.9791028499603271,
-0.7779264450073242,
1.5023179054260254,
-0.3164730966091156,
0.06093759462237358,
1.3047558069229126,
1.2717803716659546,
3.1133804321289062,
1.8710923194885254,
-1.2644797563552856,
0.6981408596038818,
-0.21529361605644226,
-0.44774767756462097,
1.1941345930099487,
-1.2134449481964111,
1.241289496421814,
-0.14179393649101257,
-1.1246992349624634,
-1.2172716856002808,
0.9275724291801453,
0.4767628312110901,
0.05980192497372627,
-0.507564127445221,
1.1331288814544678,
0.15629780292510986,
1.329848289489746,
0.6136435270309448,
-0.3579600751399994,
0.6055612564086914,
-0.3257482051849365,
-0.4812149405479431,
1.5658682584762573,
0.21394279599189758,
-1.4556872844696045,
-2.349132537841797,
-0.21998684108257294,
-0.9101735353469849,
0.012325984425842762,
-0.6488146185874939,
-1.040831208229065,
1.6695239543914795,
0.28098562359809875,
-1.2360633611679077,
-0.23345154523849487,
-0.38356804847717285,
-0.5609756708145142,
2.7207963466644287,
-1.348648190498352,
-0.1876494288444519,
-1.0050437450408936,
-0.6227954626083374,
1.6564760208129883,
-1.1758811473846436,
-0.18762145936489105,
-1.0536212921142578,
-0.5331956148147583,
-1.2370796203613281,
-0.49601882696151733,
0.1077016144990921,
-0.9023821353912354,
0.8654448986053467,
0.23922120034694672,
-1.2344129085540771,
-0.36759206652641296,
-0.8846132755279541,
0.9330646395683289,
-0.08393978327512741,
0.17255358397960663,
1.9356755018234253,
0.37349000573158264,
-0.33035025000572205,
0.7316871881484985,
1.2009345293045044,
0.5720891952514648,
-0.605633020401001,
0.2149239033460617,
-0.6340513229370117,
0.3231196999549866,
-1.3707127571105957,
0.2341376394033432,
-2.817126512527466,
0.6353655457496643,
-0.11612547188997269,
-0.11136943846940994,
-0.0060467650182545185,
-1.3292615413665771,
1.0827302932739258,
2.611248731613159,
-1.182150959968567,
0.46661821007728577,
0.3623163104057312,
1.1804462671279907,
-1.6308740377426147,
0.27881932258605957,
-0.44040319323539734,
2.052205801010132,
0.1816287785768509,
1.2202770709991455,
-0.5179499983787537,
-2.2814037799835205,
0.5976034998893738,
-1.2380493879318237,
-1.2349756956100464,
0.7882999181747437,
-0.8679870367050171,
0.15615089237689972,
-1.4212045669555664,
-0.24029631912708282,
-0.8271217346191406,
-1.18467116355896,
0.7317383289337158,
0.1251465380191803,
0.4479306638240814,
-0.6093559265136719,
0.34959790110588074,
-2.220093250274658,
-1.4054532051086426,
-0.23815220594406128,
-0.9243139028549194,
0.46197590231895447,
-0.38144123554229736,
0.6522032022476196,
-0.16821764409542084,
-0.013000035658478737,
0.38340070843696594,
1.5708566904067993,
3.383242607116699,
0.17013323307037354,
0.2541789412498474,
-0.16540051996707916,
-0.9716295599937439,
1.4459161758422852,
0.8354389667510986,
-0.09390202909708023,
-0.5780202746391296,
-1.0779322385787964,
1.2074916362762451,
2.012160301208496,
1.049076795578003,
0.03235064446926117,
-0.8176005482673645,
-0.74986732006073,
-0.039964962750673294,
0.1482812911272049,
0.4435690641403198,
0.9136601090431213,
0.030747275799512863,
0.017612837255001068,
1.4272245168685913,
1.1430450677871704,
-0.3923562169075012,
0.3401036560535431,
-0.8371531367301941,
-0.48636993765830994,
0.46370038390159607,
0.28429707884788513,
-0.005009221378713846,
0.4052819311618805,
-0.9921466708183289,
-0.2753733694553375,
-0.3865128755569458,
-0.8777637481689453,
-0.7348527908325195,
-0.4941568970680237,
-0.3763587176799774,
1.6534466743469238,
0.11877872794866562,
-0.5164656639099121,
-0.012739555910229683,
-0.772519588470459,
-0.12752708792686462,
-1.0714967250823975,
0.22108839452266693,
-0.08557070046663284,
-0.14339886605739594,
-0.16703122854232788,
1.6757028102874756,
-0.9446339011192322,
-2.094240188598633,
0.24262113869190216,
0.2698139250278473,
-0.291594922542572,
0.1927158236503601,
1.65919029712677,
0.5179468989372253,
1.4236429929733276,
1.341124176979065,
0.9529269933700562,
-0.6419127583503723,
-1.3363797664642334,
0.6703310012817383,
0.9952623248100281,
-1.3548603057861328,
0.8191064596176147,
-0.03575475141406059,
-0.46292975544929504,
0.5541808009147644,
1.225530743598938,
0.49300339818000793,
-1.915494680404663,
0.7753671407699585,
-0.9359375834465027,
0.727304995059967,
0.7270828485488892,
0.7116873264312744,
0.20872779190540314,
0.7957209944725037,
-1.1882672309875488,
-1.1489404439926147,
-0.6892314553260803,
-0.7066112160682678,
1.9777460098266602,
-0.27728942036628723,
0.6169109344482422,
-0.19620269536972046,
-1.3223711252212524,
-0.10187584906816483,
0.8026426434516907,
0.4143920838832855,
-0.5246747732162476,
0.8353825211524963,
-0.6370737552642822,
-1.0127644538879395,
-1.3305776119232178,
-0.43435466289520264,
-1.0515973567962646,
-0.9202731251716614,
1.0034573078155518,
0.7680374979972839,
0.3624677360057831,
1.9293346405029297,
0.742546558380127,
0.30998843908309937,
-2.6301589012145996,
0.9115333557128906,
0.2895192503929138,
-0.051667653024196625,
0.8934543132781982,
0.3598668575286865,
1.0048234462738037,
-0.010918542742729187,
0.6266553997993469,
-2.391658306121826,
2.3602349758148193,
-0.19348759949207306,
0.6057674288749695,
-0.02299993485212326,
-0.18303515017032623,
1.109570860862732,
0.5372604131698608,
0.46969932317733765,
-1.0738600492477417,
0.6002050638198853,
-0.5839085578918457,
1.1924729347229004,
0.8523620963096619,
-0.8311298489570618,
-0.014394845813512802,
1.3807746171951294,
0.4901835322380066,
-0.4752424955368042,
-1.0125668048858643,
-0.8692150712013245,
1.018690586090088,
1.6814758777618408,
-0.03670087829232216,
-0.03660803288221359,
0.9089716076850891,
0.6287415623664856,
-1.2928204536437988,
0.04822356253862381,
-0.7675827145576477,
-0.7662497162818909,
1.6943753957748413,
2.0866944789886475,
-0.10055570304393768,
-0.3059958219528198,
-0.7449141144752502,
-1.2574282884597778,
0.8548371195793152,
-0.023750633001327515,
0.09877718985080719,
0.6641818284988403,
-0.6309079527854919,
1.0641320943832397,
0.8472210168838501,
0.9677860736846924,
0.24463282525539398,
0.28327083587646484,
0.39846721291542053,
-0.39036983251571655,
-1.163252830505371,
-0.22013378143310547,
-1.1149972677230835,
-2.5742602348327637,
0.47255274653434753,
-0.16747188568115234,
-1.4604473114013672,
0.07081706821918488,
-1.0586731433868408,
0.9054601192474365,
-0.6229415535926819,
-1.0816881656646729,
-1.5420842170715332,
0.24911580979824066,
-0.07481338828802109,
0.9447245597839355,
-1.642256498336792,
-0.1521732062101364,
1.1528024673461914,
0.8550804853439331,
-0.704689085483551,
0.8489112257957458,
0.148994579911232,
1.0623530149459839,
0.8789463639259338,
-0.36235326528549194,
0.5408947467803955,
0.004179026000201702,
-1.3667436838150024,
0.4226488471031189,
1.1958558559417725,
0.17931610345840454,
1.500472068786621,
-0.5042197704315186,
0.041271619498729706,
0.3936694264411926,
-0.5555306077003479,
-0.4640418291091919,
-0.48934340476989746,
0.6337950825691223,
0.10583236068487167,
-1.027522087097168,
-0.0534072108566761,
-0.007433701306581497,
-0.20936110615730286,
0.15354105830192566,
-1.4440399408340454,
-0.14857664704322815,
-0.3884527087211609,
-0.6045900583267212,
-1.2608023881912231,
-0.050177596509456635,
1.3431042432785034,
-0.7411287426948547,
-0.19828496873378754,
0.5488036870956421,
0.3050517737865448,
0.49167922139167786,
0.560118556022644,
-0.7181734442710876,
-0.2720147669315338,
-0.24648156762123108,
-0.39451172947883606,
0.2938755750656128,
1.342490553855896,
-0.06845597922801971,
-0.981684684753418,
0.7038486003875732,
-0.3220685124397278,
0.17210808396339417,
1.980430245399475,
0.05576738342642784,
-0.7636419534683228,
0.26689285039901733,
-0.6695259809494019,
1.8758364915847778,
1.7349417209625244,
1.267267107963562,
-0.1100422814488411,
-0.9127258658409119,
0.6604562401771545,
-0.37318021059036255,
-0.3437485098838806,
0.8201485872268677,
0.3216080665588379,
-0.19347906112670898,
-1.394619345664978,
0.7006056308746338,
1.3093912601470947,
-0.8142791390419006,
-0.8434140086174011,
0.11697755008935928,
-0.8358587026596069,
1.0822123289108276,
0.6372455358505249,
0.37326663732528687,
0.30127236247062683,
1.6201037168502808,
0.8592372536659241,
-0.3580043315887451,
0.6008318662643433,
0.5426221489906311,
-0.163519948720932,
-2.1118128299713135,
-1.1921718120574951,
0.3399726152420044,
-0.5113474130630493,
-1.6124728918075562,
1.4125856161117554,
-1.2040343284606934,
-0.9723164439201355,
0.609833836555481,
0.0894952192902565,
1.4786925315856934,
0.3486868441104889,
1.5857887268066406,
2.0903573036193848,
0.9050720930099487,
0.4603146016597748,
1.2333958148956299,
-0.09178543835878372,
-0.4980444014072418,
1.810096263885498,
-0.419535368680954,
0.5067641139030457,
1.0616798400878906,
-0.27238577604293823,
-1.0676417350769043,
-0.7966486811637878,
-1.2919349670410156,
-0.7551878094673157,
1.1932485103607178,
0.06928428262472153,
-1.0833327770233154,
0.31088492274284363,
1.7006324529647827,
0.06517774611711502,
-0.3120262324810028,
0.6423299312591553,
0.4066743850708008,
-0.8595103621482849,
-0.020465083420276642,
-0.874089241027832,
0.5320572853088379,
-0.18203110992908478,
-0.36648029088974,
0.335371732711792,
0.4642234742641449,
1.390575647354126,
-0.0639791265130043,
0.11478348821401596,
1.0497844219207764,
-1.4219059944152832,
1.5090194940567017,
-0.6674285531044006,
0.3022203743457794,
-2.3726401329040527,
1.4157264232635498,
-0.8132186532020569,
1.860230565071106,
-2.627271890640259,
0.4774037003517151,
-0.5105263590812683,
-0.49828964471817017,
0.23929135501384735,
-0.45429664850234985,
0.19138595461845398,
-0.06898532807826996,
-1.103825330734253,
-0.039720937609672546,
-0.7303730249404907,
0.6331748962402344,
1.1427855491638184,
1.4183158874511719,
-1.0472726821899414,
-0.2767843008041382,
-1.7546759843826294,
-0.17264731228351593,
-0.6784354448318481,
0.3328331410884857,
-1.9786045551300049,
-0.13308106362819672,
-1.95822274684906,
-2.3417680263519287,
-1.2710169553756714,
-0.8300260901451111,
1.0609079599380493,
0.11232845485210419,
-0.9151615500450134,
1.1938432455062866,
-0.38749048113822937,
-1.815995693206787,
1.135390281677246,
-2.213128089904785
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Hi ! the error for me is
```
FileNotFoundError: Couldn't find a dataset script at /content/mozilla-foundation/common_voice_13_0/common_voice_13_0.py or any data file in the same directory. Couldn't find 'mozilla-foundation/common_voice_13_0' on the Hugging Face Hub either: FileNotFoundError: Dataset 'mozilla-foundation/common_voice_13_0' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
And tbh idk how you managed to get your error. "n_shards.json" is not even a thing in `datasets` | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 98 | 75 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Hi ! the error for me is
```
FileNotFoundError: Couldn't find a dataset script at /content/mozilla-foundation/common_voice_13_0/common_voice_13_0.py or any data file in the same directory. Couldn't find 'mozilla-foundation/common_voice_13_0' on the Hugging Face Hub either: FileNotFoundError: Dataset 'mozilla-foundation/common_voice_13_0' doesn't exist on the Hub. If the repo is private or gated, make sure to log in with `huggingface-cli login`.
```
And tbh idk how you managed to get your error. "n_shards.json" is not even a thing in `datasets` | [
-1.1828274726867676,
-0.9026130437850952,
-0.7007205486297607,
1.4918862581253052,
-0.16695676743984222,
-1.2437304258346558,
0.17341256141662598,
-1.1007229089736938,
1.6143853664398193,
-0.7065113186836243,
0.3441532850265503,
-1.661779522895813,
-0.027343031018972397,
-0.5935344696044922,
-0.7206245064735413,
-0.8954644203186035,
-0.39952337741851807,
-0.7853767275810242,
1.0343458652496338,
2.5070574283599854,
1.300734281539917,
-1.3665800094604492,
2.6775400638580322,
0.7429079413414001,
-0.19725960493087769,
-1.0163896083831787,
0.47270986437797546,
0.015035844407975674,
-1.2210841178894043,
-0.4706616997718811,
-0.9842897653579712,
-0.15871669352054596,
-0.5803332328796387,
-0.491342157125473,
0.012897047214210033,
0.4741268455982208,
-0.34339627623558044,
-0.4016497731208801,
-0.6365978121757507,
-0.8139573335647583,
0.5109125971794128,
-0.3990551233291626,
0.9373750686645508,
-0.39379236102104187,
1.7595661878585815,
-0.6399240493774414,
0.5307283401489258,
0.6991985440254211,
1.3614529371261597,
0.25187236070632935,
0.021014761179685593,
0.366153359413147,
0.3992851972579956,
-0.015706742182374,
0.5597294569015503,
1.1503703594207764,
0.6677371859550476,
0.5657486915588379,
0.6978853344917297,
-2.168440818786621,
1.2148187160491943,
-1.0213199853897095,
0.22229363024234772,
1.35579252243042,
-0.8980667591094971,
0.29853734374046326,
-1.840829849243164,
-0.07107150554656982,
0.586391270160675,
-2.250816583633423,
0.32909145951271057,
-1.3293213844299316,
-0.5205864310264587,
1.0414053201675415,
0.38768261671066284,
-1.2085999250411987,
0.13837769627571106,
-0.3965558111667633,
1.0000231266021729,
0.37672311067581177,
1.087527871131897,
-1.6977148056030273,
-0.04950243607163429,
-0.2954119145870209,
0.16167202591896057,
-1.2016074657440186,
-1.5443000793457031,
0.5520419478416443,
0.6047496199607849,
0.6043242812156677,
-0.14586909115314484,
1.0022751092910767,
-1.0447444915771484,
0.8300107717514038,
-1.0592257976531982,
-1.6926565170288086,
-1.450780987739563,
-2.31787371635437,
-2.3031468391418457,
0.8233427405357361,
-0.49040451645851135,
-0.490403950214386,
2.1111087799072266,
-0.9769635200500488,
-1.7101110219955444,
1.0866941213607788,
0.22226323187351227,
0.008990242145955563,
2.353113889694214,
0.18779554963111877,
-0.7382688522338867,
0.5168718099594116,
-0.7975025177001953,
0.7917007207870483,
-0.33400407433509827,
1.3525224924087524,
0.44004857540130615,
-1.0550216436386108,
1.6110038757324219,
-0.42425230145454407,
0.6153708100318909,
-0.6346820592880249,
-0.5369406342506409,
-0.7312363386154175,
0.34551483392715454,
1.9347267150878906,
-0.2625371217727661,
1.5362733602523804,
-0.28174543380737305,
-1.5526316165924072,
-1.56728994846344,
0.8585458397865295,
0.4610655605792999,
-0.78755784034729,
0.1241912767291069,
-0.36728528141975403,
0.15473482012748718,
-0.0650850385427475,
1.0958178043365479,
1.2712734937667847,
0.77194744348526,
-0.3294888436794281,
-0.8551146388053894,
0.15747959911823273,
-0.06610029935836792,
-0.8253520131111145,
-1.701064944267273,
-0.39435791969299316,
0.14412935078144073,
0.5747928023338318,
-1.2452032566070557,
1.8180640935897827,
0.863358736038208,
1.9626117944717407,
1.0007808208465576,
-0.36318451166152954,
1.459964394569397,
0.10277964174747467,
1.877610206604004,
-0.5074834227561951,
0.6225380301475525,
-0.41203680634498596,
-1.1939488649368286,
0.7939448356628418,
-0.3601102828979492,
-2.0819318294525146,
-0.7692029476165771,
-0.7130545377731323,
-0.15074306726455688,
-0.7786163091659546,
0.8931905627250671,
-0.28742527961730957,
-1.4205323457717896,
0.20344685018062592,
-0.6996225118637085,
0.13967332243919373,
-1.2729148864746094,
0.2881692945957184,
0.6900242567062378,
-0.6968272924423218,
0.12704983353614807,
-0.25884413719177246,
-1.2034562826156616,
-0.5093647837638855,
0.3356810510158539,
1.9109835624694824,
-0.6585962772369385,
0.8772408366203308,
0.9799489974975586,
-0.7590792179107666,
0.05293457955121994,
0.3273511528968811,
-0.2935117185115814,
0.784736156463623,
-1.065429449081421,
-0.4326285123825073,
1.2355133295059204,
-0.21470175683498383,
-0.6449156999588013,
1.376617431640625,
0.7180616855621338,
-1.0343316793441772,
-0.1903437227010727,
-0.21003474295139313,
-0.8710001707077026,
0.10095492005348206,
-1.549053430557251,
-0.09455213695764542,
0.4187508523464203,
-1.5144604444503784,
-0.44911521673202515,
-0.17775623500347137,
1.2960563898086548,
-0.182645782828331,
1.3476999998092651,
-0.3641112446784973,
-0.1762835830450058,
-0.28726720809936523,
-0.4083321988582611,
0.10600775480270386,
-0.240911602973938,
-0.5956906080245972,
0.17925551533699036,
-0.7356035113334656,
0.35877421498298645,
1.3964755535125732,
0.26602041721343994,
0.035304415971040726,
0.4602185785770416,
1.0812928676605225,
0.3725210130214691,
-0.10177768021821976,
-0.9507840275764465,
-1.5213706493377686,
1.9626268148422241,
-1.4023637771606445,
1.9890878200531006,
0.8226905465126038,
-0.02710508182644844,
-1.769094467163086,
-1.8507033586502075,
1.2683258056640625,
1.1660449504852295,
2.3695783615112305,
0.5843609571456909,
0.3734484314918518,
-0.8652307391166687,
-0.6623716950416565,
0.31421372294425964,
-1.0146417617797852,
-0.7487269639968872,
0.17420387268066406,
2.4351372718811035,
1.7780979871749878,
-0.46730557084083557,
-0.24188372492790222,
-0.9967747330665588,
1.3778162002563477,
-0.24016475677490234,
0.2161768227815628,
1.9926973581314087,
-0.25952133536338806,
-1.0238648653030396,
1.3362493515014648,
-2.3251943588256836,
0.1597655713558197,
2.056899309158325,
0.29283463954925537,
0.12248589843511581,
-1.393673062324524,
-0.677661657333374,
-0.2610149681568146,
-0.4240751266479492,
-1.186432957649231,
0.4712829291820526,
-0.2414107322692871,
-0.714587926864624,
-1.4137924909591675,
0.15026971697807312,
-1.1156842708587646,
-1.63609778881073,
0.231045201420784,
1.897569179534912,
1.9791028499603271,
-0.7779264450073242,
1.5023179054260254,
-0.3164730966091156,
0.06093759462237358,
1.3047558069229126,
1.2717803716659546,
3.1133804321289062,
1.8710923194885254,
-1.2644797563552856,
0.6981408596038818,
-0.21529361605644226,
-0.44774767756462097,
1.1941345930099487,
-1.2134449481964111,
1.241289496421814,
-0.14179393649101257,
-1.1246992349624634,
-1.2172716856002808,
0.9275724291801453,
0.4767628312110901,
0.05980192497372627,
-0.507564127445221,
1.1331288814544678,
0.15629780292510986,
1.329848289489746,
0.6136435270309448,
-0.3579600751399994,
0.6055612564086914,
-0.3257482051849365,
-0.4812149405479431,
1.5658682584762573,
0.21394279599189758,
-1.4556872844696045,
-2.349132537841797,
-0.21998684108257294,
-0.9101735353469849,
0.012325984425842762,
-0.6488146185874939,
-1.040831208229065,
1.6695239543914795,
0.28098562359809875,
-1.2360633611679077,
-0.23345154523849487,
-0.38356804847717285,
-0.5609756708145142,
2.7207963466644287,
-1.348648190498352,
-0.1876494288444519,
-1.0050437450408936,
-0.6227954626083374,
1.6564760208129883,
-1.1758811473846436,
-0.18762145936489105,
-1.0536212921142578,
-0.5331956148147583,
-1.2370796203613281,
-0.49601882696151733,
0.1077016144990921,
-0.9023821353912354,
0.8654448986053467,
0.23922120034694672,
-1.2344129085540771,
-0.36759206652641296,
-0.8846132755279541,
0.9330646395683289,
-0.08393978327512741,
0.17255358397960663,
1.9356755018234253,
0.37349000573158264,
-0.33035025000572205,
0.7316871881484985,
1.2009345293045044,
0.5720891952514648,
-0.605633020401001,
0.2149239033460617,
-0.6340513229370117,
0.3231196999549866,
-1.3707127571105957,
0.2341376394033432,
-2.817126512527466,
0.6353655457496643,
-0.11612547188997269,
-0.11136943846940994,
-0.0060467650182545185,
-1.3292615413665771,
1.0827302932739258,
2.611248731613159,
-1.182150959968567,
0.46661821007728577,
0.3623163104057312,
1.1804462671279907,
-1.6308740377426147,
0.27881932258605957,
-0.44040319323539734,
2.052205801010132,
0.1816287785768509,
1.2202770709991455,
-0.5179499983787537,
-2.2814037799835205,
0.5976034998893738,
-1.2380493879318237,
-1.2349756956100464,
0.7882999181747437,
-0.8679870367050171,
0.15615089237689972,
-1.4212045669555664,
-0.24029631912708282,
-0.8271217346191406,
-1.18467116355896,
0.7317383289337158,
0.1251465380191803,
0.4479306638240814,
-0.6093559265136719,
0.34959790110588074,
-2.220093250274658,
-1.4054532051086426,
-0.23815220594406128,
-0.9243139028549194,
0.46197590231895447,
-0.38144123554229736,
0.6522032022476196,
-0.16821764409542084,
-0.013000035658478737,
0.38340070843696594,
1.5708566904067993,
3.383242607116699,
0.17013323307037354,
0.2541789412498474,
-0.16540051996707916,
-0.9716295599937439,
1.4459161758422852,
0.8354389667510986,
-0.09390202909708023,
-0.5780202746391296,
-1.0779322385787964,
1.2074916362762451,
2.012160301208496,
1.049076795578003,
0.03235064446926117,
-0.8176005482673645,
-0.74986732006073,
-0.039964962750673294,
0.1482812911272049,
0.4435690641403198,
0.9136601090431213,
0.030747275799512863,
0.017612837255001068,
1.4272245168685913,
1.1430450677871704,
-0.3923562169075012,
0.3401036560535431,
-0.8371531367301941,
-0.48636993765830994,
0.46370038390159607,
0.28429707884788513,
-0.005009221378713846,
0.4052819311618805,
-0.9921466708183289,
-0.2753733694553375,
-0.3865128755569458,
-0.8777637481689453,
-0.7348527908325195,
-0.4941568970680237,
-0.3763587176799774,
1.6534466743469238,
0.11877872794866562,
-0.5164656639099121,
-0.012739555910229683,
-0.772519588470459,
-0.12752708792686462,
-1.0714967250823975,
0.22108839452266693,
-0.08557070046663284,
-0.14339886605739594,
-0.16703122854232788,
1.6757028102874756,
-0.9446339011192322,
-2.094240188598633,
0.24262113869190216,
0.2698139250278473,
-0.291594922542572,
0.1927158236503601,
1.65919029712677,
0.5179468989372253,
1.4236429929733276,
1.341124176979065,
0.9529269933700562,
-0.6419127583503723,
-1.3363797664642334,
0.6703310012817383,
0.9952623248100281,
-1.3548603057861328,
0.8191064596176147,
-0.03575475141406059,
-0.46292975544929504,
0.5541808009147644,
1.225530743598938,
0.49300339818000793,
-1.915494680404663,
0.7753671407699585,
-0.9359375834465027,
0.727304995059967,
0.7270828485488892,
0.7116873264312744,
0.20872779190540314,
0.7957209944725037,
-1.1882672309875488,
-1.1489404439926147,
-0.6892314553260803,
-0.7066112160682678,
1.9777460098266602,
-0.27728942036628723,
0.6169109344482422,
-0.19620269536972046,
-1.3223711252212524,
-0.10187584906816483,
0.8026426434516907,
0.4143920838832855,
-0.5246747732162476,
0.8353825211524963,
-0.6370737552642822,
-1.0127644538879395,
-1.3305776119232178,
-0.43435466289520264,
-1.0515973567962646,
-0.9202731251716614,
1.0034573078155518,
0.7680374979972839,
0.3624677360057831,
1.9293346405029297,
0.742546558380127,
0.30998843908309937,
-2.6301589012145996,
0.9115333557128906,
0.2895192503929138,
-0.051667653024196625,
0.8934543132781982,
0.3598668575286865,
1.0048234462738037,
-0.010918542742729187,
0.6266553997993469,
-2.391658306121826,
2.3602349758148193,
-0.19348759949207306,
0.6057674288749695,
-0.02299993485212326,
-0.18303515017032623,
1.109570860862732,
0.5372604131698608,
0.46969932317733765,
-1.0738600492477417,
0.6002050638198853,
-0.5839085578918457,
1.1924729347229004,
0.8523620963096619,
-0.8311298489570618,
-0.014394845813512802,
1.3807746171951294,
0.4901835322380066,
-0.4752424955368042,
-1.0125668048858643,
-0.8692150712013245,
1.018690586090088,
1.6814758777618408,
-0.03670087829232216,
-0.03660803288221359,
0.9089716076850891,
0.6287415623664856,
-1.2928204536437988,
0.04822356253862381,
-0.7675827145576477,
-0.7662497162818909,
1.6943753957748413,
2.0866944789886475,
-0.10055570304393768,
-0.3059958219528198,
-0.7449141144752502,
-1.2574282884597778,
0.8548371195793152,
-0.023750633001327515,
0.09877718985080719,
0.6641818284988403,
-0.6309079527854919,
1.0641320943832397,
0.8472210168838501,
0.9677860736846924,
0.24463282525539398,
0.28327083587646484,
0.39846721291542053,
-0.39036983251571655,
-1.163252830505371,
-0.22013378143310547,
-1.1149972677230835,
-2.5742602348327637,
0.47255274653434753,
-0.16747188568115234,
-1.4604473114013672,
0.07081706821918488,
-1.0586731433868408,
0.9054601192474365,
-0.6229415535926819,
-1.0816881656646729,
-1.5420842170715332,
0.24911580979824066,
-0.07481338828802109,
0.9447245597839355,
-1.642256498336792,
-0.1521732062101364,
1.1528024673461914,
0.8550804853439331,
-0.704689085483551,
0.8489112257957458,
0.148994579911232,
1.0623530149459839,
0.8789463639259338,
-0.36235326528549194,
0.5408947467803955,
0.004179026000201702,
-1.3667436838150024,
0.4226488471031189,
1.1958558559417725,
0.17931610345840454,
1.500472068786621,
-0.5042197704315186,
0.041271619498729706,
0.3936694264411926,
-0.5555306077003479,
-0.4640418291091919,
-0.48934340476989746,
0.6337950825691223,
0.10583236068487167,
-1.027522087097168,
-0.0534072108566761,
-0.007433701306581497,
-0.20936110615730286,
0.15354105830192566,
-1.4440399408340454,
-0.14857664704322815,
-0.3884527087211609,
-0.6045900583267212,
-1.2608023881912231,
-0.050177596509456635,
1.3431042432785034,
-0.7411287426948547,
-0.19828496873378754,
0.5488036870956421,
0.3050517737865448,
0.49167922139167786,
0.560118556022644,
-0.7181734442710876,
-0.2720147669315338,
-0.24648156762123108,
-0.39451172947883606,
0.2938755750656128,
1.342490553855896,
-0.06845597922801971,
-0.981684684753418,
0.7038486003875732,
-0.3220685124397278,
0.17210808396339417,
1.980430245399475,
0.05576738342642784,
-0.7636419534683228,
0.26689285039901733,
-0.6695259809494019,
1.8758364915847778,
1.7349417209625244,
1.267267107963562,
-0.1100422814488411,
-0.9127258658409119,
0.6604562401771545,
-0.37318021059036255,
-0.3437485098838806,
0.8201485872268677,
0.3216080665588379,
-0.19347906112670898,
-1.394619345664978,
0.7006056308746338,
1.3093912601470947,
-0.8142791390419006,
-0.8434140086174011,
0.11697755008935928,
-0.8358587026596069,
1.0822123289108276,
0.6372455358505249,
0.37326663732528687,
0.30127236247062683,
1.6201037168502808,
0.8592372536659241,
-0.3580043315887451,
0.6008318662643433,
0.5426221489906311,
-0.163519948720932,
-2.1118128299713135,
-1.1921718120574951,
0.3399726152420044,
-0.5113474130630493,
-1.6124728918075562,
1.4125856161117554,
-1.2040343284606934,
-0.9723164439201355,
0.609833836555481,
0.0894952192902565,
1.4786925315856934,
0.3486868441104889,
1.5857887268066406,
2.0903573036193848,
0.9050720930099487,
0.4603146016597748,
1.2333958148956299,
-0.09178543835878372,
-0.4980444014072418,
1.810096263885498,
-0.419535368680954,
0.5067641139030457,
1.0616798400878906,
-0.27238577604293823,
-1.0676417350769043,
-0.7966486811637878,
-1.2919349670410156,
-0.7551878094673157,
1.1932485103607178,
0.06928428262472153,
-1.0833327770233154,
0.31088492274284363,
1.7006324529647827,
0.06517774611711502,
-0.3120262324810028,
0.6423299312591553,
0.4066743850708008,
-0.8595103621482849,
-0.020465083420276642,
-0.874089241027832,
0.5320572853088379,
-0.18203110992908478,
-0.36648029088974,
0.335371732711792,
0.4642234742641449,
1.390575647354126,
-0.0639791265130043,
0.11478348821401596,
1.0497844219207764,
-1.4219059944152832,
1.5090194940567017,
-0.6674285531044006,
0.3022203743457794,
-2.3726401329040527,
1.4157264232635498,
-0.8132186532020569,
1.860230565071106,
-2.627271890640259,
0.4774037003517151,
-0.5105263590812683,
-0.49828964471817017,
0.23929135501384735,
-0.45429664850234985,
0.19138595461845398,
-0.06898532807826996,
-1.103825330734253,
-0.039720937609672546,
-0.7303730249404907,
0.6331748962402344,
1.1427855491638184,
1.4183158874511719,
-1.0472726821899414,
-0.2767843008041382,
-1.7546759843826294,
-0.17264731228351593,
-0.6784354448318481,
0.3328331410884857,
-1.9786045551300049,
-0.13308106362819672,
-1.95822274684906,
-2.3417680263519287,
-1.2710169553756714,
-0.8300260901451111,
1.0609079599380493,
0.11232845485210419,
-0.9151615500450134,
1.1938432455062866,
-0.38749048113822937,
-1.815995693206787,
1.135390281677246,
-2.213128089904785
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Okay, I am able to reproduce @patrickvonplaten's original error: https://github.com/Vaibhavs10/scratchpad/blob/main/cv13_datasets_test.ipynb
Also not sure why it looks for `n_shards.json` | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 98 | 18 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Okay, I am able to reproduce @patrickvonplaten's original error: https://github.com/Vaibhavs10/scratchpad/blob/main/cv13_datasets_test.ipynb
Also not sure why it looks for `n_shards.json` | [
-1.1828274726867676,
-0.9026130437850952,
-0.7007205486297607,
1.4918862581253052,
-0.16695676743984222,
-1.2437304258346558,
0.17341256141662598,
-1.1007229089736938,
1.6143853664398193,
-0.7065113186836243,
0.3441532850265503,
-1.661779522895813,
-0.027343031018972397,
-0.5935344696044922,
-0.7206245064735413,
-0.8954644203186035,
-0.39952337741851807,
-0.7853767275810242,
1.0343458652496338,
2.5070574283599854,
1.300734281539917,
-1.3665800094604492,
2.6775400638580322,
0.7429079413414001,
-0.19725960493087769,
-1.0163896083831787,
0.47270986437797546,
0.015035844407975674,
-1.2210841178894043,
-0.4706616997718811,
-0.9842897653579712,
-0.15871669352054596,
-0.5803332328796387,
-0.491342157125473,
0.012897047214210033,
0.4741268455982208,
-0.34339627623558044,
-0.4016497731208801,
-0.6365978121757507,
-0.8139573335647583,
0.5109125971794128,
-0.3990551233291626,
0.9373750686645508,
-0.39379236102104187,
1.7595661878585815,
-0.6399240493774414,
0.5307283401489258,
0.6991985440254211,
1.3614529371261597,
0.25187236070632935,
0.021014761179685593,
0.366153359413147,
0.3992851972579956,
-0.015706742182374,
0.5597294569015503,
1.1503703594207764,
0.6677371859550476,
0.5657486915588379,
0.6978853344917297,
-2.168440818786621,
1.2148187160491943,
-1.0213199853897095,
0.22229363024234772,
1.35579252243042,
-0.8980667591094971,
0.29853734374046326,
-1.840829849243164,
-0.07107150554656982,
0.586391270160675,
-2.250816583633423,
0.32909145951271057,
-1.3293213844299316,
-0.5205864310264587,
1.0414053201675415,
0.38768261671066284,
-1.2085999250411987,
0.13837769627571106,
-0.3965558111667633,
1.0000231266021729,
0.37672311067581177,
1.087527871131897,
-1.6977148056030273,
-0.04950243607163429,
-0.2954119145870209,
0.16167202591896057,
-1.2016074657440186,
-1.5443000793457031,
0.5520419478416443,
0.6047496199607849,
0.6043242812156677,
-0.14586909115314484,
1.0022751092910767,
-1.0447444915771484,
0.8300107717514038,
-1.0592257976531982,
-1.6926565170288086,
-1.450780987739563,
-2.31787371635437,
-2.3031468391418457,
0.8233427405357361,
-0.49040451645851135,
-0.490403950214386,
2.1111087799072266,
-0.9769635200500488,
-1.7101110219955444,
1.0866941213607788,
0.22226323187351227,
0.008990242145955563,
2.353113889694214,
0.18779554963111877,
-0.7382688522338867,
0.5168718099594116,
-0.7975025177001953,
0.7917007207870483,
-0.33400407433509827,
1.3525224924087524,
0.44004857540130615,
-1.0550216436386108,
1.6110038757324219,
-0.42425230145454407,
0.6153708100318909,
-0.6346820592880249,
-0.5369406342506409,
-0.7312363386154175,
0.34551483392715454,
1.9347267150878906,
-0.2625371217727661,
1.5362733602523804,
-0.28174543380737305,
-1.5526316165924072,
-1.56728994846344,
0.8585458397865295,
0.4610655605792999,
-0.78755784034729,
0.1241912767291069,
-0.36728528141975403,
0.15473482012748718,
-0.0650850385427475,
1.0958178043365479,
1.2712734937667847,
0.77194744348526,
-0.3294888436794281,
-0.8551146388053894,
0.15747959911823273,
-0.06610029935836792,
-0.8253520131111145,
-1.701064944267273,
-0.39435791969299316,
0.14412935078144073,
0.5747928023338318,
-1.2452032566070557,
1.8180640935897827,
0.863358736038208,
1.9626117944717407,
1.0007808208465576,
-0.36318451166152954,
1.459964394569397,
0.10277964174747467,
1.877610206604004,
-0.5074834227561951,
0.6225380301475525,
-0.41203680634498596,
-1.1939488649368286,
0.7939448356628418,
-0.3601102828979492,
-2.0819318294525146,
-0.7692029476165771,
-0.7130545377731323,
-0.15074306726455688,
-0.7786163091659546,
0.8931905627250671,
-0.28742527961730957,
-1.4205323457717896,
0.20344685018062592,
-0.6996225118637085,
0.13967332243919373,
-1.2729148864746094,
0.2881692945957184,
0.6900242567062378,
-0.6968272924423218,
0.12704983353614807,
-0.25884413719177246,
-1.2034562826156616,
-0.5093647837638855,
0.3356810510158539,
1.9109835624694824,
-0.6585962772369385,
0.8772408366203308,
0.9799489974975586,
-0.7590792179107666,
0.05293457955121994,
0.3273511528968811,
-0.2935117185115814,
0.784736156463623,
-1.065429449081421,
-0.4326285123825073,
1.2355133295059204,
-0.21470175683498383,
-0.6449156999588013,
1.376617431640625,
0.7180616855621338,
-1.0343316793441772,
-0.1903437227010727,
-0.21003474295139313,
-0.8710001707077026,
0.10095492005348206,
-1.549053430557251,
-0.09455213695764542,
0.4187508523464203,
-1.5144604444503784,
-0.44911521673202515,
-0.17775623500347137,
1.2960563898086548,
-0.182645782828331,
1.3476999998092651,
-0.3641112446784973,
-0.1762835830450058,
-0.28726720809936523,
-0.4083321988582611,
0.10600775480270386,
-0.240911602973938,
-0.5956906080245972,
0.17925551533699036,
-0.7356035113334656,
0.35877421498298645,
1.3964755535125732,
0.26602041721343994,
0.035304415971040726,
0.4602185785770416,
1.0812928676605225,
0.3725210130214691,
-0.10177768021821976,
-0.9507840275764465,
-1.5213706493377686,
1.9626268148422241,
-1.4023637771606445,
1.9890878200531006,
0.8226905465126038,
-0.02710508182644844,
-1.769094467163086,
-1.8507033586502075,
1.2683258056640625,
1.1660449504852295,
2.3695783615112305,
0.5843609571456909,
0.3734484314918518,
-0.8652307391166687,
-0.6623716950416565,
0.31421372294425964,
-1.0146417617797852,
-0.7487269639968872,
0.17420387268066406,
2.4351372718811035,
1.7780979871749878,
-0.46730557084083557,
-0.24188372492790222,
-0.9967747330665588,
1.3778162002563477,
-0.24016475677490234,
0.2161768227815628,
1.9926973581314087,
-0.25952133536338806,
-1.0238648653030396,
1.3362493515014648,
-2.3251943588256836,
0.1597655713558197,
2.056899309158325,
0.29283463954925537,
0.12248589843511581,
-1.393673062324524,
-0.677661657333374,
-0.2610149681568146,
-0.4240751266479492,
-1.186432957649231,
0.4712829291820526,
-0.2414107322692871,
-0.714587926864624,
-1.4137924909591675,
0.15026971697807312,
-1.1156842708587646,
-1.63609778881073,
0.231045201420784,
1.897569179534912,
1.9791028499603271,
-0.7779264450073242,
1.5023179054260254,
-0.3164730966091156,
0.06093759462237358,
1.3047558069229126,
1.2717803716659546,
3.1133804321289062,
1.8710923194885254,
-1.2644797563552856,
0.6981408596038818,
-0.21529361605644226,
-0.44774767756462097,
1.1941345930099487,
-1.2134449481964111,
1.241289496421814,
-0.14179393649101257,
-1.1246992349624634,
-1.2172716856002808,
0.9275724291801453,
0.4767628312110901,
0.05980192497372627,
-0.507564127445221,
1.1331288814544678,
0.15629780292510986,
1.329848289489746,
0.6136435270309448,
-0.3579600751399994,
0.6055612564086914,
-0.3257482051849365,
-0.4812149405479431,
1.5658682584762573,
0.21394279599189758,
-1.4556872844696045,
-2.349132537841797,
-0.21998684108257294,
-0.9101735353469849,
0.012325984425842762,
-0.6488146185874939,
-1.040831208229065,
1.6695239543914795,
0.28098562359809875,
-1.2360633611679077,
-0.23345154523849487,
-0.38356804847717285,
-0.5609756708145142,
2.7207963466644287,
-1.348648190498352,
-0.1876494288444519,
-1.0050437450408936,
-0.6227954626083374,
1.6564760208129883,
-1.1758811473846436,
-0.18762145936489105,
-1.0536212921142578,
-0.5331956148147583,
-1.2370796203613281,
-0.49601882696151733,
0.1077016144990921,
-0.9023821353912354,
0.8654448986053467,
0.23922120034694672,
-1.2344129085540771,
-0.36759206652641296,
-0.8846132755279541,
0.9330646395683289,
-0.08393978327512741,
0.17255358397960663,
1.9356755018234253,
0.37349000573158264,
-0.33035025000572205,
0.7316871881484985,
1.2009345293045044,
0.5720891952514648,
-0.605633020401001,
0.2149239033460617,
-0.6340513229370117,
0.3231196999549866,
-1.3707127571105957,
0.2341376394033432,
-2.817126512527466,
0.6353655457496643,
-0.11612547188997269,
-0.11136943846940994,
-0.0060467650182545185,
-1.3292615413665771,
1.0827302932739258,
2.611248731613159,
-1.182150959968567,
0.46661821007728577,
0.3623163104057312,
1.1804462671279907,
-1.6308740377426147,
0.27881932258605957,
-0.44040319323539734,
2.052205801010132,
0.1816287785768509,
1.2202770709991455,
-0.5179499983787537,
-2.2814037799835205,
0.5976034998893738,
-1.2380493879318237,
-1.2349756956100464,
0.7882999181747437,
-0.8679870367050171,
0.15615089237689972,
-1.4212045669555664,
-0.24029631912708282,
-0.8271217346191406,
-1.18467116355896,
0.7317383289337158,
0.1251465380191803,
0.4479306638240814,
-0.6093559265136719,
0.34959790110588074,
-2.220093250274658,
-1.4054532051086426,
-0.23815220594406128,
-0.9243139028549194,
0.46197590231895447,
-0.38144123554229736,
0.6522032022476196,
-0.16821764409542084,
-0.013000035658478737,
0.38340070843696594,
1.5708566904067993,
3.383242607116699,
0.17013323307037354,
0.2541789412498474,
-0.16540051996707916,
-0.9716295599937439,
1.4459161758422852,
0.8354389667510986,
-0.09390202909708023,
-0.5780202746391296,
-1.0779322385787964,
1.2074916362762451,
2.012160301208496,
1.049076795578003,
0.03235064446926117,
-0.8176005482673645,
-0.74986732006073,
-0.039964962750673294,
0.1482812911272049,
0.4435690641403198,
0.9136601090431213,
0.030747275799512863,
0.017612837255001068,
1.4272245168685913,
1.1430450677871704,
-0.3923562169075012,
0.3401036560535431,
-0.8371531367301941,
-0.48636993765830994,
0.46370038390159607,
0.28429707884788513,
-0.005009221378713846,
0.4052819311618805,
-0.9921466708183289,
-0.2753733694553375,
-0.3865128755569458,
-0.8777637481689453,
-0.7348527908325195,
-0.4941568970680237,
-0.3763587176799774,
1.6534466743469238,
0.11877872794866562,
-0.5164656639099121,
-0.012739555910229683,
-0.772519588470459,
-0.12752708792686462,
-1.0714967250823975,
0.22108839452266693,
-0.08557070046663284,
-0.14339886605739594,
-0.16703122854232788,
1.6757028102874756,
-0.9446339011192322,
-2.094240188598633,
0.24262113869190216,
0.2698139250278473,
-0.291594922542572,
0.1927158236503601,
1.65919029712677,
0.5179468989372253,
1.4236429929733276,
1.341124176979065,
0.9529269933700562,
-0.6419127583503723,
-1.3363797664642334,
0.6703310012817383,
0.9952623248100281,
-1.3548603057861328,
0.8191064596176147,
-0.03575475141406059,
-0.46292975544929504,
0.5541808009147644,
1.225530743598938,
0.49300339818000793,
-1.915494680404663,
0.7753671407699585,
-0.9359375834465027,
0.727304995059967,
0.7270828485488892,
0.7116873264312744,
0.20872779190540314,
0.7957209944725037,
-1.1882672309875488,
-1.1489404439926147,
-0.6892314553260803,
-0.7066112160682678,
1.9777460098266602,
-0.27728942036628723,
0.6169109344482422,
-0.19620269536972046,
-1.3223711252212524,
-0.10187584906816483,
0.8026426434516907,
0.4143920838832855,
-0.5246747732162476,
0.8353825211524963,
-0.6370737552642822,
-1.0127644538879395,
-1.3305776119232178,
-0.43435466289520264,
-1.0515973567962646,
-0.9202731251716614,
1.0034573078155518,
0.7680374979972839,
0.3624677360057831,
1.9293346405029297,
0.742546558380127,
0.30998843908309937,
-2.6301589012145996,
0.9115333557128906,
0.2895192503929138,
-0.051667653024196625,
0.8934543132781982,
0.3598668575286865,
1.0048234462738037,
-0.010918542742729187,
0.6266553997993469,
-2.391658306121826,
2.3602349758148193,
-0.19348759949207306,
0.6057674288749695,
-0.02299993485212326,
-0.18303515017032623,
1.109570860862732,
0.5372604131698608,
0.46969932317733765,
-1.0738600492477417,
0.6002050638198853,
-0.5839085578918457,
1.1924729347229004,
0.8523620963096619,
-0.8311298489570618,
-0.014394845813512802,
1.3807746171951294,
0.4901835322380066,
-0.4752424955368042,
-1.0125668048858643,
-0.8692150712013245,
1.018690586090088,
1.6814758777618408,
-0.03670087829232216,
-0.03660803288221359,
0.9089716076850891,
0.6287415623664856,
-1.2928204536437988,
0.04822356253862381,
-0.7675827145576477,
-0.7662497162818909,
1.6943753957748413,
2.0866944789886475,
-0.10055570304393768,
-0.3059958219528198,
-0.7449141144752502,
-1.2574282884597778,
0.8548371195793152,
-0.023750633001327515,
0.09877718985080719,
0.6641818284988403,
-0.6309079527854919,
1.0641320943832397,
0.8472210168838501,
0.9677860736846924,
0.24463282525539398,
0.28327083587646484,
0.39846721291542053,
-0.39036983251571655,
-1.163252830505371,
-0.22013378143310547,
-1.1149972677230835,
-2.5742602348327637,
0.47255274653434753,
-0.16747188568115234,
-1.4604473114013672,
0.07081706821918488,
-1.0586731433868408,
0.9054601192474365,
-0.6229415535926819,
-1.0816881656646729,
-1.5420842170715332,
0.24911580979824066,
-0.07481338828802109,
0.9447245597839355,
-1.642256498336792,
-0.1521732062101364,
1.1528024673461914,
0.8550804853439331,
-0.704689085483551,
0.8489112257957458,
0.148994579911232,
1.0623530149459839,
0.8789463639259338,
-0.36235326528549194,
0.5408947467803955,
0.004179026000201702,
-1.3667436838150024,
0.4226488471031189,
1.1958558559417725,
0.17931610345840454,
1.500472068786621,
-0.5042197704315186,
0.041271619498729706,
0.3936694264411926,
-0.5555306077003479,
-0.4640418291091919,
-0.48934340476989746,
0.6337950825691223,
0.10583236068487167,
-1.027522087097168,
-0.0534072108566761,
-0.007433701306581497,
-0.20936110615730286,
0.15354105830192566,
-1.4440399408340454,
-0.14857664704322815,
-0.3884527087211609,
-0.6045900583267212,
-1.2608023881912231,
-0.050177596509456635,
1.3431042432785034,
-0.7411287426948547,
-0.19828496873378754,
0.5488036870956421,
0.3050517737865448,
0.49167922139167786,
0.560118556022644,
-0.7181734442710876,
-0.2720147669315338,
-0.24648156762123108,
-0.39451172947883606,
0.2938755750656128,
1.342490553855896,
-0.06845597922801971,
-0.981684684753418,
0.7038486003875732,
-0.3220685124397278,
0.17210808396339417,
1.980430245399475,
0.05576738342642784,
-0.7636419534683228,
0.26689285039901733,
-0.6695259809494019,
1.8758364915847778,
1.7349417209625244,
1.267267107963562,
-0.1100422814488411,
-0.9127258658409119,
0.6604562401771545,
-0.37318021059036255,
-0.3437485098838806,
0.8201485872268677,
0.3216080665588379,
-0.19347906112670898,
-1.394619345664978,
0.7006056308746338,
1.3093912601470947,
-0.8142791390419006,
-0.8434140086174011,
0.11697755008935928,
-0.8358587026596069,
1.0822123289108276,
0.6372455358505249,
0.37326663732528687,
0.30127236247062683,
1.6201037168502808,
0.8592372536659241,
-0.3580043315887451,
0.6008318662643433,
0.5426221489906311,
-0.163519948720932,
-2.1118128299713135,
-1.1921718120574951,
0.3399726152420044,
-0.5113474130630493,
-1.6124728918075562,
1.4125856161117554,
-1.2040343284606934,
-0.9723164439201355,
0.609833836555481,
0.0894952192902565,
1.4786925315856934,
0.3486868441104889,
1.5857887268066406,
2.0903573036193848,
0.9050720930099487,
0.4603146016597748,
1.2333958148956299,
-0.09178543835878372,
-0.4980444014072418,
1.810096263885498,
-0.419535368680954,
0.5067641139030457,
1.0616798400878906,
-0.27238577604293823,
-1.0676417350769043,
-0.7966486811637878,
-1.2919349670410156,
-0.7551878094673157,
1.1932485103607178,
0.06928428262472153,
-1.0833327770233154,
0.31088492274284363,
1.7006324529647827,
0.06517774611711502,
-0.3120262324810028,
0.6423299312591553,
0.4066743850708008,
-0.8595103621482849,
-0.020465083420276642,
-0.874089241027832,
0.5320572853088379,
-0.18203110992908478,
-0.36648029088974,
0.335371732711792,
0.4642234742641449,
1.390575647354126,
-0.0639791265130043,
0.11478348821401596,
1.0497844219207764,
-1.4219059944152832,
1.5090194940567017,
-0.6674285531044006,
0.3022203743457794,
-2.3726401329040527,
1.4157264232635498,
-0.8132186532020569,
1.860230565071106,
-2.627271890640259,
0.4774037003517151,
-0.5105263590812683,
-0.49828964471817017,
0.23929135501384735,
-0.45429664850234985,
0.19138595461845398,
-0.06898532807826996,
-1.103825330734253,
-0.039720937609672546,
-0.7303730249404907,
0.6331748962402344,
1.1427855491638184,
1.4183158874511719,
-1.0472726821899414,
-0.2767843008041382,
-1.7546759843826294,
-0.17264731228351593,
-0.6784354448318481,
0.3328331410884857,
-1.9786045551300049,
-0.13308106362819672,
-1.95822274684906,
-2.3417680263519287,
-1.2710169553756714,
-0.8300260901451111,
1.0609079599380493,
0.11232845485210419,
-0.9151615500450134,
1.1938432455062866,
-0.38749048113822937,
-1.815995693206787,
1.135390281677246,
-2.213128089904785
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Ok I see, this file is downloaded from the CV dataset script - let me investigate | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 98 | 16 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Ok I see, this file is downloaded from the CV dataset script - let me investigate | [
-1.1828274726867676,
-0.9026130437850952,
-0.7007205486297607,
1.4918862581253052,
-0.16695676743984222,
-1.2437304258346558,
0.17341256141662598,
-1.1007229089736938,
1.6143853664398193,
-0.7065113186836243,
0.3441532850265503,
-1.661779522895813,
-0.027343031018972397,
-0.5935344696044922,
-0.7206245064735413,
-0.8954644203186035,
-0.39952337741851807,
-0.7853767275810242,
1.0343458652496338,
2.5070574283599854,
1.300734281539917,
-1.3665800094604492,
2.6775400638580322,
0.7429079413414001,
-0.19725960493087769,
-1.0163896083831787,
0.47270986437797546,
0.015035844407975674,
-1.2210841178894043,
-0.4706616997718811,
-0.9842897653579712,
-0.15871669352054596,
-0.5803332328796387,
-0.491342157125473,
0.012897047214210033,
0.4741268455982208,
-0.34339627623558044,
-0.4016497731208801,
-0.6365978121757507,
-0.8139573335647583,
0.5109125971794128,
-0.3990551233291626,
0.9373750686645508,
-0.39379236102104187,
1.7595661878585815,
-0.6399240493774414,
0.5307283401489258,
0.6991985440254211,
1.3614529371261597,
0.25187236070632935,
0.021014761179685593,
0.366153359413147,
0.3992851972579956,
-0.015706742182374,
0.5597294569015503,
1.1503703594207764,
0.6677371859550476,
0.5657486915588379,
0.6978853344917297,
-2.168440818786621,
1.2148187160491943,
-1.0213199853897095,
0.22229363024234772,
1.35579252243042,
-0.8980667591094971,
0.29853734374046326,
-1.840829849243164,
-0.07107150554656982,
0.586391270160675,
-2.250816583633423,
0.32909145951271057,
-1.3293213844299316,
-0.5205864310264587,
1.0414053201675415,
0.38768261671066284,
-1.2085999250411987,
0.13837769627571106,
-0.3965558111667633,
1.0000231266021729,
0.37672311067581177,
1.087527871131897,
-1.6977148056030273,
-0.04950243607163429,
-0.2954119145870209,
0.16167202591896057,
-1.2016074657440186,
-1.5443000793457031,
0.5520419478416443,
0.6047496199607849,
0.6043242812156677,
-0.14586909115314484,
1.0022751092910767,
-1.0447444915771484,
0.8300107717514038,
-1.0592257976531982,
-1.6926565170288086,
-1.450780987739563,
-2.31787371635437,
-2.3031468391418457,
0.8233427405357361,
-0.49040451645851135,
-0.490403950214386,
2.1111087799072266,
-0.9769635200500488,
-1.7101110219955444,
1.0866941213607788,
0.22226323187351227,
0.008990242145955563,
2.353113889694214,
0.18779554963111877,
-0.7382688522338867,
0.5168718099594116,
-0.7975025177001953,
0.7917007207870483,
-0.33400407433509827,
1.3525224924087524,
0.44004857540130615,
-1.0550216436386108,
1.6110038757324219,
-0.42425230145454407,
0.6153708100318909,
-0.6346820592880249,
-0.5369406342506409,
-0.7312363386154175,
0.34551483392715454,
1.9347267150878906,
-0.2625371217727661,
1.5362733602523804,
-0.28174543380737305,
-1.5526316165924072,
-1.56728994846344,
0.8585458397865295,
0.4610655605792999,
-0.78755784034729,
0.1241912767291069,
-0.36728528141975403,
0.15473482012748718,
-0.0650850385427475,
1.0958178043365479,
1.2712734937667847,
0.77194744348526,
-0.3294888436794281,
-0.8551146388053894,
0.15747959911823273,
-0.06610029935836792,
-0.8253520131111145,
-1.701064944267273,
-0.39435791969299316,
0.14412935078144073,
0.5747928023338318,
-1.2452032566070557,
1.8180640935897827,
0.863358736038208,
1.9626117944717407,
1.0007808208465576,
-0.36318451166152954,
1.459964394569397,
0.10277964174747467,
1.877610206604004,
-0.5074834227561951,
0.6225380301475525,
-0.41203680634498596,
-1.1939488649368286,
0.7939448356628418,
-0.3601102828979492,
-2.0819318294525146,
-0.7692029476165771,
-0.7130545377731323,
-0.15074306726455688,
-0.7786163091659546,
0.8931905627250671,
-0.28742527961730957,
-1.4205323457717896,
0.20344685018062592,
-0.6996225118637085,
0.13967332243919373,
-1.2729148864746094,
0.2881692945957184,
0.6900242567062378,
-0.6968272924423218,
0.12704983353614807,
-0.25884413719177246,
-1.2034562826156616,
-0.5093647837638855,
0.3356810510158539,
1.9109835624694824,
-0.6585962772369385,
0.8772408366203308,
0.9799489974975586,
-0.7590792179107666,
0.05293457955121994,
0.3273511528968811,
-0.2935117185115814,
0.784736156463623,
-1.065429449081421,
-0.4326285123825073,
1.2355133295059204,
-0.21470175683498383,
-0.6449156999588013,
1.376617431640625,
0.7180616855621338,
-1.0343316793441772,
-0.1903437227010727,
-0.21003474295139313,
-0.8710001707077026,
0.10095492005348206,
-1.549053430557251,
-0.09455213695764542,
0.4187508523464203,
-1.5144604444503784,
-0.44911521673202515,
-0.17775623500347137,
1.2960563898086548,
-0.182645782828331,
1.3476999998092651,
-0.3641112446784973,
-0.1762835830450058,
-0.28726720809936523,
-0.4083321988582611,
0.10600775480270386,
-0.240911602973938,
-0.5956906080245972,
0.17925551533699036,
-0.7356035113334656,
0.35877421498298645,
1.3964755535125732,
0.26602041721343994,
0.035304415971040726,
0.4602185785770416,
1.0812928676605225,
0.3725210130214691,
-0.10177768021821976,
-0.9507840275764465,
-1.5213706493377686,
1.9626268148422241,
-1.4023637771606445,
1.9890878200531006,
0.8226905465126038,
-0.02710508182644844,
-1.769094467163086,
-1.8507033586502075,
1.2683258056640625,
1.1660449504852295,
2.3695783615112305,
0.5843609571456909,
0.3734484314918518,
-0.8652307391166687,
-0.6623716950416565,
0.31421372294425964,
-1.0146417617797852,
-0.7487269639968872,
0.17420387268066406,
2.4351372718811035,
1.7780979871749878,
-0.46730557084083557,
-0.24188372492790222,
-0.9967747330665588,
1.3778162002563477,
-0.24016475677490234,
0.2161768227815628,
1.9926973581314087,
-0.25952133536338806,
-1.0238648653030396,
1.3362493515014648,
-2.3251943588256836,
0.1597655713558197,
2.056899309158325,
0.29283463954925537,
0.12248589843511581,
-1.393673062324524,
-0.677661657333374,
-0.2610149681568146,
-0.4240751266479492,
-1.186432957649231,
0.4712829291820526,
-0.2414107322692871,
-0.714587926864624,
-1.4137924909591675,
0.15026971697807312,
-1.1156842708587646,
-1.63609778881073,
0.231045201420784,
1.897569179534912,
1.9791028499603271,
-0.7779264450073242,
1.5023179054260254,
-0.3164730966091156,
0.06093759462237358,
1.3047558069229126,
1.2717803716659546,
3.1133804321289062,
1.8710923194885254,
-1.2644797563552856,
0.6981408596038818,
-0.21529361605644226,
-0.44774767756462097,
1.1941345930099487,
-1.2134449481964111,
1.241289496421814,
-0.14179393649101257,
-1.1246992349624634,
-1.2172716856002808,
0.9275724291801453,
0.4767628312110901,
0.05980192497372627,
-0.507564127445221,
1.1331288814544678,
0.15629780292510986,
1.329848289489746,
0.6136435270309448,
-0.3579600751399994,
0.6055612564086914,
-0.3257482051849365,
-0.4812149405479431,
1.5658682584762573,
0.21394279599189758,
-1.4556872844696045,
-2.349132537841797,
-0.21998684108257294,
-0.9101735353469849,
0.012325984425842762,
-0.6488146185874939,
-1.040831208229065,
1.6695239543914795,
0.28098562359809875,
-1.2360633611679077,
-0.23345154523849487,
-0.38356804847717285,
-0.5609756708145142,
2.7207963466644287,
-1.348648190498352,
-0.1876494288444519,
-1.0050437450408936,
-0.6227954626083374,
1.6564760208129883,
-1.1758811473846436,
-0.18762145936489105,
-1.0536212921142578,
-0.5331956148147583,
-1.2370796203613281,
-0.49601882696151733,
0.1077016144990921,
-0.9023821353912354,
0.8654448986053467,
0.23922120034694672,
-1.2344129085540771,
-0.36759206652641296,
-0.8846132755279541,
0.9330646395683289,
-0.08393978327512741,
0.17255358397960663,
1.9356755018234253,
0.37349000573158264,
-0.33035025000572205,
0.7316871881484985,
1.2009345293045044,
0.5720891952514648,
-0.605633020401001,
0.2149239033460617,
-0.6340513229370117,
0.3231196999549866,
-1.3707127571105957,
0.2341376394033432,
-2.817126512527466,
0.6353655457496643,
-0.11612547188997269,
-0.11136943846940994,
-0.0060467650182545185,
-1.3292615413665771,
1.0827302932739258,
2.611248731613159,
-1.182150959968567,
0.46661821007728577,
0.3623163104057312,
1.1804462671279907,
-1.6308740377426147,
0.27881932258605957,
-0.44040319323539734,
2.052205801010132,
0.1816287785768509,
1.2202770709991455,
-0.5179499983787537,
-2.2814037799835205,
0.5976034998893738,
-1.2380493879318237,
-1.2349756956100464,
0.7882999181747437,
-0.8679870367050171,
0.15615089237689972,
-1.4212045669555664,
-0.24029631912708282,
-0.8271217346191406,
-1.18467116355896,
0.7317383289337158,
0.1251465380191803,
0.4479306638240814,
-0.6093559265136719,
0.34959790110588074,
-2.220093250274658,
-1.4054532051086426,
-0.23815220594406128,
-0.9243139028549194,
0.46197590231895447,
-0.38144123554229736,
0.6522032022476196,
-0.16821764409542084,
-0.013000035658478737,
0.38340070843696594,
1.5708566904067993,
3.383242607116699,
0.17013323307037354,
0.2541789412498474,
-0.16540051996707916,
-0.9716295599937439,
1.4459161758422852,
0.8354389667510986,
-0.09390202909708023,
-0.5780202746391296,
-1.0779322385787964,
1.2074916362762451,
2.012160301208496,
1.049076795578003,
0.03235064446926117,
-0.8176005482673645,
-0.74986732006073,
-0.039964962750673294,
0.1482812911272049,
0.4435690641403198,
0.9136601090431213,
0.030747275799512863,
0.017612837255001068,
1.4272245168685913,
1.1430450677871704,
-0.3923562169075012,
0.3401036560535431,
-0.8371531367301941,
-0.48636993765830994,
0.46370038390159607,
0.28429707884788513,
-0.005009221378713846,
0.4052819311618805,
-0.9921466708183289,
-0.2753733694553375,
-0.3865128755569458,
-0.8777637481689453,
-0.7348527908325195,
-0.4941568970680237,
-0.3763587176799774,
1.6534466743469238,
0.11877872794866562,
-0.5164656639099121,
-0.012739555910229683,
-0.772519588470459,
-0.12752708792686462,
-1.0714967250823975,
0.22108839452266693,
-0.08557070046663284,
-0.14339886605739594,
-0.16703122854232788,
1.6757028102874756,
-0.9446339011192322,
-2.094240188598633,
0.24262113869190216,
0.2698139250278473,
-0.291594922542572,
0.1927158236503601,
1.65919029712677,
0.5179468989372253,
1.4236429929733276,
1.341124176979065,
0.9529269933700562,
-0.6419127583503723,
-1.3363797664642334,
0.6703310012817383,
0.9952623248100281,
-1.3548603057861328,
0.8191064596176147,
-0.03575475141406059,
-0.46292975544929504,
0.5541808009147644,
1.225530743598938,
0.49300339818000793,
-1.915494680404663,
0.7753671407699585,
-0.9359375834465027,
0.727304995059967,
0.7270828485488892,
0.7116873264312744,
0.20872779190540314,
0.7957209944725037,
-1.1882672309875488,
-1.1489404439926147,
-0.6892314553260803,
-0.7066112160682678,
1.9777460098266602,
-0.27728942036628723,
0.6169109344482422,
-0.19620269536972046,
-1.3223711252212524,
-0.10187584906816483,
0.8026426434516907,
0.4143920838832855,
-0.5246747732162476,
0.8353825211524963,
-0.6370737552642822,
-1.0127644538879395,
-1.3305776119232178,
-0.43435466289520264,
-1.0515973567962646,
-0.9202731251716614,
1.0034573078155518,
0.7680374979972839,
0.3624677360057831,
1.9293346405029297,
0.742546558380127,
0.30998843908309937,
-2.6301589012145996,
0.9115333557128906,
0.2895192503929138,
-0.051667653024196625,
0.8934543132781982,
0.3598668575286865,
1.0048234462738037,
-0.010918542742729187,
0.6266553997993469,
-2.391658306121826,
2.3602349758148193,
-0.19348759949207306,
0.6057674288749695,
-0.02299993485212326,
-0.18303515017032623,
1.109570860862732,
0.5372604131698608,
0.46969932317733765,
-1.0738600492477417,
0.6002050638198853,
-0.5839085578918457,
1.1924729347229004,
0.8523620963096619,
-0.8311298489570618,
-0.014394845813512802,
1.3807746171951294,
0.4901835322380066,
-0.4752424955368042,
-1.0125668048858643,
-0.8692150712013245,
1.018690586090088,
1.6814758777618408,
-0.03670087829232216,
-0.03660803288221359,
0.9089716076850891,
0.6287415623664856,
-1.2928204536437988,
0.04822356253862381,
-0.7675827145576477,
-0.7662497162818909,
1.6943753957748413,
2.0866944789886475,
-0.10055570304393768,
-0.3059958219528198,
-0.7449141144752502,
-1.2574282884597778,
0.8548371195793152,
-0.023750633001327515,
0.09877718985080719,
0.6641818284988403,
-0.6309079527854919,
1.0641320943832397,
0.8472210168838501,
0.9677860736846924,
0.24463282525539398,
0.28327083587646484,
0.39846721291542053,
-0.39036983251571655,
-1.163252830505371,
-0.22013378143310547,
-1.1149972677230835,
-2.5742602348327637,
0.47255274653434753,
-0.16747188568115234,
-1.4604473114013672,
0.07081706821918488,
-1.0586731433868408,
0.9054601192474365,
-0.6229415535926819,
-1.0816881656646729,
-1.5420842170715332,
0.24911580979824066,
-0.07481338828802109,
0.9447245597839355,
-1.642256498336792,
-0.1521732062101364,
1.1528024673461914,
0.8550804853439331,
-0.704689085483551,
0.8489112257957458,
0.148994579911232,
1.0623530149459839,
0.8789463639259338,
-0.36235326528549194,
0.5408947467803955,
0.004179026000201702,
-1.3667436838150024,
0.4226488471031189,
1.1958558559417725,
0.17931610345840454,
1.500472068786621,
-0.5042197704315186,
0.041271619498729706,
0.3936694264411926,
-0.5555306077003479,
-0.4640418291091919,
-0.48934340476989746,
0.6337950825691223,
0.10583236068487167,
-1.027522087097168,
-0.0534072108566761,
-0.007433701306581497,
-0.20936110615730286,
0.15354105830192566,
-1.4440399408340454,
-0.14857664704322815,
-0.3884527087211609,
-0.6045900583267212,
-1.2608023881912231,
-0.050177596509456635,
1.3431042432785034,
-0.7411287426948547,
-0.19828496873378754,
0.5488036870956421,
0.3050517737865448,
0.49167922139167786,
0.560118556022644,
-0.7181734442710876,
-0.2720147669315338,
-0.24648156762123108,
-0.39451172947883606,
0.2938755750656128,
1.342490553855896,
-0.06845597922801971,
-0.981684684753418,
0.7038486003875732,
-0.3220685124397278,
0.17210808396339417,
1.980430245399475,
0.05576738342642784,
-0.7636419534683228,
0.26689285039901733,
-0.6695259809494019,
1.8758364915847778,
1.7349417209625244,
1.267267107963562,
-0.1100422814488411,
-0.9127258658409119,
0.6604562401771545,
-0.37318021059036255,
-0.3437485098838806,
0.8201485872268677,
0.3216080665588379,
-0.19347906112670898,
-1.394619345664978,
0.7006056308746338,
1.3093912601470947,
-0.8142791390419006,
-0.8434140086174011,
0.11697755008935928,
-0.8358587026596069,
1.0822123289108276,
0.6372455358505249,
0.37326663732528687,
0.30127236247062683,
1.6201037168502808,
0.8592372536659241,
-0.3580043315887451,
0.6008318662643433,
0.5426221489906311,
-0.163519948720932,
-2.1118128299713135,
-1.1921718120574951,
0.3399726152420044,
-0.5113474130630493,
-1.6124728918075562,
1.4125856161117554,
-1.2040343284606934,
-0.9723164439201355,
0.609833836555481,
0.0894952192902565,
1.4786925315856934,
0.3486868441104889,
1.5857887268066406,
2.0903573036193848,
0.9050720930099487,
0.4603146016597748,
1.2333958148956299,
-0.09178543835878372,
-0.4980444014072418,
1.810096263885498,
-0.419535368680954,
0.5067641139030457,
1.0616798400878906,
-0.27238577604293823,
-1.0676417350769043,
-0.7966486811637878,
-1.2919349670410156,
-0.7551878094673157,
1.1932485103607178,
0.06928428262472153,
-1.0833327770233154,
0.31088492274284363,
1.7006324529647827,
0.06517774611711502,
-0.3120262324810028,
0.6423299312591553,
0.4066743850708008,
-0.8595103621482849,
-0.020465083420276642,
-0.874089241027832,
0.5320572853088379,
-0.18203110992908478,
-0.36648029088974,
0.335371732711792,
0.4642234742641449,
1.390575647354126,
-0.0639791265130043,
0.11478348821401596,
1.0497844219207764,
-1.4219059944152832,
1.5090194940567017,
-0.6674285531044006,
0.3022203743457794,
-2.3726401329040527,
1.4157264232635498,
-0.8132186532020569,
1.860230565071106,
-2.627271890640259,
0.4774037003517151,
-0.5105263590812683,
-0.49828964471817017,
0.23929135501384735,
-0.45429664850234985,
0.19138595461845398,
-0.06898532807826996,
-1.103825330734253,
-0.039720937609672546,
-0.7303730249404907,
0.6331748962402344,
1.1427855491638184,
1.4183158874511719,
-1.0472726821899414,
-0.2767843008041382,
-1.7546759843826294,
-0.17264731228351593,
-0.6784354448318481,
0.3328331410884857,
-1.9786045551300049,
-0.13308106362819672,
-1.95822274684906,
-2.3417680263519287,
-1.2710169553756714,
-0.8300260901451111,
1.0609079599380493,
0.11232845485210419,
-0.9151615500450134,
1.1938432455062866,
-0.38749048113822937,
-1.815995693206787,
1.135390281677246,
-2.213128089904785
] |
https://github.com/huggingface/datasets/issues/5953 | Bad error message when trying to download gated dataset | Ok I see: when you log out you no longer have access to the repository.
Therefore the dataset script is loaded from cache:
```
WARNING:datasets.load:Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_13_0/22809012aac1fc9803eaffc44122e4149043748e93933935d5ea19898587e4d7 (last modified on Wed Jun 14 10:13:17 2023) since it couldn't be found locally at mozilla-foundation/common_voice_13_0., or remotely on the Hugging Face Hub.
```
and the script tries to download the n_shards.json but fails | ### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
| 98 | 68 | Bad error message when trying to download gated dataset
### Describe the bug
When I attempt to download a model from the Hub that is gated without being logged in, I get a nice error message. E.g.:
E.g.
```sh
Repository Not Found for url: https://huggingface.co/api/models/DeepFloyd/IF-I-XL-v1.0.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password..
Will try to load from local cache.
```
If I do the same for a gated dataset on the Hub, I'm not gated a nice error message IMO:
```sh
File ~/hf/lib/python3.10/site-packages/fsspec/implementations/http.py:430, in HTTPFileSystem._info(self, url, **kwargs)
427 except Exception as exc:
428 if policy == "get":
429 # If get failed, then raise a FileNotFoundError
--> 430 raise FileNotFoundError(url) from exc
431 logger.debug(str(exc))
433 return {"name": url, "size": None, **info, "type": "file"}
FileNotFoundError: https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0/resolve/main/n_shards.json
```
### Steps to reproduce the bug
```
huggingface-cli logout
```
and then:
```py
from datasets import load_dataset, Audio
# English
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "en", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
en_sample = next(iter(stream_data))["audio"]["array"]
# Swahili
stream_data = load_dataset("mozilla-foundation/common_voice_13_0", "sw", split="test", streaming=True)
stream_data = stream_data.cast_column("audio", Audio(sampling_rate=16000))
sw_sample = next(iter(stream_data))["audio"]["array"]
```
### Expected behavior
Better error message
### Environment info
Copy-and-paste the text below in your GitHub issue.
- `datasets` version: 2.12.0
- Platform: Linux-6.2.0-76060200-generic-x86_64-with-glibc2.35
- Python version: 3.10.6
- Huggingface_hub version: 0.16.0.dev0
- PyArrow version: 11.0.0
- Pandas version: 1.5.3
Ok I see: when you log out you no longer have access to the repository.
Therefore the dataset script is loaded from cache:
```
WARNING:datasets.load:Using the latest cached version of the module from /root/.cache/huggingface/modules/datasets_modules/datasets/mozilla-foundation--common_voice_13_0/22809012aac1fc9803eaffc44122e4149043748e93933935d5ea19898587e4d7 (last modified on Wed Jun 14 10:13:17 2023) since it couldn't be found locally at mozilla-foundation/common_voice_13_0., or remotely on the Hugging Face Hub.
```
and the script tries to download the n_shards.json but fails | [
-1.1828274726867676,
-0.9026130437850952,
-0.7007205486297607,
1.4918862581253052,
-0.16695676743984222,
-1.2437304258346558,
0.17341256141662598,
-1.1007229089736938,
1.6143853664398193,
-0.7065113186836243,
0.3441532850265503,
-1.661779522895813,
-0.027343031018972397,
-0.5935344696044922,
-0.7206245064735413,
-0.8954644203186035,
-0.39952337741851807,
-0.7853767275810242,
1.0343458652496338,
2.5070574283599854,
1.300734281539917,
-1.3665800094604492,
2.6775400638580322,
0.7429079413414001,
-0.19725960493087769,
-1.0163896083831787,
0.47270986437797546,
0.015035844407975674,
-1.2210841178894043,
-0.4706616997718811,
-0.9842897653579712,
-0.15871669352054596,
-0.5803332328796387,
-0.491342157125473,
0.012897047214210033,
0.4741268455982208,
-0.34339627623558044,
-0.4016497731208801,
-0.6365978121757507,
-0.8139573335647583,
0.5109125971794128,
-0.3990551233291626,
0.9373750686645508,
-0.39379236102104187,
1.7595661878585815,
-0.6399240493774414,
0.5307283401489258,
0.6991985440254211,
1.3614529371261597,
0.25187236070632935,
0.021014761179685593,
0.366153359413147,
0.3992851972579956,
-0.015706742182374,
0.5597294569015503,
1.1503703594207764,
0.6677371859550476,
0.5657486915588379,
0.6978853344917297,
-2.168440818786621,
1.2148187160491943,
-1.0213199853897095,
0.22229363024234772,
1.35579252243042,
-0.8980667591094971,
0.29853734374046326,
-1.840829849243164,
-0.07107150554656982,
0.586391270160675,
-2.250816583633423,
0.32909145951271057,
-1.3293213844299316,
-0.5205864310264587,
1.0414053201675415,
0.38768261671066284,
-1.2085999250411987,
0.13837769627571106,
-0.3965558111667633,
1.0000231266021729,
0.37672311067581177,
1.087527871131897,
-1.6977148056030273,
-0.04950243607163429,
-0.2954119145870209,
0.16167202591896057,
-1.2016074657440186,
-1.5443000793457031,
0.5520419478416443,
0.6047496199607849,
0.6043242812156677,
-0.14586909115314484,
1.0022751092910767,
-1.0447444915771484,
0.8300107717514038,
-1.0592257976531982,
-1.6926565170288086,
-1.450780987739563,
-2.31787371635437,
-2.3031468391418457,
0.8233427405357361,
-0.49040451645851135,
-0.490403950214386,
2.1111087799072266,
-0.9769635200500488,
-1.7101110219955444,
1.0866941213607788,
0.22226323187351227,
0.008990242145955563,
2.353113889694214,
0.18779554963111877,
-0.7382688522338867,
0.5168718099594116,
-0.7975025177001953,
0.7917007207870483,
-0.33400407433509827,
1.3525224924087524,
0.44004857540130615,
-1.0550216436386108,
1.6110038757324219,
-0.42425230145454407,
0.6153708100318909,
-0.6346820592880249,
-0.5369406342506409,
-0.7312363386154175,
0.34551483392715454,
1.9347267150878906,
-0.2625371217727661,
1.5362733602523804,
-0.28174543380737305,
-1.5526316165924072,
-1.56728994846344,
0.8585458397865295,
0.4610655605792999,
-0.78755784034729,
0.1241912767291069,
-0.36728528141975403,
0.15473482012748718,
-0.0650850385427475,
1.0958178043365479,
1.2712734937667847,
0.77194744348526,
-0.3294888436794281,
-0.8551146388053894,
0.15747959911823273,
-0.06610029935836792,
-0.8253520131111145,
-1.701064944267273,
-0.39435791969299316,
0.14412935078144073,
0.5747928023338318,
-1.2452032566070557,
1.8180640935897827,
0.863358736038208,
1.9626117944717407,
1.0007808208465576,
-0.36318451166152954,
1.459964394569397,
0.10277964174747467,
1.877610206604004,
-0.5074834227561951,
0.6225380301475525,
-0.41203680634498596,
-1.1939488649368286,
0.7939448356628418,
-0.3601102828979492,
-2.0819318294525146,
-0.7692029476165771,
-0.7130545377731323,
-0.15074306726455688,
-0.7786163091659546,
0.8931905627250671,
-0.28742527961730957,
-1.4205323457717896,
0.20344685018062592,
-0.6996225118637085,
0.13967332243919373,
-1.2729148864746094,
0.2881692945957184,
0.6900242567062378,
-0.6968272924423218,
0.12704983353614807,
-0.25884413719177246,
-1.2034562826156616,
-0.5093647837638855,
0.3356810510158539,
1.9109835624694824,
-0.6585962772369385,
0.8772408366203308,
0.9799489974975586,
-0.7590792179107666,
0.05293457955121994,
0.3273511528968811,
-0.2935117185115814,
0.784736156463623,
-1.065429449081421,
-0.4326285123825073,
1.2355133295059204,
-0.21470175683498383,
-0.6449156999588013,
1.376617431640625,
0.7180616855621338,
-1.0343316793441772,
-0.1903437227010727,
-0.21003474295139313,
-0.8710001707077026,
0.10095492005348206,
-1.549053430557251,
-0.09455213695764542,
0.4187508523464203,
-1.5144604444503784,
-0.44911521673202515,
-0.17775623500347137,
1.2960563898086548,
-0.182645782828331,
1.3476999998092651,
-0.3641112446784973,
-0.1762835830450058,
-0.28726720809936523,
-0.4083321988582611,
0.10600775480270386,
-0.240911602973938,
-0.5956906080245972,
0.17925551533699036,
-0.7356035113334656,
0.35877421498298645,
1.3964755535125732,
0.26602041721343994,
0.035304415971040726,
0.4602185785770416,
1.0812928676605225,
0.3725210130214691,
-0.10177768021821976,
-0.9507840275764465,
-1.5213706493377686,
1.9626268148422241,
-1.4023637771606445,
1.9890878200531006,
0.8226905465126038,
-0.02710508182644844,
-1.769094467163086,
-1.8507033586502075,
1.2683258056640625,
1.1660449504852295,
2.3695783615112305,
0.5843609571456909,
0.3734484314918518,
-0.8652307391166687,
-0.6623716950416565,
0.31421372294425964,
-1.0146417617797852,
-0.7487269639968872,
0.17420387268066406,
2.4351372718811035,
1.7780979871749878,
-0.46730557084083557,
-0.24188372492790222,
-0.9967747330665588,
1.3778162002563477,
-0.24016475677490234,
0.2161768227815628,
1.9926973581314087,
-0.25952133536338806,
-1.0238648653030396,
1.3362493515014648,
-2.3251943588256836,
0.1597655713558197,
2.056899309158325,
0.29283463954925537,
0.12248589843511581,
-1.393673062324524,
-0.677661657333374,
-0.2610149681568146,
-0.4240751266479492,
-1.186432957649231,
0.4712829291820526,
-0.2414107322692871,
-0.714587926864624,
-1.4137924909591675,
0.15026971697807312,
-1.1156842708587646,
-1.63609778881073,
0.231045201420784,
1.897569179534912,
1.9791028499603271,
-0.7779264450073242,
1.5023179054260254,
-0.3164730966091156,
0.06093759462237358,
1.3047558069229126,
1.2717803716659546,
3.1133804321289062,
1.8710923194885254,
-1.2644797563552856,
0.6981408596038818,
-0.21529361605644226,
-0.44774767756462097,
1.1941345930099487,
-1.2134449481964111,
1.241289496421814,
-0.14179393649101257,
-1.1246992349624634,
-1.2172716856002808,
0.9275724291801453,
0.4767628312110901,
0.05980192497372627,
-0.507564127445221,
1.1331288814544678,
0.15629780292510986,
1.329848289489746,
0.6136435270309448,
-0.3579600751399994,
0.6055612564086914,
-0.3257482051849365,
-0.4812149405479431,
1.5658682584762573,
0.21394279599189758,
-1.4556872844696045,
-2.349132537841797,
-0.21998684108257294,
-0.9101735353469849,
0.012325984425842762,
-0.6488146185874939,
-1.040831208229065,
1.6695239543914795,
0.28098562359809875,
-1.2360633611679077,
-0.23345154523849487,
-0.38356804847717285,
-0.5609756708145142,
2.7207963466644287,
-1.348648190498352,
-0.1876494288444519,
-1.0050437450408936,
-0.6227954626083374,
1.6564760208129883,
-1.1758811473846436,
-0.18762145936489105,
-1.0536212921142578,
-0.5331956148147583,
-1.2370796203613281,
-0.49601882696151733,
0.1077016144990921,
-0.9023821353912354,
0.8654448986053467,
0.23922120034694672,
-1.2344129085540771,
-0.36759206652641296,
-0.8846132755279541,
0.9330646395683289,
-0.08393978327512741,
0.17255358397960663,
1.9356755018234253,
0.37349000573158264,
-0.33035025000572205,
0.7316871881484985,
1.2009345293045044,
0.5720891952514648,
-0.605633020401001,
0.2149239033460617,
-0.6340513229370117,
0.3231196999549866,
-1.3707127571105957,
0.2341376394033432,
-2.817126512527466,
0.6353655457496643,
-0.11612547188997269,
-0.11136943846940994,
-0.0060467650182545185,
-1.3292615413665771,
1.0827302932739258,
2.611248731613159,
-1.182150959968567,
0.46661821007728577,
0.3623163104057312,
1.1804462671279907,
-1.6308740377426147,
0.27881932258605957,
-0.44040319323539734,
2.052205801010132,
0.1816287785768509,
1.2202770709991455,
-0.5179499983787537,
-2.2814037799835205,
0.5976034998893738,
-1.2380493879318237,
-1.2349756956100464,
0.7882999181747437,
-0.8679870367050171,
0.15615089237689972,
-1.4212045669555664,
-0.24029631912708282,
-0.8271217346191406,
-1.18467116355896,
0.7317383289337158,
0.1251465380191803,
0.4479306638240814,
-0.6093559265136719,
0.34959790110588074,
-2.220093250274658,
-1.4054532051086426,
-0.23815220594406128,
-0.9243139028549194,
0.46197590231895447,
-0.38144123554229736,
0.6522032022476196,
-0.16821764409542084,
-0.013000035658478737,
0.38340070843696594,
1.5708566904067993,
3.383242607116699,
0.17013323307037354,
0.2541789412498474,
-0.16540051996707916,
-0.9716295599937439,
1.4459161758422852,
0.8354389667510986,
-0.09390202909708023,
-0.5780202746391296,
-1.0779322385787964,
1.2074916362762451,
2.012160301208496,
1.049076795578003,
0.03235064446926117,
-0.8176005482673645,
-0.74986732006073,
-0.039964962750673294,
0.1482812911272049,
0.4435690641403198,
0.9136601090431213,
0.030747275799512863,
0.017612837255001068,
1.4272245168685913,
1.1430450677871704,
-0.3923562169075012,
0.3401036560535431,
-0.8371531367301941,
-0.48636993765830994,
0.46370038390159607,
0.28429707884788513,
-0.005009221378713846,
0.4052819311618805,
-0.9921466708183289,
-0.2753733694553375,
-0.3865128755569458,
-0.8777637481689453,
-0.7348527908325195,
-0.4941568970680237,
-0.3763587176799774,
1.6534466743469238,
0.11877872794866562,
-0.5164656639099121,
-0.012739555910229683,
-0.772519588470459,
-0.12752708792686462,
-1.0714967250823975,
0.22108839452266693,
-0.08557070046663284,
-0.14339886605739594,
-0.16703122854232788,
1.6757028102874756,
-0.9446339011192322,
-2.094240188598633,
0.24262113869190216,
0.2698139250278473,
-0.291594922542572,
0.1927158236503601,
1.65919029712677,
0.5179468989372253,
1.4236429929733276,
1.341124176979065,
0.9529269933700562,
-0.6419127583503723,
-1.3363797664642334,
0.6703310012817383,
0.9952623248100281,
-1.3548603057861328,
0.8191064596176147,
-0.03575475141406059,
-0.46292975544929504,
0.5541808009147644,
1.225530743598938,
0.49300339818000793,
-1.915494680404663,
0.7753671407699585,
-0.9359375834465027,
0.727304995059967,
0.7270828485488892,
0.7116873264312744,
0.20872779190540314,
0.7957209944725037,
-1.1882672309875488,
-1.1489404439926147,
-0.6892314553260803,
-0.7066112160682678,
1.9777460098266602,
-0.27728942036628723,
0.6169109344482422,
-0.19620269536972046,
-1.3223711252212524,
-0.10187584906816483,
0.8026426434516907,
0.4143920838832855,
-0.5246747732162476,
0.8353825211524963,
-0.6370737552642822,
-1.0127644538879395,
-1.3305776119232178,
-0.43435466289520264,
-1.0515973567962646,
-0.9202731251716614,
1.0034573078155518,
0.7680374979972839,
0.3624677360057831,
1.9293346405029297,
0.742546558380127,
0.30998843908309937,
-2.6301589012145996,
0.9115333557128906,
0.2895192503929138,
-0.051667653024196625,
0.8934543132781982,
0.3598668575286865,
1.0048234462738037,
-0.010918542742729187,
0.6266553997993469,
-2.391658306121826,
2.3602349758148193,
-0.19348759949207306,
0.6057674288749695,
-0.02299993485212326,
-0.18303515017032623,
1.109570860862732,
0.5372604131698608,
0.46969932317733765,
-1.0738600492477417,
0.6002050638198853,
-0.5839085578918457,
1.1924729347229004,
0.8523620963096619,
-0.8311298489570618,
-0.014394845813512802,
1.3807746171951294,
0.4901835322380066,
-0.4752424955368042,
-1.0125668048858643,
-0.8692150712013245,
1.018690586090088,
1.6814758777618408,
-0.03670087829232216,
-0.03660803288221359,
0.9089716076850891,
0.6287415623664856,
-1.2928204536437988,
0.04822356253862381,
-0.7675827145576477,
-0.7662497162818909,
1.6943753957748413,
2.0866944789886475,
-0.10055570304393768,
-0.3059958219528198,
-0.7449141144752502,
-1.2574282884597778,
0.8548371195793152,
-0.023750633001327515,
0.09877718985080719,
0.6641818284988403,
-0.6309079527854919,
1.0641320943832397,
0.8472210168838501,
0.9677860736846924,
0.24463282525539398,
0.28327083587646484,
0.39846721291542053,
-0.39036983251571655,
-1.163252830505371,
-0.22013378143310547,
-1.1149972677230835,
-2.5742602348327637,
0.47255274653434753,
-0.16747188568115234,
-1.4604473114013672,
0.07081706821918488,
-1.0586731433868408,
0.9054601192474365,
-0.6229415535926819,
-1.0816881656646729,
-1.5420842170715332,
0.24911580979824066,
-0.07481338828802109,
0.9447245597839355,
-1.642256498336792,
-0.1521732062101364,
1.1528024673461914,
0.8550804853439331,
-0.704689085483551,
0.8489112257957458,
0.148994579911232,
1.0623530149459839,
0.8789463639259338,
-0.36235326528549194,
0.5408947467803955,
0.004179026000201702,
-1.3667436838150024,
0.4226488471031189,
1.1958558559417725,
0.17931610345840454,
1.500472068786621,
-0.5042197704315186,
0.041271619498729706,
0.3936694264411926,
-0.5555306077003479,
-0.4640418291091919,
-0.48934340476989746,
0.6337950825691223,
0.10583236068487167,
-1.027522087097168,
-0.0534072108566761,
-0.007433701306581497,
-0.20936110615730286,
0.15354105830192566,
-1.4440399408340454,
-0.14857664704322815,
-0.3884527087211609,
-0.6045900583267212,
-1.2608023881912231,
-0.050177596509456635,
1.3431042432785034,
-0.7411287426948547,
-0.19828496873378754,
0.5488036870956421,
0.3050517737865448,
0.49167922139167786,
0.560118556022644,
-0.7181734442710876,
-0.2720147669315338,
-0.24648156762123108,
-0.39451172947883606,
0.2938755750656128,
1.342490553855896,
-0.06845597922801971,
-0.981684684753418,
0.7038486003875732,
-0.3220685124397278,
0.17210808396339417,
1.980430245399475,
0.05576738342642784,
-0.7636419534683228,
0.26689285039901733,
-0.6695259809494019,
1.8758364915847778,
1.7349417209625244,
1.267267107963562,
-0.1100422814488411,
-0.9127258658409119,
0.6604562401771545,
-0.37318021059036255,
-0.3437485098838806,
0.8201485872268677,
0.3216080665588379,
-0.19347906112670898,
-1.394619345664978,
0.7006056308746338,
1.3093912601470947,
-0.8142791390419006,
-0.8434140086174011,
0.11697755008935928,
-0.8358587026596069,
1.0822123289108276,
0.6372455358505249,
0.37326663732528687,
0.30127236247062683,
1.6201037168502808,
0.8592372536659241,
-0.3580043315887451,
0.6008318662643433,
0.5426221489906311,
-0.163519948720932,
-2.1118128299713135,
-1.1921718120574951,
0.3399726152420044,
-0.5113474130630493,
-1.6124728918075562,
1.4125856161117554,
-1.2040343284606934,
-0.9723164439201355,
0.609833836555481,
0.0894952192902565,
1.4786925315856934,
0.3486868441104889,
1.5857887268066406,
2.0903573036193848,
0.9050720930099487,
0.4603146016597748,
1.2333958148956299,
-0.09178543835878372,
-0.4980444014072418,
1.810096263885498,
-0.419535368680954,
0.5067641139030457,
1.0616798400878906,
-0.27238577604293823,
-1.0676417350769043,
-0.7966486811637878,
-1.2919349670410156,
-0.7551878094673157,
1.1932485103607178,
0.06928428262472153,
-1.0833327770233154,
0.31088492274284363,
1.7006324529647827,
0.06517774611711502,
-0.3120262324810028,
0.6423299312591553,
0.4066743850708008,
-0.8595103621482849,
-0.020465083420276642,
-0.874089241027832,
0.5320572853088379,
-0.18203110992908478,
-0.36648029088974,
0.335371732711792,
0.4642234742641449,
1.390575647354126,
-0.0639791265130043,
0.11478348821401596,
1.0497844219207764,
-1.4219059944152832,
1.5090194940567017,
-0.6674285531044006,
0.3022203743457794,
-2.3726401329040527,
1.4157264232635498,
-0.8132186532020569,
1.860230565071106,
-2.627271890640259,
0.4774037003517151,
-0.5105263590812683,
-0.49828964471817017,
0.23929135501384735,
-0.45429664850234985,
0.19138595461845398,
-0.06898532807826996,
-1.103825330734253,
-0.039720937609672546,
-0.7303730249404907,
0.6331748962402344,
1.1427855491638184,
1.4183158874511719,
-1.0472726821899414,
-0.2767843008041382,
-1.7546759843826294,
-0.17264731228351593,
-0.6784354448318481,
0.3328331410884857,
-1.9786045551300049,
-0.13308106362819672,
-1.95822274684906,
-2.3417680263519287,
-1.2710169553756714,
-0.8300260901451111,
1.0609079599380493,
0.11232845485210419,
-0.9151615500450134,
1.1938432455062866,
-0.38749048113822937,
-1.815995693206787,
1.135390281677246,
-2.213128089904785
] |
https://github.com/huggingface/datasets/issues/5950 | Support for data with instance-wise dictionary as features | Hi ! We use the Arrow columnar format under the hood, which doesn't support such dictionaries: each field must have a fixed type and exist in each sample.
Instead you can restructure your data like
```
{
"index": 0,
"keys": ["2 * x + y >= 3"],
"values": [["2 * x + y >= 3", "4 * x + 2 * y >= 6"]],
}
},
...
{
"index": 9999,
"keys": ["x >= 6"],
"values": [["x >= 6", "x >= 0", "x >= -1"]],
},
...
``` | ### Feature request
I notice that when loading data instances with feature type of python dictionary, the dictionary keys would be broadcast so that every instance has the same set of keys. Please see an example in the Motivation section.
It is possible to avoid this behavior, i.e., load dictionary features as it is and do not broadcast the keys among instances? Please note that these dictionaries would have to be processed dynamically at each training iteration into strings (and tokenized).
### Motivation
I am trying to load a dataset from a json file. Each instance of the dataset has a feature that is a dictionary but its keys depend on the instance. Every two instances may have different keys. For example, imagine a dataset that contains a set of math expressions from a bunch of mutually redundant expressions:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
}
},
...
{
"index": 9999,
"feature": {
"x >= 6": ["x >= 6", "x >= 0", "x >= -1"],
...
}
},
...
```
When directly loading the dataset using `data = load_dataset("json", data_files=file_paths, split='train')`, each instance would have all the keys from other instances and None as values. That is, instance of index 0 becomes:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
"x >= 6": None, # keys from other instances
...
}
},
```
This is not desirable. Moreover, issue would be raised if I attempt to combine two such datasets using `data = concatenate_datasets(multi_datasets)`, perhaps because their dictionary features contain different keys.
A solution I can think of is to store the dictionary features as a long string, and evaluate it later. Please kindly suggest any other solution using existing methods of datasets.
### Your contribution
N/A | 100 | 87 | Support for data with instance-wise dictionary as features
### Feature request
I notice that when loading data instances with feature type of python dictionary, the dictionary keys would be broadcast so that every instance has the same set of keys. Please see an example in the Motivation section.
It is possible to avoid this behavior, i.e., load dictionary features as it is and do not broadcast the keys among instances? Please note that these dictionaries would have to be processed dynamically at each training iteration into strings (and tokenized).
### Motivation
I am trying to load a dataset from a json file. Each instance of the dataset has a feature that is a dictionary but its keys depend on the instance. Every two instances may have different keys. For example, imagine a dataset that contains a set of math expressions from a bunch of mutually redundant expressions:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
}
},
...
{
"index": 9999,
"feature": {
"x >= 6": ["x >= 6", "x >= 0", "x >= -1"],
...
}
},
...
```
When directly loading the dataset using `data = load_dataset("json", data_files=file_paths, split='train')`, each instance would have all the keys from other instances and None as values. That is, instance of index 0 becomes:
```
{
"index": 0,
"feature": {
"2 * x + y >= 3": ["2 * x + y >= 3", "4 * x + 2 * y >= 6"],
...
"x >= 6": None, # keys from other instances
...
}
},
```
This is not desirable. Moreover, issue would be raised if I attempt to combine two such datasets using `data = concatenate_datasets(multi_datasets)`, perhaps because their dictionary features contain different keys.
A solution I can think of is to store the dictionary features as a long string, and evaluate it later. Please kindly suggest any other solution using existing methods of datasets.
### Your contribution
N/A
Hi ! We use the Arrow columnar format under the hood, which doesn't support such dictionaries: each field must have a fixed type and exist in each sample.
Instead you can restructure your data like
```
{
"index": 0,
"keys": ["2 * x + y >= 3"],
"values": [["2 * x + y >= 3", "4 * x + 2 * y >= 6"]],
}
},
...
{
"index": 9999,
"keys": ["x >= 6"],
"values": [["x >= 6", "x >= 0", "x >= -1"]],
},
...
``` | [
-1.1802839040756226,
-0.9063563942909241,
-0.776989758014679,
1.4781876802444458,
-0.29585516452789307,
-1.1167078018188477,
0.21039636433124542,
-1.0843526124954224,
1.7106215953826904,
-0.8143096566200256,
0.27680519223213196,
-1.7175010442733765,
0.015019639395177364,
-0.610283374786377,
-0.6945635676383972,
-0.9444379210472107,
-0.4322257936000824,
-0.7490655779838562,
1.045648217201233,
2.4713778495788574,
1.1838411092758179,
-1.4545254707336426,
2.5797548294067383,
0.7980270981788635,
-0.13572512567043304,
-0.9291452765464783,
0.5692631602287292,
0.06193961575627327,
-1.286090612411499,
-0.35573309659957886,
-0.9916747212409973,
-0.15124161541461945,
-0.5351507663726807,
-0.49214205145835876,
-0.04896232858300209,
0.3812740743160248,
-0.394267201423645,
-0.41369956731796265,
-0.6308759450912476,
-0.796754777431488,
0.344123899936676,
-0.3814702033996582,
0.9802266955375671,
-0.40105879306793213,
1.7723276615142822,
-0.513477087020874,
0.40594711899757385,
0.7515913248062134,
1.235687255859375,
0.3805729150772095,
0.09892860800027847,
0.23351700603961945,
0.45924070477485657,
-0.08120106905698776,
0.4906849265098572,
1.1593916416168213,
0.6460416316986084,
0.5319223999977112,
0.8023001551628113,
-2.1864070892333984,
1.2487322092056274,
-1.1098787784576416,
0.30400362610816956,
1.4316520690917969,
-0.8963897228240967,
0.38326531648635864,
-1.7827322483062744,
-0.044262368232011795,
0.5725180506706238,
-2.2382144927978516,
0.2586016356945038,
-1.3469551801681519,
-0.5976642966270447,
0.9507983326911926,
0.4370242953300476,
-1.1649384498596191,
0.11285769194364548,
-0.3537041246891022,
0.8967241644859314,
0.38592058420181274,
1.119193196296692,
-1.7368019819259644,
-0.05757806822657585,
-0.3289653956890106,
0.1876605749130249,
-1.2911204099655151,
-1.4699612855911255,
0.6107358932495117,
0.6326701045036316,
0.5310451984405518,
-0.19756470620632172,
1.069960355758667,
-1.1285244226455688,
0.7414895296096802,
-0.9819656014442444,
-1.6977958679199219,
-1.4900511503219604,
-2.1963963508605957,
-2.3056130409240723,
0.8132857084274292,
-0.49763116240501404,
-0.5006400346755981,
1.999127745628357,
-1.025619626045227,
-1.5523937940597534,
1.1868025064468384,
0.2760380208492279,
-0.00867802370339632,
2.502223491668701,
0.18142201006412506,
-0.6742515563964844,
0.4819309413433075,
-0.8328539729118347,
0.7715620398521423,
-0.31057173013687134,
1.3789132833480835,
0.424206405878067,
-1.0155905485153198,
1.616795301437378,
-0.3023076355457306,
0.5709916353225708,
-0.6019931435585022,
-0.4997367262840271,
-0.6930357217788696,
0.3037038743495941,
1.8756272792816162,
-0.2494109570980072,
1.519658088684082,
-0.23872098326683044,
-1.5932501554489136,
-1.7213631868362427,
0.9604163765907288,
0.45006024837493896,
-0.7119906544685364,
0.08804537355899811,
-0.38298410177230835,
0.25634655356407166,
-0.13057605922222137,
1.1697609424591064,
1.4200553894042969,
0.790668249130249,
-0.29225850105285645,
-0.8285531997680664,
0.15331177413463593,
-0.15378007292747498,
-0.8378922343254089,
-1.6729482412338257,
-0.3332711458206177,
0.07278355956077576,
0.5746092796325684,
-1.2034945487976074,
1.7042419910430908,
0.8754389882087708,
1.875614047050476,
0.9748479127883911,
-0.48965349793434143,
1.4901790618896484,
0.1164039745926857,
1.7574641704559326,
-0.5846787691116333,
0.6265297532081604,
-0.3916992247104645,
-1.125521183013916,
0.8947705030441284,
-0.2790735960006714,
-2.0133347511291504,
-0.7617151141166687,
-0.7833610773086548,
-0.2477620393037796,
-0.7626272439956665,
0.9248802661895752,
-0.18434670567512512,
-1.4046015739440918,
0.3030567467212677,
-0.6980875134468079,
0.004218527115881443,
-1.2282005548477173,
0.43310675024986267,
0.7034334540367126,
-0.6648711562156677,
0.09140850603580475,
-0.11821111291646957,
-1.2503997087478638,
-0.4817635715007782,
0.1622599959373474,
1.942697286605835,
-0.727078914642334,
0.8735309839248657,
1.0535629987716675,
-0.811420202255249,
-0.048287827521562576,
0.34398776292800903,
-0.30233752727508545,
0.7457115054130554,
-1.0940355062484741,
-0.4026118814945221,
1.1918116807937622,
-0.19475626945495605,
-0.5308427810668945,
1.3752199411392212,
0.7084247469902039,
-0.9745054244995117,
-0.19684939086437225,
-0.15024465322494507,
-0.7011517882347107,
0.09060664474964142,
-1.596359133720398,
-0.07533860206604004,
0.4027946889400482,
-1.5226283073425293,
-0.5393738746643066,
-0.2057275027036667,
1.2644262313842773,
-0.20221920311450958,
1.335658073425293,
-0.2838086187839508,
-0.23625729978084564,
-0.40812796354293823,
-0.32029762864112854,
0.07906977832317352,
-0.22160986065864563,
-0.530019998550415,
0.2529076039791107,
-0.891059160232544,
0.29704025387763977,
1.4084222316741943,
0.38386014103889465,
0.01043789368122816,
0.4416710138320923,
1.0507593154907227,
0.5249568819999695,
-0.07243615388870239,
-0.971817135810852,
-1.3844897747039795,
1.9315632581710815,
-1.4132405519485474,
2.043994188308716,
0.7188917994499207,
0.022191103547811508,
-1.7729393243789673,
-2.007070302963257,
1.3290002346038818,
1.1751563549041748,
2.3860092163085938,
0.5211553573608398,
0.3908102214336395,
-0.784522533416748,
-0.6054233312606812,
0.31165188550949097,
-1.1095120906829834,
-0.7106930613517761,
0.22248396277427673,
2.3921196460723877,
1.6746330261230469,
-0.5900776982307434,
-0.16384004056453705,
-1.0648304224014282,
1.3919092416763306,
-0.09951236099004745,
0.1687040477991104,
2.0407168865203857,
-0.27040570974349976,
-1.065392017364502,
1.2983988523483276,
-2.3152101039886475,
0.03164907172322273,
1.9612609148025513,
0.2438201904296875,
0.0954521894454956,
-1.34269118309021,
-0.7167263627052307,
-0.30970078706741333,
-0.5055252313613892,
-1.299784779548645,
0.5096004009246826,
-0.20524612069129944,
-0.7362897396087646,
-1.528252124786377,
0.16996540129184723,
-1.1104211807250977,
-1.6077125072479248,
0.13260328769683838,
1.821099042892456,
2.0100631713867188,
-0.8868829011917114,
1.4629583358764648,
-0.29846566915512085,
0.04749371111392975,
1.2096495628356934,
1.192382574081421,
3.1086864471435547,
1.9540780782699585,
-1.2506386041641235,
0.5760167241096497,
-0.160044327378273,
-0.4049244225025177,
1.0896110534667969,
-1.256531000137329,
1.2945830821990967,
-0.08694129437208176,
-1.1605061292648315,
-1.1682579517364502,
0.8799059987068176,
0.4475298225879669,
0.04462248831987381,
-0.47593167424201965,
1.1068800687789917,
0.08901318162679672,
1.4083365201950073,
0.5428606271743774,
-0.25059840083122253,
0.6897097826004028,
-0.4746010899543762,
-0.3788589835166931,
1.6581454277038574,
0.23748956620693207,
-1.4507066011428833,
-2.3184993267059326,
-0.2457357943058014,
-0.9338337182998657,
0.11323300749063492,
-0.530933678150177,
-1.0779200792312622,
1.8073689937591553,
0.3184725344181061,
-1.2302411794662476,
-0.30253973603248596,
-0.34481698274612427,
-0.5474144816398621,
2.7702178955078125,
-1.3878450393676758,
-0.23971673846244812,
-0.9022400975227356,
-0.7444950938224792,
1.6422301530838013,
-1.1936324834823608,
-0.10379374027252197,
-1.137468934059143,
-0.49464571475982666,
-1.3528538942337036,
-0.5676994323730469,
0.06821590662002563,
-0.9272465705871582,
0.8858489394187927,
0.27143239974975586,
-1.2043540477752686,
-0.40591204166412354,
-0.9561353325843811,
0.7790294289588928,
-0.11551930755376816,
0.26779547333717346,
1.931793451309204,
0.4341382682323456,
-0.324645072221756,
0.6893339157104492,
1.2217936515808105,
0.6394782066345215,
-0.6283664107322693,
0.28388160467147827,
-0.6719101667404175,
0.34910115599632263,
-1.1999017000198364,
0.24659287929534912,
-2.767732620239258,
0.657754123210907,
-0.14717327058315277,
-0.09816711395978928,
0.09640579670667648,
-1.2036387920379639,
1.1560652256011963,
2.6304023265838623,
-1.1316865682601929,
0.41693198680877686,
0.2830495834350586,
1.2567169666290283,
-1.5573246479034424,
0.30912938714027405,
-0.3791476786136627,
2.136371612548828,
0.22559428215026855,
1.1270573139190674,
-0.4739329516887665,
-2.39656400680542,
0.557308554649353,
-1.2531331777572632,
-1.2093353271484375,
0.7716813683509827,
-0.9192683100700378,
0.020038388669490814,
-1.5257846117019653,
-0.20993581414222717,
-0.788830578327179,
-1.1241390705108643,
0.7283232808113098,
0.09757368266582489,
0.42351654171943665,
-0.6104469895362854,
0.4049350619316101,
-2.271639823913574,
-1.357160210609436,
-0.2588426172733307,
-0.8869572281837463,
0.5220858454704285,
-0.3175736963748932,
0.8587650656700134,
-0.27894261479377747,
-0.08538661152124405,
0.3854358494281769,
1.440887212753296,
3.3772106170654297,
0.13839755952358246,
0.41524985432624817,
-0.2239665538072586,
-0.9473718404769897,
1.5504486560821533,
0.9158276319503784,
0.0739188939332962,
-0.5154693126678467,
-1.1646440029144287,
1.175018310546875,
1.929789662361145,
1.083941102027893,
-0.08784686774015427,
-0.7828831076622009,
-0.6208269596099854,
-0.024817366153001785,
0.2902866303920746,
0.3953692317008972,
1.0053672790527344,
-0.034552641212940216,
0.004777394235134125,
1.4796663522720337,
1.246880292892456,
-0.4653734862804413,
0.2591765820980072,
-0.7825555801391602,
-0.5085877776145935,
0.5615260004997253,
0.33955201506614685,
0.053803492337465286,
0.39922669529914856,
-1.016093373298645,
-0.25150299072265625,
-0.3851190507411957,
-0.9901168346405029,
-0.6437079906463623,
-0.5277388691902161,
-0.34763625264167786,
1.6473218202590942,
0.1393822431564331,
-0.5001019835472107,
-0.0034179622307419777,
-0.8475989103317261,
-0.042275555431842804,
-1.143394112586975,
0.30454859137535095,
-0.15365774929523468,
-0.15492196381092072,
-0.17805087566375732,
1.8815749883651733,
-0.8109704256057739,
-1.974701166152954,
0.25925296545028687,
0.33975473046302795,
-0.30566373467445374,
0.2750812768936157,
1.5913771390914917,
0.5084025859832764,
1.5119775533676147,
1.2616270780563354,
0.9889551401138306,
-0.6208179593086243,
-1.3317575454711914,
0.6797804236412048,
0.9473673701286316,
-1.3640477657318115,
0.8448445796966553,
-0.01766005903482437,
-0.4485228657722473,
0.49143457412719727,
1.2051904201507568,
0.4619717001914978,
-1.948984146118164,
0.7707142233848572,
-0.9358588457107544,
0.7966629862785339,
0.6678666472434998,
0.6862425208091736,
0.14390964806079865,
0.8026661276817322,
-1.2104884386062622,
-1.0887969732284546,
-0.7426109910011292,
-0.632832407951355,
2.00356388092041,
-0.20699281990528107,
0.7497418522834778,
-0.29782921075820923,
-1.351775884628296,
-0.01043490320444107,
0.6354415416717529,
0.32020825147628784,
-0.4602911174297333,
0.834476113319397,
-0.5931950211524963,
-1.1206190586090088,
-1.4058284759521484,
-0.4487890303134918,
-1.137229084968567,
-0.9693081378936768,
1.1596766710281372,
0.7333691716194153,
0.28996706008911133,
1.8114149570465088,
0.6673725247383118,
0.27899396419525146,
-2.648029327392578,
0.9165822267532349,
0.2774941623210907,
-0.10388007760047913,
0.8828100562095642,
0.41068780422210693,
1.0117145776748657,
-0.10628817230463028,
0.5001039505004883,
-2.4918901920318604,
2.378978729248047,
-0.21720047295093536,
0.7193039059638977,
0.015952423214912415,
-0.15927501022815704,
0.9791334271430969,
0.6146886348724365,
0.4194299280643463,
-1.0488717555999756,
0.5055816173553467,
-0.5908239483833313,
1.178813099861145,
0.8826950788497925,
-0.67408686876297,
-0.05277697741985321,
1.224852442741394,
0.5743549466133118,
-0.4281161427497864,
-0.9126167893409729,
-0.8866013884544373,
0.9450169205665588,
1.6703561544418335,
-0.11679396778345108,
-0.014832298271358013,
0.812960147857666,
0.6489537358283997,
-1.3915497064590454,
-0.03464402258396149,
-0.7745652794837952,
-0.7112199068069458,
1.6245166063308716,
2.0846073627471924,
-0.1108555793762207,
-0.2254168838262558,
-0.6376999020576477,
-1.29518461227417,
0.7472424507141113,
-0.02492528408765793,
0.2532428801059723,
0.6599573493003845,
-0.5785199999809265,
1.0298413038253784,
0.7651246190071106,
0.9489389657974243,
0.3246878981590271,
0.3496432602405548,
0.5018053650856018,
-0.4270148277282715,
-1.1369879245758057,
-0.22125974297523499,
-1.1289410591125488,
-2.5690903663635254,
0.5327498912811279,
-0.34856119751930237,
-1.3947006464004517,
-0.07606182992458344,
-0.9379064440727234,
0.9875124096870422,
-0.5581522583961487,
-0.9923667311668396,
-1.530126929283142,
0.12748491764068604,
-0.048378899693489075,
1.0592728853225708,
-1.5658365488052368,
-0.18115855753421783,
1.2303730249404907,
0.9301271438598633,
-0.7097078561782837,
0.9868263006210327,
0.20581036806106567,
1.1295032501220703,
0.8204706311225891,
-0.4110528528690338,
0.4710061848163605,
-0.022151827812194824,
-1.3666707277297974,
0.35269895195961,
1.1357219219207764,
0.19563600420951843,
1.500874638557434,
-0.5851691961288452,
-0.02873929962515831,
0.4152453541755676,
-0.5593564510345459,
-0.45989328622817993,
-0.48992398381233215,
0.6157867312431335,
0.08323154598474503,
-0.968742847442627,
-0.03917534276843071,
-0.009762300178408623,
-0.1602640300989151,
0.10415410995483398,
-1.3801827430725098,
-0.06254968792200089,
-0.4428298771381378,
-0.5561037063598633,
-1.1139283180236816,
-0.1102907657623291,
1.3651750087738037,
-0.7668954133987427,
-0.09436798095703125,
0.44665804505348206,
0.28590327501296997,
0.4912987947463989,
0.5953598022460938,
-0.6992430090904236,
-0.40532204508781433,
-0.2295009195804596,
-0.4127342700958252,
0.3025154173374176,
1.3971126079559326,
-0.1183660551905632,
-1.0178248882293701,
0.738572359085083,
-0.25667691230773926,
0.08440209925174713,
1.9792126417160034,
0.049545466899871826,
-0.8648850917816162,
0.2209807187318802,
-0.6454545259475708,
1.8189419507980347,
1.7264422178268433,
1.3631614446640015,
-0.19067959487438202,
-0.8143180012702942,
0.6499905586242676,
-0.3926224112510681,
-0.4677056074142456,
0.811811089515686,
0.358706533908844,
-0.20862138271331787,
-1.506953239440918,
0.7148206233978271,
1.3211898803710938,
-0.9017356038093567,
-0.8541745543479919,
0.21888239681720734,
-0.8100910782814026,
1.0337011814117432,
0.649771511554718,
0.42119115591049194,
0.36972126364707947,
1.6182109117507935,
0.8414788842201233,
-0.47880110144615173,
0.5321884751319885,
0.5958810448646545,
-0.15604780614376068,
-2.0901176929473877,
-1.2499198913574219,
0.2827928960323334,
-0.5960034132003784,
-1.5101029872894287,
1.4484108686447144,
-1.1836771965026855,
-1.0690858364105225,
0.557339072227478,
0.08873356878757477,
1.3813647031784058,
0.4243377447128296,
1.5511101484298706,
2.1145095825195312,
0.8829340934753418,
0.40852200984954834,
1.2844003438949585,
-0.1495838314294815,
-0.5438210964202881,
1.8191977739334106,
-0.421858012676239,
0.43178534507751465,
1.102160096168518,
-0.14635702967643738,
-0.9900615215301514,
-0.8221324682235718,
-1.1930897235870361,
-0.741686224937439,
1.2252118587493896,
0.06664310395717621,
-1.0691027641296387,
0.2419818639755249,
1.6083537340164185,
0.0005596363916993141,
-0.46827489137649536,
0.6124191880226135,
0.42589637637138367,
-0.8450862169265747,
-0.07108412683010101,
-0.9259999990463257,
0.6245728135108948,
-0.29393690824508667,
-0.340194433927536,
0.3400363028049469,
0.48582980036735535,
1.4258947372436523,
-0.08788243681192398,
0.17869023978710175,
1.1198313236236572,
-1.3745688199996948,
1.6164013147354126,
-0.6207050681114197,
0.21317538619041443,
-2.3009936809539795,
1.40810227394104,
-0.7562540173530579,
1.9508452415466309,
-2.678497791290283,
0.48612362146377563,
-0.46206068992614746,
-0.48416668176651,
0.27637240290641785,
-0.45001307129859924,
0.1947753131389618,
-0.13441358506679535,
-1.1280808448791504,
-0.07942662388086319,
-0.7013721466064453,
0.5364164710044861,
1.086460828781128,
1.372377872467041,
-1.0649317502975464,
-0.4612770676612854,
-1.7276639938354492,
-0.17145563662052155,
-0.699459969997406,
0.28011268377304077,
-2.0001649856567383,
-0.28654223680496216,
-1.7949599027633667,
-2.338148832321167,
-1.3438410758972168,
-0.8032062649726868,
1.117713212966919,
0.04838942736387253,
-0.8581225275993347,
1.2408653497695923,
-0.34067144989967346,
-1.9188896417617798,
1.1996945142745972,
-2.1355252265930176
] |
https://github.com/huggingface/datasets/issues/5947 | Return the audio filename when decoding fails due to corrupt files | Hi ! The audio data don't always exist as files on disk - the blobs are often stored in the Arrow files. For now I'd suggest disabling decoding with `.cast_column("audio", Audio(decode=False))` and apply your own decoding that handles corrupted files (maybe to filter them out ?)
cc @sanchit-gandhi since it's related to our discussion about allowing users to make decoding return `None` and show a warning when there are corrupted files | ### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails. | 101 | 71 | Return the audio filename when decoding fails due to corrupt files
### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails.
Hi ! The audio data don't always exist as files on disk - the blobs are often stored in the Arrow files. For now I'd suggest disabling decoding with `.cast_column("audio", Audio(decode=False))` and apply your own decoding that handles corrupted files (maybe to filter them out ?)
cc @sanchit-gandhi since it's related to our discussion about allowing users to make decoding return `None` and show a warning when there are corrupted files | [
-1.2344496250152588,
-0.9384772181510925,
-0.8031424880027771,
1.4683998823165894,
-0.1905129998922348,
-1.2098997831344604,
0.09782833606004715,
-1.101181983947754,
1.5813466310501099,
-0.8477035760879517,
0.3436574935913086,
-1.608137607574463,
-0.013095255941152573,
-0.5555558800697327,
-0.7877441644668579,
-0.9794477820396423,
-0.4055544137954712,
-0.7196041941642761,
1.002682089805603,
2.405928134918213,
1.2633620500564575,
-1.3828628063201904,
2.6453025341033936,
0.6523872017860413,
-0.3526238799095154,
-1.0381929874420166,
0.49039778113365173,
0.07840704172849655,
-1.2108296155929565,
-0.5295403003692627,
-0.9738711714744568,
-0.05418603867292404,
-0.543292760848999,
-0.4482766389846802,
0.006128883920609951,
0.30320635437965393,
-0.27326881885528564,
-0.45944589376449585,
-0.6112942099571228,
-0.8490613698959351,
0.4620407223701477,
-0.4694403111934662,
0.967701256275177,
-0.33802446722984314,
1.8596618175506592,
-0.5593294501304626,
0.4653646647930145,
0.6566033363342285,
1.5019737482070923,
0.2747093737125397,
0.06284792721271515,
0.37903788685798645,
0.4758603572845459,
0.002423669211566448,
0.4424978196620941,
1.09342360496521,
0.6369985342025757,
0.5032361149787903,
0.7191505432128906,
-2.1934380531311035,
1.1893552541732788,
-1.0431663990020752,
0.2516200840473175,
1.2983620166778564,
-0.8906809687614441,
0.3811652660369873,
-1.780429482460022,
-0.019725574180483818,
0.5621591210365295,
-2.275233268737793,
0.25205957889556885,
-1.264053225517273,
-0.45034947991371155,
1.0553466081619263,
0.27636656165122986,
-1.288378357887268,
0.15294267237186432,
-0.39961501955986023,
1.011954665184021,
0.35566094517707825,
1.0706578493118286,
-1.6589587926864624,
-0.04426191747188568,
-0.36647388339042664,
-0.04969547688961029,
-1.174718976020813,
-1.4478809833526611,
0.4405823051929474,
0.497324675321579,
0.49315813183784485,
-0.00797915831208229,
1.0470008850097656,
-0.9073206186294556,
0.8434299230575562,
-1.0190658569335938,
-1.5917322635650635,
-1.4846566915512085,
-2.120455026626587,
-2.1848018169403076,
0.833593487739563,
-0.5066143870353699,
-0.5215310454368591,
2.0834195613861084,
-0.9648013114929199,
-1.7905329465866089,
1.1987766027450562,
0.17405815422534943,
0.006241070106625557,
2.3546230792999268,
0.23936952650547028,
-0.701660692691803,
0.4642752707004547,
-0.7566993236541748,
0.8383885025978088,
-0.6679703593254089,
1.3709367513656616,
0.39621254801750183,
-1.0314072370529175,
1.6584481000900269,
-0.5025140643119812,
0.4620727300643921,
-0.6872875094413757,
-0.6426949501037598,
-0.8852004408836365,
0.4392940104007721,
1.8926992416381836,
-0.3206310570240021,
1.5818015336990356,
-0.38628435134887695,
-1.5426017045974731,
-1.6715643405914307,
0.8813880681991577,
0.4700179994106293,
-0.823520839214325,
0.06110340356826782,
-0.22712074220180511,
0.17030569911003113,
-0.042264558374881744,
1.0288499593734741,
1.2957589626312256,
0.639722466468811,
-0.39830049872398376,
-0.870399534702301,
0.27342331409454346,
0.03586915135383606,
-0.7155736684799194,
-1.7558281421661377,
-0.39316025376319885,
0.051915280520915985,
0.6414885520935059,
-1.3586547374725342,
1.7155271768569946,
0.9363768100738525,
1.897443413734436,
0.9576179385185242,
-0.37857764959335327,
1.5225284099578857,
0.10223553329706192,
1.8221937417984009,
-0.4052983224391937,
0.7151108384132385,
-0.290266752243042,
-1.2044380903244019,
0.7500050663948059,
-0.35614868998527527,
-2.04317045211792,
-0.7646780610084534,
-0.7551738619804382,
-0.16319847106933594,
-0.8032315969467163,
0.9564030766487122,
-0.316054105758667,
-1.338994026184082,
0.3389786183834076,
-0.6375392079353333,
0.19562576711177826,
-1.2843092679977417,
0.3496188223361969,
0.7271742820739746,
-0.5723689794540405,
0.09818718582391739,
-0.29285499453544617,
-1.1805109977722168,
-0.4416004717350006,
0.2944849729537964,
1.8635284900665283,
-0.8323045372962952,
0.8982250690460205,
0.9467141628265381,
-0.6504477858543396,
0.007128271274268627,
0.2578941285610199,
-0.2281634658575058,
0.9413130879402161,
-1.0764243602752686,
-0.34497150778770447,
1.2670197486877441,
-0.25165876746177673,
-0.5198022127151489,
1.3165333271026611,
0.7347379922866821,
-0.9295027256011963,
-0.17944243550300598,
-0.1986493617296219,
-0.8041869401931763,
-0.06105959415435791,
-1.7143223285675049,
-0.14985691010951996,
0.3519945740699768,
-1.52424955368042,
-0.47144854068756104,
-0.26004451513290405,
1.2862628698349,
-0.1985265463590622,
1.4053101539611816,
-0.44406506419181824,
-0.2554932236671448,
-0.3136521577835083,
-0.3696410059928894,
0.17143243551254272,
-0.31529501080513,
-0.6334258317947388,
0.23035147786140442,
-0.7191387414932251,
0.2984734773635864,
1.397829294204712,
0.35543256998062134,
0.054929524660110474,
0.4629417359828949,
0.9897320866584778,
0.4002845287322998,
-0.07488732039928436,
-0.9005334973335266,
-1.4996873140335083,
2.0499427318573,
-1.5181846618652344,
2.0616812705993652,
0.7540711760520935,
-0.021480169147253036,
-1.7690000534057617,
-1.8790795803070068,
1.289104700088501,
1.1848987340927124,
2.3092498779296875,
0.6456414461135864,
0.5075628161430359,
-0.9141286611557007,
-0.6005744338035583,
0.3023664355278015,
-1.1117388010025024,
-0.7981451153755188,
-0.003932139836251736,
2.371289014816284,
1.7045997381210327,
-0.39885327219963074,
-0.23801662027835846,
-1.0581398010253906,
1.346346139907837,
-0.09836149960756302,
0.20014256238937378,
1.9461040496826172,
-0.25839173793792725,
-1.1069281101226807,
1.2254716157913208,
-2.316537618637085,
0.12150142341852188,
2.0085930824279785,
0.2830623388290405,
0.15199410915374756,
-1.4192734956741333,
-0.7298970818519592,
-0.28410300612449646,
-0.3906203508377075,
-1.1671819686889648,
0.5026420950889587,
-0.29235199093818665,
-0.6773161292076111,
-1.4215307235717773,
0.17427422106266022,
-1.0624536275863647,
-1.6149040460586548,
0.3013778328895569,
2.011147975921631,
1.9316706657409668,
-0.7280727028846741,
1.5701172351837158,
-0.3138991892337799,
0.17335723340511322,
1.331242561340332,
1.2211414575576782,
3.166584014892578,
1.903926134109497,
-1.320630431175232,
0.5599873065948486,
-0.13489919900894165,
-0.468752920627594,
1.013293981552124,
-1.1116377115249634,
1.377068042755127,
-0.09888371080160141,
-1.1311562061309814,
-1.1951020956039429,
0.8588901162147522,
0.46025800704956055,
0.01635659672319889,
-0.5927922129631042,
1.1802383661270142,
0.11163947731256485,
1.375434398651123,
0.545964777469635,
-0.40735355019569397,
0.5933125019073486,
-0.27282047271728516,
-0.5688012838363647,
1.6331497430801392,
0.2101682722568512,
-1.4297196865081787,
-2.4114127159118652,
-0.20023956894874573,
-0.8084642887115479,
0.10509705543518066,
-0.474717378616333,
-1.0615108013153076,
1.754958987236023,
0.4503285586833954,
-1.2351179122924805,
-0.33436092734336853,
-0.29597005248069763,
-0.6012240648269653,
2.6782732009887695,
-1.418627381324768,
-0.2583591639995575,
-0.9411091208457947,
-0.5447344183921814,
1.650642991065979,
-1.2072334289550781,
-0.20549215376377106,
-0.9419827461242676,
-0.6389689445495605,
-1.3426419496536255,
-0.5136373043060303,
0.0732702910900116,
-0.9338834881782532,
0.7479081749916077,
0.40108075737953186,
-1.189192771911621,
-0.3671223223209381,
-0.8056028485298157,
0.7796534895896912,
-0.06466171890497208,
0.3239578902721405,
1.9991271495819092,
0.537276029586792,
-0.3418424129486084,
0.7876817584037781,
1.1637017726898193,
0.6241880059242249,
-0.7465359568595886,
0.20135396718978882,
-0.6743029356002808,
0.29914364218711853,
-1.330181360244751,
0.29064303636550903,
-2.793961524963379,
0.6746919751167297,
-0.18321943283081055,
-0.1140933558344841,
0.06170909106731415,
-1.283011794090271,
1.1248914003372192,
2.5539896488189697,
-1.1245416402816772,
0.4685949683189392,
0.2976692020893097,
1.2421917915344238,
-1.6353321075439453,
0.46668121218681335,
-0.28282833099365234,
2.192112922668457,
0.20332464575767517,
1.2948174476623535,
-0.4766239821910858,
-2.30998158454895,
0.5669161081314087,
-1.216260552406311,
-1.263440728187561,
0.7547050714492798,
-0.7686564922332764,
-0.05276276916265488,
-1.4942508935928345,
-0.2829131782054901,
-0.8085066676139832,
-1.2704983949661255,
0.7183390259742737,
0.1251205950975418,
0.4544987380504608,
-0.560930073261261,
0.3276979625225067,
-2.1906752586364746,
-1.4330517053604126,
-0.2090936303138733,
-0.9203599691390991,
0.3273918628692627,
-0.3920711576938629,
0.7882696986198425,
-0.2123928666114807,
-0.018096983432769775,
0.3579792082309723,
1.536782145500183,
3.3734195232391357,
0.25155454874038696,
0.4348026216030121,
-0.20818349719047546,
-0.8150668740272522,
1.4589637517929077,
0.8528369069099426,
-0.1544725000858307,
-0.5698137283325195,
-1.1417440176010132,
1.1644953489303589,
1.9302407503128052,
0.8860048055648804,
0.042699798941612244,
-0.6973289251327515,
-0.6135371923446655,
-0.13423509895801544,
0.11541642248630524,
0.5739919543266296,
0.8995540142059326,
0.10735072195529938,
0.10229598730802536,
1.398179531097412,
1.3149504661560059,
-0.45245417952537537,
0.40571653842926025,
-0.7406418323516846,
-0.48741787672042847,
0.4333645701408386,
0.3983938694000244,
-0.09492312371730804,
0.3058227598667145,
-0.9155802130699158,
-0.259031742811203,
-0.461044579744339,
-0.9321223497390747,
-0.7384412884712219,
-0.4295857548713684,
-0.3821521997451782,
1.617560625076294,
0.1870516836643219,
-0.5375741124153137,
-0.028800539672374725,
-0.6974477171897888,
-0.1569058895111084,
-1.0328688621520996,
0.3077836334705353,
-0.02013000100851059,
-0.1309223622083664,
0.08921818435192108,
1.8498787879943848,
-0.9021101593971252,
-2.146885395050049,
0.28045499324798584,
0.2962881624698639,
-0.3771042823791504,
0.20517511665821075,
1.5310673713684082,
0.5398379564285278,
1.4267510175704956,
1.3190940618515015,
0.8930922746658325,
-0.7688868045806885,
-1.2709444761276245,
0.7417779564857483,
1.0011075735092163,
-1.4646892547607422,
0.7626766562461853,
0.019758272916078568,
-0.4535887837409973,
0.5769176483154297,
1.274533987045288,
0.45727360248565674,
-1.928744912147522,
0.857978880405426,
-0.7346290349960327,
0.7931594252586365,
0.7465945482254028,
0.6224517226219177,
0.2908805310726166,
0.758393406867981,
-1.234866976737976,
-1.1178216934204102,
-0.7368115186691284,
-0.6586962342262268,
1.9353816509246826,
-0.32142147421836853,
0.6212503910064697,
-0.036086663603782654,
-1.321256160736084,
-0.10778602212667465,
0.6353958249092102,
0.3699410855770111,
-0.4379245340824127,
0.7602596879005432,
-0.5820789337158203,
-1.082876205444336,
-1.4842627048492432,
-0.4119958281517029,
-1.060278058052063,
-0.9979920387268066,
0.9934834241867065,
0.8939979672431946,
0.10154499113559723,
1.8899071216583252,
0.6555747985839844,
0.17383167147636414,
-2.739757537841797,
0.958023190498352,
0.29475632309913635,
-0.0159334447234869,
0.9413354992866516,
0.2283170223236084,
0.9967986345291138,
0.08371924608945847,
0.4530821740627289,
-2.3795385360717773,
2.331878662109375,
-0.34739768505096436,
0.7373835444450378,
-0.054038845002651215,
-0.11408626288175583,
1.17094886302948,
0.5890551805496216,
0.5537242889404297,
-1.0732773542404175,
0.6835233569145203,
-0.59921795129776,
1.1838443279266357,
1.0499157905578613,
-0.8778667449951172,
-0.03410203754901886,
1.4328484535217285,
0.5119702219963074,
-0.6038062572479248,
-0.9106643795967102,
-0.8837456703186035,
0.8657775521278381,
1.8260483741760254,
-0.05138389766216278,
-0.012011724524199963,
0.9194599986076355,
0.6134670972824097,
-1.383847713470459,
0.12275571376085281,
-0.7586096525192261,
-0.8305145502090454,
1.6480023860931396,
2.045200824737549,
-0.10293320566415787,
-0.3804430067539215,
-0.7497149109840393,
-1.2970411777496338,
0.8526793122291565,
-0.08341009169816971,
0.2573661208152771,
0.6191785931587219,
-0.8260732889175415,
1.1076058149337769,
0.8334338068962097,
0.8867206573486328,
0.2612597346305847,
0.20739996433258057,
0.41624322533607483,
-0.3081505596637726,
-1.1185041666030884,
-0.17619147896766663,
-1.2780452966690063,
-2.44456148147583,
0.38846296072006226,
-0.2558613419532776,
-1.3115203380584717,
0.032775960862636566,
-1.005383014678955,
0.9296244978904724,
-0.628971517086029,
-1.0902267694473267,
-1.574871301651001,
0.059566766023635864,
-0.12610304355621338,
0.8549428582191467,
-1.613266944885254,
-0.17449240386486053,
1.3040755987167358,
0.9729377627372742,
-0.6022449135780334,
1.0462086200714111,
0.18593649566173553,
1.0115991830825806,
0.819309413433075,
-0.3596831262111664,
0.45897939801216125,
-0.07772761583328247,
-1.3413059711456299,
0.5308555364608765,
1.139586329460144,
0.19483718276023865,
1.628415584564209,
-0.6665898561477661,
-0.029760444536805153,
0.3855159878730774,
-0.44738882780075073,
-0.4206560254096985,
-0.5804550051689148,
0.6623422503471375,
0.08967525511980057,
-0.9699408411979675,
0.08511534333229065,
-0.13339954614639282,
-0.16154251992702484,
0.09350473433732986,
-1.5335701704025269,
-0.2044331580400467,
-0.321265310049057,
-0.6133771538734436,
-1.2189254760742188,
-0.11351461708545685,
1.318459391593933,
-0.7306559681892395,
-0.047596126794815063,
0.5123039484024048,
0.3897976577281952,
0.49699994921684265,
0.6192581653594971,
-0.6665323376655579,
-0.4184422791004181,
-0.29696887731552124,
-0.3338114023208618,
0.3324919044971466,
1.3051584959030151,
-0.1259578913450241,
-0.9049346446990967,
0.5826184749603271,
-0.3279712498188019,
0.12068422883749008,
2.000070810317993,
0.10395421087741852,
-0.7105795741081238,
0.3717518746852875,
-0.8149557113647461,
1.9046821594238281,
1.689009428024292,
1.3160940408706665,
-0.1243625208735466,
-0.9541711807250977,
0.6627032160758972,
-0.3096502721309662,
-0.3349337875843048,
0.9400538802146912,
0.5471310019493103,
-0.054422520101070404,
-1.5057976245880127,
0.6186585426330566,
1.176361322402954,
-0.9614839553833008,
-0.7469998598098755,
0.09497091919183731,
-0.7811057567596436,
0.9586650729179382,
0.7004305720329285,
0.43889281153678894,
0.23883594572544098,
1.6646524667739868,
0.8324172496795654,
-0.40584757924079895,
0.5783863663673401,
0.5011104345321655,
-0.1370626538991928,
-2.135319948196411,
-1.2491337060928345,
0.33657965064048767,
-0.35971981287002563,
-1.6137276887893677,
1.5054086446762085,
-1.0887210369110107,
-0.8936934471130371,
0.5958566665649414,
0.14024120569229126,
1.526073932647705,
0.3307497799396515,
1.5731029510498047,
2.1326334476470947,
0.9579319357872009,
0.3265345096588135,
1.3471553325653076,
-0.14950519800186157,
-0.47381705045700073,
1.8066736459732056,
-0.4063590168952942,
0.377996563911438,
1.1663565635681152,
-0.3967231512069702,
-0.9715154767036438,
-0.8471298217773438,
-1.3234397172927856,
-0.7235135436058044,
1.094731092453003,
0.14358504116535187,
-1.07590913772583,
0.23397670686244965,
1.6612095832824707,
0.07069751620292664,
-0.4161241948604584,
0.531767725944519,
0.42706310749053955,
-0.7749802470207214,
-0.11630402505397797,
-0.9362694621086121,
0.48225414752960205,
-0.1141887754201889,
-0.45230352878570557,
0.29301443696022034,
0.35023003816604614,
1.3292094469070435,
-0.019007179886102676,
0.09196775406599045,
1.1154556274414062,
-1.414099931716919,
1.3683207035064697,
-0.6386894583702087,
0.2452501654624939,
-2.218627691268921,
1.4986189603805542,
-0.7865151762962341,
1.9425888061523438,
-2.6167287826538086,
0.4330327808856964,
-0.6668873429298401,
-0.40565741062164307,
0.38374945521354675,
-0.41796571016311646,
0.27810993790626526,
-0.22692200541496277,
-1.130847692489624,
-0.17613835632801056,
-0.6550350189208984,
0.5880260467529297,
1.136865496635437,
1.2546908855438232,
-1.0564769506454468,
-0.2739676237106323,
-1.6986000537872314,
-0.10181109607219696,
-0.6153004765510559,
0.3327956199645996,
-2.0983338356018066,
-0.18212157487869263,
-1.8991262912750244,
-2.3283133506774902,
-1.292560338973999,
-0.6858326196670532,
1.0744014978408813,
0.0640212818980217,
-0.868557333946228,
1.3170685768127441,
-0.3017260730266571,
-1.7997355461120605,
1.0323123931884766,
-2.2278788089752197
] |
https://github.com/huggingface/datasets/issues/5947 | Return the audio filename when decoding fails due to corrupt files | Thanks @lhoestq, I wasn't aware of the decode flag. It makes more sense as you say to show a warning when there are corrupted files together with some metadata of the file that allows to filter them from the dataset.
My workaround was to catch the LibsndfileError and generate a dummy audio with an unsual sample rate to filter it later. However returning `None` seems better.
`try:
array, sampling_rate = sf.read(file)
except sf.LibsndfileError:
print("bad file")
array = np.array([0.0])
sampling_rate = 99.000`
| ### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails. | 101 | 81 | Return the audio filename when decoding fails due to corrupt files
### Feature request
Return the audio filename when the audio decoding fails. Although currently there are some checks for mp3 and opus formats with the library version there are still cases when the audio decoding could fail, eg. Corrupt file.
### Motivation
When you try to load an object file dataset and the decoding fails you can't know which file is corrupt
```
raise LibsndfileError(err, prefix="Error opening {0!r}: ".format(self.name))
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7f5ab7e38290>: Format not recognised.
```
### Your contribution
Make a PR to Add exceptions for LIbsndfileError to return the audio filename or path when soundfile decoding fails.
Thanks @lhoestq, I wasn't aware of the decode flag. It makes more sense as you say to show a warning when there are corrupted files together with some metadata of the file that allows to filter them from the dataset.
My workaround was to catch the LibsndfileError and generate a dummy audio with an unsual sample rate to filter it later. However returning `None` seems better.
`try:
array, sampling_rate = sf.read(file)
except sf.LibsndfileError:
print("bad file")
array = np.array([0.0])
sampling_rate = 99.000`
| [
-1.2574094533920288,
-0.949913501739502,
-0.7861765623092651,
1.504955768585205,
-0.22417199611663818,
-1.1689475774765015,
0.06022271886467934,
-1.0572654008865356,
1.6091409921646118,
-0.8064562678337097,
0.3499508202075958,
-1.6185070276260376,
0.0304736141115427,
-0.5528662204742432,
-0.7636885643005371,
-0.9530583024024963,
-0.43806642293930054,
-0.6799627542495728,
0.9969474673271179,
2.4577276706695557,
1.2064834833145142,
-1.3723063468933105,
2.662900447845459,
0.6803829669952393,
-0.33384978771209717,
-1.0074290037155151,
0.5002287030220032,
0.13501392304897308,
-1.2372982501983643,
-0.5676446557044983,
-0.9125720262527466,
-0.014750887639820576,
-0.4919950067996979,
-0.4886297881603241,
-0.02896428108215332,
0.2915264070034027,
-0.2920336425304413,
-0.463505357503891,
-0.6257615089416504,
-0.7929757833480835,
0.40614455938339233,
-0.42580536007881165,
0.9709616899490356,
-0.31751754879951477,
1.8145252466201782,
-0.5361838340759277,
0.48887547850608826,
0.6888217926025391,
1.4577127695083618,
0.2833004891872406,
0.11197172850370407,
0.3905586004257202,
0.5056889057159424,
-0.032880596816539764,
0.4528100788593292,
1.1233158111572266,
0.672410249710083,
0.458588570356369,
0.7325378656387329,
-2.156071424484253,
1.2394684553146362,
-1.0698167085647583,
0.33871740102767944,
1.2629444599151611,
-0.875992476940155,
0.34088173508644104,
-1.6695467233657837,
-0.020357752218842506,
0.5729293823242188,
-2.304291248321533,
0.26614707708358765,
-1.2875760793685913,
-0.4903475046157837,
1.0609208345413208,
0.32163411378860474,
-1.309794545173645,
0.1704982966184616,
-0.42712873220443726,
0.9843045473098755,
0.33792200684547424,
1.0830274820327759,
-1.6256585121154785,
-0.07034773379564285,
-0.31206268072128296,
-0.03678519278764725,
-1.1718864440917969,
-1.4214024543762207,
0.47842738032341003,
0.49402204155921936,
0.5384992957115173,
-0.01777241751551628,
1.046704649925232,
-0.8838502168655396,
0.861640989780426,
-1.0226666927337646,
-1.6134003400802612,
-1.4916197061538696,
-2.163144826889038,
-2.175058126449585,
0.8454620838165283,
-0.4626403748989105,
-0.6135345697402954,
2.066922664642334,
-0.9624131321907043,
-1.7672604322433472,
1.1887303590774536,
0.18646368384361267,
-0.03480471298098564,
2.396897077560425,
0.22994999587535858,
-0.6897442936897278,
0.41472819447517395,
-0.7508115768432617,
0.8291786909103394,
-0.6172212362289429,
1.360679030418396,
0.4047779142856598,
-1.0403813123703003,
1.5818175077438354,
-0.4373064935207367,
0.4998528063297272,
-0.6411908864974976,
-0.6267490386962891,
-0.8833744525909424,
0.3683881461620331,
1.8620895147323608,
-0.33721205592155457,
1.607876181602478,
-0.33247268199920654,
-1.527278184890747,
-1.6854031085968018,
0.9553083777427673,
0.40861043334007263,
-0.8032888174057007,
0.05767861381173134,
-0.22425033152103424,
0.16259358823299408,
-0.044753383845090866,
1.0087525844573975,
1.315541386604309,
0.6513829827308655,
-0.35033145546913147,
-0.8719285130500793,
0.22852514684200287,
-0.05255275219678879,
-0.7180991172790527,
-1.758616328239441,
-0.40553274750709534,
0.030724873766303062,
0.6390246748924255,
-1.3690418004989624,
1.6424493789672852,
0.9086727499961853,
1.9233289957046509,
0.9745941758155823,
-0.40943291783332825,
1.5543683767318726,
0.12210176885128021,
1.8079791069030762,
-0.4712253212928772,
0.6994144916534424,
-0.3220251500606537,
-1.2117551565170288,
0.7401832342147827,
-0.343982994556427,
-2.074549436569214,
-0.7993669509887695,
-0.7113828063011169,
-0.157684788107872,
-0.8085267543792725,
0.9577165842056274,
-0.3260877728462219,
-1.3737438917160034,
0.29721036553382874,
-0.6888810396194458,
0.15975120663642883,
-1.2718702554702759,
0.3543204963207245,
0.7443487644195557,
-0.5188643336296082,
0.10446808487176895,
-0.24425801634788513,
-1.1721056699752808,
-0.4536493122577667,
0.31329545378685,
1.828233242034912,
-0.7828627228736877,
0.9560155868530273,
0.9707281589508057,
-0.6683829426765442,
-0.011314465664327145,
0.272216796875,
-0.2030503749847412,
0.9476966261863708,
-1.0610241889953613,
-0.39256876707077026,
1.2753016948699951,
-0.23440991342067719,
-0.5622027516365051,
1.4053211212158203,
0.7715268731117249,
-0.9584687352180481,
-0.1730707585811615,
-0.15183088183403015,
-0.8354642987251282,
-0.016610780730843544,
-1.7492276430130005,
-0.15023258328437805,
0.33189237117767334,
-1.5461398363113403,
-0.4869888126850128,
-0.2654212713241577,
1.2712793350219727,
-0.17709669470787048,
1.4216644763946533,
-0.37973645329475403,
-0.2914896011352539,
-0.30226874351501465,
-0.34901663661003113,
0.1602102369070053,
-0.2916991710662842,
-0.5614370703697205,
0.26577335596084595,
-0.7494887113571167,
0.33999237418174744,
1.3941609859466553,
0.36240246891975403,
0.07412277907133102,
0.4452635943889618,
1.058485746383667,
0.3944152891635895,
-0.10682026296854019,
-0.9185549020767212,
-1.4664278030395508,
2.034219264984131,
-1.4722872972488403,
2.0582213401794434,
0.8030654788017273,
-0.03515378385782242,
-1.731012225151062,
-1.8782137632369995,
1.2863624095916748,
1.171069622039795,
2.3142502307891846,
0.6580926179885864,
0.462910920381546,
-0.8986284136772156,
-0.6086686849594116,
0.25823280215263367,
-1.1535717248916626,
-0.7496090531349182,
0.062370579689741135,
2.4365222454071045,
1.7471249103546143,
-0.34211888909339905,
-0.18449421226978302,
-1.1210185289382935,
1.3674250841140747,
-0.0527912862598896,
0.13986849784851074,
1.9534298181533813,
-0.19028180837631226,
-1.1080001592636108,
1.2253683805465698,
-2.2892253398895264,
0.11529109627008438,
2.008070707321167,
0.3278837203979492,
0.11898835003376007,
-1.3965156078338623,
-0.7346794605255127,
-0.331004798412323,
-0.38492172956466675,
-1.1692548990249634,
0.5379037857055664,
-0.25601840019226074,
-0.657194197177887,
-1.429639220237732,
0.10084077715873718,
-1.02156662940979,
-1.6360894441604614,
0.26400667428970337,
1.969303011894226,
1.878438115119934,
-0.6925801634788513,
1.5912317037582397,
-0.3349081873893738,
0.04818780720233917,
1.2816652059555054,
1.2261563539505005,
3.184366464614868,
1.9741451740264893,
-1.329709768295288,
0.5579566359519958,
-0.11738438159227371,
-0.42861416935920715,
0.9874138832092285,
-1.2330775260925293,
1.3764300346374512,
-0.10923221707344055,
-1.1185191869735718,
-1.2271959781646729,
0.8806220889091492,
0.4265517592430115,
-0.0052925958298146725,
-0.6007609963417053,
1.14913809299469,
0.09320244193077087,
1.4094831943511963,
0.5151839256286621,
-0.36162617802619934,
0.6218907833099365,
-0.27716466784477234,
-0.5703914165496826,
1.6645660400390625,
0.22611762583255768,
-1.4308865070343018,
-2.4210405349731445,
-0.23287026584148407,
-0.8092724680900574,
0.13868427276611328,
-0.4820287823677063,
-1.086900234222412,
1.78679621219635,
0.41370221972465515,
-1.2671879529953003,
-0.3809504806995392,
-0.3111880421638489,
-0.5931171774864197,
2.7711570262908936,
-1.4115890264511108,
-0.2549028694629669,
-0.9540189504623413,
-0.6053621768951416,
1.6184535026550293,
-1.1863399744033813,
-0.22503803670406342,
-0.9904385209083557,
-0.6448845863342285,
-1.2505228519439697,
-0.5461182594299316,
0.03539905324578285,
-0.974901556968689,
0.7525094747543335,
0.33137810230255127,
-1.182934045791626,
-0.3559218943119049,
-0.7921794056892395,
0.7980142831802368,
-0.06480018049478531,
0.2778286337852478,
1.9846259355545044,
0.5735504031181335,
-0.3716623783111572,
0.7807036638259888,
1.1777307987213135,
0.6622052788734436,
-0.7854309678077698,
0.20604966580867767,
-0.6767687201499939,
0.27220597863197327,
-1.2919946908950806,
0.28063255548477173,
-2.7816972732543945,
0.6153274774551392,
-0.17388466000556946,
-0.08729516714811325,
0.04431922361254692,
-1.2312105894088745,
1.139603614807129,
2.5727436542510986,
-1.1232939958572388,
0.44775617122650146,
0.2828808128833771,
1.1957762241363525,
-1.6418025493621826,
0.4917798340320587,
-0.3164530396461487,
2.18456768989563,
0.22970755398273468,
1.243992805480957,
-0.5214181542396545,
-2.33257794380188,
0.5409870147705078,
-1.2311025857925415,
-1.2537657022476196,
0.7486156821250916,
-0.7994995713233948,
-0.035507865250110626,
-1.4159431457519531,
-0.2563043534755707,
-0.7577112317085266,
-1.2582029104232788,
0.6827831268310547,
0.19033847749233246,
0.4491049647331238,
-0.5916115045547485,
0.3677934408187866,
-2.2347424030303955,
-1.435038447380066,
-0.22285215556621552,
-0.9539273381233215,
0.36500537395477295,
-0.4340803325176239,
0.7014370560646057,
-0.23722951114177704,
-0.062414828687906265,
0.38806942105293274,
1.5008820295333862,
3.3411788940429688,
0.278471440076828,
0.4176802933216095,
-0.17626599967479706,
-0.8545171022415161,
1.3783559799194336,
0.8526246547698975,
-0.12019108235836029,
-0.5939909815788269,
-1.1343055963516235,
1.1813899278640747,
1.89638352394104,
0.9444944858551025,
0.04444887116551399,
-0.7570937871932983,
-0.6472427845001221,
-0.1227327436208725,
0.15732857584953308,
0.5649399161338806,
0.8922429084777832,
0.05531984195113182,
0.09216707944869995,
1.393586277961731,
1.292790174484253,
-0.42560845613479614,
0.3851698637008667,
-0.7342619299888611,
-0.4864059388637543,
0.43488752841949463,
0.4157583713531494,
-0.12904416024684906,
0.31484559178352356,
-1.000670313835144,
-0.22973580658435822,
-0.48841914534568787,
-0.9070490002632141,
-0.7664685845375061,
-0.36014461517333984,
-0.38622182607650757,
1.696661114692688,
0.15030261874198914,
-0.5078197121620178,
-0.033460021018981934,
-0.6852514743804932,
-0.18326982855796814,
-1.0277432203292847,
0.3266976773738861,
-0.020236095413565636,
-0.08913624286651611,
0.029531745240092278,
1.8851133584976196,
-0.935729444026947,
-2.1213643550872803,
0.2745611369609833,
0.27724748849868774,
-0.3152463734149933,
0.25143975019454956,
1.4720466136932373,
0.5211318135261536,
1.4517369270324707,
1.3149217367172241,
0.8997247815132141,
-0.812855064868927,
-1.2844791412353516,
0.7421523928642273,
0.9863608479499817,
-1.4056622982025146,
0.7504708170890808,
-0.01218184269964695,
-0.4718744456768036,
0.5616887807846069,
1.3083614110946655,
0.4751299023628235,
-1.975801944732666,
0.8496485352516174,
-0.758794903755188,
0.784064531326294,
0.7405768036842346,
0.6036180257797241,
0.2601151466369629,
0.7054200768470764,
-1.2316914796829224,
-1.1466655731201172,
-0.7547853589057922,
-0.6316836476325989,
2.0033345222473145,
-0.32586610317230225,
0.6651619076728821,
-0.0995173454284668,
-1.3326613903045654,
-0.10096853971481323,
0.5718826055526733,
0.383453369140625,
-0.45891693234443665,
0.793144166469574,
-0.5609890222549438,
-1.1249879598617554,
-1.453071117401123,
-0.4782133996486664,
-1.04376220703125,
-1.0015863180160522,
0.9879650473594666,
0.8246473073959351,
0.13229487836360931,
1.8693242073059082,
0.6232150793075562,
0.17502591013908386,
-2.7204978466033936,
0.9890417456626892,
0.3087669610977173,
-0.06751884520053864,
0.8859842419624329,
0.26560884714126587,
0.9709493517875671,
0.0910816565155983,
0.4819401502609253,
-2.4188907146453857,
2.3397128582000732,
-0.3156018555164337,
0.7478572130203247,
-0.026854002848267555,
-0.11003012955188751,
1.1369761228561401,
0.5951085090637207,
0.5385081768035889,
-1.030178189277649,
0.6484394669532776,
-0.5550791621208191,
1.2566070556640625,
1.0247100591659546,
-0.7653420567512512,
-0.032056741416454315,
1.430100917816162,
0.5332711935043335,
-0.5253539681434631,
-0.9060112237930298,
-0.9082051515579224,
0.8890941143035889,
1.8489017486572266,
-0.055493757128715515,
0.03463835269212723,
0.8560374975204468,
0.6406562924385071,
-1.3450820446014404,
0.13722456991672516,
-0.751850962638855,
-0.8294665813446045,
1.6406970024108887,
2.07865047454834,
-0.09691699594259262,
-0.38423433899879456,
-0.7464617490768433,
-1.2544039487838745,
0.8692997694015503,
-0.07254718989133835,
0.24787504971027374,
0.6490543484687805,
-0.7379432916641235,
1.1049913167953491,
0.8028045296669006,
0.9274188876152039,
0.25912413001060486,
0.17069990932941437,
0.36919963359832764,
-0.29413902759552,
-1.1284774541854858,
-0.14902865886688232,
-1.1915714740753174,
-2.466646909713745,
0.3735920190811157,
-0.23990274965763092,
-1.3530387878417969,
-0.008923430927097797,
-1.0043938159942627,
0.950067937374115,
-0.5777419209480286,
-1.0393282175064087,
-1.5824426412582397,
0.03792266920208931,
-0.15602627396583557,
0.9044399261474609,
-1.6226110458374023,
-0.19687984883785248,
1.2925844192504883,
0.9219653606414795,
-0.6676674485206604,
1.0526858568191528,
0.15657120943069458,
1.043380618095398,
0.838456392288208,
-0.3260938823223114,
0.4642694592475891,
-0.06738658249378204,
-1.3546867370605469,
0.525083601474762,
1.1260366439819336,
0.18385298550128937,
1.6316810846328735,
-0.7251110076904297,
-0.09376411139965057,
0.37276801466941833,
-0.438191294670105,
-0.45046088099479675,
-0.5490061640739441,
0.7223287224769592,
0.07107341289520264,
-0.9782295823097229,
0.10865389555692673,
-0.12327611446380615,
-0.12897643446922302,
0.036703698337078094,
-1.502021074295044,
-0.20036198198795319,
-0.3193635046482086,
-0.6036247611045837,
-1.1980351209640503,
-0.11738220602273941,
1.304517149925232,
-0.7365279197692871,
-0.07481006532907486,
0.5058299899101257,
0.4158656895160675,
0.5239184498786926,
0.6419073939323425,
-0.6373307704925537,
-0.4815231263637543,
-0.2787872552871704,
-0.31829366087913513,
0.40975046157836914,
1.3578386306762695,
-0.09157222509384155,
-0.8786171078681946,
0.6024359464645386,
-0.36038896441459656,
0.10385461896657944,
2.051731824874878,
0.08095412701368332,
-0.6898099184036255,
0.39971232414245605,
-0.794844388961792,
1.8940868377685547,
1.6654454469680786,
1.320652723312378,
-0.14399580657482147,
-0.9888019561767578,
0.6464564800262451,
-0.29873979091644287,
-0.37808066606521606,
0.8795390725135803,
0.5030256509780884,
-0.07348339259624481,
-1.4708882570266724,
0.5865790843963623,
1.2269842624664307,
-0.9348880648612976,
-0.7866163849830627,
0.10878913104534149,
-0.7766949534416199,
0.9479751586914062,
0.630691647529602,
0.35741591453552246,
0.20698831975460052,
1.645625352859497,
0.8381011486053467,
-0.40682607889175415,
0.5333623290061951,
0.5007322430610657,
-0.16699707508087158,
-2.1289076805114746,
-1.263573408126831,
0.2983997166156769,
-0.4117211103439331,
-1.6309137344360352,
1.46541428565979,
-1.1167597770690918,
-0.8807245492935181,
0.5911418199539185,
0.12736114859580994,
1.5213009119033813,
0.30481192469596863,
1.5579084157943726,
2.2135233879089355,
0.9822871685028076,
0.36484408378601074,
1.3339811563491821,
-0.1899496465921402,
-0.5110072493553162,
1.7890533208847046,
-0.4098135530948639,
0.3680138885974884,
1.1660065650939941,
-0.37416258454322815,
-0.9822968244552612,
-0.8026737570762634,
-1.346443772315979,
-0.7491164207458496,
1.1091992855072021,
0.11513705551624298,
-1.0657743215560913,
0.2535260021686554,
1.6291694641113281,
0.06920010596513748,
-0.3839438259601593,
0.5299509167671204,
0.4662567675113678,
-0.7724852561950684,
-0.09958178550004959,
-0.9707528948783875,
0.4649391770362854,
-0.11077343672513962,
-0.47149181365966797,
0.2819713056087494,
0.38117918372154236,
1.3305567502975464,
-0.022146757692098618,
0.09155935794115067,
1.0552117824554443,
-1.441595196723938,
1.4372519254684448,
-0.5618957281112671,
0.23927269876003265,
-2.2179458141326904,
1.488829493522644,
-0.7814685702323914,
1.85251784324646,
-2.610617160797119,
0.4304942786693573,
-0.67868572473526,
-0.38121241331100464,
0.3962707817554474,
-0.42134901881217957,
0.28932952880859375,
-0.24333414435386658,
-1.1176306009292603,
-0.1519942432641983,
-0.659085214138031,
0.5880139470100403,
1.1388875246047974,
1.2429848909378052,
-1.0897266864776611,
-0.26182517409324646,
-1.7008403539657593,
-0.1418207287788391,
-0.6359472274780273,
0.3442818820476532,
-2.0627191066741943,
-0.1874564290046692,
-1.8419839143753052,
-2.331589460372925,
-1.268479585647583,
-0.7220119833946228,
1.0559617280960083,
0.13481909036636353,
-0.8789986968040466,
1.2818115949630737,
-0.3007042706012726,
-1.8667981624603271,
1.0193746089935303,
-2.240555763244629
] |