html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 63
141k
| body
stringlengths 18
58.6k
⌀ | comment_length
int64 16
10.8k
| text
stringlengths 6
280
| embeddings
listlengths 768
768
|
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/1838
|
Add tedlium
|
Hi @patrickvonplaten
I can have a look to this dataset later since I am trying to add the OpenSLR dataset https://github.com/huggingface/datasets/pull/2173
Hopefully I have enough space since the compressed file is 21GB. The release 3 is even bigger: 54GB :-0
|
## Adding a Dataset
- **Name:** *tedlium*
- **Description:** *The TED-LIUM 1-3 corpus is English-language TED talks, with transcriptions, sampled at 16kHz. It contains about 118 hours of speech.*
- **Paper:** Homepage: http://www.openslr.org/7/, https://lium.univ-lemans.fr/en/ted-lium2/ &, https://www.openslr.org/51/
- **Data:** http://www.openslr.org/7/
- **Motivation:** Important speech dataset
- **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/tedlium
If interested in tackling this issue, feel free to tag @patrickvonplaten
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 40 |
Add tedlium
|
[
-0.16116271913051605,
-0.24847032129764557,
-0.2858075499534607,
0.015524497255682945,
0.21427461504936218,
-0.06505235284566879,
0.1386188268661499,
-0.025043567642569542,
-0.37418031692504883,
0.45604437589645386,
-0.02387809567153454,
0.5011833310127258,
-0.11369851976633072,
0.10206767171621323,
0.16135543584823608,
-0.1308487355709076,
0.036101583391427994,
0.38207778334617615,
0.08843164891004562,
-0.44511878490448,
-0.13209332525730133,
-0.15446890890598297,
-0.1299702227115631,
-0.38671839237213135,
-0.2212735265493393,
0.1726909726858139,
-0.07152911275625229,
0.23539812862873077,
-0.24085816740989685,
0.09108103811740875,
-0.04063001647591591,
0.055883344262838364,
-0.10224764794111252,
0.03893471881747246,
-0.00010829343955265358,
-0.08154697716236115,
0.21948079764842987,
-0.003123586531728506,
-0.06142836809158325,
0.3913709223270416,
0.20255088806152344,
0.2817373275756836,
-0.3173644542694092,
-0.03347636014223099,
-0.06796546280384064,
0.06904646754264832,
0.0019184782868251204,
0.26281389594078064,
-0.21223312616348267,
-0.12460371106863022,
0.2087608128786087,
0.261724591255188,
0.34516024589538574,
-0.10333240777254105,
0.5592807531356812,
0.0368342325091362,
-0.05399496108293533,
0.11265457421541214,
0.2625997066497803,
0.33246710896492004,
0.4891282618045807,
-0.06875775754451752,
-0.08867175877094269,
-0.1772281974554062,
-0.1608339250087738,
0.20090381801128387,
-0.04330473765730858,
-0.0918106660246849,
-0.10933540761470795,
0.26544082164764404,
0.5041588544845581,
0.10945932567119598,
0.1031058207154274,
0.39512699842453003,
0.07331476360559464,
-0.7896090745925903,
0.11075001955032349,
-0.21347403526306152,
-0.18413332104682922,
-0.10355004668235779,
0.5539130568504333,
-0.5195988416671753,
-0.26500043272972107,
0.5564672350883484,
0.040081772953271866,
0.7528206706047058,
0.07968415319919586,
0.047108933329582214,
0.329115092754364,
0.08756338059902191,
-0.15599986910820007,
0.060643307864665985,
-0.06882739067077637,
-0.03224378451704979,
0.3188817799091339,
-0.10282562673091888,
0.07683622092008591,
-0.20912708342075348,
0.08942662924528122,
0.08896706253290176,
-0.06474613398313522,
0.09804459661245346,
-0.35491302609443665,
0.09002232551574707,
-0.4111349582672119,
0.20590850710868835,
-0.0551053024828434,
0.1963946372270584,
-0.0230953898280859,
-0.12035750597715378,
0.11886294931173325,
0.12327288091182709,
-0.34511902928352356,
0.0975005105137825,
-0.13988099992275238,
0.0771285742521286,
-0.22791653871536255,
-0.014034983702003956,
-0.021973513066768646,
-0.07643566280603409,
-0.18062478303909302,
-0.06845734268426895,
0.09983444958925247,
0.20174568891525269,
0.22699449956417084,
0.2197170853614807,
0.0005544425221160054,
0.017685573548078537,
0.192178413271904,
-0.07522647827863693,
-0.21686257421970367,
0.3707360029220581,
-0.16866804659366608,
0.04505431652069092,
-0.08513867855072021,
0.03157924488186836,
0.22681444883346558,
-0.07233303785324097,
0.5648268461227417,
0.04810059815645218,
-0.02083396539092064,
0.11690682917833328,
-0.009058533236384392,
0.1984270066022873,
-0.22794747352600098,
-0.22741039097309113,
-0.03367776796221733,
-0.40139040350914,
-0.11753543466329575,
0.1814313381910324,
0.12060767412185669,
-0.10724260658025742,
-0.19627878069877625,
0.3006858229637146,
0.23253333568572998,
-0.17454011738300323,
-0.28568077087402344,
-0.011172093451023102,
0.0031171932350844145,
0.2541656792163849,
0.27959614992141724,
0.14116379618644714,
-0.2863611876964569,
-0.24311362206935883,
0.0997154712677002,
0.031255923211574554,
0.04875783622264862,
-0.05040281265974045,
0.3790537118911743,
-0.05330274999141693,
0.3663123846054077,
0.058423981070518494,
-0.08490977436304092,
0.31967514753341675,
-0.12690845131874084,
-0.22136905789375305,
0.7180696129798889,
-0.7412590384483337,
-0.1037713959813118,
-0.2214328646659851,
-0.46457651257514954,
-0.15092350542545319,
0.20995277166366577,
0.2012099176645279,
-0.09541674703359604,
-0.005574060138314962,
0.539934515953064,
0.16202129423618317,
-0.02271987870335579,
-0.2099374532699585,
-0.18697988986968994,
-0.1071786880493164,
0.10487482696771622,
0.26568591594696045,
0.05181989073753357,
0.197099968791008,
0.003248901106417179,
0.3808944821357727,
0.07814352959394455,
0.038782794028520584,
-0.10668231546878815,
0.10208149999380112,
0.2544408142566681,
0.22493478655815125,
-0.16956685483455658,
0.005082139745354652,
-0.009169037453830242,
-0.3407200574874878,
0.27768832445144653,
0.5421474575996399,
0.5245687961578369,
-0.36812251806259155,
0.2209518849849701,
-0.2747992277145386,
0.0039310455322265625,
0.32256177067756653,
0.2556988596916199,
0.13739776611328125,
0.01613227091729641,
-0.03794291242957115,
-0.12222734093666077,
0.01892310567200184,
-0.012573751620948315,
0.11545693874359131,
-0.17056971788406372,
-0.01574750430881977,
-0.041407737880945206,
-0.2622781991958618,
-0.06801418215036392,
0.01015473622828722,
-0.0027802938129752874,
-0.18344709277153015,
0.15503744781017303,
0.0105354655534029,
-0.32210031151771545,
-0.11016695201396942,
0.3499988615512848,
0.5500149726867676,
0.269501656293869,
0.07489651441574097,
-0.2246226668357849,
0.43980759382247925,
-0.009361627511680126,
-0.12835191190242767,
0.2989649176597595,
-0.06705871224403381,
0.09444886445999146,
-0.22019332647323608,
-0.2538243532180786,
-0.00034947620588354766,
-0.037429433315992355,
-0.09588148444890976,
0.05390975996851921,
-0.12502366304397583,
0.23584522306919098,
0.3651503920555115,
-0.5110771656036377,
-0.15383970737457275,
-0.25443360209465027,
0.260964035987854,
-0.010961699299514294,
-0.16025975346565247,
0.20766375958919525,
-0.11020804196596146,
0.12663453817367554,
0.3028790354728699,
-0.08434377610683441,
-0.3230263292789459,
0.3791936933994293,
0.293869286775589,
0.03145787864923477,
0.121164970099926,
0.0850343108177185,
-0.2639930844306946,
0.12911447882652283,
0.06082416698336601,
0.17256739735603333,
0.3568243086338043,
0.03619621321558952,
-0.08019568771123886,
-0.09402583539485931,
-0.38949206471443176,
-0.09911048412322998,
0.3280106484889984,
-0.04428728669881821,
-0.2705657482147217,
-0.13715139031410217,
-0.0005565559840761125,
-0.05156579613685608,
-0.35720354318618774,
0.16397599875926971,
0.039162907749414444,
0.2869471609592438,
0.25587448477745056,
-0.01714223623275757,
-0.11048059165477753,
-0.007929104380309582,
0.15921828150749207,
0.01281198114156723,
-0.44211748242378235,
-0.3086027204990387,
-0.08732050657272339,
-0.26807913184165955,
0.22827766835689545,
-0.15190444886684418,
0.026878252625465393,
0.38537922501564026,
-0.27974316477775574,
0.11502767354249954,
0.016043199226260185,
-0.5010249018669128,
0.139174684882164,
-0.19049112498760223,
-0.14050394296646118,
0.05495236814022064,
0.17631863057613373,
-0.09225943684577942,
-0.25830987095832825,
0.25554314255714417,
0.09029967337846756,
-0.011347917839884758,
-0.24433258175849915,
-0.13403771817684174,
-0.3903442919254303,
-0.21497322618961334,
-0.47283124923706055,
0.13936249911785126,
-0.20474542677402496,
0.311119019985199,
0.3148517906665802,
0.12034381181001663,
0.08035276085138321,
0.013985700905323029,
0.04817899689078331,
0.13156448304653168,
0.0897938683629036,
-0.15819181501865387,
-0.23255924880504608,
0.18123897910118103,
-0.23518279194831848,
-0.07958576828241348,
0.006024694070219994,
-0.23074154555797577,
-0.3979974389076233,
0.035723406821489334,
0.03509776294231415,
-0.47644665837287903,
0.31426870822906494,
-0.058527979999780655,
-0.21580001711845398,
-0.01059961412101984,
0.3415035009384155,
0.03481766954064369,
-0.29237207770347595,
-0.19222813844680786,
0.1566276252269745,
0.2139832228422165,
0.04459229111671448,
0.22761544585227966,
-0.09414753317832947,
0.05569750815629959,
-0.14760465919971466,
-0.19216057658195496,
-0.002798281144350767,
-0.16739170253276825,
0.17363154888153076,
-0.31971418857574463,
0.007249307353049517,
0.04345506429672241,
-0.0859430655837059,
0.2154615819454193,
0.5602071285247803,
-0.018600299954414368,
0.032886382192373276,
-0.04531547427177429,
0.17364051938056946,
-0.11460274457931519,
-0.42109280824661255,
0.08999986946582794,
-0.15857994556427002,
-0.12880420684814453,
0.5275880098342896,
0.005843969061970711,
-0.07659339159727097,
-0.46897295117378235,
0.040766239166259766,
-0.25789007544517517,
0.3631775975227356,
0.4907379448413849,
-0.21252121031284332,
-0.19806374609470367,
-0.6337644457817078,
-0.011766788549721241,
-0.008052712306380272,
0.16612869501113892,
0.2591707408428192,
0.043814729899168015,
-0.15733125805854797,
-0.11914840340614319,
0.06520586460828781,
-0.07530219107866287,
0.4656323194503784,
-0.10688139498233795,
-0.002942069200798869,
0.0653371587395668,
0.4887016713619232,
0.2843402028083801,
-0.004446737933903933,
-0.2952931821346283,
-0.2410682886838913,
0.19534504413604736,
0.26125723123550415,
-0.2286628633737564,
0.09391305595636368,
0.6093446612358093,
0.14988602697849274,
-0.04207378998398781,
0.06497788429260254,
-0.31025102734565735,
-0.577212393283844,
-0.34000077843666077,
0.26628804206848145,
-0.09745783358812332,
0.3733869194984436,
0.4145103096961975,
-0.2962137460708618,
0.38736337423324585,
0.042987238615751266,
0.3453516662120819,
-0.1427110880613327,
-0.13065296411514282,
0.2876194715499878,
-0.11597545444965363,
-0.2883812487125397,
-0.12310106307268143,
0.30137938261032104,
-0.011867317371070385,
0.16829350590705872,
-0.09725139290094376,
-0.2152910679578781,
-0.30488890409469604,
0.14494211971759796,
0.013997681438922882,
-0.010549263097345829,
0.2248011827468872,
-0.7840460538864136,
0.1846262514591217,
0.17386411130428314,
0.12700551748275757,
0.1063941940665245,
-0.11416612565517426,
-0.06559402495622635,
0.11725601553916931,
0.3025051951408386,
-0.1190589889883995,
0.02443196438252926,
0.7100584506988525,
0.19074185192584991,
-0.23737019300460815,
0.0459931455552578,
0.2258676439523697,
1.4248846769332886,
0.03387885168194771,
-0.022069640457630157,
0.24265260994434357,
-0.11329034715890884,
-0.027921732515096664,
-0.4684984087944031,
0.18819871544837952,
0.015633024275302887,
0.13374190032482147,
0.036748528480529785,
-0.043218810111284256,
0.11438008397817612,
-0.04880176857113838,
-0.3998306393623352,
-0.04169712960720062,
-0.22997283935546875,
0.13817156851291656,
0.09635540097951889,
0.13582998514175415,
-0.11083026975393295,
-0.09080960601568222,
0.4245002269744873,
0.14329661428928375,
0.1869879513978958,
0.2939741909503937,
-0.048390090465545654,
0.13590112328529358,
-0.4797193706035614,
-0.18332721292972565,
-0.18408818542957306,
-0.002823128364980221,
-0.17655445635318756,
-0.07263980805873871,
0.07019062340259552,
-0.2238156795501709,
-0.37792840600013733,
-0.29379016160964966,
0.5349695086479187,
0.08068192005157471,
0.1962711662054062,
0.1398208886384964,
0.006984541192650795,
-0.26754915714263916,
-0.05879145860671997,
-0.15362845361232758,
-0.041928794234991074,
-0.3476769030094147,
-0.39628416299819946,
0.2724602222442627,
0.18425452709197998,
-0.3140387237071991,
-0.69162917137146,
-0.06265003234148026,
-0.011603126302361488,
-0.11587231606245041,
0.3044300675392151,
0.5506700277328491,
-0.15086929500102997,
-0.07927048951387405,
0.21457403898239136,
-0.133806049823761,
-0.14792712032794952,
-0.012532806023955345,
0.10844801366329193,
-0.11116212606430054,
-0.048815976828336716,
-0.05052822455763817,
0.33810001611709595,
-0.14728428423404694,
0.003316768677905202,
-0.12746772170066833,
-0.21989279985427856,
-0.3706169128417969,
-0.18993140757083893,
-0.3792426586151123,
0.08341807872056961,
-0.1076749935746193,
0.08522578328847885,
0.04465266689658165,
0.0878814235329628,
0.5056037306785583,
-0.11913321167230606,
0.22282445430755615,
-0.20303748548030853,
-0.20164696872234344,
-0.3411639332771301,
0.17932796478271484,
-0.09635011851787567,
0.14329123497009277,
-0.00690976670011878,
0.49182188510894775,
-0.04590362682938576,
-0.027054980397224426,
-0.4416730999946594,
-0.16691844165325165,
0.09294909238815308,
0.0721304714679718,
0.5063483119010925,
0.04213173687458038,
0.3547403812408447,
0.11219597607851028,
0.2873033881187439,
0.03469520062208176,
0.0012798274401575327,
-0.3004521429538727,
0.061397016048431396,
0.11993737518787384,
0.025930246338248253,
0.06660892814397812,
-0.003435845021158457,
-0.12460655719041824,
0.01872147247195244,
0.22685520350933075,
0.21758368611335754,
-0.10566119104623795,
0.05590415373444557,
0.2555263042449951,
0.18622933328151703,
0.16659371554851532,
0.029813915491104126,
0.13788875937461853,
0.1986643522977829,
0.1765584945678711,
-0.027978217229247093,
-0.08026119321584702,
-0.0503692701458931,
-0.14863631129264832,
-0.04960922524333,
0.19952207803726196,
0.19337964057922363,
-0.06313584744930267,
0.04100034385919571,
-0.14503780007362366,
-0.16755972802639008,
-0.31030574440956116,
-0.41011783480644226,
0.041410043835639954,
-0.3099673390388489,
0.23750177025794983,
0.030704908072948456,
0.2612977623939514,
-0.10042908042669296,
-0.18216827511787415,
0.254309743642807,
-0.03173638507723808,
0.06823918968439102,
0.32607361674308777,
-0.030683469027280807,
-0.3558785617351532,
0.35001903772354126,
-0.016352513805031776,
-0.04260936751961708,
0.050837334245443344,
-0.08835332840681076,
0.23588557541370392,
-0.0460074357688427,
-0.07681258767843246,
-0.18744228780269623,
0.06720830500125885,
-0.08583460748195648,
-0.008268345147371292,
0.177463561296463,
0.142451673746109,
-0.13032840192317963,
0.08984504640102386,
0.10915906727313995,
0.22582541406154633,
-0.4106682240962982,
0.08933987468481064,
0.36643609404563904,
0.14119474589824677,
0.23790690302848816,
0.1887335330247879,
0.5189235806465149,
0.0010279620764777064,
-0.025422152131795883,
0.1776234358549118,
0.0005561474827118218,
-0.16618730127811432,
-0.21245837211608887,
-0.24131625890731812,
-0.2426290512084961,
0.213158518075943,
0.5408818125724792,
-0.09172413498163223,
-0.5143190622329712,
0.11009936779737473,
-0.08670178800821304,
0.2902604937553406,
0.0919729620218277,
0.26631495356559753,
-0.01951874978840351,
0.10900189727544785,
0.0006698903744108975,
0.22917842864990234,
0.03880066052079201,
-0.10719412565231323,
-0.038756877183914185,
0.1929001659154892,
-0.1318402886390686,
0.16011914610862732,
0.21283264458179474,
-0.2118528187274933,
-0.18118752539157867,
-0.11698650568723679,
0.2645397186279297,
0.34372052550315857,
-0.1677284985780716,
-0.1923704296350479,
0.2099478840827942,
-0.32847368717193604,
0.023033181205391884,
0.02921905741095543,
-0.19900766015052795,
0.10335605591535568,
0.0938330739736557,
0.5155352354049683,
-0.2386520504951477,
-0.40645501017570496,
-0.03330164775252342,
-0.15402282774448395,
0.20256909728050232,
0.277054101228714,
0.13549304008483887,
-0.15279200673103333,
0.02364993281662464,
0.09909498691558838,
-0.029019204899668694,
-0.0823482796549797,
0.08957640826702118,
0.2096327692270279,
0.07127676904201508,
-0.4115545153617859,
0.05710805952548981,
0.33466774225234985,
-0.024148045107722282,
-0.4656403064727783,
-0.20097297430038452,
-0.031345661729574203,
0.3130260109901428,
0.13860760629177094,
0.35973697900772095,
-0.5364257097244263,
0.49426397681236267,
0.1413908302783966,
0.005751005839556456,
0.33155879378318787,
0.15671846270561218,
-0.03356436640024185,
0.025669483467936516,
-0.2879367470741272,
0.000191868472029455,
0.041924864053726196,
0.28360995650291443,
-0.46894022822380066,
0.1668122410774231,
-0.25257620215415955,
0.010687342844903469,
0.33814579248428345,
-0.36120426654815674,
0.14119121432304382,
-0.33504724502563477,
-0.03291354700922966,
0.0189901664853096,
0.19987568259239197,
-0.06941310316324234,
-0.11764927208423615,
0.11397448927164078,
-0.21281635761260986,
-0.1798749715089798,
0.40585726499557495,
-0.2963371276855469,
0.22050605714321136,
-0.062033381313085556,
0.05968634411692619,
-0.32024094462394714,
0.20887623727321625,
-0.1877882331609726,
0.07462535798549652,
-0.04648423194885254,
0.23938465118408203,
0.19602802395820618,
-0.19919997453689575,
-0.3554421067237854,
-0.32575854659080505,
0.5158736705780029,
-0.14226390421390533,
-0.05885579437017441,
0.029954656958580017,
0.010131959803402424,
0.2824678421020508,
0.10982482135295868,
-0.5975346565246582,
-0.06410154700279236,
0.2321348339319229,
0.022669866681098938,
-0.44648054242134094,
0.38721948862075806,
0.10116297006607056,
-0.030100911855697632,
-0.0041672466322779655,
-0.5839104056358337,
-0.18324312567710876,
-0.0696244016289711,
-0.3348551094532013,
-0.18336959183216095
] |
https://github.com/huggingface/datasets/issues/1837
|
Add VCTK
|
@patrickvonplaten I'd like to take this, if nobody has already done it. I have added datasets before through the datasets sprint, but I feel rusty on the details, so I'll look at the guide as well as similar audio PRs (#1878 in particular comes to mind). If there is any detail I should be aware of please, let me know! Otherwise, I'll try to write up a PR in the coming days.
|
## Adding a Dataset
- **Name:** *VCTK*
- **Description:** *This CSTR VCTK Corpus includes speech data uttered by 110 English speakers with various accents. Each speaker reads out about 400 sentences, which were selected from a newspaper, the rainbow passage and an elicitation paragraph used for the speech accent archive.*
- **Paper:** Homepage: https://datashare.ed.ac.uk/handle/10283/3443
- **Data:** https://datashare.ed.ac.uk/handle/10283/3443
- **Motivation:** Important speech dataset
- **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/vctk
If interested in tackling this issue, feel free to tag @patrickvonplaten
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 72 |
Add VCTK
|
[
-0.15286029875278473,
-0.49232012033462524,
-0.2509172558784485,
-0.2501550018787384,
-0.0039796652272343636,
0.07484772056341171,
0.02401273511350155,
0.0353282205760479,
-0.11024494469165802,
0.38379135727882385,
0.05205213278532028,
0.35415762662887573,
-0.1148378774523735,
0.4770788252353668,
0.20476025342941284,
-0.12365160882472992,
0.08443381637334824,
0.56672203540802,
0.29843252897262573,
-0.16424019634723663,
-0.19312386214733124,
0.12273045629262924,
-0.2237105518579483,
-0.1724795699119568,
0.0011967309983447194,
-0.11957020312547684,
-0.0742412805557251,
0.1952429860830307,
0.03499278426170349,
-0.03521938621997833,
-0.17521832883358002,
0.1286109834909439,
-0.06847919523715973,
0.32789766788482666,
-0.00010974298493238166,
-0.07372185587882996,
-0.0507730133831501,
-0.13021861016750336,
-0.30317339301109314,
0.8526405096054077,
0.039978545159101486,
-0.3598319888114929,
-0.3228500783443451,
-0.25854262709617615,
-0.22544732689857483,
-0.2085416465997696,
-0.10922843217849731,
-0.03762273117899895,
-0.15188254415988922,
-0.13996164500713348,
0.2794722616672516,
0.1747310757637024,
0.23597711324691772,
-0.12438316643238068,
0.26767200231552124,
0.18441995978355408,
-0.04556652903556824,
0.39002975821495056,
0.24825140833854675,
0.4394379258155823,
0.400869220495224,
0.26268094778060913,
0.05375789850950241,
-0.3491193354129791,
0.09635955840349197,
0.0647248774766922,
-0.01570071652531624,
-0.08979193866252899,
0.22077544033527374,
0.05288529396057129,
0.4832020699977875,
-0.10670491307973862,
0.2535135746002197,
0.3399565517902374,
0.22467057406902313,
-0.7597107887268066,
-0.09146620333194733,
-0.36462000012397766,
-0.18232178688049316,
-0.22170664370059967,
0.07348768413066864,
-0.31805387139320374,
-0.17359650135040283,
0.16962476074695587,
0.26384004950523376,
-0.2288171648979187,
0.21663710474967957,
-0.02500981278717518,
0.08650905638933182,
0.2285180389881134,
-0.3136896789073944,
-0.012141730636358261,
-0.28686273097991943,
0.09824682772159576,
-0.04392467066645622,
-0.28686344623565674,
0.11822434514760971,
0.17846284806728363,
-0.2891022562980652,
-0.07337384670972824,
-0.3013005554676056,
-0.06379380077123642,
-0.11315485090017319,
0.06352101266384125,
-0.2708462178707123,
0.24281403422355652,
-0.30737054347991943,
0.38263794779777527,
0.0015123245539143682,
-0.49350857734680176,
-0.07877878844738007,
-0.07996612042188644,
-0.009196038357913494,
-0.2655942738056183,
0.17693398892879486,
0.24616506695747375,
-0.3344442844390869,
0.12384749948978424,
0.26409006118774414,
0.06044745817780495,
0.14102430641651154,
0.1492868959903717,
-0.06457939743995667,
0.04292215406894684,
0.39358633756637573,
-0.04023376479744911,
0.0631062462925911,
-0.05584472790360451,
-0.07391107082366943,
0.02038651518523693,
-0.21349459886550903,
0.3152438700199127,
-0.06461724638938904,
-0.1147570088505745,
0.016065599396824837,
-0.11656641215085983,
-0.029304249212145805,
-0.13425780832767487,
0.26397961378097534,
0.02851163037121296,
-0.297207236289978,
0.21157850325107574,
-0.04203701391816139,
0.06779161840677261,
-0.18975788354873657,
-0.22757945954799652,
0.023590128868818283,
0.2716483771800995,
-0.019302958622574806,
0.07948211580514908,
-0.08926579356193542,
-0.1823379397392273,
-0.20786644518375397,
0.24356213212013245,
0.28534868359565735,
-0.1330225020647049,
-0.26226502656936646,
0.1838598996400833,
-0.23844289779663086,
-0.5249384045600891,
0.028214620426297188,
0.05689770728349686,
-0.08949989080429077,
-0.1492798924446106,
0.16747763752937317,
-0.17511914670467377,
-0.7005327939987183,
0.0667201578617096,
0.041379980742931366,
-0.1265173703432083,
0.05583248287439346,
0.18673868477344513,
0.024811843410134315,
0.2813921570777893,
-0.3151077330112457,
-0.4726502299308777,
0.46681880950927734,
-0.2636297047138214,
-0.0976342037320137,
0.28739917278289795,
-0.4460773468017578,
-0.3558637201786041,
0.03471146896481514,
0.3660043179988861,
-0.04143562167882919,
-0.022249458357691765,
-0.24123287200927734,
0.0220087468624115,
-0.02562754973769188,
0.10034650564193726,
-0.20161207020282745,
0.07272523641586304,
-0.09497416019439697,
0.07480748742818832,
0.27345725893974304,
0.35966670513153076,
0.04845774918794632,
-0.17033851146697998,
-0.10273493081331253,
0.11966554075479507,
0.1343279331922531,
-0.03660903498530388,
0.5880106091499329,
0.015064660459756851,
0.054607607424259186,
0.14225028455257416,
0.14765982329845428,
-0.10098718106746674,
-0.06492666900157928,
0.13112089037895203,
0.5460037589073181,
-0.11883161216974258,
-0.027554651722311974,
-0.2553982138633728,
0.16605672240257263,
0.39903444051742554,
0.24141055345535278,
0.2465052306652069,
0.09856951981782913,
0.06363683938980103,
0.05760568380355835,
-0.19432398676872253,
0.4549308717250824,
-0.15152543783187866,
0.33552202582359314,
-0.008569846861064434,
-0.16971099376678467,
-0.08997108042240143,
-0.004826682154089212,
0.2922380566596985,
-0.08896217495203018,
-0.07308845221996307,
-0.020933302119374275,
0.12948361039161682,
-0.4600599706172943,
0.5373691320419312,
0.24931176006793976,
-0.20378637313842773,
0.13173487782478333,
-0.27463752031326294,
-0.187925323843956,
0.11466581374406815,
0.33626195788383484,
0.08504468947649002,
0.40540435910224915,
0.046863824129104614,
0.12572261691093445,
-0.09149476885795593,
-0.26606714725494385,
-0.06085755676031113,
-0.21284602582454681,
-0.017432760447263718,
0.3284073770046234,
-0.0072979675605893135,
0.03240061551332474,
0.5993966460227966,
-0.10502669215202332,
-0.36366888880729675,
-0.0972370058298111,
0.35072317719459534,
0.09079328924417496,
-0.2555134892463684,
0.12347197532653809,
-0.14664974808692932,
0.10338974744081497,
0.2880593240261078,
-0.02865310199558735,
-0.5165494084358215,
0.1863151639699936,
0.30955323576927185,
-0.026289302855730057,
-0.19886820018291473,
-0.12532202899456024,
-0.2536800801753998,
0.38928595185279846,
0.13011357188224792,
-0.07885325700044632,
0.5522681474685669,
-0.09332730621099472,
-0.18302881717681885,
-0.05366125702857971,
0.004101166967302561,
0.05392485111951828,
0.2168501913547516,
-0.13935145735740662,
-0.24889791011810303,
-0.13347217440605164,
-0.25197798013687134,
0.37044867873191833,
0.03822034224867821,
0.32146668434143066,
-0.28933629393577576,
0.3401029109954834,
0.048213958740234375,
-0.022723449394106865,
0.18294066190719604,
-0.13906043767929077,
0.6641214489936829,
0.065728098154068,
-0.05899501219391823,
0.013506152667105198,
-0.3218218982219696,
-0.188188374042511,
0.28096163272857666,
-0.059869956225156784,
-0.21464580297470093,
0.43521323800086975,
0.3314831554889679,
0.19926683604717255,
-0.17789167165756226,
-0.1787300556898117,
0.18935798108577728,
-0.4872033894062042,
-0.11456926167011261,
0.03022422082722187,
0.3795536160469055,
-0.24050138890743256,
-0.2965739369392395,
0.006506709381937981,
0.1299029141664505,
-0.08518244326114655,
0.17715655267238617,
-0.10376108437776566,
-0.3518429398536682,
-0.2914808988571167,
-0.12359055876731873,
-0.03191569447517395,
-0.3715627193450928,
0.34993451833724976,
-0.010940378531813622,
0.013806653209030628,
-0.21883517503738403,
0.09218549728393555,
0.11646833270788193,
0.4632502794265747,
-0.036797598004341125,
-0.22372934222221375,
-0.0651954859495163,
0.0028392719104886055,
-0.31097936630249023,
-0.21396981179714203,
0.30832356214523315,
-0.17060163617134094,
-0.26453039050102234,
-0.16805514693260193,
-0.28063738346099854,
-0.021208977326750755,
0.2522904872894287,
0.05740254744887352,
0.05173475667834282,
0.04284884035587311,
0.29167604446411133,
-0.09038565307855606,
-0.3165273666381836,
-0.17149211466312408,
-0.10676086694002151,
0.20748770236968994,
0.08570288121700287,
0.13890314102172852,
0.02071692794561386,
0.5569210648536682,
-0.09631176292896271,
0.10134173929691315,
0.019405657425522804,
0.014464032836258411,
0.2074342966079712,
-0.17289325594902039,
0.3755621612071991,
-0.10909432917833328,
-0.11316511780023575,
0.21157827973365784,
0.4853096604347229,
0.01861025020480156,
0.2525865435600281,
-0.1671733856201172,
-0.3924001455307007,
-0.21220247447490692,
-0.24971671402454376,
-0.10546400398015976,
-0.13895395398139954,
0.009447823278605938,
-0.09937919676303864,
0.2012997418642044,
-0.3094567656517029,
-0.2554883658885956,
-0.19789253175258636,
-0.19643786549568176,
0.008083535358309746,
0.392024964094162,
0.07205524295568466,
-0.08710945397615433,
-0.5384810566902161,
-0.23735247552394867,
0.046561527997255325,
0.23831309378147125,
-0.08501973748207092,
-0.0016183651750907302,
-0.2995029091835022,
-0.12994082272052765,
-0.03181011229753494,
0.010041624307632446,
0.26592937111854553,
-0.2587573826313019,
0.029301831498742104,
0.10273174941539764,
0.34900566935539246,
0.3562566339969635,
-0.12921471893787384,
-0.18763472139835358,
-0.20478470623493195,
-0.3435375690460205,
0.059719763696193695,
-0.11083249002695084,
0.330326110124588,
0.5498886108398438,
-0.2111649215221405,
-0.24890799820423126,
-0.04459039866924286,
-0.1663740873336792,
0.011122389696538448,
-0.13828246295452118,
0.5049488544464111,
-0.12198716402053833,
0.23030602931976318,
-0.043285418301820755,
0.0799826830625534,
0.034181613475084305,
-0.3818904161453247,
0.15977725386619568,
-0.21335618197917938,
0.1215214803814888,
0.5694563388824463,
-0.07520950585603714,
-0.2980138957500458,
-0.025625767186284065,
-0.19136978685855865,
-0.17851726710796356,
0.02467004582285881,
0.10824640840291977,
0.1698603630065918,
-0.3104575574398041,
0.4760599732398987,
0.23474088311195374,
-0.019001441076397896,
0.2677711248397827,
-0.21550439298152924,
-0.058270521461963654,
-0.05004998669028282,
-0.16242623329162598,
0.0414082407951355,
-0.3761991262435913,
0.06694350391626358,
0.3423825800418854,
0.05877946689724922,
-0.42852169275283813,
-0.12254896759986877,
-0.14906476438045502,
0.39096906781196594,
-0.36266714334487915,
-0.1678486466407776,
0.04078475758433342,
1.168914556503296,
0.33198282122612,
-0.1094704195857048,
0.18444763123989105,
-0.15632323920726776,
0.008389785885810852,
0.003069890895858407,
0.02667098492383957,
-0.1950293481349945,
-0.2561652958393097,
0.002755904570221901,
0.08435002714395523,
-0.27962443232536316,
-0.0226142555475235,
-0.41032177209854126,
0.019332552328705788,
-0.10036863386631012,
0.28651073575019836,
-0.0644356831908226,
0.06632615625858307,
0.3849705457687378,
0.06550148874521255,
0.40448933839797974,
0.2828832268714905,
-0.11142397671937943,
0.1573576033115387,
-0.0537589006125927,
0.02111285738646984,
-0.14495417475700378,
-0.12808695435523987,
-0.4333447515964508,
-0.15084794163703918,
0.04390241578221321,
0.16734954714775085,
-0.1682053804397583,
-0.29224711656570435,
-0.3511914014816284,
-0.11619377136230469,
0.4942277669906616,
0.27979469299316406,
-0.010550116188824177,
-0.012986497953534126,
0.48167046904563904,
-0.0651504322886467,
-0.37409508228302,
0.1536102145910263,
-0.05652490258216858,
-0.3666503429412842,
-0.2758179008960724,
0.45093852281570435,
-0.06929192692041397,
-0.5838907361030579,
-0.3719695806503296,
0.018593722954392433,
0.0948915109038353,
0.11172018945217133,
-0.07238734513521194,
0.24244748055934906,
-0.21053165197372437,
-0.05521596223115921,
0.17273403704166412,
0.0503198578953743,
0.03500628471374512,
-0.0347016304731369,
0.06975838541984558,
0.03428862243890762,
-0.16098499298095703,
-0.06524737924337387,
0.013258370570838451,
-0.08775307238101959,
0.14734603464603424,
-0.04325152561068535,
-0.3359408974647522,
-0.38776570558547974,
0.012918710708618164,
0.128870889544487,
0.0907205268740654,
-0.09379612654447556,
0.32220861315727234,
-0.1983797252178192,
0.2261926680803299,
0.3073517978191376,
-0.059426333755254745,
0.07338161021471024,
-0.2805159389972687,
0.08013509958982468,
-0.31935915350914,
0.46029096841812134,
-0.19791050255298615,
0.5738588571548462,
-0.010691211558878422,
0.16743214428424835,
0.16258122026920319,
0.10982955992221832,
-0.43709197640419006,
-0.08483078330755234,
0.12603610754013062,
0.028836067765951157,
0.15025947988033295,
-0.0716281309723854,
0.1485358625650406,
0.05098399147391319,
0.2921704947948456,
0.026182522997260094,
-0.12524457275867462,
-0.29663708806037903,
0.03564298152923584,
0.10063499212265015,
-0.01404801569879055,
0.20528578758239746,
0.10726311802864075,
-0.18410539627075195,
-0.015826882794499397,
0.205855131149292,
0.1309293508529663,
-0.47717976570129395,
-0.16451771557331085,
0.2384996861219406,
0.032888755202293396,
0.13674496114253998,
0.1958339512348175,
0.06629481911659241,
0.27641499042510986,
0.04068537428975105,
0.13230963051319122,
-0.12186110764741898,
0.07434283196926117,
-0.22833602130413055,
-0.18129374086856842,
0.321455180644989,
0.19181890785694122,
0.3235267996788025,
0.23060306906700134,
0.07464519888162613,
0.0977131724357605,
-0.27581068873405457,
-0.24209751188755035,
-0.11865678429603577,
-0.03769988939166069,
-0.02014690451323986,
0.04946329817175865,
0.2133149802684784,
-0.13628216087818146,
-0.01724141277372837,
-0.013522718101739883,
-0.13689737021923065,
0.23124240338802338,
0.1766572743654251,
0.04680846258997917,
-0.05438975617289543,
0.22066159546375275,
0.03155418857932091,
0.1303723007440567,
-0.18962228298187256,
-0.04287436604499817,
0.22465185821056366,
-0.0005990541540086269,
0.09263283759355545,
-0.5696501731872559,
0.22636374831199646,
-0.1067691370844841,
-0.13203507661819458,
-0.24720339477062225,
-0.3839278817176819,
-0.08316127210855484,
0.039645325392484665,
0.4276635944843292,
0.09947939962148666,
0.23048706352710724,
0.1118030920624733,
-0.22566455602645874,
0.331883043050766,
0.23898452520370483,
0.05597367882728577,
-0.20008625090122223,
-0.06480054557323456,
-0.43300217390060425,
0.16903886198997498,
-0.20066574215888977,
-0.05470660701394081,
-0.4864002764225006,
-0.03670594468712807,
-0.3601657450199127,
0.04555077478289604,
0.24284875392913818,
0.08079494535923004,
-0.16943232715129852,
0.07478949427604675,
-0.0407567098736763,
0.4191705286502838,
0.2423539161682129,
0.1798907071352005,
0.15965984761714935,
0.34679144620895386,
0.1155245453119278,
-0.15580788254737854,
0.14889752864837646,
0.3361082375049591,
0.08266030251979828,
-0.21256525814533234,
-0.08542117476463318,
-0.047044720500707626,
-0.04389509558677673,
0.26243770122528076,
-0.1534428596496582,
0.1129925549030304,
-0.029722971841692924,
0.15415047109127045,
0.16674093902111053,
-0.025686966255307198,
0.20865565538406372,
-0.22863847017288208,
-0.0487404502928257,
0.24155676364898682,
-0.21088242530822754,
0.04495270922780037,
0.012593078427016735,
0.3629545569419861,
-0.1665574312210083,
-0.179696723818779,
0.22401642799377441,
-0.03143121302127838,
-0.19755350053310394,
-0.3369216024875641,
0.2506486177444458,
-0.22231972217559814,
0.12458023428916931,
0.11968548595905304,
-0.09898563474416733,
0.6256818175315857,
0.20913366973400116,
-0.2954399585723877,
-0.07272055745124817,
-0.05364399775862694,
0.05877695977687836,
0.1525784134864807,
0.20385237038135529,
-0.3136289119720459,
-0.27500200271606445,
-0.10839223116636276,
0.48254549503326416,
0.0764952078461647,
0.1539100855588913,
-0.39392951130867004,
-0.00413283659145236,
0.19455839693546295,
-0.11714635789394379,
-0.0030311632435768843,
0.7839321494102478,
0.018186477944254875,
-0.07002799212932587,
-0.11904022842645645,
0.2771124541759491,
0.1488981395959854,
0.3315158784389496,
0.16009066998958588,
-0.08404805511236191,
-0.2837996482849121,
-0.06732583791017532,
0.24793419241905212,
-0.24033015966415405,
0.4302637279033661,
-0.28104284405708313,
-0.060981038957834244,
0.121561698615551,
0.24787746369838715,
-0.1745692938566208,
-0.025950200855731964,
0.37757304310798645,
0.3037129342556,
-0.10975988209247589,
-0.013474388979375362,
0.13821960985660553,
0.15618792176246643,
0.29986372590065,
0.1800600290298462,
-0.13529470562934875,
0.058224886655807495,
-0.06857243925333023,
0.051849719136953354,
0.26906365156173706,
0.024861088022589684,
0.08357087522745132,
0.04470928758382797,
-0.2708633244037628,
-0.29816189408302307,
0.10746614634990692,
0.08700697869062424,
0.11877342313528061,
-0.024244477972388268,
0.25611039996147156,
0.5333581566810608,
0.41316336393356323,
0.11550938338041306,
-0.14381641149520874,
0.1472792625427246,
-0.1331503540277481,
0.004863446112722158,
0.6428367495536804,
-0.11369119584560394,
-0.05501909926533699,
-0.017451921477913857,
0.039944492280483246,
-0.1595887988805771,
-0.02138361521065235,
-0.5319358706474304,
-0.17442472279071808
] |
https://github.com/huggingface/datasets/issues/1837
|
Add VCTK
|
That sounds great @jaketae - let me know if you need any help i.e. feel free to ping me on a first PR :-)
|
## Adding a Dataset
- **Name:** *VCTK*
- **Description:** *This CSTR VCTK Corpus includes speech data uttered by 110 English speakers with various accents. Each speaker reads out about 400 sentences, which were selected from a newspaper, the rainbow passage and an elicitation paragraph used for the speech accent archive.*
- **Paper:** Homepage: https://datashare.ed.ac.uk/handle/10283/3443
- **Data:** https://datashare.ed.ac.uk/handle/10283/3443
- **Motivation:** Important speech dataset
- **TFDatasets Implementation**: https://www.tensorflow.org/datasets/catalog/vctk
If interested in tackling this issue, feel free to tag @patrickvonplaten
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 24 |
Add VCTK
|
[
-0.15286029875278473,
-0.49232012033462524,
-0.2509172558784485,
-0.2501550018787384,
-0.0039796652272343636,
0.07484772056341171,
0.02401273511350155,
0.0353282205760479,
-0.11024494469165802,
0.38379135727882385,
0.05205213278532028,
0.35415762662887573,
-0.1148378774523735,
0.4770788252353668,
0.20476025342941284,
-0.12365160882472992,
0.08443381637334824,
0.56672203540802,
0.29843252897262573,
-0.16424019634723663,
-0.19312386214733124,
0.12273045629262924,
-0.2237105518579483,
-0.1724795699119568,
0.0011967309983447194,
-0.11957020312547684,
-0.0742412805557251,
0.1952429860830307,
0.03499278426170349,
-0.03521938621997833,
-0.17521832883358002,
0.1286109834909439,
-0.06847919523715973,
0.32789766788482666,
-0.00010974298493238166,
-0.07372185587882996,
-0.0507730133831501,
-0.13021861016750336,
-0.30317339301109314,
0.8526405096054077,
0.039978545159101486,
-0.3598319888114929,
-0.3228500783443451,
-0.25854262709617615,
-0.22544732689857483,
-0.2085416465997696,
-0.10922843217849731,
-0.03762273117899895,
-0.15188254415988922,
-0.13996164500713348,
0.2794722616672516,
0.1747310757637024,
0.23597711324691772,
-0.12438316643238068,
0.26767200231552124,
0.18441995978355408,
-0.04556652903556824,
0.39002975821495056,
0.24825140833854675,
0.4394379258155823,
0.400869220495224,
0.26268094778060913,
0.05375789850950241,
-0.3491193354129791,
0.09635955840349197,
0.0647248774766922,
-0.01570071652531624,
-0.08979193866252899,
0.22077544033527374,
0.05288529396057129,
0.4832020699977875,
-0.10670491307973862,
0.2535135746002197,
0.3399565517902374,
0.22467057406902313,
-0.7597107887268066,
-0.09146620333194733,
-0.36462000012397766,
-0.18232178688049316,
-0.22170664370059967,
0.07348768413066864,
-0.31805387139320374,
-0.17359650135040283,
0.16962476074695587,
0.26384004950523376,
-0.2288171648979187,
0.21663710474967957,
-0.02500981278717518,
0.08650905638933182,
0.2285180389881134,
-0.3136896789073944,
-0.012141730636358261,
-0.28686273097991943,
0.09824682772159576,
-0.04392467066645622,
-0.28686344623565674,
0.11822434514760971,
0.17846284806728363,
-0.2891022562980652,
-0.07337384670972824,
-0.3013005554676056,
-0.06379380077123642,
-0.11315485090017319,
0.06352101266384125,
-0.2708462178707123,
0.24281403422355652,
-0.30737054347991943,
0.38263794779777527,
0.0015123245539143682,
-0.49350857734680176,
-0.07877878844738007,
-0.07996612042188644,
-0.009196038357913494,
-0.2655942738056183,
0.17693398892879486,
0.24616506695747375,
-0.3344442844390869,
0.12384749948978424,
0.26409006118774414,
0.06044745817780495,
0.14102430641651154,
0.1492868959903717,
-0.06457939743995667,
0.04292215406894684,
0.39358633756637573,
-0.04023376479744911,
0.0631062462925911,
-0.05584472790360451,
-0.07391107082366943,
0.02038651518523693,
-0.21349459886550903,
0.3152438700199127,
-0.06461724638938904,
-0.1147570088505745,
0.016065599396824837,
-0.11656641215085983,
-0.029304249212145805,
-0.13425780832767487,
0.26397961378097534,
0.02851163037121296,
-0.297207236289978,
0.21157850325107574,
-0.04203701391816139,
0.06779161840677261,
-0.18975788354873657,
-0.22757945954799652,
0.023590128868818283,
0.2716483771800995,
-0.019302958622574806,
0.07948211580514908,
-0.08926579356193542,
-0.1823379397392273,
-0.20786644518375397,
0.24356213212013245,
0.28534868359565735,
-0.1330225020647049,
-0.26226502656936646,
0.1838598996400833,
-0.23844289779663086,
-0.5249384045600891,
0.028214620426297188,
0.05689770728349686,
-0.08949989080429077,
-0.1492798924446106,
0.16747763752937317,
-0.17511914670467377,
-0.7005327939987183,
0.0667201578617096,
0.041379980742931366,
-0.1265173703432083,
0.05583248287439346,
0.18673868477344513,
0.024811843410134315,
0.2813921570777893,
-0.3151077330112457,
-0.4726502299308777,
0.46681880950927734,
-0.2636297047138214,
-0.0976342037320137,
0.28739917278289795,
-0.4460773468017578,
-0.3558637201786041,
0.03471146896481514,
0.3660043179988861,
-0.04143562167882919,
-0.022249458357691765,
-0.24123287200927734,
0.0220087468624115,
-0.02562754973769188,
0.10034650564193726,
-0.20161207020282745,
0.07272523641586304,
-0.09497416019439697,
0.07480748742818832,
0.27345725893974304,
0.35966670513153076,
0.04845774918794632,
-0.17033851146697998,
-0.10273493081331253,
0.11966554075479507,
0.1343279331922531,
-0.03660903498530388,
0.5880106091499329,
0.015064660459756851,
0.054607607424259186,
0.14225028455257416,
0.14765982329845428,
-0.10098718106746674,
-0.06492666900157928,
0.13112089037895203,
0.5460037589073181,
-0.11883161216974258,
-0.027554651722311974,
-0.2553982138633728,
0.16605672240257263,
0.39903444051742554,
0.24141055345535278,
0.2465052306652069,
0.09856951981782913,
0.06363683938980103,
0.05760568380355835,
-0.19432398676872253,
0.4549308717250824,
-0.15152543783187866,
0.33552202582359314,
-0.008569846861064434,
-0.16971099376678467,
-0.08997108042240143,
-0.004826682154089212,
0.2922380566596985,
-0.08896217495203018,
-0.07308845221996307,
-0.020933302119374275,
0.12948361039161682,
-0.4600599706172943,
0.5373691320419312,
0.24931176006793976,
-0.20378637313842773,
0.13173487782478333,
-0.27463752031326294,
-0.187925323843956,
0.11466581374406815,
0.33626195788383484,
0.08504468947649002,
0.40540435910224915,
0.046863824129104614,
0.12572261691093445,
-0.09149476885795593,
-0.26606714725494385,
-0.06085755676031113,
-0.21284602582454681,
-0.017432760447263718,
0.3284073770046234,
-0.0072979675605893135,
0.03240061551332474,
0.5993966460227966,
-0.10502669215202332,
-0.36366888880729675,
-0.0972370058298111,
0.35072317719459534,
0.09079328924417496,
-0.2555134892463684,
0.12347197532653809,
-0.14664974808692932,
0.10338974744081497,
0.2880593240261078,
-0.02865310199558735,
-0.5165494084358215,
0.1863151639699936,
0.30955323576927185,
-0.026289302855730057,
-0.19886820018291473,
-0.12532202899456024,
-0.2536800801753998,
0.38928595185279846,
0.13011357188224792,
-0.07885325700044632,
0.5522681474685669,
-0.09332730621099472,
-0.18302881717681885,
-0.05366125702857971,
0.004101166967302561,
0.05392485111951828,
0.2168501913547516,
-0.13935145735740662,
-0.24889791011810303,
-0.13347217440605164,
-0.25197798013687134,
0.37044867873191833,
0.03822034224867821,
0.32146668434143066,
-0.28933629393577576,
0.3401029109954834,
0.048213958740234375,
-0.022723449394106865,
0.18294066190719604,
-0.13906043767929077,
0.6641214489936829,
0.065728098154068,
-0.05899501219391823,
0.013506152667105198,
-0.3218218982219696,
-0.188188374042511,
0.28096163272857666,
-0.059869956225156784,
-0.21464580297470093,
0.43521323800086975,
0.3314831554889679,
0.19926683604717255,
-0.17789167165756226,
-0.1787300556898117,
0.18935798108577728,
-0.4872033894062042,
-0.11456926167011261,
0.03022422082722187,
0.3795536160469055,
-0.24050138890743256,
-0.2965739369392395,
0.006506709381937981,
0.1299029141664505,
-0.08518244326114655,
0.17715655267238617,
-0.10376108437776566,
-0.3518429398536682,
-0.2914808988571167,
-0.12359055876731873,
-0.03191569447517395,
-0.3715627193450928,
0.34993451833724976,
-0.010940378531813622,
0.013806653209030628,
-0.21883517503738403,
0.09218549728393555,
0.11646833270788193,
0.4632502794265747,
-0.036797598004341125,
-0.22372934222221375,
-0.0651954859495163,
0.0028392719104886055,
-0.31097936630249023,
-0.21396981179714203,
0.30832356214523315,
-0.17060163617134094,
-0.26453039050102234,
-0.16805514693260193,
-0.28063738346099854,
-0.021208977326750755,
0.2522904872894287,
0.05740254744887352,
0.05173475667834282,
0.04284884035587311,
0.29167604446411133,
-0.09038565307855606,
-0.3165273666381836,
-0.17149211466312408,
-0.10676086694002151,
0.20748770236968994,
0.08570288121700287,
0.13890314102172852,
0.02071692794561386,
0.5569210648536682,
-0.09631176292896271,
0.10134173929691315,
0.019405657425522804,
0.014464032836258411,
0.2074342966079712,
-0.17289325594902039,
0.3755621612071991,
-0.10909432917833328,
-0.11316511780023575,
0.21157827973365784,
0.4853096604347229,
0.01861025020480156,
0.2525865435600281,
-0.1671733856201172,
-0.3924001455307007,
-0.21220247447490692,
-0.24971671402454376,
-0.10546400398015976,
-0.13895395398139954,
0.009447823278605938,
-0.09937919676303864,
0.2012997418642044,
-0.3094567656517029,
-0.2554883658885956,
-0.19789253175258636,
-0.19643786549568176,
0.008083535358309746,
0.392024964094162,
0.07205524295568466,
-0.08710945397615433,
-0.5384810566902161,
-0.23735247552394867,
0.046561527997255325,
0.23831309378147125,
-0.08501973748207092,
-0.0016183651750907302,
-0.2995029091835022,
-0.12994082272052765,
-0.03181011229753494,
0.010041624307632446,
0.26592937111854553,
-0.2587573826313019,
0.029301831498742104,
0.10273174941539764,
0.34900566935539246,
0.3562566339969635,
-0.12921471893787384,
-0.18763472139835358,
-0.20478470623493195,
-0.3435375690460205,
0.059719763696193695,
-0.11083249002695084,
0.330326110124588,
0.5498886108398438,
-0.2111649215221405,
-0.24890799820423126,
-0.04459039866924286,
-0.1663740873336792,
0.011122389696538448,
-0.13828246295452118,
0.5049488544464111,
-0.12198716402053833,
0.23030602931976318,
-0.043285418301820755,
0.0799826830625534,
0.034181613475084305,
-0.3818904161453247,
0.15977725386619568,
-0.21335618197917938,
0.1215214803814888,
0.5694563388824463,
-0.07520950585603714,
-0.2980138957500458,
-0.025625767186284065,
-0.19136978685855865,
-0.17851726710796356,
0.02467004582285881,
0.10824640840291977,
0.1698603630065918,
-0.3104575574398041,
0.4760599732398987,
0.23474088311195374,
-0.019001441076397896,
0.2677711248397827,
-0.21550439298152924,
-0.058270521461963654,
-0.05004998669028282,
-0.16242623329162598,
0.0414082407951355,
-0.3761991262435913,
0.06694350391626358,
0.3423825800418854,
0.05877946689724922,
-0.42852169275283813,
-0.12254896759986877,
-0.14906476438045502,
0.39096906781196594,
-0.36266714334487915,
-0.1678486466407776,
0.04078475758433342,
1.168914556503296,
0.33198282122612,
-0.1094704195857048,
0.18444763123989105,
-0.15632323920726776,
0.008389785885810852,
0.003069890895858407,
0.02667098492383957,
-0.1950293481349945,
-0.2561652958393097,
0.002755904570221901,
0.08435002714395523,
-0.27962443232536316,
-0.0226142555475235,
-0.41032177209854126,
0.019332552328705788,
-0.10036863386631012,
0.28651073575019836,
-0.0644356831908226,
0.06632615625858307,
0.3849705457687378,
0.06550148874521255,
0.40448933839797974,
0.2828832268714905,
-0.11142397671937943,
0.1573576033115387,
-0.0537589006125927,
0.02111285738646984,
-0.14495417475700378,
-0.12808695435523987,
-0.4333447515964508,
-0.15084794163703918,
0.04390241578221321,
0.16734954714775085,
-0.1682053804397583,
-0.29224711656570435,
-0.3511914014816284,
-0.11619377136230469,
0.4942277669906616,
0.27979469299316406,
-0.010550116188824177,
-0.012986497953534126,
0.48167046904563904,
-0.0651504322886467,
-0.37409508228302,
0.1536102145910263,
-0.05652490258216858,
-0.3666503429412842,
-0.2758179008960724,
0.45093852281570435,
-0.06929192692041397,
-0.5838907361030579,
-0.3719695806503296,
0.018593722954392433,
0.0948915109038353,
0.11172018945217133,
-0.07238734513521194,
0.24244748055934906,
-0.21053165197372437,
-0.05521596223115921,
0.17273403704166412,
0.0503198578953743,
0.03500628471374512,
-0.0347016304731369,
0.06975838541984558,
0.03428862243890762,
-0.16098499298095703,
-0.06524737924337387,
0.013258370570838451,
-0.08775307238101959,
0.14734603464603424,
-0.04325152561068535,
-0.3359408974647522,
-0.38776570558547974,
0.012918710708618164,
0.128870889544487,
0.0907205268740654,
-0.09379612654447556,
0.32220861315727234,
-0.1983797252178192,
0.2261926680803299,
0.3073517978191376,
-0.059426333755254745,
0.07338161021471024,
-0.2805159389972687,
0.08013509958982468,
-0.31935915350914,
0.46029096841812134,
-0.19791050255298615,
0.5738588571548462,
-0.010691211558878422,
0.16743214428424835,
0.16258122026920319,
0.10982955992221832,
-0.43709197640419006,
-0.08483078330755234,
0.12603610754013062,
0.028836067765951157,
0.15025947988033295,
-0.0716281309723854,
0.1485358625650406,
0.05098399147391319,
0.2921704947948456,
0.026182522997260094,
-0.12524457275867462,
-0.29663708806037903,
0.03564298152923584,
0.10063499212265015,
-0.01404801569879055,
0.20528578758239746,
0.10726311802864075,
-0.18410539627075195,
-0.015826882794499397,
0.205855131149292,
0.1309293508529663,
-0.47717976570129395,
-0.16451771557331085,
0.2384996861219406,
0.032888755202293396,
0.13674496114253998,
0.1958339512348175,
0.06629481911659241,
0.27641499042510986,
0.04068537428975105,
0.13230963051319122,
-0.12186110764741898,
0.07434283196926117,
-0.22833602130413055,
-0.18129374086856842,
0.321455180644989,
0.19181890785694122,
0.3235267996788025,
0.23060306906700134,
0.07464519888162613,
0.0977131724357605,
-0.27581068873405457,
-0.24209751188755035,
-0.11865678429603577,
-0.03769988939166069,
-0.02014690451323986,
0.04946329817175865,
0.2133149802684784,
-0.13628216087818146,
-0.01724141277372837,
-0.013522718101739883,
-0.13689737021923065,
0.23124240338802338,
0.1766572743654251,
0.04680846258997917,
-0.05438975617289543,
0.22066159546375275,
0.03155418857932091,
0.1303723007440567,
-0.18962228298187256,
-0.04287436604499817,
0.22465185821056366,
-0.0005990541540086269,
0.09263283759355545,
-0.5696501731872559,
0.22636374831199646,
-0.1067691370844841,
-0.13203507661819458,
-0.24720339477062225,
-0.3839278817176819,
-0.08316127210855484,
0.039645325392484665,
0.4276635944843292,
0.09947939962148666,
0.23048706352710724,
0.1118030920624733,
-0.22566455602645874,
0.331883043050766,
0.23898452520370483,
0.05597367882728577,
-0.20008625090122223,
-0.06480054557323456,
-0.43300217390060425,
0.16903886198997498,
-0.20066574215888977,
-0.05470660701394081,
-0.4864002764225006,
-0.03670594468712807,
-0.3601657450199127,
0.04555077478289604,
0.24284875392913818,
0.08079494535923004,
-0.16943232715129852,
0.07478949427604675,
-0.0407567098736763,
0.4191705286502838,
0.2423539161682129,
0.1798907071352005,
0.15965984761714935,
0.34679144620895386,
0.1155245453119278,
-0.15580788254737854,
0.14889752864837646,
0.3361082375049591,
0.08266030251979828,
-0.21256525814533234,
-0.08542117476463318,
-0.047044720500707626,
-0.04389509558677673,
0.26243770122528076,
-0.1534428596496582,
0.1129925549030304,
-0.029722971841692924,
0.15415047109127045,
0.16674093902111053,
-0.025686966255307198,
0.20865565538406372,
-0.22863847017288208,
-0.0487404502928257,
0.24155676364898682,
-0.21088242530822754,
0.04495270922780037,
0.012593078427016735,
0.3629545569419861,
-0.1665574312210083,
-0.179696723818779,
0.22401642799377441,
-0.03143121302127838,
-0.19755350053310394,
-0.3369216024875641,
0.2506486177444458,
-0.22231972217559814,
0.12458023428916931,
0.11968548595905304,
-0.09898563474416733,
0.6256818175315857,
0.20913366973400116,
-0.2954399585723877,
-0.07272055745124817,
-0.05364399775862694,
0.05877695977687836,
0.1525784134864807,
0.20385237038135529,
-0.3136289119720459,
-0.27500200271606445,
-0.10839223116636276,
0.48254549503326416,
0.0764952078461647,
0.1539100855588913,
-0.39392951130867004,
-0.00413283659145236,
0.19455839693546295,
-0.11714635789394379,
-0.0030311632435768843,
0.7839321494102478,
0.018186477944254875,
-0.07002799212932587,
-0.11904022842645645,
0.2771124541759491,
0.1488981395959854,
0.3315158784389496,
0.16009066998958588,
-0.08404805511236191,
-0.2837996482849121,
-0.06732583791017532,
0.24793419241905212,
-0.24033015966415405,
0.4302637279033661,
-0.28104284405708313,
-0.060981038957834244,
0.121561698615551,
0.24787746369838715,
-0.1745692938566208,
-0.025950200855731964,
0.37757304310798645,
0.3037129342556,
-0.10975988209247589,
-0.013474388979375362,
0.13821960985660553,
0.15618792176246643,
0.29986372590065,
0.1800600290298462,
-0.13529470562934875,
0.058224886655807495,
-0.06857243925333023,
0.051849719136953354,
0.26906365156173706,
0.024861088022589684,
0.08357087522745132,
0.04470928758382797,
-0.2708633244037628,
-0.29816189408302307,
0.10746614634990692,
0.08700697869062424,
0.11877342313528061,
-0.024244477972388268,
0.25611039996147156,
0.5333581566810608,
0.41316336393356323,
0.11550938338041306,
-0.14381641149520874,
0.1472792625427246,
-0.1331503540277481,
0.004863446112722158,
0.6428367495536804,
-0.11369119584560394,
-0.05501909926533699,
-0.017451921477913857,
0.039944492280483246,
-0.1595887988805771,
-0.02138361521065235,
-0.5319358706474304,
-0.17442472279071808
] |
https://github.com/huggingface/datasets/issues/1835
|
Add CHiME4 dataset
|
Hey @patrickvonplaten, I have managed to download the zip on [here]( http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html) and successfully uploaded all the files on a hugging face dataset:
https://huggingface.co/datasets/ksbai123/Chime4
However I am getting this error when trying to use the dataset viewer:

Can you take a look and let me know if I have missed any files please
|
## Adding a Dataset
- **Name:** Chime4
- **Description:** Chime4 is a dataset for automatic speech recognition. It is especially useful for evaluating models in a noisy environment and for multi-channel ASR
- **Paper:** Dataset comes from a channel: http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/ . Results paper:
- **Data:** http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html
- **Motivation:** So far there are very little datasets for speech in `datasets`. Only `lbirispeech_asr` so far.
If interested in tackling this issue, feel free to tag @patrickvonplaten
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 59 |
Add CHiME4 dataset
|
[
-0.6927152872085571,
-0.06709685176610947,
-0.23844321072101593,
0.1390608549118042,
0.16089339554309845,
0.30461031198501587,
0.3012754023075104,
-0.03496052324771881,
-0.0386388897895813,
0.3348778486251831,
-0.3333721458911896,
0.19437983632087708,
-0.11171136051416397,
0.5567442774772644,
0.32785502076148987,
0.3806461691856384,
0.09771186858415604,
0.34215474128723145,
-0.23032186925411224,
-0.2090737670660019,
-0.2926543951034546,
-0.015923958271741867,
0.05139824002981186,
-0.258912593126297,
-0.555697500705719,
-0.08730585873126984,
0.03679715469479561,
0.23639823496341705,
-0.2920474410057068,
-0.2260022759437561,
0.08528352528810501,
0.15094724297523499,
-0.062293969094753265,
0.5949909090995789,
-0.00010911554272752255,
-0.11161136627197266,
-0.102737195789814,
-0.062347978353500366,
-0.17145925760269165,
0.11358103156089783,
-0.4836513102054596,
-0.26668277382850647,
-0.20838315784931183,
-0.08126241713762283,
-0.16415925323963165,
0.16379743814468384,
-0.13443249464035034,
-0.7565743327140808,
0.10125885903835297,
0.45129916071891785,
0.2136334776878357,
-0.12877723574638367,
-0.043675776571035385,
-0.13746099174022675,
0.3186064660549164,
0.02121768705546856,
-0.004357326775789261,
-0.09054061770439148,
0.34237194061279297,
0.46801549196243286,
0.2337072491645813,
0.10503378510475159,
0.35800909996032715,
-0.022918488830327988,
0.2719567120075226,
0.05012934282422066,
0.06317117810249329,
-0.10109984129667282,
0.09259836375713348,
0.45711949467658997,
0.6389027237892151,
-0.059468332678079605,
-0.20844291150569916,
0.05393240973353386,
0.050259366631507874,
-0.8700022101402283,
0.07775386422872543,
0.05143795162439346,
-0.0574302151799202,
-0.05190496891736984,
-0.27361467480659485,
-0.1736873984336853,
-0.11770689487457275,
0.0776844397187233,
-0.022018196061253548,
0.1173587441444397,
-0.023687293753027916,
-0.04877033457159996,
-0.26716506481170654,
-0.12296240776777267,
0.41144999861717224,
0.07739079743623734,
-0.22049984335899353,
0.07267627120018005,
0.023655595257878304,
-0.12028829753398895,
0.0023162178695201874,
0.2640046775341034,
0.11451471596956253,
-0.1252235621213913,
-0.36259204149246216,
0.13896533846855164,
-0.02881564386188984,
-0.25043752789497375,
0.31258919835090637,
-0.2716505527496338,
0.19631890952587128,
-0.17233581840991974,
0.12256747484207153,
-0.04973763972520828,
0.015009209513664246,
-0.0597124844789505,
0.2244396060705185,
0.054120831191539764,
0.04605172574520111,
-0.007001038175076246,
-0.05175964906811714,
-0.3128102421760559,
-0.2021040916442871,
0.05645967647433281,
0.04649730399250984,
-0.18678343296051025,
-0.13178835809230804,
0.5874043107032776,
0.2165873646736145,
-0.21015985310077667,
-0.09425310790538788,
0.2884763777256012,
0.2316039800643921,
-0.5492622256278992,
-0.2860511243343353,
0.10055743902921677,
-0.04378550499677658,
0.11378085613250732,
0.0876716673374176,
0.1606973111629486,
0.2662881910800934,
-0.07047786563634872,
0.6772927641868591,
0.1207069382071495,
0.03806018456816673,
0.09823516756296158,
-0.06669755280017853,
-0.00624309666454792,
0.18446485698223114,
-0.016836462542414665,
-0.11620648205280304,
0.02394847385585308,
-0.17028898000717163,
-0.09676170349121094,
0.08382906019687653,
-0.0710613876581192,
-0.10536862909793854,
0.22383542358875275,
-0.06175842136144638,
-0.3068225681781769,
-0.33205386996269226,
0.21578800678253174,
-0.06859901547431946,
-0.22990946471691132,
0.15057143568992615,
0.03129762038588524,
-0.4248002767562866,
-0.18708747625350952,
0.013183712027966976,
0.2676139771938324,
-0.2912808656692505,
-0.05423658713698387,
0.2158079594373703,
-0.14263039827346802,
-0.10676725953817368,
-0.06534386426210403,
-0.1673758327960968,
-0.008891976438462734,
-0.06398886442184448,
0.17528530955314636,
0.6171444654464722,
-0.2993868887424469,
-0.448497474193573,
-0.10517013818025589,
0.007077147718518972,
-0.2436884641647339,
0.13650931417942047,
0.18089617788791656,
-0.16998808085918427,
-0.08132834732532501,
0.2713303864002228,
0.20832891762256622,
-0.20130346715450287,
-0.04159390553832054,
0.06189645454287529,
-0.24561026692390442,
0.297909677028656,
0.26281994581222534,
-0.04928107559680939,
0.06611529737710953,
0.5254903435707092,
-0.24695853888988495,
0.28203651309013367,
-0.2676798701286316,
0.1880795657634735,
0.06455229222774506,
0.5572715997695923,
0.012013881467282772,
-0.011280974373221397,
-0.24864070117473602,
0.13153085112571716,
-0.18736034631729126,
-0.07154084742069244,
0.11760018020868301,
0.19657163321971893,
-0.16081254184246063,
-0.10403387248516083,
-0.09470269829034805,
-0.27384719252586365,
0.09865359216928482,
0.21302995085716248,
0.11813431233167648,
-0.11090549826622009,
-0.1933421939611435,
-0.28934651613235474,
0.48524391651153564,
0.027049317955970764,
-0.06879384815692902,
0.08268119394779205,
0.14782673120498657,
0.11134278774261475,
-0.34001871943473816,
0.05044184997677803,
0.3334543704986572,
0.11331750452518463,
-0.1535303145647049,
0.022048844024538994,
0.3427616357803345,
0.055426184087991714,
0.0703011080622673,
0.09831689298152924,
0.14870765805244446,
0.23628643155097961,
-0.06467804312705994,
0.1659441590309143,
0.0075767613016068935,
0.017651056870818138,
0.055655695497989655,
0.04606739431619644,
0.14265112578868866,
0.16449497640132904,
-0.20721183717250824,
-0.106190986931324,
-0.08497144281864166,
0.33258572220802307,
0.08937346190214157,
0.26221320033073425,
-0.13924424350261688,
0.1420632302761078,
0.07933865487575531,
0.27346906065940857,
-0.1253584772348404,
0.09920702874660492,
0.30198806524276733,
0.22849349677562714,
-0.07436195015907288,
0.1852324903011322,
-0.2647051215171814,
-0.22750745713710785,
-0.17778317630290985,
0.20554539561271667,
0.15183456242084503,
0.3155471384525299,
0.3555366098880768,
-0.002026905072852969,
0.1401987373828888,
0.08993429690599442,
-0.019109787419438362,
0.12232238799333572,
-0.09442663192749023,
0.2241058051586151,
0.18586064875125885,
0.07161170989274979,
-0.29204457998275757,
-0.35993725061416626,
-0.0827321857213974,
-0.036538608372211456,
0.2761271893978119,
-0.16159884631633759,
-0.3840983211994171,
0.04150461405515671,
0.10528592765331268,
0.1991582065820694,
0.05245877429842949,
0.12367623299360275,
-0.3027799129486084,
0.15154099464416504,
-0.24113519489765167,
0.2191837728023529,
-0.024886637926101685,
-0.23035888373851776,
0.09475579857826233,
0.03286322206258774,
0.03295222297310829,
-0.13608455657958984,
-0.023375067859888077,
-0.07795390486717224,
0.22901946306228638,
-0.06430733948945999,
0.23682332038879395,
0.2053811252117157,
-0.26196736097335815,
0.26968953013420105,
-0.29282230138778687,
-0.13611264526844025,
0.2660045623779297,
-0.12601296603679657,
0.47267529368400574,
0.15851207077503204,
0.15364979207515717,
-0.18172912299633026,
-0.15295541286468506,
0.026223458349704742,
-0.04592778906226158,
-0.23587621748447418,
-0.2553919553756714,
-0.2284800261259079,
0.009438835084438324,
0.1623377650976181,
-0.6614734530448914,
-0.1842029094696045,
-0.24772967398166656,
0.17968317866325378,
0.19273771345615387,
-0.11836466193199158,
0.01831294223666191,
0.03478798642754555,
0.2336679995059967,
-0.15316574275493622,
0.21233408153057098,
-0.43836089968681335,
-0.33103033900260925,
0.45071572065353394,
-0.29448553919792175,
-0.27439168095588684,
0.17293615639209747,
-0.21490319073200226,
0.1028427854180336,
0.24159221351146698,
-0.17532725632190704,
-0.07486658543348312,
0.07477296888828278,
0.2962733209133148,
0.04026862978935242,
-0.06567948311567307,
0.29708772897720337,
-0.04109051078557968,
-0.1350897252559662,
-0.23736649751663208,
-0.0759279876947403,
0.06138405203819275,
0.34081166982650757,
0.2632688581943512,
-0.4331500232219696,
0.4130502939224243,
-0.17396046221256256,
0.3406867980957031,
0.09291072189807892,
-0.2585780918598175,
0.2848116457462311,
-0.23970253765583038,
0.3788161873817444,
-0.031216425821185112,
-0.016897812485694885,
0.20705817639827728,
0.1593782603740692,
0.11826394498348236,
0.16650377213954926,
0.04159612953662872,
-0.41811808943748474,
-0.15576282143592834,
-0.14210018515586853,
-0.4089620113372803,
-0.006202993914484978,
-0.35998600721359253,
0.42440783977508545,
0.1867518573999405,
0.05959596484899521,
-0.13204334676265717,
-0.09816555678844452,
-0.2909415066242218,
0.05245708301663399,
0.23867985606193542,
-0.08789141476154327,
0.014018946327269077,
-0.7230602502822876,
0.03533323109149933,
-0.19170790910720825,
0.4163360595703125,
0.2210163176059723,
-0.005233786068856716,
-0.20660832524299622,
-0.05222608149051666,
-0.13178269565105438,
-0.10861197113990784,
0.32376551628112793,
-0.6500066518783569,
-0.11524976044893265,
-0.08853363990783691,
0.33795782923698425,
0.23171089589595795,
0.1741349995136261,
-0.25474005937576294,
0.022622989490628242,
0.18828441202640533,
0.322338730096817,
-0.15344560146331787,
0.20928855240345,
0.26037007570266724,
0.3226868808269501,
0.04963568225502968,
0.08289996534585953,
0.022346261888742447,
-0.43247878551483154,
-0.18866944313049316,
0.13662555813789368,
-0.08785849064588547,
0.34887176752090454,
0.5200473666191101,
-0.23304280638694763,
0.06752131134271622,
0.06313902139663696,
0.434224009513855,
0.0051796287298202515,
0.1683160811662674,
0.5596831440925598,
0.14536117017269135,
-0.006537165958434343,
-0.061872273683547974,
0.5422573685646057,
0.2873755395412445,
-0.17082753777503967,
-0.12608158588409424,
-0.028229543939232826,
-0.39923039078712463,
0.4842275083065033,
0.10770408809185028,
0.1341010481119156,
0.009638907387852669,
-0.11665899306535721,
-0.10919756442308426,
0.3380204141139984,
0.36044082045555115,
0.10885580629110336,
0.215699702501297,
-0.08011046051979065,
-0.41371315717697144,
0.1728397160768509,
-0.20662200450897217,
0.1382889747619629,
0.13073700666427612,
0.07175695896148682,
-0.06723015010356903,
-0.2490474134683609,
0.20594194531440735,
0.8748213648796082,
0.08540112525224686,
0.06519033014774323,
0.3067074120044708,
-0.385886013507843,
-0.16488373279571533,
-0.7098119854927063,
-0.05882091820240021,
-0.040039148181676865,
-0.15032033622264862,
-0.039781805127859116,
-0.0016184842679649591,
0.2241668850183487,
0.25629356503486633,
-0.009106675162911415,
0.0925157442688942,
0.06384459137916565,
-0.1571045070886612,
-0.24107374250888824,
0.005218053236603737,
-0.24924129247665405,
-0.027550537139177322,
0.02902483567595482,
0.21638460457324982,
-0.003362775081768632,
-0.2538895010948181,
-0.02696479670703411,
0.08984357118606567,
-0.22438140213489532,
-0.16989772021770477,
-0.10332094877958298,
-0.12008695304393768,
-0.3990297019481659,
-0.0752231702208519,
-0.10854197293519974,
-0.46772781014442444,
0.08143743127584457,
0.14940664172172546,
0.3204287588596344,
0.08628477156162262,
-0.06178588420152664,
0.3524240255355835,
0.0726921558380127,
-0.14972913265228271,
-0.08954942226409912,
-0.07135999947786331,
-0.15583938360214233,
-0.24263453483581543,
-0.15428347885608673,
0.2734779715538025,
-0.0035119871608912945,
-0.46523231267929077,
-0.04985285550355911,
0.02160057984292507,
-0.34738677740097046,
-0.5442654490470886,
0.04299155995249748,
0.492747962474823,
0.3754909038543701,
-0.3097894489765167,
0.138992577791214,
0.18745160102844238,
-0.19715537130832672,
-0.002472451888024807,
0.040706876665353775,
-0.2878996729850769,
-0.2999057173728943,
0.06617499887943268,
0.05056609585881233,
-0.5343962907791138,
0.331362783908844,
0.04362361133098602,
-0.24866239726543427,
-0.3380286991596222,
0.08471379429101944,
0.541205644607544,
0.09566238522529602,
-0.13294382393360138,
0.10394667088985443,
-0.17593099176883698,
-0.06614700704813004,
0.42328080534935,
-0.03897634148597717,
0.11397821456193924,
0.05211629718542099,
-0.08445890992879868,
-0.5311647057533264,
0.15690170228481293,
0.16579855978488922,
0.3650197684764862,
0.033616334199905396,
-0.11927840113639832,
-0.1315011978149414,
0.11841990053653717,
-0.395808607339859,
0.025878626853227615,
0.1444130390882492,
0.07273124903440475,
0.20967285335063934,
-0.038002341985702515,
0.15060847997665405,
0.027327384799718857,
0.20042574405670166,
-0.12023502588272095,
-0.4049583971500397,
-0.2514731287956238,
0.09141813963651657,
0.08113013952970505,
0.06568901985883713,
-0.025737471878528595,
0.1873755306005478,
-0.05206109955906868,
-0.2679266929626465,
-0.10375829041004181,
0.02885536476969719,
-0.0033861983101814985,
-0.10790875554084778,
-0.20919355750083923,
0.40069249272346497,
-0.3056938946247101,
-0.1631958782672882,
-0.010560275055468082,
0.14247502386569977,
-0.15688349306583405,
-0.12992361187934875,
0.13853780925273895,
0.13705125451087952,
-0.11789344996213913,
0.5131964683532715,
0.18115654587745667,
0.2721257209777832,
-0.10437443107366562,
0.12083472311496735,
-0.30374568700790405,
-0.10586509853601456,
0.4593438506126404,
-0.0542006716132164,
0.17738574743270874,
-0.27339258790016174,
0.22633376717567444,
-0.06623568385839462,
0.2264930009841919,
-0.2939084768295288,
-0.030236901715397835,
0.22576040029525757,
-0.18038181960582733,
0.3498421013355255,
0.20353837311267853,
0.38389402627944946,
-0.1467554271221161,
0.1858784556388855,
0.01508780661970377,
-0.020098833367228508,
-0.10124243795871735,
0.13268020749092102,
0.30835703015327454,
-0.2869231402873993,
-0.0390140637755394,
0.27160829305648804,
0.43630921840667725,
-0.10117344558238983,
0.5844151973724365,
-0.04587889090180397,
0.46902361512184143,
0.10232425481081009,
-0.07144799083471298,
0.03823866695165634,
-0.09611016511917114,
0.323541522026062,
0.014412986114621162,
-0.1514640748500824,
-0.02240931987762451,
0.47419023513793945,
0.3944191634654999,
-0.02521817572414875,
0.13518717885017395,
-0.143855482339859,
-0.12705330550670624,
-0.24625936150550842,
0.03153316676616669,
0.31695523858070374,
-0.3562973737716675,
-0.350930780172348,
-0.07306572049856186,
0.04017191752791405,
-0.2275920808315277,
-0.04015190899372101,
-0.060302846133708954,
0.07533077895641327,
0.22777701914310455,
0.3872579038143158,
0.1119014322757721,
-0.2743828594684601,
-0.010966505855321884,
0.11171640455722809,
0.16604700684547424,
-0.13675610721111298,
0.4400676488876343,
0.17995426058769226,
-0.04153093323111534,
-0.08415797352790833,
0.0617075115442276,
0.3810855448246002,
0.2305614948272705,
-0.23971018195152283,
-0.14138388633728027,
0.05269582197070122,
0.2495489865541458,
0.31984955072402954,
0.20167675614356995,
0.18625685572624207,
-0.23129189014434814,
-0.07405233383178711,
-0.07650354504585266,
-0.023767132312059402,
-0.2602355182170868,
-0.21464157104492188,
0.049993716180324554,
-0.09347596019506454,
-0.2221408635377884,
-0.1631658524274826,
-0.1751820147037506,
0.004120519384741783,
0.3845089375972748,
-0.04280943423509598,
-0.022476911544799805,
-0.009366413578391075,
0.107028529047966,
-0.059882596135139465,
0.03774596005678177,
0.1723247468471527,
0.1556916981935501,
-0.10812888294458389,
-0.2949647903442383,
-0.5281619429588318,
0.06030925363302231,
-0.03855051100254059,
0.048767734318971634,
-0.3577788472175598,
0.05365045741200447,
0.5251667499542236,
0.20543591678142548,
0.5771826505661011,
0.02912706695497036,
0.2299996018409729,
0.04796980321407318,
-0.17901372909545898,
-0.130630224943161,
0.3718004524707794,
0.33667436242103577,
0.08808853477239609,
-0.13241198658943176,
0.003726137336343527,
0.3852563500404358,
0.1792706549167633,
-0.1459435075521469,
-0.3044588565826416,
-0.25224271416664124,
-0.4513716399669647,
0.24383366107940674,
-0.24661649763584137,
0.6189831495285034,
-0.3694009780883789,
0.20609384775161743,
0.06249738112092018,
-0.26672109961509705,
0.029876865446567535,
0.08156437426805496,
0.1317453533411026,
0.17411601543426514,
-0.13840162754058838,
0.16168901324272156,
0.0954853817820549,
0.3157786428928375,
0.0073955487459897995,
-0.06469790637493134,
-0.06509488075971603,
0.24147462844848633,
-0.41340959072113037,
0.012325061485171318,
0.016848130151629448,
-0.11757731437683105,
0.011381362564861774,
-0.10829602181911469,
0.18530969321727753,
-0.17891211807727814,
0.40406548976898193,
-0.21349982917308807,
-0.2744032144546509,
-0.6737647652626038,
0.07887601107358932,
0.35142841935157776,
0.04922036454081535,
-0.42964789271354675,
0.057581234723329544,
0.37188056111335754,
-0.0777001678943634,
-0.15873804688453674,
0.367080956697464,
-0.17581768333911896,
-0.20947128534317017,
-0.08454962819814682,
0.35786962509155273,
0.0618404895067215,
0.001413242775015533,
-0.3085511028766632,
-0.2097565084695816
] |
https://github.com/huggingface/datasets/issues/1835
|
Add CHiME4 dataset
|
Hi @KossaiSbai,
Thanks for your contribution.
As the issue is not strictly related to the `datasets` library, but to the specific implementation of the CHiME4 dataset, I have opened an issue in the Discussion tab of the dataset: https://huggingface.co/datasets/ksbai123/Chime4/discussions/2
Let's continue the discussion there!
|
## Adding a Dataset
- **Name:** Chime4
- **Description:** Chime4 is a dataset for automatic speech recognition. It is especially useful for evaluating models in a noisy environment and for multi-channel ASR
- **Paper:** Dataset comes from a channel: http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/ . Results paper:
- **Data:** http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html
- **Motivation:** So far there are very little datasets for speech in `datasets`. Only `lbirispeech_asr` so far.
If interested in tackling this issue, feel free to tag @patrickvonplaten
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 44 |
Add CHiME4 dataset
|
[
-0.6927152872085571,
-0.06709685176610947,
-0.23844321072101593,
0.1390608549118042,
0.16089339554309845,
0.30461031198501587,
0.3012754023075104,
-0.03496052324771881,
-0.0386388897895813,
0.3348778486251831,
-0.3333721458911896,
0.19437983632087708,
-0.11171136051416397,
0.5567442774772644,
0.32785502076148987,
0.3806461691856384,
0.09771186858415604,
0.34215474128723145,
-0.23032186925411224,
-0.2090737670660019,
-0.2926543951034546,
-0.015923958271741867,
0.05139824002981186,
-0.258912593126297,
-0.555697500705719,
-0.08730585873126984,
0.03679715469479561,
0.23639823496341705,
-0.2920474410057068,
-0.2260022759437561,
0.08528352528810501,
0.15094724297523499,
-0.062293969094753265,
0.5949909090995789,
-0.00010911554272752255,
-0.11161136627197266,
-0.102737195789814,
-0.062347978353500366,
-0.17145925760269165,
0.11358103156089783,
-0.4836513102054596,
-0.26668277382850647,
-0.20838315784931183,
-0.08126241713762283,
-0.16415925323963165,
0.16379743814468384,
-0.13443249464035034,
-0.7565743327140808,
0.10125885903835297,
0.45129916071891785,
0.2136334776878357,
-0.12877723574638367,
-0.043675776571035385,
-0.13746099174022675,
0.3186064660549164,
0.02121768705546856,
-0.004357326775789261,
-0.09054061770439148,
0.34237194061279297,
0.46801549196243286,
0.2337072491645813,
0.10503378510475159,
0.35800909996032715,
-0.022918488830327988,
0.2719567120075226,
0.05012934282422066,
0.06317117810249329,
-0.10109984129667282,
0.09259836375713348,
0.45711949467658997,
0.6389027237892151,
-0.059468332678079605,
-0.20844291150569916,
0.05393240973353386,
0.050259366631507874,
-0.8700022101402283,
0.07775386422872543,
0.05143795162439346,
-0.0574302151799202,
-0.05190496891736984,
-0.27361467480659485,
-0.1736873984336853,
-0.11770689487457275,
0.0776844397187233,
-0.022018196061253548,
0.1173587441444397,
-0.023687293753027916,
-0.04877033457159996,
-0.26716506481170654,
-0.12296240776777267,
0.41144999861717224,
0.07739079743623734,
-0.22049984335899353,
0.07267627120018005,
0.023655595257878304,
-0.12028829753398895,
0.0023162178695201874,
0.2640046775341034,
0.11451471596956253,
-0.1252235621213913,
-0.36259204149246216,
0.13896533846855164,
-0.02881564386188984,
-0.25043752789497375,
0.31258919835090637,
-0.2716505527496338,
0.19631890952587128,
-0.17233581840991974,
0.12256747484207153,
-0.04973763972520828,
0.015009209513664246,
-0.0597124844789505,
0.2244396060705185,
0.054120831191539764,
0.04605172574520111,
-0.007001038175076246,
-0.05175964906811714,
-0.3128102421760559,
-0.2021040916442871,
0.05645967647433281,
0.04649730399250984,
-0.18678343296051025,
-0.13178835809230804,
0.5874043107032776,
0.2165873646736145,
-0.21015985310077667,
-0.09425310790538788,
0.2884763777256012,
0.2316039800643921,
-0.5492622256278992,
-0.2860511243343353,
0.10055743902921677,
-0.04378550499677658,
0.11378085613250732,
0.0876716673374176,
0.1606973111629486,
0.2662881910800934,
-0.07047786563634872,
0.6772927641868591,
0.1207069382071495,
0.03806018456816673,
0.09823516756296158,
-0.06669755280017853,
-0.00624309666454792,
0.18446485698223114,
-0.016836462542414665,
-0.11620648205280304,
0.02394847385585308,
-0.17028898000717163,
-0.09676170349121094,
0.08382906019687653,
-0.0710613876581192,
-0.10536862909793854,
0.22383542358875275,
-0.06175842136144638,
-0.3068225681781769,
-0.33205386996269226,
0.21578800678253174,
-0.06859901547431946,
-0.22990946471691132,
0.15057143568992615,
0.03129762038588524,
-0.4248002767562866,
-0.18708747625350952,
0.013183712027966976,
0.2676139771938324,
-0.2912808656692505,
-0.05423658713698387,
0.2158079594373703,
-0.14263039827346802,
-0.10676725953817368,
-0.06534386426210403,
-0.1673758327960968,
-0.008891976438462734,
-0.06398886442184448,
0.17528530955314636,
0.6171444654464722,
-0.2993868887424469,
-0.448497474193573,
-0.10517013818025589,
0.007077147718518972,
-0.2436884641647339,
0.13650931417942047,
0.18089617788791656,
-0.16998808085918427,
-0.08132834732532501,
0.2713303864002228,
0.20832891762256622,
-0.20130346715450287,
-0.04159390553832054,
0.06189645454287529,
-0.24561026692390442,
0.297909677028656,
0.26281994581222534,
-0.04928107559680939,
0.06611529737710953,
0.5254903435707092,
-0.24695853888988495,
0.28203651309013367,
-0.2676798701286316,
0.1880795657634735,
0.06455229222774506,
0.5572715997695923,
0.012013881467282772,
-0.011280974373221397,
-0.24864070117473602,
0.13153085112571716,
-0.18736034631729126,
-0.07154084742069244,
0.11760018020868301,
0.19657163321971893,
-0.16081254184246063,
-0.10403387248516083,
-0.09470269829034805,
-0.27384719252586365,
0.09865359216928482,
0.21302995085716248,
0.11813431233167648,
-0.11090549826622009,
-0.1933421939611435,
-0.28934651613235474,
0.48524391651153564,
0.027049317955970764,
-0.06879384815692902,
0.08268119394779205,
0.14782673120498657,
0.11134278774261475,
-0.34001871943473816,
0.05044184997677803,
0.3334543704986572,
0.11331750452518463,
-0.1535303145647049,
0.022048844024538994,
0.3427616357803345,
0.055426184087991714,
0.0703011080622673,
0.09831689298152924,
0.14870765805244446,
0.23628643155097961,
-0.06467804312705994,
0.1659441590309143,
0.0075767613016068935,
0.017651056870818138,
0.055655695497989655,
0.04606739431619644,
0.14265112578868866,
0.16449497640132904,
-0.20721183717250824,
-0.106190986931324,
-0.08497144281864166,
0.33258572220802307,
0.08937346190214157,
0.26221320033073425,
-0.13924424350261688,
0.1420632302761078,
0.07933865487575531,
0.27346906065940857,
-0.1253584772348404,
0.09920702874660492,
0.30198806524276733,
0.22849349677562714,
-0.07436195015907288,
0.1852324903011322,
-0.2647051215171814,
-0.22750745713710785,
-0.17778317630290985,
0.20554539561271667,
0.15183456242084503,
0.3155471384525299,
0.3555366098880768,
-0.002026905072852969,
0.1401987373828888,
0.08993429690599442,
-0.019109787419438362,
0.12232238799333572,
-0.09442663192749023,
0.2241058051586151,
0.18586064875125885,
0.07161170989274979,
-0.29204457998275757,
-0.35993725061416626,
-0.0827321857213974,
-0.036538608372211456,
0.2761271893978119,
-0.16159884631633759,
-0.3840983211994171,
0.04150461405515671,
0.10528592765331268,
0.1991582065820694,
0.05245877429842949,
0.12367623299360275,
-0.3027799129486084,
0.15154099464416504,
-0.24113519489765167,
0.2191837728023529,
-0.024886637926101685,
-0.23035888373851776,
0.09475579857826233,
0.03286322206258774,
0.03295222297310829,
-0.13608455657958984,
-0.023375067859888077,
-0.07795390486717224,
0.22901946306228638,
-0.06430733948945999,
0.23682332038879395,
0.2053811252117157,
-0.26196736097335815,
0.26968953013420105,
-0.29282230138778687,
-0.13611264526844025,
0.2660045623779297,
-0.12601296603679657,
0.47267529368400574,
0.15851207077503204,
0.15364979207515717,
-0.18172912299633026,
-0.15295541286468506,
0.026223458349704742,
-0.04592778906226158,
-0.23587621748447418,
-0.2553919553756714,
-0.2284800261259079,
0.009438835084438324,
0.1623377650976181,
-0.6614734530448914,
-0.1842029094696045,
-0.24772967398166656,
0.17968317866325378,
0.19273771345615387,
-0.11836466193199158,
0.01831294223666191,
0.03478798642754555,
0.2336679995059967,
-0.15316574275493622,
0.21233408153057098,
-0.43836089968681335,
-0.33103033900260925,
0.45071572065353394,
-0.29448553919792175,
-0.27439168095588684,
0.17293615639209747,
-0.21490319073200226,
0.1028427854180336,
0.24159221351146698,
-0.17532725632190704,
-0.07486658543348312,
0.07477296888828278,
0.2962733209133148,
0.04026862978935242,
-0.06567948311567307,
0.29708772897720337,
-0.04109051078557968,
-0.1350897252559662,
-0.23736649751663208,
-0.0759279876947403,
0.06138405203819275,
0.34081166982650757,
0.2632688581943512,
-0.4331500232219696,
0.4130502939224243,
-0.17396046221256256,
0.3406867980957031,
0.09291072189807892,
-0.2585780918598175,
0.2848116457462311,
-0.23970253765583038,
0.3788161873817444,
-0.031216425821185112,
-0.016897812485694885,
0.20705817639827728,
0.1593782603740692,
0.11826394498348236,
0.16650377213954926,
0.04159612953662872,
-0.41811808943748474,
-0.15576282143592834,
-0.14210018515586853,
-0.4089620113372803,
-0.006202993914484978,
-0.35998600721359253,
0.42440783977508545,
0.1867518573999405,
0.05959596484899521,
-0.13204334676265717,
-0.09816555678844452,
-0.2909415066242218,
0.05245708301663399,
0.23867985606193542,
-0.08789141476154327,
0.014018946327269077,
-0.7230602502822876,
0.03533323109149933,
-0.19170790910720825,
0.4163360595703125,
0.2210163176059723,
-0.005233786068856716,
-0.20660832524299622,
-0.05222608149051666,
-0.13178269565105438,
-0.10861197113990784,
0.32376551628112793,
-0.6500066518783569,
-0.11524976044893265,
-0.08853363990783691,
0.33795782923698425,
0.23171089589595795,
0.1741349995136261,
-0.25474005937576294,
0.022622989490628242,
0.18828441202640533,
0.322338730096817,
-0.15344560146331787,
0.20928855240345,
0.26037007570266724,
0.3226868808269501,
0.04963568225502968,
0.08289996534585953,
0.022346261888742447,
-0.43247878551483154,
-0.18866944313049316,
0.13662555813789368,
-0.08785849064588547,
0.34887176752090454,
0.5200473666191101,
-0.23304280638694763,
0.06752131134271622,
0.06313902139663696,
0.434224009513855,
0.0051796287298202515,
0.1683160811662674,
0.5596831440925598,
0.14536117017269135,
-0.006537165958434343,
-0.061872273683547974,
0.5422573685646057,
0.2873755395412445,
-0.17082753777503967,
-0.12608158588409424,
-0.028229543939232826,
-0.39923039078712463,
0.4842275083065033,
0.10770408809185028,
0.1341010481119156,
0.009638907387852669,
-0.11665899306535721,
-0.10919756442308426,
0.3380204141139984,
0.36044082045555115,
0.10885580629110336,
0.215699702501297,
-0.08011046051979065,
-0.41371315717697144,
0.1728397160768509,
-0.20662200450897217,
0.1382889747619629,
0.13073700666427612,
0.07175695896148682,
-0.06723015010356903,
-0.2490474134683609,
0.20594194531440735,
0.8748213648796082,
0.08540112525224686,
0.06519033014774323,
0.3067074120044708,
-0.385886013507843,
-0.16488373279571533,
-0.7098119854927063,
-0.05882091820240021,
-0.040039148181676865,
-0.15032033622264862,
-0.039781805127859116,
-0.0016184842679649591,
0.2241668850183487,
0.25629356503486633,
-0.009106675162911415,
0.0925157442688942,
0.06384459137916565,
-0.1571045070886612,
-0.24107374250888824,
0.005218053236603737,
-0.24924129247665405,
-0.027550537139177322,
0.02902483567595482,
0.21638460457324982,
-0.003362775081768632,
-0.2538895010948181,
-0.02696479670703411,
0.08984357118606567,
-0.22438140213489532,
-0.16989772021770477,
-0.10332094877958298,
-0.12008695304393768,
-0.3990297019481659,
-0.0752231702208519,
-0.10854197293519974,
-0.46772781014442444,
0.08143743127584457,
0.14940664172172546,
0.3204287588596344,
0.08628477156162262,
-0.06178588420152664,
0.3524240255355835,
0.0726921558380127,
-0.14972913265228271,
-0.08954942226409912,
-0.07135999947786331,
-0.15583938360214233,
-0.24263453483581543,
-0.15428347885608673,
0.2734779715538025,
-0.0035119871608912945,
-0.46523231267929077,
-0.04985285550355911,
0.02160057984292507,
-0.34738677740097046,
-0.5442654490470886,
0.04299155995249748,
0.492747962474823,
0.3754909038543701,
-0.3097894489765167,
0.138992577791214,
0.18745160102844238,
-0.19715537130832672,
-0.002472451888024807,
0.040706876665353775,
-0.2878996729850769,
-0.2999057173728943,
0.06617499887943268,
0.05056609585881233,
-0.5343962907791138,
0.331362783908844,
0.04362361133098602,
-0.24866239726543427,
-0.3380286991596222,
0.08471379429101944,
0.541205644607544,
0.09566238522529602,
-0.13294382393360138,
0.10394667088985443,
-0.17593099176883698,
-0.06614700704813004,
0.42328080534935,
-0.03897634148597717,
0.11397821456193924,
0.05211629718542099,
-0.08445890992879868,
-0.5311647057533264,
0.15690170228481293,
0.16579855978488922,
0.3650197684764862,
0.033616334199905396,
-0.11927840113639832,
-0.1315011978149414,
0.11841990053653717,
-0.395808607339859,
0.025878626853227615,
0.1444130390882492,
0.07273124903440475,
0.20967285335063934,
-0.038002341985702515,
0.15060847997665405,
0.027327384799718857,
0.20042574405670166,
-0.12023502588272095,
-0.4049583971500397,
-0.2514731287956238,
0.09141813963651657,
0.08113013952970505,
0.06568901985883713,
-0.025737471878528595,
0.1873755306005478,
-0.05206109955906868,
-0.2679266929626465,
-0.10375829041004181,
0.02885536476969719,
-0.0033861983101814985,
-0.10790875554084778,
-0.20919355750083923,
0.40069249272346497,
-0.3056938946247101,
-0.1631958782672882,
-0.010560275055468082,
0.14247502386569977,
-0.15688349306583405,
-0.12992361187934875,
0.13853780925273895,
0.13705125451087952,
-0.11789344996213913,
0.5131964683532715,
0.18115654587745667,
0.2721257209777832,
-0.10437443107366562,
0.12083472311496735,
-0.30374568700790405,
-0.10586509853601456,
0.4593438506126404,
-0.0542006716132164,
0.17738574743270874,
-0.27339258790016174,
0.22633376717567444,
-0.06623568385839462,
0.2264930009841919,
-0.2939084768295288,
-0.030236901715397835,
0.22576040029525757,
-0.18038181960582733,
0.3498421013355255,
0.20353837311267853,
0.38389402627944946,
-0.1467554271221161,
0.1858784556388855,
0.01508780661970377,
-0.020098833367228508,
-0.10124243795871735,
0.13268020749092102,
0.30835703015327454,
-0.2869231402873993,
-0.0390140637755394,
0.27160829305648804,
0.43630921840667725,
-0.10117344558238983,
0.5844151973724365,
-0.04587889090180397,
0.46902361512184143,
0.10232425481081009,
-0.07144799083471298,
0.03823866695165634,
-0.09611016511917114,
0.323541522026062,
0.014412986114621162,
-0.1514640748500824,
-0.02240931987762451,
0.47419023513793945,
0.3944191634654999,
-0.02521817572414875,
0.13518717885017395,
-0.143855482339859,
-0.12705330550670624,
-0.24625936150550842,
0.03153316676616669,
0.31695523858070374,
-0.3562973737716675,
-0.350930780172348,
-0.07306572049856186,
0.04017191752791405,
-0.2275920808315277,
-0.04015190899372101,
-0.060302846133708954,
0.07533077895641327,
0.22777701914310455,
0.3872579038143158,
0.1119014322757721,
-0.2743828594684601,
-0.010966505855321884,
0.11171640455722809,
0.16604700684547424,
-0.13675610721111298,
0.4400676488876343,
0.17995426058769226,
-0.04153093323111534,
-0.08415797352790833,
0.0617075115442276,
0.3810855448246002,
0.2305614948272705,
-0.23971018195152283,
-0.14138388633728027,
0.05269582197070122,
0.2495489865541458,
0.31984955072402954,
0.20167675614356995,
0.18625685572624207,
-0.23129189014434814,
-0.07405233383178711,
-0.07650354504585266,
-0.023767132312059402,
-0.2602355182170868,
-0.21464157104492188,
0.049993716180324554,
-0.09347596019506454,
-0.2221408635377884,
-0.1631658524274826,
-0.1751820147037506,
0.004120519384741783,
0.3845089375972748,
-0.04280943423509598,
-0.022476911544799805,
-0.009366413578391075,
0.107028529047966,
-0.059882596135139465,
0.03774596005678177,
0.1723247468471527,
0.1556916981935501,
-0.10812888294458389,
-0.2949647903442383,
-0.5281619429588318,
0.06030925363302231,
-0.03855051100254059,
0.048767734318971634,
-0.3577788472175598,
0.05365045741200447,
0.5251667499542236,
0.20543591678142548,
0.5771826505661011,
0.02912706695497036,
0.2299996018409729,
0.04796980321407318,
-0.17901372909545898,
-0.130630224943161,
0.3718004524707794,
0.33667436242103577,
0.08808853477239609,
-0.13241198658943176,
0.003726137336343527,
0.3852563500404358,
0.1792706549167633,
-0.1459435075521469,
-0.3044588565826416,
-0.25224271416664124,
-0.4513716399669647,
0.24383366107940674,
-0.24661649763584137,
0.6189831495285034,
-0.3694009780883789,
0.20609384775161743,
0.06249738112092018,
-0.26672109961509705,
0.029876865446567535,
0.08156437426805496,
0.1317453533411026,
0.17411601543426514,
-0.13840162754058838,
0.16168901324272156,
0.0954853817820549,
0.3157786428928375,
0.0073955487459897995,
-0.06469790637493134,
-0.06509488075971603,
0.24147462844848633,
-0.41340959072113037,
0.012325061485171318,
0.016848130151629448,
-0.11757731437683105,
0.011381362564861774,
-0.10829602181911469,
0.18530969321727753,
-0.17891211807727814,
0.40406548976898193,
-0.21349982917308807,
-0.2744032144546509,
-0.6737647652626038,
0.07887601107358932,
0.35142841935157776,
0.04922036454081535,
-0.42964789271354675,
0.057581234723329544,
0.37188056111335754,
-0.0777001678943634,
-0.15873804688453674,
0.367080956697464,
-0.17581768333911896,
-0.20947128534317017,
-0.08454962819814682,
0.35786962509155273,
0.0618404895067215,
0.001413242775015533,
-0.3085511028766632,
-0.2097565084695816
] |
https://github.com/huggingface/datasets/issues/1835
|
Add CHiME4 dataset
|
Hi, please help me understand this dataset. I am trying to run ESPnet chime4 recepie. I downloaded the dataset (https://www.chimechallenge.org/challenges/chime4/download) and it doesn't look like the official site (https://www.chimechallenge.org/challenges/chime4/data#Audio):
<img width="220" alt="Image" src="https://github.com/user-attachments/assets/91d2d727-bc65-4c45-ad87-b643fc26a40e" />
There is no
├── audio
├── transcriptions
└── WSJ0
only
├── annotations
same in your huggingface card.
How can I access the missing data?
|
## Adding a Dataset
- **Name:** Chime4
- **Description:** Chime4 is a dataset for automatic speech recognition. It is especially useful for evaluating models in a noisy environment and for multi-channel ASR
- **Paper:** Dataset comes from a channel: http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/ . Results paper:
- **Data:** http://spandh.dcs.shef.ac.uk/chime_challenge/CHiME4/download.html
- **Motivation:** So far there are very little datasets for speech in `datasets`. Only `lbirispeech_asr` so far.
If interested in tackling this issue, feel free to tag @patrickvonplaten
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 58 |
Add CHiME4 dataset
|
[
-0.6927152872085571,
-0.06709685176610947,
-0.23844321072101593,
0.1390608549118042,
0.16089339554309845,
0.30461031198501587,
0.3012754023075104,
-0.03496052324771881,
-0.0386388897895813,
0.3348778486251831,
-0.3333721458911896,
0.19437983632087708,
-0.11171136051416397,
0.5567442774772644,
0.32785502076148987,
0.3806461691856384,
0.09771186858415604,
0.34215474128723145,
-0.23032186925411224,
-0.2090737670660019,
-0.2926543951034546,
-0.015923958271741867,
0.05139824002981186,
-0.258912593126297,
-0.555697500705719,
-0.08730585873126984,
0.03679715469479561,
0.23639823496341705,
-0.2920474410057068,
-0.2260022759437561,
0.08528352528810501,
0.15094724297523499,
-0.062293969094753265,
0.5949909090995789,
-0.00010911554272752255,
-0.11161136627197266,
-0.102737195789814,
-0.062347978353500366,
-0.17145925760269165,
0.11358103156089783,
-0.4836513102054596,
-0.26668277382850647,
-0.20838315784931183,
-0.08126241713762283,
-0.16415925323963165,
0.16379743814468384,
-0.13443249464035034,
-0.7565743327140808,
0.10125885903835297,
0.45129916071891785,
0.2136334776878357,
-0.12877723574638367,
-0.043675776571035385,
-0.13746099174022675,
0.3186064660549164,
0.02121768705546856,
-0.004357326775789261,
-0.09054061770439148,
0.34237194061279297,
0.46801549196243286,
0.2337072491645813,
0.10503378510475159,
0.35800909996032715,
-0.022918488830327988,
0.2719567120075226,
0.05012934282422066,
0.06317117810249329,
-0.10109984129667282,
0.09259836375713348,
0.45711949467658997,
0.6389027237892151,
-0.059468332678079605,
-0.20844291150569916,
0.05393240973353386,
0.050259366631507874,
-0.8700022101402283,
0.07775386422872543,
0.05143795162439346,
-0.0574302151799202,
-0.05190496891736984,
-0.27361467480659485,
-0.1736873984336853,
-0.11770689487457275,
0.0776844397187233,
-0.022018196061253548,
0.1173587441444397,
-0.023687293753027916,
-0.04877033457159996,
-0.26716506481170654,
-0.12296240776777267,
0.41144999861717224,
0.07739079743623734,
-0.22049984335899353,
0.07267627120018005,
0.023655595257878304,
-0.12028829753398895,
0.0023162178695201874,
0.2640046775341034,
0.11451471596956253,
-0.1252235621213913,
-0.36259204149246216,
0.13896533846855164,
-0.02881564386188984,
-0.25043752789497375,
0.31258919835090637,
-0.2716505527496338,
0.19631890952587128,
-0.17233581840991974,
0.12256747484207153,
-0.04973763972520828,
0.015009209513664246,
-0.0597124844789505,
0.2244396060705185,
0.054120831191539764,
0.04605172574520111,
-0.007001038175076246,
-0.05175964906811714,
-0.3128102421760559,
-0.2021040916442871,
0.05645967647433281,
0.04649730399250984,
-0.18678343296051025,
-0.13178835809230804,
0.5874043107032776,
0.2165873646736145,
-0.21015985310077667,
-0.09425310790538788,
0.2884763777256012,
0.2316039800643921,
-0.5492622256278992,
-0.2860511243343353,
0.10055743902921677,
-0.04378550499677658,
0.11378085613250732,
0.0876716673374176,
0.1606973111629486,
0.2662881910800934,
-0.07047786563634872,
0.6772927641868591,
0.1207069382071495,
0.03806018456816673,
0.09823516756296158,
-0.06669755280017853,
-0.00624309666454792,
0.18446485698223114,
-0.016836462542414665,
-0.11620648205280304,
0.02394847385585308,
-0.17028898000717163,
-0.09676170349121094,
0.08382906019687653,
-0.0710613876581192,
-0.10536862909793854,
0.22383542358875275,
-0.06175842136144638,
-0.3068225681781769,
-0.33205386996269226,
0.21578800678253174,
-0.06859901547431946,
-0.22990946471691132,
0.15057143568992615,
0.03129762038588524,
-0.4248002767562866,
-0.18708747625350952,
0.013183712027966976,
0.2676139771938324,
-0.2912808656692505,
-0.05423658713698387,
0.2158079594373703,
-0.14263039827346802,
-0.10676725953817368,
-0.06534386426210403,
-0.1673758327960968,
-0.008891976438462734,
-0.06398886442184448,
0.17528530955314636,
0.6171444654464722,
-0.2993868887424469,
-0.448497474193573,
-0.10517013818025589,
0.007077147718518972,
-0.2436884641647339,
0.13650931417942047,
0.18089617788791656,
-0.16998808085918427,
-0.08132834732532501,
0.2713303864002228,
0.20832891762256622,
-0.20130346715450287,
-0.04159390553832054,
0.06189645454287529,
-0.24561026692390442,
0.297909677028656,
0.26281994581222534,
-0.04928107559680939,
0.06611529737710953,
0.5254903435707092,
-0.24695853888988495,
0.28203651309013367,
-0.2676798701286316,
0.1880795657634735,
0.06455229222774506,
0.5572715997695923,
0.012013881467282772,
-0.011280974373221397,
-0.24864070117473602,
0.13153085112571716,
-0.18736034631729126,
-0.07154084742069244,
0.11760018020868301,
0.19657163321971893,
-0.16081254184246063,
-0.10403387248516083,
-0.09470269829034805,
-0.27384719252586365,
0.09865359216928482,
0.21302995085716248,
0.11813431233167648,
-0.11090549826622009,
-0.1933421939611435,
-0.28934651613235474,
0.48524391651153564,
0.027049317955970764,
-0.06879384815692902,
0.08268119394779205,
0.14782673120498657,
0.11134278774261475,
-0.34001871943473816,
0.05044184997677803,
0.3334543704986572,
0.11331750452518463,
-0.1535303145647049,
0.022048844024538994,
0.3427616357803345,
0.055426184087991714,
0.0703011080622673,
0.09831689298152924,
0.14870765805244446,
0.23628643155097961,
-0.06467804312705994,
0.1659441590309143,
0.0075767613016068935,
0.017651056870818138,
0.055655695497989655,
0.04606739431619644,
0.14265112578868866,
0.16449497640132904,
-0.20721183717250824,
-0.106190986931324,
-0.08497144281864166,
0.33258572220802307,
0.08937346190214157,
0.26221320033073425,
-0.13924424350261688,
0.1420632302761078,
0.07933865487575531,
0.27346906065940857,
-0.1253584772348404,
0.09920702874660492,
0.30198806524276733,
0.22849349677562714,
-0.07436195015907288,
0.1852324903011322,
-0.2647051215171814,
-0.22750745713710785,
-0.17778317630290985,
0.20554539561271667,
0.15183456242084503,
0.3155471384525299,
0.3555366098880768,
-0.002026905072852969,
0.1401987373828888,
0.08993429690599442,
-0.019109787419438362,
0.12232238799333572,
-0.09442663192749023,
0.2241058051586151,
0.18586064875125885,
0.07161170989274979,
-0.29204457998275757,
-0.35993725061416626,
-0.0827321857213974,
-0.036538608372211456,
0.2761271893978119,
-0.16159884631633759,
-0.3840983211994171,
0.04150461405515671,
0.10528592765331268,
0.1991582065820694,
0.05245877429842949,
0.12367623299360275,
-0.3027799129486084,
0.15154099464416504,
-0.24113519489765167,
0.2191837728023529,
-0.024886637926101685,
-0.23035888373851776,
0.09475579857826233,
0.03286322206258774,
0.03295222297310829,
-0.13608455657958984,
-0.023375067859888077,
-0.07795390486717224,
0.22901946306228638,
-0.06430733948945999,
0.23682332038879395,
0.2053811252117157,
-0.26196736097335815,
0.26968953013420105,
-0.29282230138778687,
-0.13611264526844025,
0.2660045623779297,
-0.12601296603679657,
0.47267529368400574,
0.15851207077503204,
0.15364979207515717,
-0.18172912299633026,
-0.15295541286468506,
0.026223458349704742,
-0.04592778906226158,
-0.23587621748447418,
-0.2553919553756714,
-0.2284800261259079,
0.009438835084438324,
0.1623377650976181,
-0.6614734530448914,
-0.1842029094696045,
-0.24772967398166656,
0.17968317866325378,
0.19273771345615387,
-0.11836466193199158,
0.01831294223666191,
0.03478798642754555,
0.2336679995059967,
-0.15316574275493622,
0.21233408153057098,
-0.43836089968681335,
-0.33103033900260925,
0.45071572065353394,
-0.29448553919792175,
-0.27439168095588684,
0.17293615639209747,
-0.21490319073200226,
0.1028427854180336,
0.24159221351146698,
-0.17532725632190704,
-0.07486658543348312,
0.07477296888828278,
0.2962733209133148,
0.04026862978935242,
-0.06567948311567307,
0.29708772897720337,
-0.04109051078557968,
-0.1350897252559662,
-0.23736649751663208,
-0.0759279876947403,
0.06138405203819275,
0.34081166982650757,
0.2632688581943512,
-0.4331500232219696,
0.4130502939224243,
-0.17396046221256256,
0.3406867980957031,
0.09291072189807892,
-0.2585780918598175,
0.2848116457462311,
-0.23970253765583038,
0.3788161873817444,
-0.031216425821185112,
-0.016897812485694885,
0.20705817639827728,
0.1593782603740692,
0.11826394498348236,
0.16650377213954926,
0.04159612953662872,
-0.41811808943748474,
-0.15576282143592834,
-0.14210018515586853,
-0.4089620113372803,
-0.006202993914484978,
-0.35998600721359253,
0.42440783977508545,
0.1867518573999405,
0.05959596484899521,
-0.13204334676265717,
-0.09816555678844452,
-0.2909415066242218,
0.05245708301663399,
0.23867985606193542,
-0.08789141476154327,
0.014018946327269077,
-0.7230602502822876,
0.03533323109149933,
-0.19170790910720825,
0.4163360595703125,
0.2210163176059723,
-0.005233786068856716,
-0.20660832524299622,
-0.05222608149051666,
-0.13178269565105438,
-0.10861197113990784,
0.32376551628112793,
-0.6500066518783569,
-0.11524976044893265,
-0.08853363990783691,
0.33795782923698425,
0.23171089589595795,
0.1741349995136261,
-0.25474005937576294,
0.022622989490628242,
0.18828441202640533,
0.322338730096817,
-0.15344560146331787,
0.20928855240345,
0.26037007570266724,
0.3226868808269501,
0.04963568225502968,
0.08289996534585953,
0.022346261888742447,
-0.43247878551483154,
-0.18866944313049316,
0.13662555813789368,
-0.08785849064588547,
0.34887176752090454,
0.5200473666191101,
-0.23304280638694763,
0.06752131134271622,
0.06313902139663696,
0.434224009513855,
0.0051796287298202515,
0.1683160811662674,
0.5596831440925598,
0.14536117017269135,
-0.006537165958434343,
-0.061872273683547974,
0.5422573685646057,
0.2873755395412445,
-0.17082753777503967,
-0.12608158588409424,
-0.028229543939232826,
-0.39923039078712463,
0.4842275083065033,
0.10770408809185028,
0.1341010481119156,
0.009638907387852669,
-0.11665899306535721,
-0.10919756442308426,
0.3380204141139984,
0.36044082045555115,
0.10885580629110336,
0.215699702501297,
-0.08011046051979065,
-0.41371315717697144,
0.1728397160768509,
-0.20662200450897217,
0.1382889747619629,
0.13073700666427612,
0.07175695896148682,
-0.06723015010356903,
-0.2490474134683609,
0.20594194531440735,
0.8748213648796082,
0.08540112525224686,
0.06519033014774323,
0.3067074120044708,
-0.385886013507843,
-0.16488373279571533,
-0.7098119854927063,
-0.05882091820240021,
-0.040039148181676865,
-0.15032033622264862,
-0.039781805127859116,
-0.0016184842679649591,
0.2241668850183487,
0.25629356503486633,
-0.009106675162911415,
0.0925157442688942,
0.06384459137916565,
-0.1571045070886612,
-0.24107374250888824,
0.005218053236603737,
-0.24924129247665405,
-0.027550537139177322,
0.02902483567595482,
0.21638460457324982,
-0.003362775081768632,
-0.2538895010948181,
-0.02696479670703411,
0.08984357118606567,
-0.22438140213489532,
-0.16989772021770477,
-0.10332094877958298,
-0.12008695304393768,
-0.3990297019481659,
-0.0752231702208519,
-0.10854197293519974,
-0.46772781014442444,
0.08143743127584457,
0.14940664172172546,
0.3204287588596344,
0.08628477156162262,
-0.06178588420152664,
0.3524240255355835,
0.0726921558380127,
-0.14972913265228271,
-0.08954942226409912,
-0.07135999947786331,
-0.15583938360214233,
-0.24263453483581543,
-0.15428347885608673,
0.2734779715538025,
-0.0035119871608912945,
-0.46523231267929077,
-0.04985285550355911,
0.02160057984292507,
-0.34738677740097046,
-0.5442654490470886,
0.04299155995249748,
0.492747962474823,
0.3754909038543701,
-0.3097894489765167,
0.138992577791214,
0.18745160102844238,
-0.19715537130832672,
-0.002472451888024807,
0.040706876665353775,
-0.2878996729850769,
-0.2999057173728943,
0.06617499887943268,
0.05056609585881233,
-0.5343962907791138,
0.331362783908844,
0.04362361133098602,
-0.24866239726543427,
-0.3380286991596222,
0.08471379429101944,
0.541205644607544,
0.09566238522529602,
-0.13294382393360138,
0.10394667088985443,
-0.17593099176883698,
-0.06614700704813004,
0.42328080534935,
-0.03897634148597717,
0.11397821456193924,
0.05211629718542099,
-0.08445890992879868,
-0.5311647057533264,
0.15690170228481293,
0.16579855978488922,
0.3650197684764862,
0.033616334199905396,
-0.11927840113639832,
-0.1315011978149414,
0.11841990053653717,
-0.395808607339859,
0.025878626853227615,
0.1444130390882492,
0.07273124903440475,
0.20967285335063934,
-0.038002341985702515,
0.15060847997665405,
0.027327384799718857,
0.20042574405670166,
-0.12023502588272095,
-0.4049583971500397,
-0.2514731287956238,
0.09141813963651657,
0.08113013952970505,
0.06568901985883713,
-0.025737471878528595,
0.1873755306005478,
-0.05206109955906868,
-0.2679266929626465,
-0.10375829041004181,
0.02885536476969719,
-0.0033861983101814985,
-0.10790875554084778,
-0.20919355750083923,
0.40069249272346497,
-0.3056938946247101,
-0.1631958782672882,
-0.010560275055468082,
0.14247502386569977,
-0.15688349306583405,
-0.12992361187934875,
0.13853780925273895,
0.13705125451087952,
-0.11789344996213913,
0.5131964683532715,
0.18115654587745667,
0.2721257209777832,
-0.10437443107366562,
0.12083472311496735,
-0.30374568700790405,
-0.10586509853601456,
0.4593438506126404,
-0.0542006716132164,
0.17738574743270874,
-0.27339258790016174,
0.22633376717567444,
-0.06623568385839462,
0.2264930009841919,
-0.2939084768295288,
-0.030236901715397835,
0.22576040029525757,
-0.18038181960582733,
0.3498421013355255,
0.20353837311267853,
0.38389402627944946,
-0.1467554271221161,
0.1858784556388855,
0.01508780661970377,
-0.020098833367228508,
-0.10124243795871735,
0.13268020749092102,
0.30835703015327454,
-0.2869231402873993,
-0.0390140637755394,
0.27160829305648804,
0.43630921840667725,
-0.10117344558238983,
0.5844151973724365,
-0.04587889090180397,
0.46902361512184143,
0.10232425481081009,
-0.07144799083471298,
0.03823866695165634,
-0.09611016511917114,
0.323541522026062,
0.014412986114621162,
-0.1514640748500824,
-0.02240931987762451,
0.47419023513793945,
0.3944191634654999,
-0.02521817572414875,
0.13518717885017395,
-0.143855482339859,
-0.12705330550670624,
-0.24625936150550842,
0.03153316676616669,
0.31695523858070374,
-0.3562973737716675,
-0.350930780172348,
-0.07306572049856186,
0.04017191752791405,
-0.2275920808315277,
-0.04015190899372101,
-0.060302846133708954,
0.07533077895641327,
0.22777701914310455,
0.3872579038143158,
0.1119014322757721,
-0.2743828594684601,
-0.010966505855321884,
0.11171640455722809,
0.16604700684547424,
-0.13675610721111298,
0.4400676488876343,
0.17995426058769226,
-0.04153093323111534,
-0.08415797352790833,
0.0617075115442276,
0.3810855448246002,
0.2305614948272705,
-0.23971018195152283,
-0.14138388633728027,
0.05269582197070122,
0.2495489865541458,
0.31984955072402954,
0.20167675614356995,
0.18625685572624207,
-0.23129189014434814,
-0.07405233383178711,
-0.07650354504585266,
-0.023767132312059402,
-0.2602355182170868,
-0.21464157104492188,
0.049993716180324554,
-0.09347596019506454,
-0.2221408635377884,
-0.1631658524274826,
-0.1751820147037506,
0.004120519384741783,
0.3845089375972748,
-0.04280943423509598,
-0.022476911544799805,
-0.009366413578391075,
0.107028529047966,
-0.059882596135139465,
0.03774596005678177,
0.1723247468471527,
0.1556916981935501,
-0.10812888294458389,
-0.2949647903442383,
-0.5281619429588318,
0.06030925363302231,
-0.03855051100254059,
0.048767734318971634,
-0.3577788472175598,
0.05365045741200447,
0.5251667499542236,
0.20543591678142548,
0.5771826505661011,
0.02912706695497036,
0.2299996018409729,
0.04796980321407318,
-0.17901372909545898,
-0.130630224943161,
0.3718004524707794,
0.33667436242103577,
0.08808853477239609,
-0.13241198658943176,
0.003726137336343527,
0.3852563500404358,
0.1792706549167633,
-0.1459435075521469,
-0.3044588565826416,
-0.25224271416664124,
-0.4513716399669647,
0.24383366107940674,
-0.24661649763584137,
0.6189831495285034,
-0.3694009780883789,
0.20609384775161743,
0.06249738112092018,
-0.26672109961509705,
0.029876865446567535,
0.08156437426805496,
0.1317453533411026,
0.17411601543426514,
-0.13840162754058838,
0.16168901324272156,
0.0954853817820549,
0.3157786428928375,
0.0073955487459897995,
-0.06469790637493134,
-0.06509488075971603,
0.24147462844848633,
-0.41340959072113037,
0.012325061485171318,
0.016848130151629448,
-0.11757731437683105,
0.011381362564861774,
-0.10829602181911469,
0.18530969321727753,
-0.17891211807727814,
0.40406548976898193,
-0.21349982917308807,
-0.2744032144546509,
-0.6737647652626038,
0.07887601107358932,
0.35142841935157776,
0.04922036454081535,
-0.42964789271354675,
0.057581234723329544,
0.37188056111335754,
-0.0777001678943634,
-0.15873804688453674,
0.367080956697464,
-0.17581768333911896,
-0.20947128534317017,
-0.08454962819814682,
0.35786962509155273,
0.0618404895067215,
0.001413242775015533,
-0.3085511028766632,
-0.2097565084695816
] |
https://github.com/huggingface/datasets/issues/1831
|
Some question about raw dataset download info in the project .
|
Hi ! The `dl_manager` is a `DownloadManager` object and is responsible for downloading the raw data files.
It is used by dataset builders in their `_split_generators` method to download the raw data files that are necessary to build the datasets splits.
The `Conll2003` class is a dataset builder, and so you can download all the raw data files by calling `_split_generators` with a download manager:
```python
from datasets import DownloadManager
from datasets.load import import_main_class
conll2003_builder = import_main_class(...)
dl_manager = DownloadManager()
splis_generators = conll2003_builder._split_generators(dl_manager)
```
Then you can see what files have been downloaded with
```python
dl_manager.get_recorded_sizes_checksums()
```
It returns a dictionary with the format {url: {num_bytes: int, checksum: str}}
Then you can get the actual location of the downloaded files with
```python
from datasets import cached_path
local_path_to_downloaded_file = cached_path(url)
```
------------------
Note that you can also get the urls from the Dataset object:
```python
from datasets import load_dataset
conll2003 = load_dataset("conll2003")
print(conll2003["train"].download_checksums)
```
It returns the same dictionary with the format {url: {num_bytes: int, checksum: str}}
|
Hi , i review the code in
https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py
in the _split_generators function is the truly logic of download raw datasets with dl_manager
and use Conll2003 cls by use import_main_class in load_dataset function
My question is that , with this logic it seems that i can not have the raw dataset download location
in variable in downloaded_files in _split_generators.
If someone also want use huggingface datasets as raw dataset downloader,
how can he retrieve the raw dataset download path from attributes in
datasets.dataset_dict.DatasetDict ?
| 166 |
Some question about raw dataset download info in the project .
|
[
-0.2805598974227905,
-0.09801923483610153,
-0.32276931405067444,
0.3209449350833893,
-0.03168478235602379,
-0.044705189764499664,
0.001494124298915267,
0.1303366869688034,
-0.14886939525604248,
0.18517647683620453,
-0.10466312617063522,
0.04543059691786766,
0.1184757724404335,
0.513159453868866,
0.1412387490272522,
-0.04158185422420502,
-0.018231792375445366,
0.24201658368110657,
-0.3308548927307129,
-0.3252866268157959,
-0.23969578742980957,
0.06328020989894867,
-0.17202197015285492,
0.11039740592241287,
0.08792047202587128,
-0.004498188383877277,
0.008089949376881123,
0.032669734209775925,
-0.5834207534790039,
-0.4136895537376404,
0.01798921264708042,
0.2539888918399811,
0.1767929047346115,
-0.06990727037191391,
-0.0001036755638779141,
0.029640594497323036,
0.2894303798675537,
-0.11960214376449585,
-0.29232096672058105,
0.1631821095943451,
-0.6452885866165161,
-0.10084418952465057,
-0.15593422949314117,
-0.440616250038147,
0.05677521228790283,
-0.20565326511859894,
0.11892994493246078,
0.04117847979068756,
0.20945750176906586,
0.10312474519014359,
0.3797271251678467,
0.2073730230331421,
0.11140753328800201,
-0.028139764443039894,
0.2262529581785202,
0.20402929186820984,
0.08515273034572601,
0.0032052684109658003,
0.1500379592180252,
0.6721698641777039,
0.15682917833328247,
0.38113531470298767,
0.36056438088417053,
0.14358897507190704,
0.10532519966363907,
0.07104021310806274,
0.10487388074398041,
-0.4946599304676056,
0.27020758390426636,
0.28863388299942017,
0.7208200097084045,
-0.03494996204972267,
-0.32100409269332886,
0.19187943637371063,
-0.14093071222305298,
-0.504451334476471,
-0.07815570384263992,
0.44219285249710083,
-0.17821857333183289,
0.3116708993911743,
-0.45127445459365845,
-0.35995838046073914,
-0.25458845496177673,
-0.12922440469264984,
0.11863674968481064,
0.22873738408088684,
-0.26792237162590027,
0.08228060603141785,
-0.17257151007652283,
0.216462180018425,
0.27776384353637695,
-0.39806103706359863,
-0.06943485140800476,
0.11326941847801208,
0.15687687695026398,
-0.3920624852180481,
-0.3192318081855774,
0.13902929425239563,
0.252677857875824,
-0.11343064904212952,
0.08225914090871811,
-0.1540018767118454,
0.1095278188586235,
0.07520480453968048,
0.5236120820045471,
-0.3108225166797638,
0.13854774832725525,
0.001779066980816424,
0.2834778428077698,
-0.23332008719444275,
0.06351927667856216,
-0.08058091998100281,
-0.04274691268801689,
0.1960744559764862,
-0.3287509083747864,
0.06773319840431213,
0.08496134728193283,
-0.23275570571422577,
-0.09324779361486435,
-0.04952012747526169,
0.13128238916397095,
-0.2378990799188614,
-0.1688210368156433,
0.13492457568645477,
-0.14794190227985382,
-0.24201753735542297,
-0.2349170446395874,
-0.13524186611175537,
0.2680392265319824,
-0.46481427550315857,
-0.2336670160293579,
-0.1332598328590393,
-0.08689229190349579,
-0.19759804010391235,
-0.12784448266029358,
0.03272627294063568,
0.3951755464076996,
0.009014664217829704,
-0.18720203638076782,
0.06585054099559784,
0.3222729563713074,
-0.15740138292312622,
0.14562788605690002,
0.3822474777698517,
0.03870290145277977,
0.14516903460025787,
-0.2938928008079529,
0.2107231169939041,
-0.13253292441368103,
0.2304162234067917,
-0.4109514653682709,
-0.19442445039749146,
-0.12633934617042542,
0.3131064772605896,
-0.016581939533352852,
0.10555565357208252,
-0.14671868085861206,
0.1369357407093048,
0.029764598235487938,
-0.018232544884085655,
0.09820879250764847,
0.09006930887699127,
-0.20616672933101654,
-0.16924992203712463,
0.11932888627052307,
0.0880652666091919,
-0.22255858778953552,
-0.00921129621565342,
0.12428846955299377,
-0.5760321021080017,
0.015058811753988266,
0.13805840909481049,
-0.40079623460769653,
0.39770519733428955,
-0.2945261597633362,
0.17771153151988983,
0.7162039279937744,
-0.18020837008953094,
-0.2672034800052643,
0.4470158815383911,
0.11439488083124161,
-0.4106484055519104,
0.23383262753486633,
0.26622262597084045,
0.4125642478466034,
-0.06693370640277863,
-0.17932654917240143,
0.3388535678386688,
0.016101030632853508,
0.053821779787540436,
-0.011294879950582981,
-0.24241064488887787,
-0.16503645479679108,
-0.17861047387123108,
-0.09296537935733795,
0.29342296719551086,
0.19146206974983215,
-0.22453026473522186,
0.4002234637737274,
0.020792169496417046,
0.22613584995269775,
0.36018961668014526,
-0.012199749238789082,
-0.20550496876239777,
0.02232431061565876,
0.1279297173023224,
-0.17524033784866333,
-0.015224053524434566,
-0.42698803544044495,
-0.12747538089752197,
0.013126043602824211,
-0.26666831970214844,
-0.32296279072761536,
0.019333001226186752,
-0.0010816778521984816,
-0.21937082707881927,
0.2315307855606079,
0.03777940571308136,
0.19610542058944702,
-0.1968136727809906,
-0.213314488530159,
0.25138309597969055,
-0.292310506105423,
-0.06244423985481262,
-0.04687322676181793,
0.13912881910800934,
-0.07799743115901947,
0.03151809424161911,
0.2057933360338211,
-0.15104414522647858,
-0.00910243671387434,
-0.16629941761493683,
-0.04446029290556908,
0.28482988476753235,
0.018158791586756706,
0.09513022005558014,
0.5243695378303528,
0.29359903931617737,
0.12098173052072525,
-0.16507257521152496,
0.20186126232147217,
-0.04635562375187874,
0.21416690945625305,
0.1663430780172348,
-0.018294014036655426,
0.2870566248893738,
0.017314543947577477,
-0.09545928984880447,
0.17566543817520142,
-0.17904558777809143,
0.3407214283943176,
-0.06798655539751053,
-0.013319813646376133,
-0.09031060338020325,
-0.2011510133743286,
0.4571353793144226,
-0.001192552619613707,
0.12017403542995453,
-0.2819548547267914,
0.08443482965230942,
0.5737931132316589,
-0.15330864489078522,
-0.21134053170681,
0.030770812183618546,
-0.2598513960838318,
-0.3371325731277466,
0.29635271430015564,
0.2895720899105072,
0.42273861169815063,
0.25502678751945496,
0.24886104464530945,
0.006826833821833134,
0.32059773802757263,
-0.12046238780021667,
0.2556690275669098,
0.04765591770410538,
-0.14208459854125977,
0.014279545284807682,
-0.349710613489151,
-0.14793170988559723,
-0.12594513595104218,
-0.004027263261377811,
0.23148031532764435,
0.05010165646672249,
-0.0525953583419323,
-0.11145404726266861,
0.03909808024764061,
-0.4801391065120697,
-0.024408457800745964,
0.23757730424404144,
0.16369186341762543,
-0.12297569960355759,
0.08274399489164352,
-0.1907869577407837,
-0.17373871803283691,
0.14100797474384308,
-0.016849424690008163,
0.15865111351013184,
-0.08517833054065704,
0.322904497385025,
-0.12376020848751068,
-0.19894562661647797,
-0.11949236690998077,
0.234893798828125,
-0.06441213190555573,
0.04837225005030632,
0.3213335871696472,
-0.5153055787086487,
0.2209835946559906,
-0.4046984314918518,
0.043813638389110565,
0.395546019077301,
0.09710992127656937,
-0.10189954936504364,
0.010126788169145584,
0.3022068738937378,
0.005021833814680576,
0.021818162873387337,
-0.09300829470157623,
-0.18761470913887024,
-0.2450060248374939,
-0.42967256903648376,
0.026399215683341026,
-0.21749641001224518,
-0.10556584596633911,
-0.4233989417552948,
-0.46714046597480774,
-0.05294663831591606,
0.13622501492500305,
0.11275915801525116,
0.3227630853652954,
-0.19298528134822845,
-0.03137565031647682,
0.03368901088833809,
-0.12250390648841858,
0.07294350117444992,
-0.3983849883079529,
-0.6411249041557312,
0.19704248011112213,
-0.29704540967941284,
-0.4222319424152374,
0.08189601451158524,
-0.011339428834617138,
0.15572915971279144,
0.24690046906471252,
-0.23902097344398499,
0.10755151510238647,
-0.01382456999272108,
0.2445145696401596,
0.028267964720726013,
0.28734564781188965,
0.1881217211484909,
-0.22042624652385712,
-0.21810750663280487,
-0.21744322776794434,
0.012772014364600182,
-0.025605935603380203,
-0.08750592172145844,
0.0696454793214798,
0.1177988350391388,
-0.10716686397790909,
-0.11203056573867798,
0.8044877648353577,
0.07009647786617279,
-0.3008396029472351,
0.10693107545375824,
0.03227810189127922,
0.4311591386795044,
0.1090940535068512,
0.18240636587142944,
0.13692142069339752,
0.05537774786353111,
0.03880230337381363,
0.22544090449810028,
0.005765304435044527,
-0.11720766872167587,
-0.08399857580661774,
0.012170524336397648,
-0.42676272988319397,
0.004691020585596561,
-0.1922275573015213,
0.5234455466270447,
0.25837624073028564,
0.20524102449417114,
-0.003799973288550973,
0.06032358855009079,
-0.05412748456001282,
0.04708678275346756,
0.2806786000728607,
0.13094770908355713,
-0.040536750108003616,
-0.3984523117542267,
0.09031663835048676,
-0.04949108138680458,
0.09461106359958649,
0.16235443949699402,
-0.06499984860420227,
0.02954011596739292,
0.1811576932668686,
0.2653326094150543,
0.1328468918800354,
0.41683077812194824,
-0.3177931606769562,
0.017871873453259468,
-0.16205371916294098,
0.00647042877972126,
0.12178120762109756,
0.0341392420232296,
-0.2181628942489624,
0.32838311791419983,
0.46068161725997925,
0.12523740530014038,
-0.2931475341320038,
-0.23592577874660492,
0.2678714394569397,
0.16209931671619415,
-0.18113115429878235,
-0.1022864356637001,
-0.004956737160682678,
-0.251701295375824,
-0.18587324023246765,
-0.1567380428314209,
0.09823932498693466,
-0.21361246705055237,
0.09238336980342865,
-0.15230326354503632,
-0.029451781883835793,
0.19073395431041718,
-0.17097073793411255,
0.053559500724077225,
0.07279801368713379,
0.11436684429645538,
-0.0021043235901743174,
0.03615467995405197,
0.15233510732650757,
0.2935258746147156,
0.3454468846321106,
-0.22810596227645874,
0.05901285260915756,
0.22974373400211334,
-0.31542012095451355,
0.34500229358673096,
0.25641512870788574,
-0.06745106726884842,
-0.032209888100624084,
0.008989274501800537,
-0.1081862673163414,
-0.1527983695268631,
0.15141041576862335,
0.23199620842933655,
-0.020925462245941162,
-0.09342149645090103,
-0.5459656119346619,
0.33394306898117065,
-0.21873684227466583,
-0.38485896587371826,
0.2194061428308487,
-0.16944271326065063,
-0.07267405092716217,
-0.19096559286117554,
0.02255682460963726,
1.0649367570877075,
0.07945999503135681,
0.1126924380660057,
-0.12726445496082306,
-0.5455060005187988,
0.42408913373947144,
-0.2379041165113449,
-0.22364169359207153,
-0.3344690501689911,
-0.00815577246248722,
-0.12887132167816162,
-0.12167663872241974,
0.1522793173789978,
0.06273889541625977,
-0.08539183437824249,
0.20824557542800903,
0.10725896805524826,
0.1045088917016983,
0.020731912925839424,
0.602599024772644,
0.15047478675842285,
0.04356484115123749,
0.060208454728126526,
0.18800078332424164,
0.055274832993745804,
0.24239082634449005,
-0.13020245730876923,
-0.31938645243644714,
-0.12749606370925903,
0.03380492329597473,
-0.01160829421132803,
-0.0019655635114759207,
-0.08381276577711105,
0.10456161946058273,
-0.13983650505542755,
-0.20526082813739777,
-0.25242698192596436,
0.42440110445022583,
0.15970003604888916,
0.1887817531824112,
-0.24715064465999603,
0.11461276561021805,
-0.046732112765312195,
0.0027094401884824038,
0.029313184320926666,
0.2805415093898773,
-0.1352427452802658,
-0.29044294357299805,
-0.1281052827835083,
0.23914332687854767,
-0.1404992789030075,
-0.07304520905017853,
0.04191138222813606,
-0.10703638195991516,
0.10260847210884094,
-0.3164103329181671,
0.01924845203757286,
0.02499873749911785,
-0.3220735788345337,
0.06414845585823059,
0.21163833141326904,
0.21712104976177216,
-0.16343529522418976,
0.10807251185178757,
0.17635194957256317,
-0.34158840775489807,
-0.3512910306453705,
0.3709658086299896,
0.21752844750881195,
0.02440500445663929,
0.04613547399640083,
-0.4796413779258728,
-0.22884011268615723,
-0.3340003788471222,
0.2507474720478058,
-0.15752533078193665,
-0.24743036925792694,
0.0797547698020935,
0.08982030302286148,
0.1266365647315979,
-0.3757549524307251,
0.2513309121131897,
0.05919154733419418,
0.11650515347719193,
-0.11662673205137253,
-0.2816828787326813,
-0.3444786071777344,
0.13411332666873932,
-0.12307872623205185,
0.2031838446855545,
-0.059698980301618576,
-0.05253053829073906,
0.26356399059295654,
-0.04898117110133171,
-0.4707752764225006,
0.015275109559297562,
-0.03505711257457733,
0.06840353459119797,
0.15787795186042786,
0.08290908485651016,
-0.0023756716400384903,
-0.023143060505390167,
0.17094501852989197,
-0.16715870797634125,
-0.5150106549263,
-0.32075995206832886,
-0.027311300858855247,
0.10204475373029709,
-0.09216702729463577,
-0.21908526122570038,
-0.003802021499723196,
-0.18645669519901276,
-0.2553768754005432,
0.2529633641242981,
0.027548590674996376,
-0.023392057046294212,
0.08757782727479935,
0.24039015173912048,
0.2140411138534546,
0.12707571685314178,
-0.5350423455238342,
0.32286784052848816,
-0.0651806890964508,
0.5515998005867004,
-0.195905864238739,
0.28612959384918213,
-0.28418630361557007,
-0.1635005623102188,
0.010682698339223862,
-0.10316743701696396,
0.10033627599477768,
-0.08600300550460815,
0.4067014753818512,
-0.026513002812862396,
0.25668865442276,
0.026692261919379234,
0.10860822349786758,
0.38946786522865295,
-0.34689080715179443,
-0.16928315162658691,
-0.023515896871685982,
0.29261547327041626,
-0.10690803080797195,
0.018466338515281677,
-0.03806719183921814,
-0.14622311294078827,
-0.0024820768740028143,
0.03468934819102287,
0.5756387114524841,
-0.04438536986708641,
0.27637284994125366,
-0.11419173330068588,
0.19932329654693604,
0.13013562560081482,
-0.16177062690258026,
0.4860030710697174,
0.017657291144132614,
0.35421380400657654,
0.05232195928692818,
0.5286574959754944,
-0.11350914090871811,
0.15716353058815002,
-0.1838216930627823,
-0.028092147782444954,
0.3414258360862732,
0.047881223261356354,
0.056072067469358444,
-0.08962402492761612,
0.33629629015922546,
0.2946261763572693,
-0.08705347776412964,
0.1781911849975586,
0.13903623819351196,
0.07989116758108139,
0.10157067328691483,
0.07691311836242676,
-0.12268605828285217,
0.0828782320022583,
-0.09577442705631256,
-0.05034918710589409,
-0.3750808835029602,
-0.2274911105632782,
-0.0683983638882637,
0.11346498131752014,
-0.13789544999599457,
-0.0746934786438942,
0.1891644448041916,
-0.11839499324560165,
0.00918962899595499,
0.14426884055137634,
0.2761463522911072,
-0.029203997924923897,
-0.04984170198440552,
-0.13364283740520477,
0.22189006209373474,
-0.17010681331157684,
0.35383719205856323,
0.38514670729637146,
0.40343353152275085,
0.00745419692248106,
0.07475513964891434,
0.04436720162630081,
-0.19695016741752625,
0.42568981647491455,
-0.25523248314857483,
-0.1504456102848053,
0.11979631334543228,
0.2963642477989197,
-0.004546987824141979,
0.3164147734642029,
0.1822192668914795,
-0.17699111998081207,
0.11348334699869156,
0.09795057773590088,
-0.03329172357916832,
-0.0006225513061508536,
0.17045660316944122,
0.04764271527528763,
-0.30605655908584595,
0.11040603369474411,
-0.22476790845394135,
-0.31432002782821655,
-0.15534473955631256,
0.20560890436172485,
-0.24044491350650787,
0.0737062469124794,
-0.0057804821990430355,
0.1295129358768463,
-0.31138500571250916,
0.46273958683013916,
0.22496731579303741,
0.23828858137130737,
-0.3026929497718811,
-0.19107267260551453,
-0.3253970444202423,
0.09065181016921997,
0.14594095945358276,
-0.1692018210887909,
0.032183948904275894,
0.3537217676639557,
0.11461369693279266,
0.4964810311794281,
0.1751507967710495,
-0.13466483354568481,
-0.20029683411121368,
0.06315220892429352,
-0.29855939745903015,
-0.2872382402420044,
-0.08128468692302704,
0.4580511450767517,
0.09624259173870087,
-0.1340411901473999,
0.4584014117717743,
-0.20921224355697632,
0.1653910130262375,
-0.0942063108086586,
-0.058574941009283066,
0.258689820766449,
-0.03853308781981468,
0.2270074188709259,
-0.09708307683467865,
0.3727934956550598,
-0.28771114349365234,
-0.12759996950626373,
0.3427272140979767,
0.001309896819293499,
-0.11434634774923325,
0.18136808276176453,
0.07329137623310089,
-0.25954264402389526,
-0.1334352046251297,
0.12633754312992096,
-0.053252894431352615,
0.1774277687072754,
-0.024947967380285263,
0.18508093059062958,
0.044899266213178635,
-0.06426718831062317,
-0.19709427654743195,
-0.05584343895316124,
0.2796778082847595,
-0.056967418640851974,
-0.19294953346252441,
-0.1710069179534912,
-0.2457156628370285,
0.013700341805815697,
0.4553624093532562,
-0.010560215450823307,
0.04918619245290756,
-0.15994693338871002,
0.314818799495697,
0.2734244465827942,
0.09176819026470184,
-0.30662450194358826,
0.3136313855648041,
0.5716531872749329,
-0.24275876581668854,
-0.1982024908065796,
0.18663008511066437,
0.05613573268055916,
0.021846411749720573,
-0.07763957232236862,
0.5426533222198486,
-0.003519324352964759,
-0.4427117705345154,
-0.2567015290260315,
-0.19919271767139435
] |
https://github.com/huggingface/datasets/issues/1831
|
Some question about raw dataset download info in the project .
|
I am afraid that there is not a very straightforward way to get that location.
Another option, from _split_generators would be to use:
- `dl_manager._download_config.cache_dir` to get the directory where all the raw downloaded files are:
```python
download_dir = dl_manager._download_config.cache_dir
```
- the function `datasets.utils.file_utils.hash_url_to_filename` to get the filenames of the raw downloaded files:
```python
filenames = [hash_url_to_filename(url) for url in urls_to_download.values()]
```
Therefore the complete path to the raw downloaded files would be the join of both:
```python
downloaded_paths = [os.path.join(download_dir, filename) for filename in filenames]
```
Maybe it would be interesting to make these paths accessible more easily. I could work on this. What do you think, @lhoestq ?
|
Hi , i review the code in
https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py
in the _split_generators function is the truly logic of download raw datasets with dl_manager
and use Conll2003 cls by use import_main_class in load_dataset function
My question is that , with this logic it seems that i can not have the raw dataset download location
in variable in downloaded_files in _split_generators.
If someone also want use huggingface datasets as raw dataset downloader,
how can he retrieve the raw dataset download path from attributes in
datasets.dataset_dict.DatasetDict ?
| 111 |
Some question about raw dataset download info in the project .
|
[
-0.2805598974227905,
-0.09801923483610153,
-0.32276931405067444,
0.3209449350833893,
-0.03168478235602379,
-0.044705189764499664,
0.001494124298915267,
0.1303366869688034,
-0.14886939525604248,
0.18517647683620453,
-0.10466312617063522,
0.04543059691786766,
0.1184757724404335,
0.513159453868866,
0.1412387490272522,
-0.04158185422420502,
-0.018231792375445366,
0.24201658368110657,
-0.3308548927307129,
-0.3252866268157959,
-0.23969578742980957,
0.06328020989894867,
-0.17202197015285492,
0.11039740592241287,
0.08792047202587128,
-0.004498188383877277,
0.008089949376881123,
0.032669734209775925,
-0.5834207534790039,
-0.4136895537376404,
0.01798921264708042,
0.2539888918399811,
0.1767929047346115,
-0.06990727037191391,
-0.0001036755638779141,
0.029640594497323036,
0.2894303798675537,
-0.11960214376449585,
-0.29232096672058105,
0.1631821095943451,
-0.6452885866165161,
-0.10084418952465057,
-0.15593422949314117,
-0.440616250038147,
0.05677521228790283,
-0.20565326511859894,
0.11892994493246078,
0.04117847979068756,
0.20945750176906586,
0.10312474519014359,
0.3797271251678467,
0.2073730230331421,
0.11140753328800201,
-0.028139764443039894,
0.2262529581785202,
0.20402929186820984,
0.08515273034572601,
0.0032052684109658003,
0.1500379592180252,
0.6721698641777039,
0.15682917833328247,
0.38113531470298767,
0.36056438088417053,
0.14358897507190704,
0.10532519966363907,
0.07104021310806274,
0.10487388074398041,
-0.4946599304676056,
0.27020758390426636,
0.28863388299942017,
0.7208200097084045,
-0.03494996204972267,
-0.32100409269332886,
0.19187943637371063,
-0.14093071222305298,
-0.504451334476471,
-0.07815570384263992,
0.44219285249710083,
-0.17821857333183289,
0.3116708993911743,
-0.45127445459365845,
-0.35995838046073914,
-0.25458845496177673,
-0.12922440469264984,
0.11863674968481064,
0.22873738408088684,
-0.26792237162590027,
0.08228060603141785,
-0.17257151007652283,
0.216462180018425,
0.27776384353637695,
-0.39806103706359863,
-0.06943485140800476,
0.11326941847801208,
0.15687687695026398,
-0.3920624852180481,
-0.3192318081855774,
0.13902929425239563,
0.252677857875824,
-0.11343064904212952,
0.08225914090871811,
-0.1540018767118454,
0.1095278188586235,
0.07520480453968048,
0.5236120820045471,
-0.3108225166797638,
0.13854774832725525,
0.001779066980816424,
0.2834778428077698,
-0.23332008719444275,
0.06351927667856216,
-0.08058091998100281,
-0.04274691268801689,
0.1960744559764862,
-0.3287509083747864,
0.06773319840431213,
0.08496134728193283,
-0.23275570571422577,
-0.09324779361486435,
-0.04952012747526169,
0.13128238916397095,
-0.2378990799188614,
-0.1688210368156433,
0.13492457568645477,
-0.14794190227985382,
-0.24201753735542297,
-0.2349170446395874,
-0.13524186611175537,
0.2680392265319824,
-0.46481427550315857,
-0.2336670160293579,
-0.1332598328590393,
-0.08689229190349579,
-0.19759804010391235,
-0.12784448266029358,
0.03272627294063568,
0.3951755464076996,
0.009014664217829704,
-0.18720203638076782,
0.06585054099559784,
0.3222729563713074,
-0.15740138292312622,
0.14562788605690002,
0.3822474777698517,
0.03870290145277977,
0.14516903460025787,
-0.2938928008079529,
0.2107231169939041,
-0.13253292441368103,
0.2304162234067917,
-0.4109514653682709,
-0.19442445039749146,
-0.12633934617042542,
0.3131064772605896,
-0.016581939533352852,
0.10555565357208252,
-0.14671868085861206,
0.1369357407093048,
0.029764598235487938,
-0.018232544884085655,
0.09820879250764847,
0.09006930887699127,
-0.20616672933101654,
-0.16924992203712463,
0.11932888627052307,
0.0880652666091919,
-0.22255858778953552,
-0.00921129621565342,
0.12428846955299377,
-0.5760321021080017,
0.015058811753988266,
0.13805840909481049,
-0.40079623460769653,
0.39770519733428955,
-0.2945261597633362,
0.17771153151988983,
0.7162039279937744,
-0.18020837008953094,
-0.2672034800052643,
0.4470158815383911,
0.11439488083124161,
-0.4106484055519104,
0.23383262753486633,
0.26622262597084045,
0.4125642478466034,
-0.06693370640277863,
-0.17932654917240143,
0.3388535678386688,
0.016101030632853508,
0.053821779787540436,
-0.011294879950582981,
-0.24241064488887787,
-0.16503645479679108,
-0.17861047387123108,
-0.09296537935733795,
0.29342296719551086,
0.19146206974983215,
-0.22453026473522186,
0.4002234637737274,
0.020792169496417046,
0.22613584995269775,
0.36018961668014526,
-0.012199749238789082,
-0.20550496876239777,
0.02232431061565876,
0.1279297173023224,
-0.17524033784866333,
-0.015224053524434566,
-0.42698803544044495,
-0.12747538089752197,
0.013126043602824211,
-0.26666831970214844,
-0.32296279072761536,
0.019333001226186752,
-0.0010816778521984816,
-0.21937082707881927,
0.2315307855606079,
0.03777940571308136,
0.19610542058944702,
-0.1968136727809906,
-0.213314488530159,
0.25138309597969055,
-0.292310506105423,
-0.06244423985481262,
-0.04687322676181793,
0.13912881910800934,
-0.07799743115901947,
0.03151809424161911,
0.2057933360338211,
-0.15104414522647858,
-0.00910243671387434,
-0.16629941761493683,
-0.04446029290556908,
0.28482988476753235,
0.018158791586756706,
0.09513022005558014,
0.5243695378303528,
0.29359903931617737,
0.12098173052072525,
-0.16507257521152496,
0.20186126232147217,
-0.04635562375187874,
0.21416690945625305,
0.1663430780172348,
-0.018294014036655426,
0.2870566248893738,
0.017314543947577477,
-0.09545928984880447,
0.17566543817520142,
-0.17904558777809143,
0.3407214283943176,
-0.06798655539751053,
-0.013319813646376133,
-0.09031060338020325,
-0.2011510133743286,
0.4571353793144226,
-0.001192552619613707,
0.12017403542995453,
-0.2819548547267914,
0.08443482965230942,
0.5737931132316589,
-0.15330864489078522,
-0.21134053170681,
0.030770812183618546,
-0.2598513960838318,
-0.3371325731277466,
0.29635271430015564,
0.2895720899105072,
0.42273861169815063,
0.25502678751945496,
0.24886104464530945,
0.006826833821833134,
0.32059773802757263,
-0.12046238780021667,
0.2556690275669098,
0.04765591770410538,
-0.14208459854125977,
0.014279545284807682,
-0.349710613489151,
-0.14793170988559723,
-0.12594513595104218,
-0.004027263261377811,
0.23148031532764435,
0.05010165646672249,
-0.0525953583419323,
-0.11145404726266861,
0.03909808024764061,
-0.4801391065120697,
-0.024408457800745964,
0.23757730424404144,
0.16369186341762543,
-0.12297569960355759,
0.08274399489164352,
-0.1907869577407837,
-0.17373871803283691,
0.14100797474384308,
-0.016849424690008163,
0.15865111351013184,
-0.08517833054065704,
0.322904497385025,
-0.12376020848751068,
-0.19894562661647797,
-0.11949236690998077,
0.234893798828125,
-0.06441213190555573,
0.04837225005030632,
0.3213335871696472,
-0.5153055787086487,
0.2209835946559906,
-0.4046984314918518,
0.043813638389110565,
0.395546019077301,
0.09710992127656937,
-0.10189954936504364,
0.010126788169145584,
0.3022068738937378,
0.005021833814680576,
0.021818162873387337,
-0.09300829470157623,
-0.18761470913887024,
-0.2450060248374939,
-0.42967256903648376,
0.026399215683341026,
-0.21749641001224518,
-0.10556584596633911,
-0.4233989417552948,
-0.46714046597480774,
-0.05294663831591606,
0.13622501492500305,
0.11275915801525116,
0.3227630853652954,
-0.19298528134822845,
-0.03137565031647682,
0.03368901088833809,
-0.12250390648841858,
0.07294350117444992,
-0.3983849883079529,
-0.6411249041557312,
0.19704248011112213,
-0.29704540967941284,
-0.4222319424152374,
0.08189601451158524,
-0.011339428834617138,
0.15572915971279144,
0.24690046906471252,
-0.23902097344398499,
0.10755151510238647,
-0.01382456999272108,
0.2445145696401596,
0.028267964720726013,
0.28734564781188965,
0.1881217211484909,
-0.22042624652385712,
-0.21810750663280487,
-0.21744322776794434,
0.012772014364600182,
-0.025605935603380203,
-0.08750592172145844,
0.0696454793214798,
0.1177988350391388,
-0.10716686397790909,
-0.11203056573867798,
0.8044877648353577,
0.07009647786617279,
-0.3008396029472351,
0.10693107545375824,
0.03227810189127922,
0.4311591386795044,
0.1090940535068512,
0.18240636587142944,
0.13692142069339752,
0.05537774786353111,
0.03880230337381363,
0.22544090449810028,
0.005765304435044527,
-0.11720766872167587,
-0.08399857580661774,
0.012170524336397648,
-0.42676272988319397,
0.004691020585596561,
-0.1922275573015213,
0.5234455466270447,
0.25837624073028564,
0.20524102449417114,
-0.003799973288550973,
0.06032358855009079,
-0.05412748456001282,
0.04708678275346756,
0.2806786000728607,
0.13094770908355713,
-0.040536750108003616,
-0.3984523117542267,
0.09031663835048676,
-0.04949108138680458,
0.09461106359958649,
0.16235443949699402,
-0.06499984860420227,
0.02954011596739292,
0.1811576932668686,
0.2653326094150543,
0.1328468918800354,
0.41683077812194824,
-0.3177931606769562,
0.017871873453259468,
-0.16205371916294098,
0.00647042877972126,
0.12178120762109756,
0.0341392420232296,
-0.2181628942489624,
0.32838311791419983,
0.46068161725997925,
0.12523740530014038,
-0.2931475341320038,
-0.23592577874660492,
0.2678714394569397,
0.16209931671619415,
-0.18113115429878235,
-0.1022864356637001,
-0.004956737160682678,
-0.251701295375824,
-0.18587324023246765,
-0.1567380428314209,
0.09823932498693466,
-0.21361246705055237,
0.09238336980342865,
-0.15230326354503632,
-0.029451781883835793,
0.19073395431041718,
-0.17097073793411255,
0.053559500724077225,
0.07279801368713379,
0.11436684429645538,
-0.0021043235901743174,
0.03615467995405197,
0.15233510732650757,
0.2935258746147156,
0.3454468846321106,
-0.22810596227645874,
0.05901285260915756,
0.22974373400211334,
-0.31542012095451355,
0.34500229358673096,
0.25641512870788574,
-0.06745106726884842,
-0.032209888100624084,
0.008989274501800537,
-0.1081862673163414,
-0.1527983695268631,
0.15141041576862335,
0.23199620842933655,
-0.020925462245941162,
-0.09342149645090103,
-0.5459656119346619,
0.33394306898117065,
-0.21873684227466583,
-0.38485896587371826,
0.2194061428308487,
-0.16944271326065063,
-0.07267405092716217,
-0.19096559286117554,
0.02255682460963726,
1.0649367570877075,
0.07945999503135681,
0.1126924380660057,
-0.12726445496082306,
-0.5455060005187988,
0.42408913373947144,
-0.2379041165113449,
-0.22364169359207153,
-0.3344690501689911,
-0.00815577246248722,
-0.12887132167816162,
-0.12167663872241974,
0.1522793173789978,
0.06273889541625977,
-0.08539183437824249,
0.20824557542800903,
0.10725896805524826,
0.1045088917016983,
0.020731912925839424,
0.602599024772644,
0.15047478675842285,
0.04356484115123749,
0.060208454728126526,
0.18800078332424164,
0.055274832993745804,
0.24239082634449005,
-0.13020245730876923,
-0.31938645243644714,
-0.12749606370925903,
0.03380492329597473,
-0.01160829421132803,
-0.0019655635114759207,
-0.08381276577711105,
0.10456161946058273,
-0.13983650505542755,
-0.20526082813739777,
-0.25242698192596436,
0.42440110445022583,
0.15970003604888916,
0.1887817531824112,
-0.24715064465999603,
0.11461276561021805,
-0.046732112765312195,
0.0027094401884824038,
0.029313184320926666,
0.2805415093898773,
-0.1352427452802658,
-0.29044294357299805,
-0.1281052827835083,
0.23914332687854767,
-0.1404992789030075,
-0.07304520905017853,
0.04191138222813606,
-0.10703638195991516,
0.10260847210884094,
-0.3164103329181671,
0.01924845203757286,
0.02499873749911785,
-0.3220735788345337,
0.06414845585823059,
0.21163833141326904,
0.21712104976177216,
-0.16343529522418976,
0.10807251185178757,
0.17635194957256317,
-0.34158840775489807,
-0.3512910306453705,
0.3709658086299896,
0.21752844750881195,
0.02440500445663929,
0.04613547399640083,
-0.4796413779258728,
-0.22884011268615723,
-0.3340003788471222,
0.2507474720478058,
-0.15752533078193665,
-0.24743036925792694,
0.0797547698020935,
0.08982030302286148,
0.1266365647315979,
-0.3757549524307251,
0.2513309121131897,
0.05919154733419418,
0.11650515347719193,
-0.11662673205137253,
-0.2816828787326813,
-0.3444786071777344,
0.13411332666873932,
-0.12307872623205185,
0.2031838446855545,
-0.059698980301618576,
-0.05253053829073906,
0.26356399059295654,
-0.04898117110133171,
-0.4707752764225006,
0.015275109559297562,
-0.03505711257457733,
0.06840353459119797,
0.15787795186042786,
0.08290908485651016,
-0.0023756716400384903,
-0.023143060505390167,
0.17094501852989197,
-0.16715870797634125,
-0.5150106549263,
-0.32075995206832886,
-0.027311300858855247,
0.10204475373029709,
-0.09216702729463577,
-0.21908526122570038,
-0.003802021499723196,
-0.18645669519901276,
-0.2553768754005432,
0.2529633641242981,
0.027548590674996376,
-0.023392057046294212,
0.08757782727479935,
0.24039015173912048,
0.2140411138534546,
0.12707571685314178,
-0.5350423455238342,
0.32286784052848816,
-0.0651806890964508,
0.5515998005867004,
-0.195905864238739,
0.28612959384918213,
-0.28418630361557007,
-0.1635005623102188,
0.010682698339223862,
-0.10316743701696396,
0.10033627599477768,
-0.08600300550460815,
0.4067014753818512,
-0.026513002812862396,
0.25668865442276,
0.026692261919379234,
0.10860822349786758,
0.38946786522865295,
-0.34689080715179443,
-0.16928315162658691,
-0.023515896871685982,
0.29261547327041626,
-0.10690803080797195,
0.018466338515281677,
-0.03806719183921814,
-0.14622311294078827,
-0.0024820768740028143,
0.03468934819102287,
0.5756387114524841,
-0.04438536986708641,
0.27637284994125366,
-0.11419173330068588,
0.19932329654693604,
0.13013562560081482,
-0.16177062690258026,
0.4860030710697174,
0.017657291144132614,
0.35421380400657654,
0.05232195928692818,
0.5286574959754944,
-0.11350914090871811,
0.15716353058815002,
-0.1838216930627823,
-0.028092147782444954,
0.3414258360862732,
0.047881223261356354,
0.056072067469358444,
-0.08962402492761612,
0.33629629015922546,
0.2946261763572693,
-0.08705347776412964,
0.1781911849975586,
0.13903623819351196,
0.07989116758108139,
0.10157067328691483,
0.07691311836242676,
-0.12268605828285217,
0.0828782320022583,
-0.09577442705631256,
-0.05034918710589409,
-0.3750808835029602,
-0.2274911105632782,
-0.0683983638882637,
0.11346498131752014,
-0.13789544999599457,
-0.0746934786438942,
0.1891644448041916,
-0.11839499324560165,
0.00918962899595499,
0.14426884055137634,
0.2761463522911072,
-0.029203997924923897,
-0.04984170198440552,
-0.13364283740520477,
0.22189006209373474,
-0.17010681331157684,
0.35383719205856323,
0.38514670729637146,
0.40343353152275085,
0.00745419692248106,
0.07475513964891434,
0.04436720162630081,
-0.19695016741752625,
0.42568981647491455,
-0.25523248314857483,
-0.1504456102848053,
0.11979631334543228,
0.2963642477989197,
-0.004546987824141979,
0.3164147734642029,
0.1822192668914795,
-0.17699111998081207,
0.11348334699869156,
0.09795057773590088,
-0.03329172357916832,
-0.0006225513061508536,
0.17045660316944122,
0.04764271527528763,
-0.30605655908584595,
0.11040603369474411,
-0.22476790845394135,
-0.31432002782821655,
-0.15534473955631256,
0.20560890436172485,
-0.24044491350650787,
0.0737062469124794,
-0.0057804821990430355,
0.1295129358768463,
-0.31138500571250916,
0.46273958683013916,
0.22496731579303741,
0.23828858137130737,
-0.3026929497718811,
-0.19107267260551453,
-0.3253970444202423,
0.09065181016921997,
0.14594095945358276,
-0.1692018210887909,
0.032183948904275894,
0.3537217676639557,
0.11461369693279266,
0.4964810311794281,
0.1751507967710495,
-0.13466483354568481,
-0.20029683411121368,
0.06315220892429352,
-0.29855939745903015,
-0.2872382402420044,
-0.08128468692302704,
0.4580511450767517,
0.09624259173870087,
-0.1340411901473999,
0.4584014117717743,
-0.20921224355697632,
0.1653910130262375,
-0.0942063108086586,
-0.058574941009283066,
0.258689820766449,
-0.03853308781981468,
0.2270074188709259,
-0.09708307683467865,
0.3727934956550598,
-0.28771114349365234,
-0.12759996950626373,
0.3427272140979767,
0.001309896819293499,
-0.11434634774923325,
0.18136808276176453,
0.07329137623310089,
-0.25954264402389526,
-0.1334352046251297,
0.12633754312992096,
-0.053252894431352615,
0.1774277687072754,
-0.024947967380285263,
0.18508093059062958,
0.044899266213178635,
-0.06426718831062317,
-0.19709427654743195,
-0.05584343895316124,
0.2796778082847595,
-0.056967418640851974,
-0.19294953346252441,
-0.1710069179534912,
-0.2457156628370285,
0.013700341805815697,
0.4553624093532562,
-0.010560215450823307,
0.04918619245290756,
-0.15994693338871002,
0.314818799495697,
0.2734244465827942,
0.09176819026470184,
-0.30662450194358826,
0.3136313855648041,
0.5716531872749329,
-0.24275876581668854,
-0.1982024908065796,
0.18663008511066437,
0.05613573268055916,
0.021846411749720573,
-0.07763957232236862,
0.5426533222198486,
-0.003519324352964759,
-0.4427117705345154,
-0.2567015290260315,
-0.19919271767139435
] |
https://github.com/huggingface/datasets/issues/1831
|
Some question about raw dataset download info in the project .
|
Sure it would be nice to have an easier access to these paths !
The dataset builder could have a method to return those, what do you think ?
Feel free to work on this @albertvillanova , it would be a nice addition :)
Your suggestion does work as well @albertvillanova if you complete it by specifying `etag=` to `hash_url_to_filename`.
The ETag is obtained by a HEAD request and is used to know if the file on the remote host has changed. Therefore if a file is updated on the remote host, then the hash returned by `hash_url_to_filename` is different.
|
Hi , i review the code in
https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py
in the _split_generators function is the truly logic of download raw datasets with dl_manager
and use Conll2003 cls by use import_main_class in load_dataset function
My question is that , with this logic it seems that i can not have the raw dataset download location
in variable in downloaded_files in _split_generators.
If someone also want use huggingface datasets as raw dataset downloader,
how can he retrieve the raw dataset download path from attributes in
datasets.dataset_dict.DatasetDict ?
| 100 |
Some question about raw dataset download info in the project .
|
[
-0.2805598974227905,
-0.09801923483610153,
-0.32276931405067444,
0.3209449350833893,
-0.03168478235602379,
-0.044705189764499664,
0.001494124298915267,
0.1303366869688034,
-0.14886939525604248,
0.18517647683620453,
-0.10466312617063522,
0.04543059691786766,
0.1184757724404335,
0.513159453868866,
0.1412387490272522,
-0.04158185422420502,
-0.018231792375445366,
0.24201658368110657,
-0.3308548927307129,
-0.3252866268157959,
-0.23969578742980957,
0.06328020989894867,
-0.17202197015285492,
0.11039740592241287,
0.08792047202587128,
-0.004498188383877277,
0.008089949376881123,
0.032669734209775925,
-0.5834207534790039,
-0.4136895537376404,
0.01798921264708042,
0.2539888918399811,
0.1767929047346115,
-0.06990727037191391,
-0.0001036755638779141,
0.029640594497323036,
0.2894303798675537,
-0.11960214376449585,
-0.29232096672058105,
0.1631821095943451,
-0.6452885866165161,
-0.10084418952465057,
-0.15593422949314117,
-0.440616250038147,
0.05677521228790283,
-0.20565326511859894,
0.11892994493246078,
0.04117847979068756,
0.20945750176906586,
0.10312474519014359,
0.3797271251678467,
0.2073730230331421,
0.11140753328800201,
-0.028139764443039894,
0.2262529581785202,
0.20402929186820984,
0.08515273034572601,
0.0032052684109658003,
0.1500379592180252,
0.6721698641777039,
0.15682917833328247,
0.38113531470298767,
0.36056438088417053,
0.14358897507190704,
0.10532519966363907,
0.07104021310806274,
0.10487388074398041,
-0.4946599304676056,
0.27020758390426636,
0.28863388299942017,
0.7208200097084045,
-0.03494996204972267,
-0.32100409269332886,
0.19187943637371063,
-0.14093071222305298,
-0.504451334476471,
-0.07815570384263992,
0.44219285249710083,
-0.17821857333183289,
0.3116708993911743,
-0.45127445459365845,
-0.35995838046073914,
-0.25458845496177673,
-0.12922440469264984,
0.11863674968481064,
0.22873738408088684,
-0.26792237162590027,
0.08228060603141785,
-0.17257151007652283,
0.216462180018425,
0.27776384353637695,
-0.39806103706359863,
-0.06943485140800476,
0.11326941847801208,
0.15687687695026398,
-0.3920624852180481,
-0.3192318081855774,
0.13902929425239563,
0.252677857875824,
-0.11343064904212952,
0.08225914090871811,
-0.1540018767118454,
0.1095278188586235,
0.07520480453968048,
0.5236120820045471,
-0.3108225166797638,
0.13854774832725525,
0.001779066980816424,
0.2834778428077698,
-0.23332008719444275,
0.06351927667856216,
-0.08058091998100281,
-0.04274691268801689,
0.1960744559764862,
-0.3287509083747864,
0.06773319840431213,
0.08496134728193283,
-0.23275570571422577,
-0.09324779361486435,
-0.04952012747526169,
0.13128238916397095,
-0.2378990799188614,
-0.1688210368156433,
0.13492457568645477,
-0.14794190227985382,
-0.24201753735542297,
-0.2349170446395874,
-0.13524186611175537,
0.2680392265319824,
-0.46481427550315857,
-0.2336670160293579,
-0.1332598328590393,
-0.08689229190349579,
-0.19759804010391235,
-0.12784448266029358,
0.03272627294063568,
0.3951755464076996,
0.009014664217829704,
-0.18720203638076782,
0.06585054099559784,
0.3222729563713074,
-0.15740138292312622,
0.14562788605690002,
0.3822474777698517,
0.03870290145277977,
0.14516903460025787,
-0.2938928008079529,
0.2107231169939041,
-0.13253292441368103,
0.2304162234067917,
-0.4109514653682709,
-0.19442445039749146,
-0.12633934617042542,
0.3131064772605896,
-0.016581939533352852,
0.10555565357208252,
-0.14671868085861206,
0.1369357407093048,
0.029764598235487938,
-0.018232544884085655,
0.09820879250764847,
0.09006930887699127,
-0.20616672933101654,
-0.16924992203712463,
0.11932888627052307,
0.0880652666091919,
-0.22255858778953552,
-0.00921129621565342,
0.12428846955299377,
-0.5760321021080017,
0.015058811753988266,
0.13805840909481049,
-0.40079623460769653,
0.39770519733428955,
-0.2945261597633362,
0.17771153151988983,
0.7162039279937744,
-0.18020837008953094,
-0.2672034800052643,
0.4470158815383911,
0.11439488083124161,
-0.4106484055519104,
0.23383262753486633,
0.26622262597084045,
0.4125642478466034,
-0.06693370640277863,
-0.17932654917240143,
0.3388535678386688,
0.016101030632853508,
0.053821779787540436,
-0.011294879950582981,
-0.24241064488887787,
-0.16503645479679108,
-0.17861047387123108,
-0.09296537935733795,
0.29342296719551086,
0.19146206974983215,
-0.22453026473522186,
0.4002234637737274,
0.020792169496417046,
0.22613584995269775,
0.36018961668014526,
-0.012199749238789082,
-0.20550496876239777,
0.02232431061565876,
0.1279297173023224,
-0.17524033784866333,
-0.015224053524434566,
-0.42698803544044495,
-0.12747538089752197,
0.013126043602824211,
-0.26666831970214844,
-0.32296279072761536,
0.019333001226186752,
-0.0010816778521984816,
-0.21937082707881927,
0.2315307855606079,
0.03777940571308136,
0.19610542058944702,
-0.1968136727809906,
-0.213314488530159,
0.25138309597969055,
-0.292310506105423,
-0.06244423985481262,
-0.04687322676181793,
0.13912881910800934,
-0.07799743115901947,
0.03151809424161911,
0.2057933360338211,
-0.15104414522647858,
-0.00910243671387434,
-0.16629941761493683,
-0.04446029290556908,
0.28482988476753235,
0.018158791586756706,
0.09513022005558014,
0.5243695378303528,
0.29359903931617737,
0.12098173052072525,
-0.16507257521152496,
0.20186126232147217,
-0.04635562375187874,
0.21416690945625305,
0.1663430780172348,
-0.018294014036655426,
0.2870566248893738,
0.017314543947577477,
-0.09545928984880447,
0.17566543817520142,
-0.17904558777809143,
0.3407214283943176,
-0.06798655539751053,
-0.013319813646376133,
-0.09031060338020325,
-0.2011510133743286,
0.4571353793144226,
-0.001192552619613707,
0.12017403542995453,
-0.2819548547267914,
0.08443482965230942,
0.5737931132316589,
-0.15330864489078522,
-0.21134053170681,
0.030770812183618546,
-0.2598513960838318,
-0.3371325731277466,
0.29635271430015564,
0.2895720899105072,
0.42273861169815063,
0.25502678751945496,
0.24886104464530945,
0.006826833821833134,
0.32059773802757263,
-0.12046238780021667,
0.2556690275669098,
0.04765591770410538,
-0.14208459854125977,
0.014279545284807682,
-0.349710613489151,
-0.14793170988559723,
-0.12594513595104218,
-0.004027263261377811,
0.23148031532764435,
0.05010165646672249,
-0.0525953583419323,
-0.11145404726266861,
0.03909808024764061,
-0.4801391065120697,
-0.024408457800745964,
0.23757730424404144,
0.16369186341762543,
-0.12297569960355759,
0.08274399489164352,
-0.1907869577407837,
-0.17373871803283691,
0.14100797474384308,
-0.016849424690008163,
0.15865111351013184,
-0.08517833054065704,
0.322904497385025,
-0.12376020848751068,
-0.19894562661647797,
-0.11949236690998077,
0.234893798828125,
-0.06441213190555573,
0.04837225005030632,
0.3213335871696472,
-0.5153055787086487,
0.2209835946559906,
-0.4046984314918518,
0.043813638389110565,
0.395546019077301,
0.09710992127656937,
-0.10189954936504364,
0.010126788169145584,
0.3022068738937378,
0.005021833814680576,
0.021818162873387337,
-0.09300829470157623,
-0.18761470913887024,
-0.2450060248374939,
-0.42967256903648376,
0.026399215683341026,
-0.21749641001224518,
-0.10556584596633911,
-0.4233989417552948,
-0.46714046597480774,
-0.05294663831591606,
0.13622501492500305,
0.11275915801525116,
0.3227630853652954,
-0.19298528134822845,
-0.03137565031647682,
0.03368901088833809,
-0.12250390648841858,
0.07294350117444992,
-0.3983849883079529,
-0.6411249041557312,
0.19704248011112213,
-0.29704540967941284,
-0.4222319424152374,
0.08189601451158524,
-0.011339428834617138,
0.15572915971279144,
0.24690046906471252,
-0.23902097344398499,
0.10755151510238647,
-0.01382456999272108,
0.2445145696401596,
0.028267964720726013,
0.28734564781188965,
0.1881217211484909,
-0.22042624652385712,
-0.21810750663280487,
-0.21744322776794434,
0.012772014364600182,
-0.025605935603380203,
-0.08750592172145844,
0.0696454793214798,
0.1177988350391388,
-0.10716686397790909,
-0.11203056573867798,
0.8044877648353577,
0.07009647786617279,
-0.3008396029472351,
0.10693107545375824,
0.03227810189127922,
0.4311591386795044,
0.1090940535068512,
0.18240636587142944,
0.13692142069339752,
0.05537774786353111,
0.03880230337381363,
0.22544090449810028,
0.005765304435044527,
-0.11720766872167587,
-0.08399857580661774,
0.012170524336397648,
-0.42676272988319397,
0.004691020585596561,
-0.1922275573015213,
0.5234455466270447,
0.25837624073028564,
0.20524102449417114,
-0.003799973288550973,
0.06032358855009079,
-0.05412748456001282,
0.04708678275346756,
0.2806786000728607,
0.13094770908355713,
-0.040536750108003616,
-0.3984523117542267,
0.09031663835048676,
-0.04949108138680458,
0.09461106359958649,
0.16235443949699402,
-0.06499984860420227,
0.02954011596739292,
0.1811576932668686,
0.2653326094150543,
0.1328468918800354,
0.41683077812194824,
-0.3177931606769562,
0.017871873453259468,
-0.16205371916294098,
0.00647042877972126,
0.12178120762109756,
0.0341392420232296,
-0.2181628942489624,
0.32838311791419983,
0.46068161725997925,
0.12523740530014038,
-0.2931475341320038,
-0.23592577874660492,
0.2678714394569397,
0.16209931671619415,
-0.18113115429878235,
-0.1022864356637001,
-0.004956737160682678,
-0.251701295375824,
-0.18587324023246765,
-0.1567380428314209,
0.09823932498693466,
-0.21361246705055237,
0.09238336980342865,
-0.15230326354503632,
-0.029451781883835793,
0.19073395431041718,
-0.17097073793411255,
0.053559500724077225,
0.07279801368713379,
0.11436684429645538,
-0.0021043235901743174,
0.03615467995405197,
0.15233510732650757,
0.2935258746147156,
0.3454468846321106,
-0.22810596227645874,
0.05901285260915756,
0.22974373400211334,
-0.31542012095451355,
0.34500229358673096,
0.25641512870788574,
-0.06745106726884842,
-0.032209888100624084,
0.008989274501800537,
-0.1081862673163414,
-0.1527983695268631,
0.15141041576862335,
0.23199620842933655,
-0.020925462245941162,
-0.09342149645090103,
-0.5459656119346619,
0.33394306898117065,
-0.21873684227466583,
-0.38485896587371826,
0.2194061428308487,
-0.16944271326065063,
-0.07267405092716217,
-0.19096559286117554,
0.02255682460963726,
1.0649367570877075,
0.07945999503135681,
0.1126924380660057,
-0.12726445496082306,
-0.5455060005187988,
0.42408913373947144,
-0.2379041165113449,
-0.22364169359207153,
-0.3344690501689911,
-0.00815577246248722,
-0.12887132167816162,
-0.12167663872241974,
0.1522793173789978,
0.06273889541625977,
-0.08539183437824249,
0.20824557542800903,
0.10725896805524826,
0.1045088917016983,
0.020731912925839424,
0.602599024772644,
0.15047478675842285,
0.04356484115123749,
0.060208454728126526,
0.18800078332424164,
0.055274832993745804,
0.24239082634449005,
-0.13020245730876923,
-0.31938645243644714,
-0.12749606370925903,
0.03380492329597473,
-0.01160829421132803,
-0.0019655635114759207,
-0.08381276577711105,
0.10456161946058273,
-0.13983650505542755,
-0.20526082813739777,
-0.25242698192596436,
0.42440110445022583,
0.15970003604888916,
0.1887817531824112,
-0.24715064465999603,
0.11461276561021805,
-0.046732112765312195,
0.0027094401884824038,
0.029313184320926666,
0.2805415093898773,
-0.1352427452802658,
-0.29044294357299805,
-0.1281052827835083,
0.23914332687854767,
-0.1404992789030075,
-0.07304520905017853,
0.04191138222813606,
-0.10703638195991516,
0.10260847210884094,
-0.3164103329181671,
0.01924845203757286,
0.02499873749911785,
-0.3220735788345337,
0.06414845585823059,
0.21163833141326904,
0.21712104976177216,
-0.16343529522418976,
0.10807251185178757,
0.17635194957256317,
-0.34158840775489807,
-0.3512910306453705,
0.3709658086299896,
0.21752844750881195,
0.02440500445663929,
0.04613547399640083,
-0.4796413779258728,
-0.22884011268615723,
-0.3340003788471222,
0.2507474720478058,
-0.15752533078193665,
-0.24743036925792694,
0.0797547698020935,
0.08982030302286148,
0.1266365647315979,
-0.3757549524307251,
0.2513309121131897,
0.05919154733419418,
0.11650515347719193,
-0.11662673205137253,
-0.2816828787326813,
-0.3444786071777344,
0.13411332666873932,
-0.12307872623205185,
0.2031838446855545,
-0.059698980301618576,
-0.05253053829073906,
0.26356399059295654,
-0.04898117110133171,
-0.4707752764225006,
0.015275109559297562,
-0.03505711257457733,
0.06840353459119797,
0.15787795186042786,
0.08290908485651016,
-0.0023756716400384903,
-0.023143060505390167,
0.17094501852989197,
-0.16715870797634125,
-0.5150106549263,
-0.32075995206832886,
-0.027311300858855247,
0.10204475373029709,
-0.09216702729463577,
-0.21908526122570038,
-0.003802021499723196,
-0.18645669519901276,
-0.2553768754005432,
0.2529633641242981,
0.027548590674996376,
-0.023392057046294212,
0.08757782727479935,
0.24039015173912048,
0.2140411138534546,
0.12707571685314178,
-0.5350423455238342,
0.32286784052848816,
-0.0651806890964508,
0.5515998005867004,
-0.195905864238739,
0.28612959384918213,
-0.28418630361557007,
-0.1635005623102188,
0.010682698339223862,
-0.10316743701696396,
0.10033627599477768,
-0.08600300550460815,
0.4067014753818512,
-0.026513002812862396,
0.25668865442276,
0.026692261919379234,
0.10860822349786758,
0.38946786522865295,
-0.34689080715179443,
-0.16928315162658691,
-0.023515896871685982,
0.29261547327041626,
-0.10690803080797195,
0.018466338515281677,
-0.03806719183921814,
-0.14622311294078827,
-0.0024820768740028143,
0.03468934819102287,
0.5756387114524841,
-0.04438536986708641,
0.27637284994125366,
-0.11419173330068588,
0.19932329654693604,
0.13013562560081482,
-0.16177062690258026,
0.4860030710697174,
0.017657291144132614,
0.35421380400657654,
0.05232195928692818,
0.5286574959754944,
-0.11350914090871811,
0.15716353058815002,
-0.1838216930627823,
-0.028092147782444954,
0.3414258360862732,
0.047881223261356354,
0.056072067469358444,
-0.08962402492761612,
0.33629629015922546,
0.2946261763572693,
-0.08705347776412964,
0.1781911849975586,
0.13903623819351196,
0.07989116758108139,
0.10157067328691483,
0.07691311836242676,
-0.12268605828285217,
0.0828782320022583,
-0.09577442705631256,
-0.05034918710589409,
-0.3750808835029602,
-0.2274911105632782,
-0.0683983638882637,
0.11346498131752014,
-0.13789544999599457,
-0.0746934786438942,
0.1891644448041916,
-0.11839499324560165,
0.00918962899595499,
0.14426884055137634,
0.2761463522911072,
-0.029203997924923897,
-0.04984170198440552,
-0.13364283740520477,
0.22189006209373474,
-0.17010681331157684,
0.35383719205856323,
0.38514670729637146,
0.40343353152275085,
0.00745419692248106,
0.07475513964891434,
0.04436720162630081,
-0.19695016741752625,
0.42568981647491455,
-0.25523248314857483,
-0.1504456102848053,
0.11979631334543228,
0.2963642477989197,
-0.004546987824141979,
0.3164147734642029,
0.1822192668914795,
-0.17699111998081207,
0.11348334699869156,
0.09795057773590088,
-0.03329172357916832,
-0.0006225513061508536,
0.17045660316944122,
0.04764271527528763,
-0.30605655908584595,
0.11040603369474411,
-0.22476790845394135,
-0.31432002782821655,
-0.15534473955631256,
0.20560890436172485,
-0.24044491350650787,
0.0737062469124794,
-0.0057804821990430355,
0.1295129358768463,
-0.31138500571250916,
0.46273958683013916,
0.22496731579303741,
0.23828858137130737,
-0.3026929497718811,
-0.19107267260551453,
-0.3253970444202423,
0.09065181016921997,
0.14594095945358276,
-0.1692018210887909,
0.032183948904275894,
0.3537217676639557,
0.11461369693279266,
0.4964810311794281,
0.1751507967710495,
-0.13466483354568481,
-0.20029683411121368,
0.06315220892429352,
-0.29855939745903015,
-0.2872382402420044,
-0.08128468692302704,
0.4580511450767517,
0.09624259173870087,
-0.1340411901473999,
0.4584014117717743,
-0.20921224355697632,
0.1653910130262375,
-0.0942063108086586,
-0.058574941009283066,
0.258689820766449,
-0.03853308781981468,
0.2270074188709259,
-0.09708307683467865,
0.3727934956550598,
-0.28771114349365234,
-0.12759996950626373,
0.3427272140979767,
0.001309896819293499,
-0.11434634774923325,
0.18136808276176453,
0.07329137623310089,
-0.25954264402389526,
-0.1334352046251297,
0.12633754312992096,
-0.053252894431352615,
0.1774277687072754,
-0.024947967380285263,
0.18508093059062958,
0.044899266213178635,
-0.06426718831062317,
-0.19709427654743195,
-0.05584343895316124,
0.2796778082847595,
-0.056967418640851974,
-0.19294953346252441,
-0.1710069179534912,
-0.2457156628370285,
0.013700341805815697,
0.4553624093532562,
-0.010560215450823307,
0.04918619245290756,
-0.15994693338871002,
0.314818799495697,
0.2734244465827942,
0.09176819026470184,
-0.30662450194358826,
0.3136313855648041,
0.5716531872749329,
-0.24275876581668854,
-0.1982024908065796,
0.18663008511066437,
0.05613573268055916,
0.021846411749720573,
-0.07763957232236862,
0.5426533222198486,
-0.003519324352964759,
-0.4427117705345154,
-0.2567015290260315,
-0.19919271767139435
] |
https://github.com/huggingface/datasets/issues/1831
|
Some question about raw dataset download info in the project .
|
Once #1846 will be merged, the paths to the raw downloaded files will be accessible as:
```python
builder_instance.dl_manager.downloaded_paths
```
|
Hi , i review the code in
https://github.com/huggingface/datasets/blob/master/datasets/conll2003/conll2003.py
in the _split_generators function is the truly logic of download raw datasets with dl_manager
and use Conll2003 cls by use import_main_class in load_dataset function
My question is that , with this logic it seems that i can not have the raw dataset download location
in variable in downloaded_files in _split_generators.
If someone also want use huggingface datasets as raw dataset downloader,
how can he retrieve the raw dataset download path from attributes in
datasets.dataset_dict.DatasetDict ?
| 19 |
Some question about raw dataset download info in the project .
|
[
-0.2805598974227905,
-0.09801923483610153,
-0.32276931405067444,
0.3209449350833893,
-0.03168478235602379,
-0.044705189764499664,
0.001494124298915267,
0.1303366869688034,
-0.14886939525604248,
0.18517647683620453,
-0.10466312617063522,
0.04543059691786766,
0.1184757724404335,
0.513159453868866,
0.1412387490272522,
-0.04158185422420502,
-0.018231792375445366,
0.24201658368110657,
-0.3308548927307129,
-0.3252866268157959,
-0.23969578742980957,
0.06328020989894867,
-0.17202197015285492,
0.11039740592241287,
0.08792047202587128,
-0.004498188383877277,
0.008089949376881123,
0.032669734209775925,
-0.5834207534790039,
-0.4136895537376404,
0.01798921264708042,
0.2539888918399811,
0.1767929047346115,
-0.06990727037191391,
-0.0001036755638779141,
0.029640594497323036,
0.2894303798675537,
-0.11960214376449585,
-0.29232096672058105,
0.1631821095943451,
-0.6452885866165161,
-0.10084418952465057,
-0.15593422949314117,
-0.440616250038147,
0.05677521228790283,
-0.20565326511859894,
0.11892994493246078,
0.04117847979068756,
0.20945750176906586,
0.10312474519014359,
0.3797271251678467,
0.2073730230331421,
0.11140753328800201,
-0.028139764443039894,
0.2262529581785202,
0.20402929186820984,
0.08515273034572601,
0.0032052684109658003,
0.1500379592180252,
0.6721698641777039,
0.15682917833328247,
0.38113531470298767,
0.36056438088417053,
0.14358897507190704,
0.10532519966363907,
0.07104021310806274,
0.10487388074398041,
-0.4946599304676056,
0.27020758390426636,
0.28863388299942017,
0.7208200097084045,
-0.03494996204972267,
-0.32100409269332886,
0.19187943637371063,
-0.14093071222305298,
-0.504451334476471,
-0.07815570384263992,
0.44219285249710083,
-0.17821857333183289,
0.3116708993911743,
-0.45127445459365845,
-0.35995838046073914,
-0.25458845496177673,
-0.12922440469264984,
0.11863674968481064,
0.22873738408088684,
-0.26792237162590027,
0.08228060603141785,
-0.17257151007652283,
0.216462180018425,
0.27776384353637695,
-0.39806103706359863,
-0.06943485140800476,
0.11326941847801208,
0.15687687695026398,
-0.3920624852180481,
-0.3192318081855774,
0.13902929425239563,
0.252677857875824,
-0.11343064904212952,
0.08225914090871811,
-0.1540018767118454,
0.1095278188586235,
0.07520480453968048,
0.5236120820045471,
-0.3108225166797638,
0.13854774832725525,
0.001779066980816424,
0.2834778428077698,
-0.23332008719444275,
0.06351927667856216,
-0.08058091998100281,
-0.04274691268801689,
0.1960744559764862,
-0.3287509083747864,
0.06773319840431213,
0.08496134728193283,
-0.23275570571422577,
-0.09324779361486435,
-0.04952012747526169,
0.13128238916397095,
-0.2378990799188614,
-0.1688210368156433,
0.13492457568645477,
-0.14794190227985382,
-0.24201753735542297,
-0.2349170446395874,
-0.13524186611175537,
0.2680392265319824,
-0.46481427550315857,
-0.2336670160293579,
-0.1332598328590393,
-0.08689229190349579,
-0.19759804010391235,
-0.12784448266029358,
0.03272627294063568,
0.3951755464076996,
0.009014664217829704,
-0.18720203638076782,
0.06585054099559784,
0.3222729563713074,
-0.15740138292312622,
0.14562788605690002,
0.3822474777698517,
0.03870290145277977,
0.14516903460025787,
-0.2938928008079529,
0.2107231169939041,
-0.13253292441368103,
0.2304162234067917,
-0.4109514653682709,
-0.19442445039749146,
-0.12633934617042542,
0.3131064772605896,
-0.016581939533352852,
0.10555565357208252,
-0.14671868085861206,
0.1369357407093048,
0.029764598235487938,
-0.018232544884085655,
0.09820879250764847,
0.09006930887699127,
-0.20616672933101654,
-0.16924992203712463,
0.11932888627052307,
0.0880652666091919,
-0.22255858778953552,
-0.00921129621565342,
0.12428846955299377,
-0.5760321021080017,
0.015058811753988266,
0.13805840909481049,
-0.40079623460769653,
0.39770519733428955,
-0.2945261597633362,
0.17771153151988983,
0.7162039279937744,
-0.18020837008953094,
-0.2672034800052643,
0.4470158815383911,
0.11439488083124161,
-0.4106484055519104,
0.23383262753486633,
0.26622262597084045,
0.4125642478466034,
-0.06693370640277863,
-0.17932654917240143,
0.3388535678386688,
0.016101030632853508,
0.053821779787540436,
-0.011294879950582981,
-0.24241064488887787,
-0.16503645479679108,
-0.17861047387123108,
-0.09296537935733795,
0.29342296719551086,
0.19146206974983215,
-0.22453026473522186,
0.4002234637737274,
0.020792169496417046,
0.22613584995269775,
0.36018961668014526,
-0.012199749238789082,
-0.20550496876239777,
0.02232431061565876,
0.1279297173023224,
-0.17524033784866333,
-0.015224053524434566,
-0.42698803544044495,
-0.12747538089752197,
0.013126043602824211,
-0.26666831970214844,
-0.32296279072761536,
0.019333001226186752,
-0.0010816778521984816,
-0.21937082707881927,
0.2315307855606079,
0.03777940571308136,
0.19610542058944702,
-0.1968136727809906,
-0.213314488530159,
0.25138309597969055,
-0.292310506105423,
-0.06244423985481262,
-0.04687322676181793,
0.13912881910800934,
-0.07799743115901947,
0.03151809424161911,
0.2057933360338211,
-0.15104414522647858,
-0.00910243671387434,
-0.16629941761493683,
-0.04446029290556908,
0.28482988476753235,
0.018158791586756706,
0.09513022005558014,
0.5243695378303528,
0.29359903931617737,
0.12098173052072525,
-0.16507257521152496,
0.20186126232147217,
-0.04635562375187874,
0.21416690945625305,
0.1663430780172348,
-0.018294014036655426,
0.2870566248893738,
0.017314543947577477,
-0.09545928984880447,
0.17566543817520142,
-0.17904558777809143,
0.3407214283943176,
-0.06798655539751053,
-0.013319813646376133,
-0.09031060338020325,
-0.2011510133743286,
0.4571353793144226,
-0.001192552619613707,
0.12017403542995453,
-0.2819548547267914,
0.08443482965230942,
0.5737931132316589,
-0.15330864489078522,
-0.21134053170681,
0.030770812183618546,
-0.2598513960838318,
-0.3371325731277466,
0.29635271430015564,
0.2895720899105072,
0.42273861169815063,
0.25502678751945496,
0.24886104464530945,
0.006826833821833134,
0.32059773802757263,
-0.12046238780021667,
0.2556690275669098,
0.04765591770410538,
-0.14208459854125977,
0.014279545284807682,
-0.349710613489151,
-0.14793170988559723,
-0.12594513595104218,
-0.004027263261377811,
0.23148031532764435,
0.05010165646672249,
-0.0525953583419323,
-0.11145404726266861,
0.03909808024764061,
-0.4801391065120697,
-0.024408457800745964,
0.23757730424404144,
0.16369186341762543,
-0.12297569960355759,
0.08274399489164352,
-0.1907869577407837,
-0.17373871803283691,
0.14100797474384308,
-0.016849424690008163,
0.15865111351013184,
-0.08517833054065704,
0.322904497385025,
-0.12376020848751068,
-0.19894562661647797,
-0.11949236690998077,
0.234893798828125,
-0.06441213190555573,
0.04837225005030632,
0.3213335871696472,
-0.5153055787086487,
0.2209835946559906,
-0.4046984314918518,
0.043813638389110565,
0.395546019077301,
0.09710992127656937,
-0.10189954936504364,
0.010126788169145584,
0.3022068738937378,
0.005021833814680576,
0.021818162873387337,
-0.09300829470157623,
-0.18761470913887024,
-0.2450060248374939,
-0.42967256903648376,
0.026399215683341026,
-0.21749641001224518,
-0.10556584596633911,
-0.4233989417552948,
-0.46714046597480774,
-0.05294663831591606,
0.13622501492500305,
0.11275915801525116,
0.3227630853652954,
-0.19298528134822845,
-0.03137565031647682,
0.03368901088833809,
-0.12250390648841858,
0.07294350117444992,
-0.3983849883079529,
-0.6411249041557312,
0.19704248011112213,
-0.29704540967941284,
-0.4222319424152374,
0.08189601451158524,
-0.011339428834617138,
0.15572915971279144,
0.24690046906471252,
-0.23902097344398499,
0.10755151510238647,
-0.01382456999272108,
0.2445145696401596,
0.028267964720726013,
0.28734564781188965,
0.1881217211484909,
-0.22042624652385712,
-0.21810750663280487,
-0.21744322776794434,
0.012772014364600182,
-0.025605935603380203,
-0.08750592172145844,
0.0696454793214798,
0.1177988350391388,
-0.10716686397790909,
-0.11203056573867798,
0.8044877648353577,
0.07009647786617279,
-0.3008396029472351,
0.10693107545375824,
0.03227810189127922,
0.4311591386795044,
0.1090940535068512,
0.18240636587142944,
0.13692142069339752,
0.05537774786353111,
0.03880230337381363,
0.22544090449810028,
0.005765304435044527,
-0.11720766872167587,
-0.08399857580661774,
0.012170524336397648,
-0.42676272988319397,
0.004691020585596561,
-0.1922275573015213,
0.5234455466270447,
0.25837624073028564,
0.20524102449417114,
-0.003799973288550973,
0.06032358855009079,
-0.05412748456001282,
0.04708678275346756,
0.2806786000728607,
0.13094770908355713,
-0.040536750108003616,
-0.3984523117542267,
0.09031663835048676,
-0.04949108138680458,
0.09461106359958649,
0.16235443949699402,
-0.06499984860420227,
0.02954011596739292,
0.1811576932668686,
0.2653326094150543,
0.1328468918800354,
0.41683077812194824,
-0.3177931606769562,
0.017871873453259468,
-0.16205371916294098,
0.00647042877972126,
0.12178120762109756,
0.0341392420232296,
-0.2181628942489624,
0.32838311791419983,
0.46068161725997925,
0.12523740530014038,
-0.2931475341320038,
-0.23592577874660492,
0.2678714394569397,
0.16209931671619415,
-0.18113115429878235,
-0.1022864356637001,
-0.004956737160682678,
-0.251701295375824,
-0.18587324023246765,
-0.1567380428314209,
0.09823932498693466,
-0.21361246705055237,
0.09238336980342865,
-0.15230326354503632,
-0.029451781883835793,
0.19073395431041718,
-0.17097073793411255,
0.053559500724077225,
0.07279801368713379,
0.11436684429645538,
-0.0021043235901743174,
0.03615467995405197,
0.15233510732650757,
0.2935258746147156,
0.3454468846321106,
-0.22810596227645874,
0.05901285260915756,
0.22974373400211334,
-0.31542012095451355,
0.34500229358673096,
0.25641512870788574,
-0.06745106726884842,
-0.032209888100624084,
0.008989274501800537,
-0.1081862673163414,
-0.1527983695268631,
0.15141041576862335,
0.23199620842933655,
-0.020925462245941162,
-0.09342149645090103,
-0.5459656119346619,
0.33394306898117065,
-0.21873684227466583,
-0.38485896587371826,
0.2194061428308487,
-0.16944271326065063,
-0.07267405092716217,
-0.19096559286117554,
0.02255682460963726,
1.0649367570877075,
0.07945999503135681,
0.1126924380660057,
-0.12726445496082306,
-0.5455060005187988,
0.42408913373947144,
-0.2379041165113449,
-0.22364169359207153,
-0.3344690501689911,
-0.00815577246248722,
-0.12887132167816162,
-0.12167663872241974,
0.1522793173789978,
0.06273889541625977,
-0.08539183437824249,
0.20824557542800903,
0.10725896805524826,
0.1045088917016983,
0.020731912925839424,
0.602599024772644,
0.15047478675842285,
0.04356484115123749,
0.060208454728126526,
0.18800078332424164,
0.055274832993745804,
0.24239082634449005,
-0.13020245730876923,
-0.31938645243644714,
-0.12749606370925903,
0.03380492329597473,
-0.01160829421132803,
-0.0019655635114759207,
-0.08381276577711105,
0.10456161946058273,
-0.13983650505542755,
-0.20526082813739777,
-0.25242698192596436,
0.42440110445022583,
0.15970003604888916,
0.1887817531824112,
-0.24715064465999603,
0.11461276561021805,
-0.046732112765312195,
0.0027094401884824038,
0.029313184320926666,
0.2805415093898773,
-0.1352427452802658,
-0.29044294357299805,
-0.1281052827835083,
0.23914332687854767,
-0.1404992789030075,
-0.07304520905017853,
0.04191138222813606,
-0.10703638195991516,
0.10260847210884094,
-0.3164103329181671,
0.01924845203757286,
0.02499873749911785,
-0.3220735788345337,
0.06414845585823059,
0.21163833141326904,
0.21712104976177216,
-0.16343529522418976,
0.10807251185178757,
0.17635194957256317,
-0.34158840775489807,
-0.3512910306453705,
0.3709658086299896,
0.21752844750881195,
0.02440500445663929,
0.04613547399640083,
-0.4796413779258728,
-0.22884011268615723,
-0.3340003788471222,
0.2507474720478058,
-0.15752533078193665,
-0.24743036925792694,
0.0797547698020935,
0.08982030302286148,
0.1266365647315979,
-0.3757549524307251,
0.2513309121131897,
0.05919154733419418,
0.11650515347719193,
-0.11662673205137253,
-0.2816828787326813,
-0.3444786071777344,
0.13411332666873932,
-0.12307872623205185,
0.2031838446855545,
-0.059698980301618576,
-0.05253053829073906,
0.26356399059295654,
-0.04898117110133171,
-0.4707752764225006,
0.015275109559297562,
-0.03505711257457733,
0.06840353459119797,
0.15787795186042786,
0.08290908485651016,
-0.0023756716400384903,
-0.023143060505390167,
0.17094501852989197,
-0.16715870797634125,
-0.5150106549263,
-0.32075995206832886,
-0.027311300858855247,
0.10204475373029709,
-0.09216702729463577,
-0.21908526122570038,
-0.003802021499723196,
-0.18645669519901276,
-0.2553768754005432,
0.2529633641242981,
0.027548590674996376,
-0.023392057046294212,
0.08757782727479935,
0.24039015173912048,
0.2140411138534546,
0.12707571685314178,
-0.5350423455238342,
0.32286784052848816,
-0.0651806890964508,
0.5515998005867004,
-0.195905864238739,
0.28612959384918213,
-0.28418630361557007,
-0.1635005623102188,
0.010682698339223862,
-0.10316743701696396,
0.10033627599477768,
-0.08600300550460815,
0.4067014753818512,
-0.026513002812862396,
0.25668865442276,
0.026692261919379234,
0.10860822349786758,
0.38946786522865295,
-0.34689080715179443,
-0.16928315162658691,
-0.023515896871685982,
0.29261547327041626,
-0.10690803080797195,
0.018466338515281677,
-0.03806719183921814,
-0.14622311294078827,
-0.0024820768740028143,
0.03468934819102287,
0.5756387114524841,
-0.04438536986708641,
0.27637284994125366,
-0.11419173330068588,
0.19932329654693604,
0.13013562560081482,
-0.16177062690258026,
0.4860030710697174,
0.017657291144132614,
0.35421380400657654,
0.05232195928692818,
0.5286574959754944,
-0.11350914090871811,
0.15716353058815002,
-0.1838216930627823,
-0.028092147782444954,
0.3414258360862732,
0.047881223261356354,
0.056072067469358444,
-0.08962402492761612,
0.33629629015922546,
0.2946261763572693,
-0.08705347776412964,
0.1781911849975586,
0.13903623819351196,
0.07989116758108139,
0.10157067328691483,
0.07691311836242676,
-0.12268605828285217,
0.0828782320022583,
-0.09577442705631256,
-0.05034918710589409,
-0.3750808835029602,
-0.2274911105632782,
-0.0683983638882637,
0.11346498131752014,
-0.13789544999599457,
-0.0746934786438942,
0.1891644448041916,
-0.11839499324560165,
0.00918962899595499,
0.14426884055137634,
0.2761463522911072,
-0.029203997924923897,
-0.04984170198440552,
-0.13364283740520477,
0.22189006209373474,
-0.17010681331157684,
0.35383719205856323,
0.38514670729637146,
0.40343353152275085,
0.00745419692248106,
0.07475513964891434,
0.04436720162630081,
-0.19695016741752625,
0.42568981647491455,
-0.25523248314857483,
-0.1504456102848053,
0.11979631334543228,
0.2963642477989197,
-0.004546987824141979,
0.3164147734642029,
0.1822192668914795,
-0.17699111998081207,
0.11348334699869156,
0.09795057773590088,
-0.03329172357916832,
-0.0006225513061508536,
0.17045660316944122,
0.04764271527528763,
-0.30605655908584595,
0.11040603369474411,
-0.22476790845394135,
-0.31432002782821655,
-0.15534473955631256,
0.20560890436172485,
-0.24044491350650787,
0.0737062469124794,
-0.0057804821990430355,
0.1295129358768463,
-0.31138500571250916,
0.46273958683013916,
0.22496731579303741,
0.23828858137130737,
-0.3026929497718811,
-0.19107267260551453,
-0.3253970444202423,
0.09065181016921997,
0.14594095945358276,
-0.1692018210887909,
0.032183948904275894,
0.3537217676639557,
0.11461369693279266,
0.4964810311794281,
0.1751507967710495,
-0.13466483354568481,
-0.20029683411121368,
0.06315220892429352,
-0.29855939745903015,
-0.2872382402420044,
-0.08128468692302704,
0.4580511450767517,
0.09624259173870087,
-0.1340411901473999,
0.4584014117717743,
-0.20921224355697632,
0.1653910130262375,
-0.0942063108086586,
-0.058574941009283066,
0.258689820766449,
-0.03853308781981468,
0.2270074188709259,
-0.09708307683467865,
0.3727934956550598,
-0.28771114349365234,
-0.12759996950626373,
0.3427272140979767,
0.001309896819293499,
-0.11434634774923325,
0.18136808276176453,
0.07329137623310089,
-0.25954264402389526,
-0.1334352046251297,
0.12633754312992096,
-0.053252894431352615,
0.1774277687072754,
-0.024947967380285263,
0.18508093059062958,
0.044899266213178635,
-0.06426718831062317,
-0.19709427654743195,
-0.05584343895316124,
0.2796778082847595,
-0.056967418640851974,
-0.19294953346252441,
-0.1710069179534912,
-0.2457156628370285,
0.013700341805815697,
0.4553624093532562,
-0.010560215450823307,
0.04918619245290756,
-0.15994693338871002,
0.314818799495697,
0.2734244465827942,
0.09176819026470184,
-0.30662450194358826,
0.3136313855648041,
0.5716531872749329,
-0.24275876581668854,
-0.1982024908065796,
0.18663008511066437,
0.05613573268055916,
0.021846411749720573,
-0.07763957232236862,
0.5426533222198486,
-0.003519324352964759,
-0.4427117705345154,
-0.2567015290260315,
-0.19919271767139435
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
Hi @wumpusman
`datasets` has a caching mechanism that allows to cache the results of `.map` so that when you want to re-run it later it doesn't recompute it again.
So when you do `.map`, what actually happens is:
1. compute the hash used to identify your `map` for the cache
2. apply your function on every batch
This can explain the time difference between your different experiments.
The hash computation time depends of how complex your function is. For a tokenizer, the hash computation scans the lists of the words in the tokenizer to identify this tokenizer. Usually it takes 2-3 seconds.
Also note that you can disable caching though using
```python
import datasets
datasets.set_caching_enabled(False)
```
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 116 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
Hi @lhoestq ,
Thanks for the reply. It's entirely possible that is the issue. Since it's a side project I won't be looking at it till later this week, but, I'll verify it by disabling caching and hopefully I'll see the same runtime.
Appreciate the reference,
Michael
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 47 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
I believe this is an actual issue, tokenizing a ~4GB txt file went from an hour and a half to ~10 minutes when I switched from my pre-trained tokenizer(on the same dataset) to the default gpt2 tokenizer.
Both were loaded using:
```
AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
```
I trained the tokenizer using ByteLevelBPETokenizer from the Tokenizers library and save it to a tokenizer.json file.
I have tested the caching ideas above, changing the number of process, the TOKENIZERS_PARALLELISM env variable, keep_in_memory=True and batching with different sizes.
Apologies I can't really upload much code, but wanted to back up the finding and hopefully a fix/the problem can be found.
I will comment back if I find a fix as well.
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 117 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
Hi @johncookds do you think this can come from one tokenizer being faster than the other one ? Can you try to compare their speed without using `datasets` just to make sure ?
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 33 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
Hi yes, I'm closing the loop here with some timings below. The issue seems to be at least somewhat/mainly with the tokenizer's themselves. Moreover legacy saves of the trainer tokenizer perform faster but differently than the new tokenizer.json saves(note nothing about the training process/adding of special tokens changed between the top two trained tokenizer tests, only the way it was saved). This is only a 3x slowdown vs like a 10x but I think the slowdown is most likely due to this.
```
trained tokenizer - tokenizer.json save (same results for AutoTokenizer legacy_format=False):
Tokenizer time(seconds): 0.32767510414123535
Tokenized avg. length: 323.01
trained tokenizer - AutoTokenizer legacy_format=True:
Tokenizer time(seconds): 0.09258866310119629
Tokenized avg. length: 301.01
GPT2 Tokenizer from huggingface
Tokenizer time(seconds): 0.1010282039642334
Tokenized avg. length: 461.21
```
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 124 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
@lhoestq ,
Hi, which version of datasets has datasets.set_caching_enabled(False)? I get
module 'datasets' has no attribute 'set_caching_enabled'. To hopefully get around this, I reran my code on a new set of data, and did so only once.
@johncookds , thanks for chiming in, it looks this might be an issue of Tokenizer.
**Tokenizer**: The runtime of GPT2TokenizerFast.from_pretrained("gpt2") on 1000 chars is: **143 ms**
**SlowTokenizer**: The runtime of a locally saved and loaded Tokenizer using the same vocab on 1000 chars is: **4.43 s**
That being said, I compared performance on the map function:
Running Tokenizer versus using it in the map function for 1000 chars goes from **141 ms** to **356 ms**
Running SlowTokenizer versus using it in the map function for 1000 chars with a single element goes from **4.43 s** to **9.76 s**
I'm trying to figure out why the overhead of map would increase the time by double (figured it would be a fixed increase in time)? Though maybe this is expected behavior.
@lhoestq, do you by chance know how I can redirect this issue to Tokenizer?
Regards,
Michael
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 182 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
Thanks for the experiments @johncookds and @wumpusman !
> Hi, which version of datasets has datasets.set_caching_enabled(False)?
Currently you have to install `datasets` from source to have this feature, but this will be available in the next release in a few days.
> I'm trying to figure out why the overhead of map would increase the time by double (figured it would be a fixed increase in time)? Though maybe this is expected behavior.
Could you also try with double the number of characters ? This should let us have an idea of the fixed cost (hashing) and the dynamic cost (actual tokenization, grows with the size of the input)
> @lhoestq, do you by chance know how I can redirect this issue to Tokenizer?
Feel free to post an issue on the `transformers` repo. Also I'm sure there should be related issues so you can also look for someone with the same concerns on the `transformers` repo.
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 157 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
@lhoestq,
I just checked that previous run time was actually 3000 chars. I increased it to 6k chars, again, roughly double.
SlowTokenizer **7.4 s** to **15.7 s**
Tokenizer: **276 ms** to **616 ms**
I'll post this issue on Tokenizer, seems it hasn't quite been raised (albeit I noticed a similar issue that might relate).
Regards,
Michael
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 56 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1830
|
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
Hi,
I'm following up here as I found my exact issue. It was with saving and re-loading the tokenizer. When I trained then processed the data without saving and reloading it, it was 10x-100x faster than when I saved and re-loaded it.
Both resulted in the exact same tokenized datasets as well.
There is additionally a bug where the older legacy tokenizer save does not preserve a learned tokenizing behavior if trained from scratch.
Understand its not exactly Datasets related but hope it can help someone if they have the same issue.
Thanks!
|
This could total relate to me misunderstanding particular call functions, but I added words to a GPT2Tokenizer, and saved it to disk (note I'm only showing snippets but I can share more) and the map function ran much slower:
````
def save_tokenizer(original_tokenizer,text,path="simpledata/tokenizer"):
words_unique = set(text.split(" "))
for i in words_unique:
original_tokenizer.add_tokens(i)
original_tokenizer.save_pretrained(path)
tokenizer2 = GPT2Tokenizer.from_pretrained(os.path.join(experiment_path,experiment_name,"tokenizer_squad"))
train_set_baby=Dataset.from_dict({"text":[train_set["text"][0][0:50]]})
````
I then applied the dataset map function on a fairly small set of text:
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The run time for train_set_baby.map was 6 seconds, and the batch itself was 2.6 seconds
**100% 1/1 [00:02<00:00, 2.60s/ba] CPU times: user 5.96 s, sys: 36 ms, total: 5.99 s Wall time: 5.99 s**
In comparison using (even after adding additional tokens):
`
tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")`
```
%%time
train_set_baby = train_set_baby.map(lambda d:tokenizer2(d["text"]),batched=True)
```
The time is
**100% 1/1 [00:00<00:00, 34.09ba/s] CPU times: user 68.1 ms, sys: 16 µs, total: 68.1 ms Wall time: 62.9 ms**
It seems this might relate to the tokenizer save or load function, however, the issue appears to come up when I apply the loaded tokenizer to the map function.
I should also add that playing around with the amount of words I add to the tokenizer before I save it to disk and load it into memory appears to impact the time it takes to run the map function.
| 93 |
using map on loaded Tokenizer 10x - 100x slower than default Tokenizer?
|
[
-0.4560126066207886,
-0.17484420537948608,
-0.1641688346862793,
-0.0013459759065881371,
-0.011423827148973942,
-0.24170027673244476,
0.2954166829586029,
0.1235055923461914,
0.2569366693496704,
0.10728655755519867,
-0.030465861782431602,
0.5305996537208557,
-0.13481715321540833,
-0.3256402611732483,
-0.29361650347709656,
0.36006850004196167,
0.038944896310567856,
0.06327201426029205,
0.12292779982089996,
-0.0792679712176323,
-0.01544331107288599,
0.08131121844053268,
-0.19378167390823364,
0.2301616072654724,
-0.1314096450805664,
0.08193302154541016,
0.28530555963516235,
-0.20902511477470398,
-0.3264670670032501,
-0.5359255075454712,
-0.31257447600364685,
0.24694682657718658,
-0.263908326625824,
0.189099982380867,
-0.00010806482168845832,
0.11913546919822693,
0.20001763105392456,
0.25137364864349365,
0.30488836765289307,
0.252205491065979,
0.1282639354467392,
-0.15374794602394104,
-0.14001254737377167,
-0.1318110227584839,
0.022503547370433807,
-0.2713674008846283,
0.07951134443283081,
-0.09585538506507874,
0.029475480318069458,
-0.03213435411453247,
0.24576711654663086,
0.16784335672855377,
-0.505283772945404,
-0.022821661084890366,
-0.01633382961153984,
-0.03930092975497246,
0.04710426554083824,
-0.02256285771727562,
0.0463394857943058,
-0.01505151018500328,
-0.5028073787689209,
0.13369986414909363,
-0.14353013038635254,
-0.13909703493118286,
0.2767546772956848,
-0.018876226618885994,
0.3626179099082947,
0.16646429896354675,
0.27668505907058716,
0.11017429083585739,
0.0016626310534775257,
0.16626675426959991,
0.1639082282781601,
-0.08345675468444824,
-0.4143945574760437,
0.057722512632608414,
0.1871669590473175,
-0.39446595311164856,
-0.009041094221174717,
-0.15061147511005402,
-0.29901933670043945,
0.07609446346759796,
0.18309560418128967,
-0.02906062826514244,
-0.480989009141922,
0.5801984667778015,
0.04898988455533981,
0.0698230117559433,
0.05834735184907913,
-0.1453099101781845,
-0.24127507209777832,
-0.28520357608795166,
-0.2031279355287552,
0.2873234152793884,
-0.14304496347904205,
-0.071916364133358,
0.41571757197380066,
-0.3165750503540039,
-0.10214738547801971,
-0.07560810446739197,
0.08775082230567932,
0.5867578983306885,
0.09182500839233398,
0.008394390344619751,
0.1008521243929863,
0.19744549691677094,
-0.10937763750553131,
0.24309302866458893,
0.09810254722833633,
-0.17651723325252533,
-0.24553675949573517,
-0.011838182806968689,
-0.09430396556854248,
0.0737200453877449,
0.021672289818525314,
-0.17841479182243347,
-0.42755910754203796,
-0.02131892554461956,
0.17076586186885834,
0.0398513600230217,
-0.3288847804069519,
0.04419897124171257,
0.13496926426887512,
0.24274255335330963,
0.04225461184978485,
0.0011906800791621208,
-0.2960878014564514,
-0.16084860265254974,
-0.07507532835006714,
0.05792609974741936,
-0.12271295487880707,
-0.15557590126991272,
-0.14964060485363007,
-0.05796454846858978,
-0.2856617271900177,
0.16782858967781067,
0.13689972460269928,
0.04837207496166229,
-0.08649978041648865,
0.1983788013458252,
0.31001585721969604,
0.026242412626743317,
0.20023877918720245,
-0.08146344125270844,
-0.05831051617860794,
0.22291818261146545,
-0.035881564021110535,
-0.11878396570682526,
-0.27451127767562866,
0.08150769770145416,
-0.10672619193792343,
-0.12496157735586166,
0.2596428096294403,
0.24438342452049255,
0.002694939961656928,
0.09685947746038437,
-0.23557446897029877,
0.38101232051849365,
-0.0013964190147817135,
-0.213483065366745,
-0.13650278747081757,
0.005795773584395647,
-0.3517768979072571,
-0.0794929638504982,
-0.01091764960438013,
0.021410416811704636,
-0.023475850000977516,
-0.293256014585495,
0.23278965055942535,
0.1469634622335434,
0.30791905522346497,
0.3456469178199768,
-0.39305979013442993,
0.538583517074585,
-0.26069504022598267,
0.6153664588928223,
0.29082924127578735,
-0.20321206748485565,
-0.3628540337085724,
0.14736774563789368,
-0.3282339572906494,
0.05571339279413223,
-0.16746178269386292,
-0.07554794102907181,
0.6539739966392517,
0.03533082827925682,
0.39737752079963684,
0.08362473547458649,
0.30109378695487976,
0.2761613428592682,
-0.3982815444469452,
0.006503078620880842,
0.2292701005935669,
-0.08198055624961853,
-0.10336631536483765,
-0.06096121668815613,
-0.038061968982219696,
0.07182233780622482,
-0.04943803697824478,
-0.0495295375585556,
-0.08435194939374924,
0.010180512443184853,
-0.16575536131858826,
-0.25603917241096497,
-0.03313349559903145,
0.31888917088508606,
0.22104430198669434,
0.061142321676015854,
-0.14518919587135315,
0.11918297410011292,
0.41789257526397705,
0.0010805369820445776,
0.00634857127442956,
0.12422746419906616,
-0.1822933405637741,
0.0354122631251812,
0.23674677312374115,
0.06935275346040726,
0.08266908675432205,
0.18486300110816956,
0.18387183547019958,
-0.26783570647239685,
0.11284063011407852,
0.07503007352352142,
0.3812524676322937,
-0.3454056680202484,
-0.016817554831504822,
-0.01426660642027855,
-0.05520618334412575,
-0.2896844446659088,
0.03761907294392586,
0.011174449697136879,
-0.06846526265144348,
-0.009845996275544167,
0.20970883965492249,
0.24363091588020325,
-0.25927287340164185,
0.18896250426769257,
0.15649883449077606,
0.24990691244602203,
0.14460976421833038,
0.060331255197525024,
-0.01622370257973671,
-0.15381617844104767,
0.05096391588449478,
0.34710264205932617,
0.6605873703956604,
0.2882731556892395,
-0.015069517306983471,
-0.2154656946659088,
0.0682952031493187,
0.21621482074260712,
-0.020997272804379463,
-0.1760473996400833,
0.13011349737644196,
0.3859591484069824,
0.20369718968868256,
0.2566680610179901,
0.49824461340904236,
0.326596200466156,
0.30805703997612,
-0.13939642906188965,
-0.24157726764678955,
0.02850080467760563,
-0.16869258880615234,
-0.2698834538459778,
0.1039089784026146,
-0.4314892292022705,
0.010469263419508934,
0.06922273337841034,
0.21861940622329712,
-0.15338291227817535,
-0.08343915641307831,
-0.12300363928079605,
0.16392280161380768,
0.068766288459301,
-0.035797398537397385,
0.15467755496501923,
0.10903100669384003,
-0.11305377632379532,
-0.3878912031650543,
-0.24889163672924042,
0.0555168017745018,
0.03563474491238594,
0.08302313834428787,
-0.14019960165023804,
-0.035648636519908905,
0.1069914847612381,
0.46273717284202576,
-0.12323300540447235,
0.20219644904136658,
-0.36681753396987915,
0.16592860221862793,
-0.04413450509309769,
-0.1625365912914276,
0.24264580011367798,
0.026727735996246338,
0.11159058660268784,
0.07967165112495422,
0.05635644868016243,
-0.05528398975729942,
-0.21108229458332062,
-0.3664003312587738,
0.05922837555408478,
0.03500420227646828,
-0.09422650933265686,
0.04974917322397232,
0.03039702959358692,
-0.013672315515577793,
0.033940669149160385,
-0.5223492383956909,
0.2754300832748413,
0.18842101097106934,
-0.22139257192611694,
0.026139238849282265,
-0.2511647641658783,
-0.20357653498649597,
0.051789239048957825,
0.2507357597351074,
-0.28762292861938477,
-0.3116106390953064,
-0.11124487221240997,
-0.16517210006713867,
-0.12022961676120758,
0.08482073247432709,
0.18872971832752228,
0.336424320936203,
-0.11711280047893524,
-0.07611269503831863,
-0.0055711762979626656,
0.09602271020412445,
-0.03485460206866264,
-0.28058889508247375,
0.0944109559059143,
-0.260611355304718,
0.0629781186580658,
-0.34136080741882324,
-0.004755569156259298,
0.28703874349594116,
0.012912362813949585,
-0.10574613511562347,
-0.30459296703338623,
-0.24967403709888458,
0.3241114020347595,
0.11328818649053574,
-0.12750659883022308,
0.23705969750881195,
-0.25275084376335144,
0.22632022202014923,
0.0643838495016098,
-0.2742736339569092,
0.3670298755168915,
0.3026506006717682,
-0.2706092894077301,
0.17399244010448456,
-0.16652533411979675,
0.14258882403373718,
-0.27624911069869995,
-0.27767521142959595,
0.030922608450055122,
0.371037095785141,
0.22868311405181885,
0.6263567805290222,
-0.1650310903787613,
-0.024656588211655617,
0.03313002735376358,
-0.31307917833328247,
0.0012860739370808005,
-0.22521480917930603,
-0.024585697799921036,
0.03079274483025074,
0.1545601189136505,
-0.09797176718711853,
0.4561986029148102,
-0.07458596676588058,
-0.5703009963035583,
0.24013908207416534,
0.03588772937655449,
0.16855178773403168,
-0.193783700466156,
0.11767090111970901,
-0.09724098443984985,
-0.051540669053792953,
0.1851148158311844,
0.38123267889022827,
-0.4518844187259674,
-0.07608029991388321,
0.3624223470687866,
-0.275309681892395,
0.0329945832490921,
-0.42210865020751953,
-0.8447762131690979,
0.24952253699302673,
-0.6302562355995178,
0.10674436390399933,
-0.024235799908638,
0.2153705656528473,
0.04706144332885742,
-0.19167402386665344,
0.15923474729061127,
-0.22526295483112335,
0.3416881263256073,
0.05570416897535324,
0.09535442292690277,
0.22684338688850403,
-0.3859734535217285,
-0.17632542550563812,
-0.004783126525580883,
0.017185362055897713,
0.26051342487335205,
0.5714397430419922,
0.6629379987716675,
-0.1265747845172882,
-0.08197593688964844,
-0.4600093960762024,
-0.08896049112081528,
0.07527370750904083,
-0.019891535863280296,
-0.2671404182910919,
0.016817739233374596,
-0.1546000987291336,
0.0866299420595169,
-0.10497838258743286,
0.09577124565839767,
0.42820778489112854,
-0.3536025285720825,
-0.1336875706911087,
-0.14461497962474823,
-0.0538632869720459,
0.30893245339393616,
0.08478280901908875,
-0.0417000912129879,
0.19459430873394012,
0.22130724787712097,
0.04373331367969513,
-0.15809966623783112,
-0.14985711872577667,
0.4983547329902649,
-0.17553022503852844,
0.08495184034109116,
0.26554352045059204,
-0.16902799904346466,
0.24024927616119385,
0.13760705292224884,
0.17190134525299072,
-0.22083982825279236,
0.16344986855983734,
-0.1642817258834839,
0.49761489033699036,
0.2275451123714447,
0.016742702573537827,
-0.3284953534603119,
0.233766570687294,
-0.1367247998714447,
0.2518063485622406,
-0.30034855008125305,
0.3274517357349396,
-0.35835158824920654,
-0.29798293113708496,
0.3948521316051483,
0.29494509100914,
0.5922946929931641,
-0.12770166993141174,
0.06414178013801575,
0.11889441311359406,
0.18200694024562836,
-0.010776989161968231,
-0.4642290771007538,
-0.10323115438222885,
-0.29992061853408813,
0.09105595201253891,
0.2093275785446167,
-0.25201213359832764,
0.015246821567416191,
0.13559046387672424,
-0.011011811904609203,
-0.3754332661628723,
0.1583629697561264,
0.8671739101409912,
-0.004383428022265434,
0.4224931001663208,
0.355081170797348,
-0.29240715503692627,
0.2302270382642746,
0.1590864211320877,
0.23171007633209229,
0.0739787220954895,
0.016667688265442848,
0.1789548099040985,
-0.025931498035788536,
-0.34976446628570557,
-0.05913814529776573,
-0.1259760558605194,
-0.21662655472755432,
0.25321632623672485,
-0.0415407195687294,
0.2720441222190857,
-0.1601635217666626,
-0.059556424617767334,
-0.32722216844558716,
0.37751320004463196,
0.09199825674295425,
0.2681470513343811,
0.18477880954742432,
0.15109403431415558,
0.21266387403011322,
-0.4160768687725067,
-0.34069889783859253,
-0.12330605089664459,
-0.12500788271427155,
0.22831828892230988,
-0.2453930824995041,
-0.21021485328674316,
-0.37059706449508667,
0.21879908442497253,
0.44666141271591187,
-0.2314208745956421,
0.12970180809497833,
-0.0666448250412941,
-0.032872557640075684,
-0.07473159581422806,
0.1834000051021576,
-0.1428695023059845,
0.12056379020214081,
0.12932944297790527,
0.33574363589286804,
-0.20496152341365814,
0.01417251955717802,
0.39221441745758057,
0.054840151220560074,
-0.0963524580001831,
0.25279006361961365,
-0.526357114315033,
-0.27298128604888916,
-0.14134569466114044,
0.2152259796857834,
0.22143539786338806,
0.17833147943019867,
0.026941869407892227,
-0.1845354586839676,
-0.4546981155872345,
-0.026219166815280914,
0.44378969073295593,
-0.00003303477569716051,
-0.10728266090154648,
-0.17533931136131287,
0.04706292971968651,
-0.39486637711524963,
0.0713558942079544,
-0.2260819524526596,
-0.008575206622481346,
0.16133534908294678,
0.07947666943073273,
-0.4176044762134552,
0.22024014592170715,
-0.3376532196998596,
-0.24078837037086487,
0.03661399707198143,
0.07824662327766418,
-0.4720090627670288,
-0.23818574845790863,
-0.07734481990337372,
-0.0013083744561299682,
0.258696973323822,
0.17030557990074158,
-0.1767563819885254,
-0.3003121614456177,
0.15738432109355927,
0.134246826171875,
0.15066611766815186,
-0.281000554561615,
0.1094522476196289,
0.14849135279655457,
-0.1257959008216858,
-0.29379594326019287,
0.097523994743824,
0.05090713873505592,
-0.11849123984575272,
-0.5198538899421692,
0.2752076983451843,
-0.07690233737230301,
0.03611603006720543,
0.07122483849525452,
0.02163446880877018,
0.11389945447444916,
-0.03722508251667023,
0.041444726288318634,
-0.0025757255498319864,
-0.18988844752311707,
0.21569563448429108,
0.3941311836242676,
0.3366803824901581,
0.12216025590896606,
0.14230646193027496,
-0.10176420956850052,
0.06902337074279785,
0.25149619579315186,
-0.14561647176742554,
0.22733023762702942,
-0.10972471535205841,
-0.419539213180542,
0.09653537720441818,
0.24809718132019043,
-0.004737264942377806,
-0.3428748846054077,
0.3196908235549927,
-0.241275817155838,
0.2821047902107239,
0.03684092313051224,
0.2200368344783783,
0.07206357270479202,
0.2655692994594574,
0.0010014863219112158,
0.3243078291416168,
-0.25994667410850525,
-0.004776910878717899,
-0.17639079689979553,
-0.0998128280043602,
0.06764638423919678,
0.3649848401546478,
0.16321928799152374,
0.1769520342350006,
0.28235819935798645,
0.29523757100105286,
0.2521315813064575,
0.15199770033359528,
0.528968095779419,
-0.25734853744506836,
-0.31916001439094543,
0.20195068418979645,
0.5348562598228455,
-0.18863020837306976,
0.07656397670507431,
0.20713655650615692,
-0.08853207528591156,
0.060647182166576385,
-0.37508878111839294,
-0.00032324675703421235,
0.1771775633096695,
-0.43192461133003235,
-0.32586944103240967,
-0.16729071736335754,
-0.12405820935964584,
-0.11974166333675385,
0.37162891030311584,
0.0004284140304662287,
0.33721572160720825,
-0.30304473638534546,
-0.25548192858695984,
0.03674718737602234,
0.03683289885520935,
-0.12693263590335846,
-0.3494671583175659,
0.18908950686454773,
-0.2112797349691391,
0.3406183123588562,
-0.5161636471748352,
0.30226099491119385,
0.1225988045334816,
0.11537779122591019,
0.3080156445503235,
0.2796008586883545,
-0.13129055500030518,
-0.06944172829389572,
-0.31887781620025635,
-0.026943542063236237,
-0.15281742811203003,
0.31637778878211975,
0.18716788291931152,
-0.3893253207206726,
0.1331811100244522,
0.08896585553884506,
-0.35289886593818665,
-0.3854399621486664,
0.2638508081436157,
-0.3326946496963501,
0.5358512997627258,
-0.019945023581385612,
-0.003048146842047572,
0.129296213388443,
0.049822352826595306,
-0.00020108091121073812,
-0.11430106312036514,
-0.12106407433748245,
-0.2151595801115036,
0.03696328401565552,
0.19054867327213287,
-0.07149238139390945,
0.09149760752916336,
0.07333783060312271,
0.336378276348114,
-0.028889374807476997,
-0.03971560299396515,
-0.24756072461605072,
-0.2690976858139038,
-0.25195303559303284,
0.259099543094635,
-0.14936140179634094,
0.06102021783590317,
-0.11774113774299622,
0.20881925523281097,
0.254392147064209,
0.22817489504814148,
0.11585965752601624,
0.18433724343776703,
-0.12385585159063339,
-0.20563364028930664,
-0.08972764760255814,
0.5230104327201843,
-0.04582805559039116,
-0.15529538691043854,
-0.11718690395355225,
-0.4142722487449646,
0.4609817564487457,
-0.13405440747737885,
0.25499701499938965,
0.02179565466940403,
-0.1314159631729126,
-0.32149285078048706,
0.00844595581293106,
0.4315502941608429,
0.14425095915794373,
0.14064373075962067,
-0.10716193914413452,
-0.046250637620687485,
0.06927837431430817,
0.18207985162734985,
-0.047457173466682434,
0.09812958538532257,
0.19881345331668854,
-0.10209999233484268,
0.10903871059417725,
0.0045272610150277615,
-0.013308318331837654,
-0.08811027556657791,
0.29961463809013367,
0.027097994461655617,
-0.13739880919456482,
0.19222448766231537,
-0.06903718411922455,
0.17328345775604248,
-0.3446730673313141,
0.2363206148147583,
0.2356308102607727,
0.15287205576896667,
-0.1177869513630867,
-0.08276822417974472,
0.2495269775390625,
-0.5473095178604126,
-0.038302503526210785,
-0.04756108298897743,
-0.05785174295306206,
0.23906438052654266,
0.09603194147348404,
0.08265751600265503,
-0.22314922511577606,
0.33081865310668945,
-0.11965292692184448,
-0.10494311898946762,
0.103228859603405,
0.009177145548164845,
-0.12733207643032074,
-0.2424129694700241,
0.4646943211555481,
-0.13765619695186615,
-0.18898947536945343,
-0.18240946531295776,
0.09102427214384079
] |
https://github.com/huggingface/datasets/issues/1827
|
Regarding On-the-fly Data Loading
|
Hi @acul3
Issue #1776 talks about doing on-the-fly data pre-processing, which I think is solved in the next release as mentioned in the issue #1825. I also look forward to using this feature, though :)
I wanted to ask about on-the-fly data loading from the cache (before pre-processing).
|
Hi,
I was wondering if it is possible to load images/texts as a batch during the training process, without loading the entire dataset on the RAM at any given point.
Thanks,
Gunjan
| 48 |
Regarding On-the-fly Data Loading
|
[
-0.001850705943070352,
-0.1540733128786087,
-0.25099483132362366,
0.1809520572423935,
-0.05238872021436691,
-0.1357729583978653,
0.3377818763256073,
-0.11969885975122452,
0.2681141793727875,
0.203615203499794,
-0.044978197664022446,
-0.011815596371889114,
0.032360758632421494,
0.5714786648750305,
0.09037373960018158,
0.4435163140296936,
0.16708186268806458,
0.142952561378479,
-0.1474616378545761,
-0.06424378603696823,
-0.19660912454128265,
-0.08126552402973175,
-0.01272567454725504,
-0.17291055619716644,
-0.04030961915850639,
-0.09059248119592667,
-0.13306623697280884,
0.30992865562438965,
-0.17954778671264648,
-0.14830836653709412,
0.054096922278404236,
0.16095007956027985,
0.25217220187187195,
0.3135119676589966,
-0.00010293762170476839,
0.12576112151145935,
0.037233900278806686,
-0.16142390668392181,
-0.5015200972557068,
0.28154945373535156,
0.010418138466775417,
-0.2220998853445053,
0.04107271134853363,
-0.40832066535949707,
0.0409163236618042,
0.13491860032081604,
-0.09783761203289032,
-0.37607574462890625,
0.3148607015609741,
-0.3495037257671356,
0.3327738642692566,
0.0357140488922596,
-0.1331462562084198,
-0.08166694641113281,
0.10589655488729477,
0.08600348979234695,
0.11524557322263718,
0.3809763789176941,
0.4913454055786133,
0.027332086116075516,
0.08327503502368927,
0.06554048508405685,
-0.1849745512008667,
-0.1981639713048935,
0.24132660031318665,
-0.10486362874507904,
0.15995018184185028,
0.00704913167282939,
-0.019378935918211937,
0.06271133571863174,
0.38724541664123535,
-0.016511762514710426,
-0.3942984938621521,
-0.2356787621974945,
-0.03750592842698097,
-0.1143837571144104,
-0.033166270703077316,
0.03949953243136406,
-0.18041671812534332,
0.23356890678405762,
-0.0030625115614384413,
-0.3546031713485718,
-0.1645839363336563,
-0.007492655888199806,
-0.2065761238336563,
-0.036443013697862625,
-0.07079241424798965,
-0.12030225992202759,
-0.14784742891788483,
0.08493360877037048,
0.09320569038391113,
-0.2906516194343567,
0.08324499428272247,
0.2809731960296631,
-0.059128835797309875,
-0.3121558427810669,
-0.31733691692352295,
-0.016462653875350952,
0.09483946859836578,
-0.1036798357963562,
0.5197537541389465,
0.16253036260604858,
-0.14148524403572083,
0.014956776052713394,
0.4073672592639923,
-0.11192408949136734,
-0.0319615863263607,
-0.5605535507202148,
0.2146996706724167,
-0.1827658861875534,
-0.012762127444148064,
-0.00495434133335948,
-0.1429397314786911,
0.16948822140693665,
-0.24553905427455902,
-0.31479594111442566,
0.02219286747276783,
-0.10501422733068466,
-0.05971899256110191,
0.13974222540855408,
0.3219016194343567,
-0.057151176035404205,
-0.2480098456144333,
0.14883238077163696,
-0.10059621930122375,
-0.06973515450954437,
0.40163227915763855,
-0.05975694954395294,
0.08592159301042557,
-0.309415340423584,
-0.13959085941314697,
-0.13155846297740936,
-0.05567840486764908,
0.25215017795562744,
-0.056172437965869904,
0.22544026374816895,
-0.06095234677195549,
-0.17471708357334137,
-0.16396695375442505,
-0.03429881110787392,
-0.05179990828037262,
-0.1757654994726181,
-0.12019670009613037,
0.11954660713672638,
-0.08742980659008026,
-0.21019084751605988,
-0.17459183931350708,
0.21083232760429382,
-0.12993918359279633,
0.4427999258041382,
-0.23493002355098724,
-0.22213543951511383,
0.1481703519821167,
0.317064493894577,
-0.21055695414543152,
-0.25606265664100647,
-0.07942081987857819,
0.1790192872285843,
0.02999613620340824,
-0.27552103996276855,
0.16738268733024597,
0.3659402132034302,
-0.03392030671238899,
-0.13436193764209747,
-0.1479702889919281,
0.5773457884788513,
-0.45833101868629456,
-0.09443244338035583,
0.12685658037662506,
-0.23396103084087372,
-0.13578040897846222,
-0.021137062460184097,
-0.24475683271884918,
0.23372088372707367,
0.09071773290634155,
-0.24417632818222046,
0.38505858182907104,
-0.10247396677732468,
-0.07538571208715439,
0.3772061765193939,
-0.3322226107120514,
-0.034992609173059464,
0.15923014283180237,
0.3876708447933197,
0.04301998391747475,
-0.10097882896661758,
0.15641579031944275,
0.48347994685173035,
0.3409915566444397,
-0.0145914601162076,
-0.2708888053894043,
-0.36888134479522705,
-0.25952836871147156,
0.30493810772895813,
-0.1461111456155777,
0.26840272545814514,
0.17627453804016113,
-0.06501303613185883,
0.1294640153646469,
0.09549010545015335,
0.024173753336071968,
0.047947101294994354,
-0.08825037628412247,
0.2509589195251465,
0.013378928415477276,
0.3478861153125763,
-0.4062919616699219,
0.16521620750427246,
-0.11926046013832092,
-0.0846286341547966,
0.11156247556209564,
-0.15236394107341766,
0.00877747405320406,
0.23087336122989655,
0.22307898104190826,
0.40475741028785706,
0.28889918327331543,
0.12355227768421173,
-0.20786415040493011,
-0.03700665384531021,
-0.34928444027900696,
0.15999412536621094,
-0.3378615379333496,
0.057716790586709976,
0.003516093362122774,
0.21875464916229248,
0.3118661642074585,
-0.001057169632986188,
-0.1446293741464615,
-0.027321822941303253,
-0.17524583637714386,
0.056713394820690155,
0.16473610699176788,
0.20615103840827942,
0.05361534655094147,
0.39418336749076843,
0.04688982293009758,
0.3274383842945099,
0.09731663763523102,
0.3450370728969574,
0.34374141693115234,
-0.1283251941204071,
0.32728561758995056,
-0.05813106149435043,
-0.2601081430912018,
0.5050320625305176,
-0.26068800687789917,
0.10083908587694168,
0.07915240526199341,
-0.3126014769077301,
0.1489090472459793,
-0.12903647124767303,
0.03964382782578468,
-0.08657406270503998,
0.08300924301147461,
0.34367120265960693,
0.42721372842788696,
0.1223621517419815,
-0.11968011409044266,
0.13078148663043976,
-0.04152919352054596,
-0.17729590833187103,
0.04031192138791084,
0.010612822137773037,
-0.11115938425064087,
-0.13564811646938324,
0.08287062495946884,
0.03819456696510315,
0.4502558708190918,
0.29920414090156555,
0.058871764689683914,
0.06968194991350174,
0.3853648602962494,
-0.22202381491661072,
0.2259625941514969,
0.02722649648785591,
0.20065024495124817,
0.21355219185352325,
0.016296813264489174,
0.20785066485404968,
-0.2041216343641281,
-0.03078085370361805,
0.1803559958934784,
-0.12606807053089142,
-0.016139063984155655,
-0.08775319159030914,
-0.018560901284217834,
-0.15270301699638367,
0.07325776666402817,
-0.4188930094242096,
-0.0328889824450016,
-0.1539495438337326,
0.16722311079502106,
0.09138669818639755,
-0.15932297706604004,
-0.3097028136253357,
-0.193868950009346,
0.8121941089630127,
-0.1260974109172821,
-0.30328434705734253,
-0.16564151644706726,
-0.32599499821662903,
0.19543157517910004,
0.21445871889591217,
0.23623119294643402,
-0.14027442038059235,
0.24339286983013153,
0.08836095780134201,
0.1437482237815857,
0.051375944167375565,
-0.01911141909658909,
0.12428513914346695,
0.20057427883148193,
-0.04341050237417221,
-0.2662789821624756,
0.016038447618484497,
0.22477658092975616,
0.02992098405957222,
-0.03546212986111641,
-0.1977899819612503,
-0.07600601762533188,
-0.16578103601932526,
0.2445613145828247,
-0.03371499478816986,
-0.11678627133369446,
0.14038637280464172,
-0.5389857888221741,
-0.26931408047676086,
0.10678529739379883,
0.27781176567077637,
0.08451119810342789,
-0.07764691114425659,
-0.14752960205078125,
-0.2009686976671219,
0.07590705156326294,
0.26281458139419556,
-0.4133981764316559,
-0.3852900266647339,
0.015411416068673134,
-0.11914678663015366,
-0.1694890856742859,
-0.14589911699295044,
0.054141510277986526,
0.09771907329559326,
0.2802717089653015,
-0.6158261895179749,
-0.30616289377212524,
0.11916959285736084,
0.0022005601786077023,
-0.33941951394081116,
-0.08557461202144623,
0.3495987057685852,
-0.1802341490983963,
-0.2552040219306946,
-0.08741870522499084,
0.038094308227300644,
0.08397974073886871,
-0.02580072358250618,
-0.31004196405410767,
0.17615674436092377,
0.17769792675971985,
-0.11262243986129761,
0.48979902267456055,
-0.22893399000167847,
-0.18961915373802185,
0.36750680208206177,
0.1877664029598236,
0.41876816749572754,
-0.1539265662431717,
0.2652629315853119,
-0.23768243193626404,
-0.10576433688402176,
-0.04157242923974991,
0.3125360608100891,
0.0297426488250494,
-0.2651462256908417,
-0.4264393448829651,
-0.06729753315448761,
-0.438142865896225,
-0.14111854135990143,
0.11711200326681137,
-0.09334251284599304,
0.09043668955564499,
0.14090174436569214,
0.1717672049999237,
-0.2369520217180252,
-0.16038165986537933,
-0.01314918790012598,
0.20733515918254852,
0.39288005232810974,
-0.14951041340827942,
-0.0026358929462730885,
0.2149050235748291,
-0.12748637795448303,
0.3017483949661255,
-0.17849844694137573,
0.29697224497795105,
0.07390426844358444,
-0.4587722420692444,
0.3459339737892151,
-0.12385743111371994,
0.2854901850223541,
0.20022495090961456,
0.05502166226506233,
0.04212672635912895,
-0.31739747524261475,
0.0023618664126843214,
0.09644720703363419,
-0.020328285172581673,
-0.15692080557346344,
0.04854903370141983,
0.2951960861682892,
-0.06855372339487076,
-0.07463786751031876,
-0.01109139434993267,
0.03172833472490311,
-0.19660694897174835,
-0.44388511776924133,
-0.09554366022348404,
0.013019420206546783,
-0.28251615166664124,
-0.0686316266655922,
-0.3819204568862915,
-0.25826162099838257,
0.016444994136691093,
-0.07952731102705002,
-0.42623138427734375,
0.3764132559299469,
-0.10269929468631744,
-0.021941114217042923,
-0.22961454093456268,
-0.009198195300996304,
0.18099701404571533,
0.0842461958527565,
0.2057851254940033,
0.000038724108890164644,
0.4576880931854248,
-0.08030295372009277,
0.05143639072775841,
0.12535309791564941,
0.019335048273205757,
0.12232910096645355,
0.42592111229896545,
0.43858587741851807,
0.2037048041820526,
-0.04359830915927887,
-0.07485879212617874,
-0.414788156747818,
-0.17994529008865356,
-0.06235702708363533,
-0.23205237090587616,
-0.20730198919773102,
-0.33480870723724365,
0.6488542556762695,
-0.14060646295547485,
-0.14765962958335876,
0.18370956182479858,
-0.15350402891635895,
-0.12616686522960663,
0.2854412794113159,
0.18101949989795685,
1.1262370347976685,
-0.07150395959615707,
0.16802674531936646,
-0.029912518337368965,
-0.07298815995454788,
0.2513878047466278,
-0.42538216710090637,
-0.1305183470249176,
-0.2929198741912842,
0.02101575769484043,
-0.16235680878162384,
-0.05666708946228027,
-0.172318696975708,
0.3976161777973175,
0.051328763365745544,
-0.1138056069612503,
0.10273314267396927,
0.1553013026714325,
-0.037166137248277664,
0.12591376900672913,
-0.033817872405052185,
-0.1666099727153778,
-0.24444590508937836,
0.2810560464859009,
0.29003429412841797,
0.22147482633590698,
-0.3651617467403412,
0.09377036988735199,
0.10565751791000366,
-0.05643341690301895,
0.15810568630695343,
-0.06626369804143906,
-0.12478861212730408,
0.02522032894194126,
-0.3178071975708008,
-0.1613295078277588,
-0.5683609843254089,
-0.1550835371017456,
-0.02285461500287056,
0.09815268963575363,
0.0804842859506607,
-0.26990893483161926,
-0.10686825215816498,
0.21949706971645355,
-0.060522619634866714,
0.018781354650855064,
0.2862001061439514,
-0.20399703085422516,
-0.019866663962602615,
0.09581974148750305,
-0.13215704262256622,
-0.4604305922985077,
-0.03807538375258446,
0.26930567622184753,
0.19088071584701538,
-0.3339502215385437,
0.044475920498371124,
0.1411474198102951,
0.05364741012454033,
-0.003875170834362507,
0.21165500581264496,
0.31842848658561707,
0.09513156116008759,
0.2547872066497803,
-0.015736926347017288,
-0.2509012818336487,
-0.30575576424598694,
0.5453650951385498,
0.042249199002981186,
-0.15384647250175476,
0.0765654593706131,
-0.3431686758995056,
-0.2554202079772949,
-0.3422927260398865,
0.12983696162700653,
-0.060135118663311005,
-0.18001551926136017,
0.035400453954935074,
-0.01820916309952736,
-0.046506647020578384,
0.030781306326389313,
0.32399827241897583,
0.4133855998516083,
0.003910535015165806,
-0.11821746081113815,
-0.5684611797332764,
-0.23615720868110657,
0.43401652574539185,
0.28296729922294617,
0.14710426330566406,
0.36447474360466003,
-0.18631049990653992,
-0.07121893018484116,
0.10757976770401001,
-0.5170841217041016,
0.12983210384845734,
0.21086755394935608,
-0.01663738675415516,
0.14610160887241364,
-0.05157746002078056,
-0.12305409461259842,
0.005326061975210905,
0.2835102379322052,
-0.07334920763969421,
-0.1073419377207756,
-0.3775842487812042,
0.18103386461734772,
0.1533733457326889,
-0.025649424642324448,
0.05768544226884842,
-0.13479366898536682,
-0.2475588470697403,
-0.08299557119607925,
0.03507744520902634,
0.16875556111335754,
0.07764871418476105,
-0.1909145712852478,
-0.4175099730491638,
0.22716188430786133,
0.5227140188217163,
-0.48262467980384827,
0.5320774912834167,
0.26159584522247314,
0.3617899417877197,
-0.06921306997537613,
0.045198820531368256,
-0.1610857993364334,
-0.07149529457092285,
0.312633216381073,
0.2536408007144928,
0.45447224378585815,
-0.12937548756599426,
0.3323850929737091,
-0.13185064494609833,
0.14436650276184082,
-0.059047993272542953,
0.15802162885665894,
0.49393850564956665,
-0.24336197972297668,
-0.00026498359511606395,
0.24281735718250275,
0.3066380023956299,
-0.14736589789390564,
-0.2792951464653015,
-0.11446595937013626,
-0.24005486071109772,
0.062022894620895386,
0.3774091601371765,
0.5768880248069763,
-0.06764934957027435,
0.13604027032852173,
-0.07218054682016373,
0.09590760618448257,
0.0630023255944252,
-0.08520611375570297,
0.36902183294296265,
-0.017732756212353706,
0.13631732761859894,
0.09408614784479141,
0.5471500158309937,
0.1016215831041336,
-0.023041434586048126,
-0.08137475699186325,
0.2564464807510376,
0.026250846683979034,
0.10732870548963547,
-0.3377079367637634,
-0.6262373328208923,
0.37276163697242737,
0.384759783744812,
-0.006820312235504389,
0.2828035056591034,
-0.030313290655612946,
-0.037136826664209366,
-0.2153957039117813,
0.271806001663208,
-0.3402675986289978,
0.15287573635578156,
-0.17403826117515564,
0.1640099436044693,
-0.043131038546562195,
-0.33293968439102173,
-0.2676611542701721,
0.037839945405721664,
-0.10675228387117386,
-0.22106003761291504,
0.1184544563293457,
-0.066092349588871,
0.04591238871216774,
0.05982871726155281,
-0.04143497720360756,
0.1899447739124298,
0.0261820200830698,
-0.3552156984806061,
0.157009556889534,
0.11099396646022797,
0.3325386643409729,
0.3872096836566925,
0.06876587867736816,
-0.08468101173639297,
0.05691218748688698,
-0.0030631436966359615,
0.027283500880002975,
0.05408995598554611,
-0.027155954390764236,
-0.326718270778656,
0.28034693002700806,
0.17603278160095215,
0.0852154865860939,
0.45911821722984314,
0.2730119824409485,
-0.3703368604183197,
0.10508245974779129,
0.15631404519081116,
-0.16655698418617249,
-0.25465354323387146,
0.33128923177719116,
0.31613120436668396,
-0.15507449209690094,
-0.06085497885942459,
-0.06365600228309631,
-0.30853015184402466,
-0.1526402086019516,
-0.13695724308490753,
-0.2984392046928406,
0.07757638394832611,
0.3709423542022705,
0.1518935114145279,
0.1040818840265274,
0.39893731474876404,
0.18142499029636383,
0.07909951359033585,
0.03318838030099869,
-0.26430872082710266,
-0.3894730508327484,
0.11897487938404083,
0.24900993704795837,
-0.10516304522752762,
-0.20806778967380524,
-0.0804617628455162,
0.4407903850078583,
0.386912077665329,
-0.21553310751914978,
-0.24892815947532654,
0.051694173365831375,
0.03320934996008873,
-0.1357755810022354,
0.03342926502227783,
0.11199427396059036,
0.1009034812450409,
-0.1555829793214798,
-0.36341580748558044,
0.12908823788166046,
0.03279855102300644,
0.20438812673091888,
0.1315397173166275,
-0.06925258785486221,
-0.2924087941646576,
-0.00033905296004377306,
0.7840610146522522,
-0.2751186192035675,
0.3421649932861328,
-0.2024056315422058,
-0.22901654243469238,
-0.06561961770057678,
-0.11591707915067673,
-0.20444832742214203,
0.0928022712469101,
0.06981545686721802,
-0.4232424795627594,
-0.003434268059208989,
0.005182951223105192,
0.20844542980194092,
-0.1784360706806183,
-0.1380523145198822,
0.007789777126163244,
-0.06773386895656586,
-0.132843479514122,
-0.2156914323568344,
0.015366367064416409,
0.12350796163082123,
0.339915007352829,
0.04579820856451988,
0.012300736270844936,
-0.0899239182472229,
0.15876001119613647,
0.2905883193016052,
0.16410012543201447,
0.15580950677394867,
-0.2158190906047821,
0.20264984667301178,
-0.09498954564332962,
0.16459816694259644,
-0.0067986552603542805,
0.22334665060043335,
0.42040905356407166,
-0.1472199410200119,
0.2557486891746521,
0.35596439242362976,
-0.07940007001161575,
-0.2761705219745636,
-0.1701788753271103,
0.3246493339538574,
0.0007023646030575037,
-0.07676295191049576,
-0.5106707215309143,
-0.4193785786628723
] |
https://github.com/huggingface/datasets/issues/1827
|
Regarding On-the-fly Data Loading
|
Hi ! Currently when you load a dataset via `load_dataset` for example, then the dataset is memory-mapped from an Arrow file on disk. Therefore there's almost no RAM usage even if your dataset contains TB of data.
Usually at training time only one batch of data at a time is loaded in memory.
Does that answer your question or were you thinking about something else ?
|
Hi,
I was wondering if it is possible to load images/texts as a batch during the training process, without loading the entire dataset on the RAM at any given point.
Thanks,
Gunjan
| 66 |
Regarding On-the-fly Data Loading
|
[
-0.001850705943070352,
-0.1540733128786087,
-0.25099483132362366,
0.1809520572423935,
-0.05238872021436691,
-0.1357729583978653,
0.3377818763256073,
-0.11969885975122452,
0.2681141793727875,
0.203615203499794,
-0.044978197664022446,
-0.011815596371889114,
0.032360758632421494,
0.5714786648750305,
0.09037373960018158,
0.4435163140296936,
0.16708186268806458,
0.142952561378479,
-0.1474616378545761,
-0.06424378603696823,
-0.19660912454128265,
-0.08126552402973175,
-0.01272567454725504,
-0.17291055619716644,
-0.04030961915850639,
-0.09059248119592667,
-0.13306623697280884,
0.30992865562438965,
-0.17954778671264648,
-0.14830836653709412,
0.054096922278404236,
0.16095007956027985,
0.25217220187187195,
0.3135119676589966,
-0.00010293762170476839,
0.12576112151145935,
0.037233900278806686,
-0.16142390668392181,
-0.5015200972557068,
0.28154945373535156,
0.010418138466775417,
-0.2220998853445053,
0.04107271134853363,
-0.40832066535949707,
0.0409163236618042,
0.13491860032081604,
-0.09783761203289032,
-0.37607574462890625,
0.3148607015609741,
-0.3495037257671356,
0.3327738642692566,
0.0357140488922596,
-0.1331462562084198,
-0.08166694641113281,
0.10589655488729477,
0.08600348979234695,
0.11524557322263718,
0.3809763789176941,
0.4913454055786133,
0.027332086116075516,
0.08327503502368927,
0.06554048508405685,
-0.1849745512008667,
-0.1981639713048935,
0.24132660031318665,
-0.10486362874507904,
0.15995018184185028,
0.00704913167282939,
-0.019378935918211937,
0.06271133571863174,
0.38724541664123535,
-0.016511762514710426,
-0.3942984938621521,
-0.2356787621974945,
-0.03750592842698097,
-0.1143837571144104,
-0.033166270703077316,
0.03949953243136406,
-0.18041671812534332,
0.23356890678405762,
-0.0030625115614384413,
-0.3546031713485718,
-0.1645839363336563,
-0.007492655888199806,
-0.2065761238336563,
-0.036443013697862625,
-0.07079241424798965,
-0.12030225992202759,
-0.14784742891788483,
0.08493360877037048,
0.09320569038391113,
-0.2906516194343567,
0.08324499428272247,
0.2809731960296631,
-0.059128835797309875,
-0.3121558427810669,
-0.31733691692352295,
-0.016462653875350952,
0.09483946859836578,
-0.1036798357963562,
0.5197537541389465,
0.16253036260604858,
-0.14148524403572083,
0.014956776052713394,
0.4073672592639923,
-0.11192408949136734,
-0.0319615863263607,
-0.5605535507202148,
0.2146996706724167,
-0.1827658861875534,
-0.012762127444148064,
-0.00495434133335948,
-0.1429397314786911,
0.16948822140693665,
-0.24553905427455902,
-0.31479594111442566,
0.02219286747276783,
-0.10501422733068466,
-0.05971899256110191,
0.13974222540855408,
0.3219016194343567,
-0.057151176035404205,
-0.2480098456144333,
0.14883238077163696,
-0.10059621930122375,
-0.06973515450954437,
0.40163227915763855,
-0.05975694954395294,
0.08592159301042557,
-0.309415340423584,
-0.13959085941314697,
-0.13155846297740936,
-0.05567840486764908,
0.25215017795562744,
-0.056172437965869904,
0.22544026374816895,
-0.06095234677195549,
-0.17471708357334137,
-0.16396695375442505,
-0.03429881110787392,
-0.05179990828037262,
-0.1757654994726181,
-0.12019670009613037,
0.11954660713672638,
-0.08742980659008026,
-0.21019084751605988,
-0.17459183931350708,
0.21083232760429382,
-0.12993918359279633,
0.4427999258041382,
-0.23493002355098724,
-0.22213543951511383,
0.1481703519821167,
0.317064493894577,
-0.21055695414543152,
-0.25606265664100647,
-0.07942081987857819,
0.1790192872285843,
0.02999613620340824,
-0.27552103996276855,
0.16738268733024597,
0.3659402132034302,
-0.03392030671238899,
-0.13436193764209747,
-0.1479702889919281,
0.5773457884788513,
-0.45833101868629456,
-0.09443244338035583,
0.12685658037662506,
-0.23396103084087372,
-0.13578040897846222,
-0.021137062460184097,
-0.24475683271884918,
0.23372088372707367,
0.09071773290634155,
-0.24417632818222046,
0.38505858182907104,
-0.10247396677732468,
-0.07538571208715439,
0.3772061765193939,
-0.3322226107120514,
-0.034992609173059464,
0.15923014283180237,
0.3876708447933197,
0.04301998391747475,
-0.10097882896661758,
0.15641579031944275,
0.48347994685173035,
0.3409915566444397,
-0.0145914601162076,
-0.2708888053894043,
-0.36888134479522705,
-0.25952836871147156,
0.30493810772895813,
-0.1461111456155777,
0.26840272545814514,
0.17627453804016113,
-0.06501303613185883,
0.1294640153646469,
0.09549010545015335,
0.024173753336071968,
0.047947101294994354,
-0.08825037628412247,
0.2509589195251465,
0.013378928415477276,
0.3478861153125763,
-0.4062919616699219,
0.16521620750427246,
-0.11926046013832092,
-0.0846286341547966,
0.11156247556209564,
-0.15236394107341766,
0.00877747405320406,
0.23087336122989655,
0.22307898104190826,
0.40475741028785706,
0.28889918327331543,
0.12355227768421173,
-0.20786415040493011,
-0.03700665384531021,
-0.34928444027900696,
0.15999412536621094,
-0.3378615379333496,
0.057716790586709976,
0.003516093362122774,
0.21875464916229248,
0.3118661642074585,
-0.001057169632986188,
-0.1446293741464615,
-0.027321822941303253,
-0.17524583637714386,
0.056713394820690155,
0.16473610699176788,
0.20615103840827942,
0.05361534655094147,
0.39418336749076843,
0.04688982293009758,
0.3274383842945099,
0.09731663763523102,
0.3450370728969574,
0.34374141693115234,
-0.1283251941204071,
0.32728561758995056,
-0.05813106149435043,
-0.2601081430912018,
0.5050320625305176,
-0.26068800687789917,
0.10083908587694168,
0.07915240526199341,
-0.3126014769077301,
0.1489090472459793,
-0.12903647124767303,
0.03964382782578468,
-0.08657406270503998,
0.08300924301147461,
0.34367120265960693,
0.42721372842788696,
0.1223621517419815,
-0.11968011409044266,
0.13078148663043976,
-0.04152919352054596,
-0.17729590833187103,
0.04031192138791084,
0.010612822137773037,
-0.11115938425064087,
-0.13564811646938324,
0.08287062495946884,
0.03819456696510315,
0.4502558708190918,
0.29920414090156555,
0.058871764689683914,
0.06968194991350174,
0.3853648602962494,
-0.22202381491661072,
0.2259625941514969,
0.02722649648785591,
0.20065024495124817,
0.21355219185352325,
0.016296813264489174,
0.20785066485404968,
-0.2041216343641281,
-0.03078085370361805,
0.1803559958934784,
-0.12606807053089142,
-0.016139063984155655,
-0.08775319159030914,
-0.018560901284217834,
-0.15270301699638367,
0.07325776666402817,
-0.4188930094242096,
-0.0328889824450016,
-0.1539495438337326,
0.16722311079502106,
0.09138669818639755,
-0.15932297706604004,
-0.3097028136253357,
-0.193868950009346,
0.8121941089630127,
-0.1260974109172821,
-0.30328434705734253,
-0.16564151644706726,
-0.32599499821662903,
0.19543157517910004,
0.21445871889591217,
0.23623119294643402,
-0.14027442038059235,
0.24339286983013153,
0.08836095780134201,
0.1437482237815857,
0.051375944167375565,
-0.01911141909658909,
0.12428513914346695,
0.20057427883148193,
-0.04341050237417221,
-0.2662789821624756,
0.016038447618484497,
0.22477658092975616,
0.02992098405957222,
-0.03546212986111641,
-0.1977899819612503,
-0.07600601762533188,
-0.16578103601932526,
0.2445613145828247,
-0.03371499478816986,
-0.11678627133369446,
0.14038637280464172,
-0.5389857888221741,
-0.26931408047676086,
0.10678529739379883,
0.27781176567077637,
0.08451119810342789,
-0.07764691114425659,
-0.14752960205078125,
-0.2009686976671219,
0.07590705156326294,
0.26281458139419556,
-0.4133981764316559,
-0.3852900266647339,
0.015411416068673134,
-0.11914678663015366,
-0.1694890856742859,
-0.14589911699295044,
0.054141510277986526,
0.09771907329559326,
0.2802717089653015,
-0.6158261895179749,
-0.30616289377212524,
0.11916959285736084,
0.0022005601786077023,
-0.33941951394081116,
-0.08557461202144623,
0.3495987057685852,
-0.1802341490983963,
-0.2552040219306946,
-0.08741870522499084,
0.038094308227300644,
0.08397974073886871,
-0.02580072358250618,
-0.31004196405410767,
0.17615674436092377,
0.17769792675971985,
-0.11262243986129761,
0.48979902267456055,
-0.22893399000167847,
-0.18961915373802185,
0.36750680208206177,
0.1877664029598236,
0.41876816749572754,
-0.1539265662431717,
0.2652629315853119,
-0.23768243193626404,
-0.10576433688402176,
-0.04157242923974991,
0.3125360608100891,
0.0297426488250494,
-0.2651462256908417,
-0.4264393448829651,
-0.06729753315448761,
-0.438142865896225,
-0.14111854135990143,
0.11711200326681137,
-0.09334251284599304,
0.09043668955564499,
0.14090174436569214,
0.1717672049999237,
-0.2369520217180252,
-0.16038165986537933,
-0.01314918790012598,
0.20733515918254852,
0.39288005232810974,
-0.14951041340827942,
-0.0026358929462730885,
0.2149050235748291,
-0.12748637795448303,
0.3017483949661255,
-0.17849844694137573,
0.29697224497795105,
0.07390426844358444,
-0.4587722420692444,
0.3459339737892151,
-0.12385743111371994,
0.2854901850223541,
0.20022495090961456,
0.05502166226506233,
0.04212672635912895,
-0.31739747524261475,
0.0023618664126843214,
0.09644720703363419,
-0.020328285172581673,
-0.15692080557346344,
0.04854903370141983,
0.2951960861682892,
-0.06855372339487076,
-0.07463786751031876,
-0.01109139434993267,
0.03172833472490311,
-0.19660694897174835,
-0.44388511776924133,
-0.09554366022348404,
0.013019420206546783,
-0.28251615166664124,
-0.0686316266655922,
-0.3819204568862915,
-0.25826162099838257,
0.016444994136691093,
-0.07952731102705002,
-0.42623138427734375,
0.3764132559299469,
-0.10269929468631744,
-0.021941114217042923,
-0.22961454093456268,
-0.009198195300996304,
0.18099701404571533,
0.0842461958527565,
0.2057851254940033,
0.000038724108890164644,
0.4576880931854248,
-0.08030295372009277,
0.05143639072775841,
0.12535309791564941,
0.019335048273205757,
0.12232910096645355,
0.42592111229896545,
0.43858587741851807,
0.2037048041820526,
-0.04359830915927887,
-0.07485879212617874,
-0.414788156747818,
-0.17994529008865356,
-0.06235702708363533,
-0.23205237090587616,
-0.20730198919773102,
-0.33480870723724365,
0.6488542556762695,
-0.14060646295547485,
-0.14765962958335876,
0.18370956182479858,
-0.15350402891635895,
-0.12616686522960663,
0.2854412794113159,
0.18101949989795685,
1.1262370347976685,
-0.07150395959615707,
0.16802674531936646,
-0.029912518337368965,
-0.07298815995454788,
0.2513878047466278,
-0.42538216710090637,
-0.1305183470249176,
-0.2929198741912842,
0.02101575769484043,
-0.16235680878162384,
-0.05666708946228027,
-0.172318696975708,
0.3976161777973175,
0.051328763365745544,
-0.1138056069612503,
0.10273314267396927,
0.1553013026714325,
-0.037166137248277664,
0.12591376900672913,
-0.033817872405052185,
-0.1666099727153778,
-0.24444590508937836,
0.2810560464859009,
0.29003429412841797,
0.22147482633590698,
-0.3651617467403412,
0.09377036988735199,
0.10565751791000366,
-0.05643341690301895,
0.15810568630695343,
-0.06626369804143906,
-0.12478861212730408,
0.02522032894194126,
-0.3178071975708008,
-0.1613295078277588,
-0.5683609843254089,
-0.1550835371017456,
-0.02285461500287056,
0.09815268963575363,
0.0804842859506607,
-0.26990893483161926,
-0.10686825215816498,
0.21949706971645355,
-0.060522619634866714,
0.018781354650855064,
0.2862001061439514,
-0.20399703085422516,
-0.019866663962602615,
0.09581974148750305,
-0.13215704262256622,
-0.4604305922985077,
-0.03807538375258446,
0.26930567622184753,
0.19088071584701538,
-0.3339502215385437,
0.044475920498371124,
0.1411474198102951,
0.05364741012454033,
-0.003875170834362507,
0.21165500581264496,
0.31842848658561707,
0.09513156116008759,
0.2547872066497803,
-0.015736926347017288,
-0.2509012818336487,
-0.30575576424598694,
0.5453650951385498,
0.042249199002981186,
-0.15384647250175476,
0.0765654593706131,
-0.3431686758995056,
-0.2554202079772949,
-0.3422927260398865,
0.12983696162700653,
-0.060135118663311005,
-0.18001551926136017,
0.035400453954935074,
-0.01820916309952736,
-0.046506647020578384,
0.030781306326389313,
0.32399827241897583,
0.4133855998516083,
0.003910535015165806,
-0.11821746081113815,
-0.5684611797332764,
-0.23615720868110657,
0.43401652574539185,
0.28296729922294617,
0.14710426330566406,
0.36447474360466003,
-0.18631049990653992,
-0.07121893018484116,
0.10757976770401001,
-0.5170841217041016,
0.12983210384845734,
0.21086755394935608,
-0.01663738675415516,
0.14610160887241364,
-0.05157746002078056,
-0.12305409461259842,
0.005326061975210905,
0.2835102379322052,
-0.07334920763969421,
-0.1073419377207756,
-0.3775842487812042,
0.18103386461734772,
0.1533733457326889,
-0.025649424642324448,
0.05768544226884842,
-0.13479366898536682,
-0.2475588470697403,
-0.08299557119607925,
0.03507744520902634,
0.16875556111335754,
0.07764871418476105,
-0.1909145712852478,
-0.4175099730491638,
0.22716188430786133,
0.5227140188217163,
-0.48262467980384827,
0.5320774912834167,
0.26159584522247314,
0.3617899417877197,
-0.06921306997537613,
0.045198820531368256,
-0.1610857993364334,
-0.07149529457092285,
0.312633216381073,
0.2536408007144928,
0.45447224378585815,
-0.12937548756599426,
0.3323850929737091,
-0.13185064494609833,
0.14436650276184082,
-0.059047993272542953,
0.15802162885665894,
0.49393850564956665,
-0.24336197972297668,
-0.00026498359511606395,
0.24281735718250275,
0.3066380023956299,
-0.14736589789390564,
-0.2792951464653015,
-0.11446595937013626,
-0.24005486071109772,
0.062022894620895386,
0.3774091601371765,
0.5768880248069763,
-0.06764934957027435,
0.13604027032852173,
-0.07218054682016373,
0.09590760618448257,
0.0630023255944252,
-0.08520611375570297,
0.36902183294296265,
-0.017732756212353706,
0.13631732761859894,
0.09408614784479141,
0.5471500158309937,
0.1016215831041336,
-0.023041434586048126,
-0.08137475699186325,
0.2564464807510376,
0.026250846683979034,
0.10732870548963547,
-0.3377079367637634,
-0.6262373328208923,
0.37276163697242737,
0.384759783744812,
-0.006820312235504389,
0.2828035056591034,
-0.030313290655612946,
-0.037136826664209366,
-0.2153957039117813,
0.271806001663208,
-0.3402675986289978,
0.15287573635578156,
-0.17403826117515564,
0.1640099436044693,
-0.043131038546562195,
-0.33293968439102173,
-0.2676611542701721,
0.037839945405721664,
-0.10675228387117386,
-0.22106003761291504,
0.1184544563293457,
-0.066092349588871,
0.04591238871216774,
0.05982871726155281,
-0.04143497720360756,
0.1899447739124298,
0.0261820200830698,
-0.3552156984806061,
0.157009556889534,
0.11099396646022797,
0.3325386643409729,
0.3872096836566925,
0.06876587867736816,
-0.08468101173639297,
0.05691218748688698,
-0.0030631436966359615,
0.027283500880002975,
0.05408995598554611,
-0.027155954390764236,
-0.326718270778656,
0.28034693002700806,
0.17603278160095215,
0.0852154865860939,
0.45911821722984314,
0.2730119824409485,
-0.3703368604183197,
0.10508245974779129,
0.15631404519081116,
-0.16655698418617249,
-0.25465354323387146,
0.33128923177719116,
0.31613120436668396,
-0.15507449209690094,
-0.06085497885942459,
-0.06365600228309631,
-0.30853015184402466,
-0.1526402086019516,
-0.13695724308490753,
-0.2984392046928406,
0.07757638394832611,
0.3709423542022705,
0.1518935114145279,
0.1040818840265274,
0.39893731474876404,
0.18142499029636383,
0.07909951359033585,
0.03318838030099869,
-0.26430872082710266,
-0.3894730508327484,
0.11897487938404083,
0.24900993704795837,
-0.10516304522752762,
-0.20806778967380524,
-0.0804617628455162,
0.4407903850078583,
0.386912077665329,
-0.21553310751914978,
-0.24892815947532654,
0.051694173365831375,
0.03320934996008873,
-0.1357755810022354,
0.03342926502227783,
0.11199427396059036,
0.1009034812450409,
-0.1555829793214798,
-0.36341580748558044,
0.12908823788166046,
0.03279855102300644,
0.20438812673091888,
0.1315397173166275,
-0.06925258785486221,
-0.2924087941646576,
-0.00033905296004377306,
0.7840610146522522,
-0.2751186192035675,
0.3421649932861328,
-0.2024056315422058,
-0.22901654243469238,
-0.06561961770057678,
-0.11591707915067673,
-0.20444832742214203,
0.0928022712469101,
0.06981545686721802,
-0.4232424795627594,
-0.003434268059208989,
0.005182951223105192,
0.20844542980194092,
-0.1784360706806183,
-0.1380523145198822,
0.007789777126163244,
-0.06773386895656586,
-0.132843479514122,
-0.2156914323568344,
0.015366367064416409,
0.12350796163082123,
0.339915007352829,
0.04579820856451988,
0.012300736270844936,
-0.0899239182472229,
0.15876001119613647,
0.2905883193016052,
0.16410012543201447,
0.15580950677394867,
-0.2158190906047821,
0.20264984667301178,
-0.09498954564332962,
0.16459816694259644,
-0.0067986552603542805,
0.22334665060043335,
0.42040905356407166,
-0.1472199410200119,
0.2557486891746521,
0.35596439242362976,
-0.07940007001161575,
-0.2761705219745636,
-0.1701788753271103,
0.3246493339538574,
0.0007023646030575037,
-0.07676295191049576,
-0.5106707215309143,
-0.4193785786628723
] |
https://github.com/huggingface/datasets/issues/1825
|
Datasets library not suitable for huge text datasets.
|
Hi ! Looks related to #861
You are right: tokenizing a dataset using map takes a lot of space since it can store `input_ids` but also `token_type_ids`, `attention_mask` and `special_tokens_mask`. Moreover if your tokenization function returns python integers then by default they'll be stored as int64 which can take a lot of space. Padding can also increase the size of the tokenized dataset.
To make things more convenient, we recently added a "lazy map" feature that allows to tokenize each batch at training time as you mentioned. For example you'll be able to do
```python
from transformers import BertTokenizer
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
def encode(batch):
return tokenizer(batch["text"], padding="longest", truncation=True, max_length=512, return_tensors="pt")
dataset.set_transform(encode)
print(dataset.format)
# {'type': 'custom', 'format_kwargs': {'transform': <function __main__.encode(batch)>}, 'columns': ['idx', 'label', 'sentence1', 'sentence2'], 'output_all_columns': False}
print(dataset[:2])
# {'input_ids': tensor([[ 101, 2572, 3217, ... 102]]), 'token_type_ids': tensor([[0, 0, 0, ... 0]]), 'attention_mask': tensor([[1, 1, 1, ... 1]])}
```
In this example the `encode` transform is applied on-the-fly on the "text" column.
This feature will be available in the next release 2.0 which will happen in a few days.
You can already play with it by installing `datasets` from source if you want :)
Hope that helps !
|
Hi,
I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training.
Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts).
Any suggestions??
| 197 |
Datasets library not suitable for huge text datasets.
|
[
-0.6701288819313049,
0.12200786173343658,
-0.24186499416828156,
0.3283211290836334,
0.12723249197006226,
0.06754102557897568,
0.1611279547214508,
0.402766615152359,
0.018035652115941048,
0.056229367852211,
-0.17142750322818756,
-0.031586721539497375,
-0.05810239538550377,
0.27965813875198364,
-0.3228074014186859,
-0.00974426232278347,
-0.05368838831782341,
0.09309200942516327,
-0.16037315130233765,
-0.043739739805459976,
-0.03049437515437603,
-0.022518087178468704,
-0.16522464156150818,
-0.05210164189338684,
-0.2576006054878235,
-0.31012532114982605,
0.1691938042640686,
-0.05861753597855568,
-0.3783092200756073,
-0.07990860939025879,
-0.16443504393100739,
0.26483818888664246,
0.19112439453601837,
0.46570149064064026,
-0.0000986691884463653,
-0.19469155371189117,
0.17697611451148987,
-0.009749251417815685,
-0.1688881516456604,
0.19691605865955353,
-0.05539896711707115,
-0.21639372408390045,
-0.2104596048593521,
-0.28840601444244385,
0.15640997886657715,
0.06631754338741302,
-0.05699519068002701,
-0.2824561893939972,
0.05972252041101456,
0.23121321201324463,
0.36244845390319824,
-0.18762868642807007,
-0.004782075062394142,
-0.0474420003592968,
0.3273843228816986,
-0.010567194782197475,
-0.16470113396644592,
-0.10518545657396317,
0.4996553957462311,
0.17513851821422577,
-0.31038859486579895,
0.3171970248222351,
-0.12747874855995178,
-0.04499838128685951,
0.04046802595257759,
-0.24245981872081757,
-0.4579585790634155,
0.030768854543566704,
0.44759002327919006,
0.38855379819869995,
0.5901203155517578,
-0.28379568457603455,
-0.2886011600494385,
-0.18704937398433685,
-0.24460750818252563,
-0.16609041392803192,
0.050332341343164444,
0.28053897619247437,
0.089285708963871,
0.18203802406787872,
-0.25546205043792725,
-0.3489893674850464,
-0.17488110065460205,
0.1155305951833725,
-0.11285640299320221,
0.10870534181594849,
-0.24001222848892212,
0.0041083949618041515,
0.11165739595890045,
-0.1379506140947342,
0.14055754244327545,
-0.06544074416160583,
0.07318256795406342,
-0.23103797435760498,
-0.29861369729042053,
-0.1528257429599762,
-0.009627211838960648,
-0.045221880078315735,
0.3690360486507416,
0.010253104381263256,
-0.05852184072136879,
0.21712425351142883,
-0.06831594556570053,
-0.0321042537689209,
0.26237744092941284,
-0.15197142958641052,
-0.053512927144765854,
0.029948120936751366,
0.5449817180633545,
-0.045844823122024536,
-0.2005956918001175,
-0.059321220964193344,
-0.07571955770254135,
-0.21319754421710968,
-0.168890118598938,
-0.4289291501045227,
-0.11239825189113617,
-0.3643183708190918,
-0.08662676066160202,
0.21859675645828247,
-0.05788841471076012,
0.06149445101618767,
-0.01011956762522459,
0.2855091392993927,
-0.06617838144302368,
0.08587931096553802,
-0.12212648242712021,
0.0069170864298939705,
-0.08415303379297256,
-0.1254054456949234,
-0.16295529901981354,
0.0622737817466259,
0.020278045907616615,
-0.06197023391723633,
0.3275393545627594,
-0.18400871753692627,
0.14756068587303162,
-0.16425661742687225,
-0.013982612639665604,
0.07087808102369308,
-0.1360073685646057,
-0.37873661518096924,
0.031222114339470863,
0.025740953162312508,
0.02164791338145733,
0.31487444043159485,
-0.2747865915298462,
0.1423742175102234,
-0.11435616761445999,
0.045125581324100494,
-0.1435105800628662,
-0.2873225212097168,
-0.11179480701684952,
0.2600984573364258,
-0.11868312209844589,
-0.17142736911773682,
0.006134933326393366,
0.2725290358066559,
0.19456227123737335,
0.05502646416425705,
0.04137429594993591,
0.08452069759368896,
-0.17214277386665344,
-0.05977390334010124,
-0.20954671502113342,
0.25808727741241455,
-0.34770071506500244,
0.2448226362466812,
-0.04519585520029068,
0.09700053185224533,
0.0014256378635764122,
0.6829522848129272,
-0.09227048605680466,
-0.14329878985881805,
0.18579435348510742,
0.11734936386346817,
0.3598412275314331,
-0.030946509912610054,
-0.5588462352752686,
0.4830329716205597,
0.214432030916214,
-0.3764311373233795,
0.1936502605676651,
0.15491385757923126,
0.1011018231511116,
-0.17217616736888885,
0.07283749431371689,
0.171703040599823,
-0.008033022284507751,
0.10560306906700134,
-0.02403184399008751,
-0.3389210104942322,
-0.091695137321949,
0.24644654989242554,
0.364548921585083,
-0.20557008683681488,
0.25309449434280396,
0.2600480020046234,
0.1551523357629776,
-0.18667693436145782,
0.15133561193943024,
0.41176795959472656,
0.0877486914396286,
0.18545639514923096,
-0.02489561215043068,
-0.35045772790908813,
0.100909024477005,
-0.043221645057201385,
0.30393263697624207,
0.09848922491073608,
-0.029989490285515785,
-0.18724675476551056,
0.0030393963679671288,
-0.14020724594593048,
0.11134962737560272,
0.09825392067432404,
0.1959725171327591,
-0.11802774667739868,
0.008164455182850361,
0.08074843138456345,
-0.029118569567799568,
-0.040558625012636185,
-0.44956085085868835,
-0.15537869930267334,
-0.24388490617275238,
-0.1051284596323967,
0.024008793756365776,
-0.08899389207363129,
0.31378793716430664,
0.16315928101539612,
-0.22608959674835205,
-0.03146693855524063,
-0.013661115430295467,
0.11787059903144836,
-0.14645935595035553,
-0.28986045718193054,
0.06458528339862823,
0.402355432510376,
0.0690157413482666,
-0.10755550861358643,
0.24645276367664337,
-0.04371609538793564,
0.18517494201660156,
0.10424574464559555,
-0.37203505635261536,
0.0069657606072723866,
-0.09110099822282791,
0.025678258389234543,
0.25085681676864624,
-0.16380701959133148,
0.3958781361579895,
0.000803779752459377,
0.21516455709934235,
-0.05371597036719322,
0.2598283588886261,
0.153014674782753,
0.33996641635894775,
0.2665381133556366,
-0.4578668773174286,
-0.09239771962165833,
0.4044443964958191,
-0.06797391176223755,
0.34633365273475647,
0.21938422322273254,
-0.16435039043426514,
-0.11008857190608978,
0.08155784010887146,
0.018770882859826088,
0.10090608149766922,
0.44776615500450134,
0.170240581035614,
-0.09384874254465103,
0.2349158674478531,
-0.23779864609241486,
0.08147183060646057,
0.06938624382019043,
0.08781111985445023,
0.24909242987632751,
0.28298354148864746,
0.02463523857295513,
-0.43486469984054565,
-0.1384221464395523,
0.014817474409937859,
0.216689333319664,
0.06384188681840897,
0.015083137899637222,
-0.17772769927978516,
-0.3559892773628235,
-0.020841844379901886,
0.296294629573822,
-0.08683503419160843,
-0.14682161808013916,
0.21547387540340424,
-0.035777438431978226,
-0.03913811966776848,
0.08042898774147034,
0.19599317014217377,
0.20486201345920563,
0.35924068093299866,
-0.13099265098571777,
0.1306108683347702,
-0.21873466670513153,
-0.03160874918103218,
0.2562377154827118,
0.18959003686904907,
0.03048052079975605,
0.300656795501709,
0.05478062853217125,
0.002126930048689246,
-0.41081860661506653,
-0.2663702070713043,
0.08461429923772812,
0.07475616782903671,
-0.011274809017777443,
-0.03599082678556442,
0.13390235602855682,
0.07195594906806946,
0.005816244520246983,
-0.10051776468753815,
-0.43739742040634155,
0.0650312528014183,
0.04069877788424492,
-0.1566937267780304,
-0.2836551070213318,
-0.0031330406200140715,
-0.4743894338607788,
-0.15543009340763092,
-0.541013777256012,
0.399370938539505,
0.15051835775375366,
0.043261270970106125,
0.19932928681373596,
0.22307980060577393,
0.054832447320222855,
-0.01445184275507927,
0.24372237920761108,
-0.1458698809146881,
-0.0927402675151825,
0.3576534390449524,
-0.029897170141339302,
-0.44710907340049744,
-0.17769016325473785,
0.2569868266582489,
0.01561106275767088,
0.24560867249965668,
-0.4848361909389496,
0.3691166639328003,
-0.454969584941864,
-0.059255633503198624,
0.14433270692825317,
0.4125095009803772,
0.040480952709913254,
-0.18310505151748657,
-0.21482060849666595,
-0.025271717458963394,
-0.07438480854034424,
-0.14941440522670746,
-0.03367536887526512,
0.0336901992559433,
-0.2161390781402588,
0.2781652510166168,
0.1378098577260971,
0.17639824748039246,
0.059442389756441116,
-0.13314634561538696,
0.2932993769645691,
0.05370296537876129,
0.3576154410839081,
-0.22250786423683167,
-0.15964627265930176,
0.3230072259902954,
-0.012711982242763042,
0.0008059876272454858,
0.4088382422924042,
0.04835564270615578,
-0.2739144563674927,
0.00629121670499444,
-0.19728684425354004,
-0.024294989183545113,
-0.2163480669260025,
0.081074558198452,
0.0752352774143219,
0.053944289684295654,
0.04995028302073479,
-0.05336526781320572,
-0.09324471652507782,
-0.31386440992355347,
0.14936663210391998,
-0.09459476917982101,
-0.17957918345928192,
-0.031914956867694855,
-0.20563273131847382,
0.1982746571302414,
-0.3147493600845337,
0.1241777241230011,
-0.005529950838536024,
0.2688979506492615,
-0.06682422757148743,
0.10754628479480743,
-0.11363251507282257,
-0.04903320223093033,
0.2575823962688446,
-0.21269498765468597,
-0.0704992488026619,
-0.0892380103468895,
-0.0987013503909111,
-0.18302859365940094,
0.27956119179725647,
-0.43419456481933594,
0.26865100860595703,
0.275506854057312,
0.21470695734024048,
-0.2671356499195099,
-0.01836647279560566,
0.24270658195018768,
0.22965699434280396,
0.09691336005926132,
-0.30508241057395935,
-0.02667105384171009,
-0.05141828581690788,
-0.4869175851345062,
-0.044037774205207825,
0.01263988483697176,
0.07510118931531906,
0.051508478820323944,
-0.17617449164390564,
-0.143065944314003,
-0.1018151193857193,
0.2473822385072708,
0.11017793416976929,
-0.13647231459617615,
-0.09033816307783127,
0.12267819792032242,
-0.32220155000686646,
0.3023283779621124,
0.17050470411777496,
0.5114874839782715,
0.014475516974925995,
-0.005114327650517225,
0.28352782130241394,
-0.12164904922246933,
0.29388782382011414,
0.19801679253578186,
-0.05802266672253609,
0.26250627636909485,
-0.22888725996017456,
0.20899485051631927,
-0.12202166020870209,
0.3037271797657013,
0.052138183265924454,
0.2026883065700531,
-0.5032659769058228,
-0.3097500801086426,
0.3382958769798279,
0.2196553349494934,
0.07560321688652039,
0.13622981309890747,
0.036853987723588943,
0.045917440205812454,
-0.04986880347132683,
0.014874424785375595,
0.6704330444335938,
-0.2598544657230377,
0.046712491661310196,
-0.22336937487125397,
0.12228895723819733,
0.38302335143089294,
-0.33728811144828796,
-0.07390264421701431,
-0.2906501889228821,
-0.23744654655456543,
0.09543752670288086,
0.06925544142723083,
0.10172484815120697,
0.09351388365030289,
-0.018074272200465202,
0.22796419262886047,
0.42964425683021545,
0.09299818426370621,
-0.15522730350494385,
0.6102833151817322,
-0.3098035752773285,
-0.219413161277771,
-0.40017256140708923,
0.2367330938577652,
0.046324606984853745,
-0.28257983922958374,
-0.13667602837085724,
0.04144919663667679,
-0.008642616681754589,
0.013039996847510338,
-0.2603384852409363,
-0.09441404789686203,
-0.01250464003533125,
0.2714822590351105,
0.04263328015804291,
-0.12740549445152283,
0.4604460597038269,
-0.027509551495313644,
0.10668196529150009,
0.5751258134841919,
-0.24370083212852478,
0.012669750489294529,
-0.5017687678337097,
-0.2106204479932785,
0.1630629599094391,
0.02511144056916237,
0.09310728311538696,
0.0005246032378636301,
-0.007632930297404528,
-0.12327779829502106,
0.13374187052249908,
-0.16771511733531952,
-0.018495148047804832,
-0.10839949548244476,
0.09454686939716339,
-0.30174124240875244,
-0.09560378640890121,
-0.11150127649307251,
-0.2542814612388611,
-0.15223251283168793,
0.2037576586008072,
0.1703164130449295,
0.27650710940361023,
0.20510035753250122,
0.11835046112537384,
-0.24049372971057892,
-0.28936871886253357,
0.38306817412376404,
0.10351582616567612,
0.07949215918779373,
0.027980424463748932,
0.369848370552063,
-0.290016233921051,
-0.31775563955307007,
0.1448124647140503,
0.04774053767323494,
-0.160667285323143,
0.23724138736724854,
-0.1557592749595642,
-0.4160003662109375,
0.17739155888557434,
0.18787802755832672,
0.08863890171051025,
-0.11693118512630463,
-0.15070241689682007,
-0.11453051120042801,
-0.31852447986602783,
0.24954010546207428,
-0.04257236421108246,
0.09739934653043747,
0.13508589565753937,
-0.19671978056430817,
-0.12855041027069092,
0.14922893047332764,
-0.4088335633277893,
0.1279633641242981,
0.009484687820076942,
0.12030988931655884,
-0.053776174783706665,
-0.12706755101680756,
-0.03397426754236221,
0.09827920794487,
0.08386236429214478,
0.15943345427513123,
-0.11653970181941986,
-0.39855384826660156,
-0.11756578832864761,
0.0392703115940094,
0.08061806112527847,
0.021844962611794472,
0.24819490313529968,
-0.35447701811790466,
-0.4206348657608032,
-0.23984207212924957,
0.24780577421188354,
0.15154394507408142,
-0.03519947826862335,
-0.034094031900167465,
-0.18093284964561462,
-0.35129842162132263,
-0.07311396300792694,
0.10785257071256638,
-0.2051990032196045,
0.18661026656627655,
0.05073319748044014,
0.1604614406824112,
0.4659494459629059,
-0.1307249367237091,
-0.10600370913743973,
0.1417447328567505,
0.29699578881263733,
-0.09378919750452042,
0.21801647543907166,
-0.16092610359191895,
0.006788730155676603,
0.5635240077972412,
0.4219593107700348,
0.4364164471626282,
-0.07942330092191696,
-0.21591033041477203,
0.11284837126731873,
0.30953744053840637,
-0.3243975043296814,
-0.36144116520881653,
-0.013917106203734875,
-0.19261260330677032,
0.3381201922893524,
0.346799373626709,
0.3312763571739197,
-0.14598706364631653,
-0.1272909939289093,
-0.007621897850185633,
0.25040626525878906,
-0.006994656287133694,
-0.24896082282066345,
0.4405546188354492,
0.20495514571666718,
-0.17328231036663055,
0.3367408812046051,
0.287244588136673,
0.46410489082336426,
0.8063911199569702,
0.24855583906173706,
0.399970680475235,
0.14395302534103394,
-0.011343530379235744,
-0.022089345380663872,
-0.1734010875225067,
0.19276009500026703,
0.20215940475463867,
0.06548969447612762,
-0.021318713203072548,
-0.02714543044567108,
0.07501639425754547,
0.05671221762895584,
0.26773348450660706,
-0.14333508908748627,
-0.12135975807905197,
-0.19987738132476807,
-0.11526570469141006,
0.09781897813081741,
-0.16631001234054565,
-0.009672284126281738,
0.20599648356437683,
-0.360768586397171,
-0.07286636531352997,
0.31661322712898254,
-0.13275033235549927,
0.04459766671061516,
-0.4487651288509369,
0.5457825064659119,
-0.0206613726913929,
0.042789556086063385,
-0.18823327124118805,
0.14244596660137177,
-0.021775271743535995,
0.04943259432911873,
0.07703252881765366,
0.38511258363723755,
0.29867497086524963,
0.13919761776924133,
0.07398058474063873,
-0.018160879611968994,
-0.13677288591861725,
-0.16169464588165283,
-0.270781546831131,
0.23653696477413177,
0.16520851850509644,
0.2711946368217468,
0.39714136719703674,
0.13355973362922668,
-0.24027332663536072,
0.059736914932727814,
0.10458081215620041,
-0.28106850385665894,
-0.11182846128940582,
-0.37938085198402405,
0.18972250819206238,
-0.29165881872177124,
-0.19232067465782166,
0.035230085253715515,
-0.4169837534427643,
-0.22683630883693695,
0.6349735260009766,
-0.4023163616657257,
0.228798046708107,
-0.18061710894107819,
0.19099102914333344,
-0.13871237635612488,
0.6569441556930542,
0.35357216000556946,
0.1768474131822586,
0.08734457939863205,
-0.11601125448942184,
-0.3172489106655121,
0.17632417380809784,
-0.21576520800590515,
0.13345366716384888,
-0.06254661828279495,
0.2432495504617691,
0.27287712693214417,
0.1429257094860077,
-0.0925184041261673,
0.03315437212586403,
-0.1402646154165268,
-0.17847028374671936,
-0.33580031991004944,
-0.1845911294221878,
0.19463518261909485,
0.09596908837556839,
-0.024294959381222725,
-0.2119196057319641,
0.28052350878715515,
-0.25005215406417847,
0.17653270065784454,
-0.2722632586956024,
0.17931491136550903,
-0.1578899621963501,
-0.0976502075791359,
0.1150577962398529,
0.022334495559334755,
0.20060639083385468,
-0.3350743353366852,
0.04937884584069252,
-0.12553824484348297,
0.03292164206504822,
-0.09956084191799164,
0.28346318006515503,
0.3882297873497009,
0.046547986567020416,
-0.14611653983592987,
0.19409498572349548,
0.3050244450569153,
0.10415581613779068,
-0.15595553815364838,
0.2870498597621918,
-0.21386714279651642,
0.048658791929483414,
-0.128133162856102,
0.1683141440153122,
-0.12571413815021515,
0.14580297470092773,
-0.08877725154161453,
-0.23180875182151794,
-0.04847903922200203,
-0.37300607562065125,
0.1279519498348236,
-0.08394389599561691,
-0.42050373554229736,
-0.19490042328834534,
0.03360876441001892,
0.3893134295940399,
0.04297364130616188,
-0.5560441017150879,
0.22369205951690674,
0.1955118179321289,
0.05518924072384834,
-0.31219810247421265,
0.2979156970977783,
-0.14394474029541016,
-0.1008085384964943,
-0.03115193173289299,
0.3679390251636505,
-0.05350802466273308,
-0.22224266827106476,
-0.018857445567846298,
-0.15262256562709808
] |
https://github.com/huggingface/datasets/issues/1825
|
Datasets library not suitable for huge text datasets.
|
How recently was `set_transform` added? I am actually trying to implement it and getting an error:
`AttributeError: 'Dataset' object has no attribute 'set_transform'
`
I'm on v.1.2.1.
EDIT: Oh, wait I see now it's in the v.2.0. Whoops! This should be really useful.
|
Hi,
I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training.
Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts).
Any suggestions??
| 43 |
Datasets library not suitable for huge text datasets.
|
[
-0.6701288819313049,
0.12200786173343658,
-0.24186499416828156,
0.3283211290836334,
0.12723249197006226,
0.06754102557897568,
0.1611279547214508,
0.402766615152359,
0.018035652115941048,
0.056229367852211,
-0.17142750322818756,
-0.031586721539497375,
-0.05810239538550377,
0.27965813875198364,
-0.3228074014186859,
-0.00974426232278347,
-0.05368838831782341,
0.09309200942516327,
-0.16037315130233765,
-0.043739739805459976,
-0.03049437515437603,
-0.022518087178468704,
-0.16522464156150818,
-0.05210164189338684,
-0.2576006054878235,
-0.31012532114982605,
0.1691938042640686,
-0.05861753597855568,
-0.3783092200756073,
-0.07990860939025879,
-0.16443504393100739,
0.26483818888664246,
0.19112439453601837,
0.46570149064064026,
-0.0000986691884463653,
-0.19469155371189117,
0.17697611451148987,
-0.009749251417815685,
-0.1688881516456604,
0.19691605865955353,
-0.05539896711707115,
-0.21639372408390045,
-0.2104596048593521,
-0.28840601444244385,
0.15640997886657715,
0.06631754338741302,
-0.05699519068002701,
-0.2824561893939972,
0.05972252041101456,
0.23121321201324463,
0.36244845390319824,
-0.18762868642807007,
-0.004782075062394142,
-0.0474420003592968,
0.3273843228816986,
-0.010567194782197475,
-0.16470113396644592,
-0.10518545657396317,
0.4996553957462311,
0.17513851821422577,
-0.31038859486579895,
0.3171970248222351,
-0.12747874855995178,
-0.04499838128685951,
0.04046802595257759,
-0.24245981872081757,
-0.4579585790634155,
0.030768854543566704,
0.44759002327919006,
0.38855379819869995,
0.5901203155517578,
-0.28379568457603455,
-0.2886011600494385,
-0.18704937398433685,
-0.24460750818252563,
-0.16609041392803192,
0.050332341343164444,
0.28053897619247437,
0.089285708963871,
0.18203802406787872,
-0.25546205043792725,
-0.3489893674850464,
-0.17488110065460205,
0.1155305951833725,
-0.11285640299320221,
0.10870534181594849,
-0.24001222848892212,
0.0041083949618041515,
0.11165739595890045,
-0.1379506140947342,
0.14055754244327545,
-0.06544074416160583,
0.07318256795406342,
-0.23103797435760498,
-0.29861369729042053,
-0.1528257429599762,
-0.009627211838960648,
-0.045221880078315735,
0.3690360486507416,
0.010253104381263256,
-0.05852184072136879,
0.21712425351142883,
-0.06831594556570053,
-0.0321042537689209,
0.26237744092941284,
-0.15197142958641052,
-0.053512927144765854,
0.029948120936751366,
0.5449817180633545,
-0.045844823122024536,
-0.2005956918001175,
-0.059321220964193344,
-0.07571955770254135,
-0.21319754421710968,
-0.168890118598938,
-0.4289291501045227,
-0.11239825189113617,
-0.3643183708190918,
-0.08662676066160202,
0.21859675645828247,
-0.05788841471076012,
0.06149445101618767,
-0.01011956762522459,
0.2855091392993927,
-0.06617838144302368,
0.08587931096553802,
-0.12212648242712021,
0.0069170864298939705,
-0.08415303379297256,
-0.1254054456949234,
-0.16295529901981354,
0.0622737817466259,
0.020278045907616615,
-0.06197023391723633,
0.3275393545627594,
-0.18400871753692627,
0.14756068587303162,
-0.16425661742687225,
-0.013982612639665604,
0.07087808102369308,
-0.1360073685646057,
-0.37873661518096924,
0.031222114339470863,
0.025740953162312508,
0.02164791338145733,
0.31487444043159485,
-0.2747865915298462,
0.1423742175102234,
-0.11435616761445999,
0.045125581324100494,
-0.1435105800628662,
-0.2873225212097168,
-0.11179480701684952,
0.2600984573364258,
-0.11868312209844589,
-0.17142736911773682,
0.006134933326393366,
0.2725290358066559,
0.19456227123737335,
0.05502646416425705,
0.04137429594993591,
0.08452069759368896,
-0.17214277386665344,
-0.05977390334010124,
-0.20954671502113342,
0.25808727741241455,
-0.34770071506500244,
0.2448226362466812,
-0.04519585520029068,
0.09700053185224533,
0.0014256378635764122,
0.6829522848129272,
-0.09227048605680466,
-0.14329878985881805,
0.18579435348510742,
0.11734936386346817,
0.3598412275314331,
-0.030946509912610054,
-0.5588462352752686,
0.4830329716205597,
0.214432030916214,
-0.3764311373233795,
0.1936502605676651,
0.15491385757923126,
0.1011018231511116,
-0.17217616736888885,
0.07283749431371689,
0.171703040599823,
-0.008033022284507751,
0.10560306906700134,
-0.02403184399008751,
-0.3389210104942322,
-0.091695137321949,
0.24644654989242554,
0.364548921585083,
-0.20557008683681488,
0.25309449434280396,
0.2600480020046234,
0.1551523357629776,
-0.18667693436145782,
0.15133561193943024,
0.41176795959472656,
0.0877486914396286,
0.18545639514923096,
-0.02489561215043068,
-0.35045772790908813,
0.100909024477005,
-0.043221645057201385,
0.30393263697624207,
0.09848922491073608,
-0.029989490285515785,
-0.18724675476551056,
0.0030393963679671288,
-0.14020724594593048,
0.11134962737560272,
0.09825392067432404,
0.1959725171327591,
-0.11802774667739868,
0.008164455182850361,
0.08074843138456345,
-0.029118569567799568,
-0.040558625012636185,
-0.44956085085868835,
-0.15537869930267334,
-0.24388490617275238,
-0.1051284596323967,
0.024008793756365776,
-0.08899389207363129,
0.31378793716430664,
0.16315928101539612,
-0.22608959674835205,
-0.03146693855524063,
-0.013661115430295467,
0.11787059903144836,
-0.14645935595035553,
-0.28986045718193054,
0.06458528339862823,
0.402355432510376,
0.0690157413482666,
-0.10755550861358643,
0.24645276367664337,
-0.04371609538793564,
0.18517494201660156,
0.10424574464559555,
-0.37203505635261536,
0.0069657606072723866,
-0.09110099822282791,
0.025678258389234543,
0.25085681676864624,
-0.16380701959133148,
0.3958781361579895,
0.000803779752459377,
0.21516455709934235,
-0.05371597036719322,
0.2598283588886261,
0.153014674782753,
0.33996641635894775,
0.2665381133556366,
-0.4578668773174286,
-0.09239771962165833,
0.4044443964958191,
-0.06797391176223755,
0.34633365273475647,
0.21938422322273254,
-0.16435039043426514,
-0.11008857190608978,
0.08155784010887146,
0.018770882859826088,
0.10090608149766922,
0.44776615500450134,
0.170240581035614,
-0.09384874254465103,
0.2349158674478531,
-0.23779864609241486,
0.08147183060646057,
0.06938624382019043,
0.08781111985445023,
0.24909242987632751,
0.28298354148864746,
0.02463523857295513,
-0.43486469984054565,
-0.1384221464395523,
0.014817474409937859,
0.216689333319664,
0.06384188681840897,
0.015083137899637222,
-0.17772769927978516,
-0.3559892773628235,
-0.020841844379901886,
0.296294629573822,
-0.08683503419160843,
-0.14682161808013916,
0.21547387540340424,
-0.035777438431978226,
-0.03913811966776848,
0.08042898774147034,
0.19599317014217377,
0.20486201345920563,
0.35924068093299866,
-0.13099265098571777,
0.1306108683347702,
-0.21873466670513153,
-0.03160874918103218,
0.2562377154827118,
0.18959003686904907,
0.03048052079975605,
0.300656795501709,
0.05478062853217125,
0.002126930048689246,
-0.41081860661506653,
-0.2663702070713043,
0.08461429923772812,
0.07475616782903671,
-0.011274809017777443,
-0.03599082678556442,
0.13390235602855682,
0.07195594906806946,
0.005816244520246983,
-0.10051776468753815,
-0.43739742040634155,
0.0650312528014183,
0.04069877788424492,
-0.1566937267780304,
-0.2836551070213318,
-0.0031330406200140715,
-0.4743894338607788,
-0.15543009340763092,
-0.541013777256012,
0.399370938539505,
0.15051835775375366,
0.043261270970106125,
0.19932928681373596,
0.22307980060577393,
0.054832447320222855,
-0.01445184275507927,
0.24372237920761108,
-0.1458698809146881,
-0.0927402675151825,
0.3576534390449524,
-0.029897170141339302,
-0.44710907340049744,
-0.17769016325473785,
0.2569868266582489,
0.01561106275767088,
0.24560867249965668,
-0.4848361909389496,
0.3691166639328003,
-0.454969584941864,
-0.059255633503198624,
0.14433270692825317,
0.4125095009803772,
0.040480952709913254,
-0.18310505151748657,
-0.21482060849666595,
-0.025271717458963394,
-0.07438480854034424,
-0.14941440522670746,
-0.03367536887526512,
0.0336901992559433,
-0.2161390781402588,
0.2781652510166168,
0.1378098577260971,
0.17639824748039246,
0.059442389756441116,
-0.13314634561538696,
0.2932993769645691,
0.05370296537876129,
0.3576154410839081,
-0.22250786423683167,
-0.15964627265930176,
0.3230072259902954,
-0.012711982242763042,
0.0008059876272454858,
0.4088382422924042,
0.04835564270615578,
-0.2739144563674927,
0.00629121670499444,
-0.19728684425354004,
-0.024294989183545113,
-0.2163480669260025,
0.081074558198452,
0.0752352774143219,
0.053944289684295654,
0.04995028302073479,
-0.05336526781320572,
-0.09324471652507782,
-0.31386440992355347,
0.14936663210391998,
-0.09459476917982101,
-0.17957918345928192,
-0.031914956867694855,
-0.20563273131847382,
0.1982746571302414,
-0.3147493600845337,
0.1241777241230011,
-0.005529950838536024,
0.2688979506492615,
-0.06682422757148743,
0.10754628479480743,
-0.11363251507282257,
-0.04903320223093033,
0.2575823962688446,
-0.21269498765468597,
-0.0704992488026619,
-0.0892380103468895,
-0.0987013503909111,
-0.18302859365940094,
0.27956119179725647,
-0.43419456481933594,
0.26865100860595703,
0.275506854057312,
0.21470695734024048,
-0.2671356499195099,
-0.01836647279560566,
0.24270658195018768,
0.22965699434280396,
0.09691336005926132,
-0.30508241057395935,
-0.02667105384171009,
-0.05141828581690788,
-0.4869175851345062,
-0.044037774205207825,
0.01263988483697176,
0.07510118931531906,
0.051508478820323944,
-0.17617449164390564,
-0.143065944314003,
-0.1018151193857193,
0.2473822385072708,
0.11017793416976929,
-0.13647231459617615,
-0.09033816307783127,
0.12267819792032242,
-0.32220155000686646,
0.3023283779621124,
0.17050470411777496,
0.5114874839782715,
0.014475516974925995,
-0.005114327650517225,
0.28352782130241394,
-0.12164904922246933,
0.29388782382011414,
0.19801679253578186,
-0.05802266672253609,
0.26250627636909485,
-0.22888725996017456,
0.20899485051631927,
-0.12202166020870209,
0.3037271797657013,
0.052138183265924454,
0.2026883065700531,
-0.5032659769058228,
-0.3097500801086426,
0.3382958769798279,
0.2196553349494934,
0.07560321688652039,
0.13622981309890747,
0.036853987723588943,
0.045917440205812454,
-0.04986880347132683,
0.014874424785375595,
0.6704330444335938,
-0.2598544657230377,
0.046712491661310196,
-0.22336937487125397,
0.12228895723819733,
0.38302335143089294,
-0.33728811144828796,
-0.07390264421701431,
-0.2906501889228821,
-0.23744654655456543,
0.09543752670288086,
0.06925544142723083,
0.10172484815120697,
0.09351388365030289,
-0.018074272200465202,
0.22796419262886047,
0.42964425683021545,
0.09299818426370621,
-0.15522730350494385,
0.6102833151817322,
-0.3098035752773285,
-0.219413161277771,
-0.40017256140708923,
0.2367330938577652,
0.046324606984853745,
-0.28257983922958374,
-0.13667602837085724,
0.04144919663667679,
-0.008642616681754589,
0.013039996847510338,
-0.2603384852409363,
-0.09441404789686203,
-0.01250464003533125,
0.2714822590351105,
0.04263328015804291,
-0.12740549445152283,
0.4604460597038269,
-0.027509551495313644,
0.10668196529150009,
0.5751258134841919,
-0.24370083212852478,
0.012669750489294529,
-0.5017687678337097,
-0.2106204479932785,
0.1630629599094391,
0.02511144056916237,
0.09310728311538696,
0.0005246032378636301,
-0.007632930297404528,
-0.12327779829502106,
0.13374187052249908,
-0.16771511733531952,
-0.018495148047804832,
-0.10839949548244476,
0.09454686939716339,
-0.30174124240875244,
-0.09560378640890121,
-0.11150127649307251,
-0.2542814612388611,
-0.15223251283168793,
0.2037576586008072,
0.1703164130449295,
0.27650710940361023,
0.20510035753250122,
0.11835046112537384,
-0.24049372971057892,
-0.28936871886253357,
0.38306817412376404,
0.10351582616567612,
0.07949215918779373,
0.027980424463748932,
0.369848370552063,
-0.290016233921051,
-0.31775563955307007,
0.1448124647140503,
0.04774053767323494,
-0.160667285323143,
0.23724138736724854,
-0.1557592749595642,
-0.4160003662109375,
0.17739155888557434,
0.18787802755832672,
0.08863890171051025,
-0.11693118512630463,
-0.15070241689682007,
-0.11453051120042801,
-0.31852447986602783,
0.24954010546207428,
-0.04257236421108246,
0.09739934653043747,
0.13508589565753937,
-0.19671978056430817,
-0.12855041027069092,
0.14922893047332764,
-0.4088335633277893,
0.1279633641242981,
0.009484687820076942,
0.12030988931655884,
-0.053776174783706665,
-0.12706755101680756,
-0.03397426754236221,
0.09827920794487,
0.08386236429214478,
0.15943345427513123,
-0.11653970181941986,
-0.39855384826660156,
-0.11756578832864761,
0.0392703115940094,
0.08061806112527847,
0.021844962611794472,
0.24819490313529968,
-0.35447701811790466,
-0.4206348657608032,
-0.23984207212924957,
0.24780577421188354,
0.15154394507408142,
-0.03519947826862335,
-0.034094031900167465,
-0.18093284964561462,
-0.35129842162132263,
-0.07311396300792694,
0.10785257071256638,
-0.2051990032196045,
0.18661026656627655,
0.05073319748044014,
0.1604614406824112,
0.4659494459629059,
-0.1307249367237091,
-0.10600370913743973,
0.1417447328567505,
0.29699578881263733,
-0.09378919750452042,
0.21801647543907166,
-0.16092610359191895,
0.006788730155676603,
0.5635240077972412,
0.4219593107700348,
0.4364164471626282,
-0.07942330092191696,
-0.21591033041477203,
0.11284837126731873,
0.30953744053840637,
-0.3243975043296814,
-0.36144116520881653,
-0.013917106203734875,
-0.19261260330677032,
0.3381201922893524,
0.346799373626709,
0.3312763571739197,
-0.14598706364631653,
-0.1272909939289093,
-0.007621897850185633,
0.25040626525878906,
-0.006994656287133694,
-0.24896082282066345,
0.4405546188354492,
0.20495514571666718,
-0.17328231036663055,
0.3367408812046051,
0.287244588136673,
0.46410489082336426,
0.8063911199569702,
0.24855583906173706,
0.399970680475235,
0.14395302534103394,
-0.011343530379235744,
-0.022089345380663872,
-0.1734010875225067,
0.19276009500026703,
0.20215940475463867,
0.06548969447612762,
-0.021318713203072548,
-0.02714543044567108,
0.07501639425754547,
0.05671221762895584,
0.26773348450660706,
-0.14333508908748627,
-0.12135975807905197,
-0.19987738132476807,
-0.11526570469141006,
0.09781897813081741,
-0.16631001234054565,
-0.009672284126281738,
0.20599648356437683,
-0.360768586397171,
-0.07286636531352997,
0.31661322712898254,
-0.13275033235549927,
0.04459766671061516,
-0.4487651288509369,
0.5457825064659119,
-0.0206613726913929,
0.042789556086063385,
-0.18823327124118805,
0.14244596660137177,
-0.021775271743535995,
0.04943259432911873,
0.07703252881765366,
0.38511258363723755,
0.29867497086524963,
0.13919761776924133,
0.07398058474063873,
-0.018160879611968994,
-0.13677288591861725,
-0.16169464588165283,
-0.270781546831131,
0.23653696477413177,
0.16520851850509644,
0.2711946368217468,
0.39714136719703674,
0.13355973362922668,
-0.24027332663536072,
0.059736914932727814,
0.10458081215620041,
-0.28106850385665894,
-0.11182846128940582,
-0.37938085198402405,
0.18972250819206238,
-0.29165881872177124,
-0.19232067465782166,
0.035230085253715515,
-0.4169837534427643,
-0.22683630883693695,
0.6349735260009766,
-0.4023163616657257,
0.228798046708107,
-0.18061710894107819,
0.19099102914333344,
-0.13871237635612488,
0.6569441556930542,
0.35357216000556946,
0.1768474131822586,
0.08734457939863205,
-0.11601125448942184,
-0.3172489106655121,
0.17632417380809784,
-0.21576520800590515,
0.13345366716384888,
-0.06254661828279495,
0.2432495504617691,
0.27287712693214417,
0.1429257094860077,
-0.0925184041261673,
0.03315437212586403,
-0.1402646154165268,
-0.17847028374671936,
-0.33580031991004944,
-0.1845911294221878,
0.19463518261909485,
0.09596908837556839,
-0.024294959381222725,
-0.2119196057319641,
0.28052350878715515,
-0.25005215406417847,
0.17653270065784454,
-0.2722632586956024,
0.17931491136550903,
-0.1578899621963501,
-0.0976502075791359,
0.1150577962398529,
0.022334495559334755,
0.20060639083385468,
-0.3350743353366852,
0.04937884584069252,
-0.12553824484348297,
0.03292164206504822,
-0.09956084191799164,
0.28346318006515503,
0.3882297873497009,
0.046547986567020416,
-0.14611653983592987,
0.19409498572349548,
0.3050244450569153,
0.10415581613779068,
-0.15595553815364838,
0.2870498597621918,
-0.21386714279651642,
0.048658791929483414,
-0.128133162856102,
0.1683141440153122,
-0.12571413815021515,
0.14580297470092773,
-0.08877725154161453,
-0.23180875182151794,
-0.04847903922200203,
-0.37300607562065125,
0.1279519498348236,
-0.08394389599561691,
-0.42050373554229736,
-0.19490042328834534,
0.03360876441001892,
0.3893134295940399,
0.04297364130616188,
-0.5560441017150879,
0.22369205951690674,
0.1955118179321289,
0.05518924072384834,
-0.31219810247421265,
0.2979156970977783,
-0.14394474029541016,
-0.1008085384964943,
-0.03115193173289299,
0.3679390251636505,
-0.05350802466273308,
-0.22224266827106476,
-0.018857445567846298,
-0.15262256562709808
] |
https://github.com/huggingface/datasets/issues/1825
|
Datasets library not suitable for huge text datasets.
|
Yes indeed it was added a few days ago. The code is available on master
We'll do a release next week :)
Feel free to install `datasets` from source to try it out though, I would love to have some feedbacks
|
Hi,
I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training.
Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts).
Any suggestions??
| 41 |
Datasets library not suitable for huge text datasets.
|
[
-0.6701288819313049,
0.12200786173343658,
-0.24186499416828156,
0.3283211290836334,
0.12723249197006226,
0.06754102557897568,
0.1611279547214508,
0.402766615152359,
0.018035652115941048,
0.056229367852211,
-0.17142750322818756,
-0.031586721539497375,
-0.05810239538550377,
0.27965813875198364,
-0.3228074014186859,
-0.00974426232278347,
-0.05368838831782341,
0.09309200942516327,
-0.16037315130233765,
-0.043739739805459976,
-0.03049437515437603,
-0.022518087178468704,
-0.16522464156150818,
-0.05210164189338684,
-0.2576006054878235,
-0.31012532114982605,
0.1691938042640686,
-0.05861753597855568,
-0.3783092200756073,
-0.07990860939025879,
-0.16443504393100739,
0.26483818888664246,
0.19112439453601837,
0.46570149064064026,
-0.0000986691884463653,
-0.19469155371189117,
0.17697611451148987,
-0.009749251417815685,
-0.1688881516456604,
0.19691605865955353,
-0.05539896711707115,
-0.21639372408390045,
-0.2104596048593521,
-0.28840601444244385,
0.15640997886657715,
0.06631754338741302,
-0.05699519068002701,
-0.2824561893939972,
0.05972252041101456,
0.23121321201324463,
0.36244845390319824,
-0.18762868642807007,
-0.004782075062394142,
-0.0474420003592968,
0.3273843228816986,
-0.010567194782197475,
-0.16470113396644592,
-0.10518545657396317,
0.4996553957462311,
0.17513851821422577,
-0.31038859486579895,
0.3171970248222351,
-0.12747874855995178,
-0.04499838128685951,
0.04046802595257759,
-0.24245981872081757,
-0.4579585790634155,
0.030768854543566704,
0.44759002327919006,
0.38855379819869995,
0.5901203155517578,
-0.28379568457603455,
-0.2886011600494385,
-0.18704937398433685,
-0.24460750818252563,
-0.16609041392803192,
0.050332341343164444,
0.28053897619247437,
0.089285708963871,
0.18203802406787872,
-0.25546205043792725,
-0.3489893674850464,
-0.17488110065460205,
0.1155305951833725,
-0.11285640299320221,
0.10870534181594849,
-0.24001222848892212,
0.0041083949618041515,
0.11165739595890045,
-0.1379506140947342,
0.14055754244327545,
-0.06544074416160583,
0.07318256795406342,
-0.23103797435760498,
-0.29861369729042053,
-0.1528257429599762,
-0.009627211838960648,
-0.045221880078315735,
0.3690360486507416,
0.010253104381263256,
-0.05852184072136879,
0.21712425351142883,
-0.06831594556570053,
-0.0321042537689209,
0.26237744092941284,
-0.15197142958641052,
-0.053512927144765854,
0.029948120936751366,
0.5449817180633545,
-0.045844823122024536,
-0.2005956918001175,
-0.059321220964193344,
-0.07571955770254135,
-0.21319754421710968,
-0.168890118598938,
-0.4289291501045227,
-0.11239825189113617,
-0.3643183708190918,
-0.08662676066160202,
0.21859675645828247,
-0.05788841471076012,
0.06149445101618767,
-0.01011956762522459,
0.2855091392993927,
-0.06617838144302368,
0.08587931096553802,
-0.12212648242712021,
0.0069170864298939705,
-0.08415303379297256,
-0.1254054456949234,
-0.16295529901981354,
0.0622737817466259,
0.020278045907616615,
-0.06197023391723633,
0.3275393545627594,
-0.18400871753692627,
0.14756068587303162,
-0.16425661742687225,
-0.013982612639665604,
0.07087808102369308,
-0.1360073685646057,
-0.37873661518096924,
0.031222114339470863,
0.025740953162312508,
0.02164791338145733,
0.31487444043159485,
-0.2747865915298462,
0.1423742175102234,
-0.11435616761445999,
0.045125581324100494,
-0.1435105800628662,
-0.2873225212097168,
-0.11179480701684952,
0.2600984573364258,
-0.11868312209844589,
-0.17142736911773682,
0.006134933326393366,
0.2725290358066559,
0.19456227123737335,
0.05502646416425705,
0.04137429594993591,
0.08452069759368896,
-0.17214277386665344,
-0.05977390334010124,
-0.20954671502113342,
0.25808727741241455,
-0.34770071506500244,
0.2448226362466812,
-0.04519585520029068,
0.09700053185224533,
0.0014256378635764122,
0.6829522848129272,
-0.09227048605680466,
-0.14329878985881805,
0.18579435348510742,
0.11734936386346817,
0.3598412275314331,
-0.030946509912610054,
-0.5588462352752686,
0.4830329716205597,
0.214432030916214,
-0.3764311373233795,
0.1936502605676651,
0.15491385757923126,
0.1011018231511116,
-0.17217616736888885,
0.07283749431371689,
0.171703040599823,
-0.008033022284507751,
0.10560306906700134,
-0.02403184399008751,
-0.3389210104942322,
-0.091695137321949,
0.24644654989242554,
0.364548921585083,
-0.20557008683681488,
0.25309449434280396,
0.2600480020046234,
0.1551523357629776,
-0.18667693436145782,
0.15133561193943024,
0.41176795959472656,
0.0877486914396286,
0.18545639514923096,
-0.02489561215043068,
-0.35045772790908813,
0.100909024477005,
-0.043221645057201385,
0.30393263697624207,
0.09848922491073608,
-0.029989490285515785,
-0.18724675476551056,
0.0030393963679671288,
-0.14020724594593048,
0.11134962737560272,
0.09825392067432404,
0.1959725171327591,
-0.11802774667739868,
0.008164455182850361,
0.08074843138456345,
-0.029118569567799568,
-0.040558625012636185,
-0.44956085085868835,
-0.15537869930267334,
-0.24388490617275238,
-0.1051284596323967,
0.024008793756365776,
-0.08899389207363129,
0.31378793716430664,
0.16315928101539612,
-0.22608959674835205,
-0.03146693855524063,
-0.013661115430295467,
0.11787059903144836,
-0.14645935595035553,
-0.28986045718193054,
0.06458528339862823,
0.402355432510376,
0.0690157413482666,
-0.10755550861358643,
0.24645276367664337,
-0.04371609538793564,
0.18517494201660156,
0.10424574464559555,
-0.37203505635261536,
0.0069657606072723866,
-0.09110099822282791,
0.025678258389234543,
0.25085681676864624,
-0.16380701959133148,
0.3958781361579895,
0.000803779752459377,
0.21516455709934235,
-0.05371597036719322,
0.2598283588886261,
0.153014674782753,
0.33996641635894775,
0.2665381133556366,
-0.4578668773174286,
-0.09239771962165833,
0.4044443964958191,
-0.06797391176223755,
0.34633365273475647,
0.21938422322273254,
-0.16435039043426514,
-0.11008857190608978,
0.08155784010887146,
0.018770882859826088,
0.10090608149766922,
0.44776615500450134,
0.170240581035614,
-0.09384874254465103,
0.2349158674478531,
-0.23779864609241486,
0.08147183060646057,
0.06938624382019043,
0.08781111985445023,
0.24909242987632751,
0.28298354148864746,
0.02463523857295513,
-0.43486469984054565,
-0.1384221464395523,
0.014817474409937859,
0.216689333319664,
0.06384188681840897,
0.015083137899637222,
-0.17772769927978516,
-0.3559892773628235,
-0.020841844379901886,
0.296294629573822,
-0.08683503419160843,
-0.14682161808013916,
0.21547387540340424,
-0.035777438431978226,
-0.03913811966776848,
0.08042898774147034,
0.19599317014217377,
0.20486201345920563,
0.35924068093299866,
-0.13099265098571777,
0.1306108683347702,
-0.21873466670513153,
-0.03160874918103218,
0.2562377154827118,
0.18959003686904907,
0.03048052079975605,
0.300656795501709,
0.05478062853217125,
0.002126930048689246,
-0.41081860661506653,
-0.2663702070713043,
0.08461429923772812,
0.07475616782903671,
-0.011274809017777443,
-0.03599082678556442,
0.13390235602855682,
0.07195594906806946,
0.005816244520246983,
-0.10051776468753815,
-0.43739742040634155,
0.0650312528014183,
0.04069877788424492,
-0.1566937267780304,
-0.2836551070213318,
-0.0031330406200140715,
-0.4743894338607788,
-0.15543009340763092,
-0.541013777256012,
0.399370938539505,
0.15051835775375366,
0.043261270970106125,
0.19932928681373596,
0.22307980060577393,
0.054832447320222855,
-0.01445184275507927,
0.24372237920761108,
-0.1458698809146881,
-0.0927402675151825,
0.3576534390449524,
-0.029897170141339302,
-0.44710907340049744,
-0.17769016325473785,
0.2569868266582489,
0.01561106275767088,
0.24560867249965668,
-0.4848361909389496,
0.3691166639328003,
-0.454969584941864,
-0.059255633503198624,
0.14433270692825317,
0.4125095009803772,
0.040480952709913254,
-0.18310505151748657,
-0.21482060849666595,
-0.025271717458963394,
-0.07438480854034424,
-0.14941440522670746,
-0.03367536887526512,
0.0336901992559433,
-0.2161390781402588,
0.2781652510166168,
0.1378098577260971,
0.17639824748039246,
0.059442389756441116,
-0.13314634561538696,
0.2932993769645691,
0.05370296537876129,
0.3576154410839081,
-0.22250786423683167,
-0.15964627265930176,
0.3230072259902954,
-0.012711982242763042,
0.0008059876272454858,
0.4088382422924042,
0.04835564270615578,
-0.2739144563674927,
0.00629121670499444,
-0.19728684425354004,
-0.024294989183545113,
-0.2163480669260025,
0.081074558198452,
0.0752352774143219,
0.053944289684295654,
0.04995028302073479,
-0.05336526781320572,
-0.09324471652507782,
-0.31386440992355347,
0.14936663210391998,
-0.09459476917982101,
-0.17957918345928192,
-0.031914956867694855,
-0.20563273131847382,
0.1982746571302414,
-0.3147493600845337,
0.1241777241230011,
-0.005529950838536024,
0.2688979506492615,
-0.06682422757148743,
0.10754628479480743,
-0.11363251507282257,
-0.04903320223093033,
0.2575823962688446,
-0.21269498765468597,
-0.0704992488026619,
-0.0892380103468895,
-0.0987013503909111,
-0.18302859365940094,
0.27956119179725647,
-0.43419456481933594,
0.26865100860595703,
0.275506854057312,
0.21470695734024048,
-0.2671356499195099,
-0.01836647279560566,
0.24270658195018768,
0.22965699434280396,
0.09691336005926132,
-0.30508241057395935,
-0.02667105384171009,
-0.05141828581690788,
-0.4869175851345062,
-0.044037774205207825,
0.01263988483697176,
0.07510118931531906,
0.051508478820323944,
-0.17617449164390564,
-0.143065944314003,
-0.1018151193857193,
0.2473822385072708,
0.11017793416976929,
-0.13647231459617615,
-0.09033816307783127,
0.12267819792032242,
-0.32220155000686646,
0.3023283779621124,
0.17050470411777496,
0.5114874839782715,
0.014475516974925995,
-0.005114327650517225,
0.28352782130241394,
-0.12164904922246933,
0.29388782382011414,
0.19801679253578186,
-0.05802266672253609,
0.26250627636909485,
-0.22888725996017456,
0.20899485051631927,
-0.12202166020870209,
0.3037271797657013,
0.052138183265924454,
0.2026883065700531,
-0.5032659769058228,
-0.3097500801086426,
0.3382958769798279,
0.2196553349494934,
0.07560321688652039,
0.13622981309890747,
0.036853987723588943,
0.045917440205812454,
-0.04986880347132683,
0.014874424785375595,
0.6704330444335938,
-0.2598544657230377,
0.046712491661310196,
-0.22336937487125397,
0.12228895723819733,
0.38302335143089294,
-0.33728811144828796,
-0.07390264421701431,
-0.2906501889228821,
-0.23744654655456543,
0.09543752670288086,
0.06925544142723083,
0.10172484815120697,
0.09351388365030289,
-0.018074272200465202,
0.22796419262886047,
0.42964425683021545,
0.09299818426370621,
-0.15522730350494385,
0.6102833151817322,
-0.3098035752773285,
-0.219413161277771,
-0.40017256140708923,
0.2367330938577652,
0.046324606984853745,
-0.28257983922958374,
-0.13667602837085724,
0.04144919663667679,
-0.008642616681754589,
0.013039996847510338,
-0.2603384852409363,
-0.09441404789686203,
-0.01250464003533125,
0.2714822590351105,
0.04263328015804291,
-0.12740549445152283,
0.4604460597038269,
-0.027509551495313644,
0.10668196529150009,
0.5751258134841919,
-0.24370083212852478,
0.012669750489294529,
-0.5017687678337097,
-0.2106204479932785,
0.1630629599094391,
0.02511144056916237,
0.09310728311538696,
0.0005246032378636301,
-0.007632930297404528,
-0.12327779829502106,
0.13374187052249908,
-0.16771511733531952,
-0.018495148047804832,
-0.10839949548244476,
0.09454686939716339,
-0.30174124240875244,
-0.09560378640890121,
-0.11150127649307251,
-0.2542814612388611,
-0.15223251283168793,
0.2037576586008072,
0.1703164130449295,
0.27650710940361023,
0.20510035753250122,
0.11835046112537384,
-0.24049372971057892,
-0.28936871886253357,
0.38306817412376404,
0.10351582616567612,
0.07949215918779373,
0.027980424463748932,
0.369848370552063,
-0.290016233921051,
-0.31775563955307007,
0.1448124647140503,
0.04774053767323494,
-0.160667285323143,
0.23724138736724854,
-0.1557592749595642,
-0.4160003662109375,
0.17739155888557434,
0.18787802755832672,
0.08863890171051025,
-0.11693118512630463,
-0.15070241689682007,
-0.11453051120042801,
-0.31852447986602783,
0.24954010546207428,
-0.04257236421108246,
0.09739934653043747,
0.13508589565753937,
-0.19671978056430817,
-0.12855041027069092,
0.14922893047332764,
-0.4088335633277893,
0.1279633641242981,
0.009484687820076942,
0.12030988931655884,
-0.053776174783706665,
-0.12706755101680756,
-0.03397426754236221,
0.09827920794487,
0.08386236429214478,
0.15943345427513123,
-0.11653970181941986,
-0.39855384826660156,
-0.11756578832864761,
0.0392703115940094,
0.08061806112527847,
0.021844962611794472,
0.24819490313529968,
-0.35447701811790466,
-0.4206348657608032,
-0.23984207212924957,
0.24780577421188354,
0.15154394507408142,
-0.03519947826862335,
-0.034094031900167465,
-0.18093284964561462,
-0.35129842162132263,
-0.07311396300792694,
0.10785257071256638,
-0.2051990032196045,
0.18661026656627655,
0.05073319748044014,
0.1604614406824112,
0.4659494459629059,
-0.1307249367237091,
-0.10600370913743973,
0.1417447328567505,
0.29699578881263733,
-0.09378919750452042,
0.21801647543907166,
-0.16092610359191895,
0.006788730155676603,
0.5635240077972412,
0.4219593107700348,
0.4364164471626282,
-0.07942330092191696,
-0.21591033041477203,
0.11284837126731873,
0.30953744053840637,
-0.3243975043296814,
-0.36144116520881653,
-0.013917106203734875,
-0.19261260330677032,
0.3381201922893524,
0.346799373626709,
0.3312763571739197,
-0.14598706364631653,
-0.1272909939289093,
-0.007621897850185633,
0.25040626525878906,
-0.006994656287133694,
-0.24896082282066345,
0.4405546188354492,
0.20495514571666718,
-0.17328231036663055,
0.3367408812046051,
0.287244588136673,
0.46410489082336426,
0.8063911199569702,
0.24855583906173706,
0.399970680475235,
0.14395302534103394,
-0.011343530379235744,
-0.022089345380663872,
-0.1734010875225067,
0.19276009500026703,
0.20215940475463867,
0.06548969447612762,
-0.021318713203072548,
-0.02714543044567108,
0.07501639425754547,
0.05671221762895584,
0.26773348450660706,
-0.14333508908748627,
-0.12135975807905197,
-0.19987738132476807,
-0.11526570469141006,
0.09781897813081741,
-0.16631001234054565,
-0.009672284126281738,
0.20599648356437683,
-0.360768586397171,
-0.07286636531352997,
0.31661322712898254,
-0.13275033235549927,
0.04459766671061516,
-0.4487651288509369,
0.5457825064659119,
-0.0206613726913929,
0.042789556086063385,
-0.18823327124118805,
0.14244596660137177,
-0.021775271743535995,
0.04943259432911873,
0.07703252881765366,
0.38511258363723755,
0.29867497086524963,
0.13919761776924133,
0.07398058474063873,
-0.018160879611968994,
-0.13677288591861725,
-0.16169464588165283,
-0.270781546831131,
0.23653696477413177,
0.16520851850509644,
0.2711946368217468,
0.39714136719703674,
0.13355973362922668,
-0.24027332663536072,
0.059736914932727814,
0.10458081215620041,
-0.28106850385665894,
-0.11182846128940582,
-0.37938085198402405,
0.18972250819206238,
-0.29165881872177124,
-0.19232067465782166,
0.035230085253715515,
-0.4169837534427643,
-0.22683630883693695,
0.6349735260009766,
-0.4023163616657257,
0.228798046708107,
-0.18061710894107819,
0.19099102914333344,
-0.13871237635612488,
0.6569441556930542,
0.35357216000556946,
0.1768474131822586,
0.08734457939863205,
-0.11601125448942184,
-0.3172489106655121,
0.17632417380809784,
-0.21576520800590515,
0.13345366716384888,
-0.06254661828279495,
0.2432495504617691,
0.27287712693214417,
0.1429257094860077,
-0.0925184041261673,
0.03315437212586403,
-0.1402646154165268,
-0.17847028374671936,
-0.33580031991004944,
-0.1845911294221878,
0.19463518261909485,
0.09596908837556839,
-0.024294959381222725,
-0.2119196057319641,
0.28052350878715515,
-0.25005215406417847,
0.17653270065784454,
-0.2722632586956024,
0.17931491136550903,
-0.1578899621963501,
-0.0976502075791359,
0.1150577962398529,
0.022334495559334755,
0.20060639083385468,
-0.3350743353366852,
0.04937884584069252,
-0.12553824484348297,
0.03292164206504822,
-0.09956084191799164,
0.28346318006515503,
0.3882297873497009,
0.046547986567020416,
-0.14611653983592987,
0.19409498572349548,
0.3050244450569153,
0.10415581613779068,
-0.15595553815364838,
0.2870498597621918,
-0.21386714279651642,
0.048658791929483414,
-0.128133162856102,
0.1683141440153122,
-0.12571413815021515,
0.14580297470092773,
-0.08877725154161453,
-0.23180875182151794,
-0.04847903922200203,
-0.37300607562065125,
0.1279519498348236,
-0.08394389599561691,
-0.42050373554229736,
-0.19490042328834534,
0.03360876441001892,
0.3893134295940399,
0.04297364130616188,
-0.5560441017150879,
0.22369205951690674,
0.1955118179321289,
0.05518924072384834,
-0.31219810247421265,
0.2979156970977783,
-0.14394474029541016,
-0.1008085384964943,
-0.03115193173289299,
0.3679390251636505,
-0.05350802466273308,
-0.22224266827106476,
-0.018857445567846298,
-0.15262256562709808
] |
https://github.com/huggingface/datasets/issues/1825
|
Datasets library not suitable for huge text datasets.
|
For information: it's now available in `datasets` 1.3.0.
The 2.0 is reserved for even cooler features ;)
|
Hi,
I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training.
Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts).
Any suggestions??
| 17 |
Datasets library not suitable for huge text datasets.
|
[
-0.6701288819313049,
0.12200786173343658,
-0.24186499416828156,
0.3283211290836334,
0.12723249197006226,
0.06754102557897568,
0.1611279547214508,
0.402766615152359,
0.018035652115941048,
0.056229367852211,
-0.17142750322818756,
-0.031586721539497375,
-0.05810239538550377,
0.27965813875198364,
-0.3228074014186859,
-0.00974426232278347,
-0.05368838831782341,
0.09309200942516327,
-0.16037315130233765,
-0.043739739805459976,
-0.03049437515437603,
-0.022518087178468704,
-0.16522464156150818,
-0.05210164189338684,
-0.2576006054878235,
-0.31012532114982605,
0.1691938042640686,
-0.05861753597855568,
-0.3783092200756073,
-0.07990860939025879,
-0.16443504393100739,
0.26483818888664246,
0.19112439453601837,
0.46570149064064026,
-0.0000986691884463653,
-0.19469155371189117,
0.17697611451148987,
-0.009749251417815685,
-0.1688881516456604,
0.19691605865955353,
-0.05539896711707115,
-0.21639372408390045,
-0.2104596048593521,
-0.28840601444244385,
0.15640997886657715,
0.06631754338741302,
-0.05699519068002701,
-0.2824561893939972,
0.05972252041101456,
0.23121321201324463,
0.36244845390319824,
-0.18762868642807007,
-0.004782075062394142,
-0.0474420003592968,
0.3273843228816986,
-0.010567194782197475,
-0.16470113396644592,
-0.10518545657396317,
0.4996553957462311,
0.17513851821422577,
-0.31038859486579895,
0.3171970248222351,
-0.12747874855995178,
-0.04499838128685951,
0.04046802595257759,
-0.24245981872081757,
-0.4579585790634155,
0.030768854543566704,
0.44759002327919006,
0.38855379819869995,
0.5901203155517578,
-0.28379568457603455,
-0.2886011600494385,
-0.18704937398433685,
-0.24460750818252563,
-0.16609041392803192,
0.050332341343164444,
0.28053897619247437,
0.089285708963871,
0.18203802406787872,
-0.25546205043792725,
-0.3489893674850464,
-0.17488110065460205,
0.1155305951833725,
-0.11285640299320221,
0.10870534181594849,
-0.24001222848892212,
0.0041083949618041515,
0.11165739595890045,
-0.1379506140947342,
0.14055754244327545,
-0.06544074416160583,
0.07318256795406342,
-0.23103797435760498,
-0.29861369729042053,
-0.1528257429599762,
-0.009627211838960648,
-0.045221880078315735,
0.3690360486507416,
0.010253104381263256,
-0.05852184072136879,
0.21712425351142883,
-0.06831594556570053,
-0.0321042537689209,
0.26237744092941284,
-0.15197142958641052,
-0.053512927144765854,
0.029948120936751366,
0.5449817180633545,
-0.045844823122024536,
-0.2005956918001175,
-0.059321220964193344,
-0.07571955770254135,
-0.21319754421710968,
-0.168890118598938,
-0.4289291501045227,
-0.11239825189113617,
-0.3643183708190918,
-0.08662676066160202,
0.21859675645828247,
-0.05788841471076012,
0.06149445101618767,
-0.01011956762522459,
0.2855091392993927,
-0.06617838144302368,
0.08587931096553802,
-0.12212648242712021,
0.0069170864298939705,
-0.08415303379297256,
-0.1254054456949234,
-0.16295529901981354,
0.0622737817466259,
0.020278045907616615,
-0.06197023391723633,
0.3275393545627594,
-0.18400871753692627,
0.14756068587303162,
-0.16425661742687225,
-0.013982612639665604,
0.07087808102369308,
-0.1360073685646057,
-0.37873661518096924,
0.031222114339470863,
0.025740953162312508,
0.02164791338145733,
0.31487444043159485,
-0.2747865915298462,
0.1423742175102234,
-0.11435616761445999,
0.045125581324100494,
-0.1435105800628662,
-0.2873225212097168,
-0.11179480701684952,
0.2600984573364258,
-0.11868312209844589,
-0.17142736911773682,
0.006134933326393366,
0.2725290358066559,
0.19456227123737335,
0.05502646416425705,
0.04137429594993591,
0.08452069759368896,
-0.17214277386665344,
-0.05977390334010124,
-0.20954671502113342,
0.25808727741241455,
-0.34770071506500244,
0.2448226362466812,
-0.04519585520029068,
0.09700053185224533,
0.0014256378635764122,
0.6829522848129272,
-0.09227048605680466,
-0.14329878985881805,
0.18579435348510742,
0.11734936386346817,
0.3598412275314331,
-0.030946509912610054,
-0.5588462352752686,
0.4830329716205597,
0.214432030916214,
-0.3764311373233795,
0.1936502605676651,
0.15491385757923126,
0.1011018231511116,
-0.17217616736888885,
0.07283749431371689,
0.171703040599823,
-0.008033022284507751,
0.10560306906700134,
-0.02403184399008751,
-0.3389210104942322,
-0.091695137321949,
0.24644654989242554,
0.364548921585083,
-0.20557008683681488,
0.25309449434280396,
0.2600480020046234,
0.1551523357629776,
-0.18667693436145782,
0.15133561193943024,
0.41176795959472656,
0.0877486914396286,
0.18545639514923096,
-0.02489561215043068,
-0.35045772790908813,
0.100909024477005,
-0.043221645057201385,
0.30393263697624207,
0.09848922491073608,
-0.029989490285515785,
-0.18724675476551056,
0.0030393963679671288,
-0.14020724594593048,
0.11134962737560272,
0.09825392067432404,
0.1959725171327591,
-0.11802774667739868,
0.008164455182850361,
0.08074843138456345,
-0.029118569567799568,
-0.040558625012636185,
-0.44956085085868835,
-0.15537869930267334,
-0.24388490617275238,
-0.1051284596323967,
0.024008793756365776,
-0.08899389207363129,
0.31378793716430664,
0.16315928101539612,
-0.22608959674835205,
-0.03146693855524063,
-0.013661115430295467,
0.11787059903144836,
-0.14645935595035553,
-0.28986045718193054,
0.06458528339862823,
0.402355432510376,
0.0690157413482666,
-0.10755550861358643,
0.24645276367664337,
-0.04371609538793564,
0.18517494201660156,
0.10424574464559555,
-0.37203505635261536,
0.0069657606072723866,
-0.09110099822282791,
0.025678258389234543,
0.25085681676864624,
-0.16380701959133148,
0.3958781361579895,
0.000803779752459377,
0.21516455709934235,
-0.05371597036719322,
0.2598283588886261,
0.153014674782753,
0.33996641635894775,
0.2665381133556366,
-0.4578668773174286,
-0.09239771962165833,
0.4044443964958191,
-0.06797391176223755,
0.34633365273475647,
0.21938422322273254,
-0.16435039043426514,
-0.11008857190608978,
0.08155784010887146,
0.018770882859826088,
0.10090608149766922,
0.44776615500450134,
0.170240581035614,
-0.09384874254465103,
0.2349158674478531,
-0.23779864609241486,
0.08147183060646057,
0.06938624382019043,
0.08781111985445023,
0.24909242987632751,
0.28298354148864746,
0.02463523857295513,
-0.43486469984054565,
-0.1384221464395523,
0.014817474409937859,
0.216689333319664,
0.06384188681840897,
0.015083137899637222,
-0.17772769927978516,
-0.3559892773628235,
-0.020841844379901886,
0.296294629573822,
-0.08683503419160843,
-0.14682161808013916,
0.21547387540340424,
-0.035777438431978226,
-0.03913811966776848,
0.08042898774147034,
0.19599317014217377,
0.20486201345920563,
0.35924068093299866,
-0.13099265098571777,
0.1306108683347702,
-0.21873466670513153,
-0.03160874918103218,
0.2562377154827118,
0.18959003686904907,
0.03048052079975605,
0.300656795501709,
0.05478062853217125,
0.002126930048689246,
-0.41081860661506653,
-0.2663702070713043,
0.08461429923772812,
0.07475616782903671,
-0.011274809017777443,
-0.03599082678556442,
0.13390235602855682,
0.07195594906806946,
0.005816244520246983,
-0.10051776468753815,
-0.43739742040634155,
0.0650312528014183,
0.04069877788424492,
-0.1566937267780304,
-0.2836551070213318,
-0.0031330406200140715,
-0.4743894338607788,
-0.15543009340763092,
-0.541013777256012,
0.399370938539505,
0.15051835775375366,
0.043261270970106125,
0.19932928681373596,
0.22307980060577393,
0.054832447320222855,
-0.01445184275507927,
0.24372237920761108,
-0.1458698809146881,
-0.0927402675151825,
0.3576534390449524,
-0.029897170141339302,
-0.44710907340049744,
-0.17769016325473785,
0.2569868266582489,
0.01561106275767088,
0.24560867249965668,
-0.4848361909389496,
0.3691166639328003,
-0.454969584941864,
-0.059255633503198624,
0.14433270692825317,
0.4125095009803772,
0.040480952709913254,
-0.18310505151748657,
-0.21482060849666595,
-0.025271717458963394,
-0.07438480854034424,
-0.14941440522670746,
-0.03367536887526512,
0.0336901992559433,
-0.2161390781402588,
0.2781652510166168,
0.1378098577260971,
0.17639824748039246,
0.059442389756441116,
-0.13314634561538696,
0.2932993769645691,
0.05370296537876129,
0.3576154410839081,
-0.22250786423683167,
-0.15964627265930176,
0.3230072259902954,
-0.012711982242763042,
0.0008059876272454858,
0.4088382422924042,
0.04835564270615578,
-0.2739144563674927,
0.00629121670499444,
-0.19728684425354004,
-0.024294989183545113,
-0.2163480669260025,
0.081074558198452,
0.0752352774143219,
0.053944289684295654,
0.04995028302073479,
-0.05336526781320572,
-0.09324471652507782,
-0.31386440992355347,
0.14936663210391998,
-0.09459476917982101,
-0.17957918345928192,
-0.031914956867694855,
-0.20563273131847382,
0.1982746571302414,
-0.3147493600845337,
0.1241777241230011,
-0.005529950838536024,
0.2688979506492615,
-0.06682422757148743,
0.10754628479480743,
-0.11363251507282257,
-0.04903320223093033,
0.2575823962688446,
-0.21269498765468597,
-0.0704992488026619,
-0.0892380103468895,
-0.0987013503909111,
-0.18302859365940094,
0.27956119179725647,
-0.43419456481933594,
0.26865100860595703,
0.275506854057312,
0.21470695734024048,
-0.2671356499195099,
-0.01836647279560566,
0.24270658195018768,
0.22965699434280396,
0.09691336005926132,
-0.30508241057395935,
-0.02667105384171009,
-0.05141828581690788,
-0.4869175851345062,
-0.044037774205207825,
0.01263988483697176,
0.07510118931531906,
0.051508478820323944,
-0.17617449164390564,
-0.143065944314003,
-0.1018151193857193,
0.2473822385072708,
0.11017793416976929,
-0.13647231459617615,
-0.09033816307783127,
0.12267819792032242,
-0.32220155000686646,
0.3023283779621124,
0.17050470411777496,
0.5114874839782715,
0.014475516974925995,
-0.005114327650517225,
0.28352782130241394,
-0.12164904922246933,
0.29388782382011414,
0.19801679253578186,
-0.05802266672253609,
0.26250627636909485,
-0.22888725996017456,
0.20899485051631927,
-0.12202166020870209,
0.3037271797657013,
0.052138183265924454,
0.2026883065700531,
-0.5032659769058228,
-0.3097500801086426,
0.3382958769798279,
0.2196553349494934,
0.07560321688652039,
0.13622981309890747,
0.036853987723588943,
0.045917440205812454,
-0.04986880347132683,
0.014874424785375595,
0.6704330444335938,
-0.2598544657230377,
0.046712491661310196,
-0.22336937487125397,
0.12228895723819733,
0.38302335143089294,
-0.33728811144828796,
-0.07390264421701431,
-0.2906501889228821,
-0.23744654655456543,
0.09543752670288086,
0.06925544142723083,
0.10172484815120697,
0.09351388365030289,
-0.018074272200465202,
0.22796419262886047,
0.42964425683021545,
0.09299818426370621,
-0.15522730350494385,
0.6102833151817322,
-0.3098035752773285,
-0.219413161277771,
-0.40017256140708923,
0.2367330938577652,
0.046324606984853745,
-0.28257983922958374,
-0.13667602837085724,
0.04144919663667679,
-0.008642616681754589,
0.013039996847510338,
-0.2603384852409363,
-0.09441404789686203,
-0.01250464003533125,
0.2714822590351105,
0.04263328015804291,
-0.12740549445152283,
0.4604460597038269,
-0.027509551495313644,
0.10668196529150009,
0.5751258134841919,
-0.24370083212852478,
0.012669750489294529,
-0.5017687678337097,
-0.2106204479932785,
0.1630629599094391,
0.02511144056916237,
0.09310728311538696,
0.0005246032378636301,
-0.007632930297404528,
-0.12327779829502106,
0.13374187052249908,
-0.16771511733531952,
-0.018495148047804832,
-0.10839949548244476,
0.09454686939716339,
-0.30174124240875244,
-0.09560378640890121,
-0.11150127649307251,
-0.2542814612388611,
-0.15223251283168793,
0.2037576586008072,
0.1703164130449295,
0.27650710940361023,
0.20510035753250122,
0.11835046112537384,
-0.24049372971057892,
-0.28936871886253357,
0.38306817412376404,
0.10351582616567612,
0.07949215918779373,
0.027980424463748932,
0.369848370552063,
-0.290016233921051,
-0.31775563955307007,
0.1448124647140503,
0.04774053767323494,
-0.160667285323143,
0.23724138736724854,
-0.1557592749595642,
-0.4160003662109375,
0.17739155888557434,
0.18787802755832672,
0.08863890171051025,
-0.11693118512630463,
-0.15070241689682007,
-0.11453051120042801,
-0.31852447986602783,
0.24954010546207428,
-0.04257236421108246,
0.09739934653043747,
0.13508589565753937,
-0.19671978056430817,
-0.12855041027069092,
0.14922893047332764,
-0.4088335633277893,
0.1279633641242981,
0.009484687820076942,
0.12030988931655884,
-0.053776174783706665,
-0.12706755101680756,
-0.03397426754236221,
0.09827920794487,
0.08386236429214478,
0.15943345427513123,
-0.11653970181941986,
-0.39855384826660156,
-0.11756578832864761,
0.0392703115940094,
0.08061806112527847,
0.021844962611794472,
0.24819490313529968,
-0.35447701811790466,
-0.4206348657608032,
-0.23984207212924957,
0.24780577421188354,
0.15154394507408142,
-0.03519947826862335,
-0.034094031900167465,
-0.18093284964561462,
-0.35129842162132263,
-0.07311396300792694,
0.10785257071256638,
-0.2051990032196045,
0.18661026656627655,
0.05073319748044014,
0.1604614406824112,
0.4659494459629059,
-0.1307249367237091,
-0.10600370913743973,
0.1417447328567505,
0.29699578881263733,
-0.09378919750452042,
0.21801647543907166,
-0.16092610359191895,
0.006788730155676603,
0.5635240077972412,
0.4219593107700348,
0.4364164471626282,
-0.07942330092191696,
-0.21591033041477203,
0.11284837126731873,
0.30953744053840637,
-0.3243975043296814,
-0.36144116520881653,
-0.013917106203734875,
-0.19261260330677032,
0.3381201922893524,
0.346799373626709,
0.3312763571739197,
-0.14598706364631653,
-0.1272909939289093,
-0.007621897850185633,
0.25040626525878906,
-0.006994656287133694,
-0.24896082282066345,
0.4405546188354492,
0.20495514571666718,
-0.17328231036663055,
0.3367408812046051,
0.287244588136673,
0.46410489082336426,
0.8063911199569702,
0.24855583906173706,
0.399970680475235,
0.14395302534103394,
-0.011343530379235744,
-0.022089345380663872,
-0.1734010875225067,
0.19276009500026703,
0.20215940475463867,
0.06548969447612762,
-0.021318713203072548,
-0.02714543044567108,
0.07501639425754547,
0.05671221762895584,
0.26773348450660706,
-0.14333508908748627,
-0.12135975807905197,
-0.19987738132476807,
-0.11526570469141006,
0.09781897813081741,
-0.16631001234054565,
-0.009672284126281738,
0.20599648356437683,
-0.360768586397171,
-0.07286636531352997,
0.31661322712898254,
-0.13275033235549927,
0.04459766671061516,
-0.4487651288509369,
0.5457825064659119,
-0.0206613726913929,
0.042789556086063385,
-0.18823327124118805,
0.14244596660137177,
-0.021775271743535995,
0.04943259432911873,
0.07703252881765366,
0.38511258363723755,
0.29867497086524963,
0.13919761776924133,
0.07398058474063873,
-0.018160879611968994,
-0.13677288591861725,
-0.16169464588165283,
-0.270781546831131,
0.23653696477413177,
0.16520851850509644,
0.2711946368217468,
0.39714136719703674,
0.13355973362922668,
-0.24027332663536072,
0.059736914932727814,
0.10458081215620041,
-0.28106850385665894,
-0.11182846128940582,
-0.37938085198402405,
0.18972250819206238,
-0.29165881872177124,
-0.19232067465782166,
0.035230085253715515,
-0.4169837534427643,
-0.22683630883693695,
0.6349735260009766,
-0.4023163616657257,
0.228798046708107,
-0.18061710894107819,
0.19099102914333344,
-0.13871237635612488,
0.6569441556930542,
0.35357216000556946,
0.1768474131822586,
0.08734457939863205,
-0.11601125448942184,
-0.3172489106655121,
0.17632417380809784,
-0.21576520800590515,
0.13345366716384888,
-0.06254661828279495,
0.2432495504617691,
0.27287712693214417,
0.1429257094860077,
-0.0925184041261673,
0.03315437212586403,
-0.1402646154165268,
-0.17847028374671936,
-0.33580031991004944,
-0.1845911294221878,
0.19463518261909485,
0.09596908837556839,
-0.024294959381222725,
-0.2119196057319641,
0.28052350878715515,
-0.25005215406417847,
0.17653270065784454,
-0.2722632586956024,
0.17931491136550903,
-0.1578899621963501,
-0.0976502075791359,
0.1150577962398529,
0.022334495559334755,
0.20060639083385468,
-0.3350743353366852,
0.04937884584069252,
-0.12553824484348297,
0.03292164206504822,
-0.09956084191799164,
0.28346318006515503,
0.3882297873497009,
0.046547986567020416,
-0.14611653983592987,
0.19409498572349548,
0.3050244450569153,
0.10415581613779068,
-0.15595553815364838,
0.2870498597621918,
-0.21386714279651642,
0.048658791929483414,
-0.128133162856102,
0.1683141440153122,
-0.12571413815021515,
0.14580297470092773,
-0.08877725154161453,
-0.23180875182151794,
-0.04847903922200203,
-0.37300607562065125,
0.1279519498348236,
-0.08394389599561691,
-0.42050373554229736,
-0.19490042328834534,
0.03360876441001892,
0.3893134295940399,
0.04297364130616188,
-0.5560441017150879,
0.22369205951690674,
0.1955118179321289,
0.05518924072384834,
-0.31219810247421265,
0.2979156970977783,
-0.14394474029541016,
-0.1008085384964943,
-0.03115193173289299,
0.3679390251636505,
-0.05350802466273308,
-0.22224266827106476,
-0.018857445567846298,
-0.15262256562709808
] |
https://github.com/huggingface/datasets/issues/1825
|
Datasets library not suitable for huge text datasets.
|
Hi @alexvaca0 , we have optimized Datasets' disk usage in the latest release v1.5.
Feel free to update your Datasets version
```shell
pip install -U datasets
```
and see if it better suits your needs.
|
Hi,
I'm trying to use datasets library to load a 187GB dataset of pure text, with the intention of building a Language Model. The problem is that from the 187GB it goes to some TB when processed by Datasets. First of all, I think the pre-tokenizing step (with tokenizer.map()) is not really thought for datasets this big, but for fine-tuning datasets, as this process alone takes so much time, usually in expensive machines (due to the need of tpus - gpus) which is not being used for training. It would possibly be more efficient in such cases to tokenize each batch at training time (receive batch - tokenize batch - train with batch), so that the whole time the machine is up it's being used for training.
Moreover, the pyarrow objects created from a 187 GB datasets are huge, I mean, we always receive OOM, or No Space left on device errors when only 10-12% of the dataset has been processed, and only that part occupies 2.1TB in disk, which is so many times the disk usage of the pure text (and this doesn't make sense, as tokenized texts should be lighter than pure texts).
Any suggestions??
| 35 |
Datasets library not suitable for huge text datasets.
|
[
-0.6701288819313049,
0.12200786173343658,
-0.24186499416828156,
0.3283211290836334,
0.12723249197006226,
0.06754102557897568,
0.1611279547214508,
0.402766615152359,
0.018035652115941048,
0.056229367852211,
-0.17142750322818756,
-0.031586721539497375,
-0.05810239538550377,
0.27965813875198364,
-0.3228074014186859,
-0.00974426232278347,
-0.05368838831782341,
0.09309200942516327,
-0.16037315130233765,
-0.043739739805459976,
-0.03049437515437603,
-0.022518087178468704,
-0.16522464156150818,
-0.05210164189338684,
-0.2576006054878235,
-0.31012532114982605,
0.1691938042640686,
-0.05861753597855568,
-0.3783092200756073,
-0.07990860939025879,
-0.16443504393100739,
0.26483818888664246,
0.19112439453601837,
0.46570149064064026,
-0.0000986691884463653,
-0.19469155371189117,
0.17697611451148987,
-0.009749251417815685,
-0.1688881516456604,
0.19691605865955353,
-0.05539896711707115,
-0.21639372408390045,
-0.2104596048593521,
-0.28840601444244385,
0.15640997886657715,
0.06631754338741302,
-0.05699519068002701,
-0.2824561893939972,
0.05972252041101456,
0.23121321201324463,
0.36244845390319824,
-0.18762868642807007,
-0.004782075062394142,
-0.0474420003592968,
0.3273843228816986,
-0.010567194782197475,
-0.16470113396644592,
-0.10518545657396317,
0.4996553957462311,
0.17513851821422577,
-0.31038859486579895,
0.3171970248222351,
-0.12747874855995178,
-0.04499838128685951,
0.04046802595257759,
-0.24245981872081757,
-0.4579585790634155,
0.030768854543566704,
0.44759002327919006,
0.38855379819869995,
0.5901203155517578,
-0.28379568457603455,
-0.2886011600494385,
-0.18704937398433685,
-0.24460750818252563,
-0.16609041392803192,
0.050332341343164444,
0.28053897619247437,
0.089285708963871,
0.18203802406787872,
-0.25546205043792725,
-0.3489893674850464,
-0.17488110065460205,
0.1155305951833725,
-0.11285640299320221,
0.10870534181594849,
-0.24001222848892212,
0.0041083949618041515,
0.11165739595890045,
-0.1379506140947342,
0.14055754244327545,
-0.06544074416160583,
0.07318256795406342,
-0.23103797435760498,
-0.29861369729042053,
-0.1528257429599762,
-0.009627211838960648,
-0.045221880078315735,
0.3690360486507416,
0.010253104381263256,
-0.05852184072136879,
0.21712425351142883,
-0.06831594556570053,
-0.0321042537689209,
0.26237744092941284,
-0.15197142958641052,
-0.053512927144765854,
0.029948120936751366,
0.5449817180633545,
-0.045844823122024536,
-0.2005956918001175,
-0.059321220964193344,
-0.07571955770254135,
-0.21319754421710968,
-0.168890118598938,
-0.4289291501045227,
-0.11239825189113617,
-0.3643183708190918,
-0.08662676066160202,
0.21859675645828247,
-0.05788841471076012,
0.06149445101618767,
-0.01011956762522459,
0.2855091392993927,
-0.06617838144302368,
0.08587931096553802,
-0.12212648242712021,
0.0069170864298939705,
-0.08415303379297256,
-0.1254054456949234,
-0.16295529901981354,
0.0622737817466259,
0.020278045907616615,
-0.06197023391723633,
0.3275393545627594,
-0.18400871753692627,
0.14756068587303162,
-0.16425661742687225,
-0.013982612639665604,
0.07087808102369308,
-0.1360073685646057,
-0.37873661518096924,
0.031222114339470863,
0.025740953162312508,
0.02164791338145733,
0.31487444043159485,
-0.2747865915298462,
0.1423742175102234,
-0.11435616761445999,
0.045125581324100494,
-0.1435105800628662,
-0.2873225212097168,
-0.11179480701684952,
0.2600984573364258,
-0.11868312209844589,
-0.17142736911773682,
0.006134933326393366,
0.2725290358066559,
0.19456227123737335,
0.05502646416425705,
0.04137429594993591,
0.08452069759368896,
-0.17214277386665344,
-0.05977390334010124,
-0.20954671502113342,
0.25808727741241455,
-0.34770071506500244,
0.2448226362466812,
-0.04519585520029068,
0.09700053185224533,
0.0014256378635764122,
0.6829522848129272,
-0.09227048605680466,
-0.14329878985881805,
0.18579435348510742,
0.11734936386346817,
0.3598412275314331,
-0.030946509912610054,
-0.5588462352752686,
0.4830329716205597,
0.214432030916214,
-0.3764311373233795,
0.1936502605676651,
0.15491385757923126,
0.1011018231511116,
-0.17217616736888885,
0.07283749431371689,
0.171703040599823,
-0.008033022284507751,
0.10560306906700134,
-0.02403184399008751,
-0.3389210104942322,
-0.091695137321949,
0.24644654989242554,
0.364548921585083,
-0.20557008683681488,
0.25309449434280396,
0.2600480020046234,
0.1551523357629776,
-0.18667693436145782,
0.15133561193943024,
0.41176795959472656,
0.0877486914396286,
0.18545639514923096,
-0.02489561215043068,
-0.35045772790908813,
0.100909024477005,
-0.043221645057201385,
0.30393263697624207,
0.09848922491073608,
-0.029989490285515785,
-0.18724675476551056,
0.0030393963679671288,
-0.14020724594593048,
0.11134962737560272,
0.09825392067432404,
0.1959725171327591,
-0.11802774667739868,
0.008164455182850361,
0.08074843138456345,
-0.029118569567799568,
-0.040558625012636185,
-0.44956085085868835,
-0.15537869930267334,
-0.24388490617275238,
-0.1051284596323967,
0.024008793756365776,
-0.08899389207363129,
0.31378793716430664,
0.16315928101539612,
-0.22608959674835205,
-0.03146693855524063,
-0.013661115430295467,
0.11787059903144836,
-0.14645935595035553,
-0.28986045718193054,
0.06458528339862823,
0.402355432510376,
0.0690157413482666,
-0.10755550861358643,
0.24645276367664337,
-0.04371609538793564,
0.18517494201660156,
0.10424574464559555,
-0.37203505635261536,
0.0069657606072723866,
-0.09110099822282791,
0.025678258389234543,
0.25085681676864624,
-0.16380701959133148,
0.3958781361579895,
0.000803779752459377,
0.21516455709934235,
-0.05371597036719322,
0.2598283588886261,
0.153014674782753,
0.33996641635894775,
0.2665381133556366,
-0.4578668773174286,
-0.09239771962165833,
0.4044443964958191,
-0.06797391176223755,
0.34633365273475647,
0.21938422322273254,
-0.16435039043426514,
-0.11008857190608978,
0.08155784010887146,
0.018770882859826088,
0.10090608149766922,
0.44776615500450134,
0.170240581035614,
-0.09384874254465103,
0.2349158674478531,
-0.23779864609241486,
0.08147183060646057,
0.06938624382019043,
0.08781111985445023,
0.24909242987632751,
0.28298354148864746,
0.02463523857295513,
-0.43486469984054565,
-0.1384221464395523,
0.014817474409937859,
0.216689333319664,
0.06384188681840897,
0.015083137899637222,
-0.17772769927978516,
-0.3559892773628235,
-0.020841844379901886,
0.296294629573822,
-0.08683503419160843,
-0.14682161808013916,
0.21547387540340424,
-0.035777438431978226,
-0.03913811966776848,
0.08042898774147034,
0.19599317014217377,
0.20486201345920563,
0.35924068093299866,
-0.13099265098571777,
0.1306108683347702,
-0.21873466670513153,
-0.03160874918103218,
0.2562377154827118,
0.18959003686904907,
0.03048052079975605,
0.300656795501709,
0.05478062853217125,
0.002126930048689246,
-0.41081860661506653,
-0.2663702070713043,
0.08461429923772812,
0.07475616782903671,
-0.011274809017777443,
-0.03599082678556442,
0.13390235602855682,
0.07195594906806946,
0.005816244520246983,
-0.10051776468753815,
-0.43739742040634155,
0.0650312528014183,
0.04069877788424492,
-0.1566937267780304,
-0.2836551070213318,
-0.0031330406200140715,
-0.4743894338607788,
-0.15543009340763092,
-0.541013777256012,
0.399370938539505,
0.15051835775375366,
0.043261270970106125,
0.19932928681373596,
0.22307980060577393,
0.054832447320222855,
-0.01445184275507927,
0.24372237920761108,
-0.1458698809146881,
-0.0927402675151825,
0.3576534390449524,
-0.029897170141339302,
-0.44710907340049744,
-0.17769016325473785,
0.2569868266582489,
0.01561106275767088,
0.24560867249965668,
-0.4848361909389496,
0.3691166639328003,
-0.454969584941864,
-0.059255633503198624,
0.14433270692825317,
0.4125095009803772,
0.040480952709913254,
-0.18310505151748657,
-0.21482060849666595,
-0.025271717458963394,
-0.07438480854034424,
-0.14941440522670746,
-0.03367536887526512,
0.0336901992559433,
-0.2161390781402588,
0.2781652510166168,
0.1378098577260971,
0.17639824748039246,
0.059442389756441116,
-0.13314634561538696,
0.2932993769645691,
0.05370296537876129,
0.3576154410839081,
-0.22250786423683167,
-0.15964627265930176,
0.3230072259902954,
-0.012711982242763042,
0.0008059876272454858,
0.4088382422924042,
0.04835564270615578,
-0.2739144563674927,
0.00629121670499444,
-0.19728684425354004,
-0.024294989183545113,
-0.2163480669260025,
0.081074558198452,
0.0752352774143219,
0.053944289684295654,
0.04995028302073479,
-0.05336526781320572,
-0.09324471652507782,
-0.31386440992355347,
0.14936663210391998,
-0.09459476917982101,
-0.17957918345928192,
-0.031914956867694855,
-0.20563273131847382,
0.1982746571302414,
-0.3147493600845337,
0.1241777241230011,
-0.005529950838536024,
0.2688979506492615,
-0.06682422757148743,
0.10754628479480743,
-0.11363251507282257,
-0.04903320223093033,
0.2575823962688446,
-0.21269498765468597,
-0.0704992488026619,
-0.0892380103468895,
-0.0987013503909111,
-0.18302859365940094,
0.27956119179725647,
-0.43419456481933594,
0.26865100860595703,
0.275506854057312,
0.21470695734024048,
-0.2671356499195099,
-0.01836647279560566,
0.24270658195018768,
0.22965699434280396,
0.09691336005926132,
-0.30508241057395935,
-0.02667105384171009,
-0.05141828581690788,
-0.4869175851345062,
-0.044037774205207825,
0.01263988483697176,
0.07510118931531906,
0.051508478820323944,
-0.17617449164390564,
-0.143065944314003,
-0.1018151193857193,
0.2473822385072708,
0.11017793416976929,
-0.13647231459617615,
-0.09033816307783127,
0.12267819792032242,
-0.32220155000686646,
0.3023283779621124,
0.17050470411777496,
0.5114874839782715,
0.014475516974925995,
-0.005114327650517225,
0.28352782130241394,
-0.12164904922246933,
0.29388782382011414,
0.19801679253578186,
-0.05802266672253609,
0.26250627636909485,
-0.22888725996017456,
0.20899485051631927,
-0.12202166020870209,
0.3037271797657013,
0.052138183265924454,
0.2026883065700531,
-0.5032659769058228,
-0.3097500801086426,
0.3382958769798279,
0.2196553349494934,
0.07560321688652039,
0.13622981309890747,
0.036853987723588943,
0.045917440205812454,
-0.04986880347132683,
0.014874424785375595,
0.6704330444335938,
-0.2598544657230377,
0.046712491661310196,
-0.22336937487125397,
0.12228895723819733,
0.38302335143089294,
-0.33728811144828796,
-0.07390264421701431,
-0.2906501889228821,
-0.23744654655456543,
0.09543752670288086,
0.06925544142723083,
0.10172484815120697,
0.09351388365030289,
-0.018074272200465202,
0.22796419262886047,
0.42964425683021545,
0.09299818426370621,
-0.15522730350494385,
0.6102833151817322,
-0.3098035752773285,
-0.219413161277771,
-0.40017256140708923,
0.2367330938577652,
0.046324606984853745,
-0.28257983922958374,
-0.13667602837085724,
0.04144919663667679,
-0.008642616681754589,
0.013039996847510338,
-0.2603384852409363,
-0.09441404789686203,
-0.01250464003533125,
0.2714822590351105,
0.04263328015804291,
-0.12740549445152283,
0.4604460597038269,
-0.027509551495313644,
0.10668196529150009,
0.5751258134841919,
-0.24370083212852478,
0.012669750489294529,
-0.5017687678337097,
-0.2106204479932785,
0.1630629599094391,
0.02511144056916237,
0.09310728311538696,
0.0005246032378636301,
-0.007632930297404528,
-0.12327779829502106,
0.13374187052249908,
-0.16771511733531952,
-0.018495148047804832,
-0.10839949548244476,
0.09454686939716339,
-0.30174124240875244,
-0.09560378640890121,
-0.11150127649307251,
-0.2542814612388611,
-0.15223251283168793,
0.2037576586008072,
0.1703164130449295,
0.27650710940361023,
0.20510035753250122,
0.11835046112537384,
-0.24049372971057892,
-0.28936871886253357,
0.38306817412376404,
0.10351582616567612,
0.07949215918779373,
0.027980424463748932,
0.369848370552063,
-0.290016233921051,
-0.31775563955307007,
0.1448124647140503,
0.04774053767323494,
-0.160667285323143,
0.23724138736724854,
-0.1557592749595642,
-0.4160003662109375,
0.17739155888557434,
0.18787802755832672,
0.08863890171051025,
-0.11693118512630463,
-0.15070241689682007,
-0.11453051120042801,
-0.31852447986602783,
0.24954010546207428,
-0.04257236421108246,
0.09739934653043747,
0.13508589565753937,
-0.19671978056430817,
-0.12855041027069092,
0.14922893047332764,
-0.4088335633277893,
0.1279633641242981,
0.009484687820076942,
0.12030988931655884,
-0.053776174783706665,
-0.12706755101680756,
-0.03397426754236221,
0.09827920794487,
0.08386236429214478,
0.15943345427513123,
-0.11653970181941986,
-0.39855384826660156,
-0.11756578832864761,
0.0392703115940094,
0.08061806112527847,
0.021844962611794472,
0.24819490313529968,
-0.35447701811790466,
-0.4206348657608032,
-0.23984207212924957,
0.24780577421188354,
0.15154394507408142,
-0.03519947826862335,
-0.034094031900167465,
-0.18093284964561462,
-0.35129842162132263,
-0.07311396300792694,
0.10785257071256638,
-0.2051990032196045,
0.18661026656627655,
0.05073319748044014,
0.1604614406824112,
0.4659494459629059,
-0.1307249367237091,
-0.10600370913743973,
0.1417447328567505,
0.29699578881263733,
-0.09378919750452042,
0.21801647543907166,
-0.16092610359191895,
0.006788730155676603,
0.5635240077972412,
0.4219593107700348,
0.4364164471626282,
-0.07942330092191696,
-0.21591033041477203,
0.11284837126731873,
0.30953744053840637,
-0.3243975043296814,
-0.36144116520881653,
-0.013917106203734875,
-0.19261260330677032,
0.3381201922893524,
0.346799373626709,
0.3312763571739197,
-0.14598706364631653,
-0.1272909939289093,
-0.007621897850185633,
0.25040626525878906,
-0.006994656287133694,
-0.24896082282066345,
0.4405546188354492,
0.20495514571666718,
-0.17328231036663055,
0.3367408812046051,
0.287244588136673,
0.46410489082336426,
0.8063911199569702,
0.24855583906173706,
0.399970680475235,
0.14395302534103394,
-0.011343530379235744,
-0.022089345380663872,
-0.1734010875225067,
0.19276009500026703,
0.20215940475463867,
0.06548969447612762,
-0.021318713203072548,
-0.02714543044567108,
0.07501639425754547,
0.05671221762895584,
0.26773348450660706,
-0.14333508908748627,
-0.12135975807905197,
-0.19987738132476807,
-0.11526570469141006,
0.09781897813081741,
-0.16631001234054565,
-0.009672284126281738,
0.20599648356437683,
-0.360768586397171,
-0.07286636531352997,
0.31661322712898254,
-0.13275033235549927,
0.04459766671061516,
-0.4487651288509369,
0.5457825064659119,
-0.0206613726913929,
0.042789556086063385,
-0.18823327124118805,
0.14244596660137177,
-0.021775271743535995,
0.04943259432911873,
0.07703252881765366,
0.38511258363723755,
0.29867497086524963,
0.13919761776924133,
0.07398058474063873,
-0.018160879611968994,
-0.13677288591861725,
-0.16169464588165283,
-0.270781546831131,
0.23653696477413177,
0.16520851850509644,
0.2711946368217468,
0.39714136719703674,
0.13355973362922668,
-0.24027332663536072,
0.059736914932727814,
0.10458081215620041,
-0.28106850385665894,
-0.11182846128940582,
-0.37938085198402405,
0.18972250819206238,
-0.29165881872177124,
-0.19232067465782166,
0.035230085253715515,
-0.4169837534427643,
-0.22683630883693695,
0.6349735260009766,
-0.4023163616657257,
0.228798046708107,
-0.18061710894107819,
0.19099102914333344,
-0.13871237635612488,
0.6569441556930542,
0.35357216000556946,
0.1768474131822586,
0.08734457939863205,
-0.11601125448942184,
-0.3172489106655121,
0.17632417380809784,
-0.21576520800590515,
0.13345366716384888,
-0.06254661828279495,
0.2432495504617691,
0.27287712693214417,
0.1429257094860077,
-0.0925184041261673,
0.03315437212586403,
-0.1402646154165268,
-0.17847028374671936,
-0.33580031991004944,
-0.1845911294221878,
0.19463518261909485,
0.09596908837556839,
-0.024294959381222725,
-0.2119196057319641,
0.28052350878715515,
-0.25005215406417847,
0.17653270065784454,
-0.2722632586956024,
0.17931491136550903,
-0.1578899621963501,
-0.0976502075791359,
0.1150577962398529,
0.022334495559334755,
0.20060639083385468,
-0.3350743353366852,
0.04937884584069252,
-0.12553824484348297,
0.03292164206504822,
-0.09956084191799164,
0.28346318006515503,
0.3882297873497009,
0.046547986567020416,
-0.14611653983592987,
0.19409498572349548,
0.3050244450569153,
0.10415581613779068,
-0.15595553815364838,
0.2870498597621918,
-0.21386714279651642,
0.048658791929483414,
-0.128133162856102,
0.1683141440153122,
-0.12571413815021515,
0.14580297470092773,
-0.08877725154161453,
-0.23180875182151794,
-0.04847903922200203,
-0.37300607562065125,
0.1279519498348236,
-0.08394389599561691,
-0.42050373554229736,
-0.19490042328834534,
0.03360876441001892,
0.3893134295940399,
0.04297364130616188,
-0.5560441017150879,
0.22369205951690674,
0.1955118179321289,
0.05518924072384834,
-0.31219810247421265,
0.2979156970977783,
-0.14394474029541016,
-0.1008085384964943,
-0.03115193173289299,
0.3679390251636505,
-0.05350802466273308,
-0.22224266827106476,
-0.018857445567846298,
-0.15262256562709808
] |
https://github.com/huggingface/datasets/issues/1821
|
Provide better exception message when one of many files results in an exception
|
Hi!
Thank you for reporting this issue. I agree that the information about the exception should be more clear and explicit.
I could take on this issue.
On the meantime, as you can see from the exception stack trace, HF Datasets uses pandas to read the CSV files. You can pass arguments to `pandas.read_csv` by passing additional keyword arguments to `load_dataset`. For example, you may find useful this argument:
- `error_bad_lines` : bool, default True
Lines with too many fields (e.g. a csv line with too many commas) will by default cause an exception to be raised, and no DataFrame will be returned. If False, then these “bad lines” will be dropped from the DataFrame that is returned.
You could try:
```python
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files), error_bad_lines=False)
```
|
I find when I process many files, i.e.
```
train_files = glob.glob('rain*.csv')
validation_files = glob.glob(validation*.csv')
datasets = load_dataset("csv", data_files=dict(train=train_files, validation=validation_files))
```
I sometimes encounter an error due to one of the files being misformed (i.e. no data, or a comma in a field that isn't quoted, etc).
For example, this is the tail of an exception which I suspect is due to a stray comma.
> File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read
> File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory
> File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows
> File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows
> File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error
> pandas.errors.ParserError: Error tokenizing data. C error: Expected 2 fields in line 559, saw 3
It would be nice if the exception trace contained the name of the file being processed (I have 250 separate files!)
| 129 |
Provide better exception message when one of many files results in an exception
|
[
-0.30294540524482727,
-0.33204400539398193,
-0.19195684790611267,
0.25565171241760254,
0.03124840185046196,
-0.13167604804039001,
-0.026267260313034058,
0.2670029401779175,
-0.01617724820971489,
0.36521288752555847,
0.3654223084449768,
-0.1517174243927002,
-0.5251290798187256,
-0.39806583523750305,
-0.4811403155326843,
0.0442730151116848,
-0.17507338523864746,
0.1130056381225586,
0.4700900912284851,
-0.02377636916935444,
0.08057674020528793,
0.22354795038700104,
0.21953092515468597,
0.2913202941417694,
-0.20411095023155212,
0.05655514448881149,
-0.014305541291832924,
0.28841444849967957,
0.20238399505615234,
-0.2993956208229065,
-0.04992308095097542,
-0.03071056678891182,
0.02946528233587742,
0.1824323832988739,
-0.000097973934316542,
0.145401269197464,
0.1110980212688446,
-0.045183002948760986,
-0.2038465440273285,
0.15317402780056,
-0.17952412366867065,
-0.4926280975341797,
-0.33575963973999023,
-0.15974122285842896,
0.13266316056251526,
-0.025626711547374725,
0.3544740080833435,
-0.06650417298078537,
0.3472885489463806,
0.25151100754737854,
0.24586181342601776,
-0.02920306660234928,
0.20755554735660553,
0.12120310962200165,
0.4495919346809387,
-0.07092009484767914,
0.05632477253675461,
0.07111603021621704,
0.5072944760322571,
-0.23309125006198883,
-0.18627895414829254,
0.35433927178382874,
-0.0273776575922966,
0.047418106347322464,
-0.2400953322649002,
-0.14004361629486084,
0.30176863074302673,
0.07222431898117065,
-0.2668111324310303,
0.35625165700912476,
-0.1453189253807068,
-0.06574221700429916,
-0.050938136875629425,
-0.47460392117500305,
0.12697795033454895,
-0.046789269894361496,
-0.005426928400993347,
0.11661658436059952,
-0.28100350499153137,
-0.005128343589603901,
0.37195760011672974,
-0.07443185895681381,
-0.45151251554489136,
-0.06681215018033981,
0.06156441196799278,
-0.13387370109558105,
0.08636988699436188,
-0.0008600611472502351,
0.27041861414909363,
-0.10551822185516357,
-0.4429112672805786,
0.07139700651168823,
-0.14072293043136597,
-0.2458714246749878,
-0.10716851055622101,
-0.323647141456604,
0.2450590878725052,
-0.437983900308609,
0.3846069872379303,
-0.4004593789577484,
0.33688515424728394,
0.4174402356147766,
-0.09243626892566681,
0.003835371695458889,
0.20103813707828522,
-0.3179812729358673,
0.2766701877117157,
-0.22427409887313843,
0.30363667011260986,
0.3176654875278473,
-0.29000547528266907,
0.03244815766811371,
0.15620724856853485,
-0.1716136783361435,
-0.0168954785913229,
0.6956560015678406,
0.14002715051174164,
0.07287672907114029,
-0.30405133962631226,
0.11181020736694336,
-0.20736224949359894,
-0.2117053121328354,
-0.031330108642578125,
0.19129860401153564,
0.17240402102470398,
0.08377161622047424,
0.11826076358556747,
-0.09612563252449036,
0.040768880397081375,
-0.3766576051712036,
-0.05636076629161835,
0.12058450281620026,
-0.09807124733924866,
-0.03714011609554291,
0.006294978782534599,
0.19345635175704956,
-0.1964242160320282,
-0.09238231182098389,
0.1284319907426834,
-0.1384572833776474,
0.21969550848007202,
-0.099784255027771,
0.12438377737998962,
-0.13939093053340912,
0.07174360752105713,
0.05658832564949989,
0.1368076354265213,
-0.14768601953983307,
-0.06256044656038284,
-0.07654227316379547,
-0.18110060691833496,
-0.3095272183418274,
0.10007497668266296,
0.22433917224407196,
0.3224567174911499,
0.26411500573158264,
0.17491888999938965,
0.260006844997406,
-0.2486906498670578,
-0.37282466888427734,
-0.03300979733467102,
0.16190633177757263,
0.2481476068496704,
-0.14892570674419403,
-0.06835426390171051,
0.5821568369865417,
0.08084633946418762,
0.13277684152126312,
-0.2419489026069641,
-0.3296835124492645,
-0.018791088834404945,
0.0599038265645504,
-0.14858146011829376,
0.14884385466575623,
-0.4343830645084381,
0.19053201377391815,
0.1771947294473648,
-0.1362202763557434,
-0.14516587555408478,
0.41822463274002075,
-0.4104617238044739,
0.22437149286270142,
0.3357622027397156,
0.213689923286438,
-0.1513320654630661,
-0.1960713416337967,
0.11794804036617279,
-0.015543886460363865,
-0.2360987365245819,
0.2439424842596054,
-0.06015646085143089,
-0.0813956931233406,
-0.22367814183235168,
-0.06174049526453018,
0.02259022556245327,
-0.36823102831840515,
0.28249961137771606,
0.16554197669029236,
0.5016044974327087,
-0.04061676934361458,
-0.16372695565223694,
0.1070997342467308,
0.2034170776605606,
-0.23928524553775787,
-0.4498981535434723,
-0.05565730854868889,
0.08384273201227188,
-0.023923909291625023,
-0.12546947598457336,
-0.09160315990447998,
0.03954872116446495,
-0.18285153806209564,
0.08194003254175186,
-0.22182312607765198,
-0.011167967692017555,
0.11446409672498703,
0.40690135955810547,
0.42001134157180786,
-0.24762842059135437,
-0.16722193360328674,
0.21646945178508759,
0.20493604242801666,
-0.4066579341888428,
0.013153422623872757,
0.23218446969985962,
-0.2801327109336853,
-0.08466476947069168,
-0.19831280410289764,
0.11735817790031433,
-0.11772838979959488,
-0.02578175812959671,
-0.15238256752490997,
0.08016103506088257,
0.3078896105289459,
-0.1609291285276413,
0.019127724692225456,
0.009663734585046768,
-0.04806201532483101,
-0.020893298089504242,
0.0372980535030365,
-0.32221880555152893,
-0.033462684601545334,
-0.27365830540657043,
0.20417548716068268,
-0.2939387261867523,
0.08406028151512146,
0.2869609594345093,
0.04033960402011871,
0.15975306928157806,
-0.11135246604681015,
-0.043403200805187225,
0.05896196886897087,
0.15454579889774323,
-0.15370586514472961,
-0.03156732767820358,
-0.02492523193359375,
-0.3945445418357849,
-0.04932812228798866,
-0.3690741956233978,
0.006097886711359024,
0.24127396941184998,
0.07291017472743988,
0.32021233439445496,
0.20955854654312134,
0.4420403838157654,
0.30383601784706116,
0.1417555958032608,
0.1941116452217102,
0.24250952899456024,
0.3961121737957001,
-0.029332619160413742,
-0.3184005618095398,
0.08177866786718369,
-0.2660999000072479,
-0.03793000057339668,
0.08467601239681244,
-0.1732383370399475,
0.48279738426208496,
0.015969842672348022,
-0.13148744404315948,
-0.14069262146949768,
-0.5076647996902466,
-0.1498223841190338,
-0.14826591312885284,
-0.111321359872818,
-0.09680245071649551,
-0.13135290145874023,
-0.4556068181991577,
-0.5108227729797363,
0.02703944779932499,
-0.04817339777946472,
0.09540088474750519,
0.4056004583835602,
0.09574071317911148,
-0.4954639673233032,
-0.0007530972943641245,
0.2757786810398102,
0.14895369112491608,
0.17501258850097656,
0.09603316336870193,
0.22201068699359894,
0.1492733359336853,
-0.007977280765771866,
0.15849123895168304,
0.2877202033996582,
-0.26611489057540894,
0.19679982960224152,
-0.2622779905796051,
-0.23012205958366394,
-0.41155269742012024,
0.138119637966156,
0.05695553496479988,
-0.020223839208483696,
-0.15778712928295135,
0.27215567231178284,
0.21346674859523773,
-0.040526680648326874,
-0.6589670181274414,
0.21092529594898224,
-0.06842908263206482,
0.04606383293867111,
0.12318521738052368,
0.11959782242774963,
0.24398688971996307,
-0.00853355135768652,
-0.2329302430152893,
0.08645358681678772,
-0.4604935944080353,
0.13502976298332214,
-0.365381121635437,
0.32002490758895874,
0.15300051867961884,
0.3524019420146942,
0.04827417805790901,
-0.18206454813480377,
0.3688865005970001,
0.36666688323020935,
0.026957983151078224,
-0.2459476888179779,
0.011800464242696762,
-0.09179731458425522,
-0.19712691009044647,
-0.14083504676818848,
-0.30130743980407715,
0.16225682199001312,
-0.21677468717098236,
-0.2231661081314087,
0.2336207628250122,
-0.298723042011261,
-0.0683971419930458,
-0.11609295010566711,
0.11706813424825668,
0.00210632779635489,
-0.32956627011299133,
0.08090876787900925,
0.13097532093524933,
0.006775960326194763,
-0.16065745055675507,
0.33651602268218994,
-0.2441396266222,
0.23057793080806732,
0.12090566754341125,
0.2607094347476959,
0.008079863153398037,
0.1348073035478592,
0.3108711540699005,
0.203032448887825,
0.207948237657547,
0.4118746519088745,
0.04121389240026474,
0.0322229266166687,
0.17497877776622772,
-0.0726434513926506,
0.13167890906333923,
-0.07150834798812866,
0.026164038106799126,
0.2283129245042801,
-0.23053301870822906,
-0.24904580414295197,
-0.5608223676681519,
0.13811461627483368,
0.17992214858531952,
-0.019820502027869225,
-0.259622722864151,
-0.43923503160476685,
0.31116604804992676,
0.17299550771713257,
0.10082577913999557,
0.37632477283477783,
0.22802956402301788,
-0.13112060725688934,
0.2858082354068756,
-0.3369142413139343,
0.04504595696926117,
0.1366603672504425,
0.2478547841310501,
0.16796863079071045,
-0.18179793655872345,
0.018794270232319832,
-0.08774061501026154,
-0.10188339650630951,
0.5612373352050781,
-0.03579176962375641,
-0.06413403898477554,
-0.05294441431760788,
0.20082789659500122,
0.1253383308649063,
-0.025031698867678642,
-0.11711488664150238,
0.2870376706123352,
0.2841983139514923,
0.2268921583890915,
-0.3141706585884094,
-0.007993238046765327,
-0.22120267152786255,
0.31447795033454895,
0.07359345257282257,
0.04488576203584671,
-0.11046969890594482,
0.11170477420091629,
-0.5286195874214172,
0.5465352535247803,
0.22261862456798553,
-0.08526362478733063,
0.04673407971858978,
-0.32903721928596497,
0.14421238005161285,
-0.16759298741817474,
0.09090209007263184,
-0.026198536157608032,
0.1784687042236328,
-0.1443772315979004,
-0.11692409962415695,
-0.3015803396701813,
0.24389764666557312,
0.4796976149082184,
-0.15303966403007507,
-0.24994531273841858,
0.041181210428476334,
0.11469252407550812,
-0.024690087884664536,
0.1810314804315567,
0.47945255041122437,
0.13795426487922668,
0.15604469180107117,
-0.1222943663597107,
0.038420170545578,
0.1062164232134819,
0.36632752418518066,
0.1635030061006546,
-0.020654108375310898,
-0.06307177990674973,
0.25058379769325256,
-0.11617811024188995,
0.09834907948970795,
-0.2743048369884491,
0.14427602291107178,
0.2032962292432785,
-0.3996431827545166,
0.04044332355260849,
-0.06880958378314972,
0.49426376819610596,
-0.0011913179187104106,
0.17833277583122253,
-0.22417309880256653,
-0.11454169452190399,
0.19063015282154083,
-0.2737882137298584,
0.38906916975975037,
-0.15607167780399323,
-0.2597508430480957,
0.10770156234502792,
0.04180387780070305,
-0.06850375980138779,
0.2870161235332489,
-0.17260846495628357,
0.1261284053325653,
0.09284336119890213,
-0.19646687805652618,
-0.32523635029792786,
0.32383233308792114,
-0.4075857698917389,
-0.047171685844659805,
-0.42949897050857544,
0.15666137635707855,
0.23362401127815247,
-0.1331903338432312,
-0.2441425770521164,
-0.3108499348163605,
0.2866405248641968,
-0.416542112827301,
-0.2666809856891632,
-0.14509990811347961,
-0.0848642885684967,
0.011026970110833645,
-0.13592056930065155,
-0.08397267013788223,
-0.12560833990573883,
-0.019836904481053352,
-0.19092606008052826,
0.24380995333194733,
0.10334662348031998,
-0.02810622565448284,
-0.06071777641773224,
-0.06154568865895271,
-0.29603564739227295,
-0.4115924537181854,
0.2931007742881775,
0.17139318585395813,
-0.09968817234039307,
0.1585785448551178,
-0.07470373064279556,
-0.25979575514793396,
0.06405358761548996,
0.2645067274570465,
0.18428470194339752,
0.1423715502023697,
0.015162182040512562,
-0.045894473791122437,
-0.3178115785121918,
-0.11349719762802124,
0.2449372410774231,
0.28096213936805725,
-0.12737008929252625,
0.15888428688049316,
-0.09457558393478394,
-0.03415273502469063,
0.13344430923461914,
-0.08600685000419617,
-0.32946017384529114,
-0.022079214453697205,
0.02661251090466976,
-0.2091032862663269,
0.08631095290184021,
-0.33230531215667725,
0.17969287931919098,
0.14786145091056824,
-0.027840593829751015,
0.191972017288208,
-0.05770375207066536,
-0.21025851368904114,
0.19606420397758484,
-0.005214334465563297,
0.276271790266037,
0.2713291049003601,
-0.029544934630393982,
-0.013537521474063396,
-0.3130189776420593,
0.12331235408782959,
-0.05415956676006317,
0.4639798700809479,
0.06825601309537888,
-0.031210128217935562,
-0.0020419065840542316,
-0.05872296541929245,
-0.3983534276485443,
-0.10703806579113007,
-0.29809796810150146,
-0.1052146703004837,
-0.15176349878311157,
0.3125683069229126,
0.01279831025749445,
0.08479385077953339,
0.18859852850437164,
0.439007431268692,
0.12752458453178406,
-0.2704319655895233,
0.18347622454166412,
0.09516726434230804,
-0.1014629453420639,
0.3257504999637604,
0.2071966826915741,
-0.3266005218029022,
0.41945570707321167,
-0.0316987968981266,
0.004181264899671078,
-0.2335791289806366,
-0.04409509897232056,
-0.1700068712234497,
0.12788639962673187,
0.18061019480228424,
0.03281146660447121,
0.12062333524227142,
-0.273370623588562,
0.11860202997922897,
0.012914732098579407,
0.06748539954423904,
-0.09729424118995667,
-0.14994192123413086,
0.2748534381389618,
0.21061396598815918,
0.07733320444822311,
0.31862542033195496,
-0.18146052956581116,
0.4305016100406647,
-0.7269307374954224,
0.42166441679000854,
0.13655845820903778,
-0.11043676733970642,
-0.1588398814201355,
-0.11357557773590088,
0.0021515698172152042,
0.3248535096645355,
-0.00196841056458652,
-0.19510683417320251,
0.008196440525352955,
-0.4039543867111206,
0.18589738011360168,
0.19955621659755707,
-0.07947432994842529,
-0.25033101439476013,
0.1879706233739853,
0.11625011265277863,
-0.06247659772634506,
0.14697153866291046,
-0.24717919528484344,
0.09879304468631744,
-0.09411595016717911,
-0.10851451754570007,
-0.19074353575706482,
-0.2476712316274643,
0.7245047092437744,
0.09844125807285309,
-0.18417200446128845,
0.0843181237578392,
-0.13795073330402374,
-0.39751940965652466,
-0.19670470058918,
-0.03176361694931984,
0.3272642195224762,
0.1540045291185379,
0.05776524543762207,
-0.03561408817768097,
0.24149611592292786,
0.21349669992923737,
-0.22451087832450867,
0.1532045155763626,
0.055612895637750626,
-0.10298337787389755,
-0.01632837951183319,
0.12625153362751007,
0.19178161025047302,
0.13570550084114075,
-0.014822898432612419,
-0.2571103274822235,
0.18125303089618683,
0.2762245833873749,
-0.15573632717132568,
0.025270383805036545,
0.35264766216278076,
0.14891526103019714,
-0.23618680238723755,
0.3243168890476227,
0.2413930594921112,
-0.31008854508399963,
-0.16528797149658203,
0.45995351672172546,
-0.08548057079315186,
0.3417121469974518,
-0.06797998398542404,
0.28022992610931396,
0.07339923828840256,
0.21894003450870514,
-0.053734298795461655,
-0.14994221925735474,
0.20505084097385406,
-0.4168194532394409,
-0.15951882302761078,
-0.12092922627925873,
-0.07151173055171967,
0.15162019431591034,
0.27871647477149963,
-0.20786786079406738,
0.040766458958387375,
0.26582881808280945,
-0.41236820816993713,
-0.07294762134552002,
-0.2632734775543213,
0.17030960321426392,
0.031792715191841125,
-0.2742456793785095,
-0.06326879560947418,
-0.08554491400718689,
-0.21847236156463623,
0.04302562400698662,
-0.15239167213439941,
0.1698743849992752,
0.16260255873203278,
0.14653994143009186,
0.19478455185890198,
-0.1760776787996292,
0.09471495449542999,
0.1723152995109558,
-0.21978263556957245,
-0.02519669197499752,
-0.610593855381012,
0.1271742880344391,
-0.037171557545661926,
0.06258784234523773,
-0.06850709766149521,
0.11916014552116394,
-0.02448572777211666,
-0.21704061329364777,
0.21015305817127228,
0.02893400751054287,
0.06415621191263199,
0.011361665092408657,
-0.4077135920524597,
-0.12412640452384949,
0.5124906897544861,
-0.12331569939851761,
0.2244318127632141,
-0.11424581706523895,
0.18972748517990112,
0.18430301547050476,
0.22652427852153778,
-0.06056739389896393,
-0.060306474566459656,
-0.06146637350320816,
0.14428934454917908,
0.12080977112054825,
-0.0072925095446407795,
0.21391718089580536,
-0.37848731875419617,
-0.35120174288749695,
0.061837635934352875,
0.26064246892929077,
-0.1660374104976654,
-0.18775346875190735,
0.28388893604278564,
0.3026069104671478,
-0.24703983962535858,
0.07882281392812729,
-0.258947491645813,
0.2056412547826767,
0.16583700478076935,
0.2534582018852234,
-0.12240758538246155,
0.27697333693504333,
-0.10442160069942474,
0.08047334104776382,
-0.3811471462249756,
-0.031030993908643723,
0.12030188739299774,
0.058740049600601196,
-0.1339907944202423,
-0.1728464663028717,
0.24843046069145203,
0.32698822021484375,
-0.013547206297516823,
-0.25024741888046265,
0.4544062316417694,
-0.2319987714290619,
0.4493716061115265,
-0.1556183099746704,
-0.19723746180534363,
0.22378669679164886,
0.36842235922813416,
-0.41044357419013977,
-0.259814590215683,
0.23868556320667267,
-0.2235633283853531,
0.1144019290804863,
0.06955656409263611,
0.3095953166484833,
-0.20988768339157104,
0.37647172808647156,
-0.14114518463611603
] |
https://github.com/huggingface/datasets/issues/1818
|
Loading local dataset raise requests.exceptions.ConnectTimeout
|
Hi ! Thanks for reporting. This was indeed a bug introduced when we moved the `json` dataset loader inside the `datasets` package (before that, the `json` loader was fetched online, as all the other dataset scripts).
This should be fixed on master now. Feel free to install `datasets` from source to try it out.
The fix will be available in the next release of `datasets` in a few days
|
Load local dataset:
```
dataset = load_dataset('json', data_files=["../../data/json.json"])
train = dataset["train"]
print(train.features)
train1 = train.map(lambda x: {"labels": 1})
print(train1[:2])
```
but it raised requests.exceptions.ConnectTimeout:
```
/Users/littlely/myvirtual/tf2/bin/python3.7 /Users/littlely/projects/python_projects/pytorch_learning/nlp/dataset/transformers_datasets.py
Traceback (most recent call last):
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
conn.connect()
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 309, in connect
conn = self._new_conn()
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connection.py", line 167, in _new_conn
% (self.host, self.timeout),
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /datasets.huggingface.co/datasets/datasets/json/json.py (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/littlely/projects/python_projects/pytorch_learning/nlp/dataset/transformers_datasets.py", line 12, in <module>
dataset = load_dataset('json', data_files=["../../data/json.json"])
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/load.py", line 591, in load_dataset
path, script_version=script_version, download_config=download_config, download_mode=download_mode, dataset=True
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/load.py", line 263, in prepare_module
head_hf_s3(path, filename=name, dataset=dataset, max_retries=download_config.max_retries)
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 232, in head_hf_s3
max_retries=max_retries,
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 523, in http_head
max_retries=max_retries,
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 458, in _request_with_retry
raise err
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/datasets/utils/file_utils.py", line 454, in _request_with_retry
response = requests.request(verb.upper(), url, **params)
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/Users/littlely/myvirtual/tf2/lib/python3.7/site-packages/requests/adapters.py", line 504, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='s3.amazonaws.com', port=443): Max retries exceeded with url: /datasets.huggingface.co/datasets/datasets/json/json.py (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1181e9940>, 'Connection to s3.amazonaws.com timed out. (connect timeout=10)'))
Process finished with exit code 1
```
Why it want to connect a remote url when I load local datasets, and how can I fix it?
| 69 |
Loading local dataset raise requests.exceptions.ConnectTimeout
|
[
-0.5732518434524536,
0.0482841357588768,
-0.17228581011295319,
0.253213107585907,
0.13510869443416595,
-0.0921882688999176,
0.15201522409915924,
0.1312389224767685,
0.13577541708946228,
0.12654203176498413,
0.11831008642911911,
0.18808160722255707,
0.3772585988044739,
0.003606878686696291,
-0.15147565305233002,
0.033505331724882126,
-0.1266217678785324,
0.26141276955604553,
-0.13615480065345764,
-0.05353427678346634,
-0.013677570968866348,
0.1629600077867508,
-0.021145250648260117,
0.09900318086147308,
-0.1071518212556839,
0.02077193558216095,
-0.009931950829923153,
0.3549620807170868,
0.07638928294181824,
-0.5472546219825745,
0.02652677707374096,
0.0006439753342419863,
0.030670052394270897,
0.19910353422164917,
-0.00010555160406511277,
0.16064976155757904,
0.31885096430778503,
0.1505999118089676,
-0.3503515422344208,
0.23509500920772552,
-0.4997393488883972,
-0.15275578200817108,
0.4021241366863251,
0.005537419114261866,
-0.12080524116754532,
-0.060225579887628555,
-0.09634480625391006,
-0.5102822184562683,
0.4221934974193573,
0.3863598704338074,
0.2844547629356384,
0.5347887873649597,
-0.0743364617228508,
-0.2684991657733917,
0.302115261554718,
0.01978250779211521,
0.047531258314847946,
0.2880985736846924,
0.587993860244751,
-0.3304208815097809,
-0.09715350717306137,
0.01010204665362835,
0.2051464319229126,
0.15810814499855042,
0.010660323314368725,
-0.09152825176715851,
0.009955672547221184,
0.15350152552127838,
0.20002539455890656,
0.13297513127326965,
0.46921640634536743,
0.1329771876335144,
-0.05312329903244972,
-0.12466852366924286,
-0.07455965131521225,
0.12385210394859314,
0.3507938086986542,
-0.006197210401296616,
-0.2701844573020935,
0.3066037893295288,
-0.121003657579422,
-0.20427986979484558,
-0.26509958505630493,
0.1335413008928299,
0.04925820976495743,
-0.08168139308691025,
-0.006890889722853899,
0.2442566454410553,
0.009811089374125004,
-0.1813444346189499,
0.3203895390033722,
-0.08007869869470596,
-0.14837601780891418,
-0.23038843274116516,
-0.1000525951385498,
0.022757554426789284,
0.3325037658214569,
0.16937772929668427,
0.2506355047225952,
-0.018038218840956688,
0.18100914359092712,
0.1990894377231598,
0.060399364680051804,
0.08979833871126175,
0.3652587831020355,
-0.21022814512252808,
0.3840934932231903,
-0.20684227347373962,
0.24623215198516846,
-0.09342435002326965,
-0.23246173560619354,
0.006728594657033682,
0.2593304514884949,
-0.16828353703022003,
0.014880926348268986,
-0.033834055066108704,
0.35920196771621704,
-0.20218677818775177,
0.09807967394590378,
0.18320956826210022,
-0.02513236738741398,
0.04616735503077507,
-0.005378801841288805,
0.2706362307071686,
-0.21523216366767883,
-0.07531540840864182,
0.09011387825012207,
-0.23751641809940338,
-0.2812063992023468,
-0.3770812451839447,
-0.3768537938594818,
-0.3114411532878876,
0.013490642420947552,
-0.188074991106987,
0.12314438819885254,
-0.19514182209968567,
0.08365684747695923,
-0.18012607097625732,
-0.2601228952407837,
-0.06991270929574966,
0.3644380271434784,
-0.040232811123132706,
0.09735444188117981,
0.1745767593383789,
0.0798441544175148,
0.008289331570267677,
0.17098599672317505,
-0.14867758750915527,
0.025957956910133362,
0.054545726627111435,
-0.0681137815117836,
-0.3374255299568176,
0.030080394819378853,
0.31377434730529785,
0.1303042322397232,
-0.008099990896880627,
0.26033493876457214,
-0.11758192628622055,
0.08128686249256134,
-0.1795365959405899,
-0.21067728102207184,
-0.06915247440338135,
-0.0015560620231553912,
0.08875884115695953,
-0.0177796371281147,
0.6100654006004333,
-0.5068594813346863,
0.08962966501712799,
0.08565524965524673,
-0.3926379084587097,
0.015729734674096107,
0.15035401284694672,
-0.47414693236351013,
0.1613418608903885,
-0.29018163681030273,
0.1694784015417099,
0.462857723236084,
-0.4598492681980133,
-0.40975818037986755,
0.730583131313324,
-0.3866385519504547,
-0.42293107509613037,
-0.17909517884254456,
0.09599754214286804,
0.04854049161076546,
0.10148874670267105,
0.38185590505599976,
0.46130451560020447,
-0.31873613595962524,
0.21146440505981445,
-0.21102383732795715,
-0.19730064272880554,
-0.14359161257743835,
0.11620811372995377,
-0.09675560146570206,
0.09247194975614548,
0.41393381357192993,
-0.20110763609409332,
0.06223827973008156,
0.08653908222913742,
0.1944739818572998,
0.3284621238708496,
-0.021677298471331596,
0.02751825749874115,
0.024544067680835724,
0.1122911125421524,
-0.3796514570713043,
0.17017176747322083,
0.028160739690065384,
0.19024884700775146,
-0.19474749267101288,
-0.10077501088380814,
-0.4368588328361511,
0.37066012620925903,
-0.18682414293289185,
0.4414263367652893,
0.2063547968864441,
0.169744610786438,
-0.12126948684453964,
0.23250024020671844,
0.12418925762176514,
-0.09520649164915085,
-0.36409685015678406,
0.013869645074009895,
-0.2697538435459137,
0.27767643332481384,
-0.062059905380010605,
-0.052476562559604645,
-0.04734349250793457,
-0.29557889699935913,
0.08869682252407074,
-0.14867521822452545,
-0.30628272891044617,
0.27822548151016235,
-0.06886933743953705,
0.37031009793281555,
0.14103993773460388,
-0.13140086829662323,
0.10735121369361877,
-0.246856227517128,
0.08845261484384537,
-0.17856846749782562,
0.19032004475593567,
-0.26695728302001953,
-0.16001521050930023,
0.02621603012084961,
0.048812296241521835,
0.3366781771183014,
0.021742096170783043,
-0.13152384757995605,
0.42713409662246704,
-0.09836746752262115,
-0.0017804467352107167,
-0.31401580572128296,
-0.07943537086248398,
0.08877034485340118,
0.37514641880989075,
0.021393008530139923,
-0.051977816969156265,
0.18711146712303162,
0.12510545551776886,
-0.1480323225259781,
0.007704941555857658,
-0.053735457360744476,
0.18147048354148865,
-0.2555869221687317,
0.3504297733306885,
0.10463690012693405,
0.4781053066253662,
0.2683543562889099,
0.3000216484069824,
0.13056576251983643,
0.07494981586933136,
-0.2923586368560791,
-0.007228969130665064,
-0.09256064146757126,
0.01044489350169897,
0.31392690539360046,
0.24399501085281372,
-0.2467818558216095,
-0.5624538660049438,
-0.18570272624492645,
0.0709565132856369,
0.22627191245555878,
-0.2979060709476471,
0.012772804126143456,
-0.3362918794155121,
-0.2496987283229828,
0.22613760828971863,
-0.13170374929904938,
-0.2193051427602768,
-0.36557620763778687,
0.07206720113754272,
0.045500364154577255,
-0.3083663284778595,
0.20655974745750427,
0.009962785057723522,
0.25700122117996216,
0.44412046670913696,
-0.18898729979991913,
0.08636870235204697,
-0.27003195881843567,
-0.24529214203357697,
0.11120559275150299,
0.19091689586639404,
0.1281985640525818,
0.48953256011009216,
-0.21884770691394806,
-0.16805686056613922,
-0.20335295796394348,
0.016543760895729065,
0.25143393874168396,
0.20586156845092773,
0.2562481760978699,
0.14643359184265137,
0.2538221478462219,
0.1571580320596695,
0.015552300028502941,
0.45374661684036255,
-0.02552827075123787,
-0.09966395050287247,
-0.10939203947782516,
0.0958046242594719,
0.03626350685954094,
-0.08393434435129166,
-0.41914820671081543,
-0.18519388139247894,
-0.26805904507637024,
0.012862255796790123,
-0.020456114783883095,
0.15413986146450043,
0.029580000787973404,
0.2608279287815094,
0.2933347821235657,
0.09737652540206909,
-0.004615712445229292,
-0.24100950360298157,
-0.32358694076538086,
-0.2117219716310501,
-0.24093103408813477,
-0.251981258392334,
0.09442673623561859,
0.006845849100500345,
0.16716749966144562,
0.2008562535047531,
-0.4469129741191864,
-0.17579799890518188,
-0.1727452278137207,
0.31367227435112,
-0.13775531947612762,
-0.19890490174293518,
0.3982037901878357,
-0.05669489502906799,
-0.1713525503873825,
-0.0010623576818034053,
-0.09869153797626495,
0.29275551438331604,
0.06717390567064285,
-0.18823552131652832,
0.036778710782527924,
0.5696308612823486,
-0.36118197441101074,
0.3703280985355377,
-0.27016791701316833,
-0.013872003182768822,
0.27900928258895874,
-0.24950028955936432,
0.3441545069217682,
-0.32129111886024475,
-0.04201902076601982,
-0.020410073921084404,
0.33735084533691406,
-0.13211016356945038,
0.0636720210313797,
0.2137831747531891,
-0.3153950572013855,
-0.26825201511383057,
-0.2790961265563965,
-0.2225138247013092,
-0.30859899520874023,
-0.08305931091308594,
0.17242351174354553,
0.20150844752788544,
0.16897116601467133,
0.05870191752910614,
-0.0390215627849102,
0.004858426749706268,
-0.10029169917106628,
-0.050699975341558456,
-0.1957976371049881,
-0.2499239593744278,
-0.6285199522972107,
0.16485895216464996,
-0.4343555271625519,
0.16168108582496643,
0.06725788861513138,
0.5031442642211914,
-0.20161552727222443,
-0.18113242089748383,
0.379563570022583,
-0.08751515299081802,
0.4721302390098572,
-0.38801437616348267,
0.28060752153396606,
0.126727893948555,
0.014404091984033585,
-0.1747218817472458,
0.1085054948925972,
0.2686017155647278,
0.3745003342628479,
0.07152142375707626,
0.25548356771469116,
0.08615826070308685,
-0.24732708930969238,
-0.060327354818582535,
0.0946052223443985,
-0.07063239067792892,
-0.23664000630378723,
-0.010612227953970432,
-0.26817208528518677,
-0.28868332505226135,
0.11652857810258865,
-0.2262398600578308,
0.14704371988773346,
0.17029832303524017,
-0.4024742543697357,
-0.13205848634243011,
0.3188728392124176,
-0.2860065698623657,
0.08440893888473511,
-0.08419574797153473,
-0.25286322832107544,
0.27306124567985535,
-0.1237635463476181,
0.2266039103269577,
0.3477938175201416,
0.3783901333808899,
-0.15406227111816406,
-0.10572930425405502,
0.42061111330986023,
-0.055789124220609665,
-0.08010443300008774,
0.39438578486442566,
0.18716953694820404,
-0.06572677195072174,
0.3104889392852783,
0.14178869128227234,
-0.20476101338863373,
0.5537681579589844,
-0.05491295084357262,
-0.2372237890958786,
-0.03756469115614891,
-0.14733746647834778,
-0.03574357181787491,
-0.2972714304924011,
-0.21308599412441254,
0.15786924958229065,
0.004459423013031483,
-0.160917267203331,
0.20210856199264526,
0.01705404929816723,
0.7003124356269836,
-0.07314565032720566,
0.03678154945373535,
0.23827944695949554,
-0.10653221607208252,
0.23620648682117462,
-0.07787727564573288,
0.035020146518945694,
-0.3512062132358551,
-0.053967781364917755,
-0.010850614868104458,
-0.1658666431903839,
0.13782410323619843,
0.06762784719467163,
0.159066304564476,
-0.12284354865550995,
0.08447711169719696,
0.17237290740013123,
-0.25240424275398254,
0.4045143127441406,
-0.13952504098415375,
-0.1881282776594162,
-0.2868102788925171,
0.24810779094696045,
0.06138380244374275,
0.08308880776166916,
-0.20444604754447937,
0.04350067675113678,
0.20118600130081177,
-0.22764046490192413,
0.25265568494796753,
0.09791962802410126,
-0.22867771983146667,
0.176519513130188,
-0.21398217976093292,
-0.09336492419242859,
-0.2237044721841812,
0.1180194616317749,
-0.027308588847517967,
0.15565182268619537,
-0.18883341550827026,
0.17472964525222778,
-0.104233518242836,
0.05993496626615524,
-0.12763939797878265,
0.025117989629507065,
-0.007369572296738625,
-0.08574476838111877,
-0.3471754789352417,
0.22970661520957947,
-0.1360902488231659,
-0.2528291344642639,
0.15809643268585205,
0.1933392435312271,
0.0612521767616272,
-0.4638208746910095,
-0.10184935480356216,
-0.0867956355214119,
0.12698376178741455,
-0.078014075756073,
0.19899162650108337,
0.1260051429271698,
0.040202438831329346,
0.15462540090084076,
0.165945366024971,
-0.266279935836792,
-0.1369912177324295,
0.6152505278587341,
0.0321347638964653,
-0.1118258610367775,
0.42146357893943787,
0.1774141490459442,
-0.10241176187992096,
-0.42634153366088867,
0.22373579442501068,
0.19125747680664062,
-0.2354714721441269,
0.08993478119373322,
0.11594979465007782,
0.05847775563597679,
0.19466111063957214,
0.21332047879695892,
0.05846679210662842,
0.08290431648492813,
0.207888662815094,
-0.15582942962646484,
-0.44161078333854675,
-0.11030973494052887,
0.0651393011212349,
0.19416017830371857,
0.25210556387901306,
-0.20184536278247833,
-0.015349319204688072,
0.011537158861756325,
-0.39988279342651367,
0.04675721377134323,
-0.3554849326610565,
0.16598030924797058,
-0.059313252568244934,
-0.13905948400497437,
0.20193170011043549,
-0.1796347200870514,
0.21781599521636963,
0.00260832067579031,
-0.38893651962280273,
-0.27616995573043823,
0.1326017826795578,
0.06639368087053299,
0.035866934806108475,
-0.23581963777542114,
-0.3376745581626892,
-0.5336495041847229,
0.016485439613461494,
0.15998384356498718,
0.32690173387527466,
-0.07237434387207031,
-0.22201019525527954,
-0.34681999683380127,
0.13155417144298553,
0.14556220173835754,
0.03722298890352249,
0.3570622205734253,
0.12636984884738922,
0.18916350603103638,
-0.21807333827018738,
-0.08137625455856323,
-0.09270938485860825,
-0.16006074845790863,
0.305257648229599,
0.31719741225242615,
0.2586836516857147,
0.015323870815336704,
0.2907349467277527,
-0.2796531021595001,
-0.2732708156108856,
0.2383233606815338,
0.2999875843524933,
0.13433590531349182,
-0.17543427646160126,
-0.10303784906864166,
0.08714934438467026,
0.33655959367752075,
-0.0391015000641346,
-0.2959187924861908,
0.5695691108703613,
-0.1965605467557907,
0.1741231083869934,
-0.1361512392759323,
0.13814043998718262,
-0.31649020314216614,
-0.06973709166049957,
0.31061071157455444,
0.48912158608436584,
0.2094995677471161,
-0.3091781735420227,
0.19281519949436188,
-0.28024420142173767,
-0.022683193907141685,
0.19021689891815186,
0.37465450167655945,
0.20758579671382904,
0.16429978609085083,
-0.19364747405052185,
0.11962469667196274,
-0.2118356078863144,
0.5097312331199646,
-0.1564517617225647,
-0.7858578562736511,
0.39075395464897156,
0.036983441561460495,
-0.30122917890548706,
-0.1650555282831192,
0.01480785757303238,
0.20856504142284393,
-0.16376109421253204,
-0.1389084756374359,
-0.17617513239383698,
0.19239696860313416,
-0.2800208032131195,
-0.07818923145532608,
-0.22169281542301178,
-0.16075487434864044,
0.1096632331609726,
-0.010553129017353058,
-0.019162971526384354,
0.13164684176445007,
-0.1934598684310913,
-0.1693495661020279,
0.16748212277889252,
-0.20250937342643738,
-0.021144965663552284,
-0.0509473942220211,
-0.401707261800766,
-0.26764947175979614,
0.2514336109161377,
-0.0223444402217865,
0.10595302283763885,
0.05278633162379265,
-0.006801440846174955,
0.1706593632698059,
0.2936936914920807,
-0.0050007556565105915,
0.19955050945281982,
0.17396502196788788,
-0.11517667770385742,
-0.3449934124946594,
0.17194919288158417,
0.05279160290956497,
0.31695622205734253,
0.4192615747451782,
0.21026818454265594,
-0.21388517320156097,
0.1753207892179489,
0.02574237808585167,
0.04757535830140114,
-0.08850514143705368,
-0.25735992193222046,
0.09611592441797256,
-0.11439603567123413,
-0.24345488846302032,
-0.04010182246565819,
-0.22447021305561066,
-0.11868883669376373,
0.5021272897720337,
-0.24381253123283386,
0.34370163083076477,
-0.24690738320350647,
0.10818688571453094,
-0.48709866404533386,
0.5714613795280457,
0.19707518815994263,
0.18399956822395325,
-0.14677096903324127,
-0.32097887992858887,
-0.33247414231300354,
0.1127144992351532,
-0.3035251200199127,
0.15337255597114563,
0.18989720940589905,
0.11446546018123627,
0.12771067023277283,
0.039519619196653366,
-0.051319513469934464,
0.13222338259220123,
-0.06729736924171448,
-0.08046643435955048,
-0.22562281787395477,
-0.21345871686935425,
-0.16457176208496094,
-0.10105843096971512,
-0.03680562600493431,
-0.36015716195106506,
0.3758326470851898,
-0.09509577602148056,
0.09166589379310608,
-0.15602876245975494,
-0.15740932524204254,
-0.03781181946396828,
-0.021027911454439163,
0.42408162355422974,
0.2573859691619873,
0.33936938643455505,
0.11815975606441498,
0.09017807245254517,
-0.0005040126852691174,
-0.4237021505832672,
0.1498209536075592,
-0.01860865019261837,
0.1249108612537384,
0.0037608309648931026,
-0.18103428184986115,
0.16477541625499725,
-0.04578474909067154,
0.1376212239265442,
0.025633549317717552,
0.15711966156959534,
0.15892063081264496,
-0.062371689826250076,
-0.21768192946910858,
0.2918899357318878,
0.07068482786417007,
-0.20517373085021973,
0.18491563200950623,
0.0900992900133133,
0.07700102776288986,
-0.1697983294725418,
0.3888311982154846,
0.06788301467895508,
-0.06894205510616302,
-0.1964721530675888,
0.25097188353538513,
0.19412486255168915,
-0.1951686590909958,
0.07237531989812851,
-0.056883804500103,
0.4326273500919342,
-0.1513637751340866,
-0.050563350319862366,
0.31493282318115234,
-0.03070160187780857,
0.17377011477947235,
-0.016089659184217453,
0.019818991422653198,
-0.0001463219668949023,
-0.02893572859466076,
-0.08090092986822128,
-0.2299041897058487
] |
https://github.com/huggingface/datasets/issues/1817
|
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 599 but got length 1500
|
Hi !
The error you have is due to the `input_ids` column not having the same number of examples as the other columns.
Indeed you're concatenating the `input_ids` at this line:
https://github.com/LuCeHe/GenericTools/blob/431835d8e13ec24dceb5ee4dc4ae58f0e873b091/KerasTools/lm_preprocessing.py#L134
However the other columns are kept unchanged, and therefore you end up with an `input_ids` column with 599 elements while the others columns like `attention_mask` have 1500.
To fix that you can instead concatenate them all using
```python
concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
```
Also you may need to drop the "text" column before applying `group_texts` since strings can't be concatenated with lists. You can drop it at the tokenization step:
```python
dset = dset.map(
tokenize_function,
batched=True,
remove_columns=["text"]
)
```
|
I am trying to preprocess any dataset in this package with GPT-2 tokenizer, so I need to structure the datasets as long sequences of text without padding. I've been following a couple of your tutorials and here you can find the script that is failing right at the end
https://github.com/LuCeHe/GenericTools/blob/master/KerasTools/lm_preprocessing.py
In the last iteration of the last dset.map, it gives the error that I copied in the title. Another issue that I have, if I leave the batch_size set as 1000 in the last .map, I'm afraid it's going to lose most text, so I'm considering setting both writer_batch_size and batch_size to 300 K, but I'm not sure it's the best way to go.
Can you help me?
Thanks!
| 116 |
pyarrow.lib.ArrowInvalid: Column 1 named input_ids expected length 599 but got length 1500
|
[
0.16242215037345886,
-0.04124729335308075,
-0.18355409801006317,
0.2648014426231384,
0.21772220730781555,
-0.20127230882644653,
0.5000025629997253,
0.3980473279953003,
-0.3892277479171753,
0.26711755990982056,
0.20890679955482483,
0.37243199348449707,
0.25926321744918823,
-0.1439892053604126,
-0.02856268547475338,
-0.16977353394031525,
-0.07966408133506775,
0.12424827367067337,
0.1337052881717682,
-0.06617528945207596,
-0.011639373376965523,
0.1752343624830246,
-0.28278377652168274,
0.49732962250709534,
-0.28945571184158325,
0.10511283576488495,
0.00048785025137476623,
-0.09285461157560349,
-0.2762821614742279,
-0.42658838629722595,
0.10693375766277313,
-0.4659622609615326,
-0.21031227707862854,
-0.0115717938169837,
-0.00011165412433911115,
-0.009108214639127254,
0.39996635913848877,
0.13433916866779327,
-0.1469888836145401,
0.33681556582450867,
0.017436401918530464,
0.0015846736496314406,
0.276244193315506,
-0.22281664609909058,
0.22969365119934082,
-0.4220723807811737,
-0.1879129707813263,
0.500167965888977,
-0.18405255675315857,
0.3018208146095276,
0.2411322295665741,
0.1178472489118576,
0.19488848745822906,
-0.028024695813655853,
0.6140619516372681,
0.033405616879463196,
0.04735064506530762,
0.08041907101869583,
0.08024271577596664,
-0.11361590027809143,
-0.08848795294761658,
0.3599523901939392,
0.21553823351860046,
0.1285325586795807,
-0.008885045535862446,
0.018853455781936646,
0.2231171876192093,
0.0981782004237175,
0.20272937417030334,
-0.051374081522226334,
-0.1537579447031021,
-0.3174399733543396,
0.02959134243428707,
-0.15135562419891357,
0.29072442650794983,
-0.16567713022232056,
-0.16566136479377747,
0.16401657462120056,
0.13490857183933258,
0.1894170194864273,
0.08089333027601242,
0.30293038487434387,
-0.26213961839675903,
0.09210172295570374,
-0.1401190608739853,
0.10202935338020325,
0.10681647807359695,
0.20304279029369354,
-0.10966408252716064,
-0.24272099137306213,
0.14925245940685272,
0.27359041571617126,
-0.03153196722269058,
-0.02523304894566536,
-0.10834304988384247,
0.06393838673830032,
-0.028124937787652016,
0.2258307933807373,
0.08708453923463821,
-0.1627451479434967,
0.24264219403266907,
-0.05794680118560791,
0.4780755937099457,
-0.027064157649874687,
-0.029441051185131073,
0.16413094103336334,
0.07929447293281555,
0.2879827916622162,
-0.03753068298101425,
-0.15366050601005554,
0.062493108212947845,
0.0019063036888837814,
-0.05019209906458855,
-0.38306429982185364,
0.36619365215301514,
-0.15630045533180237,
0.16190166771411896,
0.061706382781267166,
-0.26674672961235046,
0.2798459827899933,
-0.44830259680747986,
-0.021398160606622696,
0.05571538954973221,
0.1331302523612976,
-0.024785060435533524,
0.2273910790681839,
-0.1567864716053009,
0.022929036989808083,
-0.2019960731267929,
-0.2727816104888916,
-0.23132957518100739,
0.2987975478172302,
-0.22786398231983185,
-0.22341659665107727,
0.18118053674697876,
-0.03244243189692497,
0.3185180127620697,
-0.05975760892033577,
0.04434843361377716,
-0.10158082097768784,
-0.02223106101155281,
0.07804661989212036,
0.3016391396522522,
0.2547398805618286,
-0.13862435519695282,
0.06307164579629898,
0.02063658833503723,
-0.23053722083568573,
-0.06164637953042984,
0.28881144523620605,
-0.2200142741203308,
-0.2548624575138092,
-0.2121422439813614,
0.27798721194267273,
0.13258449733257294,
-0.01768803410232067,
0.45436128973960876,
-0.08304309099912643,
0.46569234132766724,
-0.07193149626255035,
0.37850332260131836,
-0.24494846165180206,
0.5104132294654846,
-0.22498635947704315,
-0.13117167353630066,
-0.2599201500415802,
-0.5307422280311584,
-0.0456775538623333,
0.27421844005584717,
-0.003975742030888796,
-0.04888451099395752,
0.31470561027526855,
-0.19387318193912506,
-0.02629063092172146,
0.07585934549570084,
0.7527419924736023,
0.202101930975914,
-0.19150890409946442,
-0.42072954773902893,
0.07126948982477188,
-0.12391814589500427,
-0.45030537247657776,
0.14192943274974823,
-0.011855180375277996,
-0.03765369579195976,
0.2676892578601837,
0.1496371477842331,
-0.15229175984859467,
0.04432789981365204,
0.14880745112895966,
-0.38841748237609863,
-0.29179418087005615,
-0.18848785758018494,
0.08190477639436722,
-0.006851041689515114,
-0.3308253288269043,
0.07459153980016708,
-0.5531287789344788,
0.15534882247447968,
-0.0857410654425621,
0.09642850607633591,
0.14057667553424835,
0.08806153386831284,
-0.14321592450141907,
0.3500621020793915,
0.046473875641822815,
-0.20203827321529388,
-0.20586638152599335,
0.16782785952091217,
-0.14323851466178894,
-0.43246763944625854,
-0.5120136737823486,
-0.4232998192310333,
0.4129372835159302,
0.08537996560335159,
0.1795646846294403,
0.21209940314292908,
-0.12751802802085876,
0.13970708847045898,
-0.3965427577495575,
-0.12312512844800949,
-0.22536855936050415,
-0.0047848462127149105,
0.05847695469856262,
-0.1929033100605011,
-0.006233528722077608,
-0.287030965089798,
-0.2633986175060272,
0.09116142243146896,
-0.040259454399347305,
0.18695209920406342,
0.1319189816713333,
0.1601032316684723,
0.33193546533584595,
0.09612876176834106,
-0.09328076243400574,
-0.17613324522972107,
0.10973386466503143,
0.13341155648231506,
-0.2681654095649719,
0.10123912990093231,
-0.13419213891029358,
0.17586131393909454,
0.08270268887281418,
-0.01477131899446249,
0.303016722202301,
0.006359647028148174,
0.2398608922958374,
0.1087624728679657,
-0.2984841465950012,
0.04381228983402252,
-0.033217549324035645,
-0.2003602385520935,
-0.03329072892665863,
-0.03804072365164757,
0.01843002624809742,
0.14736852049827576,
0.2835479974746704,
-0.2659783363342285,
0.212931290268898,
0.4337765574455261,
-0.043825987726449966,
-0.1737968474626541,
-0.0023959551472216845,
-0.1940540075302124,
-0.013114438392221928,
0.07306955754756927,
-0.038488343358039856,
-0.019947828724980354,
0.3485972285270691,
-0.05229223892092705,
-0.28789350390434265,
-0.25377702713012695,
-0.37439823150634766,
-0.01834668591618538,
0.04473700746893883,
0.011042163707315922,
0.36879417300224304,
0.4270034432411194,
-0.21986551582813263,
-0.2729981541633606,
0.2332865595817566,
0.23009119927883148,
0.14043918251991272,
-0.37977316975593567,
0.16758108139038086,
-0.07560690492391586,
-0.027792809531092644,
0.10846101492643356,
-0.7255284190177917,
0.2698814272880554,
-0.1419147104024887,
0.12666256725788116,
-0.0806579738855362,
-0.18690937757492065,
0.21208709478378296,
0.11474614590406418,
0.01620902679860592,
0.4101209342479706,
-0.04617081210017204,
-0.1587429642677307,
-0.09833531826734543,
-0.21762071549892426,
0.10634792596101761,
-0.18708215653896332,
0.029296230524778366,
0.005597406532615423,
0.2543136477470398,
0.11530859023332596,
-0.1734917014837265,
-0.47966518998146057,
0.18947497010231018,
-0.042819518595933914,
-0.046048980206251144,
0.24679841101169586,
0.0694434866309166,
-0.19336099922657013,
-0.19941672682762146,
0.18035130202770233,
0.05439433082938194,
-0.14061371982097626,
0.3164723813533783,
-0.28755876421928406,
-0.09141579270362854,
-0.23442719876766205,
-0.19669315218925476,
0.018601397052407265,
0.029195517301559448,
0.22861617803573608,
0.1355964094400406,
0.00733229611068964,
0.04287388175725937,
0.534965455532074,
0.06472286581993103,
0.09529579430818558,
-0.02335263043642044,
-0.1065472736954689,
0.27186256647109985,
0.3021547496318817,
-0.020922239869832993,
-0.18121764063835144,
-0.0911940410733223,
-0.2993551194667816,
0.12084528803825378,
0.10876158624887466,
-0.21223098039627075,
-0.12549751996994019,
-0.12202180922031403,
0.4662201404571533,
0.010783280245959759,
0.1422692984342575,
0.3317048251628876,
-0.06117540970444679,
-0.07821402698755264,
-0.07880504429340363,
0.0025909263640642166,
0.25151464343070984,
-0.0845174491405487,
-0.03177369013428688,
-0.3242975175380707,
0.19741854071617126,
-0.08858634531497955,
0.49932634830474854,
-0.32348260283470154,
-0.14327484369277954,
0.012265395373106003,
-0.38691237568855286,
-0.13712558150291443,
-0.029181065037846565,
0.2289530485868454,
-0.10501589626073837,
-0.10247235000133514,
-0.1028655394911766,
0.18413108587265015,
-0.05644712969660759,
-0.4955788254737854,
0.4233747124671936,
0.04684549197554588,
-0.297860711812973,
-0.005090822000056505,
0.030937058851122856,
0.40531331300735474,
-0.05758896842598915,
0.31011542677879333,
0.14006125926971436,
-0.19812361896038055,
0.16059431433677673,
0.13743966817855835,
-0.40831258893013,
-0.33352258801460266,
-0.11453665047883987,
0.07019452005624771,
-0.5067312717437744,
-0.08592183887958527,
0.08639556169509888,
0.20846247673034668,
-0.029788699001073837,
0.36137282848358154,
-0.6004552841186523,
0.2985815703868866,
-0.36980506777763367,
0.41984719038009644,
0.17929933965206146,
-0.1879979372024536,
0.1406533420085907,
0.30409568548202515,
-0.19541627168655396,
-0.22708606719970703,
-0.12203454226255417,
-0.016265984624624252,
0.3428787291049957,
0.1067805364727974,
-0.43728601932525635,
0.16520680487155914,
0.576948344707489,
-0.06766541302204132,
0.0616372749209404,
-0.11153919249773026,
-0.25964421033859253,
-0.37031063437461853,
-0.11198310554027557,
-0.04314679279923439,
0.23959551751613617,
0.1917279064655304,
0.14848223328590393,
-0.02578214555978775,
-0.15559349954128265,
-0.11695003509521484,
-0.22343674302101135,
0.25953322649002075,
0.04965846985578537,
-0.3103504776954651,
0.06845705956220627,
-0.26356974244117737,
0.23374342918395996,
0.18438270688056946,
0.17845457792282104,
0.05731954798102379,
-0.22500081360340118,
0.1619897335767746,
-0.23280145227909088,
0.09152904897928238,
0.1733260452747345,
-0.10827585309743881,
0.18447069823741913,
-0.12043337523937225,
0.23445196449756622,
0.19082321226596832,
0.006936784368008375,
0.27390700578689575,
-0.20036937296390533,
0.20518052577972412,
0.12557290494441986,
0.3051172196865082,
-0.07546315342187881,
-0.10470317304134369,
0.367568701505661,
0.29689309000968933,
-0.012684370391070843,
0.04598839581012726,
0.05796033516526222,
0.6334289312362671,
0.12860986590385437,
0.03035835549235344,
0.6396356225013733,
-0.34294506907463074,
-0.2968646287918091,
0.1253381073474884,
-0.020583059638738632,
-0.608138918876648,
0.20707644522190094,
0.2219962328672409,
-0.07476864755153656,
-0.22309531271457672,
0.02340342104434967,
0.05201704800128937,
-0.23899130523204803,
-0.052087441086769104,
0.06887584924697876,
-0.13947995007038116,
0.25865796208381653,
-0.13179302215576172,
0.03063981607556343,
0.09362709522247314,
0.1436845064163208,
0.02942878194153309,
-0.26058685779571533,
0.010137075558304787,
0.023894859477877617,
-0.2725805342197418,
-0.34248030185699463,
0.1697329580783844,
0.1284187287092209,
-0.20090240240097046,
0.09268639236688614,
0.26009151339530945,
-0.25594794750213623,
-0.45841488242149353,
-0.19558967649936676,
-0.12016993761062622,
-0.0974777489900589,
0.03840439394116402,
0.35575374960899353,
0.39626142382621765,
-0.13762091100215912,
-0.022281229496002197,
-0.04628901556134224,
-0.07445632666349411,
-0.019726142287254333,
-0.15603706240653992,
0.12436126172542572,
0.03379453346133232,
0.003437743755057454,
-0.007564663887023926,
0.07718925923109055,
0.15490977466106415,
-0.22361469268798828,
-0.021608009934425354,
-0.20156578719615936,
-0.06223374232649803,
-0.06413517892360687,
0.17895561456680298,
-0.12042167782783508,
0.10858381539583206,
-0.11530585587024689,
0.1679934859275818,
-0.25091552734375,
-0.1909511387348175,
0.20963920652866364,
0.10945319384336472,
0.25430211424827576,
0.38828474283218384,
0.12328395992517471,
-0.23581279814243317,
-0.18708866834640503,
-0.07090260088443756,
0.41318562626838684,
-0.6612548828125,
-0.05855705961585045,
-0.027143817394971848,
-0.0033646579831838608,
0.035594891756772995,
0.18013551831245422,
0.22885455191135406,
0.4281335175037384,
-0.2388307899236679,
0.16030631959438324,
-0.3356722295284271,
0.21329568326473236,
0.14159493148326874,
0.047680530697107315,
0.06561015546321869,
-0.052184633910655975,
0.03817892447113991,
0.01345867570489645,
-0.3447708189487457,
0.02921556867659092,
0.07356204092502594,
0.20148031413555145,
-0.2606765627861023,
-0.21022319793701172,
-0.13850584626197815,
-0.037793777883052826,
0.24899481236934662,
0.16199564933776855,
0.12701359391212463,
-0.32627904415130615,
-0.09995774924755096,
0.034732554107904434,
0.038362402468919754,
0.21498702466487885,
-0.06403728574514389,
-0.1540675312280655,
-0.15475362539291382,
0.14463116228580475,
-0.03227000683546066,
-0.08940700441598892,
-0.012701412662863731,
0.09476010501384735,
0.11100335419178009,
-0.03437361866235733,
0.12163598090410233,
0.028180904686450958,
-0.008675982244312763,
0.12199657410383224,
-0.01030376274138689,
0.10876579582691193,
-0.18029241263866425,
0.15214017033576965,
0.1487477868795395,
0.20133976638317108,
-0.1857970654964447,
-0.0838235542178154,
0.21336543560028076,
-0.4647062122821808,
-0.13172125816345215,
-0.12991535663604736,
0.1957487314939499,
0.36843380331993103,
-0.19621612131595612,
-0.09496679902076721,
0.02035592310130596,
0.34649747610092163,
-0.21774475276470184,
-0.02058304473757744,
-0.2919406592845917,
-0.1710849106311798,
0.04707461968064308,
0.08108247816562653,
-0.015364374034106731,
-0.045709386467933655,
0.09331652522087097,
0.1880260556936264,
0.2346762865781784,
-0.0462152399122715,
-0.6964272260665894,
0.529900848865509,
-0.15441623330116272,
-0.021646130830049515,
0.5710210800170898,
0.24578702449798584,
0.19657373428344727,
-0.005388924386352301,
-0.25745368003845215,
-0.07340717315673828,
0.14467042684555054,
0.0614849217236042,
-0.20041228830814362,
0.3109597861766815,
-0.2319965362548828,
0.14073054492473602,
0.009434353560209274,
-0.44021180272102356,
0.4728092849254608,
0.45298513770103455,
0.666689395904541,
-0.01720709539949894,
0.060956284403800964,
0.09566320478916168,
-0.024859853088855743,
-0.07267482578754425,
-0.6386179327964783,
0.07738146930932999,
-0.34070101380348206,
-0.06515508890151978,
-0.16622236371040344,
0.34897059202194214,
0.543030858039856,
0.05947176739573479,
-0.0075226761400699615,
-0.43382781744003296,
0.27964290976524353,
0.09195028245449066,
0.28145503997802734,
-0.24807317554950714,
0.17618900537490845,
0.08033501356840134,
-0.206198588013649,
-0.0742335319519043,
-0.058046940714120865,
0.4124075472354889,
0.11428487300872803,
-0.08310618996620178,
-0.3554267883300781,
-0.14632780849933624,
-0.22980141639709473,
-0.021249357610940933,
0.041800715029239655,
0.5585818290710449,
0.4259223937988281,
0.19830229878425598,
0.15560849010944366,
-0.27646538615226746,
-0.05916735529899597,
0.23158980906009674,
0.01597866602241993,
0.08906124532222748,
-0.24568258225917816,
-0.25410348176956177,
-0.51372891664505,
-0.18114249408245087,
-0.011303126811981201,
-0.4861890375614166,
0.1184869334101677,
0.09487683326005936,
0.06008744612336159,
0.16141898930072784,
-0.25177308917045593,
0.11142724007368088,
-0.14295722544193268,
0.4626571238040924,
0.19649375975131989,
0.15654270350933075,
-0.12698118388652802,
-0.21043945848941803,
-0.3046114146709442,
0.12474197894334793,
-0.41592344641685486,
-0.15090405941009521,
0.17044714093208313,
0.41257962584495544,
0.07639923691749573,
-0.02113012969493866,
0.056505460292100906,
-0.0006834209780208766,
-0.061951879411935806,
0.5483618378639221,
-0.06497756391763687,
0.15067191421985626,
0.22639809548854828,
-0.14709939062595367,
0.09098073840141296,
-0.15844158828258514,
0.3393424451351166,
-0.0006563816568814218,
0.14336946606636047,
-0.3024178445339203,
-0.16440024971961975,
0.2605815827846527,
0.21074043214321136,
0.1286689043045044,
-0.22975732386112213,
0.12620984017848969,
0.01273639127612114,
0.1685439497232437,
-0.08089030534029007,
-0.03700711578130722,
-0.08432437479496002,
0.33765846490859985,
0.14185070991516113,
0.0069547188468277454,
0.24160432815551758,
-0.09504330158233643,
0.1393905133008957,
0.17902551591396332,
-0.04415684565901756,
-0.1129143089056015,
0.12477803230285645,
0.1446523219347,
-0.06448118388652802,
0.09526775777339935,
-0.2480124682188034,
-0.1501253843307495,
0.21029223501682281,
0.04508929327130318,
-0.1260259449481964,
-0.5711378455162048,
0.3680696189403534,
-0.30026736855506897,
-0.32618725299835205,
0.10441852360963821,
0.18856379389762878,
0.5658005475997925,
-0.061295393854379654,
-0.303984671831131,
0.004799223970621824,
0.26468440890312195,
-0.17377348244190216,
-0.31327024102211,
0.2254469394683838,
0.1456712782382965,
0.28158465027809143,
-0.21420666575431824,
0.1592816263437271,
0.11285383999347687,
0.01122800912708044,
-0.45703399181365967,
-0.4115966856479645
] |
https://github.com/huggingface/datasets/issues/1811
|
Unable to add Multi-label Datasets
|
Thanks for adding this dataset! As far as I know `supervised_keys` is mostly a holdover from TFDS, but isn't really used, so feel free to drop it (@lhoestq or @thomwolf correct me if I'm wrong). It definitely shouldn't be blocking :)
|
I am trying to add [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) dataset. The dataset contains two labels per image - `fine label` and `coarse label`. Using just one label in supervised keys as
`supervised_keys=("img", "fine_label")` raises no issue. But trying `supervised_keys=("img", "fine_label","coarse_label")` leads to this error :
```python
Traceback (most recent call last):
File "test_script.py", line 2, in <module>
d = load_dataset('./datasets/cifar100')
File "~/datasets/src/datasets/load.py", line 668, in load_dataset
**config_kwargs,
File "~/datasets/src/datasets/builder.py", line 896, in __init__
super(GeneratorBasedBuilder, self).__init__(*args, **kwargs)
File "~/datasets/src/datasets/builder.py", line 247, in __init__
info.update(self._info())
File "~/.cache/huggingface/modules/datasets_modules/datasets/cifar100/61d2489b2d4a4abc34201432541b7380984ec714e290817d9a1ee318e4b74e0f/cifar100.py", line 79, in _info
citation=_CITATION,
File "<string>", line 19, in __init__
File "~/datasets/src/datasets/info.py", line 136, in __post_init__
self.supervised_keys = SupervisedKeysData(*self.supervised_keys)
TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given
```
Is there a way I can fix this?
Also, what does adding `supervised_keys` do? Is it necessary? How would I specify `supervised_keys` for a multi-input, multi-label dataset?
Thanks,
Gunjan
| 41 |
Unable to add Multi-label Datasets
|
[
-0.19548209011554718,
-0.027771182358264923,
-0.13673695921897888,
0.19686484336853027,
0.1284952163696289,
0.2153186947107315,
0.6219471096992493,
-0.20152932405471802,
0.19123204052448273,
0.19252720475196838,
-0.3703303039073944,
0.17612263560295105,
-0.2279721200466156,
0.39435893297195435,
-0.07988479733467102,
-0.08393671363592148,
-0.06578876823186874,
0.0656026303768158,
0.064595066010952,
-0.25333327054977417,
-0.28602105379104614,
-0.08371305465698242,
-0.12393935024738312,
-0.24886871874332428,
-0.5844324827194214,
-0.30964913964271545,
-0.1728719025850296,
0.03145662695169449,
-0.21755380928516388,
-0.32820701599121094,
-0.05309625715017319,
0.27909407019615173,
-0.18240877985954285,
0.5341471433639526,
-0.00010112370364367962,
-0.02559712529182434,
-0.12184718996286392,
0.014461150392889977,
-0.18680433928966522,
0.07234049588441849,
-0.31216275691986084,
0.008371381089091301,
0.10274497419595718,
-0.12082626670598984,
0.06566725671291351,
-0.25882938504219055,
-0.06750773638486862,
-0.16457141935825348,
-0.09505128115415573,
0.12942297756671906,
0.34267643094062805,
0.03187781944870949,
0.20744678378105164,
-0.3692024052143097,
0.32207128405570984,
-0.17929773032665253,
-0.16006413102149963,
0.016360469162464142,
0.21514715254306793,
0.051713552325963974,
0.19268085062503815,
0.31961244344711304,
0.1256490796804428,
-0.05086378753185272,
-0.07103487104177475,
0.007406950928270817,
0.07273226976394653,
-0.2847104072570801,
0.17960603535175323,
0.2534485459327698,
0.8197711110115051,
-0.016332393512129784,
-0.4736655354499817,
0.07671195268630981,
0.2583405077457428,
-0.22379322350025177,
-0.11125045269727707,
-0.008027696050703526,
0.11276677250862122,
-0.22383417189121246,
-0.10503534227609634,
-0.3195722997188568,
-0.18294651806354523,
0.23314103484153748,
-0.02641949988901615,
0.6407371759414673,
0.08535786718130112,
0.0972445085644722,
0.16576644778251648,
0.023361582309007645,
0.1745166778564453,
0.059251993894577026,
-0.014691988937556744,
-0.016516372561454773,
-0.15975578129291534,
0.1802084743976593,
0.05204537883400917,
-0.1630253791809082,
0.021764356642961502,
0.0763610377907753,
-0.04790788143873215,
-0.06455916166305542,
-0.26370522379875183,
0.10235234349966049,
0.0774993747472763,
-0.015786413103342056,
-0.04590211063623428,
0.2057916224002838,
0.07635372132062912,
-0.17472991347312927,
-0.016305366531014442,
-0.08559203147888184,
-0.1807825118303299,
-0.06393472850322723,
0.1569138914346695,
-0.06973922997713089,
-0.16879144310951233,
-0.0829659178853035,
-0.1418660283088684,
-0.16386596858501434,
-0.11011025309562683,
-0.1392059028148651,
0.14926978945732117,
0.32181984186172485,
0.10897386819124222,
0.07095319777727127,
-0.06986697763204575,
0.49830862879753113,
0.14373603463172913,
-0.10220696032047272,
-0.3212764263153076,
0.23990900814533234,
-0.22493070363998413,
-0.19442802667617798,
0.2545620799064636,
0.13860997557640076,
0.03767882660031319,
0.036149848252534866,
0.0940239354968071,
-0.14101026952266693,
0.032265376299619675,
-0.078022301197052,
0.10122215747833252,
0.20442387461662292,
0.3276335299015045,
0.25572410225868225,
-0.008188655599951744,
-0.2993679642677307,
-0.0192863829433918,
-0.18349716067314148,
-0.19151358306407928,
-0.06993380188941956,
-0.2914036214351654,
0.2821301519870758,
0.3796437978744507,
-0.15355324745178223,
-0.14478401839733124,
0.11661805212497711,
0.14399079978466034,
-0.1253318339586258,
-0.18329183757305145,
-0.04574217274785042,
-0.026471106335520744,
-0.21498934924602509,
0.005525799468159676,
0.45663270354270935,
-0.3387235701084137,
0.011805838905274868,
-0.05265622213482857,
-0.02303529903292656,
0.050500910729169846,
0.2084788978099823,
-0.1758134663105011,
0.10893052816390991,
-0.03960573300719261,
-0.06998386234045029,
0.36336901783943176,
-0.4428173303604126,
-0.2269606590270996,
-0.20856361091136932,
-0.16708873212337494,
-0.2784912586212158,
0.3162536323070526,
0.26363933086395264,
-0.0755009725689888,
0.13704322278499603,
0.3235451579093933,
-0.03630192577838898,
-0.07065088301897049,
-0.0969034805893898,
0.003064626595005393,
0.09654148668050766,
0.015624726191163063,
0.31625673174858093,
0.24203665554523468,
0.08574555069208145,
0.25141340494155884,
0.1416088491678238,
-0.05570104718208313,
-0.15322890877723694,
0.20697617530822754,
0.29364117980003357,
0.1363363265991211,
-0.07484216243028641,
-0.11379329860210419,
-0.1974627673625946,
-0.4282737076282501,
0.054170262068510056,
0.0257718525826931,
0.4496723711490631,
0.29993733763694763,
0.07887877523899078,
-0.18189164996147156,
0.028159555047750473,
-0.2771548628807068,
0.025811485946178436,
0.24929602444171906,
0.4669129252433777,
-0.2077772319316864,
-0.05811041221022606,
-0.06934769451618195,
-0.02286655269563198,
0.29458656907081604,
-0.044162068516016006,
0.05506567656993866,
0.082168348133564,
-0.1831294298171997,
-0.012775148265063763,
0.053352873772382736,
0.23912055790424347,
0.13429155945777893,
0.014509867876768112,
0.13366574048995972,
0.1774158626794815,
-0.11681011319160461,
-0.29763782024383545,
0.32432276010513306,
0.05917971581220627,
0.138962060213089,
-0.21638673543930054,
-0.06923168152570724,
-0.3667360544204712,
0.15231165289878845,
-0.1784326583147049,
-0.1790851503610611,
-0.07460427284240723,
-0.1060921773314476,
0.03905608132481575,
0.043180596083402634,
0.14094233512878418,
0.4192609190940857,
0.007355203852057457,
0.20540036261081696,
-0.4123131334781647,
0.024038631469011307,
-0.21843282878398895,
0.10007381439208984,
-0.18694756925106049,
-0.36406832933425903,
0.21047315001487732,
0.3236803412437439,
0.14228233695030212,
0.2614014148712158,
-0.10934526473283768,
-0.05507593974471092,
0.1279968023300171,
0.16999271512031555,
0.36879661679267883,
0.2121892124414444,
0.47447192668914795,
0.2059621959924698,
-0.26297709345817566,
-0.4334182143211365,
-0.2129834145307541,
-0.07977960258722305,
-0.13491767644882202,
0.25971952080726624,
0.2877359986305237,
0.3616664409637451,
-0.11090029776096344,
-0.25969836115837097,
-0.27776092290878296,
0.33017417788505554,
0.1510542780160904,
-0.1373090147972107,
-0.1530439406633377,
-0.37332573533058167,
-0.272884339094162,
-0.0852193534374237,
-0.3599342107772827,
-0.20603735744953156,
-0.45411399006843567,
0.3516521751880646,
0.22923627495765686,
0.030863987281918526,
0.23617392778396606,
0.19917811453342438,
0.11297442764043808,
-0.08124592155218124,
0.06789783388376236,
0.10830728709697723,
-0.22871935367584229,
-0.07425134629011154,
0.25759658217430115,
0.07317408174276352,
-0.12732556462287903,
0.42919519543647766,
0.04086935520172119,
0.06669027358293533,
-0.1574200540781021,
-0.24407659471035004,
-0.0042421468533575535,
0.06654750555753708,
-0.045689281076192856,
0.08204613626003265,
-0.0464407317340374,
0.03689883276820183,
-0.1788182258605957,
0.2793157398700714,
0.07249968498945236,
0.09332031011581421,
0.05984554439783096,
-0.13312506675720215,
-0.440206378698349,
-0.17644108831882477,
-0.5530263185501099,
-0.22903774678707123,
-0.21096210181713104,
0.10436274111270905,
0.16730089485645294,
0.10343059152364731,
0.19850370287895203,
0.0931786373257637,
-0.0259868074208498,
0.009366967715322971,
0.10355043411254883,
-0.27317503094673157,
0.06018899381160736,
0.31847667694091797,
-0.3532760441303253,
-0.33536025881767273,
0.1737409234046936,
0.005660332273691893,
0.41656163334846497,
0.12983404099941254,
-0.10976459085941315,
-0.11918839812278748,
0.13357707858085632,
-0.11638413369655609,
0.030114946886897087,
0.24677003920078278,
0.34627899527549744,
0.20519225299358368,
-0.2542171776294708,
-0.22555117309093475,
-0.37952885031700134,
0.3714306056499481,
-0.04150141030550003,
0.14539934694766998,
-0.35545244812965393,
0.04583592712879181,
-0.06052035093307495,
0.3863368034362793,
0.027966737747192383,
0.044131822884082794,
0.37739109992980957,
-0.1663425713777542,
0.3376661241054535,
-0.19334274530410767,
-0.39838239550590515,
0.08633224666118622,
-0.00895004253834486,
0.2225007712841034,
0.04422006383538246,
-0.04627872630953789,
-0.22875848412513733,
-0.16980330646038055,
0.42127618193626404,
-0.3138270974159241,
0.06681793928146362,
-0.2723798453807831,
0.036167923361063004,
0.10143355280160904,
0.09825979173183441,
-0.2944933772087097,
-0.39044421911239624,
-0.07413327693939209,
-0.14970295131206512,
-0.027905235067009926,
-0.1123911663889885,
-0.22591233253479004,
-0.6135898232460022,
0.1026344895362854,
-0.09498866647481918,
0.08536586165428162,
0.12651382386684418,
0.18337491154670715,
-0.36903178691864014,
0.14787746965885162,
-0.00280107487924397,
0.08277793228626251,
0.538327157497406,
-0.7337601184844971,
-0.08606189489364624,
0.36648842692375183,
0.18220603466033936,
-0.29188287258148193,
0.045951951295137405,
-0.36269107460975647,
0.13298822939395905,
0.2096388339996338,
0.18827970325946808,
-0.27712565660476685,
0.21120953559875488,
0.28996801376342773,
0.012435014359652996,
0.02790549024939537,
0.03689483925700188,
0.007231364957988262,
-0.17176517844200134,
-0.2881012558937073,
-0.08449338376522064,
0.04613890498876572,
0.29221272468566895,
0.12604279816150665,
-0.11228994280099869,
0.013528476469218731,
-0.017018601298332214,
0.1593717634677887,
0.025864677503705025,
0.02096877433359623,
0.42940428853034973,
0.12307675927877426,
-0.06869136542081833,
0.03839685022830963,
0.536032497882843,
0.7258871793746948,
-0.5172779560089111,
-0.3175601363182068,
0.40656134486198425,
-0.4044509828090668,
0.443846732378006,
0.20103071630001068,
0.2873757481575012,
0.19939517974853516,
-0.1707436740398407,
0.04831011965870857,
0.1564391404390335,
0.24139252305030823,
0.22185353934764862,
-0.020981863141059875,
-0.4841381013393402,
-0.24030743539333344,
0.22341690957546234,
0.054475750774145126,
-0.20331571996212006,
0.32095253467559814,
0.1505367010831833,
-0.1948927342891693,
0.061419662088155746,
-0.08425946533679962,
0.7440840005874634,
-0.32985129952430725,
0.04650724306702614,
-0.04803865775465965,
-0.1758064478635788,
0.4643702208995819,
-0.2448260635137558,
0.18611834943294525,
-0.160052090883255,
-0.11681725084781647,
0.06749730557203293,
0.013384229503571987,
-0.06785605102777481,
0.4637148976325989,
-0.1752079278230667,
0.051765721291303635,
-0.10978948324918747,
0.038903430104255676,
-0.02066829800605774,
0.22009548544883728,
0.35728520154953003,
-0.348959743976593,
0.12920987606048584,
0.2683124840259552,
0.1031908392906189,
-0.15519937872886658,
-0.048217449337244034,
0.01613166742026806,
-0.15588994324207306,
-0.09627161920070648,
-0.254753440618515,
0.09466125071048737,
-0.015096251852810383,
0.15558423101902008,
0.08852341771125793,
-0.0020035046618431807,
0.07896450161933899,
0.03666899353265762,
0.3919546604156494,
0.05323115363717079,
-0.06420708447694778,
0.07474205642938614,
-0.08575275540351868,
-0.12509500980377197,
-0.2409133017063141,
-0.11175743490457535,
0.2770420014858246,
-0.08482078462839127,
-0.3314402103424072,
0.24134387075901031,
0.061425428837537766,
-0.30943137407302856,
-0.21213144063949585,
0.10733114928007126,
-0.04044470563530922,
-0.1949024200439453,
0.2019607424736023,
0.30781206488609314,
0.1849939078092575,
-0.4562794268131256,
0.22667758166790009,
0.002416936680674553,
-0.008353973738849163,
0.03156237304210663,
0.0342545323073864,
0.04003279283642769,
-0.20039451122283936,
0.38938108086586,
0.061074793338775635,
0.23971059918403625,
0.2815101444721222,
0.20402643084526062,
-0.04725044220685959,
-0.3358202874660492,
-0.15378375351428986,
0.2223823219537735,
-0.4854849874973297,
-0.06110391765832901,
0.14612717926502228,
-0.3208838999271393,
0.15703341364860535,
0.3615390658378601,
0.038660310208797455,
0.33468514680862427,
0.010178417898714542,
-0.20746514201164246,
-0.16407516598701477,
0.0708586722612381,
-0.18687686324119568,
0.15870419144630432,
0.014631599187850952,
0.32231268286705017,
0.13628573715686798,
0.4602959156036377,
-0.45684343576431274,
-0.17251485586166382,
-0.30591440200805664,
-0.06089518219232559,
0.2804785966873169,
-0.08757713437080383,
0.032143715769052505,
0.0643429085612297,
0.2733055055141449,
-0.28113192319869995,
0.0032139529939740896,
-0.24954639375209808,
-0.0729009360074997,
0.043265655636787415,
0.1914963275194168,
-0.013975104317069054,
-0.13996559381484985,
-0.3089742362499237,
-0.24159076809883118,
0.004025972448289394,
0.1611333191394806,
0.13806354999542236,
-0.1860394924879074,
0.00967375747859478,
-0.09990261495113373,
-0.12242821604013443,
-0.018384061753749847,
0.046853259205818176,
0.12221052497625351,
-0.12704810500144958,
0.14826393127441406,
-0.04696401208639145,
0.13191579282283783,
-0.15092915296554565,
-0.1381383240222931,
0.11663038283586502,
-0.1464056521654129,
-0.0687788650393486,
0.038773100823163986,
-0.3775264024734497,
0.29009291529655457,
0.2698182165622711,
0.21904507279396057,
-0.2606610357761383,
-0.12184708565473557,
0.14128558337688446,
0.08922552317380905,
0.28505396842956543,
-0.30017217993736267,
-0.44020524621009827,
0.14193817973136902,
-0.017945047467947006,
0.19695048034191132,
0.3394462764263153,
0.38531702756881714,
-0.08996900916099548,
0.13358889520168304,
0.06173211336135864,
-0.01564597152173519,
-0.2919057607650757,
0.1303488314151764,
0.0612073689699173,
-0.23295260965824127,
-0.0022874658461660147,
0.40074172616004944,
0.357759028673172,
-0.04196050763130188,
0.31098687648773193,
0.21238526701927185,
0.3827591836452484,
-0.05016177520155907,
-0.0828031525015831,
0.06375455111265182,
-0.20722134411334991,
0.3006190359592438,
-0.030392810702323914,
0.1438530683517456,
0.035240884870290756,
-0.21328772604465485,
0.10912226140499115,
-0.4699629843235016,
-0.05016063153743744,
-0.2607903480529785,
0.41716018319129944,
-0.17185088992118835,
-0.15132154524326324,
-0.026819022372364998,
-0.3899064362049103,
-0.023208441212773323,
-0.09425371885299683,
0.01970544084906578,
-0.08472313731908798,
0.20866571366786957,
-0.22803448140621185,
-0.06922905147075653,
-0.25604626536369324,
-0.250458687543869,
0.20822519063949585,
0.14681342244148254,
-0.07760439068078995,
0.39312490820884705,
0.1487148106098175,
-0.25823917984962463,
0.15152406692504883,
0.31879308819770813,
0.23838669061660767,
-0.012700587511062622,
0.2790491282939911,
-0.11023510992527008,
-0.13661238551139832,
-0.27076882123947144,
0.07364850491285324,
0.19288107752799988,
0.4036521315574646,
-0.1681656837463379,
0.312884122133255,
0.2248225212097168,
-0.2853372097015381,
0.30066314339637756,
0.2886480391025543,
0.29867348074913025,
0.008221261203289032,
-0.11165815591812134,
-0.05421493202447891,
-0.30737432837486267,
-0.02877080626785755,
0.09461506456136703,
-0.3185778260231018,
-0.2339480221271515,
0.2936842441558838,
-0.262291818857193,
0.06579795479774475,
-0.28586962819099426,
0.13417081534862518,
0.27357470989227295,
0.47277194261550903,
0.12069915980100632,
0.06883460283279419,
-0.09972581267356873,
-0.12249474972486496,
-0.4788498878479004,
0.14473856985569,
-0.19917282462120056,
-0.28007593750953674,
-0.17836162447929382,
0.015490942634642124,
0.33454468846321106,
-0.15262822806835175,
0.30560117959976196,
-0.06920932978391647,
0.3846837282180786,
0.03295613080263138,
-0.5180844068527222,
0.07954929023981094,
0.3408700227737427,
0.01916532777249813,
0.14988356828689575,
-0.19518215954303741,
-0.01972654089331627,
0.06092460826039314,
0.19396498799324036,
-0.018258923664689064,
0.11892185360193253,
-0.17299793660640717,
0.026318015530705452,
0.2799353301525116,
-0.12099245935678482,
0.7147759199142456,
-0.1543300598859787,
-0.0051495712250471115,
-0.20776613056659698,
-0.24687282741069794,
-0.061814840883016586,
0.03482254967093468,
0.3563484251499176,
0.560189425945282,
-0.2632432281970978,
0.10632240772247314,
0.12102578580379486,
-0.0669877827167511,
0.008811897598206997,
0.36948129534721375,
-0.05782730132341385,
0.425655335187912,
-0.06958099454641342,
-0.12203333526849747,
0.3754514455795288,
0.013092141598463058,
0.12242794781923294,
-0.030878961086273193,
-0.019018789753317833,
-0.2609582841396332,
0.2809961140155792,
0.21805153787136078,
-0.23628100752830505,
-0.1530214548110962,
0.09418739378452301,
0.04992566630244255,
-0.02599281445145607,
-0.469428151845932,
0.024070238694548607,
0.32591256499290466,
0.13586708903312683,
-0.5024073123931885,
0.31728503108024597,
-0.23801571130752563,
-0.20566405355930328,
-0.002097603864967823,
-0.06266733258962631,
-0.04427839815616608,
-0.2230953872203827,
-0.1419534534215927,
-0.011008625850081444
] |
https://github.com/huggingface/datasets/issues/1811
|
Unable to add Multi-label Datasets
|
Thanks @yjernite @lhoestq
The template for new dataset makes it slightly confusing. I suppose the comment suggesting its update can be removed.
|
I am trying to add [CIFAR-100](https://www.cs.toronto.edu/~kriz/cifar.html) dataset. The dataset contains two labels per image - `fine label` and `coarse label`. Using just one label in supervised keys as
`supervised_keys=("img", "fine_label")` raises no issue. But trying `supervised_keys=("img", "fine_label","coarse_label")` leads to this error :
```python
Traceback (most recent call last):
File "test_script.py", line 2, in <module>
d = load_dataset('./datasets/cifar100')
File "~/datasets/src/datasets/load.py", line 668, in load_dataset
**config_kwargs,
File "~/datasets/src/datasets/builder.py", line 896, in __init__
super(GeneratorBasedBuilder, self).__init__(*args, **kwargs)
File "~/datasets/src/datasets/builder.py", line 247, in __init__
info.update(self._info())
File "~/.cache/huggingface/modules/datasets_modules/datasets/cifar100/61d2489b2d4a4abc34201432541b7380984ec714e290817d9a1ee318e4b74e0f/cifar100.py", line 79, in _info
citation=_CITATION,
File "<string>", line 19, in __init__
File "~/datasets/src/datasets/info.py", line 136, in __post_init__
self.supervised_keys = SupervisedKeysData(*self.supervised_keys)
TypeError: __init__() takes from 1 to 3 positional arguments but 4 were given
```
Is there a way I can fix this?
Also, what does adding `supervised_keys` do? Is it necessary? How would I specify `supervised_keys` for a multi-input, multi-label dataset?
Thanks,
Gunjan
| 22 |
Unable to add Multi-label Datasets
|
[
-0.19548209011554718,
-0.027771182358264923,
-0.13673695921897888,
0.19686484336853027,
0.1284952163696289,
0.2153186947107315,
0.6219471096992493,
-0.20152932405471802,
0.19123204052448273,
0.19252720475196838,
-0.3703303039073944,
0.17612263560295105,
-0.2279721200466156,
0.39435893297195435,
-0.07988479733467102,
-0.08393671363592148,
-0.06578876823186874,
0.0656026303768158,
0.064595066010952,
-0.25333327054977417,
-0.28602105379104614,
-0.08371305465698242,
-0.12393935024738312,
-0.24886871874332428,
-0.5844324827194214,
-0.30964913964271545,
-0.1728719025850296,
0.03145662695169449,
-0.21755380928516388,
-0.32820701599121094,
-0.05309625715017319,
0.27909407019615173,
-0.18240877985954285,
0.5341471433639526,
-0.00010112370364367962,
-0.02559712529182434,
-0.12184718996286392,
0.014461150392889977,
-0.18680433928966522,
0.07234049588441849,
-0.31216275691986084,
0.008371381089091301,
0.10274497419595718,
-0.12082626670598984,
0.06566725671291351,
-0.25882938504219055,
-0.06750773638486862,
-0.16457141935825348,
-0.09505128115415573,
0.12942297756671906,
0.34267643094062805,
0.03187781944870949,
0.20744678378105164,
-0.3692024052143097,
0.32207128405570984,
-0.17929773032665253,
-0.16006413102149963,
0.016360469162464142,
0.21514715254306793,
0.051713552325963974,
0.19268085062503815,
0.31961244344711304,
0.1256490796804428,
-0.05086378753185272,
-0.07103487104177475,
0.007406950928270817,
0.07273226976394653,
-0.2847104072570801,
0.17960603535175323,
0.2534485459327698,
0.8197711110115051,
-0.016332393512129784,
-0.4736655354499817,
0.07671195268630981,
0.2583405077457428,
-0.22379322350025177,
-0.11125045269727707,
-0.008027696050703526,
0.11276677250862122,
-0.22383417189121246,
-0.10503534227609634,
-0.3195722997188568,
-0.18294651806354523,
0.23314103484153748,
-0.02641949988901615,
0.6407371759414673,
0.08535786718130112,
0.0972445085644722,
0.16576644778251648,
0.023361582309007645,
0.1745166778564453,
0.059251993894577026,
-0.014691988937556744,
-0.016516372561454773,
-0.15975578129291534,
0.1802084743976593,
0.05204537883400917,
-0.1630253791809082,
0.021764356642961502,
0.0763610377907753,
-0.04790788143873215,
-0.06455916166305542,
-0.26370522379875183,
0.10235234349966049,
0.0774993747472763,
-0.015786413103342056,
-0.04590211063623428,
0.2057916224002838,
0.07635372132062912,
-0.17472991347312927,
-0.016305366531014442,
-0.08559203147888184,
-0.1807825118303299,
-0.06393472850322723,
0.1569138914346695,
-0.06973922997713089,
-0.16879144310951233,
-0.0829659178853035,
-0.1418660283088684,
-0.16386596858501434,
-0.11011025309562683,
-0.1392059028148651,
0.14926978945732117,
0.32181984186172485,
0.10897386819124222,
0.07095319777727127,
-0.06986697763204575,
0.49830862879753113,
0.14373603463172913,
-0.10220696032047272,
-0.3212764263153076,
0.23990900814533234,
-0.22493070363998413,
-0.19442802667617798,
0.2545620799064636,
0.13860997557640076,
0.03767882660031319,
0.036149848252534866,
0.0940239354968071,
-0.14101026952266693,
0.032265376299619675,
-0.078022301197052,
0.10122215747833252,
0.20442387461662292,
0.3276335299015045,
0.25572410225868225,
-0.008188655599951744,
-0.2993679642677307,
-0.0192863829433918,
-0.18349716067314148,
-0.19151358306407928,
-0.06993380188941956,
-0.2914036214351654,
0.2821301519870758,
0.3796437978744507,
-0.15355324745178223,
-0.14478401839733124,
0.11661805212497711,
0.14399079978466034,
-0.1253318339586258,
-0.18329183757305145,
-0.04574217274785042,
-0.026471106335520744,
-0.21498934924602509,
0.005525799468159676,
0.45663270354270935,
-0.3387235701084137,
0.011805838905274868,
-0.05265622213482857,
-0.02303529903292656,
0.050500910729169846,
0.2084788978099823,
-0.1758134663105011,
0.10893052816390991,
-0.03960573300719261,
-0.06998386234045029,
0.36336901783943176,
-0.4428173303604126,
-0.2269606590270996,
-0.20856361091136932,
-0.16708873212337494,
-0.2784912586212158,
0.3162536323070526,
0.26363933086395264,
-0.0755009725689888,
0.13704322278499603,
0.3235451579093933,
-0.03630192577838898,
-0.07065088301897049,
-0.0969034805893898,
0.003064626595005393,
0.09654148668050766,
0.015624726191163063,
0.31625673174858093,
0.24203665554523468,
0.08574555069208145,
0.25141340494155884,
0.1416088491678238,
-0.05570104718208313,
-0.15322890877723694,
0.20697617530822754,
0.29364117980003357,
0.1363363265991211,
-0.07484216243028641,
-0.11379329860210419,
-0.1974627673625946,
-0.4282737076282501,
0.054170262068510056,
0.0257718525826931,
0.4496723711490631,
0.29993733763694763,
0.07887877523899078,
-0.18189164996147156,
0.028159555047750473,
-0.2771548628807068,
0.025811485946178436,
0.24929602444171906,
0.4669129252433777,
-0.2077772319316864,
-0.05811041221022606,
-0.06934769451618195,
-0.02286655269563198,
0.29458656907081604,
-0.044162068516016006,
0.05506567656993866,
0.082168348133564,
-0.1831294298171997,
-0.012775148265063763,
0.053352873772382736,
0.23912055790424347,
0.13429155945777893,
0.014509867876768112,
0.13366574048995972,
0.1774158626794815,
-0.11681011319160461,
-0.29763782024383545,
0.32432276010513306,
0.05917971581220627,
0.138962060213089,
-0.21638673543930054,
-0.06923168152570724,
-0.3667360544204712,
0.15231165289878845,
-0.1784326583147049,
-0.1790851503610611,
-0.07460427284240723,
-0.1060921773314476,
0.03905608132481575,
0.043180596083402634,
0.14094233512878418,
0.4192609190940857,
0.007355203852057457,
0.20540036261081696,
-0.4123131334781647,
0.024038631469011307,
-0.21843282878398895,
0.10007381439208984,
-0.18694756925106049,
-0.36406832933425903,
0.21047315001487732,
0.3236803412437439,
0.14228233695030212,
0.2614014148712158,
-0.10934526473283768,
-0.05507593974471092,
0.1279968023300171,
0.16999271512031555,
0.36879661679267883,
0.2121892124414444,
0.47447192668914795,
0.2059621959924698,
-0.26297709345817566,
-0.4334182143211365,
-0.2129834145307541,
-0.07977960258722305,
-0.13491767644882202,
0.25971952080726624,
0.2877359986305237,
0.3616664409637451,
-0.11090029776096344,
-0.25969836115837097,
-0.27776092290878296,
0.33017417788505554,
0.1510542780160904,
-0.1373090147972107,
-0.1530439406633377,
-0.37332573533058167,
-0.272884339094162,
-0.0852193534374237,
-0.3599342107772827,
-0.20603735744953156,
-0.45411399006843567,
0.3516521751880646,
0.22923627495765686,
0.030863987281918526,
0.23617392778396606,
0.19917811453342438,
0.11297442764043808,
-0.08124592155218124,
0.06789783388376236,
0.10830728709697723,
-0.22871935367584229,
-0.07425134629011154,
0.25759658217430115,
0.07317408174276352,
-0.12732556462287903,
0.42919519543647766,
0.04086935520172119,
0.06669027358293533,
-0.1574200540781021,
-0.24407659471035004,
-0.0042421468533575535,
0.06654750555753708,
-0.045689281076192856,
0.08204613626003265,
-0.0464407317340374,
0.03689883276820183,
-0.1788182258605957,
0.2793157398700714,
0.07249968498945236,
0.09332031011581421,
0.05984554439783096,
-0.13312506675720215,
-0.440206378698349,
-0.17644108831882477,
-0.5530263185501099,
-0.22903774678707123,
-0.21096210181713104,
0.10436274111270905,
0.16730089485645294,
0.10343059152364731,
0.19850370287895203,
0.0931786373257637,
-0.0259868074208498,
0.009366967715322971,
0.10355043411254883,
-0.27317503094673157,
0.06018899381160736,
0.31847667694091797,
-0.3532760441303253,
-0.33536025881767273,
0.1737409234046936,
0.005660332273691893,
0.41656163334846497,
0.12983404099941254,
-0.10976459085941315,
-0.11918839812278748,
0.13357707858085632,
-0.11638413369655609,
0.030114946886897087,
0.24677003920078278,
0.34627899527549744,
0.20519225299358368,
-0.2542171776294708,
-0.22555117309093475,
-0.37952885031700134,
0.3714306056499481,
-0.04150141030550003,
0.14539934694766998,
-0.35545244812965393,
0.04583592712879181,
-0.06052035093307495,
0.3863368034362793,
0.027966737747192383,
0.044131822884082794,
0.37739109992980957,
-0.1663425713777542,
0.3376661241054535,
-0.19334274530410767,
-0.39838239550590515,
0.08633224666118622,
-0.00895004253834486,
0.2225007712841034,
0.04422006383538246,
-0.04627872630953789,
-0.22875848412513733,
-0.16980330646038055,
0.42127618193626404,
-0.3138270974159241,
0.06681793928146362,
-0.2723798453807831,
0.036167923361063004,
0.10143355280160904,
0.09825979173183441,
-0.2944933772087097,
-0.39044421911239624,
-0.07413327693939209,
-0.14970295131206512,
-0.027905235067009926,
-0.1123911663889885,
-0.22591233253479004,
-0.6135898232460022,
0.1026344895362854,
-0.09498866647481918,
0.08536586165428162,
0.12651382386684418,
0.18337491154670715,
-0.36903178691864014,
0.14787746965885162,
-0.00280107487924397,
0.08277793228626251,
0.538327157497406,
-0.7337601184844971,
-0.08606189489364624,
0.36648842692375183,
0.18220603466033936,
-0.29188287258148193,
0.045951951295137405,
-0.36269107460975647,
0.13298822939395905,
0.2096388339996338,
0.18827970325946808,
-0.27712565660476685,
0.21120953559875488,
0.28996801376342773,
0.012435014359652996,
0.02790549024939537,
0.03689483925700188,
0.007231364957988262,
-0.17176517844200134,
-0.2881012558937073,
-0.08449338376522064,
0.04613890498876572,
0.29221272468566895,
0.12604279816150665,
-0.11228994280099869,
0.013528476469218731,
-0.017018601298332214,
0.1593717634677887,
0.025864677503705025,
0.02096877433359623,
0.42940428853034973,
0.12307675927877426,
-0.06869136542081833,
0.03839685022830963,
0.536032497882843,
0.7258871793746948,
-0.5172779560089111,
-0.3175601363182068,
0.40656134486198425,
-0.4044509828090668,
0.443846732378006,
0.20103071630001068,
0.2873757481575012,
0.19939517974853516,
-0.1707436740398407,
0.04831011965870857,
0.1564391404390335,
0.24139252305030823,
0.22185353934764862,
-0.020981863141059875,
-0.4841381013393402,
-0.24030743539333344,
0.22341690957546234,
0.054475750774145126,
-0.20331571996212006,
0.32095253467559814,
0.1505367010831833,
-0.1948927342891693,
0.061419662088155746,
-0.08425946533679962,
0.7440840005874634,
-0.32985129952430725,
0.04650724306702614,
-0.04803865775465965,
-0.1758064478635788,
0.4643702208995819,
-0.2448260635137558,
0.18611834943294525,
-0.160052090883255,
-0.11681725084781647,
0.06749730557203293,
0.013384229503571987,
-0.06785605102777481,
0.4637148976325989,
-0.1752079278230667,
0.051765721291303635,
-0.10978948324918747,
0.038903430104255676,
-0.02066829800605774,
0.22009548544883728,
0.35728520154953003,
-0.348959743976593,
0.12920987606048584,
0.2683124840259552,
0.1031908392906189,
-0.15519937872886658,
-0.048217449337244034,
0.01613166742026806,
-0.15588994324207306,
-0.09627161920070648,
-0.254753440618515,
0.09466125071048737,
-0.015096251852810383,
0.15558423101902008,
0.08852341771125793,
-0.0020035046618431807,
0.07896450161933899,
0.03666899353265762,
0.3919546604156494,
0.05323115363717079,
-0.06420708447694778,
0.07474205642938614,
-0.08575275540351868,
-0.12509500980377197,
-0.2409133017063141,
-0.11175743490457535,
0.2770420014858246,
-0.08482078462839127,
-0.3314402103424072,
0.24134387075901031,
0.061425428837537766,
-0.30943137407302856,
-0.21213144063949585,
0.10733114928007126,
-0.04044470563530922,
-0.1949024200439453,
0.2019607424736023,
0.30781206488609314,
0.1849939078092575,
-0.4562794268131256,
0.22667758166790009,
0.002416936680674553,
-0.008353973738849163,
0.03156237304210663,
0.0342545323073864,
0.04003279283642769,
-0.20039451122283936,
0.38938108086586,
0.061074793338775635,
0.23971059918403625,
0.2815101444721222,
0.20402643084526062,
-0.04725044220685959,
-0.3358202874660492,
-0.15378375351428986,
0.2223823219537735,
-0.4854849874973297,
-0.06110391765832901,
0.14612717926502228,
-0.3208838999271393,
0.15703341364860535,
0.3615390658378601,
0.038660310208797455,
0.33468514680862427,
0.010178417898714542,
-0.20746514201164246,
-0.16407516598701477,
0.0708586722612381,
-0.18687686324119568,
0.15870419144630432,
0.014631599187850952,
0.32231268286705017,
0.13628573715686798,
0.4602959156036377,
-0.45684343576431274,
-0.17251485586166382,
-0.30591440200805664,
-0.06089518219232559,
0.2804785966873169,
-0.08757713437080383,
0.032143715769052505,
0.0643429085612297,
0.2733055055141449,
-0.28113192319869995,
0.0032139529939740896,
-0.24954639375209808,
-0.0729009360074997,
0.043265655636787415,
0.1914963275194168,
-0.013975104317069054,
-0.13996559381484985,
-0.3089742362499237,
-0.24159076809883118,
0.004025972448289394,
0.1611333191394806,
0.13806354999542236,
-0.1860394924879074,
0.00967375747859478,
-0.09990261495113373,
-0.12242821604013443,
-0.018384061753749847,
0.046853259205818176,
0.12221052497625351,
-0.12704810500144958,
0.14826393127441406,
-0.04696401208639145,
0.13191579282283783,
-0.15092915296554565,
-0.1381383240222931,
0.11663038283586502,
-0.1464056521654129,
-0.0687788650393486,
0.038773100823163986,
-0.3775264024734497,
0.29009291529655457,
0.2698182165622711,
0.21904507279396057,
-0.2606610357761383,
-0.12184708565473557,
0.14128558337688446,
0.08922552317380905,
0.28505396842956543,
-0.30017217993736267,
-0.44020524621009827,
0.14193817973136902,
-0.017945047467947006,
0.19695048034191132,
0.3394462764263153,
0.38531702756881714,
-0.08996900916099548,
0.13358889520168304,
0.06173211336135864,
-0.01564597152173519,
-0.2919057607650757,
0.1303488314151764,
0.0612073689699173,
-0.23295260965824127,
-0.0022874658461660147,
0.40074172616004944,
0.357759028673172,
-0.04196050763130188,
0.31098687648773193,
0.21238526701927185,
0.3827591836452484,
-0.05016177520155907,
-0.0828031525015831,
0.06375455111265182,
-0.20722134411334991,
0.3006190359592438,
-0.030392810702323914,
0.1438530683517456,
0.035240884870290756,
-0.21328772604465485,
0.10912226140499115,
-0.4699629843235016,
-0.05016063153743744,
-0.2607903480529785,
0.41716018319129944,
-0.17185088992118835,
-0.15132154524326324,
-0.026819022372364998,
-0.3899064362049103,
-0.023208441212773323,
-0.09425371885299683,
0.01970544084906578,
-0.08472313731908798,
0.20866571366786957,
-0.22803448140621185,
-0.06922905147075653,
-0.25604626536369324,
-0.250458687543869,
0.20822519063949585,
0.14681342244148254,
-0.07760439068078995,
0.39312490820884705,
0.1487148106098175,
-0.25823917984962463,
0.15152406692504883,
0.31879308819770813,
0.23838669061660767,
-0.012700587511062622,
0.2790491282939911,
-0.11023510992527008,
-0.13661238551139832,
-0.27076882123947144,
0.07364850491285324,
0.19288107752799988,
0.4036521315574646,
-0.1681656837463379,
0.312884122133255,
0.2248225212097168,
-0.2853372097015381,
0.30066314339637756,
0.2886480391025543,
0.29867348074913025,
0.008221261203289032,
-0.11165815591812134,
-0.05421493202447891,
-0.30737432837486267,
-0.02877080626785755,
0.09461506456136703,
-0.3185778260231018,
-0.2339480221271515,
0.2936842441558838,
-0.262291818857193,
0.06579795479774475,
-0.28586962819099426,
0.13417081534862518,
0.27357470989227295,
0.47277194261550903,
0.12069915980100632,
0.06883460283279419,
-0.09972581267356873,
-0.12249474972486496,
-0.4788498878479004,
0.14473856985569,
-0.19917282462120056,
-0.28007593750953674,
-0.17836162447929382,
0.015490942634642124,
0.33454468846321106,
-0.15262822806835175,
0.30560117959976196,
-0.06920932978391647,
0.3846837282180786,
0.03295613080263138,
-0.5180844068527222,
0.07954929023981094,
0.3408700227737427,
0.01916532777249813,
0.14988356828689575,
-0.19518215954303741,
-0.01972654089331627,
0.06092460826039314,
0.19396498799324036,
-0.018258923664689064,
0.11892185360193253,
-0.17299793660640717,
0.026318015530705452,
0.2799353301525116,
-0.12099245935678482,
0.7147759199142456,
-0.1543300598859787,
-0.0051495712250471115,
-0.20776613056659698,
-0.24687282741069794,
-0.061814840883016586,
0.03482254967093468,
0.3563484251499176,
0.560189425945282,
-0.2632432281970978,
0.10632240772247314,
0.12102578580379486,
-0.0669877827167511,
0.008811897598206997,
0.36948129534721375,
-0.05782730132341385,
0.425655335187912,
-0.06958099454641342,
-0.12203333526849747,
0.3754514455795288,
0.013092141598463058,
0.12242794781923294,
-0.030878961086273193,
-0.019018789753317833,
-0.2609582841396332,
0.2809961140155792,
0.21805153787136078,
-0.23628100752830505,
-0.1530214548110962,
0.09418739378452301,
0.04992566630244255,
-0.02599281445145607,
-0.469428151845932,
0.024070238694548607,
0.32591256499290466,
0.13586708903312683,
-0.5024073123931885,
0.31728503108024597,
-0.23801571130752563,
-0.20566405355930328,
-0.002097603864967823,
-0.06266733258962631,
-0.04427839815616608,
-0.2230953872203827,
-0.1419534534215927,
-0.011008625850081444
] |
https://github.com/huggingface/datasets/issues/1810
|
Add Hateful Memes Dataset
|
Hi @gchhablani since Array2D doesn't support images of different sizes, I would suggest to store in the dataset the paths to the image file instead of the image data. This has the advantage of not decompressing the data (images are often compressed using jpeg, png etc.). Users can still apply `.map` to load the images if they want to. Though it would en up being Sequences features.
In the future we'll add support for ragged tensors for this case and update the relevant dataset with this feature.
|
## Add Hateful Memes Dataset
- **Name:** Hateful Memes
- **Description:** [https://ai.facebook.com/blog/hateful-memes-challenge-and-data-set]( https://ai.facebook.com/blog/hateful-memes-challenge-and-data-set)
- **Paper:** [https://arxiv.org/pdf/2005.04790.pdf](https://arxiv.org/pdf/2005.04790.pdf)
- **Data:** [This link](https://drivendata-competition-fb-hateful-memes-data.s3.amazonaws.com/XjiOc5ycDBRRNwbhRlgH.zip?AWSAccessKeyId=AKIARVBOBDCY4MWEDJKS&Signature=DaUuGgZWUgDHzEPPbyJ2PhSJ56Q%3D&Expires=1612816874)
- **Motivation:** Including multi-modal datasets to 🤗 datasets.
I will be adding this dataset. It requires the user to sign an agreement on DrivenData. So, it will be used with a manual download.
The issue with this dataset is that the images are of different sizes. The image datasets added so far (CIFAR-10 and MNIST) have a uniform shape throughout.
So something like
```python
datasets.Array2D(shape=(28, 28), dtype="uint8")
```
won't work for the images. How would I add image features then? I checked `datasets/features.py` but couldn't figure out the appropriate class for this. I'm assuming I would want to avoid re-sizing at all since we want the user to be able to access the original images.
Also, in case I want to load only a subset of the data, since the actual data is around 8.8GB, how would that be possible?
Thanks,
Gunjan
| 87 |
Add Hateful Memes Dataset
|
[
-0.3928506076335907,
0.17431513965129852,
-0.29395872354507446,
-0.09689858555793762,
0.02692667581140995,
0.388846755027771,
0.3516395688056946,
-0.2416868805885315,
0.06399504840373993,
-0.15249906480312347,
-0.05148690193891525,
-0.16697923839092255,
-0.4421253502368927,
0.20074041187763214,
0.31345605850219727,
0.16669359803199768,
0.04842032119631767,
0.27464228868484497,
-0.2233600616455078,
-0.11516508460044861,
-0.10135027766227722,
0.21805331110954285,
-0.02548578381538391,
-0.15669168531894684,
-0.5915365815162659,
-0.06802040338516235,
0.2190251648426056,
0.19648730754852295,
-0.15177753567695618,
-0.4903706908226013,
-0.08980607986450195,
0.07822178304195404,
-0.13374494016170502,
0.52974534034729,
-0.0001044660311890766,
-0.10799114406108856,
-0.13044239580631256,
-0.06955509632825851,
-0.1127941831946373,
-0.20371535420417786,
-0.05521782115101814,
-0.08817221224308014,
-0.376751571893692,
0.10271962732076645,
-0.17237110435962677,
-0.23910363018512726,
0.029867874458432198,
-0.3873514235019684,
0.5808764100074768,
0.46689122915267944,
0.23521234095096588,
-0.0026410985738039017,
0.06942737102508545,
-0.0925845354795456,
0.4616328179836273,
0.7138386964797974,
-0.04302988201379776,
-0.17910228669643402,
-0.07345621287822723,
0.14542555809020996,
0.24804244935512543,
0.23245906829833984,
0.09030096232891083,
-0.17460155487060547,
0.2543579936027527,
-0.20174476504325867,
0.01833164505660534,
-0.1459256112575531,
0.3858864903450012,
0.36545267701148987,
0.05874045193195343,
-0.05681096389889717,
-0.04980124160647392,
-0.06480497121810913,
0.007291081361472607,
-0.3069203197956085,
-0.08732026070356369,
0.017643557861447334,
-0.0968216061592102,
0.22919811308383942,
-0.09157861769199371,
-0.04269186407327652,
-0.02731211483478546,
0.1333910971879959,
0.14895972609519958,
0.11411066353321075,
-0.16356949508190155,
0.02486393228173256,
0.01088990643620491,
-0.33329448103904724,
-0.12788088619709015,
0.11009068042039871,
-0.026991933584213257,
0.1297789216041565,
0.07770195603370667,
-0.1377819925546646,
-0.029652195051312447,
-0.17875726521015167,
0.1486940085887909,
-0.6108965873718262,
-0.12026035040616989,
0.03352247178554535,
-0.1764276623725891,
-0.3352823257446289,
0.4737585783004761,
-0.15939348936080933,
0.08121107518672943,
0.052204642444849014,
0.291464626789093,
0.042795874178409576,
0.04937870800495148,
0.16770797967910767,
0.19294919073581696,
0.2421642690896988,
0.10174036771059036,
0.11773448437452316,
-0.12074156850576401,
-0.13462918996810913,
-0.6068029403686523,
0.07876206934452057,
0.12363629788160324,
-0.17689912021160126,
0.01566334068775177,
0.38768258690834045,
-0.0845828652381897,
-0.15934062004089355,
-0.21256552636623383,
0.0012245512334629893,
0.10747501999139786,
-0.34332937002182007,
-0.17343826591968536,
0.2475554645061493,
-0.2243613749742508,
0.175642728805542,
0.30634474754333496,
0.2900080978870392,
0.27852773666381836,
-0.1541488617658615,
0.05477222055196762,
-0.0925680473446846,
0.06873268634080887,
-0.15596933662891388,
0.3873494863510132,
-0.15090110898017883,
0.09971413761377335,
0.07887133210897446,
-0.20600004494190216,
-0.252110093832016,
-0.06267363578081131,
0.07753846049308777,
-0.11725537478923798,
-0.1282086968421936,
-0.19386370480060577,
0.204103022813797,
-0.03197742998600006,
-0.08336029946804047,
-0.1031726524233818,
0.32119274139404297,
-0.09813673794269562,
-0.09530603140592575,
0.20594298839569092,
0.3345358073711395,
-0.20742006599903107,
-0.10623878985643387,
0.08649235218763351,
0.28651073575019836,
-0.44986027479171753,
0.01447210367769003,
-0.38661861419677734,
-0.04680141434073448,
-0.12203864008188248,
0.0061689941212534904,
-0.11861564218997955,
-0.05036434158682823,
0.031968533992767334,
0.1410679966211319,
-0.012728417292237282,
0.0017195665277540684,
-0.1683575063943863,
0.0833124965429306,
-0.14429637789726257,
-0.12403541803359985,
0.1788920760154724,
0.2933667004108429,
0.0760679543018341,
-0.280558705329895,
0.31747978925704956,
0.4285728633403778,
0.11839974671602249,
0.0503120943903923,
0.07428601384162903,
-0.36072227358818054,
0.17384450137615204,
0.061716049909591675,
0.036161478608846664,
-0.009728200733661652,
0.3578917682170868,
0.10351350903511047,
0.29521363973617554,
-0.14968229830265045,
0.1375688910484314,
0.20578040182590485,
0.24268586933612823,
0.04230043664574623,
0.1353033185005188,
-0.2913275361061096,
-0.26424089074134827,
-0.2150059938430786,
-0.2385266274213791,
0.21293359994888306,
-0.21379834413528442,
-0.08330808579921722,
-0.30545973777770996,
0.027656927704811096,
-0.06532172113656998,
-0.051030468195676804,
0.2735331654548645,
0.03483441844582558,
0.13600371778011322,
0.05369953066110611,
-0.17729128897190094,
0.14906565845012665,
-0.1885264664888382,
-0.08918365091085434,
-0.054394666105508804,
0.19425258040428162,
0.09007430821657181,
-0.38408681750297546,
0.3291322588920593,
0.3172690272331238,
-0.10764091461896896,
-0.22625495493412018,
0.24139404296875,
0.08592270314693451,
0.11691881716251373,
0.25734513998031616,
0.04200730100274086,
0.05396342650055885,
0.2853452265262604,
-0.5377787351608276,
0.17965912818908691,
0.5623016953468323,
0.18910951912403107,
-0.1683434098958969,
-0.03701626509428024,
0.21588268876075745,
-0.07187630236148834,
-0.21888388693332672,
-0.1925082951784134,
-0.30194270610809326,
0.05297931283712387,
0.2339307814836502,
0.11953705549240112,
-0.7513142228126526,
0.15627528727054596,
0.19966626167297363,
-0.008341399021446705,
0.09369335323572159,
0.16835489869117737,
-0.05122731626033783,
0.10184790194034576,
0.16322526335716248,
0.22063685953617096,
0.14456962049007416,
-0.20182116329669952,
-0.23955117166042328,
0.2973892390727997,
-0.1777118742465973,
0.3515099287033081,
0.22008615732192993,
-0.0892547145485878,
0.0800517350435257,
0.0004446255916263908,
-0.10896901041269302,
0.08665845543146133,
-0.13181592524051666,
-0.051719535142183304,
0.16717037558555603,
0.31318289041519165,
-0.25980788469314575,
-0.49945205450057983,
-0.20100019872188568,
-0.3641395568847656,
0.3306962549686432,
-0.18010370433330536,
-0.23798558115959167,
-0.18362589180469513,
-0.02904375270009041,
0.45765209197998047,
-0.0766233578324318,
-0.07842641323804855,
-0.053635794669389725,
0.25184759497642517,
-0.07342611253261566,
0.0581187978386879,
0.11929045617580414,
-0.05258043482899666,
0.3504640758037567,
-0.053570136427879333,
0.3835802674293518,
-0.19350436329841614,
-0.19152534008026123,
-0.0046171522699296474,
0.23303262889385223,
-0.19197148084640503,
0.09486968070268631,
0.3029474914073944,
-0.4042664170265198,
0.17671553790569305,
-0.2456904798746109,
-0.2979303300380707,
0.12743359804153442,
-0.23922112584114075,
0.3819825351238251,
0.45687198638916016,
0.41617918014526367,
-0.1196083202958107,
-0.38427597284317017,
0.11113735288381577,
-0.22398991882801056,
-0.11499345302581787,
-0.5639203190803528,
-0.3063388764858246,
-0.030161192640662193,
0.0348457507789135,
0.025881245732307434,
-0.1658991277217865,
-0.2302810251712799,
0.28651490807533264,
0.40185195207595825,
0.04192725196480751,
0.07664022594690323,
0.24257704615592957,
0.045847997069358826,
-0.11798008531332016,
0.20103465020656586,
-0.3334501385688782,
-0.46262413263320923,
0.6128377914428711,
-0.36948150396347046,
-0.11159871518611908,
0.20589645206928253,
-0.15142428874969482,
-0.3230353891849518,
0.13523291051387787,
-0.4403812885284424,
0.18637403845787048,
0.05216720327734947,
0.05665358155965805,
0.15382608771324158,
-0.08791997283697128,
-0.2541755139827728,
0.005287087056785822,
-0.20784108340740204,
-0.1395958811044693,
-0.20296505093574524,
-0.1359768658876419,
0.17106448113918304,
0.1984044909477234,
0.11786006391048431,
-0.09031905978918076,
0.2954050600528717,
0.4288756549358368,
-0.0026144571602344513,
-0.27012473344802856,
0.4811226427555084,
-0.11133184283971786,
0.28512704372406006,
0.14013805985450745,
-0.36221784353256226,
0.07260038703680038,
0.3011367619037628,
0.22525088489055634,
0.2241521030664444,
0.13137590885162354,
-0.06666650623083115,
-0.11739347875118256,
0.24153494834899902,
-0.21766851842403412,
-0.0546957328915596,
-0.02366866171360016,
0.35639888048171997,
0.1292567104101181,
-0.0473632737994194,
-0.08533314615488052,
-0.4823925495147705,
-0.48291537165641785,
0.3061082363128662,
-0.11024900525808334,
-0.1969221979379654,
-0.010435487143695354,
-0.31651532649993896,
0.04519837722182274,
-0.16222475469112396,
0.2586638033390045,
0.2035919576883316,
-0.01787196286022663,
-0.3893914818763733,
0.051491670310497284,
-0.11720186471939087,
0.06399870663881302,
0.19208237528800964,
-0.3106521666049957,
-0.19798901677131653,
-0.08510445803403854,
0.37157896161079407,
0.06087105721235275,
0.29614871740341187,
-0.002819925080984831,
-0.01498548872768879,
0.05362151190638542,
0.21729837357997894,
-0.4864179790019989,
0.18768352270126343,
0.5971193313598633,
0.2009200155735016,
-0.12102653086185455,
-0.2458762377500534,
0.08312831819057465,
-0.2911374568939209,
-0.45771121978759766,
-0.16205324232578278,
0.21740061044692993,
0.005888473242521286,
0.48099276423454285,
-0.38468223810195923,
0.15862049162387848,
0.1291152834892273,
0.6014951467514038,
0.08153223991394043,
0.05411585792899132,
0.5169482231140137,
-0.15856200456619263,
-0.21021050214767456,
-0.04405666142702103,
0.06140287593007088,
0.0008610177901573479,
-0.02264590561389923,
-0.11156170815229416,
-0.1966726928949356,
-0.23282809555530548,
0.243898406624794,
0.2226095050573349,
0.2572501599788666,
-0.005000672303140163,
0.30012989044189453,
-0.1374121755361557,
0.1617656797170639,
0.4047990143299103,
0.27613264322280884,
0.004121541045606136,
0.06789984554052353,
-0.37806519865989685,
0.16505025327205658,
0.23704585433006287,
0.01884954236447811,
0.00424139853566885,
0.17400701344013214,
-0.2290312796831131,
0.256531685590744,
0.41100457310676575,
0.9906174540519714,
0.1366804540157318,
0.2503790855407715,
-0.08874579519033432,
0.14305134117603302,
0.2975849509239197,
-0.24086840450763702,
-0.14161817729473114,
0.07118157297372818,
0.17907492816448212,
-0.14549601078033447,
-0.0239038597792387,
0.2543872892856598,
0.47809287905693054,
0.218144029378891,
-0.06718388199806213,
-0.14611928164958954,
0.05671680346131325,
-0.1358116716146469,
0.09659800678491592,
-0.014433116652071476,
-0.3411843478679657,
-0.1744852513074875,
0.21190783381462097,
-0.011932851746678352,
-0.1777956783771515,
-0.002011164790019393,
0.009636650793254375,
0.02082488127052784,
-0.04686197265982628,
-0.2629871964454651,
-0.4098377227783203,
-0.3222515881061554,
0.13400785624980927,
0.08733485639095306,
-0.2886126935482025,
-0.06632398068904877,
0.21388986706733704,
0.36943304538726807,
0.11374808102846146,
0.04413184896111488,
0.13669514656066895,
0.063358835875988,
-0.08981300890445709,
-0.31473568081855774,
-0.1829877644777298,
-0.020204050466418266,
-0.20541487634181976,
-0.20143762230873108,
0.36524471640586853,
0.15358933806419373,
-0.09575802087783813,
-0.4121443033218384,
-0.05858095735311508,
-0.19419369101524353,
-0.1444367617368698,
-0.26351332664489746,
0.5684200525283813,
0.048809874802827835,
-0.18918566405773163,
0.19143031537532806,
0.2279079556465149,
-0.03047035075724125,
0.05181248486042023,
0.19685444235801697,
-0.2463674694299698,
-0.2487667053937912,
0.17556355893611908,
-0.1753920167684555,
-0.25016769766807556,
0.3412967026233673,
0.2841752767562866,
-0.3161287009716034,
-0.19832856953144073,
-0.06537829339504242,
0.24589155614376068,
-0.09786874055862427,
0.05652773380279541,
0.12628549337387085,
-0.2246447503566742,
-0.21276907622814178,
0.2330806702375412,
0.07986856997013092,
0.3917469084262848,
0.2099415361881256,
-0.023922735825181007,
-0.28562822937965393,
0.1102599948644638,
0.2913167476654053,
0.34193792939186096,
-0.0848366841673851,
-0.031037410721182823,
-0.1354762613773346,
0.09696584939956665,
-0.41948968172073364,
-0.0979485735297203,
-0.05410948768258095,
-0.03963512182235718,
0.06308110058307648,
-0.1495036780834198,
-0.420810341835022,
0.08089146018028259,
0.27132919430732727,
0.26458659768104553,
-0.2495659440755844,
-0.2387104332447052,
-0.08505543321371078,
0.08490868657827377,
0.08662673085927963,
-0.17719179391860962,
-0.05132412910461426,
0.06975094228982925,
-0.0024450020864605904,
-0.032590098679065704,
0.20729511976242065,
0.19099894165992737,
-0.10434335470199585,
0.03943955525755882,
-0.29965969920158386,
-0.25390008091926575,
0.02231641486287117,
-0.02305767312645912,
0.1981888860464096,
0.3758575916290283,
0.18911945819854736,
0.2577963173389435,
0.319254070520401,
-0.017859097570180893,
0.26990485191345215,
0.2207655906677246,
0.3215678334236145,
0.05280420184135437,
0.09044685959815979,
-0.11758317798376083,
-0.2580193877220154,
0.4679039418697357,
-0.09399084001779556,
0.29709044098854065,
-0.1117534264922142,
0.10045517235994339,
0.0065170228481292725,
0.1865292489528656,
-0.216188445687294,
0.05095115303993225,
0.06501602381467819,
-0.24295257031917572,
0.22981789708137512,
0.14593568444252014,
0.1388654261827469,
-0.0036540066357702017,
-0.02042299695312977,
0.09944978356361389,
0.15510079264640808,
-0.36658337712287903,
-0.06610319763422012,
-0.1512080878019333,
-0.4478939175605774,
-0.08233559876680374,
0.1194847896695137,
0.5715352296829224,
0.1504323035478592,
0.2006286084651947,
-0.0919027104973793,
0.3485482931137085,
0.28157737851142883,
0.04242409020662308,
0.12241129577159882,
-0.053043585270643234,
0.5212847590446472,
0.4291936159133911,
-0.184749573469162,
0.2266148179769516,
0.466046005487442,
0.02502870187163353,
-0.04501766711473465,
0.0990295261144638,
-0.23535892367362976,
0.15893934667110443,
-0.058680567890405655,
-0.05885240063071251,
-0.30017751455307007,
-0.09578883647918701,
-0.40794315934181213,
-0.21423852443695068,
0.07617887854576111,
-0.47321686148643494,
0.03901730105280876,
-0.0719272568821907,
0.039207302033901215,
-0.28102824091911316,
0.12329867482185364,
-0.039981499314308167,
-0.023333242163062096,
-0.1488012671470642,
0.008008204400539398,
0.3250530958175659,
0.19212518632411957,
0.3297351598739624,
-0.12854894995689392,
0.06549548357725143,
-0.005354639608412981,
0.04597027227282524,
0.2332656979560852,
-0.48524585366249084,
-0.25486984848976135,
-0.0865115076303482,
0.41583770513534546,
0.08969312906265259,
0.3624458611011505,
0.1630706638097763,
0.2504909336566925,
-0.2982611656188965,
-0.36544767022132874,
0.10324297845363617,
0.18333935737609863,
-0.2239115834236145,
-0.2411879003047943,
-0.20224684476852417,
-0.3624774217605591,
0.03276563435792923,
-0.11705727875232697,
-0.1731519252061844,
-0.23803578317165375,
0.43692758679389954,
-0.522062361240387,
0.12975525856018066,
-0.4041062295436859,
0.13364197313785553,
-0.2475602626800537,
0.013964281417429447,
0.21469038724899292,
0.2080741822719574,
0.008452048525214195,
0.017629073932766914,
-0.3906276524066925,
-0.11438635736703873,
0.025503989309072495,
0.0038476872723549604,
-0.32217130064964294,
0.09430896490812302,
0.2861633002758026,
0.6196169853210449,
0.30517032742500305,
0.03911671042442322,
-0.008230171166360378,
0.12352876365184784,
-0.18855968117713928,
0.3240748345851898,
0.2075364589691162,
0.46207842230796814,
0.16803839802742004,
0.03593515604734421,
-0.00838170200586319,
0.08697785437107086,
0.23134852945804596,
-0.49732300639152527,
-0.17520062625408173,
-0.19916172325611115,
-0.058014512062072754,
0.19376620650291443,
-0.14994721114635468,
0.16285833716392517,
-0.25444895029067993,
-0.11091478168964386,
-0.2196826934814453,
-0.05738924816250801,
0.3731538653373718,
-0.0013596267672255635,
0.3772571086883545,
0.3495454788208008,
-0.062111034989356995,
-0.13455407321453094,
0.11298929899930954,
0.39226391911506653,
0.004694496281445026,
-0.21451929211616516,
-0.16869091987609863,
0.2556126117706299,
-0.25178253650665283,
0.08880461752414703,
-0.042135611176490784,
-0.08630071580410004,
0.15234287083148956,
-0.11723198741674423,
0.35490143299102783,
-0.34233012795448303,
0.16041165590286255,
-0.23597055673599243,
-0.3305197060108185,
-0.3919900059700012,
-0.1081964522600174,
0.18070633709430695,
0.07682979106903076,
-0.03039608523249626,
0.1780180186033249,
0.23373015224933624,
-0.05928298458456993,
0.07125730067491531,
0.2432093620300293,
-0.2596743404865265,
-0.2002078890800476,
-0.05467698350548744,
0.19917263090610504,
0.02987421117722988,
-0.06156771257519722,
0.01226566731929779,
-0.18135374784469604
] |
https://github.com/huggingface/datasets/issues/1808
|
writing Datasets in a human readable format
|
AFAIK, there is currently no built-in method on the `Dataset` object to do this.
However, a workaround is to directly use the Arrow table backing the dataset, **but it implies loading the whole dataset in memory** (correct me if I'm mistaken @lhoestq).
You can convert the Arrow table to a pandas dataframe to save the data as csv as follows:
```python
arrow_table = dataset.data
dataframe = arrow_table.to_pandas()
dataframe.to_csv("/path/to/file.csv")
```
Similarly, you can convert the dataset to a Python dict and save it as JSON:
```python
import json
arrow_table = dataset.data
py_dict = arrow_table.to_pydict()
with open("/path/to/file.json", "w+") as f:
json.dump(py_dict, f)
```
|
Hi
I see there is a save_to_disk function to save data, but this is not human readable format, is there a way I could save a Dataset object in a human readable format to a file like json? thanks @lhoestq
| 101 |
writing Datasets in a human readable format
|
[
-0.261732280254364,
0.18363359570503235,
-0.32420581579208374,
0.20724612474441528,
0.2523510158061981,
0.06267444044351578,
0.05179848149418831,
0.18370944261550903,
0.03274518996477127,
0.10916809737682343,
-0.28278255462646484,
-0.059971507638692856,
-0.09453235566616058,
0.3829789161682129,
-0.04929063841700554,
-0.2124444842338562,
-0.26800793409347534,
0.061884477734565735,
0.03408201038837433,
-0.019315384328365326,
0.0830041915178299,
-0.06292951107025146,
0.07798238843679428,
-0.0029158589895814657,
-0.08124453574419022,
-0.5638707876205444,
-0.14556042850017548,
-0.07673919945955276,
-0.21919088065624237,
-0.10121171921491623,
-0.345043420791626,
0.412168949842453,
-0.003132645506411791,
0.257997989654541,
-0.00009878421406028792,
-0.17718477547168732,
-0.14676573872566223,
-0.034233395010232925,
-0.2435470074415207,
0.1796109974384308,
-0.14597156643867493,
-0.3836875855922699,
-0.0270257368683815,
-0.5162492990493774,
-0.05941184610128403,
-0.41915202140808105,
0.18616120517253876,
-0.33209946751594543,
0.3311236500740051,
-0.11169754713773727,
0.3821216821670532,
-0.11853332817554474,
0.09483261406421661,
0.10302998870611191,
0.05202961340546608,
0.4005834758281708,
-0.2245267927646637,
0.07523830980062485,
0.2048277109861374,
0.1743904948234558,
-0.1247439980506897,
0.10289961844682693,
-0.20415984094142914,
-0.1678021252155304,
0.06794296205043793,
-0.18806539475917816,
-0.05194255709648132,
0.16318470239639282,
-0.07176987826824188,
0.36480939388275146,
0.4537177085876465,
-0.5672851800918579,
-0.3822368383407593,
-0.18068450689315796,
-0.06798993796110153,
0.033957868814468384,
-0.30941298604011536,
0.435410737991333,
0.027622193098068237,
0.2215539515018463,
-0.14502808451652527,
-0.18830089271068573,
-0.30023741722106934,
-0.005358870606869459,
0.23850597441196442,
0.09967302531003952,
-0.15451529622077942,
-0.16512060165405273,
-0.0036126412451267242,
0.03677767142653465,
0.3577731251716614,
-0.013697518035769463,
0.12186677008867264,
-0.008996697142720222,
0.02933971770107746,
-0.13085387647151947,
-0.29651060700416565,
-0.178177148103714,
0.13581861555576324,
-0.00812038779258728,
0.42283788323402405,
0.1269315928220749,
0.03179419785737991,
-0.026989717036485672,
0.3313969671726227,
-0.24334105849266052,
0.14205610752105713,
0.0795842856168747,
0.05443871021270752,
-0.07658509165048599,
-0.043375685811042786,
-0.08599277585744858,
-0.1600126177072525,
0.0012921866727992892,
-0.028339458629488945,
-0.03632292151451111,
-0.07539655268192291,
-0.2079189121723175,
-0.24884620308876038,
0.10473594069480896,
-0.21966682374477386,
-0.14428406953811646,
-0.32173219323158264,
0.16473735868930817,
0.03221339359879494,
-0.1323564648628235,
0.0597124882042408,
-0.04253929853439331,
-0.18643736839294434,
-0.35772815346717834,
-0.149713397026062,
0.20832446217536926,
-0.056134238839149475,
0.026697728782892227,
-0.20712250471115112,
-0.05483124032616615,
0.09054247289896011,
-0.07189853489398956,
0.06385031342506409,
-0.40809959173202515,
0.23546946048736572,
-0.24865902960300446,
0.29103976488113403,
0.026148082688450813,
0.11837414652109146,
0.021127840504050255,
-0.13027212023735046,
-0.3537525534629822,
-0.14381198585033417,
0.1385471075773239,
0.030329672619700432,
-0.004141916986554861,
-0.13874311745166779,
0.27049458026885986,
-0.1414431780576706,
-0.237781822681427,
0.022148169577121735,
0.19826708734035492,
0.15220175683498383,
-0.05175572633743286,
0.021850744262337685,
0.095402292907238,
-0.06603360921144485,
-0.2638360261917114,
0.06170373409986496,
0.19766086339950562,
-0.46985095739364624,
0.14934654533863068,
0.17883536219596863,
-0.07868725806474686,
0.16177216172218323,
0.5493515133857727,
0.01169218122959137,
0.3662300705909729,
0.2709888815879822,
0.14776992797851562,
0.3386702239513397,
0.039924506098032,
-0.009524712339043617,
0.4001854658126831,
0.10822959989309311,
0.017105069011449814,
0.09601307660341263,
0.30850887298583984,
0.3236076831817627,
-0.16298437118530273,
-0.051888491958379745,
-0.10372794419527054,
0.03626948595046997,
-0.06863659620285034,
-0.16836614906787872,
-0.4487375020980835,
0.019482599571347237,
-0.014983068220317364,
-0.053467318415641785,
-0.1878342181444168,
0.3805641829967499,
-0.031180161982774734,
0.35117143392562866,
-0.35685697197914124,
-0.009502507746219635,
0.5570624470710754,
0.11617929488420486,
0.33143314719200134,
-0.22441400587558746,
-0.14872856438159943,
-0.011684765107929707,
-0.32950425148010254,
0.3429566025733948,
0.14476947486400604,
0.0444938950240612,
-0.32265210151672363,
-0.12190853804349899,
-0.1561809778213501,
0.004817675333470106,
0.2415747493505478,
0.29465654492378235,
-0.046212080866098404,
-0.32924047112464905,
0.09908678382635117,
0.061781689524650574,
0.18012204766273499,
-0.38604822754859924,
-0.043199993669986725,
-0.313425749540329,
0.06363248080015182,
0.010093937627971172,
-0.26367276906967163,
0.09846808761358261,
0.38147446513175964,
0.08299446105957031,
0.1215350553393364,
0.1523861438035965,
0.20325666666030884,
-0.02434035763144493,
-0.02363141067326069,
0.2282278686761856,
0.6304466128349304,
-0.004076449200510979,
-0.2939784526824951,
0.151171013712883,
-0.1860140860080719,
0.10886117815971375,
0.03567357733845711,
-0.5029805898666382,
0.332538366317749,
-0.05494851991534233,
-0.15383702516555786,
-0.12747538089752197,
-0.11730729043483734,
-0.10741617530584335,
0.15067410469055176,
-0.0041115544736385345,
-0.06473275274038315,
0.36734768748283386,
0.09540458023548126,
-0.09123904258012772,
-0.09757115691900253,
-0.3936678171157837,
0.17622162401676178,
0.4065079391002655,
-0.11627548187971115,
0.4033178687095642,
-0.11499495804309845,
0.10055433213710785,
0.02050730399787426,
0.19408144056797028,
0.026892466470599174,
-0.24095186591148376,
0.3514571189880371,
0.16266773641109467,
-0.01997208409011364,
-0.33041292428970337,
-0.08113511651754379,
-0.048688072711229324,
-0.026920458301901817,
0.007646664977073669,
-0.04768373817205429,
-0.26637327671051025,
-0.0024773410987108946,
-0.26372030377388,
-0.0831819400191307,
-0.17005516588687897,
-0.16206036508083344,
-0.1592360883951187,
0.08513642847537994,
-0.022112935781478882,
-0.16836443543434143,
-0.19353900849819183,
0.040917087346315384,
0.019270140677690506,
-0.4311668872833252,
-0.19134016335010529,
-0.09701075404882431,
-0.08861556649208069,
-0.010989782400429249,
0.004715908318758011,
0.13604967296123505,
-0.008933741599321365,
0.30961307883262634,
0.08659999817609787,
-0.2923937141895294,
0.1061219796538353,
0.17849834263324738,
0.12109341472387314,
0.24638912081718445,
0.5515519380569458,
-0.4206486940383911,
0.27802687883377075,
-0.23047621548175812,
-0.22045627236366272,
0.0025707499589771032,
-0.09714022278785706,
0.24616986513137817,
-0.049653977155685425,
0.2978236675262451,
-0.2115909308195114,
-0.25504884123802185,
0.02390136756002903,
0.09520792216062546,
0.05866672843694687,
-0.033995166420936584,
0.08543172478675842,
-0.31809890270233154,
-0.08209964632987976,
-0.14869506657123566,
-0.13854174315929413,
-0.29631784558296204,
0.18406900763511658,
-0.041505612432956696,
0.27222520112991333,
-0.000812467304058373,
0.17837879061698914,
-0.12520654499530792,
-0.1617444008588791,
0.29572999477386475,
-0.07496083527803421,
-0.25388893485069275,
0.10893425345420837,
-0.17248860001564026,
-0.3332706391811371,
-0.13844892382621765,
0.154685840010643,
-0.12682105600833893,
0.21982289850711823,
0.03112098202109337,
0.09076862037181854,
-0.07286035269498825,
-0.30641475319862366,
-0.036084868013858795,
0.36288702487945557,
-0.1592201292514801,
0.22641973197460175,
-0.11868727207183838,
-0.11562810838222504,
0.10071524977684021,
0.05046162009239197,
0.010401744395494461,
-0.15049614012241364,
-0.28338393568992615,
0.01574544794857502,
0.16503356397151947,
0.04758710414171219,
0.31558284163475037,
-0.032431475818157196,
0.06448084861040115,
-0.025010250508785248,
0.42152440547943115,
0.13843512535095215,
0.04279924929141998,
0.10057531297206879,
0.05704762041568756,
-0.03964279964566231,
0.17235837876796722,
0.002156573813408613,
-0.06409548968076706,
0.28221961855888367,
0.10576938837766647,
-0.49560365080833435,
-0.29997292160987854,
0.42460691928863525,
-0.027222484350204468,
0.297981858253479,
0.02143157832324505,
0.2650794982910156,
-0.18213899433612823,
-0.2658710181713104,
0.11153380572795868,
0.0571143738925457,
0.09098014235496521,
0.19092367589473724,
-0.2511458098888397,
0.1393154263496399,
-0.341861754655838,
0.14787039160728455,
0.1205783262848854,
0.25167152285575867,
-0.15877434611320496,
0.0566803514957428,
0.17258983850479126,
0.06377594918012619,
0.21008183062076569,
-0.40120235085487366,
-0.09480767697095871,
0.06314734369516373,
0.1574227213859558,
-0.15948103368282318,
0.3196309804916382,
-0.3012235164642334,
0.057831063866615295,
-0.07180637121200562,
0.16440729796886444,
-0.15533198416233063,
0.007425983902066946,
0.1116812601685524,
0.30791035294532776,
-0.20610910654067993,
-0.24303819239139557,
0.11091719567775726,
-0.39979517459869385,
-0.27667561173439026,
-0.18975377082824707,
0.19458936154842377,
-0.1086166724562645,
-0.026742419227957726,
-0.08654715120792389,
-0.19809798896312714,
0.2900790274143219,
0.3773045241832733,
0.1622621864080429,
0.13170567154884338,
0.04674513265490532,
-0.2747630178928375,
0.4254304766654968,
0.3241220712661743,
0.09750110656023026,
0.4583355784416199,
-0.24758422374725342,
-0.01825370453298092,
0.11534155160188675,
-0.4546948969364166,
0.4137524664402008,
0.3087502717971802,
0.37490320205688477,
-0.05835612118244171,
0.2647036612033844,
-0.10202987492084503,
-0.4852459728717804,
0.11883337050676346,
0.07994632422924042,
0.25680258870124817,
-0.4593992233276367,
-0.7236325740814209,
0.14843015372753143,
0.10070470720529556,
-0.09385693818330765,
0.07233908772468567,
0.2692241966724396,
-0.03205583989620209,
0.2862973213195801,
0.415793240070343,
1.066192388534546,
-0.6191347241401672,
0.1234661340713501,
-0.09742450714111328,
-0.3187910318374634,
0.17371107637882233,
-0.37592434883117676,
-0.13562436401844025,
-0.358423113822937,
-0.1898907572031021,
-0.17850925028324127,
-0.048705704510211945,
0.14027751982212067,
0.32179343700408936,
-0.06362864375114441,
0.14206479489803314,
0.12747277319431305,
-0.13010595738887787,
0.1325257420539856,
0.13372811675071716,
0.06249552220106125,
0.002108300104737282,
-0.141786128282547,
0.2500603199005127,
0.047861166298389435,
-0.4075547754764557,
-0.011524247005581856,
-0.28118419647216797,
0.07391181588172913,
0.25204163789749146,
-0.16301289200782776,
-0.13808110356330872,
-0.1381123960018158,
0.0717659443616867,
-0.18789364397525787,
-0.3123125731945038,
0.24564312398433685,
-0.07372362166643143,
0.26673099398612976,
0.31545376777648926,
0.19588643312454224,
-0.1689780354499817,
-0.1323709785938263,
-0.05698654428124428,
0.07325532287359238,
0.0011423277901485562,
0.09748950600624084,
0.22935666143894196,
-0.14098496735095978,
0.19594378769397736,
0.05900055170059204,
-0.05965710058808327,
0.03629928454756737,
0.00357652036473155,
-0.08427783101797104,
-0.47004586458206177,
0.06851551681756973,
-0.048302363604307175,
-0.13769933581352234,
0.03610670939087868,
0.2289908528327942,
0.37549105286598206,
0.4731937050819397,
0.1551630198955536,
0.26824894547462463,
-0.23175300657749176,
-0.1422174572944641,
-0.06586751341819763,
0.12648235261440277,
0.06516687572002411,
-0.1230069249868393,
-0.02002517506480217,
-0.3700452148914337,
-0.38449302315711975,
0.25411802530288696,
0.07376720011234283,
-0.20363683998584747,
-0.07770027965307236,
-0.4190449118614197,
-0.20561830699443817,
-0.04340505227446556,
0.32950499653816223,
0.1369880884885788,
-0.22415007650852203,
-0.19335880875587463,
-0.3295993208885193,
-0.08098412305116653,
0.322430819272995,
0.23181162774562836,
0.20067062973976135,
0.1858028769493103,
-0.17569641768932343,
-0.36484265327453613,
0.18503449857234955,
-0.4528752565383911,
-0.1702040582895279,
-0.19671747088432312,
0.10511816293001175,
-0.013565036468207836,
0.09165281802415848,
-0.06648540496826172,
-0.1696927398443222,
0.21148335933685303,
0.12189006805419922,
-0.11438553780317307,
-0.32711687684059143,
-0.2976842224597931,
0.0832701325416565,
-0.06142248585820198,
-0.045895468443632126,
-0.008142629638314247,
-0.14326892793178558,
0.007973727770149708,
-0.3175971210002899,
-0.06863909214735031,
0.23791098594665527,
0.15909306704998016,
0.3503628075122833,
-0.15317468345165253,
0.23477500677108765,
-0.2312707006931305,
0.03127192333340645,
0.04105847328901291,
0.287788987159729,
0.01774781383574009,
0.022369176149368286,
0.20751647651195526,
0.05996711552143097,
0.3809281289577484,
0.145941361784935,
0.4885992109775543,
-0.09809858351945877,
0.22887666523456573,
-0.04124830290675163,
0.10743845254182816,
0.2145124226808548,
0.2850929796695709,
0.3396436870098114,
-0.20568595826625824,
-0.1638406664133072,
0.012726998887956142,
0.36523520946502686,
0.03318386897444725,
-0.1502523571252823,
0.18657778203487396,
0.005654272623360157,
0.3139599859714508,
0.43375763297080994,
0.3502042591571808,
0.035331811755895615,
0.06601018458604813,
-0.3308224380016327,
0.13399097323417664,
-0.11204425990581512,
-0.15508204698562622,
0.2725105583667755,
0.1764882355928421,
-0.1907450556755066,
0.005414851475507021,
0.21629755198955536,
0.15857850015163422,
0.4082069993019104,
0.4079943597316742,
0.13150270283222198,
0.22696173191070557,
0.1609259843826294,
-0.13566824793815613,
-0.22647735476493835,
0.45126593112945557,
0.0298092532902956,
0.2919381260871887,
0.2311820536851883,
0.2525508403778076,
-0.057351380586624146,
-0.0424622967839241,
-0.0015112112741917372,
0.2266852706670761,
-0.058110229671001434,
-0.20495106279850006,
-0.0698363408446312,
-0.16099955141544342,
-0.23107559978961945,
-0.13041028380393982,
-0.3410778343677521,
-0.2106247842311859,
-0.3011907935142517,
0.11458871513605118,
-0.11960497498512268,
0.39339330792427063,
-0.16229209303855896,
0.1693447083234787,
0.14154666662216187,
0.22321081161499023,
-0.3974234461784363,
0.14133304357528687,
0.15801475942134857,
0.08708660304546356,
0.04362171143293381,
0.23534797132015228,
0.38648825883865356,
-0.2525750696659088,
-0.1129787489771843,
0.15256790816783905,
-0.28245431184768677,
-0.24746498465538025,
-0.10388067364692688,
0.03077262081205845,
0.23102658987045288,
0.11102813482284546,
0.45589742064476013,
0.2647342085838318,
-0.1251767873764038,
0.11468788236379623,
0.1902194619178772,
-0.1801893711090088,
0.05035878345370293,
0.012077676132321358,
-0.025886988267302513,
-0.4418148696422577,
-0.07096829265356064,
-0.18398810923099518,
-0.2090901881456375,
-0.12121034413576126,
0.5584686994552612,
-0.2443990856409073,
0.24993018805980682,
0.04844282194972038,
0.16798444092273712,
0.29128897190093994,
0.33849984407424927,
0.6622490286827087,
0.25828394293785095,
0.07032009214162827,
-0.16771389544010162,
-0.26749926805496216,
0.09659446775913239,
-0.24570488929748535,
-0.26219362020492554,
-0.019306303933262825,
0.15591122210025787,
0.5219370722770691,
0.45895305275917053,
0.01954706758260727,
0.11956793069839478,
-0.07745485007762909,
0.16029775142669678,
-0.39776718616485596,
-0.11779820919036865,
0.4464782476425171,
0.018044067546725273,
-0.032816119492053986,
-0.18440955877304077,
0.13967479765415192,
0.057864148169755936,
0.3433353900909424,
-0.3101515471935272,
0.16700583696365356,
-0.215682715177536,
-0.0733509436249733,
0.10856752097606659,
-0.09852256625890732,
0.301047146320343,
-0.2370707392692566,
-0.3477634787559509,
-0.00093551364261657,
0.2744969427585602,
0.13492999970912933,
0.514884352684021,
0.2144509255886078,
0.287672758102417,
-0.2817671298980713,
0.04615779221057892,
0.12268483638763428,
-0.011821959167718887,
-0.18077833950519562,
0.2865079939365387,
-0.1437096744775772,
0.1530126929283142,
-0.056162700057029724,
0.0003996155282948166,
0.1948252171278,
0.2705610990524292,
0.056309036910533905,
0.13597743213176727,
0.10655790567398071,
0.08687788993120193,
-0.006010365206748247,
-0.04454013332724571,
-0.3001208007335663,
0.195972740650177,
-0.29355984926223755,
0.02813362143933773,
0.18972480297088623,
-0.4498215317726135,
0.078646220266819,
0.3068143129348755,
-0.2178109586238861,
-0.001009188243187964,
0.17249466478824615,
-0.06704150885343552,
0.04512852057814598,
0.06725265085697174,
0.4555843770503998,
-0.026210201904177666,
-0.22623655200004578,
-0.34643834829330444,
-0.4233019948005676
] |
https://github.com/huggingface/datasets/issues/1808
|
writing Datasets in a human readable format
|
Indeed this works as long as you have enough memory.
It would be amazing to have export options like csv, json etc. !
It should be doable to implement something that iterates through the dataset batch by batch to write to csv for example.
There is already an `export` method but currently the only export type that is supported is `tfrecords`.
|
Hi
I see there is a save_to_disk function to save data, but this is not human readable format, is there a way I could save a Dataset object in a human readable format to a file like json? thanks @lhoestq
| 61 |
writing Datasets in a human readable format
|
[
-0.261732280254364,
0.18363359570503235,
-0.32420581579208374,
0.20724612474441528,
0.2523510158061981,
0.06267444044351578,
0.05179848149418831,
0.18370944261550903,
0.03274518996477127,
0.10916809737682343,
-0.28278255462646484,
-0.059971507638692856,
-0.09453235566616058,
0.3829789161682129,
-0.04929063841700554,
-0.2124444842338562,
-0.26800793409347534,
0.061884477734565735,
0.03408201038837433,
-0.019315384328365326,
0.0830041915178299,
-0.06292951107025146,
0.07798238843679428,
-0.0029158589895814657,
-0.08124453574419022,
-0.5638707876205444,
-0.14556042850017548,
-0.07673919945955276,
-0.21919088065624237,
-0.10121171921491623,
-0.345043420791626,
0.412168949842453,
-0.003132645506411791,
0.257997989654541,
-0.00009878421406028792,
-0.17718477547168732,
-0.14676573872566223,
-0.034233395010232925,
-0.2435470074415207,
0.1796109974384308,
-0.14597156643867493,
-0.3836875855922699,
-0.0270257368683815,
-0.5162492990493774,
-0.05941184610128403,
-0.41915202140808105,
0.18616120517253876,
-0.33209946751594543,
0.3311236500740051,
-0.11169754713773727,
0.3821216821670532,
-0.11853332817554474,
0.09483261406421661,
0.10302998870611191,
0.05202961340546608,
0.4005834758281708,
-0.2245267927646637,
0.07523830980062485,
0.2048277109861374,
0.1743904948234558,
-0.1247439980506897,
0.10289961844682693,
-0.20415984094142914,
-0.1678021252155304,
0.06794296205043793,
-0.18806539475917816,
-0.05194255709648132,
0.16318470239639282,
-0.07176987826824188,
0.36480939388275146,
0.4537177085876465,
-0.5672851800918579,
-0.3822368383407593,
-0.18068450689315796,
-0.06798993796110153,
0.033957868814468384,
-0.30941298604011536,
0.435410737991333,
0.027622193098068237,
0.2215539515018463,
-0.14502808451652527,
-0.18830089271068573,
-0.30023741722106934,
-0.005358870606869459,
0.23850597441196442,
0.09967302531003952,
-0.15451529622077942,
-0.16512060165405273,
-0.0036126412451267242,
0.03677767142653465,
0.3577731251716614,
-0.013697518035769463,
0.12186677008867264,
-0.008996697142720222,
0.02933971770107746,
-0.13085387647151947,
-0.29651060700416565,
-0.178177148103714,
0.13581861555576324,
-0.00812038779258728,
0.42283788323402405,
0.1269315928220749,
0.03179419785737991,
-0.026989717036485672,
0.3313969671726227,
-0.24334105849266052,
0.14205610752105713,
0.0795842856168747,
0.05443871021270752,
-0.07658509165048599,
-0.043375685811042786,
-0.08599277585744858,
-0.1600126177072525,
0.0012921866727992892,
-0.028339458629488945,
-0.03632292151451111,
-0.07539655268192291,
-0.2079189121723175,
-0.24884620308876038,
0.10473594069480896,
-0.21966682374477386,
-0.14428406953811646,
-0.32173219323158264,
0.16473735868930817,
0.03221339359879494,
-0.1323564648628235,
0.0597124882042408,
-0.04253929853439331,
-0.18643736839294434,
-0.35772815346717834,
-0.149713397026062,
0.20832446217536926,
-0.056134238839149475,
0.026697728782892227,
-0.20712250471115112,
-0.05483124032616615,
0.09054247289896011,
-0.07189853489398956,
0.06385031342506409,
-0.40809959173202515,
0.23546946048736572,
-0.24865902960300446,
0.29103976488113403,
0.026148082688450813,
0.11837414652109146,
0.021127840504050255,
-0.13027212023735046,
-0.3537525534629822,
-0.14381198585033417,
0.1385471075773239,
0.030329672619700432,
-0.004141916986554861,
-0.13874311745166779,
0.27049458026885986,
-0.1414431780576706,
-0.237781822681427,
0.022148169577121735,
0.19826708734035492,
0.15220175683498383,
-0.05175572633743286,
0.021850744262337685,
0.095402292907238,
-0.06603360921144485,
-0.2638360261917114,
0.06170373409986496,
0.19766086339950562,
-0.46985095739364624,
0.14934654533863068,
0.17883536219596863,
-0.07868725806474686,
0.16177216172218323,
0.5493515133857727,
0.01169218122959137,
0.3662300705909729,
0.2709888815879822,
0.14776992797851562,
0.3386702239513397,
0.039924506098032,
-0.009524712339043617,
0.4001854658126831,
0.10822959989309311,
0.017105069011449814,
0.09601307660341263,
0.30850887298583984,
0.3236076831817627,
-0.16298437118530273,
-0.051888491958379745,
-0.10372794419527054,
0.03626948595046997,
-0.06863659620285034,
-0.16836614906787872,
-0.4487375020980835,
0.019482599571347237,
-0.014983068220317364,
-0.053467318415641785,
-0.1878342181444168,
0.3805641829967499,
-0.031180161982774734,
0.35117143392562866,
-0.35685697197914124,
-0.009502507746219635,
0.5570624470710754,
0.11617929488420486,
0.33143314719200134,
-0.22441400587558746,
-0.14872856438159943,
-0.011684765107929707,
-0.32950425148010254,
0.3429566025733948,
0.14476947486400604,
0.0444938950240612,
-0.32265210151672363,
-0.12190853804349899,
-0.1561809778213501,
0.004817675333470106,
0.2415747493505478,
0.29465654492378235,
-0.046212080866098404,
-0.32924047112464905,
0.09908678382635117,
0.061781689524650574,
0.18012204766273499,
-0.38604822754859924,
-0.043199993669986725,
-0.313425749540329,
0.06363248080015182,
0.010093937627971172,
-0.26367276906967163,
0.09846808761358261,
0.38147446513175964,
0.08299446105957031,
0.1215350553393364,
0.1523861438035965,
0.20325666666030884,
-0.02434035763144493,
-0.02363141067326069,
0.2282278686761856,
0.6304466128349304,
-0.004076449200510979,
-0.2939784526824951,
0.151171013712883,
-0.1860140860080719,
0.10886117815971375,
0.03567357733845711,
-0.5029805898666382,
0.332538366317749,
-0.05494851991534233,
-0.15383702516555786,
-0.12747538089752197,
-0.11730729043483734,
-0.10741617530584335,
0.15067410469055176,
-0.0041115544736385345,
-0.06473275274038315,
0.36734768748283386,
0.09540458023548126,
-0.09123904258012772,
-0.09757115691900253,
-0.3936678171157837,
0.17622162401676178,
0.4065079391002655,
-0.11627548187971115,
0.4033178687095642,
-0.11499495804309845,
0.10055433213710785,
0.02050730399787426,
0.19408144056797028,
0.026892466470599174,
-0.24095186591148376,
0.3514571189880371,
0.16266773641109467,
-0.01997208409011364,
-0.33041292428970337,
-0.08113511651754379,
-0.048688072711229324,
-0.026920458301901817,
0.007646664977073669,
-0.04768373817205429,
-0.26637327671051025,
-0.0024773410987108946,
-0.26372030377388,
-0.0831819400191307,
-0.17005516588687897,
-0.16206036508083344,
-0.1592360883951187,
0.08513642847537994,
-0.022112935781478882,
-0.16836443543434143,
-0.19353900849819183,
0.040917087346315384,
0.019270140677690506,
-0.4311668872833252,
-0.19134016335010529,
-0.09701075404882431,
-0.08861556649208069,
-0.010989782400429249,
0.004715908318758011,
0.13604967296123505,
-0.008933741599321365,
0.30961307883262634,
0.08659999817609787,
-0.2923937141895294,
0.1061219796538353,
0.17849834263324738,
0.12109341472387314,
0.24638912081718445,
0.5515519380569458,
-0.4206486940383911,
0.27802687883377075,
-0.23047621548175812,
-0.22045627236366272,
0.0025707499589771032,
-0.09714022278785706,
0.24616986513137817,
-0.049653977155685425,
0.2978236675262451,
-0.2115909308195114,
-0.25504884123802185,
0.02390136756002903,
0.09520792216062546,
0.05866672843694687,
-0.033995166420936584,
0.08543172478675842,
-0.31809890270233154,
-0.08209964632987976,
-0.14869506657123566,
-0.13854174315929413,
-0.29631784558296204,
0.18406900763511658,
-0.041505612432956696,
0.27222520112991333,
-0.000812467304058373,
0.17837879061698914,
-0.12520654499530792,
-0.1617444008588791,
0.29572999477386475,
-0.07496083527803421,
-0.25388893485069275,
0.10893425345420837,
-0.17248860001564026,
-0.3332706391811371,
-0.13844892382621765,
0.154685840010643,
-0.12682105600833893,
0.21982289850711823,
0.03112098202109337,
0.09076862037181854,
-0.07286035269498825,
-0.30641475319862366,
-0.036084868013858795,
0.36288702487945557,
-0.1592201292514801,
0.22641973197460175,
-0.11868727207183838,
-0.11562810838222504,
0.10071524977684021,
0.05046162009239197,
0.010401744395494461,
-0.15049614012241364,
-0.28338393568992615,
0.01574544794857502,
0.16503356397151947,
0.04758710414171219,
0.31558284163475037,
-0.032431475818157196,
0.06448084861040115,
-0.025010250508785248,
0.42152440547943115,
0.13843512535095215,
0.04279924929141998,
0.10057531297206879,
0.05704762041568756,
-0.03964279964566231,
0.17235837876796722,
0.002156573813408613,
-0.06409548968076706,
0.28221961855888367,
0.10576938837766647,
-0.49560365080833435,
-0.29997292160987854,
0.42460691928863525,
-0.027222484350204468,
0.297981858253479,
0.02143157832324505,
0.2650794982910156,
-0.18213899433612823,
-0.2658710181713104,
0.11153380572795868,
0.0571143738925457,
0.09098014235496521,
0.19092367589473724,
-0.2511458098888397,
0.1393154263496399,
-0.341861754655838,
0.14787039160728455,
0.1205783262848854,
0.25167152285575867,
-0.15877434611320496,
0.0566803514957428,
0.17258983850479126,
0.06377594918012619,
0.21008183062076569,
-0.40120235085487366,
-0.09480767697095871,
0.06314734369516373,
0.1574227213859558,
-0.15948103368282318,
0.3196309804916382,
-0.3012235164642334,
0.057831063866615295,
-0.07180637121200562,
0.16440729796886444,
-0.15533198416233063,
0.007425983902066946,
0.1116812601685524,
0.30791035294532776,
-0.20610910654067993,
-0.24303819239139557,
0.11091719567775726,
-0.39979517459869385,
-0.27667561173439026,
-0.18975377082824707,
0.19458936154842377,
-0.1086166724562645,
-0.026742419227957726,
-0.08654715120792389,
-0.19809798896312714,
0.2900790274143219,
0.3773045241832733,
0.1622621864080429,
0.13170567154884338,
0.04674513265490532,
-0.2747630178928375,
0.4254304766654968,
0.3241220712661743,
0.09750110656023026,
0.4583355784416199,
-0.24758422374725342,
-0.01825370453298092,
0.11534155160188675,
-0.4546948969364166,
0.4137524664402008,
0.3087502717971802,
0.37490320205688477,
-0.05835612118244171,
0.2647036612033844,
-0.10202987492084503,
-0.4852459728717804,
0.11883337050676346,
0.07994632422924042,
0.25680258870124817,
-0.4593992233276367,
-0.7236325740814209,
0.14843015372753143,
0.10070470720529556,
-0.09385693818330765,
0.07233908772468567,
0.2692241966724396,
-0.03205583989620209,
0.2862973213195801,
0.415793240070343,
1.066192388534546,
-0.6191347241401672,
0.1234661340713501,
-0.09742450714111328,
-0.3187910318374634,
0.17371107637882233,
-0.37592434883117676,
-0.13562436401844025,
-0.358423113822937,
-0.1898907572031021,
-0.17850925028324127,
-0.048705704510211945,
0.14027751982212067,
0.32179343700408936,
-0.06362864375114441,
0.14206479489803314,
0.12747277319431305,
-0.13010595738887787,
0.1325257420539856,
0.13372811675071716,
0.06249552220106125,
0.002108300104737282,
-0.141786128282547,
0.2500603199005127,
0.047861166298389435,
-0.4075547754764557,
-0.011524247005581856,
-0.28118419647216797,
0.07391181588172913,
0.25204163789749146,
-0.16301289200782776,
-0.13808110356330872,
-0.1381123960018158,
0.0717659443616867,
-0.18789364397525787,
-0.3123125731945038,
0.24564312398433685,
-0.07372362166643143,
0.26673099398612976,
0.31545376777648926,
0.19588643312454224,
-0.1689780354499817,
-0.1323709785938263,
-0.05698654428124428,
0.07325532287359238,
0.0011423277901485562,
0.09748950600624084,
0.22935666143894196,
-0.14098496735095978,
0.19594378769397736,
0.05900055170059204,
-0.05965710058808327,
0.03629928454756737,
0.00357652036473155,
-0.08427783101797104,
-0.47004586458206177,
0.06851551681756973,
-0.048302363604307175,
-0.13769933581352234,
0.03610670939087868,
0.2289908528327942,
0.37549105286598206,
0.4731937050819397,
0.1551630198955536,
0.26824894547462463,
-0.23175300657749176,
-0.1422174572944641,
-0.06586751341819763,
0.12648235261440277,
0.06516687572002411,
-0.1230069249868393,
-0.02002517506480217,
-0.3700452148914337,
-0.38449302315711975,
0.25411802530288696,
0.07376720011234283,
-0.20363683998584747,
-0.07770027965307236,
-0.4190449118614197,
-0.20561830699443817,
-0.04340505227446556,
0.32950499653816223,
0.1369880884885788,
-0.22415007650852203,
-0.19335880875587463,
-0.3295993208885193,
-0.08098412305116653,
0.322430819272995,
0.23181162774562836,
0.20067062973976135,
0.1858028769493103,
-0.17569641768932343,
-0.36484265327453613,
0.18503449857234955,
-0.4528752565383911,
-0.1702040582895279,
-0.19671747088432312,
0.10511816293001175,
-0.013565036468207836,
0.09165281802415848,
-0.06648540496826172,
-0.1696927398443222,
0.21148335933685303,
0.12189006805419922,
-0.11438553780317307,
-0.32711687684059143,
-0.2976842224597931,
0.0832701325416565,
-0.06142248585820198,
-0.045895468443632126,
-0.008142629638314247,
-0.14326892793178558,
0.007973727770149708,
-0.3175971210002899,
-0.06863909214735031,
0.23791098594665527,
0.15909306704998016,
0.3503628075122833,
-0.15317468345165253,
0.23477500677108765,
-0.2312707006931305,
0.03127192333340645,
0.04105847328901291,
0.287788987159729,
0.01774781383574009,
0.022369176149368286,
0.20751647651195526,
0.05996711552143097,
0.3809281289577484,
0.145941361784935,
0.4885992109775543,
-0.09809858351945877,
0.22887666523456573,
-0.04124830290675163,
0.10743845254182816,
0.2145124226808548,
0.2850929796695709,
0.3396436870098114,
-0.20568595826625824,
-0.1638406664133072,
0.012726998887956142,
0.36523520946502686,
0.03318386897444725,
-0.1502523571252823,
0.18657778203487396,
0.005654272623360157,
0.3139599859714508,
0.43375763297080994,
0.3502042591571808,
0.035331811755895615,
0.06601018458604813,
-0.3308224380016327,
0.13399097323417664,
-0.11204425990581512,
-0.15508204698562622,
0.2725105583667755,
0.1764882355928421,
-0.1907450556755066,
0.005414851475507021,
0.21629755198955536,
0.15857850015163422,
0.4082069993019104,
0.4079943597316742,
0.13150270283222198,
0.22696173191070557,
0.1609259843826294,
-0.13566824793815613,
-0.22647735476493835,
0.45126593112945557,
0.0298092532902956,
0.2919381260871887,
0.2311820536851883,
0.2525508403778076,
-0.057351380586624146,
-0.0424622967839241,
-0.0015112112741917372,
0.2266852706670761,
-0.058110229671001434,
-0.20495106279850006,
-0.0698363408446312,
-0.16099955141544342,
-0.23107559978961945,
-0.13041028380393982,
-0.3410778343677521,
-0.2106247842311859,
-0.3011907935142517,
0.11458871513605118,
-0.11960497498512268,
0.39339330792427063,
-0.16229209303855896,
0.1693447083234787,
0.14154666662216187,
0.22321081161499023,
-0.3974234461784363,
0.14133304357528687,
0.15801475942134857,
0.08708660304546356,
0.04362171143293381,
0.23534797132015228,
0.38648825883865356,
-0.2525750696659088,
-0.1129787489771843,
0.15256790816783905,
-0.28245431184768677,
-0.24746498465538025,
-0.10388067364692688,
0.03077262081205845,
0.23102658987045288,
0.11102813482284546,
0.45589742064476013,
0.2647342085838318,
-0.1251767873764038,
0.11468788236379623,
0.1902194619178772,
-0.1801893711090088,
0.05035878345370293,
0.012077676132321358,
-0.025886988267302513,
-0.4418148696422577,
-0.07096829265356064,
-0.18398810923099518,
-0.2090901881456375,
-0.12121034413576126,
0.5584686994552612,
-0.2443990856409073,
0.24993018805980682,
0.04844282194972038,
0.16798444092273712,
0.29128897190093994,
0.33849984407424927,
0.6622490286827087,
0.25828394293785095,
0.07032009214162827,
-0.16771389544010162,
-0.26749926805496216,
0.09659446775913239,
-0.24570488929748535,
-0.26219362020492554,
-0.019306303933262825,
0.15591122210025787,
0.5219370722770691,
0.45895305275917053,
0.01954706758260727,
0.11956793069839478,
-0.07745485007762909,
0.16029775142669678,
-0.39776718616485596,
-0.11779820919036865,
0.4464782476425171,
0.018044067546725273,
-0.032816119492053986,
-0.18440955877304077,
0.13967479765415192,
0.057864148169755936,
0.3433353900909424,
-0.3101515471935272,
0.16700583696365356,
-0.215682715177536,
-0.0733509436249733,
0.10856752097606659,
-0.09852256625890732,
0.301047146320343,
-0.2370707392692566,
-0.3477634787559509,
-0.00093551364261657,
0.2744969427585602,
0.13492999970912933,
0.514884352684021,
0.2144509255886078,
0.287672758102417,
-0.2817671298980713,
0.04615779221057892,
0.12268483638763428,
-0.011821959167718887,
-0.18077833950519562,
0.2865079939365387,
-0.1437096744775772,
0.1530126929283142,
-0.056162700057029724,
0.0003996155282948166,
0.1948252171278,
0.2705610990524292,
0.056309036910533905,
0.13597743213176727,
0.10655790567398071,
0.08687788993120193,
-0.006010365206748247,
-0.04454013332724571,
-0.3001208007335663,
0.195972740650177,
-0.29355984926223755,
0.02813362143933773,
0.18972480297088623,
-0.4498215317726135,
0.078646220266819,
0.3068143129348755,
-0.2178109586238861,
-0.001009188243187964,
0.17249466478824615,
-0.06704150885343552,
0.04512852057814598,
0.06725265085697174,
0.4555843770503998,
-0.026210201904177666,
-0.22623655200004578,
-0.34643834829330444,
-0.4233019948005676
] |
https://github.com/huggingface/datasets/issues/1805
|
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index
|
Hi ! Indeed we used to require mapping functions to be picklable with `pickle` or `dill` in order to cache the resulting datasets. And FAISS indexes are not picklable unfortunately.
But since #1703 this is no longer required (the caching will simply be disabled). This change will be available in the next release of `datasets`, or you can also install `datasets` from source.
|
So, I have the following instances in my dataset
```
{'question': 'An astronomer observes that a planet rotates faster after a meteorite impact. Which is the most likely effect of
this increase in rotation?',
'answer': 'C',
'example_id': 'ARCCH_Mercury_7175875',
'options':[{'option_context': 'One effect of increased amperage in the planetary world (..)', 'option_id': 'A', 'option_text': 'Planetary density will decrease.'},
(...)]}
```
The `options` value is always an list with 4 options, each one is a dict with `option_context`; `option_id` and `option_text`.
I would like to overwrite the `option_context` of each instance of my dataset for a dpr result that I am developing. Then, I trained a model already and save it in a FAISS index
```
dpr_dataset = load_dataset(
"text",
data_files=ARC_CORPUS_TEXT,
cache_dir=CACHE_DIR,
split="train[:100%]",
)
dpr_dataset.load_faiss_index("embeddings", f"{ARC_CORPUS_FAISS}")
torch.set_grad_enabled(False)
```
Then, as a processor of my dataset, I created a map function that calls the `dpr_dataset` for each _option_
```
def generate_context(example):
question_text = example['question']
for option in example['options']:
question_with_option = question_text + " " + option['option_text']
tokenize_text = question_tokenizer(question_with_option, return_tensors="pt").to(device)
question_embed = (
question_encoder(**tokenize_text)
)[0][0].cpu().numpy()
_, retrieved_examples = dpr_dataset.get_nearest_examples(
"embeddings", question_embed, k=10
)
# option["option_context"] = retrieved_examples["text"]
# option["option_context"] = " ".join(option["option_context"]).strip()
#result_dict = {
# 'example_id': example['example_id'],
# 'answer': example['answer'],
# 'question': question_text,
#options': example['options']
# }
return example
```
I intentionally commented on this portion of the code.
But when I call the `map` method, `ds_with_context = dataset.map(generate_context,load_from_cache_file=False)`
It calls the following error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-55-75a458ce205c> in <module>
----> 1 ds_with_context = dataset.map(generate_context,load_from_cache_file=False)
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc)
301 num_proc=num_proc,
302 )
--> 303 for k, dataset in self.items()
304 }
305 )
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
301 num_proc=num_proc,
302 )
--> 303 for k, dataset in self.items()
304 }
305 )
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1257 fn_kwargs=fn_kwargs,
1258 new_fingerprint=new_fingerprint,
-> 1259 update_data=update_data,
1260 )
1261 else:
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
155 }
156 # apply actual function
--> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
159 # re-apply format to the output
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name
157 kwargs[fingerprint_name] = update_fingerprint(
--> 158 self._fingerprint, transform, kwargs_for_fingerprint
159 )
160
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args)
103 for key in sorted(transform_args):
104 hasher.update(key)
--> 105 hasher.update(transform_args[key])
106 return hasher.hexdigest()
107
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value)
55 def update(self, value):
56 self.m.update(f"=={type(value)}==".encode("utf8"))
---> 57 self.m.update(self.hash(value).encode("utf-8"))
58
59 def hexdigest(self):
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value)
51 return cls.dispatch[type(value)](cls, value)
52 else:
---> 53 return cls.hash_default(value)
54
55 def update(self, value):
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value)
44 @classmethod
45 def hash_default(cls, value):
---> 46 return cls.hash_bytes(dumps(value))
47
48 @classmethod
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj)
387 file = StringIO()
388 with _no_cache_fields(obj):
--> 389 dump(obj, file)
390 return file.getvalue()
391
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file)
359 def dump(obj, file):
360 """pickle an object to a file"""
--> 361 Pickler(file, recurse=True).dump(obj)
362 return
363
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj)
452 raise PicklingError(msg)
453 else:
--> 454 StockPickler.dump(self, obj)
455 stack.clear() # clear record of 'recursion-sensitive' pickled objects
456 return
/usr/lib/python3.7/pickle.py in dump(self, obj)
435 if self.proto >= 4:
436 self.framer.start_framing()
--> 437 self.save(obj)
438 self.write(STOP)
439 self.framer.end_framing()
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in save_function(pickler, obj)
554 dill._dill._create_function,
555 (obj.__code__, globs, obj.__name__, obj.__defaults__, obj.__closure__, obj.__dict__, fkwdefaults),
--> 556 obj=obj,
557 )
558 else:
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
636 else:
637 save(func)
--> 638 save(args)
639 write(REDUCE)
640
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
/usr/lib/python3.7/pickle.py in save_tuple(self, obj)
784 write(MARK)
785 for element in obj:
--> 786 save(element)
787
788 if id(obj) in memo:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
880 for k, v in tmp:
881 save(k)
--> 882 save(v)
883 write(SETITEMS)
884 elif n:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
547
548 # Save the reduce() output and finally memoize the object
--> 549 self.save_reduce(obj=obj, *rv)
550
551 def persistent_id(self, obj):
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
660
661 if state is not None:
--> 662 save(state)
663 write(BUILD)
664
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
880 for k, v in tmp:
881 save(k)
--> 882 save(v)
883 write(SETITEMS)
884 elif n:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
885 k, v = tmp[0]
886 save(k)
--> 887 save(v)
888 write(SETITEM)
889 # else tmp is empty, and we're done
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
547
548 # Save the reduce() output and finally memoize the object
--> 549 self.save_reduce(obj=obj, *rv)
550
551 def persistent_id(self, obj):
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
660
661 if state is not None:
--> 662 save(state)
663 write(BUILD)
664
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
880 for k, v in tmp:
881 save(k)
--> 882 save(v)
883 write(SETITEMS)
884 elif n:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
547
548 # Save the reduce() output and finally memoize the object
--> 549 self.save_reduce(obj=obj, *rv)
550
551 def persistent_id(self, obj):
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
660
661 if state is not None:
--> 662 save(state)
663 write(BUILD)
664
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
885 k, v = tmp[0]
886 save(k)
--> 887 save(v)
888 write(SETITEM)
889 # else tmp is empty, and we're done
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
522 reduce = getattr(obj, "__reduce_ex__", None)
523 if reduce is not None:
--> 524 rv = reduce(self.proto)
525 else:
526 reduce = getattr(obj, "__reduce__", None)
TypeError: can't pickle SwigPyObject objects
```
Which I have no idea how to solve/deal with it
| 63 |
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index
|
[
-0.005270112305879593,
-0.11877567321062088,
-0.04380654916167259,
0.011840139515697956,
0.17125549912452698,
-0.048118166625499725,
0.07379113882780075,
0.19867923855781555,
0.32983529567718506,
0.4007844030857086,
-0.10260380059480667,
0.2206106185913086,
0.11448421329259872,
0.06294333189725876,
-0.18092100322246552,
-0.014528312720358372,
0.042009755969047546,
0.21955780684947968,
-0.28496891260147095,
-0.23255078494548798,
-0.36342447996139526,
0.07934822887182236,
-0.3035452365875244,
0.27292400598526,
0.012436151504516602,
0.10821438580751419,
-0.05197323113679886,
0.18725967407226562,
-0.15472540259361267,
-0.4393821656703949,
0.4791853725910187,
0.10870927572250366,
0.0603567473590374,
-0.001023968798108399,
-0.00011542512947926298,
0.1167484000325203,
0.38958945870399475,
-0.021418126299977303,
-0.25905582308769226,
0.05071000009775162,
-0.021772876381874084,
0.17762887477874756,
0.2706851661205292,
-0.11749818176031113,
-0.37597858905792236,
-0.19307176768779755,
0.16196173429489136,
-0.0032176650129258633,
-0.045517969876527786,
0.23240669071674347,
0.1758430451154709,
0.22925125062465668,
0.024867551401257515,
-0.4541360139846802,
0.4826173782348633,
-0.11054689437150955,
-0.18193809688091278,
0.15914030373096466,
0.3279817998409271,
0.12623609602451324,
0.12868189811706543,
0.2824379801750183,
-0.049580689519643784,
0.12321595102548599,
-0.15277579426765442,
0.12453920394182205,
0.010847569443285465,
0.2643946707248688,
0.16639576852321625,
0.2010686695575714,
0.3281468451023102,
-0.39344003796577454,
-0.4487936198711395,
-0.3409974277019501,
-0.055095672607421875,
0.02685999497771263,
-0.19420412182807922,
-0.5059188604354858,
-0.0679955780506134,
0.19149520993232727,
0.040842678397893906,
0.21059289574623108,
-0.2385781705379486,
0.43197786808013916,
0.384268194437027,
0.0030578034929931164,
-0.10450144112110138,
0.08466801047325134,
0.15551839768886566,
-0.23766878247261047,
0.19004742801189423,
0.12870703637599945,
-0.07422638684511185,
0.08032580465078354,
-0.07463070005178452,
-0.03097320720553398,
0.7231369018554688,
-0.1516084372997284,
0.3950047492980957,
-0.01576407067477703,
-0.2026839256286621,
0.4002077877521515,
-0.008303350768983364,
0.04675677418708801,
0.3009684383869171,
-0.14593003690242767,
0.05391107127070427,
0.10841313004493713,
0.001816760515794158,
0.09825893491506577,
-0.19255803525447845,
0.04533642530441284,
0.057577792555093765,
-0.20706778764724731,
-0.7255368828773499,
-0.08730535209178925,
0.2766459584236145,
-0.2797629237174988,
-0.16929860413074493,
0.1311696618795395,
-0.2625346779823303,
0.4403526782989502,
0.2175932079553604,
0.5754522681236267,
0.19777102768421173,
-0.09803199023008347,
-0.03954360634088516,
0.24866850674152374,
-0.3745017647743225,
0.2975347936153412,
-0.3399675488471985,
0.17869870364665985,
0.051617737859487534,
-0.2026553452014923,
-0.018544279038906097,
0.165192648768425,
0.3537205457687378,
-0.31258249282836914,
-0.0016021393239498138,
0.3266158998012543,
0.02623271942138672,
-0.14705687761306763,
0.32716071605682373,
0.23685739934444427,
0.038212623447179794,
-0.09287401288747787,
0.08460231125354767,
-0.12571708858013153,
-0.2067965716123581,
-0.19613179564476013,
0.03559253364801407,
-0.1949799656867981,
0.04345476254820824,
0.146163672208786,
-0.10052968561649323,
-0.031098300591111183,
0.005432761274278164,
0.056802380830049515,
-0.2555641531944275,
0.04726199805736542,
-0.08929561078548431,
-0.29507967829704285,
0.151903435587883,
-0.035331450402736664,
0.15273094177246094,
0.3464365303516388,
-0.14183376729488373,
-0.05356311798095703,
-0.10122115164995193,
-0.17345505952835083,
0.42548656463623047,
0.17947696149349213,
-0.16298511624336243,
0.14264798164367676,
-0.13068853318691254,
0.32827961444854736,
0.29949095845222473,
-0.3607582747936249,
-0.5405299663543701,
0.05270683020353317,
-0.054145749658346176,
-0.22143834829330444,
0.19650308787822723,
0.07040657103061676,
0.17570723593235016,
0.3011196553707123,
-0.12470679730176926,
0.489872545003891,
0.0861518457531929,
-0.03765130788087845,
-0.28088903427124023,
-0.22786524891853333,
-0.23498037457466125,
0.20251408219337463,
-0.03253380209207535,
-0.03152201324701309,
0.18622714281082153,
-0.40231892466545105,
0.228298157453537,
-0.12320221960544586,
-0.10151707381010056,
0.0769120380282402,
0.5077552199363708,
-0.01552646979689598,
0.25520431995391846,
-0.21520814299583435,
-0.11187005043029785,
0.1327938437461853,
0.12080273032188416,
0.051211949437856674,
-0.0339374877512455,
-0.15043829381465912,
-0.21362078189849854,
0.3484147787094116,
-0.05469880253076553,
0.0919676348567009,
0.059688083827495575,
-0.037047091871500015,
0.31815651059150696,
-0.0850583091378212,
0.015415002591907978,
0.03552524745464325,
-0.24385152757167816,
0.1465478390455246,
-0.2716313302516937,
0.3208805024623871,
-0.032860882580280304,
-0.3805811107158661,
0.11942033469676971,
0.20556317269802094,
-0.08903270959854126,
-0.18181967735290527,
-0.07360617816448212,
0.16529309749603271,
0.5369802713394165,
-0.3319186270236969,
0.40127047896385193,
-0.4914033114910126,
-0.20126475393772125,
0.028675902634859085,
0.12298236042261124,
0.007919545285403728,
0.1948738992214203,
0.22511222958564758,
-0.2553413212299347,
0.5796687006950378,
0.18260569870471954,
0.17181766033172607,
0.2342425137758255,
0.09028267860412598,
0.27383315563201904,
-0.021478967741131783,
0.05871078372001648,
-0.5810552835464478,
0.1004897952079773,
0.18539080023765564,
0.0979216992855072,
0.06950457394123077,
-0.4417731463909149,
0.4783916175365448,
0.32469281554222107,
0.02750588208436966,
0.060157496482133865,
0.20208798348903656,
0.0012342469999566674,
-0.029841922223567963,
0.15617230534553528,
0.08865032345056534,
0.10542545467615128,
0.3834066092967987,
-0.24552209675312042,
-0.3089355230331421,
-0.11278780549764633,
-0.15494783222675323,
0.04609813913702965,
0.282745361328125,
0.09503524750471115,
-0.23152844607830048,
-0.06542541831731796,
-0.1230182945728302,
-0.44278639554977417,
-0.3168037235736847,
-0.3278459310531616,
0.07934409379959106,
-0.1524321436882019,
-0.07547477632761002,
-0.35569068789482117,
-0.47956931591033936,
0.12749633193016052,
-0.27940139174461365,
0.2349439114332199,
-0.2363821566104889,
0.3113747537136078,
0.13766595721244812,
-0.3977280855178833,
0.3803594708442688,
-0.21534250676631927,
0.15337826311588287,
0.1594415009021759,
-0.0914635956287384,
0.06616172939538956,
-0.22481891512870789,
-0.3555644750595093,
0.06721088290214539,
-0.22443841397762299,
0.416957288980484,
0.3279317617416382,
0.07050427794456482,
0.10476314276456833,
-0.2933923602104187,
-0.056150883436203,
0.07061869651079178,
0.1898830533027649,
0.3483866751194,
0.5003443956375122,
0.018292713910341263,
-0.16861750185489655,
-0.0959162637591362,
0.13567885756492615,
-0.2281973958015442,
-0.14703355729579926,
-0.12933431565761566,
-0.23269328474998474,
-0.267297625541687,
-0.09586192667484283,
-0.20705337822437286,
-0.22200872004032135,
-0.15341416001319885,
0.2545154094696045,
0.2942781448364258,
0.14079535007476807,
0.01441841572523117,
0.3677749037742615,
0.16151507198810577,
-0.07542610913515091,
-0.18901976943016052,
-0.18834635615348816,
-0.15249378979206085,
0.07597402483224869,
-0.0876457691192627,
-0.5587396621704102,
-0.39211729168891907,
-0.30428919196128845,
-0.21660545468330383,
-0.04276313632726669,
-0.03660477325320244,
-0.2422896921634674,
-0.2850620746612549,
0.16687653958797455,
0.30615729093551636,
0.19300174713134766,
0.20419146120548248,
0.09569881111383438,
-0.20115822553634644,
-0.2221481055021286,
-0.27406179904937744,
0.42548856139183044,
0.037582721561193466,
0.01083644013851881,
0.13457131385803223,
0.3725030720233917,
-0.22379982471466064,
0.5474463701248169,
-0.23372982442378998,
-0.28129518032073975,
0.446330189704895,
-0.13573262095451355,
0.1867370754480362,
-0.1570165455341339,
-0.25128889083862305,
0.31745171546936035,
0.32529082894325256,
-0.13525618612766266,
0.15556983649730682,
0.06144774332642555,
0.10863889008760452,
0.23784546554088593,
0.3110246956348419,
-0.30560988187789917,
-0.1886695772409439,
-0.14232541620731354,
0.31425851583480835,
-0.6506518721580505,
0.13095137476921082,
0.3692966401576996,
-0.42794251441955566,
0.18989650905132294,
-0.12905244529247284,
-0.043612148612737656,
-0.014576144516468048,
0.09374206513166428,
-0.04705067723989487,
-0.24435202777385712,
-0.3554350733757019,
0.21945105493068695,
0.0033990521915256977,
0.13452686369419098,
0.012210555374622345,
-0.22198300063610077,
0.20000194013118744,
0.13601316511631012,
0.7037596702575684,
0.17728400230407715,
0.03972009941935539,
0.429582804441452,
0.0033736838959157467,
-0.4944850206375122,
-0.09492483735084534,
-0.08012880384922028,
0.28518912196159363,
-0.01722201518714428,
0.12430962920188904,
-0.029160143807530403,
-0.14674870669841766,
0.15744401514530182,
-0.12217380851507187,
0.14496612548828125,
0.06336372345685959,
-0.10241606086492538,
-0.41155365109443665,
-0.30813005566596985,
0.18787497282028198,
-0.08645646274089813,
0.13844895362854004,
-0.002554514678195119,
-0.25816234946250916,
-0.33921679854393005,
-0.21221403777599335,
-0.21393711864948273,
0.365607351064682,
0.3378792107105255,
0.02144920639693737,
0.2766580879688263,
0.1254582554101944,
0.432401180267334,
0.5160379409790039,
0.2783036231994629,
0.0850726068019867,
0.06833270192146301,
0.08808755874633789,
-0.02007216028869152,
0.1439068615436554,
0.09662844985723495,
-0.15463489294052124,
0.1508997678756714,
-0.30501115322113037,
0.14663255214691162,
0.2511242926120758,
0.2731728255748749,
0.07260429114103317,
0.03848365694284439,
0.15682245790958405,
-0.10869801789522171,
0.6431874632835388,
0.0004347229842096567,
-0.12557244300842285,
0.24296951293945312,
0.2799052894115448,
-0.1907208263874054,
0.6695951819419861,
0.08995616436004639,
0.6413209438323975,
-0.1067470908164978,
-0.01630476303398609,
0.3017454147338867,
0.024818213656544685,
0.5273269414901733,
0.20406411588191986,
0.16997285187244415,
-0.33997324109077454,
-0.03772001340985298,
0.12231443077325821,
-0.3299942910671234,
0.027533207088708878,
0.15300975739955902,
-0.12365097552537918,
-0.023728232830762863,
-0.009921587072312832,
-0.2541189193725586,
-0.1505139172077179,
0.01618567854166031,
0.21925368905067444,
-0.27510181069374084,
-0.4157639741897583,
0.09308192133903503,
0.23982840776443481,
0.3258480131626129,
0.16699983179569244,
-0.02190929837524891,
-0.45410633087158203,
-0.2514127790927887,
-0.08216345310211182,
0.16594529151916504,
-0.03550805523991585,
0.267778605222702,
0.19196240603923798,
-0.14045356214046478,
-0.4355275630950928,
-0.1198292076587677,
-0.045570407062768936,
-0.23657062649726868,
-0.24027122557163239,
0.23884952068328857,
0.15699626505374908,
-0.1458560675382614,
-0.0788005143404007,
-0.11988423019647598,
0.25906306505203247,
-0.010379374958574772,
-0.10285325348377228,
-0.1434108465909958,
0.15751220285892487,
-0.297463059425354,
0.014799180440604687,
-0.142001673579216,
-0.37638360261917114,
-0.23361742496490479,
-0.4976382553577423,
-0.008424166589975357,
0.044057004153728485,
-0.34552329778671265,
0.08426328748464584,
0.04904940724372864,
0.014221420511603355,
0.2214258760213852,
-0.09308308362960815,
-0.20632284879684448,
-0.2718770503997803,
0.45431602001190186,
0.1482102870941162,
0.33998575806617737,
0.29668527841567993,
0.3282047510147095,
-0.18111777305603027,
-0.25683656334877014,
-0.3141450583934784,
0.6544834971427917,
0.060064204037189484,
0.32614365220069885,
-0.03194589540362358,
-0.4317409098148346,
0.16106124222278595,
0.0701381266117096,
0.08861643075942993,
-0.2667873799800873,
-0.3422178626060486,
-0.19243037700653076,
-0.5020700097084045,
0.2653171718120575,
-0.10436061024665833,
0.3914378881454468,
-0.19635581970214844,
0.4097531735897064,
-0.17600764334201813,
-0.3530707061290741,
-0.2455226331949234,
-0.13673582673072815,
-0.45542800426483154,
-0.06256978958845139,
-0.08286844193935394,
0.005687595810741186,
0.03037956729531288,
-0.09167244285345078,
0.129081130027771,
-0.25931739807128906,
-0.13725674152374268,
-0.21778811514377594,
-0.043467603623867035,
0.07090236991643906,
0.16700243949890137,
-0.07626016438007355,
-0.04509861394762993,
-0.01253108587116003,
-0.22757434844970703,
-0.17669539153575897,
0.20994305610656738,
0.12562322616577148,
-0.2110847681760788,
0.16091857850551605,
0.06427385658025742,
-0.11070740222930908,
0.3296339511871338,
0.25895586609840393,
0.09087575972080231,
0.30450332164764404,
0.053716517984867096,
0.06952362507581711,
-0.20056270062923431,
-0.06990401446819305,
0.23356950283050537,
0.0022097702603787184,
-0.2449362576007843,
0.014022172428667545,
-0.16527189314365387,
-0.04817497730255127,
-0.4275047183036804,
0.3906456530094147,
0.39638668298721313,
0.4904312491416931,
0.038575030863285065,
-0.13909803330898285,
0.05639297515153885,
0.1600436121225357,
-0.3718586564064026,
-0.3287856876850128,
0.22816216945648193,
-0.13093243539333344,
0.11711480468511581,
-0.07015684247016907,
-0.2443433701992035,
0.18655644357204437,
-0.18047772347927094,
0.07525493204593658,
0.19768382608890533,
0.39257529377937317,
0.017341062426567078,
0.23622407019138336,
0.1314890831708908,
0.0730758011341095,
-0.12934160232543945,
0.2726691663265228,
0.5931246280670166,
0.6769065260887146,
-0.23671898245811462,
0.41580405831336975,
-0.17398230731487274,
0.21582944691181183,
0.011413900181651115,
-0.5743983387947083,
0.5215808749198914,
0.31993937492370605,
-0.1933402419090271,
0.018123092129826546,
0.0005265920190140605,
0.2990064322948456,
-0.06772811710834503,
-0.30458539724349976,
-0.3389095664024353,
0.07552533596754074,
-0.1552596539258957,
-0.3629920482635498,
-0.06809963285923004,
-0.05212812498211861,
0.06731946021318436,
-0.015442561358213425,
-0.08986090123653412,
-0.09718291461467743,
0.05453627184033394,
-0.3879935145378113,
0.05035662278532982,
-0.3088468909263611,
-0.15608011186122894,
-0.09973105043172836,
0.08517573773860931,
-0.08734004199504852,
-0.04415302351117134,
-0.2029729187488556,
-0.19945186376571655,
-0.11792761087417603,
0.05155195668339729,
0.2511034309864044,
0.22694706916809082,
-0.17907312512397766,
-0.21780695021152496,
-0.019693726673722267,
-0.27983734011650085,
-0.1152116134762764,
0.019609365612268448,
-0.07092183828353882,
-0.21601031720638275,
0.3523643910884857,
0.10611256957054138,
-0.09955526888370514,
-0.16512317955493927,
0.23588013648986816,
0.23410961031913757,
0.023595882579684258,
-0.23680786788463593,
-0.0644206553697586,
-0.023519594222307205,
0.01541990227997303,
0.031487610191106796,
-0.17125892639160156,
-0.03092583268880844,
0.03630918636918068,
-0.07448757439851761,
0.2010972946882248,
-0.040060821920633316,
0.08238504081964493,
-0.17109321057796478,
0.49896201491355896,
0.23927952349185944,
0.4229732155799866,
-0.15359535813331604,
0.10550139844417572,
-0.04487192630767822,
0.1246517151594162,
-0.29271337389945984,
-0.3792175054550171,
0.248886376619339,
0.2677118480205536,
-0.09648957848548889,
-0.04978066310286522,
0.06200395151972771,
0.5382649302482605,
0.30104127526283264,
0.3082967698574066,
-0.1558818817138672,
-0.15600034594535828,
-0.2846401333808899,
-0.14716728031635284,
0.2816559076309204,
-0.3534846007823944,
0.05047287046909332,
-0.36598989367485046,
0.061131563037633896,
-0.22330564260482788,
0.19446969032287598,
0.2040373682975769,
-0.11243885010480881,
0.1777690201997757,
0.13318204879760742,
0.10009314864873886,
-0.05542163923382759,
-0.019743485376238823,
-0.315116286277771,
-0.5067578554153442,
-0.155032217502594,
-0.11555440723896027,
-0.04592343792319298,
-0.08251545578241348,
0.012453601695597172,
0.061013855040073395,
-0.03250774368643761,
0.16079674661159515,
0.33558395504951477,
0.3394601047039032,
0.07523170858621597,
0.3501094579696655,
-0.3551529049873352,
0.001374196377582848,
-0.03217403218150139,
-0.06837348639965057,
-0.1327979862689972,
0.2620391547679901,
-0.009076482616364956,
-0.25885337591171265,
0.4415532946586609,
-0.4188774824142456,
0.10546547174453735,
-0.3958960473537445,
0.16866864264011383,
0.06333169341087341,
-0.31171315908432007,
-0.05575866624712944,
0.22388885915279388,
0.1746411770582199,
0.20635265111923218,
-0.17642353475093842,
0.09505457431077957,
0.4623335301876068,
-0.07989972829818726,
-0.13124814629554749,
0.6348666548728943,
0.22947128117084503,
-0.017339495941996574,
0.20820635557174683,
-0.04515671357512474
] |
https://github.com/huggingface/datasets/issues/1805
|
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index
|
I totally forgot to answer this issue, I'm so sorry.
I was able to get it working by installing `datasets` from source. Huge thanks!
|
So, I have the following instances in my dataset
```
{'question': 'An astronomer observes that a planet rotates faster after a meteorite impact. Which is the most likely effect of
this increase in rotation?',
'answer': 'C',
'example_id': 'ARCCH_Mercury_7175875',
'options':[{'option_context': 'One effect of increased amperage in the planetary world (..)', 'option_id': 'A', 'option_text': 'Planetary density will decrease.'},
(...)]}
```
The `options` value is always an list with 4 options, each one is a dict with `option_context`; `option_id` and `option_text`.
I would like to overwrite the `option_context` of each instance of my dataset for a dpr result that I am developing. Then, I trained a model already and save it in a FAISS index
```
dpr_dataset = load_dataset(
"text",
data_files=ARC_CORPUS_TEXT,
cache_dir=CACHE_DIR,
split="train[:100%]",
)
dpr_dataset.load_faiss_index("embeddings", f"{ARC_CORPUS_FAISS}")
torch.set_grad_enabled(False)
```
Then, as a processor of my dataset, I created a map function that calls the `dpr_dataset` for each _option_
```
def generate_context(example):
question_text = example['question']
for option in example['options']:
question_with_option = question_text + " " + option['option_text']
tokenize_text = question_tokenizer(question_with_option, return_tensors="pt").to(device)
question_embed = (
question_encoder(**tokenize_text)
)[0][0].cpu().numpy()
_, retrieved_examples = dpr_dataset.get_nearest_examples(
"embeddings", question_embed, k=10
)
# option["option_context"] = retrieved_examples["text"]
# option["option_context"] = " ".join(option["option_context"]).strip()
#result_dict = {
# 'example_id': example['example_id'],
# 'answer': example['answer'],
# 'question': question_text,
#options': example['options']
# }
return example
```
I intentionally commented on this portion of the code.
But when I call the `map` method, `ds_with_context = dataset.map(generate_context,load_from_cache_file=False)`
It calls the following error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-55-75a458ce205c> in <module>
----> 1 ds_with_context = dataset.map(generate_context,load_from_cache_file=False)
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in map(self, function, with_indices, input_columns, batched, batch_size, remove_columns, keep_in_memory, load_from_cache_file, cache_file_names, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc)
301 num_proc=num_proc,
302 )
--> 303 for k, dataset in self.items()
304 }
305 )
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/dataset_dict.py in <dictcomp>(.0)
301 num_proc=num_proc,
302 )
--> 303 for k, dataset in self.items()
304 }
305 )
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in map(self, function, with_indices, input_columns, batched, batch_size, drop_last_batch, remove_columns, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, features, disable_nullable, fn_kwargs, num_proc, suffix_template, new_fingerprint)
1257 fn_kwargs=fn_kwargs,
1258 new_fingerprint=new_fingerprint,
-> 1259 update_data=update_data,
1260 )
1261 else:
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/arrow_dataset.py in wrapper(*args, **kwargs)
155 }
156 # apply actual function
--> 157 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
158 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out]
159 # re-apply format to the output
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in wrapper(*args, **kwargs)
156 kwargs_for_fingerprint["fingerprint_name"] = fingerprint_name
157 kwargs[fingerprint_name] = update_fingerprint(
--> 158 self._fingerprint, transform, kwargs_for_fingerprint
159 )
160
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update_fingerprint(fingerprint, transform, transform_args)
103 for key in sorted(transform_args):
104 hasher.update(key)
--> 105 hasher.update(transform_args[key])
106 return hasher.hexdigest()
107
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in update(self, value)
55 def update(self, value):
56 self.m.update(f"=={type(value)}==".encode("utf8"))
---> 57 self.m.update(self.hash(value).encode("utf-8"))
58
59 def hexdigest(self):
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash(cls, value)
51 return cls.dispatch[type(value)](cls, value)
52 else:
---> 53 return cls.hash_default(value)
54
55 def update(self, value):
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/fingerprint.py in hash_default(cls, value)
44 @classmethod
45 def hash_default(cls, value):
---> 46 return cls.hash_bytes(dumps(value))
47
48 @classmethod
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dumps(obj)
387 file = StringIO()
388 with _no_cache_fields(obj):
--> 389 dump(obj, file)
390 return file.getvalue()
391
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in dump(obj, file)
359 def dump(obj, file):
360 """pickle an object to a file"""
--> 361 Pickler(file, recurse=True).dump(obj)
362 return
363
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in dump(self, obj)
452 raise PicklingError(msg)
453 else:
--> 454 StockPickler.dump(self, obj)
455 stack.clear() # clear record of 'recursion-sensitive' pickled objects
456 return
/usr/lib/python3.7/pickle.py in dump(self, obj)
435 if self.proto >= 4:
436 self.framer.start_framing()
--> 437 self.save(obj)
438 self.write(STOP)
439 self.framer.end_framing()
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/datasets/utils/py_utils.py in save_function(pickler, obj)
554 dill._dill._create_function,
555 (obj.__code__, globs, obj.__name__, obj.__defaults__, obj.__closure__, obj.__dict__, fkwdefaults),
--> 556 obj=obj,
557 )
558 else:
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
636 else:
637 save(func)
--> 638 save(args)
639 write(REDUCE)
640
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
/usr/lib/python3.7/pickle.py in save_tuple(self, obj)
784 write(MARK)
785 for element in obj:
--> 786 save(element)
787
788 if id(obj) in memo:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
880 for k, v in tmp:
881 save(k)
--> 882 save(v)
883 write(SETITEMS)
884 elif n:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
547
548 # Save the reduce() output and finally memoize the object
--> 549 self.save_reduce(obj=obj, *rv)
550
551 def persistent_id(self, obj):
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
660
661 if state is not None:
--> 662 save(state)
663 write(BUILD)
664
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
880 for k, v in tmp:
881 save(k)
--> 882 save(v)
883 write(SETITEMS)
884 elif n:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
885 k, v = tmp[0]
886 save(k)
--> 887 save(v)
888 write(SETITEM)
889 # else tmp is empty, and we're done
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
547
548 # Save the reduce() output and finally memoize the object
--> 549 self.save_reduce(obj=obj, *rv)
550
551 def persistent_id(self, obj):
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
660
661 if state is not None:
--> 662 save(state)
663 write(BUILD)
664
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
880 for k, v in tmp:
881 save(k)
--> 882 save(v)
883 write(SETITEMS)
884 elif n:
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
547
548 # Save the reduce() output and finally memoize the object
--> 549 self.save_reduce(obj=obj, *rv)
550
551 def persistent_id(self, obj):
/usr/lib/python3.7/pickle.py in save_reduce(self, func, args, state, listitems, dictitems, obj)
660
661 if state is not None:
--> 662 save(state)
663 write(BUILD)
664
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
502 f = self.dispatch.get(t)
503 if f is not None:
--> 504 f(self, obj) # Call unbound method with explicit self
505 return
506
~/.cache/pypoetry/virtualenvs/masters-utTTC0p8-py3.7/lib/python3.7/site-packages/dill/_dill.py in save_module_dict(pickler, obj)
939 # we only care about session the first pass thru
940 pickler._session = False
--> 941 StockPickler.save_dict(pickler, obj)
942 log.info("# D2")
943 return
/usr/lib/python3.7/pickle.py in save_dict(self, obj)
854
855 self.memoize(obj)
--> 856 self._batch_setitems(obj.items())
857
858 dispatch[dict] = save_dict
/usr/lib/python3.7/pickle.py in _batch_setitems(self, items)
885 k, v = tmp[0]
886 save(k)
--> 887 save(v)
888 write(SETITEM)
889 # else tmp is empty, and we're done
/usr/lib/python3.7/pickle.py in save(self, obj, save_persistent_id)
522 reduce = getattr(obj, "__reduce_ex__", None)
523 if reduce is not None:
--> 524 rv = reduce(self.proto)
525 else:
526 reduce = getattr(obj, "__reduce__", None)
TypeError: can't pickle SwigPyObject objects
```
Which I have no idea how to solve/deal with it
| 24 |
can't pickle SwigPyObject objects when calling dataset.get_nearest_examples from FAISS index
|
[
-0.005270112305879593,
-0.11877567321062088,
-0.04380654916167259,
0.011840139515697956,
0.17125549912452698,
-0.048118166625499725,
0.07379113882780075,
0.19867923855781555,
0.32983529567718506,
0.4007844030857086,
-0.10260380059480667,
0.2206106185913086,
0.11448421329259872,
0.06294333189725876,
-0.18092100322246552,
-0.014528312720358372,
0.042009755969047546,
0.21955780684947968,
-0.28496891260147095,
-0.23255078494548798,
-0.36342447996139526,
0.07934822887182236,
-0.3035452365875244,
0.27292400598526,
0.012436151504516602,
0.10821438580751419,
-0.05197323113679886,
0.18725967407226562,
-0.15472540259361267,
-0.4393821656703949,
0.4791853725910187,
0.10870927572250366,
0.0603567473590374,
-0.001023968798108399,
-0.00011542512947926298,
0.1167484000325203,
0.38958945870399475,
-0.021418126299977303,
-0.25905582308769226,
0.05071000009775162,
-0.021772876381874084,
0.17762887477874756,
0.2706851661205292,
-0.11749818176031113,
-0.37597858905792236,
-0.19307176768779755,
0.16196173429489136,
-0.0032176650129258633,
-0.045517969876527786,
0.23240669071674347,
0.1758430451154709,
0.22925125062465668,
0.024867551401257515,
-0.4541360139846802,
0.4826173782348633,
-0.11054689437150955,
-0.18193809688091278,
0.15914030373096466,
0.3279817998409271,
0.12623609602451324,
0.12868189811706543,
0.2824379801750183,
-0.049580689519643784,
0.12321595102548599,
-0.15277579426765442,
0.12453920394182205,
0.010847569443285465,
0.2643946707248688,
0.16639576852321625,
0.2010686695575714,
0.3281468451023102,
-0.39344003796577454,
-0.4487936198711395,
-0.3409974277019501,
-0.055095672607421875,
0.02685999497771263,
-0.19420412182807922,
-0.5059188604354858,
-0.0679955780506134,
0.19149520993232727,
0.040842678397893906,
0.21059289574623108,
-0.2385781705379486,
0.43197786808013916,
0.384268194437027,
0.0030578034929931164,
-0.10450144112110138,
0.08466801047325134,
0.15551839768886566,
-0.23766878247261047,
0.19004742801189423,
0.12870703637599945,
-0.07422638684511185,
0.08032580465078354,
-0.07463070005178452,
-0.03097320720553398,
0.7231369018554688,
-0.1516084372997284,
0.3950047492980957,
-0.01576407067477703,
-0.2026839256286621,
0.4002077877521515,
-0.008303350768983364,
0.04675677418708801,
0.3009684383869171,
-0.14593003690242767,
0.05391107127070427,
0.10841313004493713,
0.001816760515794158,
0.09825893491506577,
-0.19255803525447845,
0.04533642530441284,
0.057577792555093765,
-0.20706778764724731,
-0.7255368828773499,
-0.08730535209178925,
0.2766459584236145,
-0.2797629237174988,
-0.16929860413074493,
0.1311696618795395,
-0.2625346779823303,
0.4403526782989502,
0.2175932079553604,
0.5754522681236267,
0.19777102768421173,
-0.09803199023008347,
-0.03954360634088516,
0.24866850674152374,
-0.3745017647743225,
0.2975347936153412,
-0.3399675488471985,
0.17869870364665985,
0.051617737859487534,
-0.2026553452014923,
-0.018544279038906097,
0.165192648768425,
0.3537205457687378,
-0.31258249282836914,
-0.0016021393239498138,
0.3266158998012543,
0.02623271942138672,
-0.14705687761306763,
0.32716071605682373,
0.23685739934444427,
0.038212623447179794,
-0.09287401288747787,
0.08460231125354767,
-0.12571708858013153,
-0.2067965716123581,
-0.19613179564476013,
0.03559253364801407,
-0.1949799656867981,
0.04345476254820824,
0.146163672208786,
-0.10052968561649323,
-0.031098300591111183,
0.005432761274278164,
0.056802380830049515,
-0.2555641531944275,
0.04726199805736542,
-0.08929561078548431,
-0.29507967829704285,
0.151903435587883,
-0.035331450402736664,
0.15273094177246094,
0.3464365303516388,
-0.14183376729488373,
-0.05356311798095703,
-0.10122115164995193,
-0.17345505952835083,
0.42548656463623047,
0.17947696149349213,
-0.16298511624336243,
0.14264798164367676,
-0.13068853318691254,
0.32827961444854736,
0.29949095845222473,
-0.3607582747936249,
-0.5405299663543701,
0.05270683020353317,
-0.054145749658346176,
-0.22143834829330444,
0.19650308787822723,
0.07040657103061676,
0.17570723593235016,
0.3011196553707123,
-0.12470679730176926,
0.489872545003891,
0.0861518457531929,
-0.03765130788087845,
-0.28088903427124023,
-0.22786524891853333,
-0.23498037457466125,
0.20251408219337463,
-0.03253380209207535,
-0.03152201324701309,
0.18622714281082153,
-0.40231892466545105,
0.228298157453537,
-0.12320221960544586,
-0.10151707381010056,
0.0769120380282402,
0.5077552199363708,
-0.01552646979689598,
0.25520431995391846,
-0.21520814299583435,
-0.11187005043029785,
0.1327938437461853,
0.12080273032188416,
0.051211949437856674,
-0.0339374877512455,
-0.15043829381465912,
-0.21362078189849854,
0.3484147787094116,
-0.05469880253076553,
0.0919676348567009,
0.059688083827495575,
-0.037047091871500015,
0.31815651059150696,
-0.0850583091378212,
0.015415002591907978,
0.03552524745464325,
-0.24385152757167816,
0.1465478390455246,
-0.2716313302516937,
0.3208805024623871,
-0.032860882580280304,
-0.3805811107158661,
0.11942033469676971,
0.20556317269802094,
-0.08903270959854126,
-0.18181967735290527,
-0.07360617816448212,
0.16529309749603271,
0.5369802713394165,
-0.3319186270236969,
0.40127047896385193,
-0.4914033114910126,
-0.20126475393772125,
0.028675902634859085,
0.12298236042261124,
0.007919545285403728,
0.1948738992214203,
0.22511222958564758,
-0.2553413212299347,
0.5796687006950378,
0.18260569870471954,
0.17181766033172607,
0.2342425137758255,
0.09028267860412598,
0.27383315563201904,
-0.021478967741131783,
0.05871078372001648,
-0.5810552835464478,
0.1004897952079773,
0.18539080023765564,
0.0979216992855072,
0.06950457394123077,
-0.4417731463909149,
0.4783916175365448,
0.32469281554222107,
0.02750588208436966,
0.060157496482133865,
0.20208798348903656,
0.0012342469999566674,
-0.029841922223567963,
0.15617230534553528,
0.08865032345056534,
0.10542545467615128,
0.3834066092967987,
-0.24552209675312042,
-0.3089355230331421,
-0.11278780549764633,
-0.15494783222675323,
0.04609813913702965,
0.282745361328125,
0.09503524750471115,
-0.23152844607830048,
-0.06542541831731796,
-0.1230182945728302,
-0.44278639554977417,
-0.3168037235736847,
-0.3278459310531616,
0.07934409379959106,
-0.1524321436882019,
-0.07547477632761002,
-0.35569068789482117,
-0.47956931591033936,
0.12749633193016052,
-0.27940139174461365,
0.2349439114332199,
-0.2363821566104889,
0.3113747537136078,
0.13766595721244812,
-0.3977280855178833,
0.3803594708442688,
-0.21534250676631927,
0.15337826311588287,
0.1594415009021759,
-0.0914635956287384,
0.06616172939538956,
-0.22481891512870789,
-0.3555644750595093,
0.06721088290214539,
-0.22443841397762299,
0.416957288980484,
0.3279317617416382,
0.07050427794456482,
0.10476314276456833,
-0.2933923602104187,
-0.056150883436203,
0.07061869651079178,
0.1898830533027649,
0.3483866751194,
0.5003443956375122,
0.018292713910341263,
-0.16861750185489655,
-0.0959162637591362,
0.13567885756492615,
-0.2281973958015442,
-0.14703355729579926,
-0.12933431565761566,
-0.23269328474998474,
-0.267297625541687,
-0.09586192667484283,
-0.20705337822437286,
-0.22200872004032135,
-0.15341416001319885,
0.2545154094696045,
0.2942781448364258,
0.14079535007476807,
0.01441841572523117,
0.3677749037742615,
0.16151507198810577,
-0.07542610913515091,
-0.18901976943016052,
-0.18834635615348816,
-0.15249378979206085,
0.07597402483224869,
-0.0876457691192627,
-0.5587396621704102,
-0.39211729168891907,
-0.30428919196128845,
-0.21660545468330383,
-0.04276313632726669,
-0.03660477325320244,
-0.2422896921634674,
-0.2850620746612549,
0.16687653958797455,
0.30615729093551636,
0.19300174713134766,
0.20419146120548248,
0.09569881111383438,
-0.20115822553634644,
-0.2221481055021286,
-0.27406179904937744,
0.42548856139183044,
0.037582721561193466,
0.01083644013851881,
0.13457131385803223,
0.3725030720233917,
-0.22379982471466064,
0.5474463701248169,
-0.23372982442378998,
-0.28129518032073975,
0.446330189704895,
-0.13573262095451355,
0.1867370754480362,
-0.1570165455341339,
-0.25128889083862305,
0.31745171546936035,
0.32529082894325256,
-0.13525618612766266,
0.15556983649730682,
0.06144774332642555,
0.10863889008760452,
0.23784546554088593,
0.3110246956348419,
-0.30560988187789917,
-0.1886695772409439,
-0.14232541620731354,
0.31425851583480835,
-0.6506518721580505,
0.13095137476921082,
0.3692966401576996,
-0.42794251441955566,
0.18989650905132294,
-0.12905244529247284,
-0.043612148612737656,
-0.014576144516468048,
0.09374206513166428,
-0.04705067723989487,
-0.24435202777385712,
-0.3554350733757019,
0.21945105493068695,
0.0033990521915256977,
0.13452686369419098,
0.012210555374622345,
-0.22198300063610077,
0.20000194013118744,
0.13601316511631012,
0.7037596702575684,
0.17728400230407715,
0.03972009941935539,
0.429582804441452,
0.0033736838959157467,
-0.4944850206375122,
-0.09492483735084534,
-0.08012880384922028,
0.28518912196159363,
-0.01722201518714428,
0.12430962920188904,
-0.029160143807530403,
-0.14674870669841766,
0.15744401514530182,
-0.12217380851507187,
0.14496612548828125,
0.06336372345685959,
-0.10241606086492538,
-0.41155365109443665,
-0.30813005566596985,
0.18787497282028198,
-0.08645646274089813,
0.13844895362854004,
-0.002554514678195119,
-0.25816234946250916,
-0.33921679854393005,
-0.21221403777599335,
-0.21393711864948273,
0.365607351064682,
0.3378792107105255,
0.02144920639693737,
0.2766580879688263,
0.1254582554101944,
0.432401180267334,
0.5160379409790039,
0.2783036231994629,
0.0850726068019867,
0.06833270192146301,
0.08808755874633789,
-0.02007216028869152,
0.1439068615436554,
0.09662844985723495,
-0.15463489294052124,
0.1508997678756714,
-0.30501115322113037,
0.14663255214691162,
0.2511242926120758,
0.2731728255748749,
0.07260429114103317,
0.03848365694284439,
0.15682245790958405,
-0.10869801789522171,
0.6431874632835388,
0.0004347229842096567,
-0.12557244300842285,
0.24296951293945312,
0.2799052894115448,
-0.1907208263874054,
0.6695951819419861,
0.08995616436004639,
0.6413209438323975,
-0.1067470908164978,
-0.01630476303398609,
0.3017454147338867,
0.024818213656544685,
0.5273269414901733,
0.20406411588191986,
0.16997285187244415,
-0.33997324109077454,
-0.03772001340985298,
0.12231443077325821,
-0.3299942910671234,
0.027533207088708878,
0.15300975739955902,
-0.12365097552537918,
-0.023728232830762863,
-0.009921587072312832,
-0.2541189193725586,
-0.1505139172077179,
0.01618567854166031,
0.21925368905067444,
-0.27510181069374084,
-0.4157639741897583,
0.09308192133903503,
0.23982840776443481,
0.3258480131626129,
0.16699983179569244,
-0.02190929837524891,
-0.45410633087158203,
-0.2514127790927887,
-0.08216345310211182,
0.16594529151916504,
-0.03550805523991585,
0.267778605222702,
0.19196240603923798,
-0.14045356214046478,
-0.4355275630950928,
-0.1198292076587677,
-0.045570407062768936,
-0.23657062649726868,
-0.24027122557163239,
0.23884952068328857,
0.15699626505374908,
-0.1458560675382614,
-0.0788005143404007,
-0.11988423019647598,
0.25906306505203247,
-0.010379374958574772,
-0.10285325348377228,
-0.1434108465909958,
0.15751220285892487,
-0.297463059425354,
0.014799180440604687,
-0.142001673579216,
-0.37638360261917114,
-0.23361742496490479,
-0.4976382553577423,
-0.008424166589975357,
0.044057004153728485,
-0.34552329778671265,
0.08426328748464584,
0.04904940724372864,
0.014221420511603355,
0.2214258760213852,
-0.09308308362960815,
-0.20632284879684448,
-0.2718770503997803,
0.45431602001190186,
0.1482102870941162,
0.33998575806617737,
0.29668527841567993,
0.3282047510147095,
-0.18111777305603027,
-0.25683656334877014,
-0.3141450583934784,
0.6544834971427917,
0.060064204037189484,
0.32614365220069885,
-0.03194589540362358,
-0.4317409098148346,
0.16106124222278595,
0.0701381266117096,
0.08861643075942993,
-0.2667873799800873,
-0.3422178626060486,
-0.19243037700653076,
-0.5020700097084045,
0.2653171718120575,
-0.10436061024665833,
0.3914378881454468,
-0.19635581970214844,
0.4097531735897064,
-0.17600764334201813,
-0.3530707061290741,
-0.2455226331949234,
-0.13673582673072815,
-0.45542800426483154,
-0.06256978958845139,
-0.08286844193935394,
0.005687595810741186,
0.03037956729531288,
-0.09167244285345078,
0.129081130027771,
-0.25931739807128906,
-0.13725674152374268,
-0.21778811514377594,
-0.043467603623867035,
0.07090236991643906,
0.16700243949890137,
-0.07626016438007355,
-0.04509861394762993,
-0.01253108587116003,
-0.22757434844970703,
-0.17669539153575897,
0.20994305610656738,
0.12562322616577148,
-0.2110847681760788,
0.16091857850551605,
0.06427385658025742,
-0.11070740222930908,
0.3296339511871338,
0.25895586609840393,
0.09087575972080231,
0.30450332164764404,
0.053716517984867096,
0.06952362507581711,
-0.20056270062923431,
-0.06990401446819305,
0.23356950283050537,
0.0022097702603787184,
-0.2449362576007843,
0.014022172428667545,
-0.16527189314365387,
-0.04817497730255127,
-0.4275047183036804,
0.3906456530094147,
0.39638668298721313,
0.4904312491416931,
0.038575030863285065,
-0.13909803330898285,
0.05639297515153885,
0.1600436121225357,
-0.3718586564064026,
-0.3287856876850128,
0.22816216945648193,
-0.13093243539333344,
0.11711480468511581,
-0.07015684247016907,
-0.2443433701992035,
0.18655644357204437,
-0.18047772347927094,
0.07525493204593658,
0.19768382608890533,
0.39257529377937317,
0.017341062426567078,
0.23622407019138336,
0.1314890831708908,
0.0730758011341095,
-0.12934160232543945,
0.2726691663265228,
0.5931246280670166,
0.6769065260887146,
-0.23671898245811462,
0.41580405831336975,
-0.17398230731487274,
0.21582944691181183,
0.011413900181651115,
-0.5743983387947083,
0.5215808749198914,
0.31993937492370605,
-0.1933402419090271,
0.018123092129826546,
0.0005265920190140605,
0.2990064322948456,
-0.06772811710834503,
-0.30458539724349976,
-0.3389095664024353,
0.07552533596754074,
-0.1552596539258957,
-0.3629920482635498,
-0.06809963285923004,
-0.05212812498211861,
0.06731946021318436,
-0.015442561358213425,
-0.08986090123653412,
-0.09718291461467743,
0.05453627184033394,
-0.3879935145378113,
0.05035662278532982,
-0.3088468909263611,
-0.15608011186122894,
-0.09973105043172836,
0.08517573773860931,
-0.08734004199504852,
-0.04415302351117134,
-0.2029729187488556,
-0.19945186376571655,
-0.11792761087417603,
0.05155195668339729,
0.2511034309864044,
0.22694706916809082,
-0.17907312512397766,
-0.21780695021152496,
-0.019693726673722267,
-0.27983734011650085,
-0.1152116134762764,
0.019609365612268448,
-0.07092183828353882,
-0.21601031720638275,
0.3523643910884857,
0.10611256957054138,
-0.09955526888370514,
-0.16512317955493927,
0.23588013648986816,
0.23410961031913757,
0.023595882579684258,
-0.23680786788463593,
-0.0644206553697586,
-0.023519594222307205,
0.01541990227997303,
0.031487610191106796,
-0.17125892639160156,
-0.03092583268880844,
0.03630918636918068,
-0.07448757439851761,
0.2010972946882248,
-0.040060821920633316,
0.08238504081964493,
-0.17109321057796478,
0.49896201491355896,
0.23927952349185944,
0.4229732155799866,
-0.15359535813331604,
0.10550139844417572,
-0.04487192630767822,
0.1246517151594162,
-0.29271337389945984,
-0.3792175054550171,
0.248886376619339,
0.2677118480205536,
-0.09648957848548889,
-0.04978066310286522,
0.06200395151972771,
0.5382649302482605,
0.30104127526283264,
0.3082967698574066,
-0.1558818817138672,
-0.15600034594535828,
-0.2846401333808899,
-0.14716728031635284,
0.2816559076309204,
-0.3534846007823944,
0.05047287046909332,
-0.36598989367485046,
0.061131563037633896,
-0.22330564260482788,
0.19446969032287598,
0.2040373682975769,
-0.11243885010480881,
0.1777690201997757,
0.13318204879760742,
0.10009314864873886,
-0.05542163923382759,
-0.019743485376238823,
-0.315116286277771,
-0.5067578554153442,
-0.155032217502594,
-0.11555440723896027,
-0.04592343792319298,
-0.08251545578241348,
0.012453601695597172,
0.061013855040073395,
-0.03250774368643761,
0.16079674661159515,
0.33558395504951477,
0.3394601047039032,
0.07523170858621597,
0.3501094579696655,
-0.3551529049873352,
0.001374196377582848,
-0.03217403218150139,
-0.06837348639965057,
-0.1327979862689972,
0.2620391547679901,
-0.009076482616364956,
-0.25885337591171265,
0.4415532946586609,
-0.4188774824142456,
0.10546547174453735,
-0.3958960473537445,
0.16866864264011383,
0.06333169341087341,
-0.31171315908432007,
-0.05575866624712944,
0.22388885915279388,
0.1746411770582199,
0.20635265111923218,
-0.17642353475093842,
0.09505457431077957,
0.4623335301876068,
-0.07989972829818726,
-0.13124814629554749,
0.6348666548728943,
0.22947128117084503,
-0.017339495941996574,
0.20820635557174683,
-0.04515671357512474
] |
https://github.com/huggingface/datasets/issues/1803
|
Querying examples from big datasets is slower than small datasets
|
Hello, @lhoestq / @gaceladri : We have been seeing similar behavior with bigger datasets, where querying time increases. Are you folks aware of any solution that fixes this problem yet?
|
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets.
For example
```python
from datasets import load_dataset
b1 = load_dataset("bookcorpus", split="train[:1%]")
b50 = load_dataset("bookcorpus", split="train[:50%]")
b100 = load_dataset("bookcorpus", split="train[:100%]")
%timeit _ = b1[-1]
# 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
%timeit _ = b50[-1]
# 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
%timeit _ = b100[-1]
# 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
It looks like the time to fetch the example increases with the size of the dataset.
This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample.
Maybe switching to the Arrow IPC file format could help fixing this issue.
Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue:
> We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer.
cc @gaceladri since it can help speed up your training when this one is fixed.
| 30 |
Querying examples from big datasets is slower than small datasets
|
[
-0.29294827580451965,
0.010804066434502602,
-0.28593552112579346,
0.32023122906684875,
-0.22060038149356842,
-0.10886016488075256,
0.06291760504245758,
0.41048818826675415,
-0.00010245530575048178,
0.19125591218471527,
0.08894886821508408,
-0.08140518516302109,
0.11951836943626404,
0.030837567523121834,
-0.14676812291145325,
-0.11632349342107773,
-0.10714942216873169,
0.11984606087207794,
-0.02274508588016033,
-0.18480873107910156,
0.08861593902111053,
-0.05285263806581497,
-0.10749423503875732,
-0.06810591369867325,
-0.1351524144411087,
-0.23325371742248535,
0.11015773564577103,
0.06121455132961273,
-0.08044805377721786,
-0.023192189633846283,
-0.1223355084657669,
-0.07899336516857147,
0.14992162585258484,
0.3517911434173584,
-0.00010170215682592243,
-0.08703677356243134,
0.04305445775389671,
0.08524998277425766,
-0.1296110451221466,
0.38848257064819336,
-0.14611904323101044,
-0.2367352396249771,
-0.14079521596431732,
-0.19065584242343903,
-0.13747961819171906,
0.008307304233312607,
-0.14041206240653992,
-0.2847631871700287,
-0.05047497898340225,
0.29251763224601746,
0.307234525680542,
0.20196431875228882,
-0.4030708074569702,
-0.3452390134334564,
0.16228769719600677,
0.1764417439699173,
-0.22884425520896912,
0.06833872199058533,
0.47532182931900024,
0.0005236589931882918,
-0.2491319626569748,
0.3678521513938904,
-0.098615363240242,
0.23964759707450867,
-0.2709906995296478,
-0.04180534929037094,
-0.27776768803596497,
0.28687795996665955,
0.5296527147293091,
0.37385377287864685,
0.2563128173351288,
0.18794234097003937,
-0.26172542572021484,
-0.37235769629478455,
-0.21361464262008667,
-0.1521124690771103,
-0.09564653038978577,
0.0694616362452507,
0.021210618317127228,
0.11024290323257446,
-0.2810235917568207,
0.07374895364046097,
-0.010643879882991314,
-0.07527552545070648,
-0.24929724633693695,
-0.09437546133995056,
-0.07497462630271912,
-0.06943406164646149,
-0.012726099230349064,
-0.36768338084220886,
0.17762576043605804,
-0.08284979313611984,
0.20592918992042542,
-0.23401093482971191,
-0.29031383991241455,
-0.14477363228797913,
0.47463780641555786,
0.08593388646841049,
0.2652507722377777,
-0.08631426841020584,
0.18294645845890045,
0.3183686137199402,
0.41042548418045044,
-0.18328367173671722,
0.15595470368862152,
-0.08559092879295349,
-0.18146097660064697,
-0.0064041512086987495,
0.2506316602230072,
0.06760896742343903,
-0.47256001830101013,
0.024315526708960533,
-0.2339879274368286,
-0.2585587799549103,
-0.04847145453095436,
-0.10013271123170853,
-0.12555766105651855,
-0.125649556517601,
-0.18540023267269135,
0.09240671992301941,
-0.17883683741092682,
-0.04275106266140938,
0.0933028906583786,
0.5274905562400818,
-0.16624975204467773,
-0.21901948750019073,
-0.3120005130767822,
0.08122431486845016,
-0.24967889487743378,
-0.2709645926952362,
-0.3044944107532501,
-0.12440084666013718,
0.15372775495052338,
-0.06701395660638809,
0.23476071655750275,
0.0301975104957819,
0.309287428855896,
-0.10260027647018433,
-0.0588899701833725,
0.01685016043484211,
0.3760836124420166,
-0.37901607155799866,
0.1666998714208603,
-0.05920800194144249,
-0.03427237272262573,
0.21984396874904633,
0.012591090984642506,
0.2744649052619934,
-0.3761620819568634,
-0.06679888069629669,
-0.2155299186706543,
-0.38421374559402466,
0.2822709083557129,
0.22442670166492462,
0.024272141978144646,
-0.07298461347818375,
0.10971657186746597,
0.488458514213562,
-0.09186509996652603,
-0.14230437576770782,
-0.2528530955314636,
0.024310030043125153,
-0.1741146296262741,
0.06980257481336594,
0.13629089295864105,
0.3051552474498749,
-0.23533518612384796,
0.36642903089523315,
-0.28208404779434204,
0.3566223084926605,
0.1764603555202484,
0.4939265251159668,
-0.3490293025970459,
0.22978998720645905,
-0.07272014021873474,
-0.006064318120479584,
0.3481157720088959,
-0.10892127454280853,
-0.46713829040527344,
0.4355161786079407,
-0.13153201341629028,
-0.02521357499063015,
0.38405829668045044,
0.1517953872680664,
0.4197046756744385,
-0.14695920050144196,
0.22471392154693604,
0.25043201446533203,
-0.044283196330070496,
0.11214528977870941,
-0.14773288369178772,
-0.08413124084472656,
-0.006540204398334026,
0.24457252025604248,
-0.06093785539269447,
0.09644106775522232,
0.18330609798431396,
-0.1298660933971405,
0.19192685186862946,
-0.09019625931978226,
-0.2461688369512558,
0.33993226289749146,
-0.03865596652030945,
-0.2881333827972412,
-0.10077393054962158,
-0.003370128106325865,
0.134121835231781,
0.13125722110271454,
0.05030541121959686,
-0.08991997689008713,
0.2822120487689972,
0.00959367211908102,
-0.23911306262016296,
0.007424752693623304,
0.08514129370450974,
0.047096025198698044,
0.20172694325447083,
-0.0842331275343895,
0.4285655915737152,
-0.07948412001132965,
0.24445393681526184,
-0.1292431354522705,
-0.22396814823150635,
-0.3461441695690155,
-0.15176282823085785,
-0.009475551545619965,
0.1851750910282135,
-0.06057608127593994,
0.2441464215517044,
-0.1353926658630371,
0.11670807003974915,
0.03662274032831192,
-0.010112026706337929,
-0.03349030390381813,
0.047138895839452744,
0.062435150146484375,
0.3682514429092407,
0.18168416619300842,
-0.025256961584091187,
0.03897765651345253,
0.3679153323173523,
0.13785606622695923,
0.07421018183231354,
0.05750274285674095,
-0.4828164875507355,
0.46246257424354553,
0.343921035528183,
0.27193307876586914,
0.3876926600933075,
-0.36155879497528076,
0.289981484413147,
0.07740690559148788,
0.2348126769065857,
-0.13103261590003967,
0.35142385959625244,
-0.007698945701122284,
0.13087208569049835,
0.2638836205005646,
-0.3743615746498108,
0.27314266562461853,
0.20340770483016968,
-0.09093308448791504,
0.16139397025108337,
-0.0016647347947582603,
-0.1111491248011589,
-0.07529129832983017,
0.28372618556022644,
0.00849791057407856,
0.30994734168052673,
0.29409340023994446,
0.2956187129020691,
-0.2988811731338501,
0.1082366555929184,
-0.27581799030303955,
0.12740974128246307,
0.028108274564146996,
0.11932335048913956,
-0.1093706265091896,
0.30024248361587524,
-0.13860300183296204,
-0.21552133560180664,
-0.2052994966506958,
0.1644652634859085,
0.011905553750693798,
-0.05293377861380577,
0.13908113539218903,
-0.2485041320323944,
-0.15810731053352356,
0.2475406527519226,
0.27647897601127625,
0.2144610732793808,
-0.12790052592754364,
0.04259093105792999,
-0.049773477017879486,
-0.19721800088882446,
-0.11158972978591919,
-0.07460998743772507,
0.17922663688659668,
0.2787413001060486,
-0.11003334820270538,
0.21946899592876434,
-0.16329535841941833,
-0.17027217149734497,
0.2507091760635376,
-0.0638478621840477,
0.37180382013320923,
0.1696826070547104,
-0.1642351746559143,
0.017671510577201843,
-0.46032100915908813,
-0.2820512652397156,
-0.03864021599292755,
0.17441076040267944,
0.19875603914260864,
-0.03224131837487221,
0.04729586839675903,
-0.15424534678459167,
-0.01281901728361845,
0.03029673360288143,
-0.19345301389694214,
-0.0028151890728622675,
0.03770521655678749,
-0.11494264006614685,
0.1451089084148407,
0.25544095039367676,
-0.2845808267593384,
-0.12851044535636902,
-0.36288243532180786,
0.08356055617332458,
0.2254227101802826,
0.2052966207265854,
-0.05505160987377167,
0.1848835051059723,
-0.021739445626735687,
0.027459576725959778,
0.34627607464790344,
-0.17339478433132172,
-0.16854552924633026,
0.35270076990127563,
-0.18042133748531342,
-0.2597983777523041,
-0.5003503561019897,
-0.1990496963262558,
-0.05520470812916756,
0.1613956242799759,
-0.3210582733154297,
0.03651665896177292,
-0.5884870290756226,
0.10687553137540817,
0.29822373390197754,
0.062427133321762085,
0.03867858648300171,
-0.3231408894062042,
-0.3732885420322418,
-0.10333145409822464,
-0.1682739555835724,
0.021379580721259117,
-0.14593835175037384,
0.07192245125770569,
-0.2458571493625641,
0.4123747944831848,
-0.07565414160490036,
0.28179308772087097,
0.12934885919094086,
-0.07605025917291641,
0.1729838103055954,
0.10463909804821014,
0.12689568102359772,
-0.1718292236328125,
-0.06396801769733429,
0.2036212980747223,
0.011292473413050175,
-0.21760961413383484,
0.4841361939907074,
0.14109142124652863,
-0.181236132979393,
0.07782141119241714,
-0.08034304529428482,
-0.1161985769867897,
-0.1682170331478119,
0.02480853907763958,
0.08344853669404984,
0.09487728029489517,
0.31031855940818787,
0.22604942321777344,
-0.6043520569801331,
0.11630622297525406,
0.002907105255872011,
-0.42803043127059937,
0.02952546812593937,
-0.24106770753860474,
-0.5495536923408508,
0.2568937838077545,
-0.397985577583313,
0.16336661577224731,
-0.12471053004264832,
0.18873172998428345,
0.007142884656786919,
-0.23972755670547485,
0.020222356542944908,
0.18235309422016144,
0.4024086892604828,
-0.03578244894742966,
0.0675097182393074,
-0.07492904365062714,
-0.4613981246948242,
-0.24063627421855927,
0.11687884479761124,
-0.4523965120315552,
0.2578601837158203,
0.19171564280986786,
0.24973945319652557,
-0.13630615174770355,
-0.0022496788296848536,
0.2491547018289566,
0.2599946856498718,
0.23712559044361115,
0.016931427642703056,
-0.002454685280099511,
-0.3266735076904297,
-0.00921562872827053,
0.07817496359348297,
0.005802696105092764,
-0.0035223530139774084,
-0.11708422750234604,
-0.24712787568569183,
-0.46166422963142395,
0.0018762630643323064,
0.24073539674282074,
0.2653103768825531,
0.16233065724372864,
-0.12068960070610046,
0.4809147119522095,
-0.20023879408836365,
0.23081474006175995,
0.38019514083862305,
0.3398760259151459,
0.10585594177246094,
-0.018995113670825958,
0.4395923316478729,
0.17415650188922882,
0.0885753333568573,
0.4146912097930908,
-0.004563990514725447,
0.19930872321128845,
-0.08782001584768295,
0.3678267002105713,
-0.14046183228492737,
0.06203412264585495,
0.2292090207338333,
0.14546474814414978,
-0.1542668640613556,
-0.13779890537261963,
0.4323759078979492,
0.23482951521873474,
-0.17741194367408752,
-0.09656576812267303,
-0.15965299308300018,
0.10774652659893036,
-0.053439781069755554,
-0.09111252427101135,
0.4777868390083313,
-0.055365096777677536,
0.004694439470767975,
-0.07212940603494644,
-0.03410493955016136,
0.31267276406288147,
0.0230729877948761,
0.10083174705505371,
-0.07148150354623795,
-0.616347074508667,
0.34192022681236267,
-0.1693018525838852,
0.03011898137629032,
0.14594461023807526,
0.035777006298303604,
0.021589238196611404,
-0.09812314063310623,
0.11275739222764969,
-0.07626727223396301,
0.24552127718925476,
-0.041558779776096344,
-0.1035148873925209,
-0.44249895215034485,
0.1763966977596283,
0.3131811022758484,
-0.05565012991428375,
0.01504038367420435,
0.016683606430888176,
-0.2784525752067566,
0.06403638422489166,
-0.032943423837423325,
-0.07203692942857742,
-0.09447012096643448,
0.28340497612953186,
-0.030271019786596298,
-0.43156877160072327,
0.03909863904118538,
-0.07211219519376755,
-0.1375727653503418,
0.2596932053565979,
-0.09679704159498215,
0.27671512961387634,
-0.028284141793847084,
0.2419108748435974,
0.4105429947376251,
-0.24665027856826782,
-0.09823348373174667,
0.026210449635982513,
0.0591534748673439,
0.07842285931110382,
-0.10671119391918182,
-0.04228822514414787,
-0.16899418830871582,
0.23190627992153168,
-0.20439575612545013,
-0.22442443668842316,
-0.3483313322067261,
-0.10730264335870743,
-0.25785398483276367,
-0.29175078868865967,
0.22499048709869385,
0.056828174740076065,
0.16469436883926392,
0.26009634137153625,
0.3615201711654663,
-0.26657581329345703,
-0.32697805762290955,
0.5027526617050171,
0.16720494627952576,
0.11595455557107925,
0.2708434462547302,
0.0077417450957000256,
-0.24767456948757172,
-0.28673502802848816,
0.13195110857486725,
0.3307124078273773,
-0.11595014482736588,
0.23216958343982697,
-0.2615149915218353,
-0.3058101534843445,
0.36849817633628845,
-0.041156768798828125,
-0.051480356603860855,
-0.09273946285247803,
-0.1891252100467682,
-0.014152535237371922,
-0.01718205027282238,
0.20967407524585724,
-0.05520041659474373,
-0.09788455814123154,
-0.27796483039855957,
-0.344628244638443,
-0.4261714816093445,
0.2716333568096161,
-0.4040451943874359,
0.07526989281177521,
-0.21996113657951355,
0.15112942457199097,
-0.26264676451683044,
-0.08015038818120956,
-0.0025501041673123837,
0.2540595829486847,
0.22619356215000153,
-0.08554207533597946,
-0.18989549577236176,
-0.3912588655948639,
0.3192967176437378,
0.08192213624715805,
-0.17516587674617767,
-0.13019870221614838,
0.2103985697031021,
-0.10981898009777069,
-0.23979192972183228,
-0.3004346489906311,
0.16776278614997864,
-0.027514610439538956,
0.035270676016807556,
-0.4798712730407715,
-0.11050941795110703,
-0.2648237645626068,
-0.041288260370492935,
0.2117106020450592,
-0.12754258513450623,
0.07863803207874298,
-0.019340097904205322,
-0.008834552951157093,
0.22475570440292358,
-0.16428977251052856,
0.2553293704986572,
0.06769360601902008,
0.1059640422463417,
-0.04110301285982132,
0.3298801779747009,
-0.1510847508907318,
-0.005252537317574024,
0.42785727977752686,
0.22548384964466095,
0.2689395248889923,
0.22664766013622284,
-0.14860953390598297,
0.037359271198511124,
0.32872772216796875,
-0.31201672554016113,
-0.31185898184776306,
0.021881258115172386,
-0.20200634002685547,
0.41287732124328613,
0.1154947429895401,
0.22290822863578796,
0.04760146141052246,
0.17487893998622894,
-0.2115563154220581,
0.23400793969631195,
0.25213196873664856,
-0.017640432342886925,
0.4129241406917572,
0.34295138716697693,
-0.2479037344455719,
0.14865538477897644,
0.20269675552845,
0.3381254971027374,
0.37331581115722656,
0.1683574616909027,
0.6754822134971619,
0.12973780930042267,
0.13456131517887115,
-0.021709037944674492,
-0.32538145780563354,
0.28837355971336365,
0.23695437610149384,
-0.09580660611391068,
-0.051022719591856,
-0.2191731035709381,
-0.12180367857217789,
-0.12723834812641144,
0.1384173482656479,
-0.4111368656158447,
-0.21032924950122833,
0.04523297771811485,
-0.15565770864486694,
0.04815046489238739,
-0.06851627677679062,
-0.028230389580130577,
-0.09007276594638824,
-0.24412137269973755,
0.04002203047275543,
0.004800765309482813,
-0.23134379088878632,
0.10813447833061218,
-0.34279489517211914,
0.10637007653713226,
-0.2492353767156601,
0.024251354858279228,
-0.16416533291339874,
0.27717095613479614,
-0.024469027295708656,
0.06235948204994202,
0.22784358263015747,
0.24999885261058807,
0.2541912794113159,
0.22114668786525726,
0.03012124076485634,
-0.11335534602403641,
-0.09015562385320663,
-0.24376097321510315,
-0.18682217597961426,
0.00224379007704556,
-0.08474364876747131,
-0.16691167652606964,
0.345363050699234,
0.1054161787033081,
-0.2746562957763672,
-0.09275929629802704,
0.12155326455831528,
-0.37411776185035706,
-0.27351024746894836,
-0.2993069589138031,
-0.24849969148635864,
-0.16006875038146973,
0.010108835995197296,
-0.14169776439666748,
-0.1105463057756424,
-0.16446423530578613,
0.3575717806816101,
-0.5614528059959412,
0.2240133285522461,
0.17998281121253967,
0.16926400363445282,
-0.5213890075683594,
0.5753262042999268,
0.17822125554084778,
0.46049991250038147,
-0.19106490910053253,
-0.057508960366249084,
-0.30101698637008667,
0.14551611244678497,
-0.5551979541778564,
-0.016471022740006447,
0.19522900879383087,
0.46519002318382263,
0.19168609380722046,
0.07630308717489243,
-0.013001365587115288,
0.113785021007061,
-0.0675366222858429,
-0.08476152271032333,
-0.49697792530059814,
-0.1270877867937088,
-0.09012049436569214,
0.06075203791260719,
0.03476250171661377,
-0.4763006269931793,
0.27639463543891907,
-0.3855689465999603,
0.28158146142959595,
-0.04310943931341171,
-0.034940000623464584,
0.09002453833818436,
0.23234592378139496,
0.20558689534664154,
0.1378335952758789,
0.25045934319496155,
-0.023713601753115654,
-0.12938298285007477,
-0.21128211915493011,
-0.07525574415922165,
0.1577514261007309,
0.3180830478668213,
0.20817463099956512,
-0.16424116492271423,
0.006998680531978607,
0.0801749899983406,
0.3643002510070801,
0.2588428258895874,
-0.04918583482503891,
0.15858732163906097,
0.14618933200836182,
0.09801927208900452,
-0.19928765296936035,
0.24860899150371552,
0.11606481671333313,
-0.12636171281337738,
-0.11137740314006805,
-0.07681931555271149,
0.006497800815850496,
-0.12881390750408173,
0.2902989983558655,
-0.18569013476371765,
-0.02827502228319645,
-0.46624481678009033,
0.4764026999473572,
0.20057839155197144,
0.2184666097164154,
0.19804832339286804,
0.0547013096511364,
0.34418806433677673,
0.05658283829689026,
0.09217935055494308,
0.18586766719818115,
0.07063981890678406,
-0.14884862303733826,
-0.001057625631801784,
0.2093498855829239,
-0.21633626520633698,
-0.23411323130130768,
-0.08275134861469269,
-0.07409659773111343
] |
https://github.com/huggingface/datasets/issues/1803
|
Querying examples from big datasets is slower than small datasets
|
Hi ! I'm pretty sure that it can be fixed by using the Arrow IPC file format instead of the raw streaming format but I haven't tested yet.
I'll take a look at it soon and let you know
|
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets.
For example
```python
from datasets import load_dataset
b1 = load_dataset("bookcorpus", split="train[:1%]")
b50 = load_dataset("bookcorpus", split="train[:50%]")
b100 = load_dataset("bookcorpus", split="train[:100%]")
%timeit _ = b1[-1]
# 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
%timeit _ = b50[-1]
# 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
%timeit _ = b100[-1]
# 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
It looks like the time to fetch the example increases with the size of the dataset.
This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample.
Maybe switching to the Arrow IPC file format could help fixing this issue.
Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue:
> We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer.
cc @gaceladri since it can help speed up your training when this one is fixed.
| 39 |
Querying examples from big datasets is slower than small datasets
|
[
-0.29294827580451965,
0.010804066434502602,
-0.28593552112579346,
0.32023122906684875,
-0.22060038149356842,
-0.10886016488075256,
0.06291760504245758,
0.41048818826675415,
-0.00010245530575048178,
0.19125591218471527,
0.08894886821508408,
-0.08140518516302109,
0.11951836943626404,
0.030837567523121834,
-0.14676812291145325,
-0.11632349342107773,
-0.10714942216873169,
0.11984606087207794,
-0.02274508588016033,
-0.18480873107910156,
0.08861593902111053,
-0.05285263806581497,
-0.10749423503875732,
-0.06810591369867325,
-0.1351524144411087,
-0.23325371742248535,
0.11015773564577103,
0.06121455132961273,
-0.08044805377721786,
-0.023192189633846283,
-0.1223355084657669,
-0.07899336516857147,
0.14992162585258484,
0.3517911434173584,
-0.00010170215682592243,
-0.08703677356243134,
0.04305445775389671,
0.08524998277425766,
-0.1296110451221466,
0.38848257064819336,
-0.14611904323101044,
-0.2367352396249771,
-0.14079521596431732,
-0.19065584242343903,
-0.13747961819171906,
0.008307304233312607,
-0.14041206240653992,
-0.2847631871700287,
-0.05047497898340225,
0.29251763224601746,
0.307234525680542,
0.20196431875228882,
-0.4030708074569702,
-0.3452390134334564,
0.16228769719600677,
0.1764417439699173,
-0.22884425520896912,
0.06833872199058533,
0.47532182931900024,
0.0005236589931882918,
-0.2491319626569748,
0.3678521513938904,
-0.098615363240242,
0.23964759707450867,
-0.2709906995296478,
-0.04180534929037094,
-0.27776768803596497,
0.28687795996665955,
0.5296527147293091,
0.37385377287864685,
0.2563128173351288,
0.18794234097003937,
-0.26172542572021484,
-0.37235769629478455,
-0.21361464262008667,
-0.1521124690771103,
-0.09564653038978577,
0.0694616362452507,
0.021210618317127228,
0.11024290323257446,
-0.2810235917568207,
0.07374895364046097,
-0.010643879882991314,
-0.07527552545070648,
-0.24929724633693695,
-0.09437546133995056,
-0.07497462630271912,
-0.06943406164646149,
-0.012726099230349064,
-0.36768338084220886,
0.17762576043605804,
-0.08284979313611984,
0.20592918992042542,
-0.23401093482971191,
-0.29031383991241455,
-0.14477363228797913,
0.47463780641555786,
0.08593388646841049,
0.2652507722377777,
-0.08631426841020584,
0.18294645845890045,
0.3183686137199402,
0.41042548418045044,
-0.18328367173671722,
0.15595470368862152,
-0.08559092879295349,
-0.18146097660064697,
-0.0064041512086987495,
0.2506316602230072,
0.06760896742343903,
-0.47256001830101013,
0.024315526708960533,
-0.2339879274368286,
-0.2585587799549103,
-0.04847145453095436,
-0.10013271123170853,
-0.12555766105651855,
-0.125649556517601,
-0.18540023267269135,
0.09240671992301941,
-0.17883683741092682,
-0.04275106266140938,
0.0933028906583786,
0.5274905562400818,
-0.16624975204467773,
-0.21901948750019073,
-0.3120005130767822,
0.08122431486845016,
-0.24967889487743378,
-0.2709645926952362,
-0.3044944107532501,
-0.12440084666013718,
0.15372775495052338,
-0.06701395660638809,
0.23476071655750275,
0.0301975104957819,
0.309287428855896,
-0.10260027647018433,
-0.0588899701833725,
0.01685016043484211,
0.3760836124420166,
-0.37901607155799866,
0.1666998714208603,
-0.05920800194144249,
-0.03427237272262573,
0.21984396874904633,
0.012591090984642506,
0.2744649052619934,
-0.3761620819568634,
-0.06679888069629669,
-0.2155299186706543,
-0.38421374559402466,
0.2822709083557129,
0.22442670166492462,
0.024272141978144646,
-0.07298461347818375,
0.10971657186746597,
0.488458514213562,
-0.09186509996652603,
-0.14230437576770782,
-0.2528530955314636,
0.024310030043125153,
-0.1741146296262741,
0.06980257481336594,
0.13629089295864105,
0.3051552474498749,
-0.23533518612384796,
0.36642903089523315,
-0.28208404779434204,
0.3566223084926605,
0.1764603555202484,
0.4939265251159668,
-0.3490293025970459,
0.22978998720645905,
-0.07272014021873474,
-0.006064318120479584,
0.3481157720088959,
-0.10892127454280853,
-0.46713829040527344,
0.4355161786079407,
-0.13153201341629028,
-0.02521357499063015,
0.38405829668045044,
0.1517953872680664,
0.4197046756744385,
-0.14695920050144196,
0.22471392154693604,
0.25043201446533203,
-0.044283196330070496,
0.11214528977870941,
-0.14773288369178772,
-0.08413124084472656,
-0.006540204398334026,
0.24457252025604248,
-0.06093785539269447,
0.09644106775522232,
0.18330609798431396,
-0.1298660933971405,
0.19192685186862946,
-0.09019625931978226,
-0.2461688369512558,
0.33993226289749146,
-0.03865596652030945,
-0.2881333827972412,
-0.10077393054962158,
-0.003370128106325865,
0.134121835231781,
0.13125722110271454,
0.05030541121959686,
-0.08991997689008713,
0.2822120487689972,
0.00959367211908102,
-0.23911306262016296,
0.007424752693623304,
0.08514129370450974,
0.047096025198698044,
0.20172694325447083,
-0.0842331275343895,
0.4285655915737152,
-0.07948412001132965,
0.24445393681526184,
-0.1292431354522705,
-0.22396814823150635,
-0.3461441695690155,
-0.15176282823085785,
-0.009475551545619965,
0.1851750910282135,
-0.06057608127593994,
0.2441464215517044,
-0.1353926658630371,
0.11670807003974915,
0.03662274032831192,
-0.010112026706337929,
-0.03349030390381813,
0.047138895839452744,
0.062435150146484375,
0.3682514429092407,
0.18168416619300842,
-0.025256961584091187,
0.03897765651345253,
0.3679153323173523,
0.13785606622695923,
0.07421018183231354,
0.05750274285674095,
-0.4828164875507355,
0.46246257424354553,
0.343921035528183,
0.27193307876586914,
0.3876926600933075,
-0.36155879497528076,
0.289981484413147,
0.07740690559148788,
0.2348126769065857,
-0.13103261590003967,
0.35142385959625244,
-0.007698945701122284,
0.13087208569049835,
0.2638836205005646,
-0.3743615746498108,
0.27314266562461853,
0.20340770483016968,
-0.09093308448791504,
0.16139397025108337,
-0.0016647347947582603,
-0.1111491248011589,
-0.07529129832983017,
0.28372618556022644,
0.00849791057407856,
0.30994734168052673,
0.29409340023994446,
0.2956187129020691,
-0.2988811731338501,
0.1082366555929184,
-0.27581799030303955,
0.12740974128246307,
0.028108274564146996,
0.11932335048913956,
-0.1093706265091896,
0.30024248361587524,
-0.13860300183296204,
-0.21552133560180664,
-0.2052994966506958,
0.1644652634859085,
0.011905553750693798,
-0.05293377861380577,
0.13908113539218903,
-0.2485041320323944,
-0.15810731053352356,
0.2475406527519226,
0.27647897601127625,
0.2144610732793808,
-0.12790052592754364,
0.04259093105792999,
-0.049773477017879486,
-0.19721800088882446,
-0.11158972978591919,
-0.07460998743772507,
0.17922663688659668,
0.2787413001060486,
-0.11003334820270538,
0.21946899592876434,
-0.16329535841941833,
-0.17027217149734497,
0.2507091760635376,
-0.0638478621840477,
0.37180382013320923,
0.1696826070547104,
-0.1642351746559143,
0.017671510577201843,
-0.46032100915908813,
-0.2820512652397156,
-0.03864021599292755,
0.17441076040267944,
0.19875603914260864,
-0.03224131837487221,
0.04729586839675903,
-0.15424534678459167,
-0.01281901728361845,
0.03029673360288143,
-0.19345301389694214,
-0.0028151890728622675,
0.03770521655678749,
-0.11494264006614685,
0.1451089084148407,
0.25544095039367676,
-0.2845808267593384,
-0.12851044535636902,
-0.36288243532180786,
0.08356055617332458,
0.2254227101802826,
0.2052966207265854,
-0.05505160987377167,
0.1848835051059723,
-0.021739445626735687,
0.027459576725959778,
0.34627607464790344,
-0.17339478433132172,
-0.16854552924633026,
0.35270076990127563,
-0.18042133748531342,
-0.2597983777523041,
-0.5003503561019897,
-0.1990496963262558,
-0.05520470812916756,
0.1613956242799759,
-0.3210582733154297,
0.03651665896177292,
-0.5884870290756226,
0.10687553137540817,
0.29822373390197754,
0.062427133321762085,
0.03867858648300171,
-0.3231408894062042,
-0.3732885420322418,
-0.10333145409822464,
-0.1682739555835724,
0.021379580721259117,
-0.14593835175037384,
0.07192245125770569,
-0.2458571493625641,
0.4123747944831848,
-0.07565414160490036,
0.28179308772087097,
0.12934885919094086,
-0.07605025917291641,
0.1729838103055954,
0.10463909804821014,
0.12689568102359772,
-0.1718292236328125,
-0.06396801769733429,
0.2036212980747223,
0.011292473413050175,
-0.21760961413383484,
0.4841361939907074,
0.14109142124652863,
-0.181236132979393,
0.07782141119241714,
-0.08034304529428482,
-0.1161985769867897,
-0.1682170331478119,
0.02480853907763958,
0.08344853669404984,
0.09487728029489517,
0.31031855940818787,
0.22604942321777344,
-0.6043520569801331,
0.11630622297525406,
0.002907105255872011,
-0.42803043127059937,
0.02952546812593937,
-0.24106770753860474,
-0.5495536923408508,
0.2568937838077545,
-0.397985577583313,
0.16336661577224731,
-0.12471053004264832,
0.18873172998428345,
0.007142884656786919,
-0.23972755670547485,
0.020222356542944908,
0.18235309422016144,
0.4024086892604828,
-0.03578244894742966,
0.0675097182393074,
-0.07492904365062714,
-0.4613981246948242,
-0.24063627421855927,
0.11687884479761124,
-0.4523965120315552,
0.2578601837158203,
0.19171564280986786,
0.24973945319652557,
-0.13630615174770355,
-0.0022496788296848536,
0.2491547018289566,
0.2599946856498718,
0.23712559044361115,
0.016931427642703056,
-0.002454685280099511,
-0.3266735076904297,
-0.00921562872827053,
0.07817496359348297,
0.005802696105092764,
-0.0035223530139774084,
-0.11708422750234604,
-0.24712787568569183,
-0.46166422963142395,
0.0018762630643323064,
0.24073539674282074,
0.2653103768825531,
0.16233065724372864,
-0.12068960070610046,
0.4809147119522095,
-0.20023879408836365,
0.23081474006175995,
0.38019514083862305,
0.3398760259151459,
0.10585594177246094,
-0.018995113670825958,
0.4395923316478729,
0.17415650188922882,
0.0885753333568573,
0.4146912097930908,
-0.004563990514725447,
0.19930872321128845,
-0.08782001584768295,
0.3678267002105713,
-0.14046183228492737,
0.06203412264585495,
0.2292090207338333,
0.14546474814414978,
-0.1542668640613556,
-0.13779890537261963,
0.4323759078979492,
0.23482951521873474,
-0.17741194367408752,
-0.09656576812267303,
-0.15965299308300018,
0.10774652659893036,
-0.053439781069755554,
-0.09111252427101135,
0.4777868390083313,
-0.055365096777677536,
0.004694439470767975,
-0.07212940603494644,
-0.03410493955016136,
0.31267276406288147,
0.0230729877948761,
0.10083174705505371,
-0.07148150354623795,
-0.616347074508667,
0.34192022681236267,
-0.1693018525838852,
0.03011898137629032,
0.14594461023807526,
0.035777006298303604,
0.021589238196611404,
-0.09812314063310623,
0.11275739222764969,
-0.07626727223396301,
0.24552127718925476,
-0.041558779776096344,
-0.1035148873925209,
-0.44249895215034485,
0.1763966977596283,
0.3131811022758484,
-0.05565012991428375,
0.01504038367420435,
0.016683606430888176,
-0.2784525752067566,
0.06403638422489166,
-0.032943423837423325,
-0.07203692942857742,
-0.09447012096643448,
0.28340497612953186,
-0.030271019786596298,
-0.43156877160072327,
0.03909863904118538,
-0.07211219519376755,
-0.1375727653503418,
0.2596932053565979,
-0.09679704159498215,
0.27671512961387634,
-0.028284141793847084,
0.2419108748435974,
0.4105429947376251,
-0.24665027856826782,
-0.09823348373174667,
0.026210449635982513,
0.0591534748673439,
0.07842285931110382,
-0.10671119391918182,
-0.04228822514414787,
-0.16899418830871582,
0.23190627992153168,
-0.20439575612545013,
-0.22442443668842316,
-0.3483313322067261,
-0.10730264335870743,
-0.25785398483276367,
-0.29175078868865967,
0.22499048709869385,
0.056828174740076065,
0.16469436883926392,
0.26009634137153625,
0.3615201711654663,
-0.26657581329345703,
-0.32697805762290955,
0.5027526617050171,
0.16720494627952576,
0.11595455557107925,
0.2708434462547302,
0.0077417450957000256,
-0.24767456948757172,
-0.28673502802848816,
0.13195110857486725,
0.3307124078273773,
-0.11595014482736588,
0.23216958343982697,
-0.2615149915218353,
-0.3058101534843445,
0.36849817633628845,
-0.041156768798828125,
-0.051480356603860855,
-0.09273946285247803,
-0.1891252100467682,
-0.014152535237371922,
-0.01718205027282238,
0.20967407524585724,
-0.05520041659474373,
-0.09788455814123154,
-0.27796483039855957,
-0.344628244638443,
-0.4261714816093445,
0.2716333568096161,
-0.4040451943874359,
0.07526989281177521,
-0.21996113657951355,
0.15112942457199097,
-0.26264676451683044,
-0.08015038818120956,
-0.0025501041673123837,
0.2540595829486847,
0.22619356215000153,
-0.08554207533597946,
-0.18989549577236176,
-0.3912588655948639,
0.3192967176437378,
0.08192213624715805,
-0.17516587674617767,
-0.13019870221614838,
0.2103985697031021,
-0.10981898009777069,
-0.23979192972183228,
-0.3004346489906311,
0.16776278614997864,
-0.027514610439538956,
0.035270676016807556,
-0.4798712730407715,
-0.11050941795110703,
-0.2648237645626068,
-0.041288260370492935,
0.2117106020450592,
-0.12754258513450623,
0.07863803207874298,
-0.019340097904205322,
-0.008834552951157093,
0.22475570440292358,
-0.16428977251052856,
0.2553293704986572,
0.06769360601902008,
0.1059640422463417,
-0.04110301285982132,
0.3298801779747009,
-0.1510847508907318,
-0.005252537317574024,
0.42785727977752686,
0.22548384964466095,
0.2689395248889923,
0.22664766013622284,
-0.14860953390598297,
0.037359271198511124,
0.32872772216796875,
-0.31201672554016113,
-0.31185898184776306,
0.021881258115172386,
-0.20200634002685547,
0.41287732124328613,
0.1154947429895401,
0.22290822863578796,
0.04760146141052246,
0.17487893998622894,
-0.2115563154220581,
0.23400793969631195,
0.25213196873664856,
-0.017640432342886925,
0.4129241406917572,
0.34295138716697693,
-0.2479037344455719,
0.14865538477897644,
0.20269675552845,
0.3381254971027374,
0.37331581115722656,
0.1683574616909027,
0.6754822134971619,
0.12973780930042267,
0.13456131517887115,
-0.021709037944674492,
-0.32538145780563354,
0.28837355971336365,
0.23695437610149384,
-0.09580660611391068,
-0.051022719591856,
-0.2191731035709381,
-0.12180367857217789,
-0.12723834812641144,
0.1384173482656479,
-0.4111368656158447,
-0.21032924950122833,
0.04523297771811485,
-0.15565770864486694,
0.04815046489238739,
-0.06851627677679062,
-0.028230389580130577,
-0.09007276594638824,
-0.24412137269973755,
0.04002203047275543,
0.004800765309482813,
-0.23134379088878632,
0.10813447833061218,
-0.34279489517211914,
0.10637007653713226,
-0.2492353767156601,
0.024251354858279228,
-0.16416533291339874,
0.27717095613479614,
-0.024469027295708656,
0.06235948204994202,
0.22784358263015747,
0.24999885261058807,
0.2541912794113159,
0.22114668786525726,
0.03012124076485634,
-0.11335534602403641,
-0.09015562385320663,
-0.24376097321510315,
-0.18682217597961426,
0.00224379007704556,
-0.08474364876747131,
-0.16691167652606964,
0.345363050699234,
0.1054161787033081,
-0.2746562957763672,
-0.09275929629802704,
0.12155326455831528,
-0.37411776185035706,
-0.27351024746894836,
-0.2993069589138031,
-0.24849969148635864,
-0.16006875038146973,
0.010108835995197296,
-0.14169776439666748,
-0.1105463057756424,
-0.16446423530578613,
0.3575717806816101,
-0.5614528059959412,
0.2240133285522461,
0.17998281121253967,
0.16926400363445282,
-0.5213890075683594,
0.5753262042999268,
0.17822125554084778,
0.46049991250038147,
-0.19106490910053253,
-0.057508960366249084,
-0.30101698637008667,
0.14551611244678497,
-0.5551979541778564,
-0.016471022740006447,
0.19522900879383087,
0.46519002318382263,
0.19168609380722046,
0.07630308717489243,
-0.013001365587115288,
0.113785021007061,
-0.0675366222858429,
-0.08476152271032333,
-0.49697792530059814,
-0.1270877867937088,
-0.09012049436569214,
0.06075203791260719,
0.03476250171661377,
-0.4763006269931793,
0.27639463543891907,
-0.3855689465999603,
0.28158146142959595,
-0.04310943931341171,
-0.034940000623464584,
0.09002453833818436,
0.23234592378139496,
0.20558689534664154,
0.1378335952758789,
0.25045934319496155,
-0.023713601753115654,
-0.12938298285007477,
-0.21128211915493011,
-0.07525574415922165,
0.1577514261007309,
0.3180830478668213,
0.20817463099956512,
-0.16424116492271423,
0.006998680531978607,
0.0801749899983406,
0.3643002510070801,
0.2588428258895874,
-0.04918583482503891,
0.15858732163906097,
0.14618933200836182,
0.09801927208900452,
-0.19928765296936035,
0.24860899150371552,
0.11606481671333313,
-0.12636171281337738,
-0.11137740314006805,
-0.07681931555271149,
0.006497800815850496,
-0.12881390750408173,
0.2902989983558655,
-0.18569013476371765,
-0.02827502228319645,
-0.46624481678009033,
0.4764026999473572,
0.20057839155197144,
0.2184666097164154,
0.19804832339286804,
0.0547013096511364,
0.34418806433677673,
0.05658283829689026,
0.09217935055494308,
0.18586766719818115,
0.07063981890678406,
-0.14884862303733826,
-0.001057625631801784,
0.2093498855829239,
-0.21633626520633698,
-0.23411323130130768,
-0.08275134861469269,
-0.07409659773111343
] |
https://github.com/huggingface/datasets/issues/1803
|
Querying examples from big datasets is slower than small datasets
|
My workaround is to shard the dataset into splits in my ssd disk and feed the data in different training sessions. But it is a bit of a pain when we need to reload the last training session with the rest of the split with the Trainer in transformers.
I mean, when I split the training and then reloads the model and optimizer, it not gets the correct global_status of the optimizer, so I need to hardcode some things. I'm planning to open an issue in transformers and think about it.
```
from datasets import load_dataset
book_corpus = load_dataset("bookcorpus", split="train[:25%]")
wikicorpus = load_dataset("wikicorpus", split="train[:25%]")
openwebtext = load_dataset("openwebtext", split="train[:25%]")
big_dataset = datasets.concatenate_datasets([wikicorpus, openwebtext, book_corpus])
big_dataset.shuffle(seed=42)
big_dataset = big_dataset.map(encode, batched=True, num_proc=20, load_from_cache_file=True, writer_batch_size=5000)
big_dataset.set_format(type='torch', columns=["text", "input_ids", "attention_mask", "token_type_ids"])
training_args = TrainingArguments(
output_dir="./linear_bert",
overwrite_output_dir=True,
per_device_train_batch_size=71,
save_steps=500,
save_total_limit=10,
logging_first_step=True,
logging_steps=100,
gradient_accumulation_steps=9,
fp16=True,
dataloader_num_workers=20,
warmup_steps=24000,
learning_rate=0.000545205002870214,
adam_epsilon=1e-6,
adam_beta2=0.98,
weight_decay=0.01,
max_steps=138974, # the total number of steps after concatenating 100% datasets
max_grad_norm=1.0,
)
trainer = Trainer(
model=model,
args=training_args,
data_collator=data_collator,
train_dataset=big_dataset,
tokenizer=tokenizer))
```
I do one training pass with the total steps of this shard and I use len(bbig)/batchsize to stop the training (hardcoded in the trainer.py) when I pass over all the examples in this split.
Now Im working, I will edit the comment with a more elaborated answer when I left the work.
|
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets.
For example
```python
from datasets import load_dataset
b1 = load_dataset("bookcorpus", split="train[:1%]")
b50 = load_dataset("bookcorpus", split="train[:50%]")
b100 = load_dataset("bookcorpus", split="train[:100%]")
%timeit _ = b1[-1]
# 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
%timeit _ = b50[-1]
# 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
%timeit _ = b100[-1]
# 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
It looks like the time to fetch the example increases with the size of the dataset.
This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample.
Maybe switching to the Arrow IPC file format could help fixing this issue.
Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue:
> We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer.
cc @gaceladri since it can help speed up your training when this one is fixed.
| 218 |
Querying examples from big datasets is slower than small datasets
|
[
-0.29294827580451965,
0.010804066434502602,
-0.28593552112579346,
0.32023122906684875,
-0.22060038149356842,
-0.10886016488075256,
0.06291760504245758,
0.41048818826675415,
-0.00010245530575048178,
0.19125591218471527,
0.08894886821508408,
-0.08140518516302109,
0.11951836943626404,
0.030837567523121834,
-0.14676812291145325,
-0.11632349342107773,
-0.10714942216873169,
0.11984606087207794,
-0.02274508588016033,
-0.18480873107910156,
0.08861593902111053,
-0.05285263806581497,
-0.10749423503875732,
-0.06810591369867325,
-0.1351524144411087,
-0.23325371742248535,
0.11015773564577103,
0.06121455132961273,
-0.08044805377721786,
-0.023192189633846283,
-0.1223355084657669,
-0.07899336516857147,
0.14992162585258484,
0.3517911434173584,
-0.00010170215682592243,
-0.08703677356243134,
0.04305445775389671,
0.08524998277425766,
-0.1296110451221466,
0.38848257064819336,
-0.14611904323101044,
-0.2367352396249771,
-0.14079521596431732,
-0.19065584242343903,
-0.13747961819171906,
0.008307304233312607,
-0.14041206240653992,
-0.2847631871700287,
-0.05047497898340225,
0.29251763224601746,
0.307234525680542,
0.20196431875228882,
-0.4030708074569702,
-0.3452390134334564,
0.16228769719600677,
0.1764417439699173,
-0.22884425520896912,
0.06833872199058533,
0.47532182931900024,
0.0005236589931882918,
-0.2491319626569748,
0.3678521513938904,
-0.098615363240242,
0.23964759707450867,
-0.2709906995296478,
-0.04180534929037094,
-0.27776768803596497,
0.28687795996665955,
0.5296527147293091,
0.37385377287864685,
0.2563128173351288,
0.18794234097003937,
-0.26172542572021484,
-0.37235769629478455,
-0.21361464262008667,
-0.1521124690771103,
-0.09564653038978577,
0.0694616362452507,
0.021210618317127228,
0.11024290323257446,
-0.2810235917568207,
0.07374895364046097,
-0.010643879882991314,
-0.07527552545070648,
-0.24929724633693695,
-0.09437546133995056,
-0.07497462630271912,
-0.06943406164646149,
-0.012726099230349064,
-0.36768338084220886,
0.17762576043605804,
-0.08284979313611984,
0.20592918992042542,
-0.23401093482971191,
-0.29031383991241455,
-0.14477363228797913,
0.47463780641555786,
0.08593388646841049,
0.2652507722377777,
-0.08631426841020584,
0.18294645845890045,
0.3183686137199402,
0.41042548418045044,
-0.18328367173671722,
0.15595470368862152,
-0.08559092879295349,
-0.18146097660064697,
-0.0064041512086987495,
0.2506316602230072,
0.06760896742343903,
-0.47256001830101013,
0.024315526708960533,
-0.2339879274368286,
-0.2585587799549103,
-0.04847145453095436,
-0.10013271123170853,
-0.12555766105651855,
-0.125649556517601,
-0.18540023267269135,
0.09240671992301941,
-0.17883683741092682,
-0.04275106266140938,
0.0933028906583786,
0.5274905562400818,
-0.16624975204467773,
-0.21901948750019073,
-0.3120005130767822,
0.08122431486845016,
-0.24967889487743378,
-0.2709645926952362,
-0.3044944107532501,
-0.12440084666013718,
0.15372775495052338,
-0.06701395660638809,
0.23476071655750275,
0.0301975104957819,
0.309287428855896,
-0.10260027647018433,
-0.0588899701833725,
0.01685016043484211,
0.3760836124420166,
-0.37901607155799866,
0.1666998714208603,
-0.05920800194144249,
-0.03427237272262573,
0.21984396874904633,
0.012591090984642506,
0.2744649052619934,
-0.3761620819568634,
-0.06679888069629669,
-0.2155299186706543,
-0.38421374559402466,
0.2822709083557129,
0.22442670166492462,
0.024272141978144646,
-0.07298461347818375,
0.10971657186746597,
0.488458514213562,
-0.09186509996652603,
-0.14230437576770782,
-0.2528530955314636,
0.024310030043125153,
-0.1741146296262741,
0.06980257481336594,
0.13629089295864105,
0.3051552474498749,
-0.23533518612384796,
0.36642903089523315,
-0.28208404779434204,
0.3566223084926605,
0.1764603555202484,
0.4939265251159668,
-0.3490293025970459,
0.22978998720645905,
-0.07272014021873474,
-0.006064318120479584,
0.3481157720088959,
-0.10892127454280853,
-0.46713829040527344,
0.4355161786079407,
-0.13153201341629028,
-0.02521357499063015,
0.38405829668045044,
0.1517953872680664,
0.4197046756744385,
-0.14695920050144196,
0.22471392154693604,
0.25043201446533203,
-0.044283196330070496,
0.11214528977870941,
-0.14773288369178772,
-0.08413124084472656,
-0.006540204398334026,
0.24457252025604248,
-0.06093785539269447,
0.09644106775522232,
0.18330609798431396,
-0.1298660933971405,
0.19192685186862946,
-0.09019625931978226,
-0.2461688369512558,
0.33993226289749146,
-0.03865596652030945,
-0.2881333827972412,
-0.10077393054962158,
-0.003370128106325865,
0.134121835231781,
0.13125722110271454,
0.05030541121959686,
-0.08991997689008713,
0.2822120487689972,
0.00959367211908102,
-0.23911306262016296,
0.007424752693623304,
0.08514129370450974,
0.047096025198698044,
0.20172694325447083,
-0.0842331275343895,
0.4285655915737152,
-0.07948412001132965,
0.24445393681526184,
-0.1292431354522705,
-0.22396814823150635,
-0.3461441695690155,
-0.15176282823085785,
-0.009475551545619965,
0.1851750910282135,
-0.06057608127593994,
0.2441464215517044,
-0.1353926658630371,
0.11670807003974915,
0.03662274032831192,
-0.010112026706337929,
-0.03349030390381813,
0.047138895839452744,
0.062435150146484375,
0.3682514429092407,
0.18168416619300842,
-0.025256961584091187,
0.03897765651345253,
0.3679153323173523,
0.13785606622695923,
0.07421018183231354,
0.05750274285674095,
-0.4828164875507355,
0.46246257424354553,
0.343921035528183,
0.27193307876586914,
0.3876926600933075,
-0.36155879497528076,
0.289981484413147,
0.07740690559148788,
0.2348126769065857,
-0.13103261590003967,
0.35142385959625244,
-0.007698945701122284,
0.13087208569049835,
0.2638836205005646,
-0.3743615746498108,
0.27314266562461853,
0.20340770483016968,
-0.09093308448791504,
0.16139397025108337,
-0.0016647347947582603,
-0.1111491248011589,
-0.07529129832983017,
0.28372618556022644,
0.00849791057407856,
0.30994734168052673,
0.29409340023994446,
0.2956187129020691,
-0.2988811731338501,
0.1082366555929184,
-0.27581799030303955,
0.12740974128246307,
0.028108274564146996,
0.11932335048913956,
-0.1093706265091896,
0.30024248361587524,
-0.13860300183296204,
-0.21552133560180664,
-0.2052994966506958,
0.1644652634859085,
0.011905553750693798,
-0.05293377861380577,
0.13908113539218903,
-0.2485041320323944,
-0.15810731053352356,
0.2475406527519226,
0.27647897601127625,
0.2144610732793808,
-0.12790052592754364,
0.04259093105792999,
-0.049773477017879486,
-0.19721800088882446,
-0.11158972978591919,
-0.07460998743772507,
0.17922663688659668,
0.2787413001060486,
-0.11003334820270538,
0.21946899592876434,
-0.16329535841941833,
-0.17027217149734497,
0.2507091760635376,
-0.0638478621840477,
0.37180382013320923,
0.1696826070547104,
-0.1642351746559143,
0.017671510577201843,
-0.46032100915908813,
-0.2820512652397156,
-0.03864021599292755,
0.17441076040267944,
0.19875603914260864,
-0.03224131837487221,
0.04729586839675903,
-0.15424534678459167,
-0.01281901728361845,
0.03029673360288143,
-0.19345301389694214,
-0.0028151890728622675,
0.03770521655678749,
-0.11494264006614685,
0.1451089084148407,
0.25544095039367676,
-0.2845808267593384,
-0.12851044535636902,
-0.36288243532180786,
0.08356055617332458,
0.2254227101802826,
0.2052966207265854,
-0.05505160987377167,
0.1848835051059723,
-0.021739445626735687,
0.027459576725959778,
0.34627607464790344,
-0.17339478433132172,
-0.16854552924633026,
0.35270076990127563,
-0.18042133748531342,
-0.2597983777523041,
-0.5003503561019897,
-0.1990496963262558,
-0.05520470812916756,
0.1613956242799759,
-0.3210582733154297,
0.03651665896177292,
-0.5884870290756226,
0.10687553137540817,
0.29822373390197754,
0.062427133321762085,
0.03867858648300171,
-0.3231408894062042,
-0.3732885420322418,
-0.10333145409822464,
-0.1682739555835724,
0.021379580721259117,
-0.14593835175037384,
0.07192245125770569,
-0.2458571493625641,
0.4123747944831848,
-0.07565414160490036,
0.28179308772087097,
0.12934885919094086,
-0.07605025917291641,
0.1729838103055954,
0.10463909804821014,
0.12689568102359772,
-0.1718292236328125,
-0.06396801769733429,
0.2036212980747223,
0.011292473413050175,
-0.21760961413383484,
0.4841361939907074,
0.14109142124652863,
-0.181236132979393,
0.07782141119241714,
-0.08034304529428482,
-0.1161985769867897,
-0.1682170331478119,
0.02480853907763958,
0.08344853669404984,
0.09487728029489517,
0.31031855940818787,
0.22604942321777344,
-0.6043520569801331,
0.11630622297525406,
0.002907105255872011,
-0.42803043127059937,
0.02952546812593937,
-0.24106770753860474,
-0.5495536923408508,
0.2568937838077545,
-0.397985577583313,
0.16336661577224731,
-0.12471053004264832,
0.18873172998428345,
0.007142884656786919,
-0.23972755670547485,
0.020222356542944908,
0.18235309422016144,
0.4024086892604828,
-0.03578244894742966,
0.0675097182393074,
-0.07492904365062714,
-0.4613981246948242,
-0.24063627421855927,
0.11687884479761124,
-0.4523965120315552,
0.2578601837158203,
0.19171564280986786,
0.24973945319652557,
-0.13630615174770355,
-0.0022496788296848536,
0.2491547018289566,
0.2599946856498718,
0.23712559044361115,
0.016931427642703056,
-0.002454685280099511,
-0.3266735076904297,
-0.00921562872827053,
0.07817496359348297,
0.005802696105092764,
-0.0035223530139774084,
-0.11708422750234604,
-0.24712787568569183,
-0.46166422963142395,
0.0018762630643323064,
0.24073539674282074,
0.2653103768825531,
0.16233065724372864,
-0.12068960070610046,
0.4809147119522095,
-0.20023879408836365,
0.23081474006175995,
0.38019514083862305,
0.3398760259151459,
0.10585594177246094,
-0.018995113670825958,
0.4395923316478729,
0.17415650188922882,
0.0885753333568573,
0.4146912097930908,
-0.004563990514725447,
0.19930872321128845,
-0.08782001584768295,
0.3678267002105713,
-0.14046183228492737,
0.06203412264585495,
0.2292090207338333,
0.14546474814414978,
-0.1542668640613556,
-0.13779890537261963,
0.4323759078979492,
0.23482951521873474,
-0.17741194367408752,
-0.09656576812267303,
-0.15965299308300018,
0.10774652659893036,
-0.053439781069755554,
-0.09111252427101135,
0.4777868390083313,
-0.055365096777677536,
0.004694439470767975,
-0.07212940603494644,
-0.03410493955016136,
0.31267276406288147,
0.0230729877948761,
0.10083174705505371,
-0.07148150354623795,
-0.616347074508667,
0.34192022681236267,
-0.1693018525838852,
0.03011898137629032,
0.14594461023807526,
0.035777006298303604,
0.021589238196611404,
-0.09812314063310623,
0.11275739222764969,
-0.07626727223396301,
0.24552127718925476,
-0.041558779776096344,
-0.1035148873925209,
-0.44249895215034485,
0.1763966977596283,
0.3131811022758484,
-0.05565012991428375,
0.01504038367420435,
0.016683606430888176,
-0.2784525752067566,
0.06403638422489166,
-0.032943423837423325,
-0.07203692942857742,
-0.09447012096643448,
0.28340497612953186,
-0.030271019786596298,
-0.43156877160072327,
0.03909863904118538,
-0.07211219519376755,
-0.1375727653503418,
0.2596932053565979,
-0.09679704159498215,
0.27671512961387634,
-0.028284141793847084,
0.2419108748435974,
0.4105429947376251,
-0.24665027856826782,
-0.09823348373174667,
0.026210449635982513,
0.0591534748673439,
0.07842285931110382,
-0.10671119391918182,
-0.04228822514414787,
-0.16899418830871582,
0.23190627992153168,
-0.20439575612545013,
-0.22442443668842316,
-0.3483313322067261,
-0.10730264335870743,
-0.25785398483276367,
-0.29175078868865967,
0.22499048709869385,
0.056828174740076065,
0.16469436883926392,
0.26009634137153625,
0.3615201711654663,
-0.26657581329345703,
-0.32697805762290955,
0.5027526617050171,
0.16720494627952576,
0.11595455557107925,
0.2708434462547302,
0.0077417450957000256,
-0.24767456948757172,
-0.28673502802848816,
0.13195110857486725,
0.3307124078273773,
-0.11595014482736588,
0.23216958343982697,
-0.2615149915218353,
-0.3058101534843445,
0.36849817633628845,
-0.041156768798828125,
-0.051480356603860855,
-0.09273946285247803,
-0.1891252100467682,
-0.014152535237371922,
-0.01718205027282238,
0.20967407524585724,
-0.05520041659474373,
-0.09788455814123154,
-0.27796483039855957,
-0.344628244638443,
-0.4261714816093445,
0.2716333568096161,
-0.4040451943874359,
0.07526989281177521,
-0.21996113657951355,
0.15112942457199097,
-0.26264676451683044,
-0.08015038818120956,
-0.0025501041673123837,
0.2540595829486847,
0.22619356215000153,
-0.08554207533597946,
-0.18989549577236176,
-0.3912588655948639,
0.3192967176437378,
0.08192213624715805,
-0.17516587674617767,
-0.13019870221614838,
0.2103985697031021,
-0.10981898009777069,
-0.23979192972183228,
-0.3004346489906311,
0.16776278614997864,
-0.027514610439538956,
0.035270676016807556,
-0.4798712730407715,
-0.11050941795110703,
-0.2648237645626068,
-0.041288260370492935,
0.2117106020450592,
-0.12754258513450623,
0.07863803207874298,
-0.019340097904205322,
-0.008834552951157093,
0.22475570440292358,
-0.16428977251052856,
0.2553293704986572,
0.06769360601902008,
0.1059640422463417,
-0.04110301285982132,
0.3298801779747009,
-0.1510847508907318,
-0.005252537317574024,
0.42785727977752686,
0.22548384964466095,
0.2689395248889923,
0.22664766013622284,
-0.14860953390598297,
0.037359271198511124,
0.32872772216796875,
-0.31201672554016113,
-0.31185898184776306,
0.021881258115172386,
-0.20200634002685547,
0.41287732124328613,
0.1154947429895401,
0.22290822863578796,
0.04760146141052246,
0.17487893998622894,
-0.2115563154220581,
0.23400793969631195,
0.25213196873664856,
-0.017640432342886925,
0.4129241406917572,
0.34295138716697693,
-0.2479037344455719,
0.14865538477897644,
0.20269675552845,
0.3381254971027374,
0.37331581115722656,
0.1683574616909027,
0.6754822134971619,
0.12973780930042267,
0.13456131517887115,
-0.021709037944674492,
-0.32538145780563354,
0.28837355971336365,
0.23695437610149384,
-0.09580660611391068,
-0.051022719591856,
-0.2191731035709381,
-0.12180367857217789,
-0.12723834812641144,
0.1384173482656479,
-0.4111368656158447,
-0.21032924950122833,
0.04523297771811485,
-0.15565770864486694,
0.04815046489238739,
-0.06851627677679062,
-0.028230389580130577,
-0.09007276594638824,
-0.24412137269973755,
0.04002203047275543,
0.004800765309482813,
-0.23134379088878632,
0.10813447833061218,
-0.34279489517211914,
0.10637007653713226,
-0.2492353767156601,
0.024251354858279228,
-0.16416533291339874,
0.27717095613479614,
-0.024469027295708656,
0.06235948204994202,
0.22784358263015747,
0.24999885261058807,
0.2541912794113159,
0.22114668786525726,
0.03012124076485634,
-0.11335534602403641,
-0.09015562385320663,
-0.24376097321510315,
-0.18682217597961426,
0.00224379007704556,
-0.08474364876747131,
-0.16691167652606964,
0.345363050699234,
0.1054161787033081,
-0.2746562957763672,
-0.09275929629802704,
0.12155326455831528,
-0.37411776185035706,
-0.27351024746894836,
-0.2993069589138031,
-0.24849969148635864,
-0.16006875038146973,
0.010108835995197296,
-0.14169776439666748,
-0.1105463057756424,
-0.16446423530578613,
0.3575717806816101,
-0.5614528059959412,
0.2240133285522461,
0.17998281121253967,
0.16926400363445282,
-0.5213890075683594,
0.5753262042999268,
0.17822125554084778,
0.46049991250038147,
-0.19106490910053253,
-0.057508960366249084,
-0.30101698637008667,
0.14551611244678497,
-0.5551979541778564,
-0.016471022740006447,
0.19522900879383087,
0.46519002318382263,
0.19168609380722046,
0.07630308717489243,
-0.013001365587115288,
0.113785021007061,
-0.0675366222858429,
-0.08476152271032333,
-0.49697792530059814,
-0.1270877867937088,
-0.09012049436569214,
0.06075203791260719,
0.03476250171661377,
-0.4763006269931793,
0.27639463543891907,
-0.3855689465999603,
0.28158146142959595,
-0.04310943931341171,
-0.034940000623464584,
0.09002453833818436,
0.23234592378139496,
0.20558689534664154,
0.1378335952758789,
0.25045934319496155,
-0.023713601753115654,
-0.12938298285007477,
-0.21128211915493011,
-0.07525574415922165,
0.1577514261007309,
0.3180830478668213,
0.20817463099956512,
-0.16424116492271423,
0.006998680531978607,
0.0801749899983406,
0.3643002510070801,
0.2588428258895874,
-0.04918583482503891,
0.15858732163906097,
0.14618933200836182,
0.09801927208900452,
-0.19928765296936035,
0.24860899150371552,
0.11606481671333313,
-0.12636171281337738,
-0.11137740314006805,
-0.07681931555271149,
0.006497800815850496,
-0.12881390750408173,
0.2902989983558655,
-0.18569013476371765,
-0.02827502228319645,
-0.46624481678009033,
0.4764026999473572,
0.20057839155197144,
0.2184666097164154,
0.19804832339286804,
0.0547013096511364,
0.34418806433677673,
0.05658283829689026,
0.09217935055494308,
0.18586766719818115,
0.07063981890678406,
-0.14884862303733826,
-0.001057625631801784,
0.2093498855829239,
-0.21633626520633698,
-0.23411323130130768,
-0.08275134861469269,
-0.07409659773111343
] |
https://github.com/huggingface/datasets/issues/1803
|
Querying examples from big datasets is slower than small datasets
|
I just tested and using the Arrow File format doesn't improve the speed... This will need further investigation.
My guess is that it has to iterate over the record batches or chunks of a ChunkedArray in order to retrieve elements.
However if we know in advance in which chunk the element is, and at what index it is, then we can access it instantaneously. But this requires dealing with the chunked arrays instead of the pyarrow Table directly which is not practical.
|
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets.
For example
```python
from datasets import load_dataset
b1 = load_dataset("bookcorpus", split="train[:1%]")
b50 = load_dataset("bookcorpus", split="train[:50%]")
b100 = load_dataset("bookcorpus", split="train[:100%]")
%timeit _ = b1[-1]
# 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
%timeit _ = b50[-1]
# 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
%timeit _ = b100[-1]
# 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
It looks like the time to fetch the example increases with the size of the dataset.
This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample.
Maybe switching to the Arrow IPC file format could help fixing this issue.
Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue:
> We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer.
cc @gaceladri since it can help speed up your training when this one is fixed.
| 82 |
Querying examples from big datasets is slower than small datasets
|
[
-0.29294827580451965,
0.010804066434502602,
-0.28593552112579346,
0.32023122906684875,
-0.22060038149356842,
-0.10886016488075256,
0.06291760504245758,
0.41048818826675415,
-0.00010245530575048178,
0.19125591218471527,
0.08894886821508408,
-0.08140518516302109,
0.11951836943626404,
0.030837567523121834,
-0.14676812291145325,
-0.11632349342107773,
-0.10714942216873169,
0.11984606087207794,
-0.02274508588016033,
-0.18480873107910156,
0.08861593902111053,
-0.05285263806581497,
-0.10749423503875732,
-0.06810591369867325,
-0.1351524144411087,
-0.23325371742248535,
0.11015773564577103,
0.06121455132961273,
-0.08044805377721786,
-0.023192189633846283,
-0.1223355084657669,
-0.07899336516857147,
0.14992162585258484,
0.3517911434173584,
-0.00010170215682592243,
-0.08703677356243134,
0.04305445775389671,
0.08524998277425766,
-0.1296110451221466,
0.38848257064819336,
-0.14611904323101044,
-0.2367352396249771,
-0.14079521596431732,
-0.19065584242343903,
-0.13747961819171906,
0.008307304233312607,
-0.14041206240653992,
-0.2847631871700287,
-0.05047497898340225,
0.29251763224601746,
0.307234525680542,
0.20196431875228882,
-0.4030708074569702,
-0.3452390134334564,
0.16228769719600677,
0.1764417439699173,
-0.22884425520896912,
0.06833872199058533,
0.47532182931900024,
0.0005236589931882918,
-0.2491319626569748,
0.3678521513938904,
-0.098615363240242,
0.23964759707450867,
-0.2709906995296478,
-0.04180534929037094,
-0.27776768803596497,
0.28687795996665955,
0.5296527147293091,
0.37385377287864685,
0.2563128173351288,
0.18794234097003937,
-0.26172542572021484,
-0.37235769629478455,
-0.21361464262008667,
-0.1521124690771103,
-0.09564653038978577,
0.0694616362452507,
0.021210618317127228,
0.11024290323257446,
-0.2810235917568207,
0.07374895364046097,
-0.010643879882991314,
-0.07527552545070648,
-0.24929724633693695,
-0.09437546133995056,
-0.07497462630271912,
-0.06943406164646149,
-0.012726099230349064,
-0.36768338084220886,
0.17762576043605804,
-0.08284979313611984,
0.20592918992042542,
-0.23401093482971191,
-0.29031383991241455,
-0.14477363228797913,
0.47463780641555786,
0.08593388646841049,
0.2652507722377777,
-0.08631426841020584,
0.18294645845890045,
0.3183686137199402,
0.41042548418045044,
-0.18328367173671722,
0.15595470368862152,
-0.08559092879295349,
-0.18146097660064697,
-0.0064041512086987495,
0.2506316602230072,
0.06760896742343903,
-0.47256001830101013,
0.024315526708960533,
-0.2339879274368286,
-0.2585587799549103,
-0.04847145453095436,
-0.10013271123170853,
-0.12555766105651855,
-0.125649556517601,
-0.18540023267269135,
0.09240671992301941,
-0.17883683741092682,
-0.04275106266140938,
0.0933028906583786,
0.5274905562400818,
-0.16624975204467773,
-0.21901948750019073,
-0.3120005130767822,
0.08122431486845016,
-0.24967889487743378,
-0.2709645926952362,
-0.3044944107532501,
-0.12440084666013718,
0.15372775495052338,
-0.06701395660638809,
0.23476071655750275,
0.0301975104957819,
0.309287428855896,
-0.10260027647018433,
-0.0588899701833725,
0.01685016043484211,
0.3760836124420166,
-0.37901607155799866,
0.1666998714208603,
-0.05920800194144249,
-0.03427237272262573,
0.21984396874904633,
0.012591090984642506,
0.2744649052619934,
-0.3761620819568634,
-0.06679888069629669,
-0.2155299186706543,
-0.38421374559402466,
0.2822709083557129,
0.22442670166492462,
0.024272141978144646,
-0.07298461347818375,
0.10971657186746597,
0.488458514213562,
-0.09186509996652603,
-0.14230437576770782,
-0.2528530955314636,
0.024310030043125153,
-0.1741146296262741,
0.06980257481336594,
0.13629089295864105,
0.3051552474498749,
-0.23533518612384796,
0.36642903089523315,
-0.28208404779434204,
0.3566223084926605,
0.1764603555202484,
0.4939265251159668,
-0.3490293025970459,
0.22978998720645905,
-0.07272014021873474,
-0.006064318120479584,
0.3481157720088959,
-0.10892127454280853,
-0.46713829040527344,
0.4355161786079407,
-0.13153201341629028,
-0.02521357499063015,
0.38405829668045044,
0.1517953872680664,
0.4197046756744385,
-0.14695920050144196,
0.22471392154693604,
0.25043201446533203,
-0.044283196330070496,
0.11214528977870941,
-0.14773288369178772,
-0.08413124084472656,
-0.006540204398334026,
0.24457252025604248,
-0.06093785539269447,
0.09644106775522232,
0.18330609798431396,
-0.1298660933971405,
0.19192685186862946,
-0.09019625931978226,
-0.2461688369512558,
0.33993226289749146,
-0.03865596652030945,
-0.2881333827972412,
-0.10077393054962158,
-0.003370128106325865,
0.134121835231781,
0.13125722110271454,
0.05030541121959686,
-0.08991997689008713,
0.2822120487689972,
0.00959367211908102,
-0.23911306262016296,
0.007424752693623304,
0.08514129370450974,
0.047096025198698044,
0.20172694325447083,
-0.0842331275343895,
0.4285655915737152,
-0.07948412001132965,
0.24445393681526184,
-0.1292431354522705,
-0.22396814823150635,
-0.3461441695690155,
-0.15176282823085785,
-0.009475551545619965,
0.1851750910282135,
-0.06057608127593994,
0.2441464215517044,
-0.1353926658630371,
0.11670807003974915,
0.03662274032831192,
-0.010112026706337929,
-0.03349030390381813,
0.047138895839452744,
0.062435150146484375,
0.3682514429092407,
0.18168416619300842,
-0.025256961584091187,
0.03897765651345253,
0.3679153323173523,
0.13785606622695923,
0.07421018183231354,
0.05750274285674095,
-0.4828164875507355,
0.46246257424354553,
0.343921035528183,
0.27193307876586914,
0.3876926600933075,
-0.36155879497528076,
0.289981484413147,
0.07740690559148788,
0.2348126769065857,
-0.13103261590003967,
0.35142385959625244,
-0.007698945701122284,
0.13087208569049835,
0.2638836205005646,
-0.3743615746498108,
0.27314266562461853,
0.20340770483016968,
-0.09093308448791504,
0.16139397025108337,
-0.0016647347947582603,
-0.1111491248011589,
-0.07529129832983017,
0.28372618556022644,
0.00849791057407856,
0.30994734168052673,
0.29409340023994446,
0.2956187129020691,
-0.2988811731338501,
0.1082366555929184,
-0.27581799030303955,
0.12740974128246307,
0.028108274564146996,
0.11932335048913956,
-0.1093706265091896,
0.30024248361587524,
-0.13860300183296204,
-0.21552133560180664,
-0.2052994966506958,
0.1644652634859085,
0.011905553750693798,
-0.05293377861380577,
0.13908113539218903,
-0.2485041320323944,
-0.15810731053352356,
0.2475406527519226,
0.27647897601127625,
0.2144610732793808,
-0.12790052592754364,
0.04259093105792999,
-0.049773477017879486,
-0.19721800088882446,
-0.11158972978591919,
-0.07460998743772507,
0.17922663688659668,
0.2787413001060486,
-0.11003334820270538,
0.21946899592876434,
-0.16329535841941833,
-0.17027217149734497,
0.2507091760635376,
-0.0638478621840477,
0.37180382013320923,
0.1696826070547104,
-0.1642351746559143,
0.017671510577201843,
-0.46032100915908813,
-0.2820512652397156,
-0.03864021599292755,
0.17441076040267944,
0.19875603914260864,
-0.03224131837487221,
0.04729586839675903,
-0.15424534678459167,
-0.01281901728361845,
0.03029673360288143,
-0.19345301389694214,
-0.0028151890728622675,
0.03770521655678749,
-0.11494264006614685,
0.1451089084148407,
0.25544095039367676,
-0.2845808267593384,
-0.12851044535636902,
-0.36288243532180786,
0.08356055617332458,
0.2254227101802826,
0.2052966207265854,
-0.05505160987377167,
0.1848835051059723,
-0.021739445626735687,
0.027459576725959778,
0.34627607464790344,
-0.17339478433132172,
-0.16854552924633026,
0.35270076990127563,
-0.18042133748531342,
-0.2597983777523041,
-0.5003503561019897,
-0.1990496963262558,
-0.05520470812916756,
0.1613956242799759,
-0.3210582733154297,
0.03651665896177292,
-0.5884870290756226,
0.10687553137540817,
0.29822373390197754,
0.062427133321762085,
0.03867858648300171,
-0.3231408894062042,
-0.3732885420322418,
-0.10333145409822464,
-0.1682739555835724,
0.021379580721259117,
-0.14593835175037384,
0.07192245125770569,
-0.2458571493625641,
0.4123747944831848,
-0.07565414160490036,
0.28179308772087097,
0.12934885919094086,
-0.07605025917291641,
0.1729838103055954,
0.10463909804821014,
0.12689568102359772,
-0.1718292236328125,
-0.06396801769733429,
0.2036212980747223,
0.011292473413050175,
-0.21760961413383484,
0.4841361939907074,
0.14109142124652863,
-0.181236132979393,
0.07782141119241714,
-0.08034304529428482,
-0.1161985769867897,
-0.1682170331478119,
0.02480853907763958,
0.08344853669404984,
0.09487728029489517,
0.31031855940818787,
0.22604942321777344,
-0.6043520569801331,
0.11630622297525406,
0.002907105255872011,
-0.42803043127059937,
0.02952546812593937,
-0.24106770753860474,
-0.5495536923408508,
0.2568937838077545,
-0.397985577583313,
0.16336661577224731,
-0.12471053004264832,
0.18873172998428345,
0.007142884656786919,
-0.23972755670547485,
0.020222356542944908,
0.18235309422016144,
0.4024086892604828,
-0.03578244894742966,
0.0675097182393074,
-0.07492904365062714,
-0.4613981246948242,
-0.24063627421855927,
0.11687884479761124,
-0.4523965120315552,
0.2578601837158203,
0.19171564280986786,
0.24973945319652557,
-0.13630615174770355,
-0.0022496788296848536,
0.2491547018289566,
0.2599946856498718,
0.23712559044361115,
0.016931427642703056,
-0.002454685280099511,
-0.3266735076904297,
-0.00921562872827053,
0.07817496359348297,
0.005802696105092764,
-0.0035223530139774084,
-0.11708422750234604,
-0.24712787568569183,
-0.46166422963142395,
0.0018762630643323064,
0.24073539674282074,
0.2653103768825531,
0.16233065724372864,
-0.12068960070610046,
0.4809147119522095,
-0.20023879408836365,
0.23081474006175995,
0.38019514083862305,
0.3398760259151459,
0.10585594177246094,
-0.018995113670825958,
0.4395923316478729,
0.17415650188922882,
0.0885753333568573,
0.4146912097930908,
-0.004563990514725447,
0.19930872321128845,
-0.08782001584768295,
0.3678267002105713,
-0.14046183228492737,
0.06203412264585495,
0.2292090207338333,
0.14546474814414978,
-0.1542668640613556,
-0.13779890537261963,
0.4323759078979492,
0.23482951521873474,
-0.17741194367408752,
-0.09656576812267303,
-0.15965299308300018,
0.10774652659893036,
-0.053439781069755554,
-0.09111252427101135,
0.4777868390083313,
-0.055365096777677536,
0.004694439470767975,
-0.07212940603494644,
-0.03410493955016136,
0.31267276406288147,
0.0230729877948761,
0.10083174705505371,
-0.07148150354623795,
-0.616347074508667,
0.34192022681236267,
-0.1693018525838852,
0.03011898137629032,
0.14594461023807526,
0.035777006298303604,
0.021589238196611404,
-0.09812314063310623,
0.11275739222764969,
-0.07626727223396301,
0.24552127718925476,
-0.041558779776096344,
-0.1035148873925209,
-0.44249895215034485,
0.1763966977596283,
0.3131811022758484,
-0.05565012991428375,
0.01504038367420435,
0.016683606430888176,
-0.2784525752067566,
0.06403638422489166,
-0.032943423837423325,
-0.07203692942857742,
-0.09447012096643448,
0.28340497612953186,
-0.030271019786596298,
-0.43156877160072327,
0.03909863904118538,
-0.07211219519376755,
-0.1375727653503418,
0.2596932053565979,
-0.09679704159498215,
0.27671512961387634,
-0.028284141793847084,
0.2419108748435974,
0.4105429947376251,
-0.24665027856826782,
-0.09823348373174667,
0.026210449635982513,
0.0591534748673439,
0.07842285931110382,
-0.10671119391918182,
-0.04228822514414787,
-0.16899418830871582,
0.23190627992153168,
-0.20439575612545013,
-0.22442443668842316,
-0.3483313322067261,
-0.10730264335870743,
-0.25785398483276367,
-0.29175078868865967,
0.22499048709869385,
0.056828174740076065,
0.16469436883926392,
0.26009634137153625,
0.3615201711654663,
-0.26657581329345703,
-0.32697805762290955,
0.5027526617050171,
0.16720494627952576,
0.11595455557107925,
0.2708434462547302,
0.0077417450957000256,
-0.24767456948757172,
-0.28673502802848816,
0.13195110857486725,
0.3307124078273773,
-0.11595014482736588,
0.23216958343982697,
-0.2615149915218353,
-0.3058101534843445,
0.36849817633628845,
-0.041156768798828125,
-0.051480356603860855,
-0.09273946285247803,
-0.1891252100467682,
-0.014152535237371922,
-0.01718205027282238,
0.20967407524585724,
-0.05520041659474373,
-0.09788455814123154,
-0.27796483039855957,
-0.344628244638443,
-0.4261714816093445,
0.2716333568096161,
-0.4040451943874359,
0.07526989281177521,
-0.21996113657951355,
0.15112942457199097,
-0.26264676451683044,
-0.08015038818120956,
-0.0025501041673123837,
0.2540595829486847,
0.22619356215000153,
-0.08554207533597946,
-0.18989549577236176,
-0.3912588655948639,
0.3192967176437378,
0.08192213624715805,
-0.17516587674617767,
-0.13019870221614838,
0.2103985697031021,
-0.10981898009777069,
-0.23979192972183228,
-0.3004346489906311,
0.16776278614997864,
-0.027514610439538956,
0.035270676016807556,
-0.4798712730407715,
-0.11050941795110703,
-0.2648237645626068,
-0.041288260370492935,
0.2117106020450592,
-0.12754258513450623,
0.07863803207874298,
-0.019340097904205322,
-0.008834552951157093,
0.22475570440292358,
-0.16428977251052856,
0.2553293704986572,
0.06769360601902008,
0.1059640422463417,
-0.04110301285982132,
0.3298801779747009,
-0.1510847508907318,
-0.005252537317574024,
0.42785727977752686,
0.22548384964466095,
0.2689395248889923,
0.22664766013622284,
-0.14860953390598297,
0.037359271198511124,
0.32872772216796875,
-0.31201672554016113,
-0.31185898184776306,
0.021881258115172386,
-0.20200634002685547,
0.41287732124328613,
0.1154947429895401,
0.22290822863578796,
0.04760146141052246,
0.17487893998622894,
-0.2115563154220581,
0.23400793969631195,
0.25213196873664856,
-0.017640432342886925,
0.4129241406917572,
0.34295138716697693,
-0.2479037344455719,
0.14865538477897644,
0.20269675552845,
0.3381254971027374,
0.37331581115722656,
0.1683574616909027,
0.6754822134971619,
0.12973780930042267,
0.13456131517887115,
-0.021709037944674492,
-0.32538145780563354,
0.28837355971336365,
0.23695437610149384,
-0.09580660611391068,
-0.051022719591856,
-0.2191731035709381,
-0.12180367857217789,
-0.12723834812641144,
0.1384173482656479,
-0.4111368656158447,
-0.21032924950122833,
0.04523297771811485,
-0.15565770864486694,
0.04815046489238739,
-0.06851627677679062,
-0.028230389580130577,
-0.09007276594638824,
-0.24412137269973755,
0.04002203047275543,
0.004800765309482813,
-0.23134379088878632,
0.10813447833061218,
-0.34279489517211914,
0.10637007653713226,
-0.2492353767156601,
0.024251354858279228,
-0.16416533291339874,
0.27717095613479614,
-0.024469027295708656,
0.06235948204994202,
0.22784358263015747,
0.24999885261058807,
0.2541912794113159,
0.22114668786525726,
0.03012124076485634,
-0.11335534602403641,
-0.09015562385320663,
-0.24376097321510315,
-0.18682217597961426,
0.00224379007704556,
-0.08474364876747131,
-0.16691167652606964,
0.345363050699234,
0.1054161787033081,
-0.2746562957763672,
-0.09275929629802704,
0.12155326455831528,
-0.37411776185035706,
-0.27351024746894836,
-0.2993069589138031,
-0.24849969148635864,
-0.16006875038146973,
0.010108835995197296,
-0.14169776439666748,
-0.1105463057756424,
-0.16446423530578613,
0.3575717806816101,
-0.5614528059959412,
0.2240133285522461,
0.17998281121253967,
0.16926400363445282,
-0.5213890075683594,
0.5753262042999268,
0.17822125554084778,
0.46049991250038147,
-0.19106490910053253,
-0.057508960366249084,
-0.30101698637008667,
0.14551611244678497,
-0.5551979541778564,
-0.016471022740006447,
0.19522900879383087,
0.46519002318382263,
0.19168609380722046,
0.07630308717489243,
-0.013001365587115288,
0.113785021007061,
-0.0675366222858429,
-0.08476152271032333,
-0.49697792530059814,
-0.1270877867937088,
-0.09012049436569214,
0.06075203791260719,
0.03476250171661377,
-0.4763006269931793,
0.27639463543891907,
-0.3855689465999603,
0.28158146142959595,
-0.04310943931341171,
-0.034940000623464584,
0.09002453833818436,
0.23234592378139496,
0.20558689534664154,
0.1378335952758789,
0.25045934319496155,
-0.023713601753115654,
-0.12938298285007477,
-0.21128211915493011,
-0.07525574415922165,
0.1577514261007309,
0.3180830478668213,
0.20817463099956512,
-0.16424116492271423,
0.006998680531978607,
0.0801749899983406,
0.3643002510070801,
0.2588428258895874,
-0.04918583482503891,
0.15858732163906097,
0.14618933200836182,
0.09801927208900452,
-0.19928765296936035,
0.24860899150371552,
0.11606481671333313,
-0.12636171281337738,
-0.11137740314006805,
-0.07681931555271149,
0.006497800815850496,
-0.12881390750408173,
0.2902989983558655,
-0.18569013476371765,
-0.02827502228319645,
-0.46624481678009033,
0.4764026999473572,
0.20057839155197144,
0.2184666097164154,
0.19804832339286804,
0.0547013096511364,
0.34418806433677673,
0.05658283829689026,
0.09217935055494308,
0.18586766719818115,
0.07063981890678406,
-0.14884862303733826,
-0.001057625631801784,
0.2093498855829239,
-0.21633626520633698,
-0.23411323130130768,
-0.08275134861469269,
-0.07409659773111343
] |
https://github.com/huggingface/datasets/issues/1803
|
Querying examples from big datasets is slower than small datasets
|
I have a dataset with about 2.7 million rows (which I'm loading via `load_from_disk`), and I need to fetch around 300k (particular) rows of it, by index. Currently this is taking a really long time (~8 hours). I tried sharding the large dataset but overall it doesn't change how long it takes to fetch the desired rows.
I actually have enough RAM that I could fit the large dataset in memory. Would having the large dataset in memory speed up querying? To find out, I tried to load (a column of) the large dataset into memory like this:
```
column_data = large_ds['column_name']
```
but in itself this takes a really long time.
I'm pretty stuck - do you have any ideas what I should do?
|
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets.
For example
```python
from datasets import load_dataset
b1 = load_dataset("bookcorpus", split="train[:1%]")
b50 = load_dataset("bookcorpus", split="train[:50%]")
b100 = load_dataset("bookcorpus", split="train[:100%]")
%timeit _ = b1[-1]
# 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
%timeit _ = b50[-1]
# 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
%timeit _ = b100[-1]
# 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
It looks like the time to fetch the example increases with the size of the dataset.
This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample.
Maybe switching to the Arrow IPC file format could help fixing this issue.
Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue:
> We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer.
cc @gaceladri since it can help speed up your training when this one is fixed.
| 125 |
Querying examples from big datasets is slower than small datasets
|
[
-0.29294827580451965,
0.010804066434502602,
-0.28593552112579346,
0.32023122906684875,
-0.22060038149356842,
-0.10886016488075256,
0.06291760504245758,
0.41048818826675415,
-0.00010245530575048178,
0.19125591218471527,
0.08894886821508408,
-0.08140518516302109,
0.11951836943626404,
0.030837567523121834,
-0.14676812291145325,
-0.11632349342107773,
-0.10714942216873169,
0.11984606087207794,
-0.02274508588016033,
-0.18480873107910156,
0.08861593902111053,
-0.05285263806581497,
-0.10749423503875732,
-0.06810591369867325,
-0.1351524144411087,
-0.23325371742248535,
0.11015773564577103,
0.06121455132961273,
-0.08044805377721786,
-0.023192189633846283,
-0.1223355084657669,
-0.07899336516857147,
0.14992162585258484,
0.3517911434173584,
-0.00010170215682592243,
-0.08703677356243134,
0.04305445775389671,
0.08524998277425766,
-0.1296110451221466,
0.38848257064819336,
-0.14611904323101044,
-0.2367352396249771,
-0.14079521596431732,
-0.19065584242343903,
-0.13747961819171906,
0.008307304233312607,
-0.14041206240653992,
-0.2847631871700287,
-0.05047497898340225,
0.29251763224601746,
0.307234525680542,
0.20196431875228882,
-0.4030708074569702,
-0.3452390134334564,
0.16228769719600677,
0.1764417439699173,
-0.22884425520896912,
0.06833872199058533,
0.47532182931900024,
0.0005236589931882918,
-0.2491319626569748,
0.3678521513938904,
-0.098615363240242,
0.23964759707450867,
-0.2709906995296478,
-0.04180534929037094,
-0.27776768803596497,
0.28687795996665955,
0.5296527147293091,
0.37385377287864685,
0.2563128173351288,
0.18794234097003937,
-0.26172542572021484,
-0.37235769629478455,
-0.21361464262008667,
-0.1521124690771103,
-0.09564653038978577,
0.0694616362452507,
0.021210618317127228,
0.11024290323257446,
-0.2810235917568207,
0.07374895364046097,
-0.010643879882991314,
-0.07527552545070648,
-0.24929724633693695,
-0.09437546133995056,
-0.07497462630271912,
-0.06943406164646149,
-0.012726099230349064,
-0.36768338084220886,
0.17762576043605804,
-0.08284979313611984,
0.20592918992042542,
-0.23401093482971191,
-0.29031383991241455,
-0.14477363228797913,
0.47463780641555786,
0.08593388646841049,
0.2652507722377777,
-0.08631426841020584,
0.18294645845890045,
0.3183686137199402,
0.41042548418045044,
-0.18328367173671722,
0.15595470368862152,
-0.08559092879295349,
-0.18146097660064697,
-0.0064041512086987495,
0.2506316602230072,
0.06760896742343903,
-0.47256001830101013,
0.024315526708960533,
-0.2339879274368286,
-0.2585587799549103,
-0.04847145453095436,
-0.10013271123170853,
-0.12555766105651855,
-0.125649556517601,
-0.18540023267269135,
0.09240671992301941,
-0.17883683741092682,
-0.04275106266140938,
0.0933028906583786,
0.5274905562400818,
-0.16624975204467773,
-0.21901948750019073,
-0.3120005130767822,
0.08122431486845016,
-0.24967889487743378,
-0.2709645926952362,
-0.3044944107532501,
-0.12440084666013718,
0.15372775495052338,
-0.06701395660638809,
0.23476071655750275,
0.0301975104957819,
0.309287428855896,
-0.10260027647018433,
-0.0588899701833725,
0.01685016043484211,
0.3760836124420166,
-0.37901607155799866,
0.1666998714208603,
-0.05920800194144249,
-0.03427237272262573,
0.21984396874904633,
0.012591090984642506,
0.2744649052619934,
-0.3761620819568634,
-0.06679888069629669,
-0.2155299186706543,
-0.38421374559402466,
0.2822709083557129,
0.22442670166492462,
0.024272141978144646,
-0.07298461347818375,
0.10971657186746597,
0.488458514213562,
-0.09186509996652603,
-0.14230437576770782,
-0.2528530955314636,
0.024310030043125153,
-0.1741146296262741,
0.06980257481336594,
0.13629089295864105,
0.3051552474498749,
-0.23533518612384796,
0.36642903089523315,
-0.28208404779434204,
0.3566223084926605,
0.1764603555202484,
0.4939265251159668,
-0.3490293025970459,
0.22978998720645905,
-0.07272014021873474,
-0.006064318120479584,
0.3481157720088959,
-0.10892127454280853,
-0.46713829040527344,
0.4355161786079407,
-0.13153201341629028,
-0.02521357499063015,
0.38405829668045044,
0.1517953872680664,
0.4197046756744385,
-0.14695920050144196,
0.22471392154693604,
0.25043201446533203,
-0.044283196330070496,
0.11214528977870941,
-0.14773288369178772,
-0.08413124084472656,
-0.006540204398334026,
0.24457252025604248,
-0.06093785539269447,
0.09644106775522232,
0.18330609798431396,
-0.1298660933971405,
0.19192685186862946,
-0.09019625931978226,
-0.2461688369512558,
0.33993226289749146,
-0.03865596652030945,
-0.2881333827972412,
-0.10077393054962158,
-0.003370128106325865,
0.134121835231781,
0.13125722110271454,
0.05030541121959686,
-0.08991997689008713,
0.2822120487689972,
0.00959367211908102,
-0.23911306262016296,
0.007424752693623304,
0.08514129370450974,
0.047096025198698044,
0.20172694325447083,
-0.0842331275343895,
0.4285655915737152,
-0.07948412001132965,
0.24445393681526184,
-0.1292431354522705,
-0.22396814823150635,
-0.3461441695690155,
-0.15176282823085785,
-0.009475551545619965,
0.1851750910282135,
-0.06057608127593994,
0.2441464215517044,
-0.1353926658630371,
0.11670807003974915,
0.03662274032831192,
-0.010112026706337929,
-0.03349030390381813,
0.047138895839452744,
0.062435150146484375,
0.3682514429092407,
0.18168416619300842,
-0.025256961584091187,
0.03897765651345253,
0.3679153323173523,
0.13785606622695923,
0.07421018183231354,
0.05750274285674095,
-0.4828164875507355,
0.46246257424354553,
0.343921035528183,
0.27193307876586914,
0.3876926600933075,
-0.36155879497528076,
0.289981484413147,
0.07740690559148788,
0.2348126769065857,
-0.13103261590003967,
0.35142385959625244,
-0.007698945701122284,
0.13087208569049835,
0.2638836205005646,
-0.3743615746498108,
0.27314266562461853,
0.20340770483016968,
-0.09093308448791504,
0.16139397025108337,
-0.0016647347947582603,
-0.1111491248011589,
-0.07529129832983017,
0.28372618556022644,
0.00849791057407856,
0.30994734168052673,
0.29409340023994446,
0.2956187129020691,
-0.2988811731338501,
0.1082366555929184,
-0.27581799030303955,
0.12740974128246307,
0.028108274564146996,
0.11932335048913956,
-0.1093706265091896,
0.30024248361587524,
-0.13860300183296204,
-0.21552133560180664,
-0.2052994966506958,
0.1644652634859085,
0.011905553750693798,
-0.05293377861380577,
0.13908113539218903,
-0.2485041320323944,
-0.15810731053352356,
0.2475406527519226,
0.27647897601127625,
0.2144610732793808,
-0.12790052592754364,
0.04259093105792999,
-0.049773477017879486,
-0.19721800088882446,
-0.11158972978591919,
-0.07460998743772507,
0.17922663688659668,
0.2787413001060486,
-0.11003334820270538,
0.21946899592876434,
-0.16329535841941833,
-0.17027217149734497,
0.2507091760635376,
-0.0638478621840477,
0.37180382013320923,
0.1696826070547104,
-0.1642351746559143,
0.017671510577201843,
-0.46032100915908813,
-0.2820512652397156,
-0.03864021599292755,
0.17441076040267944,
0.19875603914260864,
-0.03224131837487221,
0.04729586839675903,
-0.15424534678459167,
-0.01281901728361845,
0.03029673360288143,
-0.19345301389694214,
-0.0028151890728622675,
0.03770521655678749,
-0.11494264006614685,
0.1451089084148407,
0.25544095039367676,
-0.2845808267593384,
-0.12851044535636902,
-0.36288243532180786,
0.08356055617332458,
0.2254227101802826,
0.2052966207265854,
-0.05505160987377167,
0.1848835051059723,
-0.021739445626735687,
0.027459576725959778,
0.34627607464790344,
-0.17339478433132172,
-0.16854552924633026,
0.35270076990127563,
-0.18042133748531342,
-0.2597983777523041,
-0.5003503561019897,
-0.1990496963262558,
-0.05520470812916756,
0.1613956242799759,
-0.3210582733154297,
0.03651665896177292,
-0.5884870290756226,
0.10687553137540817,
0.29822373390197754,
0.062427133321762085,
0.03867858648300171,
-0.3231408894062042,
-0.3732885420322418,
-0.10333145409822464,
-0.1682739555835724,
0.021379580721259117,
-0.14593835175037384,
0.07192245125770569,
-0.2458571493625641,
0.4123747944831848,
-0.07565414160490036,
0.28179308772087097,
0.12934885919094086,
-0.07605025917291641,
0.1729838103055954,
0.10463909804821014,
0.12689568102359772,
-0.1718292236328125,
-0.06396801769733429,
0.2036212980747223,
0.011292473413050175,
-0.21760961413383484,
0.4841361939907074,
0.14109142124652863,
-0.181236132979393,
0.07782141119241714,
-0.08034304529428482,
-0.1161985769867897,
-0.1682170331478119,
0.02480853907763958,
0.08344853669404984,
0.09487728029489517,
0.31031855940818787,
0.22604942321777344,
-0.6043520569801331,
0.11630622297525406,
0.002907105255872011,
-0.42803043127059937,
0.02952546812593937,
-0.24106770753860474,
-0.5495536923408508,
0.2568937838077545,
-0.397985577583313,
0.16336661577224731,
-0.12471053004264832,
0.18873172998428345,
0.007142884656786919,
-0.23972755670547485,
0.020222356542944908,
0.18235309422016144,
0.4024086892604828,
-0.03578244894742966,
0.0675097182393074,
-0.07492904365062714,
-0.4613981246948242,
-0.24063627421855927,
0.11687884479761124,
-0.4523965120315552,
0.2578601837158203,
0.19171564280986786,
0.24973945319652557,
-0.13630615174770355,
-0.0022496788296848536,
0.2491547018289566,
0.2599946856498718,
0.23712559044361115,
0.016931427642703056,
-0.002454685280099511,
-0.3266735076904297,
-0.00921562872827053,
0.07817496359348297,
0.005802696105092764,
-0.0035223530139774084,
-0.11708422750234604,
-0.24712787568569183,
-0.46166422963142395,
0.0018762630643323064,
0.24073539674282074,
0.2653103768825531,
0.16233065724372864,
-0.12068960070610046,
0.4809147119522095,
-0.20023879408836365,
0.23081474006175995,
0.38019514083862305,
0.3398760259151459,
0.10585594177246094,
-0.018995113670825958,
0.4395923316478729,
0.17415650188922882,
0.0885753333568573,
0.4146912097930908,
-0.004563990514725447,
0.19930872321128845,
-0.08782001584768295,
0.3678267002105713,
-0.14046183228492737,
0.06203412264585495,
0.2292090207338333,
0.14546474814414978,
-0.1542668640613556,
-0.13779890537261963,
0.4323759078979492,
0.23482951521873474,
-0.17741194367408752,
-0.09656576812267303,
-0.15965299308300018,
0.10774652659893036,
-0.053439781069755554,
-0.09111252427101135,
0.4777868390083313,
-0.055365096777677536,
0.004694439470767975,
-0.07212940603494644,
-0.03410493955016136,
0.31267276406288147,
0.0230729877948761,
0.10083174705505371,
-0.07148150354623795,
-0.616347074508667,
0.34192022681236267,
-0.1693018525838852,
0.03011898137629032,
0.14594461023807526,
0.035777006298303604,
0.021589238196611404,
-0.09812314063310623,
0.11275739222764969,
-0.07626727223396301,
0.24552127718925476,
-0.041558779776096344,
-0.1035148873925209,
-0.44249895215034485,
0.1763966977596283,
0.3131811022758484,
-0.05565012991428375,
0.01504038367420435,
0.016683606430888176,
-0.2784525752067566,
0.06403638422489166,
-0.032943423837423325,
-0.07203692942857742,
-0.09447012096643448,
0.28340497612953186,
-0.030271019786596298,
-0.43156877160072327,
0.03909863904118538,
-0.07211219519376755,
-0.1375727653503418,
0.2596932053565979,
-0.09679704159498215,
0.27671512961387634,
-0.028284141793847084,
0.2419108748435974,
0.4105429947376251,
-0.24665027856826782,
-0.09823348373174667,
0.026210449635982513,
0.0591534748673439,
0.07842285931110382,
-0.10671119391918182,
-0.04228822514414787,
-0.16899418830871582,
0.23190627992153168,
-0.20439575612545013,
-0.22442443668842316,
-0.3483313322067261,
-0.10730264335870743,
-0.25785398483276367,
-0.29175078868865967,
0.22499048709869385,
0.056828174740076065,
0.16469436883926392,
0.26009634137153625,
0.3615201711654663,
-0.26657581329345703,
-0.32697805762290955,
0.5027526617050171,
0.16720494627952576,
0.11595455557107925,
0.2708434462547302,
0.0077417450957000256,
-0.24767456948757172,
-0.28673502802848816,
0.13195110857486725,
0.3307124078273773,
-0.11595014482736588,
0.23216958343982697,
-0.2615149915218353,
-0.3058101534843445,
0.36849817633628845,
-0.041156768798828125,
-0.051480356603860855,
-0.09273946285247803,
-0.1891252100467682,
-0.014152535237371922,
-0.01718205027282238,
0.20967407524585724,
-0.05520041659474373,
-0.09788455814123154,
-0.27796483039855957,
-0.344628244638443,
-0.4261714816093445,
0.2716333568096161,
-0.4040451943874359,
0.07526989281177521,
-0.21996113657951355,
0.15112942457199097,
-0.26264676451683044,
-0.08015038818120956,
-0.0025501041673123837,
0.2540595829486847,
0.22619356215000153,
-0.08554207533597946,
-0.18989549577236176,
-0.3912588655948639,
0.3192967176437378,
0.08192213624715805,
-0.17516587674617767,
-0.13019870221614838,
0.2103985697031021,
-0.10981898009777069,
-0.23979192972183228,
-0.3004346489906311,
0.16776278614997864,
-0.027514610439538956,
0.035270676016807556,
-0.4798712730407715,
-0.11050941795110703,
-0.2648237645626068,
-0.041288260370492935,
0.2117106020450592,
-0.12754258513450623,
0.07863803207874298,
-0.019340097904205322,
-0.008834552951157093,
0.22475570440292358,
-0.16428977251052856,
0.2553293704986572,
0.06769360601902008,
0.1059640422463417,
-0.04110301285982132,
0.3298801779747009,
-0.1510847508907318,
-0.005252537317574024,
0.42785727977752686,
0.22548384964466095,
0.2689395248889923,
0.22664766013622284,
-0.14860953390598297,
0.037359271198511124,
0.32872772216796875,
-0.31201672554016113,
-0.31185898184776306,
0.021881258115172386,
-0.20200634002685547,
0.41287732124328613,
0.1154947429895401,
0.22290822863578796,
0.04760146141052246,
0.17487893998622894,
-0.2115563154220581,
0.23400793969631195,
0.25213196873664856,
-0.017640432342886925,
0.4129241406917572,
0.34295138716697693,
-0.2479037344455719,
0.14865538477897644,
0.20269675552845,
0.3381254971027374,
0.37331581115722656,
0.1683574616909027,
0.6754822134971619,
0.12973780930042267,
0.13456131517887115,
-0.021709037944674492,
-0.32538145780563354,
0.28837355971336365,
0.23695437610149384,
-0.09580660611391068,
-0.051022719591856,
-0.2191731035709381,
-0.12180367857217789,
-0.12723834812641144,
0.1384173482656479,
-0.4111368656158447,
-0.21032924950122833,
0.04523297771811485,
-0.15565770864486694,
0.04815046489238739,
-0.06851627677679062,
-0.028230389580130577,
-0.09007276594638824,
-0.24412137269973755,
0.04002203047275543,
0.004800765309482813,
-0.23134379088878632,
0.10813447833061218,
-0.34279489517211914,
0.10637007653713226,
-0.2492353767156601,
0.024251354858279228,
-0.16416533291339874,
0.27717095613479614,
-0.024469027295708656,
0.06235948204994202,
0.22784358263015747,
0.24999885261058807,
0.2541912794113159,
0.22114668786525726,
0.03012124076485634,
-0.11335534602403641,
-0.09015562385320663,
-0.24376097321510315,
-0.18682217597961426,
0.00224379007704556,
-0.08474364876747131,
-0.16691167652606964,
0.345363050699234,
0.1054161787033081,
-0.2746562957763672,
-0.09275929629802704,
0.12155326455831528,
-0.37411776185035706,
-0.27351024746894836,
-0.2993069589138031,
-0.24849969148635864,
-0.16006875038146973,
0.010108835995197296,
-0.14169776439666748,
-0.1105463057756424,
-0.16446423530578613,
0.3575717806816101,
-0.5614528059959412,
0.2240133285522461,
0.17998281121253967,
0.16926400363445282,
-0.5213890075683594,
0.5753262042999268,
0.17822125554084778,
0.46049991250038147,
-0.19106490910053253,
-0.057508960366249084,
-0.30101698637008667,
0.14551611244678497,
-0.5551979541778564,
-0.016471022740006447,
0.19522900879383087,
0.46519002318382263,
0.19168609380722046,
0.07630308717489243,
-0.013001365587115288,
0.113785021007061,
-0.0675366222858429,
-0.08476152271032333,
-0.49697792530059814,
-0.1270877867937088,
-0.09012049436569214,
0.06075203791260719,
0.03476250171661377,
-0.4763006269931793,
0.27639463543891907,
-0.3855689465999603,
0.28158146142959595,
-0.04310943931341171,
-0.034940000623464584,
0.09002453833818436,
0.23234592378139496,
0.20558689534664154,
0.1378335952758789,
0.25045934319496155,
-0.023713601753115654,
-0.12938298285007477,
-0.21128211915493011,
-0.07525574415922165,
0.1577514261007309,
0.3180830478668213,
0.20817463099956512,
-0.16424116492271423,
0.006998680531978607,
0.0801749899983406,
0.3643002510070801,
0.2588428258895874,
-0.04918583482503891,
0.15858732163906097,
0.14618933200836182,
0.09801927208900452,
-0.19928765296936035,
0.24860899150371552,
0.11606481671333313,
-0.12636171281337738,
-0.11137740314006805,
-0.07681931555271149,
0.006497800815850496,
-0.12881390750408173,
0.2902989983558655,
-0.18569013476371765,
-0.02827502228319645,
-0.46624481678009033,
0.4764026999473572,
0.20057839155197144,
0.2184666097164154,
0.19804832339286804,
0.0547013096511364,
0.34418806433677673,
0.05658283829689026,
0.09217935055494308,
0.18586766719818115,
0.07063981890678406,
-0.14884862303733826,
-0.001057625631801784,
0.2093498855829239,
-0.21633626520633698,
-0.23411323130130768,
-0.08275134861469269,
-0.07409659773111343
] |
https://github.com/huggingface/datasets/issues/1803
|
Querying examples from big datasets is slower than small datasets
|
Hi ! Feel free to post a message on the [forum](https://discuss.huggingface.co/c/datasets/10). I'd be happy to help you with this.
In your post on the forum, feel free to add more details about your setup:
What are column names and types of your dataset ?
How was the dataset constructed ?
Is the dataset shuffled ?
Is the dataset tokenized ?
Are you on a SSD or an HDD ?
I'm sure we can figure something out.
For example on my laptop I can access the 6 millions articles from wikipedia in less than a minute.
|
After some experiments with bookcorpus I noticed that querying examples from big datasets is slower than small datasets.
For example
```python
from datasets import load_dataset
b1 = load_dataset("bookcorpus", split="train[:1%]")
b50 = load_dataset("bookcorpus", split="train[:50%]")
b100 = load_dataset("bookcorpus", split="train[:100%]")
%timeit _ = b1[-1]
# 12.2 µs ± 70.4 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
%timeit _ = b50[-1]
# 92.5 µs ± 1.24 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
%timeit _ = b100[-1]
# 177 µs ± 3.13 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)
```
It looks like the time to fetch the example increases with the size of the dataset.
This is maybe due to the use of the Arrow streaming format to store the data on disk. I guess pyarrow needs to iterate through the file as a stream to find the queried sample.
Maybe switching to the Arrow IPC file format could help fixing this issue.
Indeed according to the [documentation](https://arrow.apache.org/docs/format/Columnar.html?highlight=arrow1#ipc-file-format), it's identical to the streaming format except that it contains the memory offsets of each sample, which could fix the issue:
> We define a “file format” supporting random access that is build with the stream format. The file starts and ends with a magic string ARROW1 (plus padding). What follows in the file is identical to the stream format. At the end of the file, we write a footer containing a redundant copy of the schema (which is a part of the streaming format) plus memory offsets and sizes for each of the data blocks in the file. This enables random access any record batch in the file. See File.fbs for the precise details of the file footer.
cc @gaceladri since it can help speed up your training when this one is fixed.
| 95 |
Querying examples from big datasets is slower than small datasets
|
[
-0.29294827580451965,
0.010804066434502602,
-0.28593552112579346,
0.32023122906684875,
-0.22060038149356842,
-0.10886016488075256,
0.06291760504245758,
0.41048818826675415,
-0.00010245530575048178,
0.19125591218471527,
0.08894886821508408,
-0.08140518516302109,
0.11951836943626404,
0.030837567523121834,
-0.14676812291145325,
-0.11632349342107773,
-0.10714942216873169,
0.11984606087207794,
-0.02274508588016033,
-0.18480873107910156,
0.08861593902111053,
-0.05285263806581497,
-0.10749423503875732,
-0.06810591369867325,
-0.1351524144411087,
-0.23325371742248535,
0.11015773564577103,
0.06121455132961273,
-0.08044805377721786,
-0.023192189633846283,
-0.1223355084657669,
-0.07899336516857147,
0.14992162585258484,
0.3517911434173584,
-0.00010170215682592243,
-0.08703677356243134,
0.04305445775389671,
0.08524998277425766,
-0.1296110451221466,
0.38848257064819336,
-0.14611904323101044,
-0.2367352396249771,
-0.14079521596431732,
-0.19065584242343903,
-0.13747961819171906,
0.008307304233312607,
-0.14041206240653992,
-0.2847631871700287,
-0.05047497898340225,
0.29251763224601746,
0.307234525680542,
0.20196431875228882,
-0.4030708074569702,
-0.3452390134334564,
0.16228769719600677,
0.1764417439699173,
-0.22884425520896912,
0.06833872199058533,
0.47532182931900024,
0.0005236589931882918,
-0.2491319626569748,
0.3678521513938904,
-0.098615363240242,
0.23964759707450867,
-0.2709906995296478,
-0.04180534929037094,
-0.27776768803596497,
0.28687795996665955,
0.5296527147293091,
0.37385377287864685,
0.2563128173351288,
0.18794234097003937,
-0.26172542572021484,
-0.37235769629478455,
-0.21361464262008667,
-0.1521124690771103,
-0.09564653038978577,
0.0694616362452507,
0.021210618317127228,
0.11024290323257446,
-0.2810235917568207,
0.07374895364046097,
-0.010643879882991314,
-0.07527552545070648,
-0.24929724633693695,
-0.09437546133995056,
-0.07497462630271912,
-0.06943406164646149,
-0.012726099230349064,
-0.36768338084220886,
0.17762576043605804,
-0.08284979313611984,
0.20592918992042542,
-0.23401093482971191,
-0.29031383991241455,
-0.14477363228797913,
0.47463780641555786,
0.08593388646841049,
0.2652507722377777,
-0.08631426841020584,
0.18294645845890045,
0.3183686137199402,
0.41042548418045044,
-0.18328367173671722,
0.15595470368862152,
-0.08559092879295349,
-0.18146097660064697,
-0.0064041512086987495,
0.2506316602230072,
0.06760896742343903,
-0.47256001830101013,
0.024315526708960533,
-0.2339879274368286,
-0.2585587799549103,
-0.04847145453095436,
-0.10013271123170853,
-0.12555766105651855,
-0.125649556517601,
-0.18540023267269135,
0.09240671992301941,
-0.17883683741092682,
-0.04275106266140938,
0.0933028906583786,
0.5274905562400818,
-0.16624975204467773,
-0.21901948750019073,
-0.3120005130767822,
0.08122431486845016,
-0.24967889487743378,
-0.2709645926952362,
-0.3044944107532501,
-0.12440084666013718,
0.15372775495052338,
-0.06701395660638809,
0.23476071655750275,
0.0301975104957819,
0.309287428855896,
-0.10260027647018433,
-0.0588899701833725,
0.01685016043484211,
0.3760836124420166,
-0.37901607155799866,
0.1666998714208603,
-0.05920800194144249,
-0.03427237272262573,
0.21984396874904633,
0.012591090984642506,
0.2744649052619934,
-0.3761620819568634,
-0.06679888069629669,
-0.2155299186706543,
-0.38421374559402466,
0.2822709083557129,
0.22442670166492462,
0.024272141978144646,
-0.07298461347818375,
0.10971657186746597,
0.488458514213562,
-0.09186509996652603,
-0.14230437576770782,
-0.2528530955314636,
0.024310030043125153,
-0.1741146296262741,
0.06980257481336594,
0.13629089295864105,
0.3051552474498749,
-0.23533518612384796,
0.36642903089523315,
-0.28208404779434204,
0.3566223084926605,
0.1764603555202484,
0.4939265251159668,
-0.3490293025970459,
0.22978998720645905,
-0.07272014021873474,
-0.006064318120479584,
0.3481157720088959,
-0.10892127454280853,
-0.46713829040527344,
0.4355161786079407,
-0.13153201341629028,
-0.02521357499063015,
0.38405829668045044,
0.1517953872680664,
0.4197046756744385,
-0.14695920050144196,
0.22471392154693604,
0.25043201446533203,
-0.044283196330070496,
0.11214528977870941,
-0.14773288369178772,
-0.08413124084472656,
-0.006540204398334026,
0.24457252025604248,
-0.06093785539269447,
0.09644106775522232,
0.18330609798431396,
-0.1298660933971405,
0.19192685186862946,
-0.09019625931978226,
-0.2461688369512558,
0.33993226289749146,
-0.03865596652030945,
-0.2881333827972412,
-0.10077393054962158,
-0.003370128106325865,
0.134121835231781,
0.13125722110271454,
0.05030541121959686,
-0.08991997689008713,
0.2822120487689972,
0.00959367211908102,
-0.23911306262016296,
0.007424752693623304,
0.08514129370450974,
0.047096025198698044,
0.20172694325447083,
-0.0842331275343895,
0.4285655915737152,
-0.07948412001132965,
0.24445393681526184,
-0.1292431354522705,
-0.22396814823150635,
-0.3461441695690155,
-0.15176282823085785,
-0.009475551545619965,
0.1851750910282135,
-0.06057608127593994,
0.2441464215517044,
-0.1353926658630371,
0.11670807003974915,
0.03662274032831192,
-0.010112026706337929,
-0.03349030390381813,
0.047138895839452744,
0.062435150146484375,
0.3682514429092407,
0.18168416619300842,
-0.025256961584091187,
0.03897765651345253,
0.3679153323173523,
0.13785606622695923,
0.07421018183231354,
0.05750274285674095,
-0.4828164875507355,
0.46246257424354553,
0.343921035528183,
0.27193307876586914,
0.3876926600933075,
-0.36155879497528076,
0.289981484413147,
0.07740690559148788,
0.2348126769065857,
-0.13103261590003967,
0.35142385959625244,
-0.007698945701122284,
0.13087208569049835,
0.2638836205005646,
-0.3743615746498108,
0.27314266562461853,
0.20340770483016968,
-0.09093308448791504,
0.16139397025108337,
-0.0016647347947582603,
-0.1111491248011589,
-0.07529129832983017,
0.28372618556022644,
0.00849791057407856,
0.30994734168052673,
0.29409340023994446,
0.2956187129020691,
-0.2988811731338501,
0.1082366555929184,
-0.27581799030303955,
0.12740974128246307,
0.028108274564146996,
0.11932335048913956,
-0.1093706265091896,
0.30024248361587524,
-0.13860300183296204,
-0.21552133560180664,
-0.2052994966506958,
0.1644652634859085,
0.011905553750693798,
-0.05293377861380577,
0.13908113539218903,
-0.2485041320323944,
-0.15810731053352356,
0.2475406527519226,
0.27647897601127625,
0.2144610732793808,
-0.12790052592754364,
0.04259093105792999,
-0.049773477017879486,
-0.19721800088882446,
-0.11158972978591919,
-0.07460998743772507,
0.17922663688659668,
0.2787413001060486,
-0.11003334820270538,
0.21946899592876434,
-0.16329535841941833,
-0.17027217149734497,
0.2507091760635376,
-0.0638478621840477,
0.37180382013320923,
0.1696826070547104,
-0.1642351746559143,
0.017671510577201843,
-0.46032100915908813,
-0.2820512652397156,
-0.03864021599292755,
0.17441076040267944,
0.19875603914260864,
-0.03224131837487221,
0.04729586839675903,
-0.15424534678459167,
-0.01281901728361845,
0.03029673360288143,
-0.19345301389694214,
-0.0028151890728622675,
0.03770521655678749,
-0.11494264006614685,
0.1451089084148407,
0.25544095039367676,
-0.2845808267593384,
-0.12851044535636902,
-0.36288243532180786,
0.08356055617332458,
0.2254227101802826,
0.2052966207265854,
-0.05505160987377167,
0.1848835051059723,
-0.021739445626735687,
0.027459576725959778,
0.34627607464790344,
-0.17339478433132172,
-0.16854552924633026,
0.35270076990127563,
-0.18042133748531342,
-0.2597983777523041,
-0.5003503561019897,
-0.1990496963262558,
-0.05520470812916756,
0.1613956242799759,
-0.3210582733154297,
0.03651665896177292,
-0.5884870290756226,
0.10687553137540817,
0.29822373390197754,
0.062427133321762085,
0.03867858648300171,
-0.3231408894062042,
-0.3732885420322418,
-0.10333145409822464,
-0.1682739555835724,
0.021379580721259117,
-0.14593835175037384,
0.07192245125770569,
-0.2458571493625641,
0.4123747944831848,
-0.07565414160490036,
0.28179308772087097,
0.12934885919094086,
-0.07605025917291641,
0.1729838103055954,
0.10463909804821014,
0.12689568102359772,
-0.1718292236328125,
-0.06396801769733429,
0.2036212980747223,
0.011292473413050175,
-0.21760961413383484,
0.4841361939907074,
0.14109142124652863,
-0.181236132979393,
0.07782141119241714,
-0.08034304529428482,
-0.1161985769867897,
-0.1682170331478119,
0.02480853907763958,
0.08344853669404984,
0.09487728029489517,
0.31031855940818787,
0.22604942321777344,
-0.6043520569801331,
0.11630622297525406,
0.002907105255872011,
-0.42803043127059937,
0.02952546812593937,
-0.24106770753860474,
-0.5495536923408508,
0.2568937838077545,
-0.397985577583313,
0.16336661577224731,
-0.12471053004264832,
0.18873172998428345,
0.007142884656786919,
-0.23972755670547485,
0.020222356542944908,
0.18235309422016144,
0.4024086892604828,
-0.03578244894742966,
0.0675097182393074,
-0.07492904365062714,
-0.4613981246948242,
-0.24063627421855927,
0.11687884479761124,
-0.4523965120315552,
0.2578601837158203,
0.19171564280986786,
0.24973945319652557,
-0.13630615174770355,
-0.0022496788296848536,
0.2491547018289566,
0.2599946856498718,
0.23712559044361115,
0.016931427642703056,
-0.002454685280099511,
-0.3266735076904297,
-0.00921562872827053,
0.07817496359348297,
0.005802696105092764,
-0.0035223530139774084,
-0.11708422750234604,
-0.24712787568569183,
-0.46166422963142395,
0.0018762630643323064,
0.24073539674282074,
0.2653103768825531,
0.16233065724372864,
-0.12068960070610046,
0.4809147119522095,
-0.20023879408836365,
0.23081474006175995,
0.38019514083862305,
0.3398760259151459,
0.10585594177246094,
-0.018995113670825958,
0.4395923316478729,
0.17415650188922882,
0.0885753333568573,
0.4146912097930908,
-0.004563990514725447,
0.19930872321128845,
-0.08782001584768295,
0.3678267002105713,
-0.14046183228492737,
0.06203412264585495,
0.2292090207338333,
0.14546474814414978,
-0.1542668640613556,
-0.13779890537261963,
0.4323759078979492,
0.23482951521873474,
-0.17741194367408752,
-0.09656576812267303,
-0.15965299308300018,
0.10774652659893036,
-0.053439781069755554,
-0.09111252427101135,
0.4777868390083313,
-0.055365096777677536,
0.004694439470767975,
-0.07212940603494644,
-0.03410493955016136,
0.31267276406288147,
0.0230729877948761,
0.10083174705505371,
-0.07148150354623795,
-0.616347074508667,
0.34192022681236267,
-0.1693018525838852,
0.03011898137629032,
0.14594461023807526,
0.035777006298303604,
0.021589238196611404,
-0.09812314063310623,
0.11275739222764969,
-0.07626727223396301,
0.24552127718925476,
-0.041558779776096344,
-0.1035148873925209,
-0.44249895215034485,
0.1763966977596283,
0.3131811022758484,
-0.05565012991428375,
0.01504038367420435,
0.016683606430888176,
-0.2784525752067566,
0.06403638422489166,
-0.032943423837423325,
-0.07203692942857742,
-0.09447012096643448,
0.28340497612953186,
-0.030271019786596298,
-0.43156877160072327,
0.03909863904118538,
-0.07211219519376755,
-0.1375727653503418,
0.2596932053565979,
-0.09679704159498215,
0.27671512961387634,
-0.028284141793847084,
0.2419108748435974,
0.4105429947376251,
-0.24665027856826782,
-0.09823348373174667,
0.026210449635982513,
0.0591534748673439,
0.07842285931110382,
-0.10671119391918182,
-0.04228822514414787,
-0.16899418830871582,
0.23190627992153168,
-0.20439575612545013,
-0.22442443668842316,
-0.3483313322067261,
-0.10730264335870743,
-0.25785398483276367,
-0.29175078868865967,
0.22499048709869385,
0.056828174740076065,
0.16469436883926392,
0.26009634137153625,
0.3615201711654663,
-0.26657581329345703,
-0.32697805762290955,
0.5027526617050171,
0.16720494627952576,
0.11595455557107925,
0.2708434462547302,
0.0077417450957000256,
-0.24767456948757172,
-0.28673502802848816,
0.13195110857486725,
0.3307124078273773,
-0.11595014482736588,
0.23216958343982697,
-0.2615149915218353,
-0.3058101534843445,
0.36849817633628845,
-0.041156768798828125,
-0.051480356603860855,
-0.09273946285247803,
-0.1891252100467682,
-0.014152535237371922,
-0.01718205027282238,
0.20967407524585724,
-0.05520041659474373,
-0.09788455814123154,
-0.27796483039855957,
-0.344628244638443,
-0.4261714816093445,
0.2716333568096161,
-0.4040451943874359,
0.07526989281177521,
-0.21996113657951355,
0.15112942457199097,
-0.26264676451683044,
-0.08015038818120956,
-0.0025501041673123837,
0.2540595829486847,
0.22619356215000153,
-0.08554207533597946,
-0.18989549577236176,
-0.3912588655948639,
0.3192967176437378,
0.08192213624715805,
-0.17516587674617767,
-0.13019870221614838,
0.2103985697031021,
-0.10981898009777069,
-0.23979192972183228,
-0.3004346489906311,
0.16776278614997864,
-0.027514610439538956,
0.035270676016807556,
-0.4798712730407715,
-0.11050941795110703,
-0.2648237645626068,
-0.041288260370492935,
0.2117106020450592,
-0.12754258513450623,
0.07863803207874298,
-0.019340097904205322,
-0.008834552951157093,
0.22475570440292358,
-0.16428977251052856,
0.2553293704986572,
0.06769360601902008,
0.1059640422463417,
-0.04110301285982132,
0.3298801779747009,
-0.1510847508907318,
-0.005252537317574024,
0.42785727977752686,
0.22548384964466095,
0.2689395248889923,
0.22664766013622284,
-0.14860953390598297,
0.037359271198511124,
0.32872772216796875,
-0.31201672554016113,
-0.31185898184776306,
0.021881258115172386,
-0.20200634002685547,
0.41287732124328613,
0.1154947429895401,
0.22290822863578796,
0.04760146141052246,
0.17487893998622894,
-0.2115563154220581,
0.23400793969631195,
0.25213196873664856,
-0.017640432342886925,
0.4129241406917572,
0.34295138716697693,
-0.2479037344455719,
0.14865538477897644,
0.20269675552845,
0.3381254971027374,
0.37331581115722656,
0.1683574616909027,
0.6754822134971619,
0.12973780930042267,
0.13456131517887115,
-0.021709037944674492,
-0.32538145780563354,
0.28837355971336365,
0.23695437610149384,
-0.09580660611391068,
-0.051022719591856,
-0.2191731035709381,
-0.12180367857217789,
-0.12723834812641144,
0.1384173482656479,
-0.4111368656158447,
-0.21032924950122833,
0.04523297771811485,
-0.15565770864486694,
0.04815046489238739,
-0.06851627677679062,
-0.028230389580130577,
-0.09007276594638824,
-0.24412137269973755,
0.04002203047275543,
0.004800765309482813,
-0.23134379088878632,
0.10813447833061218,
-0.34279489517211914,
0.10637007653713226,
-0.2492353767156601,
0.024251354858279228,
-0.16416533291339874,
0.27717095613479614,
-0.024469027295708656,
0.06235948204994202,
0.22784358263015747,
0.24999885261058807,
0.2541912794113159,
0.22114668786525726,
0.03012124076485634,
-0.11335534602403641,
-0.09015562385320663,
-0.24376097321510315,
-0.18682217597961426,
0.00224379007704556,
-0.08474364876747131,
-0.16691167652606964,
0.345363050699234,
0.1054161787033081,
-0.2746562957763672,
-0.09275929629802704,
0.12155326455831528,
-0.37411776185035706,
-0.27351024746894836,
-0.2993069589138031,
-0.24849969148635864,
-0.16006875038146973,
0.010108835995197296,
-0.14169776439666748,
-0.1105463057756424,
-0.16446423530578613,
0.3575717806816101,
-0.5614528059959412,
0.2240133285522461,
0.17998281121253967,
0.16926400363445282,
-0.5213890075683594,
0.5753262042999268,
0.17822125554084778,
0.46049991250038147,
-0.19106490910053253,
-0.057508960366249084,
-0.30101698637008667,
0.14551611244678497,
-0.5551979541778564,
-0.016471022740006447,
0.19522900879383087,
0.46519002318382263,
0.19168609380722046,
0.07630308717489243,
-0.013001365587115288,
0.113785021007061,
-0.0675366222858429,
-0.08476152271032333,
-0.49697792530059814,
-0.1270877867937088,
-0.09012049436569214,
0.06075203791260719,
0.03476250171661377,
-0.4763006269931793,
0.27639463543891907,
-0.3855689465999603,
0.28158146142959595,
-0.04310943931341171,
-0.034940000623464584,
0.09002453833818436,
0.23234592378139496,
0.20558689534664154,
0.1378335952758789,
0.25045934319496155,
-0.023713601753115654,
-0.12938298285007477,
-0.21128211915493011,
-0.07525574415922165,
0.1577514261007309,
0.3180830478668213,
0.20817463099956512,
-0.16424116492271423,
0.006998680531978607,
0.0801749899983406,
0.3643002510070801,
0.2588428258895874,
-0.04918583482503891,
0.15858732163906097,
0.14618933200836182,
0.09801927208900452,
-0.19928765296936035,
0.24860899150371552,
0.11606481671333313,
-0.12636171281337738,
-0.11137740314006805,
-0.07681931555271149,
0.006497800815850496,
-0.12881390750408173,
0.2902989983558655,
-0.18569013476371765,
-0.02827502228319645,
-0.46624481678009033,
0.4764026999473572,
0.20057839155197144,
0.2184666097164154,
0.19804832339286804,
0.0547013096511364,
0.34418806433677673,
0.05658283829689026,
0.09217935055494308,
0.18586766719818115,
0.07063981890678406,
-0.14884862303733826,
-0.001057625631801784,
0.2093498855829239,
-0.21633626520633698,
-0.23411323130130768,
-0.08275134861469269,
-0.07409659773111343
] |
https://github.com/huggingface/datasets/issues/1797
|
Connection error
|
Hi ! For future references let me add a link to our discussion here : https://github.com/huggingface/datasets/issues/759#issuecomment-770684693
Let me know if you manage to fix your proxy issue or if we can do something on our end to help you :)
|
Hi
I am hitting to the error, help me and thanks.
`train_data = datasets.load_dataset("xsum", split="train")`
`ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.0.2/datasets/xsum/xsum.py`
| 40 |
Connection error
|
[
-0.16574177145957947,
-0.18526379764080048,
-0.21125249564647675,
0.1590956598520279,
0.32506391406059265,
-0.1492200344800949,
0.007137581240385771,
0.01957029476761818,
-0.051769208163022995,
0.15277838706970215,
0.04168260842561722,
-0.21183094382286072,
0.3094436824321747,
-0.04456087201833725,
-0.20858129858970642,
-0.06025233864784241,
-0.28296715021133423,
0.27290165424346924,
-0.1713848114013672,
0.05710302293300629,
0.01030272152274847,
0.18253129720687866,
-0.1271403431892395,
0.21604618430137634,
-0.05832051858305931,
0.09084287285804749,
0.23718678951263428,
0.11933987587690353,
-0.1284385770559311,
-0.19729647040367126,
-0.08618161082267761,
-0.04691038280725479,
-0.014156719669699669,
0.20195700228214264,
-0.00008730264380574226,
-0.02066470868885517,
0.3890641927719116,
-0.035659048706293106,
-0.1558997482061386,
0.21323361992835999,
-0.3735155165195465,
0.005944396369159222,
0.14594919979572296,
-0.12619958817958832,
-0.12368164956569672,
-0.04332786425948143,
0.11902488768100739,
-0.009231994859874249,
0.417294979095459,
0.2525070607662201,
0.45656830072402954,
0.07017385214567184,
0.3664472997188568,
-0.10791945457458496,
-0.0355309396982193,
-0.22869214415550232,
0.09949959814548492,
0.3051098585128784,
-0.03756643459200859,
-0.018857277929782867,
0.06940067559480667,
-0.15293899178504944,
0.08192723244428635,
-0.1471869796514511,
0.06447278708219528,
-0.20201817154884338,
0.3577934205532074,
-0.040274959057569504,
0.3469737768173218,
-0.0542871467769146,
0.3003045618534088,
0.16989775002002716,
0.16783538460731506,
0.5570046305656433,
0.0757768377661705,
0.0428922139108181,
0.4790990650653839,
0.11644069850444794,
-0.28270423412323,
0.20355676114559174,
0.10647082328796387,
-0.25984588265419006,
-0.3151909410953522,
0.21318283677101135,
-0.1457795649766922,
0.189838707447052,
0.019027745351195335,
0.07784976810216904,
-0.06993886083364487,
-0.1806088089942932,
0.14741359651088715,
-0.002844741800799966,
-0.1358870565891266,
-0.12496635317802429,
-0.007844148203730583,
0.03803010284900665,
0.02723303996026516,
0.0766538456082344,
-0.0526447519659996,
-0.16754509508609772,
-0.04038931429386139,
0.17850951850414276,
0.16320063173770905,
0.09146324545145035,
-0.043138287961483,
-0.18342489004135132,
0.010994838550686836,
-0.1344044804573059,
0.1404031366109848,
0.16028065979480743,
-0.14044611155986786,
-0.044691137969493866,
-0.05682045966386795,
-0.31416359543800354,
0.0715382918715477,
-0.051472920924425125,
0.09297534823417664,
-0.009927108883857727,
-0.05332202836871147,
0.17553330957889557,
-0.1741626262664795,
-0.036753829568624496,
-0.04487983509898186,
0.3047639727592468,
-0.19877441227436066,
-0.07117319107055664,
0.236214742064476,
-0.06496818363666534,
-0.07724649459123611,
-0.2137242704629898,
-0.2596064805984497,
-0.06860288232564926,
-0.15021178126335144,
-0.21979306638240814,
-0.09401970356702805,
0.13278841972351074,
-0.04191935062408447,
-0.02187913842499256,
-0.00019542408699635416,
-0.24827764928340912,
0.06294365227222443,
-0.06413142383098602,
-0.08072778582572937,
0.24316902458667755,
0.050656940788030624,
-0.06910572201013565,
0.10924801975488663,
-0.055214956402778625,
0.15509769320487976,
-0.09675765037536621,
-0.09903734922409058,
-0.22127152979373932,
-0.2897481620311737,
0.4060862958431244,
0.27547308802604675,
0.11635924875736237,
0.4096847474575043,
-0.32683002948760986,
-0.16121482849121094,
-0.3387044370174408,
-0.19825156033039093,
-0.1756230741739273,
-0.09985481202602386,
-0.22773966193199158,
0.3098227083683014,
0.1791074275970459,
-0.02922089211642742,
0.035357579588890076,
0.10807771235704422,
-0.2016938328742981,
0.0735190361738205,
0.10086684674024582,
-0.174884632229805,
0.06538186967372894,
-0.24181106686592102,
0.009430360049009323,
0.40782874822616577,
-0.2723170518875122,
-0.33490508794784546,
0.16888536512851715,
-0.20857803523540497,
-0.3119204342365265,
-0.18187087774276733,
-0.09426425397396088,
0.03771812096238136,
0.13425621390342712,
0.3371146321296692,
0.09648410230875015,
-0.03163541480898857,
-0.12673036754131317,
-0.12667666375637054,
-0.20444649457931519,
-0.14642822742462158,
-0.24414871633052826,
0.18000531196594238,
0.19994650781154633,
0.27317240834236145,
-0.1169973611831665,
0.16531702876091003,
0.3129616379737854,
0.032746147364377975,
0.22423171997070312,
0.21840991079807281,
0.11579810827970505,
-0.15252874791622162,
0.36748847365379333,
0.013207989744842052,
-0.03804561868309975,
0.003919894341379404,
0.3546774685382843,
-0.0871138647198677,
0.2084638625383377,
-0.26434803009033203,
0.08122702687978745,
-0.00877698976546526,
0.4296504855155945,
0.45835593342781067,
0.23895573616027832,
-0.040040165185928345,
0.04025842249393463,
0.15068425238132477,
0.15933114290237427,
-0.18522804975509644,
0.10183532536029816,
0.09713270515203476,
0.2187126725912094,
-0.39747387170791626,
-0.05711571127176285,
0.05093126371502876,
-0.07281749695539474,
0.465481698513031,
-0.055991366505622864,
-0.07615058869123459,
0.1738114356994629,
-0.3032810389995575,
0.1706697642803192,
0.22873058915138245,
0.10960201919078827,
0.022532768547534943,
-0.6027524471282959,
-0.12623713910579681,
0.09532567858695984,
0.2199668437242508,
-0.07051511108875275,
0.6874129176139832,
-0.08293773233890533,
-0.00821598805487156,
0.04741101339459419,
-0.03601878508925438,
0.26818686723709106,
0.29697370529174805,
0.019838854670524597,
0.07352256029844284,
-0.0018562690820544958,
0.01963258534669876,
0.07901819050312042,
-0.16538596153259277,
-0.29574424028396606,
-0.18731829524040222,
-0.18179789185523987,
-0.1826665699481964,
0.05649445950984955,
0.2017679214477539,
0.0906681939959526,
0.12853582203388214,
0.0034602058585733175,
0.20476627349853516,
0.012901769950985909,
0.3592259883880615,
0.05976448953151703,
-0.08253642916679382,
0.2914111316204071,
-0.025109654292464256,
-0.09313910454511642,
0.297943115234375,
0.06994765251874924,
0.08216542750597,
0.2147095501422882,
-0.0640999972820282,
-0.09643483906984329,
-0.06553816050291061,
-0.16550369560718536,
-0.18400953710079193,
0.20074042677879333,
-0.17596399784088135,
0.11178600043058395,
-0.049073003232479095,
-0.23539608716964722,
0.023111678659915924,
-0.061253614723682404,
-0.28291085362434387,
-0.2832752764225006,
-0.09420240670442581,
0.11127465963363647,
0.14383378624916077,
0.12983520328998566,
-0.2791392505168915,
0.23104451596736908,
0.09030517935752869,
0.19233958423137665,
-0.10378152132034302,
0.0032641098368912935,
-0.2043149471282959,
0.2569446563720703,
0.03989935666322708,
-0.04484569653868675,
0.19015203416347504,
-0.3580209016799927,
-0.1369289755821228,
-0.13377387821674347,
-0.017562344670295715,
0.17358972132205963,
0.23259663581848145,
0.027193143963813782,
0.23521023988723755,
0.37185677886009216,
-0.1848255693912506,
-0.21907322108745575,
0.501397430896759,
-0.13747134804725647,
0.09272608160972595,
0.12032046914100647,
0.07716745138168335,
-0.10530299693346024,
0.14638228714466095,
-0.06597311794757843,
-0.11915998160839081,
-0.130649596452713,
-0.02997664362192154,
-0.026565853506326675,
0.21970845758914948,
-0.12309340387582779,
-0.014131473377346992,
0.013009808026254177,
-0.05718011036515236,
0.3499201834201813,
-0.13133558630943298,
-0.23450061678886414,
-0.130210280418396,
-0.1442369669675827,
-0.25477635860443115,
0.32391831278800964,
0.14715009927749634,
0.20858311653137207,
-0.04822223633527756,
-0.28607526421546936,
-0.07488815486431122,
0.10930920392274857,
0.03040975332260132,
-0.12283635884523392,
-0.24883437156677246,
0.17838139832019806,
-0.052010294049978256,
-0.2867915630340576,
-0.1305297464132309,
-0.1998538225889206,
0.1627824902534485,
0.0930432379245758,
0.27662593126296997,
0.026609385386109352,
0.17123465240001678,
-0.46669572591781616,
0.12458199262619019,
-0.11436152458190918,
0.029273854568600655,
0.2274494618177414,
-0.15935923159122467,
0.20881135761737823,
0.05553528666496277,
-0.2515183091163635,
-0.022582821547985077,
0.2813414931297302,
-0.10438292473554611,
0.13009771704673767,
0.040765535086393356,
-0.11128921806812286,
-0.4653012752532959,
-0.08434168249368668,
-0.3440681993961334,
-0.3013874590396881,
-0.2342454493045807,
-0.0177529938519001,
0.17740151286125183,
-0.024642463773489,
-0.13855396211147308,
-0.03449104353785515,
-0.07010912895202637,
-0.01652354560792446,
0.4362213909626007,
-0.21989215910434723,
-0.07399951666593552,
-0.23614725470542908,
-0.02760833501815796,
-0.2136586457490921,
0.2165929526090622,
-0.15503358840942383,
0.676252007484436,
-0.6070863008499146,
0.0019424885977059603,
0.08629798889160156,
0.08192069083452225,
0.2906535863876343,
-0.3911179006099701,
-0.06035618484020233,
-0.047469232231378555,
0.3726508617401123,
0.07802990823984146,
-0.02688744105398655,
0.005287175998091698,
0.11954701691865921,
0.2883607745170593,
-0.1542005091905594,
-0.0929562970995903,
0.10119405388832092,
0.19007059931755066,
-0.23241746425628662,
-0.15609467029571533,
-0.13803227245807648,
-0.14519552886486053,
-0.22401824593544006,
0.1816082000732422,
-0.05457376688718796,
-0.22905251383781433,
0.1784503310918808,
0.3803279995918274,
0.02494976855814457,
0.17358353734016418,
0.005207842215895653,
0.03753719478845596,
-0.00879756174981594,
-0.19626928865909576,
-0.10285372287034988,
-0.002199825132265687,
0.05363749712705612,
0.3447425067424774,
0.14905355870723724,
-0.04985278099775314,
0.04518694803118706,
-0.06496557593345642,
0.16827215254306793,
-0.008757471106946468,
0.1148083359003067,
0.20572158694267273,
0.16525262594223022,
0.1604384332895279,
0.21355485916137695,
0.21818402409553528,
0.05326872691512108,
-0.1563749611377716,
0.42726266384124756,
-0.10281486809253693,
-0.34153181314468384,
0.016336003318428993,
-0.3484353721141815,
-0.43842098116874695,
-0.21191135048866272,
0.053389765322208405,
0.22581857442855835,
0.05853164941072464,
0.031545571982860565,
-0.16628777980804443,
1.1240919828414917,
0.07542403787374496,
-0.22087372839450836,
0.04258336126804352,
-0.47262346744537354,
0.22769100964069366,
-0.10476692020893097,
0.09004171192646027,
-0.26235178112983704,
0.06110979616641998,
0.013327962718904018,
-0.044770024716854095,
0.19345572590827942,
-0.3187059462070465,
-0.2339906245470047,
0.12103113532066345,
-0.21886710822582245,
-0.011571398004889488,
0.022153666242957115,
0.04185064882040024,
0.056662142276763916,
0.30455854535102844,
-0.07131749391555786,
0.38815605640411377,
0.10682836174964905,
0.33280134201049805,
-0.14278410375118256,
-0.1248350515961647,
-0.05002209544181824,
-0.41753455996513367,
-0.33276546001434326,
-0.05308639258146286,
-0.3480280935764313,
0.07729529589414597,
0.07503642141819,
0.09147069603204727,
-0.08218639343976974,
-0.05469174310564995,
-0.019294902682304382,
0.1320113092660904,
-0.026501499116420746,
0.1753612905740738,
0.003578470554202795,
-0.18305139243602753,
-0.07305501401424408,
0.04868593439459801,
-0.24653410911560059,
-0.09903515130281448,
-0.5878840088844299,
0.40525659918785095,
-0.06318853050470352,
-0.17248623073101044,
-0.027651555836200714,
0.25291797518730164,
0.27626490592956543,
-0.22015804052352905,
0.012355443090200424,
-0.23778915405273438,
-0.0924583151936531,
-0.07304251194000244,
0.3862146735191345,
-0.10580605268478394,
-0.02646373212337494,
0.12969739735126495,
0.17943009734153748,
-0.10726941376924515,
-0.06308309733867645,
0.40353259444236755,
-0.06549587100744247,
-0.06443864107131958,
0.24458086490631104,
0.030628183856606483,
-0.24169902503490448,
-0.333355188369751,
0.05426664650440216,
-0.26614999771118164,
-0.147470623254776,
-0.41925129294395447,
-0.028142010793089867,
-0.08574245870113373,
0.0878869891166687,
0.07447288930416107,
0.16734829545021057,
0.39266514778137207,
-0.0016825050115585327,
-0.22395309805870056,
-0.08377029001712799,
-0.02031508833169937,
0.09459136426448822,
0.07795540243387222,
0.020744284614920616,
-0.05901427939534187,
0.23023228347301483,
-0.013514373451471329,
-0.5612505674362183,
-0.16776998341083527,
-0.39478799700737,
0.027251699939370155,
0.007077425252646208,
-0.1525280922651291,
0.12830400466918945,
-0.15599128603935242,
0.45783424377441406,
-0.22639606893062592,
-0.25268611311912537,
-0.4345833957195282,
0.20992983877658844,
0.01340336725115776,
0.10611481964588165,
-0.396657794713974,
-0.21847222745418549,
-0.1577632874250412,
-0.028801120817661285,
0.19138704240322113,
-0.20165106654167175,
-0.046027570962905884,
-0.04942071810364723,
-0.2933090031147003,
-0.02152695320546627,
0.06473668664693832,
-0.21507582068443298,
0.29920142889022827,
0.04856652393937111,
0.5163918137550354,
-0.21964585781097412,
-0.016485044732689857,
-0.05720002204179764,
-0.284492552280426,
-0.13293012976646423,
0.22835734486579895,
-0.0982375219464302,
-0.05830634385347366,
0.2904031574726105,
-0.025044873356819153,
-0.1137877032160759,
-0.02937431074678898,
0.2310807704925537,
0.050727952271699905,
-0.167631596326828,
-0.09160001575946808,
0.001803383813239634,
0.43663448095321655,
-0.01293694693595171,
0.053934670984745026,
0.20356415212154388,
0.08994688093662262,
-0.04199371859431267,
-0.015292326919734478,
-0.03552268072962761,
-0.3174775242805481,
-0.21209098398685455,
0.07495744526386261,
0.04703761264681816,
-0.0830446258187294,
-0.05016777291893959,
0.15972274541854858,
-0.07072870433330536,
0.07177712023258209,
0.10182294994592667,
0.00607281643897295,
-0.062941774725914,
0.030017640441656113,
-0.24412262439727783,
-0.01519817765802145,
0.022623641416430473,
0.07741446048021317,
0.044783931225538254,
-0.3207927346229553,
0.07082480937242508,
0.042751990258693695,
-0.02073626033961773,
-0.30966952443122864,
-0.05645298212766647,
0.26225191354751587,
-0.17922253906726837,
-0.06090373545885086,
-0.253165602684021,
0.1748056709766388,
-0.1914796382188797,
0.03693867102265358,
-0.05306267738342285,
-0.10194557160139084,
-0.15922822058200836,
-0.21693116426467896,
0.26377415657043457,
0.22350864112377167,
0.02840975672006607,
0.039550937712192535,
0.015537980012595654,
0.015280993655323982,
-0.05145663022994995,
0.009739439003169537,
-0.02708779089152813,
-0.025353748351335526,
0.13908280432224274,
-0.0012908190255984664,
0.2553386390209198,
0.1112080067396164,
0.36949852108955383,
0.40837907791137695,
0.24291890859603882,
0.14696988463401794,
0.12285063415765762,
0.22719116508960724,
-0.059033386409282684,
-0.1735696792602539,
0.008726386353373528,
0.42983749508857727,
0.10727644711732864,
0.017734674736857414,
0.394792765378952,
-0.2883986532688141,
0.22498811781406403,
-0.10248979926109314,
0.21099840104579926,
0.2861284613609314,
-0.0194504763931036,
-0.15057192742824554,
-0.04473249241709709,
-0.48128435015678406,
0.05176970362663269,
-0.4502829611301422,
0.1196063831448555,
0.09870091080665588,
-0.0748419463634491,
0.30359530448913574,
-0.07398487627506256,
0.2164679914712906,
-0.2756630778312683,
0.3082049489021301,
0.21743687987327576,
0.22706393897533417,
-0.19155380129814148,
-0.33322209119796753,
-0.0460343100130558,
0.33667635917663574,
-0.022651653736829758,
0.020705334842205048,
-0.14327292144298553,
0.027307456359267235,
-0.07955481112003326,
-0.13396646082401276,
0.26177284121513367,
-0.02807122841477394,
-0.2142777442932129,
0.16837763786315918,
-0.09863947331905365,
-0.16982822120189667,
0.3560609817504883,
-0.04663665220141411,
-0.17235997319221497,
0.00627068942412734,
0.42010757327079773,
-0.15976454317569733,
0.37693503499031067,
-0.005825534462928772,
-0.1554705798625946,
-0.16121350228786469,
0.1522216796875,
0.3013761341571808,
0.11352328956127167,
0.6354653239250183,
-0.12326926738023758,
-0.0376376137137413,
-0.000156527865328826,
-0.288933128118515,
0.2577939033508301,
0.18880538642406464,
0.03258517012000084,
-0.0915394052863121,
0.06430692225694656,
0.10686512291431427,
-0.21641913056373596,
0.2216133028268814,
-0.08012909442186356,
0.3031158745288849,
-0.033198170363903046,
-0.04633843153715134,
-0.019460776820778847,
0.08004239946603775,
-0.037063390016555786,
-0.19281139969825745,
0.10197294503450394,
-0.050361517816782,
-0.23789845407009125,
-0.05969392508268356,
0.15198558568954468,
0.25074490904808044,
0.02205912210047245,
-0.35918354988098145,
0.36760368943214417,
0.0065324995666742325,
0.22784271836280823,
-0.09698403626680374,
-0.1006067544221878,
0.24632525444030762,
-0.15625736117362976,
-0.09777562320232391,
0.14946208894252777,
-0.12805508077144623,
0.14184917509555817,
0.0722910538315773,
0.005473218858242035,
-0.12045186012983322,
-0.23488831520080566,
-0.13246679306030273,
0.10927341878414154
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
When I use the filter on the arrow table directly, it works like butter. But I can't find a way to update the table in `Dataset` object.
```
ds_table = dataset.data.filter(mask=dataset['flag'])
```
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 32 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
Hi ! Currently the filter method reads the dataset batch by batch to write a new, filtered, arrow file on disk. Therefore all the reading + writing can take some time.
Using a mask directly on the arrow table doesn't do any read or write operation therefore it's way quicker.
Replacing the old table by the new one should do the job:
```python
dataset._data = dataset._data.filter(...)
```
Note: this is a **workaround** and in general users shouldn't have to do that. In particular if you did some `shuffle` or `select` before that then it would not work correctly since the indices mapping (index from `__getitem__` -> index in the table) would not be valid anymore. But if you haven't done any `shuffle`, `select`, `shard`, `train_test_split` etc. then it should work.
Ideally it would be awesome to update the filter function to allow masking this way !
If you would like to give it a shot I will be happy to help :)
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 162 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
Hi @lhoestq @ayubSubhaniya,
If there's no progress on this one, can I try working on it?
Thanks,
Gunjan
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 18 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
Sure @gchhablani feel free to start working on it, this would be very appreciated :)
This feature is would be really awesome, especially since arrow allows to mask really quickly and without having to rewrite the dataset on disk
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 39 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
No update so far, we haven't worked on this yet :/
Though PyArrow is much more stable than 3 years ago so it would be a good time to dive into this
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 32 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
Hi @lhoestq, thanks a lot for the update!
I would like to work on this(if possible). Could you please give me some steps regarding how should I approach this? Also any references would be great!
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 35 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
I just played a bit with it to make sure using `table.filter()` is fine, but actually it seems to create a new table **in memory** :/
This is an issue since it can quickly fill the RAM, and `datasets`'s role is to make sure you can load bigger-than-memory datasets. Therefore I don't think it's a good idea in the end to use `table.filter()`
Anyway I just ran OP's code an it runs in 20ms now on my side thanks to the I/O optimizations we did.
Another way to speed up `filter` is to add support pyarrow expressions though, using e.g. arrow formatting + dataset.filter (runs in 10ms on my side):
```python
import pyarrow.dataset as pds
import pyarrow.compute as pc
expr = pc.field("flag") == True # or any condition
filtered = dataset.with_format("arrow").filter(
lambda t: pds.dataset(t).to_table(columns={"mask": expr})[0].to_numpy(),
batched=True,
).with_format(None)
```
or simply with numpy:
```python
filtered = dataset.with_format("np").filter(
lambda flags_array: flags_array == True, # or any condition
input_columns=["flag"]
batched=True,
).with_format(None)
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 158 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
I can confirm that it's still extremely slow to use the `filter` function, and even trying workarounds like iterating on the dataset to create a mask for the `select` function is very slow (10-20 it/s) on a very small dataset with 5 fields.
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 43 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1796
|
Filter on dataset too much slowww
|
You can iterate faster on the dataset if you format it with zero-copy formats like `with_format("arrow")`, `with_format("numpy")` or `with_format("polars")`. This is useful to use arrow/numpy/polars functions in map() or filter() and accelerate your data pipeline
|
I have a dataset with 50M rows.
For pre-processing, I need to tokenize this and filter rows with the large sequence.
My tokenization took roughly 12mins. I used `map()` with batch size 1024 and multi-process with 96 processes.
When I applied the `filter()` function it is taking too much time. I need to filter sequences based on a boolean column.
Below are the variants I tried.
1. filter() with batch size 1024, single process (takes roughly 3 hr)
2. filter() with batch size 1024, 96 processes (takes 5-6 hrs ¯\\\_(ツ)\_/¯)
3. filter() with loading all data in memory, only a single boolean column (never ends).
Can someone please help?
Below is a sample code for small dataset.
```
from datasets import load_dataset
dataset = load_dataset('glue', 'mrpc', split='train')
dataset = dataset.map(lambda x: {'flag': random.randint(0,1)==1})
def _amplify(data):
return data
dataset = dataset.filter(_amplify, batch_size=1024, keep_in_memory=False, input_columns=['flag'])
```
| 35 |
Filter on dataset too much slowww
|
[
-0.4729154109954834,
-0.09102609753608704,
-0.2756615877151489,
-0.041550036519765854,
-0.003742571221664548,
-0.036432720720767975,
0.05921170487999916,
0.27991294860839844,
0.212659552693367,
0.011420807801187038,
-0.19529449939727783,
-0.028315145522356033,
0.059318434447050095,
0.340852290391922,
-0.5480749607086182,
0.1882185935974121,
-0.25563785433769226,
0.07758089154958725,
0.19450487196445465,
-0.17349715530872345,
0.11557837575674057,
-0.16262824833393097,
-0.06966197490692139,
-0.023278729990124702,
0.07380285114049911,
-0.21627277135849,
0.4056832492351532,
-0.06513254344463348,
-0.2785005569458008,
-0.02578730694949627,
-0.01785700023174286,
0.3851073086261749,
-0.29997166991233826,
0.32066306471824646,
-0.00010367292998125777,
-0.03297247365117073,
0.12594251334667206,
0.24744108319282532,
-0.12842051684856415,
0.5034807920455933,
-0.1980029195547104,
-0.2248501032590866,
-0.09914792329072952,
-0.13131378591060638,
-0.298770010471344,
0.017781421542167664,
-0.3268349766731262,
-0.31679075956344604,
0.09840745478868484,
0.16391582787036896,
0.2975005805492401,
0.0004931796574965119,
-0.4670199453830719,
-0.05547057464718819,
0.2206650972366333,
0.1566171795129776,
-0.09204520285129547,
-0.02090148814022541,
0.41370177268981934,
-0.11000671237707138,
-0.17527428269386292,
0.5733788013458252,
-0.2527315318584442,
0.0625290498137474,
-0.04000403359532356,
-0.1636180877685547,
0.20272532105445862,
-0.08188736438751221,
0.2806831896305084,
0.05576155707240105,
0.1614602506160736,
0.2015993595123291,
-0.1425127238035202,
-0.1503838300704956,
-0.18588009476661682,
-0.08297502994537354,
-0.07314444333314896,
-0.16185100376605988,
-0.20819231867790222,
0.0025532152503728867,
-0.29943007230758667,
-0.2212369590997696,
0.10982869565486908,
0.058621738106012344,
-0.09549760818481445,
0.3252684473991394,
-0.02774512581527233,
0.005697829648852348,
0.21568205952644348,
-0.04146682843565941,
0.3138999044895172,
-0.2599029242992401,
0.1750599592924118,
0.0170423723757267,
-0.2592557966709137,
-0.1459875851869583,
0.1438271701335907,
0.44527101516723633,
-0.10868251323699951,
-0.02985188364982605,
-0.06016307324171066,
0.315814346075058,
0.25184178352355957,
-0.0575924851000309,
0.06589698046445847,
-0.0951206386089325,
-0.06932633370161057,
0.059071898460388184,
0.4104774594306946,
-0.1282091736793518,
-0.2617930471897125,
-0.0005665149074047804,
0.22387851774692535,
-0.21592243015766144,
0.13718760013580322,
-0.2314072698354721,
-0.14295844733715057,
-0.2665342390537262,
-0.5315574407577515,
-0.02070780284702778,
0.03963515907526016,
-0.12059807032346725,
0.40025967359542847,
0.37391236424446106,
-0.1320282518863678,
0.037014611065387726,
0.010941158048808575,
-0.35822489857673645,
-0.20996442437171936,
-0.08821381628513336,
-0.2649841010570526,
-0.07347548753023148,
-0.07700663059949875,
-0.04738098382949829,
0.044724464416503906,
-0.30912595987319946,
0.0467824712395668,
-0.04139142856001854,
-0.11197339743375778,
0.11602764576673508,
0.13493657112121582,
-0.298441618680954,
0.020882010459899902,
0.33281847834587097,
-0.09212171286344528,
0.31511592864990234,
0.10888778418302536,
-0.12670856714248657,
-0.1050327941775322,
-0.004280127584934235,
-0.2746591567993164,
-0.27017658948898315,
0.15871037542819977,
0.334547221660614,
0.1446366310119629,
-0.006250531412661076,
0.09802550822496414,
0.3561137318611145,
-0.0435793362557888,
-0.2636745870113373,
-0.3170238137245178,
-0.025238992646336555,
-0.35728245973587036,
0.07285572588443756,
0.21759985387325287,
0.2893863618373871,
-0.5620984435081482,
0.11391384154558182,
-0.524067759513855,
0.08987974375486374,
0.5199306011199951,
0.48159846663475037,
-0.19797196984291077,
0.0657721757888794,
-0.03463814780116081,
-0.128241628408432,
0.5111901760101318,
0.04812424257397652,
-0.4987286627292633,
0.3865761160850525,
-0.179061159491539,
0.06956101208925247,
0.20052944123744965,
0.3526027202606201,
0.15814583003520966,
-0.22517479956150055,
0.12963035702705383,
0.21330292522907257,
-0.2940293550491333,
-0.04350575804710388,
-0.26247164607048035,
0.08018054068088531,
0.2227570116519928,
0.17146506905555725,
-0.15170985460281372,
0.10124649107456207,
0.07682006061077118,
-0.05654110386967659,
0.1868005394935608,
0.1202985867857933,
-0.09945155680179596,
0.10572598874568939,
0.3779531419277191,
-0.06303821504116058,
-0.08060041069984436,
-0.11286233365535736,
0.10232067853212357,
-0.1219257116317749,
0.35759735107421875,
-0.12278170138597488,
0.16716518998146057,
-0.19679643213748932,
-0.3490317165851593,
0.02276446484029293,
-0.09217324107885361,
0.09521763771772385,
0.19310985505580902,
0.12197444587945938,
0.035884466022253036,
-0.19508737325668335,
0.06366056203842163,
0.27447912096977234,
-0.26791617274284363,
-0.27517783641815186,
0.08565566688776016,
0.1358834058046341,
0.04605508968234062,
-0.031582728028297424,
0.2738478183746338,
-0.1922011524438858,
0.1338120549917221,
0.04403203725814819,
-0.01440303772687912,
0.010347970761358738,
0.16753950715065002,
0.040039002895355225,
0.3348248302936554,
0.2625160813331604,
0.02158348821103573,
0.04590945690870285,
0.16021619737148285,
0.17555773258209229,
0.2278241217136383,
-0.12203852087259293,
-0.31979697942733765,
0.30796539783477783,
-0.08715789765119553,
0.2954008877277374,
0.125450998544693,
-0.20641371607780457,
0.41407397389411926,
0.12779945135116577,
0.07796322554349899,
-0.15829318761825562,
0.418050616979599,
0.15391004085540771,
0.19752927124500275,
0.2450578212738037,
-0.05189592391252518,
0.4783655107021332,
0.3200426399707794,
-0.05690917372703552,
-0.13070756196975708,
0.28456011414527893,
0.16479405760765076,
-0.019026830792427063,
-0.040245261043310165,
0.09566888213157654,
0.1787237673997879,
0.4176732897758484,
0.05276976898312569,
-0.14537416398525238,
0.06343358755111694,
-0.2995762825012207,
0.2604021430015564,
0.1656114012002945,
0.15876300632953644,
0.014149639755487442,
0.32148340344429016,
-0.2382861226797104,
-0.4155014157295227,
-0.2618594169616699,
0.006279194261878729,
0.34240269660949707,
-0.03750043734908104,
0.08771780133247375,
-0.13946935534477234,
-0.2951745092868805,
0.25119268894195557,
0.07712850719690323,
0.25730255246162415,
-0.253795862197876,
0.2135595977306366,
0.1911775767803192,
-0.0626261904835701,
0.2072673887014389,
-0.04744844511151314,
0.2588190734386444,
0.41974201798439026,
-0.05943909287452698,
-0.23258112370967865,
-0.1665627360343933,
-0.1254637986421585,
0.18786543607711792,
0.13206952810287476,
0.3591808080673218,
0.3119755983352661,
0.07627737522125244,
-0.04583510383963585,
-0.029986074194312096,
-0.4222204387187958,
-0.11714421212673187,
0.06996764987707138,
0.2951386570930481,
0.01075685489922762,
0.29219144582748413,
-0.1360074281692505,
-0.18205666542053223,
0.15212324261665344,
-0.13379992544651031,
-0.15949444472789764,
-0.0803796723484993,
-0.33865734934806824,
0.1636395901441574,
0.11527930200099945,
-0.08725932240486145,
-0.23313328623771667,
-0.32835984230041504,
-0.32077133655548096,
-0.06368666887283325,
0.11653996258974075,
-0.13153508305549622,
0.026852281764149666,
-0.17824700474739075,
-0.13350576162338257,
0.22648096084594727,
-0.20880551636219025,
-0.20985594391822815,
0.24586328864097595,
0.19487236440181732,
-0.14177343249320984,
-0.35692310333251953,
-0.1676117479801178,
-0.03533872589468956,
0.13332140445709229,
-0.2571025490760803,
-0.014354279264807701,
-0.5886440873146057,
0.008827217854559422,
0.21162480115890503,
-0.05440612509846687,
0.23005400598049164,
-0.1751323938369751,
-0.28051885962486267,
-0.060575932264328,
-0.32426220178604126,
-0.013908886350691319,
-0.22547604143619537,
-0.14295001327991486,
-0.2740463614463806,
0.6447513103485107,
-0.0527692474424839,
0.4421471953392029,
0.019910641014575958,
0.0840698853135109,
0.07485152781009674,
0.18170276284217834,
0.017783058807253838,
-0.171509250998497,
-0.5427103042602539,
-0.01453807856887579,
0.23447856307029724,
-0.07015448063611984,
0.15146103501319885,
0.04110410809516907,
-0.3283454477787018,
-0.14866529405117035,
-0.15127035975456238,
-0.009933213703334332,
-0.1110507994890213,
-0.0583118200302124,
0.27962246537208557,
0.010046528652310371,
0.4107111990451813,
0.038292866200208664,
-0.25617489218711853,
-0.20345664024353027,
-0.09503521770238876,
0.003081689355894923,
-0.016955118626356125,
-0.2629093527793884,
-0.3998658061027527,
-0.01848480850458145,
-0.266710489988327,
0.11249075084924698,
-0.028371987864375114,
0.21237407624721527,
-0.045933712273836136,
0.05971084162592888,
0.21467292308807373,
-0.026833372190594673,
0.510565996170044,
-0.18810340762138367,
0.1091286689043045,
0.01592455431818962,
-0.2842915952205658,
-0.2860078811645508,
0.22688600420951843,
-0.18927587568759918,
0.1628924310207367,
0.4493597745895386,
0.18901276588439941,
-0.22060097754001617,
-0.12470559030771255,
0.1981375366449356,
-0.02443191595375538,
-0.056930117309093475,
-0.07531490176916122,
-0.10338553041219711,
-0.24937403202056885,
-0.06261814385652542,
0.2079991102218628,
-0.10416779667139053,
0.10802510380744934,
0.1729568988084793,
-0.3645195960998535,
-0.023747777566313744,
-0.1814206838607788,
0.1402777135372162,
0.14370501041412354,
-0.05163710564374924,
0.24387295544147491,
0.4254678785800934,
-0.22004958987236023,
0.20537503063678741,
-0.23373304307460785,
0.32978764176368713,
0.10444721579551697,
0.0009161945781670511,
0.16010135412216187,
0.1608627438545227,
0.17277686297893524,
0.3160526156425476,
0.10552816092967987,
0.2877074182033539,
0.1375870704650879,
0.43417954444885254,
-0.05272124335169792,
0.18771347403526306,
0.03680895268917084,
0.2041465938091278,
-0.313993364572525,
-0.3662473261356354,
0.2142525017261505,
0.16388775408267975,
-0.20238570868968964,
0.4561120271682739,
0.048509202897548676,
0.14376379549503326,
0.11933691054582596,
0.1736779808998108,
0.864829957485199,
-0.1675197333097458,
-0.3045085370540619,
-0.05668138712644577,
-0.07174142450094223,
0.1407262235879898,
-0.2245165854692459,
0.08056668192148209,
-0.043385423719882965,
-0.5405608415603638,
0.22328536212444305,
0.028234384953975677,
0.16153110563755035,
-0.09084133058786392,
0.029768014326691628,
0.05628013238310814,
-0.06770205497741699,
0.039745837450027466,
-0.0369020514190197,
0.34369707107543945,
0.1734979897737503,
-0.0908258706331253,
-0.32464340329170227,
0.24433882534503937,
-0.016700636595487595,
0.03787587583065033,
-0.06256470084190369,
-0.0079830726608634,
0.1311340034008026,
0.06000545620918274,
-0.022311247885227203,
-0.24581803381443024,
-0.25762781500816345,
0.09363537281751633,
-0.40133169293403625,
-0.3076660633087158,
-0.07758722454309464,
-0.3823793828487396,
-0.22404053807258606,
0.4336235821247101,
-0.013945660553872585,
0.31911352276802063,
0.010906864888966084,
0.24762773513793945,
0.02456134371459484,
-0.20284496247768402,
-0.012995881959795952,
-0.16882500052452087,
-0.10531829297542572,
0.03763941302895546,
0.029326193034648895,
-0.263998806476593,
0.031117290258407593,
-0.0016399277374148369,
0.22644668817520142,
-0.05431264266371727,
-0.2089693546295166,
0.05285467207431793,
-0.11199545115232468,
-0.32643911242485046,
0.26323559880256653,
0.10723260790109634,
0.06975821405649185,
0.5130979418754578,
0.25172606110572815,
-0.34674859046936035,
-0.2982552647590637,
0.29434889554977417,
0.1918039470911026,
0.15687306225299835,
0.24452900886535645,
-0.015467721968889236,
-0.5254961252212524,
-0.3039259910583496,
-0.01763089746236801,
0.22359977662563324,
-0.09059048444032669,
0.20214061439037323,
-0.19285854697227478,
-0.29544174671173096,
0.2810363173484802,
-0.07299578189849854,
-0.08968503028154373,
-0.029348023235797882,
-0.22884529829025269,
-0.315447598695755,
-0.11391913890838623,
-0.09159944951534271,
0.04028850048780441,
-0.21027977764606476,
-0.19281619787216187,
-0.049375467002391815,
-0.2307766228914261,
0.32559511065483093,
-0.446624755859375,
-0.2739569842815399,
-0.026679230853915215,
0.22023163735866547,
-0.06440840661525726,
0.02320491150021553,
0.12639407813549042,
0.05707606300711632,
0.29673612117767334,
0.024341018870472908,
-0.017155705019831657,
-0.45507821440696716,
0.2436322718858719,
0.05733461678028107,
-0.25438669323921204,
-0.34639719128608704,
0.14863130450248718,
-0.25805237889289856,
-0.32670342922210693,
-0.12577375769615173,
-0.12036824971437454,
-0.006111269351094961,
0.08923787623643875,
-0.40090081095695496,
-0.15867415070533752,
-0.5033881664276123,
0.27768173813819885,
0.11017373949289322,
-0.040247030556201935,
-0.08865523338317871,
0.0632663443684578,
0.0735403373837471,
0.357938677072525,
-0.1998925358057022,
0.22402812540531158,
-0.08671487867832184,
-0.045684926211833954,
0.018482979387044907,
0.20597271621227264,
-0.11143827438354492,
0.006560960318893194,
0.5102459192276001,
0.31370851397514343,
0.4174708425998688,
0.29217231273651123,
-0.10041350871324539,
0.13919200003147125,
0.30925092101097107,
-0.44461214542388916,
-0.20852097868919373,
0.26366305351257324,
-0.05582314357161522,
0.4432716369628906,
0.008010869845747948,
-0.24105168879032135,
0.24829092621803284,
0.32885730266571045,
0.2264808863401413,
0.1545688807964325,
-0.19193290174007416,
-0.1810339391231537,
0.19901874661445618,
0.44333580136299133,
-0.09091325104236603,
0.2825779616832733,
0.23160573840141296,
-0.005342286080121994,
0.623627245426178,
0.19741913676261902,
0.43583226203918457,
0.10042669624090195,
0.36605480313301086,
-0.31169790029525757,
-0.1921960711479187,
0.0930221751332283,
0.4563332200050354,
-0.3839164674282074,
0.024850888177752495,
0.24367399513721466,
-0.3820118010044098,
0.23112815618515015,
-0.23482079803943634,
-0.021812299266457558,
0.08486708998680115,
0.007927601225674152,
0.00881196092814207,
-0.06251000612974167,
-0.07941968739032745,
0.042111415416002274,
0.06612436473369598,
0.04048895463347435,
0.09056858718395233,
0.1354352980852127,
-0.19676677882671356,
0.10698810964822769,
-0.27383551001548767,
0.025442788377404213,
-0.30690011382102966,
0.17856863141059875,
-0.02410857193171978,
0.12111695855855942,
0.02772444672882557,
0.07345447689294815,
0.2278968244791031,
0.24557851254940033,
-0.014667944051325321,
0.2356232851743698,
0.17641524970531464,
0.06931407004594803,
-0.09469025582075119,
-0.5208753347396851,
-0.35041943192481995,
0.3029594123363495,
-0.019865116104483604,
0.27277958393096924,
0.09127888828516006,
0.21562133729457855,
-0.3433014452457428,
-0.005306123290210962,
0.10435117781162262,
-0.16929326951503754,
-0.14423707127571106,
0.024848664179444313,
0.20342124998569489,
-0.041605010628700256,
-0.2152508795261383,
-0.10109919309616089,
-0.005716542713344097,
-0.007236724719405174,
0.39071860909461975,
-0.4225406050682068,
0.07816066592931747,
-0.013633149676024914,
0.14790183305740356,
-0.2822537124156952,
0.30245545506477356,
-0.1428060680627823,
0.20303906500339508,
-0.28553882241249084,
-0.20388032495975494,
-0.4109664857387543,
-0.05970748886466026,
-0.2553325891494751,
-0.07090519368648529,
0.0471024215221405,
0.2353164702653885,
0.20107537508010864,
0.1819639503955841,
0.2632932960987091,
-0.004956503864377737,
0.00644651660695672,
-0.3464527428150177,
-0.14005480706691742,
0.003588972147554159,
-0.315101683139801,
0.08628003299236298,
-0.0008317495812661946,
-0.3978062868118286,
0.35656413435935974,
-0.1803603619337082,
0.33204877376556396,
-0.07691480219364166,
-0.08224815130233765,
0.001131177879869938,
0.38720160722732544,
0.016860811039805412,
0.14879336953163147,
0.2806134521961212,
-0.18202170729637146,
0.29900726675987244,
0.01864980161190033,
-0.018525976687669754,
-0.15830552577972412,
0.24339134991168976,
0.3253030478954315,
0.11243877559900284,
0.006494161672890186,
-0.052642177790403366,
0.05742872133851051,
0.23429811000823975,
-0.008479567244648933,
0.14811106026172638,
0.11659682542085648,
0.07582969218492508,
0.22241879999637604,
0.3460007905960083,
-0.13722078502178192,
-0.07953725755214691,
0.08436472713947296,
-0.13160546123981476,
-0.2697230577468872,
-0.13943897187709808,
0.4583006799221039,
-0.20351891219615936,
-0.16306708753108978,
-0.2957879900932312,
0.2358326017856598,
0.28525686264038086,
0.15265831351280212,
0.17427784204483032,
-0.11862175911664963,
0.2733233869075775,
-0.15653927624225616,
0.014846080914139748,
0.38450342416763306,
-0.09116227924823761,
0.016913743689656258,
-0.010163727216422558,
0.04862712323665619,
0.12702053785324097,
-0.28425872325897217,
-0.18146373331546783,
-0.06561059504747391
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
Hi !
Apache Beam is a framework used to define data transformation pipelines. These pipeline can then be run in many runtimes: DataFlow, Spark, Flink, etc. There also exist a local runner called the DirectRunner.
Wikipedia is a dataset that requires some parsing, so to allow the processing to be run on this kind of runtime we're using Apache Beam.
At Hugging Face we've already processed certain versions of wikipedia (the `20200501.en` one for example) so that users can directly download the processed version instead of using Apache Beam to process it.
However for the japanese language we haven't processed it so you'll have to run the processing on your side.
So you do need Apache Beam to process `20200501.ja`.
You can install Apache Beam with
```
pip install apache-beam
```
I think we can probably improve the error message to let users know of this subtlety.
What #498 implied is that Apache Beam is not needed when you process a dataset that doesn't use Apache Beam.
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 167 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
Thanks for your reply!
I understood.
I tried again with installing apache-beam, add ` beam_runner="DirectRunner"` and an anther `mwparserfromhell` is also required so I installed it.
but, it also failed. It exited 1 without error message.
```py
import datasets
# BTW, 20200501.ja doesn't exist at wikipedia, so I specified date argument
wiki = datasets.load_dataset("wikipedia", language="ja", date="20210120", cache_dir="./datasets", beam_runner="DirectRunner")
print(wiki)
```
and its log is below
```
Using custom data configuration 20210120.ja
Downloading and preparing dataset wikipedia/20210120.ja-date=20210120,language=ja (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to ./datasets/wikipedia/20210120.ja-date=20210120,language=ja/0.0.0/4021357e28509391eab2f8300d9b689e7e8f3a877ebb3d354b01577d497ebc63...
Killed
```
I also tried on another machine because it may caused by insufficient resources.
```
$ python main.py
Using custom data configuration 20210120.ja
Downloading and preparing dataset wikipedia/20210120.ja-date=20210120,language=ja (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to ./datasets/wikipedia/20210120.ja-date=20210120,language=ja/0.0.0/4021357e28509391eab2f8300d9b689e7e8f3a877ebb3d354b01577d497ebc63...
Traceback (most recent call last):
File "main.py", line 3, in <module>
wiki = datasets.load_dataset("wikipedia", language="ja", date="20210120", cache_dir="./datasets", beam_runner="DirectRunner")
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/load.py", line 609, in load_dataset
builder_instance.download_and_prepare(
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/builder.py", line 526, in download_and_prepare
self._download_and_prepare(
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/datasets/builder.py", line 1069, in _download_and_prepare
pipeline_results = pipeline.run()
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/pipeline.py", line 561, in run
return self.runner.run_pipeline(self, self._options)
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/direct/direct_runner.py", line 126, in run_pipeline
return runner.run_pipeline(pipeline, options)
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 182, in run_pipeline
self._latest_run_result = self.run_via_runner_api(
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 193, in run_via_runner_api
return self.run_stages(stage_context, stages)
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 358, in run_stages
stage_results = self._run_stage(
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 549, in _run_stage
last_result, deferred_inputs, fired_timers = self._run_bundle(
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 595, in _run_bundle
result, splits = bundle_manager.process_bundle(
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 888, in process_bundle
self._send_input_to_worker(process_bundle_id, transform_id, elements)
File "/home/miyamonz/.cache/pypoetry/virtualenvs/try-datasets-4t4JWXxu-py3.8/lib/python3.8/site-packages/apache_beam/runners/portability/fn_api_runner/fn_runner.py", line 765, in _send_input_to_worker
data_out.write(byte_stream)
File "apache_beam/coders/stream.pyx", line 42, in apache_beam.coders.stream.OutputStream.write
File "apache_beam/coders/stream.pyx", line 47, in apache_beam.coders.stream.OutputStream.write
File "apache_beam/coders/stream.pyx", line 109, in apache_beam.coders.stream.OutputStream.extend
AssertionError: OutputStream realloc failed.
```
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 279 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
Hi @miyamonz,
I tried replicating this issue using the same snippet used by you. I am able to download the dataset without any issues, although I stopped it in the middle because the dataset is huge.
Based on a similar issue [here](https://github.com/google-research/fixmatch/issues/23), it could be related to your environment setup, although I am just guessing here. Can you share these details?
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 61 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
thanks for your reply and sorry for my late response.
## environment
my local machine environment info
- Ubuntu on WSL2
`lsb_release -a`
```
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
```
RTX 2070 super
Inside WSL, there is no nvidia-msi command. I don't know why.
But, `torch.cuda.is_available()` is true and when I start something ML training code GPU usage is growing up, so I think it works.
From PowerShell, there is nvidia-smi.exe and result is below.
```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.05 Driver Version: 470.05 CUDA Version: 11.3 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... WDDM | 00000000:09:00.0 On | N/A |
| 0% 30C P8 19W / 175W | 523MiB / 8192MiB | 3% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1728 C+G Insufficient Permissions N/A |
| 0 N/A N/A 3672 C+G ...ekyb3d8bbwe\YourPhone.exe N/A |
| 0 N/A N/A 6304 C+G ...2txyewy\TextInputHost.exe N/A |
| 0 N/A N/A 8648 C+G C:\Windows\explorer.exe N/A |
| 0 N/A N/A 9536 C+G ...y\ShellExperienceHost.exe N/A |
| 0 N/A N/A 10668 C+G ...5n1h2txyewy\SearchApp.exe N/A |
| 0 N/A N/A 10948 C+G ...artMenuExperienceHost.exe N/A |
| 0 N/A N/A 11988 C+G ...8wekyb3d8bbwe\Cortana.exe N/A |
| 0 N/A N/A 12464 C+G ...cw5n1h2txyewy\LockApp.exe N/A |
| 0 N/A N/A 13280 C+G ...upport\CEF\Max Helper.exe N/A |
| 0 N/A N/A 15948 C+G ...t\GoogleIMEJaRenderer.exe N/A |
| 0 N/A N/A 16128 C+G ...ram Files\Slack\Slack.exe N/A |
| 0 N/A N/A 19096 C+G ...8bbwe\WindowsTerminal.exe N/A |
+-----------------------------------------------------------------------------+
```
I don't know what should I show in such a case. If it's not enough, please tell me some commands.
---
## what I did
I surveyed more and I found 2 issues.
About the first one, I wrote it as a new issue.
https://github.com/huggingface/datasets/issues/2031
The error I mentioned in the previous comment above, which occurred on my local machine, is no longer occurring.
But, it still failed. In the previous comment, I wrote `AssertionError: OutputStream realloc failed.` happen on another machine. It also happens on my local machine.
Here's what I've tried.
the wikipedia.py downloads these xml.bz2 files based on dumpstatus.json
In Japanese Wikipedia dataset that I specified, it will download these 6 files.
`https://dumps.wikimedia.org/jawiki/20210120/dumpstatus.json`
and filtered json based on wikipedia.py is below.
```json
{
"jobs": {
"articlesmultistreamdump": {
"files": {
"jawiki-20210120-pages-articles-multistream1.xml-p1p114794.bz2": {
"url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream1.xml-p1p114794.bz2"
},
"jawiki-20210120-pages-articles-multistream2.xml-p114795p390428.bz2": {
"url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream2.xml-p114795p390428.bz2"
},
"jawiki-20210120-pages-articles-multistream3.xml-p390429p902407.bz2": {
"url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream3.xml-p390429p902407.bz2"
},
"jawiki-20210120-pages-articles-multistream4.xml-p902408p1721646.bz2": {
"url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream4.xml-p902408p1721646.bz2"
},
"jawiki-20210120-pages-articles-multistream5.xml-p1721647p2807947.bz2": {
"url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream5.xml-p1721647p2807947.bz2"
},
"jawiki-20210120-pages-articles-multistream6.xml-p2807948p4290013.bz2": {
"url": "/jawiki/20210120/jawiki-20210120-pages-articles-multistream6.xml-p2807948p4290013.bz2"
}
}
}
}
}
```
So, I tried running with fewer resources by modifying this line.
https://github.com/huggingface/datasets/blob/13a5b7db992ad5cf77895e4c0f76595314390418/datasets/wikipedia/wikipedia.py#L524
I changed it like this. just change filepaths list.
` | "Initialize" >> beam.Create(filepaths[:1])`
and I added a print line inside for the loop of _extract_content.
like this `if(i % 100000 == 0): print(i)`
first, without modification, it always stops after all _extract_content is done.
- `filepaths[:1]` then it succeeded.
- `filepaths[:2]` then it failed.
I don't try all patterns because each pattern takes a long time.
### my opinion
It seems it's successful when the entire file size is small.
so, at least it doesn't file-specific issue.
I don't know it's true but I think when beam_writter writes into a file, it consumes memory depends on its entire file.
but It's correct Apache Beam's behavior? I'm not familiar with this library.
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 606 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
I don't know if this is related, but there is this issue on the wikipedia processing that you reported at #2031 (open PR is at #2037 ) .
Does the fix your proposed at #2037 helps in your case ?
And for information, the DirectRunner of Apache Beam is not optimized for memory intensive tasks, so you must be right when you say that it uses the memory for the entire file.
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 72 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
the #2037 doesn't solve my problem directly, but I found the point!
https://github.com/huggingface/datasets/blob/349ac4398a3bcae6356f14c5754483383a60e8a4/datasets/wikipedia/wikipedia.py#L523
this `beam.transforms.Reshuffle()` cause the memory error.
it makes sense if I consider the shuffle means. Beam's reshuffle seems need put all data in memory.
Previously I doubt that this line causes error, but at that time another bug showed in #2037 made error, so I can't found it.
Anyway, I comment out this line, and run load_dataset, then it works!
```python
wiki = datasets.load_dataset(
"./wikipedia.py",
cache_dir="./datasets",
beam_runner="DirectRunner",
language="ja",
date="20210120",
)["train"]
```

Dataset has already shuffle function. https://github.com/huggingface/datasets/blob/349ac4398a3bcae6356f14c5754483383a60e8a4/src/datasets/arrow_dataset.py#L2069
So, though I don't know it's difference correctly, but I think Beam's reshuffle isn't be needed. How do you think?
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 111 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
The reshuffle is needed when you use parallelism.
The objective is to redistribute the articles evenly on the workers, since the `_extract_content` step generated many articles per file. By using reshuffle, we can split the processing of the articles of one file into several workers. Without reshuffle, all the articles of one file would be processed on the same worker that read the file, making the whole process take a very long time.
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 73 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1790
|
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
Maybe the reshuffle step can be added only if the runner is not a DirectRunner ?
|
```py
import datasets
wiki = datasets.load_dataset('wikipedia', '20200501.ja', cache_dir='./datasets')
```
then `ModuleNotFoundError: No module named 'apache_beam'` happend.
The error doesn't appear when it's '20200501.en'.
I don't know Apache Beam, but according to #498 it isn't necessary when it's saved to local. is it correct?
| 16 |
ModuleNotFoundError: No module named 'apache_beam', when specific languages.
|
[
-0.026358475908637047,
-0.07353761792182922,
-0.15922459959983826,
0.04972187802195549,
0.1943405568599701,
-0.17094460129737854,
0.20175334811210632,
0.3746533691883087,
0.09683743119239807,
0.18703025579452515,
0.14498189091682434,
-0.13403140008449554,
-0.20119017362594604,
-0.06624475866556168,
-0.027947871014475822,
-0.32194122672080994,
0.23093974590301514,
-0.02210002951323986,
-0.23959754407405853,
-0.19303523004055023,
-0.13779444992542267,
0.33375465869903564,
-0.2906937599182129,
0.18686865270137787,
0.14782807230949402,
-0.03090251423418522,
0.20721693336963654,
0.06246650591492653,
-0.08929914236068726,
0.08774847537279129,
-0.2209101766347885,
-0.20583432912826538,
-0.10706552118062973,
0.1539689004421234,
-0.00009772793418960646,
0.14538824558258057,
0.2332674115896225,
-0.20011116564273834,
-0.17355658113956451,
-0.0074838255532085896,
0.1015089899301529,
-0.07898623496294022,
-0.12768223881721497,
-0.1210525706410408,
-0.2033517211675644,
-0.3211255967617035,
-0.021037118509411812,
-0.34017470479011536,
0.25397926568984985,
0.20769421756267548,
0.37847700715065,
0.39060014486312866,
0.001726234913803637,
-0.1991102248430252,
0.4581400454044342,
-0.3072585165500641,
-0.04815426841378212,
-0.21193623542785645,
0.06781680136919022,
-0.03382842615246773,
-0.2706977128982544,
0.4240841269493103,
-0.050774943083524704,
-0.007197932805866003,
0.00084128906019032,
-0.4281255602836609,
-0.20095381140708923,
-0.1993694007396698,
0.07878044992685318,
-0.12083245068788528,
0.31499627232551575,
-0.12427807599306107,
0.11582474410533905,
0.23574836552143097,
-0.12122001498937607,
0.2850209176540375,
0.1781053990125656,
0.08859219402074814,
0.07664261758327484,
-0.0007920736679807305,
0.4834514558315277,
-0.17679820954799652,
-0.04669563099741936,
0.04364592954516411,
0.23527321219444275,
0.3554239273071289,
0.017626803368330002,
0.10723278671503067,
0.0755045935511589,
-0.10772725939750671,
0.0031277858652174473,
0.12636172771453857,
-0.05971792712807655,
0.04618736729025841,
-0.17038774490356445,
0.14047254621982574,
0.28155890107154846,
0.1027677059173584,
0.05799964442849159,
0.036542829126119614,
-0.08294352144002914,
0.3162943124771118,
0.28019967675209045,
-0.02294374443590641,
-0.27701127529144287,
0.29813238978385925,
0.4345746338367462,
-0.06771257519721985,
0.23688142001628876,
-0.07991351187229156,
0.05700472742319107,
0.1268327683210373,
-0.11559566110372543,
-0.46661967039108276,
-0.49472036957740784,
0.17217835783958435,
-0.20276492834091187,
0.22605830430984497,
-0.07313048094511032,
-0.1620081663131714,
-0.3269130289554596,
-0.12902913987636566,
-0.024520408362150192,
0.33086174726486206,
0.4198575019836426,
0.3373754024505615,
0.2939937710762024,
0.20827870070934296,
-0.41845840215682983,
-0.5473452210426331,
-0.15310633182525635,
0.5324397087097168,
-0.4316073954105377,
-0.047507863491773605,
0.055539604276418686,
0.32809361815452576,
0.02427409216761589,
-0.17002081871032715,
0.07104550302028656,
0.040500473231077194,
0.019146068021655083,
0.24697677791118622,
-0.19541697204113007,
0.020359257236123085,
0.12781399488449097,
0.2797739803791046,
0.16123801469802856,
0.1223333477973938,
-0.025314277037978172,
-0.06405843049287796,
-0.22277531027793884,
-0.04963906854391098,
0.10013806819915771,
0.30781635642051697,
-0.1072673499584198,
0.14568325877189636,
0.17016738653182983,
-0.1362888216972351,
-0.21007271111011505,
-0.02377605065703392,
-0.04050507768988609,
0.07347269356250763,
0.27641454339027405,
-0.11408551782369614,
-0.060851626098155975,
0.31960329413414,
0.1726745218038559,
-0.13180135190486908,
0.17719927430152893,
-0.3098386824131012,
-0.13108032941818237,
-0.040704529732465744,
0.06689780950546265,
0.08291380852460861,
-0.2814108729362488,
-0.013484857976436615,
0.6021320819854736,
-0.47889217734336853,
0.019254285842180252,
0.048524122685194016,
-0.06822400540113449,
-0.23561416566371918,
0.26559990644454956,
-0.15110920369625092,
-0.26825466752052307,
0.016833947971463203,
-0.22392290830612183,
0.2228156179189682,
0.16409967839717865,
0.11856500059366226,
-0.26537632942199707,
-0.01756318099796772,
-0.195894256234169,
0.34534284472465515,
0.4120391011238098,
-0.1538916379213333,
0.3638703525066376,
0.45987212657928467,
0.00036555068800225854,
-0.28121981024742126,
0.1251094788312912,
0.30239853262901306,
-0.09868256002664566,
-0.2374146729707718,
0.12327419221401215,
0.08533886820077896,
0.11888057738542557,
0.07901331037282944,
-0.30162081122398376,
0.43504759669303894,
0.19838286936283112,
0.34755638241767883,
-0.22853559255599976,
-0.06752533465623856,
-0.17994867265224457,
-0.20506945252418518,
0.3590327203273773,
0.17818683385849,
-0.11322200298309326,
0.2924775183200836,
-0.1189766377210617,
0.3369491398334503,
-0.11093486845493317,
-0.07768768072128296,
-0.29077592492103577,
0.06688753515481949,
-0.2945220172405243,
-0.07361674308776855,
0.15996424853801727,
0.0644163116812706,
0.22632591426372528,
-0.2806565761566162,
-0.10544546693563461,
0.22205349802970886,
-0.11535433679819107,
0.046212922781705856,
0.00119762122631073,
-0.12112001329660416,
0.10785093903541565,
-0.32260796427726746,
0.35206568241119385,
-0.12164860218763351,
-0.007384196855127811,
0.07179447263479233,
0.3442671000957489,
0.05693746358156204,
0.20279808342456818,
0.1014053001999855,
0.25960052013397217,
0.05216732621192932,
0.16518451273441315,
-0.1024603471159935,
-0.11416525393724442,
-0.29064512252807617,
0.5266168117523193,
0.08154420554637909,
-0.016065293923020363,
0.02242611162364483,
0.2105407565832138,
-0.36443090438842773,
0.611906111240387,
0.04737211763858795,
0.26070258021354675,
-0.10886409878730774,
-0.16753020882606506,
0.30008968710899353,
0.19092272222042084,
-0.1535973846912384,
-0.011919887736439705,
0.22654928267002106,
-0.13939598202705383,
-0.07492739707231522,
0.2771618664264679,
-0.2532976567745209,
-0.06809935718774796,
-0.22038277983665466,
0.23575112223625183,
0.07296239584684372,
-0.01587284356355667,
-0.2593742609024048,
-0.23107115924358368,
-0.1583791822195053,
-0.2253057360649109,
-0.11897371709346771,
-0.11551512032747269,
-0.0013649233151227236,
-0.35782143473625183,
-0.27861323952674866,
-0.3134930431842804,
0.2888014614582062,
-0.26319000124931335,
-0.2240176796913147,
0.16798235476016998,
-0.24736514687538147,
-0.21185694634914398,
0.4112260043621063,
0.4724545180797577,
-0.11548783630132675,
0.19311845302581787,
-0.16556625068187714,
-0.18230798840522766,
-0.16570065915584564,
-0.25386884808540344,
0.21097451448440552,
0.09474916756153107,
0.09690067172050476,
0.21726666390895844,
-0.3932916224002838,
0.14804987609386444,
-0.08892269432544708,
-0.18179842829704285,
0.24498549103736877,
-0.028719769790768623,
-0.2396649420261383,
-0.0009433868108317256,
0.04285646229982376,
0.005769516807049513,
0.020392701029777527,
0.3890282213687897,
-0.3245930075645447,
-0.10927707701921463,
0.32606086134910583,
0.054888635873794556,
-0.05500629544258118,
-0.14105375111103058,
-0.43614447116851807,
-0.0395219624042511,
-0.4685494005680084,
-0.2163800597190857,
0.018737418577075005,
-0.05858389660716057,
0.16662250459194183,
0.26659566164016724,
0.10542003810405731,
0.025843417271971703,
0.12915323674678802,
0.16074688732624054,
0.2662423849105835,
0.19297893345355988,
-0.20543083548545837,
-0.33530136942863464,
0.09962306171655655,
-0.1133083924651146,
0.129790261387825,
0.1545625776052475,
-0.04402374103665352,
-0.09308519214391708,
0.26610836386680603,
-0.3527531325817108,
-0.10256212949752808,
0.16885995864868164,
0.20168012380599976,
-0.15166200697422028,
-0.2261071652173996,
-0.2693635821342468,
0.04303094744682312,
0.03720739483833313,
-0.27839088439941406,
0.30127042531967163,
0.09037057310342789,
0.025080803781747818,
0.028362877666950226,
0.5398600101470947,
-0.25879210233688354,
0.2117866724729538,
0.4806152582168579,
0.19041864573955536,
0.3379240036010742,
-0.13896673917770386,
0.03162981942296028,
0.17730790376663208,
0.13069476187229156,
0.2385939657688141,
0.17386150360107422,
-0.08439560979604721,
0.1568804532289505,
-0.42030221223831177,
-0.15596893429756165,
-0.13034193217754364,
-0.0719095841050148,
0.10661010444164276,
-0.26154541969299316,
0.1113419383764267,
-0.05210798978805542,
0.057128723710775375,
0.19264093041419983,
0.16579866409301758,
0.36196085810661316,
0.13650687038898468,
-0.3272525370121002,
-0.03647652268409729,
0.174486443400383,
0.06850811839103699,
-0.11789457499980927,
0.3562559187412262,
-0.10607178509235382,
0.09268726408481598,
-0.2004946619272232,
-0.36844801902770996,
0.09084804356098175,
-0.10511966049671173,
0.3025471866130829,
-0.19571837782859802,
-0.04828953742980957,
0.17433036863803864,
0.19196894764900208,
-0.4104630649089813,
-0.07997411489486694,
-0.10575453191995621,
-0.30557361245155334,
-0.04251180961728096,
-0.043118029832839966,
-0.08365921676158905,
-0.06001533195376396,
0.07157734036445618,
-0.0050192298367619514,
-0.008438375778496265,
-0.018304601311683655,
-0.3989531397819519,
-0.07619145512580872,
-0.423012912273407,
-0.2345895618200302,
0.014355869963765144,
-0.01706646755337715,
0.07015188038349152,
0.0742579996585846,
0.18089532852172852,
-0.3207242786884308,
-0.12467623502016068,
0.05703714117407799,
0.06478918343782425,
-0.23053954541683197,
-0.3995859920978546,
-0.24962595105171204,
0.31098195910453796,
-0.11858056485652924,
-0.10992515087127686,
0.1504828780889511,
-0.08060692250728607,
0.1619735211133957,
-0.08541502803564072,
-0.11368533968925476,
0.12816929817199707,
-0.08770140260457993,
0.05933823436498642,
-0.2612805962562561,
0.07133135199546814,
0.3160422742366791,
0.060134124010801315,
0.024263320490717888,
-0.053481876850128174,
-0.09122339636087418,
-0.0033264136873185635,
0.18751995265483856,
-0.11288143694400787,
-0.014159160666167736,
0.2465910017490387,
0.17435264587402344,
-0.10445274412631989,
0.4308558702468872,
-0.03858834132552147,
0.5769522786140442,
-0.0680946335196495,
0.006915632169693708,
0.2270900160074234,
-0.1824495941400528,
0.2889597415924072,
-0.8088301420211792,
0.24537354707717896,
-0.14626389741897583,
-0.0037979285698384047,
0.07637917995452881,
0.006516430526971817,
0.3573151230812073,
0.04547841474413872,
-0.050577905029058456,
0.34185194969177246,
0.2574711740016937,
0.28304386138916016,
-0.10949235409498215,
0.025175446644425392,
-0.2625811696052551,
-0.03231438249349594,
-0.24044762551784515,
0.23856671154499054,
-0.16029368340969086,
0.37394285202026367,
-0.30297207832336426,
-0.06727493554353714,
-0.22990739345550537,
-0.3042694926261902,
-0.055355269461870193,
0.31249088048934937,
-0.008156009949743748,
0.17570622265338898,
-0.20399034023284912,
-0.2634133994579315,
-0.00812232680618763,
-0.0032572182826697826,
0.20365388691425323,
-0.11127512156963348,
-0.005619265139102936,
0.3791463375091553,
0.12121330946683884,
-0.14691966772079468,
-0.2909981310367584,
0.22133909165859222,
0.20953373610973358,
-0.23351699113845825,
-0.18793189525604248,
0.15964272618293762,
-0.17207954823970795,
-0.02525065466761589,
-0.18257834017276764,
0.1619725525379181,
0.3954010307788849,
0.3345969617366791,
0.12928734719753265,
0.2133604884147644,
0.03187982738018036,
-0.0005456907674670219,
0.28998997807502747,
-0.3349542021751404,
-0.023932434618473053,
-0.17688991129398346,
0.06776992231607437,
-0.027081700041890144,
-0.062380801886320114,
0.17345470190048218,
0.0892755389213562,
-0.2529285252094269,
0.1544572114944458,
0.1416957974433899,
-0.14218762516975403,
-0.3542930483818054,
0.19355179369449615,
0.2492469996213913,
-0.2851371467113495,
-0.05234568193554878,
-0.03494120389223099,
-0.42118892073631287,
0.2078612595796585,
0.16960272192955017,
0.025135962292551994,
0.12754611670970917,
0.09241833537817001,
-0.010656950995326042,
0.11198452860116959,
0.26934725046157837,
-0.22172018885612488,
-0.22878122329711914,
-0.13145047426223755,
0.14267432689666748,
0.3899007737636566,
-0.14926332235336304,
-0.39254459738731384,
-0.29850730299949646,
-0.10564826428890228,
-0.0017456328496336937,
0.3706456124782562,
0.042317066341638565,
-0.07766830921173096,
0.19970321655273438,
0.2609650492668152,
0.053077101707458496,
-0.31878936290740967,
-0.28112879395484924,
0.09832246601581573,
0.0398014597594738,
-0.0510164275765419,
0.30999886989593506,
0.17607198655605316,
-0.13147979974746704,
0.08054247498512268,
-0.11324458569288254,
0.003024314995855093,
-0.0461963415145874,
-0.10233476758003235,
0.17929910123348236,
-0.07151550054550171,
0.2534552812576294,
0.06692606210708618,
-0.05125322937965393,
-0.1700446754693985,
0.19279658794403076,
0.0037224963307380676,
-0.3084811568260193,
0.37674880027770996,
0.008637992665171623,
-0.16983148455619812,
-0.028303151950240135,
-0.028517773374915123,
0.1782270073890686,
-0.06670726835727692,
-0.07514413446187973,
-0.012979509308934212,
-0.14144323766231537,
0.16739052534103394,
-0.12278259545564651,
-0.2559313476085663,
-0.17925231158733368,
0.14775259792804718,
0.35075247287750244,
-0.21644200384616852,
0.2464689314365387,
0.3021989166736603,
-0.1374991238117218,
0.04250731319189072,
0.22844178974628448,
0.06000736728310585,
-0.15942588448524475,
0.44886118173599243,
0.16748467087745667,
0.0955858901143074,
-0.07807081937789917,
0.18587370216846466,
0.04101625829935074,
0.04803483933210373,
0.055595941841602325,
0.047249823808670044,
-0.30322766304016113,
0.2980349659919739,
0.6330646872520447,
-0.3249450623989105,
0.5216318964958191,
-0.048908114433288574,
0.2873452305793762,
-0.17083676159381866,
-0.012387623079121113,
0.1017991304397583,
0.1961761713027954,
0.40794479846954346,
0.08421725779771805,
-0.08555527031421661,
0.12258276343345642,
0.12291189283132553,
-0.10573796182870865,
-0.24900788068771362,
0.13595262169837952,
-0.0672532320022583,
0.2906249761581421,
0.03804127499461174,
-0.11508501321077347,
-0.3238188326358795,
0.020334333181381226,
0.20461885631084442,
0.16783593595027924,
0.1827383190393448,
0.28776732087135315,
-0.04705219343304634,
-0.03061184659600258,
0.20261336863040924,
-0.10013851523399353,
-0.05021453648805618,
-0.06205327436327934,
0.14446501433849335,
-0.03287193179130554,
0.019936921074986458,
-0.013386517763137817,
-0.0940394252538681,
0.08286605030298233,
0.243361696600914,
-0.07494387775659561,
-0.14621692895889282,
0.1224546730518341,
-0.0011536104138940573,
-0.05088414251804352,
0.0976065993309021,
0.21953655779361725,
0.5034003257751465,
-0.021361974999308586,
0.21536566317081451,
-0.3939704895019531,
-0.05093185603618622,
0.13400165736675262,
-0.20292115211486816,
-0.1334623247385025,
-0.07123225182294846,
-0.35198265314102173,
0.1164482906460762,
-0.527689516544342,
0.04029743745923042,
-0.6231663823127747,
0.1041623130440712,
-0.2691250145435333,
0.07541707903146744,
-0.0863875150680542,
-0.22649644315242767,
0.13490848243236542,
0.001019961666315794,
0.2909293472766876,
-0.04255370423197746,
0.1595010906457901,
0.012424646876752377,
-0.5032358169555664,
-0.27201592922210693,
0.2624753713607788,
-0.2047000676393509,
0.2053038626909256,
-0.5052827000617981,
0.008763562887907028,
0.30377188324928284,
0.004353365395218134,
0.210672527551651,
0.3657929003238678,
-0.14834368228912354,
-0.14788715541362762,
-0.29558369517326355,
-0.051344625651836395,
-0.03357691690325737,
-0.04505087807774544,
0.008743288926780224,
-0.1995237022638321,
-0.12687860429286957,
0.0540291965007782,
0.2827400863170624,
-0.09196717292070389,
-0.5854554772377014,
0.4571312665939331,
-0.22926034033298492,
0.4832969009876251,
-0.09089655429124832,
0.2700590193271637,
-0.2086714506149292,
-0.13270150125026703,
-0.0966472402215004,
-0.29861003160476685,
0.08833583444356918,
0.04779063165187836,
0.037034910172224045,
0.07223104685544968,
-0.05553160607814789,
0.023839933797717094,
-0.2897469401359558,
0.4513397812843323,
0.08348818123340607,
0.3901921510696411,
-0.07905355840921402,
0.09989184141159058,
0.09400004893541336,
0.011412390507757664,
-0.13279643654823303,
-0.1095685064792633,
-0.02330591157078743,
-0.18252773582935333,
-0.35416048765182495,
-0.05347331985831261,
0.051605235785245895,
-0.32042253017425537,
-0.33453476428985596,
0.35427504777908325,
0.032602690160274506,
-0.23137041926383972,
-0.04298968240618706,
-0.24809618294239044,
0.18345806002616882,
0.008314867503941059,
0.26093751192092896,
0.19433192908763885,
-0.0051607354544103146,
-0.1255899965763092,
-0.18751929700374603,
0.10381112992763519,
-0.4713529646396637,
0.18491894006729126,
-0.048502471297979355,
0.17243647575378418,
-0.12613961100578308
] |
https://github.com/huggingface/datasets/issues/1786
|
How to use split dataset
|
By default, all 3 splits will be loaded if you run the following:
```python
from datasets import load_dataset
dataset = load_dataset("lambada")
print(dataset["train"])
print(dataset["valid"])
```
If you wanted to do load this manually, you could do this:
```python
from datasets import load_dataset
data_files = {
"train": "data/lambada/train.txt",
"valid": "data/lambada/valid.txt",
"test": "data/lambada/test.txt",
}
ds = load_dataset("text", data_files=data_files)
```
|

Hey,
I want to split the lambada dataset into corpus, test, train and valid txt files (like penn treebank) but I am not able to achieve this. What I am doing is, executing the lambada.py file in my project but its not giving desired results. Any help will be appreciated!
| 56 |
How to use split dataset
|
[
-0.48790714144706726,
-0.29071244597435,
-0.27520349621772766,
0.2827081084251404,
-0.0908283144235611,
0.2359728217124939,
0.3660028874874115,
0.26172202825546265,
-0.052184876054525375,
0.087290920317173,
-0.4212844669818878,
0.09468749165534973,
-0.01626041904091835,
0.49380427598953247,
-0.3547796905040741,
-0.2531784176826477,
-0.11760804802179337,
0.459236204624176,
-0.1859101504087448,
0.053603678941726685,
-0.23697812855243683,
-0.12181837111711502,
-0.36889657378196716,
-0.00036357122007757425,
-0.27978745102882385,
-0.5401655435562134,
-0.10778030008077621,
0.33402958512306213,
-0.07092523574829102,
0.09338456392288208,
0.017263375222682953,
0.13917575776576996,
-0.021466383710503578,
0.39643537998199463,
-0.00009952454274753109,
-0.10241799056529999,
-0.10827510058879852,
-0.0917578786611557,
0.04941008239984512,
-0.007611830718815327,
-0.514339804649353,
0.16218449175357819,
0.0038095032796263695,
-0.4548250734806061,
-0.3318651616573334,
-0.1002444326877594,
-0.1833263337612152,
-0.35841143131256104,
0.6897672414779663,
0.2734794020652771,
0.27867794036865234,
-0.08320076018571854,
-0.10661277174949646,
-0.20167791843414307,
0.14525583386421204,
0.13664594292640686,
0.04057904705405235,
-0.2396523803472519,
-0.01917683519423008,
0.12167774885892868,
-0.000013821522770740557,
0.1953807920217514,
0.08397138863801956,
0.2792823016643524,
-0.1270788311958313,
0.07890383899211884,
-0.24516038596630096,
-0.23437516391277313,
0.2197474092245102,
0.21633844077587128,
0.3383440375328064,
-0.10732618719339371,
0.12518155574798584,
0.020142806693911552,
-0.2506612241268158,
-0.30038702487945557,
-0.08712475001811981,
0.23059017956256866,
0.2300955057144165,
0.2907702624797821,
-0.12195228040218353,
-0.18544140458106995,
-0.18008753657341003,
0.1541491001844406,
-0.12184998393058777,
0.1992855966091156,
-0.10112430900335312,
0.16188623011112213,
0.11036721616983414,
0.11739254742860794,
0.19496816396713257,
0.002980265999212861,
0.008519616909325123,
-0.08887476474046707,
-0.08725085854530334,
-0.23104272782802582,
-0.44181936979293823,
-0.006624592933803797,
0.029101675376296043,
0.05128243938088417,
-0.19428814947605133,
0.07457329332828522,
-0.03136703744530678,
0.013066601939499378,
0.3503681421279907,
-0.18412885069847107,
0.13299299776554108,
0.3114592730998993,
0.1172078475356102,
-0.15177233517169952,
-0.35631898045539856,
0.023699868470430374,
0.037952911108732224,
-0.1031281128525734,
-0.18412284553050995,
0.181060329079628,
0.08787640929222107,
-0.07809079438447952,
-0.2852921485900879,
-0.36978548765182495,
0.05015696585178375,
-0.2971152365207672,
0.09015091508626938,
0.35951223969459534,
0.06545843183994293,
-0.08908254653215408,
-0.38903412222862244,
0.28222233057022095,
-0.08898288011550903,
-0.478204607963562,
-0.2751195430755615,
0.22617535293102264,
-0.18456748127937317,
-0.18177224695682526,
-0.034388940781354904,
-0.005222627893090248,
0.06222797557711601,
-0.07755644619464874,
-0.08034418523311615,
-0.15543997287750244,
0.20965714752674103,
-0.447503924369812,
0.17954502999782562,
-0.10304654389619827,
0.40557846426963806,
-0.011113230139017105,
0.09028355032205582,
0.19402971863746643,
-0.1281501054763794,
0.05442338436841965,
-0.0968700498342514,
-0.24417836964130402,
-0.10997533798217773,
0.28735262155532837,
0.19114184379577637,
0.11424683034420013,
0.1078748106956482,
0.3898535370826721,
0.123074971139431,
-0.14427079260349274,
-0.07970741391181946,
0.18659257888793945,
-0.256278395652771,
-0.2941089868545532,
0.20930638909339905,
0.1762043833732605,
-0.43055790662765503,
0.04109087213873863,
-0.23935456573963165,
-0.23796489834785461,
0.2954293489456177,
0.19690465927124023,
-0.11291776597499847,
0.1997423768043518,
-0.07844535261392593,
0.21365243196487427,
0.5609370470046997,
-0.028865542262792587,
-0.2991258502006531,
0.22634468972682953,
-0.12363193929195404,
-0.35604241490364075,
0.34890785813331604,
0.029809119179844856,
0.4455968737602234,
-0.11991433054208755,
-0.21021875739097595,
0.3947388529777527,
-0.24209995567798615,
-0.1365463137626648,
0.08454082906246185,
-0.30140697956085205,
0.09273397922515869,
0.2066342979669571,
0.07076720893383026,
0.21295255422592163,
0.456739217042923,
0.25839534401893616,
0.3351669907569885,
-0.13285692036151886,
0.17131298780441284,
-0.055291589349508286,
0.08087504655122757,
-0.03948893025517464,
-0.09805825352668762,
-0.4136343002319336,
-0.25456053018569946,
-0.22038652002811432,
0.17972038686275482,
-0.3186802864074707,
0.1522284746170044,
-0.17641103267669678,
-0.4559554159641266,
-0.29553940892219543,
-0.14038227498531342,
0.15294000506401062,
0.26467427611351013,
0.08108772337436676,
0.205038383603096,
-0.24944621324539185,
-0.164414644241333,
0.21089327335357666,
0.047054044902324677,
-0.009988602250814438,
-0.19915543496608734,
0.3124227821826935,
-0.07577632367610931,
-0.12936845421791077,
0.2682235836982727,
0.2124117612838745,
0.1562400758266449,
-0.22651024162769318,
0.15949136018753052,
0.38711822032928467,
0.19440676271915436,
0.11112192273139954,
0.16208799183368683,
-0.25725647807121277,
0.06648977100849152,
-0.3430576026439667,
0.1806398183107376,
-0.16720153391361237,
0.10754445940256119,
0.026120638474822044,
-0.11179924011230469,
0.22101396322250366,
-0.39307183027267456,
0.07465315610170364,
0.032653339207172394,
-0.01927819289267063,
0.10593604296445847,
-0.31459328532218933,
0.3801494538784027,
-0.41248494386672974,
-0.15388831496238708,
-0.21080349385738373,
-0.0221167653799057,
-0.1014881506562233,
-0.21597224473953247,
0.24955275654792786,
0.6258323192596436,
0.012470601126551628,
0.23343996703624725,
-0.2139979749917984,
-0.04376619681715965,
-0.03479541465640068,
0.20357361435890198,
0.26416659355163574,
0.33257439732551575,
0.4448849856853485,
0.21196511387825012,
-0.062218792736530304,
0.07476212084293365,
-0.0888339951634407,
0.11277426779270172,
-0.009650202468037605,
0.10441554337739944,
0.061390288174152374,
-0.26160454750061035,
-0.2355393022298813,
0.13204911351203918,
-0.0683429092168808,
0.16403768956661224,
0.16805465519428253,
-0.06089315935969353,
-0.21609850227832794,
-0.27611973881721497,
-0.29508209228515625,
-0.1126394122838974,
-0.07594498991966248,
0.2555354833602905,
-0.061755482107400894,
0.09465749561786652,
-0.05021248385310173,
0.03452190011739731,
0.29043659567832947,
0.10445427894592285,
0.1531064659357071,
0.07100090384483337,
0.1974533349275589,
0.1362503319978714,
-0.13184219598770142,
-0.017995687201619148,
0.3856651484966278,
0.07817728817462921,
0.6187400221824646,
0.40668419003486633,
-0.2605210244655609,
-0.03616439178586006,
-0.005582890007644892,
0.10301744192838669,
0.23441876471042633,
-0.03557116165757179,
-0.024752365425229073,
0.13254185020923615,
0.12388944625854492,
0.057702213525772095,
-0.256877601146698,
0.10863980650901794,
-0.09750815480947495,
0.009970991872251034,
-0.1306450366973877,
-0.017166247591376305,
0.02277660369873047,
0.04218800365924835,
-0.7560072541236877,
-0.34169819951057434,
-0.3576848804950714,
0.056701816618442535,
0.09070251882076263,
0.1841742843389511,
-0.4586983919143677,
0.1019946038722992,
0.10889504849910736,
0.029819076880812645,
-0.020975753664970398,
-0.33712509274482727,
0.017956579104065895,
0.07116676867008209,
-0.23637878894805908,
-0.0911884605884552,
0.15887901186943054,
-0.10340109467506409,
0.05398694425821304,
0.09432598203420639,
0.04166800156235695,
-0.039215415716171265,
-0.05136508867144585,
0.036649439483881,
-0.1708528846502304,
0.3699549436569214,
0.10494031757116318,
-0.009206799790263176,
-0.15751025080680847,
-0.039393749088048935,
0.1637377291917801,
0.3325183391571045,
-0.18715694546699524,
0.059243664145469666,
-0.013652198016643524,
0.31236255168914795,
0.10730123519897461,
0.6374862194061279,
0.19864687323570251,
-0.03774483874440193,
0.049091894179582596,
-0.23916953802108765,
-0.1262759268283844,
-0.022410549223423004,
-0.3076792359352112,
0.12878377735614777,
0.1830216944217682,
0.25901129841804504,
0.22767189145088196,
-0.08291520923376083,
-0.1663658171892166,
-0.2344696968793869,
-0.3425178527832031,
-0.5295834541320801,
-0.1288873851299286,
-0.09899978339672089,
0.15616819262504578,
0.1244225725531578,
-0.14415019750595093,
-0.1711563616991043,
0.06510038673877716,
-0.08928009122610092,
-0.2327757179737091,
-0.058162689208984375,
-0.10659556835889816,
-0.12810838222503662,
-0.3842109441757202,
-0.0715533122420311,
0.021372705698013306,
0.46797487139701843,
-0.04580659791827202,
-0.17941690981388092,
-0.15224811434745789,
-0.07303956151008606,
0.09489993005990982,
0.06518935412168503,
0.6340411305427551,
-0.15947575867176056,
0.052633754909038544,
-0.13388769328594208,
-0.07208605110645294,
0.07101167738437653,
0.37396010756492615,
-0.39947670698165894,
0.19501039385795593,
0.25562605261802673,
-0.014032287523150444,
-0.516162633895874,
-0.12408023327589035,
0.575180172920227,
0.1018434390425682,
-0.10476803034543991,
0.029263395816087723,
0.09013181179761887,
-0.18050715327262878,
-0.3816971480846405,
0.19887538254261017,
0.07651638984680176,
0.10478905588388443,
0.13816599547863007,
-0.2919692099094391,
-0.1008661761879921,
-0.28182822465896606,
0.04096146300435066,
0.2275647222995758,
0.25851044058799744,
-0.01623690500855446,
0.024184608832001686,
0.2492244839668274,
0.20362116396427155,
0.32484349608421326,
0.4074718952178955,
-0.23183795809745789,
-0.06874531507492065,
0.10657104849815369,
-0.30761218070983887,
0.4123595952987671,
0.22458939254283905,
-0.08502551168203354,
0.1680968701839447,
-0.1545826494693756,
0.25578224658966064,
0.03149779513478279,
0.09931576251983643,
0.01716095581650734,
-0.04603718966245651,
-0.29996350407600403,
-0.3614947199821472,
-0.004630994983017445,
0.03560977056622505,
-0.1166311502456665,
0.16189759969711304,
0.1733594834804535,
-0.26284217834472656,
0.23936353623867035,
0.041913844645023346,
0.9483332633972168,
-0.03519890457391739,
-0.15132400393486023,
-0.10895336419343948,
-0.07536270469427109,
0.3934236764907837,
-0.27052369713783264,
0.03709520027041435,
-0.22927217185497284,
-0.23282968997955322,
-0.11168059706687927,
-0.04636339098215103,
0.2430863231420517,
0.48954886198043823,
-0.37500378489494324,
0.303768515586853,
-0.0008891663164831698,
0.04574514180421829,
-0.28328728675842285,
0.24380169808864594,
-0.098692886531353,
0.0557146780192852,
-0.08719851821660995,
0.14975255727767944,
0.008206769824028015,
-0.19963516294956207,
0.11311013996601105,
-0.02421209216117859,
-0.024098768830299377,
-0.07511840760707855,
0.1344965100288391,
0.019205212593078613,
-0.19842594861984253,
0.10870794951915741,
-0.33622997999191284,
-0.25287503004074097,
0.15122655034065247,
-0.00045978784328326583,
0.17038476467132568,
-0.01183756161481142,
0.05688510835170746,
0.05327429249882698,
-0.041545361280441284,
-0.09008173644542694,
-0.16580462455749512,
0.05723799392580986,
0.14528052508831024,
-0.007976438850164413,
-0.31671780347824097,
0.09401415288448334,
0.12262400984764099,
-0.122615285217762,
-0.06778870522975922,
0.20414166152477264,
0.14796026051044464,
-0.5895958542823792,
-0.23648789525032043,
0.12191545963287354,
-0.016149653121829033,
-0.28653863072395325,
0.23792040348052979,
-0.013238994404673576,
-0.2586950659751892,
0.3770102858543396,
-0.06697048246860504,
-0.1471365988254547,
-0.2561226785182953,
-0.0239823330193758,
0.20384445786476135,
0.3650178909301758,
0.08097787946462631,
0.03564631566405296,
-0.08774984627962112,
-0.46842682361602783,
0.19388630986213684,
0.16418759524822235,
-0.24797743558883667,
0.14581340551376343,
-0.13279609382152557,
-0.02835979498922825,
0.11114387214183807,
0.11137674748897552,
0.02803836017847061,
0.47716474533081055,
-0.14431904256343842,
-0.3811259865760803,
-0.08104348927736282,
0.2391970306634903,
0.17108562588691711,
0.2112206667661667,
0.28254419565200806,
0.24659278988838196,
-0.0636354312300682,
0.5247143507003784,
-0.46367406845092773,
0.17486871778964996,
-0.046758685261011124,
0.22400251030921936,
0.11660284548997879,
-0.1621587574481964,
0.0034589110873639584,
0.05662083253264427,
0.3100469708442688,
0.13368281722068787,
-0.06702619045972824,
-0.34941619634628296,
-0.040980879217386246,
0.07922743260860443,
-0.1441691815853119,
-0.15979908406734467,
-0.15159359574317932,
-0.2061862349510193,
-0.2165258377790451,
0.022193869575858116,
0.22507357597351074,
-0.06524666398763657,
0.04833674430847168,
0.18088525533676147,
0.46161216497421265,
-0.28678348660469055,
-0.49147990345954895,
0.04432924464344978,
-0.053309835493564606,
-0.15596339106559753,
-0.10626915842294693,
0.3419816195964813,
-0.058705687522888184,
-0.20885628461837769,
0.1071912944316864,
-0.06881960481405258,
0.600903332233429,
-0.18154829740524292,
0.12082348763942719,
0.13534517586231232,
-0.03582381084561348,
-0.0424220971763134,
0.4715249240398407,
0.2594565749168396,
0.14313651621341705,
0.19805432856082916,
0.036643821746110916,
0.317694753408432,
-0.31448087096214294,
0.10469666123390198,
0.43349283933639526,
-0.1780417561531067,
0.33513057231903076,
0.3621360659599304,
0.061261456459760666,
0.3390643894672394,
-0.07042557746171951,
-0.08980170637369156,
0.2417769730091095,
0.008622812107205391,
0.1263095587491989,
0.6828068494796753,
-0.11358153820037842,
-0.05032388120889664,
0.2103632539510727,
0.22404484450817108,
0.18259553611278534,
0.41854405403137207,
-0.12523724138736725,
0.4581294357776642,
-0.04807603731751442,
0.07814488559961319,
0.15908688306808472,
-0.37481072545051575,
0.07690633833408356,
0.21851029992103577,
-0.23314866423606873,
-0.15108710527420044,
-0.17158398032188416,
0.334139883518219,
-0.2195875495672226,
-0.02968989498913288,
0.04103422164916992,
0.21888719499111176,
0.09573668986558914,
0.07858790457248688,
-0.24621738493442535,
-0.23352809250354767,
-0.33111441135406494,
-0.17768403887748718,
-0.023900331929326057,
-0.3317883610725403,
0.205985426902771,
-0.05193004384636879,
0.2528036832809448,
0.07363905012607574,
0.26186686754226685,
0.08066682517528534,
-0.10789648443460464,
-0.23225979506969452,
0.1927824318408966,
-0.02341798134148121,
0.033450253307819366,
0.3779611885547638,
0.03926866129040718,
-0.04064514860510826,
-0.29082581400871277,
-0.07189639657735825,
-0.12412955611944199,
0.20275621116161346,
-0.3688546121120453,
-0.10431817919015884,
0.20480012893676758,
0.04756635054945946,
0.20435446500778198,
0.34220463037490845,
0.31026607751846313,
-0.3287959694862366,
-0.051047418266534805,
0.20468294620513916,
-0.08384621143341064,
-0.3168884217739105,
0.17529627680778503,
0.1628628820180893,
-0.31627407670021057,
0.03705715388059616,
-0.1590871512889862,
-0.3430327773094177,
-0.14363183081150055,
0.10608945041894913,
-0.5335536003112793,
0.09850723296403885,
-0.03615618869662285,
0.1411849409341812,
-0.08183260262012482,
0.1444682627916336,
-0.11193093657493591,
0.1662558615207672,
-0.18630778789520264,
-0.3959714472293854,
-0.26675793528556824,
0.1239386573433876,
0.06067030876874924,
-0.24384041130542755,
-0.14600293338298798,
0.15638896822929382,
0.2179003804922104,
0.28287646174430847,
0.23610758781433105,
0.06258116662502289,
0.2770036458969116,
0.274000346660614,
-0.035182468593120575,
-0.07031787931919098,
-0.15884241461753845,
0.1523442417383194,
0.02101627178490162,
-0.33362412452697754,
0.3189481794834137,
0.2780894935131073,
0.10024820268154144,
0.008716477081179619,
-0.13939045369625092,
0.275804340839386,
-0.15910616517066956,
-0.10777761042118073,
-0.003933870233595371,
0.45188793540000916,
-0.28402945399284363,
0.5025901794433594,
0.2141598016023636,
-0.004042817745357752,
-0.2741595506668091,
0.21802879869937897,
0.4833293855190277,
0.22901839017868042,
-0.3290843665599823,
0.14600665867328644,
0.06697091460227966,
-0.05169389396905899,
-0.05830195173621178,
0.2697827219963074,
-0.0372496172785759,
0.15551887452602386,
-0.12960129976272583,
-0.040809839963912964,
0.36399635672569275,
0.3546600937843323,
-0.11795037984848022,
-0.1345921903848648,
-0.03193749487400055,
-0.04239340126514435,
0.05875345319509506,
0.08765343576669693,
-0.3154519200325012,
-0.12022776156663895,
0.14185883104801178,
0.2415296733379364,
-0.1649499535560608,
-0.1636948585510254,
-0.06397142261266708,
0.33885616064071655,
-0.22714704275131226,
0.0972236916422844,
0.15502601861953735,
0.15102426707744598,
-0.0965736135840416,
0.0679582878947258,
0.08061663806438446,
0.228871688246727,
-0.347033828496933,
-0.08297041058540344,
-0.20551075041294098
] |
https://github.com/huggingface/datasets/issues/1785
|
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
Hi !
What do you mean by "disk_usage(".").free` can't compute on the cluster's shared disk" exactly ?
Does it return 0 ?
|
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk.
The exact error thrown:
```bash
>>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path")
OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size)
```
[`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk).
This is exactly where the error gets thrown:
https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502
```python
if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root):
raise IOError(
"Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format(
utils.size_str(self.info.size_in_bytes or 0),
utils.size_str(self.info.download_size or 0),
utils.size_str(self.info.dataset_size or 0),
utils.size_str(self.info.post_processing_size or 0),
)
)
```
What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal.
Would it be possible to pass a flag to skip this check on disk space?
| 22 |
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
[
-0.12654204666614532,
-0.35599076747894287,
-0.26534906029701233,
0.15758740901947021,
-0.1311347931623459,
-0.030707145109772682,
0.01788279600441456,
0.35523363947868347,
0.31602007150650024,
0.2585310637950897,
0.23294863104820251,
-0.3240179419517517,
0.005862023215740919,
-0.058646123856306076,
-0.19410088658332825,
0.049837756901979446,
0.04307176172733307,
-0.007178966421633959,
0.19750992953777313,
-0.018543360754847527,
-0.15881730616092682,
0.25784531235694885,
0.15040811896324158,
-0.37443190813064575,
-0.5397385358810425,
-0.16453817486763,
-0.07185493409633636,
0.018736092373728752,
-0.09389401227235794,
-0.06115800514817238,
0.08368885517120361,
-0.13627612590789795,
-0.014364988543093204,
0.23875761032104492,
-0.00010101171938003972,
-0.015923073515295982,
0.22781693935394287,
-0.16442656517028809,
-0.3490571975708008,
0.33194226026535034,
-0.02634921297430992,
-0.2754877805709839,
-0.31618016958236694,
-0.25217747688293457,
-0.03326544910669327,
0.1061694547533989,
-0.02934851683676243,
-0.320567786693573,
0.08458069711923599,
0.05622347816824913,
0.366388738155365,
0.0026877690106630325,
-0.05135605111718178,
-0.24344952404499054,
-0.005541323218494654,
-0.07936234772205353,
-0.060791101306676865,
0.164076566696167,
0.24489834904670715,
0.06246718764305115,
-0.33787453174591064,
0.3750694692134857,
0.13351936638355255,
0.19156162440776825,
0.21499541401863098,
-0.25951141119003296,
-0.1552632600069046,
-0.03041495382785797,
0.4357472062110901,
-0.2103603482246399,
0.4954563081264496,
-0.02919001132249832,
-0.19213610887527466,
-0.09058992564678192,
-0.13041560351848602,
-0.03665317967534065,
0.11180254817008972,
-0.04972505569458008,
-0.060980673879384995,
-0.158950075507164,
-0.21148362755775452,
-0.18568667769432068,
0.03450861945748329,
-0.26215365529060364,
-0.1223076656460762,
0.2248932123184204,
-0.07578428089618683,
0.048606280237436295,
0.10399021208286285,
0.0008553280495107174,
-0.02739064022898674,
0.13868173956871033,
-0.0023215950932353735,
0.11681398004293442,
-0.30246078968048096,
-0.12610994279384613,
0.12344911694526672,
0.37501710653305054,
0.15507008135318756,
0.10394849628210068,
-0.10367020219564438,
-0.0728321373462677,
0.37833720445632935,
-0.06969892978668213,
-0.14936120808124542,
0.49469316005706787,
-0.13250099122524261,
-0.27682188153266907,
0.13496416807174683,
-0.13522040843963623,
0.10412044078111649,
-0.14280806481838226,
-0.04120257869362831,
-0.3644923269748688,
0.18462692201137543,
0.051650937646627426,
-0.18477503955364227,
-0.015203732065856457,
-0.006140097510069609,
0.14668084681034088,
0.31046462059020996,
0.21907635033130646,
0.054536689072847366,
0.1899568885564804,
0.04677022248506546,
0.1412746161222458,
-0.05682375654578209,
0.21036821603775024,
-0.11823229491710663,
-0.12398479133844376,
-0.3252653479576111,
-0.043501850217580795,
-0.15660671889781952,
-0.07066459953784943,
0.38624924421310425,
0.31322726607322693,
0.1964380443096161,
-0.14485014975070953,
0.0005849552107974887,
-0.1270820051431656,
0.06382039189338684,
-0.26879215240478516,
-0.08708782494068146,
0.33734866976737976,
0.024654250591993332,
0.023845579475164413,
0.05113307386636734,
0.2791283130645752,
-0.09298455715179443,
-0.08994768559932709,
-0.3283596932888031,
-0.24632233381271362,
-0.08554399013519287,
0.28660354018211365,
-0.04825075343251228,
0.19351281225681305,
-0.18220949172973633,
-0.15610480308532715,
0.2680472135543823,
-0.14518001675605774,
-0.1260327845811844,
0.07998389005661011,
-0.18595650792121887,
-0.08831920474767685,
0.04757864400744438,
0.1607736349105835,
-0.11858801543712616,
0.26205742359161377,
-0.017097951844334602,
0.23618684709072113,
-0.0323791578412056,
0.4071325361728668,
0.0642411857843399,
0.10789266973733902,
-0.18443313241004944,
0.17359627783298492,
-0.010045869275927544,
-0.28300124406814575,
-0.6087395548820496,
0.17332910001277924,
-0.1521744430065155,
-0.25749215483665466,
0.3652694523334503,
0.16177739202976227,
0.03761134296655655,
0.05762369558215141,
0.3129569888114929,
0.02801593393087387,
-0.09131227433681488,
0.04152456670999527,
-0.3599383234977722,
-0.23382145166397095,
-0.20483970642089844,
-0.1284557282924652,
0.3979613780975342,
0.07331102341413498,
0.15557007491588593,
0.21105654537677765,
-0.08132336288690567,
0.021002940833568573,
0.3906095027923584,
0.3276498019695282,
0.1667734980583191,
-0.504851222038269,
0.10526759177446365,
0.018909920006990433,
-0.45837485790252686,
0.23543450236320496,
-0.2606964111328125,
-0.18317709863185883,
0.08458622545003891,
-0.18001233041286469,
-0.4344784915447235,
-0.15267571806907654,
0.317490816116333,
0.24877972900867462,
0.32806459069252014,
-0.009404757991433144,
0.31344449520111084,
-0.21473661065101624,
0.17757031321525574,
0.07193765044212341,
-0.07584845274686813,
-0.23982086777687073,
0.04718093201518059,
-0.05041177198290825,
-0.27226635813713074,
-0.12225913256406784,
0.16854269802570343,
0.07803008705377579,
0.09366834163665771,
-0.04086533561348915,
-0.057157594710588455,
0.24389314651489258,
-0.12703771889209747,
0.18330824375152588,
0.15699416399002075,
0.041893355548381805,
-0.00007821522740414366,
0.2725220024585724,
0.2653651237487793,
-0.09638060629367828,
0.0184043999761343,
-0.07008329778909683,
-0.13909895718097687,
-0.0834134891629219,
0.2200082391500473,
-0.040780194103717804,
-0.039177268743515015,
-0.1821240931749344,
0.10912027955055237,
-0.03116540051996708,
0.24188552796840668,
-0.1491742879152298,
0.024149851873517036,
-0.2494334727525711,
0.14882320165634155,
0.07035885006189346,
0.22530357539653778,
0.0275009386241436,
0.03638852760195732,
0.16256730258464813,
0.42664748430252075,
0.14071416854858398,
0.09929627180099487,
-0.340778112411499,
0.15394729375839233,
0.2863163948059082,
0.2539424002170563,
0.1982148140668869,
0.15154775977134705,
-0.3191637098789215,
0.19943365454673767,
-0.1711486577987671,
0.015613442286849022,
-0.227308452129364,
0.0933060497045517,
0.2801923155784607,
0.16650334000587463,
-0.3057169020175934,
0.0975024625658989,
-0.12285163253545761,
0.21636509895324707,
0.1654449850320816,
-0.03335888683795929,
-0.12919074296951294,
0.057165421545505524,
-0.0014705316862091422,
0.31533414125442505,
0.38483771681785583,
-0.10039164125919342,
-0.17042972147464752,
0.1907198578119278,
0.30951938033103943,
-0.17212700843811035,
-0.10145877301692963,
-0.29002007842063904,
0.22784638404846191,
0.21131674945354462,
0.06695161014795303,
0.01344241201877594,
-0.2498278021812439,
-0.09174242615699768,
0.22652044892311096,
-0.03900560736656189,
-0.25770050287246704,
0.13082356750965118,
-0.07658746093511581,
0.23879440128803253,
-0.30493491888046265,
0.06438864767551422,
-0.02450384385883808,
0.19267630577087402,
-0.26333141326904297,
-0.1315719485282898,
0.34520819783210754,
-0.28396445512771606,
-0.11369019746780396,
0.053775038570165634,
-0.08626056462526321,
-0.10522012412548065,
0.007592205423861742,
-0.026054179295897484,
-0.1052841991186142,
-0.3827355206012726,
-0.035946328192949295,
-0.15138843655586243,
-0.2951993942260742,
0.029088854789733887,
0.04029617831110954,
0.03441787511110306,
0.08076266199350357,
0.13846108317375183,
-0.1673349291086197,
0.4449288547039032,
-0.168426975607872,
-0.40560832619667053,
-0.3609660863876343,
0.30229273438453674,
-0.09049095958471298,
-0.038556359708309174,
0.14067405462265015,
-0.15056338906288147,
0.37225520610809326,
0.27704593539237976,
-0.3239486515522003,
-0.27270641922950745,
-0.03872857615351677,
0.03775275871157646,
0.006609355565160513,
-0.1439526528120041,
0.35083523392677307,
-0.1443455070257187,
-0.28767481446266174,
-0.16842269897460938,
-0.06817393004894257,
0.17393426597118378,
0.05533478036522865,
0.3123142421245575,
-0.2826591730117798,
0.09156110137701035,
0.16994920372962952,
0.5833101272583008,
-0.2296687364578247,
0.12476025521755219,
0.267363041639328,
0.11723943799734116,
0.3753748834133148,
-0.14678499102592468,
0.19346868991851807,
0.3161420524120331,
-0.05446825549006462,
-0.30568504333496094,
0.18508382141590118,
0.049645185470581055,
-0.32425934076309204,
0.06926051527261734,
-0.1892695426940918,
0.03257153183221817,
-0.06629142165184021,
0.17825382947921753,
-0.18658636510372162,
0.17478282749652863,
0.10178802162408829,
-0.02401498332619667,
-0.41179877519607544,
-0.07302878051996231,
0.023615658283233643,
-0.2392396628856659,
0.10120683908462524,
0.20620867609977722,
-0.2746428847312927,
-0.029955340549349785,
-0.38844987750053406,
0.27703747153282166,
0.0009546803194098175,
0.05564066022634506,
-0.12293527275323868,
0.08101994544267654,
0.0011522877030074596,
0.024279760196805,
0.5192065238952637,
-0.053051549941301346,
0.34586769342422485,
0.018449174240231514,
0.18774725496768951,
-0.2190994918346405,
0.020042622461915016,
0.18437127768993378,
0.22935941815376282,
-0.11262182146310806,
0.4767383337020874,
-0.17941516637802124,
0.20498894155025482,
-0.3168284595012665,
0.2430119514465332,
-0.2533191442489624,
0.007119268178939819,
-0.20490597188472748,
-0.15772731602191925,
-0.11538967490196228,
0.23285262286663055,
0.35165783762931824,
0.15228360891342163,
0.11837054789066315,
0.16166546940803528,
-0.07733585685491562,
-0.14126691222190857,
-0.06764975190162659,
0.10514756292104721,
0.5499595999717712,
0.07212278991937637,
-0.11501455307006836,
0.04762136936187744,
0.18902316689491272,
0.2344384342432022,
0.04422701522707939,
0.0531034953892231,
0.5074989199638367,
0.5343474745750427,
0.042826347053050995,
0.02858722023665905,
0.23113438487052917,
-0.008833589032292366,
-0.2087790071964264,
0.2965930700302124,
0.2922419607639313,
-0.387544721364975,
0.12309706211090088,
-0.3351479768753052,
0.03889341279864311,
-0.10126391798257828,
0.16867230832576752,
0.3088743984699249,
0.021209174767136574,
0.09155010432004929,
-0.03474435210227966,
0.32121139764785767,
-0.24863308668136597,
0.18625174462795258,
0.018312109634280205,
0.578572690486908,
0.03359421342611313,
-0.011580707505345345,
-0.12317869067192078,
0.1587020754814148,
0.0061728437431156635,
-0.527442216873169,
0.25977542996406555,
0.029628541320562363,
-0.205190047621727,
0.17087185382843018,
0.0587884746491909,
-0.1509430706501007,
0.2433498650789261,
-0.12949201464653015,
0.267156720161438,
-0.2595597505569458,
0.15579918026924133,
-0.22690922021865845,
0.2772948443889618,
-0.24389870464801788,
-0.13104896247386932,
0.22021079063415527,
0.3334267735481262,
-0.11766349524259567,
0.3042723536491394,
-0.3370950222015381,
0.16180671751499176,
-0.04592888057231903,
0.005840086843818426,
-0.046410467475652695,
-0.3165576457977295,
0.02544739469885826,
0.3968520760536194,
-0.23723873496055603,
-0.07675867527723312,
-0.333109050989151,
-0.04205784201622009,
0.189053013920784,
0.31940191984176636,
-0.27621349692344666,
0.19036129117012024,
0.02638712152838707,
-0.08698807656764984,
0.09613463282585144,
0.12457749992609024,
-0.17494513094425201,
-0.16220571100711823,
-0.1824548840522766,
0.04892165586352348,
-0.20946891605854034,
-0.24886898696422577,
0.017326319590210915,
0.02857236936688423,
-0.32677650451660156,
-0.11766641587018967,
-0.20352624356746674,
-0.31282028555870056,
-0.17122745513916016,
-0.01820242777466774,
0.29912063479423523,
0.0711255818605423,
0.09203828871250153,
0.0781213715672493,
0.020223885774612427,
-0.14661261439323425,
-0.059073761105537415,
0.38873666524887085,
0.27231869101524353,
-0.32376348972320557,
0.41876426339149475,
-0.4881792366504669,
-0.22147729992866516,
-0.18164275586605072,
-0.4267033636569977,
-0.17418469488620758,
0.05802727863192558,
0.17707063257694244,
-0.13204234838485718,
-0.3823857307434082,
-0.0866428092122078,
-0.18805168569087982,
0.5858689546585083,
0.3485669195652008,
0.058839838951826096,
-0.13125599920749664,
-0.48826611042022705,
0.31844496726989746,
-0.13471898436546326,
0.09863846749067307,
-0.09339316189289093,
-0.23593232035636902,
0.26172974705696106,
0.0892343521118164,
-0.42441532015800476,
-0.029609188437461853,
-0.33626797795295715,
0.1830461025238037,
-0.2757588326931,
-0.2450210452079773,
0.07764589041471481,
-0.1794697493314743,
0.1739303469657898,
-0.08057224750518799,
-0.1977747082710266,
-0.3154080808162689,
0.21627864241600037,
-0.03305698186159134,
-0.05487929284572601,
0.22949035465717316,
0.16542956233024597,
-0.2836077809333801,
-0.03501654043793678,
-0.08595158904790878,
0.015349078923463821,
0.33613282442092896,
-0.021234450861811638,
-0.33510541915893555,
0.24300391972064972,
0.02792704850435257,
0.0518094077706337,
0.12887294590473175,
0.2707683742046356,
-0.02372651733458042,
-0.31478261947631836,
0.09909243881702423,
0.14989759027957916,
-0.008158844895660877,
0.2481313943862915,
0.006073783617466688,
-0.12194503098726273,
-0.011970628052949905,
0.03393926844000816,
0.05081942677497864,
-0.07631426304578781,
0.3079821765422821,
0.19331897795200348,
-0.19388903677463531,
0.18024952709674835,
-0.21100430190563202,
0.1282922774553299,
0.3846495747566223,
-0.1845061182975769,
-0.015666302293539047,
0.10348906368017197,
0.13079021871089935,
0.16389413177967072,
0.17710109055042267,
0.4707596004009247,
-0.39082059264183044,
0.2497677206993103,
0.2709536552429199,
0.4752834737300873,
-0.2687908113002777,
-0.07561967521905899,
-0.19690969586372375,
0.11333096027374268,
-0.09676031023263931,
0.24698664247989655,
-0.02334166318178177,
0.2567491829395294,
0.2653955817222595,
0.07705105096101761,
0.2029040902853012,
0.32533395290374756,
0.14017583429813385,
-0.20231887698173523,
-0.24855302274227142,
-0.060467228293418884,
0.052396975457668304,
-0.030798599123954773,
0.29224294424057007,
-0.20161284506320953,
-0.13510067760944366,
-0.08329826593399048,
-0.14819972217082977,
-0.36752673983573914,
-0.10424470901489258,
-0.5149908661842346,
-0.09503795206546783,
0.0756794810295105,
-0.1958344280719757,
0.24998556077480316,
-0.048853736370801926,
0.1192331314086914,
-0.1548149436712265,
0.135965496301651,
-0.1947815716266632,
-0.028142409399151802,
0.4976784586906433,
-0.07051149755716324,
0.20366829633712769,
0.17325572669506073,
-0.16539409756660461,
0.34003451466560364,
0.14952047169208527,
-0.2240602821111679,
0.18748492002487183,
0.15231581032276154,
0.3482319712638855,
0.17015080153942108,
-0.048177845776081085,
0.10452928394079208,
0.32288146018981934,
-0.1105479747056961,
-0.48215705156326294,
0.026085352525115013,
0.323083758354187,
-0.3196655511856079,
0.09656225889921188,
0.3401523530483246,
-0.25436142086982727,
0.2918616831302643,
-0.10361073911190033,
0.10132873803377151,
0.23394015431404114,
-0.22485949099063873,
-0.13519681990146637,
-0.28796857595443726,
0.043699122965335846,
-0.04029373079538345,
-0.339199423789978,
-0.2130756676197052,
0.08887305855751038,
-0.18034502863883972,
0.22299553453922272,
-0.02063605934381485,
0.1597927212715149,
-0.2830277681350708,
0.48799219727516174,
0.10738388448953629,
-0.39922916889190674,
-0.2399577647447586,
-0.11744856089353561,
-0.22389812767505646,
0.08588997274637222,
-0.4095769226551056,
0.10358676314353943,
-0.11708934605121613,
0.42024877667427063,
-0.03553232178092003,
-0.29964569211006165,
0.03293641284108162,
-0.027370082214474678,
-0.22739548981189728,
-0.05709421634674072,
-0.3613966405391693,
0.1171831414103508,
-0.10460376739501953,
-0.09942882508039474,
0.346215158700943,
-0.35193175077438354,
0.1787763386964798,
0.15748219192028046,
0.30898338556289673,
0.05534454062581062,
-0.014273484237492085,
0.22325552999973297,
0.31651023030281067,
0.10311953723430634,
-0.1513245701789856,
0.2623482346534729,
-0.07128334790468216,
-0.07401948422193527,
-0.4364609122276306,
-0.01739835925400257,
0.06283124536275864,
-0.2060074806213379,
0.3266618847846985,
0.14939169585704803,
-0.3575519025325775,
0.16341249644756317,
0.07482291013002396,
0.279211163520813,
0.1243400126695633,
0.11189410090446472,
0.13739942014217377,
-0.01830662600696087,
-0.2724636495113373,
0.09121900051832199,
0.25763148069381714,
0.19753143191337585,
-0.05303496867418289,
-0.007622435688972473,
-0.2096731960773468,
-0.23058904707431793,
0.2533175051212311,
0.04633346199989319,
-0.31471413373947144,
-0.09331080317497253,
0.34477514028549194,
0.12127458304166794,
-0.060576602816581726,
0.12886188924312592,
0.13759419322013855,
0.10204910486936569,
0.056567125022411346,
0.16586656868457794,
-0.06969282031059265,
-0.27228763699531555,
-0.28461429476737976,
0.08984459936618805,
0.15614819526672363,
-0.05738864094018936,
-0.19011205434799194,
-0.26040658354759216,
-0.18630923330783844
] |
https://github.com/huggingface/datasets/issues/1785
|
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
Yes, that's right. It shows 0 free space even though there is. I suspect it might have to do with permissions on the shared disk.
```python
>>> disk_usage(".")
usage(total=999999, used=999999, free=0)
```
|
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk.
The exact error thrown:
```bash
>>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path")
OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size)
```
[`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk).
This is exactly where the error gets thrown:
https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502
```python
if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root):
raise IOError(
"Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format(
utils.size_str(self.info.size_in_bytes or 0),
utils.size_str(self.info.download_size or 0),
utils.size_str(self.info.dataset_size or 0),
utils.size_str(self.info.post_processing_size or 0),
)
)
```
What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal.
Would it be possible to pass a flag to skip this check on disk space?
| 32 |
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
[
-0.12654204666614532,
-0.35599076747894287,
-0.26534906029701233,
0.15758740901947021,
-0.1311347931623459,
-0.030707145109772682,
0.01788279600441456,
0.35523363947868347,
0.31602007150650024,
0.2585310637950897,
0.23294863104820251,
-0.3240179419517517,
0.005862023215740919,
-0.058646123856306076,
-0.19410088658332825,
0.049837756901979446,
0.04307176172733307,
-0.007178966421633959,
0.19750992953777313,
-0.018543360754847527,
-0.15881730616092682,
0.25784531235694885,
0.15040811896324158,
-0.37443190813064575,
-0.5397385358810425,
-0.16453817486763,
-0.07185493409633636,
0.018736092373728752,
-0.09389401227235794,
-0.06115800514817238,
0.08368885517120361,
-0.13627612590789795,
-0.014364988543093204,
0.23875761032104492,
-0.00010101171938003972,
-0.015923073515295982,
0.22781693935394287,
-0.16442656517028809,
-0.3490571975708008,
0.33194226026535034,
-0.02634921297430992,
-0.2754877805709839,
-0.31618016958236694,
-0.25217747688293457,
-0.03326544910669327,
0.1061694547533989,
-0.02934851683676243,
-0.320567786693573,
0.08458069711923599,
0.05622347816824913,
0.366388738155365,
0.0026877690106630325,
-0.05135605111718178,
-0.24344952404499054,
-0.005541323218494654,
-0.07936234772205353,
-0.060791101306676865,
0.164076566696167,
0.24489834904670715,
0.06246718764305115,
-0.33787453174591064,
0.3750694692134857,
0.13351936638355255,
0.19156162440776825,
0.21499541401863098,
-0.25951141119003296,
-0.1552632600069046,
-0.03041495382785797,
0.4357472062110901,
-0.2103603482246399,
0.4954563081264496,
-0.02919001132249832,
-0.19213610887527466,
-0.09058992564678192,
-0.13041560351848602,
-0.03665317967534065,
0.11180254817008972,
-0.04972505569458008,
-0.060980673879384995,
-0.158950075507164,
-0.21148362755775452,
-0.18568667769432068,
0.03450861945748329,
-0.26215365529060364,
-0.1223076656460762,
0.2248932123184204,
-0.07578428089618683,
0.048606280237436295,
0.10399021208286285,
0.0008553280495107174,
-0.02739064022898674,
0.13868173956871033,
-0.0023215950932353735,
0.11681398004293442,
-0.30246078968048096,
-0.12610994279384613,
0.12344911694526672,
0.37501710653305054,
0.15507008135318756,
0.10394849628210068,
-0.10367020219564438,
-0.0728321373462677,
0.37833720445632935,
-0.06969892978668213,
-0.14936120808124542,
0.49469316005706787,
-0.13250099122524261,
-0.27682188153266907,
0.13496416807174683,
-0.13522040843963623,
0.10412044078111649,
-0.14280806481838226,
-0.04120257869362831,
-0.3644923269748688,
0.18462692201137543,
0.051650937646627426,
-0.18477503955364227,
-0.015203732065856457,
-0.006140097510069609,
0.14668084681034088,
0.31046462059020996,
0.21907635033130646,
0.054536689072847366,
0.1899568885564804,
0.04677022248506546,
0.1412746161222458,
-0.05682375654578209,
0.21036821603775024,
-0.11823229491710663,
-0.12398479133844376,
-0.3252653479576111,
-0.043501850217580795,
-0.15660671889781952,
-0.07066459953784943,
0.38624924421310425,
0.31322726607322693,
0.1964380443096161,
-0.14485014975070953,
0.0005849552107974887,
-0.1270820051431656,
0.06382039189338684,
-0.26879215240478516,
-0.08708782494068146,
0.33734866976737976,
0.024654250591993332,
0.023845579475164413,
0.05113307386636734,
0.2791283130645752,
-0.09298455715179443,
-0.08994768559932709,
-0.3283596932888031,
-0.24632233381271362,
-0.08554399013519287,
0.28660354018211365,
-0.04825075343251228,
0.19351281225681305,
-0.18220949172973633,
-0.15610480308532715,
0.2680472135543823,
-0.14518001675605774,
-0.1260327845811844,
0.07998389005661011,
-0.18595650792121887,
-0.08831920474767685,
0.04757864400744438,
0.1607736349105835,
-0.11858801543712616,
0.26205742359161377,
-0.017097951844334602,
0.23618684709072113,
-0.0323791578412056,
0.4071325361728668,
0.0642411857843399,
0.10789266973733902,
-0.18443313241004944,
0.17359627783298492,
-0.010045869275927544,
-0.28300124406814575,
-0.6087395548820496,
0.17332910001277924,
-0.1521744430065155,
-0.25749215483665466,
0.3652694523334503,
0.16177739202976227,
0.03761134296655655,
0.05762369558215141,
0.3129569888114929,
0.02801593393087387,
-0.09131227433681488,
0.04152456670999527,
-0.3599383234977722,
-0.23382145166397095,
-0.20483970642089844,
-0.1284557282924652,
0.3979613780975342,
0.07331102341413498,
0.15557007491588593,
0.21105654537677765,
-0.08132336288690567,
0.021002940833568573,
0.3906095027923584,
0.3276498019695282,
0.1667734980583191,
-0.504851222038269,
0.10526759177446365,
0.018909920006990433,
-0.45837485790252686,
0.23543450236320496,
-0.2606964111328125,
-0.18317709863185883,
0.08458622545003891,
-0.18001233041286469,
-0.4344784915447235,
-0.15267571806907654,
0.317490816116333,
0.24877972900867462,
0.32806459069252014,
-0.009404757991433144,
0.31344449520111084,
-0.21473661065101624,
0.17757031321525574,
0.07193765044212341,
-0.07584845274686813,
-0.23982086777687073,
0.04718093201518059,
-0.05041177198290825,
-0.27226635813713074,
-0.12225913256406784,
0.16854269802570343,
0.07803008705377579,
0.09366834163665771,
-0.04086533561348915,
-0.057157594710588455,
0.24389314651489258,
-0.12703771889209747,
0.18330824375152588,
0.15699416399002075,
0.041893355548381805,
-0.00007821522740414366,
0.2725220024585724,
0.2653651237487793,
-0.09638060629367828,
0.0184043999761343,
-0.07008329778909683,
-0.13909895718097687,
-0.0834134891629219,
0.2200082391500473,
-0.040780194103717804,
-0.039177268743515015,
-0.1821240931749344,
0.10912027955055237,
-0.03116540051996708,
0.24188552796840668,
-0.1491742879152298,
0.024149851873517036,
-0.2494334727525711,
0.14882320165634155,
0.07035885006189346,
0.22530357539653778,
0.0275009386241436,
0.03638852760195732,
0.16256730258464813,
0.42664748430252075,
0.14071416854858398,
0.09929627180099487,
-0.340778112411499,
0.15394729375839233,
0.2863163948059082,
0.2539424002170563,
0.1982148140668869,
0.15154775977134705,
-0.3191637098789215,
0.19943365454673767,
-0.1711486577987671,
0.015613442286849022,
-0.227308452129364,
0.0933060497045517,
0.2801923155784607,
0.16650334000587463,
-0.3057169020175934,
0.0975024625658989,
-0.12285163253545761,
0.21636509895324707,
0.1654449850320816,
-0.03335888683795929,
-0.12919074296951294,
0.057165421545505524,
-0.0014705316862091422,
0.31533414125442505,
0.38483771681785583,
-0.10039164125919342,
-0.17042972147464752,
0.1907198578119278,
0.30951938033103943,
-0.17212700843811035,
-0.10145877301692963,
-0.29002007842063904,
0.22784638404846191,
0.21131674945354462,
0.06695161014795303,
0.01344241201877594,
-0.2498278021812439,
-0.09174242615699768,
0.22652044892311096,
-0.03900560736656189,
-0.25770050287246704,
0.13082356750965118,
-0.07658746093511581,
0.23879440128803253,
-0.30493491888046265,
0.06438864767551422,
-0.02450384385883808,
0.19267630577087402,
-0.26333141326904297,
-0.1315719485282898,
0.34520819783210754,
-0.28396445512771606,
-0.11369019746780396,
0.053775038570165634,
-0.08626056462526321,
-0.10522012412548065,
0.007592205423861742,
-0.026054179295897484,
-0.1052841991186142,
-0.3827355206012726,
-0.035946328192949295,
-0.15138843655586243,
-0.2951993942260742,
0.029088854789733887,
0.04029617831110954,
0.03441787511110306,
0.08076266199350357,
0.13846108317375183,
-0.1673349291086197,
0.4449288547039032,
-0.168426975607872,
-0.40560832619667053,
-0.3609660863876343,
0.30229273438453674,
-0.09049095958471298,
-0.038556359708309174,
0.14067405462265015,
-0.15056338906288147,
0.37225520610809326,
0.27704593539237976,
-0.3239486515522003,
-0.27270641922950745,
-0.03872857615351677,
0.03775275871157646,
0.006609355565160513,
-0.1439526528120041,
0.35083523392677307,
-0.1443455070257187,
-0.28767481446266174,
-0.16842269897460938,
-0.06817393004894257,
0.17393426597118378,
0.05533478036522865,
0.3123142421245575,
-0.2826591730117798,
0.09156110137701035,
0.16994920372962952,
0.5833101272583008,
-0.2296687364578247,
0.12476025521755219,
0.267363041639328,
0.11723943799734116,
0.3753748834133148,
-0.14678499102592468,
0.19346868991851807,
0.3161420524120331,
-0.05446825549006462,
-0.30568504333496094,
0.18508382141590118,
0.049645185470581055,
-0.32425934076309204,
0.06926051527261734,
-0.1892695426940918,
0.03257153183221817,
-0.06629142165184021,
0.17825382947921753,
-0.18658636510372162,
0.17478282749652863,
0.10178802162408829,
-0.02401498332619667,
-0.41179877519607544,
-0.07302878051996231,
0.023615658283233643,
-0.2392396628856659,
0.10120683908462524,
0.20620867609977722,
-0.2746428847312927,
-0.029955340549349785,
-0.38844987750053406,
0.27703747153282166,
0.0009546803194098175,
0.05564066022634506,
-0.12293527275323868,
0.08101994544267654,
0.0011522877030074596,
0.024279760196805,
0.5192065238952637,
-0.053051549941301346,
0.34586769342422485,
0.018449174240231514,
0.18774725496768951,
-0.2190994918346405,
0.020042622461915016,
0.18437127768993378,
0.22935941815376282,
-0.11262182146310806,
0.4767383337020874,
-0.17941516637802124,
0.20498894155025482,
-0.3168284595012665,
0.2430119514465332,
-0.2533191442489624,
0.007119268178939819,
-0.20490597188472748,
-0.15772731602191925,
-0.11538967490196228,
0.23285262286663055,
0.35165783762931824,
0.15228360891342163,
0.11837054789066315,
0.16166546940803528,
-0.07733585685491562,
-0.14126691222190857,
-0.06764975190162659,
0.10514756292104721,
0.5499595999717712,
0.07212278991937637,
-0.11501455307006836,
0.04762136936187744,
0.18902316689491272,
0.2344384342432022,
0.04422701522707939,
0.0531034953892231,
0.5074989199638367,
0.5343474745750427,
0.042826347053050995,
0.02858722023665905,
0.23113438487052917,
-0.008833589032292366,
-0.2087790071964264,
0.2965930700302124,
0.2922419607639313,
-0.387544721364975,
0.12309706211090088,
-0.3351479768753052,
0.03889341279864311,
-0.10126391798257828,
0.16867230832576752,
0.3088743984699249,
0.021209174767136574,
0.09155010432004929,
-0.03474435210227966,
0.32121139764785767,
-0.24863308668136597,
0.18625174462795258,
0.018312109634280205,
0.578572690486908,
0.03359421342611313,
-0.011580707505345345,
-0.12317869067192078,
0.1587020754814148,
0.0061728437431156635,
-0.527442216873169,
0.25977542996406555,
0.029628541320562363,
-0.205190047621727,
0.17087185382843018,
0.0587884746491909,
-0.1509430706501007,
0.2433498650789261,
-0.12949201464653015,
0.267156720161438,
-0.2595597505569458,
0.15579918026924133,
-0.22690922021865845,
0.2772948443889618,
-0.24389870464801788,
-0.13104896247386932,
0.22021079063415527,
0.3334267735481262,
-0.11766349524259567,
0.3042723536491394,
-0.3370950222015381,
0.16180671751499176,
-0.04592888057231903,
0.005840086843818426,
-0.046410467475652695,
-0.3165576457977295,
0.02544739469885826,
0.3968520760536194,
-0.23723873496055603,
-0.07675867527723312,
-0.333109050989151,
-0.04205784201622009,
0.189053013920784,
0.31940191984176636,
-0.27621349692344666,
0.19036129117012024,
0.02638712152838707,
-0.08698807656764984,
0.09613463282585144,
0.12457749992609024,
-0.17494513094425201,
-0.16220571100711823,
-0.1824548840522766,
0.04892165586352348,
-0.20946891605854034,
-0.24886898696422577,
0.017326319590210915,
0.02857236936688423,
-0.32677650451660156,
-0.11766641587018967,
-0.20352624356746674,
-0.31282028555870056,
-0.17122745513916016,
-0.01820242777466774,
0.29912063479423523,
0.0711255818605423,
0.09203828871250153,
0.0781213715672493,
0.020223885774612427,
-0.14661261439323425,
-0.059073761105537415,
0.38873666524887085,
0.27231869101524353,
-0.32376348972320557,
0.41876426339149475,
-0.4881792366504669,
-0.22147729992866516,
-0.18164275586605072,
-0.4267033636569977,
-0.17418469488620758,
0.05802727863192558,
0.17707063257694244,
-0.13204234838485718,
-0.3823857307434082,
-0.0866428092122078,
-0.18805168569087982,
0.5858689546585083,
0.3485669195652008,
0.058839838951826096,
-0.13125599920749664,
-0.48826611042022705,
0.31844496726989746,
-0.13471898436546326,
0.09863846749067307,
-0.09339316189289093,
-0.23593232035636902,
0.26172974705696106,
0.0892343521118164,
-0.42441532015800476,
-0.029609188437461853,
-0.33626797795295715,
0.1830461025238037,
-0.2757588326931,
-0.2450210452079773,
0.07764589041471481,
-0.1794697493314743,
0.1739303469657898,
-0.08057224750518799,
-0.1977747082710266,
-0.3154080808162689,
0.21627864241600037,
-0.03305698186159134,
-0.05487929284572601,
0.22949035465717316,
0.16542956233024597,
-0.2836077809333801,
-0.03501654043793678,
-0.08595158904790878,
0.015349078923463821,
0.33613282442092896,
-0.021234450861811638,
-0.33510541915893555,
0.24300391972064972,
0.02792704850435257,
0.0518094077706337,
0.12887294590473175,
0.2707683742046356,
-0.02372651733458042,
-0.31478261947631836,
0.09909243881702423,
0.14989759027957916,
-0.008158844895660877,
0.2481313943862915,
0.006073783617466688,
-0.12194503098726273,
-0.011970628052949905,
0.03393926844000816,
0.05081942677497864,
-0.07631426304578781,
0.3079821765422821,
0.19331897795200348,
-0.19388903677463531,
0.18024952709674835,
-0.21100430190563202,
0.1282922774553299,
0.3846495747566223,
-0.1845061182975769,
-0.015666302293539047,
0.10348906368017197,
0.13079021871089935,
0.16389413177967072,
0.17710109055042267,
0.4707596004009247,
-0.39082059264183044,
0.2497677206993103,
0.2709536552429199,
0.4752834737300873,
-0.2687908113002777,
-0.07561967521905899,
-0.19690969586372375,
0.11333096027374268,
-0.09676031023263931,
0.24698664247989655,
-0.02334166318178177,
0.2567491829395294,
0.2653955817222595,
0.07705105096101761,
0.2029040902853012,
0.32533395290374756,
0.14017583429813385,
-0.20231887698173523,
-0.24855302274227142,
-0.060467228293418884,
0.052396975457668304,
-0.030798599123954773,
0.29224294424057007,
-0.20161284506320953,
-0.13510067760944366,
-0.08329826593399048,
-0.14819972217082977,
-0.36752673983573914,
-0.10424470901489258,
-0.5149908661842346,
-0.09503795206546783,
0.0756794810295105,
-0.1958344280719757,
0.24998556077480316,
-0.048853736370801926,
0.1192331314086914,
-0.1548149436712265,
0.135965496301651,
-0.1947815716266632,
-0.028142409399151802,
0.4976784586906433,
-0.07051149755716324,
0.20366829633712769,
0.17325572669506073,
-0.16539409756660461,
0.34003451466560364,
0.14952047169208527,
-0.2240602821111679,
0.18748492002487183,
0.15231581032276154,
0.3482319712638855,
0.17015080153942108,
-0.048177845776081085,
0.10452928394079208,
0.32288146018981934,
-0.1105479747056961,
-0.48215705156326294,
0.026085352525115013,
0.323083758354187,
-0.3196655511856079,
0.09656225889921188,
0.3401523530483246,
-0.25436142086982727,
0.2918616831302643,
-0.10361073911190033,
0.10132873803377151,
0.23394015431404114,
-0.22485949099063873,
-0.13519681990146637,
-0.28796857595443726,
0.043699122965335846,
-0.04029373079538345,
-0.339199423789978,
-0.2130756676197052,
0.08887305855751038,
-0.18034502863883972,
0.22299553453922272,
-0.02063605934381485,
0.1597927212715149,
-0.2830277681350708,
0.48799219727516174,
0.10738388448953629,
-0.39922916889190674,
-0.2399577647447586,
-0.11744856089353561,
-0.22389812767505646,
0.08588997274637222,
-0.4095769226551056,
0.10358676314353943,
-0.11708934605121613,
0.42024877667427063,
-0.03553232178092003,
-0.29964569211006165,
0.03293641284108162,
-0.027370082214474678,
-0.22739548981189728,
-0.05709421634674072,
-0.3613966405391693,
0.1171831414103508,
-0.10460376739501953,
-0.09942882508039474,
0.346215158700943,
-0.35193175077438354,
0.1787763386964798,
0.15748219192028046,
0.30898338556289673,
0.05534454062581062,
-0.014273484237492085,
0.22325552999973297,
0.31651023030281067,
0.10311953723430634,
-0.1513245701789856,
0.2623482346534729,
-0.07128334790468216,
-0.07401948422193527,
-0.4364609122276306,
-0.01739835925400257,
0.06283124536275864,
-0.2060074806213379,
0.3266618847846985,
0.14939169585704803,
-0.3575519025325775,
0.16341249644756317,
0.07482291013002396,
0.279211163520813,
0.1243400126695633,
0.11189410090446472,
0.13739942014217377,
-0.01830662600696087,
-0.2724636495113373,
0.09121900051832199,
0.25763148069381714,
0.19753143191337585,
-0.05303496867418289,
-0.007622435688972473,
-0.2096731960773468,
-0.23058904707431793,
0.2533175051212311,
0.04633346199989319,
-0.31471413373947144,
-0.09331080317497253,
0.34477514028549194,
0.12127458304166794,
-0.060576602816581726,
0.12886188924312592,
0.13759419322013855,
0.10204910486936569,
0.056567125022411346,
0.16586656868457794,
-0.06969282031059265,
-0.27228763699531555,
-0.28461429476737976,
0.08984459936618805,
0.15614819526672363,
-0.05738864094018936,
-0.19011205434799194,
-0.26040658354759216,
-0.18630923330783844
] |
https://github.com/huggingface/datasets/issues/1785
|
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
That's an interesting behavior...
Do you know any other way to get the free space that works in your case ?
Also if it's a permission issue could you try fix the permissions and let mus know if that helped ?
|
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk.
The exact error thrown:
```bash
>>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path")
OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size)
```
[`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk).
This is exactly where the error gets thrown:
https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502
```python
if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root):
raise IOError(
"Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format(
utils.size_str(self.info.size_in_bytes or 0),
utils.size_str(self.info.download_size or 0),
utils.size_str(self.info.dataset_size or 0),
utils.size_str(self.info.post_processing_size or 0),
)
)
```
What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal.
Would it be possible to pass a flag to skip this check on disk space?
| 41 |
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
[
-0.12654204666614532,
-0.35599076747894287,
-0.26534906029701233,
0.15758740901947021,
-0.1311347931623459,
-0.030707145109772682,
0.01788279600441456,
0.35523363947868347,
0.31602007150650024,
0.2585310637950897,
0.23294863104820251,
-0.3240179419517517,
0.005862023215740919,
-0.058646123856306076,
-0.19410088658332825,
0.049837756901979446,
0.04307176172733307,
-0.007178966421633959,
0.19750992953777313,
-0.018543360754847527,
-0.15881730616092682,
0.25784531235694885,
0.15040811896324158,
-0.37443190813064575,
-0.5397385358810425,
-0.16453817486763,
-0.07185493409633636,
0.018736092373728752,
-0.09389401227235794,
-0.06115800514817238,
0.08368885517120361,
-0.13627612590789795,
-0.014364988543093204,
0.23875761032104492,
-0.00010101171938003972,
-0.015923073515295982,
0.22781693935394287,
-0.16442656517028809,
-0.3490571975708008,
0.33194226026535034,
-0.02634921297430992,
-0.2754877805709839,
-0.31618016958236694,
-0.25217747688293457,
-0.03326544910669327,
0.1061694547533989,
-0.02934851683676243,
-0.320567786693573,
0.08458069711923599,
0.05622347816824913,
0.366388738155365,
0.0026877690106630325,
-0.05135605111718178,
-0.24344952404499054,
-0.005541323218494654,
-0.07936234772205353,
-0.060791101306676865,
0.164076566696167,
0.24489834904670715,
0.06246718764305115,
-0.33787453174591064,
0.3750694692134857,
0.13351936638355255,
0.19156162440776825,
0.21499541401863098,
-0.25951141119003296,
-0.1552632600069046,
-0.03041495382785797,
0.4357472062110901,
-0.2103603482246399,
0.4954563081264496,
-0.02919001132249832,
-0.19213610887527466,
-0.09058992564678192,
-0.13041560351848602,
-0.03665317967534065,
0.11180254817008972,
-0.04972505569458008,
-0.060980673879384995,
-0.158950075507164,
-0.21148362755775452,
-0.18568667769432068,
0.03450861945748329,
-0.26215365529060364,
-0.1223076656460762,
0.2248932123184204,
-0.07578428089618683,
0.048606280237436295,
0.10399021208286285,
0.0008553280495107174,
-0.02739064022898674,
0.13868173956871033,
-0.0023215950932353735,
0.11681398004293442,
-0.30246078968048096,
-0.12610994279384613,
0.12344911694526672,
0.37501710653305054,
0.15507008135318756,
0.10394849628210068,
-0.10367020219564438,
-0.0728321373462677,
0.37833720445632935,
-0.06969892978668213,
-0.14936120808124542,
0.49469316005706787,
-0.13250099122524261,
-0.27682188153266907,
0.13496416807174683,
-0.13522040843963623,
0.10412044078111649,
-0.14280806481838226,
-0.04120257869362831,
-0.3644923269748688,
0.18462692201137543,
0.051650937646627426,
-0.18477503955364227,
-0.015203732065856457,
-0.006140097510069609,
0.14668084681034088,
0.31046462059020996,
0.21907635033130646,
0.054536689072847366,
0.1899568885564804,
0.04677022248506546,
0.1412746161222458,
-0.05682375654578209,
0.21036821603775024,
-0.11823229491710663,
-0.12398479133844376,
-0.3252653479576111,
-0.043501850217580795,
-0.15660671889781952,
-0.07066459953784943,
0.38624924421310425,
0.31322726607322693,
0.1964380443096161,
-0.14485014975070953,
0.0005849552107974887,
-0.1270820051431656,
0.06382039189338684,
-0.26879215240478516,
-0.08708782494068146,
0.33734866976737976,
0.024654250591993332,
0.023845579475164413,
0.05113307386636734,
0.2791283130645752,
-0.09298455715179443,
-0.08994768559932709,
-0.3283596932888031,
-0.24632233381271362,
-0.08554399013519287,
0.28660354018211365,
-0.04825075343251228,
0.19351281225681305,
-0.18220949172973633,
-0.15610480308532715,
0.2680472135543823,
-0.14518001675605774,
-0.1260327845811844,
0.07998389005661011,
-0.18595650792121887,
-0.08831920474767685,
0.04757864400744438,
0.1607736349105835,
-0.11858801543712616,
0.26205742359161377,
-0.017097951844334602,
0.23618684709072113,
-0.0323791578412056,
0.4071325361728668,
0.0642411857843399,
0.10789266973733902,
-0.18443313241004944,
0.17359627783298492,
-0.010045869275927544,
-0.28300124406814575,
-0.6087395548820496,
0.17332910001277924,
-0.1521744430065155,
-0.25749215483665466,
0.3652694523334503,
0.16177739202976227,
0.03761134296655655,
0.05762369558215141,
0.3129569888114929,
0.02801593393087387,
-0.09131227433681488,
0.04152456670999527,
-0.3599383234977722,
-0.23382145166397095,
-0.20483970642089844,
-0.1284557282924652,
0.3979613780975342,
0.07331102341413498,
0.15557007491588593,
0.21105654537677765,
-0.08132336288690567,
0.021002940833568573,
0.3906095027923584,
0.3276498019695282,
0.1667734980583191,
-0.504851222038269,
0.10526759177446365,
0.018909920006990433,
-0.45837485790252686,
0.23543450236320496,
-0.2606964111328125,
-0.18317709863185883,
0.08458622545003891,
-0.18001233041286469,
-0.4344784915447235,
-0.15267571806907654,
0.317490816116333,
0.24877972900867462,
0.32806459069252014,
-0.009404757991433144,
0.31344449520111084,
-0.21473661065101624,
0.17757031321525574,
0.07193765044212341,
-0.07584845274686813,
-0.23982086777687073,
0.04718093201518059,
-0.05041177198290825,
-0.27226635813713074,
-0.12225913256406784,
0.16854269802570343,
0.07803008705377579,
0.09366834163665771,
-0.04086533561348915,
-0.057157594710588455,
0.24389314651489258,
-0.12703771889209747,
0.18330824375152588,
0.15699416399002075,
0.041893355548381805,
-0.00007821522740414366,
0.2725220024585724,
0.2653651237487793,
-0.09638060629367828,
0.0184043999761343,
-0.07008329778909683,
-0.13909895718097687,
-0.0834134891629219,
0.2200082391500473,
-0.040780194103717804,
-0.039177268743515015,
-0.1821240931749344,
0.10912027955055237,
-0.03116540051996708,
0.24188552796840668,
-0.1491742879152298,
0.024149851873517036,
-0.2494334727525711,
0.14882320165634155,
0.07035885006189346,
0.22530357539653778,
0.0275009386241436,
0.03638852760195732,
0.16256730258464813,
0.42664748430252075,
0.14071416854858398,
0.09929627180099487,
-0.340778112411499,
0.15394729375839233,
0.2863163948059082,
0.2539424002170563,
0.1982148140668869,
0.15154775977134705,
-0.3191637098789215,
0.19943365454673767,
-0.1711486577987671,
0.015613442286849022,
-0.227308452129364,
0.0933060497045517,
0.2801923155784607,
0.16650334000587463,
-0.3057169020175934,
0.0975024625658989,
-0.12285163253545761,
0.21636509895324707,
0.1654449850320816,
-0.03335888683795929,
-0.12919074296951294,
0.057165421545505524,
-0.0014705316862091422,
0.31533414125442505,
0.38483771681785583,
-0.10039164125919342,
-0.17042972147464752,
0.1907198578119278,
0.30951938033103943,
-0.17212700843811035,
-0.10145877301692963,
-0.29002007842063904,
0.22784638404846191,
0.21131674945354462,
0.06695161014795303,
0.01344241201877594,
-0.2498278021812439,
-0.09174242615699768,
0.22652044892311096,
-0.03900560736656189,
-0.25770050287246704,
0.13082356750965118,
-0.07658746093511581,
0.23879440128803253,
-0.30493491888046265,
0.06438864767551422,
-0.02450384385883808,
0.19267630577087402,
-0.26333141326904297,
-0.1315719485282898,
0.34520819783210754,
-0.28396445512771606,
-0.11369019746780396,
0.053775038570165634,
-0.08626056462526321,
-0.10522012412548065,
0.007592205423861742,
-0.026054179295897484,
-0.1052841991186142,
-0.3827355206012726,
-0.035946328192949295,
-0.15138843655586243,
-0.2951993942260742,
0.029088854789733887,
0.04029617831110954,
0.03441787511110306,
0.08076266199350357,
0.13846108317375183,
-0.1673349291086197,
0.4449288547039032,
-0.168426975607872,
-0.40560832619667053,
-0.3609660863876343,
0.30229273438453674,
-0.09049095958471298,
-0.038556359708309174,
0.14067405462265015,
-0.15056338906288147,
0.37225520610809326,
0.27704593539237976,
-0.3239486515522003,
-0.27270641922950745,
-0.03872857615351677,
0.03775275871157646,
0.006609355565160513,
-0.1439526528120041,
0.35083523392677307,
-0.1443455070257187,
-0.28767481446266174,
-0.16842269897460938,
-0.06817393004894257,
0.17393426597118378,
0.05533478036522865,
0.3123142421245575,
-0.2826591730117798,
0.09156110137701035,
0.16994920372962952,
0.5833101272583008,
-0.2296687364578247,
0.12476025521755219,
0.267363041639328,
0.11723943799734116,
0.3753748834133148,
-0.14678499102592468,
0.19346868991851807,
0.3161420524120331,
-0.05446825549006462,
-0.30568504333496094,
0.18508382141590118,
0.049645185470581055,
-0.32425934076309204,
0.06926051527261734,
-0.1892695426940918,
0.03257153183221817,
-0.06629142165184021,
0.17825382947921753,
-0.18658636510372162,
0.17478282749652863,
0.10178802162408829,
-0.02401498332619667,
-0.41179877519607544,
-0.07302878051996231,
0.023615658283233643,
-0.2392396628856659,
0.10120683908462524,
0.20620867609977722,
-0.2746428847312927,
-0.029955340549349785,
-0.38844987750053406,
0.27703747153282166,
0.0009546803194098175,
0.05564066022634506,
-0.12293527275323868,
0.08101994544267654,
0.0011522877030074596,
0.024279760196805,
0.5192065238952637,
-0.053051549941301346,
0.34586769342422485,
0.018449174240231514,
0.18774725496768951,
-0.2190994918346405,
0.020042622461915016,
0.18437127768993378,
0.22935941815376282,
-0.11262182146310806,
0.4767383337020874,
-0.17941516637802124,
0.20498894155025482,
-0.3168284595012665,
0.2430119514465332,
-0.2533191442489624,
0.007119268178939819,
-0.20490597188472748,
-0.15772731602191925,
-0.11538967490196228,
0.23285262286663055,
0.35165783762931824,
0.15228360891342163,
0.11837054789066315,
0.16166546940803528,
-0.07733585685491562,
-0.14126691222190857,
-0.06764975190162659,
0.10514756292104721,
0.5499595999717712,
0.07212278991937637,
-0.11501455307006836,
0.04762136936187744,
0.18902316689491272,
0.2344384342432022,
0.04422701522707939,
0.0531034953892231,
0.5074989199638367,
0.5343474745750427,
0.042826347053050995,
0.02858722023665905,
0.23113438487052917,
-0.008833589032292366,
-0.2087790071964264,
0.2965930700302124,
0.2922419607639313,
-0.387544721364975,
0.12309706211090088,
-0.3351479768753052,
0.03889341279864311,
-0.10126391798257828,
0.16867230832576752,
0.3088743984699249,
0.021209174767136574,
0.09155010432004929,
-0.03474435210227966,
0.32121139764785767,
-0.24863308668136597,
0.18625174462795258,
0.018312109634280205,
0.578572690486908,
0.03359421342611313,
-0.011580707505345345,
-0.12317869067192078,
0.1587020754814148,
0.0061728437431156635,
-0.527442216873169,
0.25977542996406555,
0.029628541320562363,
-0.205190047621727,
0.17087185382843018,
0.0587884746491909,
-0.1509430706501007,
0.2433498650789261,
-0.12949201464653015,
0.267156720161438,
-0.2595597505569458,
0.15579918026924133,
-0.22690922021865845,
0.2772948443889618,
-0.24389870464801788,
-0.13104896247386932,
0.22021079063415527,
0.3334267735481262,
-0.11766349524259567,
0.3042723536491394,
-0.3370950222015381,
0.16180671751499176,
-0.04592888057231903,
0.005840086843818426,
-0.046410467475652695,
-0.3165576457977295,
0.02544739469885826,
0.3968520760536194,
-0.23723873496055603,
-0.07675867527723312,
-0.333109050989151,
-0.04205784201622009,
0.189053013920784,
0.31940191984176636,
-0.27621349692344666,
0.19036129117012024,
0.02638712152838707,
-0.08698807656764984,
0.09613463282585144,
0.12457749992609024,
-0.17494513094425201,
-0.16220571100711823,
-0.1824548840522766,
0.04892165586352348,
-0.20946891605854034,
-0.24886898696422577,
0.017326319590210915,
0.02857236936688423,
-0.32677650451660156,
-0.11766641587018967,
-0.20352624356746674,
-0.31282028555870056,
-0.17122745513916016,
-0.01820242777466774,
0.29912063479423523,
0.0711255818605423,
0.09203828871250153,
0.0781213715672493,
0.020223885774612427,
-0.14661261439323425,
-0.059073761105537415,
0.38873666524887085,
0.27231869101524353,
-0.32376348972320557,
0.41876426339149475,
-0.4881792366504669,
-0.22147729992866516,
-0.18164275586605072,
-0.4267033636569977,
-0.17418469488620758,
0.05802727863192558,
0.17707063257694244,
-0.13204234838485718,
-0.3823857307434082,
-0.0866428092122078,
-0.18805168569087982,
0.5858689546585083,
0.3485669195652008,
0.058839838951826096,
-0.13125599920749664,
-0.48826611042022705,
0.31844496726989746,
-0.13471898436546326,
0.09863846749067307,
-0.09339316189289093,
-0.23593232035636902,
0.26172974705696106,
0.0892343521118164,
-0.42441532015800476,
-0.029609188437461853,
-0.33626797795295715,
0.1830461025238037,
-0.2757588326931,
-0.2450210452079773,
0.07764589041471481,
-0.1794697493314743,
0.1739303469657898,
-0.08057224750518799,
-0.1977747082710266,
-0.3154080808162689,
0.21627864241600037,
-0.03305698186159134,
-0.05487929284572601,
0.22949035465717316,
0.16542956233024597,
-0.2836077809333801,
-0.03501654043793678,
-0.08595158904790878,
0.015349078923463821,
0.33613282442092896,
-0.021234450861811638,
-0.33510541915893555,
0.24300391972064972,
0.02792704850435257,
0.0518094077706337,
0.12887294590473175,
0.2707683742046356,
-0.02372651733458042,
-0.31478261947631836,
0.09909243881702423,
0.14989759027957916,
-0.008158844895660877,
0.2481313943862915,
0.006073783617466688,
-0.12194503098726273,
-0.011970628052949905,
0.03393926844000816,
0.05081942677497864,
-0.07631426304578781,
0.3079821765422821,
0.19331897795200348,
-0.19388903677463531,
0.18024952709674835,
-0.21100430190563202,
0.1282922774553299,
0.3846495747566223,
-0.1845061182975769,
-0.015666302293539047,
0.10348906368017197,
0.13079021871089935,
0.16389413177967072,
0.17710109055042267,
0.4707596004009247,
-0.39082059264183044,
0.2497677206993103,
0.2709536552429199,
0.4752834737300873,
-0.2687908113002777,
-0.07561967521905899,
-0.19690969586372375,
0.11333096027374268,
-0.09676031023263931,
0.24698664247989655,
-0.02334166318178177,
0.2567491829395294,
0.2653955817222595,
0.07705105096101761,
0.2029040902853012,
0.32533395290374756,
0.14017583429813385,
-0.20231887698173523,
-0.24855302274227142,
-0.060467228293418884,
0.052396975457668304,
-0.030798599123954773,
0.29224294424057007,
-0.20161284506320953,
-0.13510067760944366,
-0.08329826593399048,
-0.14819972217082977,
-0.36752673983573914,
-0.10424470901489258,
-0.5149908661842346,
-0.09503795206546783,
0.0756794810295105,
-0.1958344280719757,
0.24998556077480316,
-0.048853736370801926,
0.1192331314086914,
-0.1548149436712265,
0.135965496301651,
-0.1947815716266632,
-0.028142409399151802,
0.4976784586906433,
-0.07051149755716324,
0.20366829633712769,
0.17325572669506073,
-0.16539409756660461,
0.34003451466560364,
0.14952047169208527,
-0.2240602821111679,
0.18748492002487183,
0.15231581032276154,
0.3482319712638855,
0.17015080153942108,
-0.048177845776081085,
0.10452928394079208,
0.32288146018981934,
-0.1105479747056961,
-0.48215705156326294,
0.026085352525115013,
0.323083758354187,
-0.3196655511856079,
0.09656225889921188,
0.3401523530483246,
-0.25436142086982727,
0.2918616831302643,
-0.10361073911190033,
0.10132873803377151,
0.23394015431404114,
-0.22485949099063873,
-0.13519681990146637,
-0.28796857595443726,
0.043699122965335846,
-0.04029373079538345,
-0.339199423789978,
-0.2130756676197052,
0.08887305855751038,
-0.18034502863883972,
0.22299553453922272,
-0.02063605934381485,
0.1597927212715149,
-0.2830277681350708,
0.48799219727516174,
0.10738388448953629,
-0.39922916889190674,
-0.2399577647447586,
-0.11744856089353561,
-0.22389812767505646,
0.08588997274637222,
-0.4095769226551056,
0.10358676314353943,
-0.11708934605121613,
0.42024877667427063,
-0.03553232178092003,
-0.29964569211006165,
0.03293641284108162,
-0.027370082214474678,
-0.22739548981189728,
-0.05709421634674072,
-0.3613966405391693,
0.1171831414103508,
-0.10460376739501953,
-0.09942882508039474,
0.346215158700943,
-0.35193175077438354,
0.1787763386964798,
0.15748219192028046,
0.30898338556289673,
0.05534454062581062,
-0.014273484237492085,
0.22325552999973297,
0.31651023030281067,
0.10311953723430634,
-0.1513245701789856,
0.2623482346534729,
-0.07128334790468216,
-0.07401948422193527,
-0.4364609122276306,
-0.01739835925400257,
0.06283124536275864,
-0.2060074806213379,
0.3266618847846985,
0.14939169585704803,
-0.3575519025325775,
0.16341249644756317,
0.07482291013002396,
0.279211163520813,
0.1243400126695633,
0.11189410090446472,
0.13739942014217377,
-0.01830662600696087,
-0.2724636495113373,
0.09121900051832199,
0.25763148069381714,
0.19753143191337585,
-0.05303496867418289,
-0.007622435688972473,
-0.2096731960773468,
-0.23058904707431793,
0.2533175051212311,
0.04633346199989319,
-0.31471413373947144,
-0.09331080317497253,
0.34477514028549194,
0.12127458304166794,
-0.060576602816581726,
0.12886188924312592,
0.13759419322013855,
0.10204910486936569,
0.056567125022411346,
0.16586656868457794,
-0.06969282031059265,
-0.27228763699531555,
-0.28461429476737976,
0.08984459936618805,
0.15614819526672363,
-0.05738864094018936,
-0.19011205434799194,
-0.26040658354759216,
-0.18630923330783844
] |
https://github.com/huggingface/datasets/issues/1785
|
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
I think its an issue on the clusters end (unclear exactly why -- maybe something with docker containers?), will close the issue
|
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk.
The exact error thrown:
```bash
>>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path")
OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size)
```
[`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk).
This is exactly where the error gets thrown:
https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502
```python
if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root):
raise IOError(
"Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format(
utils.size_str(self.info.size_in_bytes or 0),
utils.size_str(self.info.download_size or 0),
utils.size_str(self.info.dataset_size or 0),
utils.size_str(self.info.post_processing_size or 0),
)
)
```
What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal.
Would it be possible to pass a flag to skip this check on disk space?
| 22 |
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
[
-0.12654204666614532,
-0.35599076747894287,
-0.26534906029701233,
0.15758740901947021,
-0.1311347931623459,
-0.030707145109772682,
0.01788279600441456,
0.35523363947868347,
0.31602007150650024,
0.2585310637950897,
0.23294863104820251,
-0.3240179419517517,
0.005862023215740919,
-0.058646123856306076,
-0.19410088658332825,
0.049837756901979446,
0.04307176172733307,
-0.007178966421633959,
0.19750992953777313,
-0.018543360754847527,
-0.15881730616092682,
0.25784531235694885,
0.15040811896324158,
-0.37443190813064575,
-0.5397385358810425,
-0.16453817486763,
-0.07185493409633636,
0.018736092373728752,
-0.09389401227235794,
-0.06115800514817238,
0.08368885517120361,
-0.13627612590789795,
-0.014364988543093204,
0.23875761032104492,
-0.00010101171938003972,
-0.015923073515295982,
0.22781693935394287,
-0.16442656517028809,
-0.3490571975708008,
0.33194226026535034,
-0.02634921297430992,
-0.2754877805709839,
-0.31618016958236694,
-0.25217747688293457,
-0.03326544910669327,
0.1061694547533989,
-0.02934851683676243,
-0.320567786693573,
0.08458069711923599,
0.05622347816824913,
0.366388738155365,
0.0026877690106630325,
-0.05135605111718178,
-0.24344952404499054,
-0.005541323218494654,
-0.07936234772205353,
-0.060791101306676865,
0.164076566696167,
0.24489834904670715,
0.06246718764305115,
-0.33787453174591064,
0.3750694692134857,
0.13351936638355255,
0.19156162440776825,
0.21499541401863098,
-0.25951141119003296,
-0.1552632600069046,
-0.03041495382785797,
0.4357472062110901,
-0.2103603482246399,
0.4954563081264496,
-0.02919001132249832,
-0.19213610887527466,
-0.09058992564678192,
-0.13041560351848602,
-0.03665317967534065,
0.11180254817008972,
-0.04972505569458008,
-0.060980673879384995,
-0.158950075507164,
-0.21148362755775452,
-0.18568667769432068,
0.03450861945748329,
-0.26215365529060364,
-0.1223076656460762,
0.2248932123184204,
-0.07578428089618683,
0.048606280237436295,
0.10399021208286285,
0.0008553280495107174,
-0.02739064022898674,
0.13868173956871033,
-0.0023215950932353735,
0.11681398004293442,
-0.30246078968048096,
-0.12610994279384613,
0.12344911694526672,
0.37501710653305054,
0.15507008135318756,
0.10394849628210068,
-0.10367020219564438,
-0.0728321373462677,
0.37833720445632935,
-0.06969892978668213,
-0.14936120808124542,
0.49469316005706787,
-0.13250099122524261,
-0.27682188153266907,
0.13496416807174683,
-0.13522040843963623,
0.10412044078111649,
-0.14280806481838226,
-0.04120257869362831,
-0.3644923269748688,
0.18462692201137543,
0.051650937646627426,
-0.18477503955364227,
-0.015203732065856457,
-0.006140097510069609,
0.14668084681034088,
0.31046462059020996,
0.21907635033130646,
0.054536689072847366,
0.1899568885564804,
0.04677022248506546,
0.1412746161222458,
-0.05682375654578209,
0.21036821603775024,
-0.11823229491710663,
-0.12398479133844376,
-0.3252653479576111,
-0.043501850217580795,
-0.15660671889781952,
-0.07066459953784943,
0.38624924421310425,
0.31322726607322693,
0.1964380443096161,
-0.14485014975070953,
0.0005849552107974887,
-0.1270820051431656,
0.06382039189338684,
-0.26879215240478516,
-0.08708782494068146,
0.33734866976737976,
0.024654250591993332,
0.023845579475164413,
0.05113307386636734,
0.2791283130645752,
-0.09298455715179443,
-0.08994768559932709,
-0.3283596932888031,
-0.24632233381271362,
-0.08554399013519287,
0.28660354018211365,
-0.04825075343251228,
0.19351281225681305,
-0.18220949172973633,
-0.15610480308532715,
0.2680472135543823,
-0.14518001675605774,
-0.1260327845811844,
0.07998389005661011,
-0.18595650792121887,
-0.08831920474767685,
0.04757864400744438,
0.1607736349105835,
-0.11858801543712616,
0.26205742359161377,
-0.017097951844334602,
0.23618684709072113,
-0.0323791578412056,
0.4071325361728668,
0.0642411857843399,
0.10789266973733902,
-0.18443313241004944,
0.17359627783298492,
-0.010045869275927544,
-0.28300124406814575,
-0.6087395548820496,
0.17332910001277924,
-0.1521744430065155,
-0.25749215483665466,
0.3652694523334503,
0.16177739202976227,
0.03761134296655655,
0.05762369558215141,
0.3129569888114929,
0.02801593393087387,
-0.09131227433681488,
0.04152456670999527,
-0.3599383234977722,
-0.23382145166397095,
-0.20483970642089844,
-0.1284557282924652,
0.3979613780975342,
0.07331102341413498,
0.15557007491588593,
0.21105654537677765,
-0.08132336288690567,
0.021002940833568573,
0.3906095027923584,
0.3276498019695282,
0.1667734980583191,
-0.504851222038269,
0.10526759177446365,
0.018909920006990433,
-0.45837485790252686,
0.23543450236320496,
-0.2606964111328125,
-0.18317709863185883,
0.08458622545003891,
-0.18001233041286469,
-0.4344784915447235,
-0.15267571806907654,
0.317490816116333,
0.24877972900867462,
0.32806459069252014,
-0.009404757991433144,
0.31344449520111084,
-0.21473661065101624,
0.17757031321525574,
0.07193765044212341,
-0.07584845274686813,
-0.23982086777687073,
0.04718093201518059,
-0.05041177198290825,
-0.27226635813713074,
-0.12225913256406784,
0.16854269802570343,
0.07803008705377579,
0.09366834163665771,
-0.04086533561348915,
-0.057157594710588455,
0.24389314651489258,
-0.12703771889209747,
0.18330824375152588,
0.15699416399002075,
0.041893355548381805,
-0.00007821522740414366,
0.2725220024585724,
0.2653651237487793,
-0.09638060629367828,
0.0184043999761343,
-0.07008329778909683,
-0.13909895718097687,
-0.0834134891629219,
0.2200082391500473,
-0.040780194103717804,
-0.039177268743515015,
-0.1821240931749344,
0.10912027955055237,
-0.03116540051996708,
0.24188552796840668,
-0.1491742879152298,
0.024149851873517036,
-0.2494334727525711,
0.14882320165634155,
0.07035885006189346,
0.22530357539653778,
0.0275009386241436,
0.03638852760195732,
0.16256730258464813,
0.42664748430252075,
0.14071416854858398,
0.09929627180099487,
-0.340778112411499,
0.15394729375839233,
0.2863163948059082,
0.2539424002170563,
0.1982148140668869,
0.15154775977134705,
-0.3191637098789215,
0.19943365454673767,
-0.1711486577987671,
0.015613442286849022,
-0.227308452129364,
0.0933060497045517,
0.2801923155784607,
0.16650334000587463,
-0.3057169020175934,
0.0975024625658989,
-0.12285163253545761,
0.21636509895324707,
0.1654449850320816,
-0.03335888683795929,
-0.12919074296951294,
0.057165421545505524,
-0.0014705316862091422,
0.31533414125442505,
0.38483771681785583,
-0.10039164125919342,
-0.17042972147464752,
0.1907198578119278,
0.30951938033103943,
-0.17212700843811035,
-0.10145877301692963,
-0.29002007842063904,
0.22784638404846191,
0.21131674945354462,
0.06695161014795303,
0.01344241201877594,
-0.2498278021812439,
-0.09174242615699768,
0.22652044892311096,
-0.03900560736656189,
-0.25770050287246704,
0.13082356750965118,
-0.07658746093511581,
0.23879440128803253,
-0.30493491888046265,
0.06438864767551422,
-0.02450384385883808,
0.19267630577087402,
-0.26333141326904297,
-0.1315719485282898,
0.34520819783210754,
-0.28396445512771606,
-0.11369019746780396,
0.053775038570165634,
-0.08626056462526321,
-0.10522012412548065,
0.007592205423861742,
-0.026054179295897484,
-0.1052841991186142,
-0.3827355206012726,
-0.035946328192949295,
-0.15138843655586243,
-0.2951993942260742,
0.029088854789733887,
0.04029617831110954,
0.03441787511110306,
0.08076266199350357,
0.13846108317375183,
-0.1673349291086197,
0.4449288547039032,
-0.168426975607872,
-0.40560832619667053,
-0.3609660863876343,
0.30229273438453674,
-0.09049095958471298,
-0.038556359708309174,
0.14067405462265015,
-0.15056338906288147,
0.37225520610809326,
0.27704593539237976,
-0.3239486515522003,
-0.27270641922950745,
-0.03872857615351677,
0.03775275871157646,
0.006609355565160513,
-0.1439526528120041,
0.35083523392677307,
-0.1443455070257187,
-0.28767481446266174,
-0.16842269897460938,
-0.06817393004894257,
0.17393426597118378,
0.05533478036522865,
0.3123142421245575,
-0.2826591730117798,
0.09156110137701035,
0.16994920372962952,
0.5833101272583008,
-0.2296687364578247,
0.12476025521755219,
0.267363041639328,
0.11723943799734116,
0.3753748834133148,
-0.14678499102592468,
0.19346868991851807,
0.3161420524120331,
-0.05446825549006462,
-0.30568504333496094,
0.18508382141590118,
0.049645185470581055,
-0.32425934076309204,
0.06926051527261734,
-0.1892695426940918,
0.03257153183221817,
-0.06629142165184021,
0.17825382947921753,
-0.18658636510372162,
0.17478282749652863,
0.10178802162408829,
-0.02401498332619667,
-0.41179877519607544,
-0.07302878051996231,
0.023615658283233643,
-0.2392396628856659,
0.10120683908462524,
0.20620867609977722,
-0.2746428847312927,
-0.029955340549349785,
-0.38844987750053406,
0.27703747153282166,
0.0009546803194098175,
0.05564066022634506,
-0.12293527275323868,
0.08101994544267654,
0.0011522877030074596,
0.024279760196805,
0.5192065238952637,
-0.053051549941301346,
0.34586769342422485,
0.018449174240231514,
0.18774725496768951,
-0.2190994918346405,
0.020042622461915016,
0.18437127768993378,
0.22935941815376282,
-0.11262182146310806,
0.4767383337020874,
-0.17941516637802124,
0.20498894155025482,
-0.3168284595012665,
0.2430119514465332,
-0.2533191442489624,
0.007119268178939819,
-0.20490597188472748,
-0.15772731602191925,
-0.11538967490196228,
0.23285262286663055,
0.35165783762931824,
0.15228360891342163,
0.11837054789066315,
0.16166546940803528,
-0.07733585685491562,
-0.14126691222190857,
-0.06764975190162659,
0.10514756292104721,
0.5499595999717712,
0.07212278991937637,
-0.11501455307006836,
0.04762136936187744,
0.18902316689491272,
0.2344384342432022,
0.04422701522707939,
0.0531034953892231,
0.5074989199638367,
0.5343474745750427,
0.042826347053050995,
0.02858722023665905,
0.23113438487052917,
-0.008833589032292366,
-0.2087790071964264,
0.2965930700302124,
0.2922419607639313,
-0.387544721364975,
0.12309706211090088,
-0.3351479768753052,
0.03889341279864311,
-0.10126391798257828,
0.16867230832576752,
0.3088743984699249,
0.021209174767136574,
0.09155010432004929,
-0.03474435210227966,
0.32121139764785767,
-0.24863308668136597,
0.18625174462795258,
0.018312109634280205,
0.578572690486908,
0.03359421342611313,
-0.011580707505345345,
-0.12317869067192078,
0.1587020754814148,
0.0061728437431156635,
-0.527442216873169,
0.25977542996406555,
0.029628541320562363,
-0.205190047621727,
0.17087185382843018,
0.0587884746491909,
-0.1509430706501007,
0.2433498650789261,
-0.12949201464653015,
0.267156720161438,
-0.2595597505569458,
0.15579918026924133,
-0.22690922021865845,
0.2772948443889618,
-0.24389870464801788,
-0.13104896247386932,
0.22021079063415527,
0.3334267735481262,
-0.11766349524259567,
0.3042723536491394,
-0.3370950222015381,
0.16180671751499176,
-0.04592888057231903,
0.005840086843818426,
-0.046410467475652695,
-0.3165576457977295,
0.02544739469885826,
0.3968520760536194,
-0.23723873496055603,
-0.07675867527723312,
-0.333109050989151,
-0.04205784201622009,
0.189053013920784,
0.31940191984176636,
-0.27621349692344666,
0.19036129117012024,
0.02638712152838707,
-0.08698807656764984,
0.09613463282585144,
0.12457749992609024,
-0.17494513094425201,
-0.16220571100711823,
-0.1824548840522766,
0.04892165586352348,
-0.20946891605854034,
-0.24886898696422577,
0.017326319590210915,
0.02857236936688423,
-0.32677650451660156,
-0.11766641587018967,
-0.20352624356746674,
-0.31282028555870056,
-0.17122745513916016,
-0.01820242777466774,
0.29912063479423523,
0.0711255818605423,
0.09203828871250153,
0.0781213715672493,
0.020223885774612427,
-0.14661261439323425,
-0.059073761105537415,
0.38873666524887085,
0.27231869101524353,
-0.32376348972320557,
0.41876426339149475,
-0.4881792366504669,
-0.22147729992866516,
-0.18164275586605072,
-0.4267033636569977,
-0.17418469488620758,
0.05802727863192558,
0.17707063257694244,
-0.13204234838485718,
-0.3823857307434082,
-0.0866428092122078,
-0.18805168569087982,
0.5858689546585083,
0.3485669195652008,
0.058839838951826096,
-0.13125599920749664,
-0.48826611042022705,
0.31844496726989746,
-0.13471898436546326,
0.09863846749067307,
-0.09339316189289093,
-0.23593232035636902,
0.26172974705696106,
0.0892343521118164,
-0.42441532015800476,
-0.029609188437461853,
-0.33626797795295715,
0.1830461025238037,
-0.2757588326931,
-0.2450210452079773,
0.07764589041471481,
-0.1794697493314743,
0.1739303469657898,
-0.08057224750518799,
-0.1977747082710266,
-0.3154080808162689,
0.21627864241600037,
-0.03305698186159134,
-0.05487929284572601,
0.22949035465717316,
0.16542956233024597,
-0.2836077809333801,
-0.03501654043793678,
-0.08595158904790878,
0.015349078923463821,
0.33613282442092896,
-0.021234450861811638,
-0.33510541915893555,
0.24300391972064972,
0.02792704850435257,
0.0518094077706337,
0.12887294590473175,
0.2707683742046356,
-0.02372651733458042,
-0.31478261947631836,
0.09909243881702423,
0.14989759027957916,
-0.008158844895660877,
0.2481313943862915,
0.006073783617466688,
-0.12194503098726273,
-0.011970628052949905,
0.03393926844000816,
0.05081942677497864,
-0.07631426304578781,
0.3079821765422821,
0.19331897795200348,
-0.19388903677463531,
0.18024952709674835,
-0.21100430190563202,
0.1282922774553299,
0.3846495747566223,
-0.1845061182975769,
-0.015666302293539047,
0.10348906368017197,
0.13079021871089935,
0.16389413177967072,
0.17710109055042267,
0.4707596004009247,
-0.39082059264183044,
0.2497677206993103,
0.2709536552429199,
0.4752834737300873,
-0.2687908113002777,
-0.07561967521905899,
-0.19690969586372375,
0.11333096027374268,
-0.09676031023263931,
0.24698664247989655,
-0.02334166318178177,
0.2567491829395294,
0.2653955817222595,
0.07705105096101761,
0.2029040902853012,
0.32533395290374756,
0.14017583429813385,
-0.20231887698173523,
-0.24855302274227142,
-0.060467228293418884,
0.052396975457668304,
-0.030798599123954773,
0.29224294424057007,
-0.20161284506320953,
-0.13510067760944366,
-0.08329826593399048,
-0.14819972217082977,
-0.36752673983573914,
-0.10424470901489258,
-0.5149908661842346,
-0.09503795206546783,
0.0756794810295105,
-0.1958344280719757,
0.24998556077480316,
-0.048853736370801926,
0.1192331314086914,
-0.1548149436712265,
0.135965496301651,
-0.1947815716266632,
-0.028142409399151802,
0.4976784586906433,
-0.07051149755716324,
0.20366829633712769,
0.17325572669506073,
-0.16539409756660461,
0.34003451466560364,
0.14952047169208527,
-0.2240602821111679,
0.18748492002487183,
0.15231581032276154,
0.3482319712638855,
0.17015080153942108,
-0.048177845776081085,
0.10452928394079208,
0.32288146018981934,
-0.1105479747056961,
-0.48215705156326294,
0.026085352525115013,
0.323083758354187,
-0.3196655511856079,
0.09656225889921188,
0.3401523530483246,
-0.25436142086982727,
0.2918616831302643,
-0.10361073911190033,
0.10132873803377151,
0.23394015431404114,
-0.22485949099063873,
-0.13519681990146637,
-0.28796857595443726,
0.043699122965335846,
-0.04029373079538345,
-0.339199423789978,
-0.2130756676197052,
0.08887305855751038,
-0.18034502863883972,
0.22299553453922272,
-0.02063605934381485,
0.1597927212715149,
-0.2830277681350708,
0.48799219727516174,
0.10738388448953629,
-0.39922916889190674,
-0.2399577647447586,
-0.11744856089353561,
-0.22389812767505646,
0.08588997274637222,
-0.4095769226551056,
0.10358676314353943,
-0.11708934605121613,
0.42024877667427063,
-0.03553232178092003,
-0.29964569211006165,
0.03293641284108162,
-0.027370082214474678,
-0.22739548981189728,
-0.05709421634674072,
-0.3613966405391693,
0.1171831414103508,
-0.10460376739501953,
-0.09942882508039474,
0.346215158700943,
-0.35193175077438354,
0.1787763386964798,
0.15748219192028046,
0.30898338556289673,
0.05534454062581062,
-0.014273484237492085,
0.22325552999973297,
0.31651023030281067,
0.10311953723430634,
-0.1513245701789856,
0.2623482346534729,
-0.07128334790468216,
-0.07401948422193527,
-0.4364609122276306,
-0.01739835925400257,
0.06283124536275864,
-0.2060074806213379,
0.3266618847846985,
0.14939169585704803,
-0.3575519025325775,
0.16341249644756317,
0.07482291013002396,
0.279211163520813,
0.1243400126695633,
0.11189410090446472,
0.13739942014217377,
-0.01830662600696087,
-0.2724636495113373,
0.09121900051832199,
0.25763148069381714,
0.19753143191337585,
-0.05303496867418289,
-0.007622435688972473,
-0.2096731960773468,
-0.23058904707431793,
0.2533175051212311,
0.04633346199989319,
-0.31471413373947144,
-0.09331080317497253,
0.34477514028549194,
0.12127458304166794,
-0.060576602816581726,
0.12886188924312592,
0.13759419322013855,
0.10204910486936569,
0.056567125022411346,
0.16586656868457794,
-0.06969282031059265,
-0.27228763699531555,
-0.28461429476737976,
0.08984459936618805,
0.15614819526672363,
-0.05738864094018936,
-0.19011205434799194,
-0.26040658354759216,
-0.18630923330783844
] |
https://github.com/huggingface/datasets/issues/1785
|
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
@philippnoah I had fixed it with a small hack where I patched `has_sufficient_disk_space` to always return `True`. you can do that with an import without having to modify the `datasets` package
|
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk.
The exact error thrown:
```bash
>>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path")
OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size)
```
[`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk).
This is exactly where the error gets thrown:
https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502
```python
if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root):
raise IOError(
"Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format(
utils.size_str(self.info.size_in_bytes or 0),
utils.size_str(self.info.download_size or 0),
utils.size_str(self.info.dataset_size or 0),
utils.size_str(self.info.post_processing_size or 0),
)
)
```
What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal.
Would it be possible to pass a flag to skip this check on disk space?
| 31 |
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
[
-0.12654204666614532,
-0.35599076747894287,
-0.26534906029701233,
0.15758740901947021,
-0.1311347931623459,
-0.030707145109772682,
0.01788279600441456,
0.35523363947868347,
0.31602007150650024,
0.2585310637950897,
0.23294863104820251,
-0.3240179419517517,
0.005862023215740919,
-0.058646123856306076,
-0.19410088658332825,
0.049837756901979446,
0.04307176172733307,
-0.007178966421633959,
0.19750992953777313,
-0.018543360754847527,
-0.15881730616092682,
0.25784531235694885,
0.15040811896324158,
-0.37443190813064575,
-0.5397385358810425,
-0.16453817486763,
-0.07185493409633636,
0.018736092373728752,
-0.09389401227235794,
-0.06115800514817238,
0.08368885517120361,
-0.13627612590789795,
-0.014364988543093204,
0.23875761032104492,
-0.00010101171938003972,
-0.015923073515295982,
0.22781693935394287,
-0.16442656517028809,
-0.3490571975708008,
0.33194226026535034,
-0.02634921297430992,
-0.2754877805709839,
-0.31618016958236694,
-0.25217747688293457,
-0.03326544910669327,
0.1061694547533989,
-0.02934851683676243,
-0.320567786693573,
0.08458069711923599,
0.05622347816824913,
0.366388738155365,
0.0026877690106630325,
-0.05135605111718178,
-0.24344952404499054,
-0.005541323218494654,
-0.07936234772205353,
-0.060791101306676865,
0.164076566696167,
0.24489834904670715,
0.06246718764305115,
-0.33787453174591064,
0.3750694692134857,
0.13351936638355255,
0.19156162440776825,
0.21499541401863098,
-0.25951141119003296,
-0.1552632600069046,
-0.03041495382785797,
0.4357472062110901,
-0.2103603482246399,
0.4954563081264496,
-0.02919001132249832,
-0.19213610887527466,
-0.09058992564678192,
-0.13041560351848602,
-0.03665317967534065,
0.11180254817008972,
-0.04972505569458008,
-0.060980673879384995,
-0.158950075507164,
-0.21148362755775452,
-0.18568667769432068,
0.03450861945748329,
-0.26215365529060364,
-0.1223076656460762,
0.2248932123184204,
-0.07578428089618683,
0.048606280237436295,
0.10399021208286285,
0.0008553280495107174,
-0.02739064022898674,
0.13868173956871033,
-0.0023215950932353735,
0.11681398004293442,
-0.30246078968048096,
-0.12610994279384613,
0.12344911694526672,
0.37501710653305054,
0.15507008135318756,
0.10394849628210068,
-0.10367020219564438,
-0.0728321373462677,
0.37833720445632935,
-0.06969892978668213,
-0.14936120808124542,
0.49469316005706787,
-0.13250099122524261,
-0.27682188153266907,
0.13496416807174683,
-0.13522040843963623,
0.10412044078111649,
-0.14280806481838226,
-0.04120257869362831,
-0.3644923269748688,
0.18462692201137543,
0.051650937646627426,
-0.18477503955364227,
-0.015203732065856457,
-0.006140097510069609,
0.14668084681034088,
0.31046462059020996,
0.21907635033130646,
0.054536689072847366,
0.1899568885564804,
0.04677022248506546,
0.1412746161222458,
-0.05682375654578209,
0.21036821603775024,
-0.11823229491710663,
-0.12398479133844376,
-0.3252653479576111,
-0.043501850217580795,
-0.15660671889781952,
-0.07066459953784943,
0.38624924421310425,
0.31322726607322693,
0.1964380443096161,
-0.14485014975070953,
0.0005849552107974887,
-0.1270820051431656,
0.06382039189338684,
-0.26879215240478516,
-0.08708782494068146,
0.33734866976737976,
0.024654250591993332,
0.023845579475164413,
0.05113307386636734,
0.2791283130645752,
-0.09298455715179443,
-0.08994768559932709,
-0.3283596932888031,
-0.24632233381271362,
-0.08554399013519287,
0.28660354018211365,
-0.04825075343251228,
0.19351281225681305,
-0.18220949172973633,
-0.15610480308532715,
0.2680472135543823,
-0.14518001675605774,
-0.1260327845811844,
0.07998389005661011,
-0.18595650792121887,
-0.08831920474767685,
0.04757864400744438,
0.1607736349105835,
-0.11858801543712616,
0.26205742359161377,
-0.017097951844334602,
0.23618684709072113,
-0.0323791578412056,
0.4071325361728668,
0.0642411857843399,
0.10789266973733902,
-0.18443313241004944,
0.17359627783298492,
-0.010045869275927544,
-0.28300124406814575,
-0.6087395548820496,
0.17332910001277924,
-0.1521744430065155,
-0.25749215483665466,
0.3652694523334503,
0.16177739202976227,
0.03761134296655655,
0.05762369558215141,
0.3129569888114929,
0.02801593393087387,
-0.09131227433681488,
0.04152456670999527,
-0.3599383234977722,
-0.23382145166397095,
-0.20483970642089844,
-0.1284557282924652,
0.3979613780975342,
0.07331102341413498,
0.15557007491588593,
0.21105654537677765,
-0.08132336288690567,
0.021002940833568573,
0.3906095027923584,
0.3276498019695282,
0.1667734980583191,
-0.504851222038269,
0.10526759177446365,
0.018909920006990433,
-0.45837485790252686,
0.23543450236320496,
-0.2606964111328125,
-0.18317709863185883,
0.08458622545003891,
-0.18001233041286469,
-0.4344784915447235,
-0.15267571806907654,
0.317490816116333,
0.24877972900867462,
0.32806459069252014,
-0.009404757991433144,
0.31344449520111084,
-0.21473661065101624,
0.17757031321525574,
0.07193765044212341,
-0.07584845274686813,
-0.23982086777687073,
0.04718093201518059,
-0.05041177198290825,
-0.27226635813713074,
-0.12225913256406784,
0.16854269802570343,
0.07803008705377579,
0.09366834163665771,
-0.04086533561348915,
-0.057157594710588455,
0.24389314651489258,
-0.12703771889209747,
0.18330824375152588,
0.15699416399002075,
0.041893355548381805,
-0.00007821522740414366,
0.2725220024585724,
0.2653651237487793,
-0.09638060629367828,
0.0184043999761343,
-0.07008329778909683,
-0.13909895718097687,
-0.0834134891629219,
0.2200082391500473,
-0.040780194103717804,
-0.039177268743515015,
-0.1821240931749344,
0.10912027955055237,
-0.03116540051996708,
0.24188552796840668,
-0.1491742879152298,
0.024149851873517036,
-0.2494334727525711,
0.14882320165634155,
0.07035885006189346,
0.22530357539653778,
0.0275009386241436,
0.03638852760195732,
0.16256730258464813,
0.42664748430252075,
0.14071416854858398,
0.09929627180099487,
-0.340778112411499,
0.15394729375839233,
0.2863163948059082,
0.2539424002170563,
0.1982148140668869,
0.15154775977134705,
-0.3191637098789215,
0.19943365454673767,
-0.1711486577987671,
0.015613442286849022,
-0.227308452129364,
0.0933060497045517,
0.2801923155784607,
0.16650334000587463,
-0.3057169020175934,
0.0975024625658989,
-0.12285163253545761,
0.21636509895324707,
0.1654449850320816,
-0.03335888683795929,
-0.12919074296951294,
0.057165421545505524,
-0.0014705316862091422,
0.31533414125442505,
0.38483771681785583,
-0.10039164125919342,
-0.17042972147464752,
0.1907198578119278,
0.30951938033103943,
-0.17212700843811035,
-0.10145877301692963,
-0.29002007842063904,
0.22784638404846191,
0.21131674945354462,
0.06695161014795303,
0.01344241201877594,
-0.2498278021812439,
-0.09174242615699768,
0.22652044892311096,
-0.03900560736656189,
-0.25770050287246704,
0.13082356750965118,
-0.07658746093511581,
0.23879440128803253,
-0.30493491888046265,
0.06438864767551422,
-0.02450384385883808,
0.19267630577087402,
-0.26333141326904297,
-0.1315719485282898,
0.34520819783210754,
-0.28396445512771606,
-0.11369019746780396,
0.053775038570165634,
-0.08626056462526321,
-0.10522012412548065,
0.007592205423861742,
-0.026054179295897484,
-0.1052841991186142,
-0.3827355206012726,
-0.035946328192949295,
-0.15138843655586243,
-0.2951993942260742,
0.029088854789733887,
0.04029617831110954,
0.03441787511110306,
0.08076266199350357,
0.13846108317375183,
-0.1673349291086197,
0.4449288547039032,
-0.168426975607872,
-0.40560832619667053,
-0.3609660863876343,
0.30229273438453674,
-0.09049095958471298,
-0.038556359708309174,
0.14067405462265015,
-0.15056338906288147,
0.37225520610809326,
0.27704593539237976,
-0.3239486515522003,
-0.27270641922950745,
-0.03872857615351677,
0.03775275871157646,
0.006609355565160513,
-0.1439526528120041,
0.35083523392677307,
-0.1443455070257187,
-0.28767481446266174,
-0.16842269897460938,
-0.06817393004894257,
0.17393426597118378,
0.05533478036522865,
0.3123142421245575,
-0.2826591730117798,
0.09156110137701035,
0.16994920372962952,
0.5833101272583008,
-0.2296687364578247,
0.12476025521755219,
0.267363041639328,
0.11723943799734116,
0.3753748834133148,
-0.14678499102592468,
0.19346868991851807,
0.3161420524120331,
-0.05446825549006462,
-0.30568504333496094,
0.18508382141590118,
0.049645185470581055,
-0.32425934076309204,
0.06926051527261734,
-0.1892695426940918,
0.03257153183221817,
-0.06629142165184021,
0.17825382947921753,
-0.18658636510372162,
0.17478282749652863,
0.10178802162408829,
-0.02401498332619667,
-0.41179877519607544,
-0.07302878051996231,
0.023615658283233643,
-0.2392396628856659,
0.10120683908462524,
0.20620867609977722,
-0.2746428847312927,
-0.029955340549349785,
-0.38844987750053406,
0.27703747153282166,
0.0009546803194098175,
0.05564066022634506,
-0.12293527275323868,
0.08101994544267654,
0.0011522877030074596,
0.024279760196805,
0.5192065238952637,
-0.053051549941301346,
0.34586769342422485,
0.018449174240231514,
0.18774725496768951,
-0.2190994918346405,
0.020042622461915016,
0.18437127768993378,
0.22935941815376282,
-0.11262182146310806,
0.4767383337020874,
-0.17941516637802124,
0.20498894155025482,
-0.3168284595012665,
0.2430119514465332,
-0.2533191442489624,
0.007119268178939819,
-0.20490597188472748,
-0.15772731602191925,
-0.11538967490196228,
0.23285262286663055,
0.35165783762931824,
0.15228360891342163,
0.11837054789066315,
0.16166546940803528,
-0.07733585685491562,
-0.14126691222190857,
-0.06764975190162659,
0.10514756292104721,
0.5499595999717712,
0.07212278991937637,
-0.11501455307006836,
0.04762136936187744,
0.18902316689491272,
0.2344384342432022,
0.04422701522707939,
0.0531034953892231,
0.5074989199638367,
0.5343474745750427,
0.042826347053050995,
0.02858722023665905,
0.23113438487052917,
-0.008833589032292366,
-0.2087790071964264,
0.2965930700302124,
0.2922419607639313,
-0.387544721364975,
0.12309706211090088,
-0.3351479768753052,
0.03889341279864311,
-0.10126391798257828,
0.16867230832576752,
0.3088743984699249,
0.021209174767136574,
0.09155010432004929,
-0.03474435210227966,
0.32121139764785767,
-0.24863308668136597,
0.18625174462795258,
0.018312109634280205,
0.578572690486908,
0.03359421342611313,
-0.011580707505345345,
-0.12317869067192078,
0.1587020754814148,
0.0061728437431156635,
-0.527442216873169,
0.25977542996406555,
0.029628541320562363,
-0.205190047621727,
0.17087185382843018,
0.0587884746491909,
-0.1509430706501007,
0.2433498650789261,
-0.12949201464653015,
0.267156720161438,
-0.2595597505569458,
0.15579918026924133,
-0.22690922021865845,
0.2772948443889618,
-0.24389870464801788,
-0.13104896247386932,
0.22021079063415527,
0.3334267735481262,
-0.11766349524259567,
0.3042723536491394,
-0.3370950222015381,
0.16180671751499176,
-0.04592888057231903,
0.005840086843818426,
-0.046410467475652695,
-0.3165576457977295,
0.02544739469885826,
0.3968520760536194,
-0.23723873496055603,
-0.07675867527723312,
-0.333109050989151,
-0.04205784201622009,
0.189053013920784,
0.31940191984176636,
-0.27621349692344666,
0.19036129117012024,
0.02638712152838707,
-0.08698807656764984,
0.09613463282585144,
0.12457749992609024,
-0.17494513094425201,
-0.16220571100711823,
-0.1824548840522766,
0.04892165586352348,
-0.20946891605854034,
-0.24886898696422577,
0.017326319590210915,
0.02857236936688423,
-0.32677650451660156,
-0.11766641587018967,
-0.20352624356746674,
-0.31282028555870056,
-0.17122745513916016,
-0.01820242777466774,
0.29912063479423523,
0.0711255818605423,
0.09203828871250153,
0.0781213715672493,
0.020223885774612427,
-0.14661261439323425,
-0.059073761105537415,
0.38873666524887085,
0.27231869101524353,
-0.32376348972320557,
0.41876426339149475,
-0.4881792366504669,
-0.22147729992866516,
-0.18164275586605072,
-0.4267033636569977,
-0.17418469488620758,
0.05802727863192558,
0.17707063257694244,
-0.13204234838485718,
-0.3823857307434082,
-0.0866428092122078,
-0.18805168569087982,
0.5858689546585083,
0.3485669195652008,
0.058839838951826096,
-0.13125599920749664,
-0.48826611042022705,
0.31844496726989746,
-0.13471898436546326,
0.09863846749067307,
-0.09339316189289093,
-0.23593232035636902,
0.26172974705696106,
0.0892343521118164,
-0.42441532015800476,
-0.029609188437461853,
-0.33626797795295715,
0.1830461025238037,
-0.2757588326931,
-0.2450210452079773,
0.07764589041471481,
-0.1794697493314743,
0.1739303469657898,
-0.08057224750518799,
-0.1977747082710266,
-0.3154080808162689,
0.21627864241600037,
-0.03305698186159134,
-0.05487929284572601,
0.22949035465717316,
0.16542956233024597,
-0.2836077809333801,
-0.03501654043793678,
-0.08595158904790878,
0.015349078923463821,
0.33613282442092896,
-0.021234450861811638,
-0.33510541915893555,
0.24300391972064972,
0.02792704850435257,
0.0518094077706337,
0.12887294590473175,
0.2707683742046356,
-0.02372651733458042,
-0.31478261947631836,
0.09909243881702423,
0.14989759027957916,
-0.008158844895660877,
0.2481313943862915,
0.006073783617466688,
-0.12194503098726273,
-0.011970628052949905,
0.03393926844000816,
0.05081942677497864,
-0.07631426304578781,
0.3079821765422821,
0.19331897795200348,
-0.19388903677463531,
0.18024952709674835,
-0.21100430190563202,
0.1282922774553299,
0.3846495747566223,
-0.1845061182975769,
-0.015666302293539047,
0.10348906368017197,
0.13079021871089935,
0.16389413177967072,
0.17710109055042267,
0.4707596004009247,
-0.39082059264183044,
0.2497677206993103,
0.2709536552429199,
0.4752834737300873,
-0.2687908113002777,
-0.07561967521905899,
-0.19690969586372375,
0.11333096027374268,
-0.09676031023263931,
0.24698664247989655,
-0.02334166318178177,
0.2567491829395294,
0.2653955817222595,
0.07705105096101761,
0.2029040902853012,
0.32533395290374756,
0.14017583429813385,
-0.20231887698173523,
-0.24855302274227142,
-0.060467228293418884,
0.052396975457668304,
-0.030798599123954773,
0.29224294424057007,
-0.20161284506320953,
-0.13510067760944366,
-0.08329826593399048,
-0.14819972217082977,
-0.36752673983573914,
-0.10424470901489258,
-0.5149908661842346,
-0.09503795206546783,
0.0756794810295105,
-0.1958344280719757,
0.24998556077480316,
-0.048853736370801926,
0.1192331314086914,
-0.1548149436712265,
0.135965496301651,
-0.1947815716266632,
-0.028142409399151802,
0.4976784586906433,
-0.07051149755716324,
0.20366829633712769,
0.17325572669506073,
-0.16539409756660461,
0.34003451466560364,
0.14952047169208527,
-0.2240602821111679,
0.18748492002487183,
0.15231581032276154,
0.3482319712638855,
0.17015080153942108,
-0.048177845776081085,
0.10452928394079208,
0.32288146018981934,
-0.1105479747056961,
-0.48215705156326294,
0.026085352525115013,
0.323083758354187,
-0.3196655511856079,
0.09656225889921188,
0.3401523530483246,
-0.25436142086982727,
0.2918616831302643,
-0.10361073911190033,
0.10132873803377151,
0.23394015431404114,
-0.22485949099063873,
-0.13519681990146637,
-0.28796857595443726,
0.043699122965335846,
-0.04029373079538345,
-0.339199423789978,
-0.2130756676197052,
0.08887305855751038,
-0.18034502863883972,
0.22299553453922272,
-0.02063605934381485,
0.1597927212715149,
-0.2830277681350708,
0.48799219727516174,
0.10738388448953629,
-0.39922916889190674,
-0.2399577647447586,
-0.11744856089353561,
-0.22389812767505646,
0.08588997274637222,
-0.4095769226551056,
0.10358676314353943,
-0.11708934605121613,
0.42024877667427063,
-0.03553232178092003,
-0.29964569211006165,
0.03293641284108162,
-0.027370082214474678,
-0.22739548981189728,
-0.05709421634674072,
-0.3613966405391693,
0.1171831414103508,
-0.10460376739501953,
-0.09942882508039474,
0.346215158700943,
-0.35193175077438354,
0.1787763386964798,
0.15748219192028046,
0.30898338556289673,
0.05534454062581062,
-0.014273484237492085,
0.22325552999973297,
0.31651023030281067,
0.10311953723430634,
-0.1513245701789856,
0.2623482346534729,
-0.07128334790468216,
-0.07401948422193527,
-0.4364609122276306,
-0.01739835925400257,
0.06283124536275864,
-0.2060074806213379,
0.3266618847846985,
0.14939169585704803,
-0.3575519025325775,
0.16341249644756317,
0.07482291013002396,
0.279211163520813,
0.1243400126695633,
0.11189410090446472,
0.13739942014217377,
-0.01830662600696087,
-0.2724636495113373,
0.09121900051832199,
0.25763148069381714,
0.19753143191337585,
-0.05303496867418289,
-0.007622435688972473,
-0.2096731960773468,
-0.23058904707431793,
0.2533175051212311,
0.04633346199989319,
-0.31471413373947144,
-0.09331080317497253,
0.34477514028549194,
0.12127458304166794,
-0.060576602816581726,
0.12886188924312592,
0.13759419322013855,
0.10204910486936569,
0.056567125022411346,
0.16586656868457794,
-0.06969282031059265,
-0.27228763699531555,
-0.28461429476737976,
0.08984459936618805,
0.15614819526672363,
-0.05738864094018936,
-0.19011205434799194,
-0.26040658354759216,
-0.18630923330783844
] |
https://github.com/huggingface/datasets/issues/1785
|
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
@olinguyen Thanks for the suggestion, it works but I had to to edit builder.py in the installed package. Can you please explain how were you able to do this using import?
|
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk.
The exact error thrown:
```bash
>>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path")
OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size)
```
[`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk).
This is exactly where the error gets thrown:
https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502
```python
if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root):
raise IOError(
"Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format(
utils.size_str(self.info.size_in_bytes or 0),
utils.size_str(self.info.download_size or 0),
utils.size_str(self.info.dataset_size or 0),
utils.size_str(self.info.post_processing_size or 0),
)
)
```
What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal.
Would it be possible to pass a flag to skip this check on disk space?
| 31 |
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
[
-0.12654204666614532,
-0.35599076747894287,
-0.26534906029701233,
0.15758740901947021,
-0.1311347931623459,
-0.030707145109772682,
0.01788279600441456,
0.35523363947868347,
0.31602007150650024,
0.2585310637950897,
0.23294863104820251,
-0.3240179419517517,
0.005862023215740919,
-0.058646123856306076,
-0.19410088658332825,
0.049837756901979446,
0.04307176172733307,
-0.007178966421633959,
0.19750992953777313,
-0.018543360754847527,
-0.15881730616092682,
0.25784531235694885,
0.15040811896324158,
-0.37443190813064575,
-0.5397385358810425,
-0.16453817486763,
-0.07185493409633636,
0.018736092373728752,
-0.09389401227235794,
-0.06115800514817238,
0.08368885517120361,
-0.13627612590789795,
-0.014364988543093204,
0.23875761032104492,
-0.00010101171938003972,
-0.015923073515295982,
0.22781693935394287,
-0.16442656517028809,
-0.3490571975708008,
0.33194226026535034,
-0.02634921297430992,
-0.2754877805709839,
-0.31618016958236694,
-0.25217747688293457,
-0.03326544910669327,
0.1061694547533989,
-0.02934851683676243,
-0.320567786693573,
0.08458069711923599,
0.05622347816824913,
0.366388738155365,
0.0026877690106630325,
-0.05135605111718178,
-0.24344952404499054,
-0.005541323218494654,
-0.07936234772205353,
-0.060791101306676865,
0.164076566696167,
0.24489834904670715,
0.06246718764305115,
-0.33787453174591064,
0.3750694692134857,
0.13351936638355255,
0.19156162440776825,
0.21499541401863098,
-0.25951141119003296,
-0.1552632600069046,
-0.03041495382785797,
0.4357472062110901,
-0.2103603482246399,
0.4954563081264496,
-0.02919001132249832,
-0.19213610887527466,
-0.09058992564678192,
-0.13041560351848602,
-0.03665317967534065,
0.11180254817008972,
-0.04972505569458008,
-0.060980673879384995,
-0.158950075507164,
-0.21148362755775452,
-0.18568667769432068,
0.03450861945748329,
-0.26215365529060364,
-0.1223076656460762,
0.2248932123184204,
-0.07578428089618683,
0.048606280237436295,
0.10399021208286285,
0.0008553280495107174,
-0.02739064022898674,
0.13868173956871033,
-0.0023215950932353735,
0.11681398004293442,
-0.30246078968048096,
-0.12610994279384613,
0.12344911694526672,
0.37501710653305054,
0.15507008135318756,
0.10394849628210068,
-0.10367020219564438,
-0.0728321373462677,
0.37833720445632935,
-0.06969892978668213,
-0.14936120808124542,
0.49469316005706787,
-0.13250099122524261,
-0.27682188153266907,
0.13496416807174683,
-0.13522040843963623,
0.10412044078111649,
-0.14280806481838226,
-0.04120257869362831,
-0.3644923269748688,
0.18462692201137543,
0.051650937646627426,
-0.18477503955364227,
-0.015203732065856457,
-0.006140097510069609,
0.14668084681034088,
0.31046462059020996,
0.21907635033130646,
0.054536689072847366,
0.1899568885564804,
0.04677022248506546,
0.1412746161222458,
-0.05682375654578209,
0.21036821603775024,
-0.11823229491710663,
-0.12398479133844376,
-0.3252653479576111,
-0.043501850217580795,
-0.15660671889781952,
-0.07066459953784943,
0.38624924421310425,
0.31322726607322693,
0.1964380443096161,
-0.14485014975070953,
0.0005849552107974887,
-0.1270820051431656,
0.06382039189338684,
-0.26879215240478516,
-0.08708782494068146,
0.33734866976737976,
0.024654250591993332,
0.023845579475164413,
0.05113307386636734,
0.2791283130645752,
-0.09298455715179443,
-0.08994768559932709,
-0.3283596932888031,
-0.24632233381271362,
-0.08554399013519287,
0.28660354018211365,
-0.04825075343251228,
0.19351281225681305,
-0.18220949172973633,
-0.15610480308532715,
0.2680472135543823,
-0.14518001675605774,
-0.1260327845811844,
0.07998389005661011,
-0.18595650792121887,
-0.08831920474767685,
0.04757864400744438,
0.1607736349105835,
-0.11858801543712616,
0.26205742359161377,
-0.017097951844334602,
0.23618684709072113,
-0.0323791578412056,
0.4071325361728668,
0.0642411857843399,
0.10789266973733902,
-0.18443313241004944,
0.17359627783298492,
-0.010045869275927544,
-0.28300124406814575,
-0.6087395548820496,
0.17332910001277924,
-0.1521744430065155,
-0.25749215483665466,
0.3652694523334503,
0.16177739202976227,
0.03761134296655655,
0.05762369558215141,
0.3129569888114929,
0.02801593393087387,
-0.09131227433681488,
0.04152456670999527,
-0.3599383234977722,
-0.23382145166397095,
-0.20483970642089844,
-0.1284557282924652,
0.3979613780975342,
0.07331102341413498,
0.15557007491588593,
0.21105654537677765,
-0.08132336288690567,
0.021002940833568573,
0.3906095027923584,
0.3276498019695282,
0.1667734980583191,
-0.504851222038269,
0.10526759177446365,
0.018909920006990433,
-0.45837485790252686,
0.23543450236320496,
-0.2606964111328125,
-0.18317709863185883,
0.08458622545003891,
-0.18001233041286469,
-0.4344784915447235,
-0.15267571806907654,
0.317490816116333,
0.24877972900867462,
0.32806459069252014,
-0.009404757991433144,
0.31344449520111084,
-0.21473661065101624,
0.17757031321525574,
0.07193765044212341,
-0.07584845274686813,
-0.23982086777687073,
0.04718093201518059,
-0.05041177198290825,
-0.27226635813713074,
-0.12225913256406784,
0.16854269802570343,
0.07803008705377579,
0.09366834163665771,
-0.04086533561348915,
-0.057157594710588455,
0.24389314651489258,
-0.12703771889209747,
0.18330824375152588,
0.15699416399002075,
0.041893355548381805,
-0.00007821522740414366,
0.2725220024585724,
0.2653651237487793,
-0.09638060629367828,
0.0184043999761343,
-0.07008329778909683,
-0.13909895718097687,
-0.0834134891629219,
0.2200082391500473,
-0.040780194103717804,
-0.039177268743515015,
-0.1821240931749344,
0.10912027955055237,
-0.03116540051996708,
0.24188552796840668,
-0.1491742879152298,
0.024149851873517036,
-0.2494334727525711,
0.14882320165634155,
0.07035885006189346,
0.22530357539653778,
0.0275009386241436,
0.03638852760195732,
0.16256730258464813,
0.42664748430252075,
0.14071416854858398,
0.09929627180099487,
-0.340778112411499,
0.15394729375839233,
0.2863163948059082,
0.2539424002170563,
0.1982148140668869,
0.15154775977134705,
-0.3191637098789215,
0.19943365454673767,
-0.1711486577987671,
0.015613442286849022,
-0.227308452129364,
0.0933060497045517,
0.2801923155784607,
0.16650334000587463,
-0.3057169020175934,
0.0975024625658989,
-0.12285163253545761,
0.21636509895324707,
0.1654449850320816,
-0.03335888683795929,
-0.12919074296951294,
0.057165421545505524,
-0.0014705316862091422,
0.31533414125442505,
0.38483771681785583,
-0.10039164125919342,
-0.17042972147464752,
0.1907198578119278,
0.30951938033103943,
-0.17212700843811035,
-0.10145877301692963,
-0.29002007842063904,
0.22784638404846191,
0.21131674945354462,
0.06695161014795303,
0.01344241201877594,
-0.2498278021812439,
-0.09174242615699768,
0.22652044892311096,
-0.03900560736656189,
-0.25770050287246704,
0.13082356750965118,
-0.07658746093511581,
0.23879440128803253,
-0.30493491888046265,
0.06438864767551422,
-0.02450384385883808,
0.19267630577087402,
-0.26333141326904297,
-0.1315719485282898,
0.34520819783210754,
-0.28396445512771606,
-0.11369019746780396,
0.053775038570165634,
-0.08626056462526321,
-0.10522012412548065,
0.007592205423861742,
-0.026054179295897484,
-0.1052841991186142,
-0.3827355206012726,
-0.035946328192949295,
-0.15138843655586243,
-0.2951993942260742,
0.029088854789733887,
0.04029617831110954,
0.03441787511110306,
0.08076266199350357,
0.13846108317375183,
-0.1673349291086197,
0.4449288547039032,
-0.168426975607872,
-0.40560832619667053,
-0.3609660863876343,
0.30229273438453674,
-0.09049095958471298,
-0.038556359708309174,
0.14067405462265015,
-0.15056338906288147,
0.37225520610809326,
0.27704593539237976,
-0.3239486515522003,
-0.27270641922950745,
-0.03872857615351677,
0.03775275871157646,
0.006609355565160513,
-0.1439526528120041,
0.35083523392677307,
-0.1443455070257187,
-0.28767481446266174,
-0.16842269897460938,
-0.06817393004894257,
0.17393426597118378,
0.05533478036522865,
0.3123142421245575,
-0.2826591730117798,
0.09156110137701035,
0.16994920372962952,
0.5833101272583008,
-0.2296687364578247,
0.12476025521755219,
0.267363041639328,
0.11723943799734116,
0.3753748834133148,
-0.14678499102592468,
0.19346868991851807,
0.3161420524120331,
-0.05446825549006462,
-0.30568504333496094,
0.18508382141590118,
0.049645185470581055,
-0.32425934076309204,
0.06926051527261734,
-0.1892695426940918,
0.03257153183221817,
-0.06629142165184021,
0.17825382947921753,
-0.18658636510372162,
0.17478282749652863,
0.10178802162408829,
-0.02401498332619667,
-0.41179877519607544,
-0.07302878051996231,
0.023615658283233643,
-0.2392396628856659,
0.10120683908462524,
0.20620867609977722,
-0.2746428847312927,
-0.029955340549349785,
-0.38844987750053406,
0.27703747153282166,
0.0009546803194098175,
0.05564066022634506,
-0.12293527275323868,
0.08101994544267654,
0.0011522877030074596,
0.024279760196805,
0.5192065238952637,
-0.053051549941301346,
0.34586769342422485,
0.018449174240231514,
0.18774725496768951,
-0.2190994918346405,
0.020042622461915016,
0.18437127768993378,
0.22935941815376282,
-0.11262182146310806,
0.4767383337020874,
-0.17941516637802124,
0.20498894155025482,
-0.3168284595012665,
0.2430119514465332,
-0.2533191442489624,
0.007119268178939819,
-0.20490597188472748,
-0.15772731602191925,
-0.11538967490196228,
0.23285262286663055,
0.35165783762931824,
0.15228360891342163,
0.11837054789066315,
0.16166546940803528,
-0.07733585685491562,
-0.14126691222190857,
-0.06764975190162659,
0.10514756292104721,
0.5499595999717712,
0.07212278991937637,
-0.11501455307006836,
0.04762136936187744,
0.18902316689491272,
0.2344384342432022,
0.04422701522707939,
0.0531034953892231,
0.5074989199638367,
0.5343474745750427,
0.042826347053050995,
0.02858722023665905,
0.23113438487052917,
-0.008833589032292366,
-0.2087790071964264,
0.2965930700302124,
0.2922419607639313,
-0.387544721364975,
0.12309706211090088,
-0.3351479768753052,
0.03889341279864311,
-0.10126391798257828,
0.16867230832576752,
0.3088743984699249,
0.021209174767136574,
0.09155010432004929,
-0.03474435210227966,
0.32121139764785767,
-0.24863308668136597,
0.18625174462795258,
0.018312109634280205,
0.578572690486908,
0.03359421342611313,
-0.011580707505345345,
-0.12317869067192078,
0.1587020754814148,
0.0061728437431156635,
-0.527442216873169,
0.25977542996406555,
0.029628541320562363,
-0.205190047621727,
0.17087185382843018,
0.0587884746491909,
-0.1509430706501007,
0.2433498650789261,
-0.12949201464653015,
0.267156720161438,
-0.2595597505569458,
0.15579918026924133,
-0.22690922021865845,
0.2772948443889618,
-0.24389870464801788,
-0.13104896247386932,
0.22021079063415527,
0.3334267735481262,
-0.11766349524259567,
0.3042723536491394,
-0.3370950222015381,
0.16180671751499176,
-0.04592888057231903,
0.005840086843818426,
-0.046410467475652695,
-0.3165576457977295,
0.02544739469885826,
0.3968520760536194,
-0.23723873496055603,
-0.07675867527723312,
-0.333109050989151,
-0.04205784201622009,
0.189053013920784,
0.31940191984176636,
-0.27621349692344666,
0.19036129117012024,
0.02638712152838707,
-0.08698807656764984,
0.09613463282585144,
0.12457749992609024,
-0.17494513094425201,
-0.16220571100711823,
-0.1824548840522766,
0.04892165586352348,
-0.20946891605854034,
-0.24886898696422577,
0.017326319590210915,
0.02857236936688423,
-0.32677650451660156,
-0.11766641587018967,
-0.20352624356746674,
-0.31282028555870056,
-0.17122745513916016,
-0.01820242777466774,
0.29912063479423523,
0.0711255818605423,
0.09203828871250153,
0.0781213715672493,
0.020223885774612427,
-0.14661261439323425,
-0.059073761105537415,
0.38873666524887085,
0.27231869101524353,
-0.32376348972320557,
0.41876426339149475,
-0.4881792366504669,
-0.22147729992866516,
-0.18164275586605072,
-0.4267033636569977,
-0.17418469488620758,
0.05802727863192558,
0.17707063257694244,
-0.13204234838485718,
-0.3823857307434082,
-0.0866428092122078,
-0.18805168569087982,
0.5858689546585083,
0.3485669195652008,
0.058839838951826096,
-0.13125599920749664,
-0.48826611042022705,
0.31844496726989746,
-0.13471898436546326,
0.09863846749067307,
-0.09339316189289093,
-0.23593232035636902,
0.26172974705696106,
0.0892343521118164,
-0.42441532015800476,
-0.029609188437461853,
-0.33626797795295715,
0.1830461025238037,
-0.2757588326931,
-0.2450210452079773,
0.07764589041471481,
-0.1794697493314743,
0.1739303469657898,
-0.08057224750518799,
-0.1977747082710266,
-0.3154080808162689,
0.21627864241600037,
-0.03305698186159134,
-0.05487929284572601,
0.22949035465717316,
0.16542956233024597,
-0.2836077809333801,
-0.03501654043793678,
-0.08595158904790878,
0.015349078923463821,
0.33613282442092896,
-0.021234450861811638,
-0.33510541915893555,
0.24300391972064972,
0.02792704850435257,
0.0518094077706337,
0.12887294590473175,
0.2707683742046356,
-0.02372651733458042,
-0.31478261947631836,
0.09909243881702423,
0.14989759027957916,
-0.008158844895660877,
0.2481313943862915,
0.006073783617466688,
-0.12194503098726273,
-0.011970628052949905,
0.03393926844000816,
0.05081942677497864,
-0.07631426304578781,
0.3079821765422821,
0.19331897795200348,
-0.19388903677463531,
0.18024952709674835,
-0.21100430190563202,
0.1282922774553299,
0.3846495747566223,
-0.1845061182975769,
-0.015666302293539047,
0.10348906368017197,
0.13079021871089935,
0.16389413177967072,
0.17710109055042267,
0.4707596004009247,
-0.39082059264183044,
0.2497677206993103,
0.2709536552429199,
0.4752834737300873,
-0.2687908113002777,
-0.07561967521905899,
-0.19690969586372375,
0.11333096027374268,
-0.09676031023263931,
0.24698664247989655,
-0.02334166318178177,
0.2567491829395294,
0.2653955817222595,
0.07705105096101761,
0.2029040902853012,
0.32533395290374756,
0.14017583429813385,
-0.20231887698173523,
-0.24855302274227142,
-0.060467228293418884,
0.052396975457668304,
-0.030798599123954773,
0.29224294424057007,
-0.20161284506320953,
-0.13510067760944366,
-0.08329826593399048,
-0.14819972217082977,
-0.36752673983573914,
-0.10424470901489258,
-0.5149908661842346,
-0.09503795206546783,
0.0756794810295105,
-0.1958344280719757,
0.24998556077480316,
-0.048853736370801926,
0.1192331314086914,
-0.1548149436712265,
0.135965496301651,
-0.1947815716266632,
-0.028142409399151802,
0.4976784586906433,
-0.07051149755716324,
0.20366829633712769,
0.17325572669506073,
-0.16539409756660461,
0.34003451466560364,
0.14952047169208527,
-0.2240602821111679,
0.18748492002487183,
0.15231581032276154,
0.3482319712638855,
0.17015080153942108,
-0.048177845776081085,
0.10452928394079208,
0.32288146018981934,
-0.1105479747056961,
-0.48215705156326294,
0.026085352525115013,
0.323083758354187,
-0.3196655511856079,
0.09656225889921188,
0.3401523530483246,
-0.25436142086982727,
0.2918616831302643,
-0.10361073911190033,
0.10132873803377151,
0.23394015431404114,
-0.22485949099063873,
-0.13519681990146637,
-0.28796857595443726,
0.043699122965335846,
-0.04029373079538345,
-0.339199423789978,
-0.2130756676197052,
0.08887305855751038,
-0.18034502863883972,
0.22299553453922272,
-0.02063605934381485,
0.1597927212715149,
-0.2830277681350708,
0.48799219727516174,
0.10738388448953629,
-0.39922916889190674,
-0.2399577647447586,
-0.11744856089353561,
-0.22389812767505646,
0.08588997274637222,
-0.4095769226551056,
0.10358676314353943,
-0.11708934605121613,
0.42024877667427063,
-0.03553232178092003,
-0.29964569211006165,
0.03293641284108162,
-0.027370082214474678,
-0.22739548981189728,
-0.05709421634674072,
-0.3613966405391693,
0.1171831414103508,
-0.10460376739501953,
-0.09942882508039474,
0.346215158700943,
-0.35193175077438354,
0.1787763386964798,
0.15748219192028046,
0.30898338556289673,
0.05534454062581062,
-0.014273484237492085,
0.22325552999973297,
0.31651023030281067,
0.10311953723430634,
-0.1513245701789856,
0.2623482346534729,
-0.07128334790468216,
-0.07401948422193527,
-0.4364609122276306,
-0.01739835925400257,
0.06283124536275864,
-0.2060074806213379,
0.3266618847846985,
0.14939169585704803,
-0.3575519025325775,
0.16341249644756317,
0.07482291013002396,
0.279211163520813,
0.1243400126695633,
0.11189410090446472,
0.13739942014217377,
-0.01830662600696087,
-0.2724636495113373,
0.09121900051832199,
0.25763148069381714,
0.19753143191337585,
-0.05303496867418289,
-0.007622435688972473,
-0.2096731960773468,
-0.23058904707431793,
0.2533175051212311,
0.04633346199989319,
-0.31471413373947144,
-0.09331080317497253,
0.34477514028549194,
0.12127458304166794,
-0.060576602816581726,
0.12886188924312592,
0.13759419322013855,
0.10204910486936569,
0.056567125022411346,
0.16586656868457794,
-0.06969282031059265,
-0.27228763699531555,
-0.28461429476737976,
0.08984459936618805,
0.15614819526672363,
-0.05738864094018936,
-0.19011205434799194,
-0.26040658354759216,
-0.18630923330783844
] |
https://github.com/huggingface/datasets/issues/1785
|
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
I was able to patch the builder code in my notebook before the load data call and it works.
```
import datasets
datasets.builder.has_sufficient_disk_space = lambda needed_bytes, directory='.': True
```
|
I'm running some experiments where I'm caching datasets on a cluster and accessing it through multiple compute nodes. However, I get an error when loading the cached dataset from the shared disk.
The exact error thrown:
```bash
>>> load_dataset(dataset, cache_dir="/path/to/cluster/shared/path")
OSError: Not enough disk space. Needed: Unknown size (download: Unknown size, generated: Unknown size, post-processed: Unknown size)
```
[`utils.has_sufficient_disk_space`](https://github.com/huggingface/datasets/blob/8a03ab7d123a76ee744304f21ce868c75f411214/src/datasets/utils/py_utils.py#L332) fails on each job because of how the cluster system is designed (`disk_usage(".").free` can't compute on the cluster's shared disk).
This is exactly where the error gets thrown:
https://github.com/huggingface/datasets/blob/master/src/datasets/builder.py#L502
```python
if not utils.has_sufficient_disk_space(self.info.size_in_bytes or 0, directory=self._cache_dir_root):
raise IOError(
"Not enough disk space. Needed: {} (download: {}, generated: {}, post-processed: {})".format(
utils.size_str(self.info.size_in_bytes or 0),
utils.size_str(self.info.download_size or 0),
utils.size_str(self.info.dataset_size or 0),
utils.size_str(self.info.post_processing_size or 0),
)
)
```
What would be a good way to circumvent this? my current fix is to manually comment out that part, but that is not ideal.
Would it be possible to pass a flag to skip this check on disk space?
| 29 |
Not enough disk space (Needed: Unknown size) when caching on a cluster
|
[
-0.12654204666614532,
-0.35599076747894287,
-0.26534906029701233,
0.15758740901947021,
-0.1311347931623459,
-0.030707145109772682,
0.01788279600441456,
0.35523363947868347,
0.31602007150650024,
0.2585310637950897,
0.23294863104820251,
-0.3240179419517517,
0.005862023215740919,
-0.058646123856306076,
-0.19410088658332825,
0.049837756901979446,
0.04307176172733307,
-0.007178966421633959,
0.19750992953777313,
-0.018543360754847527,
-0.15881730616092682,
0.25784531235694885,
0.15040811896324158,
-0.37443190813064575,
-0.5397385358810425,
-0.16453817486763,
-0.07185493409633636,
0.018736092373728752,
-0.09389401227235794,
-0.06115800514817238,
0.08368885517120361,
-0.13627612590789795,
-0.014364988543093204,
0.23875761032104492,
-0.00010101171938003972,
-0.015923073515295982,
0.22781693935394287,
-0.16442656517028809,
-0.3490571975708008,
0.33194226026535034,
-0.02634921297430992,
-0.2754877805709839,
-0.31618016958236694,
-0.25217747688293457,
-0.03326544910669327,
0.1061694547533989,
-0.02934851683676243,
-0.320567786693573,
0.08458069711923599,
0.05622347816824913,
0.366388738155365,
0.0026877690106630325,
-0.05135605111718178,
-0.24344952404499054,
-0.005541323218494654,
-0.07936234772205353,
-0.060791101306676865,
0.164076566696167,
0.24489834904670715,
0.06246718764305115,
-0.33787453174591064,
0.3750694692134857,
0.13351936638355255,
0.19156162440776825,
0.21499541401863098,
-0.25951141119003296,
-0.1552632600069046,
-0.03041495382785797,
0.4357472062110901,
-0.2103603482246399,
0.4954563081264496,
-0.02919001132249832,
-0.19213610887527466,
-0.09058992564678192,
-0.13041560351848602,
-0.03665317967534065,
0.11180254817008972,
-0.04972505569458008,
-0.060980673879384995,
-0.158950075507164,
-0.21148362755775452,
-0.18568667769432068,
0.03450861945748329,
-0.26215365529060364,
-0.1223076656460762,
0.2248932123184204,
-0.07578428089618683,
0.048606280237436295,
0.10399021208286285,
0.0008553280495107174,
-0.02739064022898674,
0.13868173956871033,
-0.0023215950932353735,
0.11681398004293442,
-0.30246078968048096,
-0.12610994279384613,
0.12344911694526672,
0.37501710653305054,
0.15507008135318756,
0.10394849628210068,
-0.10367020219564438,
-0.0728321373462677,
0.37833720445632935,
-0.06969892978668213,
-0.14936120808124542,
0.49469316005706787,
-0.13250099122524261,
-0.27682188153266907,
0.13496416807174683,
-0.13522040843963623,
0.10412044078111649,
-0.14280806481838226,
-0.04120257869362831,
-0.3644923269748688,
0.18462692201137543,
0.051650937646627426,
-0.18477503955364227,
-0.015203732065856457,
-0.006140097510069609,
0.14668084681034088,
0.31046462059020996,
0.21907635033130646,
0.054536689072847366,
0.1899568885564804,
0.04677022248506546,
0.1412746161222458,
-0.05682375654578209,
0.21036821603775024,
-0.11823229491710663,
-0.12398479133844376,
-0.3252653479576111,
-0.043501850217580795,
-0.15660671889781952,
-0.07066459953784943,
0.38624924421310425,
0.31322726607322693,
0.1964380443096161,
-0.14485014975070953,
0.0005849552107974887,
-0.1270820051431656,
0.06382039189338684,
-0.26879215240478516,
-0.08708782494068146,
0.33734866976737976,
0.024654250591993332,
0.023845579475164413,
0.05113307386636734,
0.2791283130645752,
-0.09298455715179443,
-0.08994768559932709,
-0.3283596932888031,
-0.24632233381271362,
-0.08554399013519287,
0.28660354018211365,
-0.04825075343251228,
0.19351281225681305,
-0.18220949172973633,
-0.15610480308532715,
0.2680472135543823,
-0.14518001675605774,
-0.1260327845811844,
0.07998389005661011,
-0.18595650792121887,
-0.08831920474767685,
0.04757864400744438,
0.1607736349105835,
-0.11858801543712616,
0.26205742359161377,
-0.017097951844334602,
0.23618684709072113,
-0.0323791578412056,
0.4071325361728668,
0.0642411857843399,
0.10789266973733902,
-0.18443313241004944,
0.17359627783298492,
-0.010045869275927544,
-0.28300124406814575,
-0.6087395548820496,
0.17332910001277924,
-0.1521744430065155,
-0.25749215483665466,
0.3652694523334503,
0.16177739202976227,
0.03761134296655655,
0.05762369558215141,
0.3129569888114929,
0.02801593393087387,
-0.09131227433681488,
0.04152456670999527,
-0.3599383234977722,
-0.23382145166397095,
-0.20483970642089844,
-0.1284557282924652,
0.3979613780975342,
0.07331102341413498,
0.15557007491588593,
0.21105654537677765,
-0.08132336288690567,
0.021002940833568573,
0.3906095027923584,
0.3276498019695282,
0.1667734980583191,
-0.504851222038269,
0.10526759177446365,
0.018909920006990433,
-0.45837485790252686,
0.23543450236320496,
-0.2606964111328125,
-0.18317709863185883,
0.08458622545003891,
-0.18001233041286469,
-0.4344784915447235,
-0.15267571806907654,
0.317490816116333,
0.24877972900867462,
0.32806459069252014,
-0.009404757991433144,
0.31344449520111084,
-0.21473661065101624,
0.17757031321525574,
0.07193765044212341,
-0.07584845274686813,
-0.23982086777687073,
0.04718093201518059,
-0.05041177198290825,
-0.27226635813713074,
-0.12225913256406784,
0.16854269802570343,
0.07803008705377579,
0.09366834163665771,
-0.04086533561348915,
-0.057157594710588455,
0.24389314651489258,
-0.12703771889209747,
0.18330824375152588,
0.15699416399002075,
0.041893355548381805,
-0.00007821522740414366,
0.2725220024585724,
0.2653651237487793,
-0.09638060629367828,
0.0184043999761343,
-0.07008329778909683,
-0.13909895718097687,
-0.0834134891629219,
0.2200082391500473,
-0.040780194103717804,
-0.039177268743515015,
-0.1821240931749344,
0.10912027955055237,
-0.03116540051996708,
0.24188552796840668,
-0.1491742879152298,
0.024149851873517036,
-0.2494334727525711,
0.14882320165634155,
0.07035885006189346,
0.22530357539653778,
0.0275009386241436,
0.03638852760195732,
0.16256730258464813,
0.42664748430252075,
0.14071416854858398,
0.09929627180099487,
-0.340778112411499,
0.15394729375839233,
0.2863163948059082,
0.2539424002170563,
0.1982148140668869,
0.15154775977134705,
-0.3191637098789215,
0.19943365454673767,
-0.1711486577987671,
0.015613442286849022,
-0.227308452129364,
0.0933060497045517,
0.2801923155784607,
0.16650334000587463,
-0.3057169020175934,
0.0975024625658989,
-0.12285163253545761,
0.21636509895324707,
0.1654449850320816,
-0.03335888683795929,
-0.12919074296951294,
0.057165421545505524,
-0.0014705316862091422,
0.31533414125442505,
0.38483771681785583,
-0.10039164125919342,
-0.17042972147464752,
0.1907198578119278,
0.30951938033103943,
-0.17212700843811035,
-0.10145877301692963,
-0.29002007842063904,
0.22784638404846191,
0.21131674945354462,
0.06695161014795303,
0.01344241201877594,
-0.2498278021812439,
-0.09174242615699768,
0.22652044892311096,
-0.03900560736656189,
-0.25770050287246704,
0.13082356750965118,
-0.07658746093511581,
0.23879440128803253,
-0.30493491888046265,
0.06438864767551422,
-0.02450384385883808,
0.19267630577087402,
-0.26333141326904297,
-0.1315719485282898,
0.34520819783210754,
-0.28396445512771606,
-0.11369019746780396,
0.053775038570165634,
-0.08626056462526321,
-0.10522012412548065,
0.007592205423861742,
-0.026054179295897484,
-0.1052841991186142,
-0.3827355206012726,
-0.035946328192949295,
-0.15138843655586243,
-0.2951993942260742,
0.029088854789733887,
0.04029617831110954,
0.03441787511110306,
0.08076266199350357,
0.13846108317375183,
-0.1673349291086197,
0.4449288547039032,
-0.168426975607872,
-0.40560832619667053,
-0.3609660863876343,
0.30229273438453674,
-0.09049095958471298,
-0.038556359708309174,
0.14067405462265015,
-0.15056338906288147,
0.37225520610809326,
0.27704593539237976,
-0.3239486515522003,
-0.27270641922950745,
-0.03872857615351677,
0.03775275871157646,
0.006609355565160513,
-0.1439526528120041,
0.35083523392677307,
-0.1443455070257187,
-0.28767481446266174,
-0.16842269897460938,
-0.06817393004894257,
0.17393426597118378,
0.05533478036522865,
0.3123142421245575,
-0.2826591730117798,
0.09156110137701035,
0.16994920372962952,
0.5833101272583008,
-0.2296687364578247,
0.12476025521755219,
0.267363041639328,
0.11723943799734116,
0.3753748834133148,
-0.14678499102592468,
0.19346868991851807,
0.3161420524120331,
-0.05446825549006462,
-0.30568504333496094,
0.18508382141590118,
0.049645185470581055,
-0.32425934076309204,
0.06926051527261734,
-0.1892695426940918,
0.03257153183221817,
-0.06629142165184021,
0.17825382947921753,
-0.18658636510372162,
0.17478282749652863,
0.10178802162408829,
-0.02401498332619667,
-0.41179877519607544,
-0.07302878051996231,
0.023615658283233643,
-0.2392396628856659,
0.10120683908462524,
0.20620867609977722,
-0.2746428847312927,
-0.029955340549349785,
-0.38844987750053406,
0.27703747153282166,
0.0009546803194098175,
0.05564066022634506,
-0.12293527275323868,
0.08101994544267654,
0.0011522877030074596,
0.024279760196805,
0.5192065238952637,
-0.053051549941301346,
0.34586769342422485,
0.018449174240231514,
0.18774725496768951,
-0.2190994918346405,
0.020042622461915016,
0.18437127768993378,
0.22935941815376282,
-0.11262182146310806,
0.4767383337020874,
-0.17941516637802124,
0.20498894155025482,
-0.3168284595012665,
0.2430119514465332,
-0.2533191442489624,
0.007119268178939819,
-0.20490597188472748,
-0.15772731602191925,
-0.11538967490196228,
0.23285262286663055,
0.35165783762931824,
0.15228360891342163,
0.11837054789066315,
0.16166546940803528,
-0.07733585685491562,
-0.14126691222190857,
-0.06764975190162659,
0.10514756292104721,
0.5499595999717712,
0.07212278991937637,
-0.11501455307006836,
0.04762136936187744,
0.18902316689491272,
0.2344384342432022,
0.04422701522707939,
0.0531034953892231,
0.5074989199638367,
0.5343474745750427,
0.042826347053050995,
0.02858722023665905,
0.23113438487052917,
-0.008833589032292366,
-0.2087790071964264,
0.2965930700302124,
0.2922419607639313,
-0.387544721364975,
0.12309706211090088,
-0.3351479768753052,
0.03889341279864311,
-0.10126391798257828,
0.16867230832576752,
0.3088743984699249,
0.021209174767136574,
0.09155010432004929,
-0.03474435210227966,
0.32121139764785767,
-0.24863308668136597,
0.18625174462795258,
0.018312109634280205,
0.578572690486908,
0.03359421342611313,
-0.011580707505345345,
-0.12317869067192078,
0.1587020754814148,
0.0061728437431156635,
-0.527442216873169,
0.25977542996406555,
0.029628541320562363,
-0.205190047621727,
0.17087185382843018,
0.0587884746491909,
-0.1509430706501007,
0.2433498650789261,
-0.12949201464653015,
0.267156720161438,
-0.2595597505569458,
0.15579918026924133,
-0.22690922021865845,
0.2772948443889618,
-0.24389870464801788,
-0.13104896247386932,
0.22021079063415527,
0.3334267735481262,
-0.11766349524259567,
0.3042723536491394,
-0.3370950222015381,
0.16180671751499176,
-0.04592888057231903,
0.005840086843818426,
-0.046410467475652695,
-0.3165576457977295,
0.02544739469885826,
0.3968520760536194,
-0.23723873496055603,
-0.07675867527723312,
-0.333109050989151,
-0.04205784201622009,
0.189053013920784,
0.31940191984176636,
-0.27621349692344666,
0.19036129117012024,
0.02638712152838707,
-0.08698807656764984,
0.09613463282585144,
0.12457749992609024,
-0.17494513094425201,
-0.16220571100711823,
-0.1824548840522766,
0.04892165586352348,
-0.20946891605854034,
-0.24886898696422577,
0.017326319590210915,
0.02857236936688423,
-0.32677650451660156,
-0.11766641587018967,
-0.20352624356746674,
-0.31282028555870056,
-0.17122745513916016,
-0.01820242777466774,
0.29912063479423523,
0.0711255818605423,
0.09203828871250153,
0.0781213715672493,
0.020223885774612427,
-0.14661261439323425,
-0.059073761105537415,
0.38873666524887085,
0.27231869101524353,
-0.32376348972320557,
0.41876426339149475,
-0.4881792366504669,
-0.22147729992866516,
-0.18164275586605072,
-0.4267033636569977,
-0.17418469488620758,
0.05802727863192558,
0.17707063257694244,
-0.13204234838485718,
-0.3823857307434082,
-0.0866428092122078,
-0.18805168569087982,
0.5858689546585083,
0.3485669195652008,
0.058839838951826096,
-0.13125599920749664,
-0.48826611042022705,
0.31844496726989746,
-0.13471898436546326,
0.09863846749067307,
-0.09339316189289093,
-0.23593232035636902,
0.26172974705696106,
0.0892343521118164,
-0.42441532015800476,
-0.029609188437461853,
-0.33626797795295715,
0.1830461025238037,
-0.2757588326931,
-0.2450210452079773,
0.07764589041471481,
-0.1794697493314743,
0.1739303469657898,
-0.08057224750518799,
-0.1977747082710266,
-0.3154080808162689,
0.21627864241600037,
-0.03305698186159134,
-0.05487929284572601,
0.22949035465717316,
0.16542956233024597,
-0.2836077809333801,
-0.03501654043793678,
-0.08595158904790878,
0.015349078923463821,
0.33613282442092896,
-0.021234450861811638,
-0.33510541915893555,
0.24300391972064972,
0.02792704850435257,
0.0518094077706337,
0.12887294590473175,
0.2707683742046356,
-0.02372651733458042,
-0.31478261947631836,
0.09909243881702423,
0.14989759027957916,
-0.008158844895660877,
0.2481313943862915,
0.006073783617466688,
-0.12194503098726273,
-0.011970628052949905,
0.03393926844000816,
0.05081942677497864,
-0.07631426304578781,
0.3079821765422821,
0.19331897795200348,
-0.19388903677463531,
0.18024952709674835,
-0.21100430190563202,
0.1282922774553299,
0.3846495747566223,
-0.1845061182975769,
-0.015666302293539047,
0.10348906368017197,
0.13079021871089935,
0.16389413177967072,
0.17710109055042267,
0.4707596004009247,
-0.39082059264183044,
0.2497677206993103,
0.2709536552429199,
0.4752834737300873,
-0.2687908113002777,
-0.07561967521905899,
-0.19690969586372375,
0.11333096027374268,
-0.09676031023263931,
0.24698664247989655,
-0.02334166318178177,
0.2567491829395294,
0.2653955817222595,
0.07705105096101761,
0.2029040902853012,
0.32533395290374756,
0.14017583429813385,
-0.20231887698173523,
-0.24855302274227142,
-0.060467228293418884,
0.052396975457668304,
-0.030798599123954773,
0.29224294424057007,
-0.20161284506320953,
-0.13510067760944366,
-0.08329826593399048,
-0.14819972217082977,
-0.36752673983573914,
-0.10424470901489258,
-0.5149908661842346,
-0.09503795206546783,
0.0756794810295105,
-0.1958344280719757,
0.24998556077480316,
-0.048853736370801926,
0.1192331314086914,
-0.1548149436712265,
0.135965496301651,
-0.1947815716266632,
-0.028142409399151802,
0.4976784586906433,
-0.07051149755716324,
0.20366829633712769,
0.17325572669506073,
-0.16539409756660461,
0.34003451466560364,
0.14952047169208527,
-0.2240602821111679,
0.18748492002487183,
0.15231581032276154,
0.3482319712638855,
0.17015080153942108,
-0.048177845776081085,
0.10452928394079208,
0.32288146018981934,
-0.1105479747056961,
-0.48215705156326294,
0.026085352525115013,
0.323083758354187,
-0.3196655511856079,
0.09656225889921188,
0.3401523530483246,
-0.25436142086982727,
0.2918616831302643,
-0.10361073911190033,
0.10132873803377151,
0.23394015431404114,
-0.22485949099063873,
-0.13519681990146637,
-0.28796857595443726,
0.043699122965335846,
-0.04029373079538345,
-0.339199423789978,
-0.2130756676197052,
0.08887305855751038,
-0.18034502863883972,
0.22299553453922272,
-0.02063605934381485,
0.1597927212715149,
-0.2830277681350708,
0.48799219727516174,
0.10738388448953629,
-0.39922916889190674,
-0.2399577647447586,
-0.11744856089353561,
-0.22389812767505646,
0.08588997274637222,
-0.4095769226551056,
0.10358676314353943,
-0.11708934605121613,
0.42024877667427063,
-0.03553232178092003,
-0.29964569211006165,
0.03293641284108162,
-0.027370082214474678,
-0.22739548981189728,
-0.05709421634674072,
-0.3613966405391693,
0.1171831414103508,
-0.10460376739501953,
-0.09942882508039474,
0.346215158700943,
-0.35193175077438354,
0.1787763386964798,
0.15748219192028046,
0.30898338556289673,
0.05534454062581062,
-0.014273484237492085,
0.22325552999973297,
0.31651023030281067,
0.10311953723430634,
-0.1513245701789856,
0.2623482346534729,
-0.07128334790468216,
-0.07401948422193527,
-0.4364609122276306,
-0.01739835925400257,
0.06283124536275864,
-0.2060074806213379,
0.3266618847846985,
0.14939169585704803,
-0.3575519025325775,
0.16341249644756317,
0.07482291013002396,
0.279211163520813,
0.1243400126695633,
0.11189410090446472,
0.13739942014217377,
-0.01830662600696087,
-0.2724636495113373,
0.09121900051832199,
0.25763148069381714,
0.19753143191337585,
-0.05303496867418289,
-0.007622435688972473,
-0.2096731960773468,
-0.23058904707431793,
0.2533175051212311,
0.04633346199989319,
-0.31471413373947144,
-0.09331080317497253,
0.34477514028549194,
0.12127458304166794,
-0.060576602816581726,
0.12886188924312592,
0.13759419322013855,
0.10204910486936569,
0.056567125022411346,
0.16586656868457794,
-0.06969282031059265,
-0.27228763699531555,
-0.28461429476737976,
0.08984459936618805,
0.15614819526672363,
-0.05738864094018936,
-0.19011205434799194,
-0.26040658354759216,
-0.18630923330783844
] |
https://github.com/huggingface/datasets/issues/1784
|
JSONDecodeError on JSON with multiple lines
|
Hi !
The `json` dataset script does support this format. For example loading a dataset with this format works on my side:
```json
{"key1":11, "key2":12, "key3":13}
{"key1":21, "key2":22, "key3":23}
```
Can you show the full stacktrace please ? Also which version of datasets and pyarrow are you using ?
|
Hello :),
I have been trying to load data using a JSON file. Based on the [docs](https://huggingface.co/docs/datasets/loading_datasets.html#json-files), the following format is supported:
```json
{"key1":11, "key2":12, "key3":13}
{"key1":21, "key2":22, "key3":23}
```
But, when I try loading a dataset with the same format, I get a JSONDecodeError : `JSONDecodeError: Extra data: line 2 column 1 (char 7142)`. Now, this is expected when using `json` to load a JSON file. But I was wondering if there are any special arguments to pass when using `load_dataset` as the docs suggest that this format is supported.
When I convert the JSON file to a list of dictionaries format, I get AttributeError: `AttributeError: 'list' object has no attribute 'keys'`. So, I can't convert them to list of dictionaries either.
Please let me know :)
Thanks,
Gunjan
| 49 |
JSONDecodeError on JSON with multiple lines
|
[
0.08152810484170914,
0.046148814260959625,
-0.2655757665634155,
0.21422810852527618,
0.21468588709831238,
-0.14183366298675537,
0.30853578448295593,
0.28368857502937317,
0.11665971577167511,
0.12088517844676971,
0.42026326060295105,
0.1622679978609085,
0.02925940603017807,
0.050286516547203064,
-0.34745386242866516,
-0.0811212882399559,
-0.072825588285923,
0.3307421803474426,
0.20462165772914886,
0.10989370197057724,
-0.1387847363948822,
0.2695690989494324,
-0.12721754610538483,
0.018276363611221313,
-0.016855981200933456,
0.004671639297157526,
0.029444148764014244,
0.03804832324385643,
-0.012009912170469761,
-0.35338371992111206,
0.07511484622955322,
-0.05966227129101753,
-0.18264472484588623,
0.36910128593444824,
-0.00009314662747783586,
0.1116306483745575,
0.06420015543699265,
-0.10894102603197098,
-0.10376463830471039,
-0.04949996992945671,
-0.34798336029052734,
-0.17308133840560913,
0.045525334775447845,
-0.28571242094039917,
0.0643458291888237,
-0.1718963384628296,
-0.21923407912254333,
-0.2826744019985199,
0.7420105934143066,
0.26746368408203125,
0.3835638463497162,
-0.12235453724861145,
0.07783517241477966,
0.16144974529743195,
-0.07567109912633896,
0.06589431315660477,
0.23378486931324005,
0.11632726341485977,
-0.06790515780448914,
0.35936495661735535,
0.15491676330566406,
0.1620277315378189,
-0.07764334976673126,
-0.11719492822885513,
-0.16823767125606537,
-0.12975694239139557,
0.2002166360616684,
0.14940662682056427,
0.13899026811122894,
-0.06012320891022682,
0.1697739064693451,
-0.01526082493364811,
0.043094612658023834,
-0.06730710715055466,
-0.1104428842663765,
-0.059867262840270996,
0.21729406714439392,
-0.008967727422714233,
0.031046994030475616,
0.009242565371096134,
-0.234437957406044,
-0.26505354046821594,
-0.2859308123588562,
0.031244730576872826,
-0.13134418427944183,
-0.007530674338340759,
-0.035593461245298386,
-0.01345674879848957,
-0.0998760536313057,
-0.11807619035243988,
-0.05854078754782677,
-0.06473565101623535,
-0.3737242817878723,
-0.033887796103954315,
0.3261626362800598,
-0.25657573342323303,
-0.005988375749439001,
-0.779747724533081,
0.1570935845375061,
0.044540271162986755,
0.36101728677749634,
0.20234841108322144,
0.0038078350480645895,
0.1313932090997696,
0.3448781371116638,
0.0557858906686306,
0.3877500891685486,
-0.07770254462957382,
0.07815205305814743,
0.11422473192214966,
-0.05399627983570099,
-0.14685066044330597,
0.06475482881069183,
-0.0634094849228859,
0.007832002826035023,
0.06825651973485947,
-0.08973358571529388,
-0.09886489808559418,
0.028321271762251854,
0.13861989974975586,
-0.48586153984069824,
-0.22920405864715576,
-0.024184532463550568,
0.18489018082618713,
0.3469740152359009,
0.08681374788284302,
0.2375519871711731,
0.19119766354560852,
0.10778077691793442,
-0.03706511855125427,
-0.2074284702539444,
0.11849560588598251,
0.18917116522789001,
-0.20249849557876587,
-0.06372373551130295,
0.24427317082881927,
0.08063451200723648,
-0.0751565620303154,
-0.2186385542154312,
-0.416610985994339,
-0.0887734666466713,
0.16491003334522247,
-0.02944163978099823,
0.006894999649375677,
0.08964086323976517,
-0.0808323472738266,
0.08019348978996277,
-0.2968106269836426,
0.08050550520420074,
0.08783107250928879,
-0.3522111773490906,
0.006563765462487936,
0.008809490129351616,
0.3685215413570404,
0.10453155636787415,
0.08708961308002472,
-0.06399491429328918,
-0.046981699764728546,
0.189230278134346,
-0.1761760711669922,
0.06802099943161011,
0.06315876543521881,
0.3090289831161499,
-0.23153510689735413,
-0.2815440595149994,
0.15676988661289215,
-0.078322634100914,
-0.15948651731014252,
0.3424539864063263,
-0.14313070476055145,
0.17858736217021942,
0.20636111497879028,
-0.1159682646393776,
0.18257787823677063,
-0.006390634924173355,
0.35952046513557434,
0.3042661249637604,
-0.23199835419654846,
-0.061853282153606415,
0.8040054440498352,
-0.16696950793266296,
0.009534362703561783,
0.18669813871383667,
-0.25213953852653503,
0.2221318483352661,
0.04559362307190895,
0.4345151484012604,
0.08815290778875351,
0.24246832728385925,
0.1864110827445984,
-0.1463409662246704,
0.0819862112402916,
-0.0240954477339983,
-0.07134456187486649,
-0.22558294236660004,
-0.07442089915275574,
-0.03151938319206238,
0.17672333121299744,
0.2529618740081787,
-0.1665678322315216,
-0.18330849707126617,
0.29750391840934753,
0.08002142608165741,
-0.19443078339099884,
-0.13849520683288574,
0.15298724174499512,
-0.1089242473244667,
-0.38981950283050537,
-0.08083519339561462,
-0.08655726164579391,
-0.31051474809646606,
0.005495080258697271,
0.1319219022989273,
0.015015946701169014,
-0.08034329116344452,
-0.16540184617042542,
0.39896345138549805,
0.08287955820560455,
0.023075086995959282,
-0.01942458190023899,
-0.05978403985500336,
0.14752258360385895,
0.11686697602272034,
-0.054093312472105026,
-0.07810913771390915,
0.26414263248443604,
-0.07704765349626541,
-0.18139256536960602,
0.1760607212781906,
-0.02403794787824154,
0.2080543339252472,
-0.19116578996181488,
-0.14524947106838226,
0.18960578739643097,
-0.037900324910879135,
-0.2531971037387848,
-0.07533145695924759,
-0.19350482523441315,
0.09957947582006454,
0.12806406617164612,
-0.21505658328533173,
0.34455880522727966,
0.05676167085766792,
-0.13721013069152832,
0.0110403373837471,
0.20733454823493958,
0.014716560952365398,
0.24515065550804138,
0.08507245033979416,
-0.1906193196773529,
0.37910744547843933,
-0.024494754150509834,
-0.09942557662725449,
-0.3366599380970001,
0.22040903568267822,
0.16918542981147766,
-0.31772381067276,
-0.13096021115779877,
-0.023989632725715637,
-0.12672723829746246,
0.5957435369491577,
0.008078807033598423,
0.13268259167671204,
0.005333747714757919,
0.23750567436218262,
0.08561613410711288,
-0.13039271533489227,
0.18393756449222565,
0.07994433492422104,
0.23214006423950195,
-0.13886068761348724,
0.07764553278684616,
0.12802454829216003,
-0.2792551517486572,
0.21040824055671692,
-0.08619509637355804,
0.2587053179740906,
0.1432766616344452,
0.2680109739303589,
-0.14195480942726135,
-0.281085729598999,
-0.5275616645812988,
-0.02595621347427368,
0.09753008931875229,
-0.20106591284275055,
0.03607209026813507,
-0.448175847530365,
0.0045804213732481,
-0.12423881888389587,
-0.07985144853591919,
-0.06467099487781525,
-0.11467628180980682,
0.10820122808218002,
-0.14451999962329865,
-0.31476902961730957,
-0.05583205446600914,
0.15981298685073853,
0.0022877377923578024,
0.2634712755680084,
0.1813417226076126,
0.023847945034503937,
-0.14055800437927246,
0.021472783759236336,
0.22216221690177917,
0.11278677731752396,
-0.0896972119808197,
-0.0314699187874794,
-0.08187717944383621,
-0.11686750501394272,
0.14104704558849335,
0.004416424781084061,
0.11748141050338745,
-0.06243015453219414,
-0.28010794520378113,
0.12505866587162018,
0.33762770891189575,
-0.048392634838819504,
-0.26693809032440186,
0.17791086435317993,
0.13862967491149902,
-0.2066878229379654,
0.08234182000160217,
0.22741955518722534,
0.04703633859753609,
-0.19992350041866302,
-0.16107338666915894,
0.2155231386423111,
-0.2822589874267578,
0.443695992231369,
-0.19367587566375732,
0.346431165933609,
-0.22480140626430511,
0.016858967021107674,
-0.0658111497759819,
-0.09379345178604126,
0.0835324302315712,
-0.054031264036893845,
-0.14122645556926727,
-0.00178076873999089,
-0.14096352458000183,
-0.2125370055437088,
-0.06535390019416809,
0.16874440014362335,
0.09013724327087402,
-0.18106214702129364,
-0.2943604290485382,
-0.04545317962765694,
0.037066325545310974,
-0.050572171807289124,
-0.22202202677726746,
-0.3644405007362366,
0.2518521845340729,
0.06260460615158081,
-0.31069615483283997,
-0.18925246596336365,
-0.0859270989894867,
0.3054444491863251,
-0.09566900134086609,
0.1319078803062439,
-0.1717628836631775,
0.6580657958984375,
0.03337285295128822,
-0.21604864299297333,
0.3106856942176819,
-0.05721970275044441,
0.1816093921661377,
0.12015421688556671,
-0.037903182208538055,
0.09198389947414398,
0.05480567365884781,
-0.1518697887659073,
0.06052405387163162,
-0.03299953415989876,
0.10011354088783264,
-0.12891285121440887,
-0.10225357115268707,
-0.07167284190654755,
-0.1910552978515625,
-0.4063836336135864,
-0.10016103833913803,
-0.0005759000196121633,
0.0963524580001831,
-0.13535447418689728,
-0.1806069314479828,
0.08771474659442902,
0.11263381689786911,
0.4236951768398285,
-0.19346949458122253,
0.06147713214159012,
0.01267520897090435,
-0.1941196471452713,
-0.22847336530685425,
-0.37701416015625,
-0.1281261146068573,
0.30251720547676086,
0.15108375251293182,
0.22802898287773132,
-0.11581922322511673,
0.16526365280151367,
0.08805250376462936,
-0.44225698709487915,
0.4925365149974823,
-0.031009478494524956,
-0.0087050786241889,
0.05186891928315163,
0.133871391415596,
0.015202296897768974,
0.19477395713329315,
-0.1458926796913147,
0.3448544144630432,
0.4881969094276428,
-0.08687768876552582,
-0.40095967054367065,
0.07802710682153702,
-0.054054245352745056,
-0.2909451425075531,
-0.11234845221042633,
-0.20567360520362854,
-0.09804563224315643,
-0.37039485573768616,
-0.44772595167160034,
-0.0614294670522213,
0.08984757959842682,
0.3127579689025879,
0.18672189116477966,
-0.2878216505050659,
0.1812984198331833,
-0.42309239506721497,
-0.18994349241256714,
-0.0328143909573555,
0.056870415806770325,
-0.23208943009376526,
-0.05403763800859451,
-0.3600175082683563,
0.1366279125213623,
0.3674911856651306,
0.3325234055519104,
0.5025367736816406,
-0.05073169991374016,
0.05621291324496269,
-0.1834728866815567,
0.22723983228206635,
0.11772215366363525,
0.06918064504861832,
0.20957450568675995,
-0.1763884723186493,
0.243137389421463,
0.22270019352436066,
-0.27601155638694763,
0.19688023626804352,
-0.1699896901845932,
-0.07820731401443481,
0.049268510192632675,
0.2725830078125,
-0.26143771409988403,
0.1276259571313858,
-0.11690982431173325,
-0.12468236684799194,
-0.2342824637889862,
0.17842721939086914,
0.0026750925462692976,
0.43123286962509155,
0.32283544540405273,
-0.04245677962899208,
0.19274477660655975,
-0.5005825757980347,
0.31242266297340393,
-0.27864018082618713,
0.1040952056646347,
-0.0921076089143753,
0.42553573846817017,
0.14249078929424286,
-0.08179203420877457,
0.16207291185855865,
0.08657097071409225,
-0.2333761602640152,
-0.08379331231117249,
-0.1334698498249054,
-0.26807424426078796,
-0.07199574261903763,
0.12029852718114853,
-0.06661868840456009,
0.053638871759176254,
-0.5092014074325562,
0.28334033489227295,
-0.14039640128612518,
-0.23193971812725067,
-0.08427593111991882,
-0.33384019136428833,
0.11662451177835464,
-0.49402910470962524,
-0.2185080498456955,
0.11744825541973114,
0.17459504306316376,
0.2008473128080368,
0.20994989573955536,
-0.03258400410413742,
-0.10786624252796173,
-0.3218420445919037,
0.07743504643440247,
0.007527126930654049,
-0.0710224136710167,
0.13040079176425934,
-0.06811937689781189,
-0.26675480604171753,
-0.33485957980155945,
0.19718287885189056,
0.1392190158367157,
-0.31701070070266724,
-0.22118951380252838,
-0.005724691320210695,
-0.003718635533004999,
-0.47120603919029236,
-0.12528856098651886,
0.30109065771102905,
-0.4830317199230194,
-0.14919525384902954,
0.0015742137329652905,
0.2793175280094147,
0.07097417861223221,
-0.21044543385505676,
0.2976531684398651,
0.06317878514528275,
-0.2353469282388687,
-0.10955695807933807,
0.026493309065699577,
-0.09983322769403458,
-0.08869244903326035,
0.15515021979808807,
0.36431804299354553,
-0.18811728060245514,
0.3945322632789612,
0.13503436744213104,
-0.11531877517700195,
-0.40960583090782166,
0.12518376111984253,
0.3760765790939331,
0.008364359848201275,
0.3181733787059784,
-0.24845053255558014,
0.024008242413401604,
0.07452351599931717,
0.23082135617733002,
-0.19897215068340302,
0.46715807914733887,
0.21354779601097107,
-0.23843389749526978,
-0.19548296928405762,
-0.015955762937664986,
-0.012948286719620228,
-0.06897606700658798,
0.03499235585331917,
0.3475053906440735,
-0.03738437220454216,
0.15334467589855194,
-0.4414128065109253,
0.0866570994257927,
-0.21583358943462372,
0.02533627301454544,
-0.1490611433982849,
-0.16945578157901764,
0.09211575239896774,
0.1859547346830368,
0.34021246433258057,
0.4465250074863434,
-0.08452015370130539,
-0.3702012002468109,
0.12342648208141327,
0.0005974711966700852,
0.21966929733753204,
0.10095246881246567,
-0.18561889231204987,
0.08117735385894775,
-0.06345245242118835,
0.15529786050319672,
0.062242425978183746,
-0.19228537380695343,
0.014915496110916138,
0.02605757676064968,
0.15477044880390167,
0.09891962260007858,
0.09027919918298721,
-0.14792485535144806,
-0.06741757690906525,
0.5542359948158264,
-0.12164657562971115,
-0.06170140206813812,
-0.26250430941581726,
0.03416338190436363,
-0.2077987790107727,
-0.021558405831456184,
-0.054254986345767975,
0.5001468062400818,
0.23304864764213562,
-0.4812057316303253,
0.0009797553066164255,
0.060683853924274445,
0.033110927790403366,
0.17076431214809418,
-0.4743674397468567,
0.030093519017100334,
-0.19533759355545044,
0.32622230052948,
0.09057389944791794,
-0.10038533061742783,
0.039959702640771866,
-0.10819815844297409,
-0.14170105755329132,
0.05594000220298767,
-0.27065083384513855,
-0.2051510363817215,
0.15796414017677307,
0.19982734322547913,
0.26965779066085815,
0.026438089087605476,
-0.15768127143383026,
0.05171991512179375,
-0.24067294597625732,
-0.14895735681056976,
-0.1520843803882599,
0.22030262649059296,
0.22427648305892944,
0.1966804713010788,
-0.0005166535847820342,
0.06620240211486816,
0.28869277238845825,
-0.1681523621082306,
-0.2955988049507141,
0.09958066791296005,
-0.0872892290353775,
0.18172797560691833,
0.15397725999355316,
0.2836735248565674,
0.24350543320178986,
-0.35783079266548157,
0.0568665973842144,
0.2434246689081192,
-0.08328328281641006,
0.21710310876369476,
-0.011388548649847507,
-0.0027783368714153767,
-0.1645115315914154,
-0.0011332352878525853,
-0.18286444246768951,
-0.0710005909204483,
0.09765572100877762,
0.26233798265457153,
-0.2134198248386383,
0.07834647595882416,
-0.1261751353740692,
-0.10889974981546402,
0.1562744528055191,
-0.25666192173957825,
0.19287751615047455,
-0.2462707906961441,
0.26784899830818176,
0.40155789256095886,
-0.0984392836689949,
0.2487027645111084,
-0.09343797713518143,
0.34523987770080566,
0.14504267275333405,
0.015885187312960625,
-0.15002655982971191,
-0.4895341694355011,
-0.18215715885162354,
0.07845059782266617,
0.17678914964199066,
0.17252366244792938,
0.028164317831397057,
0.14649735391139984,
0.2692066729068756,
-0.24987460672855377,
0.41717660427093506,
0.2453283816576004,
0.15596917271614075,
0.24141202867031097,
0.12230034917593002,
-0.19828923046588898,
0.1370854675769806,
-0.12571294605731964,
-0.30864447355270386,
-0.4084004759788513,
-0.5016871690750122,
-0.37096330523490906,
-0.06439703702926636,
0.08024003356695175,
0.04544084891676903,
0.22287914156913757,
-0.08153830468654633,
0.22327952086925507,
-0.01978793367743492,
0.06782964617013931,
0.1477755755186081,
-0.1573438197374344,
0.08004633337259293,
0.07710640132427216,
-0.33725929260253906,
-0.08556313812732697,
-0.010415068827569485,
0.14568112790584564,
0.1661093831062317,
-0.13013288378715515,
-0.007588012609630823,
0.26485541462898254,
-0.27869611978530884,
-0.1395575851202011,
-0.3743014931678772,
0.2146129310131073,
0.6006150841712952,
0.02906435914337635,
0.09574414789676666,
0.19895713031291962,
0.33110761642456055,
-0.02902727574110031,
0.3281589150428772,
0.0018354227067902684,
0.0884845107793808,
-0.3454963266849518,
-0.14379122853279114,
0.09730521589517593,
0.2343311607837677,
0.2974603772163391,
-0.1639336794614792,
-0.07272649556398392,
0.13563098013401031,
-0.12289305031299591,
0.1785142570734024,
0.4408884346485138,
0.40364864468574524,
0.44881686568260193,
-0.015772119164466858,
0.19172066450119019,
-0.034996580332517624,
0.07225556671619415,
-0.45293283462524414,
-0.16269083321094513,
-0.011766774579882622,
0.2264556735754013,
0.26262757182121277,
-0.03178207576274872,
-0.1691291183233261,
-0.14817680418491364,
0.05834582820534706,
0.04860423132777214,
-0.08990694582462311,
-0.2431682050228119,
0.28427940607070923,
0.0681404247879982,
-0.31073710322380066,
0.31540536880493164,
0.1834629625082016,
-0.12443099915981293,
0.16956232488155365,
-0.47287842631340027,
-0.027361182495951653,
0.26600897312164307,
0.05591009557247162,
-0.4981449544429779,
0.07101476192474365,
0.08475607633590698,
-0.28536251187324524,
0.15197612345218658,
0.15375438332557678,
0.1006740927696228,
-0.16738931834697723,
0.08435695618391037,
-0.09725821018218994
] |
https://github.com/huggingface/datasets/issues/1784
|
JSONDecodeError on JSON with multiple lines
|
Hi Quentin!
I apologize for bothering you. There was some issue with my pyarrow version as far as I understand. I don't remember the exact version I was using as I didn't check it.
I repeated it with `datasets 1.2.1` and `pyarrow 2.0.0` and it worked.
Closing this issue. Again, sorry for the bother.
Thanks,
Gunjan
|
Hello :),
I have been trying to load data using a JSON file. Based on the [docs](https://huggingface.co/docs/datasets/loading_datasets.html#json-files), the following format is supported:
```json
{"key1":11, "key2":12, "key3":13}
{"key1":21, "key2":22, "key3":23}
```
But, when I try loading a dataset with the same format, I get a JSONDecodeError : `JSONDecodeError: Extra data: line 2 column 1 (char 7142)`. Now, this is expected when using `json` to load a JSON file. But I was wondering if there are any special arguments to pass when using `load_dataset` as the docs suggest that this format is supported.
When I convert the JSON file to a list of dictionaries format, I get AttributeError: `AttributeError: 'list' object has no attribute 'keys'`. So, I can't convert them to list of dictionaries either.
Please let me know :)
Thanks,
Gunjan
| 56 |
JSONDecodeError on JSON with multiple lines
|
[
0.08152810484170914,
0.046148814260959625,
-0.2655757665634155,
0.21422810852527618,
0.21468588709831238,
-0.14183366298675537,
0.30853578448295593,
0.28368857502937317,
0.11665971577167511,
0.12088517844676971,
0.42026326060295105,
0.1622679978609085,
0.02925940603017807,
0.050286516547203064,
-0.34745386242866516,
-0.0811212882399559,
-0.072825588285923,
0.3307421803474426,
0.20462165772914886,
0.10989370197057724,
-0.1387847363948822,
0.2695690989494324,
-0.12721754610538483,
0.018276363611221313,
-0.016855981200933456,
0.004671639297157526,
0.029444148764014244,
0.03804832324385643,
-0.012009912170469761,
-0.35338371992111206,
0.07511484622955322,
-0.05966227129101753,
-0.18264472484588623,
0.36910128593444824,
-0.00009314662747783586,
0.1116306483745575,
0.06420015543699265,
-0.10894102603197098,
-0.10376463830471039,
-0.04949996992945671,
-0.34798336029052734,
-0.17308133840560913,
0.045525334775447845,
-0.28571242094039917,
0.0643458291888237,
-0.1718963384628296,
-0.21923407912254333,
-0.2826744019985199,
0.7420105934143066,
0.26746368408203125,
0.3835638463497162,
-0.12235453724861145,
0.07783517241477966,
0.16144974529743195,
-0.07567109912633896,
0.06589431315660477,
0.23378486931324005,
0.11632726341485977,
-0.06790515780448914,
0.35936495661735535,
0.15491676330566406,
0.1620277315378189,
-0.07764334976673126,
-0.11719492822885513,
-0.16823767125606537,
-0.12975694239139557,
0.2002166360616684,
0.14940662682056427,
0.13899026811122894,
-0.06012320891022682,
0.1697739064693451,
-0.01526082493364811,
0.043094612658023834,
-0.06730710715055466,
-0.1104428842663765,
-0.059867262840270996,
0.21729406714439392,
-0.008967727422714233,
0.031046994030475616,
0.009242565371096134,
-0.234437957406044,
-0.26505354046821594,
-0.2859308123588562,
0.031244730576872826,
-0.13134418427944183,
-0.007530674338340759,
-0.035593461245298386,
-0.01345674879848957,
-0.0998760536313057,
-0.11807619035243988,
-0.05854078754782677,
-0.06473565101623535,
-0.3737242817878723,
-0.033887796103954315,
0.3261626362800598,
-0.25657573342323303,
-0.005988375749439001,
-0.779747724533081,
0.1570935845375061,
0.044540271162986755,
0.36101728677749634,
0.20234841108322144,
0.0038078350480645895,
0.1313932090997696,
0.3448781371116638,
0.0557858906686306,
0.3877500891685486,
-0.07770254462957382,
0.07815205305814743,
0.11422473192214966,
-0.05399627983570099,
-0.14685066044330597,
0.06475482881069183,
-0.0634094849228859,
0.007832002826035023,
0.06825651973485947,
-0.08973358571529388,
-0.09886489808559418,
0.028321271762251854,
0.13861989974975586,
-0.48586153984069824,
-0.22920405864715576,
-0.024184532463550568,
0.18489018082618713,
0.3469740152359009,
0.08681374788284302,
0.2375519871711731,
0.19119766354560852,
0.10778077691793442,
-0.03706511855125427,
-0.2074284702539444,
0.11849560588598251,
0.18917116522789001,
-0.20249849557876587,
-0.06372373551130295,
0.24427317082881927,
0.08063451200723648,
-0.0751565620303154,
-0.2186385542154312,
-0.416610985994339,
-0.0887734666466713,
0.16491003334522247,
-0.02944163978099823,
0.006894999649375677,
0.08964086323976517,
-0.0808323472738266,
0.08019348978996277,
-0.2968106269836426,
0.08050550520420074,
0.08783107250928879,
-0.3522111773490906,
0.006563765462487936,
0.008809490129351616,
0.3685215413570404,
0.10453155636787415,
0.08708961308002472,
-0.06399491429328918,
-0.046981699764728546,
0.189230278134346,
-0.1761760711669922,
0.06802099943161011,
0.06315876543521881,
0.3090289831161499,
-0.23153510689735413,
-0.2815440595149994,
0.15676988661289215,
-0.078322634100914,
-0.15948651731014252,
0.3424539864063263,
-0.14313070476055145,
0.17858736217021942,
0.20636111497879028,
-0.1159682646393776,
0.18257787823677063,
-0.006390634924173355,
0.35952046513557434,
0.3042661249637604,
-0.23199835419654846,
-0.061853282153606415,
0.8040054440498352,
-0.16696950793266296,
0.009534362703561783,
0.18669813871383667,
-0.25213953852653503,
0.2221318483352661,
0.04559362307190895,
0.4345151484012604,
0.08815290778875351,
0.24246832728385925,
0.1864110827445984,
-0.1463409662246704,
0.0819862112402916,
-0.0240954477339983,
-0.07134456187486649,
-0.22558294236660004,
-0.07442089915275574,
-0.03151938319206238,
0.17672333121299744,
0.2529618740081787,
-0.1665678322315216,
-0.18330849707126617,
0.29750391840934753,
0.08002142608165741,
-0.19443078339099884,
-0.13849520683288574,
0.15298724174499512,
-0.1089242473244667,
-0.38981950283050537,
-0.08083519339561462,
-0.08655726164579391,
-0.31051474809646606,
0.005495080258697271,
0.1319219022989273,
0.015015946701169014,
-0.08034329116344452,
-0.16540184617042542,
0.39896345138549805,
0.08287955820560455,
0.023075086995959282,
-0.01942458190023899,
-0.05978403985500336,
0.14752258360385895,
0.11686697602272034,
-0.054093312472105026,
-0.07810913771390915,
0.26414263248443604,
-0.07704765349626541,
-0.18139256536960602,
0.1760607212781906,
-0.02403794787824154,
0.2080543339252472,
-0.19116578996181488,
-0.14524947106838226,
0.18960578739643097,
-0.037900324910879135,
-0.2531971037387848,
-0.07533145695924759,
-0.19350482523441315,
0.09957947582006454,
0.12806406617164612,
-0.21505658328533173,
0.34455880522727966,
0.05676167085766792,
-0.13721013069152832,
0.0110403373837471,
0.20733454823493958,
0.014716560952365398,
0.24515065550804138,
0.08507245033979416,
-0.1906193196773529,
0.37910744547843933,
-0.024494754150509834,
-0.09942557662725449,
-0.3366599380970001,
0.22040903568267822,
0.16918542981147766,
-0.31772381067276,
-0.13096021115779877,
-0.023989632725715637,
-0.12672723829746246,
0.5957435369491577,
0.008078807033598423,
0.13268259167671204,
0.005333747714757919,
0.23750567436218262,
0.08561613410711288,
-0.13039271533489227,
0.18393756449222565,
0.07994433492422104,
0.23214006423950195,
-0.13886068761348724,
0.07764553278684616,
0.12802454829216003,
-0.2792551517486572,
0.21040824055671692,
-0.08619509637355804,
0.2587053179740906,
0.1432766616344452,
0.2680109739303589,
-0.14195480942726135,
-0.281085729598999,
-0.5275616645812988,
-0.02595621347427368,
0.09753008931875229,
-0.20106591284275055,
0.03607209026813507,
-0.448175847530365,
0.0045804213732481,
-0.12423881888389587,
-0.07985144853591919,
-0.06467099487781525,
-0.11467628180980682,
0.10820122808218002,
-0.14451999962329865,
-0.31476902961730957,
-0.05583205446600914,
0.15981298685073853,
0.0022877377923578024,
0.2634712755680084,
0.1813417226076126,
0.023847945034503937,
-0.14055800437927246,
0.021472783759236336,
0.22216221690177917,
0.11278677731752396,
-0.0896972119808197,
-0.0314699187874794,
-0.08187717944383621,
-0.11686750501394272,
0.14104704558849335,
0.004416424781084061,
0.11748141050338745,
-0.06243015453219414,
-0.28010794520378113,
0.12505866587162018,
0.33762770891189575,
-0.048392634838819504,
-0.26693809032440186,
0.17791086435317993,
0.13862967491149902,
-0.2066878229379654,
0.08234182000160217,
0.22741955518722534,
0.04703633859753609,
-0.19992350041866302,
-0.16107338666915894,
0.2155231386423111,
-0.2822589874267578,
0.443695992231369,
-0.19367587566375732,
0.346431165933609,
-0.22480140626430511,
0.016858967021107674,
-0.0658111497759819,
-0.09379345178604126,
0.0835324302315712,
-0.054031264036893845,
-0.14122645556926727,
-0.00178076873999089,
-0.14096352458000183,
-0.2125370055437088,
-0.06535390019416809,
0.16874440014362335,
0.09013724327087402,
-0.18106214702129364,
-0.2943604290485382,
-0.04545317962765694,
0.037066325545310974,
-0.050572171807289124,
-0.22202202677726746,
-0.3644405007362366,
0.2518521845340729,
0.06260460615158081,
-0.31069615483283997,
-0.18925246596336365,
-0.0859270989894867,
0.3054444491863251,
-0.09566900134086609,
0.1319078803062439,
-0.1717628836631775,
0.6580657958984375,
0.03337285295128822,
-0.21604864299297333,
0.3106856942176819,
-0.05721970275044441,
0.1816093921661377,
0.12015421688556671,
-0.037903182208538055,
0.09198389947414398,
0.05480567365884781,
-0.1518697887659073,
0.06052405387163162,
-0.03299953415989876,
0.10011354088783264,
-0.12891285121440887,
-0.10225357115268707,
-0.07167284190654755,
-0.1910552978515625,
-0.4063836336135864,
-0.10016103833913803,
-0.0005759000196121633,
0.0963524580001831,
-0.13535447418689728,
-0.1806069314479828,
0.08771474659442902,
0.11263381689786911,
0.4236951768398285,
-0.19346949458122253,
0.06147713214159012,
0.01267520897090435,
-0.1941196471452713,
-0.22847336530685425,
-0.37701416015625,
-0.1281261146068573,
0.30251720547676086,
0.15108375251293182,
0.22802898287773132,
-0.11581922322511673,
0.16526365280151367,
0.08805250376462936,
-0.44225698709487915,
0.4925365149974823,
-0.031009478494524956,
-0.0087050786241889,
0.05186891928315163,
0.133871391415596,
0.015202296897768974,
0.19477395713329315,
-0.1458926796913147,
0.3448544144630432,
0.4881969094276428,
-0.08687768876552582,
-0.40095967054367065,
0.07802710682153702,
-0.054054245352745056,
-0.2909451425075531,
-0.11234845221042633,
-0.20567360520362854,
-0.09804563224315643,
-0.37039485573768616,
-0.44772595167160034,
-0.0614294670522213,
0.08984757959842682,
0.3127579689025879,
0.18672189116477966,
-0.2878216505050659,
0.1812984198331833,
-0.42309239506721497,
-0.18994349241256714,
-0.0328143909573555,
0.056870415806770325,
-0.23208943009376526,
-0.05403763800859451,
-0.3600175082683563,
0.1366279125213623,
0.3674911856651306,
0.3325234055519104,
0.5025367736816406,
-0.05073169991374016,
0.05621291324496269,
-0.1834728866815567,
0.22723983228206635,
0.11772215366363525,
0.06918064504861832,
0.20957450568675995,
-0.1763884723186493,
0.243137389421463,
0.22270019352436066,
-0.27601155638694763,
0.19688023626804352,
-0.1699896901845932,
-0.07820731401443481,
0.049268510192632675,
0.2725830078125,
-0.26143771409988403,
0.1276259571313858,
-0.11690982431173325,
-0.12468236684799194,
-0.2342824637889862,
0.17842721939086914,
0.0026750925462692976,
0.43123286962509155,
0.32283544540405273,
-0.04245677962899208,
0.19274477660655975,
-0.5005825757980347,
0.31242266297340393,
-0.27864018082618713,
0.1040952056646347,
-0.0921076089143753,
0.42553573846817017,
0.14249078929424286,
-0.08179203420877457,
0.16207291185855865,
0.08657097071409225,
-0.2333761602640152,
-0.08379331231117249,
-0.1334698498249054,
-0.26807424426078796,
-0.07199574261903763,
0.12029852718114853,
-0.06661868840456009,
0.053638871759176254,
-0.5092014074325562,
0.28334033489227295,
-0.14039640128612518,
-0.23193971812725067,
-0.08427593111991882,
-0.33384019136428833,
0.11662451177835464,
-0.49402910470962524,
-0.2185080498456955,
0.11744825541973114,
0.17459504306316376,
0.2008473128080368,
0.20994989573955536,
-0.03258400410413742,
-0.10786624252796173,
-0.3218420445919037,
0.07743504643440247,
0.007527126930654049,
-0.0710224136710167,
0.13040079176425934,
-0.06811937689781189,
-0.26675480604171753,
-0.33485957980155945,
0.19718287885189056,
0.1392190158367157,
-0.31701070070266724,
-0.22118951380252838,
-0.005724691320210695,
-0.003718635533004999,
-0.47120603919029236,
-0.12528856098651886,
0.30109065771102905,
-0.4830317199230194,
-0.14919525384902954,
0.0015742137329652905,
0.2793175280094147,
0.07097417861223221,
-0.21044543385505676,
0.2976531684398651,
0.06317878514528275,
-0.2353469282388687,
-0.10955695807933807,
0.026493309065699577,
-0.09983322769403458,
-0.08869244903326035,
0.15515021979808807,
0.36431804299354553,
-0.18811728060245514,
0.3945322632789612,
0.13503436744213104,
-0.11531877517700195,
-0.40960583090782166,
0.12518376111984253,
0.3760765790939331,
0.008364359848201275,
0.3181733787059784,
-0.24845053255558014,
0.024008242413401604,
0.07452351599931717,
0.23082135617733002,
-0.19897215068340302,
0.46715807914733887,
0.21354779601097107,
-0.23843389749526978,
-0.19548296928405762,
-0.015955762937664986,
-0.012948286719620228,
-0.06897606700658798,
0.03499235585331917,
0.3475053906440735,
-0.03738437220454216,
0.15334467589855194,
-0.4414128065109253,
0.0866570994257927,
-0.21583358943462372,
0.02533627301454544,
-0.1490611433982849,
-0.16945578157901764,
0.09211575239896774,
0.1859547346830368,
0.34021246433258057,
0.4465250074863434,
-0.08452015370130539,
-0.3702012002468109,
0.12342648208141327,
0.0005974711966700852,
0.21966929733753204,
0.10095246881246567,
-0.18561889231204987,
0.08117735385894775,
-0.06345245242118835,
0.15529786050319672,
0.062242425978183746,
-0.19228537380695343,
0.014915496110916138,
0.02605757676064968,
0.15477044880390167,
0.09891962260007858,
0.09027919918298721,
-0.14792485535144806,
-0.06741757690906525,
0.5542359948158264,
-0.12164657562971115,
-0.06170140206813812,
-0.26250430941581726,
0.03416338190436363,
-0.2077987790107727,
-0.021558405831456184,
-0.054254986345767975,
0.5001468062400818,
0.23304864764213562,
-0.4812057316303253,
0.0009797553066164255,
0.060683853924274445,
0.033110927790403366,
0.17076431214809418,
-0.4743674397468567,
0.030093519017100334,
-0.19533759355545044,
0.32622230052948,
0.09057389944791794,
-0.10038533061742783,
0.039959702640771866,
-0.10819815844297409,
-0.14170105755329132,
0.05594000220298767,
-0.27065083384513855,
-0.2051510363817215,
0.15796414017677307,
0.19982734322547913,
0.26965779066085815,
0.026438089087605476,
-0.15768127143383026,
0.05171991512179375,
-0.24067294597625732,
-0.14895735681056976,
-0.1520843803882599,
0.22030262649059296,
0.22427648305892944,
0.1966804713010788,
-0.0005166535847820342,
0.06620240211486816,
0.28869277238845825,
-0.1681523621082306,
-0.2955988049507141,
0.09958066791296005,
-0.0872892290353775,
0.18172797560691833,
0.15397725999355316,
0.2836735248565674,
0.24350543320178986,
-0.35783079266548157,
0.0568665973842144,
0.2434246689081192,
-0.08328328281641006,
0.21710310876369476,
-0.011388548649847507,
-0.0027783368714153767,
-0.1645115315914154,
-0.0011332352878525853,
-0.18286444246768951,
-0.0710005909204483,
0.09765572100877762,
0.26233798265457153,
-0.2134198248386383,
0.07834647595882416,
-0.1261751353740692,
-0.10889974981546402,
0.1562744528055191,
-0.25666192173957825,
0.19287751615047455,
-0.2462707906961441,
0.26784899830818176,
0.40155789256095886,
-0.0984392836689949,
0.2487027645111084,
-0.09343797713518143,
0.34523987770080566,
0.14504267275333405,
0.015885187312960625,
-0.15002655982971191,
-0.4895341694355011,
-0.18215715885162354,
0.07845059782266617,
0.17678914964199066,
0.17252366244792938,
0.028164317831397057,
0.14649735391139984,
0.2692066729068756,
-0.24987460672855377,
0.41717660427093506,
0.2453283816576004,
0.15596917271614075,
0.24141202867031097,
0.12230034917593002,
-0.19828923046588898,
0.1370854675769806,
-0.12571294605731964,
-0.30864447355270386,
-0.4084004759788513,
-0.5016871690750122,
-0.37096330523490906,
-0.06439703702926636,
0.08024003356695175,
0.04544084891676903,
0.22287914156913757,
-0.08153830468654633,
0.22327952086925507,
-0.01978793367743492,
0.06782964617013931,
0.1477755755186081,
-0.1573438197374344,
0.08004633337259293,
0.07710640132427216,
-0.33725929260253906,
-0.08556313812732697,
-0.010415068827569485,
0.14568112790584564,
0.1661093831062317,
-0.13013288378715515,
-0.007588012609630823,
0.26485541462898254,
-0.27869611978530884,
-0.1395575851202011,
-0.3743014931678772,
0.2146129310131073,
0.6006150841712952,
0.02906435914337635,
0.09574414789676666,
0.19895713031291962,
0.33110761642456055,
-0.02902727574110031,
0.3281589150428772,
0.0018354227067902684,
0.0884845107793808,
-0.3454963266849518,
-0.14379122853279114,
0.09730521589517593,
0.2343311607837677,
0.2974603772163391,
-0.1639336794614792,
-0.07272649556398392,
0.13563098013401031,
-0.12289305031299591,
0.1785142570734024,
0.4408884346485138,
0.40364864468574524,
0.44881686568260193,
-0.015772119164466858,
0.19172066450119019,
-0.034996580332517624,
0.07225556671619415,
-0.45293283462524414,
-0.16269083321094513,
-0.011766774579882622,
0.2264556735754013,
0.26262757182121277,
-0.03178207576274872,
-0.1691291183233261,
-0.14817680418491364,
0.05834582820534706,
0.04860423132777214,
-0.08990694582462311,
-0.2431682050228119,
0.28427940607070923,
0.0681404247879982,
-0.31073710322380066,
0.31540536880493164,
0.1834629625082016,
-0.12443099915981293,
0.16956232488155365,
-0.47287842631340027,
-0.027361182495951653,
0.26600897312164307,
0.05591009557247162,
-0.4981449544429779,
0.07101476192474365,
0.08475607633590698,
-0.28536251187324524,
0.15197612345218658,
0.15375438332557678,
0.1006740927696228,
-0.16738931834697723,
0.08435695618391037,
-0.09725821018218994
] |
https://github.com/huggingface/datasets/issues/1783
|
Dataset Examples Explorer
|
Hi @ChewKokWah,
We're working on it! In the meantime, you can still find the dataset explorer at the following URL: https://huggingface.co/datasets/viewer/
|
In the Older version of the Dataset, there are a useful Dataset Explorer that allow user to visualize the examples (training, test and validation) of a particular dataset, it is no longer there in current version.
Hope HuggingFace can re-enable the feature that at least allow viewing of the first 20 examples of a particular dataset, or alternatively can extract 20 examples for each datasets and make those part of the Dataset Card Documentation.
| 21 |
Dataset Examples Explorer
|
[
-0.299111008644104,
0.039303019642829895,
-0.18064862489700317,
0.1840042918920517,
0.01818465068936348,
0.015018900856375694,
0.19308164715766907,
0.11050190776586533,
-0.14581547677516937,
0.14621736109256744,
0.19063185155391693,
0.3783967196941376,
-0.22567860782146454,
0.3426320254802704,
0.15204359591007233,
-0.2613776922225952,
0.19280460476875305,
0.2570396363735199,
0.029554594308137894,
-0.08085091412067413,
-0.07580011337995529,
0.11462589353322983,
-0.3220437169075012,
0.0999215766787529,
-0.2820705473423004,
-0.26275813579559326,
-0.23704931139945984,
0.10051194578409195,
-0.17277151346206665,
-0.3197389245033264,
-0.10355599224567413,
0.12110589444637299,
0.14579986035823822,
0.29281169176101685,
-0.00010673198994481936,
-0.20936064422130585,
0.11810927838087082,
0.037068549543619156,
-0.29780662059783936,
0.11413253843784332,
-0.7833909392356873,
0.1459510624408722,
0.051453351974487305,
-0.24579599499702454,
-0.026554549112915993,
-0.442405104637146,
0.06185693293809891,
-0.32683420181274414,
0.190464586019516,
0.19850210845470428,
0.2711450755596161,
0.14910396933555603,
-0.27444204688072205,
-0.39674505591392517,
0.18096980452537537,
0.40808483958244324,
-0.11869407445192337,
0.015145683661103249,
0.48127272725105286,
0.18776124715805054,
0.046658895909786224,
0.13421134650707245,
0.046274203807115555,
0.018559949472546577,
0.11569841206073761,
-0.010680118575692177,
-0.193507120013237,
-0.12294553220272064,
0.3919236958026886,
0.4601599872112274,
0.782121479511261,
0.04922465234994888,
-0.1787562370300293,
0.094091035425663,
-0.1531168818473816,
0.06198536232113838,
-0.06417714804410934,
0.23445439338684082,
0.12383134663105011,
0.2261658012866974,
-0.13460102677345276,
-0.12939384579658508,
-0.16294057667255402,
0.015138702467083931,
-0.3481667637825012,
0.18716555833816528,
-0.29908663034439087,
-0.055996451526880264,
0.08358459174633026,
-0.2491408735513687,
0.29453352093696594,
-0.11454673856496811,
-0.12480689585208893,
-0.11444683372974396,
-0.09822653979063034,
-0.15203598141670227,
0.18213319778442383,
0.5408421754837036,
-0.0031928664539009333,
0.15924468636512756,
0.11735114455223083,
0.21387989819049835,
0.09490838646888733,
0.14203540980815887,
0.2956196665763855,
-0.22833682596683502,
0.3851807713508606,
0.23805099725723267,
0.17022882401943207,
-0.24020232260227203,
-0.20006036758422852,
0.010753420181572437,
-0.46034249663352966,
-0.07837527990341187,
0.020130600780248642,
-0.1867658495903015,
0.05619350075721741,
-0.2607382535934448,
-0.18131853640079498,
0.012456837110221386,
0.10313893854618073,
-0.1201711893081665,
0.00991959497332573,
0.2928783595561981,
0.05161140486598015,
-0.5277736186981201,
-0.37772494554519653,
0.29590392112731934,
0.25144413113594055,
-0.33411291241645813,
-0.23554472625255585,
0.009401909075677395,
-0.08167911320924759,
-0.28648999333381653,
0.17402303218841553,
-0.016824856400489807,
0.21436713635921478,
-0.1195676326751709,
-0.3160785138607025,
0.03274235874414444,
0.5338188409805298,
-0.1781262308359146,
0.19871634244918823,
0.05666974186897278,
-0.11549381911754608,
0.018617521971464157,
-0.05024287477135658,
-0.09828042984008789,
-0.24307094514369965,
0.246845081448555,
-0.07067855447530746,
-0.20237238705158234,
-0.3955179452896118,
0.31079041957855225,
-0.09399683773517609,
-0.27226877212524414,
0.027177175506949425,
0.40303099155426025,
-0.3177618980407715,
-0.25280386209487915,
0.03400977700948715,
-0.02323881722986698,
-0.11139009147882462,
-0.08408478647470474,
0.1595088690519333,
0.1118839755654335,
-0.605320155620575,
0.15521486103534698,
-0.4163413941860199,
-0.11000823974609375,
-0.2272673100233078,
0.08586989343166351,
-0.161502867937088,
0.3297107219696045,
-0.3189120292663574,
0.31302961707115173,
0.5228374004364014,
-0.10022616386413574,
-0.11524908244609833,
0.09891822934150696,
0.09192073345184326,
-0.46485066413879395,
0.13226699829101562,
0.014537607319653034,
0.7214701175689697,
-0.2549453377723694,
-0.11069605499505997,
0.3292926549911499,
-0.17999553680419922,
0.04399107024073601,
0.060451604425907135,
-0.025090999901294708,
0.19986839592456818,
0.0293573010712862,
-0.15368324518203735,
0.08042842894792557,
0.214712455868721,
0.04268967732787132,
0.04750743508338928,
-0.24407926201820374,
0.03509356454014778,
0.20690074563026428,
0.2722328007221222,
0.10164333879947662,
0.11898092925548553,
-0.3091031610965729,
-0.25130021572113037,
-0.18436166644096375,
0.24580636620521545,
-0.19971081614494324,
0.2761189639568329,
-0.308846652507782,
-0.25909504294395447,
-0.09022390097379684,
-0.14108356833457947,
-0.06213527172803879,
0.2803572416305542,
0.08376260101795197,
-0.01900775358080864,
-0.07296842336654663,
-0.21400105953216553,
-0.39498770236968994,
0.04865071177482605,
0.011883380822837353,
0.058287568390369415,
0.15762150287628174,
0.08883584290742874,
-0.28048592805862427,
-0.01974659599363804,
-0.009457206353545189,
0.05349455401301384,
-0.24168449640274048,
0.011124365963041782,
0.2931379973888397,
0.23655705153942108,
0.22287903726100922,
0.4049397110939026,
0.39198991656303406,
-0.11961556226015091,
-0.5094932317733765,
0.4314807057380676,
0.22973333299160004,
-0.04501423239707947,
0.06583089381456375,
-0.7062368988990784,
0.17829173803329468,
0.08365029096603394,
0.08125480264425278,
0.19437268376350403,
0.10809294879436493,
0.2001120001077652,
-0.023561805486679077,
-0.006895842496305704,
-0.36687013506889343,
0.10481277108192444,
0.07650884985923767,
0.2222079038619995,
0.26210007071495056,
-0.4536258280277252,
0.2303205132484436,
0.19444513320922852,
-0.0790427178144455,
0.29743921756744385,
0.06528617441654205,
-0.378860741853714,
-0.12658511102199554,
0.41867032647132874,
0.1788184940814972,
0.24789734184741974,
0.32648301124572754,
0.3057294487953186,
-0.21594886481761932,
0.05232943594455719,
-0.07388037443161011,
0.33709385991096497,
0.11333157122135162,
0.0432114414870739,
-0.14748644828796387,
-0.09170430153608322,
0.09457515925168991,
-0.35830292105674744,
-0.2706899344921112,
0.0026974717620760202,
-0.12001068145036697,
-0.16329075396060944,
0.10345171391963959,
-0.39761748909950256,
-0.37279295921325684,
0.13696490228176117,
0.06046752631664276,
0.1952618509531021,
-0.28705883026123047,
0.05584124103188515,
0.1265227198600769,
-0.17052853107452393,
-0.019265348091721535,
-0.38267192244529724,
0.47074902057647705,
-0.08734379708766937,
0.411649227142334,
-0.03175674006342888,
-0.28700175881385803,
-0.1931358277797699,
0.27621161937713623,
0.10396385192871094,
0.45746496319770813,
0.5266731977462769,
0.028142353519797325,
0.39119240641593933,
-0.5144764184951782,
-0.46905067563056946,
0.2020062655210495,
0.16986221075057983,
0.319378137588501,
0.23691938817501068,
0.02747420407831669,
-0.23196177184581757,
-0.25058096647262573,
-0.014254266396164894,
-0.1406734585762024,
0.02863270603120327,
-0.007313899230211973,
-0.00907096266746521,
-0.14654541015625,
0.044515665620565414,
-0.2332344502210617,
-0.16658134758472443,
-0.23907370865345,
0.1136440709233284,
0.031069356948137283,
0.05367477983236313,
0.022127263247966766,
-0.03950248286128044,
0.2743862569332123,
-0.11633464694023132,
0.21971462666988373,
-0.09839318692684174,
-0.14610223472118378,
0.15867465734481812,
-0.3598267436027527,
-0.17041879892349243,
0.004534104838967323,
-0.40305012464523315,
-0.26306426525115967,
0.21045571565628052,
-0.04725024104118347,
0.0890105739235878,
-0.3636133074760437,
0.0423370897769928,
0.09318136423826218,
0.08406102657318115,
0.17808790504932404,
0.20501847565174103,
-0.2159814089536667,
-0.341090589761734,
-0.1735331416130066,
0.3290572464466095,
0.05527251213788986,
-0.048950403928756714,
-0.13993389904499054,
0.01322177704423666,
-0.09699323773384094,
0.3031381666660309,
0.014545144513249397,
-0.21527163684368134,
0.21712060272693634,
-0.18560490012168884,
0.11860557645559311,
0.14508593082427979,
0.012701078318059444,
0.2370132952928543,
0.11591660976409912,
-0.04717355594038963,
0.265049546957016,
0.26861029863357544,
-0.014525962062180042,
0.239967480301857,
-0.019486568868160248,
-0.4918714165687561,
-0.19414158165454865,
-0.17904068529605865,
-0.005448439624160528,
0.2517513036727905,
-0.08274082839488983,
-0.12489920109510422,
-0.2097344696521759,
0.03887515515089035,
-0.10694541037082672,
0.04851728677749634,
0.028668778017163277,
-0.12391909956932068,
-0.4472588896751404,
0.21764247119426727,
-0.05484040081501007,
0.07274667918682098,
-0.21473805606365204,
0.08146392554044724,
-0.23987723886966705,
-0.04768704995512962,
-0.011359107680618763,
0.23624101281166077,
0.9012351632118225,
-0.4191100597381592,
0.10616786777973175,
0.025851774960756302,
-0.14424431324005127,
-0.10728851705789566,
-0.06440220028162003,
-0.5196079611778259,
0.5216708183288574,
-0.17717628180980682,
0.355219304561615,
0.07323112338781357,
0.0001172766787931323,
0.5906888842582703,
0.2609936594963074,
-0.013812432996928692,
0.1341872364282608,
0.37879955768585205,
-0.15588803589344025,
-0.11172852665185928,
-0.059325288981199265,
0.004603425040841103,
-0.252892404794693,
0.010772479698061943,
-0.27602869272232056,
-0.3868345618247986,
0.011185725219547749,
0.2158048003911972,
0.20075757801532745,
0.3187532424926758,
-0.0159207321703434,
0.2437027394771576,
-0.005633464083075523,
0.2461448758840561,
0.27258607745170593,
0.20993225276470184,
0.11411000788211823,
-0.19968998432159424,
0.26896682381629944,
-0.4386211931705475,
0.35642799735069275,
0.11825469881296158,
-0.0006618552724830806,
0.16993838548660278,
-0.09366310387849808,
0.07334399223327637,
0.005698971915990114,
0.12616726756095886,
0.2698838710784912,
0.12530431151390076,
-0.13342581689357758,
-0.12353655695915222,
0.31951868534088135,
0.20717379450798035,
-0.32178303599357605,
0.3385618031024933,
0.29533854126930237,
-0.1667601764202118,
0.13896404206752777,
0.16605599224567413,
0.8341813087463379,
0.13331861793994904,
-0.020111849531531334,
0.17649458348751068,
-0.15591903030872345,
0.32094043493270874,
0.20631197094917297,
-0.20123900473117828,
-0.30964863300323486,
-0.563266396522522,
-0.04472528398036957,
-0.24387039244174957,
0.1899927705526352,
0.32692790031433105,
-0.5079792737960815,
-0.041202373802661896,
-0.2252575308084488,
0.03957730159163475,
0.040976352989673615,
0.09387432038784027,
0.07886504381895065,
-0.11652816087007523,
-0.1378001719713211,
0.2311374992132187,
0.3320945203304291,
-0.2809129059314728,
-0.13458484411239624,
0.09606429189443588,
-0.025580303743481636,
0.01932278834283352,
-0.22534620761871338,
-0.10614664107561111,
0.01597260870039463,
0.09390561282634735,
0.13592097163200378,
-0.3354037404060364,
0.20157815515995026,
0.15591159462928772,
0.09415028989315033,
0.034547384828329086,
-0.10254412144422531,
0.07705024629831314,
-0.017647769302129745,
0.1742260903120041,
0.01068970374763012,
-0.0157491285353899,
0.1634376347064972,
-0.013898186385631561,
-0.25213801860809326,
0.18240214884281158,
0.01571008935570717,
0.13973094522953033,
-0.11255008727312088,
0.014460933394730091,
-0.1144065111875534,
-0.0334000289440155,
-0.22840586304664612,
-0.07192816585302353,
-0.1994762271642685,
-0.1700829714536667,
0.21618221700191498,
0.13247571885585785,
0.347730427980423,
0.2861481010913849,
0.2970415949821472,
0.005044179502874613,
-0.14442181587219238,
0.14664849638938904,
-0.03276384621858597,
0.07166899740695953,
0.22215524315834045,
0.06326627731323242,
-0.0658658891916275,
-0.43381839990615845,
0.4485616683959961,
0.05998773127794266,
0.024853724986314774,
0.15730257332324982,
-0.3287495970726013,
-0.21919183433055878,
0.24994100630283356,
0.16269691288471222,
0.12445680797100067,
-0.002968024695292115,
-0.3101707398891449,
-0.19899685680866241,
0.02836035005748272,
0.32597029209136963,
0.03080396167933941,
0.3030043840408325,
-0.40177616477012634,
-0.3324161469936371,
-0.044361066073179245,
-0.11201419681310654,
-0.4502168297767639,
0.2298038899898529,
-0.11695375293493271,
0.22829808294773102,
-0.11789266765117645,
0.34139421582221985,
-0.35175037384033203,
-0.2656415104866028,
0.15034742653369904,
-0.2954856753349304,
-0.05032981187105179,
-0.3595145642757416,
-0.12834469974040985,
0.11285469681024551,
0.04920220375061035,
-0.19620627164840698,
0.23855674266815186,
-0.0026738366577774286,
-0.08897588402032852,
-0.08737713098526001,
0.005050288513302803,
-0.17582431435585022,
-0.16292625665664673,
0.0367155522108078,
-0.04546412080526352,
-0.09975495934486389,
0.05652792751789093,
-0.019119232892990112,
0.19690509140491486,
0.02587101049721241,
0.08273900300264359,
0.05012029781937599,
0.18614059686660767,
-0.09328989684581757,
0.26222825050354004,
0.2666977345943451,
0.13694489002227783,
-0.20395678281784058,
0.09734853357076645,
0.0683991089463234,
0.020201517269015312,
0.19751814007759094,
0.2727196216583252,
0.11294133216142654,
-0.03579901158809662,
0.15930092334747314,
0.12735411524772644,
0.3198159635066986,
-0.26520535349845886,
-0.19329750537872314,
0.3281693756580353,
-0.13514076173305511,
0.2572181820869446,
0.06902201473712921,
0.0882120355963707,
0.09390344470739365,
0.043465714901685715,
-0.03782988339662552,
0.2090959995985031,
0.10416211932897568,
0.3908197581768036,
0.4438839852809906,
-0.2728704512119293,
0.15187810361385345,
0.1447659432888031,
0.16589373350143433,
0.23745328187942505,
0.3684501051902771,
0.29157862067222595,
0.39248940348625183,
0.22815857827663422,
-0.005549110472202301,
0.6477372050285339,
-0.4127453565597534,
0.40823572874069214,
0.03005605936050415,
0.17096823453903198,
0.012513373978435993,
0.1067868247628212,
-0.10898645222187042,
-0.26465460658073425,
-0.16534049808979034,
-0.3034687936306,
-0.15466664731502533,
-0.036674290895462036,
0.030834775418043137,
-0.13244065642356873,
-0.34207984805107117,
-0.08242972940206528,
-0.18375155329704285,
-0.3210849463939667,
-0.11615680158138275,
0.058664921671152115,
-0.22236467897891998,
0.1503951996564865,
-0.4834771156311035,
0.44364574551582336,
-0.10398578643798828,
-0.0803946927189827,
-0.06301119923591614,
0.18824735283851624,
-0.031430359929800034,
0.030867790803313255,
0.15463481843471527,
0.5669954419136047,
0.01249800156801939,
0.15630093216896057,
0.0020147222094237804,
0.008811998181045055,
-0.11850456148386002,
-0.24334467947483063,
-0.17287245392799377,
-0.024089258164167404,
0.015821218490600586,
-0.3133091330528259,
0.16109023988246918,
0.2252930998802185,
-0.15122511982917786,
0.22138181328773499,
0.2366797775030136,
-0.24133580923080444,
-0.21449485421180725,
-0.33838942646980286,
-0.03853394091129303,
-0.33343228697776794,
0.3403201699256897,
-0.19985687732696533,
-0.12982887029647827,
-0.13441649079322815,
0.5047239065170288,
-0.055510759353637695,
0.15278980135917664,
0.23853810131549835,
0.15531370043754578,
-0.027316013351082802,
0.3483791947364807,
0.3995527923107147,
0.4275425374507904,
-0.051023077219724655,
-0.4794701635837555,
-0.4713149666786194,
0.11775053292512894,
-0.07804692536592484,
-0.11339860409498215,
0.2803005576133728,
-0.03582922741770744,
0.23949962854385376,
0.24480046331882477,
0.3656615614891052,
0.12919585406780243,
0.001357459812425077,
0.007823395542800426,
-0.37942320108413696,
-0.2715359628200531,
0.24767808616161346,
0.20320123434066772,
-0.04620988294482231,
-0.1882278323173523,
0.30908358097076416,
-0.4258081614971161,
0.1380479484796524,
-0.2699950635433197,
0.047717999666929245,
-0.13446758687496185,
-0.17439180612564087,
0.2576621174812317,
-0.17646454274654388,
0.3836163282394409,
-0.254830926656723,
0.16166536509990692,
0.0036264986265450716,
0.006978468503803015,
-0.10946547240018845,
0.2872358560562134,
0.1922401785850525,
-0.16577988862991333,
-0.16771547496318817,
-0.026107965037226677,
0.24111215770244598,
-0.3454637825489044,
0.134792298078537,
0.576798677444458,
-0.3678406774997711,
0.35177481174468994,
-0.16602477431297302,
-0.011227534152567387,
0.20830810070037842,
-0.11323397606611252,
-0.2654550075531006,
-0.13160906732082367,
0.10861600935459137,
-0.10430701822042465,
0.10170876979827881,
-0.08390175551176071,
-0.0920025035738945,
-0.4685114026069641,
0.2608684301376343,
0.03936735913157463,
-0.06925415992736816,
0.24087093770503998,
-0.11518829315900803,
0.40276819467544556,
-0.31376031041145325,
0.024875085800886154,
0.21104082465171814,
0.16706638038158417,
-0.14087232947349548,
-0.05540815740823746,
0.2659955620765686,
0.07956728339195251,
-0.16945962607860565,
-0.16292783617973328,
-0.11956463754177094
] |
https://github.com/huggingface/datasets/issues/1783
|
Dataset Examples Explorer
|
Glad to see that it still exist, this existing one is more than good enough for me, it is feature rich, simple to use and concise.
Hope similar feature can be retain in the future version.
|
In the Older version of the Dataset, there are a useful Dataset Explorer that allow user to visualize the examples (training, test and validation) of a particular dataset, it is no longer there in current version.
Hope HuggingFace can re-enable the feature that at least allow viewing of the first 20 examples of a particular dataset, or alternatively can extract 20 examples for each datasets and make those part of the Dataset Card Documentation.
| 36 |
Dataset Examples Explorer
|
[
-0.299111008644104,
0.039303019642829895,
-0.18064862489700317,
0.1840042918920517,
0.01818465068936348,
0.015018900856375694,
0.19308164715766907,
0.11050190776586533,
-0.14581547677516937,
0.14621736109256744,
0.19063185155391693,
0.3783967196941376,
-0.22567860782146454,
0.3426320254802704,
0.15204359591007233,
-0.2613776922225952,
0.19280460476875305,
0.2570396363735199,
0.029554594308137894,
-0.08085091412067413,
-0.07580011337995529,
0.11462589353322983,
-0.3220437169075012,
0.0999215766787529,
-0.2820705473423004,
-0.26275813579559326,
-0.23704931139945984,
0.10051194578409195,
-0.17277151346206665,
-0.3197389245033264,
-0.10355599224567413,
0.12110589444637299,
0.14579986035823822,
0.29281169176101685,
-0.00010673198994481936,
-0.20936064422130585,
0.11810927838087082,
0.037068549543619156,
-0.29780662059783936,
0.11413253843784332,
-0.7833909392356873,
0.1459510624408722,
0.051453351974487305,
-0.24579599499702454,
-0.026554549112915993,
-0.442405104637146,
0.06185693293809891,
-0.32683420181274414,
0.190464586019516,
0.19850210845470428,
0.2711450755596161,
0.14910396933555603,
-0.27444204688072205,
-0.39674505591392517,
0.18096980452537537,
0.40808483958244324,
-0.11869407445192337,
0.015145683661103249,
0.48127272725105286,
0.18776124715805054,
0.046658895909786224,
0.13421134650707245,
0.046274203807115555,
0.018559949472546577,
0.11569841206073761,
-0.010680118575692177,
-0.193507120013237,
-0.12294553220272064,
0.3919236958026886,
0.4601599872112274,
0.782121479511261,
0.04922465234994888,
-0.1787562370300293,
0.094091035425663,
-0.1531168818473816,
0.06198536232113838,
-0.06417714804410934,
0.23445439338684082,
0.12383134663105011,
0.2261658012866974,
-0.13460102677345276,
-0.12939384579658508,
-0.16294057667255402,
0.015138702467083931,
-0.3481667637825012,
0.18716555833816528,
-0.29908663034439087,
-0.055996451526880264,
0.08358459174633026,
-0.2491408735513687,
0.29453352093696594,
-0.11454673856496811,
-0.12480689585208893,
-0.11444683372974396,
-0.09822653979063034,
-0.15203598141670227,
0.18213319778442383,
0.5408421754837036,
-0.0031928664539009333,
0.15924468636512756,
0.11735114455223083,
0.21387989819049835,
0.09490838646888733,
0.14203540980815887,
0.2956196665763855,
-0.22833682596683502,
0.3851807713508606,
0.23805099725723267,
0.17022882401943207,
-0.24020232260227203,
-0.20006036758422852,
0.010753420181572437,
-0.46034249663352966,
-0.07837527990341187,
0.020130600780248642,
-0.1867658495903015,
0.05619350075721741,
-0.2607382535934448,
-0.18131853640079498,
0.012456837110221386,
0.10313893854618073,
-0.1201711893081665,
0.00991959497332573,
0.2928783595561981,
0.05161140486598015,
-0.5277736186981201,
-0.37772494554519653,
0.29590392112731934,
0.25144413113594055,
-0.33411291241645813,
-0.23554472625255585,
0.009401909075677395,
-0.08167911320924759,
-0.28648999333381653,
0.17402303218841553,
-0.016824856400489807,
0.21436713635921478,
-0.1195676326751709,
-0.3160785138607025,
0.03274235874414444,
0.5338188409805298,
-0.1781262308359146,
0.19871634244918823,
0.05666974186897278,
-0.11549381911754608,
0.018617521971464157,
-0.05024287477135658,
-0.09828042984008789,
-0.24307094514369965,
0.246845081448555,
-0.07067855447530746,
-0.20237238705158234,
-0.3955179452896118,
0.31079041957855225,
-0.09399683773517609,
-0.27226877212524414,
0.027177175506949425,
0.40303099155426025,
-0.3177618980407715,
-0.25280386209487915,
0.03400977700948715,
-0.02323881722986698,
-0.11139009147882462,
-0.08408478647470474,
0.1595088690519333,
0.1118839755654335,
-0.605320155620575,
0.15521486103534698,
-0.4163413941860199,
-0.11000823974609375,
-0.2272673100233078,
0.08586989343166351,
-0.161502867937088,
0.3297107219696045,
-0.3189120292663574,
0.31302961707115173,
0.5228374004364014,
-0.10022616386413574,
-0.11524908244609833,
0.09891822934150696,
0.09192073345184326,
-0.46485066413879395,
0.13226699829101562,
0.014537607319653034,
0.7214701175689697,
-0.2549453377723694,
-0.11069605499505997,
0.3292926549911499,
-0.17999553680419922,
0.04399107024073601,
0.060451604425907135,
-0.025090999901294708,
0.19986839592456818,
0.0293573010712862,
-0.15368324518203735,
0.08042842894792557,
0.214712455868721,
0.04268967732787132,
0.04750743508338928,
-0.24407926201820374,
0.03509356454014778,
0.20690074563026428,
0.2722328007221222,
0.10164333879947662,
0.11898092925548553,
-0.3091031610965729,
-0.25130021572113037,
-0.18436166644096375,
0.24580636620521545,
-0.19971081614494324,
0.2761189639568329,
-0.308846652507782,
-0.25909504294395447,
-0.09022390097379684,
-0.14108356833457947,
-0.06213527172803879,
0.2803572416305542,
0.08376260101795197,
-0.01900775358080864,
-0.07296842336654663,
-0.21400105953216553,
-0.39498770236968994,
0.04865071177482605,
0.011883380822837353,
0.058287568390369415,
0.15762150287628174,
0.08883584290742874,
-0.28048592805862427,
-0.01974659599363804,
-0.009457206353545189,
0.05349455401301384,
-0.24168449640274048,
0.011124365963041782,
0.2931379973888397,
0.23655705153942108,
0.22287903726100922,
0.4049397110939026,
0.39198991656303406,
-0.11961556226015091,
-0.5094932317733765,
0.4314807057380676,
0.22973333299160004,
-0.04501423239707947,
0.06583089381456375,
-0.7062368988990784,
0.17829173803329468,
0.08365029096603394,
0.08125480264425278,
0.19437268376350403,
0.10809294879436493,
0.2001120001077652,
-0.023561805486679077,
-0.006895842496305704,
-0.36687013506889343,
0.10481277108192444,
0.07650884985923767,
0.2222079038619995,
0.26210007071495056,
-0.4536258280277252,
0.2303205132484436,
0.19444513320922852,
-0.0790427178144455,
0.29743921756744385,
0.06528617441654205,
-0.378860741853714,
-0.12658511102199554,
0.41867032647132874,
0.1788184940814972,
0.24789734184741974,
0.32648301124572754,
0.3057294487953186,
-0.21594886481761932,
0.05232943594455719,
-0.07388037443161011,
0.33709385991096497,
0.11333157122135162,
0.0432114414870739,
-0.14748644828796387,
-0.09170430153608322,
0.09457515925168991,
-0.35830292105674744,
-0.2706899344921112,
0.0026974717620760202,
-0.12001068145036697,
-0.16329075396060944,
0.10345171391963959,
-0.39761748909950256,
-0.37279295921325684,
0.13696490228176117,
0.06046752631664276,
0.1952618509531021,
-0.28705883026123047,
0.05584124103188515,
0.1265227198600769,
-0.17052853107452393,
-0.019265348091721535,
-0.38267192244529724,
0.47074902057647705,
-0.08734379708766937,
0.411649227142334,
-0.03175674006342888,
-0.28700175881385803,
-0.1931358277797699,
0.27621161937713623,
0.10396385192871094,
0.45746496319770813,
0.5266731977462769,
0.028142353519797325,
0.39119240641593933,
-0.5144764184951782,
-0.46905067563056946,
0.2020062655210495,
0.16986221075057983,
0.319378137588501,
0.23691938817501068,
0.02747420407831669,
-0.23196177184581757,
-0.25058096647262573,
-0.014254266396164894,
-0.1406734585762024,
0.02863270603120327,
-0.007313899230211973,
-0.00907096266746521,
-0.14654541015625,
0.044515665620565414,
-0.2332344502210617,
-0.16658134758472443,
-0.23907370865345,
0.1136440709233284,
0.031069356948137283,
0.05367477983236313,
0.022127263247966766,
-0.03950248286128044,
0.2743862569332123,
-0.11633464694023132,
0.21971462666988373,
-0.09839318692684174,
-0.14610223472118378,
0.15867465734481812,
-0.3598267436027527,
-0.17041879892349243,
0.004534104838967323,
-0.40305012464523315,
-0.26306426525115967,
0.21045571565628052,
-0.04725024104118347,
0.0890105739235878,
-0.3636133074760437,
0.0423370897769928,
0.09318136423826218,
0.08406102657318115,
0.17808790504932404,
0.20501847565174103,
-0.2159814089536667,
-0.341090589761734,
-0.1735331416130066,
0.3290572464466095,
0.05527251213788986,
-0.048950403928756714,
-0.13993389904499054,
0.01322177704423666,
-0.09699323773384094,
0.3031381666660309,
0.014545144513249397,
-0.21527163684368134,
0.21712060272693634,
-0.18560490012168884,
0.11860557645559311,
0.14508593082427979,
0.012701078318059444,
0.2370132952928543,
0.11591660976409912,
-0.04717355594038963,
0.265049546957016,
0.26861029863357544,
-0.014525962062180042,
0.239967480301857,
-0.019486568868160248,
-0.4918714165687561,
-0.19414158165454865,
-0.17904068529605865,
-0.005448439624160528,
0.2517513036727905,
-0.08274082839488983,
-0.12489920109510422,
-0.2097344696521759,
0.03887515515089035,
-0.10694541037082672,
0.04851728677749634,
0.028668778017163277,
-0.12391909956932068,
-0.4472588896751404,
0.21764247119426727,
-0.05484040081501007,
0.07274667918682098,
-0.21473805606365204,
0.08146392554044724,
-0.23987723886966705,
-0.04768704995512962,
-0.011359107680618763,
0.23624101281166077,
0.9012351632118225,
-0.4191100597381592,
0.10616786777973175,
0.025851774960756302,
-0.14424431324005127,
-0.10728851705789566,
-0.06440220028162003,
-0.5196079611778259,
0.5216708183288574,
-0.17717628180980682,
0.355219304561615,
0.07323112338781357,
0.0001172766787931323,
0.5906888842582703,
0.2609936594963074,
-0.013812432996928692,
0.1341872364282608,
0.37879955768585205,
-0.15588803589344025,
-0.11172852665185928,
-0.059325288981199265,
0.004603425040841103,
-0.252892404794693,
0.010772479698061943,
-0.27602869272232056,
-0.3868345618247986,
0.011185725219547749,
0.2158048003911972,
0.20075757801532745,
0.3187532424926758,
-0.0159207321703434,
0.2437027394771576,
-0.005633464083075523,
0.2461448758840561,
0.27258607745170593,
0.20993225276470184,
0.11411000788211823,
-0.19968998432159424,
0.26896682381629944,
-0.4386211931705475,
0.35642799735069275,
0.11825469881296158,
-0.0006618552724830806,
0.16993838548660278,
-0.09366310387849808,
0.07334399223327637,
0.005698971915990114,
0.12616726756095886,
0.2698838710784912,
0.12530431151390076,
-0.13342581689357758,
-0.12353655695915222,
0.31951868534088135,
0.20717379450798035,
-0.32178303599357605,
0.3385618031024933,
0.29533854126930237,
-0.1667601764202118,
0.13896404206752777,
0.16605599224567413,
0.8341813087463379,
0.13331861793994904,
-0.020111849531531334,
0.17649458348751068,
-0.15591903030872345,
0.32094043493270874,
0.20631197094917297,
-0.20123900473117828,
-0.30964863300323486,
-0.563266396522522,
-0.04472528398036957,
-0.24387039244174957,
0.1899927705526352,
0.32692790031433105,
-0.5079792737960815,
-0.041202373802661896,
-0.2252575308084488,
0.03957730159163475,
0.040976352989673615,
0.09387432038784027,
0.07886504381895065,
-0.11652816087007523,
-0.1378001719713211,
0.2311374992132187,
0.3320945203304291,
-0.2809129059314728,
-0.13458484411239624,
0.09606429189443588,
-0.025580303743481636,
0.01932278834283352,
-0.22534620761871338,
-0.10614664107561111,
0.01597260870039463,
0.09390561282634735,
0.13592097163200378,
-0.3354037404060364,
0.20157815515995026,
0.15591159462928772,
0.09415028989315033,
0.034547384828329086,
-0.10254412144422531,
0.07705024629831314,
-0.017647769302129745,
0.1742260903120041,
0.01068970374763012,
-0.0157491285353899,
0.1634376347064972,
-0.013898186385631561,
-0.25213801860809326,
0.18240214884281158,
0.01571008935570717,
0.13973094522953033,
-0.11255008727312088,
0.014460933394730091,
-0.1144065111875534,
-0.0334000289440155,
-0.22840586304664612,
-0.07192816585302353,
-0.1994762271642685,
-0.1700829714536667,
0.21618221700191498,
0.13247571885585785,
0.347730427980423,
0.2861481010913849,
0.2970415949821472,
0.005044179502874613,
-0.14442181587219238,
0.14664849638938904,
-0.03276384621858597,
0.07166899740695953,
0.22215524315834045,
0.06326627731323242,
-0.0658658891916275,
-0.43381839990615845,
0.4485616683959961,
0.05998773127794266,
0.024853724986314774,
0.15730257332324982,
-0.3287495970726013,
-0.21919183433055878,
0.24994100630283356,
0.16269691288471222,
0.12445680797100067,
-0.002968024695292115,
-0.3101707398891449,
-0.19899685680866241,
0.02836035005748272,
0.32597029209136963,
0.03080396167933941,
0.3030043840408325,
-0.40177616477012634,
-0.3324161469936371,
-0.044361066073179245,
-0.11201419681310654,
-0.4502168297767639,
0.2298038899898529,
-0.11695375293493271,
0.22829808294773102,
-0.11789266765117645,
0.34139421582221985,
-0.35175037384033203,
-0.2656415104866028,
0.15034742653369904,
-0.2954856753349304,
-0.05032981187105179,
-0.3595145642757416,
-0.12834469974040985,
0.11285469681024551,
0.04920220375061035,
-0.19620627164840698,
0.23855674266815186,
-0.0026738366577774286,
-0.08897588402032852,
-0.08737713098526001,
0.005050288513302803,
-0.17582431435585022,
-0.16292625665664673,
0.0367155522108078,
-0.04546412080526352,
-0.09975495934486389,
0.05652792751789093,
-0.019119232892990112,
0.19690509140491486,
0.02587101049721241,
0.08273900300264359,
0.05012029781937599,
0.18614059686660767,
-0.09328989684581757,
0.26222825050354004,
0.2666977345943451,
0.13694489002227783,
-0.20395678281784058,
0.09734853357076645,
0.0683991089463234,
0.020201517269015312,
0.19751814007759094,
0.2727196216583252,
0.11294133216142654,
-0.03579901158809662,
0.15930092334747314,
0.12735411524772644,
0.3198159635066986,
-0.26520535349845886,
-0.19329750537872314,
0.3281693756580353,
-0.13514076173305511,
0.2572181820869446,
0.06902201473712921,
0.0882120355963707,
0.09390344470739365,
0.043465714901685715,
-0.03782988339662552,
0.2090959995985031,
0.10416211932897568,
0.3908197581768036,
0.4438839852809906,
-0.2728704512119293,
0.15187810361385345,
0.1447659432888031,
0.16589373350143433,
0.23745328187942505,
0.3684501051902771,
0.29157862067222595,
0.39248940348625183,
0.22815857827663422,
-0.005549110472202301,
0.6477372050285339,
-0.4127453565597534,
0.40823572874069214,
0.03005605936050415,
0.17096823453903198,
0.012513373978435993,
0.1067868247628212,
-0.10898645222187042,
-0.26465460658073425,
-0.16534049808979034,
-0.3034687936306,
-0.15466664731502533,
-0.036674290895462036,
0.030834775418043137,
-0.13244065642356873,
-0.34207984805107117,
-0.08242972940206528,
-0.18375155329704285,
-0.3210849463939667,
-0.11615680158138275,
0.058664921671152115,
-0.22236467897891998,
0.1503951996564865,
-0.4834771156311035,
0.44364574551582336,
-0.10398578643798828,
-0.0803946927189827,
-0.06301119923591614,
0.18824735283851624,
-0.031430359929800034,
0.030867790803313255,
0.15463481843471527,
0.5669954419136047,
0.01249800156801939,
0.15630093216896057,
0.0020147222094237804,
0.008811998181045055,
-0.11850456148386002,
-0.24334467947483063,
-0.17287245392799377,
-0.024089258164167404,
0.015821218490600586,
-0.3133091330528259,
0.16109023988246918,
0.2252930998802185,
-0.15122511982917786,
0.22138181328773499,
0.2366797775030136,
-0.24133580923080444,
-0.21449485421180725,
-0.33838942646980286,
-0.03853394091129303,
-0.33343228697776794,
0.3403201699256897,
-0.19985687732696533,
-0.12982887029647827,
-0.13441649079322815,
0.5047239065170288,
-0.055510759353637695,
0.15278980135917664,
0.23853810131549835,
0.15531370043754578,
-0.027316013351082802,
0.3483791947364807,
0.3995527923107147,
0.4275425374507904,
-0.051023077219724655,
-0.4794701635837555,
-0.4713149666786194,
0.11775053292512894,
-0.07804692536592484,
-0.11339860409498215,
0.2803005576133728,
-0.03582922741770744,
0.23949962854385376,
0.24480046331882477,
0.3656615614891052,
0.12919585406780243,
0.001357459812425077,
0.007823395542800426,
-0.37942320108413696,
-0.2715359628200531,
0.24767808616161346,
0.20320123434066772,
-0.04620988294482231,
-0.1882278323173523,
0.30908358097076416,
-0.4258081614971161,
0.1380479484796524,
-0.2699950635433197,
0.047717999666929245,
-0.13446758687496185,
-0.17439180612564087,
0.2576621174812317,
-0.17646454274654388,
0.3836163282394409,
-0.254830926656723,
0.16166536509990692,
0.0036264986265450716,
0.006978468503803015,
-0.10946547240018845,
0.2872358560562134,
0.1922401785850525,
-0.16577988862991333,
-0.16771547496318817,
-0.026107965037226677,
0.24111215770244598,
-0.3454637825489044,
0.134792298078537,
0.576798677444458,
-0.3678406774997711,
0.35177481174468994,
-0.16602477431297302,
-0.011227534152567387,
0.20830810070037842,
-0.11323397606611252,
-0.2654550075531006,
-0.13160906732082367,
0.10861600935459137,
-0.10430701822042465,
0.10170876979827881,
-0.08390175551176071,
-0.0920025035738945,
-0.4685114026069641,
0.2608684301376343,
0.03936735913157463,
-0.06925415992736816,
0.24087093770503998,
-0.11518829315900803,
0.40276819467544556,
-0.31376031041145325,
0.024875085800886154,
0.21104082465171814,
0.16706638038158417,
-0.14087232947349548,
-0.05540815740823746,
0.2659955620765686,
0.07956728339195251,
-0.16945962607860565,
-0.16292783617973328,
-0.11956463754177094
] |
https://github.com/huggingface/datasets/issues/1781
|
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
Hi ! I'm not able to reproduce the issue. Can you try restarting your runtime ?
The PyExtensionType is available in pyarrow starting 0.17.1 iirc. If restarting your runtime doesn't fix this, can you try updating pyarrow ?
```
pip install pyarrow --upgrade
```
|
I'm using Colab. And suddenly this morning, there is this error. Have a look below!

| 44 |
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
[
-0.1086113452911377,
0.06512317061424255,
-0.15725837647914886,
0.03943711891770363,
0.3250490128993988,
-0.06980206817388535,
0.22958116233348846,
0.36733436584472656,
-0.15316221117973328,
0.03985990956425667,
-0.10686875879764557,
0.18305529654026031,
-0.04936102777719498,
-0.02890443243086338,
0.16444292664527893,
-0.15473131835460663,
0.23767739534378052,
0.3006131052970886,
0.0293861236423254,
-0.19003333151340485,
-0.20373065769672394,
0.22060535848140717,
-0.2217443585395813,
0.1682504564523697,
-0.24704401195049286,
0.1580631583929062,
0.12321911007165909,
0.009975112043321133,
-0.2884400188922882,
-0.570590615272522,
0.18277296423912048,
-0.2181183248758316,
0.1275525540113449,
0.10459521412849426,
-0.00010302293230779469,
0.11367785930633545,
0.276191383600235,
-0.05821993574500084,
0.11633186787366867,
0.06808129698038101,
0.3897702097892761,
-0.12986603379249573,
0.14725975692272186,
-0.14526762068271637,
0.07475753873586655,
-0.28009331226348877,
-0.1291409432888031,
0.11099797487258911,
-0.037937894463539124,
0.35061144828796387,
0.3634275197982788,
0.26723381876945496,
0.4908427298069,
-0.021123696118593216,
0.5513709187507629,
-0.2793462574481964,
-0.06659653037786484,
0.33394259214401245,
0.27481818199157715,
-0.3589339554309845,
0.02223835699260235,
-0.014323651790618896,
-0.17620180547237396,
0.084986113011837,
0.33154502511024475,
-0.06015978381037712,
0.4918839931488037,
-0.11911596357822418,
-0.1410638689994812,
-0.0061705028638243675,
0.15423700213432312,
-0.3346763551235199,
-0.11001048982143402,
0.11208552867174149,
0.051859233528375626,
-0.21724247932434082,
0.06324248760938644,
0.18380855023860931,
-0.11542146652936935,
0.09442071616649628,
0.31641441583633423,
-0.0789220854640007,
-0.23369529843330383,
0.053298432379961014,
-0.26926952600479126,
0.29454079270362854,
0.09576615691184998,
-0.06507683545351028,
0.10236170142889023,
-0.015010359697043896,
0.21399062871932983,
0.1397475302219391,
-0.03454466536641121,
0.06154332682490349,
-0.018122777342796326,
0.1758187860250473,
0.2535712718963623,
0.04867531359195709,
0.16892382502555847,
-0.058940038084983826,
-0.2021256387233734,
-0.035590093582868576,
0.3758203387260437,
0.2639380395412445,
-0.036169201135635376,
0.1870136260986328,
0.039432115852832794,
-0.08231651037931442,
0.28150758147239685,
0.04221690073609352,
0.031020665541291237,
0.12279460579156876,
-0.17841844260692596,
-0.4214699864387512,
0.23876851797103882,
-0.1881083995103836,
0.3413234353065491,
-0.05164584890007973,
-0.2996431887149811,
-0.11216583847999573,
-0.1583607792854309,
-0.027622627094388008,
-0.1876922994852066,
0.3132147789001465,
-0.08103486150503159,
0.08557434380054474,
0.15201130509376526,
0.4193618595600128,
-0.28701090812683105,
-0.05579555779695511,
-0.20328937470912933,
0.3978482186794281,
-0.09669208526611328,
-0.27481067180633545,
-0.05428105592727661,
0.01252027042210102,
0.15384221076965332,
0.006539627443999052,
0.05818519741296768,
0.00912689883261919,
-0.1672937422990799,
0.13258229196071625,
-0.2907104194164276,
0.22161364555358887,
-0.03564342111349106,
-0.06278758496046066,
0.23785768449306488,
-0.1532582938671112,
-0.19553260505199432,
0.13050149381160736,
-0.21199332177639008,
-0.25532156229019165,
-0.171321839094162,
0.33551928400993347,
-0.0310931745916605,
-0.1692153364419937,
0.19403700530529022,
-0.3441431224346161,
0.0935709998011589,
-0.27452924847602844,
-0.09952707588672638,
-0.3993988633155823,
0.24586491286754608,
-0.356536865234375,
0.06609808653593063,
0.052349384874105453,
-0.30659928917884827,
-0.20425188541412354,
0.3004656136035919,
-0.31303298473358154,
0.20677483081817627,
0.1335311084985733,
-0.14058014750480652,
0.026128796860575676,
-0.04690816253423691,
0.45947861671447754,
0.23375967144966125,
-0.35058680176734924,
-0.19757986068725586,
-0.19610224664211273,
-0.051570355892181396,
-0.12302201241254807,
0.07970993220806122,
-0.17479920387268066,
0.08209651708602905,
0.07691122591495514,
0.272661954164505,
0.3091379404067993,
-0.031471893191337585,
0.14753936231136322,
-0.30176517367362976,
-0.1607133150100708,
0.28144821524620056,
0.0928168073296547,
0.08428287506103516,
-0.22045443952083588,
0.07477244734764099,
-0.23426660895347595,
0.08889351785182953,
-0.1638048142194748,
-0.06761142611503601,
0.07940530776977539,
0.3189205229282379,
0.09409866482019424,
-0.1068921685218811,
-0.12534970045089722,
-0.049709077924489975,
0.06195281818509102,
-0.3568946421146393,
0.2628631293773651,
-0.37510454654693604,
-0.040309078991413116,
-0.29975032806396484,
0.27911141514778137,
-0.4152371287345886,
-0.17977526783943176,
0.2891688346862793,
0.036049339920282364,
-0.0010461308993399143,
0.3076135218143463,
-0.072289377450943,
-0.14647576212882996,
0.1136949360370636,
0.18161191046237946,
-0.07623892277479172,
0.3167398273944855,
-0.42696091532707214,
-0.44419315457344055,
0.0995364561676979,
0.0890980213880539,
0.25754836201667786,
-0.19906118512153625,
0.0032627161126583815,
0.12259270995855331,
0.03390401229262352,
0.22843614220619202,
-0.26497894525527954,
0.20433840155601501,
0.07199010252952576,
-0.465302437543869,
0.18238966166973114,
0.05277426913380623,
0.05151262506842613,
-0.20273008942604065,
0.5143376588821411,
0.24988926947116852,
0.43167972564697266,
0.017125675454735756,
0.09840913861989975,
0.04844613000750542,
0.14257678389549255,
0.16502068936824799,
0.1316942274570465,
-0.05807364732027054,
-0.00428332993760705,
0.356400728225708,
0.024623889476060867,
-0.15076671540737152,
0.04937633126974106,
-0.11832786351442337,
0.4052496552467346,
0.04982549697160721,
0.2999396026134491,
-0.1365661770105362,
-0.35595008730888367,
-0.06453368067741394,
0.23908966779708862,
-0.41575145721435547,
0.1867656707763672,
0.2185875028371811,
-0.1315031200647354,
0.19199299812316895,
-0.05054157227277756,
-0.1958964765071869,
0.14212888479232788,
-0.03405662626028061,
0.3379880487918854,
0.18519818782806396,
0.14400681853294373,
-0.19524352252483368,
-0.4610113501548767,
-0.048648297786712646,
-0.22203026711940765,
0.08866269141435623,
-0.293259859085083,
0.04643407091498375,
-0.3336537480354309,
0.20124779641628265,
-0.045962776988744736,
-0.4639357328414917,
-0.1349489837884903,
-0.14255692064762115,
0.02736365981400013,
0.16684956848621368,
0.044340066611766815,
0.2935369908809662,
0.11676394939422607,
-0.22661656141281128,
0.20614896714687347,
-0.39511170983314514,
-0.00240628351457417,
-0.2743551433086395,
-0.24771274626255035,
0.1623540073633194,
0.0977630689740181,
-0.10103356838226318,
0.14446508884429932,
-0.21566557884216309,
0.2021045684814453,
-0.10402202606201172,
-0.3236002027988434,
0.07065878063440323,
-0.23093831539154053,
0.13151000440120697,
0.2590809166431427,
0.2341095358133316,
0.34552741050720215,
-0.041541315615177155,
0.4892686903476715,
-0.4179655611515045,
-0.29369375109672546,
0.2443261444568634,
-0.20269475877285004,
-0.2412954717874527,
-0.03904058039188385,
-0.31281450390815735,
-0.3201557993888855,
-0.26156726479530334,
-0.051241882145404816,
0.31128963828086853,
-0.04711485281586647,
0.2340032011270523,
0.3529203534126282,
0.2554924190044403,
0.010714634321630001,
0.09170179069042206,
0.08804599195718765,
0.1748228818178177,
0.3792811334133148,
-0.2130337804555893,
-0.30966421961784363,
0.12719115614891052,
-0.16024310886859894,
0.0484965518116951,
-0.08560190349817276,
-0.011294552125036716,
-0.29044315218925476,
0.04898073524236679,
0.5814245343208313,
0.049282561987638474,
0.17756766080856323,
0.38889870047569275,
0.15439118444919586,
-0.1338249146938324,
-0.023790331557393074,
-0.043666914105415344,
-0.107352614402771,
0.15535402297973633,
-0.000683322548866272,
-0.11318393796682358,
0.03556150943040848,
-0.2186332792043686,
0.5432175993919373,
-0.28776848316192627,
0.09655183553695679,
0.5222765207290649,
-0.24270814657211304,
0.0744805857539177,
-0.09959530085325241,
-0.23494572937488556,
-0.04552880674600601,
-0.14867928624153137,
0.029491160064935684,
0.16334353387355804,
-0.18428613245487213,
-0.21055065095424652,
-0.11618943512439728,
-0.055902305990457535,
-0.188084214925766,
-0.07015564292669296,
0.030202781781554222,
0.26091787219047546,
0.10817719995975494,
-0.11738184094429016,
-0.05207882821559906,
-0.11656054109334946,
0.1790028065443039,
0.2780803442001343,
-0.07227445393800735,
-0.27741843461990356,
0.09721297770738602,
-0.03246797248721123,
-0.17842815816402435,
-0.09910715371370316,
0.1808525025844574,
0.24322284758090973,
-0.10210537165403366,
0.1406468003988266,
-0.2693506181240082,
-0.04483987018465996,
-0.1812461018562317,
0.4152470827102661,
0.18342305719852448,
0.03759117051959038,
0.288759708404541,
0.12538747489452362,
-0.2836160957813263,
-0.35058319568634033,
-0.1677432358264923,
-0.47122126817703247,
0.05177326500415802,
-0.3874921500682831,
-0.34876856207847595,
0.20785218477249146,
0.16246293485164642,
0.23637688159942627,
-0.010843082331120968,
0.22664643824100494,
-0.33798375725746155,
-0.5207431316375732,
-0.49763253331184387,
-0.22744692862033844,
0.08945855498313904,
0.3680008351802826,
0.10900358855724335,
0.08045022934675217,
0.0567161999642849,
-0.19310860335826874,
-0.08185494691133499,
0.27417829632759094,
0.08200591802597046,
-0.3781062960624695,
-0.19274719059467316,
-0.07341475784778595,
-0.02090548165142536,
0.3525671064853668,
0.35708218812942505,
0.14403977990150452,
-0.5120952725410461,
-0.19660654664039612,
0.08387186378240585,
0.175694540143013,
-0.017915939912199974,
-0.19871868193149567,
0.07139482349157333,
-0.4899243116378784,
-0.20795227587223053,
0.28178077936172485,
-0.11662506312131882,
0.40191489458084106,
0.11816535145044327,
0.1298828274011612,
0.013777267187833786,
0.373060017824173,
-0.149112269282341,
0.1063920259475708,
-0.19012901186943054,
0.4270003139972687,
-0.19174310564994812,
0.06781525164842606,
0.0496499165892601,
0.7519731521606445,
0.2376597821712494,
0.20581552386283875,
0.7463887333869934,
-0.14492358267307281,
-0.029063696041703224,
-0.12752655148506165,
0.03456315025687218,
-0.34210440516471863,
0.23677292466163635,
0.004468970932066441,
-0.19760723412036896,
0.3156052827835083,
-0.2846154570579529,
-0.1282239556312561,
0.02761337161064148,
-0.2408515065908432,
0.03915446624159813,
0.1012294590473175,
-0.047006651759147644,
0.24097967147827148,
-0.08111413568258286,
-0.19358991086483002,
0.27126288414001465,
-0.057393964380025864,
0.2683134973049164,
-0.19318366050720215,
0.020995156839489937,
-0.04610279202461243,
-0.24503932893276215,
-0.045577194541692734,
0.1583879441022873,
-0.32520008087158203,
0.2609781324863434,
0.15873408317565918,
-0.20663562417030334,
-0.08064759522676468,
0.16211071610450745,
-0.013762585818767548,
-0.39726489782333374,
-0.12757766246795654,
0.09034659713506699,
0.2405894696712494,
-0.3250841498374939,
-0.09038268029689789,
0.21488994359970093,
0.37327519059181213,
-0.4429710805416107,
-0.2527886927127838,
0.3058922588825226,
-0.07450799643993378,
-0.12497574836015701,
-0.0332525297999382,
-0.007061685901135206,
0.18733982741832733,
-0.21169371902942657,
-0.19771552085876465,
-0.14886873960494995,
0.2128838747739792,
-0.29009681940078735,
0.2270805835723877,
-0.0021940574515610933,
-0.17654180526733398,
0.1322104036808014,
0.18531224131584167,
0.006167884916067123,
-0.18012718856334686,
0.07509690523147583,
0.043110739439725876,
0.06849491596221924,
0.2944182753562927,
0.13181790709495544,
-0.22371259331703186,
-0.2433735430240631,
-0.004169962368905544,
0.09315139800310135,
-0.21993184089660645,
0.0788566917181015,
0.0643019899725914,
-0.22213223576545715,
-0.06942787766456604,
0.44018498063087463,
0.19250531494617462,
0.0031595502514392138,
0.030419601127505302,
-0.09706271439790726,
-0.09069792926311493,
0.20257478952407837,
0.25962913036346436,
-0.020371705293655396,
0.12116187810897827,
0.48860403895378113,
0.21544581651687622,
-0.05923272296786308,
-0.3902040719985962,
0.056552547961473465,
0.04766376316547394,
0.0556873120367527,
-0.03081575036048889,
-0.23912210762500763,
0.02274005487561226,
0.15407732129096985,
0.31676551699638367,
0.010070030577480793,
-0.09266052395105362,
-0.3281960189342499,
-0.1877044290304184,
0.05723389983177185,
-0.11094387620687485,
0.08506618440151215,
0.43644675612449646,
0.026775775477290154,
-0.06125403940677643,
0.11252915114164352,
0.07068334519863129,
-0.07970404624938965,
-0.2468464970588684,
0.2264874130487442,
0.36269041895866394,
-0.06805676966905594,
0.02610788121819496,
-0.04546720162034035,
-0.25028443336486816,
0.2912465035915375,
0.007569948211312294,
-0.0260531734675169,
-0.11881964653730392,
-0.08555715531110764,
0.013406566344201565,
0.09396007657051086,
0.0464375764131546,
0.037338729947805405,
0.2643769085407257,
-0.34523144364356995,
-0.04891335591673851,
-0.230882927775383,
0.10038634389638901,
0.36443307995796204,
-0.3190179467201233,
0.23133307695388794,
0.15244436264038086,
0.29954972863197327,
-0.3688792586326599,
-0.033575162291526794,
0.1628161519765854,
-0.2780487537384033,
0.11847273260354996,
0.19178658723831177,
0.06041121482849121,
0.07580944895744324,
0.10058355331420898,
0.16471803188323975,
0.1801488697528839,
0.14030490815639496,
0.0034219480585306883,
0.19959360361099243,
-0.26130253076553345,
0.13356833159923553,
0.36418288946151733,
0.15566658973693848,
0.2123638242483139,
0.2593286633491516,
-0.3108849823474884,
0.16929535567760468,
-0.24349534511566162,
-0.14435012638568878,
0.08641477674245834,
-0.12308899313211441,
0.05084731802344322,
-0.033158671110868454,
0.20026186108589172,
-0.08992324024438858,
0.22876231372356415,
0.39877182245254517,
0.08297352492809296,
-0.08028271794319153,
-0.018471108749508858,
0.5636407732963562,
-0.04278891161084175,
0.04569486156105995,
0.02355133183300495,
-0.06384578347206116,
0.015876293182373047,
-0.035995662212371826,
0.04533308371901512,
-0.14629630744457245,
0.11279059201478958,
0.1300174742937088,
-0.12844665348529816,
-0.28811055421829224,
0.32840585708618164,
-0.2077627032995224,
0.10549244284629822,
-0.1421724110841751,
0.13120456039905548,
0.14904727041721344,
-0.19649043679237366,
-0.3196724057197571,
0.1446559876203537,
0.5665192008018494,
0.23376516997814178,
-0.2846974730491638,
-0.16925592720508575,
-0.307625412940979,
-0.13137540221214294,
-0.044211335480213165,
-0.15733280777931213,
0.14199663698673248,
0.44088539481163025,
0.14332309365272522,
0.2899540662765503,
-0.33386024832725525,
-0.0749085322022438,
0.07460911571979523,
-0.22738412022590637,
-0.015294059179723263,
0.268747478723526,
-0.1454828977584839,
-0.3385293185710907,
-0.3799648880958557,
0.0053667533211410046,
-0.2112448811531067,
0.16648368537425995,
0.16139674186706543,
0.18317636847496033,
-0.03464290127158165,
-0.15411780774593353,
0.14882034063339233,
0.1440841406583786,
0.3107938766479492,
0.1784863919019699,
0.40650320053100586,
-0.02803225629031658,
-0.01962614804506302,
-0.3941384553909302,
0.4153843820095062,
-0.235928013920784,
-0.05590799078345299,
0.05059751868247986,
0.07281151413917542,
0.1040261834859848,
0.20528040826320648,
0.07348258048295975,
0.21190929412841797,
-0.04531877115368843,
-0.1047842800617218,
-0.2870411276817322,
-0.03309822827577591,
0.0803523138165474,
-0.17355656623840332,
0.028197534382343292,
-0.23542620241641998,
0.142124205827713,
-0.45138490200042725,
0.333074688911438,
-0.3452714681625366,
0.01480571273714304,
0.03782904893159866,
-0.15690891444683075,
0.5395144820213318,
-0.09204137325286865,
0.508366048336029,
-0.036606818437576294,
0.012711111456155777,
0.03198886290192604,
-0.22203265130519867,
-0.13529062271118164,
0.044944532215595245,
-0.02831845171749592,
0.20802997052669525,
0.052947722375392914,
-0.2666279077529907,
-0.3369673490524292,
0.4671844244003296,
0.2361292690038681,
-0.1110408827662468,
-0.082281693816185,
0.3695032000541687,
0.14230261743068695,
-0.026355046778917313,
-0.19131335616111755,
-0.029219316318631172,
-0.09270915389060974,
-0.04081449657678604,
-0.4126972258090973,
-0.5391817688941956,
0.3032609522342682,
-0.19595110416412354,
-0.4182926118373871,
0.11281973868608475,
0.13544940948486328,
-0.240449920296669,
-0.15280236303806305,
-0.3107033967971802,
0.23801927268505096,
0.18062777817249298,
0.11989664286375046,
-0.38574016094207764,
0.2670605778694153,
-0.04676920548081398,
-0.08931940793991089,
0.029022585600614548,
0.28484803438186646,
-0.023330476135015488,
0.11738967895507812,
-0.2085888683795929,
-0.1044091135263443
] |
https://github.com/huggingface/datasets/issues/1781
|
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
Yes indeed.
Also it looks like Pyarrow 3.0.0 got released on pypi 10 hours ago. This might be related to the bug, I'll investigate
EDIT: looks like the 3.0.0 release doesn't have unexpected breaking changes for us, so I don't think the issue comes from that
|
I'm using Colab. And suddenly this morning, there is this error. Have a look below!

| 46 |
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
[
-0.1086113452911377,
0.06512317061424255,
-0.15725837647914886,
0.03943711891770363,
0.3250490128993988,
-0.06980206817388535,
0.22958116233348846,
0.36733436584472656,
-0.15316221117973328,
0.03985990956425667,
-0.10686875879764557,
0.18305529654026031,
-0.04936102777719498,
-0.02890443243086338,
0.16444292664527893,
-0.15473131835460663,
0.23767739534378052,
0.3006131052970886,
0.0293861236423254,
-0.19003333151340485,
-0.20373065769672394,
0.22060535848140717,
-0.2217443585395813,
0.1682504564523697,
-0.24704401195049286,
0.1580631583929062,
0.12321911007165909,
0.009975112043321133,
-0.2884400188922882,
-0.570590615272522,
0.18277296423912048,
-0.2181183248758316,
0.1275525540113449,
0.10459521412849426,
-0.00010302293230779469,
0.11367785930633545,
0.276191383600235,
-0.05821993574500084,
0.11633186787366867,
0.06808129698038101,
0.3897702097892761,
-0.12986603379249573,
0.14725975692272186,
-0.14526762068271637,
0.07475753873586655,
-0.28009331226348877,
-0.1291409432888031,
0.11099797487258911,
-0.037937894463539124,
0.35061144828796387,
0.3634275197982788,
0.26723381876945496,
0.4908427298069,
-0.021123696118593216,
0.5513709187507629,
-0.2793462574481964,
-0.06659653037786484,
0.33394259214401245,
0.27481818199157715,
-0.3589339554309845,
0.02223835699260235,
-0.014323651790618896,
-0.17620180547237396,
0.084986113011837,
0.33154502511024475,
-0.06015978381037712,
0.4918839931488037,
-0.11911596357822418,
-0.1410638689994812,
-0.0061705028638243675,
0.15423700213432312,
-0.3346763551235199,
-0.11001048982143402,
0.11208552867174149,
0.051859233528375626,
-0.21724247932434082,
0.06324248760938644,
0.18380855023860931,
-0.11542146652936935,
0.09442071616649628,
0.31641441583633423,
-0.0789220854640007,
-0.23369529843330383,
0.053298432379961014,
-0.26926952600479126,
0.29454079270362854,
0.09576615691184998,
-0.06507683545351028,
0.10236170142889023,
-0.015010359697043896,
0.21399062871932983,
0.1397475302219391,
-0.03454466536641121,
0.06154332682490349,
-0.018122777342796326,
0.1758187860250473,
0.2535712718963623,
0.04867531359195709,
0.16892382502555847,
-0.058940038084983826,
-0.2021256387233734,
-0.035590093582868576,
0.3758203387260437,
0.2639380395412445,
-0.036169201135635376,
0.1870136260986328,
0.039432115852832794,
-0.08231651037931442,
0.28150758147239685,
0.04221690073609352,
0.031020665541291237,
0.12279460579156876,
-0.17841844260692596,
-0.4214699864387512,
0.23876851797103882,
-0.1881083995103836,
0.3413234353065491,
-0.05164584890007973,
-0.2996431887149811,
-0.11216583847999573,
-0.1583607792854309,
-0.027622627094388008,
-0.1876922994852066,
0.3132147789001465,
-0.08103486150503159,
0.08557434380054474,
0.15201130509376526,
0.4193618595600128,
-0.28701090812683105,
-0.05579555779695511,
-0.20328937470912933,
0.3978482186794281,
-0.09669208526611328,
-0.27481067180633545,
-0.05428105592727661,
0.01252027042210102,
0.15384221076965332,
0.006539627443999052,
0.05818519741296768,
0.00912689883261919,
-0.1672937422990799,
0.13258229196071625,
-0.2907104194164276,
0.22161364555358887,
-0.03564342111349106,
-0.06278758496046066,
0.23785768449306488,
-0.1532582938671112,
-0.19553260505199432,
0.13050149381160736,
-0.21199332177639008,
-0.25532156229019165,
-0.171321839094162,
0.33551928400993347,
-0.0310931745916605,
-0.1692153364419937,
0.19403700530529022,
-0.3441431224346161,
0.0935709998011589,
-0.27452924847602844,
-0.09952707588672638,
-0.3993988633155823,
0.24586491286754608,
-0.356536865234375,
0.06609808653593063,
0.052349384874105453,
-0.30659928917884827,
-0.20425188541412354,
0.3004656136035919,
-0.31303298473358154,
0.20677483081817627,
0.1335311084985733,
-0.14058014750480652,
0.026128796860575676,
-0.04690816253423691,
0.45947861671447754,
0.23375967144966125,
-0.35058680176734924,
-0.19757986068725586,
-0.19610224664211273,
-0.051570355892181396,
-0.12302201241254807,
0.07970993220806122,
-0.17479920387268066,
0.08209651708602905,
0.07691122591495514,
0.272661954164505,
0.3091379404067993,
-0.031471893191337585,
0.14753936231136322,
-0.30176517367362976,
-0.1607133150100708,
0.28144821524620056,
0.0928168073296547,
0.08428287506103516,
-0.22045443952083588,
0.07477244734764099,
-0.23426660895347595,
0.08889351785182953,
-0.1638048142194748,
-0.06761142611503601,
0.07940530776977539,
0.3189205229282379,
0.09409866482019424,
-0.1068921685218811,
-0.12534970045089722,
-0.049709077924489975,
0.06195281818509102,
-0.3568946421146393,
0.2628631293773651,
-0.37510454654693604,
-0.040309078991413116,
-0.29975032806396484,
0.27911141514778137,
-0.4152371287345886,
-0.17977526783943176,
0.2891688346862793,
0.036049339920282364,
-0.0010461308993399143,
0.3076135218143463,
-0.072289377450943,
-0.14647576212882996,
0.1136949360370636,
0.18161191046237946,
-0.07623892277479172,
0.3167398273944855,
-0.42696091532707214,
-0.44419315457344055,
0.0995364561676979,
0.0890980213880539,
0.25754836201667786,
-0.19906118512153625,
0.0032627161126583815,
0.12259270995855331,
0.03390401229262352,
0.22843614220619202,
-0.26497894525527954,
0.20433840155601501,
0.07199010252952576,
-0.465302437543869,
0.18238966166973114,
0.05277426913380623,
0.05151262506842613,
-0.20273008942604065,
0.5143376588821411,
0.24988926947116852,
0.43167972564697266,
0.017125675454735756,
0.09840913861989975,
0.04844613000750542,
0.14257678389549255,
0.16502068936824799,
0.1316942274570465,
-0.05807364732027054,
-0.00428332993760705,
0.356400728225708,
0.024623889476060867,
-0.15076671540737152,
0.04937633126974106,
-0.11832786351442337,
0.4052496552467346,
0.04982549697160721,
0.2999396026134491,
-0.1365661770105362,
-0.35595008730888367,
-0.06453368067741394,
0.23908966779708862,
-0.41575145721435547,
0.1867656707763672,
0.2185875028371811,
-0.1315031200647354,
0.19199299812316895,
-0.05054157227277756,
-0.1958964765071869,
0.14212888479232788,
-0.03405662626028061,
0.3379880487918854,
0.18519818782806396,
0.14400681853294373,
-0.19524352252483368,
-0.4610113501548767,
-0.048648297786712646,
-0.22203026711940765,
0.08866269141435623,
-0.293259859085083,
0.04643407091498375,
-0.3336537480354309,
0.20124779641628265,
-0.045962776988744736,
-0.4639357328414917,
-0.1349489837884903,
-0.14255692064762115,
0.02736365981400013,
0.16684956848621368,
0.044340066611766815,
0.2935369908809662,
0.11676394939422607,
-0.22661656141281128,
0.20614896714687347,
-0.39511170983314514,
-0.00240628351457417,
-0.2743551433086395,
-0.24771274626255035,
0.1623540073633194,
0.0977630689740181,
-0.10103356838226318,
0.14446508884429932,
-0.21566557884216309,
0.2021045684814453,
-0.10402202606201172,
-0.3236002027988434,
0.07065878063440323,
-0.23093831539154053,
0.13151000440120697,
0.2590809166431427,
0.2341095358133316,
0.34552741050720215,
-0.041541315615177155,
0.4892686903476715,
-0.4179655611515045,
-0.29369375109672546,
0.2443261444568634,
-0.20269475877285004,
-0.2412954717874527,
-0.03904058039188385,
-0.31281450390815735,
-0.3201557993888855,
-0.26156726479530334,
-0.051241882145404816,
0.31128963828086853,
-0.04711485281586647,
0.2340032011270523,
0.3529203534126282,
0.2554924190044403,
0.010714634321630001,
0.09170179069042206,
0.08804599195718765,
0.1748228818178177,
0.3792811334133148,
-0.2130337804555893,
-0.30966421961784363,
0.12719115614891052,
-0.16024310886859894,
0.0484965518116951,
-0.08560190349817276,
-0.011294552125036716,
-0.29044315218925476,
0.04898073524236679,
0.5814245343208313,
0.049282561987638474,
0.17756766080856323,
0.38889870047569275,
0.15439118444919586,
-0.1338249146938324,
-0.023790331557393074,
-0.043666914105415344,
-0.107352614402771,
0.15535402297973633,
-0.000683322548866272,
-0.11318393796682358,
0.03556150943040848,
-0.2186332792043686,
0.5432175993919373,
-0.28776848316192627,
0.09655183553695679,
0.5222765207290649,
-0.24270814657211304,
0.0744805857539177,
-0.09959530085325241,
-0.23494572937488556,
-0.04552880674600601,
-0.14867928624153137,
0.029491160064935684,
0.16334353387355804,
-0.18428613245487213,
-0.21055065095424652,
-0.11618943512439728,
-0.055902305990457535,
-0.188084214925766,
-0.07015564292669296,
0.030202781781554222,
0.26091787219047546,
0.10817719995975494,
-0.11738184094429016,
-0.05207882821559906,
-0.11656054109334946,
0.1790028065443039,
0.2780803442001343,
-0.07227445393800735,
-0.27741843461990356,
0.09721297770738602,
-0.03246797248721123,
-0.17842815816402435,
-0.09910715371370316,
0.1808525025844574,
0.24322284758090973,
-0.10210537165403366,
0.1406468003988266,
-0.2693506181240082,
-0.04483987018465996,
-0.1812461018562317,
0.4152470827102661,
0.18342305719852448,
0.03759117051959038,
0.288759708404541,
0.12538747489452362,
-0.2836160957813263,
-0.35058319568634033,
-0.1677432358264923,
-0.47122126817703247,
0.05177326500415802,
-0.3874921500682831,
-0.34876856207847595,
0.20785218477249146,
0.16246293485164642,
0.23637688159942627,
-0.010843082331120968,
0.22664643824100494,
-0.33798375725746155,
-0.5207431316375732,
-0.49763253331184387,
-0.22744692862033844,
0.08945855498313904,
0.3680008351802826,
0.10900358855724335,
0.08045022934675217,
0.0567161999642849,
-0.19310860335826874,
-0.08185494691133499,
0.27417829632759094,
0.08200591802597046,
-0.3781062960624695,
-0.19274719059467316,
-0.07341475784778595,
-0.02090548165142536,
0.3525671064853668,
0.35708218812942505,
0.14403977990150452,
-0.5120952725410461,
-0.19660654664039612,
0.08387186378240585,
0.175694540143013,
-0.017915939912199974,
-0.19871868193149567,
0.07139482349157333,
-0.4899243116378784,
-0.20795227587223053,
0.28178077936172485,
-0.11662506312131882,
0.40191489458084106,
0.11816535145044327,
0.1298828274011612,
0.013777267187833786,
0.373060017824173,
-0.149112269282341,
0.1063920259475708,
-0.19012901186943054,
0.4270003139972687,
-0.19174310564994812,
0.06781525164842606,
0.0496499165892601,
0.7519731521606445,
0.2376597821712494,
0.20581552386283875,
0.7463887333869934,
-0.14492358267307281,
-0.029063696041703224,
-0.12752655148506165,
0.03456315025687218,
-0.34210440516471863,
0.23677292466163635,
0.004468970932066441,
-0.19760723412036896,
0.3156052827835083,
-0.2846154570579529,
-0.1282239556312561,
0.02761337161064148,
-0.2408515065908432,
0.03915446624159813,
0.1012294590473175,
-0.047006651759147644,
0.24097967147827148,
-0.08111413568258286,
-0.19358991086483002,
0.27126288414001465,
-0.057393964380025864,
0.2683134973049164,
-0.19318366050720215,
0.020995156839489937,
-0.04610279202461243,
-0.24503932893276215,
-0.045577194541692734,
0.1583879441022873,
-0.32520008087158203,
0.2609781324863434,
0.15873408317565918,
-0.20663562417030334,
-0.08064759522676468,
0.16211071610450745,
-0.013762585818767548,
-0.39726489782333374,
-0.12757766246795654,
0.09034659713506699,
0.2405894696712494,
-0.3250841498374939,
-0.09038268029689789,
0.21488994359970093,
0.37327519059181213,
-0.4429710805416107,
-0.2527886927127838,
0.3058922588825226,
-0.07450799643993378,
-0.12497574836015701,
-0.0332525297999382,
-0.007061685901135206,
0.18733982741832733,
-0.21169371902942657,
-0.19771552085876465,
-0.14886873960494995,
0.2128838747739792,
-0.29009681940078735,
0.2270805835723877,
-0.0021940574515610933,
-0.17654180526733398,
0.1322104036808014,
0.18531224131584167,
0.006167884916067123,
-0.18012718856334686,
0.07509690523147583,
0.043110739439725876,
0.06849491596221924,
0.2944182753562927,
0.13181790709495544,
-0.22371259331703186,
-0.2433735430240631,
-0.004169962368905544,
0.09315139800310135,
-0.21993184089660645,
0.0788566917181015,
0.0643019899725914,
-0.22213223576545715,
-0.06942787766456604,
0.44018498063087463,
0.19250531494617462,
0.0031595502514392138,
0.030419601127505302,
-0.09706271439790726,
-0.09069792926311493,
0.20257478952407837,
0.25962913036346436,
-0.020371705293655396,
0.12116187810897827,
0.48860403895378113,
0.21544581651687622,
-0.05923272296786308,
-0.3902040719985962,
0.056552547961473465,
0.04766376316547394,
0.0556873120367527,
-0.03081575036048889,
-0.23912210762500763,
0.02274005487561226,
0.15407732129096985,
0.31676551699638367,
0.010070030577480793,
-0.09266052395105362,
-0.3281960189342499,
-0.1877044290304184,
0.05723389983177185,
-0.11094387620687485,
0.08506618440151215,
0.43644675612449646,
0.026775775477290154,
-0.06125403940677643,
0.11252915114164352,
0.07068334519863129,
-0.07970404624938965,
-0.2468464970588684,
0.2264874130487442,
0.36269041895866394,
-0.06805676966905594,
0.02610788121819496,
-0.04546720162034035,
-0.25028443336486816,
0.2912465035915375,
0.007569948211312294,
-0.0260531734675169,
-0.11881964653730392,
-0.08555715531110764,
0.013406566344201565,
0.09396007657051086,
0.0464375764131546,
0.037338729947805405,
0.2643769085407257,
-0.34523144364356995,
-0.04891335591673851,
-0.230882927775383,
0.10038634389638901,
0.36443307995796204,
-0.3190179467201233,
0.23133307695388794,
0.15244436264038086,
0.29954972863197327,
-0.3688792586326599,
-0.033575162291526794,
0.1628161519765854,
-0.2780487537384033,
0.11847273260354996,
0.19178658723831177,
0.06041121482849121,
0.07580944895744324,
0.10058355331420898,
0.16471803188323975,
0.1801488697528839,
0.14030490815639496,
0.0034219480585306883,
0.19959360361099243,
-0.26130253076553345,
0.13356833159923553,
0.36418288946151733,
0.15566658973693848,
0.2123638242483139,
0.2593286633491516,
-0.3108849823474884,
0.16929535567760468,
-0.24349534511566162,
-0.14435012638568878,
0.08641477674245834,
-0.12308899313211441,
0.05084731802344322,
-0.033158671110868454,
0.20026186108589172,
-0.08992324024438858,
0.22876231372356415,
0.39877182245254517,
0.08297352492809296,
-0.08028271794319153,
-0.018471108749508858,
0.5636407732963562,
-0.04278891161084175,
0.04569486156105995,
0.02355133183300495,
-0.06384578347206116,
0.015876293182373047,
-0.035995662212371826,
0.04533308371901512,
-0.14629630744457245,
0.11279059201478958,
0.1300174742937088,
-0.12844665348529816,
-0.28811055421829224,
0.32840585708618164,
-0.2077627032995224,
0.10549244284629822,
-0.1421724110841751,
0.13120456039905548,
0.14904727041721344,
-0.19649043679237366,
-0.3196724057197571,
0.1446559876203537,
0.5665192008018494,
0.23376516997814178,
-0.2846974730491638,
-0.16925592720508575,
-0.307625412940979,
-0.13137540221214294,
-0.044211335480213165,
-0.15733280777931213,
0.14199663698673248,
0.44088539481163025,
0.14332309365272522,
0.2899540662765503,
-0.33386024832725525,
-0.0749085322022438,
0.07460911571979523,
-0.22738412022590637,
-0.015294059179723263,
0.268747478723526,
-0.1454828977584839,
-0.3385293185710907,
-0.3799648880958557,
0.0053667533211410046,
-0.2112448811531067,
0.16648368537425995,
0.16139674186706543,
0.18317636847496033,
-0.03464290127158165,
-0.15411780774593353,
0.14882034063339233,
0.1440841406583786,
0.3107938766479492,
0.1784863919019699,
0.40650320053100586,
-0.02803225629031658,
-0.01962614804506302,
-0.3941384553909302,
0.4153843820095062,
-0.235928013920784,
-0.05590799078345299,
0.05059751868247986,
0.07281151413917542,
0.1040261834859848,
0.20528040826320648,
0.07348258048295975,
0.21190929412841797,
-0.04531877115368843,
-0.1047842800617218,
-0.2870411276817322,
-0.03309822827577591,
0.0803523138165474,
-0.17355656623840332,
0.028197534382343292,
-0.23542620241641998,
0.142124205827713,
-0.45138490200042725,
0.333074688911438,
-0.3452714681625366,
0.01480571273714304,
0.03782904893159866,
-0.15690891444683075,
0.5395144820213318,
-0.09204137325286865,
0.508366048336029,
-0.036606818437576294,
0.012711111456155777,
0.03198886290192604,
-0.22203265130519867,
-0.13529062271118164,
0.044944532215595245,
-0.02831845171749592,
0.20802997052669525,
0.052947722375392914,
-0.2666279077529907,
-0.3369673490524292,
0.4671844244003296,
0.2361292690038681,
-0.1110408827662468,
-0.082281693816185,
0.3695032000541687,
0.14230261743068695,
-0.026355046778917313,
-0.19131335616111755,
-0.029219316318631172,
-0.09270915389060974,
-0.04081449657678604,
-0.4126972258090973,
-0.5391817688941956,
0.3032609522342682,
-0.19595110416412354,
-0.4182926118373871,
0.11281973868608475,
0.13544940948486328,
-0.240449920296669,
-0.15280236303806305,
-0.3107033967971802,
0.23801927268505096,
0.18062777817249298,
0.11989664286375046,
-0.38574016094207764,
0.2670605778694153,
-0.04676920548081398,
-0.08931940793991089,
0.029022585600614548,
0.28484803438186646,
-0.023330476135015488,
0.11738967895507812,
-0.2085888683795929,
-0.1044091135263443
] |
https://github.com/huggingface/datasets/issues/1781
|
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
Installing datasets installs pyarrow>=0.17.1 so in theory it doesn't matter which version of pyarrow colab has by default (which is currently pyarrow 0.14.1).
Also now the colab runtime refresh the pyarrow version automatically after the update from pip (previously you needed to restart your runtime).
I guess what happened is that Colab didn't refresh pyarrow for some reason, and the AttributeError was raised *before* the pyarrow version check from `datasets` at https://github.com/huggingface/datasets/blob/master/src/datasets/__init__.py#L60
|
I'm using Colab. And suddenly this morning, there is this error. Have a look below!

| 72 |
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
[
-0.1086113452911377,
0.06512317061424255,
-0.15725837647914886,
0.03943711891770363,
0.3250490128993988,
-0.06980206817388535,
0.22958116233348846,
0.36733436584472656,
-0.15316221117973328,
0.03985990956425667,
-0.10686875879764557,
0.18305529654026031,
-0.04936102777719498,
-0.02890443243086338,
0.16444292664527893,
-0.15473131835460663,
0.23767739534378052,
0.3006131052970886,
0.0293861236423254,
-0.19003333151340485,
-0.20373065769672394,
0.22060535848140717,
-0.2217443585395813,
0.1682504564523697,
-0.24704401195049286,
0.1580631583929062,
0.12321911007165909,
0.009975112043321133,
-0.2884400188922882,
-0.570590615272522,
0.18277296423912048,
-0.2181183248758316,
0.1275525540113449,
0.10459521412849426,
-0.00010302293230779469,
0.11367785930633545,
0.276191383600235,
-0.05821993574500084,
0.11633186787366867,
0.06808129698038101,
0.3897702097892761,
-0.12986603379249573,
0.14725975692272186,
-0.14526762068271637,
0.07475753873586655,
-0.28009331226348877,
-0.1291409432888031,
0.11099797487258911,
-0.037937894463539124,
0.35061144828796387,
0.3634275197982788,
0.26723381876945496,
0.4908427298069,
-0.021123696118593216,
0.5513709187507629,
-0.2793462574481964,
-0.06659653037786484,
0.33394259214401245,
0.27481818199157715,
-0.3589339554309845,
0.02223835699260235,
-0.014323651790618896,
-0.17620180547237396,
0.084986113011837,
0.33154502511024475,
-0.06015978381037712,
0.4918839931488037,
-0.11911596357822418,
-0.1410638689994812,
-0.0061705028638243675,
0.15423700213432312,
-0.3346763551235199,
-0.11001048982143402,
0.11208552867174149,
0.051859233528375626,
-0.21724247932434082,
0.06324248760938644,
0.18380855023860931,
-0.11542146652936935,
0.09442071616649628,
0.31641441583633423,
-0.0789220854640007,
-0.23369529843330383,
0.053298432379961014,
-0.26926952600479126,
0.29454079270362854,
0.09576615691184998,
-0.06507683545351028,
0.10236170142889023,
-0.015010359697043896,
0.21399062871932983,
0.1397475302219391,
-0.03454466536641121,
0.06154332682490349,
-0.018122777342796326,
0.1758187860250473,
0.2535712718963623,
0.04867531359195709,
0.16892382502555847,
-0.058940038084983826,
-0.2021256387233734,
-0.035590093582868576,
0.3758203387260437,
0.2639380395412445,
-0.036169201135635376,
0.1870136260986328,
0.039432115852832794,
-0.08231651037931442,
0.28150758147239685,
0.04221690073609352,
0.031020665541291237,
0.12279460579156876,
-0.17841844260692596,
-0.4214699864387512,
0.23876851797103882,
-0.1881083995103836,
0.3413234353065491,
-0.05164584890007973,
-0.2996431887149811,
-0.11216583847999573,
-0.1583607792854309,
-0.027622627094388008,
-0.1876922994852066,
0.3132147789001465,
-0.08103486150503159,
0.08557434380054474,
0.15201130509376526,
0.4193618595600128,
-0.28701090812683105,
-0.05579555779695511,
-0.20328937470912933,
0.3978482186794281,
-0.09669208526611328,
-0.27481067180633545,
-0.05428105592727661,
0.01252027042210102,
0.15384221076965332,
0.006539627443999052,
0.05818519741296768,
0.00912689883261919,
-0.1672937422990799,
0.13258229196071625,
-0.2907104194164276,
0.22161364555358887,
-0.03564342111349106,
-0.06278758496046066,
0.23785768449306488,
-0.1532582938671112,
-0.19553260505199432,
0.13050149381160736,
-0.21199332177639008,
-0.25532156229019165,
-0.171321839094162,
0.33551928400993347,
-0.0310931745916605,
-0.1692153364419937,
0.19403700530529022,
-0.3441431224346161,
0.0935709998011589,
-0.27452924847602844,
-0.09952707588672638,
-0.3993988633155823,
0.24586491286754608,
-0.356536865234375,
0.06609808653593063,
0.052349384874105453,
-0.30659928917884827,
-0.20425188541412354,
0.3004656136035919,
-0.31303298473358154,
0.20677483081817627,
0.1335311084985733,
-0.14058014750480652,
0.026128796860575676,
-0.04690816253423691,
0.45947861671447754,
0.23375967144966125,
-0.35058680176734924,
-0.19757986068725586,
-0.19610224664211273,
-0.051570355892181396,
-0.12302201241254807,
0.07970993220806122,
-0.17479920387268066,
0.08209651708602905,
0.07691122591495514,
0.272661954164505,
0.3091379404067993,
-0.031471893191337585,
0.14753936231136322,
-0.30176517367362976,
-0.1607133150100708,
0.28144821524620056,
0.0928168073296547,
0.08428287506103516,
-0.22045443952083588,
0.07477244734764099,
-0.23426660895347595,
0.08889351785182953,
-0.1638048142194748,
-0.06761142611503601,
0.07940530776977539,
0.3189205229282379,
0.09409866482019424,
-0.1068921685218811,
-0.12534970045089722,
-0.049709077924489975,
0.06195281818509102,
-0.3568946421146393,
0.2628631293773651,
-0.37510454654693604,
-0.040309078991413116,
-0.29975032806396484,
0.27911141514778137,
-0.4152371287345886,
-0.17977526783943176,
0.2891688346862793,
0.036049339920282364,
-0.0010461308993399143,
0.3076135218143463,
-0.072289377450943,
-0.14647576212882996,
0.1136949360370636,
0.18161191046237946,
-0.07623892277479172,
0.3167398273944855,
-0.42696091532707214,
-0.44419315457344055,
0.0995364561676979,
0.0890980213880539,
0.25754836201667786,
-0.19906118512153625,
0.0032627161126583815,
0.12259270995855331,
0.03390401229262352,
0.22843614220619202,
-0.26497894525527954,
0.20433840155601501,
0.07199010252952576,
-0.465302437543869,
0.18238966166973114,
0.05277426913380623,
0.05151262506842613,
-0.20273008942604065,
0.5143376588821411,
0.24988926947116852,
0.43167972564697266,
0.017125675454735756,
0.09840913861989975,
0.04844613000750542,
0.14257678389549255,
0.16502068936824799,
0.1316942274570465,
-0.05807364732027054,
-0.00428332993760705,
0.356400728225708,
0.024623889476060867,
-0.15076671540737152,
0.04937633126974106,
-0.11832786351442337,
0.4052496552467346,
0.04982549697160721,
0.2999396026134491,
-0.1365661770105362,
-0.35595008730888367,
-0.06453368067741394,
0.23908966779708862,
-0.41575145721435547,
0.1867656707763672,
0.2185875028371811,
-0.1315031200647354,
0.19199299812316895,
-0.05054157227277756,
-0.1958964765071869,
0.14212888479232788,
-0.03405662626028061,
0.3379880487918854,
0.18519818782806396,
0.14400681853294373,
-0.19524352252483368,
-0.4610113501548767,
-0.048648297786712646,
-0.22203026711940765,
0.08866269141435623,
-0.293259859085083,
0.04643407091498375,
-0.3336537480354309,
0.20124779641628265,
-0.045962776988744736,
-0.4639357328414917,
-0.1349489837884903,
-0.14255692064762115,
0.02736365981400013,
0.16684956848621368,
0.044340066611766815,
0.2935369908809662,
0.11676394939422607,
-0.22661656141281128,
0.20614896714687347,
-0.39511170983314514,
-0.00240628351457417,
-0.2743551433086395,
-0.24771274626255035,
0.1623540073633194,
0.0977630689740181,
-0.10103356838226318,
0.14446508884429932,
-0.21566557884216309,
0.2021045684814453,
-0.10402202606201172,
-0.3236002027988434,
0.07065878063440323,
-0.23093831539154053,
0.13151000440120697,
0.2590809166431427,
0.2341095358133316,
0.34552741050720215,
-0.041541315615177155,
0.4892686903476715,
-0.4179655611515045,
-0.29369375109672546,
0.2443261444568634,
-0.20269475877285004,
-0.2412954717874527,
-0.03904058039188385,
-0.31281450390815735,
-0.3201557993888855,
-0.26156726479530334,
-0.051241882145404816,
0.31128963828086853,
-0.04711485281586647,
0.2340032011270523,
0.3529203534126282,
0.2554924190044403,
0.010714634321630001,
0.09170179069042206,
0.08804599195718765,
0.1748228818178177,
0.3792811334133148,
-0.2130337804555893,
-0.30966421961784363,
0.12719115614891052,
-0.16024310886859894,
0.0484965518116951,
-0.08560190349817276,
-0.011294552125036716,
-0.29044315218925476,
0.04898073524236679,
0.5814245343208313,
0.049282561987638474,
0.17756766080856323,
0.38889870047569275,
0.15439118444919586,
-0.1338249146938324,
-0.023790331557393074,
-0.043666914105415344,
-0.107352614402771,
0.15535402297973633,
-0.000683322548866272,
-0.11318393796682358,
0.03556150943040848,
-0.2186332792043686,
0.5432175993919373,
-0.28776848316192627,
0.09655183553695679,
0.5222765207290649,
-0.24270814657211304,
0.0744805857539177,
-0.09959530085325241,
-0.23494572937488556,
-0.04552880674600601,
-0.14867928624153137,
0.029491160064935684,
0.16334353387355804,
-0.18428613245487213,
-0.21055065095424652,
-0.11618943512439728,
-0.055902305990457535,
-0.188084214925766,
-0.07015564292669296,
0.030202781781554222,
0.26091787219047546,
0.10817719995975494,
-0.11738184094429016,
-0.05207882821559906,
-0.11656054109334946,
0.1790028065443039,
0.2780803442001343,
-0.07227445393800735,
-0.27741843461990356,
0.09721297770738602,
-0.03246797248721123,
-0.17842815816402435,
-0.09910715371370316,
0.1808525025844574,
0.24322284758090973,
-0.10210537165403366,
0.1406468003988266,
-0.2693506181240082,
-0.04483987018465996,
-0.1812461018562317,
0.4152470827102661,
0.18342305719852448,
0.03759117051959038,
0.288759708404541,
0.12538747489452362,
-0.2836160957813263,
-0.35058319568634033,
-0.1677432358264923,
-0.47122126817703247,
0.05177326500415802,
-0.3874921500682831,
-0.34876856207847595,
0.20785218477249146,
0.16246293485164642,
0.23637688159942627,
-0.010843082331120968,
0.22664643824100494,
-0.33798375725746155,
-0.5207431316375732,
-0.49763253331184387,
-0.22744692862033844,
0.08945855498313904,
0.3680008351802826,
0.10900358855724335,
0.08045022934675217,
0.0567161999642849,
-0.19310860335826874,
-0.08185494691133499,
0.27417829632759094,
0.08200591802597046,
-0.3781062960624695,
-0.19274719059467316,
-0.07341475784778595,
-0.02090548165142536,
0.3525671064853668,
0.35708218812942505,
0.14403977990150452,
-0.5120952725410461,
-0.19660654664039612,
0.08387186378240585,
0.175694540143013,
-0.017915939912199974,
-0.19871868193149567,
0.07139482349157333,
-0.4899243116378784,
-0.20795227587223053,
0.28178077936172485,
-0.11662506312131882,
0.40191489458084106,
0.11816535145044327,
0.1298828274011612,
0.013777267187833786,
0.373060017824173,
-0.149112269282341,
0.1063920259475708,
-0.19012901186943054,
0.4270003139972687,
-0.19174310564994812,
0.06781525164842606,
0.0496499165892601,
0.7519731521606445,
0.2376597821712494,
0.20581552386283875,
0.7463887333869934,
-0.14492358267307281,
-0.029063696041703224,
-0.12752655148506165,
0.03456315025687218,
-0.34210440516471863,
0.23677292466163635,
0.004468970932066441,
-0.19760723412036896,
0.3156052827835083,
-0.2846154570579529,
-0.1282239556312561,
0.02761337161064148,
-0.2408515065908432,
0.03915446624159813,
0.1012294590473175,
-0.047006651759147644,
0.24097967147827148,
-0.08111413568258286,
-0.19358991086483002,
0.27126288414001465,
-0.057393964380025864,
0.2683134973049164,
-0.19318366050720215,
0.020995156839489937,
-0.04610279202461243,
-0.24503932893276215,
-0.045577194541692734,
0.1583879441022873,
-0.32520008087158203,
0.2609781324863434,
0.15873408317565918,
-0.20663562417030334,
-0.08064759522676468,
0.16211071610450745,
-0.013762585818767548,
-0.39726489782333374,
-0.12757766246795654,
0.09034659713506699,
0.2405894696712494,
-0.3250841498374939,
-0.09038268029689789,
0.21488994359970093,
0.37327519059181213,
-0.4429710805416107,
-0.2527886927127838,
0.3058922588825226,
-0.07450799643993378,
-0.12497574836015701,
-0.0332525297999382,
-0.007061685901135206,
0.18733982741832733,
-0.21169371902942657,
-0.19771552085876465,
-0.14886873960494995,
0.2128838747739792,
-0.29009681940078735,
0.2270805835723877,
-0.0021940574515610933,
-0.17654180526733398,
0.1322104036808014,
0.18531224131584167,
0.006167884916067123,
-0.18012718856334686,
0.07509690523147583,
0.043110739439725876,
0.06849491596221924,
0.2944182753562927,
0.13181790709495544,
-0.22371259331703186,
-0.2433735430240631,
-0.004169962368905544,
0.09315139800310135,
-0.21993184089660645,
0.0788566917181015,
0.0643019899725914,
-0.22213223576545715,
-0.06942787766456604,
0.44018498063087463,
0.19250531494617462,
0.0031595502514392138,
0.030419601127505302,
-0.09706271439790726,
-0.09069792926311493,
0.20257478952407837,
0.25962913036346436,
-0.020371705293655396,
0.12116187810897827,
0.48860403895378113,
0.21544581651687622,
-0.05923272296786308,
-0.3902040719985962,
0.056552547961473465,
0.04766376316547394,
0.0556873120367527,
-0.03081575036048889,
-0.23912210762500763,
0.02274005487561226,
0.15407732129096985,
0.31676551699638367,
0.010070030577480793,
-0.09266052395105362,
-0.3281960189342499,
-0.1877044290304184,
0.05723389983177185,
-0.11094387620687485,
0.08506618440151215,
0.43644675612449646,
0.026775775477290154,
-0.06125403940677643,
0.11252915114164352,
0.07068334519863129,
-0.07970404624938965,
-0.2468464970588684,
0.2264874130487442,
0.36269041895866394,
-0.06805676966905594,
0.02610788121819496,
-0.04546720162034035,
-0.25028443336486816,
0.2912465035915375,
0.007569948211312294,
-0.0260531734675169,
-0.11881964653730392,
-0.08555715531110764,
0.013406566344201565,
0.09396007657051086,
0.0464375764131546,
0.037338729947805405,
0.2643769085407257,
-0.34523144364356995,
-0.04891335591673851,
-0.230882927775383,
0.10038634389638901,
0.36443307995796204,
-0.3190179467201233,
0.23133307695388794,
0.15244436264038086,
0.29954972863197327,
-0.3688792586326599,
-0.033575162291526794,
0.1628161519765854,
-0.2780487537384033,
0.11847273260354996,
0.19178658723831177,
0.06041121482849121,
0.07580944895744324,
0.10058355331420898,
0.16471803188323975,
0.1801488697528839,
0.14030490815639496,
0.0034219480585306883,
0.19959360361099243,
-0.26130253076553345,
0.13356833159923553,
0.36418288946151733,
0.15566658973693848,
0.2123638242483139,
0.2593286633491516,
-0.3108849823474884,
0.16929535567760468,
-0.24349534511566162,
-0.14435012638568878,
0.08641477674245834,
-0.12308899313211441,
0.05084731802344322,
-0.033158671110868454,
0.20026186108589172,
-0.08992324024438858,
0.22876231372356415,
0.39877182245254517,
0.08297352492809296,
-0.08028271794319153,
-0.018471108749508858,
0.5636407732963562,
-0.04278891161084175,
0.04569486156105995,
0.02355133183300495,
-0.06384578347206116,
0.015876293182373047,
-0.035995662212371826,
0.04533308371901512,
-0.14629630744457245,
0.11279059201478958,
0.1300174742937088,
-0.12844665348529816,
-0.28811055421829224,
0.32840585708618164,
-0.2077627032995224,
0.10549244284629822,
-0.1421724110841751,
0.13120456039905548,
0.14904727041721344,
-0.19649043679237366,
-0.3196724057197571,
0.1446559876203537,
0.5665192008018494,
0.23376516997814178,
-0.2846974730491638,
-0.16925592720508575,
-0.307625412940979,
-0.13137540221214294,
-0.044211335480213165,
-0.15733280777931213,
0.14199663698673248,
0.44088539481163025,
0.14332309365272522,
0.2899540662765503,
-0.33386024832725525,
-0.0749085322022438,
0.07460911571979523,
-0.22738412022590637,
-0.015294059179723263,
0.268747478723526,
-0.1454828977584839,
-0.3385293185710907,
-0.3799648880958557,
0.0053667533211410046,
-0.2112448811531067,
0.16648368537425995,
0.16139674186706543,
0.18317636847496033,
-0.03464290127158165,
-0.15411780774593353,
0.14882034063339233,
0.1440841406583786,
0.3107938766479492,
0.1784863919019699,
0.40650320053100586,
-0.02803225629031658,
-0.01962614804506302,
-0.3941384553909302,
0.4153843820095062,
-0.235928013920784,
-0.05590799078345299,
0.05059751868247986,
0.07281151413917542,
0.1040261834859848,
0.20528040826320648,
0.07348258048295975,
0.21190929412841797,
-0.04531877115368843,
-0.1047842800617218,
-0.2870411276817322,
-0.03309822827577591,
0.0803523138165474,
-0.17355656623840332,
0.028197534382343292,
-0.23542620241641998,
0.142124205827713,
-0.45138490200042725,
0.333074688911438,
-0.3452714681625366,
0.01480571273714304,
0.03782904893159866,
-0.15690891444683075,
0.5395144820213318,
-0.09204137325286865,
0.508366048336029,
-0.036606818437576294,
0.012711111456155777,
0.03198886290192604,
-0.22203265130519867,
-0.13529062271118164,
0.044944532215595245,
-0.02831845171749592,
0.20802997052669525,
0.052947722375392914,
-0.2666279077529907,
-0.3369673490524292,
0.4671844244003296,
0.2361292690038681,
-0.1110408827662468,
-0.082281693816185,
0.3695032000541687,
0.14230261743068695,
-0.026355046778917313,
-0.19131335616111755,
-0.029219316318631172,
-0.09270915389060974,
-0.04081449657678604,
-0.4126972258090973,
-0.5391817688941956,
0.3032609522342682,
-0.19595110416412354,
-0.4182926118373871,
0.11281973868608475,
0.13544940948486328,
-0.240449920296669,
-0.15280236303806305,
-0.3107033967971802,
0.23801927268505096,
0.18062777817249298,
0.11989664286375046,
-0.38574016094207764,
0.2670605778694153,
-0.04676920548081398,
-0.08931940793991089,
0.029022585600614548,
0.28484803438186646,
-0.023330476135015488,
0.11738967895507812,
-0.2085888683795929,
-0.1044091135263443
] |
https://github.com/huggingface/datasets/issues/1781
|
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
Yes colab doesn’t reload preloaded library unless you restart the instance. Maybe we should move the check on top of the init
|
I'm using Colab. And suddenly this morning, there is this error. Have a look below!

| 22 |
AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' during import
|
[
-0.1086113452911377,
0.06512317061424255,
-0.15725837647914886,
0.03943711891770363,
0.3250490128993988,
-0.06980206817388535,
0.22958116233348846,
0.36733436584472656,
-0.15316221117973328,
0.03985990956425667,
-0.10686875879764557,
0.18305529654026031,
-0.04936102777719498,
-0.02890443243086338,
0.16444292664527893,
-0.15473131835460663,
0.23767739534378052,
0.3006131052970886,
0.0293861236423254,
-0.19003333151340485,
-0.20373065769672394,
0.22060535848140717,
-0.2217443585395813,
0.1682504564523697,
-0.24704401195049286,
0.1580631583929062,
0.12321911007165909,
0.009975112043321133,
-0.2884400188922882,
-0.570590615272522,
0.18277296423912048,
-0.2181183248758316,
0.1275525540113449,
0.10459521412849426,
-0.00010302293230779469,
0.11367785930633545,
0.276191383600235,
-0.05821993574500084,
0.11633186787366867,
0.06808129698038101,
0.3897702097892761,
-0.12986603379249573,
0.14725975692272186,
-0.14526762068271637,
0.07475753873586655,
-0.28009331226348877,
-0.1291409432888031,
0.11099797487258911,
-0.037937894463539124,
0.35061144828796387,
0.3634275197982788,
0.26723381876945496,
0.4908427298069,
-0.021123696118593216,
0.5513709187507629,
-0.2793462574481964,
-0.06659653037786484,
0.33394259214401245,
0.27481818199157715,
-0.3589339554309845,
0.02223835699260235,
-0.014323651790618896,
-0.17620180547237396,
0.084986113011837,
0.33154502511024475,
-0.06015978381037712,
0.4918839931488037,
-0.11911596357822418,
-0.1410638689994812,
-0.0061705028638243675,
0.15423700213432312,
-0.3346763551235199,
-0.11001048982143402,
0.11208552867174149,
0.051859233528375626,
-0.21724247932434082,
0.06324248760938644,
0.18380855023860931,
-0.11542146652936935,
0.09442071616649628,
0.31641441583633423,
-0.0789220854640007,
-0.23369529843330383,
0.053298432379961014,
-0.26926952600479126,
0.29454079270362854,
0.09576615691184998,
-0.06507683545351028,
0.10236170142889023,
-0.015010359697043896,
0.21399062871932983,
0.1397475302219391,
-0.03454466536641121,
0.06154332682490349,
-0.018122777342796326,
0.1758187860250473,
0.2535712718963623,
0.04867531359195709,
0.16892382502555847,
-0.058940038084983826,
-0.2021256387233734,
-0.035590093582868576,
0.3758203387260437,
0.2639380395412445,
-0.036169201135635376,
0.1870136260986328,
0.039432115852832794,
-0.08231651037931442,
0.28150758147239685,
0.04221690073609352,
0.031020665541291237,
0.12279460579156876,
-0.17841844260692596,
-0.4214699864387512,
0.23876851797103882,
-0.1881083995103836,
0.3413234353065491,
-0.05164584890007973,
-0.2996431887149811,
-0.11216583847999573,
-0.1583607792854309,
-0.027622627094388008,
-0.1876922994852066,
0.3132147789001465,
-0.08103486150503159,
0.08557434380054474,
0.15201130509376526,
0.4193618595600128,
-0.28701090812683105,
-0.05579555779695511,
-0.20328937470912933,
0.3978482186794281,
-0.09669208526611328,
-0.27481067180633545,
-0.05428105592727661,
0.01252027042210102,
0.15384221076965332,
0.006539627443999052,
0.05818519741296768,
0.00912689883261919,
-0.1672937422990799,
0.13258229196071625,
-0.2907104194164276,
0.22161364555358887,
-0.03564342111349106,
-0.06278758496046066,
0.23785768449306488,
-0.1532582938671112,
-0.19553260505199432,
0.13050149381160736,
-0.21199332177639008,
-0.25532156229019165,
-0.171321839094162,
0.33551928400993347,
-0.0310931745916605,
-0.1692153364419937,
0.19403700530529022,
-0.3441431224346161,
0.0935709998011589,
-0.27452924847602844,
-0.09952707588672638,
-0.3993988633155823,
0.24586491286754608,
-0.356536865234375,
0.06609808653593063,
0.052349384874105453,
-0.30659928917884827,
-0.20425188541412354,
0.3004656136035919,
-0.31303298473358154,
0.20677483081817627,
0.1335311084985733,
-0.14058014750480652,
0.026128796860575676,
-0.04690816253423691,
0.45947861671447754,
0.23375967144966125,
-0.35058680176734924,
-0.19757986068725586,
-0.19610224664211273,
-0.051570355892181396,
-0.12302201241254807,
0.07970993220806122,
-0.17479920387268066,
0.08209651708602905,
0.07691122591495514,
0.272661954164505,
0.3091379404067993,
-0.031471893191337585,
0.14753936231136322,
-0.30176517367362976,
-0.1607133150100708,
0.28144821524620056,
0.0928168073296547,
0.08428287506103516,
-0.22045443952083588,
0.07477244734764099,
-0.23426660895347595,
0.08889351785182953,
-0.1638048142194748,
-0.06761142611503601,
0.07940530776977539,
0.3189205229282379,
0.09409866482019424,
-0.1068921685218811,
-0.12534970045089722,
-0.049709077924489975,
0.06195281818509102,
-0.3568946421146393,
0.2628631293773651,
-0.37510454654693604,
-0.040309078991413116,
-0.29975032806396484,
0.27911141514778137,
-0.4152371287345886,
-0.17977526783943176,
0.2891688346862793,
0.036049339920282364,
-0.0010461308993399143,
0.3076135218143463,
-0.072289377450943,
-0.14647576212882996,
0.1136949360370636,
0.18161191046237946,
-0.07623892277479172,
0.3167398273944855,
-0.42696091532707214,
-0.44419315457344055,
0.0995364561676979,
0.0890980213880539,
0.25754836201667786,
-0.19906118512153625,
0.0032627161126583815,
0.12259270995855331,
0.03390401229262352,
0.22843614220619202,
-0.26497894525527954,
0.20433840155601501,
0.07199010252952576,
-0.465302437543869,
0.18238966166973114,
0.05277426913380623,
0.05151262506842613,
-0.20273008942604065,
0.5143376588821411,
0.24988926947116852,
0.43167972564697266,
0.017125675454735756,
0.09840913861989975,
0.04844613000750542,
0.14257678389549255,
0.16502068936824799,
0.1316942274570465,
-0.05807364732027054,
-0.00428332993760705,
0.356400728225708,
0.024623889476060867,
-0.15076671540737152,
0.04937633126974106,
-0.11832786351442337,
0.4052496552467346,
0.04982549697160721,
0.2999396026134491,
-0.1365661770105362,
-0.35595008730888367,
-0.06453368067741394,
0.23908966779708862,
-0.41575145721435547,
0.1867656707763672,
0.2185875028371811,
-0.1315031200647354,
0.19199299812316895,
-0.05054157227277756,
-0.1958964765071869,
0.14212888479232788,
-0.03405662626028061,
0.3379880487918854,
0.18519818782806396,
0.14400681853294373,
-0.19524352252483368,
-0.4610113501548767,
-0.048648297786712646,
-0.22203026711940765,
0.08866269141435623,
-0.293259859085083,
0.04643407091498375,
-0.3336537480354309,
0.20124779641628265,
-0.045962776988744736,
-0.4639357328414917,
-0.1349489837884903,
-0.14255692064762115,
0.02736365981400013,
0.16684956848621368,
0.044340066611766815,
0.2935369908809662,
0.11676394939422607,
-0.22661656141281128,
0.20614896714687347,
-0.39511170983314514,
-0.00240628351457417,
-0.2743551433086395,
-0.24771274626255035,
0.1623540073633194,
0.0977630689740181,
-0.10103356838226318,
0.14446508884429932,
-0.21566557884216309,
0.2021045684814453,
-0.10402202606201172,
-0.3236002027988434,
0.07065878063440323,
-0.23093831539154053,
0.13151000440120697,
0.2590809166431427,
0.2341095358133316,
0.34552741050720215,
-0.041541315615177155,
0.4892686903476715,
-0.4179655611515045,
-0.29369375109672546,
0.2443261444568634,
-0.20269475877285004,
-0.2412954717874527,
-0.03904058039188385,
-0.31281450390815735,
-0.3201557993888855,
-0.26156726479530334,
-0.051241882145404816,
0.31128963828086853,
-0.04711485281586647,
0.2340032011270523,
0.3529203534126282,
0.2554924190044403,
0.010714634321630001,
0.09170179069042206,
0.08804599195718765,
0.1748228818178177,
0.3792811334133148,
-0.2130337804555893,
-0.30966421961784363,
0.12719115614891052,
-0.16024310886859894,
0.0484965518116951,
-0.08560190349817276,
-0.011294552125036716,
-0.29044315218925476,
0.04898073524236679,
0.5814245343208313,
0.049282561987638474,
0.17756766080856323,
0.38889870047569275,
0.15439118444919586,
-0.1338249146938324,
-0.023790331557393074,
-0.043666914105415344,
-0.107352614402771,
0.15535402297973633,
-0.000683322548866272,
-0.11318393796682358,
0.03556150943040848,
-0.2186332792043686,
0.5432175993919373,
-0.28776848316192627,
0.09655183553695679,
0.5222765207290649,
-0.24270814657211304,
0.0744805857539177,
-0.09959530085325241,
-0.23494572937488556,
-0.04552880674600601,
-0.14867928624153137,
0.029491160064935684,
0.16334353387355804,
-0.18428613245487213,
-0.21055065095424652,
-0.11618943512439728,
-0.055902305990457535,
-0.188084214925766,
-0.07015564292669296,
0.030202781781554222,
0.26091787219047546,
0.10817719995975494,
-0.11738184094429016,
-0.05207882821559906,
-0.11656054109334946,
0.1790028065443039,
0.2780803442001343,
-0.07227445393800735,
-0.27741843461990356,
0.09721297770738602,
-0.03246797248721123,
-0.17842815816402435,
-0.09910715371370316,
0.1808525025844574,
0.24322284758090973,
-0.10210537165403366,
0.1406468003988266,
-0.2693506181240082,
-0.04483987018465996,
-0.1812461018562317,
0.4152470827102661,
0.18342305719852448,
0.03759117051959038,
0.288759708404541,
0.12538747489452362,
-0.2836160957813263,
-0.35058319568634033,
-0.1677432358264923,
-0.47122126817703247,
0.05177326500415802,
-0.3874921500682831,
-0.34876856207847595,
0.20785218477249146,
0.16246293485164642,
0.23637688159942627,
-0.010843082331120968,
0.22664643824100494,
-0.33798375725746155,
-0.5207431316375732,
-0.49763253331184387,
-0.22744692862033844,
0.08945855498313904,
0.3680008351802826,
0.10900358855724335,
0.08045022934675217,
0.0567161999642849,
-0.19310860335826874,
-0.08185494691133499,
0.27417829632759094,
0.08200591802597046,
-0.3781062960624695,
-0.19274719059467316,
-0.07341475784778595,
-0.02090548165142536,
0.3525671064853668,
0.35708218812942505,
0.14403977990150452,
-0.5120952725410461,
-0.19660654664039612,
0.08387186378240585,
0.175694540143013,
-0.017915939912199974,
-0.19871868193149567,
0.07139482349157333,
-0.4899243116378784,
-0.20795227587223053,
0.28178077936172485,
-0.11662506312131882,
0.40191489458084106,
0.11816535145044327,
0.1298828274011612,
0.013777267187833786,
0.373060017824173,
-0.149112269282341,
0.1063920259475708,
-0.19012901186943054,
0.4270003139972687,
-0.19174310564994812,
0.06781525164842606,
0.0496499165892601,
0.7519731521606445,
0.2376597821712494,
0.20581552386283875,
0.7463887333869934,
-0.14492358267307281,
-0.029063696041703224,
-0.12752655148506165,
0.03456315025687218,
-0.34210440516471863,
0.23677292466163635,
0.004468970932066441,
-0.19760723412036896,
0.3156052827835083,
-0.2846154570579529,
-0.1282239556312561,
0.02761337161064148,
-0.2408515065908432,
0.03915446624159813,
0.1012294590473175,
-0.047006651759147644,
0.24097967147827148,
-0.08111413568258286,
-0.19358991086483002,
0.27126288414001465,
-0.057393964380025864,
0.2683134973049164,
-0.19318366050720215,
0.020995156839489937,
-0.04610279202461243,
-0.24503932893276215,
-0.045577194541692734,
0.1583879441022873,
-0.32520008087158203,
0.2609781324863434,
0.15873408317565918,
-0.20663562417030334,
-0.08064759522676468,
0.16211071610450745,
-0.013762585818767548,
-0.39726489782333374,
-0.12757766246795654,
0.09034659713506699,
0.2405894696712494,
-0.3250841498374939,
-0.09038268029689789,
0.21488994359970093,
0.37327519059181213,
-0.4429710805416107,
-0.2527886927127838,
0.3058922588825226,
-0.07450799643993378,
-0.12497574836015701,
-0.0332525297999382,
-0.007061685901135206,
0.18733982741832733,
-0.21169371902942657,
-0.19771552085876465,
-0.14886873960494995,
0.2128838747739792,
-0.29009681940078735,
0.2270805835723877,
-0.0021940574515610933,
-0.17654180526733398,
0.1322104036808014,
0.18531224131584167,
0.006167884916067123,
-0.18012718856334686,
0.07509690523147583,
0.043110739439725876,
0.06849491596221924,
0.2944182753562927,
0.13181790709495544,
-0.22371259331703186,
-0.2433735430240631,
-0.004169962368905544,
0.09315139800310135,
-0.21993184089660645,
0.0788566917181015,
0.0643019899725914,
-0.22213223576545715,
-0.06942787766456604,
0.44018498063087463,
0.19250531494617462,
0.0031595502514392138,
0.030419601127505302,
-0.09706271439790726,
-0.09069792926311493,
0.20257478952407837,
0.25962913036346436,
-0.020371705293655396,
0.12116187810897827,
0.48860403895378113,
0.21544581651687622,
-0.05923272296786308,
-0.3902040719985962,
0.056552547961473465,
0.04766376316547394,
0.0556873120367527,
-0.03081575036048889,
-0.23912210762500763,
0.02274005487561226,
0.15407732129096985,
0.31676551699638367,
0.010070030577480793,
-0.09266052395105362,
-0.3281960189342499,
-0.1877044290304184,
0.05723389983177185,
-0.11094387620687485,
0.08506618440151215,
0.43644675612449646,
0.026775775477290154,
-0.06125403940677643,
0.11252915114164352,
0.07068334519863129,
-0.07970404624938965,
-0.2468464970588684,
0.2264874130487442,
0.36269041895866394,
-0.06805676966905594,
0.02610788121819496,
-0.04546720162034035,
-0.25028443336486816,
0.2912465035915375,
0.007569948211312294,
-0.0260531734675169,
-0.11881964653730392,
-0.08555715531110764,
0.013406566344201565,
0.09396007657051086,
0.0464375764131546,
0.037338729947805405,
0.2643769085407257,
-0.34523144364356995,
-0.04891335591673851,
-0.230882927775383,
0.10038634389638901,
0.36443307995796204,
-0.3190179467201233,
0.23133307695388794,
0.15244436264038086,
0.29954972863197327,
-0.3688792586326599,
-0.033575162291526794,
0.1628161519765854,
-0.2780487537384033,
0.11847273260354996,
0.19178658723831177,
0.06041121482849121,
0.07580944895744324,
0.10058355331420898,
0.16471803188323975,
0.1801488697528839,
0.14030490815639496,
0.0034219480585306883,
0.19959360361099243,
-0.26130253076553345,
0.13356833159923553,
0.36418288946151733,
0.15566658973693848,
0.2123638242483139,
0.2593286633491516,
-0.3108849823474884,
0.16929535567760468,
-0.24349534511566162,
-0.14435012638568878,
0.08641477674245834,
-0.12308899313211441,
0.05084731802344322,
-0.033158671110868454,
0.20026186108589172,
-0.08992324024438858,
0.22876231372356415,
0.39877182245254517,
0.08297352492809296,
-0.08028271794319153,
-0.018471108749508858,
0.5636407732963562,
-0.04278891161084175,
0.04569486156105995,
0.02355133183300495,
-0.06384578347206116,
0.015876293182373047,
-0.035995662212371826,
0.04533308371901512,
-0.14629630744457245,
0.11279059201478958,
0.1300174742937088,
-0.12844665348529816,
-0.28811055421829224,
0.32840585708618164,
-0.2077627032995224,
0.10549244284629822,
-0.1421724110841751,
0.13120456039905548,
0.14904727041721344,
-0.19649043679237366,
-0.3196724057197571,
0.1446559876203537,
0.5665192008018494,
0.23376516997814178,
-0.2846974730491638,
-0.16925592720508575,
-0.307625412940979,
-0.13137540221214294,
-0.044211335480213165,
-0.15733280777931213,
0.14199663698673248,
0.44088539481163025,
0.14332309365272522,
0.2899540662765503,
-0.33386024832725525,
-0.0749085322022438,
0.07460911571979523,
-0.22738412022590637,
-0.015294059179723263,
0.268747478723526,
-0.1454828977584839,
-0.3385293185710907,
-0.3799648880958557,
0.0053667533211410046,
-0.2112448811531067,
0.16648368537425995,
0.16139674186706543,
0.18317636847496033,
-0.03464290127158165,
-0.15411780774593353,
0.14882034063339233,
0.1440841406583786,
0.3107938766479492,
0.1784863919019699,
0.40650320053100586,
-0.02803225629031658,
-0.01962614804506302,
-0.3941384553909302,
0.4153843820095062,
-0.235928013920784,
-0.05590799078345299,
0.05059751868247986,
0.07281151413917542,
0.1040261834859848,
0.20528040826320648,
0.07348258048295975,
0.21190929412841797,
-0.04531877115368843,
-0.1047842800617218,
-0.2870411276817322,
-0.03309822827577591,
0.0803523138165474,
-0.17355656623840332,
0.028197534382343292,
-0.23542620241641998,
0.142124205827713,
-0.45138490200042725,
0.333074688911438,
-0.3452714681625366,
0.01480571273714304,
0.03782904893159866,
-0.15690891444683075,
0.5395144820213318,
-0.09204137325286865,
0.508366048336029,
-0.036606818437576294,
0.012711111456155777,
0.03198886290192604,
-0.22203265130519867,
-0.13529062271118164,
0.044944532215595245,
-0.02831845171749592,
0.20802997052669525,
0.052947722375392914,
-0.2666279077529907,
-0.3369673490524292,
0.4671844244003296,
0.2361292690038681,
-0.1110408827662468,
-0.082281693816185,
0.3695032000541687,
0.14230261743068695,
-0.026355046778917313,
-0.19131335616111755,
-0.029219316318631172,
-0.09270915389060974,
-0.04081449657678604,
-0.4126972258090973,
-0.5391817688941956,
0.3032609522342682,
-0.19595110416412354,
-0.4182926118373871,
0.11281973868608475,
0.13544940948486328,
-0.240449920296669,
-0.15280236303806305,
-0.3107033967971802,
0.23801927268505096,
0.18062777817249298,
0.11989664286375046,
-0.38574016094207764,
0.2670605778694153,
-0.04676920548081398,
-0.08931940793991089,
0.029022585600614548,
0.28484803438186646,
-0.023330476135015488,
0.11738967895507812,
-0.2085888683795929,
-0.1044091135263443
] |
https://github.com/huggingface/datasets/issues/1776
|
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
We are very actively working on this. How does your dataset look like in practice (number/size/type of files)?
|
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache?
BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code:
https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
| 18 |
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
[
-0.42852485179901123,
0.06635834276676178,
-0.2913934588432312,
-0.14405997097492218,
0.3746168315410614,
0.12829965353012085,
0.3132684528827667,
0.24133805930614471,
-0.25947001576423645,
0.22958935797214508,
0.1256045699119568,
0.267027348279953,
-0.004173945169895887,
0.25180667638778687,
0.04700194671750069,
0.2829001843929291,
0.09666381776332855,
0.1625138819217682,
-0.20084403455257416,
0.2763998210430145,
-0.20207512378692627,
-0.11938562244176865,
-0.11389993131160736,
-0.060424916446208954,
-0.35528257489204407,
-0.16520772874355316,
-0.21945856511592865,
-0.011583523824810982,
-0.17630498111248016,
-0.21768303215503693,
0.13609427213668823,
0.24807238578796387,
-0.13221336901187897,
0.29923591017723083,
-0.00009656162728788331,
-0.02593439817428589,
0.0953807458281517,
-0.006914946250617504,
-0.3314861059188843,
0.2959360182285309,
-0.1418122500181198,
-0.16984321177005768,
-0.19795820116996765,
-0.18974925577640533,
-0.0825306847691536,
-0.10846507549285889,
0.009246579371392727,
-0.6884445548057556,
0.38825440406799316,
0.032224223017692566,
0.4059607684612274,
0.1537109613418579,
-0.11891229450702667,
0.020406289026141167,
0.21972669661045074,
0.26639220118522644,
-0.33211466670036316,
0.10113715380430222,
0.2439199537038803,
-0.1370614767074585,
0.10984991490840912,
0.14574548602104187,
-0.14790010452270508,
0.0874580666422844,
0.21649587154388428,
-0.08351096510887146,
-0.008890526369214058,
-0.23090745508670807,
0.025649823248386383,
0.15354418754577637,
0.11729541420936584,
-0.3383146822452545,
-0.5394067764282227,
-0.17991499602794647,
0.20039282739162445,
-0.3096981644630432,
-0.03857201710343361,
0.13159935176372528,
-0.16390082240104675,
0.05478455871343613,
-0.2334309071302414,
-0.4020220935344696,
0.08641410619020462,
-0.48201537132263184,
-0.048447951674461365,
0.22779728472232819,
-0.15283706784248352,
-0.06508062779903412,
-0.2170359045267105,
0.1740448772907257,
0.30503180623054504,
-0.13512057065963745,
-0.11943020671606064,
0.27002280950546265,
-0.0218218844383955,
-0.32383763790130615,
-0.18628574907779694,
-0.024671489372849464,
0.2725938558578491,
0.06115615367889404,
0.23859776556491852,
0.04461125656962395,
0.02936757355928421,
-0.20387914776802063,
0.2199310064315796,
-0.16486571729183197,
-0.1889452189207077,
-0.32986652851104736,
0.12104710936546326,
-0.1570211499929428,
-0.1741812378168106,
0.09766445308923721,
0.1501684933900833,
-0.28608280420303345,
0.03770739212632179,
0.3063255548477173,
0.3911988139152527,
-0.19142410159111023,
-0.0678630992770195,
0.12424429506063461,
-0.061089180409908295,
-0.17544205486774445,
-0.4518595337867737,
-0.05764608457684517,
-0.08253219723701477,
-0.04254448786377907,
0.10665347427129745,
0.017625214532017708,
0.020170509815216064,
-0.210234135389328,
-0.2220827043056488,
0.04482389986515045,
-0.08517584204673767,
0.16838720440864563,
0.033730581402778625,
-0.05699343606829643,
-0.08095205575227737,
0.06497496366500854,
0.08399670571088791,
-0.24210521578788757,
0.14847837388515472,
-0.1762026995420456,
0.18261924386024475,
0.11747463792562485,
-0.061137039214372635,
-0.02484625205397606,
-0.17474471032619476,
0.2566918134689331,
-0.2578992247581482,
0.27939724922180176,
-0.19840849936008453,
-0.07081373035907745,
0.007298441603779793,
0.28065410256385803,
-0.008205321617424488,
-0.0824149027466774,
0.14750471711158752,
0.19881291687488556,
0.3056827485561371,
-0.09688834846019745,
0.10947886854410172,
0.14117619395256042,
-0.1667625904083252,
-0.08233055472373962,
0.04903506115078926,
0.39631372690200806,
-0.3748147189617157,
0.1720547378063202,
0.0714070051908493,
-0.043920133262872696,
0.05389595031738281,
-0.177310973405838,
0.06414157897233963,
0.14593179523944855,
-0.07514539361000061,
-0.08533778041601181,
0.24204905331134796,
0.18741336464881897,
0.2029576152563095,
0.21616323292255402,
-0.2407001256942749,
-0.14325420558452606,
0.030768541619181633,
0.08552155643701553,
-0.1976727843284607,
-0.1582658737897873,
-0.049754269421100616,
0.18848995864391327,
0.015009506605565548,
-0.0760306641459465,
-0.09047604352235794,
-0.49807724356651306,
-0.15655392408370972,
-0.10666906833648682,
-0.06323359161615372,
0.23164838552474976,
-0.2005900889635086,
-0.07565595954656601,
0.21654701232910156,
-0.21543355286121368,
-0.09992673248052597,
0.12562188506126404,
-0.012478059157729149,
0.1339414268732071,
-0.11201665550470352,
-0.27422550320625305,
-0.2939554452896118,
0.028349485248327255,
0.011839151382446289,
0.005504842847585678,
0.3638780415058136,
-0.28773900866508484,
0.0083774384111166,
0.09557284414768219,
0.2227010875940323,
0.13475987315177917,
0.33183908462524414,
0.20238110423088074,
-0.0993930771946907,
-0.25277024507522583,
-0.49360954761505127,
0.17135877907276154,
-0.25318557024002075,
-0.02594013139605522,
-0.1788392961025238,
0.02417282946407795,
0.10199492424726486,
0.0024365463759750128,
-0.04035530984401703,
0.06498908251523972,
-0.14898358285427094,
0.022847365587949753,
0.08443454653024673,
0.27432891726493835,
-0.06178678572177887,
0.10437534749507904,
0.04585610702633858,
0.23894540965557098,
-0.11604078114032745,
-0.014480222016572952,
-0.11397065222263336,
-0.10761146247386932,
-0.007177737541496754,
0.017826693132519722,
-0.1469607651233673,
0.3839873969554901,
-0.2725922167301178,
0.3208930492401123,
0.015262619592249393,
-0.11088664084672928,
0.2556641399860382,
-0.0655134841799736,
-0.15642192959785461,
-0.173703134059906,
-0.04913985729217529,
0.07465048879384995,
0.4550788998603821,
0.0337819941341877,
-0.39059996604919434,
0.015789862722158432,
-0.07003273814916611,
-0.03454560786485672,
0.018778907135128975,
-0.03778593987226486,
0.19492559134960175,
-0.06806609034538269,
-0.1596388965845108,
0.09537104517221451,
0.3579677939414978,
0.22559092938899994,
0.1164962649345398,
0.19228041172027588,
-0.15520592033863068,
-0.07839104533195496,
0.2905122935771942,
0.1297309547662735,
0.4243227243423462,
0.02618855983018875,
0.1707214117050171,
0.28763556480407715,
-0.17454268038272858,
-0.07310227304697037,
-0.02286504954099655,
-0.17573247849941254,
-0.22309869527816772,
0.20888441801071167,
-0.16417507827281952,
-0.11730537563562393,
-0.002297094324603677,
-0.012384419329464436,
0.12052446603775024,
-0.20075984299182892,
0.07650546729564667,
-0.25668129324913025,
-0.28724682331085205,
0.12299219518899918,
-0.30196958780288696,
0.6516610383987427,
-0.0551663376390934,
0.06132415309548378,
-0.05950275808572769,
-0.10546006262302399,
0.16527485847473145,
0.23822703957557678,
0.14785347878932953,
-0.11638543009757996,
0.48886165022850037,
-0.20031240582466125,
-0.0029902784153819084,
-0.0934126079082489,
-0.1629321128129959,
0.27854567766189575,
-0.062333814799785614,
0.3968704342842102,
0.13329796493053436,
0.014534090645611286,
0.2379818856716156,
-0.07934805005788803,
0.04393180459737778,
0.05639364942908287,
-0.05308255925774574,
-0.36072438955307007,
0.0830155611038208,
0.07496536523103714,
-0.17763477563858032,
-0.1697065830230713,
-0.06683831661939621,
-0.17034199833869934,
-0.035792507231235504,
0.0874745100736618,
0.04897161200642586,
-0.01960158720612526,
0.08243529498577118,
-0.291742205619812,
-0.1441633403301239,
0.16034181416034698,
-0.2791792154312134,
-0.3279871940612793,
0.14903220534324646,
-0.16542723774909973,
-0.1276204138994217,
-0.21246905624866486,
0.06008893996477127,
0.08497606217861176,
0.37173593044281006,
-0.47020694613456726,
-0.045491937547922134,
-0.08560623228549957,
-0.2095787674188614,
-0.15742787718772888,
0.03551305830478668,
0.1971699297428131,
0.19542019069194794,
-0.3118593692779541,
-0.05594419315457344,
-0.12344033271074295,
-0.0723053514957428,
-0.16901011765003204,
-0.11012513190507889,
0.05239586532115936,
0.16151003539562225,
-0.1061365008354187,
0.5416224598884583,
-0.09479393810033798,
-0.24034997820854187,
0.26243388652801514,
-0.21935750544071198,
0.5483957529067993,
-0.3299729824066162,
0.04817385971546173,
-0.22526054084300995,
-0.18606340885162354,
-0.1302267611026764,
0.1251852810382843,
0.1015976294875145,
-0.3649054765701294,
-0.1351270079612732,
0.3272942900657654,
-0.2757907807826996,
-0.25299859046936035,
0.10521998256444931,
-0.2496872991323471,
0.3472561836242676,
0.28109657764434814,
0.19821351766586304,
-0.19016773998737335,
-0.07841169834136963,
0.14166857302188873,
-0.2078946828842163,
0.5008443593978882,
-0.31660640239715576,
-0.2445836365222931,
0.0075550200417637825,
-0.21410873532295227,
0.11638280004262924,
-0.016431288793683052,
0.43151310086250305,
0.07449419051408768,
-0.2498456835746765,
0.07409133017063141,
-0.4072485864162445,
0.14102673530578613,
-0.06978298723697662,
0.06531801074743271,
0.4257262051105499,
-0.1422998309135437,
0.03988698124885559,
0.04418579116463661,
-0.13949503004550934,
0.2800997495651245,
0.002668552566319704,
0.14837506413459778,
-0.07309258729219437,
-0.18010251224040985,
0.4978213310241699,
0.3100835382938385,
-0.24650782346725464,
-0.07268821448087692,
-0.06760824471712112,
-0.2246844470500946,
-0.1035580188035965,
0.11764557659626007,
-0.1282733976840973,
-0.13736656308174133,
0.030806424096226692,
-0.014134691096842289,
-0.4417322278022766,
0.2211635708808899,
0.09262844920158386,
-0.028350509703159332,
0.0385001003742218,
0.08485538512468338,
0.3762369453907013,
-0.09663593769073486,
-0.05708453804254532,
-0.07667667418718338,
0.51377272605896,
-0.14318880438804626,
-0.09334741532802582,
0.14890651404857635,
-0.1328096091747284,
0.37298792600631714,
0.5051235556602478,
0.14211829006671906,
-0.012947192415595055,
-0.03482469171285629,
0.07003550976514816,
-0.7317449450492859,
0.2029997855424881,
0.29833635687828064,
-0.08761920779943466,
-0.41210412979125977,
-0.6303093433380127,
0.49871546030044556,
0.3362409472465515,
-0.16436775028705597,
0.38612422347068787,
0.18335741758346558,
-0.14275774359703064,
0.3490471839904785,
0.611456036567688,
1.07218337059021,
-0.0669543445110321,
0.19128526747226715,
-0.04897775501012802,
-0.16779619455337524,
0.2585141658782959,
-0.2941984236240387,
0.015184079296886921,
-0.3580779731273651,
-0.30229198932647705,
-0.012188835069537163,
-0.17737668752670288,
0.2905063331127167,
0.2441917359828949,
0.3359149396419525,
0.01614079810678959,
-0.13866907358169556,
-0.09241482615470886,
-0.007072350475937128,
0.010425692424178123,
-0.06829331070184708,
-0.2272944301366806,
0.022529717534780502,
0.2929295599460602,
0.1871468871831894,
-0.05645739287137985,
-0.19369950890541077,
0.08127380907535553,
0.07854814827442169,
-0.03668238967657089,
-0.3751815855503082,
-0.17291299998760223,
-0.04009494557976723,
-0.33559292554855347,
-0.20262065529823303,
-0.16661541163921356,
-0.270398885011673,
-0.12373310327529907,
0.3530083894729614,
0.5267480611801147,
0.04960769787430763,
-0.03921077027916908,
0.06295146048069,
0.27372628450393677,
0.11396385729312897,
0.14096775650978088,
0.0872793197631836,
-0.009846009314060211,
0.2433607578277588,
-0.012930968776345253,
-0.19352839887142181,
-0.1752711683511734,
-0.11439504474401474,
-0.0018416650127619505,
0.09919615834951401,
-0.31525716185569763,
-0.02513798698782921,
0.23683540523052216,
0.43255820870399475,
-0.2281099259853363,
0.2589130699634552,
0.13586005568504333,
0.09330544620752335,
0.31864461302757263,
0.06158694624900818,
-0.24936245381832123,
-0.21371537446975708,
0.10636404901742935,
0.13987195491790771,
-0.1257210373878479,
0.25002503395080566,
-0.07416033744812012,
-0.21770361065864563,
-0.3489595055580139,
0.19693933427333832,
-0.015734167769551277,
-0.2842451333999634,
0.16704130172729492,
-0.24123139679431915,
-0.16739511489868164,
-0.10286515206098557,
0.24515731632709503,
0.2259480357170105,
0.08276641368865967,
0.13019876182079315,
-0.3011157810688019,
-0.26309069991111755,
0.049372393637895584,
0.29071182012557983,
0.36372697353363037,
0.38086333870887756,
-0.24484360218048096,
-0.25366848707199097,
0.23035217821598053,
-0.4873270094394684,
-0.13408790528774261,
0.029195614159107208,
0.10642343759536743,
-0.08753975480794907,
0.31845495104789734,
-0.292484849691391,
-0.15899762511253357,
0.3092517554759979,
0.12020423263311386,
0.02961154282093048,
-0.4203462302684784,
-0.0816112533211708,
0.08420100063085556,
-0.2722960412502289,
-0.003883856348693371,
0.1628352850675583,
-0.05682910978794098,
-0.2992258071899414,
-0.23588836193084717,
-0.02382027357816696,
0.23108899593353271,
0.029280154034495354,
-0.21765433251857758,
0.1210738867521286,
0.11061398684978485,
-0.1755295991897583,
0.2857792377471924,
0.27286675572395325,
0.24588817358016968,
-0.021532302722334862,
0.19695958495140076,
0.024276573210954666,
-0.08528831601142883,
0.4162358343601227,
0.005901307798922062,
0.08015011996030807,
0.015194729901850224,
0.006270273122936487,
0.01124884095042944,
0.10614989697933197,
0.28921985626220703,
0.31132611632347107,
0.5561703443527222,
-0.10687462240457535,
0.0643170028924942,
0.17222321033477783,
0.34562140703201294,
-0.29751214385032654,
-0.1903848499059677,
0.05592941492795944,
-0.09057539701461792,
0.1393975019454956,
0.3584844172000885,
0.2601660490036011,
0.15086805820465088,
0.07527966052293777,
0.11840855330228806,
-0.06238553300499916,
-0.18864861130714417,
0.016113104298710823,
0.4868813157081604,
-0.03919064253568649,
0.10246441513299942,
0.18654602766036987,
0.29478707909584045,
0.07446254789829254,
0.35340115427970886,
0.28286099433898926,
0.5724640488624573,
0.3071728050708771,
0.08095832914113998,
-0.17510268092155457,
-0.41100940108299255,
0.5259605646133423,
0.12463493645191193,
0.33961063623428345,
0.3750072121620178,
0.2568622827529907,
-0.004810091573745012,
-0.06630270183086395,
-0.1643170714378357,
-0.240058034658432,
0.10479369759559631,
-0.14435052871704102,
-0.15344174206256866,
0.03336930647492409,
-0.13387495279312134,
0.05015109106898308,
0.03410285711288452,
-0.14572730660438538,
-0.222308948636055,
0.39654794335365295,
-0.11814865469932556,
0.1333448737859726,
0.16515223681926727,
0.2351689636707306,
-0.24843156337738037,
0.02704247087240219,
-0.19623298943042755,
0.23199668526649475,
0.04507855698466301,
0.20296159386634827,
0.2792949676513672,
0.4166437089443207,
0.26948627829551697,
0.14265243709087372,
-0.19045941531658173,
-0.10611867904663086,
-0.1646558791399002,
-0.07258494943380356,
-0.22185611724853516,
0.27338555455207825,
0.13728757202625275,
0.07563011348247528,
0.43455955386161804,
0.2494102418422699,
-0.2593173682689667,
0.15917176008224487,
0.14860260486602783,
0.2486209124326706,
-0.29445144534111023,
0.3476569950580597,
0.14074890315532684,
-0.25332799553871155,
0.049462053924798965,
-0.00691651226952672,
-0.09155486524105072,
-0.11393141001462936,
0.37536272406578064,
-0.2717994749546051,
0.03507719561457634,
0.231392502784729,
0.17866645753383636,
0.21434810757637024,
0.4301132559776306,
0.1103619784116745,
-0.0018676281906664371,
0.06959749013185501,
-0.12560027837753296,
-0.559904932975769,
-0.00803280808031559,
0.16750730574131012,
-0.12435939908027649,
-0.13181836903095245,
-0.15017756819725037,
0.40355435013771057,
0.357819527387619,
0.09806094318628311,
-0.4909016788005829,
0.15343713760375977,
0.4340989887714386,
-0.37747448682785034,
-0.10517700761556625,
-0.09412699192762375,
0.14329996705055237,
0.009449329227209091,
-0.28656458854675293,
0.23167963325977325,
0.040452990680933,
0.16425754129886627,
0.14431141316890717,
-0.24928559362888336,
0.17196083068847656,
0.013188826851546764,
0.545586109161377,
-0.049810588359832764,
0.30015993118286133,
-0.27192726731300354,
-0.3004951477050781,
-0.3350383937358856,
-0.056980617344379425,
-0.12780465185642242,
0.31103357672691345,
0.0545160248875618,
-0.10514595359563828,
-0.3244408667087555,
-0.057832133024930954,
0.10824024677276611,
-0.28246554732322693,
-0.1707446426153183,
0.25242558121681213,
-0.3699461817741394,
-0.039240967482328415,
-0.06930357217788696,
0.03722629323601723,
0.20183716714382172,
0.2149088978767395,
0.022327110171318054,
0.20179514586925507,
-0.1069602221250534,
-0.24179254472255707,
0.40577197074890137,
0.1350640207529068,
-0.303671658039093,
-0.3662135601043701,
0.08858360350131989,
0.09239435940980911,
-0.018462495878338814,
-0.2113337516784668,
0.04050308093428612,
0.3394028842449188,
-0.17553037405014038,
0.21994280815124512,
0.313014954328537,
-0.37187695503234863,
-0.21052533388137817,
-0.21666043996810913,
0.5020683407783508,
-0.16070090234279633,
-0.022866668179631233,
-0.45809051394462585,
-0.36100485920906067
] |
https://github.com/huggingface/datasets/issues/1776
|
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
It's a text file with many lines (about 1B) of Chinese sentences. I use it to train language model using https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py
|
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache?
BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code:
https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
| 21 |
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
[
-0.42852485179901123,
0.06635834276676178,
-0.2913934588432312,
-0.14405997097492218,
0.3746168315410614,
0.12829965353012085,
0.3132684528827667,
0.24133805930614471,
-0.25947001576423645,
0.22958935797214508,
0.1256045699119568,
0.267027348279953,
-0.004173945169895887,
0.25180667638778687,
0.04700194671750069,
0.2829001843929291,
0.09666381776332855,
0.1625138819217682,
-0.20084403455257416,
0.2763998210430145,
-0.20207512378692627,
-0.11938562244176865,
-0.11389993131160736,
-0.060424916446208954,
-0.35528257489204407,
-0.16520772874355316,
-0.21945856511592865,
-0.011583523824810982,
-0.17630498111248016,
-0.21768303215503693,
0.13609427213668823,
0.24807238578796387,
-0.13221336901187897,
0.29923591017723083,
-0.00009656162728788331,
-0.02593439817428589,
0.0953807458281517,
-0.006914946250617504,
-0.3314861059188843,
0.2959360182285309,
-0.1418122500181198,
-0.16984321177005768,
-0.19795820116996765,
-0.18974925577640533,
-0.0825306847691536,
-0.10846507549285889,
0.009246579371392727,
-0.6884445548057556,
0.38825440406799316,
0.032224223017692566,
0.4059607684612274,
0.1537109613418579,
-0.11891229450702667,
0.020406289026141167,
0.21972669661045074,
0.26639220118522644,
-0.33211466670036316,
0.10113715380430222,
0.2439199537038803,
-0.1370614767074585,
0.10984991490840912,
0.14574548602104187,
-0.14790010452270508,
0.0874580666422844,
0.21649587154388428,
-0.08351096510887146,
-0.008890526369214058,
-0.23090745508670807,
0.025649823248386383,
0.15354418754577637,
0.11729541420936584,
-0.3383146822452545,
-0.5394067764282227,
-0.17991499602794647,
0.20039282739162445,
-0.3096981644630432,
-0.03857201710343361,
0.13159935176372528,
-0.16390082240104675,
0.05478455871343613,
-0.2334309071302414,
-0.4020220935344696,
0.08641410619020462,
-0.48201537132263184,
-0.048447951674461365,
0.22779728472232819,
-0.15283706784248352,
-0.06508062779903412,
-0.2170359045267105,
0.1740448772907257,
0.30503180623054504,
-0.13512057065963745,
-0.11943020671606064,
0.27002280950546265,
-0.0218218844383955,
-0.32383763790130615,
-0.18628574907779694,
-0.024671489372849464,
0.2725938558578491,
0.06115615367889404,
0.23859776556491852,
0.04461125656962395,
0.02936757355928421,
-0.20387914776802063,
0.2199310064315796,
-0.16486571729183197,
-0.1889452189207077,
-0.32986652851104736,
0.12104710936546326,
-0.1570211499929428,
-0.1741812378168106,
0.09766445308923721,
0.1501684933900833,
-0.28608280420303345,
0.03770739212632179,
0.3063255548477173,
0.3911988139152527,
-0.19142410159111023,
-0.0678630992770195,
0.12424429506063461,
-0.061089180409908295,
-0.17544205486774445,
-0.4518595337867737,
-0.05764608457684517,
-0.08253219723701477,
-0.04254448786377907,
0.10665347427129745,
0.017625214532017708,
0.020170509815216064,
-0.210234135389328,
-0.2220827043056488,
0.04482389986515045,
-0.08517584204673767,
0.16838720440864563,
0.033730581402778625,
-0.05699343606829643,
-0.08095205575227737,
0.06497496366500854,
0.08399670571088791,
-0.24210521578788757,
0.14847837388515472,
-0.1762026995420456,
0.18261924386024475,
0.11747463792562485,
-0.061137039214372635,
-0.02484625205397606,
-0.17474471032619476,
0.2566918134689331,
-0.2578992247581482,
0.27939724922180176,
-0.19840849936008453,
-0.07081373035907745,
0.007298441603779793,
0.28065410256385803,
-0.008205321617424488,
-0.0824149027466774,
0.14750471711158752,
0.19881291687488556,
0.3056827485561371,
-0.09688834846019745,
0.10947886854410172,
0.14117619395256042,
-0.1667625904083252,
-0.08233055472373962,
0.04903506115078926,
0.39631372690200806,
-0.3748147189617157,
0.1720547378063202,
0.0714070051908493,
-0.043920133262872696,
0.05389595031738281,
-0.177310973405838,
0.06414157897233963,
0.14593179523944855,
-0.07514539361000061,
-0.08533778041601181,
0.24204905331134796,
0.18741336464881897,
0.2029576152563095,
0.21616323292255402,
-0.2407001256942749,
-0.14325420558452606,
0.030768541619181633,
0.08552155643701553,
-0.1976727843284607,
-0.1582658737897873,
-0.049754269421100616,
0.18848995864391327,
0.015009506605565548,
-0.0760306641459465,
-0.09047604352235794,
-0.49807724356651306,
-0.15655392408370972,
-0.10666906833648682,
-0.06323359161615372,
0.23164838552474976,
-0.2005900889635086,
-0.07565595954656601,
0.21654701232910156,
-0.21543355286121368,
-0.09992673248052597,
0.12562188506126404,
-0.012478059157729149,
0.1339414268732071,
-0.11201665550470352,
-0.27422550320625305,
-0.2939554452896118,
0.028349485248327255,
0.011839151382446289,
0.005504842847585678,
0.3638780415058136,
-0.28773900866508484,
0.0083774384111166,
0.09557284414768219,
0.2227010875940323,
0.13475987315177917,
0.33183908462524414,
0.20238110423088074,
-0.0993930771946907,
-0.25277024507522583,
-0.49360954761505127,
0.17135877907276154,
-0.25318557024002075,
-0.02594013139605522,
-0.1788392961025238,
0.02417282946407795,
0.10199492424726486,
0.0024365463759750128,
-0.04035530984401703,
0.06498908251523972,
-0.14898358285427094,
0.022847365587949753,
0.08443454653024673,
0.27432891726493835,
-0.06178678572177887,
0.10437534749507904,
0.04585610702633858,
0.23894540965557098,
-0.11604078114032745,
-0.014480222016572952,
-0.11397065222263336,
-0.10761146247386932,
-0.007177737541496754,
0.017826693132519722,
-0.1469607651233673,
0.3839873969554901,
-0.2725922167301178,
0.3208930492401123,
0.015262619592249393,
-0.11088664084672928,
0.2556641399860382,
-0.0655134841799736,
-0.15642192959785461,
-0.173703134059906,
-0.04913985729217529,
0.07465048879384995,
0.4550788998603821,
0.0337819941341877,
-0.39059996604919434,
0.015789862722158432,
-0.07003273814916611,
-0.03454560786485672,
0.018778907135128975,
-0.03778593987226486,
0.19492559134960175,
-0.06806609034538269,
-0.1596388965845108,
0.09537104517221451,
0.3579677939414978,
0.22559092938899994,
0.1164962649345398,
0.19228041172027588,
-0.15520592033863068,
-0.07839104533195496,
0.2905122935771942,
0.1297309547662735,
0.4243227243423462,
0.02618855983018875,
0.1707214117050171,
0.28763556480407715,
-0.17454268038272858,
-0.07310227304697037,
-0.02286504954099655,
-0.17573247849941254,
-0.22309869527816772,
0.20888441801071167,
-0.16417507827281952,
-0.11730537563562393,
-0.002297094324603677,
-0.012384419329464436,
0.12052446603775024,
-0.20075984299182892,
0.07650546729564667,
-0.25668129324913025,
-0.28724682331085205,
0.12299219518899918,
-0.30196958780288696,
0.6516610383987427,
-0.0551663376390934,
0.06132415309548378,
-0.05950275808572769,
-0.10546006262302399,
0.16527485847473145,
0.23822703957557678,
0.14785347878932953,
-0.11638543009757996,
0.48886165022850037,
-0.20031240582466125,
-0.0029902784153819084,
-0.0934126079082489,
-0.1629321128129959,
0.27854567766189575,
-0.062333814799785614,
0.3968704342842102,
0.13329796493053436,
0.014534090645611286,
0.2379818856716156,
-0.07934805005788803,
0.04393180459737778,
0.05639364942908287,
-0.05308255925774574,
-0.36072438955307007,
0.0830155611038208,
0.07496536523103714,
-0.17763477563858032,
-0.1697065830230713,
-0.06683831661939621,
-0.17034199833869934,
-0.035792507231235504,
0.0874745100736618,
0.04897161200642586,
-0.01960158720612526,
0.08243529498577118,
-0.291742205619812,
-0.1441633403301239,
0.16034181416034698,
-0.2791792154312134,
-0.3279871940612793,
0.14903220534324646,
-0.16542723774909973,
-0.1276204138994217,
-0.21246905624866486,
0.06008893996477127,
0.08497606217861176,
0.37173593044281006,
-0.47020694613456726,
-0.045491937547922134,
-0.08560623228549957,
-0.2095787674188614,
-0.15742787718772888,
0.03551305830478668,
0.1971699297428131,
0.19542019069194794,
-0.3118593692779541,
-0.05594419315457344,
-0.12344033271074295,
-0.0723053514957428,
-0.16901011765003204,
-0.11012513190507889,
0.05239586532115936,
0.16151003539562225,
-0.1061365008354187,
0.5416224598884583,
-0.09479393810033798,
-0.24034997820854187,
0.26243388652801514,
-0.21935750544071198,
0.5483957529067993,
-0.3299729824066162,
0.04817385971546173,
-0.22526054084300995,
-0.18606340885162354,
-0.1302267611026764,
0.1251852810382843,
0.1015976294875145,
-0.3649054765701294,
-0.1351270079612732,
0.3272942900657654,
-0.2757907807826996,
-0.25299859046936035,
0.10521998256444931,
-0.2496872991323471,
0.3472561836242676,
0.28109657764434814,
0.19821351766586304,
-0.19016773998737335,
-0.07841169834136963,
0.14166857302188873,
-0.2078946828842163,
0.5008443593978882,
-0.31660640239715576,
-0.2445836365222931,
0.0075550200417637825,
-0.21410873532295227,
0.11638280004262924,
-0.016431288793683052,
0.43151310086250305,
0.07449419051408768,
-0.2498456835746765,
0.07409133017063141,
-0.4072485864162445,
0.14102673530578613,
-0.06978298723697662,
0.06531801074743271,
0.4257262051105499,
-0.1422998309135437,
0.03988698124885559,
0.04418579116463661,
-0.13949503004550934,
0.2800997495651245,
0.002668552566319704,
0.14837506413459778,
-0.07309258729219437,
-0.18010251224040985,
0.4978213310241699,
0.3100835382938385,
-0.24650782346725464,
-0.07268821448087692,
-0.06760824471712112,
-0.2246844470500946,
-0.1035580188035965,
0.11764557659626007,
-0.1282733976840973,
-0.13736656308174133,
0.030806424096226692,
-0.014134691096842289,
-0.4417322278022766,
0.2211635708808899,
0.09262844920158386,
-0.028350509703159332,
0.0385001003742218,
0.08485538512468338,
0.3762369453907013,
-0.09663593769073486,
-0.05708453804254532,
-0.07667667418718338,
0.51377272605896,
-0.14318880438804626,
-0.09334741532802582,
0.14890651404857635,
-0.1328096091747284,
0.37298792600631714,
0.5051235556602478,
0.14211829006671906,
-0.012947192415595055,
-0.03482469171285629,
0.07003550976514816,
-0.7317449450492859,
0.2029997855424881,
0.29833635687828064,
-0.08761920779943466,
-0.41210412979125977,
-0.6303093433380127,
0.49871546030044556,
0.3362409472465515,
-0.16436775028705597,
0.38612422347068787,
0.18335741758346558,
-0.14275774359703064,
0.3490471839904785,
0.611456036567688,
1.07218337059021,
-0.0669543445110321,
0.19128526747226715,
-0.04897775501012802,
-0.16779619455337524,
0.2585141658782959,
-0.2941984236240387,
0.015184079296886921,
-0.3580779731273651,
-0.30229198932647705,
-0.012188835069537163,
-0.17737668752670288,
0.2905063331127167,
0.2441917359828949,
0.3359149396419525,
0.01614079810678959,
-0.13866907358169556,
-0.09241482615470886,
-0.007072350475937128,
0.010425692424178123,
-0.06829331070184708,
-0.2272944301366806,
0.022529717534780502,
0.2929295599460602,
0.1871468871831894,
-0.05645739287137985,
-0.19369950890541077,
0.08127380907535553,
0.07854814827442169,
-0.03668238967657089,
-0.3751815855503082,
-0.17291299998760223,
-0.04009494557976723,
-0.33559292554855347,
-0.20262065529823303,
-0.16661541163921356,
-0.270398885011673,
-0.12373310327529907,
0.3530083894729614,
0.5267480611801147,
0.04960769787430763,
-0.03921077027916908,
0.06295146048069,
0.27372628450393677,
0.11396385729312897,
0.14096775650978088,
0.0872793197631836,
-0.009846009314060211,
0.2433607578277588,
-0.012930968776345253,
-0.19352839887142181,
-0.1752711683511734,
-0.11439504474401474,
-0.0018416650127619505,
0.09919615834951401,
-0.31525716185569763,
-0.02513798698782921,
0.23683540523052216,
0.43255820870399475,
-0.2281099259853363,
0.2589130699634552,
0.13586005568504333,
0.09330544620752335,
0.31864461302757263,
0.06158694624900818,
-0.24936245381832123,
-0.21371537446975708,
0.10636404901742935,
0.13987195491790771,
-0.1257210373878479,
0.25002503395080566,
-0.07416033744812012,
-0.21770361065864563,
-0.3489595055580139,
0.19693933427333832,
-0.015734167769551277,
-0.2842451333999634,
0.16704130172729492,
-0.24123139679431915,
-0.16739511489868164,
-0.10286515206098557,
0.24515731632709503,
0.2259480357170105,
0.08276641368865967,
0.13019876182079315,
-0.3011157810688019,
-0.26309069991111755,
0.049372393637895584,
0.29071182012557983,
0.36372697353363037,
0.38086333870887756,
-0.24484360218048096,
-0.25366848707199097,
0.23035217821598053,
-0.4873270094394684,
-0.13408790528774261,
0.029195614159107208,
0.10642343759536743,
-0.08753975480794907,
0.31845495104789734,
-0.292484849691391,
-0.15899762511253357,
0.3092517554759979,
0.12020423263311386,
0.02961154282093048,
-0.4203462302684784,
-0.0816112533211708,
0.08420100063085556,
-0.2722960412502289,
-0.003883856348693371,
0.1628352850675583,
-0.05682910978794098,
-0.2992258071899414,
-0.23588836193084717,
-0.02382027357816696,
0.23108899593353271,
0.029280154034495354,
-0.21765433251857758,
0.1210738867521286,
0.11061398684978485,
-0.1755295991897583,
0.2857792377471924,
0.27286675572395325,
0.24588817358016968,
-0.021532302722334862,
0.19695958495140076,
0.024276573210954666,
-0.08528831601142883,
0.4162358343601227,
0.005901307798922062,
0.08015011996030807,
0.015194729901850224,
0.006270273122936487,
0.01124884095042944,
0.10614989697933197,
0.28921985626220703,
0.31132611632347107,
0.5561703443527222,
-0.10687462240457535,
0.0643170028924942,
0.17222321033477783,
0.34562140703201294,
-0.29751214385032654,
-0.1903848499059677,
0.05592941492795944,
-0.09057539701461792,
0.1393975019454956,
0.3584844172000885,
0.2601660490036011,
0.15086805820465088,
0.07527966052293777,
0.11840855330228806,
-0.06238553300499916,
-0.18864861130714417,
0.016113104298710823,
0.4868813157081604,
-0.03919064253568649,
0.10246441513299942,
0.18654602766036987,
0.29478707909584045,
0.07446254789829254,
0.35340115427970886,
0.28286099433898926,
0.5724640488624573,
0.3071728050708771,
0.08095832914113998,
-0.17510268092155457,
-0.41100940108299255,
0.5259605646133423,
0.12463493645191193,
0.33961063623428345,
0.3750072121620178,
0.2568622827529907,
-0.004810091573745012,
-0.06630270183086395,
-0.1643170714378357,
-0.240058034658432,
0.10479369759559631,
-0.14435052871704102,
-0.15344174206256866,
0.03336930647492409,
-0.13387495279312134,
0.05015109106898308,
0.03410285711288452,
-0.14572730660438538,
-0.222308948636055,
0.39654794335365295,
-0.11814865469932556,
0.1333448737859726,
0.16515223681926727,
0.2351689636707306,
-0.24843156337738037,
0.02704247087240219,
-0.19623298943042755,
0.23199668526649475,
0.04507855698466301,
0.20296159386634827,
0.2792949676513672,
0.4166437089443207,
0.26948627829551697,
0.14265243709087372,
-0.19045941531658173,
-0.10611867904663086,
-0.1646558791399002,
-0.07258494943380356,
-0.22185611724853516,
0.27338555455207825,
0.13728757202625275,
0.07563011348247528,
0.43455955386161804,
0.2494102418422699,
-0.2593173682689667,
0.15917176008224487,
0.14860260486602783,
0.2486209124326706,
-0.29445144534111023,
0.3476569950580597,
0.14074890315532684,
-0.25332799553871155,
0.049462053924798965,
-0.00691651226952672,
-0.09155486524105072,
-0.11393141001462936,
0.37536272406578064,
-0.2717994749546051,
0.03507719561457634,
0.231392502784729,
0.17866645753383636,
0.21434810757637024,
0.4301132559776306,
0.1103619784116745,
-0.0018676281906664371,
0.06959749013185501,
-0.12560027837753296,
-0.559904932975769,
-0.00803280808031559,
0.16750730574131012,
-0.12435939908027649,
-0.13181836903095245,
-0.15017756819725037,
0.40355435013771057,
0.357819527387619,
0.09806094318628311,
-0.4909016788005829,
0.15343713760375977,
0.4340989887714386,
-0.37747448682785034,
-0.10517700761556625,
-0.09412699192762375,
0.14329996705055237,
0.009449329227209091,
-0.28656458854675293,
0.23167963325977325,
0.040452990680933,
0.16425754129886627,
0.14431141316890717,
-0.24928559362888336,
0.17196083068847656,
0.013188826851546764,
0.545586109161377,
-0.049810588359832764,
0.30015993118286133,
-0.27192726731300354,
-0.3004951477050781,
-0.3350383937358856,
-0.056980617344379425,
-0.12780465185642242,
0.31103357672691345,
0.0545160248875618,
-0.10514595359563828,
-0.3244408667087555,
-0.057832133024930954,
0.10824024677276611,
-0.28246554732322693,
-0.1707446426153183,
0.25242558121681213,
-0.3699461817741394,
-0.039240967482328415,
-0.06930357217788696,
0.03722629323601723,
0.20183716714382172,
0.2149088978767395,
0.022327110171318054,
0.20179514586925507,
-0.1069602221250534,
-0.24179254472255707,
0.40577197074890137,
0.1350640207529068,
-0.303671658039093,
-0.3662135601043701,
0.08858360350131989,
0.09239435940980911,
-0.018462495878338814,
-0.2113337516784668,
0.04050308093428612,
0.3394028842449188,
-0.17553037405014038,
0.21994280815124512,
0.313014954328537,
-0.37187695503234863,
-0.21052533388137817,
-0.21666043996810913,
0.5020683407783508,
-0.16070090234279633,
-0.022866668179631233,
-0.45809051394462585,
-0.36100485920906067
] |
https://github.com/huggingface/datasets/issues/1776
|
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
Indeed I will submit a PR in a fez days to enable processing on-the-fly :)
This can be useful in language modeling for tokenization, padding etc.
|
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache?
BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code:
https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
| 26 |
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
[
-0.42852485179901123,
0.06635834276676178,
-0.2913934588432312,
-0.14405997097492218,
0.3746168315410614,
0.12829965353012085,
0.3132684528827667,
0.24133805930614471,
-0.25947001576423645,
0.22958935797214508,
0.1256045699119568,
0.267027348279953,
-0.004173945169895887,
0.25180667638778687,
0.04700194671750069,
0.2829001843929291,
0.09666381776332855,
0.1625138819217682,
-0.20084403455257416,
0.2763998210430145,
-0.20207512378692627,
-0.11938562244176865,
-0.11389993131160736,
-0.060424916446208954,
-0.35528257489204407,
-0.16520772874355316,
-0.21945856511592865,
-0.011583523824810982,
-0.17630498111248016,
-0.21768303215503693,
0.13609427213668823,
0.24807238578796387,
-0.13221336901187897,
0.29923591017723083,
-0.00009656162728788331,
-0.02593439817428589,
0.0953807458281517,
-0.006914946250617504,
-0.3314861059188843,
0.2959360182285309,
-0.1418122500181198,
-0.16984321177005768,
-0.19795820116996765,
-0.18974925577640533,
-0.0825306847691536,
-0.10846507549285889,
0.009246579371392727,
-0.6884445548057556,
0.38825440406799316,
0.032224223017692566,
0.4059607684612274,
0.1537109613418579,
-0.11891229450702667,
0.020406289026141167,
0.21972669661045074,
0.26639220118522644,
-0.33211466670036316,
0.10113715380430222,
0.2439199537038803,
-0.1370614767074585,
0.10984991490840912,
0.14574548602104187,
-0.14790010452270508,
0.0874580666422844,
0.21649587154388428,
-0.08351096510887146,
-0.008890526369214058,
-0.23090745508670807,
0.025649823248386383,
0.15354418754577637,
0.11729541420936584,
-0.3383146822452545,
-0.5394067764282227,
-0.17991499602794647,
0.20039282739162445,
-0.3096981644630432,
-0.03857201710343361,
0.13159935176372528,
-0.16390082240104675,
0.05478455871343613,
-0.2334309071302414,
-0.4020220935344696,
0.08641410619020462,
-0.48201537132263184,
-0.048447951674461365,
0.22779728472232819,
-0.15283706784248352,
-0.06508062779903412,
-0.2170359045267105,
0.1740448772907257,
0.30503180623054504,
-0.13512057065963745,
-0.11943020671606064,
0.27002280950546265,
-0.0218218844383955,
-0.32383763790130615,
-0.18628574907779694,
-0.024671489372849464,
0.2725938558578491,
0.06115615367889404,
0.23859776556491852,
0.04461125656962395,
0.02936757355928421,
-0.20387914776802063,
0.2199310064315796,
-0.16486571729183197,
-0.1889452189207077,
-0.32986652851104736,
0.12104710936546326,
-0.1570211499929428,
-0.1741812378168106,
0.09766445308923721,
0.1501684933900833,
-0.28608280420303345,
0.03770739212632179,
0.3063255548477173,
0.3911988139152527,
-0.19142410159111023,
-0.0678630992770195,
0.12424429506063461,
-0.061089180409908295,
-0.17544205486774445,
-0.4518595337867737,
-0.05764608457684517,
-0.08253219723701477,
-0.04254448786377907,
0.10665347427129745,
0.017625214532017708,
0.020170509815216064,
-0.210234135389328,
-0.2220827043056488,
0.04482389986515045,
-0.08517584204673767,
0.16838720440864563,
0.033730581402778625,
-0.05699343606829643,
-0.08095205575227737,
0.06497496366500854,
0.08399670571088791,
-0.24210521578788757,
0.14847837388515472,
-0.1762026995420456,
0.18261924386024475,
0.11747463792562485,
-0.061137039214372635,
-0.02484625205397606,
-0.17474471032619476,
0.2566918134689331,
-0.2578992247581482,
0.27939724922180176,
-0.19840849936008453,
-0.07081373035907745,
0.007298441603779793,
0.28065410256385803,
-0.008205321617424488,
-0.0824149027466774,
0.14750471711158752,
0.19881291687488556,
0.3056827485561371,
-0.09688834846019745,
0.10947886854410172,
0.14117619395256042,
-0.1667625904083252,
-0.08233055472373962,
0.04903506115078926,
0.39631372690200806,
-0.3748147189617157,
0.1720547378063202,
0.0714070051908493,
-0.043920133262872696,
0.05389595031738281,
-0.177310973405838,
0.06414157897233963,
0.14593179523944855,
-0.07514539361000061,
-0.08533778041601181,
0.24204905331134796,
0.18741336464881897,
0.2029576152563095,
0.21616323292255402,
-0.2407001256942749,
-0.14325420558452606,
0.030768541619181633,
0.08552155643701553,
-0.1976727843284607,
-0.1582658737897873,
-0.049754269421100616,
0.18848995864391327,
0.015009506605565548,
-0.0760306641459465,
-0.09047604352235794,
-0.49807724356651306,
-0.15655392408370972,
-0.10666906833648682,
-0.06323359161615372,
0.23164838552474976,
-0.2005900889635086,
-0.07565595954656601,
0.21654701232910156,
-0.21543355286121368,
-0.09992673248052597,
0.12562188506126404,
-0.012478059157729149,
0.1339414268732071,
-0.11201665550470352,
-0.27422550320625305,
-0.2939554452896118,
0.028349485248327255,
0.011839151382446289,
0.005504842847585678,
0.3638780415058136,
-0.28773900866508484,
0.0083774384111166,
0.09557284414768219,
0.2227010875940323,
0.13475987315177917,
0.33183908462524414,
0.20238110423088074,
-0.0993930771946907,
-0.25277024507522583,
-0.49360954761505127,
0.17135877907276154,
-0.25318557024002075,
-0.02594013139605522,
-0.1788392961025238,
0.02417282946407795,
0.10199492424726486,
0.0024365463759750128,
-0.04035530984401703,
0.06498908251523972,
-0.14898358285427094,
0.022847365587949753,
0.08443454653024673,
0.27432891726493835,
-0.06178678572177887,
0.10437534749507904,
0.04585610702633858,
0.23894540965557098,
-0.11604078114032745,
-0.014480222016572952,
-0.11397065222263336,
-0.10761146247386932,
-0.007177737541496754,
0.017826693132519722,
-0.1469607651233673,
0.3839873969554901,
-0.2725922167301178,
0.3208930492401123,
0.015262619592249393,
-0.11088664084672928,
0.2556641399860382,
-0.0655134841799736,
-0.15642192959785461,
-0.173703134059906,
-0.04913985729217529,
0.07465048879384995,
0.4550788998603821,
0.0337819941341877,
-0.39059996604919434,
0.015789862722158432,
-0.07003273814916611,
-0.03454560786485672,
0.018778907135128975,
-0.03778593987226486,
0.19492559134960175,
-0.06806609034538269,
-0.1596388965845108,
0.09537104517221451,
0.3579677939414978,
0.22559092938899994,
0.1164962649345398,
0.19228041172027588,
-0.15520592033863068,
-0.07839104533195496,
0.2905122935771942,
0.1297309547662735,
0.4243227243423462,
0.02618855983018875,
0.1707214117050171,
0.28763556480407715,
-0.17454268038272858,
-0.07310227304697037,
-0.02286504954099655,
-0.17573247849941254,
-0.22309869527816772,
0.20888441801071167,
-0.16417507827281952,
-0.11730537563562393,
-0.002297094324603677,
-0.012384419329464436,
0.12052446603775024,
-0.20075984299182892,
0.07650546729564667,
-0.25668129324913025,
-0.28724682331085205,
0.12299219518899918,
-0.30196958780288696,
0.6516610383987427,
-0.0551663376390934,
0.06132415309548378,
-0.05950275808572769,
-0.10546006262302399,
0.16527485847473145,
0.23822703957557678,
0.14785347878932953,
-0.11638543009757996,
0.48886165022850037,
-0.20031240582466125,
-0.0029902784153819084,
-0.0934126079082489,
-0.1629321128129959,
0.27854567766189575,
-0.062333814799785614,
0.3968704342842102,
0.13329796493053436,
0.014534090645611286,
0.2379818856716156,
-0.07934805005788803,
0.04393180459737778,
0.05639364942908287,
-0.05308255925774574,
-0.36072438955307007,
0.0830155611038208,
0.07496536523103714,
-0.17763477563858032,
-0.1697065830230713,
-0.06683831661939621,
-0.17034199833869934,
-0.035792507231235504,
0.0874745100736618,
0.04897161200642586,
-0.01960158720612526,
0.08243529498577118,
-0.291742205619812,
-0.1441633403301239,
0.16034181416034698,
-0.2791792154312134,
-0.3279871940612793,
0.14903220534324646,
-0.16542723774909973,
-0.1276204138994217,
-0.21246905624866486,
0.06008893996477127,
0.08497606217861176,
0.37173593044281006,
-0.47020694613456726,
-0.045491937547922134,
-0.08560623228549957,
-0.2095787674188614,
-0.15742787718772888,
0.03551305830478668,
0.1971699297428131,
0.19542019069194794,
-0.3118593692779541,
-0.05594419315457344,
-0.12344033271074295,
-0.0723053514957428,
-0.16901011765003204,
-0.11012513190507889,
0.05239586532115936,
0.16151003539562225,
-0.1061365008354187,
0.5416224598884583,
-0.09479393810033798,
-0.24034997820854187,
0.26243388652801514,
-0.21935750544071198,
0.5483957529067993,
-0.3299729824066162,
0.04817385971546173,
-0.22526054084300995,
-0.18606340885162354,
-0.1302267611026764,
0.1251852810382843,
0.1015976294875145,
-0.3649054765701294,
-0.1351270079612732,
0.3272942900657654,
-0.2757907807826996,
-0.25299859046936035,
0.10521998256444931,
-0.2496872991323471,
0.3472561836242676,
0.28109657764434814,
0.19821351766586304,
-0.19016773998737335,
-0.07841169834136963,
0.14166857302188873,
-0.2078946828842163,
0.5008443593978882,
-0.31660640239715576,
-0.2445836365222931,
0.0075550200417637825,
-0.21410873532295227,
0.11638280004262924,
-0.016431288793683052,
0.43151310086250305,
0.07449419051408768,
-0.2498456835746765,
0.07409133017063141,
-0.4072485864162445,
0.14102673530578613,
-0.06978298723697662,
0.06531801074743271,
0.4257262051105499,
-0.1422998309135437,
0.03988698124885559,
0.04418579116463661,
-0.13949503004550934,
0.2800997495651245,
0.002668552566319704,
0.14837506413459778,
-0.07309258729219437,
-0.18010251224040985,
0.4978213310241699,
0.3100835382938385,
-0.24650782346725464,
-0.07268821448087692,
-0.06760824471712112,
-0.2246844470500946,
-0.1035580188035965,
0.11764557659626007,
-0.1282733976840973,
-0.13736656308174133,
0.030806424096226692,
-0.014134691096842289,
-0.4417322278022766,
0.2211635708808899,
0.09262844920158386,
-0.028350509703159332,
0.0385001003742218,
0.08485538512468338,
0.3762369453907013,
-0.09663593769073486,
-0.05708453804254532,
-0.07667667418718338,
0.51377272605896,
-0.14318880438804626,
-0.09334741532802582,
0.14890651404857635,
-0.1328096091747284,
0.37298792600631714,
0.5051235556602478,
0.14211829006671906,
-0.012947192415595055,
-0.03482469171285629,
0.07003550976514816,
-0.7317449450492859,
0.2029997855424881,
0.29833635687828064,
-0.08761920779943466,
-0.41210412979125977,
-0.6303093433380127,
0.49871546030044556,
0.3362409472465515,
-0.16436775028705597,
0.38612422347068787,
0.18335741758346558,
-0.14275774359703064,
0.3490471839904785,
0.611456036567688,
1.07218337059021,
-0.0669543445110321,
0.19128526747226715,
-0.04897775501012802,
-0.16779619455337524,
0.2585141658782959,
-0.2941984236240387,
0.015184079296886921,
-0.3580779731273651,
-0.30229198932647705,
-0.012188835069537163,
-0.17737668752670288,
0.2905063331127167,
0.2441917359828949,
0.3359149396419525,
0.01614079810678959,
-0.13866907358169556,
-0.09241482615470886,
-0.007072350475937128,
0.010425692424178123,
-0.06829331070184708,
-0.2272944301366806,
0.022529717534780502,
0.2929295599460602,
0.1871468871831894,
-0.05645739287137985,
-0.19369950890541077,
0.08127380907535553,
0.07854814827442169,
-0.03668238967657089,
-0.3751815855503082,
-0.17291299998760223,
-0.04009494557976723,
-0.33559292554855347,
-0.20262065529823303,
-0.16661541163921356,
-0.270398885011673,
-0.12373310327529907,
0.3530083894729614,
0.5267480611801147,
0.04960769787430763,
-0.03921077027916908,
0.06295146048069,
0.27372628450393677,
0.11396385729312897,
0.14096775650978088,
0.0872793197631836,
-0.009846009314060211,
0.2433607578277588,
-0.012930968776345253,
-0.19352839887142181,
-0.1752711683511734,
-0.11439504474401474,
-0.0018416650127619505,
0.09919615834951401,
-0.31525716185569763,
-0.02513798698782921,
0.23683540523052216,
0.43255820870399475,
-0.2281099259853363,
0.2589130699634552,
0.13586005568504333,
0.09330544620752335,
0.31864461302757263,
0.06158694624900818,
-0.24936245381832123,
-0.21371537446975708,
0.10636404901742935,
0.13987195491790771,
-0.1257210373878479,
0.25002503395080566,
-0.07416033744812012,
-0.21770361065864563,
-0.3489595055580139,
0.19693933427333832,
-0.015734167769551277,
-0.2842451333999634,
0.16704130172729492,
-0.24123139679431915,
-0.16739511489868164,
-0.10286515206098557,
0.24515731632709503,
0.2259480357170105,
0.08276641368865967,
0.13019876182079315,
-0.3011157810688019,
-0.26309069991111755,
0.049372393637895584,
0.29071182012557983,
0.36372697353363037,
0.38086333870887756,
-0.24484360218048096,
-0.25366848707199097,
0.23035217821598053,
-0.4873270094394684,
-0.13408790528774261,
0.029195614159107208,
0.10642343759536743,
-0.08753975480794907,
0.31845495104789734,
-0.292484849691391,
-0.15899762511253357,
0.3092517554759979,
0.12020423263311386,
0.02961154282093048,
-0.4203462302684784,
-0.0816112533211708,
0.08420100063085556,
-0.2722960412502289,
-0.003883856348693371,
0.1628352850675583,
-0.05682910978794098,
-0.2992258071899414,
-0.23588836193084717,
-0.02382027357816696,
0.23108899593353271,
0.029280154034495354,
-0.21765433251857758,
0.1210738867521286,
0.11061398684978485,
-0.1755295991897583,
0.2857792377471924,
0.27286675572395325,
0.24588817358016968,
-0.021532302722334862,
0.19695958495140076,
0.024276573210954666,
-0.08528831601142883,
0.4162358343601227,
0.005901307798922062,
0.08015011996030807,
0.015194729901850224,
0.006270273122936487,
0.01124884095042944,
0.10614989697933197,
0.28921985626220703,
0.31132611632347107,
0.5561703443527222,
-0.10687462240457535,
0.0643170028924942,
0.17222321033477783,
0.34562140703201294,
-0.29751214385032654,
-0.1903848499059677,
0.05592941492795944,
-0.09057539701461792,
0.1393975019454956,
0.3584844172000885,
0.2601660490036011,
0.15086805820465088,
0.07527966052293777,
0.11840855330228806,
-0.06238553300499916,
-0.18864861130714417,
0.016113104298710823,
0.4868813157081604,
-0.03919064253568649,
0.10246441513299942,
0.18654602766036987,
0.29478707909584045,
0.07446254789829254,
0.35340115427970886,
0.28286099433898926,
0.5724640488624573,
0.3071728050708771,
0.08095832914113998,
-0.17510268092155457,
-0.41100940108299255,
0.5259605646133423,
0.12463493645191193,
0.33961063623428345,
0.3750072121620178,
0.2568622827529907,
-0.004810091573745012,
-0.06630270183086395,
-0.1643170714378357,
-0.240058034658432,
0.10479369759559631,
-0.14435052871704102,
-0.15344174206256866,
0.03336930647492409,
-0.13387495279312134,
0.05015109106898308,
0.03410285711288452,
-0.14572730660438538,
-0.222308948636055,
0.39654794335365295,
-0.11814865469932556,
0.1333448737859726,
0.16515223681926727,
0.2351689636707306,
-0.24843156337738037,
0.02704247087240219,
-0.19623298943042755,
0.23199668526649475,
0.04507855698466301,
0.20296159386634827,
0.2792949676513672,
0.4166437089443207,
0.26948627829551697,
0.14265243709087372,
-0.19045941531658173,
-0.10611867904663086,
-0.1646558791399002,
-0.07258494943380356,
-0.22185611724853516,
0.27338555455207825,
0.13728757202625275,
0.07563011348247528,
0.43455955386161804,
0.2494102418422699,
-0.2593173682689667,
0.15917176008224487,
0.14860260486602783,
0.2486209124326706,
-0.29445144534111023,
0.3476569950580597,
0.14074890315532684,
-0.25332799553871155,
0.049462053924798965,
-0.00691651226952672,
-0.09155486524105072,
-0.11393141001462936,
0.37536272406578064,
-0.2717994749546051,
0.03507719561457634,
0.231392502784729,
0.17866645753383636,
0.21434810757637024,
0.4301132559776306,
0.1103619784116745,
-0.0018676281906664371,
0.06959749013185501,
-0.12560027837753296,
-0.559904932975769,
-0.00803280808031559,
0.16750730574131012,
-0.12435939908027649,
-0.13181836903095245,
-0.15017756819725037,
0.40355435013771057,
0.357819527387619,
0.09806094318628311,
-0.4909016788005829,
0.15343713760375977,
0.4340989887714386,
-0.37747448682785034,
-0.10517700761556625,
-0.09412699192762375,
0.14329996705055237,
0.009449329227209091,
-0.28656458854675293,
0.23167963325977325,
0.040452990680933,
0.16425754129886627,
0.14431141316890717,
-0.24928559362888336,
0.17196083068847656,
0.013188826851546764,
0.545586109161377,
-0.049810588359832764,
0.30015993118286133,
-0.27192726731300354,
-0.3004951477050781,
-0.3350383937358856,
-0.056980617344379425,
-0.12780465185642242,
0.31103357672691345,
0.0545160248875618,
-0.10514595359563828,
-0.3244408667087555,
-0.057832133024930954,
0.10824024677276611,
-0.28246554732322693,
-0.1707446426153183,
0.25242558121681213,
-0.3699461817741394,
-0.039240967482328415,
-0.06930357217788696,
0.03722629323601723,
0.20183716714382172,
0.2149088978767395,
0.022327110171318054,
0.20179514586925507,
-0.1069602221250534,
-0.24179254472255707,
0.40577197074890137,
0.1350640207529068,
-0.303671658039093,
-0.3662135601043701,
0.08858360350131989,
0.09239435940980911,
-0.018462495878338814,
-0.2113337516784668,
0.04050308093428612,
0.3394028842449188,
-0.17553037405014038,
0.21994280815124512,
0.313014954328537,
-0.37187695503234863,
-0.21052533388137817,
-0.21666043996810913,
0.5020683407783508,
-0.16070090234279633,
-0.022866668179631233,
-0.45809051394462585,
-0.36100485920906067
] |
https://github.com/huggingface/datasets/issues/1776
|
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
Hi @acul3,
Please look at the discussion on a related Issue #1825. I think using `set_transform` after building from source should do.
|
I know we can use `Datasets.map` to preprocess a dataset, but I'm using it with very large corpus which generates huge cache file (several TB cache from a 400 GB text file). I have no disk large enough to save it. Can we preprocess a dataset on the fly without generating cache?
BTW, I tried raising `writer_batch_size`. Seems that argument doesn't have any effect when it's larger than `batch_size`, because you are saving all the batch instantly after it's processed. Please check the following code:
https://github.com/huggingface/datasets/blob/0281f9d881f3a55c89aeaa642f1ba23444b64083/src/datasets/arrow_dataset.py#L1532
| 22 |
[Question & Bug Report] Can we preprocess a dataset on the fly?
|
[
-0.42852485179901123,
0.06635834276676178,
-0.2913934588432312,
-0.14405997097492218,
0.3746168315410614,
0.12829965353012085,
0.3132684528827667,
0.24133805930614471,
-0.25947001576423645,
0.22958935797214508,
0.1256045699119568,
0.267027348279953,
-0.004173945169895887,
0.25180667638778687,
0.04700194671750069,
0.2829001843929291,
0.09666381776332855,
0.1625138819217682,
-0.20084403455257416,
0.2763998210430145,
-0.20207512378692627,
-0.11938562244176865,
-0.11389993131160736,
-0.060424916446208954,
-0.35528257489204407,
-0.16520772874355316,
-0.21945856511592865,
-0.011583523824810982,
-0.17630498111248016,
-0.21768303215503693,
0.13609427213668823,
0.24807238578796387,
-0.13221336901187897,
0.29923591017723083,
-0.00009656162728788331,
-0.02593439817428589,
0.0953807458281517,
-0.006914946250617504,
-0.3314861059188843,
0.2959360182285309,
-0.1418122500181198,
-0.16984321177005768,
-0.19795820116996765,
-0.18974925577640533,
-0.0825306847691536,
-0.10846507549285889,
0.009246579371392727,
-0.6884445548057556,
0.38825440406799316,
0.032224223017692566,
0.4059607684612274,
0.1537109613418579,
-0.11891229450702667,
0.020406289026141167,
0.21972669661045074,
0.26639220118522644,
-0.33211466670036316,
0.10113715380430222,
0.2439199537038803,
-0.1370614767074585,
0.10984991490840912,
0.14574548602104187,
-0.14790010452270508,
0.0874580666422844,
0.21649587154388428,
-0.08351096510887146,
-0.008890526369214058,
-0.23090745508670807,
0.025649823248386383,
0.15354418754577637,
0.11729541420936584,
-0.3383146822452545,
-0.5394067764282227,
-0.17991499602794647,
0.20039282739162445,
-0.3096981644630432,
-0.03857201710343361,
0.13159935176372528,
-0.16390082240104675,
0.05478455871343613,
-0.2334309071302414,
-0.4020220935344696,
0.08641410619020462,
-0.48201537132263184,
-0.048447951674461365,
0.22779728472232819,
-0.15283706784248352,
-0.06508062779903412,
-0.2170359045267105,
0.1740448772907257,
0.30503180623054504,
-0.13512057065963745,
-0.11943020671606064,
0.27002280950546265,
-0.0218218844383955,
-0.32383763790130615,
-0.18628574907779694,
-0.024671489372849464,
0.2725938558578491,
0.06115615367889404,
0.23859776556491852,
0.04461125656962395,
0.02936757355928421,
-0.20387914776802063,
0.2199310064315796,
-0.16486571729183197,
-0.1889452189207077,
-0.32986652851104736,
0.12104710936546326,
-0.1570211499929428,
-0.1741812378168106,
0.09766445308923721,
0.1501684933900833,
-0.28608280420303345,
0.03770739212632179,
0.3063255548477173,
0.3911988139152527,
-0.19142410159111023,
-0.0678630992770195,
0.12424429506063461,
-0.061089180409908295,
-0.17544205486774445,
-0.4518595337867737,
-0.05764608457684517,
-0.08253219723701477,
-0.04254448786377907,
0.10665347427129745,
0.017625214532017708,
0.020170509815216064,
-0.210234135389328,
-0.2220827043056488,
0.04482389986515045,
-0.08517584204673767,
0.16838720440864563,
0.033730581402778625,
-0.05699343606829643,
-0.08095205575227737,
0.06497496366500854,
0.08399670571088791,
-0.24210521578788757,
0.14847837388515472,
-0.1762026995420456,
0.18261924386024475,
0.11747463792562485,
-0.061137039214372635,
-0.02484625205397606,
-0.17474471032619476,
0.2566918134689331,
-0.2578992247581482,
0.27939724922180176,
-0.19840849936008453,
-0.07081373035907745,
0.007298441603779793,
0.28065410256385803,
-0.008205321617424488,
-0.0824149027466774,
0.14750471711158752,
0.19881291687488556,
0.3056827485561371,
-0.09688834846019745,
0.10947886854410172,
0.14117619395256042,
-0.1667625904083252,
-0.08233055472373962,
0.04903506115078926,
0.39631372690200806,
-0.3748147189617157,
0.1720547378063202,
0.0714070051908493,
-0.043920133262872696,
0.05389595031738281,
-0.177310973405838,
0.06414157897233963,
0.14593179523944855,
-0.07514539361000061,
-0.08533778041601181,
0.24204905331134796,
0.18741336464881897,
0.2029576152563095,
0.21616323292255402,
-0.2407001256942749,
-0.14325420558452606,
0.030768541619181633,
0.08552155643701553,
-0.1976727843284607,
-0.1582658737897873,
-0.049754269421100616,
0.18848995864391327,
0.015009506605565548,
-0.0760306641459465,
-0.09047604352235794,
-0.49807724356651306,
-0.15655392408370972,
-0.10666906833648682,
-0.06323359161615372,
0.23164838552474976,
-0.2005900889635086,
-0.07565595954656601,
0.21654701232910156,
-0.21543355286121368,
-0.09992673248052597,
0.12562188506126404,
-0.012478059157729149,
0.1339414268732071,
-0.11201665550470352,
-0.27422550320625305,
-0.2939554452896118,
0.028349485248327255,
0.011839151382446289,
0.005504842847585678,
0.3638780415058136,
-0.28773900866508484,
0.0083774384111166,
0.09557284414768219,
0.2227010875940323,
0.13475987315177917,
0.33183908462524414,
0.20238110423088074,
-0.0993930771946907,
-0.25277024507522583,
-0.49360954761505127,
0.17135877907276154,
-0.25318557024002075,
-0.02594013139605522,
-0.1788392961025238,
0.02417282946407795,
0.10199492424726486,
0.0024365463759750128,
-0.04035530984401703,
0.06498908251523972,
-0.14898358285427094,
0.022847365587949753,
0.08443454653024673,
0.27432891726493835,
-0.06178678572177887,
0.10437534749507904,
0.04585610702633858,
0.23894540965557098,
-0.11604078114032745,
-0.014480222016572952,
-0.11397065222263336,
-0.10761146247386932,
-0.007177737541496754,
0.017826693132519722,
-0.1469607651233673,
0.3839873969554901,
-0.2725922167301178,
0.3208930492401123,
0.015262619592249393,
-0.11088664084672928,
0.2556641399860382,
-0.0655134841799736,
-0.15642192959785461,
-0.173703134059906,
-0.04913985729217529,
0.07465048879384995,
0.4550788998603821,
0.0337819941341877,
-0.39059996604919434,
0.015789862722158432,
-0.07003273814916611,
-0.03454560786485672,
0.018778907135128975,
-0.03778593987226486,
0.19492559134960175,
-0.06806609034538269,
-0.1596388965845108,
0.09537104517221451,
0.3579677939414978,
0.22559092938899994,
0.1164962649345398,
0.19228041172027588,
-0.15520592033863068,
-0.07839104533195496,
0.2905122935771942,
0.1297309547662735,
0.4243227243423462,
0.02618855983018875,
0.1707214117050171,
0.28763556480407715,
-0.17454268038272858,
-0.07310227304697037,
-0.02286504954099655,
-0.17573247849941254,
-0.22309869527816772,
0.20888441801071167,
-0.16417507827281952,
-0.11730537563562393,
-0.002297094324603677,
-0.012384419329464436,
0.12052446603775024,
-0.20075984299182892,
0.07650546729564667,
-0.25668129324913025,
-0.28724682331085205,
0.12299219518899918,
-0.30196958780288696,
0.6516610383987427,
-0.0551663376390934,
0.06132415309548378,
-0.05950275808572769,
-0.10546006262302399,
0.16527485847473145,
0.23822703957557678,
0.14785347878932953,
-0.11638543009757996,
0.48886165022850037,
-0.20031240582466125,
-0.0029902784153819084,
-0.0934126079082489,
-0.1629321128129959,
0.27854567766189575,
-0.062333814799785614,
0.3968704342842102,
0.13329796493053436,
0.014534090645611286,
0.2379818856716156,
-0.07934805005788803,
0.04393180459737778,
0.05639364942908287,
-0.05308255925774574,
-0.36072438955307007,
0.0830155611038208,
0.07496536523103714,
-0.17763477563858032,
-0.1697065830230713,
-0.06683831661939621,
-0.17034199833869934,
-0.035792507231235504,
0.0874745100736618,
0.04897161200642586,
-0.01960158720612526,
0.08243529498577118,
-0.291742205619812,
-0.1441633403301239,
0.16034181416034698,
-0.2791792154312134,
-0.3279871940612793,
0.14903220534324646,
-0.16542723774909973,
-0.1276204138994217,
-0.21246905624866486,
0.06008893996477127,
0.08497606217861176,
0.37173593044281006,
-0.47020694613456726,
-0.045491937547922134,
-0.08560623228549957,
-0.2095787674188614,
-0.15742787718772888,
0.03551305830478668,
0.1971699297428131,
0.19542019069194794,
-0.3118593692779541,
-0.05594419315457344,
-0.12344033271074295,
-0.0723053514957428,
-0.16901011765003204,
-0.11012513190507889,
0.05239586532115936,
0.16151003539562225,
-0.1061365008354187,
0.5416224598884583,
-0.09479393810033798,
-0.24034997820854187,
0.26243388652801514,
-0.21935750544071198,
0.5483957529067993,
-0.3299729824066162,
0.04817385971546173,
-0.22526054084300995,
-0.18606340885162354,
-0.1302267611026764,
0.1251852810382843,
0.1015976294875145,
-0.3649054765701294,
-0.1351270079612732,
0.3272942900657654,
-0.2757907807826996,
-0.25299859046936035,
0.10521998256444931,
-0.2496872991323471,
0.3472561836242676,
0.28109657764434814,
0.19821351766586304,
-0.19016773998737335,
-0.07841169834136963,
0.14166857302188873,
-0.2078946828842163,
0.5008443593978882,
-0.31660640239715576,
-0.2445836365222931,
0.0075550200417637825,
-0.21410873532295227,
0.11638280004262924,
-0.016431288793683052,
0.43151310086250305,
0.07449419051408768,
-0.2498456835746765,
0.07409133017063141,
-0.4072485864162445,
0.14102673530578613,
-0.06978298723697662,
0.06531801074743271,
0.4257262051105499,
-0.1422998309135437,
0.03988698124885559,
0.04418579116463661,
-0.13949503004550934,
0.2800997495651245,
0.002668552566319704,
0.14837506413459778,
-0.07309258729219437,
-0.18010251224040985,
0.4978213310241699,
0.3100835382938385,
-0.24650782346725464,
-0.07268821448087692,
-0.06760824471712112,
-0.2246844470500946,
-0.1035580188035965,
0.11764557659626007,
-0.1282733976840973,
-0.13736656308174133,
0.030806424096226692,
-0.014134691096842289,
-0.4417322278022766,
0.2211635708808899,
0.09262844920158386,
-0.028350509703159332,
0.0385001003742218,
0.08485538512468338,
0.3762369453907013,
-0.09663593769073486,
-0.05708453804254532,
-0.07667667418718338,
0.51377272605896,
-0.14318880438804626,
-0.09334741532802582,
0.14890651404857635,
-0.1328096091747284,
0.37298792600631714,
0.5051235556602478,
0.14211829006671906,
-0.012947192415595055,
-0.03482469171285629,
0.07003550976514816,
-0.7317449450492859,
0.2029997855424881,
0.29833635687828064,
-0.08761920779943466,
-0.41210412979125977,
-0.6303093433380127,
0.49871546030044556,
0.3362409472465515,
-0.16436775028705597,
0.38612422347068787,
0.18335741758346558,
-0.14275774359703064,
0.3490471839904785,
0.611456036567688,
1.07218337059021,
-0.0669543445110321,
0.19128526747226715,
-0.04897775501012802,
-0.16779619455337524,
0.2585141658782959,
-0.2941984236240387,
0.015184079296886921,
-0.3580779731273651,
-0.30229198932647705,
-0.012188835069537163,
-0.17737668752670288,
0.2905063331127167,
0.2441917359828949,
0.3359149396419525,
0.01614079810678959,
-0.13866907358169556,
-0.09241482615470886,
-0.007072350475937128,
0.010425692424178123,
-0.06829331070184708,
-0.2272944301366806,
0.022529717534780502,
0.2929295599460602,
0.1871468871831894,
-0.05645739287137985,
-0.19369950890541077,
0.08127380907535553,
0.07854814827442169,
-0.03668238967657089,
-0.3751815855503082,
-0.17291299998760223,
-0.04009494557976723,
-0.33559292554855347,
-0.20262065529823303,
-0.16661541163921356,
-0.270398885011673,
-0.12373310327529907,
0.3530083894729614,
0.5267480611801147,
0.04960769787430763,
-0.03921077027916908,
0.06295146048069,
0.27372628450393677,
0.11396385729312897,
0.14096775650978088,
0.0872793197631836,
-0.009846009314060211,
0.2433607578277588,
-0.012930968776345253,
-0.19352839887142181,
-0.1752711683511734,
-0.11439504474401474,
-0.0018416650127619505,
0.09919615834951401,
-0.31525716185569763,
-0.02513798698782921,
0.23683540523052216,
0.43255820870399475,
-0.2281099259853363,
0.2589130699634552,
0.13586005568504333,
0.09330544620752335,
0.31864461302757263,
0.06158694624900818,
-0.24936245381832123,
-0.21371537446975708,
0.10636404901742935,
0.13987195491790771,
-0.1257210373878479,
0.25002503395080566,
-0.07416033744812012,
-0.21770361065864563,
-0.3489595055580139,
0.19693933427333832,
-0.015734167769551277,
-0.2842451333999634,
0.16704130172729492,
-0.24123139679431915,
-0.16739511489868164,
-0.10286515206098557,
0.24515731632709503,
0.2259480357170105,
0.08276641368865967,
0.13019876182079315,
-0.3011157810688019,
-0.26309069991111755,
0.049372393637895584,
0.29071182012557983,
0.36372697353363037,
0.38086333870887756,
-0.24484360218048096,
-0.25366848707199097,
0.23035217821598053,
-0.4873270094394684,
-0.13408790528774261,
0.029195614159107208,
0.10642343759536743,
-0.08753975480794907,
0.31845495104789734,
-0.292484849691391,
-0.15899762511253357,
0.3092517554759979,
0.12020423263311386,
0.02961154282093048,
-0.4203462302684784,
-0.0816112533211708,
0.08420100063085556,
-0.2722960412502289,
-0.003883856348693371,
0.1628352850675583,
-0.05682910978794098,
-0.2992258071899414,
-0.23588836193084717,
-0.02382027357816696,
0.23108899593353271,
0.029280154034495354,
-0.21765433251857758,
0.1210738867521286,
0.11061398684978485,
-0.1755295991897583,
0.2857792377471924,
0.27286675572395325,
0.24588817358016968,
-0.021532302722334862,
0.19695958495140076,
0.024276573210954666,
-0.08528831601142883,
0.4162358343601227,
0.005901307798922062,
0.08015011996030807,
0.015194729901850224,
0.006270273122936487,
0.01124884095042944,
0.10614989697933197,
0.28921985626220703,
0.31132611632347107,
0.5561703443527222,
-0.10687462240457535,
0.0643170028924942,
0.17222321033477783,
0.34562140703201294,
-0.29751214385032654,
-0.1903848499059677,
0.05592941492795944,
-0.09057539701461792,
0.1393975019454956,
0.3584844172000885,
0.2601660490036011,
0.15086805820465088,
0.07527966052293777,
0.11840855330228806,
-0.06238553300499916,
-0.18864861130714417,
0.016113104298710823,
0.4868813157081604,
-0.03919064253568649,
0.10246441513299942,
0.18654602766036987,
0.29478707909584045,
0.07446254789829254,
0.35340115427970886,
0.28286099433898926,
0.5724640488624573,
0.3071728050708771,
0.08095832914113998,
-0.17510268092155457,
-0.41100940108299255,
0.5259605646133423,
0.12463493645191193,
0.33961063623428345,
0.3750072121620178,
0.2568622827529907,
-0.004810091573745012,
-0.06630270183086395,
-0.1643170714378357,
-0.240058034658432,
0.10479369759559631,
-0.14435052871704102,
-0.15344174206256866,
0.03336930647492409,
-0.13387495279312134,
0.05015109106898308,
0.03410285711288452,
-0.14572730660438538,
-0.222308948636055,
0.39654794335365295,
-0.11814865469932556,
0.1333448737859726,
0.16515223681926727,
0.2351689636707306,
-0.24843156337738037,
0.02704247087240219,
-0.19623298943042755,
0.23199668526649475,
0.04507855698466301,
0.20296159386634827,
0.2792949676513672,
0.4166437089443207,
0.26948627829551697,
0.14265243709087372,
-0.19045941531658173,
-0.10611867904663086,
-0.1646558791399002,
-0.07258494943380356,
-0.22185611724853516,
0.27338555455207825,
0.13728757202625275,
0.07563011348247528,
0.43455955386161804,
0.2494102418422699,
-0.2593173682689667,
0.15917176008224487,
0.14860260486602783,
0.2486209124326706,
-0.29445144534111023,
0.3476569950580597,
0.14074890315532684,
-0.25332799553871155,
0.049462053924798965,
-0.00691651226952672,
-0.09155486524105072,
-0.11393141001462936,
0.37536272406578064,
-0.2717994749546051,
0.03507719561457634,
0.231392502784729,
0.17866645753383636,
0.21434810757637024,
0.4301132559776306,
0.1103619784116745,
-0.0018676281906664371,
0.06959749013185501,
-0.12560027837753296,
-0.559904932975769,
-0.00803280808031559,
0.16750730574131012,
-0.12435939908027649,
-0.13181836903095245,
-0.15017756819725037,
0.40355435013771057,
0.357819527387619,
0.09806094318628311,
-0.4909016788005829,
0.15343713760375977,
0.4340989887714386,
-0.37747448682785034,
-0.10517700761556625,
-0.09412699192762375,
0.14329996705055237,
0.009449329227209091,
-0.28656458854675293,
0.23167963325977325,
0.040452990680933,
0.16425754129886627,
0.14431141316890717,
-0.24928559362888336,
0.17196083068847656,
0.013188826851546764,
0.545586109161377,
-0.049810588359832764,
0.30015993118286133,
-0.27192726731300354,
-0.3004951477050781,
-0.3350383937358856,
-0.056980617344379425,
-0.12780465185642242,
0.31103357672691345,
0.0545160248875618,
-0.10514595359563828,
-0.3244408667087555,
-0.057832133024930954,
0.10824024677276611,
-0.28246554732322693,
-0.1707446426153183,
0.25242558121681213,
-0.3699461817741394,
-0.039240967482328415,
-0.06930357217788696,
0.03722629323601723,
0.20183716714382172,
0.2149088978767395,
0.022327110171318054,
0.20179514586925507,
-0.1069602221250534,
-0.24179254472255707,
0.40577197074890137,
0.1350640207529068,
-0.303671658039093,
-0.3662135601043701,
0.08858360350131989,
0.09239435940980911,
-0.018462495878338814,
-0.2113337516784668,
0.04050308093428612,
0.3394028842449188,
-0.17553037405014038,
0.21994280815124512,
0.313014954328537,
-0.37187695503234863,
-0.21052533388137817,
-0.21666043996810913,
0.5020683407783508,
-0.16070090234279633,
-0.022866668179631233,
-0.45809051394462585,
-0.36100485920906067
] |
https://github.com/huggingface/datasets/issues/1775
|
Efficient ways to iterate the dataset
|
It seems that selecting a subset of colums directly from the dataset, i.e., dataset["column"], is slow.
|
For a large dataset that does not fits the memory, how can I select only a subset of features from each example?
If I iterate over the dataset and then select the subset of features one by one, the resulted memory usage will be huge. Any ways to solve this?
Thanks
| 16 |
Efficient ways to iterate the dataset
|
[
-0.38012000918388367,
-0.1624145209789276,
-0.3222375214099884,
0.24321609735488892,
-0.18080900609493256,
0.12038008123636246,
0.05582768842577934,
0.38724011182785034,
-0.035876888781785965,
0.11963541060686111,
-0.029989702627062798,
0.1711021065711975,
-0.08388106524944305,
0.18324735760688782,
-0.16182006895542145,
0.20009824633598328,
-0.1343936175107956,
0.20222386717796326,
-0.2429904043674469,
-0.24256697297096252,
-0.19438436627388,
-0.18546243011951447,
-0.18193654716014862,
-0.2641986906528473,
0.16295228898525238,
-0.4322671592235565,
-0.24529479444026947,
0.06806288659572601,
0.06799621880054474,
-0.3278314173221588,
0.06250395625829697,
0.31111958622932434,
0.16546057164669037,
0.25130748748779297,
-0.00009809752373257652,
-0.09517939388751984,
-0.22745364904403687,
0.018709830939769745,
-0.4027039706707001,
0.2702806890010834,
-0.244459867477417,
-0.026309888809919357,
-0.2264982908964157,
-0.5599508285522461,
0.06503193080425262,
-0.12200714647769928,
0.1615012288093567,
-0.43216922879219055,
-0.056670211255550385,
-0.17461644113063812,
0.2864515781402588,
0.07937180250883102,
-0.48864197731018066,
0.03739200159907341,
-0.15414053201675415,
0.24240770936012268,
0.14874790608882904,
0.011856644414365292,
0.32581818103790283,
0.06712585687637329,
-0.01792231947183609,
0.43589451909065247,
-0.14813974499702454,
-0.01848108507692814,
0.09768997132778168,
-0.02163766324520111,
0.17619144916534424,
0.22115889191627502,
0.2589128911495209,
0.1337488889694214,
0.3604413568973541,
-0.1124592125415802,
-0.3781338036060333,
-0.31529730558395386,
-0.21577318012714386,
-0.29546919465065,
-0.10814226418733597,
0.0030753749888390303,
0.10944516956806183,
0.0988922268152237,
0.01557987742125988,
-0.015393074601888657,
0.005401884205639362,
-0.06352893263101578,
0.1798514425754547,
0.021263523027300835,
0.09347759932279587,
-0.040041711181402206,
0.30090710520744324,
-0.2702084481716156,
0.3547728657722473,
-0.27372634410858154,
0.08691316097974777,
0.1594068855047226,
-0.22827774286270142,
-0.2768290340900421,
0.15418104827404022,
-0.03166681528091431,
0.08619000762701035,
0.12113110721111298,
0.22725975513458252,
0.07709325104951859,
0.2055395394563675,
-0.16483177244663239,
0.34781256318092346,
-0.38075870275497437,
0.11769699305295944,
0.00315458164550364,
-0.13162215054035187,
-0.07224217057228088,
-0.0629594549536705,
0.018225960433483124,
-0.1439388394355774,
-0.07887181639671326,
0.12235180288553238,
0.031151559203863144,
0.039149947464466095,
0.060810644179582596,
-0.22826987504959106,
-0.2884320914745331,
-0.23864588141441345,
-0.22050626575946808,
0.1384897530078888,
0.17193518579006195,
0.18311485648155212,
0.032447777688503265,
-0.35225504636764526,
-0.18133123219013214,
0.00558043085038662,
-0.17556855082511902,
-0.33024176955223083,
0.20262514054775238,
0.09582480043172836,
-0.0763719379901886,
0.014552573673427105,
0.008573357947170734,
0.02296992391347885,
-0.10976361483335495,
-0.24165675044059753,
-0.19907265901565552,
0.023860901594161987,
-0.24186423420906067,
0.2908681333065033,
-0.21384479105472565,
-0.032501887530088425,
-0.02276846393942833,
-0.2819257378578186,
0.10516219586133957,
-0.21769636869430542,
-0.055367469787597656,
-0.05116242542862892,
-0.3157356381416321,
0.3829990029335022,
0.30022507905960083,
0.14607678353786469,
-0.03639504685997963,
0.004901605192571878,
0.4624570310115814,
-0.10729126632213593,
-0.01423569768667221,
-0.13107062876224518,
0.1940132975578308,
-0.11623290181159973,
0.005973421968519688,
0.15384958684444427,
0.4535977244377136,
-0.18019971251487732,
0.07641399651765823,
0.09937071800231934,
0.14825545251369476,
0.06891543418169022,
0.10586981475353241,
-0.09285411983728409,
0.4506421387195587,
-0.25944915413856506,
0.11146607995033264,
0.4141213595867157,
-0.15632230043411255,
-0.23324978351593018,
0.16253019869327545,
-0.06940589845180511,
-0.06292339414358139,
0.3269095718860626,
0.407154381275177,
-0.08457878232002258,
-0.3049050271511078,
-0.13335548341274261,
0.1572386771440506,
-0.2704318165779114,
0.09011367708444595,
-0.051934029906988144,
-0.09303358197212219,
0.15641972422599792,
0.07780137658119202,
-0.02492573857307434,
0.19339308142662048,
0.0639428049325943,
-0.0972760021686554,
0.4319460988044739,
-0.3908544182777405,
-0.19013985991477966,
0.1736210137605667,
0.2519257068634033,
0.00457411864772439,
-0.10193394124507904,
-0.27578163146972656,
-0.30382081866264343,
0.049947164952754974,
0.3864893615245819,
-0.2991698980331421,
-0.017622005194425583,
-0.1508564054965973,
-0.023484501987695694,
0.19455984234809875,
-0.002791399136185646,
0.33224424719810486,
0.29143309593200684,
0.5038522481918335,
0.276930034160614,
-0.4414982497692108,
-0.15843869745731354,
0.046089086681604385,
-0.44533205032348633,
-0.19273193180561066,
-0.3036874532699585,
-0.04419053718447685,
0.28064215183258057,
0.08350818604230881,
0.2309204339981079,
0.1445971429347992,
0.1860102117061615,
-0.4248883128166199,
0.3497643768787384,
0.10980135947465897,
0.2090323567390442,
0.14682255685329437,
0.42200976610183716,
0.25190937519073486,
0.018433747813105583,
-0.01958172768354416,
0.005333519075065851,
-0.23438726365566254,
0.1273452341556549,
0.16787129640579224,
-0.056863415986299515,
0.33869677782058716,
-0.1949114054441452,
0.43517863750457764,
0.15502403676509857,
-0.15343233942985535,
-0.10054805874824524,
0.11822774261236191,
-0.07367770373821259,
-0.07685162127017975,
0.30550727248191833,
0.14607498049736023,
0.33369001746177673,
0.200844407081604,
-0.40735897421836853,
0.19589655101299286,
0.4100520610809326,
-0.10883038491010666,
-0.0915214791893959,
-0.08023164421319962,
0.12891261279582977,
0.07818417251110077,
0.14066161215305328,
0.06495464593172073,
-0.08635867387056351,
0.21537184715270996,
0.16609622538089752,
-0.08821206539869308,
0.03314677253365517,
0.1235118880867958,
0.10599403083324432,
0.26238325238227844,
0.3591643273830414,
-0.11788388341665268,
0.0429743267595768,
-0.13151326775550842,
-0.07924845069646835,
-0.3968929052352905,
-0.04766293615102768,
0.20084606111049652,
0.14668434858322144,
0.17166943848133087,
-0.26275119185447693,
-0.08461547642946243,
-0.035953376442193985,
0.08043871819972992,
0.20627140998840332,
-0.28897032141685486,
-0.15113182365894318,
0.07045426964759827,
-0.20188140869140625,
0.04135787859559059,
0.14925837516784668,
0.22669725120067596,
0.2547700107097626,
-0.054070331156253815,
-0.08760765939950943,
-0.2276095449924469,
-0.025657935068011284,
0.10980022698640823,
0.26571306586265564,
0.02337898686528206,
0.5423426032066345,
-0.22390776872634888,
0.03139444813132286,
-0.3167385458946228,
-0.05329103767871857,
0.06413295865058899,
0.06928148865699768,
-0.1752699315547943,
-0.05962412804365158,
0.12722834944725037,
-0.27092108130455017,
-0.06461020559072495,
-0.07890907675027847,
0.07400521636009216,
-0.030559154227375984,
0.13661101460456848,
-0.057054344564676285,
-0.14480404555797577,
0.3816114068031311,
-0.38649144768714905,
-0.24929793179035187,
-0.08140544593334198,
0.17373019456863403,
-0.03766404092311859,
0.3879879415035248,
-0.09981036186218262,
0.04099724814295769,
-0.10564436763525009,
-0.2336227148771286,
0.2633766233921051,
-0.05675094202160835,
-0.19177424907684326,
0.12702372670173645,
0.06566233932971954,
-0.05271247774362564,
-0.2256050407886505,
-0.27670663595199585,
0.1163957267999649,
0.25744691491127014,
-0.24733507633209229,
-0.22818481922149658,
0.00015924939361866564,
0.0676635280251503,
-0.1406448930501938,
0.11117327213287354,
0.014733798801898956,
0.08107805252075195,
-0.19461722671985626,
0.027800118550658226,
0.022276178002357483,
0.16683822870254517,
-0.10367754846811295,
-0.20150542259216309,
0.19489194452762604,
0.12681926786899567,
0.19547636806964874,
0.1975281834602356,
0.4129420518875122,
-0.20563049614429474,
-0.11935688555240631,
-0.21429410576820374,
-0.11820904165506363,
0.11720111966133118,
-0.3343617618083954,
0.03849976509809494,
0.08451776206493378,
-0.16328009963035583,
0.25918224453926086,
-0.29963889718055725,
-0.05270032212138176,
-0.23605111241340637,
0.12504145503044128,
-0.18409313261508942,
-0.2620464265346527,
0.20097099244594574,
-0.19968409836292267,
0.3728562295436859,
0.3812130093574524,
0.3334673047065735,
-0.3402368426322937,
0.27408355474472046,
0.025839010253548622,
-0.3340035080909729,
0.15916045010089874,
-0.1319882720708847,
-0.40887248516082764,
-0.17245227098464966,
-0.38158246874809265,
0.28323426842689514,
0.20781809091567993,
0.1368023008108139,
0.38332876563072205,
-0.21467101573944092,
-0.04194900393486023,
-0.12671062350273132,
0.5374125838279724,
-0.08430664241313934,
-0.06544391065835953,
-0.09266453236341476,
-0.4110308587551117,
-0.02267393097281456,
0.2556760907173157,
-0.3684903383255005,
0.3164438307285309,
0.1592337042093277,
0.19435200095176697,
-0.35618939995765686,
-0.40854495763778687,
0.4080415964126587,
0.36463314294815063,
-0.03232545033097267,
-0.0606689453125,
0.19191478192806244,
-0.28968337178230286,
-0.05314995348453522,
0.21232163906097412,
-0.060551274567842484,
0.21845823526382446,
0.24526561796665192,
-0.07213044911623001,
-0.1972011923789978,
0.09936406463384628,
0.3847683370113373,
0.18411514163017273,
0.08463340252637863,
0.18149343132972717,
0.36144956946372986,
0.07897602766752243,
0.2654317617416382,
0.3598439395427704,
0.2715615928173065,
-0.09948934614658356,
-0.06289324909448624,
0.04708284139633179,
-0.12035854160785675,
0.503365159034729,
0.3670872747898102,
0.015842564404010773,
-0.14253610372543335,
-0.15699243545532227,
0.24046075344085693,
-0.4604845643043518,
-0.14187556505203247,
0.15486638247966766,
0.2393002063035965,
-0.2936972677707672,
-0.4169856607913971,
0.18165923655033112,
0.04146941378712654,
-0.10497669875621796,
0.23869629204273224,
-0.017817160114645958,
0.0942748561501503,
0.06287939846515656,
0.11694370955228806,
0.6770223379135132,
0.04133107513189316,
-0.07522544264793396,
0.35680827498435974,
0.12044049799442291,
0.21717840433120728,
-0.24455173313617706,
0.20992523431777954,
-0.1487937718629837,
-0.2658156752586365,
-0.007056436501443386,
-0.09116294234991074,
-0.04240604117512703,
0.5054366588592529,
-0.004828639794141054,
0.38667306303977966,
0.19564582407474518,
0.06693494319915771,
-0.08578226715326309,
0.20908573269844055,
-0.14822480082511902,
-0.12273356318473816,
-0.08482155948877335,
0.23442581295967102,
0.03347555920481682,
-0.2719573974609375,
-0.00545653747394681,
-0.13023526966571808,
0.2477087825536728,
-0.058543670922517776,
-0.1443588137626648,
-0.17662988603115082,
-0.09261608868837357,
0.0019012802513316274,
-0.08415757864713669,
-0.30454379320144653,
-0.28852134943008423,
-0.10881245136260986,
0.03537747263908386,
0.13779419660568237,
0.25091788172721863,
-0.1970166563987732,
0.016353828832507133,
0.05508516728878021,
-0.12608177959918976,
-0.06310245394706726,
0.08028160035610199,
0.16736073791980743,
-0.002220685360953212,
-0.0254240520298481,
0.06949459761381149,
-0.03069908358156681,
0.053556621074676514,
-0.04401884973049164,
-0.03908546268939972,
-0.3484456241130829,
0.059524934738874435,
0.38118329644203186,
-0.3925137221813202,
-0.18603064119815826,
0.23034049570560455,
0.11197912693023682,
0.005922831594944,
0.2782237231731415,
0.22466516494750977,
-0.19690543413162231,
-0.14475750923156738,
0.024295490235090256,
0.16070272028446198,
0.04211198911070824,
0.4197482168674469,
-0.09929358214139938,
-0.2769013047218323,
-0.4409449100494385,
0.1380247324705124,
0.06709738075733185,
-0.049544285982847214,
0.14852115511894226,
-0.3475229740142822,
0.06461849063634872,
0.015739303082227707,
-0.01735677756369114,
0.0415988452732563,
0.03837871178984642,
-0.03412046283483505,
-0.1827894002199173,
0.0846237763762474,
0.37436020374298096,
0.3490579426288605,
0.33308953046798706,
-0.060979872941970825,
-0.11253289133310318,
-0.44566673040390015,
0.22169119119644165,
-0.49210605025291443,
-0.16005048155784607,
-0.21083427965641022,
0.24626050889492035,
0.03616749867796898,
-0.11657143384218216,
-0.1100982129573822,
0.16132375597953796,
0.4450876712799072,
0.2771625816822052,
-0.1463078111410141,
-0.4228822886943817,
-0.018650991842150688,
0.022376133129000664,
-0.14601080119609833,
-0.01691432110965252,
-0.03602239862084389,
-0.07404615730047226,
-0.27791059017181396,
-0.5527276992797852,
-0.16954156756401062,
-0.12585408985614777,
0.058559514582157135,
-0.022500237450003624,
0.1223449558019638,
-0.1784011721611023,
-0.05526266247034073,
0.05082850903272629,
0.34219714999198914,
0.006406331434845924,
-0.22450608015060425,
0.2941373884677887,
-0.04147143289446831,
-0.21214626729488373,
0.2572624385356903,
0.15269580483436584,
0.3813092112541199,
-0.274151086807251,
0.0038681142032146454,
-0.09150784462690353,
-0.10944308340549469,
0.27820703387260437,
0.23811045289039612,
0.7862805128097534,
0.06039455905556679,
0.14282168447971344,
-0.02894417941570282,
0.33087798953056335,
-0.2383110225200653,
-0.12225805222988129,
0.14643575251102448,
-0.012252796441316605,
0.3591766953468323,
0.24172985553741455,
0.031155942007899284,
0.0072036078199744225,
0.43101438879966736,
-0.27849146723747253,
0.04164017736911774,
-0.36201855540275574,
-0.1424964964389801,
0.3218326270580292,
0.1438414603471756,
-0.3575934171676636,
0.13114528357982635,
0.5404662489891052,
0.26896077394485474,
0.3006744980812073,
-0.19758032262325287,
0.2936329245567322,
-0.0698835626244545,
0.19360749423503876,
-0.27718451619148254,
-0.43947261571884155,
0.23703089356422424,
0.34765318036079407,
0.07646331191062927,
0.025945695117115974,
0.16079910099506378,
-0.2860681414604187,
0.06019611284136772,
-0.07570050656795502,
-0.13780632615089417,
0.18816499412059784,
-0.08808325976133347,
-0.10023896396160126,
-0.11575652658939362,
-0.1651400923728943,
-0.1908213496208191,
0.06340187042951584,
0.0802556499838829,
-0.34810253977775574,
0.04650641605257988,
-0.01986638829112053,
0.44522860646247864,
-0.33856499195098877,
0.25314733386039734,
-0.13472753763198853,
0.2939775288105011,
-0.42626282572746277,
0.08928888291120529,
0.2534482181072235,
0.16237150132656097,
0.05448313429951668,
0.18931548297405243,
0.04184163734316826,
-0.09146736562252045,
-0.20977628231048584,
0.25814366340637207,
-0.22703683376312256,
-0.29935699701309204,
-0.2488783597946167,
-0.17670008540153503,
-0.21497416496276855,
0.11809400469064713,
0.62165367603302,
0.18007643520832062,
-0.16241317987442017,
0.02068439871072769,
0.1420804262161255,
-0.004853080026805401,
-0.3702201545238495,
-0.09562502801418304,
0.22093600034713745,
-0.16511137783527374,
0.01960250362753868,
0.10328679531812668,
-0.048610933125019073,
-0.24375571310520172,
0.20065920054912567,
-0.4428594410419464,
0.166874960064888,
0.3755505084991455,
0.19406859576702118,
-0.24326857924461365,
0.3649117946624756,
0.31105923652648926,
0.2509637773036957,
-0.12125445902347565,
-0.3174043297767639,
-0.23977011442184448,
-0.23319222033023834,
-0.0598430335521698,
-0.0913710668683052,
0.16112959384918213,
0.47565120458602905,
0.3523618280887604,
0.3451082110404968,
0.2899867296218872,
-0.2732468545436859,
-0.10348141938447952,
0.26552891731262207,
-0.20950227975845337,
-0.3420405387878418,
-0.0201350636780262,
-0.01608765870332718,
0.12053259462118149,
-0.4815595746040344,
0.20805706083774567,
-0.19317302107810974,
0.2973904311656952,
-0.010057972744107246,
-0.014364037662744522,
-0.0628197118639946,
-0.05856169015169144,
0.23961195349693298,
0.04271882772445679,
-0.10689929872751236,
-0.2696758508682251,
0.0513249970972538,
-0.22694747149944305,
-0.02497575618326664,
-0.039910562336444855,
0.37252703309059143,
0.07177259773015976,
-0.03791426867246628,
-0.22443102300167084,
0.11088018119335175,
0.09068985283374786,
-0.13180236518383026,
0.09818348288536072,
0.009513343684375286,
-0.07991069555282593,
0.16252408921718597,
-0.1453302502632141,
0.33762359619140625,
-0.05186781287193298,
0.35099875926971436,
-0.013803549110889435,
0.10262399166822433,
-0.018184253945946693,
0.008372795768082142,
0.2011857032775879,
-0.12635447084903717,
-0.24570322036743164,
-0.10576913505792618,
0.2528386414051056,
0.2105746865272522,
0.13714784383773804,
-0.09503204375505447,
0.006950832437723875,
0.41187500953674316,
-0.18600045144557953,
-0.04402337968349457,
0.2367352992296219,
0.07657020539045334,
-0.08306699246168137,
-0.016220174729824066,
0.22601743042469025,
-0.11179396510124207,
-0.4040043354034424,
-0.23243321478366852,
-0.4315420091152191
] |
https://github.com/huggingface/datasets/issues/1774
|
is it possible to make slice to be more compatible like python list and numpy?
|
Hi ! Thanks for reporting.
I am working on changes in the way data are sliced from arrow. I can probably fix your issue with the changes I'm doing.
If you have some code to reproduce the issue it would be nice so I can make sure that this case will be supported :)
I'll make a PR in a few days
|
Hi,
see below error:
```
AssertionError: Requested slice [:10000000000000000] incompatible with 20 examples.
```
| 62 |
is it possible to make slice to be more compatible like python list and numpy?
|
[
-0.12105485051870346,
-0.13390086591243744,
-0.3958893120288849,
-0.060892634093761444,
0.40430474281311035,
0.016404341906309128,
0.26099929213523865,
0.42613354325294495,
0.015543782152235508,
0.3662320375442505,
-0.4191146492958069,
0.5332304835319519,
-0.15247629582881927,
0.48319071531295776,
-0.2671404480934143,
-0.3237786591053009,
0.04830535128712654,
0.2491365671157837,
0.13099360466003418,
-0.03523411229252815,
0.06645873188972473,
0.025486111640930176,
-0.14853566884994507,
0.07748880237340927,
0.05498382821679115,
-0.22684116661548615,
0.08199910074472427,
-0.0020389787387102842,
0.1302688866853714,
0.0019665758591145277,
-0.15297792851924896,
-0.10690159350633621,
-0.11332575231790543,
0.02134723961353302,
-0.00010249247134197503,
0.13707217574119568,
-0.02519877813756466,
0.008585439994931221,
-0.30094096064567566,
0.08985646069049835,
0.3466094136238098,
-0.4762006998062134,
0.1903165578842163,
-0.4360106885433197,
-0.14737926423549652,
0.29348137974739075,
-0.028225012123584747,
-0.044856950640678406,
0.3754582107067108,
-0.09697972238063812,
0.313450425863266,
0.19405831396579742,
0.09793160110712051,
0.13630333542823792,
0.058665450662374496,
0.17608724534511566,
-0.29428374767303467,
-0.19589826464653015,
0.23847554624080658,
0.28976669907569885,
0.25926804542541504,
0.09053876996040344,
-0.1894061416387558,
0.11815256625413895,
-0.349026620388031,
0.08236566185951233,
0.07177937775850296,
-0.18853086233139038,
-0.30108368396759033,
0.3530789911746979,
-0.21973645687103271,
0.002244896488264203,
-0.27757173776626587,
-0.11733365058898926,
-0.2648390233516693,
-0.21750600636005402,
-0.2683130204677582,
0.11553002893924713,
-0.08849093317985535,
0.1306075006723404,
0.02452964521944523,
0.056565333157777786,
0.08317321538925171,
0.17637662589550018,
0.2812088429927826,
0.4943765699863434,
0.0669432058930397,
-0.12025468796491623,
0.125304713845253,
-0.1594703048467636,
0.20924019813537598,
0.10422291606664658,
0.2530248463153839,
-0.14495819807052612,
-0.08256077766418457,
-0.24441170692443848,
-0.3583395481109619,
0.3137267231941223,
-0.023919710889458656,
-0.20395751297473907,
0.19021587073802948,
0.4780341684818268,
-0.12056507915258408,
0.10963358730077744,
0.17369334399700165,
-0.20742805302143097,
-0.21420012414455414,
0.06521384418010712,
0.002972749527543783,
-0.16924351453781128,
-0.010365797206759453,
0.08897985517978668,
0.15163609385490417,
0.015250064432621002,
-0.2220839262008667,
0.07657987624406815,
-0.08500494807958603,
0.14310528337955475,
-0.16055116057395935,
-0.36234351992607117,
-0.17379534244537354,
-0.017239511013031006,
0.0378204882144928,
0.21818973124027252,
-0.15799175202846527,
-0.055697355419397354,
-0.20155826210975647,
0.14194893836975098,
-0.22960281372070312,
0.08791308850049973,
-0.025424299761652946,
0.20162221789360046,
0.35729146003723145,
-0.44040778279304504,
-0.16190659999847412,
-0.31909650564193726,
0.053544480353593826,
0.02661854960024357,
0.5292037129402161,
0.20653828978538513,
-0.12439614534378052,
-0.029869841411709785,
0.06626033037900925,
-0.04344099387526512,
0.22250285744667053,
-0.3069320321083069,
0.18990537524223328,
-0.0972977802157402,
-0.11802622675895691,
0.10932085663080215,
-0.22058217227458954,
0.12724298238754272,
-0.0644596591591835,
0.2237129956483841,
0.5003288984298706,
0.18232081830501556,
0.3742265999317169,
-0.08314473181962967,
0.08832749724388123,
-0.2881224751472473,
-0.17379863560199738,
-0.27338600158691406,
0.04706897214055061,
-0.2523680031299591,
0.07736725360155106,
-0.46989622712135315,
-0.16814512014389038,
-0.20244096219539642,
-0.011165125295519829,
0.057292670011520386,
0.17678840458393097,
0.6603993773460388,
0.06850163638591766,
-0.21013668179512024,
-0.08671014755964279,
0.18653835356235504,
0.5004541873931885,
0.1773797571659088,
-0.09873874485492706,
0.04642133787274361,
0.10260764509439468,
0.037465427070856094,
-0.12151435762643814,
0.514950692653656,
0.021717574447393417,
-0.1985754668712616,
0.14241434633731842,
0.1756039708852768,
-0.001085071125999093,
0.06025148183107376,
-0.13936744630336761,
-0.44373050332069397,
0.31967270374298096,
-0.016103293746709824,
-0.03578811511397362,
0.09575523436069489,
0.10505792498588562,
-0.13782238960266113,
0.2078716903924942,
-0.17618495225906372,
-0.3026742935180664,
-0.16494663059711456,
0.18365110456943512,
-0.14132894575595856,
-0.07774168998003006,
-0.29499706625938416,
0.008709372021257877,
-0.23667114973068237,
-0.16135761141777039,
-0.010297250933945179,
-0.056752532720565796,
-0.2255004495382309,
0.21612155437469482,
0.20273274183273315,
0.13859222829341888,
0.1815771609544754,
0.26410973072052,
-0.07671727240085602,
0.4971063435077667,
-0.13663272559642792,
0.06742236018180847,
0.056399866938591,
-0.11189515888690948,
-0.04063984379172325,
-0.2586366534233093,
0.2587437629699707,
-0.30901774764060974,
-0.11636200547218323,
0.02526107057929039,
0.34515607357025146,
0.15889057517051697,
-0.12386840581893921,
0.09984666109085083,
0.03480042144656181,
-0.015719275921583176,
-0.21041616797447205,
-0.25907301902770996,
0.2569153606891632,
0.07748199254274368,
-0.04860629141330719,
0.1874462515115738,
0.25382331013679504,
-0.030810151249170303,
0.09330856800079346,
0.009167387150228024,
0.4418606162071228,
-0.28348401188850403,
0.21594668924808502,
0.3073936998844147,
0.10193797945976257,
0.18455617129802704,
0.17480671405792236,
0.13323406875133514,
-0.20171549916267395,
0.33744993805885315,
0.3932938277721405,
-0.13219156861305237,
-0.10195468366146088,
-0.1855158656835556,
0.18541742861270905,
0.42673051357269287,
-0.12184330821037292,
0.42112261056900024,
0.10072137415409088,
0.15740995109081268,
0.14150995016098022,
-0.14126135408878326,
-0.4320821762084961,
0.014120200648903847,
0.3015907406806946,
-0.06127968803048134,
-0.0685209110379219,
-0.016014214605093002,
-0.2673676311969757,
0.14919337630271912,
0.2530464231967926,
-0.26737722754478455,
0.00637092487886548,
0.16728845238685608,
-0.08406811952590942,
-0.030732642859220505,
0.12566278874874115,
-0.43053412437438965,
-0.17682316899299622,
0.04972773790359497,
0.03400113433599472,
-0.1401883214712143,
0.21511943638324738,
0.22037072479724884,
-0.5492966771125793,
-0.08568459004163742,
-0.37771400809288025,
0.26441359519958496,
0.023141872137784958,
-0.1849776655435562,
0.35647818446159363,
0.26991233229637146,
0.0541699044406414,
0.09003147482872009,
0.11383022367954254,
-0.0445537306368351,
-0.2610100209712982,
-0.03135792911052704,
0.2906820774078369,
0.034448061138391495,
0.28589311242103577,
0.05975710600614548,
-0.28250953555107117,
-0.18041931092739105,
0.0943150520324707,
-0.18032386898994446,
0.14292076230049133,
-0.04595748335123062,
0.45969024300575256,
0.21798326075077057,
0.04149352386593819,
-0.09419458359479904,
-0.325964093208313,
0.1751856952905655,
-0.3572489619255066,
-0.0782618373632431,
-0.03587963059544563,
0.1879686415195465,
-0.2400318831205368,
-0.013922412879765034,
-0.020258532837033272,
-0.6123476028442383,
-0.36218371987342834,
0.24297115206718445,
0.31373000144958496,
0.2414926141500473,
-0.13443580269813538,
0.10527282953262329,
-0.18528153002262115,
0.36021673679351807,
0.20248371362686157,
-0.1005859449505806,
0.10025253891944885,
0.19251878559589386,
-0.14638052880764008,
-0.15571202337741852,
-0.34798741340637207,
-0.25329598784446716,
-0.06937375664710999,
-0.11697415262460709,
0.2760246694087982,
0.08941684663295746,
-0.13650570809841156,
0.10682713985443115,
0.1513301432132721,
0.17306175827980042,
0.22985805571079254,
0.18329261243343353,
-0.17686939239501953,
0.11796083301305771,
-0.1345091164112091,
-0.07201725244522095,
-0.03436762094497681,
-0.4119318425655365,
0.34656187891960144,
0.3178744316101074,
0.02064383588731289,
0.2380770593881607,
0.11624827235937119,
-0.1741163432598114,
0.1542777121067047,
-0.030934451147913933,
0.2012668251991272,
-0.09299701452255249,
-0.2900237739086151,
0.11471215635538101,
0.025331741198897362,
-0.27371713519096375,
0.07996293157339096,
-0.06362190842628479,
0.04615434631705284,
0.111261747777462,
0.008920032531023026,
-0.3931863605976105,
-0.01995512656867504,
0.12426421791315079,
0.38828912377357483,
-0.07347351312637329,
-0.009389784187078476,
0.05103525146842003,
-0.1909102201461792,
-0.0580102875828743,
0.17321190237998962,
0.11355485767126083,
0.1254013478755951,
-0.4161551892757416,
-0.4172708988189697,
-0.5649000406265259,
0.05366379767656326,
0.32532480359077454,
0.48603132367134094,
-0.12036750465631485,
0.006296161096543074,
-0.378792405128479,
-0.08315335214138031,
-0.04868931323289871,
0.6599048972129822,
-0.16436603665351868,
-0.3733408749103546,
0.08946231007575989,
-0.06453876197338104,
0.19219355285167694,
0.3053761422634125,
-0.2804449498653412,
0.013361122459173203,
0.3790988326072693,
0.0057931444607675076,
-0.09215079247951508,
0.07793474942445755,
0.32643410563468933,
0.17783190310001373,
-0.06483647227287292,
0.07977958768606186,
0.03554524481296539,
0.1363254338502884,
-0.26830801367759705,
-0.10474110394716263,
-0.2032591998577118,
0.0007374206325039268,
0.04356784000992775,
-0.2637673318386078,
-0.4365288317203522,
-0.5071306228637695,
-0.04828137904405594,
-0.06651222705841064,
0.14603593945503235,
-0.14741000533103943,
-0.22503884136676788,
-0.2951207756996155,
0.21828654408454895,
0.0301064383238554,
0.0773342102766037,
-0.39170077443122864,
0.3330508768558502,
-0.1720140427350998,
0.16571660339832306,
0.08938980102539062,
-0.13811162114143372,
0.08127477020025253,
-0.06675726175308228,
-0.017213061451911926,
0.2520623803138733,
0.05500753968954086,
-0.46095216274261475,
-0.04073800519108772,
0.04866962507367134,
-0.1852705180644989,
-0.0647391676902771,
0.0490858256816864,
0.197910875082016,
0.020326945930719376,
-0.006607187911868095,
-0.4330141246318817,
0.010502943769097328,
0.006080751772969961,
0.30587488412857056,
0.8283185362815857,
-0.02070559561252594,
0.09200481325387955,
0.12393485754728317,
0.08991293609142303,
0.514875054359436,
-0.032225169241428375,
0.2120722532272339,
-0.18429628014564514,
-0.23543082177639008,
-0.181762233376503,
-0.0629195123910904,
-0.061284612864255905,
-0.08604581654071808,
-0.2756272852420807,
0.10489526391029358,
-0.30828747153282166,
0.18203361332416534,
-0.26947611570358276,
-0.10580851137638092,
0.06296790391206741,
-0.026168400421738625,
-0.49375826120376587,
0.19450105726718903,
-0.026146309450268745,
-0.2918926477432251,
0.10772794485092163,
-0.14194613695144653,
-0.09985334426164627,
-0.06978947669267654,
-0.010990850627422333,
0.05399230867624283,
-0.16623443365097046,
0.40268298983573914,
0.047545548528432846,
-0.3808842599391937,
-0.07767484337091446,
0.04068925604224205,
0.23156563937664032,
0.1832517683506012,
-0.02825583703815937,
-0.21956558525562286,
0.08391378074884415,
0.05761801823973656,
-0.028021670877933502,
0.22287002205848694,
0.07107580453157425,
0.08502538502216339,
0.14005081355571747,
0.17978055775165558,
0.13718338310718536,
-0.45643532276153564,
-0.3974630534648895,
0.004629211034625769,
0.0916915312409401,
-0.3116379380226135,
-0.16001060605049133,
-0.243879035115242,
-0.2485586702823639,
-0.2006869912147522,
0.20554381608963013,
-0.0830172598361969,
0.04076915979385376,
0.20524518191814423,
0.40507394075393677,
0.14445951581001282,
-0.24176165461540222,
0.042948804795742035,
0.32751086354255676,
0.13597367703914642,
-0.01838233508169651,
0.07471461594104767,
-0.36117109656333923,
-0.35851195454597473,
-0.004873610567301512,
-0.2762386202812195,
0.39180874824523926,
0.2039375752210617,
0.008082518354058266,
-0.23120354115962982,
-0.09287077188491821,
0.3041565716266632,
-0.02610429935157299,
0.571282684803009,
-0.5335692763328552,
-0.04481954127550125,
-0.15268124639987946,
0.24390649795532227,
0.21537406742572784,
0.17861884832382202,
0.12911660969257355,
0.032313909381628036,
-0.2767743170261383,
0.1821497231721878,
-0.38263335824012756,
-0.2842654585838318,
0.00046840464347042143,
-0.056025680154561996,
-0.1631901115179062,
-0.07919301837682724,
0.0253915935754776,
0.17222166061401367,
0.3288521468639374,
0.2878021001815796,
-0.2203332483768463,
-0.3554272949695587,
0.070316843688488,
0.010882433503866196,
-0.15623269975185394,
-0.1993289291858673,
-0.0929093211889267,
0.14893022179603577,
-0.0668824091553688,
-0.2562382221221924,
-0.32245442271232605,
-0.2611081600189209,
0.14279411733150482,
-0.008204278536140919,
0.4335193336009979,
-0.1517460197210312,
0.25407156348228455,
0.05376722663640976,
-0.2793389558792114,
0.10371867567300797,
0.08209128677845001,
-0.054916832596063614,
0.09948073327541351,
0.010724760591983795,
0.0932748094201088,
0.08791927248239517,
0.41323110461235046,
0.029138706624507904,
0.008439350873231888,
0.0925053209066391,
-0.4867764413356781,
0.08059029281139374,
0.36034899950027466,
0.24788787961006165,
0.04664898291230202,
0.18342843651771545,
0.1315327286720276,
0.2564469873905182,
-0.29742586612701416,
-0.2923527956008911,
0.27371370792388916,
-0.06568875163793564,
0.3141648471355438,
0.43789082765579224,
-0.19452685117721558,
0.16774997115135193,
0.4410492181777954,
-0.0856165960431099,
0.14215204119682312,
-0.6636106967926025,
0.14311689138412476,
0.5063043832778931,
0.4050552248954773,
0.007860704325139523,
-0.22684594988822937,
-0.3366188406944275,
0.24559690058231354,
0.11386140435934067,
-0.29550692439079285,
0.19631098210811615,
-0.12473209947347641,
0.036886949092149734,
0.22023449838161469,
0.26117631793022156,
0.0610969252884388,
0.1992817223072052,
-0.056972749531269073,
0.1620238572359085,
0.3820151686668396,
-0.1040857583284378,
-0.11744115501642227,
0.032783668488264084,
-0.17219099402427673,
0.32225367426872253,
-0.1074168011546135,
-0.2373281866312027,
0.08950130641460419,
-0.09627294540405273,
0.015896301716566086,
-0.2003362476825714,
0.07155366241931915,
0.05654119700193405,
0.3493129312992096,
-0.03560248017311096,
0.4147936999797821,
-0.04535490274429321,
0.09528792649507523,
-0.009820128791034222,
0.0329158641397953,
-0.1961199790239334,
-0.12461334466934204,
0.07173185795545578,
0.05887193605303764,
-0.3562524914741516,
-0.07913685590028763,
0.5052216053009033,
0.05757913365960121,
-0.1821763515472412,
-0.24750728905200958,
-0.20988112688064575,
-0.2092030942440033,
-0.3132134974002838,
0.04722091928124428,
-0.08574165403842926,
0.247625932097435,
0.044419579207897186,
0.31797516345977783,
-0.2513732314109802,
0.1346486508846283,
0.059298090636730194,
-0.044275254011154175,
-0.38902583718299866,
0.34687429666519165,
0.19991716742515564,
-0.06763618439435959,
-0.20411555469036102,
-0.12600183486938477,
-0.24875308573246002,
0.01966129243373871,
-0.2533763349056244,
-0.24656802415847778,
0.04688842222094536,
0.30497774481773376,
0.16752156615257263,
0.08727224171161652,
0.31575673818588257,
0.02928207442164421,
0.08741779625415802,
-0.005325335077941418,
0.2546263635158539,
0.1811397224664688,
0.045722682029008865,
-0.08720414340496063,
-0.06709325313568115,
0.017552820965647697,
-0.10831035673618317,
0.28095754981040955,
0.5053511261940002,
-0.017292752861976624,
0.1426876336336136,
0.06973312795162201,
-0.10218515247106552,
-0.2516886293888092,
0.18174980580806732,
0.09428716450929642,
-0.21791450679302216,
0.2384304404258728,
-0.2142333686351776,
-0.009499200619757175,
0.15285910665988922,
0.17249788343906403,
-0.22836965322494507,
0.14357112348079681,
-0.06681974232196808,
0.06210823357105255,
-0.03983362391591072,
0.2496890425682068,
-0.09051883965730667,
-0.41083285212516785,
-0.13685713708400726,
0.35103946924209595,
-0.0024829322937875986,
-0.08080072700977325,
0.4718066155910492,
0.2496696561574936,
0.06603026390075684,
-0.4082278609275818,
-0.3528803884983063,
-0.15556485950946808,
-0.1066645011305809,
-0.010124932043254375,
0.27230796217918396,
0.3143741488456726,
0.21890577673912048,
0.0008616994600743055,
0.07338833063840866,
-0.011741803027689457,
0.0557975135743618,
0.11138425022363663,
0.19853053987026215,
0.12380574643611908,
-0.16633136570453644,
-0.025167202576994896,
-0.040938615798950195,
-0.13368386030197144,
-0.11001240462064743,
-0.14495982229709625,
-0.06853652000427246,
-0.02731267735362053,
0.028848856687545776,
-0.22193095088005066,
0.2754371762275696,
0.009493577294051647,
0.3582959473133087,
0.25103095173835754,
0.35000887513160706,
-0.06394809484481812,
-0.0864352285861969,
-0.12537141144275665,
0.21997760236263275,
-0.10096738487482071,
-0.022145278751850128,
-0.25230973958969116
] |
https://github.com/huggingface/datasets/issues/1773
|
bug in loading datasets
|
Looks like an issue with your csv file. Did you use the right delimiter ?
Apparently at line 37 the CSV reader from pandas reads 2 fields instead of 1.
|
Hi,
I need to load a dataset, I use these commands:
```
from datasets import load_dataset
dataset = load_dataset('csv', data_files={'train': 'sick/train.csv',
'test': 'sick/test.csv',
'validation': 'sick/validation.csv'})
print(dataset['validation'])
```
the dataset in sick/train.csv are simple csv files representing the data. I am getting this error, do you have an idea how I can solve this? thank you @lhoestq
```
Using custom data configuration default
Downloading and preparing dataset csv/default-61468fc71a743ec1 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2...
Traceback (most recent call last):
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 485, in incomplete_dir
yield tmp_dir
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 604, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 959, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/tqdm-4.49.0-py3.7.egg/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/julia/cache_home_2/modules/datasets_modules/datasets/csv/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2/csv.py", line 129, in _generate_tables
for batch_idx, df in enumerate(csv_file_reader):
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1029, in __next__
return self.get_chunk()
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1079, in get_chunk
return self.read(nrows=size)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1052, in read
index, columns, col_dict = self._engine.read(nrows)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 2056, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read
File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows
File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 37, saw 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "write_sick.py", line 19, in <module>
'validation': 'sick/validation.csv'})
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 534, in download_and_prepare
self._save_info()
File "/julia/libs/anaconda3/envs/success/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 491, in incomplete_dir
shutil.rmtree(tmp_dir)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 498, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 496, in rmtree
os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2.incomplete'
```
| 30 |
bug in loading datasets
|
[
-0.3009624779224396,
-0.15080784261226654,
-0.2379196137189865,
0.6217886805534363,
0.19884023070335388,
0.07575897872447968,
0.2985152304172516,
0.1017700582742691,
0.2693885862827301,
0.16738754510879517,
-0.1655275821685791,
0.18897400796413422,
0.20805825293064117,
0.014804019592702389,
-0.1560785174369812,
0.05884953960776329,
0.05975247174501419,
0.20118436217308044,
-0.3202493190765381,
-0.22000138461589813,
-0.2631349563598633,
0.21343442797660828,
-0.20904527604579926,
0.01018419861793518,
-0.22327065467834473,
0.05102824792265892,
0.10514479130506516,
0.4647989273071289,
-0.046697985380887985,
-0.22206176817417145,
0.1329336017370224,
0.13070784509181976,
0.12992021441459656,
0.3669232130050659,
-0.00010042206122307107,
0.008515008725225925,
0.269265353679657,
0.07198324799537659,
-0.29301008582115173,
0.2921936810016632,
-0.3786320686340332,
-0.09332524985074997,
0.0641387403011322,
-0.18709833920001984,
-0.014402281492948532,
-0.13770021498203278,
-0.23627939820289612,
-0.47562772035598755,
0.1695748269557953,
0.06183220073580742,
0.41364291310310364,
0.15494605898857117,
-0.26978030800819397,
-0.20431528985500336,
0.3072257339954376,
-0.07202024012804031,
0.09005695581436157,
0.2531653344631195,
0.33343106508255005,
-0.06142843887209892,
0.06223335489630699,
0.11295241117477417,
-0.13640563189983368,
0.09757295995950699,
0.046810317784547806,
0.05424334853887558,
0.154245525598526,
-0.03831658139824867,
0.15529857575893402,
0.21990257501602173,
0.5685853958129883,
0.14211279153823853,
-0.18469136953353882,
-0.13900233805179596,
0.02635825052857399,
-0.16360856592655182,
0.308594673871994,
0.07168294489383698,
0.034198373556137085,
0.17476725578308105,
-0.042097922414541245,
-0.004283652640879154,
-0.0033721900545060635,
0.2099468857049942,
-0.15791109204292297,
0.025345075875520706,
-0.07934773713350296,
0.062073901295661926,
-0.10803438723087311,
0.0683857798576355,
0.24110357463359833,
-0.24320805072784424,
-0.12417934089899063,
0.10136647522449493,
-0.19069847464561462,
0.17770861089229584,
-0.02381006069481373,
0.12246549874544144,
-0.04885312169790268,
0.13717056810855865,
0.10272106528282166,
0.16617529094219208,
-0.11622360348701477,
-0.007561337202787399,
0.288981169462204,
-0.08763770014047623,
-0.09659884124994278,
-0.034189172089099884,
0.19340641796588898,
-0.015213647857308388,
-0.29587069153785706,
-0.005797131452709436,
-0.14745032787322998,
-0.16415657103061676,
0.16302625834941864,
-0.1143030971288681,
0.06912574917078018,
-0.28317829966545105,
-0.3525838851928711,
0.11630572378635406,
0.03595438972115517,
-0.11191171407699585,
-0.10808383673429489,
0.40287336707115173,
-0.13514436781406403,
0.0039656381122767925,
0.14724507927894592,
0.120845265686512,
-0.2414269894361496,
-0.3608744740486145,
-0.4772791564464569,
-0.30049973726272583,
-0.16358274221420288,
-0.06284701824188232,
0.009185832925140858,
-0.051971081644296646,
0.14557015895843506,
0.09076853841543198,
-0.1292073130607605,
-0.3783200979232788,
0.1556367129087448,
-0.11182594299316406,
0.02346212789416313,
0.15997572243213654,
0.0015729342121630907,
0.16334784030914307,
0.10928694903850555,
-0.03364995867013931,
0.1582212597131729,
0.31215670704841614,
-0.35252535343170166,
-0.08209219574928284,
-0.11302662640810013,
0.37120795249938965,
-0.01571894995868206,
0.17424461245536804,
-0.23136967420578003,
0.0868636891245842,
0.07240169495344162,
-0.35126200318336487,
-0.19049006700515747,
-0.02735104225575924,
-0.212632954120636,
-0.17477382719516754,
0.09365243464708328,
0.43451982736587524,
-0.3547807037830353,
-0.034179773181676865,
-0.21860812604427338,
-0.28003039956092834,
0.2682333290576935,
0.05060959607362747,
-0.29410988092422485,
0.2192116379737854,
-0.4452134966850281,
0.10318749397993088,
0.39917638897895813,
0.03156081587076187,
-0.4790501892566681,
0.18530748784542084,
-0.13923193514347076,
0.1035018339753151,
-0.03190324828028679,
0.14804980158805847,
0.03959164395928383,
-0.07702022045850754,
0.2823275029659271,
0.2822170853614807,
0.14246810972690582,
0.0833297073841095,
-0.29416579008102417,
-0.10558111220598221,
0.16249673068523407,
0.20489171147346497,
0.017836185172200203,
0.21753685176372528,
0.347832590341568,
-0.019642790779471397,
0.2599067986011505,
-0.05088745802640915,
-0.18041253089904785,
0.37434083223342896,
-0.1530851572751999,
0.009741637855768204,
0.11348825693130493,
0.03993454575538635,
-0.5654070973396301,
0.08956016600131989,
-0.11579208821058273,
-0.2059646099805832,
0.1504615843296051,
0.18398959934711456,
-0.3761555254459381,
0.07120829075574875,
-0.16149553656578064,
0.24782566726207733,
0.1904667317867279,
0.3040918707847595,
-0.3001595735549927,
0.020529398694634438,
0.08051058650016785,
0.28604307770729065,
-0.1403675675392151,
-0.028761181980371475,
-0.2860857844352722,
0.4084964096546173,
0.08777037262916565,
-0.10346510261297226,
0.03485901653766632,
0.1443970650434494,
0.2356788069009781,
-0.1626153141260147,
-0.1813376098871231,
0.30397528409957886,
0.19542934000492096,
0.3093317151069641,
-0.054013099521398544,
-0.11937195062637329,
0.08756168931722641,
-0.15850235521793365,
0.08246675133705139,
0.13007573783397675,
0.25682345032691956,
-0.1185171976685524,
-0.03251078724861145,
0.2496301531791687,
-0.2621817886829376,
-0.025438034906983376,
-0.033551041036844254,
-0.1474398970603943,
0.3594021499156952,
-0.017242245376110077,
0.11478486657142639,
-0.4271141588687897,
0.178406223654747,
0.2841058373451233,
0.3110288977622986,
0.3275883197784424,
-0.31761184334754944,
-0.013690040446817875,
0.31211990118026733,
-0.013786623254418373,
0.13175858557224274,
0.0037008796352893114,
-0.13309316337108612,
-0.10682202875614166,
0.11418519169092178,
0.0466621071100235,
0.43847936391830444,
0.3109063506126404,
0.06077783927321434,
-0.06617410480976105,
0.024089187383651733,
-0.3156775236129761,
0.1771850287914276,
-0.039018575102090836,
0.07436560839414597,
0.31652939319610596,
0.1833651065826416,
-0.020354535430669785,
-0.34677138924598694,
0.02110256813466549,
0.22888845205307007,
0.05052278935909271,
-0.34318238496780396,
0.06266690045595169,
-0.35166066884994507,
-0.26005229353904724,
-0.17802152037620544,
-0.015043085440993309,
-0.012411704286932945,
-0.31139805912971497,
0.03441481664776802,
0.1348874270915985,
-0.24135245382785797,
0.19802813231945038,
-0.13464348018169403,
0.3133665919303894,
0.022306347265839577,
0.17815861105918884,
-0.025248395279049873,
-0.037365857511758804,
-0.3169105350971222,
0.17288345098495483,
0.2095118761062622,
0.12184716761112213,
0.31078362464904785,
-0.17771106958389282,
-0.02724497951567173,
-0.09962333738803864,
-0.07515501976013184,
0.12071739137172699,
0.27219250798225403,
0.2896517217159271,
-0.17002582550048828,
0.2221316546201706,
0.14861764013767242,
-0.10694064199924469,
0.2968181371688843,
-0.0495133213698864,
-0.10414662957191467,
0.13858440518379211,
0.05776878073811531,
-0.0735449492931366,
-0.05042362958192825,
-0.45379146933555603,
-0.058811139315366745,
-0.29289519786834717,
-0.3018360733985901,
0.051976803690195084,
0.05693821236491203,
0.03155238553881645,
0.10790505260229111,
-0.09711167216300964,
0.03789963945746422,
0.1465582549571991,
-0.49191322922706604,
-0.26670002937316895,
0.23844560980796814,
-0.09726731479167938,
-0.35642656683921814,
-0.08499076962471008,
-0.0355537012219429,
-0.03075496107339859,
0.1806347370147705,
-0.359672486782074,
-0.045590609312057495,
-0.09142066538333893,
-0.08397161960601807,
-0.11745720356702805,
-0.09212072193622589,
0.018449565395712852,
-0.10312587767839432,
-0.20559819042682648,
-0.24317462742328644,
-0.10022281110286713,
0.1535933017730713,
-0.25718122720718384,
0.08663815259933472,
-0.29895320534706116,
0.27497971057891846,
-0.3803552985191345,
0.44529029726982117,
0.055300917476415634,
-0.08379640430212021,
0.4146510660648346,
-0.0596214160323143,
0.41788023710250854,
-0.2372419536113739,
-0.1273137927055359,
-0.10989674925804138,
0.16983288526535034,
0.010517033748328686,
0.43619295954704285,
-0.015235701575875282,
-0.3201562762260437,
-0.032890331000089645,
0.12430015951395035,
-0.3475240170955658,
-0.19222812354564667,
-0.05636712163686752,
-0.16274940967559814,
-0.1478690803050995,
0.3002047836780548,
0.206176295876503,
-0.14120548963546753,
-0.22737643122673035,
-0.01257229968905449,
-0.1007232740521431,
0.09882070124149323,
-0.1316356658935547,
-0.395026832818985,
0.09664463251829147,
-0.0033456410747021437,
0.15467967092990875,
0.038716044276952744,
0.3351641297340393,
-0.07615018635988235,
-0.11110656708478928,
0.28250837326049805,
0.13542045652866364,
0.7885245084762573,
-0.1756541132926941,
0.3612535297870636,
0.1486501693725586,
0.054479487240314484,
-0.34532371163368225,
-0.14233432710170746,
-0.20112791657447815,
0.09793758392333984,
0.10165978223085403,
0.3817807734012604,
-0.1876678764820099,
-0.03473276272416115,
0.11324061453342438,
0.2565544843673706,
-0.2726967930793762,
-0.39688727259635925,
-0.31945207715034485,
-0.0697062760591507,
-0.16993394494056702,
-0.12336517870426178,
-0.21350058913230896,
0.17886798083782196,
-0.3318485915660858,
-0.2989337146282196,
-0.3413298428058624,
0.03332982957363129,
0.006091193296015263,
0.10664300620555878,
0.37475597858428955,
0.14500857889652252,
0.3029399812221527,
0.21328763663768768,
0.30926159024238586,
0.2251158356666565,
0.7178582549095154,
-0.1679627001285553,
-0.22247278690338135,
0.21734312176704407,
-0.27669647336006165,
0.02462141402065754,
0.37303218245506287,
0.0413871593773365,
0.023784639313817024,
0.03197960555553436,
0.010854674503207207,
-0.12329606711864471,
0.27376100420951843,
0.14738649129867554,
-0.0031212610192596912,
-0.3324136435985565,
-0.35663652420043945,
0.28493914008140564,
-0.07904081046581268,
-0.3362630009651184,
0.3805132210254669,
-0.131705641746521,
-0.1862274706363678,
0.1892627477645874,
-0.17032398283481598,
0.9018728733062744,
-0.09544631838798523,
0.09477595239877701,
0.3254551887512207,
-0.1286504864692688,
0.21439065039157867,
-0.03939337283372879,
-0.003998324740678072,
-0.48507213592529297,
-0.3390662968158722,
0.0751042440533638,
-0.1147155910730362,
-0.09382697194814682,
0.1683136224746704,
0.08416984975337982,
0.0702400803565979,
-0.1777806282043457,
0.15730328857898712,
0.00977770984172821,
0.08636858314275742,
0.2527468502521515,
-0.07055436074733734,
-0.2507963180541992,
0.2556881904602051,
0.12573297321796417,
0.14027880132198334,
-0.3172164261341095,
0.11292479187250137,
0.03703868389129639,
-0.11719553172588348,
0.0571419931948185,
0.30591848492622375,
-0.1537150889635086,
0.2671624422073364,
0.03813019022345543,
-0.2463235855102539,
-0.30857598781585693,
0.22987495362758636,
0.008209049701690674,
0.17828768491744995,
0.013578614220023155,
0.10741392523050308,
0.06923498213291168,
0.025856582447886467,
-0.25015196204185486,
0.044863805174827576,
0.22919021546840668,
0.007730753161013126,
-0.2078687995672226,
0.06655849516391754,
-0.13926492631435394,
-0.22859853506088257,
-0.02612268552184105,
0.25707390904426575,
0.09082619845867157,
-0.3896559774875641,
-0.40316253900527954,
-0.1283169686794281,
0.39818552136421204,
-0.16323280334472656,
0.29434168338775635,
0.15753771364688873,
0.16858984529972076,
0.13095666468143463,
0.30990201234817505,
-0.4644615650177002,
-0.2593204081058502,
0.5924773216247559,
0.07505949586629868,
-0.03182527795433998,
0.5000565052032471,
0.05079105868935585,
-0.19003978371620178,
-0.33105218410491943,
0.050221845507621765,
0.24396902322769165,
-0.4435523450374603,
0.1985018402338028,
-0.1613188534975052,
-0.002698198426514864,
0.10323857516050339,
0.27452927827835083,
0.0830465778708458,
-0.06234502047300339,
0.00550128472968936,
-0.5020869374275208,
-0.02833523601293564,
0.09266162663698196,
-0.0531751774251461,
0.15408289432525635,
0.16676065325737,
-0.2823193371295929,
-0.20013096928596497,
0.04962097853422165,
-0.47446614503860474,
0.03146329149603844,
-0.06483081728219986,
-0.04488543048501015,
0.04031259939074516,
0.1516643464565277,
-0.050590723752975464,
-0.1424778401851654,
0.32389065623283386,
-0.021870601922273636,
-0.07633692026138306,
-0.41236206889152527,
-0.1900370866060257,
0.08062927424907684,
-0.08443090319633484,
-0.18309511244297028,
-0.12470178306102753,
-0.2919284701347351,
0.06428217887878418,
-0.17238496243953705,
0.09009341895580292,
-0.022147299721837044,
0.10763797909021378,
-0.2319606989622116,
0.306490957736969,
0.06520923227071762,
-0.37099689245224,
0.27481502294540405,
-0.07753397524356842,
0.06850945949554443,
-0.0704106017947197,
-0.13902223110198975,
0.022673049941658974,
-0.05528731644153595,
0.030977994203567505,
-0.07011447101831436,
0.21018755435943604,
0.19994214177131653,
0.2822740375995636,
-0.4526476263999939,
0.1693974882364273,
0.4075829088687897,
0.11365050822496414,
0.19694459438323975,
-0.3083004653453827,
-0.11407483369112015,
-0.05263437330722809,
0.36085712909698486,
-0.26889780163764954,
-0.3060452938079834,
0.2742117643356323,
0.09559021145105362,
0.017143208533525467,
0.0670086070895195,
0.18383729457855225,
-0.23908957839012146,
0.01256632898002863,
0.04691833630204201,
0.26213836669921875,
0.0791243389248848,
0.1011829823255539,
0.3426830768585205,
0.024023031815886497,
0.10154823958873749,
0.22109410166740417,
0.24096211791038513,
-0.08527935296297073,
0.4082242250442505,
0.20605212450027466,
0.21817567944526672,
0.03968353942036629,
0.179374560713768,
-0.32881975173950195,
-0.7096719145774841,
0.24145296216011047,
0.3305283486843109,
-0.25979748368263245,
0.018048325553536415,
0.09062197059392929,
0.02163863368332386,
-0.12104100733995438,
0.027403781190514565,
-0.3504561185836792,
-0.08211562037467957,
-0.2949915826320648,
-0.1859448254108429,
-0.10905714333057404,
-0.2376355528831482,
-0.0556073933839798,
0.0413038544356823,
-0.16386614739894867,
-0.07548122853040695,
0.03603753075003624,
-0.017594803124666214,
-0.17266982793807983,
-0.3559992015361786,
0.21537378430366516,
0.12662574648857117,
-0.13596518337726593,
-0.23025117814540863,
0.42820245027542114,
0.022210130468010902,
0.1007426455616951,
0.5466249585151672,
0.08198671787977219,
0.0784747526049614,
0.19989252090454102,
0.17831699550151825,
-0.32995012402534485,
0.2057909071445465,
-0.19411204755306244,
-0.22635123133659363,
0.36313626170158386,
0.24695925414562225,
0.18400904536247253,
0.30244433879852295,
0.3176029622554779,
-0.3611578047275543,
0.1412721574306488,
0.3754388988018036,
0.15112395584583282,
-0.21363410353660583,
0.1651352345943451,
-0.2709735631942749,
-0.09614156186580658,
-0.2724173069000244,
-0.19272379577159882,
-0.18848003447055817,
-0.07016118615865707,
0.3252922594547272,
-0.02428252249956131,
0.19861945509910583,
0.07248866558074951,
0.15507666766643524,
-0.08142077922821045,
0.4612879753112793,
0.25812920928001404,
0.20400625467300415,
-0.18339866399765015,
-0.16426335275173187,
-0.7482969760894775,
0.47353124618530273,
0.09486231952905655,
0.04679346829652786,
0.08863953500986099,
0.14274516701698303,
0.08366324007511139,
-0.005026130471378565,
0.2243957817554474,
0.19049939513206482,
0.16446763277053833,
0.0033305403776466846,
-0.4470001757144928,
-0.307163804769516,
0.07176358252763748,
-0.021109245717525482,
-0.16552990674972534,
-0.44341322779655457,
0.19191204011440277,
-0.28696760535240173,
0.2443656027317047,
0.03193241357803345,
-0.17075471580028534,
-0.24980640411376953,
0.14674721658229828,
0.5773584246635437,
-0.02525695413351059,
0.4497124254703522,
-0.12016214430332184,
0.1855478584766388,
-0.21820169687271118,
-0.48742949962615967,
0.08242199569940567,
0.26301684975624084,
0.13531097769737244,
0.18226441740989685,
-0.1043158546090126,
0.2320573627948761,
0.04533945769071579,
-0.10828078538179398,
0.04367660731077194,
0.2623991072177887,
-0.3040916323661804,
0.06283672153949738,
-0.20124664902687073,
0.026467712596058846,
0.049804799258708954,
0.08626016974449158,
0.10718302428722382,
0.06430777162313461,
0.15951140224933624,
-0.22575366497039795,
0.35775306820869446,
-0.12183932960033417,
-0.12550197541713715,
-0.2180326133966446,
0.2506352365016937,
0.0888780951499939,
-0.04427872970700264,
-0.13653500378131866,
0.035468943417072296,
0.4911414086818695,
-0.20855920016765594,
-0.04365306347608566,
0.2329559624195099,
-0.13297981023788452,
0.12927983701229095,
-0.06170361489057541,
0.4150879383087158,
0.2058645486831665,
-0.2482944130897522,
0.023566512390971184,
-0.14469517767429352
] |
https://github.com/huggingface/datasets/issues/1773
|
bug in loading datasets
|
Note that you can pass any argument you would pass to `pandas.read_csv` as kwargs to `load_dataset`. For example you can do
```python
from datasets import load_dataset
dataset = load_dataset('csv', data_files=data_files, sep="\t")
```
for example to use a tab separator.
You can see the full list of arguments here: https://github.com/huggingface/datasets/blob/master/src/datasets/packaged_modules/csv/csv.py
(I've not found the list in the documentation though, we definitely must add them !)
|
Hi,
I need to load a dataset, I use these commands:
```
from datasets import load_dataset
dataset = load_dataset('csv', data_files={'train': 'sick/train.csv',
'test': 'sick/test.csv',
'validation': 'sick/validation.csv'})
print(dataset['validation'])
```
the dataset in sick/train.csv are simple csv files representing the data. I am getting this error, do you have an idea how I can solve this? thank you @lhoestq
```
Using custom data configuration default
Downloading and preparing dataset csv/default-61468fc71a743ec1 (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2...
Traceback (most recent call last):
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 485, in incomplete_dir
yield tmp_dir
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 527, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 604, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 959, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/tqdm-4.49.0-py3.7.egg/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/julia/cache_home_2/modules/datasets_modules/datasets/csv/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2/csv.py", line 129, in _generate_tables
for batch_idx, df in enumerate(csv_file_reader):
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1029, in __next__
return self.get_chunk()
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1079, in get_chunk
return self.read(nrows=size)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 1052, in read
index, columns, col_dict = self._engine.read(nrows)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg/pandas/io/parsers.py", line 2056, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read
File "pandas/_libs/parsers.pyx", line 783, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas/_libs/parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows
File "pandas/_libs/parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas/_libs/parsers.pyx", line 1951, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 37, saw 2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "write_sick.py", line 19, in <module>
'validation': 'sick/validation.csv'})
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/load.py", line 612, in load_dataset
ignore_verifications=ignore_verifications,
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 534, in download_and_prepare
self._save_info()
File "/julia/libs/anaconda3/envs/success/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/site-packages/datasets-1.2.0-py3.7.egg/datasets/builder.py", line 491, in incomplete_dir
shutil.rmtree(tmp_dir)
File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 498, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/julia/libs/anaconda3/envs/success/lib/python3.7/shutil.py", line 496, in rmtree
os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/julia/cache_home_2/datasets/csv/default-61468fc71a743ec1/0.0.0/2960f95a26e85d40ca41a230ac88787f715ee3003edaacb8b1f0891e9f04dda2.incomplete'
```
| 64 |
bug in loading datasets
|
[
-0.3009624779224396,
-0.15080784261226654,
-0.2379196137189865,
0.6217886805534363,
0.19884023070335388,
0.07575897872447968,
0.2985152304172516,
0.1017700582742691,
0.2693885862827301,
0.16738754510879517,
-0.1655275821685791,
0.18897400796413422,
0.20805825293064117,
0.014804019592702389,
-0.1560785174369812,
0.05884953960776329,
0.05975247174501419,
0.20118436217308044,
-0.3202493190765381,
-0.22000138461589813,
-0.2631349563598633,
0.21343442797660828,
-0.20904527604579926,
0.01018419861793518,
-0.22327065467834473,
0.05102824792265892,
0.10514479130506516,
0.4647989273071289,
-0.046697985380887985,
-0.22206176817417145,
0.1329336017370224,
0.13070784509181976,
0.12992021441459656,
0.3669232130050659,
-0.00010042206122307107,
0.008515008725225925,
0.269265353679657,
0.07198324799537659,
-0.29301008582115173,
0.2921936810016632,
-0.3786320686340332,
-0.09332524985074997,
0.0641387403011322,
-0.18709833920001984,
-0.014402281492948532,
-0.13770021498203278,
-0.23627939820289612,
-0.47562772035598755,
0.1695748269557953,
0.06183220073580742,
0.41364291310310364,
0.15494605898857117,
-0.26978030800819397,
-0.20431528985500336,
0.3072257339954376,
-0.07202024012804031,
0.09005695581436157,
0.2531653344631195,
0.33343106508255005,
-0.06142843887209892,
0.06223335489630699,
0.11295241117477417,
-0.13640563189983368,
0.09757295995950699,
0.046810317784547806,
0.05424334853887558,
0.154245525598526,
-0.03831658139824867,
0.15529857575893402,
0.21990257501602173,
0.5685853958129883,
0.14211279153823853,
-0.18469136953353882,
-0.13900233805179596,
0.02635825052857399,
-0.16360856592655182,
0.308594673871994,
0.07168294489383698,
0.034198373556137085,
0.17476725578308105,
-0.042097922414541245,
-0.004283652640879154,
-0.0033721900545060635,
0.2099468857049942,
-0.15791109204292297,
0.025345075875520706,
-0.07934773713350296,
0.062073901295661926,
-0.10803438723087311,
0.0683857798576355,
0.24110357463359833,
-0.24320805072784424,
-0.12417934089899063,
0.10136647522449493,
-0.19069847464561462,
0.17770861089229584,
-0.02381006069481373,
0.12246549874544144,
-0.04885312169790268,
0.13717056810855865,
0.10272106528282166,
0.16617529094219208,
-0.11622360348701477,
-0.007561337202787399,
0.288981169462204,
-0.08763770014047623,
-0.09659884124994278,
-0.034189172089099884,
0.19340641796588898,
-0.015213647857308388,
-0.29587069153785706,
-0.005797131452709436,
-0.14745032787322998,
-0.16415657103061676,
0.16302625834941864,
-0.1143030971288681,
0.06912574917078018,
-0.28317829966545105,
-0.3525838851928711,
0.11630572378635406,
0.03595438972115517,
-0.11191171407699585,
-0.10808383673429489,
0.40287336707115173,
-0.13514436781406403,
0.0039656381122767925,
0.14724507927894592,
0.120845265686512,
-0.2414269894361496,
-0.3608744740486145,
-0.4772791564464569,
-0.30049973726272583,
-0.16358274221420288,
-0.06284701824188232,
0.009185832925140858,
-0.051971081644296646,
0.14557015895843506,
0.09076853841543198,
-0.1292073130607605,
-0.3783200979232788,
0.1556367129087448,
-0.11182594299316406,
0.02346212789416313,
0.15997572243213654,
0.0015729342121630907,
0.16334784030914307,
0.10928694903850555,
-0.03364995867013931,
0.1582212597131729,
0.31215670704841614,
-0.35252535343170166,
-0.08209219574928284,
-0.11302662640810013,
0.37120795249938965,
-0.01571894995868206,
0.17424461245536804,
-0.23136967420578003,
0.0868636891245842,
0.07240169495344162,
-0.35126200318336487,
-0.19049006700515747,
-0.02735104225575924,
-0.212632954120636,
-0.17477382719516754,
0.09365243464708328,
0.43451982736587524,
-0.3547807037830353,
-0.034179773181676865,
-0.21860812604427338,
-0.28003039956092834,
0.2682333290576935,
0.05060959607362747,
-0.29410988092422485,
0.2192116379737854,
-0.4452134966850281,
0.10318749397993088,
0.39917638897895813,
0.03156081587076187,
-0.4790501892566681,
0.18530748784542084,
-0.13923193514347076,
0.1035018339753151,
-0.03190324828028679,
0.14804980158805847,
0.03959164395928383,
-0.07702022045850754,
0.2823275029659271,
0.2822170853614807,
0.14246810972690582,
0.0833297073841095,
-0.29416579008102417,
-0.10558111220598221,
0.16249673068523407,
0.20489171147346497,
0.017836185172200203,
0.21753685176372528,
0.347832590341568,
-0.019642790779471397,
0.2599067986011505,
-0.05088745802640915,
-0.18041253089904785,
0.37434083223342896,
-0.1530851572751999,
0.009741637855768204,
0.11348825693130493,
0.03993454575538635,
-0.5654070973396301,
0.08956016600131989,
-0.11579208821058273,
-0.2059646099805832,
0.1504615843296051,
0.18398959934711456,
-0.3761555254459381,
0.07120829075574875,
-0.16149553656578064,
0.24782566726207733,
0.1904667317867279,
0.3040918707847595,
-0.3001595735549927,
0.020529398694634438,
0.08051058650016785,
0.28604307770729065,
-0.1403675675392151,
-0.028761181980371475,
-0.2860857844352722,
0.4084964096546173,
0.08777037262916565,
-0.10346510261297226,
0.03485901653766632,
0.1443970650434494,
0.2356788069009781,
-0.1626153141260147,
-0.1813376098871231,
0.30397528409957886,
0.19542934000492096,
0.3093317151069641,
-0.054013099521398544,
-0.11937195062637329,
0.08756168931722641,
-0.15850235521793365,
0.08246675133705139,
0.13007573783397675,
0.25682345032691956,
-0.1185171976685524,
-0.03251078724861145,
0.2496301531791687,
-0.2621817886829376,
-0.025438034906983376,
-0.033551041036844254,
-0.1474398970603943,
0.3594021499156952,
-0.017242245376110077,
0.11478486657142639,
-0.4271141588687897,
0.178406223654747,
0.2841058373451233,
0.3110288977622986,
0.3275883197784424,
-0.31761184334754944,
-0.013690040446817875,
0.31211990118026733,
-0.013786623254418373,
0.13175858557224274,
0.0037008796352893114,
-0.13309316337108612,
-0.10682202875614166,
0.11418519169092178,
0.0466621071100235,
0.43847936391830444,
0.3109063506126404,
0.06077783927321434,
-0.06617410480976105,
0.024089187383651733,
-0.3156775236129761,
0.1771850287914276,
-0.039018575102090836,
0.07436560839414597,
0.31652939319610596,
0.1833651065826416,
-0.020354535430669785,
-0.34677138924598694,
0.02110256813466549,
0.22888845205307007,
0.05052278935909271,
-0.34318238496780396,
0.06266690045595169,
-0.35166066884994507,
-0.26005229353904724,
-0.17802152037620544,
-0.015043085440993309,
-0.012411704286932945,
-0.31139805912971497,
0.03441481664776802,
0.1348874270915985,
-0.24135245382785797,
0.19802813231945038,
-0.13464348018169403,
0.3133665919303894,
0.022306347265839577,
0.17815861105918884,
-0.025248395279049873,
-0.037365857511758804,
-0.3169105350971222,
0.17288345098495483,
0.2095118761062622,
0.12184716761112213,
0.31078362464904785,
-0.17771106958389282,
-0.02724497951567173,
-0.09962333738803864,
-0.07515501976013184,
0.12071739137172699,
0.27219250798225403,
0.2896517217159271,
-0.17002582550048828,
0.2221316546201706,
0.14861764013767242,
-0.10694064199924469,
0.2968181371688843,
-0.0495133213698864,
-0.10414662957191467,
0.13858440518379211,
0.05776878073811531,
-0.0735449492931366,
-0.05042362958192825,
-0.45379146933555603,
-0.058811139315366745,
-0.29289519786834717,
-0.3018360733985901,
0.051976803690195084,
0.05693821236491203,
0.03155238553881645,
0.10790505260229111,
-0.09711167216300964,
0.03789963945746422,
0.1465582549571991,
-0.49191322922706604,
-0.26670002937316895,
0.23844560980796814,
-0.09726731479167938,
-0.35642656683921814,
-0.08499076962471008,
-0.0355537012219429,
-0.03075496107339859,
0.1806347370147705,
-0.359672486782074,
-0.045590609312057495,
-0.09142066538333893,
-0.08397161960601807,
-0.11745720356702805,
-0.09212072193622589,
0.018449565395712852,
-0.10312587767839432,
-0.20559819042682648,
-0.24317462742328644,
-0.10022281110286713,
0.1535933017730713,
-0.25718122720718384,
0.08663815259933472,
-0.29895320534706116,
0.27497971057891846,
-0.3803552985191345,
0.44529029726982117,
0.055300917476415634,
-0.08379640430212021,
0.4146510660648346,
-0.0596214160323143,
0.41788023710250854,
-0.2372419536113739,
-0.1273137927055359,
-0.10989674925804138,
0.16983288526535034,
0.010517033748328686,
0.43619295954704285,
-0.015235701575875282,
-0.3201562762260437,
-0.032890331000089645,
0.12430015951395035,
-0.3475240170955658,
-0.19222812354564667,
-0.05636712163686752,
-0.16274940967559814,
-0.1478690803050995,
0.3002047836780548,
0.206176295876503,
-0.14120548963546753,
-0.22737643122673035,
-0.01257229968905449,
-0.1007232740521431,
0.09882070124149323,
-0.1316356658935547,
-0.395026832818985,
0.09664463251829147,
-0.0033456410747021437,
0.15467967092990875,
0.038716044276952744,
0.3351641297340393,
-0.07615018635988235,
-0.11110656708478928,
0.28250837326049805,
0.13542045652866364,
0.7885245084762573,
-0.1756541132926941,
0.3612535297870636,
0.1486501693725586,
0.054479487240314484,
-0.34532371163368225,
-0.14233432710170746,
-0.20112791657447815,
0.09793758392333984,
0.10165978223085403,
0.3817807734012604,
-0.1876678764820099,
-0.03473276272416115,
0.11324061453342438,
0.2565544843673706,
-0.2726967930793762,
-0.39688727259635925,
-0.31945207715034485,
-0.0697062760591507,
-0.16993394494056702,
-0.12336517870426178,
-0.21350058913230896,
0.17886798083782196,
-0.3318485915660858,
-0.2989337146282196,
-0.3413298428058624,
0.03332982957363129,
0.006091193296015263,
0.10664300620555878,
0.37475597858428955,
0.14500857889652252,
0.3029399812221527,
0.21328763663768768,
0.30926159024238586,
0.2251158356666565,
0.7178582549095154,
-0.1679627001285553,
-0.22247278690338135,
0.21734312176704407,
-0.27669647336006165,
0.02462141402065754,
0.37303218245506287,
0.0413871593773365,
0.023784639313817024,
0.03197960555553436,
0.010854674503207207,
-0.12329606711864471,
0.27376100420951843,
0.14738649129867554,
-0.0031212610192596912,
-0.3324136435985565,
-0.35663652420043945,
0.28493914008140564,
-0.07904081046581268,
-0.3362630009651184,
0.3805132210254669,
-0.131705641746521,
-0.1862274706363678,
0.1892627477645874,
-0.17032398283481598,
0.9018728733062744,
-0.09544631838798523,
0.09477595239877701,
0.3254551887512207,
-0.1286504864692688,
0.21439065039157867,
-0.03939337283372879,
-0.003998324740678072,
-0.48507213592529297,
-0.3390662968158722,
0.0751042440533638,
-0.1147155910730362,
-0.09382697194814682,
0.1683136224746704,
0.08416984975337982,
0.0702400803565979,
-0.1777806282043457,
0.15730328857898712,
0.00977770984172821,
0.08636858314275742,
0.2527468502521515,
-0.07055436074733734,
-0.2507963180541992,
0.2556881904602051,
0.12573297321796417,
0.14027880132198334,
-0.3172164261341095,
0.11292479187250137,
0.03703868389129639,
-0.11719553172588348,
0.0571419931948185,
0.30591848492622375,
-0.1537150889635086,
0.2671624422073364,
0.03813019022345543,
-0.2463235855102539,
-0.30857598781585693,
0.22987495362758636,
0.008209049701690674,
0.17828768491744995,
0.013578614220023155,
0.10741392523050308,
0.06923498213291168,
0.025856582447886467,
-0.25015196204185486,
0.044863805174827576,
0.22919021546840668,
0.007730753161013126,
-0.2078687995672226,
0.06655849516391754,
-0.13926492631435394,
-0.22859853506088257,
-0.02612268552184105,
0.25707390904426575,
0.09082619845867157,
-0.3896559774875641,
-0.40316253900527954,
-0.1283169686794281,
0.39818552136421204,
-0.16323280334472656,
0.29434168338775635,
0.15753771364688873,
0.16858984529972076,
0.13095666468143463,
0.30990201234817505,
-0.4644615650177002,
-0.2593204081058502,
0.5924773216247559,
0.07505949586629868,
-0.03182527795433998,
0.5000565052032471,
0.05079105868935585,
-0.19003978371620178,
-0.33105218410491943,
0.050221845507621765,
0.24396902322769165,
-0.4435523450374603,
0.1985018402338028,
-0.1613188534975052,
-0.002698198426514864,
0.10323857516050339,
0.27452927827835083,
0.0830465778708458,
-0.06234502047300339,
0.00550128472968936,
-0.5020869374275208,
-0.02833523601293564,
0.09266162663698196,
-0.0531751774251461,
0.15408289432525635,
0.16676065325737,
-0.2823193371295929,
-0.20013096928596497,
0.04962097853422165,
-0.47446614503860474,
0.03146329149603844,
-0.06483081728219986,
-0.04488543048501015,
0.04031259939074516,
0.1516643464565277,
-0.050590723752975464,
-0.1424778401851654,
0.32389065623283386,
-0.021870601922273636,
-0.07633692026138306,
-0.41236206889152527,
-0.1900370866060257,
0.08062927424907684,
-0.08443090319633484,
-0.18309511244297028,
-0.12470178306102753,
-0.2919284701347351,
0.06428217887878418,
-0.17238496243953705,
0.09009341895580292,
-0.022147299721837044,
0.10763797909021378,
-0.2319606989622116,
0.306490957736969,
0.06520923227071762,
-0.37099689245224,
0.27481502294540405,
-0.07753397524356842,
0.06850945949554443,
-0.0704106017947197,
-0.13902223110198975,
0.022673049941658974,
-0.05528731644153595,
0.030977994203567505,
-0.07011447101831436,
0.21018755435943604,
0.19994214177131653,
0.2822740375995636,
-0.4526476263999939,
0.1693974882364273,
0.4075829088687897,
0.11365050822496414,
0.19694459438323975,
-0.3083004653453827,
-0.11407483369112015,
-0.05263437330722809,
0.36085712909698486,
-0.26889780163764954,
-0.3060452938079834,
0.2742117643356323,
0.09559021145105362,
0.017143208533525467,
0.0670086070895195,
0.18383729457855225,
-0.23908957839012146,
0.01256632898002863,
0.04691833630204201,
0.26213836669921875,
0.0791243389248848,
0.1011829823255539,
0.3426830768585205,
0.024023031815886497,
0.10154823958873749,
0.22109410166740417,
0.24096211791038513,
-0.08527935296297073,
0.4082242250442505,
0.20605212450027466,
0.21817567944526672,
0.03968353942036629,
0.179374560713768,
-0.32881975173950195,
-0.7096719145774841,
0.24145296216011047,
0.3305283486843109,
-0.25979748368263245,
0.018048325553536415,
0.09062197059392929,
0.02163863368332386,
-0.12104100733995438,
0.027403781190514565,
-0.3504561185836792,
-0.08211562037467957,
-0.2949915826320648,
-0.1859448254108429,
-0.10905714333057404,
-0.2376355528831482,
-0.0556073933839798,
0.0413038544356823,
-0.16386614739894867,
-0.07548122853040695,
0.03603753075003624,
-0.017594803124666214,
-0.17266982793807983,
-0.3559992015361786,
0.21537378430366516,
0.12662574648857117,
-0.13596518337726593,
-0.23025117814540863,
0.42820245027542114,
0.022210130468010902,
0.1007426455616951,
0.5466249585151672,
0.08198671787977219,
0.0784747526049614,
0.19989252090454102,
0.17831699550151825,
-0.32995012402534485,
0.2057909071445465,
-0.19411204755306244,
-0.22635123133659363,
0.36313626170158386,
0.24695925414562225,
0.18400904536247253,
0.30244433879852295,
0.3176029622554779,
-0.3611578047275543,
0.1412721574306488,
0.3754388988018036,
0.15112395584583282,
-0.21363410353660583,
0.1651352345943451,
-0.2709735631942749,
-0.09614156186580658,
-0.2724173069000244,
-0.19272379577159882,
-0.18848003447055817,
-0.07016118615865707,
0.3252922594547272,
-0.02428252249956131,
0.19861945509910583,
0.07248866558074951,
0.15507666766643524,
-0.08142077922821045,
0.4612879753112793,
0.25812920928001404,
0.20400625467300415,
-0.18339866399765015,
-0.16426335275173187,
-0.7482969760894775,
0.47353124618530273,
0.09486231952905655,
0.04679346829652786,
0.08863953500986099,
0.14274516701698303,
0.08366324007511139,
-0.005026130471378565,
0.2243957817554474,
0.19049939513206482,
0.16446763277053833,
0.0033305403776466846,
-0.4470001757144928,
-0.307163804769516,
0.07176358252763748,
-0.021109245717525482,
-0.16552990674972534,
-0.44341322779655457,
0.19191204011440277,
-0.28696760535240173,
0.2443656027317047,
0.03193241357803345,
-0.17075471580028534,
-0.24980640411376953,
0.14674721658229828,
0.5773584246635437,
-0.02525695413351059,
0.4497124254703522,
-0.12016214430332184,
0.1855478584766388,
-0.21820169687271118,
-0.48742949962615967,
0.08242199569940567,
0.26301684975624084,
0.13531097769737244,
0.18226441740989685,
-0.1043158546090126,
0.2320573627948761,
0.04533945769071579,
-0.10828078538179398,
0.04367660731077194,
0.2623991072177887,
-0.3040916323661804,
0.06283672153949738,
-0.20124664902687073,
0.026467712596058846,
0.049804799258708954,
0.08626016974449158,
0.10718302428722382,
0.06430777162313461,
0.15951140224933624,
-0.22575366497039795,
0.35775306820869446,
-0.12183932960033417,
-0.12550197541713715,
-0.2180326133966446,
0.2506352365016937,
0.0888780951499939,
-0.04427872970700264,
-0.13653500378131866,
0.035468943417072296,
0.4911414086818695,
-0.20855920016765594,
-0.04365306347608566,
0.2329559624195099,
-0.13297981023788452,
0.12927983701229095,
-0.06170361489057541,
0.4150879383087158,
0.2058645486831665,
-0.2482944130897522,
0.023566512390971184,
-0.14469517767429352
] |
https://github.com/huggingface/datasets/issues/1771
|
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.2.1/datasets/csv/csv.py
|
Indeed in 1.2.1 the script to process csv file is downloaded. Starting from the next release though we include the csv processing directly in the library.
See PR #1726
We'll do a new release soon :)
|
Hi,
When I load_dataset from local csv files, below error happened, looks raw.githubusercontent.com was blocked by the chinese government. But why it need to download csv.py? should it include when pip install the dataset?
```
Traceback (most recent call last):
File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/load.py", line 267, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 343, in cached_path
max_retries=download_config.max_retries,
File "/home/tom/pyenv/pystory/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 617, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.2.1/datasets/csv/csv.py
```
| 36 |
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.2.1/datasets/csv/csv.py
|
[
0.05930451303720474,
-0.34741172194480896,
-0.3076959550380707,
-0.11438260972499847,
0.20476055145263672,
0.2187528908252716,
0.1685314029455185,
0.3703969419002533,
0.2835603654384613,
0.28819739818573,
-0.018735021352767944,
-0.12356806546449661,
-0.01905004307627678,
0.49931010603904724,
0.1726028025150299,
0.01725415699183941,
0.03735121712088585,
0.07625123113393784,
-0.17758557200431824,
0.011194058693945408,
-0.04119086265563965,
0.26143819093704224,
-0.15162266790866852,
0.12179175019264221,
0.018914328888058662,
-0.04119078442454338,
-0.19092120230197906,
0.14981797337532043,
-0.19935187697410583,
-0.3302153944969177,
0.5223409533500671,
0.06525622308254242,
-0.028949249535799026,
0.3508117198944092,
-0.00009887213673209772,
0.15659606456756592,
0.2593473792076111,
0.008714573457837105,
-0.1465759575366974,
-0.2996819019317627,
0.04542684555053711,
-0.3450676500797272,
0.07917721569538116,
-0.12318257242441177,
-0.1715085357427597,
-0.1495152860879898,
0.21712103486061096,
-0.041053663939237595,
0.34976959228515625,
0.24399815499782562,
0.3876408040523529,
0.392849862575531,
0.2864319086074829,
-0.16749288141727448,
0.12981344759464264,
-0.0449327789247036,
-0.021571872755885124,
0.2707195580005646,
0.14673516154289246,
-0.13035760819911957,
0.09865806251764297,
0.2901841700077057,
0.1041109710931778,
-0.02420966885983944,
0.11591599881649017,
-0.02443072758615017,
-0.1479261815547943,
-0.31592243909835815,
0.22011129558086395,
-0.016563262790441513,
0.22806580364704132,
-0.07589886337518692,
-0.2625043988227844,
-0.04985342174768448,
-0.09207551181316376,
-0.36773189902305603,
0.12546148896217346,
0.13663232326507568,
-0.14395159482955933,
0.23049624264240265,
-0.2976531982421875,
-0.2359730303287506,
-0.18587671220302582,
-0.07435137033462524,
-0.030652202665805817,
-0.07185225933790207,
-0.386968731880188,
0.005157644394785166,
0.16886167228221893,
-0.14425575733184814,
-0.29418984055519104,
0.13169793784618378,
0.050598546862602234,
0.3318343162536621,
-0.17997786402702332,
-0.10016714036464691,
0.27928638458251953,
-0.03548762947320938,
0.26894068717956543,
0.05287310853600502,
-0.007608965504914522,
-0.11192753911018372,
-0.10360342264175415,
0.06617145985364914,
0.04192955419421196,
0.059064339846372604,
-0.058280956000089645,
-0.03527194634079933,
0.49635469913482666,
0.34610870480537415,
0.2085113674402237,
-0.05719884857535362,
-0.17772606015205383,
-0.39818742871284485,
-0.2528718411922455,
0.10686678439378738,
0.28663986921310425,
-0.29774314165115356,
-0.22664888203144073,
0.16734927892684937,
0.1485329419374466,
0.08037415891885757,
-0.19271227717399597,
0.2585594654083252,
-0.14101743698120117,
-0.24440526962280273,
-0.039678752422332764,
0.09714256972074509,
-0.09000128507614136,
0.13763651251792908,
-0.30265533924102783,
0.22754748165607452,
-0.08753064274787903,
-0.22571487724781036,
0.22336134314537048,
-0.32215267419815063,
0.3783934414386749,
-0.04138819873332977,
0.13208085298538208,
-0.060338471084833145,
-0.16450682282447815,
0.2186134159564972,
-0.0819336548447609,
0.5547346472740173,
0.07818640768527985,
0.058119747787714005,
0.23523299396038055,
-0.14549896121025085,
-0.14595262706279755,
-0.1578424572944641,
-0.42087453603744507,
-0.3871322274208069,
-0.0656222403049469,
0.31554678082466125,
-0.07417399436235428,
-0.07019281387329102,
-0.14585840702056885,
-0.0440804548561573,
-0.04620182886719704,
-0.009349087253212929,
-0.09273307770490646,
0.045358624309301376,
0.12177246063947678,
-0.24447377026081085,
0.33827394247055054,
0.31344473361968994,
-0.3430655300617218,
0.09202884137630463,
0.04531370848417282,
-0.20234276354312897,
-0.020739024505019188,
0.39880049228668213,
-0.0628821924328804,
-0.12668482959270477,
-0.3084631562232971,
0.14235949516296387,
0.10820655524730682,
-0.23554229736328125,
-0.2841760516166687,
0.2105865180492401,
-0.23851677775382996,
-0.16326870024204254,
0.310968279838562,
-0.21742141246795654,
0.11176706850528717,
-0.13401809334754944,
0.09936781227588654,
0.0514179952442646,
-0.009942673146724701,
-0.06464090198278427,
-0.0757480040192604,
-0.34673333168029785,
0.025842245668172836,
0.08496414124965668,
0.11634902656078339,
-0.0685838907957077,
0.23400169610977173,
-0.5219916701316833,
0.24899862706661224,
-0.04012623801827431,
-0.025515418499708176,
0.245370551943779,
0.3281610310077667,
0.1819157898426056,
-0.02472338080406189,
-0.13156434893608093,
-0.15619532763957977,
0.040589530020952225,
0.17574115097522736,
0.11589135229587555,
-0.3559771776199341,
-0.23587509989738464,
-0.4814280867576599,
0.09225694090127945,
-0.0834832713007927,
-0.2824810743331909,
0.2361832857131958,
-0.07179174572229385,
0.3085702359676361,
0.13923226296901703,
-0.14711998403072357,
0.06628678739070892,
-0.17534928023815155,
0.1818358153104782,
-0.3532578945159912,
0.15213772654533386,
-0.31750133633613586,
0.033172015100717545,
0.263624906539917,
0.18935160338878632,
0.07983530312776566,
-0.3873596787452698,
0.0967598408460617,
0.19675599038600922,
-0.15533994138240814,
0.2803131341934204,
0.4223593771457672,
0.1078149825334549,
0.1765686422586441,
-0.27235856652259827,
-0.006058815401047468,
0.002732494380325079,
0.10275684297084808,
0.261991947889328,
-0.11349866539239883,
0.32961297035217285,
-0.140702024102211,
0.09469854086637497,
0.1054803878068924,
0.23009659349918365,
0.40470027923583984,
0.16848932206630707,
-0.11367606371641159,
0.040341816842556,
0.22234725952148438,
-0.0331680066883564,
0.11827518045902252,
-0.0890752375125885,
-0.38813382387161255,
0.11650850623846054,
0.3778297007083893,
-0.12814223766326904,
-0.0937441810965538,
0.15948283672332764,
0.04661320894956589,
-0.09277184307575226,
0.08852659910917282,
0.1600300818681717,
0.0017785602249205112,
0.25558948516845703,
0.010350204072892666,
0.0711904913187027,
-0.06632676720619202,
-0.26144173741340637,
0.20711439847946167,
-0.1666310578584671,
-0.01724775694310665,
0.049188628792762756,
0.014749833382666111,
-0.10026084631681442,
-0.2800807058811188,
-0.14540599286556244,
-0.15731020271778107,
0.06658309698104858,
-0.06711389124393463,
0.01776798628270626,
-0.2525794208049774,
-0.08522889018058777,
-0.025610584765672684,
-0.17122626304626465,
-0.20687657594680786,
-0.23864616453647614,
-0.008138581179082394,
0.032906003296375275,
-0.04308994114398956,
0.1501452922821045,
0.001648453762754798,
0.21034035086631775,
0.1374693512916565,
0.13584060966968536,
-0.1600491851568222,
-0.1675550639629364,
-0.04076027497649193,
0.2644895911216736,
0.012993037700653076,
-0.2193177491426468,
0.4519970118999481,
-0.24728712439537048,
0.03998355194926262,
-0.2541715204715729,
-0.39282578229904175,
0.026903361082077026,
-0.21345095336437225,
0.11811646819114685,
0.4058339297771454,
0.43846824765205383,
-0.026914549991488457,
-0.11521866172552109,
0.12966707348823547,
-0.15413178503513336,
-0.2049088478088379,
-0.1038549616932869,
-0.13041280210018158,
-0.24063575267791748,
-0.09410090744495392,
-0.33474618196487427,
-0.43588384985923767,
-0.19913412630558014,
0.44831007719039917,
-0.009198068641126156,
0.08800255507230759,
0.24924448132514954,
0.15396320819854736,
0.19835783541202545,
-0.10714202374219894,
0.027731439098715782,
-0.16723982989788055,
-0.4963665008544922,
0.33794906735420227,
-0.33328190445899963,
-0.45074865221977234,
0.22521495819091797,
0.2475791573524475,
0.1315651535987854,
-0.148738294839859,
-0.4591975510120392,
-0.09620789438486099,
-0.19071254134178162,
0.3368116319179535,
0.27549391984939575,
0.24157339334487915,
0.2859707474708557,
-0.045802779495716095,
-0.23144100606441498,
-0.09682308882474899,
-0.27645131945610046,
-0.18577393889427185,
0.018855415284633636,
0.0380462184548378,
-0.024312159046530724,
0.37792080640792847,
0.10327912122011185,
0.8251791000366211,
0.15248675644397736,
0.08259562402963638,
0.20603950321674347,
-0.1652814894914627,
0.47395774722099304,
-0.06753119826316833,
-0.4193330705165863,
0.15423846244812012,
-0.052817415446043015,
-0.03865870088338852,
0.022137552499771118,
0.14156438410282135,
0.14506135880947113,
-0.2094385027885437,
-0.1546708047389984,
-0.3190849721431732,
-0.17987564206123352,
-0.3019363582134247,
0.3977240025997162,
0.14000605046749115,
0.1854698657989502,
-0.09654562175273895,
-0.13531510531902313,
-0.03687995299696922,
0.04085976257920265,
0.5196683406829834,
0.03161799907684326,
0.03784116730093956,
-0.12421419471502304,
-0.40055376291275024,
-0.5413104295730591,
0.2819501459598541,
-0.1264817863702774,
0.014823319390416145,
-0.12715230882167816,
-0.03692380338907242,
0.12807372212409973,
-0.16893497109413147,
0.8004583716392517,
0.1358226090669632,
0.2251272350549698,
-0.07983925193548203,
-0.1498090624809265,
-0.03999236598610878,
-0.01631559245288372,
-0.04855487495660782,
0.3920728862285614,
0.2669598162174225,
0.43205705285072327,
-0.13542874157428741,
-0.08049607276916504,
0.3859430253505707,
0.037044890224933624,
-0.06172829493880272,
0.1283826231956482,
-0.24702546000480652,
-0.4443317651748657,
-0.272826611995697,
0.05394629389047623,
0.08763124793767929,
0.1856462061405182,
-0.0654800608754158,
-0.08723291754722595,
0.118675597012043,
-0.08070527762174606,
-0.0022812308743596077,
0.16578014194965363,
-0.012224518693983555,
0.0389203242957592,
-0.05344906821846962,
0.22089016437530518,
0.11915081739425659,
0.061062444001436234,
0.5091012716293335,
-0.056500062346458435,
-0.38127949833869934,
0.18816359341144562,
-0.04438391700387001,
0.3429506719112396,
0.3390970230102539,
-0.2681672275066376,
0.039965901523828506,
0.14395953714847565,
0.3153398036956787,
-0.11511322855949402,
-0.004742113407701254,
0.3017912805080414,
0.36551934480667114,
-0.1304406076669693,
-0.3737163245677948,
0.11047062277793884,
-0.009484361857175827,
-0.003540176898241043,
0.1575297713279724,
0.3169823884963989,
-0.054807502776384354,
-0.051076825708150864,
-0.269096314907074,
0.8244504928588867,
0.036353949457407,
0.23636794090270996,
0.15985684096813202,
-0.21627546846866608,
0.5273277163505554,
-0.09718238562345505,
0.13047784566879272,
-0.25598570704460144,
-0.17580370604991913,
-0.0000013030037280259421,
-0.0508047416806221,
0.3129931092262268,
-0.19582273066043854,
0.02587980031967163,
0.40926092863082886,
0.1587911993265152,
0.23193685710430145,
-0.08071998506784439,
0.05425958335399628,
-0.04185285046696663,
-0.008462083525955677,
-0.34934455156326294,
0.3038860857486725,
0.14044368267059326,
0.4613945484161377,
-0.015047349967062473,
-0.06241752952337265,
0.0018450793577358127,
-0.3638457953929901,
-0.2763354480266571,
-0.0162153672426939,
0.016555648297071457,
0.19865113496780396,
0.19023196399211884,
-0.277068167924881,
-0.017407096922397614,
0.1367301195859909,
0.22538353502750397,
0.32558590173721313,
-0.2611871063709259,
-0.09684979170560837,
-0.046996429562568665,
-0.33092647790908813,
-0.13761727511882782,
0.24959148466587067,
-0.01725323498249054,
-0.17968639731407166,
-0.1671053022146225,
0.08955059945583344,
0.006463267840445042,
-0.05606014281511307,
0.099148228764534,
-0.09145539999008179,
-0.21653831005096436,
-0.16652178764343262,
-0.05861309915781021,
-0.2534751892089844,
0.06106027960777283,
-0.27685341238975525,
0.24910369515419006,
0.04131767526268959,
-0.12172598391771317,
-0.2364388108253479,
0.11226290464401245,
-0.15414085984230042,
-0.11099062114953995,
0.2632184624671936,
-0.07736832648515701,
0.06108663231134415,
0.3240955173969269,
0.2648828625679016,
-0.22642149031162262,
-0.3825499415397644,
-0.013538259081542492,
0.08556953817605972,
-0.2729393541812897,
0.19216108322143555,
0.11713635921478271,
0.08228891342878342,
-0.1908300369977951,
0.2690960168838501,
0.33591899275779724,
-0.13645173609256744,
-0.032584287226200104,
-0.537857711315155,
-0.2947755753993988,
0.16471058130264282,
-0.05046644061803818,
0.08710210025310516,
0.12799571454524994,
0.11670776456594467,
0.18564416468143463,
-0.2806795537471771,
-0.4728768467903137,
0.06415712833404541,
-0.20021669566631317,
-0.24285052716732025,
0.3718545734882355,
-0.12326455861330032,
0.278784841299057,
-0.020094064995646477,
0.31589406728744507,
-0.14968685805797577,
-0.377465158700943,
-0.3512658476829529,
-0.10452614724636078,
0.03658195212483406,
-0.220871239900589,
0.008516655303537846,
0.20695731043815613,
-0.14079442620277405,
-0.3141077756881714,
0.12300992012023926,
0.09437050670385361,
0.1516927033662796,
0.28711965680122375,
-0.026088029146194458,
-0.1401156485080719,
-0.13056468963623047,
0.07483977824449539,
0.10106446593999863,
0.00046403665328398347,
0.23048830032348633,
-0.005064856261014938,
0.010893520899116993,
-0.08315825462341309,
-0.06700704991817474,
0.061936840415000916,
0.06163691729307175,
-0.04597565531730652,
0.013131191954016685,
0.28898459672927856,
-0.22916877269744873,
-0.015537374652922153,
0.17917542159557343,
0.5500342845916748,
0.08230988681316376,
-0.17591102421283722,
0.2992326319217682,
0.14621488749980927,
0.2974371612071991,
-0.43504977226257324,
0.019757138565182686,
-0.01371714100241661,
0.009561887942254543,
0.03303816169500351,
-0.009556477889418602,
0.14897632598876953,
0.07780736684799194,
0.1999177634716034,
0.1721159815788269,
0.477923184633255,
-0.08331090956926346,
0.16326111555099487,
0.19899076223373413,
0.09332403540611267,
0.06382616609334946,
0.2807762920856476,
0.2581150531768799,
0.01653376780450344,
0.2509435713291168,
-0.1857617199420929,
-0.08649898320436478,
0.04273403063416481,
0.054298460483551025,
-0.030205346643924713,
-0.36253219842910767,
0.28000104427337646,
0.11971345543861389,
-0.2576753497123718,
-0.061955660581588745,
0.041466787457466125,
0.6964496374130249,
-0.3525012135505676,
0.03535029664635658,
-0.31129756569862366,
0.4108230173587799,
-0.09422623366117477,
-0.23189358413219452,
0.049026332795619965,
-0.15687958896160126,
-0.08404616266489029,
0.06359035521745682,
0.022928528487682343,
-0.11694706231355667,
0.34170976281166077,
-0.1876816302537918,
-0.019429059699177742,
-0.417546808719635,
-0.05876103416085243,
-0.08300162851810455,
0.25262653827667236,
0.09091224521398544,
0.15693175792694092,
-0.011992662213742733,
-0.09997236728668213,
0.04300280660390854,
0.2961599826812744,
0.5214815735816956,
-0.08776415884494781,
0.12982046604156494,
0.02646988444030285,
-0.1455671787261963,
-0.25720566511154175,
-0.024079391732811928,
0.2703019082546234,
0.0706738829612732,
0.19385690987110138,
0.18525612354278564,
0.29498597979545593,
-0.256464421749115,
0.25297051668167114,
0.07730395346879959,
0.021870393306016922,
-0.2143646776676178,
0.11363661289215088,
-0.27401912212371826,
-0.1527460217475891,
-0.23349367082118988,
0.15384726226329803,
-0.5373542904853821,
-0.16692884266376495,
0.24572615325450897,
-0.04472363367676735,
0.08578947931528091,
-0.19501742720603943,
0.19140125811100006,
0.006211457774043083,
0.4139518439769745,
0.4352039694786072,
0.18899647891521454,
-0.00547438720241189,
-0.15021155774593353,
-0.5657955408096313,
0.029859330505132675,
0.02489573508501053,
-0.2581119239330292,
-0.10171061754226685,
-0.05401846021413803,
0.0901581346988678,
0.05895422771573067,
0.13657015562057495,
-0.10477900505065918,
-0.007300905883312225,
-0.10564848780632019,
0.009201937355101109,
0.049386512488126755,
-0.12363149970769882,
0.010059998370707035,
0.026292646303772926,
-0.1580040007829666,
0.15081152319908142,
-0.18362469971179962,
0.15849727392196655,
-0.09448643773794174,
0.4176446199417114,
-0.08693588525056839,
-0.3719547986984253,
0.1573266088962555,
-0.047829918563365936,
0.2293478101491928,
-0.18402208387851715,
-0.14251704514026642,
-0.17237277328968048,
-0.22000813484191895,
-0.15231545269489288,
0.2334897667169571,
0.03858118876814842,
0.06237136572599411,
-0.17475654184818268,
-0.38029950857162476,
-0.019963471218943596,
0.15716999769210815,
0.17611856758594513,
-0.011697228066623211,
0.03996890038251877,
0.21503673493862152,
-0.09858021885156631,
-0.1653072088956833,
0.3067535161972046,
0.18838045001029968,
-0.13886673748493195,
-0.12490077316761017,
-0.058614276349544525,
-0.3656689524650574,
0.38722917437553406,
-0.33529624342918396,
-0.1700008660554886,
-0.10997278988361359,
0.24668774008750916,
0.1302385926246643,
-0.10861050337553024,
-0.33183175325393677,
0.2705031633377075,
0.16466721892356873,
0.07039690017700195,
-0.264689564704895,
0.45016881823539734,
-0.2666846215724945,
-0.08511356264352798,
-0.04644231125712395,
0.4506612718105316,
0.13088484108448029,
-0.3480938971042633,
0.05350016430020332,
-0.22364698350429535
] |
https://github.com/huggingface/datasets/issues/1770
|
how can I combine 2 dataset with different/same features?
|
Hi ! Currently we don't have a way to `zip` datasets but we plan to add this soon :)
For now you'll need to use `map` to add the fields from one dataset to the other. See the comment here for more info : https://github.com/huggingface/datasets/issues/853#issuecomment-727872188
|
to combine 2 dataset by one-one map like ds = zip(ds1, ds2):
ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'}
or different feature:
ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'}
| 45 |
how can I combine 2 dataset with different/same features?
|
[
-0.4915993809700012,
-0.1317921280860901,
-0.2223094403743744,
0.13141140341758728,
-0.051391199231147766,
0.27318617701530457,
0.02753085270524025,
0.4049152135848999,
-0.24233472347259521,
0.048019930720329285,
-0.2727576792240143,
0.25570616126060486,
0.07943069934844971,
0.45351919531822205,
-0.08603418618440628,
-0.12904897332191467,
0.08749564737081528,
0.2556968331336975,
-0.41973811388015747,
0.1336478441953659,
0.021689342334866524,
-0.19470717012882233,
0.19623936712741852,
-0.0974174290895462,
-0.15347294509410858,
0.18221022188663483,
-0.048642951995134354,
0.0018850811757147312,
-0.09362336993217468,
0.11737789958715439,
0.07609035819768906,
0.2476261407136917,
-0.14507418870925903,
0.18068383634090424,
-0.00009718024375615641,
0.030129248276352882,
-0.17174790799617767,
-0.07471209019422531,
0.027155429124832153,
-0.07109884172677994,
-0.16166898608207703,
-0.21705660223960876,
-0.1141253262758255,
-0.21463042497634888,
-0.30343571305274963,
-0.2850469648838043,
-0.38747143745422363,
-0.12761835753917694,
0.17226244509220123,
-0.15183418989181519,
0.3026719391345978,
0.04115926846861839,
-0.10479016602039337,
-0.22155135869979858,
0.22528906166553497,
0.1083269938826561,
0.11034023016691208,
-0.12519218027591705,
0.42304527759552,
0.05703665688633919,
0.3624875545501709,
0.2128794640302658,
-0.07235834002494812,
0.07043775171041489,
0.18092814087867737,
0.12344120442867279,
0.05554325878620148,
0.009434693492949009,
0.10843408107757568,
0.2690749168395996,
0.32201331853866577,
0.06259983032941818,
-0.030623644590377808,
-0.11534997075796127,
0.1387164294719696,
-0.1478373408317566,
-0.17529882490634918,
-0.14361988008022308,
0.10860853642225266,
-0.02838549204170704,
-0.13750575482845306,
-0.29097825288772583,
0.06855737417936325,
0.1381666362285614,
-0.15404698252677917,
0.08556532114744186,
0.07180897146463394,
-0.019398553296923637,
-0.2331029176712036,
-0.23085851967334747,
0.11397800594568253,
-0.15847516059875488,
0.12249691784381866,
-0.08369749784469604,
0.000022119204004411586,
-0.2819017767906189,
-0.14262555539608002,
-0.28561243414878845,
0.3535943329334259,
0.11718793213367462,
0.06848854571580887,
0.0011321522761136293,
-0.25192970037460327,
0.2141365110874176,
0.08930546045303345,
0.08653540164232254,
-0.07260819524526596,
-0.054677460342645645,
-0.14041350781917572,
-0.004845266230404377,
-0.4605179727077484,
0.06849488615989685,
0.259249210357666,
-0.17756634950637817,
0.04133307561278343,
-0.14640533924102783,
0.45915907621383667,
-0.28000855445861816,
-0.15471544861793518,
-0.12270158529281616,
0.056553665548563004,
0.00013014249270781875,
-0.18917205929756165,
0.012295660562813282,
-0.0716666579246521,
-0.0221696887165308,
-0.1897340714931488,
0.3848070800304413,
0.051513753831386566,
-0.1356159895658493,
-0.24874486029148102,
0.0872207060456276,
0.2322486937046051,
-0.033159494400024414,
-0.07101281732320786,
0.03410698473453522,
0.06207892298698425,
0.37900596857070923,
-0.21244415640830994,
0.1944941133260727,
0.2009011209011078,
0.013973908498883247,
0.0764850601553917,
-0.33213937282562256,
0.37330392003059387,
0.005262257065623999,
0.10396186262369156,
0.23553721606731415,
-0.2882654368877411,
-0.0031920368783175945,
-0.04206337779760361,
-0.07180353254079819,
0.06196965277194977,
0.3558594584465027,
-0.028951402753591537,
-0.22464069724082947,
0.20524828135967255,
0.5022156834602356,
-0.09708712995052338,
-0.2906377911567688,
-0.24430930614471436,
0.3507106304168701,
-0.21578918397426605,
-0.23454590141773224,
0.20860642194747925,
0.06119764596223831,
-0.34681469202041626,
-0.1716466099023819,
-0.03599046543240547,
0.01254618726670742,
-0.14854367077350616,
0.23941881954669952,
-0.21222159266471863,
0.08841409534215927,
0.0170589629560709,
-0.028165753930807114,
0.39225083589553833,
0.052471403032541275,
-0.3612755239009857,
0.07305781543254852,
-0.16013722121715546,
-0.05254211276769638,
0.07304366677999496,
0.19639045000076294,
0.08375842124223709,
-0.07144176214933395,
0.04839222505688667,
0.43297356367111206,
-0.37306350469589233,
-0.36943599581718445,
0.06963934004306793,
-0.3756180703639984,
0.26783114671707153,
-0.013204394839704037,
0.1212293952703476,
0.030535919591784477,
0.15897125005722046,
-0.13532733917236328,
0.13597269356250763,
-0.2145625352859497,
0.10506482422351837,
0.04920412600040436,
0.16556517779827118,
0.023681582883000374,
-0.23345230519771576,
-0.3360888659954071,
-0.12984266877174377,
-0.2504132390022278,
-0.05445484817028046,
-0.11520854383707047,
0.24864856898784637,
-0.36077097058296204,
-0.34805601835250854,
-0.40846729278564453,
-0.0024930790532380342,
0.10136435925960541,
0.32932618260383606,
0.2667257785797119,
-0.15572640299797058,
-0.2486789971590042,
0.06816396117210388,
0.05220320448279381,
0.27847570180892944,
-0.3739328682422638,
-0.2664489150047302,
0.49521201848983765,
-0.12979842722415924,
-0.008246351964771748,
0.19326119124889374,
0.29460814595222473,
0.13224872946739197,
0.06900110095739365,
0.12138050049543381,
-0.19268862903118134,
-0.6372289061546326,
0.4515175521373749,
0.3599911034107208,
0.07291415333747864,
0.018347004428505898,
-0.04386721923947334,
0.18240900337696075,
-0.1543058156967163,
-0.013545051217079163,
0.04092179983854294,
-0.04300953447818756,
0.3741395175457001,
0.039500102400779724,
0.06344769150018692,
0.2381623536348343,
-0.019103381782770157,
0.06745953112840652,
-0.26722848415374756,
0.3121158480644226,
-0.2772183418273926,
0.05787939205765724,
-0.02591712586581707,
-0.007273826282471418,
0.2223503589630127,
-0.2945135235786438,
0.40636932849884033,
0.18862293660640717,
-0.003467592876404524,
0.2777015268802643,
-0.3740738332271576,
-0.2852344214916229,
-0.02310820110142231,
0.09873612970113754,
0.04697834327816963,
0.37965449690818787,
0.5043678283691406,
0.12066739052534103,
0.15772554278373718,
-0.16458727419376373,
0.17723454535007477,
-0.02909662574529648,
-0.06655331701040268,
0.007453883998095989,
0.26614630222320557,
0.12843085825443268,
0.23886676132678986,
0.0798225924372673,
0.033811915665864944,
0.1373930126428604,
-0.15005040168762207,
-0.1352626383304596,
-0.18312031030654907,
-0.38241103291511536,
-0.16805584728717804,
-0.405315101146698,
-0.04027576372027397,
-0.0031743126455694437,
-0.12582027912139893,
0.06874475628137589,
0.2870106101036072,
-0.2900756299495697,
0.14374834299087524,
-0.10592996329069138,
0.17608197033405304,
-0.06881740689277649,
-0.2997278571128845,
0.22580285370349884,
0.10379616171121597,
0.08480968326330185,
0.3808598220348358,
0.07314550876617432,
0.36995425820350647,
0.4004320800304413,
-0.06369955092668533,
-0.018960226327180862,
-0.5338922142982483,
-0.4182421565055847,
0.2076958566904068,
-0.03688197582960129,
0.12753218412399292,
-0.1618485301733017,
-0.0023864563554525375,
0.06633292883634567,
-0.3691210150718689,
0.2184198796749115,
0.2578658163547516,
-0.16373634338378906,
-0.20717477798461914,
-0.25025418400764465,
-0.025539333000779152,
0.08593384921550751,
-0.5214270949363708,
-0.11298441886901855,
-0.2609005570411682,
-0.11986975371837616,
0.04417213052511215,
-0.026746775954961777,
-0.3968353271484375,
0.2755632698535919,
-0.12857869267463684,
0.06158021464943886,
0.17935484647750854,
-0.43581101298332214,
0.0007326985360123217,
0.25151652097702026,
-0.17632190883159637,
-0.11190155893564224,
-0.2668774724006653,
-0.22400183975696564,
0.1166604533791542,
0.23315370082855225,
-0.14080771803855896,
-0.16807474195957184,
-0.02793273702263832,
0.2847757637500763,
-0.022164812311530113,
0.08742579817771912,
0.2546399235725403,
0.049559298902750015,
-0.18722642958164215,
-0.09430024772882462,
-0.16689708828926086,
0.11747568845748901,
0.02087431028485298,
0.19288291037082672,
-0.24533838033676147,
0.05662619695067406,
-0.2740460932254791,
0.4807179272174835,
0.1061752513051033,
-0.040319155901670456,
0.28581011295318604,
-0.007191106211394072,
0.3485739827156067,
-0.06678172200918198,
-0.25499722361564636,
-0.09471847116947174,
0.09991870075464249,
0.09592488408088684,
0.112095408141613,
-0.059525102376937866,
0.03350142017006874,
-0.2897498309612274,
-0.20579794049263,
-0.30214864015579224,
-0.22153601050376892,
0.09785827249288559,
0.0870141088962555,
0.12278688699007034,
0.04532262310385704,
-0.2992933988571167,
-0.3673012852668762,
0.019225792959332466,
0.02166455239057541,
-0.06114127114415169,
-0.29569706320762634,
0.06378483027219772,
-0.4480209946632385,
-0.04516381397843361,
-0.03214404731988907,
0.26784053444862366,
0.048572324216365814,
-0.1483626365661621,
0.06430677324533463,
-0.29070982336997986,
-0.5026857256889343,
-0.12641789019107819,
0.21531212329864502,
0.0036199025344103575,
0.12942679226398468,
-0.013035420328378677,
-0.0992225930094719,
-0.07996466755867004,
0.06701952964067459,
0.12977387011051178,
-0.08948980271816254,
0.06315935403108597,
0.3072139024734497,
-0.30682170391082764,
0.1580057293176651,
0.4496343731880188,
0.3445994257926941,
-0.02744045853614807,
0.04870021343231201,
0.25558632612228394,
-0.23994427919387817,
-0.27656030654907227,
-0.2862972617149353,
-0.035705842077732086,
0.02788926474750042,
-0.0753934308886528,
-0.2658516764640808,
-0.3265286982059479,
-0.07175727933645248,
0.3868672549724579,
0.35054296255111694,
0.23275326192378998,
-0.06570490449666977,
0.3316188454627991,
-0.11357589811086655,
0.16112524271011353,
0.15440873801708221,
0.6480081677436829,
0.16818565130233765,
-0.33079707622528076,
-0.08700794726610184,
-0.25823602080345154,
0.21284832060337067,
0.04614844173192978,
0.19675926864147186,
0.36637720465660095,
-0.16410669684410095,
-0.2140880972146988,
0.017132144421339035,
0.15989239513874054,
0.02209056168794632,
0.12286680936813354,
-0.13122931122779846,
-0.07376495748758316,
0.34521788358688354,
0.270672470331192,
-0.1860552728176117,
0.07083354890346527,
-0.12007568776607513,
-0.15459755063056946,
0.13214769959449768,
-0.10386517643928528,
0.8310320377349854,
0.29032227396965027,
0.1322762817144394,
-0.01483638770878315,
-0.03490818291902542,
0.3216668963432312,
0.03444989025592804,
-0.10146361589431763,
-0.02370312437415123,
-0.4091213345527649,
-0.03318881615996361,
0.08174880594015121,
-0.043290041387081146,
0.30447086691856384,
-0.2390456348657608,
0.24454762041568756,
-0.10530257970094681,
0.297493040561676,
-0.08324581384658813,
0.06906206905841827,
0.035674307495355606,
0.1304890513420105,
-0.24207529425621033,
0.21447083353996277,
-0.018097342923283577,
-0.1599845439195633,
-0.016698744148015976,
-0.05517417564988136,
-0.21138226985931396,
0.1015533059835434,
0.13064415752887726,
0.17920956015586853,
0.030383359640836716,
0.22532975673675537,
-0.16262638568878174,
-0.33581265807151794,
-0.16206896305084229,
-0.1527184396982193,
0.11099154502153397,
-0.07379337400197983,
-0.08267628401517868,
0.07731983065605164,
0.05915374681353569,
0.029744775965809822,
-0.2090817391872406,
-0.2106129378080368,
0.2774158716201782,
-0.17896680533885956,
-0.10231718420982361,
0.30562564730644226,
0.3774552047252655,
-0.13290204107761383,
-0.1182708814740181,
-0.07010119408369064,
0.06486482173204422,
-0.3793976902961731,
-0.4989517629146576,
0.47239285707473755,
0.24711182713508606,
-0.30424293875694275,
0.19545522332191467,
-0.06805940717458725,
-0.14014114439487457,
0.14643502235412598,
0.05232570692896843,
-0.08681531250476837,
-0.20789596438407898,
-0.044046539813280106,
0.332665354013443,
-0.04536521062254906,
0.3116227984428406,
-0.21104001998901367,
0.2415158450603485,
-0.15410487353801727,
-0.06622374057769775,
0.4210777282714844,
-0.2547180652618408,
0.0013096054317429662,
-0.34493690729141235,
-0.20139387249946594,
-0.006350833456963301,
0.14729882776737213,
0.36569732427597046,
0.43683767318725586,
0.24385692179203033,
-0.14858834445476532,
-0.27610474824905396,
0.12422988563776016,
0.29042014479637146,
0.29927918314933777,
0.019640633836388588,
0.2721247673034668,
-0.34991079568862915,
0.5197777152061462,
-0.4799988567829132,
-0.06380416452884674,
0.17973263561725616,
0.28990259766578674,
0.2655158042907715,
-0.02633606269955635,
-0.1870851069688797,
0.05439115688204765,
0.29827743768692017,
-0.13901455700397491,
-0.026669908314943314,
-0.3961170017719269,
-0.12181421369314194,
0.0013189835008233786,
-0.014423241838812828,
-0.006558011285960674,
-0.11136114597320557,
-0.03759191557765007,
0.1738034337759018,
-0.00021371725597418845,
0.22706957161426544,
-0.027404706925153732,
0.06114358454942703,
-0.16919860243797302,
-0.03083484061062336,
-0.24814094603061676,
-0.2379620224237442,
0.14925530552864075,
0.09419070184230804,
-0.11246389895677567,
0.10603859275579453,
0.029523268342018127,
0.027890386059880257,
-0.1285046637058258,
0.04622046276926994,
-0.04665253683924675,
0.33047157526016235,
-0.11510687321424484,
-0.012253467924892902,
0.182003453373909,
-0.15609470009803772,
0.3014000654220581,
0.008000281639397144,
0.16350550949573517,
-0.08346360921859741,
0.14726966619491577,
0.025183899328112602,
0.38243600726127625,
-0.4267635643482208,
-0.12652085721492767,
0.2771318554878235,
-0.22195620834827423,
0.2187446802854538,
0.07701095193624496,
0.09025824815034866,
0.20339320600032806,
-0.026814155280590057,
0.11146369576454163,
-0.028652502223849297,
-0.01095880102366209,
0.21294552087783813,
0.3458215892314911,
0.06682397425174713,
-0.10793191939592361,
0.08019498735666275,
0.29594549536705017,
0.18198677897453308,
0.10723855346441269,
0.05562969669699669,
0.15106995403766632,
-0.006803583819419146,
-0.18034857511520386,
0.3268214464187622,
-0.04331560060381889,
0.19160547852516174,
0.24346387386322021,
0.020440315827727318,
0.268881618976593,
0.25265493988990784,
0.014512397348880768,
0.07947084307670593,
-0.2774944603443146,
0.13070888817310333,
0.31057223677635193,
-0.02180020697414875,
-0.012141391634941101,
-0.05775488540530205,
-0.3097952604293823,
-0.16942644119262695,
-0.07712182402610779,
0.09380162507295609,
-0.32521992921829224,
0.36062702536582947,
-0.1307452768087387,
-0.08979412913322449,
-0.01029543299227953,
0.45648059248924255,
0.27324533462524414,
-0.12337618321180344,
-0.12995511293411255,
0.058167457580566406,
0.358659565448761,
-0.3728831112384796,
0.34991803765296936,
0.3002063035964966,
0.17844752967357635,
-0.09995456039905548,
0.0094857607036829,
0.1112959235906601,
0.13758420944213867,
-0.22323089838027954,
-0.1820925772190094,
-0.3922780752182007,
0.16516287624835968,
-0.14564503729343414,
0.3084160089492798,
0.34483596682548523,
-0.2604697048664093,
0.03323100134730339,
-0.11831570416688919,
-0.0009052189998328686,
-0.48394474387168884,
0.1588519960641861,
0.309297651052475,
-0.23405621945858002,
0.04115000367164612,
-0.15612491965293884,
-0.16650639474391937,
-0.4548801779747009,
0.3552609086036682,
-0.03573359176516533,
0.06378200650215149,
0.020174618810415268,
0.19189000129699707,
-0.06206332892179489,
0.04971158877015114,
0.1551385521888733,
-0.006443031597882509,
-0.007333976682275534,
-0.05207885801792145,
-0.5609641671180725,
0.17153455317020416,
0.1861509531736374,
-0.17294365167617798,
-0.1564740687608719,
0.2217227816581726,
0.30786260962486267,
0.11493510007858276,
0.19961458444595337,
-0.0572698712348938,
0.36837485432624817,
-0.05466320365667343,
-0.33345797657966614,
-0.3152957558631897,
0.10074406117200851,
0.05872036889195442,
0.2037173956632614,
-0.1317676454782486,
0.052913665771484375,
0.05913154035806656,
0.22800539433956146,
-0.016831781715154648,
-0.28744927048683167,
0.0916849672794342,
-0.097201868891716,
0.3195531666278839,
-0.0037813305389136076,
0.47932326793670654,
-0.4596426486968994,
-0.11122103780508041,
0.22416642308235168,
0.029705338180065155,
-0.39312317967414856,
0.13914282619953156,
0.20229990780353546,
0.23964232206344604,
-0.42152032256126404,
0.3640066683292389,
0.22365665435791016,
0.03928500786423683,
0.029672179371118546,
-0.1164160668849945,
-0.06307095289230347,
0.2674342393875122,
0.05218106880784035,
0.12291581928730011,
0.04107920825481415,
0.3605143427848816,
0.00016879830218385905,
0.2605215311050415,
0.04985687881708145,
-0.21305319666862488,
0.26114901900291443,
0.3280121982097626,
-0.3961384892463684,
-0.34975582361221313,
-0.13145042955875397,
0.12374700605869293,
0.11836697161197662,
-0.3457566499710083,
-0.031002851203083992,
0.30193614959716797,
-0.14742454886436462,
0.29628127813339233,
0.3962268829345703,
-0.10552653670310974,
-0.052123650908470154,
-0.04476558044552803,
0.39276763796806335,
0.05424197390675545,
-0.3952913284301758,
-0.10591242462396622,
-0.25733232498168945
] |
https://github.com/huggingface/datasets/issues/1770
|
how can I combine 2 dataset with different/same features?
|
Good to hear.
Currently I did not use map , just fetch src and tgt from the 2 dataset and merge them.
It will be a release if you can deal with it at the backend.
Thanks.
|
to combine 2 dataset by one-one map like ds = zip(ds1, ds2):
ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'}
or different feature:
ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'}
| 37 |
how can I combine 2 dataset with different/same features?
|
[
-0.4915993809700012,
-0.1317921280860901,
-0.2223094403743744,
0.13141140341758728,
-0.051391199231147766,
0.27318617701530457,
0.02753085270524025,
0.4049152135848999,
-0.24233472347259521,
0.048019930720329285,
-0.2727576792240143,
0.25570616126060486,
0.07943069934844971,
0.45351919531822205,
-0.08603418618440628,
-0.12904897332191467,
0.08749564737081528,
0.2556968331336975,
-0.41973811388015747,
0.1336478441953659,
0.021689342334866524,
-0.19470717012882233,
0.19623936712741852,
-0.0974174290895462,
-0.15347294509410858,
0.18221022188663483,
-0.048642951995134354,
0.0018850811757147312,
-0.09362336993217468,
0.11737789958715439,
0.07609035819768906,
0.2476261407136917,
-0.14507418870925903,
0.18068383634090424,
-0.00009718024375615641,
0.030129248276352882,
-0.17174790799617767,
-0.07471209019422531,
0.027155429124832153,
-0.07109884172677994,
-0.16166898608207703,
-0.21705660223960876,
-0.1141253262758255,
-0.21463042497634888,
-0.30343571305274963,
-0.2850469648838043,
-0.38747143745422363,
-0.12761835753917694,
0.17226244509220123,
-0.15183418989181519,
0.3026719391345978,
0.04115926846861839,
-0.10479016602039337,
-0.22155135869979858,
0.22528906166553497,
0.1083269938826561,
0.11034023016691208,
-0.12519218027591705,
0.42304527759552,
0.05703665688633919,
0.3624875545501709,
0.2128794640302658,
-0.07235834002494812,
0.07043775171041489,
0.18092814087867737,
0.12344120442867279,
0.05554325878620148,
0.009434693492949009,
0.10843408107757568,
0.2690749168395996,
0.32201331853866577,
0.06259983032941818,
-0.030623644590377808,
-0.11534997075796127,
0.1387164294719696,
-0.1478373408317566,
-0.17529882490634918,
-0.14361988008022308,
0.10860853642225266,
-0.02838549204170704,
-0.13750575482845306,
-0.29097825288772583,
0.06855737417936325,
0.1381666362285614,
-0.15404698252677917,
0.08556532114744186,
0.07180897146463394,
-0.019398553296923637,
-0.2331029176712036,
-0.23085851967334747,
0.11397800594568253,
-0.15847516059875488,
0.12249691784381866,
-0.08369749784469604,
0.000022119204004411586,
-0.2819017767906189,
-0.14262555539608002,
-0.28561243414878845,
0.3535943329334259,
0.11718793213367462,
0.06848854571580887,
0.0011321522761136293,
-0.25192970037460327,
0.2141365110874176,
0.08930546045303345,
0.08653540164232254,
-0.07260819524526596,
-0.054677460342645645,
-0.14041350781917572,
-0.004845266230404377,
-0.4605179727077484,
0.06849488615989685,
0.259249210357666,
-0.17756634950637817,
0.04133307561278343,
-0.14640533924102783,
0.45915907621383667,
-0.28000855445861816,
-0.15471544861793518,
-0.12270158529281616,
0.056553665548563004,
0.00013014249270781875,
-0.18917205929756165,
0.012295660562813282,
-0.0716666579246521,
-0.0221696887165308,
-0.1897340714931488,
0.3848070800304413,
0.051513753831386566,
-0.1356159895658493,
-0.24874486029148102,
0.0872207060456276,
0.2322486937046051,
-0.033159494400024414,
-0.07101281732320786,
0.03410698473453522,
0.06207892298698425,
0.37900596857070923,
-0.21244415640830994,
0.1944941133260727,
0.2009011209011078,
0.013973908498883247,
0.0764850601553917,
-0.33213937282562256,
0.37330392003059387,
0.005262257065623999,
0.10396186262369156,
0.23553721606731415,
-0.2882654368877411,
-0.0031920368783175945,
-0.04206337779760361,
-0.07180353254079819,
0.06196965277194977,
0.3558594584465027,
-0.028951402753591537,
-0.22464069724082947,
0.20524828135967255,
0.5022156834602356,
-0.09708712995052338,
-0.2906377911567688,
-0.24430930614471436,
0.3507106304168701,
-0.21578918397426605,
-0.23454590141773224,
0.20860642194747925,
0.06119764596223831,
-0.34681469202041626,
-0.1716466099023819,
-0.03599046543240547,
0.01254618726670742,
-0.14854367077350616,
0.23941881954669952,
-0.21222159266471863,
0.08841409534215927,
0.0170589629560709,
-0.028165753930807114,
0.39225083589553833,
0.052471403032541275,
-0.3612755239009857,
0.07305781543254852,
-0.16013722121715546,
-0.05254211276769638,
0.07304366677999496,
0.19639045000076294,
0.08375842124223709,
-0.07144176214933395,
0.04839222505688667,
0.43297356367111206,
-0.37306350469589233,
-0.36943599581718445,
0.06963934004306793,
-0.3756180703639984,
0.26783114671707153,
-0.013204394839704037,
0.1212293952703476,
0.030535919591784477,
0.15897125005722046,
-0.13532733917236328,
0.13597269356250763,
-0.2145625352859497,
0.10506482422351837,
0.04920412600040436,
0.16556517779827118,
0.023681582883000374,
-0.23345230519771576,
-0.3360888659954071,
-0.12984266877174377,
-0.2504132390022278,
-0.05445484817028046,
-0.11520854383707047,
0.24864856898784637,
-0.36077097058296204,
-0.34805601835250854,
-0.40846729278564453,
-0.0024930790532380342,
0.10136435925960541,
0.32932618260383606,
0.2667257785797119,
-0.15572640299797058,
-0.2486789971590042,
0.06816396117210388,
0.05220320448279381,
0.27847570180892944,
-0.3739328682422638,
-0.2664489150047302,
0.49521201848983765,
-0.12979842722415924,
-0.008246351964771748,
0.19326119124889374,
0.29460814595222473,
0.13224872946739197,
0.06900110095739365,
0.12138050049543381,
-0.19268862903118134,
-0.6372289061546326,
0.4515175521373749,
0.3599911034107208,
0.07291415333747864,
0.018347004428505898,
-0.04386721923947334,
0.18240900337696075,
-0.1543058156967163,
-0.013545051217079163,
0.04092179983854294,
-0.04300953447818756,
0.3741395175457001,
0.039500102400779724,
0.06344769150018692,
0.2381623536348343,
-0.019103381782770157,
0.06745953112840652,
-0.26722848415374756,
0.3121158480644226,
-0.2772183418273926,
0.05787939205765724,
-0.02591712586581707,
-0.007273826282471418,
0.2223503589630127,
-0.2945135235786438,
0.40636932849884033,
0.18862293660640717,
-0.003467592876404524,
0.2777015268802643,
-0.3740738332271576,
-0.2852344214916229,
-0.02310820110142231,
0.09873612970113754,
0.04697834327816963,
0.37965449690818787,
0.5043678283691406,
0.12066739052534103,
0.15772554278373718,
-0.16458727419376373,
0.17723454535007477,
-0.02909662574529648,
-0.06655331701040268,
0.007453883998095989,
0.26614630222320557,
0.12843085825443268,
0.23886676132678986,
0.0798225924372673,
0.033811915665864944,
0.1373930126428604,
-0.15005040168762207,
-0.1352626383304596,
-0.18312031030654907,
-0.38241103291511536,
-0.16805584728717804,
-0.405315101146698,
-0.04027576372027397,
-0.0031743126455694437,
-0.12582027912139893,
0.06874475628137589,
0.2870106101036072,
-0.2900756299495697,
0.14374834299087524,
-0.10592996329069138,
0.17608197033405304,
-0.06881740689277649,
-0.2997278571128845,
0.22580285370349884,
0.10379616171121597,
0.08480968326330185,
0.3808598220348358,
0.07314550876617432,
0.36995425820350647,
0.4004320800304413,
-0.06369955092668533,
-0.018960226327180862,
-0.5338922142982483,
-0.4182421565055847,
0.2076958566904068,
-0.03688197582960129,
0.12753218412399292,
-0.1618485301733017,
-0.0023864563554525375,
0.06633292883634567,
-0.3691210150718689,
0.2184198796749115,
0.2578658163547516,
-0.16373634338378906,
-0.20717477798461914,
-0.25025418400764465,
-0.025539333000779152,
0.08593384921550751,
-0.5214270949363708,
-0.11298441886901855,
-0.2609005570411682,
-0.11986975371837616,
0.04417213052511215,
-0.026746775954961777,
-0.3968353271484375,
0.2755632698535919,
-0.12857869267463684,
0.06158021464943886,
0.17935484647750854,
-0.43581101298332214,
0.0007326985360123217,
0.25151652097702026,
-0.17632190883159637,
-0.11190155893564224,
-0.2668774724006653,
-0.22400183975696564,
0.1166604533791542,
0.23315370082855225,
-0.14080771803855896,
-0.16807474195957184,
-0.02793273702263832,
0.2847757637500763,
-0.022164812311530113,
0.08742579817771912,
0.2546399235725403,
0.049559298902750015,
-0.18722642958164215,
-0.09430024772882462,
-0.16689708828926086,
0.11747568845748901,
0.02087431028485298,
0.19288291037082672,
-0.24533838033676147,
0.05662619695067406,
-0.2740460932254791,
0.4807179272174835,
0.1061752513051033,
-0.040319155901670456,
0.28581011295318604,
-0.007191106211394072,
0.3485739827156067,
-0.06678172200918198,
-0.25499722361564636,
-0.09471847116947174,
0.09991870075464249,
0.09592488408088684,
0.112095408141613,
-0.059525102376937866,
0.03350142017006874,
-0.2897498309612274,
-0.20579794049263,
-0.30214864015579224,
-0.22153601050376892,
0.09785827249288559,
0.0870141088962555,
0.12278688699007034,
0.04532262310385704,
-0.2992933988571167,
-0.3673012852668762,
0.019225792959332466,
0.02166455239057541,
-0.06114127114415169,
-0.29569706320762634,
0.06378483027219772,
-0.4480209946632385,
-0.04516381397843361,
-0.03214404731988907,
0.26784053444862366,
0.048572324216365814,
-0.1483626365661621,
0.06430677324533463,
-0.29070982336997986,
-0.5026857256889343,
-0.12641789019107819,
0.21531212329864502,
0.0036199025344103575,
0.12942679226398468,
-0.013035420328378677,
-0.0992225930094719,
-0.07996466755867004,
0.06701952964067459,
0.12977387011051178,
-0.08948980271816254,
0.06315935403108597,
0.3072139024734497,
-0.30682170391082764,
0.1580057293176651,
0.4496343731880188,
0.3445994257926941,
-0.02744045853614807,
0.04870021343231201,
0.25558632612228394,
-0.23994427919387817,
-0.27656030654907227,
-0.2862972617149353,
-0.035705842077732086,
0.02788926474750042,
-0.0753934308886528,
-0.2658516764640808,
-0.3265286982059479,
-0.07175727933645248,
0.3868672549724579,
0.35054296255111694,
0.23275326192378998,
-0.06570490449666977,
0.3316188454627991,
-0.11357589811086655,
0.16112524271011353,
0.15440873801708221,
0.6480081677436829,
0.16818565130233765,
-0.33079707622528076,
-0.08700794726610184,
-0.25823602080345154,
0.21284832060337067,
0.04614844173192978,
0.19675926864147186,
0.36637720465660095,
-0.16410669684410095,
-0.2140880972146988,
0.017132144421339035,
0.15989239513874054,
0.02209056168794632,
0.12286680936813354,
-0.13122931122779846,
-0.07376495748758316,
0.34521788358688354,
0.270672470331192,
-0.1860552728176117,
0.07083354890346527,
-0.12007568776607513,
-0.15459755063056946,
0.13214769959449768,
-0.10386517643928528,
0.8310320377349854,
0.29032227396965027,
0.1322762817144394,
-0.01483638770878315,
-0.03490818291902542,
0.3216668963432312,
0.03444989025592804,
-0.10146361589431763,
-0.02370312437415123,
-0.4091213345527649,
-0.03318881615996361,
0.08174880594015121,
-0.043290041387081146,
0.30447086691856384,
-0.2390456348657608,
0.24454762041568756,
-0.10530257970094681,
0.297493040561676,
-0.08324581384658813,
0.06906206905841827,
0.035674307495355606,
0.1304890513420105,
-0.24207529425621033,
0.21447083353996277,
-0.018097342923283577,
-0.1599845439195633,
-0.016698744148015976,
-0.05517417564988136,
-0.21138226985931396,
0.1015533059835434,
0.13064415752887726,
0.17920956015586853,
0.030383359640836716,
0.22532975673675537,
-0.16262638568878174,
-0.33581265807151794,
-0.16206896305084229,
-0.1527184396982193,
0.11099154502153397,
-0.07379337400197983,
-0.08267628401517868,
0.07731983065605164,
0.05915374681353569,
0.029744775965809822,
-0.2090817391872406,
-0.2106129378080368,
0.2774158716201782,
-0.17896680533885956,
-0.10231718420982361,
0.30562564730644226,
0.3774552047252655,
-0.13290204107761383,
-0.1182708814740181,
-0.07010119408369064,
0.06486482173204422,
-0.3793976902961731,
-0.4989517629146576,
0.47239285707473755,
0.24711182713508606,
-0.30424293875694275,
0.19545522332191467,
-0.06805940717458725,
-0.14014114439487457,
0.14643502235412598,
0.05232570692896843,
-0.08681531250476837,
-0.20789596438407898,
-0.044046539813280106,
0.332665354013443,
-0.04536521062254906,
0.3116227984428406,
-0.21104001998901367,
0.2415158450603485,
-0.15410487353801727,
-0.06622374057769775,
0.4210777282714844,
-0.2547180652618408,
0.0013096054317429662,
-0.34493690729141235,
-0.20139387249946594,
-0.006350833456963301,
0.14729882776737213,
0.36569732427597046,
0.43683767318725586,
0.24385692179203033,
-0.14858834445476532,
-0.27610474824905396,
0.12422988563776016,
0.29042014479637146,
0.29927918314933777,
0.019640633836388588,
0.2721247673034668,
-0.34991079568862915,
0.5197777152061462,
-0.4799988567829132,
-0.06380416452884674,
0.17973263561725616,
0.28990259766578674,
0.2655158042907715,
-0.02633606269955635,
-0.1870851069688797,
0.05439115688204765,
0.29827743768692017,
-0.13901455700397491,
-0.026669908314943314,
-0.3961170017719269,
-0.12181421369314194,
0.0013189835008233786,
-0.014423241838812828,
-0.006558011285960674,
-0.11136114597320557,
-0.03759191557765007,
0.1738034337759018,
-0.00021371725597418845,
0.22706957161426544,
-0.027404706925153732,
0.06114358454942703,
-0.16919860243797302,
-0.03083484061062336,
-0.24814094603061676,
-0.2379620224237442,
0.14925530552864075,
0.09419070184230804,
-0.11246389895677567,
0.10603859275579453,
0.029523268342018127,
0.027890386059880257,
-0.1285046637058258,
0.04622046276926994,
-0.04665253683924675,
0.33047157526016235,
-0.11510687321424484,
-0.012253467924892902,
0.182003453373909,
-0.15609470009803772,
0.3014000654220581,
0.008000281639397144,
0.16350550949573517,
-0.08346360921859741,
0.14726966619491577,
0.025183899328112602,
0.38243600726127625,
-0.4267635643482208,
-0.12652085721492767,
0.2771318554878235,
-0.22195620834827423,
0.2187446802854538,
0.07701095193624496,
0.09025824815034866,
0.20339320600032806,
-0.026814155280590057,
0.11146369576454163,
-0.028652502223849297,
-0.01095880102366209,
0.21294552087783813,
0.3458215892314911,
0.06682397425174713,
-0.10793191939592361,
0.08019498735666275,
0.29594549536705017,
0.18198677897453308,
0.10723855346441269,
0.05562969669699669,
0.15106995403766632,
-0.006803583819419146,
-0.18034857511520386,
0.3268214464187622,
-0.04331560060381889,
0.19160547852516174,
0.24346387386322021,
0.020440315827727318,
0.268881618976593,
0.25265493988990784,
0.014512397348880768,
0.07947084307670593,
-0.2774944603443146,
0.13070888817310333,
0.31057223677635193,
-0.02180020697414875,
-0.012141391634941101,
-0.05775488540530205,
-0.3097952604293823,
-0.16942644119262695,
-0.07712182402610779,
0.09380162507295609,
-0.32521992921829224,
0.36062702536582947,
-0.1307452768087387,
-0.08979412913322449,
-0.01029543299227953,
0.45648059248924255,
0.27324533462524414,
-0.12337618321180344,
-0.12995511293411255,
0.058167457580566406,
0.358659565448761,
-0.3728831112384796,
0.34991803765296936,
0.3002063035964966,
0.17844752967357635,
-0.09995456039905548,
0.0094857607036829,
0.1112959235906601,
0.13758420944213867,
-0.22323089838027954,
-0.1820925772190094,
-0.3922780752182007,
0.16516287624835968,
-0.14564503729343414,
0.3084160089492798,
0.34483596682548523,
-0.2604697048664093,
0.03323100134730339,
-0.11831570416688919,
-0.0009052189998328686,
-0.48394474387168884,
0.1588519960641861,
0.309297651052475,
-0.23405621945858002,
0.04115000367164612,
-0.15612491965293884,
-0.16650639474391937,
-0.4548801779747009,
0.3552609086036682,
-0.03573359176516533,
0.06378200650215149,
0.020174618810415268,
0.19189000129699707,
-0.06206332892179489,
0.04971158877015114,
0.1551385521888733,
-0.006443031597882509,
-0.007333976682275534,
-0.05207885801792145,
-0.5609641671180725,
0.17153455317020416,
0.1861509531736374,
-0.17294365167617798,
-0.1564740687608719,
0.2217227816581726,
0.30786260962486267,
0.11493510007858276,
0.19961458444595337,
-0.0572698712348938,
0.36837485432624817,
-0.05466320365667343,
-0.33345797657966614,
-0.3152957558631897,
0.10074406117200851,
0.05872036889195442,
0.2037173956632614,
-0.1317676454782486,
0.052913665771484375,
0.05913154035806656,
0.22800539433956146,
-0.016831781715154648,
-0.28744927048683167,
0.0916849672794342,
-0.097201868891716,
0.3195531666278839,
-0.0037813305389136076,
0.47932326793670654,
-0.4596426486968994,
-0.11122103780508041,
0.22416642308235168,
0.029705338180065155,
-0.39312317967414856,
0.13914282619953156,
0.20229990780353546,
0.23964232206344604,
-0.42152032256126404,
0.3640066683292389,
0.22365665435791016,
0.03928500786423683,
0.029672179371118546,
-0.1164160668849945,
-0.06307095289230347,
0.2674342393875122,
0.05218106880784035,
0.12291581928730011,
0.04107920825481415,
0.3605143427848816,
0.00016879830218385905,
0.2605215311050415,
0.04985687881708145,
-0.21305319666862488,
0.26114901900291443,
0.3280121982097626,
-0.3961384892463684,
-0.34975582361221313,
-0.13145042955875397,
0.12374700605869293,
0.11836697161197662,
-0.3457566499710083,
-0.031002851203083992,
0.30193614959716797,
-0.14742454886436462,
0.29628127813339233,
0.3962268829345703,
-0.10552653670310974,
-0.052123650908470154,
-0.04476558044552803,
0.39276763796806335,
0.05424197390675545,
-0.3952913284301758,
-0.10591242462396622,
-0.25733232498168945
] |
https://github.com/huggingface/datasets/issues/1770
|
how can I combine 2 dataset with different/same features?
|
Hi! You can rename the columns and concatenate the datasets along `axis=1` to get the desired result as follows:
```python
ds1 = ds1.rename_column("text", "src")
ds2 = ds2.rename_column("text", "tgt")
ds = datasets.concatenate_datasets(["ds1", "ds2"], axis=1)
```
|
to combine 2 dataset by one-one map like ds = zip(ds1, ds2):
ds1: {'text'}, ds2: {'text'}, combine ds:{'src', 'tgt'}
or different feature:
ds1: {'src'}, ds2: {'tgt'}, combine ds:{'src', 'tgt'}
| 34 |
how can I combine 2 dataset with different/same features?
|
[
-0.4915993809700012,
-0.1317921280860901,
-0.2223094403743744,
0.13141140341758728,
-0.051391199231147766,
0.27318617701530457,
0.02753085270524025,
0.4049152135848999,
-0.24233472347259521,
0.048019930720329285,
-0.2727576792240143,
0.25570616126060486,
0.07943069934844971,
0.45351919531822205,
-0.08603418618440628,
-0.12904897332191467,
0.08749564737081528,
0.2556968331336975,
-0.41973811388015747,
0.1336478441953659,
0.021689342334866524,
-0.19470717012882233,
0.19623936712741852,
-0.0974174290895462,
-0.15347294509410858,
0.18221022188663483,
-0.048642951995134354,
0.0018850811757147312,
-0.09362336993217468,
0.11737789958715439,
0.07609035819768906,
0.2476261407136917,
-0.14507418870925903,
0.18068383634090424,
-0.00009718024375615641,
0.030129248276352882,
-0.17174790799617767,
-0.07471209019422531,
0.027155429124832153,
-0.07109884172677994,
-0.16166898608207703,
-0.21705660223960876,
-0.1141253262758255,
-0.21463042497634888,
-0.30343571305274963,
-0.2850469648838043,
-0.38747143745422363,
-0.12761835753917694,
0.17226244509220123,
-0.15183418989181519,
0.3026719391345978,
0.04115926846861839,
-0.10479016602039337,
-0.22155135869979858,
0.22528906166553497,
0.1083269938826561,
0.11034023016691208,
-0.12519218027591705,
0.42304527759552,
0.05703665688633919,
0.3624875545501709,
0.2128794640302658,
-0.07235834002494812,
0.07043775171041489,
0.18092814087867737,
0.12344120442867279,
0.05554325878620148,
0.009434693492949009,
0.10843408107757568,
0.2690749168395996,
0.32201331853866577,
0.06259983032941818,
-0.030623644590377808,
-0.11534997075796127,
0.1387164294719696,
-0.1478373408317566,
-0.17529882490634918,
-0.14361988008022308,
0.10860853642225266,
-0.02838549204170704,
-0.13750575482845306,
-0.29097825288772583,
0.06855737417936325,
0.1381666362285614,
-0.15404698252677917,
0.08556532114744186,
0.07180897146463394,
-0.019398553296923637,
-0.2331029176712036,
-0.23085851967334747,
0.11397800594568253,
-0.15847516059875488,
0.12249691784381866,
-0.08369749784469604,
0.000022119204004411586,
-0.2819017767906189,
-0.14262555539608002,
-0.28561243414878845,
0.3535943329334259,
0.11718793213367462,
0.06848854571580887,
0.0011321522761136293,
-0.25192970037460327,
0.2141365110874176,
0.08930546045303345,
0.08653540164232254,
-0.07260819524526596,
-0.054677460342645645,
-0.14041350781917572,
-0.004845266230404377,
-0.4605179727077484,
0.06849488615989685,
0.259249210357666,
-0.17756634950637817,
0.04133307561278343,
-0.14640533924102783,
0.45915907621383667,
-0.28000855445861816,
-0.15471544861793518,
-0.12270158529281616,
0.056553665548563004,
0.00013014249270781875,
-0.18917205929756165,
0.012295660562813282,
-0.0716666579246521,
-0.0221696887165308,
-0.1897340714931488,
0.3848070800304413,
0.051513753831386566,
-0.1356159895658493,
-0.24874486029148102,
0.0872207060456276,
0.2322486937046051,
-0.033159494400024414,
-0.07101281732320786,
0.03410698473453522,
0.06207892298698425,
0.37900596857070923,
-0.21244415640830994,
0.1944941133260727,
0.2009011209011078,
0.013973908498883247,
0.0764850601553917,
-0.33213937282562256,
0.37330392003059387,
0.005262257065623999,
0.10396186262369156,
0.23553721606731415,
-0.2882654368877411,
-0.0031920368783175945,
-0.04206337779760361,
-0.07180353254079819,
0.06196965277194977,
0.3558594584465027,
-0.028951402753591537,
-0.22464069724082947,
0.20524828135967255,
0.5022156834602356,
-0.09708712995052338,
-0.2906377911567688,
-0.24430930614471436,
0.3507106304168701,
-0.21578918397426605,
-0.23454590141773224,
0.20860642194747925,
0.06119764596223831,
-0.34681469202041626,
-0.1716466099023819,
-0.03599046543240547,
0.01254618726670742,
-0.14854367077350616,
0.23941881954669952,
-0.21222159266471863,
0.08841409534215927,
0.0170589629560709,
-0.028165753930807114,
0.39225083589553833,
0.052471403032541275,
-0.3612755239009857,
0.07305781543254852,
-0.16013722121715546,
-0.05254211276769638,
0.07304366677999496,
0.19639045000076294,
0.08375842124223709,
-0.07144176214933395,
0.04839222505688667,
0.43297356367111206,
-0.37306350469589233,
-0.36943599581718445,
0.06963934004306793,
-0.3756180703639984,
0.26783114671707153,
-0.013204394839704037,
0.1212293952703476,
0.030535919591784477,
0.15897125005722046,
-0.13532733917236328,
0.13597269356250763,
-0.2145625352859497,
0.10506482422351837,
0.04920412600040436,
0.16556517779827118,
0.023681582883000374,
-0.23345230519771576,
-0.3360888659954071,
-0.12984266877174377,
-0.2504132390022278,
-0.05445484817028046,
-0.11520854383707047,
0.24864856898784637,
-0.36077097058296204,
-0.34805601835250854,
-0.40846729278564453,
-0.0024930790532380342,
0.10136435925960541,
0.32932618260383606,
0.2667257785797119,
-0.15572640299797058,
-0.2486789971590042,
0.06816396117210388,
0.05220320448279381,
0.27847570180892944,
-0.3739328682422638,
-0.2664489150047302,
0.49521201848983765,
-0.12979842722415924,
-0.008246351964771748,
0.19326119124889374,
0.29460814595222473,
0.13224872946739197,
0.06900110095739365,
0.12138050049543381,
-0.19268862903118134,
-0.6372289061546326,
0.4515175521373749,
0.3599911034107208,
0.07291415333747864,
0.018347004428505898,
-0.04386721923947334,
0.18240900337696075,
-0.1543058156967163,
-0.013545051217079163,
0.04092179983854294,
-0.04300953447818756,
0.3741395175457001,
0.039500102400779724,
0.06344769150018692,
0.2381623536348343,
-0.019103381782770157,
0.06745953112840652,
-0.26722848415374756,
0.3121158480644226,
-0.2772183418273926,
0.05787939205765724,
-0.02591712586581707,
-0.007273826282471418,
0.2223503589630127,
-0.2945135235786438,
0.40636932849884033,
0.18862293660640717,
-0.003467592876404524,
0.2777015268802643,
-0.3740738332271576,
-0.2852344214916229,
-0.02310820110142231,
0.09873612970113754,
0.04697834327816963,
0.37965449690818787,
0.5043678283691406,
0.12066739052534103,
0.15772554278373718,
-0.16458727419376373,
0.17723454535007477,
-0.02909662574529648,
-0.06655331701040268,
0.007453883998095989,
0.26614630222320557,
0.12843085825443268,
0.23886676132678986,
0.0798225924372673,
0.033811915665864944,
0.1373930126428604,
-0.15005040168762207,
-0.1352626383304596,
-0.18312031030654907,
-0.38241103291511536,
-0.16805584728717804,
-0.405315101146698,
-0.04027576372027397,
-0.0031743126455694437,
-0.12582027912139893,
0.06874475628137589,
0.2870106101036072,
-0.2900756299495697,
0.14374834299087524,
-0.10592996329069138,
0.17608197033405304,
-0.06881740689277649,
-0.2997278571128845,
0.22580285370349884,
0.10379616171121597,
0.08480968326330185,
0.3808598220348358,
0.07314550876617432,
0.36995425820350647,
0.4004320800304413,
-0.06369955092668533,
-0.018960226327180862,
-0.5338922142982483,
-0.4182421565055847,
0.2076958566904068,
-0.03688197582960129,
0.12753218412399292,
-0.1618485301733017,
-0.0023864563554525375,
0.06633292883634567,
-0.3691210150718689,
0.2184198796749115,
0.2578658163547516,
-0.16373634338378906,
-0.20717477798461914,
-0.25025418400764465,
-0.025539333000779152,
0.08593384921550751,
-0.5214270949363708,
-0.11298441886901855,
-0.2609005570411682,
-0.11986975371837616,
0.04417213052511215,
-0.026746775954961777,
-0.3968353271484375,
0.2755632698535919,
-0.12857869267463684,
0.06158021464943886,
0.17935484647750854,
-0.43581101298332214,
0.0007326985360123217,
0.25151652097702026,
-0.17632190883159637,
-0.11190155893564224,
-0.2668774724006653,
-0.22400183975696564,
0.1166604533791542,
0.23315370082855225,
-0.14080771803855896,
-0.16807474195957184,
-0.02793273702263832,
0.2847757637500763,
-0.022164812311530113,
0.08742579817771912,
0.2546399235725403,
0.049559298902750015,
-0.18722642958164215,
-0.09430024772882462,
-0.16689708828926086,
0.11747568845748901,
0.02087431028485298,
0.19288291037082672,
-0.24533838033676147,
0.05662619695067406,
-0.2740460932254791,
0.4807179272174835,
0.1061752513051033,
-0.040319155901670456,
0.28581011295318604,
-0.007191106211394072,
0.3485739827156067,
-0.06678172200918198,
-0.25499722361564636,
-0.09471847116947174,
0.09991870075464249,
0.09592488408088684,
0.112095408141613,
-0.059525102376937866,
0.03350142017006874,
-0.2897498309612274,
-0.20579794049263,
-0.30214864015579224,
-0.22153601050376892,
0.09785827249288559,
0.0870141088962555,
0.12278688699007034,
0.04532262310385704,
-0.2992933988571167,
-0.3673012852668762,
0.019225792959332466,
0.02166455239057541,
-0.06114127114415169,
-0.29569706320762634,
0.06378483027219772,
-0.4480209946632385,
-0.04516381397843361,
-0.03214404731988907,
0.26784053444862366,
0.048572324216365814,
-0.1483626365661621,
0.06430677324533463,
-0.29070982336997986,
-0.5026857256889343,
-0.12641789019107819,
0.21531212329864502,
0.0036199025344103575,
0.12942679226398468,
-0.013035420328378677,
-0.0992225930094719,
-0.07996466755867004,
0.06701952964067459,
0.12977387011051178,
-0.08948980271816254,
0.06315935403108597,
0.3072139024734497,
-0.30682170391082764,
0.1580057293176651,
0.4496343731880188,
0.3445994257926941,
-0.02744045853614807,
0.04870021343231201,
0.25558632612228394,
-0.23994427919387817,
-0.27656030654907227,
-0.2862972617149353,
-0.035705842077732086,
0.02788926474750042,
-0.0753934308886528,
-0.2658516764640808,
-0.3265286982059479,
-0.07175727933645248,
0.3868672549724579,
0.35054296255111694,
0.23275326192378998,
-0.06570490449666977,
0.3316188454627991,
-0.11357589811086655,
0.16112524271011353,
0.15440873801708221,
0.6480081677436829,
0.16818565130233765,
-0.33079707622528076,
-0.08700794726610184,
-0.25823602080345154,
0.21284832060337067,
0.04614844173192978,
0.19675926864147186,
0.36637720465660095,
-0.16410669684410095,
-0.2140880972146988,
0.017132144421339035,
0.15989239513874054,
0.02209056168794632,
0.12286680936813354,
-0.13122931122779846,
-0.07376495748758316,
0.34521788358688354,
0.270672470331192,
-0.1860552728176117,
0.07083354890346527,
-0.12007568776607513,
-0.15459755063056946,
0.13214769959449768,
-0.10386517643928528,
0.8310320377349854,
0.29032227396965027,
0.1322762817144394,
-0.01483638770878315,
-0.03490818291902542,
0.3216668963432312,
0.03444989025592804,
-0.10146361589431763,
-0.02370312437415123,
-0.4091213345527649,
-0.03318881615996361,
0.08174880594015121,
-0.043290041387081146,
0.30447086691856384,
-0.2390456348657608,
0.24454762041568756,
-0.10530257970094681,
0.297493040561676,
-0.08324581384658813,
0.06906206905841827,
0.035674307495355606,
0.1304890513420105,
-0.24207529425621033,
0.21447083353996277,
-0.018097342923283577,
-0.1599845439195633,
-0.016698744148015976,
-0.05517417564988136,
-0.21138226985931396,
0.1015533059835434,
0.13064415752887726,
0.17920956015586853,
0.030383359640836716,
0.22532975673675537,
-0.16262638568878174,
-0.33581265807151794,
-0.16206896305084229,
-0.1527184396982193,
0.11099154502153397,
-0.07379337400197983,
-0.08267628401517868,
0.07731983065605164,
0.05915374681353569,
0.029744775965809822,
-0.2090817391872406,
-0.2106129378080368,
0.2774158716201782,
-0.17896680533885956,
-0.10231718420982361,
0.30562564730644226,
0.3774552047252655,
-0.13290204107761383,
-0.1182708814740181,
-0.07010119408369064,
0.06486482173204422,
-0.3793976902961731,
-0.4989517629146576,
0.47239285707473755,
0.24711182713508606,
-0.30424293875694275,
0.19545522332191467,
-0.06805940717458725,
-0.14014114439487457,
0.14643502235412598,
0.05232570692896843,
-0.08681531250476837,
-0.20789596438407898,
-0.044046539813280106,
0.332665354013443,
-0.04536521062254906,
0.3116227984428406,
-0.21104001998901367,
0.2415158450603485,
-0.15410487353801727,
-0.06622374057769775,
0.4210777282714844,
-0.2547180652618408,
0.0013096054317429662,
-0.34493690729141235,
-0.20139387249946594,
-0.006350833456963301,
0.14729882776737213,
0.36569732427597046,
0.43683767318725586,
0.24385692179203033,
-0.14858834445476532,
-0.27610474824905396,
0.12422988563776016,
0.29042014479637146,
0.29927918314933777,
0.019640633836388588,
0.2721247673034668,
-0.34991079568862915,
0.5197777152061462,
-0.4799988567829132,
-0.06380416452884674,
0.17973263561725616,
0.28990259766578674,
0.2655158042907715,
-0.02633606269955635,
-0.1870851069688797,
0.05439115688204765,
0.29827743768692017,
-0.13901455700397491,
-0.026669908314943314,
-0.3961170017719269,
-0.12181421369314194,
0.0013189835008233786,
-0.014423241838812828,
-0.006558011285960674,
-0.11136114597320557,
-0.03759191557765007,
0.1738034337759018,
-0.00021371725597418845,
0.22706957161426544,
-0.027404706925153732,
0.06114358454942703,
-0.16919860243797302,
-0.03083484061062336,
-0.24814094603061676,
-0.2379620224237442,
0.14925530552864075,
0.09419070184230804,
-0.11246389895677567,
0.10603859275579453,
0.029523268342018127,
0.027890386059880257,
-0.1285046637058258,
0.04622046276926994,
-0.04665253683924675,
0.33047157526016235,
-0.11510687321424484,
-0.012253467924892902,
0.182003453373909,
-0.15609470009803772,
0.3014000654220581,
0.008000281639397144,
0.16350550949573517,
-0.08346360921859741,
0.14726966619491577,
0.025183899328112602,
0.38243600726127625,
-0.4267635643482208,
-0.12652085721492767,
0.2771318554878235,
-0.22195620834827423,
0.2187446802854538,
0.07701095193624496,
0.09025824815034866,
0.20339320600032806,
-0.026814155280590057,
0.11146369576454163,
-0.028652502223849297,
-0.01095880102366209,
0.21294552087783813,
0.3458215892314911,
0.06682397425174713,
-0.10793191939592361,
0.08019498735666275,
0.29594549536705017,
0.18198677897453308,
0.10723855346441269,
0.05562969669699669,
0.15106995403766632,
-0.006803583819419146,
-0.18034857511520386,
0.3268214464187622,
-0.04331560060381889,
0.19160547852516174,
0.24346387386322021,
0.020440315827727318,
0.268881618976593,
0.25265493988990784,
0.014512397348880768,
0.07947084307670593,
-0.2774944603443146,
0.13070888817310333,
0.31057223677635193,
-0.02180020697414875,
-0.012141391634941101,
-0.05775488540530205,
-0.3097952604293823,
-0.16942644119262695,
-0.07712182402610779,
0.09380162507295609,
-0.32521992921829224,
0.36062702536582947,
-0.1307452768087387,
-0.08979412913322449,
-0.01029543299227953,
0.45648059248924255,
0.27324533462524414,
-0.12337618321180344,
-0.12995511293411255,
0.058167457580566406,
0.358659565448761,
-0.3728831112384796,
0.34991803765296936,
0.3002063035964966,
0.17844752967357635,
-0.09995456039905548,
0.0094857607036829,
0.1112959235906601,
0.13758420944213867,
-0.22323089838027954,
-0.1820925772190094,
-0.3922780752182007,
0.16516287624835968,
-0.14564503729343414,
0.3084160089492798,
0.34483596682548523,
-0.2604697048664093,
0.03323100134730339,
-0.11831570416688919,
-0.0009052189998328686,
-0.48394474387168884,
0.1588519960641861,
0.309297651052475,
-0.23405621945858002,
0.04115000367164612,
-0.15612491965293884,
-0.16650639474391937,
-0.4548801779747009,
0.3552609086036682,
-0.03573359176516533,
0.06378200650215149,
0.020174618810415268,
0.19189000129699707,
-0.06206332892179489,
0.04971158877015114,
0.1551385521888733,
-0.006443031597882509,
-0.007333976682275534,
-0.05207885801792145,
-0.5609641671180725,
0.17153455317020416,
0.1861509531736374,
-0.17294365167617798,
-0.1564740687608719,
0.2217227816581726,
0.30786260962486267,
0.11493510007858276,
0.19961458444595337,
-0.0572698712348938,
0.36837485432624817,
-0.05466320365667343,
-0.33345797657966614,
-0.3152957558631897,
0.10074406117200851,
0.05872036889195442,
0.2037173956632614,
-0.1317676454782486,
0.052913665771484375,
0.05913154035806656,
0.22800539433956146,
-0.016831781715154648,
-0.28744927048683167,
0.0916849672794342,
-0.097201868891716,
0.3195531666278839,
-0.0037813305389136076,
0.47932326793670654,
-0.4596426486968994,
-0.11122103780508041,
0.22416642308235168,
0.029705338180065155,
-0.39312317967414856,
0.13914282619953156,
0.20229990780353546,
0.23964232206344604,
-0.42152032256126404,
0.3640066683292389,
0.22365665435791016,
0.03928500786423683,
0.029672179371118546,
-0.1164160668849945,
-0.06307095289230347,
0.2674342393875122,
0.05218106880784035,
0.12291581928730011,
0.04107920825481415,
0.3605143427848816,
0.00016879830218385905,
0.2605215311050415,
0.04985687881708145,
-0.21305319666862488,
0.26114901900291443,
0.3280121982097626,
-0.3961384892463684,
-0.34975582361221313,
-0.13145042955875397,
0.12374700605869293,
0.11836697161197662,
-0.3457566499710083,
-0.031002851203083992,
0.30193614959716797,
-0.14742454886436462,
0.29628127813339233,
0.3962268829345703,
-0.10552653670310974,
-0.052123650908470154,
-0.04476558044552803,
0.39276763796806335,
0.05424197390675545,
-0.3952913284301758,
-0.10591242462396622,
-0.25733232498168945
] |
https://github.com/huggingface/datasets/issues/1769
|
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
|
Hi ! What version of python and datasets do you have ? And also what version of dill and pickle ?
|
It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine.
The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py
Script args:
```
--model_name_or_path
../../../model/chinese-roberta-wwm-ext
--train_file
/nfs/volume-377-2/bert/data/test/train.txt
--output_dir
test
--do_train
--per_device_train_batch_size
2
--gradient_accumulation_steps
2
--learning_rate
1e-4
--max_steps
1000
--warmup_steps
10
--save_steps
1000
--save_total_limit
1
--seed
23333
--max_seq_length
512
--preprocessing_num_workers
2
--cache_dir
/nfs/volume-377-2/bert/data/test/cache
```
Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily.
Full Traceback:
```
Traceback (most recent call last):
File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module>
main()
File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main
load_from_cache_file=not data_args.overwrite_cache,
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map
for k, dataset in self.items()
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp>
for k, dataset in self.items()
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map
transformed_shards = [r.get() for r in results]
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp>
transformed_shards = [r.get() for r in results]
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get
raise self._value
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks
put(task)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps
cls(buf, protocol, *args, **kwds).dump(obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump
StockPickler.dump(self, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump
self.save(obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function
obj.__dict__, fkwdefaults), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell
pickler.save_reduce(_create_cell, (f,), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce
save(cls)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type
obj.__bases__, _dict), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save
self.save_global(obj, rv)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union
```
| 21 |
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
|
[
-0.24328318238258362,
-0.2521240711212158,
-0.06295328587293625,
0.11670743674039841,
0.13476493954658508,
0.08673429489135742,
0.11687310039997101,
0.36929506063461304,
0.4371505379676819,
0.19875021278858185,
0.07447007298469543,
0.5431944727897644,
-0.20622162520885468,
0.473177433013916,
-0.12875506281852722,
-0.05539186671376228,
-0.004772003274410963,
0.14674556255340576,
-0.3616941571235657,
0.05995016172528267,
-0.2253720611333847,
0.25285112857818604,
-0.2905494272708893,
0.20573757588863373,
-0.19694900512695312,
-0.1718418300151825,
0.07260162383317947,
0.2746224105358124,
-0.19383911788463593,
-0.1568383425474167,
0.19238890707492828,
-0.1471198946237564,
0.07686152309179306,
0.29000502824783325,
-0.00010078064951812848,
0.07154834270477295,
0.09248694777488708,
0.001890173414722085,
-0.15239903330802917,
-0.31859806180000305,
-0.15676966309547424,
-0.0034667211584746838,
0.11613026261329651,
-0.07562070339918137,
-0.05256505683064461,
-0.13911262154579163,
0.09823135286569595,
-0.2456597536802292,
0.08603473752737045,
0.20366701483726501,
0.28007271885871887,
0.37415027618408203,
0.2380174845457077,
-0.34933674335479736,
0.0006107690860517323,
0.14569950103759766,
0.01964247040450573,
0.1813906878232956,
-0.015451705083251,
0.04889382794499397,
0.022279703989624977,
0.1940242052078247,
-0.053527045994997025,
0.11346211284399033,
-0.1305631548166275,
0.12147703766822815,
-0.0913761630654335,
-0.16527016460895538,
0.19158583879470825,
0.10139431059360504,
0.3121623694896698,
-0.20303544402122498,
-0.15972736477851868,
0.1750127375125885,
-0.1616382598876953,
-0.03348063677549362,
-0.021754536777734756,
-0.03727541118860245,
0.0061222855001688,
0.1257304847240448,
-0.06545522063970566,
-0.07162688672542572,
0.07489489763975143,
0.18904531002044678,
0.23007342219352722,
0.06944648921489716,
-0.0509730763733387,
0.32777073979377747,
0.27606263756752014,
-0.3747231364250183,
-0.31132352352142334,
0.028220588341355324,
-0.09405066072940826,
0.08262934535741806,
0.17801053822040558,
-0.2592100203037262,
0.23640112578868866,
-0.0023698622826486826,
0.2577170431613922,
-0.032131440937519073,
-0.10685989260673523,
0.31846755743026733,
-0.28451621532440186,
0.49622195959091187,
0.4605174958705902,
-0.44776836037635803,
0.22164055705070496,
0.47878775000572205,
0.22643640637397766,
-0.05890163406729698,
-0.17046155035495758,
0.04884953796863556,
0.23920342326164246,
-0.4236569106578827,
-0.009511805139482021,
0.06384976208209991,
0.2430305778980255,
-0.26524755358695984,
0.07246968895196915,
-0.05919661000370979,
-0.15602123737335205,
0.005445423070341349,
0.05044805631041527,
0.3162976801395416,
0.07382913678884506,
0.015945948660373688,
-0.07145760953426361,
0.2107403427362442,
-0.38889628648757935,
-0.1341734081506729,
-0.4586257040500641,
0.28511112928390503,
-0.04260159656405449,
-0.11034776270389557,
0.07181103527545929,
0.0971841961145401,
0.352264404296875,
0.0856233686208725,
-0.07310579717159271,
0.1677902489900589,
0.1951274424791336,
-0.16790468990802765,
-0.20009233057498932,
0.2685718536376953,
0.1903509795665741,
0.10226738452911377,
0.3608374297618866,
-0.3984053134918213,
-0.17340660095214844,
0.019834116101264954,
-0.22950752079486847,
-0.1967293620109558,
-0.25860464572906494,
0.23078255355358124,
0.010486832819879055,
0.07171335071325302,
-0.395647257566452,
0.08084486424922943,
0.24183478951454163,
-0.4011424481868744,
-0.3584900498390198,
-0.2544192969799042,
-0.21151401102542877,
-0.3515627086162567,
-0.05450015515089035,
0.19000473618507385,
-0.2498675435781479,
0.05829792469739914,
0.13506948947906494,
-0.23645563423633575,
0.40064242482185364,
0.2925976514816284,
-0.14184442162513733,
-0.23656775057315826,
-0.17190693318843842,
0.6741386651992798,
0.3201266825199127,
0.2056453675031662,
-0.2629266083240509,
0.08004146814346313,
0.027162136510014534,
-0.4816073775291443,
-0.15789897739887238,
-0.08060460537672043,
-0.28101807832717896,
0.13043849170207977,
0.32755351066589355,
-0.028523791581392288,
-0.05107589438557625,
0.10207764804363251,
-0.3011961281299591,
-0.005109692923724651,
0.14386896789073944,
-0.058311112225055695,
-0.028717072680592537,
-0.09378503262996674,
0.1352042257785797,
-0.3168739378452301,
0.0967818945646286,
-0.06311654299497604,
0.031387172639369965,
-0.06272825598716736,
0.29563236236572266,
-0.25079694390296936,
-0.13413551449775696,
-0.25260525941848755,
-0.4131522476673126,
0.0606844425201416,
-0.11151637881994247,
0.16332507133483887,
-0.10614797472953796,
-0.04923116788268089,
-0.1619928628206253,
-0.03066311962902546,
-0.10720951855182648,
0.13586732745170593,
0.18941889703273773,
-0.06994708627462387,
0.06076082959771156,
0.05581659451127052,
-0.11353056132793427,
-0.31493133306503296,
-0.06815917044878006,
0.00019796451670117676,
-0.3065178692340851,
0.09310420602560043,
-0.3485201597213745,
-0.3905983567237854,
-0.16573338210582733,
0.008545633405447006,
0.13264909386634827,
-0.02136373333632946,
0.003672179765999317,
0.22356410324573517,
0.21577604115009308,
-0.18008995056152344,
0.16547231376171112,
-0.09355156123638153,
-0.14355596899986267,
-0.1506396383047104,
-0.0632203221321106,
0.03836153447628021,
0.15810133516788483,
-0.1865820735692978,
-0.29843607544898987,
0.37902799248695374,
-0.0034135428722947836,
0.050084471702575684,
0.06359869241714478,
0.17891767621040344,
0.22764089703559875,
0.2775956094264984,
0.08004513382911682,
-0.2619229853153229,
-0.15464714169502258,
0.15727046132087708,
0.06000798940658569,
0.08183862268924713,
-0.36376139521598816,
0.16681785881519318,
0.39141252636909485,
0.2602423429489136,
0.34007206559181213,
0.029102973639965057,
0.0050943163223564625,
-0.19167853891849518,
0.021440695971250534,
0.0235100407153368,
0.5614761114120483,
0.29083096981048584,
0.0923164114356041,
-0.04794947803020477,
-0.1459096074104309,
-0.02735050581395626,
-0.002494738670065999,
-0.07719708234071732,
-0.10269298404455185,
0.020724300295114517,
0.12621840834617615,
-0.1836024820804596,
-0.2781868577003479,
-0.021756352856755257,
-0.03437577933073044,
0.34794655442237854,
-0.28722211718559265,
-0.11851746588945389,
-0.3512985110282898,
0.3154894709587097,
-0.017756616696715355,
0.05608508735895157,
0.04363646358251572,
-0.3765247166156769,
-0.0677269697189331,
0.32354116439819336,
-0.21532952785491943,
0.13333460688591003,
-0.031923819333314896,
-0.3184995651245117,
-0.0020396921318024397,
0.11030365526676178,
0.16277283430099487,
-0.15291689336299896,
-0.15886671841144562,
0.16050244867801666,
0.21521617472171783,
-0.037426725029945374,
0.2420472949743271,
0.17044928669929504,
-0.08614319562911987,
-0.20312435925006866,
-0.1333467960357666,
-0.03822861611843109,
-0.06881049275398254,
0.05723750591278076,
0.4949072599411011,
0.4219384789466858,
-0.19989831745624542,
-0.22492030262947083,
0.3538709282875061,
-0.09487168490886688,
-0.2915084958076477,
0.03470167890191078,
0.11718400567770004,
-0.08295251429080963,
-0.25930842757225037,
-0.4624432325363159,
-0.3958483040332794,
-0.3335005044937134,
0.3106440305709839,
0.24697180092334747,
0.2025185227394104,
0.14123159646987915,
0.344930499792099,
0.26710444688796997,
0.12364756315946579,
-0.16480037569999695,
-0.34106799960136414,
-0.09135912358760834,
0.2210744470357895,
-0.13063959777355194,
-0.25263839960098267,
0.0388399213552475,
-0.19997268915176392,
-0.014056277461349964,
-0.12413236498832703,
-0.06778708100318909,
-0.028600972145795822,
-0.21295568346977234,
0.3509705364704132,
0.07087472826242447,
0.12034285068511963,
0.4939345419406891,
0.45329880714416504,
-0.24437150359153748,
-0.06528070569038391,
-0.2202238142490387,
0.2077006697654724,
0.27259311079978943,
0.11093885451555252,
-0.01817377470433712,
0.15300698578357697,
-0.05626269802451134,
0.5747671127319336,
0.23123221099376678,
-0.27352917194366455,
0.37960487604141235,
-0.1292588859796524,
-0.015886515378952026,
-0.14051179587841034,
-0.24336358904838562,
-0.07594766467809677,
-0.010970570147037506,
0.0818859189748764,
0.04935174807906151,
-0.1308242529630661,
-0.18744449317455292,
-0.044782646000385284,
0.0915599837899208,
-0.14647965133190155,
-0.14085595309734344,
0.19733299314975739,
0.14332593977451324,
-0.23950210213661194,
0.03219342604279518,
0.018501078709959984,
-0.28928080201148987,
0.1478041559457779,
-0.20590227842330933,
-0.1159520372748375,
-0.013466584496200085,
0.027120739221572876,
-0.37134459614753723,
-0.27662962675094604,
-0.3715657889842987,
0.5373373031616211,
0.061932437121868134,
0.11786554753780365,
-0.1684655398130417,
-0.25085580348968506,
-0.1990862339735031,
0.014112021774053574,
0.6050212383270264,
-0.45038148760795593,
0.0006533595151267946,
0.25469836592674255,
-0.020894592627882957,
-0.18602006137371063,
-0.0965578630566597,
-0.042977042496204376,
0.5932420492172241,
-0.07155127078294754,
0.5616303086280823,
-0.22078336775302887,
0.006763790734112263,
0.3945915699005127,
-0.05412508547306061,
-0.04612535610795021,
-0.01932361349463463,
-0.2135094553232193,
-0.30974116921424866,
-0.19370445609092712,
-0.09486089646816254,
0.09677625447511673,
0.1770215481519699,
0.04116244614124298,
-0.09291777014732361,
-0.12234953790903091,
-0.16809068620204926,
0.14984679222106934,
0.09235271066427231,
0.3442791700363159,
0.054297562688589096,
-0.011972033418715,
0.06296402961015701,
0.058879315853118896,
0.2207644283771515,
0.3055661916732788,
-0.1719800978899002,
-0.02045181766152382,
0.23003558814525604,
-0.27061763405799866,
0.37560030817985535,
-0.18457487225532532,
-0.03263825178146362,
0.16509947180747986,
-0.03275863826274872,
0.24695613980293274,
0.04089773818850517,
0.2143666297197342,
0.21010595560073853,
0.04602710157632828,
-0.21659111976623535,
-0.48478174209594727,
0.38965532183647156,
0.21693527698516846,
0.0635237768292427,
0.3109143078327179,
-0.21370720863342285,
-0.12036676704883575,
0.21966461837291718,
-0.1193670928478241,
0.6887012720108032,
-0.05627342686057091,
-0.0029128941241651773,
0.14763014018535614,
0.1310507357120514,
0.37356096506118774,
0.17992816865444183,
-0.10135060548782349,
-0.4251553416252136,
-0.03872621804475784,
-0.06437709182500839,
-0.25953561067581177,
0.11578402668237686,
0.1736132800579071,
-0.5594596266746521,
0.3400518298149109,
-0.3066035509109497,
-0.12327351421117783,
-0.11626862734556198,
0.05106461048126221,
0.18231362104415894,
-0.014075059443712234,
-0.004294063895940781,
0.27199554443359375,
-0.19164186716079712,
0.06902077049016953,
0.027385646477341652,
0.002136894501745701,
-0.050999004393815994,
-0.3749769330024719,
-0.21347782015800476,
-0.02896488830447197,
0.046018801629543304,
0.5990408062934875,
0.1985769271850586,
0.005482272244989872,
0.04980393871665001,
0.3023568093776703,
-0.14896458387374878,
0.17630629241466522,
-0.06555012613534927,
-0.12257906049489975,
0.2631206810474396,
-0.06377572566270828,
-0.10119649767875671,
0.16613826155662537,
0.2844931483268738,
0.07302713394165039,
-0.19839024543762207,
0.04155311733484268,
-0.025632744655013084,
-0.0025195362977683544,
-0.2755092978477478,
0.15333794057369232,
-0.05741596966981888,
-0.5459537506103516,
-0.5358964800834656,
0.023295938968658447,
-0.2853160798549652,
-0.27060258388519287,
0.17990513145923615,
0.11081045866012573,
-0.2378847748041153,
0.26095476746559143,
0.34497153759002686,
-0.2529131770133972,
0.09048695117235184,
0.4761991500854492,
0.006001295056194067,
0.42946770787239075,
0.5332821011543274,
0.13871517777442932,
-0.2491176724433899,
-0.3010866641998291,
0.0590464286506176,
0.15865403413772583,
-0.0953374132514,
0.3127312958240509,
0.1490204930305481,
-0.16551223397254944,
0.04993224889039993,
0.3847607374191284,
-0.020577101036906242,
0.20479553937911987,
0.03319903463125229,
-0.2397812306880951,
-0.4093632400035858,
0.169352188706398,
-0.07022812217473984,
0.1279086172580719,
0.09385403245687485,
0.2599654495716095,
-0.019610978662967682,
0.05747023969888687,
-0.4075036346912384,
0.13859157264232635,
-0.45907503366470337,
0.16178950667381287,
0.02058779075741768,
-0.10066289454698563,
-0.01921507716178894,
-0.03587372973561287,
0.30859845876693726,
0.16281236708164215,
-0.28137415647506714,
-0.3249379098415375,
-0.0039338236674666405,
0.026316581293940544,
-0.048893626779317856,
0.08326352387666702,
0.09118809551000595,
0.13615287840366364,
-0.14450165629386902,
-0.04173858463764191,
-0.16280753910541534,
0.09647686779499054,
-0.0192163847386837,
0.20546407997608185,
0.3471072018146515,
0.01697760634124279,
0.14846284687519073,
0.1751892864704132,
-0.24249882996082306,
-0.008751925081014633,
-0.04879379644989967,
-0.05574809014797211,
0.017426790669560432,
-0.1618986874818802,
0.32769906520843506,
-0.08480672538280487,
0.05181610956788063,
0.0038386655505746603,
-0.04337169975042343,
-0.36478984355926514,
-0.03655817359685898,
-0.03710786625742912,
0.4657752513885498,
0.13596443831920624,
-0.05518912523984909,
0.15023617446422577,
0.05222666636109352,
0.34033894538879395,
-0.47615736722946167,
0.04126589745283127,
0.44900190830230713,
0.2203119993209839,
0.15634675323963165,
0.08942335844039917,
-0.329068124294281,
0.13965556025505066,
-0.34387046098709106,
0.055591680109500885,
0.08423861861228943,
-0.27135488390922546,
0.05482754111289978,
0.16034777462482452,
-0.26129385828971863,
-0.15663175284862518,
0.25028374791145325,
0.20038968324661255,
0.2770281732082367,
0.11875063180923462,
-0.1751134842634201,
0.17631877958774567,
-0.08771353214979172,
-0.012038766406476498,
-0.015657158568501472,
-0.6411097645759583,
0.4712488055229187,
0.5566560626029968,
0.08718341588973999,
0.09696458280086517,
0.22053313255310059,
0.5824393033981323,
-0.43171989917755127,
-0.17969340085983276,
-0.009391353465616703,
0.07910442352294922,
-0.3124837875366211,
-0.31953269243240356,
-0.021576814353466034,
-0.16361309587955475,
-0.20004110038280487,
-0.06149876490235329,
-0.02758338302373886,
-0.035465262830257416,
0.3490246534347534,
-0.038005247712135315,
0.08569911867380142,
-0.3156876266002655,
0.04191557317972183,
-0.027999555692076683,
-0.029020046815276146,
-0.18808351457118988,
0.01132950745522976,
0.1332421749830246,
-0.05341431125998497,
-0.10531994700431824,
0.11489693075418472,
0.504362940788269,
0.2755245864391327,
-0.41975802183151245,
0.0038683093152940273,
-0.08698232471942902,
-0.15316028892993927,
-0.009394350461661816,
0.012368487194180489,
0.02112092822790146,
0.05349436402320862,
0.2528873085975647,
0.2543772757053375,
-0.23515862226486206,
0.0654178038239479,
0.19072581827640533,
0.3867330849170685,
0.026919906958937645,
0.1103711649775505,
-0.07351680845022202,
-0.3447273373603821,
0.0658998116850853,
-0.09444224089384079,
-0.3260602355003357,
-0.1830117404460907,
0.17225071787834167,
-0.1271662414073944,
0.35463011264801025,
-0.029213428497314453,
0.15265007317066193,
0.1005159541964531,
0.5375449657440186,
-0.025143632665276527,
0.0615735799074173,
-0.3982807993888855,
0.0643315240740776,
-0.39072272181510925,
0.016019972041249275,
-0.15668196976184845,
-0.12128311395645142,
-0.2525269687175751,
0.36229395866394043,
0.3500153124332428,
0.021632490679621696,
0.017140885815024376,
0.3535284399986267,
0.12850721180438995,
0.34496361017227173,
-0.14862525463104248,
-0.10955929011106491,
-0.14529789984226227,
-0.3055037558078766,
0.26828548312187195,
-0.3418844938278198,
-0.008425263687968254,
-0.049938153475522995,
0.2562420964241028,
-0.29346510767936707,
-0.06382191926240921,
0.05585198476910591,
0.1688101887702942,
0.11366355419158936,
0.12162183225154877,
0.5605748891830444,
-0.16176466643810272,
0.057110801339149475,
0.1759609878063202,
-0.3675444722175598,
-0.20317049324512482,
0.28185948729515076,
0.06277074664831161,
0.36050844192504883,
-0.18981517851352692,
0.3087814152240753,
-0.2180841714143753,
0.14702150225639343,
0.020081371068954468,
0.07642485201358795,
-0.16526049375534058,
0.21555787324905396,
0.1454387903213501,
-0.33661964535713196,
-0.27259090542793274,
0.11019669473171234,
-0.04245539754629135,
0.051572754979133606,
0.10242335498332977,
-0.44260287284851074,
0.6927388906478882,
-0.09319180995225906,
-0.25702428817749023,
-0.19640161097049713,
-0.05326017737388611,
-0.08087652921676636,
-0.22580887377262115,
-0.35047417879104614,
0.05133056640625,
0.23777300119400024,
-0.04414578527212143,
-0.22937628626823425,
0.17009781301021576,
-0.07201024144887924,
-0.11371434479951859,
-0.09102144837379456,
0.586930513381958,
-0.00039035719237290323,
-0.03357234597206116,
0.15138748288154602,
-0.24820564687252045
] |
https://github.com/huggingface/datasets/issues/1769
|
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
|
> Hi ! What version of python and datasets do you have ? And also what version of dill and pickle ?
python==3.6.10
datasets==1.2.1
dill==0.3.2
pickle.format_version==4.0
|
It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine.
The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py
Script args:
```
--model_name_or_path
../../../model/chinese-roberta-wwm-ext
--train_file
/nfs/volume-377-2/bert/data/test/train.txt
--output_dir
test
--do_train
--per_device_train_batch_size
2
--gradient_accumulation_steps
2
--learning_rate
1e-4
--max_steps
1000
--warmup_steps
10
--save_steps
1000
--save_total_limit
1
--seed
23333
--max_seq_length
512
--preprocessing_num_workers
2
--cache_dir
/nfs/volume-377-2/bert/data/test/cache
```
Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily.
Full Traceback:
```
Traceback (most recent call last):
File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module>
main()
File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main
load_from_cache_file=not data_args.overwrite_cache,
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map
for k, dataset in self.items()
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp>
for k, dataset in self.items()
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map
transformed_shards = [r.get() for r in results]
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp>
transformed_shards = [r.get() for r in results]
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get
raise self._value
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks
put(task)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps
cls(buf, protocol, *args, **kwds).dump(obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump
StockPickler.dump(self, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump
self.save(obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function
obj.__dict__, fkwdefaults), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell
pickler.save_reduce(_create_cell, (f,), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce
save(cls)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type
obj.__bases__, _dict), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save
self.save_global(obj, rv)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union
```
| 26 |
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
|
[
-0.24328318238258362,
-0.2521240711212158,
-0.06295328587293625,
0.11670743674039841,
0.13476493954658508,
0.08673429489135742,
0.11687310039997101,
0.36929506063461304,
0.4371505379676819,
0.19875021278858185,
0.07447007298469543,
0.5431944727897644,
-0.20622162520885468,
0.473177433013916,
-0.12875506281852722,
-0.05539186671376228,
-0.004772003274410963,
0.14674556255340576,
-0.3616941571235657,
0.05995016172528267,
-0.2253720611333847,
0.25285112857818604,
-0.2905494272708893,
0.20573757588863373,
-0.19694900512695312,
-0.1718418300151825,
0.07260162383317947,
0.2746224105358124,
-0.19383911788463593,
-0.1568383425474167,
0.19238890707492828,
-0.1471198946237564,
0.07686152309179306,
0.29000502824783325,
-0.00010078064951812848,
0.07154834270477295,
0.09248694777488708,
0.001890173414722085,
-0.15239903330802917,
-0.31859806180000305,
-0.15676966309547424,
-0.0034667211584746838,
0.11613026261329651,
-0.07562070339918137,
-0.05256505683064461,
-0.13911262154579163,
0.09823135286569595,
-0.2456597536802292,
0.08603473752737045,
0.20366701483726501,
0.28007271885871887,
0.37415027618408203,
0.2380174845457077,
-0.34933674335479736,
0.0006107690860517323,
0.14569950103759766,
0.01964247040450573,
0.1813906878232956,
-0.015451705083251,
0.04889382794499397,
0.022279703989624977,
0.1940242052078247,
-0.053527045994997025,
0.11346211284399033,
-0.1305631548166275,
0.12147703766822815,
-0.0913761630654335,
-0.16527016460895538,
0.19158583879470825,
0.10139431059360504,
0.3121623694896698,
-0.20303544402122498,
-0.15972736477851868,
0.1750127375125885,
-0.1616382598876953,
-0.03348063677549362,
-0.021754536777734756,
-0.03727541118860245,
0.0061222855001688,
0.1257304847240448,
-0.06545522063970566,
-0.07162688672542572,
0.07489489763975143,
0.18904531002044678,
0.23007342219352722,
0.06944648921489716,
-0.0509730763733387,
0.32777073979377747,
0.27606263756752014,
-0.3747231364250183,
-0.31132352352142334,
0.028220588341355324,
-0.09405066072940826,
0.08262934535741806,
0.17801053822040558,
-0.2592100203037262,
0.23640112578868866,
-0.0023698622826486826,
0.2577170431613922,
-0.032131440937519073,
-0.10685989260673523,
0.31846755743026733,
-0.28451621532440186,
0.49622195959091187,
0.4605174958705902,
-0.44776836037635803,
0.22164055705070496,
0.47878775000572205,
0.22643640637397766,
-0.05890163406729698,
-0.17046155035495758,
0.04884953796863556,
0.23920342326164246,
-0.4236569106578827,
-0.009511805139482021,
0.06384976208209991,
0.2430305778980255,
-0.26524755358695984,
0.07246968895196915,
-0.05919661000370979,
-0.15602123737335205,
0.005445423070341349,
0.05044805631041527,
0.3162976801395416,
0.07382913678884506,
0.015945948660373688,
-0.07145760953426361,
0.2107403427362442,
-0.38889628648757935,
-0.1341734081506729,
-0.4586257040500641,
0.28511112928390503,
-0.04260159656405449,
-0.11034776270389557,
0.07181103527545929,
0.0971841961145401,
0.352264404296875,
0.0856233686208725,
-0.07310579717159271,
0.1677902489900589,
0.1951274424791336,
-0.16790468990802765,
-0.20009233057498932,
0.2685718536376953,
0.1903509795665741,
0.10226738452911377,
0.3608374297618866,
-0.3984053134918213,
-0.17340660095214844,
0.019834116101264954,
-0.22950752079486847,
-0.1967293620109558,
-0.25860464572906494,
0.23078255355358124,
0.010486832819879055,
0.07171335071325302,
-0.395647257566452,
0.08084486424922943,
0.24183478951454163,
-0.4011424481868744,
-0.3584900498390198,
-0.2544192969799042,
-0.21151401102542877,
-0.3515627086162567,
-0.05450015515089035,
0.19000473618507385,
-0.2498675435781479,
0.05829792469739914,
0.13506948947906494,
-0.23645563423633575,
0.40064242482185364,
0.2925976514816284,
-0.14184442162513733,
-0.23656775057315826,
-0.17190693318843842,
0.6741386651992798,
0.3201266825199127,
0.2056453675031662,
-0.2629266083240509,
0.08004146814346313,
0.027162136510014534,
-0.4816073775291443,
-0.15789897739887238,
-0.08060460537672043,
-0.28101807832717896,
0.13043849170207977,
0.32755351066589355,
-0.028523791581392288,
-0.05107589438557625,
0.10207764804363251,
-0.3011961281299591,
-0.005109692923724651,
0.14386896789073944,
-0.058311112225055695,
-0.028717072680592537,
-0.09378503262996674,
0.1352042257785797,
-0.3168739378452301,
0.0967818945646286,
-0.06311654299497604,
0.031387172639369965,
-0.06272825598716736,
0.29563236236572266,
-0.25079694390296936,
-0.13413551449775696,
-0.25260525941848755,
-0.4131522476673126,
0.0606844425201416,
-0.11151637881994247,
0.16332507133483887,
-0.10614797472953796,
-0.04923116788268089,
-0.1619928628206253,
-0.03066311962902546,
-0.10720951855182648,
0.13586732745170593,
0.18941889703273773,
-0.06994708627462387,
0.06076082959771156,
0.05581659451127052,
-0.11353056132793427,
-0.31493133306503296,
-0.06815917044878006,
0.00019796451670117676,
-0.3065178692340851,
0.09310420602560043,
-0.3485201597213745,
-0.3905983567237854,
-0.16573338210582733,
0.008545633405447006,
0.13264909386634827,
-0.02136373333632946,
0.003672179765999317,
0.22356410324573517,
0.21577604115009308,
-0.18008995056152344,
0.16547231376171112,
-0.09355156123638153,
-0.14355596899986267,
-0.1506396383047104,
-0.0632203221321106,
0.03836153447628021,
0.15810133516788483,
-0.1865820735692978,
-0.29843607544898987,
0.37902799248695374,
-0.0034135428722947836,
0.050084471702575684,
0.06359869241714478,
0.17891767621040344,
0.22764089703559875,
0.2775956094264984,
0.08004513382911682,
-0.2619229853153229,
-0.15464714169502258,
0.15727046132087708,
0.06000798940658569,
0.08183862268924713,
-0.36376139521598816,
0.16681785881519318,
0.39141252636909485,
0.2602423429489136,
0.34007206559181213,
0.029102973639965057,
0.0050943163223564625,
-0.19167853891849518,
0.021440695971250534,
0.0235100407153368,
0.5614761114120483,
0.29083096981048584,
0.0923164114356041,
-0.04794947803020477,
-0.1459096074104309,
-0.02735050581395626,
-0.002494738670065999,
-0.07719708234071732,
-0.10269298404455185,
0.020724300295114517,
0.12621840834617615,
-0.1836024820804596,
-0.2781868577003479,
-0.021756352856755257,
-0.03437577933073044,
0.34794655442237854,
-0.28722211718559265,
-0.11851746588945389,
-0.3512985110282898,
0.3154894709587097,
-0.017756616696715355,
0.05608508735895157,
0.04363646358251572,
-0.3765247166156769,
-0.0677269697189331,
0.32354116439819336,
-0.21532952785491943,
0.13333460688591003,
-0.031923819333314896,
-0.3184995651245117,
-0.0020396921318024397,
0.11030365526676178,
0.16277283430099487,
-0.15291689336299896,
-0.15886671841144562,
0.16050244867801666,
0.21521617472171783,
-0.037426725029945374,
0.2420472949743271,
0.17044928669929504,
-0.08614319562911987,
-0.20312435925006866,
-0.1333467960357666,
-0.03822861611843109,
-0.06881049275398254,
0.05723750591278076,
0.4949072599411011,
0.4219384789466858,
-0.19989831745624542,
-0.22492030262947083,
0.3538709282875061,
-0.09487168490886688,
-0.2915084958076477,
0.03470167890191078,
0.11718400567770004,
-0.08295251429080963,
-0.25930842757225037,
-0.4624432325363159,
-0.3958483040332794,
-0.3335005044937134,
0.3106440305709839,
0.24697180092334747,
0.2025185227394104,
0.14123159646987915,
0.344930499792099,
0.26710444688796997,
0.12364756315946579,
-0.16480037569999695,
-0.34106799960136414,
-0.09135912358760834,
0.2210744470357895,
-0.13063959777355194,
-0.25263839960098267,
0.0388399213552475,
-0.19997268915176392,
-0.014056277461349964,
-0.12413236498832703,
-0.06778708100318909,
-0.028600972145795822,
-0.21295568346977234,
0.3509705364704132,
0.07087472826242447,
0.12034285068511963,
0.4939345419406891,
0.45329880714416504,
-0.24437150359153748,
-0.06528070569038391,
-0.2202238142490387,
0.2077006697654724,
0.27259311079978943,
0.11093885451555252,
-0.01817377470433712,
0.15300698578357697,
-0.05626269802451134,
0.5747671127319336,
0.23123221099376678,
-0.27352917194366455,
0.37960487604141235,
-0.1292588859796524,
-0.015886515378952026,
-0.14051179587841034,
-0.24336358904838562,
-0.07594766467809677,
-0.010970570147037506,
0.0818859189748764,
0.04935174807906151,
-0.1308242529630661,
-0.18744449317455292,
-0.044782646000385284,
0.0915599837899208,
-0.14647965133190155,
-0.14085595309734344,
0.19733299314975739,
0.14332593977451324,
-0.23950210213661194,
0.03219342604279518,
0.018501078709959984,
-0.28928080201148987,
0.1478041559457779,
-0.20590227842330933,
-0.1159520372748375,
-0.013466584496200085,
0.027120739221572876,
-0.37134459614753723,
-0.27662962675094604,
-0.3715657889842987,
0.5373373031616211,
0.061932437121868134,
0.11786554753780365,
-0.1684655398130417,
-0.25085580348968506,
-0.1990862339735031,
0.014112021774053574,
0.6050212383270264,
-0.45038148760795593,
0.0006533595151267946,
0.25469836592674255,
-0.020894592627882957,
-0.18602006137371063,
-0.0965578630566597,
-0.042977042496204376,
0.5932420492172241,
-0.07155127078294754,
0.5616303086280823,
-0.22078336775302887,
0.006763790734112263,
0.3945915699005127,
-0.05412508547306061,
-0.04612535610795021,
-0.01932361349463463,
-0.2135094553232193,
-0.30974116921424866,
-0.19370445609092712,
-0.09486089646816254,
0.09677625447511673,
0.1770215481519699,
0.04116244614124298,
-0.09291777014732361,
-0.12234953790903091,
-0.16809068620204926,
0.14984679222106934,
0.09235271066427231,
0.3442791700363159,
0.054297562688589096,
-0.011972033418715,
0.06296402961015701,
0.058879315853118896,
0.2207644283771515,
0.3055661916732788,
-0.1719800978899002,
-0.02045181766152382,
0.23003558814525604,
-0.27061763405799866,
0.37560030817985535,
-0.18457487225532532,
-0.03263825178146362,
0.16509947180747986,
-0.03275863826274872,
0.24695613980293274,
0.04089773818850517,
0.2143666297197342,
0.21010595560073853,
0.04602710157632828,
-0.21659111976623535,
-0.48478174209594727,
0.38965532183647156,
0.21693527698516846,
0.0635237768292427,
0.3109143078327179,
-0.21370720863342285,
-0.12036676704883575,
0.21966461837291718,
-0.1193670928478241,
0.6887012720108032,
-0.05627342686057091,
-0.0029128941241651773,
0.14763014018535614,
0.1310507357120514,
0.37356096506118774,
0.17992816865444183,
-0.10135060548782349,
-0.4251553416252136,
-0.03872621804475784,
-0.06437709182500839,
-0.25953561067581177,
0.11578402668237686,
0.1736132800579071,
-0.5594596266746521,
0.3400518298149109,
-0.3066035509109497,
-0.12327351421117783,
-0.11626862734556198,
0.05106461048126221,
0.18231362104415894,
-0.014075059443712234,
-0.004294063895940781,
0.27199554443359375,
-0.19164186716079712,
0.06902077049016953,
0.027385646477341652,
0.002136894501745701,
-0.050999004393815994,
-0.3749769330024719,
-0.21347782015800476,
-0.02896488830447197,
0.046018801629543304,
0.5990408062934875,
0.1985769271850586,
0.005482272244989872,
0.04980393871665001,
0.3023568093776703,
-0.14896458387374878,
0.17630629241466522,
-0.06555012613534927,
-0.12257906049489975,
0.2631206810474396,
-0.06377572566270828,
-0.10119649767875671,
0.16613826155662537,
0.2844931483268738,
0.07302713394165039,
-0.19839024543762207,
0.04155311733484268,
-0.025632744655013084,
-0.0025195362977683544,
-0.2755092978477478,
0.15333794057369232,
-0.05741596966981888,
-0.5459537506103516,
-0.5358964800834656,
0.023295938968658447,
-0.2853160798549652,
-0.27060258388519287,
0.17990513145923615,
0.11081045866012573,
-0.2378847748041153,
0.26095476746559143,
0.34497153759002686,
-0.2529131770133972,
0.09048695117235184,
0.4761991500854492,
0.006001295056194067,
0.42946770787239075,
0.5332821011543274,
0.13871517777442932,
-0.2491176724433899,
-0.3010866641998291,
0.0590464286506176,
0.15865403413772583,
-0.0953374132514,
0.3127312958240509,
0.1490204930305481,
-0.16551223397254944,
0.04993224889039993,
0.3847607374191284,
-0.020577101036906242,
0.20479553937911987,
0.03319903463125229,
-0.2397812306880951,
-0.4093632400035858,
0.169352188706398,
-0.07022812217473984,
0.1279086172580719,
0.09385403245687485,
0.2599654495716095,
-0.019610978662967682,
0.05747023969888687,
-0.4075036346912384,
0.13859157264232635,
-0.45907503366470337,
0.16178950667381287,
0.02058779075741768,
-0.10066289454698563,
-0.01921507716178894,
-0.03587372973561287,
0.30859845876693726,
0.16281236708164215,
-0.28137415647506714,
-0.3249379098415375,
-0.0039338236674666405,
0.026316581293940544,
-0.048893626779317856,
0.08326352387666702,
0.09118809551000595,
0.13615287840366364,
-0.14450165629386902,
-0.04173858463764191,
-0.16280753910541534,
0.09647686779499054,
-0.0192163847386837,
0.20546407997608185,
0.3471072018146515,
0.01697760634124279,
0.14846284687519073,
0.1751892864704132,
-0.24249882996082306,
-0.008751925081014633,
-0.04879379644989967,
-0.05574809014797211,
0.017426790669560432,
-0.1618986874818802,
0.32769906520843506,
-0.08480672538280487,
0.05181610956788063,
0.0038386655505746603,
-0.04337169975042343,
-0.36478984355926514,
-0.03655817359685898,
-0.03710786625742912,
0.4657752513885498,
0.13596443831920624,
-0.05518912523984909,
0.15023617446422577,
0.05222666636109352,
0.34033894538879395,
-0.47615736722946167,
0.04126589745283127,
0.44900190830230713,
0.2203119993209839,
0.15634675323963165,
0.08942335844039917,
-0.329068124294281,
0.13965556025505066,
-0.34387046098709106,
0.055591680109500885,
0.08423861861228943,
-0.27135488390922546,
0.05482754111289978,
0.16034777462482452,
-0.26129385828971863,
-0.15663175284862518,
0.25028374791145325,
0.20038968324661255,
0.2770281732082367,
0.11875063180923462,
-0.1751134842634201,
0.17631877958774567,
-0.08771353214979172,
-0.012038766406476498,
-0.015657158568501472,
-0.6411097645759583,
0.4712488055229187,
0.5566560626029968,
0.08718341588973999,
0.09696458280086517,
0.22053313255310059,
0.5824393033981323,
-0.43171989917755127,
-0.17969340085983276,
-0.009391353465616703,
0.07910442352294922,
-0.3124837875366211,
-0.31953269243240356,
-0.021576814353466034,
-0.16361309587955475,
-0.20004110038280487,
-0.06149876490235329,
-0.02758338302373886,
-0.035465262830257416,
0.3490246534347534,
-0.038005247712135315,
0.08569911867380142,
-0.3156876266002655,
0.04191557317972183,
-0.027999555692076683,
-0.029020046815276146,
-0.18808351457118988,
0.01132950745522976,
0.1332421749830246,
-0.05341431125998497,
-0.10531994700431824,
0.11489693075418472,
0.504362940788269,
0.2755245864391327,
-0.41975802183151245,
0.0038683093152940273,
-0.08698232471942902,
-0.15316028892993927,
-0.009394350461661816,
0.012368487194180489,
0.02112092822790146,
0.05349436402320862,
0.2528873085975647,
0.2543772757053375,
-0.23515862226486206,
0.0654178038239479,
0.19072581827640533,
0.3867330849170685,
0.026919906958937645,
0.1103711649775505,
-0.07351680845022202,
-0.3447273373603821,
0.0658998116850853,
-0.09444224089384079,
-0.3260602355003357,
-0.1830117404460907,
0.17225071787834167,
-0.1271662414073944,
0.35463011264801025,
-0.029213428497314453,
0.15265007317066193,
0.1005159541964531,
0.5375449657440186,
-0.025143632665276527,
0.0615735799074173,
-0.3982807993888855,
0.0643315240740776,
-0.39072272181510925,
0.016019972041249275,
-0.15668196976184845,
-0.12128311395645142,
-0.2525269687175751,
0.36229395866394043,
0.3500153124332428,
0.021632490679621696,
0.017140885815024376,
0.3535284399986267,
0.12850721180438995,
0.34496361017227173,
-0.14862525463104248,
-0.10955929011106491,
-0.14529789984226227,
-0.3055037558078766,
0.26828548312187195,
-0.3418844938278198,
-0.008425263687968254,
-0.049938153475522995,
0.2562420964241028,
-0.29346510767936707,
-0.06382191926240921,
0.05585198476910591,
0.1688101887702942,
0.11366355419158936,
0.12162183225154877,
0.5605748891830444,
-0.16176466643810272,
0.057110801339149475,
0.1759609878063202,
-0.3675444722175598,
-0.20317049324512482,
0.28185948729515076,
0.06277074664831161,
0.36050844192504883,
-0.18981517851352692,
0.3087814152240753,
-0.2180841714143753,
0.14702150225639343,
0.020081371068954468,
0.07642485201358795,
-0.16526049375534058,
0.21555787324905396,
0.1454387903213501,
-0.33661964535713196,
-0.27259090542793274,
0.11019669473171234,
-0.04245539754629135,
0.051572754979133606,
0.10242335498332977,
-0.44260287284851074,
0.6927388906478882,
-0.09319180995225906,
-0.25702428817749023,
-0.19640161097049713,
-0.05326017737388611,
-0.08087652921676636,
-0.22580887377262115,
-0.35047417879104614,
0.05133056640625,
0.23777300119400024,
-0.04414578527212143,
-0.22937628626823425,
0.17009781301021576,
-0.07201024144887924,
-0.11371434479951859,
-0.09102144837379456,
0.586930513381958,
-0.00039035719237290323,
-0.03357234597206116,
0.15138748288154602,
-0.24820564687252045
] |
https://github.com/huggingface/datasets/issues/1769
|
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
|
Multiprocessing in python require all the functions to be picklable. More specifically, functions need to be picklable with `dill`.
However objects like `typing.Union[str, NoneType]` are not picklable in python <3.7.
Can you try to update your python version to python>=3.7 ?
|
It may be a bug of multiprocessing with Datasets, when I disable the multiprocessing by set num_proc to None, everything works fine.
The script I use is https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_mlm_wwm.py
Script args:
```
--model_name_or_path
../../../model/chinese-roberta-wwm-ext
--train_file
/nfs/volume-377-2/bert/data/test/train.txt
--output_dir
test
--do_train
--per_device_train_batch_size
2
--gradient_accumulation_steps
2
--learning_rate
1e-4
--max_steps
1000
--warmup_steps
10
--save_steps
1000
--save_total_limit
1
--seed
23333
--max_seq_length
512
--preprocessing_num_workers
2
--cache_dir
/nfs/volume-377-2/bert/data/test/cache
```
Where the `/nfs/volume-377-2/bert/data/test/train.txt` is just a toy example with 10000 lines of random string, you should be able to reproduce this error esaily.
Full Traceback:
```
Traceback (most recent call last):
File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 398, in <module>
main()
File "/nfs/volume-377-2/bert/transformers/examples/language-modeling/run_mlm_wwm.py", line 325, in main
load_from_cache_file=not data_args.overwrite_cache,
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map
for k, dataset in self.items()
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp>
for k, dataset in self.items()
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in map
transformed_shards = [r.get() for r in results]
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1318, in <listcomp>
transformed_shards = [r.get() for r in results]
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get
raise self._value
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/pool.py", line 424, in _handle_tasks
put(task)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/connection.py", line 209, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/multiprocess/reduction.py", line 54, in dumps
cls(buf, protocol, *args, **kwds).dump(obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 446, in dump
StockPickler.dump(self, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 409, in dump
self.save(obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1438, in save_function
obj.__dict__, fkwdefaults), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1170, in save_cell
pickler.save_reduce(_create_cell, (f,), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 736, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 605, in save_reduce
save(cls)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 1365, in save_type
obj.__bases__, _dict), obj=obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 610, in save_reduce
save(args)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 751, in save_tuple
save(element)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File "/home/luban/miniconda3/envs/py36/lib/python3.6/site-packages/dill/_dill.py", line 933, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 847, in _batch_setitems
save(v)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 507, in save
self.save_global(obj, rv)
File "/home/luban/miniconda3/envs/py36/lib/python3.6/pickle.py", line 927, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union
```
| 41 |
_pickle.PicklingError: Can't pickle typing.Union[str, NoneType]: it's not the same object as typing.Union when calling datasets.map with num_proc=2
|
[
-0.24328318238258362,
-0.2521240711212158,
-0.06295328587293625,
0.11670743674039841,
0.13476493954658508,
0.08673429489135742,
0.11687310039997101,
0.36929506063461304,
0.4371505379676819,
0.19875021278858185,
0.07447007298469543,
0.5431944727897644,
-0.20622162520885468,
0.473177433013916,
-0.12875506281852722,
-0.05539186671376228,
-0.004772003274410963,
0.14674556255340576,
-0.3616941571235657,
0.05995016172528267,
-0.2253720611333847,
0.25285112857818604,
-0.2905494272708893,
0.20573757588863373,
-0.19694900512695312,
-0.1718418300151825,
0.07260162383317947,
0.2746224105358124,
-0.19383911788463593,
-0.1568383425474167,
0.19238890707492828,
-0.1471198946237564,
0.07686152309179306,
0.29000502824783325,
-0.00010078064951812848,
0.07154834270477295,
0.09248694777488708,
0.001890173414722085,
-0.15239903330802917,
-0.31859806180000305,
-0.15676966309547424,
-0.0034667211584746838,
0.11613026261329651,
-0.07562070339918137,
-0.05256505683064461,
-0.13911262154579163,
0.09823135286569595,
-0.2456597536802292,
0.08603473752737045,
0.20366701483726501,
0.28007271885871887,
0.37415027618408203,
0.2380174845457077,
-0.34933674335479736,
0.0006107690860517323,
0.14569950103759766,
0.01964247040450573,
0.1813906878232956,
-0.015451705083251,
0.04889382794499397,
0.022279703989624977,
0.1940242052078247,
-0.053527045994997025,
0.11346211284399033,
-0.1305631548166275,
0.12147703766822815,
-0.0913761630654335,
-0.16527016460895538,
0.19158583879470825,
0.10139431059360504,
0.3121623694896698,
-0.20303544402122498,
-0.15972736477851868,
0.1750127375125885,
-0.1616382598876953,
-0.03348063677549362,
-0.021754536777734756,
-0.03727541118860245,
0.0061222855001688,
0.1257304847240448,
-0.06545522063970566,
-0.07162688672542572,
0.07489489763975143,
0.18904531002044678,
0.23007342219352722,
0.06944648921489716,
-0.0509730763733387,
0.32777073979377747,
0.27606263756752014,
-0.3747231364250183,
-0.31132352352142334,
0.028220588341355324,
-0.09405066072940826,
0.08262934535741806,
0.17801053822040558,
-0.2592100203037262,
0.23640112578868866,
-0.0023698622826486826,
0.2577170431613922,
-0.032131440937519073,
-0.10685989260673523,
0.31846755743026733,
-0.28451621532440186,
0.49622195959091187,
0.4605174958705902,
-0.44776836037635803,
0.22164055705070496,
0.47878775000572205,
0.22643640637397766,
-0.05890163406729698,
-0.17046155035495758,
0.04884953796863556,
0.23920342326164246,
-0.4236569106578827,
-0.009511805139482021,
0.06384976208209991,
0.2430305778980255,
-0.26524755358695984,
0.07246968895196915,
-0.05919661000370979,
-0.15602123737335205,
0.005445423070341349,
0.05044805631041527,
0.3162976801395416,
0.07382913678884506,
0.015945948660373688,
-0.07145760953426361,
0.2107403427362442,
-0.38889628648757935,
-0.1341734081506729,
-0.4586257040500641,
0.28511112928390503,
-0.04260159656405449,
-0.11034776270389557,
0.07181103527545929,
0.0971841961145401,
0.352264404296875,
0.0856233686208725,
-0.07310579717159271,
0.1677902489900589,
0.1951274424791336,
-0.16790468990802765,
-0.20009233057498932,
0.2685718536376953,
0.1903509795665741,
0.10226738452911377,
0.3608374297618866,
-0.3984053134918213,
-0.17340660095214844,
0.019834116101264954,
-0.22950752079486847,
-0.1967293620109558,
-0.25860464572906494,
0.23078255355358124,
0.010486832819879055,
0.07171335071325302,
-0.395647257566452,
0.08084486424922943,
0.24183478951454163,
-0.4011424481868744,
-0.3584900498390198,
-0.2544192969799042,
-0.21151401102542877,
-0.3515627086162567,
-0.05450015515089035,
0.19000473618507385,
-0.2498675435781479,
0.05829792469739914,
0.13506948947906494,
-0.23645563423633575,
0.40064242482185364,
0.2925976514816284,
-0.14184442162513733,
-0.23656775057315826,
-0.17190693318843842,
0.6741386651992798,
0.3201266825199127,
0.2056453675031662,
-0.2629266083240509,
0.08004146814346313,
0.027162136510014534,
-0.4816073775291443,
-0.15789897739887238,
-0.08060460537672043,
-0.28101807832717896,
0.13043849170207977,
0.32755351066589355,
-0.028523791581392288,
-0.05107589438557625,
0.10207764804363251,
-0.3011961281299591,
-0.005109692923724651,
0.14386896789073944,
-0.058311112225055695,
-0.028717072680592537,
-0.09378503262996674,
0.1352042257785797,
-0.3168739378452301,
0.0967818945646286,
-0.06311654299497604,
0.031387172639369965,
-0.06272825598716736,
0.29563236236572266,
-0.25079694390296936,
-0.13413551449775696,
-0.25260525941848755,
-0.4131522476673126,
0.0606844425201416,
-0.11151637881994247,
0.16332507133483887,
-0.10614797472953796,
-0.04923116788268089,
-0.1619928628206253,
-0.03066311962902546,
-0.10720951855182648,
0.13586732745170593,
0.18941889703273773,
-0.06994708627462387,
0.06076082959771156,
0.05581659451127052,
-0.11353056132793427,
-0.31493133306503296,
-0.06815917044878006,
0.00019796451670117676,
-0.3065178692340851,
0.09310420602560043,
-0.3485201597213745,
-0.3905983567237854,
-0.16573338210582733,
0.008545633405447006,
0.13264909386634827,
-0.02136373333632946,
0.003672179765999317,
0.22356410324573517,
0.21577604115009308,
-0.18008995056152344,
0.16547231376171112,
-0.09355156123638153,
-0.14355596899986267,
-0.1506396383047104,
-0.0632203221321106,
0.03836153447628021,
0.15810133516788483,
-0.1865820735692978,
-0.29843607544898987,
0.37902799248695374,
-0.0034135428722947836,
0.050084471702575684,
0.06359869241714478,
0.17891767621040344,
0.22764089703559875,
0.2775956094264984,
0.08004513382911682,
-0.2619229853153229,
-0.15464714169502258,
0.15727046132087708,
0.06000798940658569,
0.08183862268924713,
-0.36376139521598816,
0.16681785881519318,
0.39141252636909485,
0.2602423429489136,
0.34007206559181213,
0.029102973639965057,
0.0050943163223564625,
-0.19167853891849518,
0.021440695971250534,
0.0235100407153368,
0.5614761114120483,
0.29083096981048584,
0.0923164114356041,
-0.04794947803020477,
-0.1459096074104309,
-0.02735050581395626,
-0.002494738670065999,
-0.07719708234071732,
-0.10269298404455185,
0.020724300295114517,
0.12621840834617615,
-0.1836024820804596,
-0.2781868577003479,
-0.021756352856755257,
-0.03437577933073044,
0.34794655442237854,
-0.28722211718559265,
-0.11851746588945389,
-0.3512985110282898,
0.3154894709587097,
-0.017756616696715355,
0.05608508735895157,
0.04363646358251572,
-0.3765247166156769,
-0.0677269697189331,
0.32354116439819336,
-0.21532952785491943,
0.13333460688591003,
-0.031923819333314896,
-0.3184995651245117,
-0.0020396921318024397,
0.11030365526676178,
0.16277283430099487,
-0.15291689336299896,
-0.15886671841144562,
0.16050244867801666,
0.21521617472171783,
-0.037426725029945374,
0.2420472949743271,
0.17044928669929504,
-0.08614319562911987,
-0.20312435925006866,
-0.1333467960357666,
-0.03822861611843109,
-0.06881049275398254,
0.05723750591278076,
0.4949072599411011,
0.4219384789466858,
-0.19989831745624542,
-0.22492030262947083,
0.3538709282875061,
-0.09487168490886688,
-0.2915084958076477,
0.03470167890191078,
0.11718400567770004,
-0.08295251429080963,
-0.25930842757225037,
-0.4624432325363159,
-0.3958483040332794,
-0.3335005044937134,
0.3106440305709839,
0.24697180092334747,
0.2025185227394104,
0.14123159646987915,
0.344930499792099,
0.26710444688796997,
0.12364756315946579,
-0.16480037569999695,
-0.34106799960136414,
-0.09135912358760834,
0.2210744470357895,
-0.13063959777355194,
-0.25263839960098267,
0.0388399213552475,
-0.19997268915176392,
-0.014056277461349964,
-0.12413236498832703,
-0.06778708100318909,
-0.028600972145795822,
-0.21295568346977234,
0.3509705364704132,
0.07087472826242447,
0.12034285068511963,
0.4939345419406891,
0.45329880714416504,
-0.24437150359153748,
-0.06528070569038391,
-0.2202238142490387,
0.2077006697654724,
0.27259311079978943,
0.11093885451555252,
-0.01817377470433712,
0.15300698578357697,
-0.05626269802451134,
0.5747671127319336,
0.23123221099376678,
-0.27352917194366455,
0.37960487604141235,
-0.1292588859796524,
-0.015886515378952026,
-0.14051179587841034,
-0.24336358904838562,
-0.07594766467809677,
-0.010970570147037506,
0.0818859189748764,
0.04935174807906151,
-0.1308242529630661,
-0.18744449317455292,
-0.044782646000385284,
0.0915599837899208,
-0.14647965133190155,
-0.14085595309734344,
0.19733299314975739,
0.14332593977451324,
-0.23950210213661194,
0.03219342604279518,
0.018501078709959984,
-0.28928080201148987,
0.1478041559457779,
-0.20590227842330933,
-0.1159520372748375,
-0.013466584496200085,
0.027120739221572876,
-0.37134459614753723,
-0.27662962675094604,
-0.3715657889842987,
0.5373373031616211,
0.061932437121868134,
0.11786554753780365,
-0.1684655398130417,
-0.25085580348968506,
-0.1990862339735031,
0.014112021774053574,
0.6050212383270264,
-0.45038148760795593,
0.0006533595151267946,
0.25469836592674255,
-0.020894592627882957,
-0.18602006137371063,
-0.0965578630566597,
-0.042977042496204376,
0.5932420492172241,
-0.07155127078294754,
0.5616303086280823,
-0.22078336775302887,
0.006763790734112263,
0.3945915699005127,
-0.05412508547306061,
-0.04612535610795021,
-0.01932361349463463,
-0.2135094553232193,
-0.30974116921424866,
-0.19370445609092712,
-0.09486089646816254,
0.09677625447511673,
0.1770215481519699,
0.04116244614124298,
-0.09291777014732361,
-0.12234953790903091,
-0.16809068620204926,
0.14984679222106934,
0.09235271066427231,
0.3442791700363159,
0.054297562688589096,
-0.011972033418715,
0.06296402961015701,
0.058879315853118896,
0.2207644283771515,
0.3055661916732788,
-0.1719800978899002,
-0.02045181766152382,
0.23003558814525604,
-0.27061763405799866,
0.37560030817985535,
-0.18457487225532532,
-0.03263825178146362,
0.16509947180747986,
-0.03275863826274872,
0.24695613980293274,
0.04089773818850517,
0.2143666297197342,
0.21010595560073853,
0.04602710157632828,
-0.21659111976623535,
-0.48478174209594727,
0.38965532183647156,
0.21693527698516846,
0.0635237768292427,
0.3109143078327179,
-0.21370720863342285,
-0.12036676704883575,
0.21966461837291718,
-0.1193670928478241,
0.6887012720108032,
-0.05627342686057091,
-0.0029128941241651773,
0.14763014018535614,
0.1310507357120514,
0.37356096506118774,
0.17992816865444183,
-0.10135060548782349,
-0.4251553416252136,
-0.03872621804475784,
-0.06437709182500839,
-0.25953561067581177,
0.11578402668237686,
0.1736132800579071,
-0.5594596266746521,
0.3400518298149109,
-0.3066035509109497,
-0.12327351421117783,
-0.11626862734556198,
0.05106461048126221,
0.18231362104415894,
-0.014075059443712234,
-0.004294063895940781,
0.27199554443359375,
-0.19164186716079712,
0.06902077049016953,
0.027385646477341652,
0.002136894501745701,
-0.050999004393815994,
-0.3749769330024719,
-0.21347782015800476,
-0.02896488830447197,
0.046018801629543304,
0.5990408062934875,
0.1985769271850586,
0.005482272244989872,
0.04980393871665001,
0.3023568093776703,
-0.14896458387374878,
0.17630629241466522,
-0.06555012613534927,
-0.12257906049489975,
0.2631206810474396,
-0.06377572566270828,
-0.10119649767875671,
0.16613826155662537,
0.2844931483268738,
0.07302713394165039,
-0.19839024543762207,
0.04155311733484268,
-0.025632744655013084,
-0.0025195362977683544,
-0.2755092978477478,
0.15333794057369232,
-0.05741596966981888,
-0.5459537506103516,
-0.5358964800834656,
0.023295938968658447,
-0.2853160798549652,
-0.27060258388519287,
0.17990513145923615,
0.11081045866012573,
-0.2378847748041153,
0.26095476746559143,
0.34497153759002686,
-0.2529131770133972,
0.09048695117235184,
0.4761991500854492,
0.006001295056194067,
0.42946770787239075,
0.5332821011543274,
0.13871517777442932,
-0.2491176724433899,
-0.3010866641998291,
0.0590464286506176,
0.15865403413772583,
-0.0953374132514,
0.3127312958240509,
0.1490204930305481,
-0.16551223397254944,
0.04993224889039993,
0.3847607374191284,
-0.020577101036906242,
0.20479553937911987,
0.03319903463125229,
-0.2397812306880951,
-0.4093632400035858,
0.169352188706398,
-0.07022812217473984,
0.1279086172580719,
0.09385403245687485,
0.2599654495716095,
-0.019610978662967682,
0.05747023969888687,
-0.4075036346912384,
0.13859157264232635,
-0.45907503366470337,
0.16178950667381287,
0.02058779075741768,
-0.10066289454698563,
-0.01921507716178894,
-0.03587372973561287,
0.30859845876693726,
0.16281236708164215,
-0.28137415647506714,
-0.3249379098415375,
-0.0039338236674666405,
0.026316581293940544,
-0.048893626779317856,
0.08326352387666702,
0.09118809551000595,
0.13615287840366364,
-0.14450165629386902,
-0.04173858463764191,
-0.16280753910541534,
0.09647686779499054,
-0.0192163847386837,
0.20546407997608185,
0.3471072018146515,
0.01697760634124279,
0.14846284687519073,
0.1751892864704132,
-0.24249882996082306,
-0.008751925081014633,
-0.04879379644989967,
-0.05574809014797211,
0.017426790669560432,
-0.1618986874818802,
0.32769906520843506,
-0.08480672538280487,
0.05181610956788063,
0.0038386655505746603,
-0.04337169975042343,
-0.36478984355926514,
-0.03655817359685898,
-0.03710786625742912,
0.4657752513885498,
0.13596443831920624,
-0.05518912523984909,
0.15023617446422577,
0.05222666636109352,
0.34033894538879395,
-0.47615736722946167,
0.04126589745283127,
0.44900190830230713,
0.2203119993209839,
0.15634675323963165,
0.08942335844039917,
-0.329068124294281,
0.13965556025505066,
-0.34387046098709106,
0.055591680109500885,
0.08423861861228943,
-0.27135488390922546,
0.05482754111289978,
0.16034777462482452,
-0.26129385828971863,
-0.15663175284862518,
0.25028374791145325,
0.20038968324661255,
0.2770281732082367,
0.11875063180923462,
-0.1751134842634201,
0.17631877958774567,
-0.08771353214979172,
-0.012038766406476498,
-0.015657158568501472,
-0.6411097645759583,
0.4712488055229187,
0.5566560626029968,
0.08718341588973999,
0.09696458280086517,
0.22053313255310059,
0.5824393033981323,
-0.43171989917755127,
-0.17969340085983276,
-0.009391353465616703,
0.07910442352294922,
-0.3124837875366211,
-0.31953269243240356,
-0.021576814353466034,
-0.16361309587955475,
-0.20004110038280487,
-0.06149876490235329,
-0.02758338302373886,
-0.035465262830257416,
0.3490246534347534,
-0.038005247712135315,
0.08569911867380142,
-0.3156876266002655,
0.04191557317972183,
-0.027999555692076683,
-0.029020046815276146,
-0.18808351457118988,
0.01132950745522976,
0.1332421749830246,
-0.05341431125998497,
-0.10531994700431824,
0.11489693075418472,
0.504362940788269,
0.2755245864391327,
-0.41975802183151245,
0.0038683093152940273,
-0.08698232471942902,
-0.15316028892993927,
-0.009394350461661816,
0.012368487194180489,
0.02112092822790146,
0.05349436402320862,
0.2528873085975647,
0.2543772757053375,
-0.23515862226486206,
0.0654178038239479,
0.19072581827640533,
0.3867330849170685,
0.026919906958937645,
0.1103711649775505,
-0.07351680845022202,
-0.3447273373603821,
0.0658998116850853,
-0.09444224089384079,
-0.3260602355003357,
-0.1830117404460907,
0.17225071787834167,
-0.1271662414073944,
0.35463011264801025,
-0.029213428497314453,
0.15265007317066193,
0.1005159541964531,
0.5375449657440186,
-0.025143632665276527,
0.0615735799074173,
-0.3982807993888855,
0.0643315240740776,
-0.39072272181510925,
0.016019972041249275,
-0.15668196976184845,
-0.12128311395645142,
-0.2525269687175751,
0.36229395866394043,
0.3500153124332428,
0.021632490679621696,
0.017140885815024376,
0.3535284399986267,
0.12850721180438995,
0.34496361017227173,
-0.14862525463104248,
-0.10955929011106491,
-0.14529789984226227,
-0.3055037558078766,
0.26828548312187195,
-0.3418844938278198,
-0.008425263687968254,
-0.049938153475522995,
0.2562420964241028,
-0.29346510767936707,
-0.06382191926240921,
0.05585198476910591,
0.1688101887702942,
0.11366355419158936,
0.12162183225154877,
0.5605748891830444,
-0.16176466643810272,
0.057110801339149475,
0.1759609878063202,
-0.3675444722175598,
-0.20317049324512482,
0.28185948729515076,
0.06277074664831161,
0.36050844192504883,
-0.18981517851352692,
0.3087814152240753,
-0.2180841714143753,
0.14702150225639343,
0.020081371068954468,
0.07642485201358795,
-0.16526049375534058,
0.21555787324905396,
0.1454387903213501,
-0.33661964535713196,
-0.27259090542793274,
0.11019669473171234,
-0.04245539754629135,
0.051572754979133606,
0.10242335498332977,
-0.44260287284851074,
0.6927388906478882,
-0.09319180995225906,
-0.25702428817749023,
-0.19640161097049713,
-0.05326017737388611,
-0.08087652921676636,
-0.22580887377262115,
-0.35047417879104614,
0.05133056640625,
0.23777300119400024,
-0.04414578527212143,
-0.22937628626823425,
0.17009781301021576,
-0.07201024144887924,
-0.11371434479951859,
-0.09102144837379456,
0.586930513381958,
-0.00039035719237290323,
-0.03357234597206116,
0.15138748288154602,
-0.24820564687252045
] |
https://github.com/huggingface/datasets/issues/1766
|
Issues when run two programs compute the same metrics
|
Hi ! To avoid collisions you can specify a `experiment_id` when instantiating your metric using `load_metric`. It will replace "default_experiment" with the experiment id that you provide in the arrow filename.
Also when two `experiment_id` collide we're supposed to detect it using our locking mechanism. Not sure why it didn't work in your case. Could you share some code that reproduces the issue ? This would help us investigate.
|
I got the following error when running two different programs that both compute sacreblue metrics. It seems that both read/and/write to the same location (.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow) where it caches the batches:
```
File "train_matching_min.py", line 160, in <module>ch_9_label
avg_loss = valid(epoch, args.batch, args.validation, args.with_label)
File "train_matching_min.py", line 93, in valid
bleu += eval.compute()
File "/u/tlhoang/projects/seal/match/models/eval.py", line 23, in compute
return self.metric.compute()['score']
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 387, in compute
self._finalize()
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 355, in _finalize
self.data = Dataset(**reader.read_files([{"filename": f} for f in file_paths]))
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 231, in read_files
pa_table = self._read_files(files)
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 170, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict)
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 299, in _get_dataset_from_filename
pa_table = f.read_all()
File "pyarrow/ipc.pxi", line 481, in pyarrow.lib.RecordBatchReader.read_all
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Expected to read 1819307375 metadata bytes, but only read 454396
```
| 69 |
Issues when run two programs compute the same metrics
|
[
-0.577644407749176,
-0.0692993551492691,
-0.2125975340604782,
0.4146427512168884,
0.26292088627815247,
-0.24968957901000977,
0.1013159528374672,
0.15170224010944366,
-0.025904009118676186,
0.4242362678050995,
-0.2583618760108948,
0.2929644286632538,
0.14655537903308868,
0.0019414779962971807,
-0.3842972218990326,
0.04834861308336258,
-0.017717847600579262,
0.16628099977970123,
-0.18765448033809662,
-0.05137869343161583,
-0.20355162024497986,
0.13858351111412048,
0.07068929821252823,
0.11050786077976227,
-0.003697700332850218,
-0.1101832166314125,
0.1899242103099823,
-0.004760178737342358,
0.05494549125432968,
0.08761396259069443,
-0.0519600585103035,
0.06830678135156631,
-0.1614864319562912,
0.842241644859314,
-0.0001032295185723342,
0.003235413460060954,
0.11981989443302155,
0.1991269439458847,
0.09461510181427002,
0.11191588640213013,
0.14424008131027222,
-0.12495163828134537,
-0.038381144404411316,
-0.38134658336639404,
0.0854557529091835,
-0.09320791810750961,
-0.2348213940858841,
-0.404863566160202,
0.2817362844944,
0.09378763288259506,
0.3188258111476898,
0.4146882891654968,
-0.42655807733535767,
-0.17734917998313904,
-0.08905145525932312,
-0.32032692432403564,
0.11717098206281662,
0.37506669759750366,
0.03512544184923172,
0.10270711779594421,
0.0739542543888092,
0.15335366129875183,
-0.07357783615589142,
0.25986653566360474,
0.0026298067532479763,
0.053206369280815125,
0.6106109023094177,
0.041680630296468735,
0.20446468889713287,
-0.0506017692387104,
-0.12547168135643005,
-0.23033703863620758,
0.014322932809591293,
0.09006007760763168,
-0.17033611238002777,
-0.413134902715683,
0.16073499619960785,
-0.09447231888771057,
0.04885520413517952,
-0.24072502553462982,
-0.2663845717906952,
-0.0005896691582165658,
-0.03482047840952873,
-0.11610635370016098,
-0.14406028389930725,
-0.011197404935956001,
-0.06951162219047546,
0.12916895747184753,
-0.039892129600048065,
0.25518015027046204,
0.14948797225952148,
-0.3105083405971527,
-0.020749446004629135,
-0.2674904465675354,
-0.22513630986213684,
0.09145498275756836,
-0.05749480798840523,
-0.2221158891916275,
-0.07546259462833405,
-0.013575522229075432,
0.22144122421741486,
0.2228795439004898,
0.23813748359680176,
0.017024250701069832,
-0.24031123518943787,
0.5176035761833191,
0.050361279398202896,
0.1355561465024948,
0.29618263244628906,
0.1442532241344452,
-0.5969670414924622,
-0.203471377491951,
0.2806832492351532,
-0.3522167503833771,
0.31434696912765503,
0.07342895120382309,
-0.10321574658155441,
-0.32440027594566345,
-0.48572081327438354,
0.18322329223155975,
-0.04838446155190468,
-0.15052193403244019,
0.1906614899635315,
0.14311936497688293,
0.08127404004335403,
-0.03684636205434799,
0.01916644722223282,
0.4392555356025696,
-0.3250879645347595,
0.15410742163658142,
-0.30683809518814087,
-0.11131474375724792,
-0.2937062680721283,
0.27360156178474426,
-0.10467979311943054,
0.05619339644908905,
0.1421908140182495,
0.16109952330589294,
0.23636499047279358,
-0.2841407060623169,
0.29208362102508545,
-0.30047720670700073,
-0.07803621143102646,
-0.22348512709140778,
0.267490416765213,
0.05869042128324509,
0.05890002101659775,
0.027503076940774918,
-0.10466162115335464,
0.0877581462264061,
-0.05503608658909798,
0.2446451038122177,
0.6418117880821228,
0.30272531509399414,
-0.17863968014717102,
0.39992642402648926,
0.217790424823761,
0.1941150426864624,
0.08578046411275864,
-0.4142715632915497,
-0.0827784314751625,
-0.06244955584406853,
-0.2800024449825287,
-0.09558506309986115,
0.13372214138507843,
0.044332463294267654,
-0.1391187310218811,
-0.09159519523382187,
0.02088789828121662,
-0.006390743888914585,
-0.08236689120531082,
0.3640610873699188,
-0.0767538845539093,
0.2820972204208374,
-0.13726642727851868,
0.007517740596085787,
0.6468988656997681,
-0.4103575646877289,
-0.3005596697330475,
-0.039594996720552444,
-0.17810989916324615,
-0.08004042506217957,
-0.05770781263709068,
-0.0343593955039978,
0.12524743378162384,
-0.0588315948843956,
0.0980912372469902,
-0.19326388835906982,
0.05595552176237106,
-0.21021699905395508,
-0.2960584759712219,
-0.16992047429084778,
0.03291822969913483,
-0.21231277287006378,
0.48399123549461365,
0.11014493554830551,
0.2812199592590332,
-0.186861053109169,
-0.16486012935638428,
-0.12181452661752701,
-0.01658741384744644,
0.006385137792676687,
-0.07806721329689026,
-0.16821621358394623,
-0.019941279664635658,
-0.38635608553886414,
0.5522138476371765,
-0.02710234746336937,
-0.4685709476470947,
-0.17092610895633698,
0.49458491802215576,
-0.0698123350739479,
-0.2013532668352127,
-0.15338905155658722,
0.22530092298984528,
0.12206948548555374,
0.2447032332420349,
0.19985835254192352,
0.11703793704509735,
0.18413366377353668,
0.1945764571428299,
-0.011531294323503971,
-0.1222071498632431,
-0.15105630457401276,
0.1372116655111313,
0.12823958694934845,
-0.07114490866661072,
-0.3348117172718048,
0.06658227741718292,
0.0912056416273117,
0.3164982795715332,
0.11241853982210159,
-0.10700881481170654,
0.12713783979415894,
-0.22635513544082642,
0.15882936120033264,
0.2222873568534851,
0.20981387794017792,
-0.00656217522919178,
0.025489602237939835,
0.229343980550766,
0.012115695513784885,
0.18455661833286285,
-0.08028450608253479,
0.37748828530311584,
0.2379998415708542,
0.1086677834391594,
0.15563596785068512,
0.2821055054664612,
-0.1427081823348999,
-0.211050882935524,
-0.04221731424331665,
0.15337836742401123,
-0.18672023713588715,
0.29710057377815247,
-0.009714173153042793,
-0.21671567857265472,
-0.11436222493648529,
0.036405522376298904,
0.03670618310570717,
0.5566068291664124,
0.04150419309735298,
0.07468196004629135,
-0.1502550095319748,
-0.07565541565418243,
0.16937924921512604,
-0.14995849132537842,
-0.17023049294948578,
0.5880485773086548,
0.286695659160614,
0.17073629796504974,
0.045444782823324203,
-0.3198319375514984,
-0.3134993314743042,
0.07910896092653275,
0.3452308475971222,
-0.19189956784248352,
0.25995180010795593,
0.1047271266579628,
-0.10051847249269485,
0.059417128562927246,
0.22223983705043793,
0.07826726883649826,
-0.1280450075864792,
-0.17459416389465332,
0.20901167392730713,
-0.17288631200790405,
0.08657217025756836,
-0.3957769274711609,
0.06040176376700401,
-0.11496000736951828,
-0.17782673239707947,
-0.1288425326347351,
0.31388959288597107,
0.004730088170617819,
0.22578394412994385,
0.09726826846599579,
0.33186984062194824,
-0.2613094449043274,
0.2513236403465271,
0.17459049820899963,
-0.11029790341854095,
-0.3947286009788513,
0.11388123780488968,
0.10796314477920532,
0.13254529237747192,
0.34869250655174255,
-0.338586688041687,
0.0080951526761055,
-0.062424641102552414,
-0.32701656222343445,
0.09376412630081177,
0.18755771219730377,
0.4782312214374542,
-0.2241622358560562,
-0.3482882082462311,
-0.19386440515518188,
-0.10890954732894897,
0.40276870131492615,
-0.4245682656764984,
-0.047354619950056076,
-0.09729303419589996,
0.035245541483163834,
-0.24539008736610413,
-0.250116229057312,
-0.13990454375743866,
0.3110404908657074,
-0.18245820701122284,
0.07783360034227371,
0.05111217498779297,
0.09158702194690704,
-0.2624126970767975,
-0.053919047117233276,
0.015417053364217281,
0.19289983808994293,
0.24634796380996704,
-0.4591867923736572,
-0.05064728111028671,
0.007123313844203949,
-0.3022206127643585,
-0.24277327954769135,
-0.07015074044466019,
0.028028368949890137,
0.2877659797668457,
0.2603626251220703,
-0.21715056896209717,
-0.5062492489814758,
-0.11646976321935654,
0.13200564682483673,
0.013520984910428524,
0.1582552045583725,
-0.0520460344851017,
0.07381819188594818,
-0.30339065194129944,
-0.3329061269760132,
-0.4852276146411896,
0.4699353575706482,
-0.3157479166984558,
-0.055344801396131516,
-0.19728638231754303,
-0.0061786542646586895,
-0.23834310472011566,
0.2851351201534271,
0.12351492792367935,
-0.024236684665083885,
0.11773654073476791,
0.06384290009737015,
0.3619689643383026,
-0.035383135080337524,
-0.09624682366847992,
0.24910718202590942,
0.4932931363582611,
-0.05691197142004967,
0.2945226728916168,
0.08818061649799347,
-0.028789862990379333,
-0.1994248628616333,
-0.20245490968227386,
-0.25316905975341797,
-0.20330162346363068,
-0.37276777625083923,
0.0911843404173851,
0.15793375670909882,
0.2861368656158447,
0.4268312156200409,
-0.3711974024772644,
0.02671215496957302,
0.26216042041778564,
-0.07315973192453384,
-0.34155723452568054,
-0.22697220742702484,
-0.1996949166059494,
-0.12312875688076019,
-0.023976556956768036,
0.546206533908844,
-0.09162626415491104,
0.05487682297825813,
-0.17908553779125214,
-0.04604386165738106,
-0.00408480828627944,
-0.13203537464141846,
0.4499320685863495,
-0.08296558260917664,
0.08593574166297913,
0.11093401908874512,
-0.1283392757177353,
-0.35304853320121765,
-0.002022161614149809,
-0.22281651198863983,
0.029683085158467293,
0.21939267218112946,
0.5694701075553894,
-0.20629526674747467,
0.03362147882580757,
-0.028561407700181007,
0.16306233406066895,
-0.08524803072214127,
-0.2457057535648346,
-0.2483777105808258,
-0.12912265956401825,
0.2074766755104065,
-0.011962722055613995,
-0.3524358868598938,
0.26385289430618286,
-0.2870463728904724,
-0.05590732395648956,
-0.17408771812915802,
-0.17318104207515717,
0.37577423453330994,
0.1254042387008667,
0.447865754365921,
-0.4245237410068512,
0.18426816165447235,
0.03080645576119423,
0.06521113216876984,
0.1278422623872757,
-0.05321456491947174,
-0.006427360232919455,
-0.046551935374736786,
0.23759585618972778,
-0.16247540712356567,
0.07585557550191879,
0.3817056715488434,
-0.035036370158195496,
0.03144093230366707,
-0.11517630517482758,
0.0776418149471283,
-0.13973575830459595,
0.16178491711616516,
0.29011261463165283,
0.40626537799835205,
0.009282891638576984,
0.11329285055398941,
-0.15567536652088165,
0.3657474219799042,
-0.2861986756324768,
0.22751972079277039,
-0.43422240018844604,
-0.23980626463890076,
-0.16212162375450134,
0.11829125881195068,
0.9426624774932861,
0.11715177446603775,
-0.13444165885448456,
0.3152225613594055,
-0.4641697406768799,
0.2503880560398102,
-0.07873395085334778,
0.13703987002372742,
-0.10303198546171188,
-0.4000472128391266,
0.0911443680524826,
-0.17224787175655365,
0.05586998164653778,
-0.3293434679508209,
-0.06997643411159515,
0.20496267080307007,
-0.08145401626825333,
-0.022671278566122055,
-0.08304286748170853,
0.1750098615884781,
0.04330477863550186,
0.2101123332977295,
0.12417199462652206,
0.2841159701347351,
-0.08019424229860306,
-0.059011995792388916,
-0.20536144077777863,
-0.11936092376708984,
-0.30279648303985596,
-0.013777793385088444,
0.14003099501132965,
-0.05167916417121887,
0.12862612307071686,
0.26186856627464294,
-0.3062551021575928,
-0.2504115402698517,
-0.16445955634117126,
-0.09234569221735,
0.6363666653633118,
0.13268354535102844,
-0.07552500069141388,
0.23558403551578522,
-0.14040426909923553,
0.1430070400238037,
0.0755007341504097,
-0.32008424401283264,
-0.13006898760795593,
-0.19796885550022125,
-0.2844462990760803,
0.08346333354711533,
0.25362491607666016,
0.15352021157741547,
-0.2663605511188507,
-0.08288709819316864,
-0.06978371739387512,
-0.15618225932121277,
0.2031707614660263,
0.05753033608198166,
0.05387859046459198,
-0.16899751126766205,
0.24560734629631042,
-0.26929590106010437,
-0.07585974037647247,
0.47121790051460266,
0.06633271276950836,
-0.3740465044975281,
-0.19173823297023773,
0.20804832875728607,
0.12360656261444092,
0.03604103624820709,
0.1792222261428833,
-0.3703952729701996,
-0.08233288675546646,
-0.213906392455101,
-0.5014212131500244,
-0.026674633845686913,
-0.029234154149889946,
0.2629428505897522,
-0.05030364170670509,
-0.09458090364933014,
-0.09951825439929962,
0.1296073943376541,
0.18328215181827545,
0.29003071784973145,
-0.01576494611799717,
-0.11957437545061111,
-0.10513684898614883,
-0.04989399388432503,
0.047445062547922134,
0.15169082581996918,
-0.010489540174603462,
0.2529548108577728,
-0.24011094868183136,
0.22326280176639557,
-0.4409663677215576,
-0.0347851887345314,
-0.031884338706731796,
-0.004406182561069727,
-0.19272446632385254,
-0.28343021869659424,
0.03249143064022064,
0.002277678344398737,
0.19393423199653625,
0.039688825607299805,
-0.23854339122772217,
-0.29486778378486633,
-0.1750676929950714,
0.06164110079407692,
-0.19884485006332397,
-0.12088964879512787,
-0.025658907368779182,
-0.21136605739593506,
0.11201386153697968,
-0.3066409230232239,
0.02919686771929264,
0.2242230623960495,
-0.18420559167861938,
-0.16547183692455292,
0.011043398641049862,
0.35673069953918457,
0.09039121121168137,
0.089787557721138,
0.039854567497968674,
-0.06389332562685013,
-0.13827383518218994,
0.12915904819965363,
0.1501135528087616,
-0.07192211598157883,
-0.17568151652812958,
-0.21112073957920074,
0.226653590798378,
0.11131177097558975,
-0.11315010488033295,
0.02695152349770069,
-0.10653571784496307,
0.2382563054561615,
0.20783479511737823,
0.28351837396621704,
-0.010176816955208778,
-0.35119524598121643,
0.04070531204342842,
0.30211305618286133,
0.03130592778325081,
0.057363223284482956,
0.17358174920082092,
-0.23940838873386383,
0.01603926718235016,
0.2095395028591156,
0.1987489014863968,
-0.046821922063827515,
0.09502202272415161,
-0.03997623920440674,
0.30854707956314087,
-0.11457552760839462,
0.10604719072580338,
-0.16773612797260284,
0.21997998654842377,
0.3514561653137207,
0.35367515683174133,
0.06869995594024658,
0.014863179065287113,
-0.02959178015589714,
-0.08499620854854584,
0.06415804475545883,
-0.06516354531049728,
0.006912569049745798,
-0.16225455701351166,
0.05273013189435005,
-0.10564876347780228,
0.10383088886737823,
-0.08562906831502914,
0.05587572604417801,
-0.05178321897983551,
-0.017865344882011414,
-0.27047744393348694,
-0.13997332751750946,
-0.30456802248954773,
0.08856760710477829,
-0.3149312436580658,
-0.025815678760409355,
-0.18301613628864288,
-0.36797916889190674,
0.22592942416667938,
0.04078627750277519,
0.3555796444416046,
0.4046669602394104,
0.19728010892868042,
0.011605250649154186,
-0.17413653433322906,
0.04875076934695244,
-0.2619520425796509,
0.2553245425224304,
-0.05532541498541832,
-0.07135528326034546,
0.25758039951324463,
0.1231912299990654,
0.2541232407093048,
0.2611945867538452,
0.4804443418979645,
0.3110407292842865,
0.22640067338943481,
0.009758982807397842,
-0.3678086996078491,
0.21845616400241852,
0.052133072167634964,
-0.1837717741727829,
0.2617517113685608,
0.2414105236530304,
-0.06494809687137604,
0.2581116557121277,
0.27866289019584656,
-0.43298062682151794,
0.2396608144044876,
-0.04242460057139397,
-0.06081577390432358,
-0.31941503286361694,
0.34628820419311523,
-0.025490988045930862,
-0.01829216256737709,
-0.020339513197541237,
-0.19939346611499786,
-0.24453993141651154,
0.09729428589344025,
-0.05813884362578392,
0.011943602934479713,
0.13940195739269257,
-0.20743198692798615,
0.13974206149578094,
-0.0031984131783246994,
0.28547102212905884,
-0.026935972273349762,
0.09573576599359512,
-0.39226800203323364,
0.08855511248111725,
-0.39995792508125305,
0.6156352758407593,
0.12485097348690033,
0.23306980729103088,
-0.3674341142177582,
0.12624073028564453,
-0.1383766382932663,
-0.22495262324810028,
0.664440393447876,
0.024443723261356354,
0.2504267990589142,
-0.1723913848400116,
-0.5360310077667236,
0.1963939070701599,
0.18180495500564575,
-0.5547606348991394,
0.28328901529312134,
-0.18213587999343872,
0.19837668538093567,
-0.2766929864883423,
0.24406814575195312,
0.2656874358654022,
0.10329998284578323,
0.044754814356565475,
0.17400451004505157,
0.5311147570610046,
0.30655860900878906,
0.6084221601486206,
-0.23349739611148834,
0.25853589177131653,
0.13315936923027039,
0.0700131505727768,
-0.04391627386212349,
0.023873578757047653,
-0.06195598095655441,
-0.03765967860817909,
-0.4269754886627197,
0.0012260946677997708,
-0.046592652797698975,
0.13575366139411926,
0.30416247248649597,
0.09259524941444397,
0.17034876346588135,
0.04568403586745262,
-0.0394180566072464,
-0.06063975766301155,
0.23160336911678314,
0.3872789442539215,
0.21631203591823578,
0.3055947721004486,
-0.27511924505233765,
-0.051743924617767334,
0.31328728795051575,
-0.03328905254602432,
-0.3273138999938965,
-0.2664679288864136,
0.3317970335483551,
0.3447446823120117,
-0.20372067391872406,
-0.26051023602485657,
-0.07943146675825119,
0.3830719292163849,
-0.18166592717170715,
0.09076620638370514,
0.20226764678955078,
-0.5228680372238159,
-0.14472532272338867,
0.10540620237588882,
-0.21381497383117676,
0.034990958869457245,
-0.49126583337783813,
0.2662603259086609,
0.1251073181629181
] |
https://github.com/huggingface/datasets/issues/1766
|
Issues when run two programs compute the same metrics
|
Thank you for your response. I fixed the issue by set "keep_in_memory=True" when load_metric.
I cannot share the entire source code but below is the wrapper I wrote:
```python
class Evaluation:
def __init__(self, metric='sacrebleu'):
# self.metric = load_metric(metric, keep_in_memory=True)
self.metric = load_metric(metric)
def add(self, predictions, references):
self.metric.add_batch(predictions=predictions, references=references)
def compute(self):
return self.metric.compute()['score']
```
Then call the given wrapper as follows:
```python
eval = Evaluation(metric='sacrebleu')
for query, candidates, labels in tqdm(dataset):
predictions = net.generate(query)
references = [[s] for s in labels]
eval.add(predictions, references)
if n % 100 == 0:
bleu += eval.compute()
eval = Evaluation(metric='sacrebleu')
|
I got the following error when running two different programs that both compute sacreblue metrics. It seems that both read/and/write to the same location (.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow) where it caches the batches:
```
File "train_matching_min.py", line 160, in <module>ch_9_label
avg_loss = valid(epoch, args.batch, args.validation, args.with_label)
File "train_matching_min.py", line 93, in valid
bleu += eval.compute()
File "/u/tlhoang/projects/seal/match/models/eval.py", line 23, in compute
return self.metric.compute()['score']
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 387, in compute
self._finalize()
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 355, in _finalize
self.data = Dataset(**reader.read_files([{"filename": f} for f in file_paths]))
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 231, in read_files
pa_table = self._read_files(files)
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 170, in _read_files
pa_table: pa.Table = self._get_dataset_from_filename(f_dict)
File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 299, in _get_dataset_from_filename
pa_table = f.read_all()
File "pyarrow/ipc.pxi", line 481, in pyarrow.lib.RecordBatchReader.read_all
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Expected to read 1819307375 metadata bytes, but only read 454396
```
| 94 |
Issues when run two programs compute the same metrics
|
[
-0.577644407749176,
-0.0692993551492691,
-0.2125975340604782,
0.4146427512168884,
0.26292088627815247,
-0.24968957901000977,
0.1013159528374672,
0.15170224010944366,
-0.025904009118676186,
0.4242362678050995,
-0.2583618760108948,
0.2929644286632538,
0.14655537903308868,
0.0019414779962971807,
-0.3842972218990326,
0.04834861308336258,
-0.017717847600579262,
0.16628099977970123,
-0.18765448033809662,
-0.05137869343161583,
-0.20355162024497986,
0.13858351111412048,
0.07068929821252823,
0.11050786077976227,
-0.003697700332850218,
-0.1101832166314125,
0.1899242103099823,
-0.004760178737342358,
0.05494549125432968,
0.08761396259069443,
-0.0519600585103035,
0.06830678135156631,
-0.1614864319562912,
0.842241644859314,
-0.0001032295185723342,
0.003235413460060954,
0.11981989443302155,
0.1991269439458847,
0.09461510181427002,
0.11191588640213013,
0.14424008131027222,
-0.12495163828134537,
-0.038381144404411316,
-0.38134658336639404,
0.0854557529091835,
-0.09320791810750961,
-0.2348213940858841,
-0.404863566160202,
0.2817362844944,
0.09378763288259506,
0.3188258111476898,
0.4146882891654968,
-0.42655807733535767,
-0.17734917998313904,
-0.08905145525932312,
-0.32032692432403564,
0.11717098206281662,
0.37506669759750366,
0.03512544184923172,
0.10270711779594421,
0.0739542543888092,
0.15335366129875183,
-0.07357783615589142,
0.25986653566360474,
0.0026298067532479763,
0.053206369280815125,
0.6106109023094177,
0.041680630296468735,
0.20446468889713287,
-0.0506017692387104,
-0.12547168135643005,
-0.23033703863620758,
0.014322932809591293,
0.09006007760763168,
-0.17033611238002777,
-0.413134902715683,
0.16073499619960785,
-0.09447231888771057,
0.04885520413517952,
-0.24072502553462982,
-0.2663845717906952,
-0.0005896691582165658,
-0.03482047840952873,
-0.11610635370016098,
-0.14406028389930725,
-0.011197404935956001,
-0.06951162219047546,
0.12916895747184753,
-0.039892129600048065,
0.25518015027046204,
0.14948797225952148,
-0.3105083405971527,
-0.020749446004629135,
-0.2674904465675354,
-0.22513630986213684,
0.09145498275756836,
-0.05749480798840523,
-0.2221158891916275,
-0.07546259462833405,
-0.013575522229075432,
0.22144122421741486,
0.2228795439004898,
0.23813748359680176,
0.017024250701069832,
-0.24031123518943787,
0.5176035761833191,
0.050361279398202896,
0.1355561465024948,
0.29618263244628906,
0.1442532241344452,
-0.5969670414924622,
-0.203471377491951,
0.2806832492351532,
-0.3522167503833771,
0.31434696912765503,
0.07342895120382309,
-0.10321574658155441,
-0.32440027594566345,
-0.48572081327438354,
0.18322329223155975,
-0.04838446155190468,
-0.15052193403244019,
0.1906614899635315,
0.14311936497688293,
0.08127404004335403,
-0.03684636205434799,
0.01916644722223282,
0.4392555356025696,
-0.3250879645347595,
0.15410742163658142,
-0.30683809518814087,
-0.11131474375724792,
-0.2937062680721283,
0.27360156178474426,
-0.10467979311943054,
0.05619339644908905,
0.1421908140182495,
0.16109952330589294,
0.23636499047279358,
-0.2841407060623169,
0.29208362102508545,
-0.30047720670700073,
-0.07803621143102646,
-0.22348512709140778,
0.267490416765213,
0.05869042128324509,
0.05890002101659775,
0.027503076940774918,
-0.10466162115335464,
0.0877581462264061,
-0.05503608658909798,
0.2446451038122177,
0.6418117880821228,
0.30272531509399414,
-0.17863968014717102,
0.39992642402648926,
0.217790424823761,
0.1941150426864624,
0.08578046411275864,
-0.4142715632915497,
-0.0827784314751625,
-0.06244955584406853,
-0.2800024449825287,
-0.09558506309986115,
0.13372214138507843,
0.044332463294267654,
-0.1391187310218811,
-0.09159519523382187,
0.02088789828121662,
-0.006390743888914585,
-0.08236689120531082,
0.3640610873699188,
-0.0767538845539093,
0.2820972204208374,
-0.13726642727851868,
0.007517740596085787,
0.6468988656997681,
-0.4103575646877289,
-0.3005596697330475,
-0.039594996720552444,
-0.17810989916324615,
-0.08004042506217957,
-0.05770781263709068,
-0.0343593955039978,
0.12524743378162384,
-0.0588315948843956,
0.0980912372469902,
-0.19326388835906982,
0.05595552176237106,
-0.21021699905395508,
-0.2960584759712219,
-0.16992047429084778,
0.03291822969913483,
-0.21231277287006378,
0.48399123549461365,
0.11014493554830551,
0.2812199592590332,
-0.186861053109169,
-0.16486012935638428,
-0.12181452661752701,
-0.01658741384744644,
0.006385137792676687,
-0.07806721329689026,
-0.16821621358394623,
-0.019941279664635658,
-0.38635608553886414,
0.5522138476371765,
-0.02710234746336937,
-0.4685709476470947,
-0.17092610895633698,
0.49458491802215576,
-0.0698123350739479,
-0.2013532668352127,
-0.15338905155658722,
0.22530092298984528,
0.12206948548555374,
0.2447032332420349,
0.19985835254192352,
0.11703793704509735,
0.18413366377353668,
0.1945764571428299,
-0.011531294323503971,
-0.1222071498632431,
-0.15105630457401276,
0.1372116655111313,
0.12823958694934845,
-0.07114490866661072,
-0.3348117172718048,
0.06658227741718292,
0.0912056416273117,
0.3164982795715332,
0.11241853982210159,
-0.10700881481170654,
0.12713783979415894,
-0.22635513544082642,
0.15882936120033264,
0.2222873568534851,
0.20981387794017792,
-0.00656217522919178,
0.025489602237939835,
0.229343980550766,
0.012115695513784885,
0.18455661833286285,
-0.08028450608253479,
0.37748828530311584,
0.2379998415708542,
0.1086677834391594,
0.15563596785068512,
0.2821055054664612,
-0.1427081823348999,
-0.211050882935524,
-0.04221731424331665,
0.15337836742401123,
-0.18672023713588715,
0.29710057377815247,
-0.009714173153042793,
-0.21671567857265472,
-0.11436222493648529,
0.036405522376298904,
0.03670618310570717,
0.5566068291664124,
0.04150419309735298,
0.07468196004629135,
-0.1502550095319748,
-0.07565541565418243,
0.16937924921512604,
-0.14995849132537842,
-0.17023049294948578,
0.5880485773086548,
0.286695659160614,
0.17073629796504974,
0.045444782823324203,
-0.3198319375514984,
-0.3134993314743042,
0.07910896092653275,
0.3452308475971222,
-0.19189956784248352,
0.25995180010795593,
0.1047271266579628,
-0.10051847249269485,
0.059417128562927246,
0.22223983705043793,
0.07826726883649826,
-0.1280450075864792,
-0.17459416389465332,
0.20901167392730713,
-0.17288631200790405,
0.08657217025756836,
-0.3957769274711609,
0.06040176376700401,
-0.11496000736951828,
-0.17782673239707947,
-0.1288425326347351,
0.31388959288597107,
0.004730088170617819,
0.22578394412994385,
0.09726826846599579,
0.33186984062194824,
-0.2613094449043274,
0.2513236403465271,
0.17459049820899963,
-0.11029790341854095,
-0.3947286009788513,
0.11388123780488968,
0.10796314477920532,
0.13254529237747192,
0.34869250655174255,
-0.338586688041687,
0.0080951526761055,
-0.062424641102552414,
-0.32701656222343445,
0.09376412630081177,
0.18755771219730377,
0.4782312214374542,
-0.2241622358560562,
-0.3482882082462311,
-0.19386440515518188,
-0.10890954732894897,
0.40276870131492615,
-0.4245682656764984,
-0.047354619950056076,
-0.09729303419589996,
0.035245541483163834,
-0.24539008736610413,
-0.250116229057312,
-0.13990454375743866,
0.3110404908657074,
-0.18245820701122284,
0.07783360034227371,
0.05111217498779297,
0.09158702194690704,
-0.2624126970767975,
-0.053919047117233276,
0.015417053364217281,
0.19289983808994293,
0.24634796380996704,
-0.4591867923736572,
-0.05064728111028671,
0.007123313844203949,
-0.3022206127643585,
-0.24277327954769135,
-0.07015074044466019,
0.028028368949890137,
0.2877659797668457,
0.2603626251220703,
-0.21715056896209717,
-0.5062492489814758,
-0.11646976321935654,
0.13200564682483673,
0.013520984910428524,
0.1582552045583725,
-0.0520460344851017,
0.07381819188594818,
-0.30339065194129944,
-0.3329061269760132,
-0.4852276146411896,
0.4699353575706482,
-0.3157479166984558,
-0.055344801396131516,
-0.19728638231754303,
-0.0061786542646586895,
-0.23834310472011566,
0.2851351201534271,
0.12351492792367935,
-0.024236684665083885,
0.11773654073476791,
0.06384290009737015,
0.3619689643383026,
-0.035383135080337524,
-0.09624682366847992,
0.24910718202590942,
0.4932931363582611,
-0.05691197142004967,
0.2945226728916168,
0.08818061649799347,
-0.028789862990379333,
-0.1994248628616333,
-0.20245490968227386,
-0.25316905975341797,
-0.20330162346363068,
-0.37276777625083923,
0.0911843404173851,
0.15793375670909882,
0.2861368656158447,
0.4268312156200409,
-0.3711974024772644,
0.02671215496957302,
0.26216042041778564,
-0.07315973192453384,
-0.34155723452568054,
-0.22697220742702484,
-0.1996949166059494,
-0.12312875688076019,
-0.023976556956768036,
0.546206533908844,
-0.09162626415491104,
0.05487682297825813,
-0.17908553779125214,
-0.04604386165738106,
-0.00408480828627944,
-0.13203537464141846,
0.4499320685863495,
-0.08296558260917664,
0.08593574166297913,
0.11093401908874512,
-0.1283392757177353,
-0.35304853320121765,
-0.002022161614149809,
-0.22281651198863983,
0.029683085158467293,
0.21939267218112946,
0.5694701075553894,
-0.20629526674747467,
0.03362147882580757,
-0.028561407700181007,
0.16306233406066895,
-0.08524803072214127,
-0.2457057535648346,
-0.2483777105808258,
-0.12912265956401825,
0.2074766755104065,
-0.011962722055613995,
-0.3524358868598938,
0.26385289430618286,
-0.2870463728904724,
-0.05590732395648956,
-0.17408771812915802,
-0.17318104207515717,
0.37577423453330994,
0.1254042387008667,
0.447865754365921,
-0.4245237410068512,
0.18426816165447235,
0.03080645576119423,
0.06521113216876984,
0.1278422623872757,
-0.05321456491947174,
-0.006427360232919455,
-0.046551935374736786,
0.23759585618972778,
-0.16247540712356567,
0.07585557550191879,
0.3817056715488434,
-0.035036370158195496,
0.03144093230366707,
-0.11517630517482758,
0.0776418149471283,
-0.13973575830459595,
0.16178491711616516,
0.29011261463165283,
0.40626537799835205,
0.009282891638576984,
0.11329285055398941,
-0.15567536652088165,
0.3657474219799042,
-0.2861986756324768,
0.22751972079277039,
-0.43422240018844604,
-0.23980626463890076,
-0.16212162375450134,
0.11829125881195068,
0.9426624774932861,
0.11715177446603775,
-0.13444165885448456,
0.3152225613594055,
-0.4641697406768799,
0.2503880560398102,
-0.07873395085334778,
0.13703987002372742,
-0.10303198546171188,
-0.4000472128391266,
0.0911443680524826,
-0.17224787175655365,
0.05586998164653778,
-0.3293434679508209,
-0.06997643411159515,
0.20496267080307007,
-0.08145401626825333,
-0.022671278566122055,
-0.08304286748170853,
0.1750098615884781,
0.04330477863550186,
0.2101123332977295,
0.12417199462652206,
0.2841159701347351,
-0.08019424229860306,
-0.059011995792388916,
-0.20536144077777863,
-0.11936092376708984,
-0.30279648303985596,
-0.013777793385088444,
0.14003099501132965,
-0.05167916417121887,
0.12862612307071686,
0.26186856627464294,
-0.3062551021575928,
-0.2504115402698517,
-0.16445955634117126,
-0.09234569221735,
0.6363666653633118,
0.13268354535102844,
-0.07552500069141388,
0.23558403551578522,
-0.14040426909923553,
0.1430070400238037,
0.0755007341504097,
-0.32008424401283264,
-0.13006898760795593,
-0.19796885550022125,
-0.2844462990760803,
0.08346333354711533,
0.25362491607666016,
0.15352021157741547,
-0.2663605511188507,
-0.08288709819316864,
-0.06978371739387512,
-0.15618225932121277,
0.2031707614660263,
0.05753033608198166,
0.05387859046459198,
-0.16899751126766205,
0.24560734629631042,
-0.26929590106010437,
-0.07585974037647247,
0.47121790051460266,
0.06633271276950836,
-0.3740465044975281,
-0.19173823297023773,
0.20804832875728607,
0.12360656261444092,
0.03604103624820709,
0.1792222261428833,
-0.3703952729701996,
-0.08233288675546646,
-0.213906392455101,
-0.5014212131500244,
-0.026674633845686913,
-0.029234154149889946,
0.2629428505897522,
-0.05030364170670509,
-0.09458090364933014,
-0.09951825439929962,
0.1296073943376541,
0.18328215181827545,
0.29003071784973145,
-0.01576494611799717,
-0.11957437545061111,
-0.10513684898614883,
-0.04989399388432503,
0.047445062547922134,
0.15169082581996918,
-0.010489540174603462,
0.2529548108577728,
-0.24011094868183136,
0.22326280176639557,
-0.4409663677215576,
-0.0347851887345314,
-0.031884338706731796,
-0.004406182561069727,
-0.19272446632385254,
-0.28343021869659424,
0.03249143064022064,
0.002277678344398737,
0.19393423199653625,
0.039688825607299805,
-0.23854339122772217,
-0.29486778378486633,
-0.1750676929950714,
0.06164110079407692,
-0.19884485006332397,
-0.12088964879512787,
-0.025658907368779182,
-0.21136605739593506,
0.11201386153697968,
-0.3066409230232239,
0.02919686771929264,
0.2242230623960495,
-0.18420559167861938,
-0.16547183692455292,
0.011043398641049862,
0.35673069953918457,
0.09039121121168137,
0.089787557721138,
0.039854567497968674,
-0.06389332562685013,
-0.13827383518218994,
0.12915904819965363,
0.1501135528087616,
-0.07192211598157883,
-0.17568151652812958,
-0.21112073957920074,
0.226653590798378,
0.11131177097558975,
-0.11315010488033295,
0.02695152349770069,
-0.10653571784496307,
0.2382563054561615,
0.20783479511737823,
0.28351837396621704,
-0.010176816955208778,
-0.35119524598121643,
0.04070531204342842,
0.30211305618286133,
0.03130592778325081,
0.057363223284482956,
0.17358174920082092,
-0.23940838873386383,
0.01603926718235016,
0.2095395028591156,
0.1987489014863968,
-0.046821922063827515,
0.09502202272415161,
-0.03997623920440674,
0.30854707956314087,
-0.11457552760839462,
0.10604719072580338,
-0.16773612797260284,
0.21997998654842377,
0.3514561653137207,
0.35367515683174133,
0.06869995594024658,
0.014863179065287113,
-0.02959178015589714,
-0.08499620854854584,
0.06415804475545883,
-0.06516354531049728,
0.006912569049745798,
-0.16225455701351166,
0.05273013189435005,
-0.10564876347780228,
0.10383088886737823,
-0.08562906831502914,
0.05587572604417801,
-0.05178321897983551,
-0.017865344882011414,
-0.27047744393348694,
-0.13997332751750946,
-0.30456802248954773,
0.08856760710477829,
-0.3149312436580658,
-0.025815678760409355,
-0.18301613628864288,
-0.36797916889190674,
0.22592942416667938,
0.04078627750277519,
0.3555796444416046,
0.4046669602394104,
0.19728010892868042,
0.011605250649154186,
-0.17413653433322906,
0.04875076934695244,
-0.2619520425796509,
0.2553245425224304,
-0.05532541498541832,
-0.07135528326034546,
0.25758039951324463,
0.1231912299990654,
0.2541232407093048,
0.2611945867538452,
0.4804443418979645,
0.3110407292842865,
0.22640067338943481,
0.009758982807397842,
-0.3678086996078491,
0.21845616400241852,
0.052133072167634964,
-0.1837717741727829,
0.2617517113685608,
0.2414105236530304,
-0.06494809687137604,
0.2581116557121277,
0.27866289019584656,
-0.43298062682151794,
0.2396608144044876,
-0.04242460057139397,
-0.06081577390432358,
-0.31941503286361694,
0.34628820419311523,
-0.025490988045930862,
-0.01829216256737709,
-0.020339513197541237,
-0.19939346611499786,
-0.24453993141651154,
0.09729428589344025,
-0.05813884362578392,
0.011943602934479713,
0.13940195739269257,
-0.20743198692798615,
0.13974206149578094,
-0.0031984131783246994,
0.28547102212905884,
-0.026935972273349762,
0.09573576599359512,
-0.39226800203323364,
0.08855511248111725,
-0.39995792508125305,
0.6156352758407593,
0.12485097348690033,
0.23306980729103088,
-0.3674341142177582,
0.12624073028564453,
-0.1383766382932663,
-0.22495262324810028,
0.664440393447876,
0.024443723261356354,
0.2504267990589142,
-0.1723913848400116,
-0.5360310077667236,
0.1963939070701599,
0.18180495500564575,
-0.5547606348991394,
0.28328901529312134,
-0.18213587999343872,
0.19837668538093567,
-0.2766929864883423,
0.24406814575195312,
0.2656874358654022,
0.10329998284578323,
0.044754814356565475,
0.17400451004505157,
0.5311147570610046,
0.30655860900878906,
0.6084221601486206,
-0.23349739611148834,
0.25853589177131653,
0.13315936923027039,
0.0700131505727768,
-0.04391627386212349,
0.023873578757047653,
-0.06195598095655441,
-0.03765967860817909,
-0.4269754886627197,
0.0012260946677997708,
-0.046592652797698975,
0.13575366139411926,
0.30416247248649597,
0.09259524941444397,
0.17034876346588135,
0.04568403586745262,
-0.0394180566072464,
-0.06063975766301155,
0.23160336911678314,
0.3872789442539215,
0.21631203591823578,
0.3055947721004486,
-0.27511924505233765,
-0.051743924617767334,
0.31328728795051575,
-0.03328905254602432,
-0.3273138999938965,
-0.2664679288864136,
0.3317970335483551,
0.3447446823120117,
-0.20372067391872406,
-0.26051023602485657,
-0.07943146675825119,
0.3830719292163849,
-0.18166592717170715,
0.09076620638370514,
0.20226764678955078,
-0.5228680372238159,
-0.14472532272338867,
0.10540620237588882,
-0.21381497383117676,
0.034990958869457245,
-0.49126583337783813,
0.2662603259086609,
0.1251073181629181
] |
https://github.com/huggingface/datasets/issues/1765
|
Error iterating over Dataset with DataLoader
|
Instead of:
```python
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
```
It should be:
```python
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=32)
```
`batch_sampler` accepts a Sampler object or an Iterable, so you get an error.
|
I have a Dataset that I've mapped a tokenizer over:
```
encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids'])
encoded_dataset[:1]
```
```
{'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]),
'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113,
102]]),
'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])}
```
When I try to iterate as in the docs, I get errors:
```
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
next(iter(dataloader))
```
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-45-05180ba8aa35> in <module>()
1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
----> 2 next(iter(dataloader))
3 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader)
411 self._timeout = loader.timeout
412 self._collate_fn = loader.collate_fn
--> 413 self._sampler_iter = iter(self._index_sampler)
414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item()
415 self._persistent_workers = loader.persistent_workers
TypeError: 'int' object is not iterable
```
| 30 |
Error iterating over Dataset with DataLoader
|
[
-0.2586119472980499,
0.17651301622390747,
-0.25916752219200134,
0.2714109420776367,
0.20574364066123962,
0.06591738015413284,
0.48662233352661133,
0.332911878824234,
0.21566744148731232,
0.26193201541900635,
0.0628865584731102,
0.10956263542175293,
-0.1425773948431015,
0.15522097051143646,
-0.2400936335325241,
0.11608068645000458,
-0.17474119365215302,
0.4749227464199066,
-0.32467028498649597,
-0.05323737487196922,
-0.11093904823064804,
0.1128334105014801,
-0.15658223628997803,
0.03837107867002487,
-0.21530908346176147,
-0.11686703562736511,
-0.1584482342004776,
0.22067900002002716,
-0.3205884099006653,
-0.3617107570171356,
0.2923063635826111,
0.19345489144325256,
0.3052885830402374,
0.6260347366333008,
-0.00009999598114518449,
0.07179126888513565,
0.02665317803621292,
-0.07921718060970306,
-0.3382206857204437,
0.03329947590827942,
-0.13121171295642853,
0.047235582023859024,
-0.019195498898625374,
-0.3838583528995514,
0.15865644812583923,
-0.17622224986553192,
-0.1305333375930786,
-0.17256930470466614,
0.15088051557540894,
0.04116131737828255,
0.3346354365348816,
0.24754320085048676,
-0.1925957351922989,
-0.09988147020339966,
0.04853153973817825,
0.10041186958551407,
0.07041244953870773,
0.32389381527900696,
0.3610106408596039,
-0.1123976781964302,
-0.37033551931381226,
0.26172012090682983,
0.022636037319898605,
-0.0020248754881322384,
-0.06982745230197906,
-0.09050032496452332,
-0.06045164912939072,
0.11832072585821152,
0.17591965198516846,
-0.13424862921237946,
0.7305377721786499,
-0.3213830888271332,
-0.2725655734539032,
0.00806537363678217,
-0.1487821787595749,
-0.2441181093454361,
0.19364723563194275,
-0.2615722417831421,
-0.0770544782280922,
-0.05674071982502937,
0.2037246972322464,
0.2127254158258438,
-0.2698204219341278,
0.014268078841269016,
-0.10447141528129578,
0.09225261956453323,
-0.17487266659736633,
0.07564341276884079,
0.229294091463089,
-0.12596210837364197,
0.3931882381439209,
0.12109939754009247,
0.0419386550784111,
0.014744496904313564,
-0.5269640684127808,
-0.28592005372047424,
0.12365222722291946,
-0.14899352192878723,
0.04984123632311821,
0.029707804322242737,
0.41154053807258606,
0.05413322150707245,
-0.04993387311697006,
-0.04550302028656006,
0.5454230308532715,
-0.09308114647865295,
0.16439172625541687,
-0.025051185861229897,
0.17369858920574188,
0.11587806046009064,
-0.06756116449832916,
-0.10420477390289307,
-0.06789262592792511,
-0.23369286954402924,
0.18090412020683289,
0.16762574017047882,
0.2531112730503082,
-0.17631155252456665,
-0.3689242899417877,
-0.05193059891462326,
0.03028462827205658,
-0.2524123787879944,
0.11926071345806122,
0.21400518715381622,
0.2907995879650116,
0.1754811853170395,
-0.0392327755689621,
0.13475248217582703,
-0.06836146861314774,
-0.3390929102897644,
-0.3115336298942566,
0.15130768716335297,
-0.2330189198255539,
-0.034365445375442505,
0.24109549820423126,
0.055999185889959335,
0.043200843036174774,
-0.006996836978942156,
-0.1914818286895752,
-0.08004570752382278,
-0.03177610784769058,
-0.19591344892978668,
-0.00967346876859665,
-0.046245355159044266,
0.006584314629435539,
0.16383667290210724,
0.12159392237663269,
-0.07560864835977554,
0.04833357036113739,
0.032291147857904434,
-0.3346937298774719,
-0.12138517946004868,
0.19013451039791107,
0.31586557626724243,
0.06712432205677032,
0.06413320451974869,
-0.26539212465286255,
-0.1195036917924881,
0.04114990681409836,
-0.3065928816795349,
-0.026537766680121422,
0.019578756764531136,
0.10220931470394135,
-0.1408911794424057,
-0.02734355814754963,
0.49803945422172546,
-0.5272693634033203,
0.11412221193313599,
-0.06346023827791214,
-0.12121780961751938,
0.12916654348373413,
0.08424312621355057,
-0.17596955597400665,
0.44065284729003906,
-0.3408789336681366,
0.2976420819759369,
0.34393808245658875,
-0.21115529537200928,
-0.37747013568878174,
0.48290494084358215,
-0.22673837840557098,
-0.06386403739452362,
0.13104096055030823,
0.08776234835386276,
-0.039417508989572525,
-0.3172626793384552,
-0.12590990960597992,
0.021430158987641335,
-0.22253036499023438,
0.004788870923221111,
0.031164228916168213,
0.09778040647506714,
0.30136796832084656,
0.22639282047748566,
0.13387514650821686,
0.4152972102165222,
0.11311236768960953,
0.13349828124046326,
0.3084481954574585,
-0.2900557816028595,
0.07657212018966675,
0.27012407779693604,
0.1881970763206482,
-0.11487212032079697,
0.11092889308929443,
-0.19814863801002502,
-0.4609101712703705,
0.06233784928917885,
0.1515798717737198,
-0.09503902494907379,
-0.009702821262180805,
0.22023336589336395,
-0.16389988362789154,
0.26049676537513733,
-0.20151114463806152,
0.07647745311260223,
0.3135073184967041,
0.4342458248138428,
-0.01875055581331253,
-0.46917232871055603,
-0.36912280321121216,
0.1855427622795105,
-0.4336848855018616,
-0.08741123974323273,
-0.2118092030286789,
0.3273254334926605,
0.050362586975097656,
-0.18209798634052277,
0.12033295631408691,
-0.03218939155340195,
0.14545951783657074,
-0.1475774347782135,
0.06693591922521591,
0.2875158190727234,
0.13769276440143585,
0.04011211916804314,
0.2702248692512512,
-0.056444887071847916,
0.005816509015858173,
-0.17615553736686707,
-0.03156669810414314,
-0.05363744869828224,
0.30184677243232727,
-0.22554545104503632,
0.11788814514875412,
0.10701517760753632,
-0.5034206509590149,
0.41020306944847107,
-0.04614672437310219,
-0.040276478976011276,
0.1107378825545311,
0.003591306507587433,
-0.014872729778289795,
-0.002966528059914708,
0.23997798562049866,
0.12288752943277359,
0.391394704580307,
-0.09457854926586151,
-0.2635660171508789,
-0.09179715067148209,
0.07784587144851685,
0.027539359405636787,
-0.06810424476861954,
0.05504070594906807,
0.022604092955589294,
0.08598582446575165,
0.15256789326667786,
0.07429372519254684,
0.41756585240364075,
0.15269628167152405,
0.13255153596401215,
-0.152817964553833,
0.18052233755588531,
-0.13717995584011078,
-0.05642874538898468,
0.1188475713133812,
0.36264660954475403,
0.22838513553142548,
0.030028210952878,
-0.13898181915283203,
-0.23967130482196808,
-0.25403138995170593,
0.02279636077582836,
0.26181837916374207,
-0.11561807245016098,
0.1743609458208084,
-0.2924191653728485,
-0.14260978996753693,
-0.02208130434155464,
-0.1485903412103653,
-0.16611310839653015,
-0.34960445761680603,
-0.2719742953777313,
0.26820608973503113,
-0.15019568800926208,
0.10385996103286743,
0.053485799580812454,
0.1986655443906784,
0.4385553300380707,
0.07987745851278305,
-0.10055386275053024,
-0.12699660658836365,
-0.17624004185199738,
0.1844765990972519,
0.18397966027259827,
-0.08076737821102142,
0.20071063935756683,
-0.2319933921098709,
0.05251532793045044,
-0.3234386742115021,
0.015313588082790375,
0.2403258979320526,
-0.05078579857945442,
-0.020714838057756424,
0.2559622824192047,
0.36467334628105164,
0.10009381175041199,
-0.268097460269928,
0.19684676826000214,
-0.11077447980642319,
-0.09542246907949448,
0.3193035423755646,
0.03130108863115311,
0.16528482735157013,
0.12819859385490417,
-0.2239370197057724,
-0.0877097025513649,
-0.30240803956985474,
0.1801837831735611,
0.047052107751369476,
0.29299697279930115,
0.209710955619812,
0.12107040733098984,
0.08887182176113129,
0.13892816007137299,
-0.029947688803076744,
-0.13134729862213135,
-0.29006025195121765,
0.2471218705177307,
-0.07308010756969452,
-0.25598442554473877,
-0.01091059111058712,
-0.03797193989157677,
0.30276432633399963,
0.27936819195747375,
-0.3268687129020691,
-0.1565699428319931,
0.13024891912937164,
-0.07514837384223938,
-0.08258909732103348,
0.20353414118289948,
0.028967157006263733,
-0.07483381778001785,
-0.2344229817390442,
-0.22847725450992584,
-0.053818315267562866,
0.3192124664783478,
-0.13152100145816803,
0.2357761263847351,
0.07092877477407455,
0.2600076198577881,
-0.04270137473940849,
0.32431110739707947,
0.027674475684762,
-0.14937929809093475,
0.3529597222805023,
-0.15136966109275818,
0.13585427403450012,
0.11652927845716476,
-0.47856399416923523,
-0.03318466618657112,
-0.18658152222633362,
-0.026105506345629692,
0.15275590121746063,
-0.3122880160808563,
-0.15101411938667297,
-0.3114672005176544,
0.10354552417993546,
-0.18860945105552673,
-0.2794387936592102,
0.14595407247543335,
0.02709067240357399,
0.12830479443073273,
0.10997346043586731,
0.027610911056399345,
-0.3691069483757019,
0.07880110293626785,
0.04255615174770355,
-0.15371643006801605,
-0.07855714112520218,
-0.07441772520542145,
-0.20204521715641022,
0.1676994413137436,
-0.11163579672574997,
0.1788313388824463,
-0.0474587008357048,
0.45863279700279236,
0.056784383952617645,
-0.2832908630371094,
-0.196374773979187,
-0.12299364805221558,
0.8702905178070068,
-0.03093629516661167,
0.11317437142133713,
-0.016168644651770592,
-0.29810813069343567,
0.11648891866207123,
0.022934159263968468,
-0.3650266230106354,
0.49918970465660095,
0.10340617597103119,
0.1808459609746933,
-0.2911246418952942,
-0.021395480260252953,
0.21450935304164886,
0.07861772924661636,
-0.07164095342159271,
-0.47564613819122314,
-0.0065490310080349445,
-0.05495971068739891,
-0.17980051040649414,
0.010034252889454365,
-0.22134843468666077,
0.22478637099266052,
0.05290043726563454,
0.06627802550792694,
-0.1722099930047989,
-0.13249187171459198,
0.2744024395942688,
0.04444018751382828,
0.15809181332588196,
-0.05692724511027336,
0.12259581685066223,
0.15071241557598114,
0.19155099987983704,
0.5013871788978577,
0.5859159827232361,
0.07243974506855011,
-0.19570326805114746,
0.503882646560669,
-0.31772834062576294,
0.36549264192581177,
0.3896714448928833,
-0.07419713586568832,
-0.10879476368427277,
-0.034411340951919556,
0.024934977293014526,
-0.3149097263813019,
0.18487270176410675,
0.3397897779941559,
0.04904650151729584,
-0.29212528467178345,
-0.22075733542442322,
0.271869421005249,
-0.040872007608413696,
0.09956447035074234,
0.4875320792198181,
-0.0320771299302578,
-0.05402928590774536,
0.0410257913172245,
0.004020031075924635,
0.7144198417663574,
0.19503019750118256,
0.0043344646692276,
0.31366822123527527,
0.2978020906448364,
0.38784632086753845,
-0.28230637311935425,
0.07561463862657547,
-0.2287655472755432,
-0.44571956992149353,
-0.041373640298843384,
-0.16071227192878723,
0.12396617233753204,
0.5199720859527588,
-0.08774027973413467,
0.30299097299575806,
0.07084597647190094,
0.25593429803848267,
0.09328959882259369,
0.10112527757883072,
-0.2591722309589386,
-0.21831391751766205,
-0.2573959231376648,
0.2442137748003006,
-0.17999711632728577,
-0.054595429450273514,
-0.1755998283624649,
-0.1671207845211029,
0.186370849609375,
-0.2929283082485199,
-0.04902127757668495,
0.1517827808856964,
-0.1589387208223343,
-0.013722124509513378,
0.15791437029838562,
-0.2371279001235962,
-0.1016179546713829,
-0.09432531893253326,
0.0076699103228747845,
-0.08176837861537933,
0.06230891868472099,
-0.14490585029125214,
0.08670098334550858,
0.07326860725879669,
-0.26426243782043457,
0.11254242807626724,
0.30990836024284363,
0.054024722427129745,
0.1030089408159256,
0.1100873127579689,
0.031356047838926315,
-0.2899361252784729,
0.24663354456424713,
0.15266023576259613,
-0.10554255545139313,
-0.6222410798072815,
-0.13943877816200256,
0.04588652774691582,
-0.0950850397348404,
-0.20676536858081818,
0.24341978132724762,
0.07417403161525726,
-0.26892200112342834,
0.025219669565558434,
0.16108307242393494,
-0.16628862917423248,
-0.034563351422548294,
0.2594369351863861,
0.17876286804676056,
-0.22244159877300262,
0.6101073622703552,
0.2891952395439148,
-0.1518898904323578,
-0.3654859960079193,
-0.23649731278419495,
0.3522564768791199,
-0.31391140818595886,
0.1704619824886322,
-0.25693947076797485,
0.0781741514801979,
0.09701486676931381,
0.12721557915210724,
0.19436727464199066,
0.2372312843799591,
-0.07151328027248383,
-0.3825671076774597,
-0.3023032546043396,
0.040571149438619614,
0.044810112565755844,
0.2854495644569397,
-0.03333865851163864,
-0.0783802717924118,
-0.038311321288347244,
0.143236443400383,
-0.4620806872844696,
-0.17640113830566406,
-0.3250729739665985,
0.13109616935253143,
0.1931867003440857,
-0.11518394201993942,
-0.011936822906136513,
0.22134973108768463,
0.27916479110717773,
0.3549240231513977,
0.02234383299946785,
-0.37422674894332886,
-0.00230914494022727,
0.03141675144433975,
0.08183694630861282,
-0.03695857152342796,
0.03979356959462166,
-0.1463409662246704,
-0.11882219463586807,
-0.2101290076971054,
-0.02229422889649868,
-0.14675086736679077,
-0.037936627864837646,
0.07774019241333008,
0.4277336001396179,
-0.028072167187929153,
-0.06886138767004013,
0.07002396136522293,
0.23923523724079132,
0.18550211191177368,
0.06212938204407692,
0.20730285346508026,
-0.0887286365032196,
-0.16053058207035065,
0.010379740968346596,
0.21520566940307617,
0.21215957403182983,
-0.18250036239624023,
0.09324690699577332,
-0.5744041204452515,
0.02328571118414402,
0.050437405705451965,
0.5401068329811096,
0.5258210897445679,
-0.1818741261959076,
-0.06082421913743019,
-0.02943107672035694,
0.27775266766548157,
-0.22843632102012634,
0.06909036636352539,
0.16571420431137085,
-0.09030186384916306,
0.12038201093673706,
0.256752610206604,
0.041635140776634216,
-0.16683538258075714,
0.1307792365550995,
-0.043990034610033035,
0.08156893402338028,
-0.146912083029747,
-0.04687821865081787,
0.20526517927646637,
-0.24077045917510986,
-0.05788961425423622,
0.2577085793018341,
0.5247350931167603,
-0.11889820545911789,
0.36051857471466064,
-0.1098157986998558,
0.22615529596805573,
-0.1725735366344452,
-0.3159618079662323,
-0.37274909019470215,
-0.7062898278236389,
0.05890478938817978,
0.2930518090724945,
0.12980198860168457,
0.05957755073904991,
-0.02691604755818844,
0.09956168383359909,
-0.14896081387996674,
0.059486113488674164,
-0.15994255244731903,
0.09044766426086426,
-0.22616231441497803,
0.24026386439800262,
-0.26827308535575867,
-0.2564069926738739,
-0.3685859143733978,
-0.12037083506584167,
-0.01612156443297863,
-0.10278395563364029,
0.18300758302211761,
-0.1434302031993866,
-0.10584518313407898,
-0.48394373059272766,
-0.1814810186624527,
-0.026297850534319878,
-0.19896575808525085,
-0.4415684640407562,
0.2378833293914795,
0.12007853388786316,
0.1439477801322937,
0.25255846977233887,
0.2616990804672241,
0.28392642736434937,
0.4093947410583496,
0.10956225544214249,
0.024256672710180283,
-0.2910696864128113,
-0.35402873158454895,
-0.12029512971639633,
0.0446808896958828,
-0.1832771897315979,
0.21370893716812134,
0.6087132096290588,
0.27196675539016724,
-0.20852378010749817,
-0.23833142220973969,
0.26404544711112976,
0.20550265908241272,
-0.1591355800628662,
-0.16642601788043976,
0.15423175692558289,
0.0013395308051258326,
-0.20276449620723724,
-0.10091248154640198,
-0.5024999976158142,
-0.2645452618598938,
0.23120847344398499,
-0.289338618516922,
0.2785489857196808,
0.04201824218034744,
0.16414135694503784,
-0.23012878000736237,
0.4377661645412445,
0.3896973431110382,
0.29070404171943665,
-0.32152554392814636,
-0.30664902925491333,
-0.49544134736061096,
0.16276593506336212,
-0.04289063438773155,
-0.1819300800561905,
0.0066589489579200745,
0.1619682013988495,
0.5141973495483398,
0.14612522721290588,
0.2872559428215027,
-0.17401187121868134,
-0.07788576930761337,
0.17765116691589355,
-0.3788415193557739,
-0.34335440397262573,
0.09820984303951263,
0.13650695979595184,
-0.03918293118476868,
-0.196604385972023,
0.22057431936264038,
0.0003250631270930171,
0.28861773014068604,
-0.026611344888806343,
-0.19788339734077454,
-0.06947537511587143,
-0.0004079495556652546,
0.21539495885372162,
0.0010015905136242509,
0.4100838303565979,
-0.15478825569152832,
0.05215322971343994,
-0.29882311820983887,
-0.35493186116218567,
-0.07259882241487503,
0.0789269357919693,
0.2043367624282837,
0.20696215331554413,
-0.09266003966331482,
0.17939718067646027,
-0.3429928719997406,
-0.01313972007483244,
-0.09396182745695114,
0.18394696712493896,
-0.19209930300712585,
0.2036663293838501,
-0.00932353176176548,
0.020948581397533417,
0.16399838030338287,
0.07304658740758896,
0.1338806301355362,
0.3260596990585327,
-0.19020119309425354,
-0.22530490159988403,
0.36659201979637146,
-0.35624438524246216,
-0.5792478322982788,
0.04443464055657387,
0.028105689212679863,
0.012587681412696838,
0.105699323117733,
-0.34533077478408813,
0.13461816310882568,
0.2688044011592865,
-0.16006408631801605,
-0.15659525990486145,
0.04793109372258186,
-0.18582452833652496,
0.09104228019714355,
0.008445488288998604,
0.1917692869901657,
0.1293390691280365,
-0.23821482062339783,
-0.17089740931987762,
-0.11861567944288254
] |
https://github.com/huggingface/datasets/issues/1765
|
Error iterating over Dataset with DataLoader
|
@mariosasko I thought that would fix it, but now I'm getting a different error:
```
/usr/local/lib/python3.6/dist-packages/datasets/arrow_dataset.py:851: UserWarning: The given NumPy array is not writeable, and PyTorch does not support non-writeable tensors. This means you can write to the underlying (supposedly non-writeable) NumPy array using the tensor. You may want to copy the array to protect its data or make it writeable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at /pytorch/torch/csrc/utils/tensor_numpy.cpp:141.)
return torch.tensor(x, **format_kwargs)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-20-3af1d82bf93a> in <module>()
1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=32)
----> 2 next(iter(dataloader))
5 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/collate.py in default_collate(batch)
53 storage = elem.storage()._new_shared(numel)
54 out = elem.new(storage)
---> 55 return torch.stack(batch, 0, out=out)
56 elif elem_type.__module__ == 'numpy' and elem_type.__name__ != 'str_' \
57 and elem_type.__name__ != 'string_':
RuntimeError: stack expects each tensor to be equal size, but got [7] at entry 0 and [10] at entry 1
```
Any thoughts what this means?I Do I need padding?
|
I have a Dataset that I've mapped a tokenizer over:
```
encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids'])
encoded_dataset[:1]
```
```
{'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]),
'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113,
102]]),
'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])}
```
When I try to iterate as in the docs, I get errors:
```
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
next(iter(dataloader))
```
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-45-05180ba8aa35> in <module>()
1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
----> 2 next(iter(dataloader))
3 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader)
411 self._timeout = loader.timeout
412 self._collate_fn = loader.collate_fn
--> 413 self._sampler_iter = iter(self._index_sampler)
414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item()
415 self._persistent_workers = loader.persistent_workers
TypeError: 'int' object is not iterable
```
| 169 |
Error iterating over Dataset with DataLoader
|
[
-0.2586119472980499,
0.17651301622390747,
-0.25916752219200134,
0.2714109420776367,
0.20574364066123962,
0.06591738015413284,
0.48662233352661133,
0.332911878824234,
0.21566744148731232,
0.26193201541900635,
0.0628865584731102,
0.10956263542175293,
-0.1425773948431015,
0.15522097051143646,
-0.2400936335325241,
0.11608068645000458,
-0.17474119365215302,
0.4749227464199066,
-0.32467028498649597,
-0.05323737487196922,
-0.11093904823064804,
0.1128334105014801,
-0.15658223628997803,
0.03837107867002487,
-0.21530908346176147,
-0.11686703562736511,
-0.1584482342004776,
0.22067900002002716,
-0.3205884099006653,
-0.3617107570171356,
0.2923063635826111,
0.19345489144325256,
0.3052885830402374,
0.6260347366333008,
-0.00009999598114518449,
0.07179126888513565,
0.02665317803621292,
-0.07921718060970306,
-0.3382206857204437,
0.03329947590827942,
-0.13121171295642853,
0.047235582023859024,
-0.019195498898625374,
-0.3838583528995514,
0.15865644812583923,
-0.17622224986553192,
-0.1305333375930786,
-0.17256930470466614,
0.15088051557540894,
0.04116131737828255,
0.3346354365348816,
0.24754320085048676,
-0.1925957351922989,
-0.09988147020339966,
0.04853153973817825,
0.10041186958551407,
0.07041244953870773,
0.32389381527900696,
0.3610106408596039,
-0.1123976781964302,
-0.37033551931381226,
0.26172012090682983,
0.022636037319898605,
-0.0020248754881322384,
-0.06982745230197906,
-0.09050032496452332,
-0.06045164912939072,
0.11832072585821152,
0.17591965198516846,
-0.13424862921237946,
0.7305377721786499,
-0.3213830888271332,
-0.2725655734539032,
0.00806537363678217,
-0.1487821787595749,
-0.2441181093454361,
0.19364723563194275,
-0.2615722417831421,
-0.0770544782280922,
-0.05674071982502937,
0.2037246972322464,
0.2127254158258438,
-0.2698204219341278,
0.014268078841269016,
-0.10447141528129578,
0.09225261956453323,
-0.17487266659736633,
0.07564341276884079,
0.229294091463089,
-0.12596210837364197,
0.3931882381439209,
0.12109939754009247,
0.0419386550784111,
0.014744496904313564,
-0.5269640684127808,
-0.28592005372047424,
0.12365222722291946,
-0.14899352192878723,
0.04984123632311821,
0.029707804322242737,
0.41154053807258606,
0.05413322150707245,
-0.04993387311697006,
-0.04550302028656006,
0.5454230308532715,
-0.09308114647865295,
0.16439172625541687,
-0.025051185861229897,
0.17369858920574188,
0.11587806046009064,
-0.06756116449832916,
-0.10420477390289307,
-0.06789262592792511,
-0.23369286954402924,
0.18090412020683289,
0.16762574017047882,
0.2531112730503082,
-0.17631155252456665,
-0.3689242899417877,
-0.05193059891462326,
0.03028462827205658,
-0.2524123787879944,
0.11926071345806122,
0.21400518715381622,
0.2907995879650116,
0.1754811853170395,
-0.0392327755689621,
0.13475248217582703,
-0.06836146861314774,
-0.3390929102897644,
-0.3115336298942566,
0.15130768716335297,
-0.2330189198255539,
-0.034365445375442505,
0.24109549820423126,
0.055999185889959335,
0.043200843036174774,
-0.006996836978942156,
-0.1914818286895752,
-0.08004570752382278,
-0.03177610784769058,
-0.19591344892978668,
-0.00967346876859665,
-0.046245355159044266,
0.006584314629435539,
0.16383667290210724,
0.12159392237663269,
-0.07560864835977554,
0.04833357036113739,
0.032291147857904434,
-0.3346937298774719,
-0.12138517946004868,
0.19013451039791107,
0.31586557626724243,
0.06712432205677032,
0.06413320451974869,
-0.26539212465286255,
-0.1195036917924881,
0.04114990681409836,
-0.3065928816795349,
-0.026537766680121422,
0.019578756764531136,
0.10220931470394135,
-0.1408911794424057,
-0.02734355814754963,
0.49803945422172546,
-0.5272693634033203,
0.11412221193313599,
-0.06346023827791214,
-0.12121780961751938,
0.12916654348373413,
0.08424312621355057,
-0.17596955597400665,
0.44065284729003906,
-0.3408789336681366,
0.2976420819759369,
0.34393808245658875,
-0.21115529537200928,
-0.37747013568878174,
0.48290494084358215,
-0.22673837840557098,
-0.06386403739452362,
0.13104096055030823,
0.08776234835386276,
-0.039417508989572525,
-0.3172626793384552,
-0.12590990960597992,
0.021430158987641335,
-0.22253036499023438,
0.004788870923221111,
0.031164228916168213,
0.09778040647506714,
0.30136796832084656,
0.22639282047748566,
0.13387514650821686,
0.4152972102165222,
0.11311236768960953,
0.13349828124046326,
0.3084481954574585,
-0.2900557816028595,
0.07657212018966675,
0.27012407779693604,
0.1881970763206482,
-0.11487212032079697,
0.11092889308929443,
-0.19814863801002502,
-0.4609101712703705,
0.06233784928917885,
0.1515798717737198,
-0.09503902494907379,
-0.009702821262180805,
0.22023336589336395,
-0.16389988362789154,
0.26049676537513733,
-0.20151114463806152,
0.07647745311260223,
0.3135073184967041,
0.4342458248138428,
-0.01875055581331253,
-0.46917232871055603,
-0.36912280321121216,
0.1855427622795105,
-0.4336848855018616,
-0.08741123974323273,
-0.2118092030286789,
0.3273254334926605,
0.050362586975097656,
-0.18209798634052277,
0.12033295631408691,
-0.03218939155340195,
0.14545951783657074,
-0.1475774347782135,
0.06693591922521591,
0.2875158190727234,
0.13769276440143585,
0.04011211916804314,
0.2702248692512512,
-0.056444887071847916,
0.005816509015858173,
-0.17615553736686707,
-0.03156669810414314,
-0.05363744869828224,
0.30184677243232727,
-0.22554545104503632,
0.11788814514875412,
0.10701517760753632,
-0.5034206509590149,
0.41020306944847107,
-0.04614672437310219,
-0.040276478976011276,
0.1107378825545311,
0.003591306507587433,
-0.014872729778289795,
-0.002966528059914708,
0.23997798562049866,
0.12288752943277359,
0.391394704580307,
-0.09457854926586151,
-0.2635660171508789,
-0.09179715067148209,
0.07784587144851685,
0.027539359405636787,
-0.06810424476861954,
0.05504070594906807,
0.022604092955589294,
0.08598582446575165,
0.15256789326667786,
0.07429372519254684,
0.41756585240364075,
0.15269628167152405,
0.13255153596401215,
-0.152817964553833,
0.18052233755588531,
-0.13717995584011078,
-0.05642874538898468,
0.1188475713133812,
0.36264660954475403,
0.22838513553142548,
0.030028210952878,
-0.13898181915283203,
-0.23967130482196808,
-0.25403138995170593,
0.02279636077582836,
0.26181837916374207,
-0.11561807245016098,
0.1743609458208084,
-0.2924191653728485,
-0.14260978996753693,
-0.02208130434155464,
-0.1485903412103653,
-0.16611310839653015,
-0.34960445761680603,
-0.2719742953777313,
0.26820608973503113,
-0.15019568800926208,
0.10385996103286743,
0.053485799580812454,
0.1986655443906784,
0.4385553300380707,
0.07987745851278305,
-0.10055386275053024,
-0.12699660658836365,
-0.17624004185199738,
0.1844765990972519,
0.18397966027259827,
-0.08076737821102142,
0.20071063935756683,
-0.2319933921098709,
0.05251532793045044,
-0.3234386742115021,
0.015313588082790375,
0.2403258979320526,
-0.05078579857945442,
-0.020714838057756424,
0.2559622824192047,
0.36467334628105164,
0.10009381175041199,
-0.268097460269928,
0.19684676826000214,
-0.11077447980642319,
-0.09542246907949448,
0.3193035423755646,
0.03130108863115311,
0.16528482735157013,
0.12819859385490417,
-0.2239370197057724,
-0.0877097025513649,
-0.30240803956985474,
0.1801837831735611,
0.047052107751369476,
0.29299697279930115,
0.209710955619812,
0.12107040733098984,
0.08887182176113129,
0.13892816007137299,
-0.029947688803076744,
-0.13134729862213135,
-0.29006025195121765,
0.2471218705177307,
-0.07308010756969452,
-0.25598442554473877,
-0.01091059111058712,
-0.03797193989157677,
0.30276432633399963,
0.27936819195747375,
-0.3268687129020691,
-0.1565699428319931,
0.13024891912937164,
-0.07514837384223938,
-0.08258909732103348,
0.20353414118289948,
0.028967157006263733,
-0.07483381778001785,
-0.2344229817390442,
-0.22847725450992584,
-0.053818315267562866,
0.3192124664783478,
-0.13152100145816803,
0.2357761263847351,
0.07092877477407455,
0.2600076198577881,
-0.04270137473940849,
0.32431110739707947,
0.027674475684762,
-0.14937929809093475,
0.3529597222805023,
-0.15136966109275818,
0.13585427403450012,
0.11652927845716476,
-0.47856399416923523,
-0.03318466618657112,
-0.18658152222633362,
-0.026105506345629692,
0.15275590121746063,
-0.3122880160808563,
-0.15101411938667297,
-0.3114672005176544,
0.10354552417993546,
-0.18860945105552673,
-0.2794387936592102,
0.14595407247543335,
0.02709067240357399,
0.12830479443073273,
0.10997346043586731,
0.027610911056399345,
-0.3691069483757019,
0.07880110293626785,
0.04255615174770355,
-0.15371643006801605,
-0.07855714112520218,
-0.07441772520542145,
-0.20204521715641022,
0.1676994413137436,
-0.11163579672574997,
0.1788313388824463,
-0.0474587008357048,
0.45863279700279236,
0.056784383952617645,
-0.2832908630371094,
-0.196374773979187,
-0.12299364805221558,
0.8702905178070068,
-0.03093629516661167,
0.11317437142133713,
-0.016168644651770592,
-0.29810813069343567,
0.11648891866207123,
0.022934159263968468,
-0.3650266230106354,
0.49918970465660095,
0.10340617597103119,
0.1808459609746933,
-0.2911246418952942,
-0.021395480260252953,
0.21450935304164886,
0.07861772924661636,
-0.07164095342159271,
-0.47564613819122314,
-0.0065490310080349445,
-0.05495971068739891,
-0.17980051040649414,
0.010034252889454365,
-0.22134843468666077,
0.22478637099266052,
0.05290043726563454,
0.06627802550792694,
-0.1722099930047989,
-0.13249187171459198,
0.2744024395942688,
0.04444018751382828,
0.15809181332588196,
-0.05692724511027336,
0.12259581685066223,
0.15071241557598114,
0.19155099987983704,
0.5013871788978577,
0.5859159827232361,
0.07243974506855011,
-0.19570326805114746,
0.503882646560669,
-0.31772834062576294,
0.36549264192581177,
0.3896714448928833,
-0.07419713586568832,
-0.10879476368427277,
-0.034411340951919556,
0.024934977293014526,
-0.3149097263813019,
0.18487270176410675,
0.3397897779941559,
0.04904650151729584,
-0.29212528467178345,
-0.22075733542442322,
0.271869421005249,
-0.040872007608413696,
0.09956447035074234,
0.4875320792198181,
-0.0320771299302578,
-0.05402928590774536,
0.0410257913172245,
0.004020031075924635,
0.7144198417663574,
0.19503019750118256,
0.0043344646692276,
0.31366822123527527,
0.2978020906448364,
0.38784632086753845,
-0.28230637311935425,
0.07561463862657547,
-0.2287655472755432,
-0.44571956992149353,
-0.041373640298843384,
-0.16071227192878723,
0.12396617233753204,
0.5199720859527588,
-0.08774027973413467,
0.30299097299575806,
0.07084597647190094,
0.25593429803848267,
0.09328959882259369,
0.10112527757883072,
-0.2591722309589386,
-0.21831391751766205,
-0.2573959231376648,
0.2442137748003006,
-0.17999711632728577,
-0.054595429450273514,
-0.1755998283624649,
-0.1671207845211029,
0.186370849609375,
-0.2929283082485199,
-0.04902127757668495,
0.1517827808856964,
-0.1589387208223343,
-0.013722124509513378,
0.15791437029838562,
-0.2371279001235962,
-0.1016179546713829,
-0.09432531893253326,
0.0076699103228747845,
-0.08176837861537933,
0.06230891868472099,
-0.14490585029125214,
0.08670098334550858,
0.07326860725879669,
-0.26426243782043457,
0.11254242807626724,
0.30990836024284363,
0.054024722427129745,
0.1030089408159256,
0.1100873127579689,
0.031356047838926315,
-0.2899361252784729,
0.24663354456424713,
0.15266023576259613,
-0.10554255545139313,
-0.6222410798072815,
-0.13943877816200256,
0.04588652774691582,
-0.0950850397348404,
-0.20676536858081818,
0.24341978132724762,
0.07417403161525726,
-0.26892200112342834,
0.025219669565558434,
0.16108307242393494,
-0.16628862917423248,
-0.034563351422548294,
0.2594369351863861,
0.17876286804676056,
-0.22244159877300262,
0.6101073622703552,
0.2891952395439148,
-0.1518898904323578,
-0.3654859960079193,
-0.23649731278419495,
0.3522564768791199,
-0.31391140818595886,
0.1704619824886322,
-0.25693947076797485,
0.0781741514801979,
0.09701486676931381,
0.12721557915210724,
0.19436727464199066,
0.2372312843799591,
-0.07151328027248383,
-0.3825671076774597,
-0.3023032546043396,
0.040571149438619614,
0.044810112565755844,
0.2854495644569397,
-0.03333865851163864,
-0.0783802717924118,
-0.038311321288347244,
0.143236443400383,
-0.4620806872844696,
-0.17640113830566406,
-0.3250729739665985,
0.13109616935253143,
0.1931867003440857,
-0.11518394201993942,
-0.011936822906136513,
0.22134973108768463,
0.27916479110717773,
0.3549240231513977,
0.02234383299946785,
-0.37422674894332886,
-0.00230914494022727,
0.03141675144433975,
0.08183694630861282,
-0.03695857152342796,
0.03979356959462166,
-0.1463409662246704,
-0.11882219463586807,
-0.2101290076971054,
-0.02229422889649868,
-0.14675086736679077,
-0.037936627864837646,
0.07774019241333008,
0.4277336001396179,
-0.028072167187929153,
-0.06886138767004013,
0.07002396136522293,
0.23923523724079132,
0.18550211191177368,
0.06212938204407692,
0.20730285346508026,
-0.0887286365032196,
-0.16053058207035065,
0.010379740968346596,
0.21520566940307617,
0.21215957403182983,
-0.18250036239624023,
0.09324690699577332,
-0.5744041204452515,
0.02328571118414402,
0.050437405705451965,
0.5401068329811096,
0.5258210897445679,
-0.1818741261959076,
-0.06082421913743019,
-0.02943107672035694,
0.27775266766548157,
-0.22843632102012634,
0.06909036636352539,
0.16571420431137085,
-0.09030186384916306,
0.12038201093673706,
0.256752610206604,
0.041635140776634216,
-0.16683538258075714,
0.1307792365550995,
-0.043990034610033035,
0.08156893402338028,
-0.146912083029747,
-0.04687821865081787,
0.20526517927646637,
-0.24077045917510986,
-0.05788961425423622,
0.2577085793018341,
0.5247350931167603,
-0.11889820545911789,
0.36051857471466064,
-0.1098157986998558,
0.22615529596805573,
-0.1725735366344452,
-0.3159618079662323,
-0.37274909019470215,
-0.7062898278236389,
0.05890478938817978,
0.2930518090724945,
0.12980198860168457,
0.05957755073904991,
-0.02691604755818844,
0.09956168383359909,
-0.14896081387996674,
0.059486113488674164,
-0.15994255244731903,
0.09044766426086426,
-0.22616231441497803,
0.24026386439800262,
-0.26827308535575867,
-0.2564069926738739,
-0.3685859143733978,
-0.12037083506584167,
-0.01612156443297863,
-0.10278395563364029,
0.18300758302211761,
-0.1434302031993866,
-0.10584518313407898,
-0.48394373059272766,
-0.1814810186624527,
-0.026297850534319878,
-0.19896575808525085,
-0.4415684640407562,
0.2378833293914795,
0.12007853388786316,
0.1439477801322937,
0.25255846977233887,
0.2616990804672241,
0.28392642736434937,
0.4093947410583496,
0.10956225544214249,
0.024256672710180283,
-0.2910696864128113,
-0.35402873158454895,
-0.12029512971639633,
0.0446808896958828,
-0.1832771897315979,
0.21370893716812134,
0.6087132096290588,
0.27196675539016724,
-0.20852378010749817,
-0.23833142220973969,
0.26404544711112976,
0.20550265908241272,
-0.1591355800628662,
-0.16642601788043976,
0.15423175692558289,
0.0013395308051258326,
-0.20276449620723724,
-0.10091248154640198,
-0.5024999976158142,
-0.2645452618598938,
0.23120847344398499,
-0.289338618516922,
0.2785489857196808,
0.04201824218034744,
0.16414135694503784,
-0.23012878000736237,
0.4377661645412445,
0.3896973431110382,
0.29070404171943665,
-0.32152554392814636,
-0.30664902925491333,
-0.49544134736061096,
0.16276593506336212,
-0.04289063438773155,
-0.1819300800561905,
0.0066589489579200745,
0.1619682013988495,
0.5141973495483398,
0.14612522721290588,
0.2872559428215027,
-0.17401187121868134,
-0.07788576930761337,
0.17765116691589355,
-0.3788415193557739,
-0.34335440397262573,
0.09820984303951263,
0.13650695979595184,
-0.03918293118476868,
-0.196604385972023,
0.22057431936264038,
0.0003250631270930171,
0.28861773014068604,
-0.026611344888806343,
-0.19788339734077454,
-0.06947537511587143,
-0.0004079495556652546,
0.21539495885372162,
0.0010015905136242509,
0.4100838303565979,
-0.15478825569152832,
0.05215322971343994,
-0.29882311820983887,
-0.35493186116218567,
-0.07259882241487503,
0.0789269357919693,
0.2043367624282837,
0.20696215331554413,
-0.09266003966331482,
0.17939718067646027,
-0.3429928719997406,
-0.01313972007483244,
-0.09396182745695114,
0.18394696712493896,
-0.19209930300712585,
0.2036663293838501,
-0.00932353176176548,
0.020948581397533417,
0.16399838030338287,
0.07304658740758896,
0.1338806301355362,
0.3260596990585327,
-0.19020119309425354,
-0.22530490159988403,
0.36659201979637146,
-0.35624438524246216,
-0.5792478322982788,
0.04443464055657387,
0.028105689212679863,
0.012587681412696838,
0.105699323117733,
-0.34533077478408813,
0.13461816310882568,
0.2688044011592865,
-0.16006408631801605,
-0.15659525990486145,
0.04793109372258186,
-0.18582452833652496,
0.09104228019714355,
0.008445488288998604,
0.1917692869901657,
0.1293390691280365,
-0.23821482062339783,
-0.17089740931987762,
-0.11861567944288254
] |
https://github.com/huggingface/datasets/issues/1765
|
Error iterating over Dataset with DataLoader
|
Yes, padding is an answer.
This can be solved easily by passing a callable to the collate_fn arg of DataLoader that adds padding.
|
I have a Dataset that I've mapped a tokenizer over:
```
encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids'])
encoded_dataset[:1]
```
```
{'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]),
'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113,
102]]),
'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])}
```
When I try to iterate as in the docs, I get errors:
```
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
next(iter(dataloader))
```
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-45-05180ba8aa35> in <module>()
1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
----> 2 next(iter(dataloader))
3 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader)
411 self._timeout = loader.timeout
412 self._collate_fn = loader.collate_fn
--> 413 self._sampler_iter = iter(self._index_sampler)
414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item()
415 self._persistent_workers = loader.persistent_workers
TypeError: 'int' object is not iterable
```
| 23 |
Error iterating over Dataset with DataLoader
|
[
-0.2586119472980499,
0.17651301622390747,
-0.25916752219200134,
0.2714109420776367,
0.20574364066123962,
0.06591738015413284,
0.48662233352661133,
0.332911878824234,
0.21566744148731232,
0.26193201541900635,
0.0628865584731102,
0.10956263542175293,
-0.1425773948431015,
0.15522097051143646,
-0.2400936335325241,
0.11608068645000458,
-0.17474119365215302,
0.4749227464199066,
-0.32467028498649597,
-0.05323737487196922,
-0.11093904823064804,
0.1128334105014801,
-0.15658223628997803,
0.03837107867002487,
-0.21530908346176147,
-0.11686703562736511,
-0.1584482342004776,
0.22067900002002716,
-0.3205884099006653,
-0.3617107570171356,
0.2923063635826111,
0.19345489144325256,
0.3052885830402374,
0.6260347366333008,
-0.00009999598114518449,
0.07179126888513565,
0.02665317803621292,
-0.07921718060970306,
-0.3382206857204437,
0.03329947590827942,
-0.13121171295642853,
0.047235582023859024,
-0.019195498898625374,
-0.3838583528995514,
0.15865644812583923,
-0.17622224986553192,
-0.1305333375930786,
-0.17256930470466614,
0.15088051557540894,
0.04116131737828255,
0.3346354365348816,
0.24754320085048676,
-0.1925957351922989,
-0.09988147020339966,
0.04853153973817825,
0.10041186958551407,
0.07041244953870773,
0.32389381527900696,
0.3610106408596039,
-0.1123976781964302,
-0.37033551931381226,
0.26172012090682983,
0.022636037319898605,
-0.0020248754881322384,
-0.06982745230197906,
-0.09050032496452332,
-0.06045164912939072,
0.11832072585821152,
0.17591965198516846,
-0.13424862921237946,
0.7305377721786499,
-0.3213830888271332,
-0.2725655734539032,
0.00806537363678217,
-0.1487821787595749,
-0.2441181093454361,
0.19364723563194275,
-0.2615722417831421,
-0.0770544782280922,
-0.05674071982502937,
0.2037246972322464,
0.2127254158258438,
-0.2698204219341278,
0.014268078841269016,
-0.10447141528129578,
0.09225261956453323,
-0.17487266659736633,
0.07564341276884079,
0.229294091463089,
-0.12596210837364197,
0.3931882381439209,
0.12109939754009247,
0.0419386550784111,
0.014744496904313564,
-0.5269640684127808,
-0.28592005372047424,
0.12365222722291946,
-0.14899352192878723,
0.04984123632311821,
0.029707804322242737,
0.41154053807258606,
0.05413322150707245,
-0.04993387311697006,
-0.04550302028656006,
0.5454230308532715,
-0.09308114647865295,
0.16439172625541687,
-0.025051185861229897,
0.17369858920574188,
0.11587806046009064,
-0.06756116449832916,
-0.10420477390289307,
-0.06789262592792511,
-0.23369286954402924,
0.18090412020683289,
0.16762574017047882,
0.2531112730503082,
-0.17631155252456665,
-0.3689242899417877,
-0.05193059891462326,
0.03028462827205658,
-0.2524123787879944,
0.11926071345806122,
0.21400518715381622,
0.2907995879650116,
0.1754811853170395,
-0.0392327755689621,
0.13475248217582703,
-0.06836146861314774,
-0.3390929102897644,
-0.3115336298942566,
0.15130768716335297,
-0.2330189198255539,
-0.034365445375442505,
0.24109549820423126,
0.055999185889959335,
0.043200843036174774,
-0.006996836978942156,
-0.1914818286895752,
-0.08004570752382278,
-0.03177610784769058,
-0.19591344892978668,
-0.00967346876859665,
-0.046245355159044266,
0.006584314629435539,
0.16383667290210724,
0.12159392237663269,
-0.07560864835977554,
0.04833357036113739,
0.032291147857904434,
-0.3346937298774719,
-0.12138517946004868,
0.19013451039791107,
0.31586557626724243,
0.06712432205677032,
0.06413320451974869,
-0.26539212465286255,
-0.1195036917924881,
0.04114990681409836,
-0.3065928816795349,
-0.026537766680121422,
0.019578756764531136,
0.10220931470394135,
-0.1408911794424057,
-0.02734355814754963,
0.49803945422172546,
-0.5272693634033203,
0.11412221193313599,
-0.06346023827791214,
-0.12121780961751938,
0.12916654348373413,
0.08424312621355057,
-0.17596955597400665,
0.44065284729003906,
-0.3408789336681366,
0.2976420819759369,
0.34393808245658875,
-0.21115529537200928,
-0.37747013568878174,
0.48290494084358215,
-0.22673837840557098,
-0.06386403739452362,
0.13104096055030823,
0.08776234835386276,
-0.039417508989572525,
-0.3172626793384552,
-0.12590990960597992,
0.021430158987641335,
-0.22253036499023438,
0.004788870923221111,
0.031164228916168213,
0.09778040647506714,
0.30136796832084656,
0.22639282047748566,
0.13387514650821686,
0.4152972102165222,
0.11311236768960953,
0.13349828124046326,
0.3084481954574585,
-0.2900557816028595,
0.07657212018966675,
0.27012407779693604,
0.1881970763206482,
-0.11487212032079697,
0.11092889308929443,
-0.19814863801002502,
-0.4609101712703705,
0.06233784928917885,
0.1515798717737198,
-0.09503902494907379,
-0.009702821262180805,
0.22023336589336395,
-0.16389988362789154,
0.26049676537513733,
-0.20151114463806152,
0.07647745311260223,
0.3135073184967041,
0.4342458248138428,
-0.01875055581331253,
-0.46917232871055603,
-0.36912280321121216,
0.1855427622795105,
-0.4336848855018616,
-0.08741123974323273,
-0.2118092030286789,
0.3273254334926605,
0.050362586975097656,
-0.18209798634052277,
0.12033295631408691,
-0.03218939155340195,
0.14545951783657074,
-0.1475774347782135,
0.06693591922521591,
0.2875158190727234,
0.13769276440143585,
0.04011211916804314,
0.2702248692512512,
-0.056444887071847916,
0.005816509015858173,
-0.17615553736686707,
-0.03156669810414314,
-0.05363744869828224,
0.30184677243232727,
-0.22554545104503632,
0.11788814514875412,
0.10701517760753632,
-0.5034206509590149,
0.41020306944847107,
-0.04614672437310219,
-0.040276478976011276,
0.1107378825545311,
0.003591306507587433,
-0.014872729778289795,
-0.002966528059914708,
0.23997798562049866,
0.12288752943277359,
0.391394704580307,
-0.09457854926586151,
-0.2635660171508789,
-0.09179715067148209,
0.07784587144851685,
0.027539359405636787,
-0.06810424476861954,
0.05504070594906807,
0.022604092955589294,
0.08598582446575165,
0.15256789326667786,
0.07429372519254684,
0.41756585240364075,
0.15269628167152405,
0.13255153596401215,
-0.152817964553833,
0.18052233755588531,
-0.13717995584011078,
-0.05642874538898468,
0.1188475713133812,
0.36264660954475403,
0.22838513553142548,
0.030028210952878,
-0.13898181915283203,
-0.23967130482196808,
-0.25403138995170593,
0.02279636077582836,
0.26181837916374207,
-0.11561807245016098,
0.1743609458208084,
-0.2924191653728485,
-0.14260978996753693,
-0.02208130434155464,
-0.1485903412103653,
-0.16611310839653015,
-0.34960445761680603,
-0.2719742953777313,
0.26820608973503113,
-0.15019568800926208,
0.10385996103286743,
0.053485799580812454,
0.1986655443906784,
0.4385553300380707,
0.07987745851278305,
-0.10055386275053024,
-0.12699660658836365,
-0.17624004185199738,
0.1844765990972519,
0.18397966027259827,
-0.08076737821102142,
0.20071063935756683,
-0.2319933921098709,
0.05251532793045044,
-0.3234386742115021,
0.015313588082790375,
0.2403258979320526,
-0.05078579857945442,
-0.020714838057756424,
0.2559622824192047,
0.36467334628105164,
0.10009381175041199,
-0.268097460269928,
0.19684676826000214,
-0.11077447980642319,
-0.09542246907949448,
0.3193035423755646,
0.03130108863115311,
0.16528482735157013,
0.12819859385490417,
-0.2239370197057724,
-0.0877097025513649,
-0.30240803956985474,
0.1801837831735611,
0.047052107751369476,
0.29299697279930115,
0.209710955619812,
0.12107040733098984,
0.08887182176113129,
0.13892816007137299,
-0.029947688803076744,
-0.13134729862213135,
-0.29006025195121765,
0.2471218705177307,
-0.07308010756969452,
-0.25598442554473877,
-0.01091059111058712,
-0.03797193989157677,
0.30276432633399963,
0.27936819195747375,
-0.3268687129020691,
-0.1565699428319931,
0.13024891912937164,
-0.07514837384223938,
-0.08258909732103348,
0.20353414118289948,
0.028967157006263733,
-0.07483381778001785,
-0.2344229817390442,
-0.22847725450992584,
-0.053818315267562866,
0.3192124664783478,
-0.13152100145816803,
0.2357761263847351,
0.07092877477407455,
0.2600076198577881,
-0.04270137473940849,
0.32431110739707947,
0.027674475684762,
-0.14937929809093475,
0.3529597222805023,
-0.15136966109275818,
0.13585427403450012,
0.11652927845716476,
-0.47856399416923523,
-0.03318466618657112,
-0.18658152222633362,
-0.026105506345629692,
0.15275590121746063,
-0.3122880160808563,
-0.15101411938667297,
-0.3114672005176544,
0.10354552417993546,
-0.18860945105552673,
-0.2794387936592102,
0.14595407247543335,
0.02709067240357399,
0.12830479443073273,
0.10997346043586731,
0.027610911056399345,
-0.3691069483757019,
0.07880110293626785,
0.04255615174770355,
-0.15371643006801605,
-0.07855714112520218,
-0.07441772520542145,
-0.20204521715641022,
0.1676994413137436,
-0.11163579672574997,
0.1788313388824463,
-0.0474587008357048,
0.45863279700279236,
0.056784383952617645,
-0.2832908630371094,
-0.196374773979187,
-0.12299364805221558,
0.8702905178070068,
-0.03093629516661167,
0.11317437142133713,
-0.016168644651770592,
-0.29810813069343567,
0.11648891866207123,
0.022934159263968468,
-0.3650266230106354,
0.49918970465660095,
0.10340617597103119,
0.1808459609746933,
-0.2911246418952942,
-0.021395480260252953,
0.21450935304164886,
0.07861772924661636,
-0.07164095342159271,
-0.47564613819122314,
-0.0065490310080349445,
-0.05495971068739891,
-0.17980051040649414,
0.010034252889454365,
-0.22134843468666077,
0.22478637099266052,
0.05290043726563454,
0.06627802550792694,
-0.1722099930047989,
-0.13249187171459198,
0.2744024395942688,
0.04444018751382828,
0.15809181332588196,
-0.05692724511027336,
0.12259581685066223,
0.15071241557598114,
0.19155099987983704,
0.5013871788978577,
0.5859159827232361,
0.07243974506855011,
-0.19570326805114746,
0.503882646560669,
-0.31772834062576294,
0.36549264192581177,
0.3896714448928833,
-0.07419713586568832,
-0.10879476368427277,
-0.034411340951919556,
0.024934977293014526,
-0.3149097263813019,
0.18487270176410675,
0.3397897779941559,
0.04904650151729584,
-0.29212528467178345,
-0.22075733542442322,
0.271869421005249,
-0.040872007608413696,
0.09956447035074234,
0.4875320792198181,
-0.0320771299302578,
-0.05402928590774536,
0.0410257913172245,
0.004020031075924635,
0.7144198417663574,
0.19503019750118256,
0.0043344646692276,
0.31366822123527527,
0.2978020906448364,
0.38784632086753845,
-0.28230637311935425,
0.07561463862657547,
-0.2287655472755432,
-0.44571956992149353,
-0.041373640298843384,
-0.16071227192878723,
0.12396617233753204,
0.5199720859527588,
-0.08774027973413467,
0.30299097299575806,
0.07084597647190094,
0.25593429803848267,
0.09328959882259369,
0.10112527757883072,
-0.2591722309589386,
-0.21831391751766205,
-0.2573959231376648,
0.2442137748003006,
-0.17999711632728577,
-0.054595429450273514,
-0.1755998283624649,
-0.1671207845211029,
0.186370849609375,
-0.2929283082485199,
-0.04902127757668495,
0.1517827808856964,
-0.1589387208223343,
-0.013722124509513378,
0.15791437029838562,
-0.2371279001235962,
-0.1016179546713829,
-0.09432531893253326,
0.0076699103228747845,
-0.08176837861537933,
0.06230891868472099,
-0.14490585029125214,
0.08670098334550858,
0.07326860725879669,
-0.26426243782043457,
0.11254242807626724,
0.30990836024284363,
0.054024722427129745,
0.1030089408159256,
0.1100873127579689,
0.031356047838926315,
-0.2899361252784729,
0.24663354456424713,
0.15266023576259613,
-0.10554255545139313,
-0.6222410798072815,
-0.13943877816200256,
0.04588652774691582,
-0.0950850397348404,
-0.20676536858081818,
0.24341978132724762,
0.07417403161525726,
-0.26892200112342834,
0.025219669565558434,
0.16108307242393494,
-0.16628862917423248,
-0.034563351422548294,
0.2594369351863861,
0.17876286804676056,
-0.22244159877300262,
0.6101073622703552,
0.2891952395439148,
-0.1518898904323578,
-0.3654859960079193,
-0.23649731278419495,
0.3522564768791199,
-0.31391140818595886,
0.1704619824886322,
-0.25693947076797485,
0.0781741514801979,
0.09701486676931381,
0.12721557915210724,
0.19436727464199066,
0.2372312843799591,
-0.07151328027248383,
-0.3825671076774597,
-0.3023032546043396,
0.040571149438619614,
0.044810112565755844,
0.2854495644569397,
-0.03333865851163864,
-0.0783802717924118,
-0.038311321288347244,
0.143236443400383,
-0.4620806872844696,
-0.17640113830566406,
-0.3250729739665985,
0.13109616935253143,
0.1931867003440857,
-0.11518394201993942,
-0.011936822906136513,
0.22134973108768463,
0.27916479110717773,
0.3549240231513977,
0.02234383299946785,
-0.37422674894332886,
-0.00230914494022727,
0.03141675144433975,
0.08183694630861282,
-0.03695857152342796,
0.03979356959462166,
-0.1463409662246704,
-0.11882219463586807,
-0.2101290076971054,
-0.02229422889649868,
-0.14675086736679077,
-0.037936627864837646,
0.07774019241333008,
0.4277336001396179,
-0.028072167187929153,
-0.06886138767004013,
0.07002396136522293,
0.23923523724079132,
0.18550211191177368,
0.06212938204407692,
0.20730285346508026,
-0.0887286365032196,
-0.16053058207035065,
0.010379740968346596,
0.21520566940307617,
0.21215957403182983,
-0.18250036239624023,
0.09324690699577332,
-0.5744041204452515,
0.02328571118414402,
0.050437405705451965,
0.5401068329811096,
0.5258210897445679,
-0.1818741261959076,
-0.06082421913743019,
-0.02943107672035694,
0.27775266766548157,
-0.22843632102012634,
0.06909036636352539,
0.16571420431137085,
-0.09030186384916306,
0.12038201093673706,
0.256752610206604,
0.041635140776634216,
-0.16683538258075714,
0.1307792365550995,
-0.043990034610033035,
0.08156893402338028,
-0.146912083029747,
-0.04687821865081787,
0.20526517927646637,
-0.24077045917510986,
-0.05788961425423622,
0.2577085793018341,
0.5247350931167603,
-0.11889820545911789,
0.36051857471466064,
-0.1098157986998558,
0.22615529596805573,
-0.1725735366344452,
-0.3159618079662323,
-0.37274909019470215,
-0.7062898278236389,
0.05890478938817978,
0.2930518090724945,
0.12980198860168457,
0.05957755073904991,
-0.02691604755818844,
0.09956168383359909,
-0.14896081387996674,
0.059486113488674164,
-0.15994255244731903,
0.09044766426086426,
-0.22616231441497803,
0.24026386439800262,
-0.26827308535575867,
-0.2564069926738739,
-0.3685859143733978,
-0.12037083506584167,
-0.01612156443297863,
-0.10278395563364029,
0.18300758302211761,
-0.1434302031993866,
-0.10584518313407898,
-0.48394373059272766,
-0.1814810186624527,
-0.026297850534319878,
-0.19896575808525085,
-0.4415684640407562,
0.2378833293914795,
0.12007853388786316,
0.1439477801322937,
0.25255846977233887,
0.2616990804672241,
0.28392642736434937,
0.4093947410583496,
0.10956225544214249,
0.024256672710180283,
-0.2910696864128113,
-0.35402873158454895,
-0.12029512971639633,
0.0446808896958828,
-0.1832771897315979,
0.21370893716812134,
0.6087132096290588,
0.27196675539016724,
-0.20852378010749817,
-0.23833142220973969,
0.26404544711112976,
0.20550265908241272,
-0.1591355800628662,
-0.16642601788043976,
0.15423175692558289,
0.0013395308051258326,
-0.20276449620723724,
-0.10091248154640198,
-0.5024999976158142,
-0.2645452618598938,
0.23120847344398499,
-0.289338618516922,
0.2785489857196808,
0.04201824218034744,
0.16414135694503784,
-0.23012878000736237,
0.4377661645412445,
0.3896973431110382,
0.29070404171943665,
-0.32152554392814636,
-0.30664902925491333,
-0.49544134736061096,
0.16276593506336212,
-0.04289063438773155,
-0.1819300800561905,
0.0066589489579200745,
0.1619682013988495,
0.5141973495483398,
0.14612522721290588,
0.2872559428215027,
-0.17401187121868134,
-0.07788576930761337,
0.17765116691589355,
-0.3788415193557739,
-0.34335440397262573,
0.09820984303951263,
0.13650695979595184,
-0.03918293118476868,
-0.196604385972023,
0.22057431936264038,
0.0003250631270930171,
0.28861773014068604,
-0.026611344888806343,
-0.19788339734077454,
-0.06947537511587143,
-0.0004079495556652546,
0.21539495885372162,
0.0010015905136242509,
0.4100838303565979,
-0.15478825569152832,
0.05215322971343994,
-0.29882311820983887,
-0.35493186116218567,
-0.07259882241487503,
0.0789269357919693,
0.2043367624282837,
0.20696215331554413,
-0.09266003966331482,
0.17939718067646027,
-0.3429928719997406,
-0.01313972007483244,
-0.09396182745695114,
0.18394696712493896,
-0.19209930300712585,
0.2036663293838501,
-0.00932353176176548,
0.020948581397533417,
0.16399838030338287,
0.07304658740758896,
0.1338806301355362,
0.3260596990585327,
-0.19020119309425354,
-0.22530490159988403,
0.36659201979637146,
-0.35624438524246216,
-0.5792478322982788,
0.04443464055657387,
0.028105689212679863,
0.012587681412696838,
0.105699323117733,
-0.34533077478408813,
0.13461816310882568,
0.2688044011592865,
-0.16006408631801605,
-0.15659525990486145,
0.04793109372258186,
-0.18582452833652496,
0.09104228019714355,
0.008445488288998604,
0.1917692869901657,
0.1293390691280365,
-0.23821482062339783,
-0.17089740931987762,
-0.11861567944288254
] |
https://github.com/huggingface/datasets/issues/1765
|
Error iterating over Dataset with DataLoader
|
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_size=4)
batch = next(iter(dataloader))
getting
ValueError: cannot reshape array of size 8192 into shape (1,512,4)
I had put padding as 2048 for encoded_dataset
kindly help
|
I have a Dataset that I've mapped a tokenizer over:
```
encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids'])
encoded_dataset[:1]
```
```
{'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]),
'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113,
102]]),
'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])}
```
When I try to iterate as in the docs, I get errors:
```
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
next(iter(dataloader))
```
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-45-05180ba8aa35> in <module>()
1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
----> 2 next(iter(dataloader))
3 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader)
411 self._timeout = loader.timeout
412 self._collate_fn = loader.collate_fn
--> 413 self._sampler_iter = iter(self._index_sampler)
414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item()
415 self._persistent_workers = loader.persistent_workers
TypeError: 'int' object is not iterable
```
| 28 |
Error iterating over Dataset with DataLoader
|
[
-0.2586119472980499,
0.17651301622390747,
-0.25916752219200134,
0.2714109420776367,
0.20574364066123962,
0.06591738015413284,
0.48662233352661133,
0.332911878824234,
0.21566744148731232,
0.26193201541900635,
0.0628865584731102,
0.10956263542175293,
-0.1425773948431015,
0.15522097051143646,
-0.2400936335325241,
0.11608068645000458,
-0.17474119365215302,
0.4749227464199066,
-0.32467028498649597,
-0.05323737487196922,
-0.11093904823064804,
0.1128334105014801,
-0.15658223628997803,
0.03837107867002487,
-0.21530908346176147,
-0.11686703562736511,
-0.1584482342004776,
0.22067900002002716,
-0.3205884099006653,
-0.3617107570171356,
0.2923063635826111,
0.19345489144325256,
0.3052885830402374,
0.6260347366333008,
-0.00009999598114518449,
0.07179126888513565,
0.02665317803621292,
-0.07921718060970306,
-0.3382206857204437,
0.03329947590827942,
-0.13121171295642853,
0.047235582023859024,
-0.019195498898625374,
-0.3838583528995514,
0.15865644812583923,
-0.17622224986553192,
-0.1305333375930786,
-0.17256930470466614,
0.15088051557540894,
0.04116131737828255,
0.3346354365348816,
0.24754320085048676,
-0.1925957351922989,
-0.09988147020339966,
0.04853153973817825,
0.10041186958551407,
0.07041244953870773,
0.32389381527900696,
0.3610106408596039,
-0.1123976781964302,
-0.37033551931381226,
0.26172012090682983,
0.022636037319898605,
-0.0020248754881322384,
-0.06982745230197906,
-0.09050032496452332,
-0.06045164912939072,
0.11832072585821152,
0.17591965198516846,
-0.13424862921237946,
0.7305377721786499,
-0.3213830888271332,
-0.2725655734539032,
0.00806537363678217,
-0.1487821787595749,
-0.2441181093454361,
0.19364723563194275,
-0.2615722417831421,
-0.0770544782280922,
-0.05674071982502937,
0.2037246972322464,
0.2127254158258438,
-0.2698204219341278,
0.014268078841269016,
-0.10447141528129578,
0.09225261956453323,
-0.17487266659736633,
0.07564341276884079,
0.229294091463089,
-0.12596210837364197,
0.3931882381439209,
0.12109939754009247,
0.0419386550784111,
0.014744496904313564,
-0.5269640684127808,
-0.28592005372047424,
0.12365222722291946,
-0.14899352192878723,
0.04984123632311821,
0.029707804322242737,
0.41154053807258606,
0.05413322150707245,
-0.04993387311697006,
-0.04550302028656006,
0.5454230308532715,
-0.09308114647865295,
0.16439172625541687,
-0.025051185861229897,
0.17369858920574188,
0.11587806046009064,
-0.06756116449832916,
-0.10420477390289307,
-0.06789262592792511,
-0.23369286954402924,
0.18090412020683289,
0.16762574017047882,
0.2531112730503082,
-0.17631155252456665,
-0.3689242899417877,
-0.05193059891462326,
0.03028462827205658,
-0.2524123787879944,
0.11926071345806122,
0.21400518715381622,
0.2907995879650116,
0.1754811853170395,
-0.0392327755689621,
0.13475248217582703,
-0.06836146861314774,
-0.3390929102897644,
-0.3115336298942566,
0.15130768716335297,
-0.2330189198255539,
-0.034365445375442505,
0.24109549820423126,
0.055999185889959335,
0.043200843036174774,
-0.006996836978942156,
-0.1914818286895752,
-0.08004570752382278,
-0.03177610784769058,
-0.19591344892978668,
-0.00967346876859665,
-0.046245355159044266,
0.006584314629435539,
0.16383667290210724,
0.12159392237663269,
-0.07560864835977554,
0.04833357036113739,
0.032291147857904434,
-0.3346937298774719,
-0.12138517946004868,
0.19013451039791107,
0.31586557626724243,
0.06712432205677032,
0.06413320451974869,
-0.26539212465286255,
-0.1195036917924881,
0.04114990681409836,
-0.3065928816795349,
-0.026537766680121422,
0.019578756764531136,
0.10220931470394135,
-0.1408911794424057,
-0.02734355814754963,
0.49803945422172546,
-0.5272693634033203,
0.11412221193313599,
-0.06346023827791214,
-0.12121780961751938,
0.12916654348373413,
0.08424312621355057,
-0.17596955597400665,
0.44065284729003906,
-0.3408789336681366,
0.2976420819759369,
0.34393808245658875,
-0.21115529537200928,
-0.37747013568878174,
0.48290494084358215,
-0.22673837840557098,
-0.06386403739452362,
0.13104096055030823,
0.08776234835386276,
-0.039417508989572525,
-0.3172626793384552,
-0.12590990960597992,
0.021430158987641335,
-0.22253036499023438,
0.004788870923221111,
0.031164228916168213,
0.09778040647506714,
0.30136796832084656,
0.22639282047748566,
0.13387514650821686,
0.4152972102165222,
0.11311236768960953,
0.13349828124046326,
0.3084481954574585,
-0.2900557816028595,
0.07657212018966675,
0.27012407779693604,
0.1881970763206482,
-0.11487212032079697,
0.11092889308929443,
-0.19814863801002502,
-0.4609101712703705,
0.06233784928917885,
0.1515798717737198,
-0.09503902494907379,
-0.009702821262180805,
0.22023336589336395,
-0.16389988362789154,
0.26049676537513733,
-0.20151114463806152,
0.07647745311260223,
0.3135073184967041,
0.4342458248138428,
-0.01875055581331253,
-0.46917232871055603,
-0.36912280321121216,
0.1855427622795105,
-0.4336848855018616,
-0.08741123974323273,
-0.2118092030286789,
0.3273254334926605,
0.050362586975097656,
-0.18209798634052277,
0.12033295631408691,
-0.03218939155340195,
0.14545951783657074,
-0.1475774347782135,
0.06693591922521591,
0.2875158190727234,
0.13769276440143585,
0.04011211916804314,
0.2702248692512512,
-0.056444887071847916,
0.005816509015858173,
-0.17615553736686707,
-0.03156669810414314,
-0.05363744869828224,
0.30184677243232727,
-0.22554545104503632,
0.11788814514875412,
0.10701517760753632,
-0.5034206509590149,
0.41020306944847107,
-0.04614672437310219,
-0.040276478976011276,
0.1107378825545311,
0.003591306507587433,
-0.014872729778289795,
-0.002966528059914708,
0.23997798562049866,
0.12288752943277359,
0.391394704580307,
-0.09457854926586151,
-0.2635660171508789,
-0.09179715067148209,
0.07784587144851685,
0.027539359405636787,
-0.06810424476861954,
0.05504070594906807,
0.022604092955589294,
0.08598582446575165,
0.15256789326667786,
0.07429372519254684,
0.41756585240364075,
0.15269628167152405,
0.13255153596401215,
-0.152817964553833,
0.18052233755588531,
-0.13717995584011078,
-0.05642874538898468,
0.1188475713133812,
0.36264660954475403,
0.22838513553142548,
0.030028210952878,
-0.13898181915283203,
-0.23967130482196808,
-0.25403138995170593,
0.02279636077582836,
0.26181837916374207,
-0.11561807245016098,
0.1743609458208084,
-0.2924191653728485,
-0.14260978996753693,
-0.02208130434155464,
-0.1485903412103653,
-0.16611310839653015,
-0.34960445761680603,
-0.2719742953777313,
0.26820608973503113,
-0.15019568800926208,
0.10385996103286743,
0.053485799580812454,
0.1986655443906784,
0.4385553300380707,
0.07987745851278305,
-0.10055386275053024,
-0.12699660658836365,
-0.17624004185199738,
0.1844765990972519,
0.18397966027259827,
-0.08076737821102142,
0.20071063935756683,
-0.2319933921098709,
0.05251532793045044,
-0.3234386742115021,
0.015313588082790375,
0.2403258979320526,
-0.05078579857945442,
-0.020714838057756424,
0.2559622824192047,
0.36467334628105164,
0.10009381175041199,
-0.268097460269928,
0.19684676826000214,
-0.11077447980642319,
-0.09542246907949448,
0.3193035423755646,
0.03130108863115311,
0.16528482735157013,
0.12819859385490417,
-0.2239370197057724,
-0.0877097025513649,
-0.30240803956985474,
0.1801837831735611,
0.047052107751369476,
0.29299697279930115,
0.209710955619812,
0.12107040733098984,
0.08887182176113129,
0.13892816007137299,
-0.029947688803076744,
-0.13134729862213135,
-0.29006025195121765,
0.2471218705177307,
-0.07308010756969452,
-0.25598442554473877,
-0.01091059111058712,
-0.03797193989157677,
0.30276432633399963,
0.27936819195747375,
-0.3268687129020691,
-0.1565699428319931,
0.13024891912937164,
-0.07514837384223938,
-0.08258909732103348,
0.20353414118289948,
0.028967157006263733,
-0.07483381778001785,
-0.2344229817390442,
-0.22847725450992584,
-0.053818315267562866,
0.3192124664783478,
-0.13152100145816803,
0.2357761263847351,
0.07092877477407455,
0.2600076198577881,
-0.04270137473940849,
0.32431110739707947,
0.027674475684762,
-0.14937929809093475,
0.3529597222805023,
-0.15136966109275818,
0.13585427403450012,
0.11652927845716476,
-0.47856399416923523,
-0.03318466618657112,
-0.18658152222633362,
-0.026105506345629692,
0.15275590121746063,
-0.3122880160808563,
-0.15101411938667297,
-0.3114672005176544,
0.10354552417993546,
-0.18860945105552673,
-0.2794387936592102,
0.14595407247543335,
0.02709067240357399,
0.12830479443073273,
0.10997346043586731,
0.027610911056399345,
-0.3691069483757019,
0.07880110293626785,
0.04255615174770355,
-0.15371643006801605,
-0.07855714112520218,
-0.07441772520542145,
-0.20204521715641022,
0.1676994413137436,
-0.11163579672574997,
0.1788313388824463,
-0.0474587008357048,
0.45863279700279236,
0.056784383952617645,
-0.2832908630371094,
-0.196374773979187,
-0.12299364805221558,
0.8702905178070068,
-0.03093629516661167,
0.11317437142133713,
-0.016168644651770592,
-0.29810813069343567,
0.11648891866207123,
0.022934159263968468,
-0.3650266230106354,
0.49918970465660095,
0.10340617597103119,
0.1808459609746933,
-0.2911246418952942,
-0.021395480260252953,
0.21450935304164886,
0.07861772924661636,
-0.07164095342159271,
-0.47564613819122314,
-0.0065490310080349445,
-0.05495971068739891,
-0.17980051040649414,
0.010034252889454365,
-0.22134843468666077,
0.22478637099266052,
0.05290043726563454,
0.06627802550792694,
-0.1722099930047989,
-0.13249187171459198,
0.2744024395942688,
0.04444018751382828,
0.15809181332588196,
-0.05692724511027336,
0.12259581685066223,
0.15071241557598114,
0.19155099987983704,
0.5013871788978577,
0.5859159827232361,
0.07243974506855011,
-0.19570326805114746,
0.503882646560669,
-0.31772834062576294,
0.36549264192581177,
0.3896714448928833,
-0.07419713586568832,
-0.10879476368427277,
-0.034411340951919556,
0.024934977293014526,
-0.3149097263813019,
0.18487270176410675,
0.3397897779941559,
0.04904650151729584,
-0.29212528467178345,
-0.22075733542442322,
0.271869421005249,
-0.040872007608413696,
0.09956447035074234,
0.4875320792198181,
-0.0320771299302578,
-0.05402928590774536,
0.0410257913172245,
0.004020031075924635,
0.7144198417663574,
0.19503019750118256,
0.0043344646692276,
0.31366822123527527,
0.2978020906448364,
0.38784632086753845,
-0.28230637311935425,
0.07561463862657547,
-0.2287655472755432,
-0.44571956992149353,
-0.041373640298843384,
-0.16071227192878723,
0.12396617233753204,
0.5199720859527588,
-0.08774027973413467,
0.30299097299575806,
0.07084597647190094,
0.25593429803848267,
0.09328959882259369,
0.10112527757883072,
-0.2591722309589386,
-0.21831391751766205,
-0.2573959231376648,
0.2442137748003006,
-0.17999711632728577,
-0.054595429450273514,
-0.1755998283624649,
-0.1671207845211029,
0.186370849609375,
-0.2929283082485199,
-0.04902127757668495,
0.1517827808856964,
-0.1589387208223343,
-0.013722124509513378,
0.15791437029838562,
-0.2371279001235962,
-0.1016179546713829,
-0.09432531893253326,
0.0076699103228747845,
-0.08176837861537933,
0.06230891868472099,
-0.14490585029125214,
0.08670098334550858,
0.07326860725879669,
-0.26426243782043457,
0.11254242807626724,
0.30990836024284363,
0.054024722427129745,
0.1030089408159256,
0.1100873127579689,
0.031356047838926315,
-0.2899361252784729,
0.24663354456424713,
0.15266023576259613,
-0.10554255545139313,
-0.6222410798072815,
-0.13943877816200256,
0.04588652774691582,
-0.0950850397348404,
-0.20676536858081818,
0.24341978132724762,
0.07417403161525726,
-0.26892200112342834,
0.025219669565558434,
0.16108307242393494,
-0.16628862917423248,
-0.034563351422548294,
0.2594369351863861,
0.17876286804676056,
-0.22244159877300262,
0.6101073622703552,
0.2891952395439148,
-0.1518898904323578,
-0.3654859960079193,
-0.23649731278419495,
0.3522564768791199,
-0.31391140818595886,
0.1704619824886322,
-0.25693947076797485,
0.0781741514801979,
0.09701486676931381,
0.12721557915210724,
0.19436727464199066,
0.2372312843799591,
-0.07151328027248383,
-0.3825671076774597,
-0.3023032546043396,
0.040571149438619614,
0.044810112565755844,
0.2854495644569397,
-0.03333865851163864,
-0.0783802717924118,
-0.038311321288347244,
0.143236443400383,
-0.4620806872844696,
-0.17640113830566406,
-0.3250729739665985,
0.13109616935253143,
0.1931867003440857,
-0.11518394201993942,
-0.011936822906136513,
0.22134973108768463,
0.27916479110717773,
0.3549240231513977,
0.02234383299946785,
-0.37422674894332886,
-0.00230914494022727,
0.03141675144433975,
0.08183694630861282,
-0.03695857152342796,
0.03979356959462166,
-0.1463409662246704,
-0.11882219463586807,
-0.2101290076971054,
-0.02229422889649868,
-0.14675086736679077,
-0.037936627864837646,
0.07774019241333008,
0.4277336001396179,
-0.028072167187929153,
-0.06886138767004013,
0.07002396136522293,
0.23923523724079132,
0.18550211191177368,
0.06212938204407692,
0.20730285346508026,
-0.0887286365032196,
-0.16053058207035065,
0.010379740968346596,
0.21520566940307617,
0.21215957403182983,
-0.18250036239624023,
0.09324690699577332,
-0.5744041204452515,
0.02328571118414402,
0.050437405705451965,
0.5401068329811096,
0.5258210897445679,
-0.1818741261959076,
-0.06082421913743019,
-0.02943107672035694,
0.27775266766548157,
-0.22843632102012634,
0.06909036636352539,
0.16571420431137085,
-0.09030186384916306,
0.12038201093673706,
0.256752610206604,
0.041635140776634216,
-0.16683538258075714,
0.1307792365550995,
-0.043990034610033035,
0.08156893402338028,
-0.146912083029747,
-0.04687821865081787,
0.20526517927646637,
-0.24077045917510986,
-0.05788961425423622,
0.2577085793018341,
0.5247350931167603,
-0.11889820545911789,
0.36051857471466064,
-0.1098157986998558,
0.22615529596805573,
-0.1725735366344452,
-0.3159618079662323,
-0.37274909019470215,
-0.7062898278236389,
0.05890478938817978,
0.2930518090724945,
0.12980198860168457,
0.05957755073904991,
-0.02691604755818844,
0.09956168383359909,
-0.14896081387996674,
0.059486113488674164,
-0.15994255244731903,
0.09044766426086426,
-0.22616231441497803,
0.24026386439800262,
-0.26827308535575867,
-0.2564069926738739,
-0.3685859143733978,
-0.12037083506584167,
-0.01612156443297863,
-0.10278395563364029,
0.18300758302211761,
-0.1434302031993866,
-0.10584518313407898,
-0.48394373059272766,
-0.1814810186624527,
-0.026297850534319878,
-0.19896575808525085,
-0.4415684640407562,
0.2378833293914795,
0.12007853388786316,
0.1439477801322937,
0.25255846977233887,
0.2616990804672241,
0.28392642736434937,
0.4093947410583496,
0.10956225544214249,
0.024256672710180283,
-0.2910696864128113,
-0.35402873158454895,
-0.12029512971639633,
0.0446808896958828,
-0.1832771897315979,
0.21370893716812134,
0.6087132096290588,
0.27196675539016724,
-0.20852378010749817,
-0.23833142220973969,
0.26404544711112976,
0.20550265908241272,
-0.1591355800628662,
-0.16642601788043976,
0.15423175692558289,
0.0013395308051258326,
-0.20276449620723724,
-0.10091248154640198,
-0.5024999976158142,
-0.2645452618598938,
0.23120847344398499,
-0.289338618516922,
0.2785489857196808,
0.04201824218034744,
0.16414135694503784,
-0.23012878000736237,
0.4377661645412445,
0.3896973431110382,
0.29070404171943665,
-0.32152554392814636,
-0.30664902925491333,
-0.49544134736061096,
0.16276593506336212,
-0.04289063438773155,
-0.1819300800561905,
0.0066589489579200745,
0.1619682013988495,
0.5141973495483398,
0.14612522721290588,
0.2872559428215027,
-0.17401187121868134,
-0.07788576930761337,
0.17765116691589355,
-0.3788415193557739,
-0.34335440397262573,
0.09820984303951263,
0.13650695979595184,
-0.03918293118476868,
-0.196604385972023,
0.22057431936264038,
0.0003250631270930171,
0.28861773014068604,
-0.026611344888806343,
-0.19788339734077454,
-0.06947537511587143,
-0.0004079495556652546,
0.21539495885372162,
0.0010015905136242509,
0.4100838303565979,
-0.15478825569152832,
0.05215322971343994,
-0.29882311820983887,
-0.35493186116218567,
-0.07259882241487503,
0.0789269357919693,
0.2043367624282837,
0.20696215331554413,
-0.09266003966331482,
0.17939718067646027,
-0.3429928719997406,
-0.01313972007483244,
-0.09396182745695114,
0.18394696712493896,
-0.19209930300712585,
0.2036663293838501,
-0.00932353176176548,
0.020948581397533417,
0.16399838030338287,
0.07304658740758896,
0.1338806301355362,
0.3260596990585327,
-0.19020119309425354,
-0.22530490159988403,
0.36659201979637146,
-0.35624438524246216,
-0.5792478322982788,
0.04443464055657387,
0.028105689212679863,
0.012587681412696838,
0.105699323117733,
-0.34533077478408813,
0.13461816310882568,
0.2688044011592865,
-0.16006408631801605,
-0.15659525990486145,
0.04793109372258186,
-0.18582452833652496,
0.09104228019714355,
0.008445488288998604,
0.1917692869901657,
0.1293390691280365,
-0.23821482062339783,
-0.17089740931987762,
-0.11861567944288254
] |
https://github.com/huggingface/datasets/issues/1765
|
Error iterating over Dataset with DataLoader
|
data_loader_val = torch.utils.data.DataLoader(val_dataset, batch_size=32, shuffle=True, drop_last=False, num_workers=0)
dataiter = iter(data_loader_val)
images, _ = next(dataiter)
getting -> TypeError: 'list' object is not callable
Cannot iterate through the data. Kindly suggest.
|
I have a Dataset that I've mapped a tokenizer over:
```
encoded_dataset.set_format(type='torch',columns=['attention_mask','input_ids','token_type_ids'])
encoded_dataset[:1]
```
```
{'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]),
'input_ids': tensor([[ 101, 178, 1198, 1400, 1714, 22233, 21365, 4515, 8618, 1113,
102]]),
'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])}
```
When I try to iterate as in the docs, I get errors:
```
dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
next(iter(dataloader))
```
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-45-05180ba8aa35> in <module>()
1 dataloader = torch.utils.data.DataLoader(encoded_dataset, batch_sampler=32)
----> 2 next(iter(dataloader))
3 frames
/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py in __init__(self, loader)
411 self._timeout = loader.timeout
412 self._collate_fn = loader.collate_fn
--> 413 self._sampler_iter = iter(self._index_sampler)
414 self._base_seed = torch.empty((), dtype=torch.int64).random_(generator=loader.generator).item()
415 self._persistent_workers = loader.persistent_workers
TypeError: 'int' object is not iterable
```
| 29 |
Error iterating over Dataset with DataLoader
|
[
-0.2586119472980499,
0.17651301622390747,
-0.25916752219200134,
0.2714109420776367,
0.20574364066123962,
0.06591738015413284,
0.48662233352661133,
0.332911878824234,
0.21566744148731232,
0.26193201541900635,
0.0628865584731102,
0.10956263542175293,
-0.1425773948431015,
0.15522097051143646,
-0.2400936335325241,
0.11608068645000458,
-0.17474119365215302,
0.4749227464199066,
-0.32467028498649597,
-0.05323737487196922,
-0.11093904823064804,
0.1128334105014801,
-0.15658223628997803,
0.03837107867002487,
-0.21530908346176147,
-0.11686703562736511,
-0.1584482342004776,
0.22067900002002716,
-0.3205884099006653,
-0.3617107570171356,
0.2923063635826111,
0.19345489144325256,
0.3052885830402374,
0.6260347366333008,
-0.00009999598114518449,
0.07179126888513565,
0.02665317803621292,
-0.07921718060970306,
-0.3382206857204437,
0.03329947590827942,
-0.13121171295642853,
0.047235582023859024,
-0.019195498898625374,
-0.3838583528995514,
0.15865644812583923,
-0.17622224986553192,
-0.1305333375930786,
-0.17256930470466614,
0.15088051557540894,
0.04116131737828255,
0.3346354365348816,
0.24754320085048676,
-0.1925957351922989,
-0.09988147020339966,
0.04853153973817825,
0.10041186958551407,
0.07041244953870773,
0.32389381527900696,
0.3610106408596039,
-0.1123976781964302,
-0.37033551931381226,
0.26172012090682983,
0.022636037319898605,
-0.0020248754881322384,
-0.06982745230197906,
-0.09050032496452332,
-0.06045164912939072,
0.11832072585821152,
0.17591965198516846,
-0.13424862921237946,
0.7305377721786499,
-0.3213830888271332,
-0.2725655734539032,
0.00806537363678217,
-0.1487821787595749,
-0.2441181093454361,
0.19364723563194275,
-0.2615722417831421,
-0.0770544782280922,
-0.05674071982502937,
0.2037246972322464,
0.2127254158258438,
-0.2698204219341278,
0.014268078841269016,
-0.10447141528129578,
0.09225261956453323,
-0.17487266659736633,
0.07564341276884079,
0.229294091463089,
-0.12596210837364197,
0.3931882381439209,
0.12109939754009247,
0.0419386550784111,
0.014744496904313564,
-0.5269640684127808,
-0.28592005372047424,
0.12365222722291946,
-0.14899352192878723,
0.04984123632311821,
0.029707804322242737,
0.41154053807258606,
0.05413322150707245,
-0.04993387311697006,
-0.04550302028656006,
0.5454230308532715,
-0.09308114647865295,
0.16439172625541687,
-0.025051185861229897,
0.17369858920574188,
0.11587806046009064,
-0.06756116449832916,
-0.10420477390289307,
-0.06789262592792511,
-0.23369286954402924,
0.18090412020683289,
0.16762574017047882,
0.2531112730503082,
-0.17631155252456665,
-0.3689242899417877,
-0.05193059891462326,
0.03028462827205658,
-0.2524123787879944,
0.11926071345806122,
0.21400518715381622,
0.2907995879650116,
0.1754811853170395,
-0.0392327755689621,
0.13475248217582703,
-0.06836146861314774,
-0.3390929102897644,
-0.3115336298942566,
0.15130768716335297,
-0.2330189198255539,
-0.034365445375442505,
0.24109549820423126,
0.055999185889959335,
0.043200843036174774,
-0.006996836978942156,
-0.1914818286895752,
-0.08004570752382278,
-0.03177610784769058,
-0.19591344892978668,
-0.00967346876859665,
-0.046245355159044266,
0.006584314629435539,
0.16383667290210724,
0.12159392237663269,
-0.07560864835977554,
0.04833357036113739,
0.032291147857904434,
-0.3346937298774719,
-0.12138517946004868,
0.19013451039791107,
0.31586557626724243,
0.06712432205677032,
0.06413320451974869,
-0.26539212465286255,
-0.1195036917924881,
0.04114990681409836,
-0.3065928816795349,
-0.026537766680121422,
0.019578756764531136,
0.10220931470394135,
-0.1408911794424057,
-0.02734355814754963,
0.49803945422172546,
-0.5272693634033203,
0.11412221193313599,
-0.06346023827791214,
-0.12121780961751938,
0.12916654348373413,
0.08424312621355057,
-0.17596955597400665,
0.44065284729003906,
-0.3408789336681366,
0.2976420819759369,
0.34393808245658875,
-0.21115529537200928,
-0.37747013568878174,
0.48290494084358215,
-0.22673837840557098,
-0.06386403739452362,
0.13104096055030823,
0.08776234835386276,
-0.039417508989572525,
-0.3172626793384552,
-0.12590990960597992,
0.021430158987641335,
-0.22253036499023438,
0.004788870923221111,
0.031164228916168213,
0.09778040647506714,
0.30136796832084656,
0.22639282047748566,
0.13387514650821686,
0.4152972102165222,
0.11311236768960953,
0.13349828124046326,
0.3084481954574585,
-0.2900557816028595,
0.07657212018966675,
0.27012407779693604,
0.1881970763206482,
-0.11487212032079697,
0.11092889308929443,
-0.19814863801002502,
-0.4609101712703705,
0.06233784928917885,
0.1515798717737198,
-0.09503902494907379,
-0.009702821262180805,
0.22023336589336395,
-0.16389988362789154,
0.26049676537513733,
-0.20151114463806152,
0.07647745311260223,
0.3135073184967041,
0.4342458248138428,
-0.01875055581331253,
-0.46917232871055603,
-0.36912280321121216,
0.1855427622795105,
-0.4336848855018616,
-0.08741123974323273,
-0.2118092030286789,
0.3273254334926605,
0.050362586975097656,
-0.18209798634052277,
0.12033295631408691,
-0.03218939155340195,
0.14545951783657074,
-0.1475774347782135,
0.06693591922521591,
0.2875158190727234,
0.13769276440143585,
0.04011211916804314,
0.2702248692512512,
-0.056444887071847916,
0.005816509015858173,
-0.17615553736686707,
-0.03156669810414314,
-0.05363744869828224,
0.30184677243232727,
-0.22554545104503632,
0.11788814514875412,
0.10701517760753632,
-0.5034206509590149,
0.41020306944847107,
-0.04614672437310219,
-0.040276478976011276,
0.1107378825545311,
0.003591306507587433,
-0.014872729778289795,
-0.002966528059914708,
0.23997798562049866,
0.12288752943277359,
0.391394704580307,
-0.09457854926586151,
-0.2635660171508789,
-0.09179715067148209,
0.07784587144851685,
0.027539359405636787,
-0.06810424476861954,
0.05504070594906807,
0.022604092955589294,
0.08598582446575165,
0.15256789326667786,
0.07429372519254684,
0.41756585240364075,
0.15269628167152405,
0.13255153596401215,
-0.152817964553833,
0.18052233755588531,
-0.13717995584011078,
-0.05642874538898468,
0.1188475713133812,
0.36264660954475403,
0.22838513553142548,
0.030028210952878,
-0.13898181915283203,
-0.23967130482196808,
-0.25403138995170593,
0.02279636077582836,
0.26181837916374207,
-0.11561807245016098,
0.1743609458208084,
-0.2924191653728485,
-0.14260978996753693,
-0.02208130434155464,
-0.1485903412103653,
-0.16611310839653015,
-0.34960445761680603,
-0.2719742953777313,
0.26820608973503113,
-0.15019568800926208,
0.10385996103286743,
0.053485799580812454,
0.1986655443906784,
0.4385553300380707,
0.07987745851278305,
-0.10055386275053024,
-0.12699660658836365,
-0.17624004185199738,
0.1844765990972519,
0.18397966027259827,
-0.08076737821102142,
0.20071063935756683,
-0.2319933921098709,
0.05251532793045044,
-0.3234386742115021,
0.015313588082790375,
0.2403258979320526,
-0.05078579857945442,
-0.020714838057756424,
0.2559622824192047,
0.36467334628105164,
0.10009381175041199,
-0.268097460269928,
0.19684676826000214,
-0.11077447980642319,
-0.09542246907949448,
0.3193035423755646,
0.03130108863115311,
0.16528482735157013,
0.12819859385490417,
-0.2239370197057724,
-0.0877097025513649,
-0.30240803956985474,
0.1801837831735611,
0.047052107751369476,
0.29299697279930115,
0.209710955619812,
0.12107040733098984,
0.08887182176113129,
0.13892816007137299,
-0.029947688803076744,
-0.13134729862213135,
-0.29006025195121765,
0.2471218705177307,
-0.07308010756969452,
-0.25598442554473877,
-0.01091059111058712,
-0.03797193989157677,
0.30276432633399963,
0.27936819195747375,
-0.3268687129020691,
-0.1565699428319931,
0.13024891912937164,
-0.07514837384223938,
-0.08258909732103348,
0.20353414118289948,
0.028967157006263733,
-0.07483381778001785,
-0.2344229817390442,
-0.22847725450992584,
-0.053818315267562866,
0.3192124664783478,
-0.13152100145816803,
0.2357761263847351,
0.07092877477407455,
0.2600076198577881,
-0.04270137473940849,
0.32431110739707947,
0.027674475684762,
-0.14937929809093475,
0.3529597222805023,
-0.15136966109275818,
0.13585427403450012,
0.11652927845716476,
-0.47856399416923523,
-0.03318466618657112,
-0.18658152222633362,
-0.026105506345629692,
0.15275590121746063,
-0.3122880160808563,
-0.15101411938667297,
-0.3114672005176544,
0.10354552417993546,
-0.18860945105552673,
-0.2794387936592102,
0.14595407247543335,
0.02709067240357399,
0.12830479443073273,
0.10997346043586731,
0.027610911056399345,
-0.3691069483757019,
0.07880110293626785,
0.04255615174770355,
-0.15371643006801605,
-0.07855714112520218,
-0.07441772520542145,
-0.20204521715641022,
0.1676994413137436,
-0.11163579672574997,
0.1788313388824463,
-0.0474587008357048,
0.45863279700279236,
0.056784383952617645,
-0.2832908630371094,
-0.196374773979187,
-0.12299364805221558,
0.8702905178070068,
-0.03093629516661167,
0.11317437142133713,
-0.016168644651770592,
-0.29810813069343567,
0.11648891866207123,
0.022934159263968468,
-0.3650266230106354,
0.49918970465660095,
0.10340617597103119,
0.1808459609746933,
-0.2911246418952942,
-0.021395480260252953,
0.21450935304164886,
0.07861772924661636,
-0.07164095342159271,
-0.47564613819122314,
-0.0065490310080349445,
-0.05495971068739891,
-0.17980051040649414,
0.010034252889454365,
-0.22134843468666077,
0.22478637099266052,
0.05290043726563454,
0.06627802550792694,
-0.1722099930047989,
-0.13249187171459198,
0.2744024395942688,
0.04444018751382828,
0.15809181332588196,
-0.05692724511027336,
0.12259581685066223,
0.15071241557598114,
0.19155099987983704,
0.5013871788978577,
0.5859159827232361,
0.07243974506855011,
-0.19570326805114746,
0.503882646560669,
-0.31772834062576294,
0.36549264192581177,
0.3896714448928833,
-0.07419713586568832,
-0.10879476368427277,
-0.034411340951919556,
0.024934977293014526,
-0.3149097263813019,
0.18487270176410675,
0.3397897779941559,
0.04904650151729584,
-0.29212528467178345,
-0.22075733542442322,
0.271869421005249,
-0.040872007608413696,
0.09956447035074234,
0.4875320792198181,
-0.0320771299302578,
-0.05402928590774536,
0.0410257913172245,
0.004020031075924635,
0.7144198417663574,
0.19503019750118256,
0.0043344646692276,
0.31366822123527527,
0.2978020906448364,
0.38784632086753845,
-0.28230637311935425,
0.07561463862657547,
-0.2287655472755432,
-0.44571956992149353,
-0.041373640298843384,
-0.16071227192878723,
0.12396617233753204,
0.5199720859527588,
-0.08774027973413467,
0.30299097299575806,
0.07084597647190094,
0.25593429803848267,
0.09328959882259369,
0.10112527757883072,
-0.2591722309589386,
-0.21831391751766205,
-0.2573959231376648,
0.2442137748003006,
-0.17999711632728577,
-0.054595429450273514,
-0.1755998283624649,
-0.1671207845211029,
0.186370849609375,
-0.2929283082485199,
-0.04902127757668495,
0.1517827808856964,
-0.1589387208223343,
-0.013722124509513378,
0.15791437029838562,
-0.2371279001235962,
-0.1016179546713829,
-0.09432531893253326,
0.0076699103228747845,
-0.08176837861537933,
0.06230891868472099,
-0.14490585029125214,
0.08670098334550858,
0.07326860725879669,
-0.26426243782043457,
0.11254242807626724,
0.30990836024284363,
0.054024722427129745,
0.1030089408159256,
0.1100873127579689,
0.031356047838926315,
-0.2899361252784729,
0.24663354456424713,
0.15266023576259613,
-0.10554255545139313,
-0.6222410798072815,
-0.13943877816200256,
0.04588652774691582,
-0.0950850397348404,
-0.20676536858081818,
0.24341978132724762,
0.07417403161525726,
-0.26892200112342834,
0.025219669565558434,
0.16108307242393494,
-0.16628862917423248,
-0.034563351422548294,
0.2594369351863861,
0.17876286804676056,
-0.22244159877300262,
0.6101073622703552,
0.2891952395439148,
-0.1518898904323578,
-0.3654859960079193,
-0.23649731278419495,
0.3522564768791199,
-0.31391140818595886,
0.1704619824886322,
-0.25693947076797485,
0.0781741514801979,
0.09701486676931381,
0.12721557915210724,
0.19436727464199066,
0.2372312843799591,
-0.07151328027248383,
-0.3825671076774597,
-0.3023032546043396,
0.040571149438619614,
0.044810112565755844,
0.2854495644569397,
-0.03333865851163864,
-0.0783802717924118,
-0.038311321288347244,
0.143236443400383,
-0.4620806872844696,
-0.17640113830566406,
-0.3250729739665985,
0.13109616935253143,
0.1931867003440857,
-0.11518394201993942,
-0.011936822906136513,
0.22134973108768463,
0.27916479110717773,
0.3549240231513977,
0.02234383299946785,
-0.37422674894332886,
-0.00230914494022727,
0.03141675144433975,
0.08183694630861282,
-0.03695857152342796,
0.03979356959462166,
-0.1463409662246704,
-0.11882219463586807,
-0.2101290076971054,
-0.02229422889649868,
-0.14675086736679077,
-0.037936627864837646,
0.07774019241333008,
0.4277336001396179,
-0.028072167187929153,
-0.06886138767004013,
0.07002396136522293,
0.23923523724079132,
0.18550211191177368,
0.06212938204407692,
0.20730285346508026,
-0.0887286365032196,
-0.16053058207035065,
0.010379740968346596,
0.21520566940307617,
0.21215957403182983,
-0.18250036239624023,
0.09324690699577332,
-0.5744041204452515,
0.02328571118414402,
0.050437405705451965,
0.5401068329811096,
0.5258210897445679,
-0.1818741261959076,
-0.06082421913743019,
-0.02943107672035694,
0.27775266766548157,
-0.22843632102012634,
0.06909036636352539,
0.16571420431137085,
-0.09030186384916306,
0.12038201093673706,
0.256752610206604,
0.041635140776634216,
-0.16683538258075714,
0.1307792365550995,
-0.043990034610033035,
0.08156893402338028,
-0.146912083029747,
-0.04687821865081787,
0.20526517927646637,
-0.24077045917510986,
-0.05788961425423622,
0.2577085793018341,
0.5247350931167603,
-0.11889820545911789,
0.36051857471466064,
-0.1098157986998558,
0.22615529596805573,
-0.1725735366344452,
-0.3159618079662323,
-0.37274909019470215,
-0.7062898278236389,
0.05890478938817978,
0.2930518090724945,
0.12980198860168457,
0.05957755073904991,
-0.02691604755818844,
0.09956168383359909,
-0.14896081387996674,
0.059486113488674164,
-0.15994255244731903,
0.09044766426086426,
-0.22616231441497803,
0.24026386439800262,
-0.26827308535575867,
-0.2564069926738739,
-0.3685859143733978,
-0.12037083506584167,
-0.01612156443297863,
-0.10278395563364029,
0.18300758302211761,
-0.1434302031993866,
-0.10584518313407898,
-0.48394373059272766,
-0.1814810186624527,
-0.026297850534319878,
-0.19896575808525085,
-0.4415684640407562,
0.2378833293914795,
0.12007853388786316,
0.1439477801322937,
0.25255846977233887,
0.2616990804672241,
0.28392642736434937,
0.4093947410583496,
0.10956225544214249,
0.024256672710180283,
-0.2910696864128113,
-0.35402873158454895,
-0.12029512971639633,
0.0446808896958828,
-0.1832771897315979,
0.21370893716812134,
0.6087132096290588,
0.27196675539016724,
-0.20852378010749817,
-0.23833142220973969,
0.26404544711112976,
0.20550265908241272,
-0.1591355800628662,
-0.16642601788043976,
0.15423175692558289,
0.0013395308051258326,
-0.20276449620723724,
-0.10091248154640198,
-0.5024999976158142,
-0.2645452618598938,
0.23120847344398499,
-0.289338618516922,
0.2785489857196808,
0.04201824218034744,
0.16414135694503784,
-0.23012878000736237,
0.4377661645412445,
0.3896973431110382,
0.29070404171943665,
-0.32152554392814636,
-0.30664902925491333,
-0.49544134736061096,
0.16276593506336212,
-0.04289063438773155,
-0.1819300800561905,
0.0066589489579200745,
0.1619682013988495,
0.5141973495483398,
0.14612522721290588,
0.2872559428215027,
-0.17401187121868134,
-0.07788576930761337,
0.17765116691589355,
-0.3788415193557739,
-0.34335440397262573,
0.09820984303951263,
0.13650695979595184,
-0.03918293118476868,
-0.196604385972023,
0.22057431936264038,
0.0003250631270930171,
0.28861773014068604,
-0.026611344888806343,
-0.19788339734077454,
-0.06947537511587143,
-0.0004079495556652546,
0.21539495885372162,
0.0010015905136242509,
0.4100838303565979,
-0.15478825569152832,
0.05215322971343994,
-0.29882311820983887,
-0.35493186116218567,
-0.07259882241487503,
0.0789269357919693,
0.2043367624282837,
0.20696215331554413,
-0.09266003966331482,
0.17939718067646027,
-0.3429928719997406,
-0.01313972007483244,
-0.09396182745695114,
0.18394696712493896,
-0.19209930300712585,
0.2036663293838501,
-0.00932353176176548,
0.020948581397533417,
0.16399838030338287,
0.07304658740758896,
0.1338806301355362,
0.3260596990585327,
-0.19020119309425354,
-0.22530490159988403,
0.36659201979637146,
-0.35624438524246216,
-0.5792478322982788,
0.04443464055657387,
0.028105689212679863,
0.012587681412696838,
0.105699323117733,
-0.34533077478408813,
0.13461816310882568,
0.2688044011592865,
-0.16006408631801605,
-0.15659525990486145,
0.04793109372258186,
-0.18582452833652496,
0.09104228019714355,
0.008445488288998604,
0.1917692869901657,
0.1293390691280365,
-0.23821482062339783,
-0.17089740931987762,
-0.11861567944288254
] |
https://github.com/huggingface/datasets/issues/1762
|
Unable to format dataset to CUDA Tensors
|
Hi ! You can get CUDA tensors with
```python
dataset.set_format("torch", columns=columns, device="cuda")
```
Indeed `set_format` passes the `**kwargs` to `torch.tensor`
|
Hi,
I came across this [link](https://huggingface.co/docs/datasets/torch_tensorflow.html) where the docs show show to convert a dataset to a particular format. I see that there is an option to convert it to tensors, but I don't see any option to convert it to CUDA tensors.
I tried this, but Dataset doesn't support assignment:
```
columns=['input_ids', 'token_type_ids', 'attention_mask', 'start_positions','end_positions']
samples.set_format(type='torch', columns = columns)
for column in columns:
samples[column].to(torch.device(self.config.device))
```
There should be an option to do so, or if there is already a way to do this, please let me know.
Thanks,
Gunjan
| 20 |
Unable to format dataset to CUDA Tensors
|
[
-0.3597605526447296,
-0.02451677806675434,
-0.23331353068351746,
0.13029710948467255,
0.4579010605812073,
0.11975184082984924,
0.5190896987915039,
0.45327478647232056,
-0.0732676088809967,
0.11849381774663925,
0.0091622956097126,
0.1469288170337677,
-0.00008795668691163883,
0.2750169634819031,
0.04235495626926422,
-0.05319526419043541,
0.11733055114746094,
0.31895244121551514,
-0.08650189638137817,
-0.17316943407058716,
-0.013999090529978275,
0.07858037203550339,
-0.024778835475444794,
-0.2953484356403351,
-0.5159314870834351,
-0.3734038174152374,
0.10631163418292999,
0.0464407317340374,
-0.09493459016084671,
0.1225738450884819,
0.17562682926654816,
0.1344018578529358,
0.12881949543952942,
0.49438050389289856,
-0.00010457474854774773,
0.1906404197216034,
-0.3117884397506714,
-0.05335204675793648,
-0.07128342241048813,
0.04882872477173805,
-0.20431950688362122,
-0.21869507431983948,
0.08205538243055344,
-0.2830753028392792,
-0.2301236093044281,
-0.046610452234745026,
-0.08912894129753113,
-0.28762468695640564,
0.3794006407260895,
0.41890907287597656,
0.2935163378715515,
0.10196617990732193,
0.2033626139163971,
0.03235219791531563,
-0.21852263808250427,
0.1481269747018814,
-0.16249963641166687,
-0.1360231637954712,
0.02410355769097805,
0.13739265501499176,
0.19764971733093262,
0.2994113564491272,
0.07958794385194778,
-0.05250392109155655,
-0.007559690158814192,
0.036683183163404465,
0.0163510013371706,
-0.23304593563079834,
0.014446201734244823,
0.117853544652462,
0.35906270146369934,
-0.15672682225704193,
-0.3002004325389862,
0.19200065732002258,
-0.08431994169950485,
-0.48531168699264526,
-0.07525951415300369,
0.30962255597114563,
-0.056048665195703506,
0.17398111522197723,
-0.08858911693096161,
0.11694628745317459,
-0.29058802127838135,
0.09441626816987991,
-0.16530530154705048,
0.1748097687959671,
-0.04109002277255058,
-0.1517244130373001,
-0.19238051772117615,
0.1895218938589096,
0.2347443699836731,
0.22069305181503296,
0.2253972738981247,
-0.09898766130208969,
-0.32726141810417175,
-0.15548262000083923,
-0.11725445836782455,
-0.5003578066825867,
-0.03396729752421379,
0.07873555272817612,
0.2561335861682892,
0.27325811982154846,
-0.01992087811231613,
-0.030753061175346375,
-0.27838554978370667,
0.3005404472351074,
-0.13086634874343872,
-0.036965012550354004,
0.13496769964694977,
-0.04974674433469772,
-0.0037950517144054174,
-0.06644131243228912,
-0.1499229222536087,
-0.4818822741508484,
-0.3302493989467621,
0.16655439138412476,
0.0435820110142231,
-0.19672496616840363,
-0.3642851412296295,
0.2502795159816742,
-0.06277953833341599,
0.18944650888442993,
-0.0942588672041893,
0.32506200671195984,
-0.09855537116527557,
0.11435122042894363,
0.24502862989902496,
0.14127422869205475,
-0.13244391977787018,
0.07329021394252777,
-0.2809632420539856,
0.09269861876964569,
-0.1519344449043274,
-0.2785851061344147,
0.2541242241859436,
-0.06985058635473251,
0.14406460523605347,
-0.12789104878902435,
0.11445704847574234,
-0.25200074911117554,
0.1585606038570404,
-0.08040428906679153,
0.4654051661491394,
0.293022096157074,
0.08466685563325882,
0.2923736870288849,
0.1515457183122635,
0.011275885626673698,
0.12758274376392365,
-0.07035238295793533,
-0.2797991931438446,
-0.15976634621620178,
-0.4163270890712738,
0.25877320766448975,
0.2505185008049011,
0.03330719843506813,
0.20786641538143158,
0.011123781092464924,
0.15220101177692413,
0.0902395099401474,
-0.13032114505767822,
-0.021412335336208344,
0.04521492123603821,
-0.3165830969810486,
0.4133938252925873,
-0.06285376846790314,
-0.396616667509079,
0.18413330614566803,
0.3183481991291046,
0.051301561295986176,
0.4975842237472534,
0.49112674593925476,
0.13999934494495392,
0.013596775010228157,
-0.04008486494421959,
0.08924134820699692,
0.5658614039421082,
-0.31160804629325867,
-0.2723768651485443,
0.06665240228176117,
0.04510559141635895,
-0.16190238296985626,
0.1117081269621849,
-0.06584100425243378,
0.28244051337242126,
0.06327047199010849,
0.32532787322998047,
0.14684078097343445,
-0.06609756499528885,
-0.040090203285217285,
-0.23939523100852966,
-0.23465749621391296,
0.18581342697143555,
0.1193520799279213,
0.06280907988548279,
0.042200423777103424,
-0.13189774751663208,
-0.06001807004213333,
0.28336891531944275,
-0.17677506804466248,
-0.03679573908448219,
0.09743387252092361,
0.37501662969589233,
-0.16774976253509521,
-0.0811447724699974,
0.12449486553668976,
-0.33741581439971924,
-0.12661276757717133,
0.11172911524772644,
0.28296661376953125,
-0.2024143785238266,
-0.04855002462863922,
-0.28261932730674744,
-0.017089910805225372,
0.013861696235835552,
-0.04939592257142067,
0.29138562083244324,
-0.13601060211658478,
-0.11231639981269836,
0.035862941294908524,
-0.014959472231566906,
0.09489947557449341,
-0.2497137039899826,
0.03808837756514549,
-0.05803181231021881,
0.30699285864830017,
-0.07041101157665253,
-0.1918931007385254,
0.1597675085067749,
0.3545887768268585,
0.03335379809141159,
-0.3593370318412781,
0.10192802548408508,
0.17027701437473297,
0.17304833233356476,
-0.12485309690237045,
-0.365425169467926,
0.21317173540592194,
0.2529258728027344,
0.034316617995500565,
-0.22982726991176605,
0.0004473574517760426,
-0.03798628970980644,
-0.021859142929315567,
-0.24060390889644623,
0.23966450989246368,
0.009788954630494118,
-0.14616283774375916,
-0.18911594152450562,
0.15194332599639893,
0.4093768000602722,
-0.029380405321717262,
0.12619121372699738,
-0.3471546173095703,
0.09176915138959885,
0.2558770179748535,
0.07068674266338348,
-0.16581027209758759,
-0.6237401366233826,
0.0015229358104988933,
0.2590283453464508,
0.256068617105484,
0.1284780502319336,
-0.09931980073451996,
-0.008298767730593681,
0.06551656126976013,
0.2912140488624573,
-0.06437282264232635,
-0.2434827834367752,
0.17590691149234772,
0.12169019877910614,
-0.013806939125061035,
-0.2095278799533844,
-0.3354385495185852,
-0.046377360820770264,
-0.1720869094133377,
0.29551056027412415,
0.21193687617778778,
0.027840470895171165,
-0.10780040174722672,
-0.11763204634189606,
0.07356847822666168,
-0.0017889533191919327,
0.24038465321063995,
-0.3049071729183197,
-0.029710184782743454,
-0.3841661512851715,
0.018313389271497726,
-0.22925053536891937,
-0.27782827615737915,
0.20629644393920898,
-0.1054103821516037,
-0.025278424844145775,
0.12124829739332199,
0.07926397025585175,
0.3781527280807495,
0.34570491313934326,
0.08705239742994308,
0.24130821228027344,
0.26487985253334045,
-0.18823984265327454,
-0.0992780551314354,
0.04764169454574585,
0.2754132151603699,
0.1123279258608818,
0.08872417360544205,
0.1307167410850525,
-0.2281729280948639,
0.18517643213272095,
-0.10208991914987564,
-0.19993335008621216,
-0.07258955389261246,
-0.054387420415878296,
0.15009742975234985,
-0.03732403367757797,
0.43404480814933777,
0.017886584624648094,
-0.2607083320617676,
0.17400145530700684,
0.1702558547258377,
0.05349962040781975,
-0.025606635957956314,
-0.2858567237854004,
-0.22309882938861847,
-0.3427188992500305,
-0.47681793570518494,
-0.16805244982242584,
-0.22373750805854797,
0.006742593366652727,
0.15171654522418976,
0.16041241586208344,
-0.17621208727359772,
0.44753849506378174,
-0.1321675032377243,
0.21501226723194122,
0.006347986403852701,
-0.145285964012146,
-0.26019951701164246,
0.4841251075267792,
-0.312523752450943,
-0.5150347352027893,
0.09947431087493896,
0.18318572640419006,
0.47846847772598267,
0.36067789793014526,
-0.11645299196243286,
0.08014556020498276,
0.0826798602938652,
-0.13804584741592407,
0.14065387845039368,
-0.050174735486507416,
0.3003784716129303,
0.07016514986753464,
-0.1134609580039978,
-0.051904674619436264,
-0.1087777316570282,
0.16472703218460083,
0.03972280025482178,
0.07479313760995865,
-0.2537539601325989,
0.5609419345855713,
0.21824266016483307,
0.38559362292289734,
0.16921162605285645,
-0.6419711709022522,
-0.04847290366888046,
-0.17334946990013123,
0.16550038754940033,
-0.08192700892686844,
-0.14349687099456787,
0.2646549642086029,
-0.04033025726675987,
0.04039112851023674,
0.17014005780220032,
-0.190919890999794,
-0.17162826657295227,
-0.027236895635724068,
0.38565754890441895,
-0.4039818048477173,
-0.116773322224617,
0.06668933480978012,
0.04448200389742851,
0.231161430478096,
0.11092150211334229,
0.29026487469673157,
-0.18489941954612732,
-0.056092873215675354,
0.15121214091777802,
0.18586117029190063,
-0.009625176899135113,
-0.025981592014431953,
-0.15360206365585327,
0.057966671884059906,
-0.5748154520988464,
0.18031291663646698,
-0.16595464944839478,
0.5345258712768555,
-0.2066575139760971,
0.09114591777324677,
-0.01954883337020874,
0.03968245908617973,
0.7531310319900513,
-0.10187597572803497,
-0.2744510769844055,
0.10132422298192978,
-0.06622946262359619,
-0.2268492430448532,
-0.0194214079529047,
-0.27279406785964966,
0.0516374371945858,
0.20628663897514343,
0.4254375696182251,
-0.1742631047964096,
-0.12613336741924286,
-0.04360051825642586,
0.04381565377116203,
-0.1408921182155609,
0.14988917112350464,
-0.03753828629851341,
-0.1936562955379486,
-0.3811911940574646,
0.0027035262901335955,
0.03898102045059204,
0.17847810685634613,
0.005514445248991251,
-0.33347851037979126,
-0.23670288920402527,
-0.09007096290588379,
0.3970997929573059,
0.20825299620628357,
0.26408150792121887,
0.2996194064617157,
-0.1991741955280304,
0.042383451014757156,
0.2892189025878906,
0.2947940528392792,
-0.0832570418715477,
-0.16006909310817719,
0.0148264579474926,
0.19587621092796326,
-0.401350200176239,
0.29705771803855896,
0.15717285871505737,
-0.11290939152240753,
-0.2258112132549286,
-0.048694249242544174,
0.0020309090614318848,
-0.31852003931999207,
0.5930895209312439,
0.2531468868255615,
0.35167980194091797,
-0.5336467623710632,
-0.3118799030780792,
-0.12101351469755173,
0.0655813068151474,
0.10368496179580688,
0.43994495272636414,
0.1957589089870453,
-0.10059074312448502,
0.31851673126220703,
0.491605281829834,
0.6033886075019836,
-0.15804137289524078,
0.11713609844446182,
0.30685001611709595,
-0.055702392011880875,
0.3219713568687439,
-0.45979276299476624,
0.35119497776031494,
-0.22973206639289856,
-0.28775855898857117,
-0.16851982474327087,
-0.06458596885204315,
0.01999775506556034,
0.2500346899032593,
-0.0132109010592103,
-0.07136625796556473,
-0.029555711895227432,
-0.07519488781690598,
-0.028289757668972015,
-0.010686106979846954,
0.46540552377700806,
-0.3499039113521576,
-0.01471634954214096,
0.19080449640750885,
-0.17403839528560638,
-0.1350172609090805,
-0.15852691233158112,
-0.058349233120679855,
-0.19233345985412598,
0.16184942424297333,
0.04761200770735741,
0.05667892470955849,
-0.34678003191947937,
0.2642378807067871,
-0.11658088862895966,
-0.6577514410018921,
-0.03403991833329201,
0.22119705379009247,
0.6216448545455933,
0.24851296842098236,
-0.22033020853996277,
-0.009710509330034256,
-0.07020939886569977,
-0.18170903623104095,
-0.125729501247406,
0.026145586743950844,
0.362540066242218,
-0.15538392961025238,
0.0900610163807869,
0.055038683116436005,
0.16060905158519745,
-0.09561171382665634,
0.24935944378376007,
-0.09876157343387604,
-0.2183830738067627,
-0.28139686584472656,
-0.3472692370414734,
0.20180071890354156,
-0.02484767697751522,
-0.1958913803100586,
0.22481787204742432,
0.03630690276622772,
0.04205573350191116,
0.24655765295028687,
0.24857236444950104,
-0.17885124683380127,
-0.12519611418247223,
0.11376357823610306,
0.07427928596735,
-0.1652699112892151,
0.48247265815734863,
0.3108247220516205,
-0.23971699178218842,
-0.3111666738986969,
-0.32437703013420105,
0.1707703173160553,
-0.15983375906944275,
0.08026335388422012,
-0.19048455357551575,
-0.09349015355110168,
0.027943609282374382,
0.3082948923110962,
0.04382249712944031,
0.1811893731355667,
0.04690372571349144,
-0.20290043950080872,
-0.3979460895061493,
-0.14698441326618195,
-0.21613185107707977,
0.2746957242488861,
0.15362700819969177,
0.2894847095012665,
-0.1473330855369568,
-0.022581180557608604,
-0.41100597381591797,
-0.04891239479184151,
-0.13704326748847961,
0.1469198763370514,
-0.3204619288444519,
-0.015552043914794922,
0.14861130714416504,
-0.16090050339698792,
0.2169310748577118,
0.053655628114938736,
-0.0986628606915474,
-0.33285728096961975,
-0.22032181918621063,
0.001131505356170237,
0.07237591594457626,
-0.1057673916220665,
0.24003933370113373,
0.06286662817001343,
-0.33751875162124634,
-0.23967166244983673,
0.17551636695861816,
0.09746032953262329,
-0.0019840234890580177,
0.3601348102092743,
0.015940746292471886,
0.04747602716088295,
-0.162217378616333,
-0.23130068182945251,
0.16137027740478516,
-0.01959073916077614,
0.14344242215156555,
-0.06620566546916962,
-0.03502022475004196,
-0.0737856924533844,
-0.05415395274758339,
0.12429235875606537,
0.07172350585460663,
-0.046899449080228806,
0.2729126513004303,
-0.16401812434196472,
0.06533527374267578,
0.0327882245182991,
0.16797199845314026,
-0.046741485595703125,
-0.04586472734808922,
0.062269989401102066,
0.08816277235746384,
0.3209315240383148,
0.0017765065422281623,
-0.0675308033823967,
0.2074020504951477,
0.03736867755651474,
0.15230214595794678,
0.16450844705104828,
0.4129757285118103,
-0.21566596627235413,
-0.039828404784202576,
0.09164544194936752,
0.004865729250013828,
-0.45618966221809387,
0.12451018393039703,
-0.0571395680308342,
0.01995941810309887,
0.09371548891067505,
0.026182178407907486,
0.07378491759300232,
0.05639616772532463,
0.36685338616371155,
0.4033748209476471,
0.24647656083106995,
0.2604518234729767,
-0.16964252293109894,
-0.21486571431159973,
-0.26744115352630615,
-0.18555940687656403,
-0.16349615156650543,
-0.16434599459171295,
0.2606349587440491,
0.08844264596700668,
0.03884394094347954,
-0.054010920226573944,
-0.2577227056026459,
-0.2336425483226776,
0.05916573107242584,
-0.4247748851776123,
-0.04230359196662903,
-0.26710212230682373,
-0.06950393319129944,
0.2244955152273178,
-0.11751793324947357,
-0.12557658553123474,
-0.022213704884052277,
0.023411719128489494,
-0.027266323566436768,
-0.16249196231365204,
0.30566492676734924,
-0.08201339095830917,
0.06934251636266708,
0.04715896025300026,
-0.09075240790843964,
0.12310480326414108,
-0.06519635766744614,
-0.2878051698207855,
-0.14764811098575592,
0.10816937685012817,
0.3589297831058502,
0.07082585990428925,
0.1499277949333191,
0.06307113915681839,
0.03373469412326813,
-0.13809020817279816,
-0.036049529910087585,
0.29386603832244873,
0.38222870230674744,
0.104155533015728,
0.11389217525720596,
0.3283923268318176,
-0.2147180438041687,
-0.05852866917848587,
0.21348245441913605,
0.15662971138954163,
0.022138433530926704,
-0.41945818066596985,
-0.15568506717681885,
-0.3202994167804718,
-0.18439100682735443,
-0.07847194373607635,
-0.1948508322238922,
-0.06793775409460068,
0.34594130516052246,
-0.15327706933021545,
0.08171737939119339,
0.018979156389832497,
0.1338575929403305,
-0.061625439673662186,
0.5899648070335388,
0.024785563349723816,
0.27309027314186096,
-0.16549885272979736,
-0.4276491701602936,
-0.11938883364200592,
0.2709082365036011,
0.09879148006439209,
0.10933622717857361,
-0.16150930523872375,
0.18175357580184937,
0.22013252973556519,
-0.15628840029239655,
-0.21370704472064972,
-0.3248128294944763,
0.04345875605940819,
0.01774807646870613,
-0.45782414078712463,
0.13327226042747498,
-0.42497026920318604,
-0.05454889312386513,
0.07315146178007126,
-0.0965682789683342,
0.1477554440498352,
-0.03234397992491722,
0.21824763715267181,
-0.12105429172515869,
0.22617758810520172,
-0.18230830132961273,
0.304934561252594,
0.19948168098926544,
0.04765545576810837,
0.3123488426208496,
-0.20387081801891327,
0.012617195025086403,
-0.15463675558567047,
0.05729800835251808,
-0.020122310146689415,
0.40359118580818176,
0.1777443140745163,
0.4324725568294525,
-0.06378813087940216,
-0.05096800997853279,
0.02510080672800541,
0.42848706245422363,
0.23115956783294678,
-0.14466890692710876,
-0.02016078494489193,
0.3854881227016449,
-0.008736757561564445,
-0.2803279459476471,
0.6395061016082764,
0.49740466475486755,
0.12972848117351532,
0.012256654910743237,
-0.21380078792572021,
-0.23590540885925293,
0.19451294839382172,
-0.13327744603157043,
-0.2467222660779953,
-0.18581582605838776,
-0.19294273853302002,
0.11451289057731628,
0.2606409192085266,
-0.6897968649864197,
-0.12082917988300323,
0.045115988701581955,
-0.3173796534538269,
-0.414575457572937,
0.2520982027053833,
0.12177830189466476,
-0.017870046198368073,
-0.07249105721712112,
0.3108450770378113,
0.08763113617897034,
-0.25469669699668884,
-0.43700456619262695,
-0.2813512682914734
] |
https://github.com/huggingface/datasets/issues/1762
|
Unable to format dataset to CUDA Tensors
|
Hi @lhoestq,
Thanks a lot. Is this true for all format types?
As in, for 'torch', I can have `**kwargs` to `torch.tensor` and for 'tf' those args are passed to `tf.Tensor`, and the same for 'numpy' and 'pandas'?
|
Hi,
I came across this [link](https://huggingface.co/docs/datasets/torch_tensorflow.html) where the docs show show to convert a dataset to a particular format. I see that there is an option to convert it to tensors, but I don't see any option to convert it to CUDA tensors.
I tried this, but Dataset doesn't support assignment:
```
columns=['input_ids', 'token_type_ids', 'attention_mask', 'start_positions','end_positions']
samples.set_format(type='torch', columns = columns)
for column in columns:
samples[column].to(torch.device(self.config.device))
```
There should be an option to do so, or if there is already a way to do this, please let me know.
Thanks,
Gunjan
| 38 |
Unable to format dataset to CUDA Tensors
|
[
-0.3597605526447296,
-0.02451677806675434,
-0.23331353068351746,
0.13029710948467255,
0.4579010605812073,
0.11975184082984924,
0.5190896987915039,
0.45327478647232056,
-0.0732676088809967,
0.11849381774663925,
0.0091622956097126,
0.1469288170337677,
-0.00008795668691163883,
0.2750169634819031,
0.04235495626926422,
-0.05319526419043541,
0.11733055114746094,
0.31895244121551514,
-0.08650189638137817,
-0.17316943407058716,
-0.013999090529978275,
0.07858037203550339,
-0.024778835475444794,
-0.2953484356403351,
-0.5159314870834351,
-0.3734038174152374,
0.10631163418292999,
0.0464407317340374,
-0.09493459016084671,
0.1225738450884819,
0.17562682926654816,
0.1344018578529358,
0.12881949543952942,
0.49438050389289856,
-0.00010457474854774773,
0.1906404197216034,
-0.3117884397506714,
-0.05335204675793648,
-0.07128342241048813,
0.04882872477173805,
-0.20431950688362122,
-0.21869507431983948,
0.08205538243055344,
-0.2830753028392792,
-0.2301236093044281,
-0.046610452234745026,
-0.08912894129753113,
-0.28762468695640564,
0.3794006407260895,
0.41890907287597656,
0.2935163378715515,
0.10196617990732193,
0.2033626139163971,
0.03235219791531563,
-0.21852263808250427,
0.1481269747018814,
-0.16249963641166687,
-0.1360231637954712,
0.02410355769097805,
0.13739265501499176,
0.19764971733093262,
0.2994113564491272,
0.07958794385194778,
-0.05250392109155655,
-0.007559690158814192,
0.036683183163404465,
0.0163510013371706,
-0.23304593563079834,
0.014446201734244823,
0.117853544652462,
0.35906270146369934,
-0.15672682225704193,
-0.3002004325389862,
0.19200065732002258,
-0.08431994169950485,
-0.48531168699264526,
-0.07525951415300369,
0.30962255597114563,
-0.056048665195703506,
0.17398111522197723,
-0.08858911693096161,
0.11694628745317459,
-0.29058802127838135,
0.09441626816987991,
-0.16530530154705048,
0.1748097687959671,
-0.04109002277255058,
-0.1517244130373001,
-0.19238051772117615,
0.1895218938589096,
0.2347443699836731,
0.22069305181503296,
0.2253972738981247,
-0.09898766130208969,
-0.32726141810417175,
-0.15548262000083923,
-0.11725445836782455,
-0.5003578066825867,
-0.03396729752421379,
0.07873555272817612,
0.2561335861682892,
0.27325811982154846,
-0.01992087811231613,
-0.030753061175346375,
-0.27838554978370667,
0.3005404472351074,
-0.13086634874343872,
-0.036965012550354004,
0.13496769964694977,
-0.04974674433469772,
-0.0037950517144054174,
-0.06644131243228912,
-0.1499229222536087,
-0.4818822741508484,
-0.3302493989467621,
0.16655439138412476,
0.0435820110142231,
-0.19672496616840363,
-0.3642851412296295,
0.2502795159816742,
-0.06277953833341599,
0.18944650888442993,
-0.0942588672041893,
0.32506200671195984,
-0.09855537116527557,
0.11435122042894363,
0.24502862989902496,
0.14127422869205475,
-0.13244391977787018,
0.07329021394252777,
-0.2809632420539856,
0.09269861876964569,
-0.1519344449043274,
-0.2785851061344147,
0.2541242241859436,
-0.06985058635473251,
0.14406460523605347,
-0.12789104878902435,
0.11445704847574234,
-0.25200074911117554,
0.1585606038570404,
-0.08040428906679153,
0.4654051661491394,
0.293022096157074,
0.08466685563325882,
0.2923736870288849,
0.1515457183122635,
0.011275885626673698,
0.12758274376392365,
-0.07035238295793533,
-0.2797991931438446,
-0.15976634621620178,
-0.4163270890712738,
0.25877320766448975,
0.2505185008049011,
0.03330719843506813,
0.20786641538143158,
0.011123781092464924,
0.15220101177692413,
0.0902395099401474,
-0.13032114505767822,
-0.021412335336208344,
0.04521492123603821,
-0.3165830969810486,
0.4133938252925873,
-0.06285376846790314,
-0.396616667509079,
0.18413330614566803,
0.3183481991291046,
0.051301561295986176,
0.4975842237472534,
0.49112674593925476,
0.13999934494495392,
0.013596775010228157,
-0.04008486494421959,
0.08924134820699692,
0.5658614039421082,
-0.31160804629325867,
-0.2723768651485443,
0.06665240228176117,
0.04510559141635895,
-0.16190238296985626,
0.1117081269621849,
-0.06584100425243378,
0.28244051337242126,
0.06327047199010849,
0.32532787322998047,
0.14684078097343445,
-0.06609756499528885,
-0.040090203285217285,
-0.23939523100852966,
-0.23465749621391296,
0.18581342697143555,
0.1193520799279213,
0.06280907988548279,
0.042200423777103424,
-0.13189774751663208,
-0.06001807004213333,
0.28336891531944275,
-0.17677506804466248,
-0.03679573908448219,
0.09743387252092361,
0.37501662969589233,
-0.16774976253509521,
-0.0811447724699974,
0.12449486553668976,
-0.33741581439971924,
-0.12661276757717133,
0.11172911524772644,
0.28296661376953125,
-0.2024143785238266,
-0.04855002462863922,
-0.28261932730674744,
-0.017089910805225372,
0.013861696235835552,
-0.04939592257142067,
0.29138562083244324,
-0.13601060211658478,
-0.11231639981269836,
0.035862941294908524,
-0.014959472231566906,
0.09489947557449341,
-0.2497137039899826,
0.03808837756514549,
-0.05803181231021881,
0.30699285864830017,
-0.07041101157665253,
-0.1918931007385254,
0.1597675085067749,
0.3545887768268585,
0.03335379809141159,
-0.3593370318412781,
0.10192802548408508,
0.17027701437473297,
0.17304833233356476,
-0.12485309690237045,
-0.365425169467926,
0.21317173540592194,
0.2529258728027344,
0.034316617995500565,
-0.22982726991176605,
0.0004473574517760426,
-0.03798628970980644,
-0.021859142929315567,
-0.24060390889644623,
0.23966450989246368,
0.009788954630494118,
-0.14616283774375916,
-0.18911594152450562,
0.15194332599639893,
0.4093768000602722,
-0.029380405321717262,
0.12619121372699738,
-0.3471546173095703,
0.09176915138959885,
0.2558770179748535,
0.07068674266338348,
-0.16581027209758759,
-0.6237401366233826,
0.0015229358104988933,
0.2590283453464508,
0.256068617105484,
0.1284780502319336,
-0.09931980073451996,
-0.008298767730593681,
0.06551656126976013,
0.2912140488624573,
-0.06437282264232635,
-0.2434827834367752,
0.17590691149234772,
0.12169019877910614,
-0.013806939125061035,
-0.2095278799533844,
-0.3354385495185852,
-0.046377360820770264,
-0.1720869094133377,
0.29551056027412415,
0.21193687617778778,
0.027840470895171165,
-0.10780040174722672,
-0.11763204634189606,
0.07356847822666168,
-0.0017889533191919327,
0.24038465321063995,
-0.3049071729183197,
-0.029710184782743454,
-0.3841661512851715,
0.018313389271497726,
-0.22925053536891937,
-0.27782827615737915,
0.20629644393920898,
-0.1054103821516037,
-0.025278424844145775,
0.12124829739332199,
0.07926397025585175,
0.3781527280807495,
0.34570491313934326,
0.08705239742994308,
0.24130821228027344,
0.26487985253334045,
-0.18823984265327454,
-0.0992780551314354,
0.04764169454574585,
0.2754132151603699,
0.1123279258608818,
0.08872417360544205,
0.1307167410850525,
-0.2281729280948639,
0.18517643213272095,
-0.10208991914987564,
-0.19993335008621216,
-0.07258955389261246,
-0.054387420415878296,
0.15009742975234985,
-0.03732403367757797,
0.43404480814933777,
0.017886584624648094,
-0.2607083320617676,
0.17400145530700684,
0.1702558547258377,
0.05349962040781975,
-0.025606635957956314,
-0.2858567237854004,
-0.22309882938861847,
-0.3427188992500305,
-0.47681793570518494,
-0.16805244982242584,
-0.22373750805854797,
0.006742593366652727,
0.15171654522418976,
0.16041241586208344,
-0.17621208727359772,
0.44753849506378174,
-0.1321675032377243,
0.21501226723194122,
0.006347986403852701,
-0.145285964012146,
-0.26019951701164246,
0.4841251075267792,
-0.312523752450943,
-0.5150347352027893,
0.09947431087493896,
0.18318572640419006,
0.47846847772598267,
0.36067789793014526,
-0.11645299196243286,
0.08014556020498276,
0.0826798602938652,
-0.13804584741592407,
0.14065387845039368,
-0.050174735486507416,
0.3003784716129303,
0.07016514986753464,
-0.1134609580039978,
-0.051904674619436264,
-0.1087777316570282,
0.16472703218460083,
0.03972280025482178,
0.07479313760995865,
-0.2537539601325989,
0.5609419345855713,
0.21824266016483307,
0.38559362292289734,
0.16921162605285645,
-0.6419711709022522,
-0.04847290366888046,
-0.17334946990013123,
0.16550038754940033,
-0.08192700892686844,
-0.14349687099456787,
0.2646549642086029,
-0.04033025726675987,
0.04039112851023674,
0.17014005780220032,
-0.190919890999794,
-0.17162826657295227,
-0.027236895635724068,
0.38565754890441895,
-0.4039818048477173,
-0.116773322224617,
0.06668933480978012,
0.04448200389742851,
0.231161430478096,
0.11092150211334229,
0.29026487469673157,
-0.18489941954612732,
-0.056092873215675354,
0.15121214091777802,
0.18586117029190063,
-0.009625176899135113,
-0.025981592014431953,
-0.15360206365585327,
0.057966671884059906,
-0.5748154520988464,
0.18031291663646698,
-0.16595464944839478,
0.5345258712768555,
-0.2066575139760971,
0.09114591777324677,
-0.01954883337020874,
0.03968245908617973,
0.7531310319900513,
-0.10187597572803497,
-0.2744510769844055,
0.10132422298192978,
-0.06622946262359619,
-0.2268492430448532,
-0.0194214079529047,
-0.27279406785964966,
0.0516374371945858,
0.20628663897514343,
0.4254375696182251,
-0.1742631047964096,
-0.12613336741924286,
-0.04360051825642586,
0.04381565377116203,
-0.1408921182155609,
0.14988917112350464,
-0.03753828629851341,
-0.1936562955379486,
-0.3811911940574646,
0.0027035262901335955,
0.03898102045059204,
0.17847810685634613,
0.005514445248991251,
-0.33347851037979126,
-0.23670288920402527,
-0.09007096290588379,
0.3970997929573059,
0.20825299620628357,
0.26408150792121887,
0.2996194064617157,
-0.1991741955280304,
0.042383451014757156,
0.2892189025878906,
0.2947940528392792,
-0.0832570418715477,
-0.16006909310817719,
0.0148264579474926,
0.19587621092796326,
-0.401350200176239,
0.29705771803855896,
0.15717285871505737,
-0.11290939152240753,
-0.2258112132549286,
-0.048694249242544174,
0.0020309090614318848,
-0.31852003931999207,
0.5930895209312439,
0.2531468868255615,
0.35167980194091797,
-0.5336467623710632,
-0.3118799030780792,
-0.12101351469755173,
0.0655813068151474,
0.10368496179580688,
0.43994495272636414,
0.1957589089870453,
-0.10059074312448502,
0.31851673126220703,
0.491605281829834,
0.6033886075019836,
-0.15804137289524078,
0.11713609844446182,
0.30685001611709595,
-0.055702392011880875,
0.3219713568687439,
-0.45979276299476624,
0.35119497776031494,
-0.22973206639289856,
-0.28775855898857117,
-0.16851982474327087,
-0.06458596885204315,
0.01999775506556034,
0.2500346899032593,
-0.0132109010592103,
-0.07136625796556473,
-0.029555711895227432,
-0.07519488781690598,
-0.028289757668972015,
-0.010686106979846954,
0.46540552377700806,
-0.3499039113521576,
-0.01471634954214096,
0.19080449640750885,
-0.17403839528560638,
-0.1350172609090805,
-0.15852691233158112,
-0.058349233120679855,
-0.19233345985412598,
0.16184942424297333,
0.04761200770735741,
0.05667892470955849,
-0.34678003191947937,
0.2642378807067871,
-0.11658088862895966,
-0.6577514410018921,
-0.03403991833329201,
0.22119705379009247,
0.6216448545455933,
0.24851296842098236,
-0.22033020853996277,
-0.009710509330034256,
-0.07020939886569977,
-0.18170903623104095,
-0.125729501247406,
0.026145586743950844,
0.362540066242218,
-0.15538392961025238,
0.0900610163807869,
0.055038683116436005,
0.16060905158519745,
-0.09561171382665634,
0.24935944378376007,
-0.09876157343387604,
-0.2183830738067627,
-0.28139686584472656,
-0.3472692370414734,
0.20180071890354156,
-0.02484767697751522,
-0.1958913803100586,
0.22481787204742432,
0.03630690276622772,
0.04205573350191116,
0.24655765295028687,
0.24857236444950104,
-0.17885124683380127,
-0.12519611418247223,
0.11376357823610306,
0.07427928596735,
-0.1652699112892151,
0.48247265815734863,
0.3108247220516205,
-0.23971699178218842,
-0.3111666738986969,
-0.32437703013420105,
0.1707703173160553,
-0.15983375906944275,
0.08026335388422012,
-0.19048455357551575,
-0.09349015355110168,
0.027943609282374382,
0.3082948923110962,
0.04382249712944031,
0.1811893731355667,
0.04690372571349144,
-0.20290043950080872,
-0.3979460895061493,
-0.14698441326618195,
-0.21613185107707977,
0.2746957242488861,
0.15362700819969177,
0.2894847095012665,
-0.1473330855369568,
-0.022581180557608604,
-0.41100597381591797,
-0.04891239479184151,
-0.13704326748847961,
0.1469198763370514,
-0.3204619288444519,
-0.015552043914794922,
0.14861130714416504,
-0.16090050339698792,
0.2169310748577118,
0.053655628114938736,
-0.0986628606915474,
-0.33285728096961975,
-0.22032181918621063,
0.001131505356170237,
0.07237591594457626,
-0.1057673916220665,
0.24003933370113373,
0.06286662817001343,
-0.33751875162124634,
-0.23967166244983673,
0.17551636695861816,
0.09746032953262329,
-0.0019840234890580177,
0.3601348102092743,
0.015940746292471886,
0.04747602716088295,
-0.162217378616333,
-0.23130068182945251,
0.16137027740478516,
-0.01959073916077614,
0.14344242215156555,
-0.06620566546916962,
-0.03502022475004196,
-0.0737856924533844,
-0.05415395274758339,
0.12429235875606537,
0.07172350585460663,
-0.046899449080228806,
0.2729126513004303,
-0.16401812434196472,
0.06533527374267578,
0.0327882245182991,
0.16797199845314026,
-0.046741485595703125,
-0.04586472734808922,
0.062269989401102066,
0.08816277235746384,
0.3209315240383148,
0.0017765065422281623,
-0.0675308033823967,
0.2074020504951477,
0.03736867755651474,
0.15230214595794678,
0.16450844705104828,
0.4129757285118103,
-0.21566596627235413,
-0.039828404784202576,
0.09164544194936752,
0.004865729250013828,
-0.45618966221809387,
0.12451018393039703,
-0.0571395680308342,
0.01995941810309887,
0.09371548891067505,
0.026182178407907486,
0.07378491759300232,
0.05639616772532463,
0.36685338616371155,
0.4033748209476471,
0.24647656083106995,
0.2604518234729767,
-0.16964252293109894,
-0.21486571431159973,
-0.26744115352630615,
-0.18555940687656403,
-0.16349615156650543,
-0.16434599459171295,
0.2606349587440491,
0.08844264596700668,
0.03884394094347954,
-0.054010920226573944,
-0.2577227056026459,
-0.2336425483226776,
0.05916573107242584,
-0.4247748851776123,
-0.04230359196662903,
-0.26710212230682373,
-0.06950393319129944,
0.2244955152273178,
-0.11751793324947357,
-0.12557658553123474,
-0.022213704884052277,
0.023411719128489494,
-0.027266323566436768,
-0.16249196231365204,
0.30566492676734924,
-0.08201339095830917,
0.06934251636266708,
0.04715896025300026,
-0.09075240790843964,
0.12310480326414108,
-0.06519635766744614,
-0.2878051698207855,
-0.14764811098575592,
0.10816937685012817,
0.3589297831058502,
0.07082585990428925,
0.1499277949333191,
0.06307113915681839,
0.03373469412326813,
-0.13809020817279816,
-0.036049529910087585,
0.29386603832244873,
0.38222870230674744,
0.104155533015728,
0.11389217525720596,
0.3283923268318176,
-0.2147180438041687,
-0.05852866917848587,
0.21348245441913605,
0.15662971138954163,
0.022138433530926704,
-0.41945818066596985,
-0.15568506717681885,
-0.3202994167804718,
-0.18439100682735443,
-0.07847194373607635,
-0.1948508322238922,
-0.06793775409460068,
0.34594130516052246,
-0.15327706933021545,
0.08171737939119339,
0.018979156389832497,
0.1338575929403305,
-0.061625439673662186,
0.5899648070335388,
0.024785563349723816,
0.27309027314186096,
-0.16549885272979736,
-0.4276491701602936,
-0.11938883364200592,
0.2709082365036011,
0.09879148006439209,
0.10933622717857361,
-0.16150930523872375,
0.18175357580184937,
0.22013252973556519,
-0.15628840029239655,
-0.21370704472064972,
-0.3248128294944763,
0.04345875605940819,
0.01774807646870613,
-0.45782414078712463,
0.13327226042747498,
-0.42497026920318604,
-0.05454889312386513,
0.07315146178007126,
-0.0965682789683342,
0.1477554440498352,
-0.03234397992491722,
0.21824763715267181,
-0.12105429172515869,
0.22617758810520172,
-0.18230830132961273,
0.304934561252594,
0.19948168098926544,
0.04765545576810837,
0.3123488426208496,
-0.20387081801891327,
0.012617195025086403,
-0.15463675558567047,
0.05729800835251808,
-0.020122310146689415,
0.40359118580818176,
0.1777443140745163,
0.4324725568294525,
-0.06378813087940216,
-0.05096800997853279,
0.02510080672800541,
0.42848706245422363,
0.23115956783294678,
-0.14466890692710876,
-0.02016078494489193,
0.3854881227016449,
-0.008736757561564445,
-0.2803279459476471,
0.6395061016082764,
0.49740466475486755,
0.12972848117351532,
0.012256654910743237,
-0.21380078792572021,
-0.23590540885925293,
0.19451294839382172,
-0.13327744603157043,
-0.2467222660779953,
-0.18581582605838776,
-0.19294273853302002,
0.11451289057731628,
0.2606409192085266,
-0.6897968649864197,
-0.12082917988300323,
0.045115988701581955,
-0.3173796534538269,
-0.414575457572937,
0.2520982027053833,
0.12177830189466476,
-0.017870046198368073,
-0.07249105721712112,
0.3108450770378113,
0.08763113617897034,
-0.25469669699668884,
-0.43700456619262695,
-0.2813512682914734
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.