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/2226
|
Batched map fails when removing all columns
|
Thanks for reporting and for providing this code to reproduce the issue, this is really helpful !
|
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
| 17 |
Batched map fails when removing all columns
|
[
-0.04013077914714813,
-0.01597319170832634,
-0.1879514753818512,
-0.014094525948166847,
0.030442023649811745,
0.19726498425006866,
0.636069118976593,
0.4093400537967682,
0.5403695702552795,
0.48492369055747986,
0.03661354258656502,
0.192635640501976,
-0.08836747705936432,
-0.07440903782844543,
-0.5208898782730103,
-0.0638766661286354,
0.09946175664663315,
0.4666292369365692,
-0.4505564570426941,
-0.1240697056055069,
-0.2943461537361145,
0.09264954179525375,
-0.4863501191139221,
-0.0822102352976799,
0.15585972368717194,
-0.15244916081428528,
-0.18428975343704224,
-0.08296998590230942,
0.14172731339931488,
0.005584465805441141,
-0.30665522813796997,
-0.021809237077832222,
-0.1418199986219406,
0.43799588084220886,
-0.00010417530575068668,
0.1016523465514183,
-0.16543827950954437,
0.07300779968500137,
-0.014402450062334538,
0.3451859951019287,
-0.25810080766677856,
0.040305573493242264,
-0.2665236294269562,
-0.2510388195514679,
0.13410936295986176,
0.11421898752450943,
-0.1555379331111908,
-0.1718599498271942,
0.2598841190338135,
0.05345795303583145,
0.3115439713001251,
0.17824454605579376,
-0.21231921017169952,
0.0683218315243721,
0.1868063062429428,
-0.09137213975191116,
-0.06049804016947746,
-0.14477762579917908,
0.16091232001781464,
-0.33556029200553894,
-0.09384306520223618,
0.4850069284439087,
-0.340511679649353,
0.044185832142829895,
-0.10746167600154877,
-0.057708628475666046,
0.5344809293746948,
-0.2271285206079483,
0.47176340222358704,
-0.07478924840688705,
0.028912723064422607,
-0.007308431901037693,
0.21751797199249268,
-0.04610137641429901,
-0.2251586765050888,
-0.16498269140720367,
-0.08142077177762985,
0.02464827336370945,
-0.12041009217500687,
-0.002801499329507351,
-0.3049473762512207,
0.10506822913885117,
0.017618170008063316,
-0.07035131752490997,
-0.04740513488650322,
0.20708803832530975,
0.07161365449428558,
0.19645929336547852,
-0.001966119511052966,
-0.0221265722066164,
-0.20381179451942444,
-0.07233872264623642,
-0.21418501436710358,
0.3232026696205139,
-0.219086691737175,
-0.10409924387931824,
0.13929574191570282,
0.00035013831802643836,
0.04147585853934288,
-0.347150981426239,
0.2148565649986267,
0.1613176167011261,
0.5573211312294006,
0.13039900362491608,
0.2938767373561859,
0.23604144155979156,
0.11554787307977676,
0.08618580549955368,
-0.08568178862333298,
-0.019824953749775887,
-0.1356143057346344,
0.19080014526844025,
0.464304119348526,
-0.1355893313884735,
0.07600858062505722,
0.09285256266593933,
-0.06214689463376999,
0.0628165602684021,
-0.17959636449813843,
-0.003744977992027998,
-0.007668063044548035,
0.10553396493196487,
-0.18442170321941376,
0.12391171604394913,
0.33212602138519287,
-0.10963654518127441,
-0.14789438247680664,
0.16515319049358368,
-0.0807064101099968,
0.14744746685028076,
-0.2918154299259186,
0.13681679964065552,
-0.27435198426246643,
-0.3260009288787842,
0.19154439866542816,
0.1905512511730194,
0.10109186917543411,
-0.11358325183391571,
-0.2623540461063385,
-0.07054631412029266,
-0.3505537211894989,
-0.08200141787528992,
0.45261532068252563,
0.08234097063541412,
0.04306687414646149,
0.15089595317840576,
0.179420605301857,
0.11089371889829636,
0.15764395892620087,
0.16333314776420593,
-0.07747738808393478,
0.044207632541656494,
0.09492177516222,
0.285916805267334,
0.2680731415748596,
0.2715637981891632,
-0.04763370007276535,
-0.13146619498729706,
0.2191029042005539,
0.04464781656861305,
-0.0039243195205926895,
-0.11610966175794601,
0.1379215121269226,
-0.1608346402645111,
-0.13400626182556152,
0.4450277090072632,
-0.24684855341911316,
0.07163167744874954,
0.23480606079101562,
-0.006171066779643297,
0.30023741722106934,
0.27068355679512024,
0.15850257873535156,
0.1346702128648758,
-0.14657466113567352,
0.12690438330173492,
-0.08941943198442459,
0.025902891531586647,
-0.03077005222439766,
0.5420806407928467,
-0.2627883553504944,
-0.05126550793647766,
-0.08765968680381775,
-0.3184928297996521,
0.25446817278862,
-0.2281498908996582,
0.1399906724691391,
-0.11448505520820618,
-0.1994927078485489,
0.09291350841522217,
-0.1312902569770813,
-0.10438863188028336,
-0.12883085012435913,
-0.13953682780265808,
0.28061050176620483,
0.39329269528388977,
0.3564973771572113,
-0.31940820813179016,
0.15041276812553406,
-0.1553937941789627,
0.37424591183662415,
0.43759027123451233,
-0.009012079797685146,
-0.11939556151628494,
0.006248110439628363,
0.0438675656914711,
-0.4535785913467407,
0.1481994092464447,
0.004160712473094463,
-0.05133173614740372,
-0.010236154310405254,
-0.003908546641469002,
-0.13490483164787292,
-0.05417685583233833,
0.04752504080533981,
0.20452165603637695,
0.2409595400094986,
-0.060130175203084946,
-0.029142918065190315,
-0.19012387096881866,
-0.1373133659362793,
-0.24058321118354797,
0.004083496052771807,
0.011377950198948383,
-0.14594916999340057,
-0.3556024730205536,
-0.23907577991485596,
-0.21355809271335602,
0.08871552348136902,
0.2786223590373993,
0.23323072493076324,
-0.2880933880805969,
0.03477005660533905,
0.21577011048793793,
-0.2188127636909485,
-0.015210343524813652,
-0.21591851115226746,
-0.0867452397942543,
-0.24418285489082336,
0.2612948417663574,
-0.002845186972990632,
-0.08114373683929443,
0.06689657270908356,
-0.12896384298801422,
-0.21473444998264313,
-0.02127246931195259,
-0.13190560042858124,
0.2655678987503052,
-0.07711312174797058,
0.008139576762914658,
-0.04536432400345802,
-0.13749592006206512,
0.11716338247060776,
-0.5879120230674744,
-0.1108921617269516,
0.1760704219341278,
-0.27451950311660767,
-0.05521080270409584,
0.09118252247571945,
-0.1113416776061058,
0.10598067194223404,
0.06784656643867493,
-0.002615187084302306,
-0.0698077380657196,
-0.007093503605574369,
0.05557139217853546,
0.18997050821781158,
0.04386846348643303,
0.24116146564483643,
0.21401122212409973,
0.2539518475532532,
-0.05963866412639618,
0.30515342950820923,
-0.13251739740371704,
0.09341586381196976,
-0.035072967410087585,
0.0383136086165905,
0.21756142377853394,
0.19500896334648132,
-0.024865353479981422,
-0.35248109698295593,
-0.18648077547550201,
0.0631103441119194,
0.2688046395778656,
-0.00002050368675554637,
-0.11697357892990112,
0.007653767243027687,
-0.13401278853416443,
0.14370635151863098,
0.12171880900859833,
0.16107277572155,
-0.35573235154151917,
0.12698255479335785,
0.10566942393779755,
-0.512539267539978,
0.2623095214366913,
-0.047027114778757095,
0.012562819756567478,
0.18678970634937286,
0.067911297082901,
-0.08822648972272873,
-0.1902301162481308,
-0.048120055347681046,
0.16667303442955017,
-0.04581504687666893,
-0.15330250561237335,
0.05839579924941063,
0.06244273483753204,
-0.37092065811157227,
-0.11884946376085281,
0.013314282521605492,
0.08870071917772293,
-0.5545303821563721,
-0.2380121797323227,
0.31488853693008423,
0.40356528759002686,
-0.3430364727973938,
-0.17145682871341705,
0.18216311931610107,
-0.31316623091697693,
-0.01869201473891735,
0.1411890983581543,
0.2306944727897644,
-0.19678696990013123,
-0.34382322430610657,
0.016189923509955406,
0.2579008638858795,
-0.3152981400489807,
0.018672704696655273,
-0.09084844589233398,
0.37365931272506714,
0.028471175581216812,
0.3435741662979126,
-0.31490659713745117,
-0.19855168461799622,
-0.29780399799346924,
-0.09428583830595016,
-0.04125352203845978,
-0.1184077262878418,
0.06113781780004501,
-0.08296601474285126,
0.056326791644096375,
0.13640910387039185,
0.09776618331670761,
0.22987505793571472,
-0.08703435957431793,
0.045755792409181595,
-0.025982391089200974,
0.005807064939290285,
0.04745318740606308,
0.2374623864889145,
0.30487850308418274,
0.09240272641181946,
-0.32265040278434753,
-0.12683886289596558,
0.03395137935876846,
0.12433616071939468,
0.08977998048067093,
-0.11481215804815292,
-0.013403411023318768,
0.3086468279361725,
0.03929833695292473,
0.3446860611438751,
-0.034401923418045044,
-0.04538543149828911,
0.1899118721485138,
-0.020785994827747345,
0.3093317449092865,
-0.15207596123218536,
-0.3961303234100342,
0.1381215751171112,
0.06070629879832268,
-0.0914100855588913,
0.28293687105178833,
-0.2412215769290924,
-0.49214041233062744,
0.054499153047800064,
0.3460961580276489,
-0.23185403645038605,
-0.2583545446395874,
0.1947029083967209,
-0.07906650751829147,
0.15868805348873138,
0.21796512603759766,
0.11425618827342987,
-0.20820219814777374,
-0.031042013317346573,
0.26084426045417786,
-0.39668434858322144,
0.24719737470149994,
-0.28646042943000793,
-0.3529946506023407,
-0.02401040866971016,
-0.604509711265564,
0.40549662709236145,
-0.07475309073925018,
0.31786563992500305,
-0.19599974155426025,
-0.27101895213127136,
-0.08592139929533005,
0.0741659477353096,
0.4556993246078491,
-0.29803016781806946,
0.007259024772793055,
0.05807056650519371,
0.20226356387138367,
-0.23294013738632202,
-0.06340768188238144,
-0.20935389399528503,
0.11484888941049576,
0.3684001564979553,
0.6094897985458374,
-0.2621525228023529,
-0.14260037243366241,
0.2796861231327057,
0.057903289794921875,
0.07181563973426819,
-0.050063684582710266,
-0.2282976359128952,
-0.19380590319633484,
-0.23520313203334808,
0.06932703405618668,
0.16712024807929993,
0.1249968484044075,
0.18212224543094635,
-0.2017490416765213,
0.2958412170410156,
-0.16321226954460144,
0.0982799306511879,
-0.07456201314926147,
0.026611998677253723,
0.2247549146413803,
0.022417603060603142,
-0.14572139084339142,
0.1909777820110321,
-0.09747803956270218,
0.07110574841499329,
-0.4111908972263336,
0.3311418890953064,
0.28594499826431274,
-0.3652261793613434,
0.3745962679386139,
0.3474961221218109,
0.1698964536190033,
0.15847623348236084,
-0.21322570741176605,
0.16816599667072296,
0.06513641029596329,
-0.3030061423778534,
0.24430440366268158,
-0.058162614703178406,
-0.03541975095868111,
0.16393207013607025,
-0.1610526293516159,
-0.03235957399010658,
-0.20336811244487762,
0.39800095558166504,
-0.14270125329494476,
-0.2544827163219452,
0.674101710319519,
-0.06751091778278351,
0.5660524368286133,
-0.054507963359355927,
-0.05192043259739876,
0.15100567042827606,
0.2030213475227356,
0.0689382329583168,
0.26980677247047424,
0.4078131914138794,
-0.21990086138248444,
0.03080332651734352,
-0.0010668730828911066,
0.04642220214009285,
0.12411291897296906,
0.44856324791908264,
0.19431617856025696,
0.22156161069869995,
-0.17755483090877533,
0.7825794219970703,
-0.0953756645321846,
-0.4372595548629761,
0.12759113311767578,
-0.1909426748752594,
-0.08276759833097458,
0.10716531425714493,
0.1728883683681488,
-0.003164617344737053,
-0.14152871072292328,
0.007148579228669405,
0.2009628266096115,
-0.35952407121658325,
0.24799275398254395,
0.07221174240112305,
-0.0847601518034935,
0.16220813989639282,
-0.08478789031505585,
0.02532249689102173,
-0.386329710483551,
-0.010306786745786667,
-0.0669977217912674,
0.010162262246012688,
0.20267483592033386,
-0.08995489031076431,
0.5557500720024109,
0.08621634542942047,
-0.1396806538105011,
0.13549114763736725,
-0.28858858346939087,
0.0077672977931797504,
-0.0255235955119133,
0.16112174093723297,
-0.2878192365169525,
-0.24527466297149658,
-0.47833895683288574,
0.38052260875701904,
0.07043852657079697,
-0.4177239239215851,
-0.2730839252471924,
-0.15526677668094635,
-0.10367970913648605,
-0.20620857179164886,
0.18795600533485413,
-0.20744813978672028,
-0.08830954134464264,
0.7247418761253357,
-0.20917756855487823,
-0.27954789996147156,
-0.0916016697883606,
0.2454252392053604,
-0.030996588990092278,
-0.018663305789232254,
0.5413089990615845,
-0.08295061439275742,
-0.15189358592033386,
-0.40180742740631104,
-0.28074347972869873,
0.13478407263755798,
-0.2248435914516449,
0.23090684413909912,
-0.4044424593448639,
-0.14184144139289856,
0.34857746958732605,
0.31726545095443726,
-0.07797936350107193,
0.0702117532491684,
0.03569294512271881,
-0.03504204377532005,
-0.22808274626731873,
0.08098345249891281,
0.18283849954605103,
0.1343393474817276,
0.13059332966804504,
0.15161919593811035,
-0.18160836398601532,
0.13643468916416168,
-0.41316306591033936,
0.006234034430235624,
-0.008835691027343273,
0.38351207971572876,
0.28980928659439087,
0.16112427413463593,
-0.03767423704266548,
0.043893635272979736,
0.2727305293083191,
0.296010285615921,
0.13726703822612762,
-0.3543025553226471,
0.1387079656124115,
0.05688325688242912,
-0.03738339990377426,
0.006320264656096697,
0.09544096887111664,
-0.15060855448246002,
-0.20298205316066742,
-0.1668466478586197,
0.320976197719574,
0.04025281220674515,
-0.12575925886631012,
-0.040243059396743774,
0.1746550351381302,
0.11101130396127701,
0.19477540254592896,
-0.09505275636911392,
-0.1775071918964386,
-0.06595973670482635,
0.10958132147789001,
-0.020940657705068588,
-0.0787140354514122,
-0.10206477344036102,
0.10338543355464935,
0.016657670959830284,
-0.016323518007993698,
0.08746600151062012,
0.24678070843219757,
-0.24636225402355194,
-0.17345388233661652,
0.10629886388778687,
0.21306611597537994,
-0.17253059148788452,
-0.08152446150779724,
-0.4258835017681122,
0.04173679277300835,
0.33950620889663696,
-0.17445360124111176,
-0.05749388039112091,
0.33500269055366516,
0.11756177991628647,
0.28523147106170654,
0.33536961674690247,
0.11901978403329849,
-0.5898568034172058,
0.018888035789132118,
0.18080948293209076,
0.32698485255241394,
-0.29952746629714966,
-0.32894107699394226,
0.5127062201499939,
0.04141310229897499,
0.007662503980100155,
0.2602902352809906,
0.10656852275133133,
0.12688897550106049,
0.3043857216835022,
0.2572588324546814,
0.10322961956262589,
0.128236323595047,
0.15292973816394806,
-0.3812371492385864,
-0.6438072919845581,
0.27281925082206726,
0.29503709077835083,
0.12211468070745468,
0.31201064586639404,
0.239572674036026,
-0.06464262306690216,
-0.23429961502552032,
-0.20686142146587372,
0.11495457589626312,
0.3746166229248047,
-0.38695845007896423,
-0.07111577689647675,
-0.44408902525901794,
-0.1830899864435196,
0.3627059757709503,
-0.06637820601463318,
0.10240455716848373,
0.16760151088237762,
0.6062601208686829,
-0.16486625373363495,
-0.014847409911453724,
-0.02298109233379364,
-0.3319789469242096,
-0.23955672979354858,
0.24328656494617462,
-0.18064847588539124,
0.05873917415738106,
-0.20693695545196533,
0.033775463700294495,
-0.010978895239531994,
0.03381097689270973,
0.1379666030406952,
0.09481882303953171,
0.18204104900360107,
-0.09991263598203659,
-0.07214731723070145,
-0.2900979816913605,
-0.287812739610672,
0.2695864737033844,
0.11586672812700272,
0.14432668685913086,
0.22151535749435425,
0.16247154772281647,
-0.266771525144577,
-0.1103883683681488,
0.43279534578323364,
0.11465328931808472,
0.3195900022983551,
-0.07680005580186844,
0.15657459199428558,
-0.4619992971420288,
0.002803903305903077,
-0.18721528351306915,
-0.04879290983080864,
-0.14755301177501678,
0.015275063924491405,
-0.14101943373680115,
0.22572758793830872,
0.12575849890708923,
0.1826208233833313,
0.050295185297727585,
0.12648113071918488,
0.32484108209609985,
-0.37954631447792053,
-0.5817651748657227,
-0.18486571311950684,
-0.30760231614112854,
-0.10533230751752853,
-0.435899019241333,
0.07136482000350952,
0.10091497749090195,
0.2504142224788666,
0.36180952191352844,
-0.19320529699325562,
0.025705279782414436,
0.015263491310179234,
-0.14403431117534637,
0.31889185309410095,
-0.2956172823905945,
0.14146624505519867,
-0.0681743174791336,
0.005594075191766024,
0.13546441495418549,
-0.46723029017448425,
0.4003046751022339,
0.30377140641212463,
0.26530078053474426,
-0.11570415645837784,
0.05661466345191002,
-0.019400309771299362,
-0.11069580912590027,
0.028393320739269257,
0.009022478945553303,
-0.1758878231048584,
-0.13309630751609802,
-0.3292858898639679,
-0.2976793646812439,
0.041711192578077316,
-0.03334684297442436,
-0.2163822054862976,
0.38297852873802185,
0.19383849203586578,
-0.057032860815525055,
0.09285201132297516,
-0.00999058224260807,
0.1568847894668579,
0.1519244760274887,
0.3009350895881653,
-0.1289568543434143,
0.2094227373600006,
0.12469117343425751,
0.1637854278087616,
0.07533327490091324,
0.265268474817276,
0.1338891237974167,
0.12676085531711578,
-0.36825019121170044,
-0.4157409369945526,
0.41225191950798035,
-0.5325069427490234,
-0.7680293321609497,
-0.010934942401945591,
0.2625085711479187,
-0.14808036386966705,
-0.18320123851299286,
-0.0021347126457840204,
-0.00009323058475274593,
0.03973400592803955,
-0.20001652836799622,
-0.1515328586101532,
0.0760934054851532,
-0.3926730155944824,
-0.014174317009747028,
0.20435960590839386,
-0.061189234256744385,
0.3098514974117279,
-0.12720292806625366,
-0.206631600856781,
-0.1201808899641037
] |
https://github.com/huggingface/datasets/issues/2226
|
Batched map fails when removing all columns
|
I merged a fix, it should work on `master` now :)
We'll do a new release soon !
|
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
_Originally posted by @villmow in https://github.com/huggingface/datasets/issues/2193#issuecomment-820230874_
| 18 |
Batched map fails when removing all columns
|
[
-0.04013077914714813,
-0.01597319170832634,
-0.1879514753818512,
-0.014094525948166847,
0.030442023649811745,
0.19726498425006866,
0.636069118976593,
0.4093400537967682,
0.5403695702552795,
0.48492369055747986,
0.03661354258656502,
0.192635640501976,
-0.08836747705936432,
-0.07440903782844543,
-0.5208898782730103,
-0.0638766661286354,
0.09946175664663315,
0.4666292369365692,
-0.4505564570426941,
-0.1240697056055069,
-0.2943461537361145,
0.09264954179525375,
-0.4863501191139221,
-0.0822102352976799,
0.15585972368717194,
-0.15244916081428528,
-0.18428975343704224,
-0.08296998590230942,
0.14172731339931488,
0.005584465805441141,
-0.30665522813796997,
-0.021809237077832222,
-0.1418199986219406,
0.43799588084220886,
-0.00010417530575068668,
0.1016523465514183,
-0.16543827950954437,
0.07300779968500137,
-0.014402450062334538,
0.3451859951019287,
-0.25810080766677856,
0.040305573493242264,
-0.2665236294269562,
-0.2510388195514679,
0.13410936295986176,
0.11421898752450943,
-0.1555379331111908,
-0.1718599498271942,
0.2598841190338135,
0.05345795303583145,
0.3115439713001251,
0.17824454605579376,
-0.21231921017169952,
0.0683218315243721,
0.1868063062429428,
-0.09137213975191116,
-0.06049804016947746,
-0.14477762579917908,
0.16091232001781464,
-0.33556029200553894,
-0.09384306520223618,
0.4850069284439087,
-0.340511679649353,
0.044185832142829895,
-0.10746167600154877,
-0.057708628475666046,
0.5344809293746948,
-0.2271285206079483,
0.47176340222358704,
-0.07478924840688705,
0.028912723064422607,
-0.007308431901037693,
0.21751797199249268,
-0.04610137641429901,
-0.2251586765050888,
-0.16498269140720367,
-0.08142077177762985,
0.02464827336370945,
-0.12041009217500687,
-0.002801499329507351,
-0.3049473762512207,
0.10506822913885117,
0.017618170008063316,
-0.07035131752490997,
-0.04740513488650322,
0.20708803832530975,
0.07161365449428558,
0.19645929336547852,
-0.001966119511052966,
-0.0221265722066164,
-0.20381179451942444,
-0.07233872264623642,
-0.21418501436710358,
0.3232026696205139,
-0.219086691737175,
-0.10409924387931824,
0.13929574191570282,
0.00035013831802643836,
0.04147585853934288,
-0.347150981426239,
0.2148565649986267,
0.1613176167011261,
0.5573211312294006,
0.13039900362491608,
0.2938767373561859,
0.23604144155979156,
0.11554787307977676,
0.08618580549955368,
-0.08568178862333298,
-0.019824953749775887,
-0.1356143057346344,
0.19080014526844025,
0.464304119348526,
-0.1355893313884735,
0.07600858062505722,
0.09285256266593933,
-0.06214689463376999,
0.0628165602684021,
-0.17959636449813843,
-0.003744977992027998,
-0.007668063044548035,
0.10553396493196487,
-0.18442170321941376,
0.12391171604394913,
0.33212602138519287,
-0.10963654518127441,
-0.14789438247680664,
0.16515319049358368,
-0.0807064101099968,
0.14744746685028076,
-0.2918154299259186,
0.13681679964065552,
-0.27435198426246643,
-0.3260009288787842,
0.19154439866542816,
0.1905512511730194,
0.10109186917543411,
-0.11358325183391571,
-0.2623540461063385,
-0.07054631412029266,
-0.3505537211894989,
-0.08200141787528992,
0.45261532068252563,
0.08234097063541412,
0.04306687414646149,
0.15089595317840576,
0.179420605301857,
0.11089371889829636,
0.15764395892620087,
0.16333314776420593,
-0.07747738808393478,
0.044207632541656494,
0.09492177516222,
0.285916805267334,
0.2680731415748596,
0.2715637981891632,
-0.04763370007276535,
-0.13146619498729706,
0.2191029042005539,
0.04464781656861305,
-0.0039243195205926895,
-0.11610966175794601,
0.1379215121269226,
-0.1608346402645111,
-0.13400626182556152,
0.4450277090072632,
-0.24684855341911316,
0.07163167744874954,
0.23480606079101562,
-0.006171066779643297,
0.30023741722106934,
0.27068355679512024,
0.15850257873535156,
0.1346702128648758,
-0.14657466113567352,
0.12690438330173492,
-0.08941943198442459,
0.025902891531586647,
-0.03077005222439766,
0.5420806407928467,
-0.2627883553504944,
-0.05126550793647766,
-0.08765968680381775,
-0.3184928297996521,
0.25446817278862,
-0.2281498908996582,
0.1399906724691391,
-0.11448505520820618,
-0.1994927078485489,
0.09291350841522217,
-0.1312902569770813,
-0.10438863188028336,
-0.12883085012435913,
-0.13953682780265808,
0.28061050176620483,
0.39329269528388977,
0.3564973771572113,
-0.31940820813179016,
0.15041276812553406,
-0.1553937941789627,
0.37424591183662415,
0.43759027123451233,
-0.009012079797685146,
-0.11939556151628494,
0.006248110439628363,
0.0438675656914711,
-0.4535785913467407,
0.1481994092464447,
0.004160712473094463,
-0.05133173614740372,
-0.010236154310405254,
-0.003908546641469002,
-0.13490483164787292,
-0.05417685583233833,
0.04752504080533981,
0.20452165603637695,
0.2409595400094986,
-0.060130175203084946,
-0.029142918065190315,
-0.19012387096881866,
-0.1373133659362793,
-0.24058321118354797,
0.004083496052771807,
0.011377950198948383,
-0.14594916999340057,
-0.3556024730205536,
-0.23907577991485596,
-0.21355809271335602,
0.08871552348136902,
0.2786223590373993,
0.23323072493076324,
-0.2880933880805969,
0.03477005660533905,
0.21577011048793793,
-0.2188127636909485,
-0.015210343524813652,
-0.21591851115226746,
-0.0867452397942543,
-0.24418285489082336,
0.2612948417663574,
-0.002845186972990632,
-0.08114373683929443,
0.06689657270908356,
-0.12896384298801422,
-0.21473444998264313,
-0.02127246931195259,
-0.13190560042858124,
0.2655678987503052,
-0.07711312174797058,
0.008139576762914658,
-0.04536432400345802,
-0.13749592006206512,
0.11716338247060776,
-0.5879120230674744,
-0.1108921617269516,
0.1760704219341278,
-0.27451950311660767,
-0.05521080270409584,
0.09118252247571945,
-0.1113416776061058,
0.10598067194223404,
0.06784656643867493,
-0.002615187084302306,
-0.0698077380657196,
-0.007093503605574369,
0.05557139217853546,
0.18997050821781158,
0.04386846348643303,
0.24116146564483643,
0.21401122212409973,
0.2539518475532532,
-0.05963866412639618,
0.30515342950820923,
-0.13251739740371704,
0.09341586381196976,
-0.035072967410087585,
0.0383136086165905,
0.21756142377853394,
0.19500896334648132,
-0.024865353479981422,
-0.35248109698295593,
-0.18648077547550201,
0.0631103441119194,
0.2688046395778656,
-0.00002050368675554637,
-0.11697357892990112,
0.007653767243027687,
-0.13401278853416443,
0.14370635151863098,
0.12171880900859833,
0.16107277572155,
-0.35573235154151917,
0.12698255479335785,
0.10566942393779755,
-0.512539267539978,
0.2623095214366913,
-0.047027114778757095,
0.012562819756567478,
0.18678970634937286,
0.067911297082901,
-0.08822648972272873,
-0.1902301162481308,
-0.048120055347681046,
0.16667303442955017,
-0.04581504687666893,
-0.15330250561237335,
0.05839579924941063,
0.06244273483753204,
-0.37092065811157227,
-0.11884946376085281,
0.013314282521605492,
0.08870071917772293,
-0.5545303821563721,
-0.2380121797323227,
0.31488853693008423,
0.40356528759002686,
-0.3430364727973938,
-0.17145682871341705,
0.18216311931610107,
-0.31316623091697693,
-0.01869201473891735,
0.1411890983581543,
0.2306944727897644,
-0.19678696990013123,
-0.34382322430610657,
0.016189923509955406,
0.2579008638858795,
-0.3152981400489807,
0.018672704696655273,
-0.09084844589233398,
0.37365931272506714,
0.028471175581216812,
0.3435741662979126,
-0.31490659713745117,
-0.19855168461799622,
-0.29780399799346924,
-0.09428583830595016,
-0.04125352203845978,
-0.1184077262878418,
0.06113781780004501,
-0.08296601474285126,
0.056326791644096375,
0.13640910387039185,
0.09776618331670761,
0.22987505793571472,
-0.08703435957431793,
0.045755792409181595,
-0.025982391089200974,
0.005807064939290285,
0.04745318740606308,
0.2374623864889145,
0.30487850308418274,
0.09240272641181946,
-0.32265040278434753,
-0.12683886289596558,
0.03395137935876846,
0.12433616071939468,
0.08977998048067093,
-0.11481215804815292,
-0.013403411023318768,
0.3086468279361725,
0.03929833695292473,
0.3446860611438751,
-0.034401923418045044,
-0.04538543149828911,
0.1899118721485138,
-0.020785994827747345,
0.3093317449092865,
-0.15207596123218536,
-0.3961303234100342,
0.1381215751171112,
0.06070629879832268,
-0.0914100855588913,
0.28293687105178833,
-0.2412215769290924,
-0.49214041233062744,
0.054499153047800064,
0.3460961580276489,
-0.23185403645038605,
-0.2583545446395874,
0.1947029083967209,
-0.07906650751829147,
0.15868805348873138,
0.21796512603759766,
0.11425618827342987,
-0.20820219814777374,
-0.031042013317346573,
0.26084426045417786,
-0.39668434858322144,
0.24719737470149994,
-0.28646042943000793,
-0.3529946506023407,
-0.02401040866971016,
-0.604509711265564,
0.40549662709236145,
-0.07475309073925018,
0.31786563992500305,
-0.19599974155426025,
-0.27101895213127136,
-0.08592139929533005,
0.0741659477353096,
0.4556993246078491,
-0.29803016781806946,
0.007259024772793055,
0.05807056650519371,
0.20226356387138367,
-0.23294013738632202,
-0.06340768188238144,
-0.20935389399528503,
0.11484888941049576,
0.3684001564979553,
0.6094897985458374,
-0.2621525228023529,
-0.14260037243366241,
0.2796861231327057,
0.057903289794921875,
0.07181563973426819,
-0.050063684582710266,
-0.2282976359128952,
-0.19380590319633484,
-0.23520313203334808,
0.06932703405618668,
0.16712024807929993,
0.1249968484044075,
0.18212224543094635,
-0.2017490416765213,
0.2958412170410156,
-0.16321226954460144,
0.0982799306511879,
-0.07456201314926147,
0.026611998677253723,
0.2247549146413803,
0.022417603060603142,
-0.14572139084339142,
0.1909777820110321,
-0.09747803956270218,
0.07110574841499329,
-0.4111908972263336,
0.3311418890953064,
0.28594499826431274,
-0.3652261793613434,
0.3745962679386139,
0.3474961221218109,
0.1698964536190033,
0.15847623348236084,
-0.21322570741176605,
0.16816599667072296,
0.06513641029596329,
-0.3030061423778534,
0.24430440366268158,
-0.058162614703178406,
-0.03541975095868111,
0.16393207013607025,
-0.1610526293516159,
-0.03235957399010658,
-0.20336811244487762,
0.39800095558166504,
-0.14270125329494476,
-0.2544827163219452,
0.674101710319519,
-0.06751091778278351,
0.5660524368286133,
-0.054507963359355927,
-0.05192043259739876,
0.15100567042827606,
0.2030213475227356,
0.0689382329583168,
0.26980677247047424,
0.4078131914138794,
-0.21990086138248444,
0.03080332651734352,
-0.0010668730828911066,
0.04642220214009285,
0.12411291897296906,
0.44856324791908264,
0.19431617856025696,
0.22156161069869995,
-0.17755483090877533,
0.7825794219970703,
-0.0953756645321846,
-0.4372595548629761,
0.12759113311767578,
-0.1909426748752594,
-0.08276759833097458,
0.10716531425714493,
0.1728883683681488,
-0.003164617344737053,
-0.14152871072292328,
0.007148579228669405,
0.2009628266096115,
-0.35952407121658325,
0.24799275398254395,
0.07221174240112305,
-0.0847601518034935,
0.16220813989639282,
-0.08478789031505585,
0.02532249689102173,
-0.386329710483551,
-0.010306786745786667,
-0.0669977217912674,
0.010162262246012688,
0.20267483592033386,
-0.08995489031076431,
0.5557500720024109,
0.08621634542942047,
-0.1396806538105011,
0.13549114763736725,
-0.28858858346939087,
0.0077672977931797504,
-0.0255235955119133,
0.16112174093723297,
-0.2878192365169525,
-0.24527466297149658,
-0.47833895683288574,
0.38052260875701904,
0.07043852657079697,
-0.4177239239215851,
-0.2730839252471924,
-0.15526677668094635,
-0.10367970913648605,
-0.20620857179164886,
0.18795600533485413,
-0.20744813978672028,
-0.08830954134464264,
0.7247418761253357,
-0.20917756855487823,
-0.27954789996147156,
-0.0916016697883606,
0.2454252392053604,
-0.030996588990092278,
-0.018663305789232254,
0.5413089990615845,
-0.08295061439275742,
-0.15189358592033386,
-0.40180742740631104,
-0.28074347972869873,
0.13478407263755798,
-0.2248435914516449,
0.23090684413909912,
-0.4044424593448639,
-0.14184144139289856,
0.34857746958732605,
0.31726545095443726,
-0.07797936350107193,
0.0702117532491684,
0.03569294512271881,
-0.03504204377532005,
-0.22808274626731873,
0.08098345249891281,
0.18283849954605103,
0.1343393474817276,
0.13059332966804504,
0.15161919593811035,
-0.18160836398601532,
0.13643468916416168,
-0.41316306591033936,
0.006234034430235624,
-0.008835691027343273,
0.38351207971572876,
0.28980928659439087,
0.16112427413463593,
-0.03767423704266548,
0.043893635272979736,
0.2727305293083191,
0.296010285615921,
0.13726703822612762,
-0.3543025553226471,
0.1387079656124115,
0.05688325688242912,
-0.03738339990377426,
0.006320264656096697,
0.09544096887111664,
-0.15060855448246002,
-0.20298205316066742,
-0.1668466478586197,
0.320976197719574,
0.04025281220674515,
-0.12575925886631012,
-0.040243059396743774,
0.1746550351381302,
0.11101130396127701,
0.19477540254592896,
-0.09505275636911392,
-0.1775071918964386,
-0.06595973670482635,
0.10958132147789001,
-0.020940657705068588,
-0.0787140354514122,
-0.10206477344036102,
0.10338543355464935,
0.016657670959830284,
-0.016323518007993698,
0.08746600151062012,
0.24678070843219757,
-0.24636225402355194,
-0.17345388233661652,
0.10629886388778687,
0.21306611597537994,
-0.17253059148788452,
-0.08152446150779724,
-0.4258835017681122,
0.04173679277300835,
0.33950620889663696,
-0.17445360124111176,
-0.05749388039112091,
0.33500269055366516,
0.11756177991628647,
0.28523147106170654,
0.33536961674690247,
0.11901978403329849,
-0.5898568034172058,
0.018888035789132118,
0.18080948293209076,
0.32698485255241394,
-0.29952746629714966,
-0.32894107699394226,
0.5127062201499939,
0.04141310229897499,
0.007662503980100155,
0.2602902352809906,
0.10656852275133133,
0.12688897550106049,
0.3043857216835022,
0.2572588324546814,
0.10322961956262589,
0.128236323595047,
0.15292973816394806,
-0.3812371492385864,
-0.6438072919845581,
0.27281925082206726,
0.29503709077835083,
0.12211468070745468,
0.31201064586639404,
0.239572674036026,
-0.06464262306690216,
-0.23429961502552032,
-0.20686142146587372,
0.11495457589626312,
0.3746166229248047,
-0.38695845007896423,
-0.07111577689647675,
-0.44408902525901794,
-0.1830899864435196,
0.3627059757709503,
-0.06637820601463318,
0.10240455716848373,
0.16760151088237762,
0.6062601208686829,
-0.16486625373363495,
-0.014847409911453724,
-0.02298109233379364,
-0.3319789469242096,
-0.23955672979354858,
0.24328656494617462,
-0.18064847588539124,
0.05873917415738106,
-0.20693695545196533,
0.033775463700294495,
-0.010978895239531994,
0.03381097689270973,
0.1379666030406952,
0.09481882303953171,
0.18204104900360107,
-0.09991263598203659,
-0.07214731723070145,
-0.2900979816913605,
-0.287812739610672,
0.2695864737033844,
0.11586672812700272,
0.14432668685913086,
0.22151535749435425,
0.16247154772281647,
-0.266771525144577,
-0.1103883683681488,
0.43279534578323364,
0.11465328931808472,
0.3195900022983551,
-0.07680005580186844,
0.15657459199428558,
-0.4619992971420288,
0.002803903305903077,
-0.18721528351306915,
-0.04879290983080864,
-0.14755301177501678,
0.015275063924491405,
-0.14101943373680115,
0.22572758793830872,
0.12575849890708923,
0.1826208233833313,
0.050295185297727585,
0.12648113071918488,
0.32484108209609985,
-0.37954631447792053,
-0.5817651748657227,
-0.18486571311950684,
-0.30760231614112854,
-0.10533230751752853,
-0.435899019241333,
0.07136482000350952,
0.10091497749090195,
0.2504142224788666,
0.36180952191352844,
-0.19320529699325562,
0.025705279782414436,
0.015263491310179234,
-0.14403431117534637,
0.31889185309410095,
-0.2956172823905945,
0.14146624505519867,
-0.0681743174791336,
0.005594075191766024,
0.13546441495418549,
-0.46723029017448425,
0.4003046751022339,
0.30377140641212463,
0.26530078053474426,
-0.11570415645837784,
0.05661466345191002,
-0.019400309771299362,
-0.11069580912590027,
0.028393320739269257,
0.009022478945553303,
-0.1758878231048584,
-0.13309630751609802,
-0.3292858898639679,
-0.2976793646812439,
0.041711192578077316,
-0.03334684297442436,
-0.2163822054862976,
0.38297852873802185,
0.19383849203586578,
-0.057032860815525055,
0.09285201132297516,
-0.00999058224260807,
0.1568847894668579,
0.1519244760274887,
0.3009350895881653,
-0.1289568543434143,
0.2094227373600006,
0.12469117343425751,
0.1637854278087616,
0.07533327490091324,
0.265268474817276,
0.1338891237974167,
0.12676085531711578,
-0.36825019121170044,
-0.4157409369945526,
0.41225191950798035,
-0.5325069427490234,
-0.7680293321609497,
-0.010934942401945591,
0.2625085711479187,
-0.14808036386966705,
-0.18320123851299286,
-0.0021347126457840204,
-0.00009323058475274593,
0.03973400592803955,
-0.20001652836799622,
-0.1515328586101532,
0.0760934054851532,
-0.3926730155944824,
-0.014174317009747028,
0.20435960590839386,
-0.061189234256744385,
0.3098514974117279,
-0.12720292806625366,
-0.206631600856781,
-0.1201808899641037
] |
https://github.com/huggingface/datasets/issues/2218
|
Duplicates in the LAMA dataset
|
Hi,
currently the datasets API doesn't have a dedicated function to remove duplicate rows, but since the LAMA dataset is not too big (it fits in RAM), we can leverage pandas to help us remove duplicates:
```python
>>> from datasets import load_dataset, Dataset
>>> dataset = load_dataset('lama', split='train')
>>> dataset = Dataset.from_pandas(dataset.to_pandas().drop_duplicates(subset=...)) # specify a subset of the columns to consider in a list or use all of the columns if None
```
Note that the same can be achieved with the `Dataset.filter` method but this would requrie some extra work (filter function, speed?).
|
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
| 94 |
Duplicates in the LAMA dataset
|
[
0.10703206807374954,
-0.17791739106178284,
-0.14050057530403137,
0.6308494210243225,
0.0734018012881279,
-0.015030316077172756,
0.3598482012748718,
0.16227635741233826,
-0.5047624707221985,
0.2693749964237213,
-0.2515650689601898,
0.3199131488800049,
-0.042413271963596344,
-0.3483929932117462,
-0.05314955860376358,
-0.058192066848278046,
-0.04709462821483612,
-0.07242650538682938,
-0.1789691299200058,
-0.22999082505702972,
-0.24284657835960388,
0.2510412931442261,
-0.05491111800074577,
-0.08336663991212845,
0.018545445054769516,
0.08976222574710846,
-0.16336554288864136,
0.3065418601036072,
-0.13979798555374146,
-0.1170036569237709,
-0.14645271003246307,
0.34458476305007935,
-0.06710502505302429,
0.3106832206249237,
-0.00011015892232535407,
-0.1538257598876953,
-0.028212346136569977,
-0.11729229241609573,
-0.22931884229183197,
0.24681374430656433,
-0.32382088899612427,
0.1565607190132141,
-0.021520959213376045,
-0.26015180349349976,
0.014179292134940624,
-0.09365972876548767,
-0.07469885051250458,
0.16084934771060944,
0.17018616199493408,
-0.20405864715576172,
0.26062503457069397,
0.1254158765077591,
-0.29198867082595825,
-0.1253128945827484,
0.08507059514522552,
0.13288472592830658,
-0.008193527348339558,
0.7624167799949646,
0.2778879404067993,
0.43590205907821655,
-0.004538576118648052,
0.4970759153366089,
0.11901147663593292,
0.1740104705095291,
-0.2720124423503876,
-0.11359719932079315,
0.15401285886764526,
0.29533466696739197,
0.3752954602241516,
0.3482205271720886,
0.2453642040491104,
-0.23132459819316864,
-0.05614496022462845,
0.01929416134953499,
0.10627619922161102,
-0.15983879566192627,
0.12255378067493439,
-0.06316981464624405,
0.01605891063809395,
-0.048810869455337524,
0.17046035826206207,
0.024540597572922707,
0.11433464288711548,
-0.07359501719474792,
0.01174911018460989,
-0.4889959990978241,
0.20318280160427094,
0.15870870649814606,
0.06797763705253601,
0.05092836543917656,
-0.10329675674438477,
-0.23440082371234894,
-0.11863087862730026,
0.05012882128357887,
-0.005543717183172703,
-0.27889445424079895,
-0.04747442528605461,
-0.10179118812084198,
0.05658560246229172,
0.20047122240066528,
0.33025261759757996,
0.2777293920516968,
-0.1961948573589325,
-0.06610994040966034,
0.3189746141433716,
-0.06495319306850433,
-0.09413708001375198,
0.15317614376544952,
-0.08993880450725555,
0.15029138326644897,
-0.24194450676441193,
0.0708514004945755,
-0.1761522889137268,
-0.2287038117647171,
-0.05216793715953827,
0.010810722596943378,
-0.06765084713697433,
-0.2188669592142105,
0.02240508235991001,
-0.15604981780052185,
-0.1828581690788269,
-0.3304092288017273,
-0.07210510224103928,
-0.0600033737719059,
0.1811923086643219,
0.15270653367042542,
-0.2799060344696045,
-0.059529032558202744,
-0.1567135900259018,
-0.1227191835641861,
-0.2929104268550873,
0.01678537204861641,
-0.24746529757976532,
0.05324829742312431,
0.00034829057403840125,
-0.5540183782577515,
0.3909316062927246,
0.12899264693260193,
-0.015291481278836727,
-0.07675730437040329,
0.3513285219669342,
-0.10725324600934982,
0.1962217390537262,
-0.10944051295518875,
-0.046373866498470306,
0.11359840631484985,
-0.13513678312301636,
0.03896074742078781,
-0.010499579831957817,
0.05388195812702179,
0.08608747273683548,
0.0038482476957142353,
-0.1732635349035263,
0.2042253017425537,
0.2204415500164032,
0.46808764338493347,
0.2653748393058777,
0.20902776718139648,
0.0999700203537941,
-0.20047657191753387,
0.044320907443761826,
0.057699427008628845,
-0.10231195390224457,
-0.19344373047351837,
-0.20128127932548523,
0.3865232765674591,
-0.2521854341030121,
0.05616241320967674,
-0.3024888336658478,
-0.12705150246620178,
0.20987001061439514,
0.36304807662963867,
-0.15288576483726501,
0.13863687217235565,
-0.3175976276397705,
0.042878467589616776,
0.3528757095336914,
-0.2081713229417801,
-0.2445470094680786,
-0.10797514021396637,
0.09470455348491669,
-0.15441514551639557,
0.20459862053394318,
0.373595654964447,
0.36915189027786255,
-0.23651035130023956,
0.27452781796455383,
-0.2925196886062622,
-0.029908766970038414,
-0.24586160480976105,
-0.22257940471172333,
0.004177217371761799,
-0.1379353404045105,
-0.2939078211784363,
-0.10421735793352127,
-0.04476504027843475,
0.37514904141426086,
0.04198584705591202,
0.2632574737071991,
-0.0143823754042387,
-0.14587223529815674,
0.00488261878490448,
0.1844765543937683,
-0.08193834125995636,
0.2664290964603424,
0.2018858641386032,
-0.02665041945874691,
0.08627640455961227,
-0.27914196252822876,
0.17206576466560364,
0.16169986128807068,
-0.0724225714802742,
-0.22406314313411713,
-0.144961878657341,
-0.061505027115345,
0.11085392534732819,
0.2118997871875763,
0.20818954706192017,
-0.2343161404132843,
-0.10504191368818283,
0.03986241668462753,
0.12223544716835022,
-0.17246803641319275,
0.04227950796484947,
-0.47921982407569885,
0.2636967599391937,
-0.18983156979084015,
-0.2001001238822937,
0.4098092317581177,
0.3585146367549896,
0.1730368584394455,
0.03305169194936752,
0.30034324526786804,
-0.17810529470443726,
0.18842744827270508,
0.05342908203601837,
0.4397071897983551,
-0.25830045342445374,
-0.024654829874634743,
-0.14907954633235931,
-0.08451826125383377,
0.05663352459669113,
0.1485147774219513,
-0.10279876738786697,
-0.2427174299955368,
0.4683542549610138,
0.48327121138572693,
-0.40128007531166077,
0.0041582114063203335,
0.0023012037854641676,
0.2690255641937256,
-0.09436625987291336,
0.0829065814614296,
-0.4899144470691681,
0.1421443223953247,
0.7802695035934448,
0.3297985792160034,
0.5157106518745422,
-0.20048803091049194,
0.2105187475681305,
0.015695450827479362,
-0.08355040103197098,
0.02725740522146225,
-0.2913016974925995,
-0.16187982261180878,
-0.12135845422744751,
0.24037548899650574,
0.3401338458061218,
0.1938093602657318,
0.25361570715904236,
0.4376946687698364,
0.09042461961507797,
-0.2717241644859314,
-0.18036779761314392,
0.0891038104891777,
-0.03143644332885742,
-0.21513894200325012,
0.05768922343850136,
0.07344439625740051,
-0.06523694843053818,
-0.5973573327064514,
0.42367810010910034,
0.2079528570175171,
0.21720458567142487,
-0.09769584983587265,
-0.09895006567239761,
-0.32427510619163513,
-0.07841028273105621,
-0.34104472398757935,
0.4590383470058441,
-0.15738938748836517,
-0.1521473228931427,
0.3356707692146301,
0.1712975800037384,
-0.038731206208467484,
-0.0012856629909947515,
0.28462421894073486,
0.5352053046226501,
-0.03448737412691116,
0.4657707214355469,
-0.17266671359539032,
-0.09433528780937195,
-0.13691483438014984,
0.28241902589797974,
0.20812657475471497,
0.0030734252650290728,
0.3288593292236328,
-0.03435346484184265,
-0.14510133862495422,
-0.47680726647377014,
-0.3571595251560211,
0.061491627246141434,
0.19919131696224213,
-0.04709703475236893,
0.1888437718153,
0.11465324461460114,
0.0025483104400336742,
-0.23673686385154724,
-0.19861865043640137,
0.28104373812675476,
-0.3635095953941345,
0.0009551172843202949,
-0.4009256958961487,
0.1436760276556015,
-0.2055261880159378,
-0.3573371171951294,
0.3429141044616699,
0.023274578154087067,
0.202760711312294,
0.2322489619255066,
0.2794327437877655,
-0.29126977920532227,
0.03140217438340187,
-0.14826908707618713,
-0.36594465374946594,
-0.4076678454875946,
-0.5948194861412048,
-0.09160692989826202,
0.12883731722831726,
-0.09891905635595322,
-0.17435185611248016,
-0.009237444028258324,
-0.42010608315467834,
0.5676310062408447,
-0.0906653106212616,
-0.3344743251800537,
-0.15031734108924866,
0.289995938539505,
-0.03532326593995094,
0.38137760758399963,
-0.07636610418558121,
0.10488294064998627,
0.2877514064311981,
-0.33349522948265076,
-0.11960058659315109,
0.05027135834097862,
0.14318332076072693,
0.23397624492645264,
0.44819140434265137,
-0.40391525626182556,
-0.11744873225688934,
0.04979840666055679,
0.3412155210971832,
0.5188860893249512,
-0.16170719265937805,
0.18584378063678741,
0.05446365475654602,
0.3278079330921173,
0.11529520899057388,
0.019337965175509453,
0.11537773162126541,
-0.010368162766098976,
0.2652096450328827,
0.6101916432380676,
0.17431358993053436,
-0.24677173793315887,
0.13397091627120972,
0.06975764036178589,
-0.17138783633708954,
-0.27728262543678284,
-0.2655462622642517,
-0.1378476321697235,
-0.025246135890483856,
0.3959830105304718,
-0.5018715858459473,
-0.10377410054206848,
0.05750991031527519,
0.11282608658075333,
0.015403805300593376,
-0.09377769380807877,
-0.2630148231983185,
0.18159523606300354,
0.3880716860294342,
-0.2857130765914917,
0.09581812471151352,
0.09912750869989395,
-0.032650504261255264,
0.146715447306633,
0.1696949601173401,
0.20035499334335327,
0.1264529675245285,
0.608029305934906,
-0.27515265345573425,
0.05851547047495842,
0.004485204815864563,
0.1128498986363411,
-0.3754020929336548,
0.1219504177570343,
-0.36635276675224304,
0.05673069506883621,
0.0458490327000618,
0.34709814190864563,
-0.2630831003189087,
0.23995575308799744,
0.30569055676460266,
0.26538875699043274,
-0.42960885167121887,
-0.17967645823955536,
-0.19555038213729858,
-0.4807383418083191,
-0.22923406958580017,
-0.1259526163339615,
-0.2273784875869751,
0.02169012278318405,
0.17332322895526886,
-0.2661159932613373,
0.1071062758564949,
-0.037414729595184326,
0.20158149302005768,
0.09985747933387756,
0.1738460212945938,
0.45190274715423584,
0.2219664603471756,
-0.01532767154276371,
0.1233857199549675,
-0.0052683171816170216,
0.7008371353149414,
-0.19589856266975403,
-0.17657893896102905,
-0.07453504949808121,
-0.4378126561641693,
-0.03224525973200798,
0.3866606056690216,
-0.02717355079948902,
0.19839569926261902,
-0.01595815271139145,
-0.14111869037151337,
0.11287955939769745,
0.07994789630174637,
0.2029578685760498,
0.07066673785448074,
0.05744380131363869,
-0.2720033526420593,
0.0973610207438469,
-0.02020576037466526,
-0.3998360335826874,
0.8124842047691345,
-0.16659928858280182,
0.04768809676170349,
-0.03360361605882645,
0.19106493890285492,
1.0552984476089478,
-0.25903236865997314,
0.02012212574481964,
0.40844428539276123,
-0.40779390931129456,
-0.09001901745796204,
0.20465770363807678,
-0.1450885832309723,
-0.3054157793521881,
0.13901177048683167,
0.13514070212841034,
0.03446608781814575,
0.12983357906341553,
0.3316599130630493,
-0.12358682602643967,
0.026274656876921654,
0.2603006660938263,
-0.36182165145874023,
0.06318359076976776,
-0.14328739047050476,
0.1035718098282814,
0.3024577498435974,
0.5191338658332825,
0.11935438215732574,
0.15497620403766632,
-0.12376996129751205,
-0.02131732366979122,
-0.10177597403526306,
0.08107911050319672,
-0.3423503041267395,
0.0397503487765789,
-0.28405696153640747,
-0.15765662491321564,
0.16257146000862122,
-0.0749773308634758,
-0.39461883902549744,
-0.3277709186077118,
-0.17676471173763275,
0.3443756103515625,
-0.16708500683307648,
0.09873107075691223,
0.1278149038553238,
0.24850142002105713,
0.2200462520122528,
-0.16418662667274475,
-0.10511291027069092,
0.18053323030471802,
-0.04840308800339699,
-0.1912563592195511,
-0.03253559395670891,
0.3256579041481018,
-0.02064816839993,
0.024766840040683746,
0.3319253623485565,
-0.5443101525306702,
-0.12970586121082306,
0.13882429897785187,
0.42763417959213257,
-0.3397819995880127,
-0.3304104208946228,
0.15387263894081116,
0.12552039325237274,
-0.2940790057182312,
0.12303799390792847,
-0.14129656553268433,
-0.14742976427078247,
-0.05351576581597328,
0.2562331557273865,
0.5768468379974365,
-0.10308349132537842,
-0.06839436292648315,
-0.0210553128272295,
-0.08967599272727966,
-0.19856059551239014,
-0.23506753146648407,
0.0412488728761673,
-0.629984974861145,
0.1971830129623413,
-0.19697019457817078,
-0.044019073247909546,
0.06751913577318192,
0.05984552204608917,
0.030941488221287727,
0.03252771869301796,
-0.20715364813804626,
0.08232366293668747,
-0.3208012580871582,
0.18415288627147675,
-0.1294582039117813,
0.33880504965782166,
-0.1603497713804245,
-0.09057214856147766,
-0.011000094935297966,
0.46963948011398315,
-0.363176167011261,
0.3095889091491699,
-0.09209471195936203,
0.3291091024875641,
-0.13718435168266296,
-0.14379997551441193,
-0.3238450288772583,
0.03339510038495064,
0.21352915465831757,
-0.05482465773820877,
-0.22853578627109528,
-0.343638151884079,
0.03649492189288139,
0.08778204768896103,
-0.23956823348999023,
0.04540681093931198,
-0.08546582609415054,
0.08051878958940506,
0.16367663443088531,
0.10647215694189072,
0.038045354187488556,
-0.06134505197405815,
0.13363507390022278,
-0.01497906818985939,
0.35144317150115967,
-0.3503243625164032,
-0.29493123292922974,
0.08487911522388458,
0.010335668921470642,
0.1479950100183487,
0.333482563495636,
-0.22881382703781128,
-0.051540207117795944,
-0.23469458520412445,
-0.04759906232357025,
-0.0358918197453022,
-0.06341191381216049,
-0.10926508158445358,
-0.005784862209111452,
0.1837647706270218,
-0.3444976210594177,
-0.05202557519078255,
0.19848382472991943,
-0.16774103045463562,
-0.05853848531842232,
-0.19507737457752228,
-0.03346976637840271,
0.18501730263233185,
-0.6246343851089478,
-0.3078590929508209,
0.09586066752672195,
-0.17419162392616272,
0.17279620468616486,
0.037768226116895676,
0.21232645213603973,
-0.35267704725265503,
0.014246463775634766,
-0.19950731098651886,
-0.05982377007603645,
-0.17214833199977875,
0.29987069964408875,
0.5050820112228394,
0.09509073942899704,
-0.14976152777671814,
0.18281657993793488,
0.18063057959079742,
0.02242373488843441,
0.3090142011642456,
-0.013644852675497532,
0.4630546271800995,
-0.3807600438594818,
-0.04637317359447479,
0.18084639310836792,
-0.11368657648563385,
0.23272328078746796,
0.24743863940238953,
0.03327888250350952,
0.09022295475006104,
0.24323627352714539,
-0.21745912730693817,
0.2948680818080902,
-0.06328817456960678,
-0.10502836853265762,
-0.06071086227893829,
-0.11756312847137451,
-0.02573721669614315,
0.004978020675480366,
-0.13568657636642456,
-0.10599688440561295,
0.14064449071884155,
0.18348197638988495,
-0.14803491532802582,
0.34484928846359253,
0.22564509510993958,
0.04543992504477501,
-0.0719427540898323,
-0.15560518205165863,
-0.03727070987224579,
-0.08817630261182785,
-0.05378496274352074,
0.29969045519828796,
0.3356375992298126,
-0.1338362693786621,
0.1933731585741043,
0.44677188992500305,
0.14140906929969788,
-0.5235984921455383,
0.2975563704967499,
-0.1133919209241867,
-0.24624474346637726,
-0.09136760979890823,
-0.19899027049541473,
-0.03090120293200016,
0.02635611593723297,
-0.085605189204216,
-0.026059022173285484,
0.13795246183872223,
-0.1257961243391037,
-0.04803316295146942,
0.4182881712913513,
-0.2459820657968521,
-0.2663460373878479,
0.4383102059364319,
-0.20704419910907745,
-0.2677208483219147,
0.11499115824699402,
0.17171645164489746,
-0.3684817850589752,
0.2568695843219757,
0.38946983218193054,
-0.3242141306400299,
-0.022639747709035873,
-0.055650267750024796,
0.09980141371488571,
-0.09990032017230988,
0.4472495913505554,
0.10818128287792206,
0.03107755072414875,
-0.12165110558271408,
-0.5052262544631958,
-0.6748517155647278,
0.39860597252845764,
-0.29254060983657837,
0.22380268573760986,
-0.09243709594011307,
0.3008267283439636,
0.0630185529589653,
0.17336994409561157,
0.2374362200498581,
0.03313784301280975,
-0.029570402577519417,
-0.08664422482252121,
-0.4174914062023163,
-0.2306690216064453,
0.21778079867362976,
-0.08850930631160736,
-0.1971731185913086,
-0.09606321156024933,
0.30755627155303955,
-0.333740770816803,
0.12420766055583954,
0.2156667858362198,
-0.27776795625686646,
0.20221179723739624,
0.5083178281784058,
-0.01584293320775032,
-0.03617824986577034,
0.08963441103696823,
-0.035926662385463715,
0.014693815261125565,
0.2298109531402588,
-0.06016852706670761,
0.31074440479278564,
0.21624967455863953,
0.20293907821178436,
-0.0013092494336888194,
-0.21238014101982117,
0.11162449419498444,
0.23362848162651062,
0.16280916333198547,
0.12661832571029663,
0.3299265503883362,
-0.2218899130821228,
-0.0191973727196455,
-0.07664627581834793,
0.0509207621216774,
-0.050153397023677826,
0.21003678441047668,
0.1575292944908142,
-0.211353600025177,
-0.10667171329259872,
-0.3708946108818054,
0.41926634311676025,
-0.43637320399284363,
0.02248421125113964,
-0.4608207643032074,
0.27716264128685,
-0.23301653563976288,
0.1606905460357666,
-0.42240676283836365,
0.0873870998620987,
0.4717086851596832,
-0.009328270331025124,
0.04822395369410515,
0.20960956811904907,
-0.19784404337406158,
0.011617298237979412,
-0.015846746042370796,
-0.1627209186553955,
0.08982595056295395,
-0.13642169535160065,
0.26724836230278015,
-0.28743210434913635
] |
https://github.com/huggingface/datasets/issues/2218
|
Duplicates in the LAMA dataset
|
Oh, seems like my question wasn't specified well. I'm _not_ asking how to remove duplicates, but whether duplicates should be removed if I want to do the evaluation on the LAMA dataset as it was proposed in the original paper/repository? In other words, will I get the same result if evaluate on the de-duplicated dataset loaded from HF's `datasets` as the results I'd get if I use the original data format and data processing script in https://github.com/facebookresearch/LAMA?
|
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
| 77 |
Duplicates in the LAMA dataset
|
[
0.10703206807374954,
-0.17791739106178284,
-0.14050057530403137,
0.6308494210243225,
0.0734018012881279,
-0.015030316077172756,
0.3598482012748718,
0.16227635741233826,
-0.5047624707221985,
0.2693749964237213,
-0.2515650689601898,
0.3199131488800049,
-0.042413271963596344,
-0.3483929932117462,
-0.05314955860376358,
-0.058192066848278046,
-0.04709462821483612,
-0.07242650538682938,
-0.1789691299200058,
-0.22999082505702972,
-0.24284657835960388,
0.2510412931442261,
-0.05491111800074577,
-0.08336663991212845,
0.018545445054769516,
0.08976222574710846,
-0.16336554288864136,
0.3065418601036072,
-0.13979798555374146,
-0.1170036569237709,
-0.14645271003246307,
0.34458476305007935,
-0.06710502505302429,
0.3106832206249237,
-0.00011015892232535407,
-0.1538257598876953,
-0.028212346136569977,
-0.11729229241609573,
-0.22931884229183197,
0.24681374430656433,
-0.32382088899612427,
0.1565607190132141,
-0.021520959213376045,
-0.26015180349349976,
0.014179292134940624,
-0.09365972876548767,
-0.07469885051250458,
0.16084934771060944,
0.17018616199493408,
-0.20405864715576172,
0.26062503457069397,
0.1254158765077591,
-0.29198867082595825,
-0.1253128945827484,
0.08507059514522552,
0.13288472592830658,
-0.008193527348339558,
0.7624167799949646,
0.2778879404067993,
0.43590205907821655,
-0.004538576118648052,
0.4970759153366089,
0.11901147663593292,
0.1740104705095291,
-0.2720124423503876,
-0.11359719932079315,
0.15401285886764526,
0.29533466696739197,
0.3752954602241516,
0.3482205271720886,
0.2453642040491104,
-0.23132459819316864,
-0.05614496022462845,
0.01929416134953499,
0.10627619922161102,
-0.15983879566192627,
0.12255378067493439,
-0.06316981464624405,
0.01605891063809395,
-0.048810869455337524,
0.17046035826206207,
0.024540597572922707,
0.11433464288711548,
-0.07359501719474792,
0.01174911018460989,
-0.4889959990978241,
0.20318280160427094,
0.15870870649814606,
0.06797763705253601,
0.05092836543917656,
-0.10329675674438477,
-0.23440082371234894,
-0.11863087862730026,
0.05012882128357887,
-0.005543717183172703,
-0.27889445424079895,
-0.04747442528605461,
-0.10179118812084198,
0.05658560246229172,
0.20047122240066528,
0.33025261759757996,
0.2777293920516968,
-0.1961948573589325,
-0.06610994040966034,
0.3189746141433716,
-0.06495319306850433,
-0.09413708001375198,
0.15317614376544952,
-0.08993880450725555,
0.15029138326644897,
-0.24194450676441193,
0.0708514004945755,
-0.1761522889137268,
-0.2287038117647171,
-0.05216793715953827,
0.010810722596943378,
-0.06765084713697433,
-0.2188669592142105,
0.02240508235991001,
-0.15604981780052185,
-0.1828581690788269,
-0.3304092288017273,
-0.07210510224103928,
-0.0600033737719059,
0.1811923086643219,
0.15270653367042542,
-0.2799060344696045,
-0.059529032558202744,
-0.1567135900259018,
-0.1227191835641861,
-0.2929104268550873,
0.01678537204861641,
-0.24746529757976532,
0.05324829742312431,
0.00034829057403840125,
-0.5540183782577515,
0.3909316062927246,
0.12899264693260193,
-0.015291481278836727,
-0.07675730437040329,
0.3513285219669342,
-0.10725324600934982,
0.1962217390537262,
-0.10944051295518875,
-0.046373866498470306,
0.11359840631484985,
-0.13513678312301636,
0.03896074742078781,
-0.010499579831957817,
0.05388195812702179,
0.08608747273683548,
0.0038482476957142353,
-0.1732635349035263,
0.2042253017425537,
0.2204415500164032,
0.46808764338493347,
0.2653748393058777,
0.20902776718139648,
0.0999700203537941,
-0.20047657191753387,
0.044320907443761826,
0.057699427008628845,
-0.10231195390224457,
-0.19344373047351837,
-0.20128127932548523,
0.3865232765674591,
-0.2521854341030121,
0.05616241320967674,
-0.3024888336658478,
-0.12705150246620178,
0.20987001061439514,
0.36304807662963867,
-0.15288576483726501,
0.13863687217235565,
-0.3175976276397705,
0.042878467589616776,
0.3528757095336914,
-0.2081713229417801,
-0.2445470094680786,
-0.10797514021396637,
0.09470455348491669,
-0.15441514551639557,
0.20459862053394318,
0.373595654964447,
0.36915189027786255,
-0.23651035130023956,
0.27452781796455383,
-0.2925196886062622,
-0.029908766970038414,
-0.24586160480976105,
-0.22257940471172333,
0.004177217371761799,
-0.1379353404045105,
-0.2939078211784363,
-0.10421735793352127,
-0.04476504027843475,
0.37514904141426086,
0.04198584705591202,
0.2632574737071991,
-0.0143823754042387,
-0.14587223529815674,
0.00488261878490448,
0.1844765543937683,
-0.08193834125995636,
0.2664290964603424,
0.2018858641386032,
-0.02665041945874691,
0.08627640455961227,
-0.27914196252822876,
0.17206576466560364,
0.16169986128807068,
-0.0724225714802742,
-0.22406314313411713,
-0.144961878657341,
-0.061505027115345,
0.11085392534732819,
0.2118997871875763,
0.20818954706192017,
-0.2343161404132843,
-0.10504191368818283,
0.03986241668462753,
0.12223544716835022,
-0.17246803641319275,
0.04227950796484947,
-0.47921982407569885,
0.2636967599391937,
-0.18983156979084015,
-0.2001001238822937,
0.4098092317581177,
0.3585146367549896,
0.1730368584394455,
0.03305169194936752,
0.30034324526786804,
-0.17810529470443726,
0.18842744827270508,
0.05342908203601837,
0.4397071897983551,
-0.25830045342445374,
-0.024654829874634743,
-0.14907954633235931,
-0.08451826125383377,
0.05663352459669113,
0.1485147774219513,
-0.10279876738786697,
-0.2427174299955368,
0.4683542549610138,
0.48327121138572693,
-0.40128007531166077,
0.0041582114063203335,
0.0023012037854641676,
0.2690255641937256,
-0.09436625987291336,
0.0829065814614296,
-0.4899144470691681,
0.1421443223953247,
0.7802695035934448,
0.3297985792160034,
0.5157106518745422,
-0.20048803091049194,
0.2105187475681305,
0.015695450827479362,
-0.08355040103197098,
0.02725740522146225,
-0.2913016974925995,
-0.16187982261180878,
-0.12135845422744751,
0.24037548899650574,
0.3401338458061218,
0.1938093602657318,
0.25361570715904236,
0.4376946687698364,
0.09042461961507797,
-0.2717241644859314,
-0.18036779761314392,
0.0891038104891777,
-0.03143644332885742,
-0.21513894200325012,
0.05768922343850136,
0.07344439625740051,
-0.06523694843053818,
-0.5973573327064514,
0.42367810010910034,
0.2079528570175171,
0.21720458567142487,
-0.09769584983587265,
-0.09895006567239761,
-0.32427510619163513,
-0.07841028273105621,
-0.34104472398757935,
0.4590383470058441,
-0.15738938748836517,
-0.1521473228931427,
0.3356707692146301,
0.1712975800037384,
-0.038731206208467484,
-0.0012856629909947515,
0.28462421894073486,
0.5352053046226501,
-0.03448737412691116,
0.4657707214355469,
-0.17266671359539032,
-0.09433528780937195,
-0.13691483438014984,
0.28241902589797974,
0.20812657475471497,
0.0030734252650290728,
0.3288593292236328,
-0.03435346484184265,
-0.14510133862495422,
-0.47680726647377014,
-0.3571595251560211,
0.061491627246141434,
0.19919131696224213,
-0.04709703475236893,
0.1888437718153,
0.11465324461460114,
0.0025483104400336742,
-0.23673686385154724,
-0.19861865043640137,
0.28104373812675476,
-0.3635095953941345,
0.0009551172843202949,
-0.4009256958961487,
0.1436760276556015,
-0.2055261880159378,
-0.3573371171951294,
0.3429141044616699,
0.023274578154087067,
0.202760711312294,
0.2322489619255066,
0.2794327437877655,
-0.29126977920532227,
0.03140217438340187,
-0.14826908707618713,
-0.36594465374946594,
-0.4076678454875946,
-0.5948194861412048,
-0.09160692989826202,
0.12883731722831726,
-0.09891905635595322,
-0.17435185611248016,
-0.009237444028258324,
-0.42010608315467834,
0.5676310062408447,
-0.0906653106212616,
-0.3344743251800537,
-0.15031734108924866,
0.289995938539505,
-0.03532326593995094,
0.38137760758399963,
-0.07636610418558121,
0.10488294064998627,
0.2877514064311981,
-0.33349522948265076,
-0.11960058659315109,
0.05027135834097862,
0.14318332076072693,
0.23397624492645264,
0.44819140434265137,
-0.40391525626182556,
-0.11744873225688934,
0.04979840666055679,
0.3412155210971832,
0.5188860893249512,
-0.16170719265937805,
0.18584378063678741,
0.05446365475654602,
0.3278079330921173,
0.11529520899057388,
0.019337965175509453,
0.11537773162126541,
-0.010368162766098976,
0.2652096450328827,
0.6101916432380676,
0.17431358993053436,
-0.24677173793315887,
0.13397091627120972,
0.06975764036178589,
-0.17138783633708954,
-0.27728262543678284,
-0.2655462622642517,
-0.1378476321697235,
-0.025246135890483856,
0.3959830105304718,
-0.5018715858459473,
-0.10377410054206848,
0.05750991031527519,
0.11282608658075333,
0.015403805300593376,
-0.09377769380807877,
-0.2630148231983185,
0.18159523606300354,
0.3880716860294342,
-0.2857130765914917,
0.09581812471151352,
0.09912750869989395,
-0.032650504261255264,
0.146715447306633,
0.1696949601173401,
0.20035499334335327,
0.1264529675245285,
0.608029305934906,
-0.27515265345573425,
0.05851547047495842,
0.004485204815864563,
0.1128498986363411,
-0.3754020929336548,
0.1219504177570343,
-0.36635276675224304,
0.05673069506883621,
0.0458490327000618,
0.34709814190864563,
-0.2630831003189087,
0.23995575308799744,
0.30569055676460266,
0.26538875699043274,
-0.42960885167121887,
-0.17967645823955536,
-0.19555038213729858,
-0.4807383418083191,
-0.22923406958580017,
-0.1259526163339615,
-0.2273784875869751,
0.02169012278318405,
0.17332322895526886,
-0.2661159932613373,
0.1071062758564949,
-0.037414729595184326,
0.20158149302005768,
0.09985747933387756,
0.1738460212945938,
0.45190274715423584,
0.2219664603471756,
-0.01532767154276371,
0.1233857199549675,
-0.0052683171816170216,
0.7008371353149414,
-0.19589856266975403,
-0.17657893896102905,
-0.07453504949808121,
-0.4378126561641693,
-0.03224525973200798,
0.3866606056690216,
-0.02717355079948902,
0.19839569926261902,
-0.01595815271139145,
-0.14111869037151337,
0.11287955939769745,
0.07994789630174637,
0.2029578685760498,
0.07066673785448074,
0.05744380131363869,
-0.2720033526420593,
0.0973610207438469,
-0.02020576037466526,
-0.3998360335826874,
0.8124842047691345,
-0.16659928858280182,
0.04768809676170349,
-0.03360361605882645,
0.19106493890285492,
1.0552984476089478,
-0.25903236865997314,
0.02012212574481964,
0.40844428539276123,
-0.40779390931129456,
-0.09001901745796204,
0.20465770363807678,
-0.1450885832309723,
-0.3054157793521881,
0.13901177048683167,
0.13514070212841034,
0.03446608781814575,
0.12983357906341553,
0.3316599130630493,
-0.12358682602643967,
0.026274656876921654,
0.2603006660938263,
-0.36182165145874023,
0.06318359076976776,
-0.14328739047050476,
0.1035718098282814,
0.3024577498435974,
0.5191338658332825,
0.11935438215732574,
0.15497620403766632,
-0.12376996129751205,
-0.02131732366979122,
-0.10177597403526306,
0.08107911050319672,
-0.3423503041267395,
0.0397503487765789,
-0.28405696153640747,
-0.15765662491321564,
0.16257146000862122,
-0.0749773308634758,
-0.39461883902549744,
-0.3277709186077118,
-0.17676471173763275,
0.3443756103515625,
-0.16708500683307648,
0.09873107075691223,
0.1278149038553238,
0.24850142002105713,
0.2200462520122528,
-0.16418662667274475,
-0.10511291027069092,
0.18053323030471802,
-0.04840308800339699,
-0.1912563592195511,
-0.03253559395670891,
0.3256579041481018,
-0.02064816839993,
0.024766840040683746,
0.3319253623485565,
-0.5443101525306702,
-0.12970586121082306,
0.13882429897785187,
0.42763417959213257,
-0.3397819995880127,
-0.3304104208946228,
0.15387263894081116,
0.12552039325237274,
-0.2940790057182312,
0.12303799390792847,
-0.14129656553268433,
-0.14742976427078247,
-0.05351576581597328,
0.2562331557273865,
0.5768468379974365,
-0.10308349132537842,
-0.06839436292648315,
-0.0210553128272295,
-0.08967599272727966,
-0.19856059551239014,
-0.23506753146648407,
0.0412488728761673,
-0.629984974861145,
0.1971830129623413,
-0.19697019457817078,
-0.044019073247909546,
0.06751913577318192,
0.05984552204608917,
0.030941488221287727,
0.03252771869301796,
-0.20715364813804626,
0.08232366293668747,
-0.3208012580871582,
0.18415288627147675,
-0.1294582039117813,
0.33880504965782166,
-0.1603497713804245,
-0.09057214856147766,
-0.011000094935297966,
0.46963948011398315,
-0.363176167011261,
0.3095889091491699,
-0.09209471195936203,
0.3291091024875641,
-0.13718435168266296,
-0.14379997551441193,
-0.3238450288772583,
0.03339510038495064,
0.21352915465831757,
-0.05482465773820877,
-0.22853578627109528,
-0.343638151884079,
0.03649492189288139,
0.08778204768896103,
-0.23956823348999023,
0.04540681093931198,
-0.08546582609415054,
0.08051878958940506,
0.16367663443088531,
0.10647215694189072,
0.038045354187488556,
-0.06134505197405815,
0.13363507390022278,
-0.01497906818985939,
0.35144317150115967,
-0.3503243625164032,
-0.29493123292922974,
0.08487911522388458,
0.010335668921470642,
0.1479950100183487,
0.333482563495636,
-0.22881382703781128,
-0.051540207117795944,
-0.23469458520412445,
-0.04759906232357025,
-0.0358918197453022,
-0.06341191381216049,
-0.10926508158445358,
-0.005784862209111452,
0.1837647706270218,
-0.3444976210594177,
-0.05202557519078255,
0.19848382472991943,
-0.16774103045463562,
-0.05853848531842232,
-0.19507737457752228,
-0.03346976637840271,
0.18501730263233185,
-0.6246343851089478,
-0.3078590929508209,
0.09586066752672195,
-0.17419162392616272,
0.17279620468616486,
0.037768226116895676,
0.21232645213603973,
-0.35267704725265503,
0.014246463775634766,
-0.19950731098651886,
-0.05982377007603645,
-0.17214833199977875,
0.29987069964408875,
0.5050820112228394,
0.09509073942899704,
-0.14976152777671814,
0.18281657993793488,
0.18063057959079742,
0.02242373488843441,
0.3090142011642456,
-0.013644852675497532,
0.4630546271800995,
-0.3807600438594818,
-0.04637317359447479,
0.18084639310836792,
-0.11368657648563385,
0.23272328078746796,
0.24743863940238953,
0.03327888250350952,
0.09022295475006104,
0.24323627352714539,
-0.21745912730693817,
0.2948680818080902,
-0.06328817456960678,
-0.10502836853265762,
-0.06071086227893829,
-0.11756312847137451,
-0.02573721669614315,
0.004978020675480366,
-0.13568657636642456,
-0.10599688440561295,
0.14064449071884155,
0.18348197638988495,
-0.14803491532802582,
0.34484928846359253,
0.22564509510993958,
0.04543992504477501,
-0.0719427540898323,
-0.15560518205165863,
-0.03727070987224579,
-0.08817630261182785,
-0.05378496274352074,
0.29969045519828796,
0.3356375992298126,
-0.1338362693786621,
0.1933731585741043,
0.44677188992500305,
0.14140906929969788,
-0.5235984921455383,
0.2975563704967499,
-0.1133919209241867,
-0.24624474346637726,
-0.09136760979890823,
-0.19899027049541473,
-0.03090120293200016,
0.02635611593723297,
-0.085605189204216,
-0.026059022173285484,
0.13795246183872223,
-0.1257961243391037,
-0.04803316295146942,
0.4182881712913513,
-0.2459820657968521,
-0.2663460373878479,
0.4383102059364319,
-0.20704419910907745,
-0.2677208483219147,
0.11499115824699402,
0.17171645164489746,
-0.3684817850589752,
0.2568695843219757,
0.38946983218193054,
-0.3242141306400299,
-0.022639747709035873,
-0.055650267750024796,
0.09980141371488571,
-0.09990032017230988,
0.4472495913505554,
0.10818128287792206,
0.03107755072414875,
-0.12165110558271408,
-0.5052262544631958,
-0.6748517155647278,
0.39860597252845764,
-0.29254060983657837,
0.22380268573760986,
-0.09243709594011307,
0.3008267283439636,
0.0630185529589653,
0.17336994409561157,
0.2374362200498581,
0.03313784301280975,
-0.029570402577519417,
-0.08664422482252121,
-0.4174914062023163,
-0.2306690216064453,
0.21778079867362976,
-0.08850930631160736,
-0.1971731185913086,
-0.09606321156024933,
0.30755627155303955,
-0.333740770816803,
0.12420766055583954,
0.2156667858362198,
-0.27776795625686646,
0.20221179723739624,
0.5083178281784058,
-0.01584293320775032,
-0.03617824986577034,
0.08963441103696823,
-0.035926662385463715,
0.014693815261125565,
0.2298109531402588,
-0.06016852706670761,
0.31074440479278564,
0.21624967455863953,
0.20293907821178436,
-0.0013092494336888194,
-0.21238014101982117,
0.11162449419498444,
0.23362848162651062,
0.16280916333198547,
0.12661832571029663,
0.3299265503883362,
-0.2218899130821228,
-0.0191973727196455,
-0.07664627581834793,
0.0509207621216774,
-0.050153397023677826,
0.21003678441047668,
0.1575292944908142,
-0.211353600025177,
-0.10667171329259872,
-0.3708946108818054,
0.41926634311676025,
-0.43637320399284363,
0.02248421125113964,
-0.4608207643032074,
0.27716264128685,
-0.23301653563976288,
0.1606905460357666,
-0.42240676283836365,
0.0873870998620987,
0.4717086851596832,
-0.009328270331025124,
0.04822395369410515,
0.20960956811904907,
-0.19784404337406158,
0.011617298237979412,
-0.015846746042370796,
-0.1627209186553955,
0.08982595056295395,
-0.13642169535160065,
0.26724836230278015,
-0.28743210434913635
] |
https://github.com/huggingface/datasets/issues/2218
|
Duplicates in the LAMA dataset
|
So it looks like the person who added LAMA to the library chose to have one item per piece of evidence rather than one per relation - and in this case, there are duplicate pieces of evidence for the target relation
If I understand correctly, to reproduce reported results, you would have to aggregate predictions for the several pieces of evidence provided for each relation (each unique `uuid`), but the original authors will know better
cc @fabiopetroni
|
I observed duplicates in the LAMA probing dataset, see a minimal code below.
```
>>> import datasets
>>> dataset = datasets.load_dataset('lama')
No config specified, defaulting to: lama/trex
Reusing dataset lama (/home/anam/.cache/huggingface/datasets/lama/trex/1.1.0/97deffae13eca0a18e77dfb3960bb31741e973586f5c1fe1ec0d6b5eece7bddc)
>>> train_dataset = dataset['train']
>>> train_dataset[0]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
>>> train_dataset[1]
{'description': 'language or languages a person has learned from early childhood', 'label': 'native language', 'masked_sentence': 'Louis Jules Trochu ([lwi ʒyl tʁɔʃy]; 12 March 1815 – 7 October 1896) was a [MASK] military leader and politician.', 'obj_label': 'French', 'obj_surface': 'French', 'obj_uri': 'Q150', 'predicate_id': 'P103', 'sub_label': 'Louis Jules Trochu', 'sub_surface': 'Louis Jules Trochu', 'sub_uri': 'Q441235', 'template': 'The native language of [X] is [Y] .', 'template_negated': '[X] is not owned by [Y] .', 'type': 'N-1', 'uuid': '40b2ed1c-0961-482e-844e-32596b6117c8'}
```
I checked the original data available at https://dl.fbaipublicfiles.com/LAMA/data.zip. This particular duplicated comes from:
```
{"uuid": "40b2ed1c-0961-482e-844e-32596b6117c8", "obj_uri": "Q150", "obj_label": "French", "sub_uri": "Q441235", "sub_label": "Louis Jules Trochu", "predicate_id": "P103", "evidences": [{"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}, {"sub_surface": "Louis Jules Trochu", "obj_surface": "French", "masked_sentence": "Louis Jules Trochu ([lwi \u0292yl t\u0281\u0254\u0283y]; 12 March 1815 \u2013 7 October 1896) was a [MASK] military leader and politician."}]}
```
What is the best way to deal with these duplicates if I want to use `datasets` to probe with LAMA?
| 77 |
Duplicates in the LAMA dataset
|
[
0.10703206807374954,
-0.17791739106178284,
-0.14050057530403137,
0.6308494210243225,
0.0734018012881279,
-0.015030316077172756,
0.3598482012748718,
0.16227635741233826,
-0.5047624707221985,
0.2693749964237213,
-0.2515650689601898,
0.3199131488800049,
-0.042413271963596344,
-0.3483929932117462,
-0.05314955860376358,
-0.058192066848278046,
-0.04709462821483612,
-0.07242650538682938,
-0.1789691299200058,
-0.22999082505702972,
-0.24284657835960388,
0.2510412931442261,
-0.05491111800074577,
-0.08336663991212845,
0.018545445054769516,
0.08976222574710846,
-0.16336554288864136,
0.3065418601036072,
-0.13979798555374146,
-0.1170036569237709,
-0.14645271003246307,
0.34458476305007935,
-0.06710502505302429,
0.3106832206249237,
-0.00011015892232535407,
-0.1538257598876953,
-0.028212346136569977,
-0.11729229241609573,
-0.22931884229183197,
0.24681374430656433,
-0.32382088899612427,
0.1565607190132141,
-0.021520959213376045,
-0.26015180349349976,
0.014179292134940624,
-0.09365972876548767,
-0.07469885051250458,
0.16084934771060944,
0.17018616199493408,
-0.20405864715576172,
0.26062503457069397,
0.1254158765077591,
-0.29198867082595825,
-0.1253128945827484,
0.08507059514522552,
0.13288472592830658,
-0.008193527348339558,
0.7624167799949646,
0.2778879404067993,
0.43590205907821655,
-0.004538576118648052,
0.4970759153366089,
0.11901147663593292,
0.1740104705095291,
-0.2720124423503876,
-0.11359719932079315,
0.15401285886764526,
0.29533466696739197,
0.3752954602241516,
0.3482205271720886,
0.2453642040491104,
-0.23132459819316864,
-0.05614496022462845,
0.01929416134953499,
0.10627619922161102,
-0.15983879566192627,
0.12255378067493439,
-0.06316981464624405,
0.01605891063809395,
-0.048810869455337524,
0.17046035826206207,
0.024540597572922707,
0.11433464288711548,
-0.07359501719474792,
0.01174911018460989,
-0.4889959990978241,
0.20318280160427094,
0.15870870649814606,
0.06797763705253601,
0.05092836543917656,
-0.10329675674438477,
-0.23440082371234894,
-0.11863087862730026,
0.05012882128357887,
-0.005543717183172703,
-0.27889445424079895,
-0.04747442528605461,
-0.10179118812084198,
0.05658560246229172,
0.20047122240066528,
0.33025261759757996,
0.2777293920516968,
-0.1961948573589325,
-0.06610994040966034,
0.3189746141433716,
-0.06495319306850433,
-0.09413708001375198,
0.15317614376544952,
-0.08993880450725555,
0.15029138326644897,
-0.24194450676441193,
0.0708514004945755,
-0.1761522889137268,
-0.2287038117647171,
-0.05216793715953827,
0.010810722596943378,
-0.06765084713697433,
-0.2188669592142105,
0.02240508235991001,
-0.15604981780052185,
-0.1828581690788269,
-0.3304092288017273,
-0.07210510224103928,
-0.0600033737719059,
0.1811923086643219,
0.15270653367042542,
-0.2799060344696045,
-0.059529032558202744,
-0.1567135900259018,
-0.1227191835641861,
-0.2929104268550873,
0.01678537204861641,
-0.24746529757976532,
0.05324829742312431,
0.00034829057403840125,
-0.5540183782577515,
0.3909316062927246,
0.12899264693260193,
-0.015291481278836727,
-0.07675730437040329,
0.3513285219669342,
-0.10725324600934982,
0.1962217390537262,
-0.10944051295518875,
-0.046373866498470306,
0.11359840631484985,
-0.13513678312301636,
0.03896074742078781,
-0.010499579831957817,
0.05388195812702179,
0.08608747273683548,
0.0038482476957142353,
-0.1732635349035263,
0.2042253017425537,
0.2204415500164032,
0.46808764338493347,
0.2653748393058777,
0.20902776718139648,
0.0999700203537941,
-0.20047657191753387,
0.044320907443761826,
0.057699427008628845,
-0.10231195390224457,
-0.19344373047351837,
-0.20128127932548523,
0.3865232765674591,
-0.2521854341030121,
0.05616241320967674,
-0.3024888336658478,
-0.12705150246620178,
0.20987001061439514,
0.36304807662963867,
-0.15288576483726501,
0.13863687217235565,
-0.3175976276397705,
0.042878467589616776,
0.3528757095336914,
-0.2081713229417801,
-0.2445470094680786,
-0.10797514021396637,
0.09470455348491669,
-0.15441514551639557,
0.20459862053394318,
0.373595654964447,
0.36915189027786255,
-0.23651035130023956,
0.27452781796455383,
-0.2925196886062622,
-0.029908766970038414,
-0.24586160480976105,
-0.22257940471172333,
0.004177217371761799,
-0.1379353404045105,
-0.2939078211784363,
-0.10421735793352127,
-0.04476504027843475,
0.37514904141426086,
0.04198584705591202,
0.2632574737071991,
-0.0143823754042387,
-0.14587223529815674,
0.00488261878490448,
0.1844765543937683,
-0.08193834125995636,
0.2664290964603424,
0.2018858641386032,
-0.02665041945874691,
0.08627640455961227,
-0.27914196252822876,
0.17206576466560364,
0.16169986128807068,
-0.0724225714802742,
-0.22406314313411713,
-0.144961878657341,
-0.061505027115345,
0.11085392534732819,
0.2118997871875763,
0.20818954706192017,
-0.2343161404132843,
-0.10504191368818283,
0.03986241668462753,
0.12223544716835022,
-0.17246803641319275,
0.04227950796484947,
-0.47921982407569885,
0.2636967599391937,
-0.18983156979084015,
-0.2001001238822937,
0.4098092317581177,
0.3585146367549896,
0.1730368584394455,
0.03305169194936752,
0.30034324526786804,
-0.17810529470443726,
0.18842744827270508,
0.05342908203601837,
0.4397071897983551,
-0.25830045342445374,
-0.024654829874634743,
-0.14907954633235931,
-0.08451826125383377,
0.05663352459669113,
0.1485147774219513,
-0.10279876738786697,
-0.2427174299955368,
0.4683542549610138,
0.48327121138572693,
-0.40128007531166077,
0.0041582114063203335,
0.0023012037854641676,
0.2690255641937256,
-0.09436625987291336,
0.0829065814614296,
-0.4899144470691681,
0.1421443223953247,
0.7802695035934448,
0.3297985792160034,
0.5157106518745422,
-0.20048803091049194,
0.2105187475681305,
0.015695450827479362,
-0.08355040103197098,
0.02725740522146225,
-0.2913016974925995,
-0.16187982261180878,
-0.12135845422744751,
0.24037548899650574,
0.3401338458061218,
0.1938093602657318,
0.25361570715904236,
0.4376946687698364,
0.09042461961507797,
-0.2717241644859314,
-0.18036779761314392,
0.0891038104891777,
-0.03143644332885742,
-0.21513894200325012,
0.05768922343850136,
0.07344439625740051,
-0.06523694843053818,
-0.5973573327064514,
0.42367810010910034,
0.2079528570175171,
0.21720458567142487,
-0.09769584983587265,
-0.09895006567239761,
-0.32427510619163513,
-0.07841028273105621,
-0.34104472398757935,
0.4590383470058441,
-0.15738938748836517,
-0.1521473228931427,
0.3356707692146301,
0.1712975800037384,
-0.038731206208467484,
-0.0012856629909947515,
0.28462421894073486,
0.5352053046226501,
-0.03448737412691116,
0.4657707214355469,
-0.17266671359539032,
-0.09433528780937195,
-0.13691483438014984,
0.28241902589797974,
0.20812657475471497,
0.0030734252650290728,
0.3288593292236328,
-0.03435346484184265,
-0.14510133862495422,
-0.47680726647377014,
-0.3571595251560211,
0.061491627246141434,
0.19919131696224213,
-0.04709703475236893,
0.1888437718153,
0.11465324461460114,
0.0025483104400336742,
-0.23673686385154724,
-0.19861865043640137,
0.28104373812675476,
-0.3635095953941345,
0.0009551172843202949,
-0.4009256958961487,
0.1436760276556015,
-0.2055261880159378,
-0.3573371171951294,
0.3429141044616699,
0.023274578154087067,
0.202760711312294,
0.2322489619255066,
0.2794327437877655,
-0.29126977920532227,
0.03140217438340187,
-0.14826908707618713,
-0.36594465374946594,
-0.4076678454875946,
-0.5948194861412048,
-0.09160692989826202,
0.12883731722831726,
-0.09891905635595322,
-0.17435185611248016,
-0.009237444028258324,
-0.42010608315467834,
0.5676310062408447,
-0.0906653106212616,
-0.3344743251800537,
-0.15031734108924866,
0.289995938539505,
-0.03532326593995094,
0.38137760758399963,
-0.07636610418558121,
0.10488294064998627,
0.2877514064311981,
-0.33349522948265076,
-0.11960058659315109,
0.05027135834097862,
0.14318332076072693,
0.23397624492645264,
0.44819140434265137,
-0.40391525626182556,
-0.11744873225688934,
0.04979840666055679,
0.3412155210971832,
0.5188860893249512,
-0.16170719265937805,
0.18584378063678741,
0.05446365475654602,
0.3278079330921173,
0.11529520899057388,
0.019337965175509453,
0.11537773162126541,
-0.010368162766098976,
0.2652096450328827,
0.6101916432380676,
0.17431358993053436,
-0.24677173793315887,
0.13397091627120972,
0.06975764036178589,
-0.17138783633708954,
-0.27728262543678284,
-0.2655462622642517,
-0.1378476321697235,
-0.025246135890483856,
0.3959830105304718,
-0.5018715858459473,
-0.10377410054206848,
0.05750991031527519,
0.11282608658075333,
0.015403805300593376,
-0.09377769380807877,
-0.2630148231983185,
0.18159523606300354,
0.3880716860294342,
-0.2857130765914917,
0.09581812471151352,
0.09912750869989395,
-0.032650504261255264,
0.146715447306633,
0.1696949601173401,
0.20035499334335327,
0.1264529675245285,
0.608029305934906,
-0.27515265345573425,
0.05851547047495842,
0.004485204815864563,
0.1128498986363411,
-0.3754020929336548,
0.1219504177570343,
-0.36635276675224304,
0.05673069506883621,
0.0458490327000618,
0.34709814190864563,
-0.2630831003189087,
0.23995575308799744,
0.30569055676460266,
0.26538875699043274,
-0.42960885167121887,
-0.17967645823955536,
-0.19555038213729858,
-0.4807383418083191,
-0.22923406958580017,
-0.1259526163339615,
-0.2273784875869751,
0.02169012278318405,
0.17332322895526886,
-0.2661159932613373,
0.1071062758564949,
-0.037414729595184326,
0.20158149302005768,
0.09985747933387756,
0.1738460212945938,
0.45190274715423584,
0.2219664603471756,
-0.01532767154276371,
0.1233857199549675,
-0.0052683171816170216,
0.7008371353149414,
-0.19589856266975403,
-0.17657893896102905,
-0.07453504949808121,
-0.4378126561641693,
-0.03224525973200798,
0.3866606056690216,
-0.02717355079948902,
0.19839569926261902,
-0.01595815271139145,
-0.14111869037151337,
0.11287955939769745,
0.07994789630174637,
0.2029578685760498,
0.07066673785448074,
0.05744380131363869,
-0.2720033526420593,
0.0973610207438469,
-0.02020576037466526,
-0.3998360335826874,
0.8124842047691345,
-0.16659928858280182,
0.04768809676170349,
-0.03360361605882645,
0.19106493890285492,
1.0552984476089478,
-0.25903236865997314,
0.02012212574481964,
0.40844428539276123,
-0.40779390931129456,
-0.09001901745796204,
0.20465770363807678,
-0.1450885832309723,
-0.3054157793521881,
0.13901177048683167,
0.13514070212841034,
0.03446608781814575,
0.12983357906341553,
0.3316599130630493,
-0.12358682602643967,
0.026274656876921654,
0.2603006660938263,
-0.36182165145874023,
0.06318359076976776,
-0.14328739047050476,
0.1035718098282814,
0.3024577498435974,
0.5191338658332825,
0.11935438215732574,
0.15497620403766632,
-0.12376996129751205,
-0.02131732366979122,
-0.10177597403526306,
0.08107911050319672,
-0.3423503041267395,
0.0397503487765789,
-0.28405696153640747,
-0.15765662491321564,
0.16257146000862122,
-0.0749773308634758,
-0.39461883902549744,
-0.3277709186077118,
-0.17676471173763275,
0.3443756103515625,
-0.16708500683307648,
0.09873107075691223,
0.1278149038553238,
0.24850142002105713,
0.2200462520122528,
-0.16418662667274475,
-0.10511291027069092,
0.18053323030471802,
-0.04840308800339699,
-0.1912563592195511,
-0.03253559395670891,
0.3256579041481018,
-0.02064816839993,
0.024766840040683746,
0.3319253623485565,
-0.5443101525306702,
-0.12970586121082306,
0.13882429897785187,
0.42763417959213257,
-0.3397819995880127,
-0.3304104208946228,
0.15387263894081116,
0.12552039325237274,
-0.2940790057182312,
0.12303799390792847,
-0.14129656553268433,
-0.14742976427078247,
-0.05351576581597328,
0.2562331557273865,
0.5768468379974365,
-0.10308349132537842,
-0.06839436292648315,
-0.0210553128272295,
-0.08967599272727966,
-0.19856059551239014,
-0.23506753146648407,
0.0412488728761673,
-0.629984974861145,
0.1971830129623413,
-0.19697019457817078,
-0.044019073247909546,
0.06751913577318192,
0.05984552204608917,
0.030941488221287727,
0.03252771869301796,
-0.20715364813804626,
0.08232366293668747,
-0.3208012580871582,
0.18415288627147675,
-0.1294582039117813,
0.33880504965782166,
-0.1603497713804245,
-0.09057214856147766,
-0.011000094935297966,
0.46963948011398315,
-0.363176167011261,
0.3095889091491699,
-0.09209471195936203,
0.3291091024875641,
-0.13718435168266296,
-0.14379997551441193,
-0.3238450288772583,
0.03339510038495064,
0.21352915465831757,
-0.05482465773820877,
-0.22853578627109528,
-0.343638151884079,
0.03649492189288139,
0.08778204768896103,
-0.23956823348999023,
0.04540681093931198,
-0.08546582609415054,
0.08051878958940506,
0.16367663443088531,
0.10647215694189072,
0.038045354187488556,
-0.06134505197405815,
0.13363507390022278,
-0.01497906818985939,
0.35144317150115967,
-0.3503243625164032,
-0.29493123292922974,
0.08487911522388458,
0.010335668921470642,
0.1479950100183487,
0.333482563495636,
-0.22881382703781128,
-0.051540207117795944,
-0.23469458520412445,
-0.04759906232357025,
-0.0358918197453022,
-0.06341191381216049,
-0.10926508158445358,
-0.005784862209111452,
0.1837647706270218,
-0.3444976210594177,
-0.05202557519078255,
0.19848382472991943,
-0.16774103045463562,
-0.05853848531842232,
-0.19507737457752228,
-0.03346976637840271,
0.18501730263233185,
-0.6246343851089478,
-0.3078590929508209,
0.09586066752672195,
-0.17419162392616272,
0.17279620468616486,
0.037768226116895676,
0.21232645213603973,
-0.35267704725265503,
0.014246463775634766,
-0.19950731098651886,
-0.05982377007603645,
-0.17214833199977875,
0.29987069964408875,
0.5050820112228394,
0.09509073942899704,
-0.14976152777671814,
0.18281657993793488,
0.18063057959079742,
0.02242373488843441,
0.3090142011642456,
-0.013644852675497532,
0.4630546271800995,
-0.3807600438594818,
-0.04637317359447479,
0.18084639310836792,
-0.11368657648563385,
0.23272328078746796,
0.24743863940238953,
0.03327888250350952,
0.09022295475006104,
0.24323627352714539,
-0.21745912730693817,
0.2948680818080902,
-0.06328817456960678,
-0.10502836853265762,
-0.06071086227893829,
-0.11756312847137451,
-0.02573721669614315,
0.004978020675480366,
-0.13568657636642456,
-0.10599688440561295,
0.14064449071884155,
0.18348197638988495,
-0.14803491532802582,
0.34484928846359253,
0.22564509510993958,
0.04543992504477501,
-0.0719427540898323,
-0.15560518205165863,
-0.03727070987224579,
-0.08817630261182785,
-0.05378496274352074,
0.29969045519828796,
0.3356375992298126,
-0.1338362693786621,
0.1933731585741043,
0.44677188992500305,
0.14140906929969788,
-0.5235984921455383,
0.2975563704967499,
-0.1133919209241867,
-0.24624474346637726,
-0.09136760979890823,
-0.19899027049541473,
-0.03090120293200016,
0.02635611593723297,
-0.085605189204216,
-0.026059022173285484,
0.13795246183872223,
-0.1257961243391037,
-0.04803316295146942,
0.4182881712913513,
-0.2459820657968521,
-0.2663460373878479,
0.4383102059364319,
-0.20704419910907745,
-0.2677208483219147,
0.11499115824699402,
0.17171645164489746,
-0.3684817850589752,
0.2568695843219757,
0.38946983218193054,
-0.3242141306400299,
-0.022639747709035873,
-0.055650267750024796,
0.09980141371488571,
-0.09990032017230988,
0.4472495913505554,
0.10818128287792206,
0.03107755072414875,
-0.12165110558271408,
-0.5052262544631958,
-0.6748517155647278,
0.39860597252845764,
-0.29254060983657837,
0.22380268573760986,
-0.09243709594011307,
0.3008267283439636,
0.0630185529589653,
0.17336994409561157,
0.2374362200498581,
0.03313784301280975,
-0.029570402577519417,
-0.08664422482252121,
-0.4174914062023163,
-0.2306690216064453,
0.21778079867362976,
-0.08850930631160736,
-0.1971731185913086,
-0.09606321156024933,
0.30755627155303955,
-0.333740770816803,
0.12420766055583954,
0.2156667858362198,
-0.27776795625686646,
0.20221179723739624,
0.5083178281784058,
-0.01584293320775032,
-0.03617824986577034,
0.08963441103696823,
-0.035926662385463715,
0.014693815261125565,
0.2298109531402588,
-0.06016852706670761,
0.31074440479278564,
0.21624967455863953,
0.20293907821178436,
-0.0013092494336888194,
-0.21238014101982117,
0.11162449419498444,
0.23362848162651062,
0.16280916333198547,
0.12661832571029663,
0.3299265503883362,
-0.2218899130821228,
-0.0191973727196455,
-0.07664627581834793,
0.0509207621216774,
-0.050153397023677826,
0.21003678441047668,
0.1575292944908142,
-0.211353600025177,
-0.10667171329259872,
-0.3708946108818054,
0.41926634311676025,
-0.43637320399284363,
0.02248421125113964,
-0.4608207643032074,
0.27716264128685,
-0.23301653563976288,
0.1606905460357666,
-0.42240676283836365,
0.0873870998620987,
0.4717086851596832,
-0.009328270331025124,
0.04822395369410515,
0.20960956811904907,
-0.19784404337406158,
0.011617298237979412,
-0.015846746042370796,
-0.1627209186553955,
0.08982595056295395,
-0.13642169535160065,
0.26724836230278015,
-0.28743210434913635
] |
https://github.com/huggingface/datasets/issues/2214
|
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
Hi @nsaphra, thanks for reporting.
This issue was fixed in `datasets` version 1.3.0. Could you please update `datasets` and tell me if the problem persists?
```shell
pip install -U datasets
```
|
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
| 31 |
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
[
-0.5392569303512573,
0.19221895933151245,
-0.13816730678081512,
0.0966939851641655,
0.542612612247467,
0.1725652664899826,
0.08621301501989365,
0.37896278500556946,
0.16812865436077118,
0.037899430841207504,
0.12820486724376678,
0.0966842770576477,
-0.0704272985458374,
0.11038244515657425,
-0.1025613397359848,
-0.1339242309331894,
-0.0007527099805884063,
0.17130903899669647,
0.0021807283628731966,
-0.05039862543344498,
-0.2962408661842346,
0.01901932619512081,
-0.14961722493171692,
-0.06595037132501602,
-0.46179237961769104,
-0.029466276988387108,
0.21470358967781067,
0.37263378500938416,
-0.45803964138031006,
-0.4178035259246826,
-0.018677033483982086,
0.030397929251194,
0.2209225445985794,
0.24618634581565857,
-0.0001037287074723281,
-0.11571035534143448,
0.1903020441532135,
-0.07561618834733963,
-0.4104156196117401,
-0.014386014081537724,
-0.12545491755008698,
-0.07572583854198456,
0.13910387456417084,
-0.23813863098621368,
-0.012424529530107975,
-0.0999661311507225,
-0.02880190685391426,
-0.4594835042953491,
0.09443031251430511,
0.5152890682220459,
0.29153281450271606,
0.27906882762908936,
0.011282737366855145,
-0.4570014774799347,
0.1545199751853943,
-0.14444832503795624,
-0.04730107635259628,
0.41895878314971924,
0.2616523802280426,
-0.3062405586242676,
-0.22224284708499908,
0.1618093103170395,
-0.2750726342201233,
0.39770880341529846,
0.16093428432941437,
-0.026803690940141678,
0.3565247356891632,
0.11996643990278244,
0.335666686296463,
-0.12067773938179016,
0.7044291496276855,
-0.3816392123699188,
0.010330948047339916,
0.05983906239271164,
0.1208319365978241,
-0.5540677309036255,
0.21269991993904114,
-0.09694712609052658,
0.025308681651949883,
0.0722249299287796,
-0.12124045193195343,
-0.39518237113952637,
-0.04412422701716423,
0.16858263313770294,
-0.02488987147808075,
-0.008662133477628231,
-0.15952418744564056,
-0.11596499383449554,
0.2216147482395172,
0.041556309908628464,
0.36334428191185,
0.161412313580513,
-0.17213226854801178,
-0.02934923581779003,
0.13510476052761078,
0.26212960481643677,
0.14529959857463837,
-0.19492870569229126,
0.20424416661262512,
0.011344578117132187,
-0.0541679821908474,
-0.013946877792477608,
0.18647733330726624,
0.12851327657699585,
-0.10205887258052826,
0.18009419739246368,
0.4029068350791931,
0.2819146513938904,
0.10784009844064713,
0.11448805779218674,
-0.05125812813639641,
-0.0916743278503418,
-0.028396040201187134,
-0.5794972777366638,
-0.02114264853298664,
-0.026908129453659058,
0.06550929695367813,
-0.0000068872268457198516,
-0.257529079914093,
0.18942667543888092,
0.33537811040878296,
-0.22291062772274017,
0.0200855303555727,
0.22116464376449585,
0.13188046216964722,
-0.022274181246757507,
0.2230517715215683,
0.2581455111503601,
-0.20672202110290527,
0.11351572722196579,
-0.29748961329460144,
0.11216510832309723,
-0.13271015882492065,
0.1371266096830368,
0.24499863386154175,
0.033288512378931046,
0.26591336727142334,
-0.006250826176255941,
0.04806035757064819,
-0.08819670230150223,
0.12627866864204407,
0.1084994450211525,
-0.14296746253967285,
0.21562273800373077,
0.2049618661403656,
0.13573570549488068,
0.3237440288066864,
-0.3653041422367096,
-0.1001056507229805,
-0.023798013105988503,
-0.5050267577171326,
-0.29534658789634705,
-0.2503146827220917,
0.3316862881183624,
-0.06367024779319763,
-0.09851577132940292,
0.03196040168404579,
0.0033806385472416878,
0.14606058597564697,
-0.11891450732946396,
-0.12289077043533325,
0.04351285845041275,
-0.13937775790691376,
-0.07814596593379974,
0.2985195815563202,
0.3891720175743103,
-0.20916451513767242,
-0.15781866014003754,
0.17824938893318176,
-0.10096491128206253,
0.0502406544983387,
-0.11821624636650085,
-0.018802672624588013,
0.31850239634513855,
-0.12604527175426483,
0.12785488367080688,
0.6707775592803955,
-0.6357834935188293,
-0.16512370109558105,
0.0855553150177002,
0.006738661322742701,
-0.42291131615638733,
0.09013590216636658,
-0.223626047372818,
0.10040638595819473,
0.1735774129629135,
0.3174014985561371,
0.019278578460216522,
0.07826468348503113,
-0.03537215664982796,
-0.1706518977880478,
-0.17100125551223755,
-0.1292577087879181,
0.25182271003723145,
0.2122398465871811,
0.048981208354234695,
0.3033837080001831,
0.24302436411380768,
0.01347899716347456,
-0.13336874544620514,
-0.0410548560321331,
0.2897709012031555,
0.06547706574201584,
-0.11024255305528641,
0.020511729642748833,
-0.20931750535964966,
-0.24189947545528412,
-0.03427042439579964,
0.17927265167236328,
0.04037005454301834,
0.04731731861829758,
0.13896331191062927,
-0.3473086357116699,
0.027926117181777954,
-0.20467862486839294,
-0.15119308233261108,
0.2579819858074188,
0.04749017953872681,
-0.253589391708374,
0.27580174803733826,
-0.2772662937641144,
-0.16777768731117249,
-0.5211001038551331,
0.03780312463641167,
-0.028829136863350868,
0.12525421380996704,
-0.11300363391637802,
-0.09993765503168106,
0.1864452362060547,
-0.06632811576128006,
0.09633655101060867,
0.06320210546255112,
-0.26423248648643494,
0.4819691777229309,
0.04760027304291725,
0.11957917362451553,
0.3307344317436218,
0.2939034700393677,
0.02040441334247589,
-0.15009953081607819,
-0.004545303527265787,
-0.3252653479576111,
0.005091194529086351,
-0.10012995451688766,
-0.14014685153961182,
-0.23376326262950897,
-0.07938867062330246,
-0.018704654648900032,
0.1795041412115097,
0.110074982047081,
0.3574385643005371,
-0.08862332999706268,
0.06270451843738556,
-0.5316263437271118,
0.37170445919036865,
-0.10192470252513885,
0.020883191376924515,
-0.08770482242107391,
0.17298877239227295,
-0.24312829971313477,
0.6784751415252686,
0.08172079920768738,
0.13703416287899017,
0.053672805428504944,
-0.008125373162329197,
-0.024397073313593864,
-0.253602534532547,
-0.2017083615064621,
0.3433481752872467,
0.2813173234462738,
0.035770855844020844,
0.14835812151432037,
-0.007653082720935345,
-0.3022816479206085,
0.29393458366394043,
-0.06478442251682281,
-0.15798704326152802,
0.5123337507247925,
-0.11440911889076233,
-0.13887600600719452,
-0.43257397413253784,
0.009257368743419647,
0.07800561189651489,
0.22361300885677338,
-0.4414859414100647,
-0.16329240798950195,
-0.15562692284584045,
0.15645107626914978,
0.11517400294542313,
-0.3424545228481293,
-0.0747491791844368,
-0.15771012008190155,
0.12347003817558289,
0.1465766429901123,
0.10223405063152313,
0.38869738578796387,
-0.041221413761377335,
0.3033812642097473,
0.24883945286273956,
-0.09540889412164688,
-0.01340169832110405,
-0.4240010678768158,
0.06658094376325607,
0.1500004678964615,
0.2450159788131714,
0.2044699490070343,
0.34504854679107666,
-0.5736925005912781,
0.25232428312301636,
-0.20761455595493317,
-0.18308062851428986,
0.1103927344083786,
0.14480307698249817,
0.33697977662086487,
0.2600141167640686,
0.1040416955947876,
0.12371190637350082,
-0.14963719248771667,
0.3355162739753723,
-0.04588983952999115,
0.0600263848900795,
0.06989110261201859,
-0.08340456336736679,
-0.46205925941467285,
-0.2282547950744629,
-0.48469725251197815,
0.16829293966293335,
-0.5881660580635071,
-0.14437969028949738,
0.37837210297584534,
-0.05955906957387924,
0.32622677087783813,
0.22144363820552826,
0.25659164786338806,
0.21119685471057892,
0.2868051826953888,
-0.3080908954143524,
-0.4891466498374939,
0.16161441802978516,
-0.38416892290115356,
-0.2547754943370819,
0.1036267951130867,
0.15396147966384888,
0.29408133029937744,
0.13705715537071228,
-0.36443641781806946,
-0.20414012670516968,
0.11846160143613815,
0.06357061862945557,
-0.12454032152891159,
0.2975373864173889,
0.1966104805469513,
0.19981548190116882,
-0.0634387657046318,
-0.283707857131958,
-0.05877622216939926,
0.05436963215470314,
-0.061011072248220444,
-0.05564351752400398,
-0.3903379440307617,
0.10907777398824692,
-0.2700817883014679,
0.3875706195831299,
-0.011083749122917652,
-0.031776946038007736,
0.14290165901184082,
-0.2496732920408249,
0.4533967971801758,
-0.15747812390327454,
-0.2542058527469635,
0.12592343986034393,
0.13269174098968506,
0.0200880765914917,
0.272759348154068,
0.052218228578567505,
0.18179680407047272,
-0.17743778228759766,
0.20289170742034912,
-0.09332294017076492,
-0.1062883660197258,
-0.018052665516734123,
-0.071658194065094,
0.22064603865146637,
-0.08274544775485992,
0.28777652978897095,
-0.25621649622917175,
0.11686750501394272,
0.10370571166276932,
0.39413511753082275,
-0.13905483484268188,
0.006653451826423407,
-0.3301084637641907,
0.29533636569976807,
-0.05352870374917984,
0.18160654604434967,
-0.010073639452457428,
0.11386106163263321,
-0.33433130383491516,
-0.05574176087975502,
-0.17394113540649414,
-0.023206213489174843,
0.3064431846141815,
-0.26454225182533264,
-0.11505988240242004,
0.2500118911266327,
0.19532306492328644,
-0.18072135746479034,
0.03185997158288956,
-0.046946700662374496,
0.18666696548461914,
-0.008827775716781616,
0.7087094783782959,
-0.07235594093799591,
-0.07033656537532806,
0.15077656507492065,
-0.029394906014204025,
0.01927308924496174,
0.004588849376887083,
-0.1252831071615219,
-0.27936363220214844,
-0.24308790266513824,
-0.18095842003822327,
-0.058946143835783005,
0.20112194120883942,
0.024330148473381996,
0.1320064663887024,
-0.019284654408693314,
-0.06041308864951134,
0.13120414316654205,
0.1437300443649292,
0.18796314299106598,
-0.043566521257162094,
0.09433893114328384,
0.16091805696487427,
0.04317574203014374,
0.5185354948043823,
0.2902737855911255,
-0.3835773169994354,
-0.3244190514087677,
0.19886064529418945,
-0.3310389816761017,
0.2726198136806488,
0.15061847865581512,
-0.10351824015378952,
-0.07166024297475815,
-0.08562080562114716,
0.1312469094991684,
-0.38699111342430115,
0.4074532389640808,
0.28743651509284973,
0.10933062434196472,
-0.32331544160842896,
-0.3579745888710022,
0.31724807620048523,
0.0868140310049057,
-0.008992553688585758,
0.45920008420944214,
-0.10578034818172455,
-0.36231595277786255,
-0.08822542428970337,
-0.0486348457634449,
0.54542475938797,
0.027093451470136642,
0.04548812285065651,
0.24058257043361664,
-0.004977665841579437,
0.14528237283229828,
-0.40771496295928955,
0.009059542790055275,
-0.18336117267608643,
-0.2952163517475128,
0.05266914144158363,
-0.08155637979507446,
0.2928823232650757,
-0.17825788259506226,
-0.23059619963169098,
-0.015731707215309143,
-0.21970219910144806,
0.11618800461292267,
-0.0462600514292717,
0.17033690214157104,
-0.18683888018131256,
-0.22624315321445465,
-0.10216604918241501,
0.2217549979686737,
-0.13194748759269714,
-0.1105383038520813,
-0.2149391770362854,
-0.01050913892686367,
0.12634140253067017,
-0.18345282971858978,
0.07721716165542603,
-0.12113536149263382,
0.09789600223302841,
0.19789230823516846,
-0.10158111155033112,
-0.10582046210765839,
0.0069696493446826935,
0.15153160691261292,
0.39204394817352295,
0.10977011173963547,
-0.2996363341808319,
0.2552400827407837,
-0.19478580355644226,
-0.24279887974262238,
-0.09966950118541718,
0.23131738603115082,
0.18156622350215912,
-0.07596081495285034,
0.021062273532152176,
-0.024735575541853905,
-0.029485417529940605,
0.009458211250603199,
-0.1396627575159073,
-0.1940007358789444,
0.12610523402690887,
-0.49643760919570923,
-0.1714843064546585,
0.06890028715133667,
-0.047079626470804214,
-0.18717938661575317,
0.2136911153793335,
-0.0761890783905983,
0.05498889833688736,
0.1541638821363449,
0.23130738735198975,
-0.17172349989414215,
-0.10670538991689682,
0.20375794172286987,
-0.1416286826133728,
-0.07257682085037231,
0.2067413330078125,
0.03272387757897377,
-0.26247838139533997,
-0.35154038667678833,
-0.0774206593632698,
0.16324618458747864,
-0.19910727441310883,
0.30002447962760925,
0.5883508324623108,
-0.12303110957145691,
0.16583602130413055,
0.16762489080429077,
0.028003498911857605,
-0.10017389059066772,
0.1053394228219986,
-0.1358269304037094,
-0.3436405062675476,
0.140044167637825,
-0.25411444902420044,
0.2535093128681183,
-0.019161948934197426,
0.17512501776218414,
-0.039390984922647476,
0.008272173814475536,
-0.39480364322662354,
0.132722869515419,
-0.14312177896499634,
-0.006648496259003878,
0.35061994194984436,
-0.1291065514087677,
0.11356312781572342,
-0.0920170322060585,
0.1866036206483841,
-0.08362020552158356,
-0.39659208059310913,
-0.2943883240222931,
-0.195400670170784,
0.05047570914030075,
-0.06393541395664215,
-0.2043197751045227,
0.23378872871398926,
-0.24020053446292877,
-0.3160392940044403,
-0.25707560777664185,
-0.005021677352488041,
0.25582441687583923,
-0.1046774685382843,
0.22318901121616364,
-0.23533710837364197,
0.14950034022331238,
0.299500972032547,
0.20506033301353455,
0.0208224356174469,
0.26865851879119873,
-0.42200392484664917,
-0.03405061736702919,
-0.16497725248336792,
0.008591894991695881,
0.13045595586299896,
0.2574193775653839,
0.14052487909793854,
0.13934554159641266,
0.14314110577106476,
-0.21500103175640106,
0.18362759053707123,
0.21051432192325592,
0.2176472544670105,
0.2985988259315491,
-0.3041260242462158,
0.018251262605190277,
0.01745564118027687,
0.33515384793281555,
-0.2897292673587799,
-0.30289945006370544,
0.00832788459956646,
-0.1370360255241394,
0.168243870139122,
0.010014946572482586,
0.15334585309028625,
-0.3226954936981201,
-0.0796118676662445,
0.19761306047439575,
0.49780941009521484,
-0.08310195803642273,
0.026681838557124138,
0.33452531695365906,
-0.07980066537857056,
-0.019452087581157684,
0.15810556709766388,
0.2809703052043915,
0.12339213490486145,
0.44363147020339966,
-0.170930877327919,
0.2886793315410614,
0.07885389029979706,
0.012358080595731735,
-0.32424941658973694,
-0.4012276530265808,
0.13029460608959198,
-0.026736140251159668,
-0.005608720704913139,
0.11325488984584808,
-0.18550974130630493,
0.3135449290275574,
-0.031933482736349106,
0.10062512755393982,
-0.1488545686006546,
-0.2038005292415619,
-0.15495231747627258,
-0.057244230061769485,
-0.13461719453334808,
-0.11374668031930923,
0.08830505609512329,
-0.08619936555624008,
-0.02992270700633526,
0.17827509343624115,
-0.03947056084871292,
-0.08551887422800064,
0.00246453401632607,
-0.046071961522102356,
0.16061599552631378,
0.07473485916852951,
-0.3083398938179016,
-0.2672029137611389,
0.2556031346321106,
0.07338546216487885,
0.11309868097305298,
0.168406680226326,
0.26660415530204773,
0.5879353880882263,
0.20066113770008087,
0.0559181347489357,
-0.12424187362194061,
-0.15601032972335815,
-0.10677933692932129,
-0.08289501816034317,
0.37716320157051086,
0.1802498996257782,
-0.13942641019821167,
0.21304447948932648,
0.30799585580825806,
-0.28347209095954895,
0.28736552596092224,
-0.04799807071685791,
-0.24922555685043335,
-0.023750167340040207,
-0.3432007431983948,
0.1544087827205658,
0.008268896490335464,
-0.12710486352443695,
0.004681495483964682,
-0.29337599873542786,
0.002975588897243142,
0.6188564896583557,
0.14555133879184723,
0.2228597104549408,
-0.07275889068841934,
0.13942836225032806,
0.004878569394350052,
0.2854405641555786,
0.2522715926170349,
0.07198425382375717,
-0.14247062802314758,
-0.15165123343467712,
-0.5441979765892029,
0.11871367692947388,
0.12807375192642212,
0.028605040162801743,
-0.017076246440410614,
-0.04064415022730827,
0.29288798570632935,
-0.15968123078346252,
0.03420615941286087,
0.0759352296590805,
0.03737054765224457,
-0.2659335434436798,
-0.2759201228618622,
-0.14051388204097748,
-0.16209368407726288,
0.0825190395116806,
-0.047658953815698624,
-0.297376424074173,
0.06589415669441223,
-0.20403216779232025,
0.20327749848365784,
-0.23975934088230133,
0.16522471606731415,
0.28331896662712097,
0.4199044704437256,
0.23345157504081726,
-0.03929935768246651,
0.638414204120636,
-0.27450838685035706,
0.1796325445175171,
-0.17773033678531647,
-0.5417627096176147,
0.07731229811906815,
0.07445388287305832,
0.19173917174339294,
0.05912343040108681,
-0.43103981018066406,
-0.23613211512565613,
-0.29346001148223877,
0.3521421551704407,
-0.07073712348937988,
0.16945423185825348,
-0.2602948248386383,
0.17741736769676208,
0.016055483371019363,
-0.014859202317893505,
0.08208130300045013,
0.17987322807312012,
-0.06739736348390579,
0.24422672390937805,
0.017618831247091293,
-0.3644712269306183,
0.4838660955429077,
-0.07658909261226654,
-0.3043716549873352,
0.04612463340163231,
0.13786859810352325,
0.4158628582954407,
0.04816242679953575,
-0.6095107793807983,
0.051242366433143616,
0.3677935302257538,
-0.08600453287363052,
-0.5261020064353943,
0.4435475468635559,
-0.2686791718006134,
0.13482600450515747,
0.05857614800333977,
0.12987235188484192,
0.16115261614322662,
-0.25142961740493774,
-0.03396347537636757,
-0.1767033487558365
] |
https://github.com/huggingface/datasets/issues/2214
|
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
There might be a bug in the conda version of `datasets` 1.2.1 where the datasets/metric scripts are downloaded from `master` instead of the `1.2.1` repo.
You can try setting the env var `HF_SCRIPTS_VERSION="1.2.1"` as a workaround. Let me know if that helps.
|
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
| 42 |
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
[
-0.5392569303512573,
0.19221895933151245,
-0.13816730678081512,
0.0966939851641655,
0.542612612247467,
0.1725652664899826,
0.08621301501989365,
0.37896278500556946,
0.16812865436077118,
0.037899430841207504,
0.12820486724376678,
0.0966842770576477,
-0.0704272985458374,
0.11038244515657425,
-0.1025613397359848,
-0.1339242309331894,
-0.0007527099805884063,
0.17130903899669647,
0.0021807283628731966,
-0.05039862543344498,
-0.2962408661842346,
0.01901932619512081,
-0.14961722493171692,
-0.06595037132501602,
-0.46179237961769104,
-0.029466276988387108,
0.21470358967781067,
0.37263378500938416,
-0.45803964138031006,
-0.4178035259246826,
-0.018677033483982086,
0.030397929251194,
0.2209225445985794,
0.24618634581565857,
-0.0001037287074723281,
-0.11571035534143448,
0.1903020441532135,
-0.07561618834733963,
-0.4104156196117401,
-0.014386014081537724,
-0.12545491755008698,
-0.07572583854198456,
0.13910387456417084,
-0.23813863098621368,
-0.012424529530107975,
-0.0999661311507225,
-0.02880190685391426,
-0.4594835042953491,
0.09443031251430511,
0.5152890682220459,
0.29153281450271606,
0.27906882762908936,
0.011282737366855145,
-0.4570014774799347,
0.1545199751853943,
-0.14444832503795624,
-0.04730107635259628,
0.41895878314971924,
0.2616523802280426,
-0.3062405586242676,
-0.22224284708499908,
0.1618093103170395,
-0.2750726342201233,
0.39770880341529846,
0.16093428432941437,
-0.026803690940141678,
0.3565247356891632,
0.11996643990278244,
0.335666686296463,
-0.12067773938179016,
0.7044291496276855,
-0.3816392123699188,
0.010330948047339916,
0.05983906239271164,
0.1208319365978241,
-0.5540677309036255,
0.21269991993904114,
-0.09694712609052658,
0.025308681651949883,
0.0722249299287796,
-0.12124045193195343,
-0.39518237113952637,
-0.04412422701716423,
0.16858263313770294,
-0.02488987147808075,
-0.008662133477628231,
-0.15952418744564056,
-0.11596499383449554,
0.2216147482395172,
0.041556309908628464,
0.36334428191185,
0.161412313580513,
-0.17213226854801178,
-0.02934923581779003,
0.13510476052761078,
0.26212960481643677,
0.14529959857463837,
-0.19492870569229126,
0.20424416661262512,
0.011344578117132187,
-0.0541679821908474,
-0.013946877792477608,
0.18647733330726624,
0.12851327657699585,
-0.10205887258052826,
0.18009419739246368,
0.4029068350791931,
0.2819146513938904,
0.10784009844064713,
0.11448805779218674,
-0.05125812813639641,
-0.0916743278503418,
-0.028396040201187134,
-0.5794972777366638,
-0.02114264853298664,
-0.026908129453659058,
0.06550929695367813,
-0.0000068872268457198516,
-0.257529079914093,
0.18942667543888092,
0.33537811040878296,
-0.22291062772274017,
0.0200855303555727,
0.22116464376449585,
0.13188046216964722,
-0.022274181246757507,
0.2230517715215683,
0.2581455111503601,
-0.20672202110290527,
0.11351572722196579,
-0.29748961329460144,
0.11216510832309723,
-0.13271015882492065,
0.1371266096830368,
0.24499863386154175,
0.033288512378931046,
0.26591336727142334,
-0.006250826176255941,
0.04806035757064819,
-0.08819670230150223,
0.12627866864204407,
0.1084994450211525,
-0.14296746253967285,
0.21562273800373077,
0.2049618661403656,
0.13573570549488068,
0.3237440288066864,
-0.3653041422367096,
-0.1001056507229805,
-0.023798013105988503,
-0.5050267577171326,
-0.29534658789634705,
-0.2503146827220917,
0.3316862881183624,
-0.06367024779319763,
-0.09851577132940292,
0.03196040168404579,
0.0033806385472416878,
0.14606058597564697,
-0.11891450732946396,
-0.12289077043533325,
0.04351285845041275,
-0.13937775790691376,
-0.07814596593379974,
0.2985195815563202,
0.3891720175743103,
-0.20916451513767242,
-0.15781866014003754,
0.17824938893318176,
-0.10096491128206253,
0.0502406544983387,
-0.11821624636650085,
-0.018802672624588013,
0.31850239634513855,
-0.12604527175426483,
0.12785488367080688,
0.6707775592803955,
-0.6357834935188293,
-0.16512370109558105,
0.0855553150177002,
0.006738661322742701,
-0.42291131615638733,
0.09013590216636658,
-0.223626047372818,
0.10040638595819473,
0.1735774129629135,
0.3174014985561371,
0.019278578460216522,
0.07826468348503113,
-0.03537215664982796,
-0.1706518977880478,
-0.17100125551223755,
-0.1292577087879181,
0.25182271003723145,
0.2122398465871811,
0.048981208354234695,
0.3033837080001831,
0.24302436411380768,
0.01347899716347456,
-0.13336874544620514,
-0.0410548560321331,
0.2897709012031555,
0.06547706574201584,
-0.11024255305528641,
0.020511729642748833,
-0.20931750535964966,
-0.24189947545528412,
-0.03427042439579964,
0.17927265167236328,
0.04037005454301834,
0.04731731861829758,
0.13896331191062927,
-0.3473086357116699,
0.027926117181777954,
-0.20467862486839294,
-0.15119308233261108,
0.2579819858074188,
0.04749017953872681,
-0.253589391708374,
0.27580174803733826,
-0.2772662937641144,
-0.16777768731117249,
-0.5211001038551331,
0.03780312463641167,
-0.028829136863350868,
0.12525421380996704,
-0.11300363391637802,
-0.09993765503168106,
0.1864452362060547,
-0.06632811576128006,
0.09633655101060867,
0.06320210546255112,
-0.26423248648643494,
0.4819691777229309,
0.04760027304291725,
0.11957917362451553,
0.3307344317436218,
0.2939034700393677,
0.02040441334247589,
-0.15009953081607819,
-0.004545303527265787,
-0.3252653479576111,
0.005091194529086351,
-0.10012995451688766,
-0.14014685153961182,
-0.23376326262950897,
-0.07938867062330246,
-0.018704654648900032,
0.1795041412115097,
0.110074982047081,
0.3574385643005371,
-0.08862332999706268,
0.06270451843738556,
-0.5316263437271118,
0.37170445919036865,
-0.10192470252513885,
0.020883191376924515,
-0.08770482242107391,
0.17298877239227295,
-0.24312829971313477,
0.6784751415252686,
0.08172079920768738,
0.13703416287899017,
0.053672805428504944,
-0.008125373162329197,
-0.024397073313593864,
-0.253602534532547,
-0.2017083615064621,
0.3433481752872467,
0.2813173234462738,
0.035770855844020844,
0.14835812151432037,
-0.007653082720935345,
-0.3022816479206085,
0.29393458366394043,
-0.06478442251682281,
-0.15798704326152802,
0.5123337507247925,
-0.11440911889076233,
-0.13887600600719452,
-0.43257397413253784,
0.009257368743419647,
0.07800561189651489,
0.22361300885677338,
-0.4414859414100647,
-0.16329240798950195,
-0.15562692284584045,
0.15645107626914978,
0.11517400294542313,
-0.3424545228481293,
-0.0747491791844368,
-0.15771012008190155,
0.12347003817558289,
0.1465766429901123,
0.10223405063152313,
0.38869738578796387,
-0.041221413761377335,
0.3033812642097473,
0.24883945286273956,
-0.09540889412164688,
-0.01340169832110405,
-0.4240010678768158,
0.06658094376325607,
0.1500004678964615,
0.2450159788131714,
0.2044699490070343,
0.34504854679107666,
-0.5736925005912781,
0.25232428312301636,
-0.20761455595493317,
-0.18308062851428986,
0.1103927344083786,
0.14480307698249817,
0.33697977662086487,
0.2600141167640686,
0.1040416955947876,
0.12371190637350082,
-0.14963719248771667,
0.3355162739753723,
-0.04588983952999115,
0.0600263848900795,
0.06989110261201859,
-0.08340456336736679,
-0.46205925941467285,
-0.2282547950744629,
-0.48469725251197815,
0.16829293966293335,
-0.5881660580635071,
-0.14437969028949738,
0.37837210297584534,
-0.05955906957387924,
0.32622677087783813,
0.22144363820552826,
0.25659164786338806,
0.21119685471057892,
0.2868051826953888,
-0.3080908954143524,
-0.4891466498374939,
0.16161441802978516,
-0.38416892290115356,
-0.2547754943370819,
0.1036267951130867,
0.15396147966384888,
0.29408133029937744,
0.13705715537071228,
-0.36443641781806946,
-0.20414012670516968,
0.11846160143613815,
0.06357061862945557,
-0.12454032152891159,
0.2975373864173889,
0.1966104805469513,
0.19981548190116882,
-0.0634387657046318,
-0.283707857131958,
-0.05877622216939926,
0.05436963215470314,
-0.061011072248220444,
-0.05564351752400398,
-0.3903379440307617,
0.10907777398824692,
-0.2700817883014679,
0.3875706195831299,
-0.011083749122917652,
-0.031776946038007736,
0.14290165901184082,
-0.2496732920408249,
0.4533967971801758,
-0.15747812390327454,
-0.2542058527469635,
0.12592343986034393,
0.13269174098968506,
0.0200880765914917,
0.272759348154068,
0.052218228578567505,
0.18179680407047272,
-0.17743778228759766,
0.20289170742034912,
-0.09332294017076492,
-0.1062883660197258,
-0.018052665516734123,
-0.071658194065094,
0.22064603865146637,
-0.08274544775485992,
0.28777652978897095,
-0.25621649622917175,
0.11686750501394272,
0.10370571166276932,
0.39413511753082275,
-0.13905483484268188,
0.006653451826423407,
-0.3301084637641907,
0.29533636569976807,
-0.05352870374917984,
0.18160654604434967,
-0.010073639452457428,
0.11386106163263321,
-0.33433130383491516,
-0.05574176087975502,
-0.17394113540649414,
-0.023206213489174843,
0.3064431846141815,
-0.26454225182533264,
-0.11505988240242004,
0.2500118911266327,
0.19532306492328644,
-0.18072135746479034,
0.03185997158288956,
-0.046946700662374496,
0.18666696548461914,
-0.008827775716781616,
0.7087094783782959,
-0.07235594093799591,
-0.07033656537532806,
0.15077656507492065,
-0.029394906014204025,
0.01927308924496174,
0.004588849376887083,
-0.1252831071615219,
-0.27936363220214844,
-0.24308790266513824,
-0.18095842003822327,
-0.058946143835783005,
0.20112194120883942,
0.024330148473381996,
0.1320064663887024,
-0.019284654408693314,
-0.06041308864951134,
0.13120414316654205,
0.1437300443649292,
0.18796314299106598,
-0.043566521257162094,
0.09433893114328384,
0.16091805696487427,
0.04317574203014374,
0.5185354948043823,
0.2902737855911255,
-0.3835773169994354,
-0.3244190514087677,
0.19886064529418945,
-0.3310389816761017,
0.2726198136806488,
0.15061847865581512,
-0.10351824015378952,
-0.07166024297475815,
-0.08562080562114716,
0.1312469094991684,
-0.38699111342430115,
0.4074532389640808,
0.28743651509284973,
0.10933062434196472,
-0.32331544160842896,
-0.3579745888710022,
0.31724807620048523,
0.0868140310049057,
-0.008992553688585758,
0.45920008420944214,
-0.10578034818172455,
-0.36231595277786255,
-0.08822542428970337,
-0.0486348457634449,
0.54542475938797,
0.027093451470136642,
0.04548812285065651,
0.24058257043361664,
-0.004977665841579437,
0.14528237283229828,
-0.40771496295928955,
0.009059542790055275,
-0.18336117267608643,
-0.2952163517475128,
0.05266914144158363,
-0.08155637979507446,
0.2928823232650757,
-0.17825788259506226,
-0.23059619963169098,
-0.015731707215309143,
-0.21970219910144806,
0.11618800461292267,
-0.0462600514292717,
0.17033690214157104,
-0.18683888018131256,
-0.22624315321445465,
-0.10216604918241501,
0.2217549979686737,
-0.13194748759269714,
-0.1105383038520813,
-0.2149391770362854,
-0.01050913892686367,
0.12634140253067017,
-0.18345282971858978,
0.07721716165542603,
-0.12113536149263382,
0.09789600223302841,
0.19789230823516846,
-0.10158111155033112,
-0.10582046210765839,
0.0069696493446826935,
0.15153160691261292,
0.39204394817352295,
0.10977011173963547,
-0.2996363341808319,
0.2552400827407837,
-0.19478580355644226,
-0.24279887974262238,
-0.09966950118541718,
0.23131738603115082,
0.18156622350215912,
-0.07596081495285034,
0.021062273532152176,
-0.024735575541853905,
-0.029485417529940605,
0.009458211250603199,
-0.1396627575159073,
-0.1940007358789444,
0.12610523402690887,
-0.49643760919570923,
-0.1714843064546585,
0.06890028715133667,
-0.047079626470804214,
-0.18717938661575317,
0.2136911153793335,
-0.0761890783905983,
0.05498889833688736,
0.1541638821363449,
0.23130738735198975,
-0.17172349989414215,
-0.10670538991689682,
0.20375794172286987,
-0.1416286826133728,
-0.07257682085037231,
0.2067413330078125,
0.03272387757897377,
-0.26247838139533997,
-0.35154038667678833,
-0.0774206593632698,
0.16324618458747864,
-0.19910727441310883,
0.30002447962760925,
0.5883508324623108,
-0.12303110957145691,
0.16583602130413055,
0.16762489080429077,
0.028003498911857605,
-0.10017389059066772,
0.1053394228219986,
-0.1358269304037094,
-0.3436405062675476,
0.140044167637825,
-0.25411444902420044,
0.2535093128681183,
-0.019161948934197426,
0.17512501776218414,
-0.039390984922647476,
0.008272173814475536,
-0.39480364322662354,
0.132722869515419,
-0.14312177896499634,
-0.006648496259003878,
0.35061994194984436,
-0.1291065514087677,
0.11356312781572342,
-0.0920170322060585,
0.1866036206483841,
-0.08362020552158356,
-0.39659208059310913,
-0.2943883240222931,
-0.195400670170784,
0.05047570914030075,
-0.06393541395664215,
-0.2043197751045227,
0.23378872871398926,
-0.24020053446292877,
-0.3160392940044403,
-0.25707560777664185,
-0.005021677352488041,
0.25582441687583923,
-0.1046774685382843,
0.22318901121616364,
-0.23533710837364197,
0.14950034022331238,
0.299500972032547,
0.20506033301353455,
0.0208224356174469,
0.26865851879119873,
-0.42200392484664917,
-0.03405061736702919,
-0.16497725248336792,
0.008591894991695881,
0.13045595586299896,
0.2574193775653839,
0.14052487909793854,
0.13934554159641266,
0.14314110577106476,
-0.21500103175640106,
0.18362759053707123,
0.21051432192325592,
0.2176472544670105,
0.2985988259315491,
-0.3041260242462158,
0.018251262605190277,
0.01745564118027687,
0.33515384793281555,
-0.2897292673587799,
-0.30289945006370544,
0.00832788459956646,
-0.1370360255241394,
0.168243870139122,
0.010014946572482586,
0.15334585309028625,
-0.3226954936981201,
-0.0796118676662445,
0.19761306047439575,
0.49780941009521484,
-0.08310195803642273,
0.026681838557124138,
0.33452531695365906,
-0.07980066537857056,
-0.019452087581157684,
0.15810556709766388,
0.2809703052043915,
0.12339213490486145,
0.44363147020339966,
-0.170930877327919,
0.2886793315410614,
0.07885389029979706,
0.012358080595731735,
-0.32424941658973694,
-0.4012276530265808,
0.13029460608959198,
-0.026736140251159668,
-0.005608720704913139,
0.11325488984584808,
-0.18550974130630493,
0.3135449290275574,
-0.031933482736349106,
0.10062512755393982,
-0.1488545686006546,
-0.2038005292415619,
-0.15495231747627258,
-0.057244230061769485,
-0.13461719453334808,
-0.11374668031930923,
0.08830505609512329,
-0.08619936555624008,
-0.02992270700633526,
0.17827509343624115,
-0.03947056084871292,
-0.08551887422800064,
0.00246453401632607,
-0.046071961522102356,
0.16061599552631378,
0.07473485916852951,
-0.3083398938179016,
-0.2672029137611389,
0.2556031346321106,
0.07338546216487885,
0.11309868097305298,
0.168406680226326,
0.26660415530204773,
0.5879353880882263,
0.20066113770008087,
0.0559181347489357,
-0.12424187362194061,
-0.15601032972335815,
-0.10677933692932129,
-0.08289501816034317,
0.37716320157051086,
0.1802498996257782,
-0.13942641019821167,
0.21304447948932648,
0.30799585580825806,
-0.28347209095954895,
0.28736552596092224,
-0.04799807071685791,
-0.24922555685043335,
-0.023750167340040207,
-0.3432007431983948,
0.1544087827205658,
0.008268896490335464,
-0.12710486352443695,
0.004681495483964682,
-0.29337599873542786,
0.002975588897243142,
0.6188564896583557,
0.14555133879184723,
0.2228597104549408,
-0.07275889068841934,
0.13942836225032806,
0.004878569394350052,
0.2854405641555786,
0.2522715926170349,
0.07198425382375717,
-0.14247062802314758,
-0.15165123343467712,
-0.5441979765892029,
0.11871367692947388,
0.12807375192642212,
0.028605040162801743,
-0.017076246440410614,
-0.04064415022730827,
0.29288798570632935,
-0.15968123078346252,
0.03420615941286087,
0.0759352296590805,
0.03737054765224457,
-0.2659335434436798,
-0.2759201228618622,
-0.14051388204097748,
-0.16209368407726288,
0.0825190395116806,
-0.047658953815698624,
-0.297376424074173,
0.06589415669441223,
-0.20403216779232025,
0.20327749848365784,
-0.23975934088230133,
0.16522471606731415,
0.28331896662712097,
0.4199044704437256,
0.23345157504081726,
-0.03929935768246651,
0.638414204120636,
-0.27450838685035706,
0.1796325445175171,
-0.17773033678531647,
-0.5417627096176147,
0.07731229811906815,
0.07445388287305832,
0.19173917174339294,
0.05912343040108681,
-0.43103981018066406,
-0.23613211512565613,
-0.29346001148223877,
0.3521421551704407,
-0.07073712348937988,
0.16945423185825348,
-0.2602948248386383,
0.17741736769676208,
0.016055483371019363,
-0.014859202317893505,
0.08208130300045013,
0.17987322807312012,
-0.06739736348390579,
0.24422672390937805,
0.017618831247091293,
-0.3644712269306183,
0.4838660955429077,
-0.07658909261226654,
-0.3043716549873352,
0.04612463340163231,
0.13786859810352325,
0.4158628582954407,
0.04816242679953575,
-0.6095107793807983,
0.051242366433143616,
0.3677935302257538,
-0.08600453287363052,
-0.5261020064353943,
0.4435475468635559,
-0.2686791718006134,
0.13482600450515747,
0.05857614800333977,
0.12987235188484192,
0.16115261614322662,
-0.25142961740493774,
-0.03396347537636757,
-0.1767033487558365
] |
https://github.com/huggingface/datasets/issues/2214
|
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
I just faced the same issue. I was using 1.2.1 from conda and received the same AttributeError complaining about 'add_start_docstrings'. Uninstalling the conda installed datasets and then installing the latest datasets (version 1.5.0) using pip install solved the issue for me. I don't like mixing up conda and pip installs in the same environments but this will have to do for now, until 1.5.0 is made available through conda.
|
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
| 69 |
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
[
-0.5392569303512573,
0.19221895933151245,
-0.13816730678081512,
0.0966939851641655,
0.542612612247467,
0.1725652664899826,
0.08621301501989365,
0.37896278500556946,
0.16812865436077118,
0.037899430841207504,
0.12820486724376678,
0.0966842770576477,
-0.0704272985458374,
0.11038244515657425,
-0.1025613397359848,
-0.1339242309331894,
-0.0007527099805884063,
0.17130903899669647,
0.0021807283628731966,
-0.05039862543344498,
-0.2962408661842346,
0.01901932619512081,
-0.14961722493171692,
-0.06595037132501602,
-0.46179237961769104,
-0.029466276988387108,
0.21470358967781067,
0.37263378500938416,
-0.45803964138031006,
-0.4178035259246826,
-0.018677033483982086,
0.030397929251194,
0.2209225445985794,
0.24618634581565857,
-0.0001037287074723281,
-0.11571035534143448,
0.1903020441532135,
-0.07561618834733963,
-0.4104156196117401,
-0.014386014081537724,
-0.12545491755008698,
-0.07572583854198456,
0.13910387456417084,
-0.23813863098621368,
-0.012424529530107975,
-0.0999661311507225,
-0.02880190685391426,
-0.4594835042953491,
0.09443031251430511,
0.5152890682220459,
0.29153281450271606,
0.27906882762908936,
0.011282737366855145,
-0.4570014774799347,
0.1545199751853943,
-0.14444832503795624,
-0.04730107635259628,
0.41895878314971924,
0.2616523802280426,
-0.3062405586242676,
-0.22224284708499908,
0.1618093103170395,
-0.2750726342201233,
0.39770880341529846,
0.16093428432941437,
-0.026803690940141678,
0.3565247356891632,
0.11996643990278244,
0.335666686296463,
-0.12067773938179016,
0.7044291496276855,
-0.3816392123699188,
0.010330948047339916,
0.05983906239271164,
0.1208319365978241,
-0.5540677309036255,
0.21269991993904114,
-0.09694712609052658,
0.025308681651949883,
0.0722249299287796,
-0.12124045193195343,
-0.39518237113952637,
-0.04412422701716423,
0.16858263313770294,
-0.02488987147808075,
-0.008662133477628231,
-0.15952418744564056,
-0.11596499383449554,
0.2216147482395172,
0.041556309908628464,
0.36334428191185,
0.161412313580513,
-0.17213226854801178,
-0.02934923581779003,
0.13510476052761078,
0.26212960481643677,
0.14529959857463837,
-0.19492870569229126,
0.20424416661262512,
0.011344578117132187,
-0.0541679821908474,
-0.013946877792477608,
0.18647733330726624,
0.12851327657699585,
-0.10205887258052826,
0.18009419739246368,
0.4029068350791931,
0.2819146513938904,
0.10784009844064713,
0.11448805779218674,
-0.05125812813639641,
-0.0916743278503418,
-0.028396040201187134,
-0.5794972777366638,
-0.02114264853298664,
-0.026908129453659058,
0.06550929695367813,
-0.0000068872268457198516,
-0.257529079914093,
0.18942667543888092,
0.33537811040878296,
-0.22291062772274017,
0.0200855303555727,
0.22116464376449585,
0.13188046216964722,
-0.022274181246757507,
0.2230517715215683,
0.2581455111503601,
-0.20672202110290527,
0.11351572722196579,
-0.29748961329460144,
0.11216510832309723,
-0.13271015882492065,
0.1371266096830368,
0.24499863386154175,
0.033288512378931046,
0.26591336727142334,
-0.006250826176255941,
0.04806035757064819,
-0.08819670230150223,
0.12627866864204407,
0.1084994450211525,
-0.14296746253967285,
0.21562273800373077,
0.2049618661403656,
0.13573570549488068,
0.3237440288066864,
-0.3653041422367096,
-0.1001056507229805,
-0.023798013105988503,
-0.5050267577171326,
-0.29534658789634705,
-0.2503146827220917,
0.3316862881183624,
-0.06367024779319763,
-0.09851577132940292,
0.03196040168404579,
0.0033806385472416878,
0.14606058597564697,
-0.11891450732946396,
-0.12289077043533325,
0.04351285845041275,
-0.13937775790691376,
-0.07814596593379974,
0.2985195815563202,
0.3891720175743103,
-0.20916451513767242,
-0.15781866014003754,
0.17824938893318176,
-0.10096491128206253,
0.0502406544983387,
-0.11821624636650085,
-0.018802672624588013,
0.31850239634513855,
-0.12604527175426483,
0.12785488367080688,
0.6707775592803955,
-0.6357834935188293,
-0.16512370109558105,
0.0855553150177002,
0.006738661322742701,
-0.42291131615638733,
0.09013590216636658,
-0.223626047372818,
0.10040638595819473,
0.1735774129629135,
0.3174014985561371,
0.019278578460216522,
0.07826468348503113,
-0.03537215664982796,
-0.1706518977880478,
-0.17100125551223755,
-0.1292577087879181,
0.25182271003723145,
0.2122398465871811,
0.048981208354234695,
0.3033837080001831,
0.24302436411380768,
0.01347899716347456,
-0.13336874544620514,
-0.0410548560321331,
0.2897709012031555,
0.06547706574201584,
-0.11024255305528641,
0.020511729642748833,
-0.20931750535964966,
-0.24189947545528412,
-0.03427042439579964,
0.17927265167236328,
0.04037005454301834,
0.04731731861829758,
0.13896331191062927,
-0.3473086357116699,
0.027926117181777954,
-0.20467862486839294,
-0.15119308233261108,
0.2579819858074188,
0.04749017953872681,
-0.253589391708374,
0.27580174803733826,
-0.2772662937641144,
-0.16777768731117249,
-0.5211001038551331,
0.03780312463641167,
-0.028829136863350868,
0.12525421380996704,
-0.11300363391637802,
-0.09993765503168106,
0.1864452362060547,
-0.06632811576128006,
0.09633655101060867,
0.06320210546255112,
-0.26423248648643494,
0.4819691777229309,
0.04760027304291725,
0.11957917362451553,
0.3307344317436218,
0.2939034700393677,
0.02040441334247589,
-0.15009953081607819,
-0.004545303527265787,
-0.3252653479576111,
0.005091194529086351,
-0.10012995451688766,
-0.14014685153961182,
-0.23376326262950897,
-0.07938867062330246,
-0.018704654648900032,
0.1795041412115097,
0.110074982047081,
0.3574385643005371,
-0.08862332999706268,
0.06270451843738556,
-0.5316263437271118,
0.37170445919036865,
-0.10192470252513885,
0.020883191376924515,
-0.08770482242107391,
0.17298877239227295,
-0.24312829971313477,
0.6784751415252686,
0.08172079920768738,
0.13703416287899017,
0.053672805428504944,
-0.008125373162329197,
-0.024397073313593864,
-0.253602534532547,
-0.2017083615064621,
0.3433481752872467,
0.2813173234462738,
0.035770855844020844,
0.14835812151432037,
-0.007653082720935345,
-0.3022816479206085,
0.29393458366394043,
-0.06478442251682281,
-0.15798704326152802,
0.5123337507247925,
-0.11440911889076233,
-0.13887600600719452,
-0.43257397413253784,
0.009257368743419647,
0.07800561189651489,
0.22361300885677338,
-0.4414859414100647,
-0.16329240798950195,
-0.15562692284584045,
0.15645107626914978,
0.11517400294542313,
-0.3424545228481293,
-0.0747491791844368,
-0.15771012008190155,
0.12347003817558289,
0.1465766429901123,
0.10223405063152313,
0.38869738578796387,
-0.041221413761377335,
0.3033812642097473,
0.24883945286273956,
-0.09540889412164688,
-0.01340169832110405,
-0.4240010678768158,
0.06658094376325607,
0.1500004678964615,
0.2450159788131714,
0.2044699490070343,
0.34504854679107666,
-0.5736925005912781,
0.25232428312301636,
-0.20761455595493317,
-0.18308062851428986,
0.1103927344083786,
0.14480307698249817,
0.33697977662086487,
0.2600141167640686,
0.1040416955947876,
0.12371190637350082,
-0.14963719248771667,
0.3355162739753723,
-0.04588983952999115,
0.0600263848900795,
0.06989110261201859,
-0.08340456336736679,
-0.46205925941467285,
-0.2282547950744629,
-0.48469725251197815,
0.16829293966293335,
-0.5881660580635071,
-0.14437969028949738,
0.37837210297584534,
-0.05955906957387924,
0.32622677087783813,
0.22144363820552826,
0.25659164786338806,
0.21119685471057892,
0.2868051826953888,
-0.3080908954143524,
-0.4891466498374939,
0.16161441802978516,
-0.38416892290115356,
-0.2547754943370819,
0.1036267951130867,
0.15396147966384888,
0.29408133029937744,
0.13705715537071228,
-0.36443641781806946,
-0.20414012670516968,
0.11846160143613815,
0.06357061862945557,
-0.12454032152891159,
0.2975373864173889,
0.1966104805469513,
0.19981548190116882,
-0.0634387657046318,
-0.283707857131958,
-0.05877622216939926,
0.05436963215470314,
-0.061011072248220444,
-0.05564351752400398,
-0.3903379440307617,
0.10907777398824692,
-0.2700817883014679,
0.3875706195831299,
-0.011083749122917652,
-0.031776946038007736,
0.14290165901184082,
-0.2496732920408249,
0.4533967971801758,
-0.15747812390327454,
-0.2542058527469635,
0.12592343986034393,
0.13269174098968506,
0.0200880765914917,
0.272759348154068,
0.052218228578567505,
0.18179680407047272,
-0.17743778228759766,
0.20289170742034912,
-0.09332294017076492,
-0.1062883660197258,
-0.018052665516734123,
-0.071658194065094,
0.22064603865146637,
-0.08274544775485992,
0.28777652978897095,
-0.25621649622917175,
0.11686750501394272,
0.10370571166276932,
0.39413511753082275,
-0.13905483484268188,
0.006653451826423407,
-0.3301084637641907,
0.29533636569976807,
-0.05352870374917984,
0.18160654604434967,
-0.010073639452457428,
0.11386106163263321,
-0.33433130383491516,
-0.05574176087975502,
-0.17394113540649414,
-0.023206213489174843,
0.3064431846141815,
-0.26454225182533264,
-0.11505988240242004,
0.2500118911266327,
0.19532306492328644,
-0.18072135746479034,
0.03185997158288956,
-0.046946700662374496,
0.18666696548461914,
-0.008827775716781616,
0.7087094783782959,
-0.07235594093799591,
-0.07033656537532806,
0.15077656507492065,
-0.029394906014204025,
0.01927308924496174,
0.004588849376887083,
-0.1252831071615219,
-0.27936363220214844,
-0.24308790266513824,
-0.18095842003822327,
-0.058946143835783005,
0.20112194120883942,
0.024330148473381996,
0.1320064663887024,
-0.019284654408693314,
-0.06041308864951134,
0.13120414316654205,
0.1437300443649292,
0.18796314299106598,
-0.043566521257162094,
0.09433893114328384,
0.16091805696487427,
0.04317574203014374,
0.5185354948043823,
0.2902737855911255,
-0.3835773169994354,
-0.3244190514087677,
0.19886064529418945,
-0.3310389816761017,
0.2726198136806488,
0.15061847865581512,
-0.10351824015378952,
-0.07166024297475815,
-0.08562080562114716,
0.1312469094991684,
-0.38699111342430115,
0.4074532389640808,
0.28743651509284973,
0.10933062434196472,
-0.32331544160842896,
-0.3579745888710022,
0.31724807620048523,
0.0868140310049057,
-0.008992553688585758,
0.45920008420944214,
-0.10578034818172455,
-0.36231595277786255,
-0.08822542428970337,
-0.0486348457634449,
0.54542475938797,
0.027093451470136642,
0.04548812285065651,
0.24058257043361664,
-0.004977665841579437,
0.14528237283229828,
-0.40771496295928955,
0.009059542790055275,
-0.18336117267608643,
-0.2952163517475128,
0.05266914144158363,
-0.08155637979507446,
0.2928823232650757,
-0.17825788259506226,
-0.23059619963169098,
-0.015731707215309143,
-0.21970219910144806,
0.11618800461292267,
-0.0462600514292717,
0.17033690214157104,
-0.18683888018131256,
-0.22624315321445465,
-0.10216604918241501,
0.2217549979686737,
-0.13194748759269714,
-0.1105383038520813,
-0.2149391770362854,
-0.01050913892686367,
0.12634140253067017,
-0.18345282971858978,
0.07721716165542603,
-0.12113536149263382,
0.09789600223302841,
0.19789230823516846,
-0.10158111155033112,
-0.10582046210765839,
0.0069696493446826935,
0.15153160691261292,
0.39204394817352295,
0.10977011173963547,
-0.2996363341808319,
0.2552400827407837,
-0.19478580355644226,
-0.24279887974262238,
-0.09966950118541718,
0.23131738603115082,
0.18156622350215912,
-0.07596081495285034,
0.021062273532152176,
-0.024735575541853905,
-0.029485417529940605,
0.009458211250603199,
-0.1396627575159073,
-0.1940007358789444,
0.12610523402690887,
-0.49643760919570923,
-0.1714843064546585,
0.06890028715133667,
-0.047079626470804214,
-0.18717938661575317,
0.2136911153793335,
-0.0761890783905983,
0.05498889833688736,
0.1541638821363449,
0.23130738735198975,
-0.17172349989414215,
-0.10670538991689682,
0.20375794172286987,
-0.1416286826133728,
-0.07257682085037231,
0.2067413330078125,
0.03272387757897377,
-0.26247838139533997,
-0.35154038667678833,
-0.0774206593632698,
0.16324618458747864,
-0.19910727441310883,
0.30002447962760925,
0.5883508324623108,
-0.12303110957145691,
0.16583602130413055,
0.16762489080429077,
0.028003498911857605,
-0.10017389059066772,
0.1053394228219986,
-0.1358269304037094,
-0.3436405062675476,
0.140044167637825,
-0.25411444902420044,
0.2535093128681183,
-0.019161948934197426,
0.17512501776218414,
-0.039390984922647476,
0.008272173814475536,
-0.39480364322662354,
0.132722869515419,
-0.14312177896499634,
-0.006648496259003878,
0.35061994194984436,
-0.1291065514087677,
0.11356312781572342,
-0.0920170322060585,
0.1866036206483841,
-0.08362020552158356,
-0.39659208059310913,
-0.2943883240222931,
-0.195400670170784,
0.05047570914030075,
-0.06393541395664215,
-0.2043197751045227,
0.23378872871398926,
-0.24020053446292877,
-0.3160392940044403,
-0.25707560777664185,
-0.005021677352488041,
0.25582441687583923,
-0.1046774685382843,
0.22318901121616364,
-0.23533710837364197,
0.14950034022331238,
0.299500972032547,
0.20506033301353455,
0.0208224356174469,
0.26865851879119873,
-0.42200392484664917,
-0.03405061736702919,
-0.16497725248336792,
0.008591894991695881,
0.13045595586299896,
0.2574193775653839,
0.14052487909793854,
0.13934554159641266,
0.14314110577106476,
-0.21500103175640106,
0.18362759053707123,
0.21051432192325592,
0.2176472544670105,
0.2985988259315491,
-0.3041260242462158,
0.018251262605190277,
0.01745564118027687,
0.33515384793281555,
-0.2897292673587799,
-0.30289945006370544,
0.00832788459956646,
-0.1370360255241394,
0.168243870139122,
0.010014946572482586,
0.15334585309028625,
-0.3226954936981201,
-0.0796118676662445,
0.19761306047439575,
0.49780941009521484,
-0.08310195803642273,
0.026681838557124138,
0.33452531695365906,
-0.07980066537857056,
-0.019452087581157684,
0.15810556709766388,
0.2809703052043915,
0.12339213490486145,
0.44363147020339966,
-0.170930877327919,
0.2886793315410614,
0.07885389029979706,
0.012358080595731735,
-0.32424941658973694,
-0.4012276530265808,
0.13029460608959198,
-0.026736140251159668,
-0.005608720704913139,
0.11325488984584808,
-0.18550974130630493,
0.3135449290275574,
-0.031933482736349106,
0.10062512755393982,
-0.1488545686006546,
-0.2038005292415619,
-0.15495231747627258,
-0.057244230061769485,
-0.13461719453334808,
-0.11374668031930923,
0.08830505609512329,
-0.08619936555624008,
-0.02992270700633526,
0.17827509343624115,
-0.03947056084871292,
-0.08551887422800064,
0.00246453401632607,
-0.046071961522102356,
0.16061599552631378,
0.07473485916852951,
-0.3083398938179016,
-0.2672029137611389,
0.2556031346321106,
0.07338546216487885,
0.11309868097305298,
0.168406680226326,
0.26660415530204773,
0.5879353880882263,
0.20066113770008087,
0.0559181347489357,
-0.12424187362194061,
-0.15601032972335815,
-0.10677933692932129,
-0.08289501816034317,
0.37716320157051086,
0.1802498996257782,
-0.13942641019821167,
0.21304447948932648,
0.30799585580825806,
-0.28347209095954895,
0.28736552596092224,
-0.04799807071685791,
-0.24922555685043335,
-0.023750167340040207,
-0.3432007431983948,
0.1544087827205658,
0.008268896490335464,
-0.12710486352443695,
0.004681495483964682,
-0.29337599873542786,
0.002975588897243142,
0.6188564896583557,
0.14555133879184723,
0.2228597104549408,
-0.07275889068841934,
0.13942836225032806,
0.004878569394350052,
0.2854405641555786,
0.2522715926170349,
0.07198425382375717,
-0.14247062802314758,
-0.15165123343467712,
-0.5441979765892029,
0.11871367692947388,
0.12807375192642212,
0.028605040162801743,
-0.017076246440410614,
-0.04064415022730827,
0.29288798570632935,
-0.15968123078346252,
0.03420615941286087,
0.0759352296590805,
0.03737054765224457,
-0.2659335434436798,
-0.2759201228618622,
-0.14051388204097748,
-0.16209368407726288,
0.0825190395116806,
-0.047658953815698624,
-0.297376424074173,
0.06589415669441223,
-0.20403216779232025,
0.20327749848365784,
-0.23975934088230133,
0.16522471606731415,
0.28331896662712097,
0.4199044704437256,
0.23345157504081726,
-0.03929935768246651,
0.638414204120636,
-0.27450838685035706,
0.1796325445175171,
-0.17773033678531647,
-0.5417627096176147,
0.07731229811906815,
0.07445388287305832,
0.19173917174339294,
0.05912343040108681,
-0.43103981018066406,
-0.23613211512565613,
-0.29346001148223877,
0.3521421551704407,
-0.07073712348937988,
0.16945423185825348,
-0.2602948248386383,
0.17741736769676208,
0.016055483371019363,
-0.014859202317893505,
0.08208130300045013,
0.17987322807312012,
-0.06739736348390579,
0.24422672390937805,
0.017618831247091293,
-0.3644712269306183,
0.4838660955429077,
-0.07658909261226654,
-0.3043716549873352,
0.04612463340163231,
0.13786859810352325,
0.4158628582954407,
0.04816242679953575,
-0.6095107793807983,
0.051242366433143616,
0.3677935302257538,
-0.08600453287363052,
-0.5261020064353943,
0.4435475468635559,
-0.2686791718006134,
0.13482600450515747,
0.05857614800333977,
0.12987235188484192,
0.16115261614322662,
-0.25142961740493774,
-0.03396347537636757,
-0.1767033487558365
] |
https://github.com/huggingface/datasets/issues/2214
|
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
Yep, seems to have fixed things! The conda package could really do with an update. Thanks!
|
I'm having the same problem as [Notebooks issue 10](https://github.com/huggingface/notebooks/issues/10) on datasets 1.2.1, and it seems to be an issue with the datasets package.
```python
>>> from datasets import load_metric
>>> metric = load_metric("glue", "sst2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 502, in load_metric
File "/ext3/miniconda3/lib/python3.8/site-packages/datasets-1.2.1-py3.8.egg/datasets/load.py", line 66, in import_main_class
File "/ext3/miniconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ns4008/.cache/huggingface/modules/datasets_modules/metrics/glue/e4606ab9804a36bcd5a9cebb2cb65bb14b6ac78ee9e6d5981fa679a495dd55de/glue.py", line 105, in <module>
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
AttributeError: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
```
| 16 |
load_metric error: module 'datasets.utils.file_utils' has no attribute 'add_start_docstrings'
|
[
-0.5392569303512573,
0.19221895933151245,
-0.13816730678081512,
0.0966939851641655,
0.542612612247467,
0.1725652664899826,
0.08621301501989365,
0.37896278500556946,
0.16812865436077118,
0.037899430841207504,
0.12820486724376678,
0.0966842770576477,
-0.0704272985458374,
0.11038244515657425,
-0.1025613397359848,
-0.1339242309331894,
-0.0007527099805884063,
0.17130903899669647,
0.0021807283628731966,
-0.05039862543344498,
-0.2962408661842346,
0.01901932619512081,
-0.14961722493171692,
-0.06595037132501602,
-0.46179237961769104,
-0.029466276988387108,
0.21470358967781067,
0.37263378500938416,
-0.45803964138031006,
-0.4178035259246826,
-0.018677033483982086,
0.030397929251194,
0.2209225445985794,
0.24618634581565857,
-0.0001037287074723281,
-0.11571035534143448,
0.1903020441532135,
-0.07561618834733963,
-0.4104156196117401,
-0.014386014081537724,
-0.12545491755008698,
-0.07572583854198456,
0.13910387456417084,
-0.23813863098621368,
-0.012424529530107975,
-0.0999661311507225,
-0.02880190685391426,
-0.4594835042953491,
0.09443031251430511,
0.5152890682220459,
0.29153281450271606,
0.27906882762908936,
0.011282737366855145,
-0.4570014774799347,
0.1545199751853943,
-0.14444832503795624,
-0.04730107635259628,
0.41895878314971924,
0.2616523802280426,
-0.3062405586242676,
-0.22224284708499908,
0.1618093103170395,
-0.2750726342201233,
0.39770880341529846,
0.16093428432941437,
-0.026803690940141678,
0.3565247356891632,
0.11996643990278244,
0.335666686296463,
-0.12067773938179016,
0.7044291496276855,
-0.3816392123699188,
0.010330948047339916,
0.05983906239271164,
0.1208319365978241,
-0.5540677309036255,
0.21269991993904114,
-0.09694712609052658,
0.025308681651949883,
0.0722249299287796,
-0.12124045193195343,
-0.39518237113952637,
-0.04412422701716423,
0.16858263313770294,
-0.02488987147808075,
-0.008662133477628231,
-0.15952418744564056,
-0.11596499383449554,
0.2216147482395172,
0.041556309908628464,
0.36334428191185,
0.161412313580513,
-0.17213226854801178,
-0.02934923581779003,
0.13510476052761078,
0.26212960481643677,
0.14529959857463837,
-0.19492870569229126,
0.20424416661262512,
0.011344578117132187,
-0.0541679821908474,
-0.013946877792477608,
0.18647733330726624,
0.12851327657699585,
-0.10205887258052826,
0.18009419739246368,
0.4029068350791931,
0.2819146513938904,
0.10784009844064713,
0.11448805779218674,
-0.05125812813639641,
-0.0916743278503418,
-0.028396040201187134,
-0.5794972777366638,
-0.02114264853298664,
-0.026908129453659058,
0.06550929695367813,
-0.0000068872268457198516,
-0.257529079914093,
0.18942667543888092,
0.33537811040878296,
-0.22291062772274017,
0.0200855303555727,
0.22116464376449585,
0.13188046216964722,
-0.022274181246757507,
0.2230517715215683,
0.2581455111503601,
-0.20672202110290527,
0.11351572722196579,
-0.29748961329460144,
0.11216510832309723,
-0.13271015882492065,
0.1371266096830368,
0.24499863386154175,
0.033288512378931046,
0.26591336727142334,
-0.006250826176255941,
0.04806035757064819,
-0.08819670230150223,
0.12627866864204407,
0.1084994450211525,
-0.14296746253967285,
0.21562273800373077,
0.2049618661403656,
0.13573570549488068,
0.3237440288066864,
-0.3653041422367096,
-0.1001056507229805,
-0.023798013105988503,
-0.5050267577171326,
-0.29534658789634705,
-0.2503146827220917,
0.3316862881183624,
-0.06367024779319763,
-0.09851577132940292,
0.03196040168404579,
0.0033806385472416878,
0.14606058597564697,
-0.11891450732946396,
-0.12289077043533325,
0.04351285845041275,
-0.13937775790691376,
-0.07814596593379974,
0.2985195815563202,
0.3891720175743103,
-0.20916451513767242,
-0.15781866014003754,
0.17824938893318176,
-0.10096491128206253,
0.0502406544983387,
-0.11821624636650085,
-0.018802672624588013,
0.31850239634513855,
-0.12604527175426483,
0.12785488367080688,
0.6707775592803955,
-0.6357834935188293,
-0.16512370109558105,
0.0855553150177002,
0.006738661322742701,
-0.42291131615638733,
0.09013590216636658,
-0.223626047372818,
0.10040638595819473,
0.1735774129629135,
0.3174014985561371,
0.019278578460216522,
0.07826468348503113,
-0.03537215664982796,
-0.1706518977880478,
-0.17100125551223755,
-0.1292577087879181,
0.25182271003723145,
0.2122398465871811,
0.048981208354234695,
0.3033837080001831,
0.24302436411380768,
0.01347899716347456,
-0.13336874544620514,
-0.0410548560321331,
0.2897709012031555,
0.06547706574201584,
-0.11024255305528641,
0.020511729642748833,
-0.20931750535964966,
-0.24189947545528412,
-0.03427042439579964,
0.17927265167236328,
0.04037005454301834,
0.04731731861829758,
0.13896331191062927,
-0.3473086357116699,
0.027926117181777954,
-0.20467862486839294,
-0.15119308233261108,
0.2579819858074188,
0.04749017953872681,
-0.253589391708374,
0.27580174803733826,
-0.2772662937641144,
-0.16777768731117249,
-0.5211001038551331,
0.03780312463641167,
-0.028829136863350868,
0.12525421380996704,
-0.11300363391637802,
-0.09993765503168106,
0.1864452362060547,
-0.06632811576128006,
0.09633655101060867,
0.06320210546255112,
-0.26423248648643494,
0.4819691777229309,
0.04760027304291725,
0.11957917362451553,
0.3307344317436218,
0.2939034700393677,
0.02040441334247589,
-0.15009953081607819,
-0.004545303527265787,
-0.3252653479576111,
0.005091194529086351,
-0.10012995451688766,
-0.14014685153961182,
-0.23376326262950897,
-0.07938867062330246,
-0.018704654648900032,
0.1795041412115097,
0.110074982047081,
0.3574385643005371,
-0.08862332999706268,
0.06270451843738556,
-0.5316263437271118,
0.37170445919036865,
-0.10192470252513885,
0.020883191376924515,
-0.08770482242107391,
0.17298877239227295,
-0.24312829971313477,
0.6784751415252686,
0.08172079920768738,
0.13703416287899017,
0.053672805428504944,
-0.008125373162329197,
-0.024397073313593864,
-0.253602534532547,
-0.2017083615064621,
0.3433481752872467,
0.2813173234462738,
0.035770855844020844,
0.14835812151432037,
-0.007653082720935345,
-0.3022816479206085,
0.29393458366394043,
-0.06478442251682281,
-0.15798704326152802,
0.5123337507247925,
-0.11440911889076233,
-0.13887600600719452,
-0.43257397413253784,
0.009257368743419647,
0.07800561189651489,
0.22361300885677338,
-0.4414859414100647,
-0.16329240798950195,
-0.15562692284584045,
0.15645107626914978,
0.11517400294542313,
-0.3424545228481293,
-0.0747491791844368,
-0.15771012008190155,
0.12347003817558289,
0.1465766429901123,
0.10223405063152313,
0.38869738578796387,
-0.041221413761377335,
0.3033812642097473,
0.24883945286273956,
-0.09540889412164688,
-0.01340169832110405,
-0.4240010678768158,
0.06658094376325607,
0.1500004678964615,
0.2450159788131714,
0.2044699490070343,
0.34504854679107666,
-0.5736925005912781,
0.25232428312301636,
-0.20761455595493317,
-0.18308062851428986,
0.1103927344083786,
0.14480307698249817,
0.33697977662086487,
0.2600141167640686,
0.1040416955947876,
0.12371190637350082,
-0.14963719248771667,
0.3355162739753723,
-0.04588983952999115,
0.0600263848900795,
0.06989110261201859,
-0.08340456336736679,
-0.46205925941467285,
-0.2282547950744629,
-0.48469725251197815,
0.16829293966293335,
-0.5881660580635071,
-0.14437969028949738,
0.37837210297584534,
-0.05955906957387924,
0.32622677087783813,
0.22144363820552826,
0.25659164786338806,
0.21119685471057892,
0.2868051826953888,
-0.3080908954143524,
-0.4891466498374939,
0.16161441802978516,
-0.38416892290115356,
-0.2547754943370819,
0.1036267951130867,
0.15396147966384888,
0.29408133029937744,
0.13705715537071228,
-0.36443641781806946,
-0.20414012670516968,
0.11846160143613815,
0.06357061862945557,
-0.12454032152891159,
0.2975373864173889,
0.1966104805469513,
0.19981548190116882,
-0.0634387657046318,
-0.283707857131958,
-0.05877622216939926,
0.05436963215470314,
-0.061011072248220444,
-0.05564351752400398,
-0.3903379440307617,
0.10907777398824692,
-0.2700817883014679,
0.3875706195831299,
-0.011083749122917652,
-0.031776946038007736,
0.14290165901184082,
-0.2496732920408249,
0.4533967971801758,
-0.15747812390327454,
-0.2542058527469635,
0.12592343986034393,
0.13269174098968506,
0.0200880765914917,
0.272759348154068,
0.052218228578567505,
0.18179680407047272,
-0.17743778228759766,
0.20289170742034912,
-0.09332294017076492,
-0.1062883660197258,
-0.018052665516734123,
-0.071658194065094,
0.22064603865146637,
-0.08274544775485992,
0.28777652978897095,
-0.25621649622917175,
0.11686750501394272,
0.10370571166276932,
0.39413511753082275,
-0.13905483484268188,
0.006653451826423407,
-0.3301084637641907,
0.29533636569976807,
-0.05352870374917984,
0.18160654604434967,
-0.010073639452457428,
0.11386106163263321,
-0.33433130383491516,
-0.05574176087975502,
-0.17394113540649414,
-0.023206213489174843,
0.3064431846141815,
-0.26454225182533264,
-0.11505988240242004,
0.2500118911266327,
0.19532306492328644,
-0.18072135746479034,
0.03185997158288956,
-0.046946700662374496,
0.18666696548461914,
-0.008827775716781616,
0.7087094783782959,
-0.07235594093799591,
-0.07033656537532806,
0.15077656507492065,
-0.029394906014204025,
0.01927308924496174,
0.004588849376887083,
-0.1252831071615219,
-0.27936363220214844,
-0.24308790266513824,
-0.18095842003822327,
-0.058946143835783005,
0.20112194120883942,
0.024330148473381996,
0.1320064663887024,
-0.019284654408693314,
-0.06041308864951134,
0.13120414316654205,
0.1437300443649292,
0.18796314299106598,
-0.043566521257162094,
0.09433893114328384,
0.16091805696487427,
0.04317574203014374,
0.5185354948043823,
0.2902737855911255,
-0.3835773169994354,
-0.3244190514087677,
0.19886064529418945,
-0.3310389816761017,
0.2726198136806488,
0.15061847865581512,
-0.10351824015378952,
-0.07166024297475815,
-0.08562080562114716,
0.1312469094991684,
-0.38699111342430115,
0.4074532389640808,
0.28743651509284973,
0.10933062434196472,
-0.32331544160842896,
-0.3579745888710022,
0.31724807620048523,
0.0868140310049057,
-0.008992553688585758,
0.45920008420944214,
-0.10578034818172455,
-0.36231595277786255,
-0.08822542428970337,
-0.0486348457634449,
0.54542475938797,
0.027093451470136642,
0.04548812285065651,
0.24058257043361664,
-0.004977665841579437,
0.14528237283229828,
-0.40771496295928955,
0.009059542790055275,
-0.18336117267608643,
-0.2952163517475128,
0.05266914144158363,
-0.08155637979507446,
0.2928823232650757,
-0.17825788259506226,
-0.23059619963169098,
-0.015731707215309143,
-0.21970219910144806,
0.11618800461292267,
-0.0462600514292717,
0.17033690214157104,
-0.18683888018131256,
-0.22624315321445465,
-0.10216604918241501,
0.2217549979686737,
-0.13194748759269714,
-0.1105383038520813,
-0.2149391770362854,
-0.01050913892686367,
0.12634140253067017,
-0.18345282971858978,
0.07721716165542603,
-0.12113536149263382,
0.09789600223302841,
0.19789230823516846,
-0.10158111155033112,
-0.10582046210765839,
0.0069696493446826935,
0.15153160691261292,
0.39204394817352295,
0.10977011173963547,
-0.2996363341808319,
0.2552400827407837,
-0.19478580355644226,
-0.24279887974262238,
-0.09966950118541718,
0.23131738603115082,
0.18156622350215912,
-0.07596081495285034,
0.021062273532152176,
-0.024735575541853905,
-0.029485417529940605,
0.009458211250603199,
-0.1396627575159073,
-0.1940007358789444,
0.12610523402690887,
-0.49643760919570923,
-0.1714843064546585,
0.06890028715133667,
-0.047079626470804214,
-0.18717938661575317,
0.2136911153793335,
-0.0761890783905983,
0.05498889833688736,
0.1541638821363449,
0.23130738735198975,
-0.17172349989414215,
-0.10670538991689682,
0.20375794172286987,
-0.1416286826133728,
-0.07257682085037231,
0.2067413330078125,
0.03272387757897377,
-0.26247838139533997,
-0.35154038667678833,
-0.0774206593632698,
0.16324618458747864,
-0.19910727441310883,
0.30002447962760925,
0.5883508324623108,
-0.12303110957145691,
0.16583602130413055,
0.16762489080429077,
0.028003498911857605,
-0.10017389059066772,
0.1053394228219986,
-0.1358269304037094,
-0.3436405062675476,
0.140044167637825,
-0.25411444902420044,
0.2535093128681183,
-0.019161948934197426,
0.17512501776218414,
-0.039390984922647476,
0.008272173814475536,
-0.39480364322662354,
0.132722869515419,
-0.14312177896499634,
-0.006648496259003878,
0.35061994194984436,
-0.1291065514087677,
0.11356312781572342,
-0.0920170322060585,
0.1866036206483841,
-0.08362020552158356,
-0.39659208059310913,
-0.2943883240222931,
-0.195400670170784,
0.05047570914030075,
-0.06393541395664215,
-0.2043197751045227,
0.23378872871398926,
-0.24020053446292877,
-0.3160392940044403,
-0.25707560777664185,
-0.005021677352488041,
0.25582441687583923,
-0.1046774685382843,
0.22318901121616364,
-0.23533710837364197,
0.14950034022331238,
0.299500972032547,
0.20506033301353455,
0.0208224356174469,
0.26865851879119873,
-0.42200392484664917,
-0.03405061736702919,
-0.16497725248336792,
0.008591894991695881,
0.13045595586299896,
0.2574193775653839,
0.14052487909793854,
0.13934554159641266,
0.14314110577106476,
-0.21500103175640106,
0.18362759053707123,
0.21051432192325592,
0.2176472544670105,
0.2985988259315491,
-0.3041260242462158,
0.018251262605190277,
0.01745564118027687,
0.33515384793281555,
-0.2897292673587799,
-0.30289945006370544,
0.00832788459956646,
-0.1370360255241394,
0.168243870139122,
0.010014946572482586,
0.15334585309028625,
-0.3226954936981201,
-0.0796118676662445,
0.19761306047439575,
0.49780941009521484,
-0.08310195803642273,
0.026681838557124138,
0.33452531695365906,
-0.07980066537857056,
-0.019452087581157684,
0.15810556709766388,
0.2809703052043915,
0.12339213490486145,
0.44363147020339966,
-0.170930877327919,
0.2886793315410614,
0.07885389029979706,
0.012358080595731735,
-0.32424941658973694,
-0.4012276530265808,
0.13029460608959198,
-0.026736140251159668,
-0.005608720704913139,
0.11325488984584808,
-0.18550974130630493,
0.3135449290275574,
-0.031933482736349106,
0.10062512755393982,
-0.1488545686006546,
-0.2038005292415619,
-0.15495231747627258,
-0.057244230061769485,
-0.13461719453334808,
-0.11374668031930923,
0.08830505609512329,
-0.08619936555624008,
-0.02992270700633526,
0.17827509343624115,
-0.03947056084871292,
-0.08551887422800064,
0.00246453401632607,
-0.046071961522102356,
0.16061599552631378,
0.07473485916852951,
-0.3083398938179016,
-0.2672029137611389,
0.2556031346321106,
0.07338546216487885,
0.11309868097305298,
0.168406680226326,
0.26660415530204773,
0.5879353880882263,
0.20066113770008087,
0.0559181347489357,
-0.12424187362194061,
-0.15601032972335815,
-0.10677933692932129,
-0.08289501816034317,
0.37716320157051086,
0.1802498996257782,
-0.13942641019821167,
0.21304447948932648,
0.30799585580825806,
-0.28347209095954895,
0.28736552596092224,
-0.04799807071685791,
-0.24922555685043335,
-0.023750167340040207,
-0.3432007431983948,
0.1544087827205658,
0.008268896490335464,
-0.12710486352443695,
0.004681495483964682,
-0.29337599873542786,
0.002975588897243142,
0.6188564896583557,
0.14555133879184723,
0.2228597104549408,
-0.07275889068841934,
0.13942836225032806,
0.004878569394350052,
0.2854405641555786,
0.2522715926170349,
0.07198425382375717,
-0.14247062802314758,
-0.15165123343467712,
-0.5441979765892029,
0.11871367692947388,
0.12807375192642212,
0.028605040162801743,
-0.017076246440410614,
-0.04064415022730827,
0.29288798570632935,
-0.15968123078346252,
0.03420615941286087,
0.0759352296590805,
0.03737054765224457,
-0.2659335434436798,
-0.2759201228618622,
-0.14051388204097748,
-0.16209368407726288,
0.0825190395116806,
-0.047658953815698624,
-0.297376424074173,
0.06589415669441223,
-0.20403216779232025,
0.20327749848365784,
-0.23975934088230133,
0.16522471606731415,
0.28331896662712097,
0.4199044704437256,
0.23345157504081726,
-0.03929935768246651,
0.638414204120636,
-0.27450838685035706,
0.1796325445175171,
-0.17773033678531647,
-0.5417627096176147,
0.07731229811906815,
0.07445388287305832,
0.19173917174339294,
0.05912343040108681,
-0.43103981018066406,
-0.23613211512565613,
-0.29346001148223877,
0.3521421551704407,
-0.07073712348937988,
0.16945423185825348,
-0.2602948248386383,
0.17741736769676208,
0.016055483371019363,
-0.014859202317893505,
0.08208130300045013,
0.17987322807312012,
-0.06739736348390579,
0.24422672390937805,
0.017618831247091293,
-0.3644712269306183,
0.4838660955429077,
-0.07658909261226654,
-0.3043716549873352,
0.04612463340163231,
0.13786859810352325,
0.4158628582954407,
0.04816242679953575,
-0.6095107793807983,
0.051242366433143616,
0.3677935302257538,
-0.08600453287363052,
-0.5261020064353943,
0.4435475468635559,
-0.2686791718006134,
0.13482600450515747,
0.05857614800333977,
0.12987235188484192,
0.16115261614322662,
-0.25142961740493774,
-0.03396347537636757,
-0.1767033487558365
] |
https://github.com/huggingface/datasets/issues/2212
|
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
Hi ! Apparently the data are not available from this url anymore. We'll replace it with the new url when it's available
|
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
| 22 |
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
[
-0.4642374515533447,
0.43511566519737244,
-0.20049060881137848,
-0.017762718722224236,
0.32672369480133057,
0.12850016355514526,
0.3063697814941406,
0.17314910888671875,
0.25220736861228943,
0.22710326313972473,
-0.17721663415431976,
-0.08033333718776703,
0.3741396367549896,
0.20074231922626495,
-0.005389299243688583,
0.18888439238071442,
-0.009338012896478176,
0.025150474160909653,
-0.11287767440080643,
-0.06411823630332947,
-0.2572081983089447,
0.41523197293281555,
-0.21132932603359222,
0.21585243940353394,
-0.31124043464660645,
0.024413570761680603,
0.06344623863697052,
0.38985922932624817,
-0.38521429896354675,
0.04193197190761566,
0.21524471044540405,
0.2640494406223297,
-0.12770958244800568,
0.2450367510318756,
-0.00010582234972389415,
0.2027992308139801,
0.2889106571674347,
0.014755532145500183,
-0.20469798147678375,
-0.21708601713180542,
-0.18457183241844177,
0.08647925406694412,
0.13146378099918365,
-0.15293250977993011,
-0.138808473944664,
-0.36393964290618896,
0.1892520785331726,
-0.29191237688064575,
0.1520361453294754,
0.40999355912208557,
0.2307361662387848,
-0.2105073481798172,
0.1512749344110489,
-0.19949181377887726,
-0.17505717277526855,
-0.21572628617286682,
0.03331277519464493,
0.4675024151802063,
0.12119702994823456,
-0.17356689274311066,
-0.2893563210964203,
0.04084701091051102,
0.15395237505435944,
0.11514277011156082,
-0.06688572466373444,
0.06694406270980835,
-0.426123708486557,
-0.036921240389347076,
0.1560400128364563,
0.04550996795296669,
0.43341881036758423,
-0.09273050725460052,
-0.26911792159080505,
0.061333928257226944,
0.05311163514852524,
-0.19074532389640808,
0.551646888256073,
-0.04908920079469681,
-0.13025322556495667,
0.3244178593158722,
-0.3235695958137512,
-0.3093435764312744,
-0.0869356319308281,
0.28176361322402954,
-0.4342292547225952,
0.33106034994125366,
-0.1242704913020134,
0.07960959523916245,
0.3633344769477844,
-0.21327587962150574,
-0.226140558719635,
0.18872526288032532,
-0.007029966451227665,
0.15504895150661469,
-0.29780834913253784,
-0.0502360537648201,
0.0033194227144122124,
-0.4333864152431488,
0.19852569699287415,
0.31007134914398193,
-0.06887152791023254,
0.1679055392742157,
-0.09911074489355087,
0.17609164118766785,
0.3012990951538086,
0.19230511784553528,
0.028323432430624962,
0.28493764996528625,
0.32214295864105225,
0.4649592936038971,
-0.16919046640396118,
-0.018238354474306107,
-0.376968652009964,
-0.09662699699401855,
-0.34326815605163574,
-0.0930204913020134,
-0.14439021050930023,
-0.20853157341480255,
-0.1682833433151245,
0.042738012969493866,
-0.19309324026107788,
-0.09197764098644257,
-0.05073407664895058,
0.2902804911136627,
-0.04722313582897186,
0.037926383316516876,
0.002077921759337187,
0.2508412301540375,
-0.0914168655872345,
0.07274179905653,
-0.19989439845085144,
0.22258862853050232,
-0.20524504780769348,
0.0223167035728693,
0.2563934624195099,
0.04633081704378128,
0.4071342945098877,
-0.534503698348999,
-0.032747890800237656,
0.056320056319236755,
0.20354238152503967,
-0.10059870034456253,
-0.1318853497505188,
0.3106285333633423,
0.21451283991336823,
-0.11870170384645462,
0.08994263410568237,
0.10465501993894577,
0.0022719043772667646,
-0.10174675285816193,
-0.25856927037239075,
-0.1280280351638794,
-0.32921555638313293,
0.2605043649673462,
-0.014877069741487503,
-0.04669227451086044,
-0.22829683125019073,
0.21606864035129547,
-0.4079105257987976,
-0.27197712659835815,
-0.2064862996339798,
0.306972473859787,
-0.005919629707932472,
-0.0015888045309111476,
0.23847907781600952,
0.18968528509140015,
-0.2549572288990021,
0.006134870462119579,
-0.2179446965456009,
-0.229093536734581,
-0.09063392877578735,
0.30334216356277466,
-0.20087745785713196,
0.13015297055244446,
-0.4226956367492676,
0.43842753767967224,
0.7431551218032837,
-0.06648393720388412,
-0.7608040571212769,
0.4116881787776947,
-0.26779744029045105,
-0.20536182820796967,
-0.12456804513931274,
0.012318801134824753,
-0.03207613527774811,
0.1757259964942932,
0.6117702722549438,
0.4520474374294281,
0.10176459699869156,
-0.11083579808473587,
0.06745175272226334,
-0.3609705865383148,
-0.11668600142002106,
0.3062000274658203,
-0.00676747178658843,
0.27887997031211853,
0.3026657700538635,
-0.2808440029621124,
0.17472590506076813,
0.18049192428588867,
-0.2793371379375458,
0.36687952280044556,
-0.18744796514511108,
-0.16550786793231964,
-0.028229208663105965,
0.03165755793452263,
-0.6034233570098877,
0.11657737195491791,
-0.220260351896286,
-0.13285309076309204,
-0.37154972553253174,
0.2353595644235611,
-0.31705644726753235,
-0.07917477190494537,
-0.08626968413591385,
0.128060445189476,
0.2116529941558838,
0.11788538843393326,
0.07798343151807785,
0.22859063744544983,
-0.1779099851846695,
0.16707934439182281,
-0.07312381267547607,
0.15818475186824799,
-0.27789080142974854,
0.14346589148044586,
-0.2446320801973343,
0.038704875856637955,
0.1635790318250656,
-0.13976919651031494,
0.02065703272819519,
-0.33066341280937195,
-0.08064574748277664,
0.29740363359451294,
-0.32260623574256897,
0.2260526865720749,
0.5464051961898804,
0.4359164237976074,
0.10290931165218353,
-0.10764683037996292,
0.011934857815504074,
-0.23127999901771545,
0.0078112040646374226,
-0.0023430015426129103,
-0.07326533645391464,
0.05892645940184593,
0.20820897817611694,
0.21636314690113068,
0.11015342175960541,
0.026352258399128914,
0.5346857309341431,
0.0967731848359108,
0.02425464428961277,
-0.18014098703861237,
0.13188989460468292,
0.676838755607605,
0.023849034681916237,
0.07575313001871109,
-0.17348875105381012,
0.08421601355075836,
0.6387072801589966,
-0.22946231067180634,
0.038957104086875916,
0.11545019596815109,
0.148310586810112,
-0.32938915491104126,
0.2756935656070709,
0.01566207781434059,
0.3024139702320099,
0.12518993020057678,
0.2245805263519287,
0.07016023993492126,
-0.3003760576248169,
-0.25068795680999756,
0.019969364628195763,
0.03715038672089577,
0.12666596472263336,
0.12545384466648102,
0.12142907083034515,
-0.09898027777671814,
-0.1996147483587265,
-0.3614577353000641,
0.1002567857503891,
0.019511856138706207,
0.07464665919542313,
0.26731276512145996,
-0.16937755048274994,
0.01788407936692238,
0.40971875190734863,
-0.23845523595809937,
-0.13663683831691742,
-0.5098510384559631,
0.11063224077224731,
0.04144900292158127,
-0.03773888945579529,
0.2274165004491806,
-0.2515510022640228,
0.11411350965499878,
0.1898224800825119,
-0.20887143909931183,
-0.11549147963523865,
-0.19102813303470612,
-0.217237189412117,
0.18666578829288483,
0.18138429522514343,
-0.075747549533844,
0.12175057828426361,
-0.2790156304836273,
0.09357619285583496,
-0.48752278089523315,
-0.0013206142466515303,
0.21741949021816254,
-0.0031922077760100365,
0.29138633608818054,
0.1493002474308014,
0.24544404447078705,
-0.10176663100719452,
-0.06816636770963669,
0.17932848632335663,
0.05142342671751976,
-0.17380879819393158,
-0.19466988742351532,
-0.05593246594071388,
0.07146091759204865,
0.028387654572725296,
-0.33721670508384705,
0.0034088108222931623,
-0.29725340008735657,
0.2849738597869873,
-0.07976002246141434,
-0.010526314377784729,
-0.14825712144374847,
0.15995335578918457,
0.3381737768650055,
0.319217324256897,
-0.15591081976890564,
-0.42838624119758606,
-0.502850353717804,
0.5249762535095215,
-0.2710711359977722,
-0.13195504248142242,
0.2247796207666397,
0.15216538310050964,
0.23073796927928925,
0.29288095235824585,
-0.3729020655155182,
-0.3825802505016327,
-0.15591326355934143,
0.03457826375961304,
-0.10106640309095383,
-0.3112100660800934,
0.19035010039806366,
-0.21343809366226196,
-0.13516461849212646,
0.05899360030889511,
-0.3082864284515381,
0.2477789968252182,
0.01747468113899231,
0.251151978969574,
0.09770234674215317,
0.5149989128112793,
-0.14808370172977448,
0.42241236567497253,
-0.2293567657470703,
-0.060820259153842926,
0.19667012989521027,
-0.22815831005573273,
0.1598997265100479,
-0.21761636435985565,
-0.010295607149600983,
0.10243381559848785,
0.1297038197517395,
-0.15506209433078766,
0.022726302966475487,
-0.05731120705604553,
-0.15843603014945984,
-0.14378075301647186,
0.39878877997398376,
-0.3807941675186157,
-0.09291519224643707,
-0.13384193181991577,
-0.012926793657243252,
-0.18378086388111115,
0.18075180053710938,
0.10366304218769073,
0.0036695394665002823,
0.12652403116226196,
0.23440654575824738,
0.012272627092897892,
-0.08575862646102905,
0.12631788849830627,
-0.0011809810530394316,
-0.5185654163360596,
-0.3830219805240631,
0.3679753839969635,
-0.024915123358368874,
0.16618147492408752,
-0.29478538036346436,
0.056521058082580566,
0.22865119576454163,
-0.15500704944133759,
0.6204712986946106,
-0.15486882627010345,
-0.056747693568468094,
0.23538509011268616,
0.13126561045646667,
0.15600146353244781,
0.022513145580887794,
0.06542812287807465,
0.20470288395881653,
0.1085164025425911,
0.5451292991638184,
-0.36773958802223206,
-0.07140225172042847,
0.4370552599430084,
-0.18326830863952637,
-0.030691072344779968,
0.0968891978263855,
-0.1827203333377838,
-0.4269365668296814,
-0.35651251673698425,
-0.17398129403591156,
0.11321379989385605,
0.2269095927476883,
0.1511366218328476,
-0.2574782073497772,
0.09870234876871109,
-0.26262885332107544,
-0.2366410195827484,
0.2381361722946167,
0.2373732626438141,
-0.055392712354660034,
-0.2783142328262329,
0.5237162113189697,
-0.02715243585407734,
-0.010363006964325905,
0.807910680770874,
0.27849265933036804,
-0.10211309045553207,
0.6285175681114197,
0.008453285321593285,
-0.04758353531360626,
0.16611900925636292,
-0.0704110637307167,
-0.38510239124298096,
-0.024027753621339798,
0.18075628578662872,
-0.025475524365901947,
0.46139612793922424,
0.29711541533470154,
-0.0917205810546875,
-0.14560259878635406,
-0.24342899024486542,
0.439166784286499,
-0.1468835324048996,
0.041475843638181686,
0.5342013239860535,
-0.15308794379234314,
-0.01785619556903839,
-0.03136768937110901,
0.047069888561964035,
0.5510367155075073,
-0.33940622210502625,
0.019015679135918617,
0.208194762468338,
-0.11741788685321808,
0.06302691251039505,
-0.5523282885551453,
0.19082999229431152,
-0.15775297582149506,
0.010488961823284626,
-0.05542192608118057,
0.023067593574523926,
0.04357960820198059,
0.37941980361938477,
0.1036456748843193,
0.34369760751724243,
0.14335179328918457,
-0.2005494385957718,
0.2185148298740387,
0.15553097426891327,
-0.053079329431056976,
-0.030495142564177513,
-0.31939226388931274,
0.18134109675884247,
0.12568500638008118,
0.13737420737743378,
-0.009074695408344269,
-0.05791393294930458,
-0.027593187987804413,
-0.16235989332199097,
-0.22708266973495483,
0.18981973826885223,
-0.40796053409576416,
0.33191898465156555,
0.03310161828994751,
0.09679191559553146,
-0.32426175475120544,
0.19750602543354034,
-0.14866921305656433,
0.12587115168571472,
-0.25308603048324585,
0.3592415153980255,
-0.11855270713567734,
-0.24664342403411865,
-0.17753928899765015,
0.16174131631851196,
0.137418732047081,
-0.09505996853113174,
-0.0002680663310457021,
0.28328052163124084,
-0.17444325983524323,
-0.43447059392929077,
-0.04302556812763214,
-0.04307267442345619,
0.13969530165195465,
0.031086141243577003,
0.05152783542871475,
-0.22133173048496246,
-0.24898280203342438,
-0.02487383410334587,
0.13893243670463562,
0.004874636419117451,
0.2184428721666336,
-0.34408631920814514,
0.16299940645694733,
-0.236477792263031,
-0.13143308460712433,
0.426723450422287,
-0.20218591392040253,
-0.3516027629375458,
0.3713058829307556,
0.08582697063684464,
-0.07851260900497437,
-0.3042430877685547,
-0.4113732576370239,
0.15883754193782806,
-0.01501505821943283,
0.06739047914743423,
0.0709080845117569,
-0.3147270381450653,
0.00740458257496357,
0.19118386507034302,
0.027283716946840286,
-0.18317943811416626,
-0.021652784198522568,
-0.33460733294487,
-0.3057222068309784,
0.25815925002098083,
-0.3365698754787445,
0.14082524180412292,
0.1868238002061844,
-0.30968397855758667,
0.19078895449638367,
-0.4118914008140564,
-0.33503586053848267,
0.08064363896846771,
-0.5897402763366699,
-0.34977930784225464,
-0.233623206615448,
-0.15580619871616364,
0.4625265598297119,
0.27152755856513977,
0.25567033886909485,
-0.06535517424345016,
-0.2769436240196228,
-0.21649110317230225,
0.2106546312570572,
0.03702164441347122,
0.027314577251672745,
-0.15244241058826447,
0.15790733695030212,
0.003476259298622608,
-0.2990369200706482,
0.039350900799036026,
0.15326352417469025,
-0.07978177070617676,
0.195159450173378,
-0.3212992250919342,
0.3001424968242645,
-0.1511884182691574,
-0.0417168065905571,
-0.08379153162240982,
0.10342752188444138,
0.2662908434867859,
-0.0003981457557529211,
-0.004140944220125675,
-0.12785257399082184,
-0.060949236154556274,
0.013340831734240055,
0.10338680446147919,
0.022980429232120514,
0.16056185960769653,
0.40110623836517334,
-0.24747416377067566,
-0.00014644993643742055,
0.21741551160812378,
0.1992824524641037,
0.2981013059616089,
-0.4346033036708832,
-0.20912395417690277,
-0.014158982783555984,
0.28776973485946655,
-0.09632319211959839,
-0.12982448935508728,
-0.06671754270792007,
-0.1557190865278244,
-0.0162836741656065,
-0.03083190880715847,
0.11289370805025101,
-0.056896645575761795,
0.2939252257347107,
0.06563767045736313,
0.26442134380340576,
-0.0053684595040977,
0.07789269834756851,
-0.10964162647724152,
-0.12322214990854263,
0.037682175636291504,
0.2779679596424103,
0.10411214828491211,
0.326302170753479,
0.2975761294364929,
-0.009710865095257759,
-0.10238891839981079,
-0.09439511597156525,
0.4178067445755005,
-0.2557057738304138,
-0.49675947427749634,
0.07643810659646988,
0.4155076742172241,
-0.24416202306747437,
0.28733953833580017,
-0.08572540432214737,
0.09097909927368164,
-0.35086068511009216,
0.1789897382259369,
-0.3316971957683563,
0.030975401401519775,
-0.03446125611662865,
-0.06932900846004486,
0.0742434486746788,
-0.1156960129737854,
-0.16808421909809113,
0.14244472980499268,
-0.010165792889893055,
0.027678053826093674,
0.018225187435746193,
-0.2230435609817505,
-0.1437058448791504,
-0.07101815193891525,
0.27359071373939514,
-0.13209529221057892,
0.10137418657541275,
-0.1250993311405182,
0.4108729660511017,
-0.14280590415000916,
-0.06365901976823807,
0.38094088435173035,
0.22090135514736176,
0.12906956672668457,
0.021976744756102562,
-0.0029659769497811794,
0.030637919902801514,
-0.16526064276695251,
-0.19391685724258423,
-0.12639370560646057,
0.32333436608314514,
0.3226048946380615,
-0.3285636603832245,
0.363103985786438,
0.24002061784267426,
-0.19653227925300598,
0.26426151394844055,
0.08626917004585266,
0.418176531791687,
0.17871765792369843,
-0.015060428529977798,
-0.22605852782726288,
0.09349172562360764,
-0.3113801181316376,
-0.10890481621026993,
-0.5400241613388062,
-0.3593544363975525,
-0.28587743639945984,
-0.404820054769516,
0.08445055782794952,
-0.10974704474210739,
0.13666802644729614,
0.038808926939964294,
0.4288270175457001,
0.414849191904068,
-0.007404495496302843,
0.062010083347558975,
-0.344251811504364,
-0.33464962244033813,
0.205423966050148,
0.18493571877479553,
0.1545531451702118,
0.13360565900802612,
0.3543210029602051,
-0.11048880219459534,
0.032439082860946655,
0.14997100830078125,
0.3291165232658386,
-0.2717333137989044,
0.014666428789496422,
-0.3850998878479004,
-0.1955573707818985,
0.08477403968572617,
0.12554024159908295,
-0.13098493218421936,
-0.10809203237295151,
0.18082058429718018,
-0.22841975092887878,
0.06403255462646484,
0.10623224079608917,
0.018657777458429337,
-0.08574409782886505,
-0.10249719768762589,
0.4515937268733978,
-0.000875625410117209,
0.1554407924413681,
0.031898632645606995,
-0.09653107821941376,
-0.263557106256485,
-0.24497005343437195,
0.01697341911494732,
-0.1624910980463028,
0.036989640444517136,
0.24863216280937195,
0.0441599115729332,
0.4317739009857178,
-0.03476347774267197,
-0.11773703247308731,
-0.053242336958646774,
0.07220320403575897,
-0.09130161255598068,
0.1049099713563919,
0.13069212436676025,
0.11441123485565186,
0.04419667646288872,
0.20640712976455688,
0.21367134153842926,
-0.03549961373209953,
-0.03623148798942566,
-0.11144905537366867,
0.2867627739906311,
0.21304795145988464,
-0.1770394742488861,
0.20983129739761353,
-0.044031500816345215,
0.08559572696685791,
0.003280235454440117,
-0.25297051668167114,
0.22819888591766357,
0.27487510442733765,
0.0562671534717083,
-0.05746147036552429,
0.13113361597061157,
-0.044064540416002274,
-0.05366525799036026,
-0.19697816669940948,
0.039453860372304916,
-0.03349090367555618,
-0.10016147792339325,
-0.018448127433657646,
0.031663935631513596
] |
https://github.com/huggingface/datasets/issues/2212
|
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
I saw this on their website when we request to download the dataset:

Can we still request them link for the dataset and make a PR? @lhoestq @yjernite
|
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
| 29 |
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
[
-0.4642374515533447,
0.43511566519737244,
-0.20049060881137848,
-0.017762718722224236,
0.32672369480133057,
0.12850016355514526,
0.3063697814941406,
0.17314910888671875,
0.25220736861228943,
0.22710326313972473,
-0.17721663415431976,
-0.08033333718776703,
0.3741396367549896,
0.20074231922626495,
-0.005389299243688583,
0.18888439238071442,
-0.009338012896478176,
0.025150474160909653,
-0.11287767440080643,
-0.06411823630332947,
-0.2572081983089447,
0.41523197293281555,
-0.21132932603359222,
0.21585243940353394,
-0.31124043464660645,
0.024413570761680603,
0.06344623863697052,
0.38985922932624817,
-0.38521429896354675,
0.04193197190761566,
0.21524471044540405,
0.2640494406223297,
-0.12770958244800568,
0.2450367510318756,
-0.00010582234972389415,
0.2027992308139801,
0.2889106571674347,
0.014755532145500183,
-0.20469798147678375,
-0.21708601713180542,
-0.18457183241844177,
0.08647925406694412,
0.13146378099918365,
-0.15293250977993011,
-0.138808473944664,
-0.36393964290618896,
0.1892520785331726,
-0.29191237688064575,
0.1520361453294754,
0.40999355912208557,
0.2307361662387848,
-0.2105073481798172,
0.1512749344110489,
-0.19949181377887726,
-0.17505717277526855,
-0.21572628617286682,
0.03331277519464493,
0.4675024151802063,
0.12119702994823456,
-0.17356689274311066,
-0.2893563210964203,
0.04084701091051102,
0.15395237505435944,
0.11514277011156082,
-0.06688572466373444,
0.06694406270980835,
-0.426123708486557,
-0.036921240389347076,
0.1560400128364563,
0.04550996795296669,
0.43341881036758423,
-0.09273050725460052,
-0.26911792159080505,
0.061333928257226944,
0.05311163514852524,
-0.19074532389640808,
0.551646888256073,
-0.04908920079469681,
-0.13025322556495667,
0.3244178593158722,
-0.3235695958137512,
-0.3093435764312744,
-0.0869356319308281,
0.28176361322402954,
-0.4342292547225952,
0.33106034994125366,
-0.1242704913020134,
0.07960959523916245,
0.3633344769477844,
-0.21327587962150574,
-0.226140558719635,
0.18872526288032532,
-0.007029966451227665,
0.15504895150661469,
-0.29780834913253784,
-0.0502360537648201,
0.0033194227144122124,
-0.4333864152431488,
0.19852569699287415,
0.31007134914398193,
-0.06887152791023254,
0.1679055392742157,
-0.09911074489355087,
0.17609164118766785,
0.3012990951538086,
0.19230511784553528,
0.028323432430624962,
0.28493764996528625,
0.32214295864105225,
0.4649592936038971,
-0.16919046640396118,
-0.018238354474306107,
-0.376968652009964,
-0.09662699699401855,
-0.34326815605163574,
-0.0930204913020134,
-0.14439021050930023,
-0.20853157341480255,
-0.1682833433151245,
0.042738012969493866,
-0.19309324026107788,
-0.09197764098644257,
-0.05073407664895058,
0.2902804911136627,
-0.04722313582897186,
0.037926383316516876,
0.002077921759337187,
0.2508412301540375,
-0.0914168655872345,
0.07274179905653,
-0.19989439845085144,
0.22258862853050232,
-0.20524504780769348,
0.0223167035728693,
0.2563934624195099,
0.04633081704378128,
0.4071342945098877,
-0.534503698348999,
-0.032747890800237656,
0.056320056319236755,
0.20354238152503967,
-0.10059870034456253,
-0.1318853497505188,
0.3106285333633423,
0.21451283991336823,
-0.11870170384645462,
0.08994263410568237,
0.10465501993894577,
0.0022719043772667646,
-0.10174675285816193,
-0.25856927037239075,
-0.1280280351638794,
-0.32921555638313293,
0.2605043649673462,
-0.014877069741487503,
-0.04669227451086044,
-0.22829683125019073,
0.21606864035129547,
-0.4079105257987976,
-0.27197712659835815,
-0.2064862996339798,
0.306972473859787,
-0.005919629707932472,
-0.0015888045309111476,
0.23847907781600952,
0.18968528509140015,
-0.2549572288990021,
0.006134870462119579,
-0.2179446965456009,
-0.229093536734581,
-0.09063392877578735,
0.30334216356277466,
-0.20087745785713196,
0.13015297055244446,
-0.4226956367492676,
0.43842753767967224,
0.7431551218032837,
-0.06648393720388412,
-0.7608040571212769,
0.4116881787776947,
-0.26779744029045105,
-0.20536182820796967,
-0.12456804513931274,
0.012318801134824753,
-0.03207613527774811,
0.1757259964942932,
0.6117702722549438,
0.4520474374294281,
0.10176459699869156,
-0.11083579808473587,
0.06745175272226334,
-0.3609705865383148,
-0.11668600142002106,
0.3062000274658203,
-0.00676747178658843,
0.27887997031211853,
0.3026657700538635,
-0.2808440029621124,
0.17472590506076813,
0.18049192428588867,
-0.2793371379375458,
0.36687952280044556,
-0.18744796514511108,
-0.16550786793231964,
-0.028229208663105965,
0.03165755793452263,
-0.6034233570098877,
0.11657737195491791,
-0.220260351896286,
-0.13285309076309204,
-0.37154972553253174,
0.2353595644235611,
-0.31705644726753235,
-0.07917477190494537,
-0.08626968413591385,
0.128060445189476,
0.2116529941558838,
0.11788538843393326,
0.07798343151807785,
0.22859063744544983,
-0.1779099851846695,
0.16707934439182281,
-0.07312381267547607,
0.15818475186824799,
-0.27789080142974854,
0.14346589148044586,
-0.2446320801973343,
0.038704875856637955,
0.1635790318250656,
-0.13976919651031494,
0.02065703272819519,
-0.33066341280937195,
-0.08064574748277664,
0.29740363359451294,
-0.32260623574256897,
0.2260526865720749,
0.5464051961898804,
0.4359164237976074,
0.10290931165218353,
-0.10764683037996292,
0.011934857815504074,
-0.23127999901771545,
0.0078112040646374226,
-0.0023430015426129103,
-0.07326533645391464,
0.05892645940184593,
0.20820897817611694,
0.21636314690113068,
0.11015342175960541,
0.026352258399128914,
0.5346857309341431,
0.0967731848359108,
0.02425464428961277,
-0.18014098703861237,
0.13188989460468292,
0.676838755607605,
0.023849034681916237,
0.07575313001871109,
-0.17348875105381012,
0.08421601355075836,
0.6387072801589966,
-0.22946231067180634,
0.038957104086875916,
0.11545019596815109,
0.148310586810112,
-0.32938915491104126,
0.2756935656070709,
0.01566207781434059,
0.3024139702320099,
0.12518993020057678,
0.2245805263519287,
0.07016023993492126,
-0.3003760576248169,
-0.25068795680999756,
0.019969364628195763,
0.03715038672089577,
0.12666596472263336,
0.12545384466648102,
0.12142907083034515,
-0.09898027777671814,
-0.1996147483587265,
-0.3614577353000641,
0.1002567857503891,
0.019511856138706207,
0.07464665919542313,
0.26731276512145996,
-0.16937755048274994,
0.01788407936692238,
0.40971875190734863,
-0.23845523595809937,
-0.13663683831691742,
-0.5098510384559631,
0.11063224077224731,
0.04144900292158127,
-0.03773888945579529,
0.2274165004491806,
-0.2515510022640228,
0.11411350965499878,
0.1898224800825119,
-0.20887143909931183,
-0.11549147963523865,
-0.19102813303470612,
-0.217237189412117,
0.18666578829288483,
0.18138429522514343,
-0.075747549533844,
0.12175057828426361,
-0.2790156304836273,
0.09357619285583496,
-0.48752278089523315,
-0.0013206142466515303,
0.21741949021816254,
-0.0031922077760100365,
0.29138633608818054,
0.1493002474308014,
0.24544404447078705,
-0.10176663100719452,
-0.06816636770963669,
0.17932848632335663,
0.05142342671751976,
-0.17380879819393158,
-0.19466988742351532,
-0.05593246594071388,
0.07146091759204865,
0.028387654572725296,
-0.33721670508384705,
0.0034088108222931623,
-0.29725340008735657,
0.2849738597869873,
-0.07976002246141434,
-0.010526314377784729,
-0.14825712144374847,
0.15995335578918457,
0.3381737768650055,
0.319217324256897,
-0.15591081976890564,
-0.42838624119758606,
-0.502850353717804,
0.5249762535095215,
-0.2710711359977722,
-0.13195504248142242,
0.2247796207666397,
0.15216538310050964,
0.23073796927928925,
0.29288095235824585,
-0.3729020655155182,
-0.3825802505016327,
-0.15591326355934143,
0.03457826375961304,
-0.10106640309095383,
-0.3112100660800934,
0.19035010039806366,
-0.21343809366226196,
-0.13516461849212646,
0.05899360030889511,
-0.3082864284515381,
0.2477789968252182,
0.01747468113899231,
0.251151978969574,
0.09770234674215317,
0.5149989128112793,
-0.14808370172977448,
0.42241236567497253,
-0.2293567657470703,
-0.060820259153842926,
0.19667012989521027,
-0.22815831005573273,
0.1598997265100479,
-0.21761636435985565,
-0.010295607149600983,
0.10243381559848785,
0.1297038197517395,
-0.15506209433078766,
0.022726302966475487,
-0.05731120705604553,
-0.15843603014945984,
-0.14378075301647186,
0.39878877997398376,
-0.3807941675186157,
-0.09291519224643707,
-0.13384193181991577,
-0.012926793657243252,
-0.18378086388111115,
0.18075180053710938,
0.10366304218769073,
0.0036695394665002823,
0.12652403116226196,
0.23440654575824738,
0.012272627092897892,
-0.08575862646102905,
0.12631788849830627,
-0.0011809810530394316,
-0.5185654163360596,
-0.3830219805240631,
0.3679753839969635,
-0.024915123358368874,
0.16618147492408752,
-0.29478538036346436,
0.056521058082580566,
0.22865119576454163,
-0.15500704944133759,
0.6204712986946106,
-0.15486882627010345,
-0.056747693568468094,
0.23538509011268616,
0.13126561045646667,
0.15600146353244781,
0.022513145580887794,
0.06542812287807465,
0.20470288395881653,
0.1085164025425911,
0.5451292991638184,
-0.36773958802223206,
-0.07140225172042847,
0.4370552599430084,
-0.18326830863952637,
-0.030691072344779968,
0.0968891978263855,
-0.1827203333377838,
-0.4269365668296814,
-0.35651251673698425,
-0.17398129403591156,
0.11321379989385605,
0.2269095927476883,
0.1511366218328476,
-0.2574782073497772,
0.09870234876871109,
-0.26262885332107544,
-0.2366410195827484,
0.2381361722946167,
0.2373732626438141,
-0.055392712354660034,
-0.2783142328262329,
0.5237162113189697,
-0.02715243585407734,
-0.010363006964325905,
0.807910680770874,
0.27849265933036804,
-0.10211309045553207,
0.6285175681114197,
0.008453285321593285,
-0.04758353531360626,
0.16611900925636292,
-0.0704110637307167,
-0.38510239124298096,
-0.024027753621339798,
0.18075628578662872,
-0.025475524365901947,
0.46139612793922424,
0.29711541533470154,
-0.0917205810546875,
-0.14560259878635406,
-0.24342899024486542,
0.439166784286499,
-0.1468835324048996,
0.041475843638181686,
0.5342013239860535,
-0.15308794379234314,
-0.01785619556903839,
-0.03136768937110901,
0.047069888561964035,
0.5510367155075073,
-0.33940622210502625,
0.019015679135918617,
0.208194762468338,
-0.11741788685321808,
0.06302691251039505,
-0.5523282885551453,
0.19082999229431152,
-0.15775297582149506,
0.010488961823284626,
-0.05542192608118057,
0.023067593574523926,
0.04357960820198059,
0.37941980361938477,
0.1036456748843193,
0.34369760751724243,
0.14335179328918457,
-0.2005494385957718,
0.2185148298740387,
0.15553097426891327,
-0.053079329431056976,
-0.030495142564177513,
-0.31939226388931274,
0.18134109675884247,
0.12568500638008118,
0.13737420737743378,
-0.009074695408344269,
-0.05791393294930458,
-0.027593187987804413,
-0.16235989332199097,
-0.22708266973495483,
0.18981973826885223,
-0.40796053409576416,
0.33191898465156555,
0.03310161828994751,
0.09679191559553146,
-0.32426175475120544,
0.19750602543354034,
-0.14866921305656433,
0.12587115168571472,
-0.25308603048324585,
0.3592415153980255,
-0.11855270713567734,
-0.24664342403411865,
-0.17753928899765015,
0.16174131631851196,
0.137418732047081,
-0.09505996853113174,
-0.0002680663310457021,
0.28328052163124084,
-0.17444325983524323,
-0.43447059392929077,
-0.04302556812763214,
-0.04307267442345619,
0.13969530165195465,
0.031086141243577003,
0.05152783542871475,
-0.22133173048496246,
-0.24898280203342438,
-0.02487383410334587,
0.13893243670463562,
0.004874636419117451,
0.2184428721666336,
-0.34408631920814514,
0.16299940645694733,
-0.236477792263031,
-0.13143308460712433,
0.426723450422287,
-0.20218591392040253,
-0.3516027629375458,
0.3713058829307556,
0.08582697063684464,
-0.07851260900497437,
-0.3042430877685547,
-0.4113732576370239,
0.15883754193782806,
-0.01501505821943283,
0.06739047914743423,
0.0709080845117569,
-0.3147270381450653,
0.00740458257496357,
0.19118386507034302,
0.027283716946840286,
-0.18317943811416626,
-0.021652784198522568,
-0.33460733294487,
-0.3057222068309784,
0.25815925002098083,
-0.3365698754787445,
0.14082524180412292,
0.1868238002061844,
-0.30968397855758667,
0.19078895449638367,
-0.4118914008140564,
-0.33503586053848267,
0.08064363896846771,
-0.5897402763366699,
-0.34977930784225464,
-0.233623206615448,
-0.15580619871616364,
0.4625265598297119,
0.27152755856513977,
0.25567033886909485,
-0.06535517424345016,
-0.2769436240196228,
-0.21649110317230225,
0.2106546312570572,
0.03702164441347122,
0.027314577251672745,
-0.15244241058826447,
0.15790733695030212,
0.003476259298622608,
-0.2990369200706482,
0.039350900799036026,
0.15326352417469025,
-0.07978177070617676,
0.195159450173378,
-0.3212992250919342,
0.3001424968242645,
-0.1511884182691574,
-0.0417168065905571,
-0.08379153162240982,
0.10342752188444138,
0.2662908434867859,
-0.0003981457557529211,
-0.004140944220125675,
-0.12785257399082184,
-0.060949236154556274,
0.013340831734240055,
0.10338680446147919,
0.022980429232120514,
0.16056185960769653,
0.40110623836517334,
-0.24747416377067566,
-0.00014644993643742055,
0.21741551160812378,
0.1992824524641037,
0.2981013059616089,
-0.4346033036708832,
-0.20912395417690277,
-0.014158982783555984,
0.28776973485946655,
-0.09632319211959839,
-0.12982448935508728,
-0.06671754270792007,
-0.1557190865278244,
-0.0162836741656065,
-0.03083190880715847,
0.11289370805025101,
-0.056896645575761795,
0.2939252257347107,
0.06563767045736313,
0.26442134380340576,
-0.0053684595040977,
0.07789269834756851,
-0.10964162647724152,
-0.12322214990854263,
0.037682175636291504,
0.2779679596424103,
0.10411214828491211,
0.326302170753479,
0.2975761294364929,
-0.009710865095257759,
-0.10238891839981079,
-0.09439511597156525,
0.4178067445755005,
-0.2557057738304138,
-0.49675947427749634,
0.07643810659646988,
0.4155076742172241,
-0.24416202306747437,
0.28733953833580017,
-0.08572540432214737,
0.09097909927368164,
-0.35086068511009216,
0.1789897382259369,
-0.3316971957683563,
0.030975401401519775,
-0.03446125611662865,
-0.06932900846004486,
0.0742434486746788,
-0.1156960129737854,
-0.16808421909809113,
0.14244472980499268,
-0.010165792889893055,
0.027678053826093674,
0.018225187435746193,
-0.2230435609817505,
-0.1437058448791504,
-0.07101815193891525,
0.27359071373939514,
-0.13209529221057892,
0.10137418657541275,
-0.1250993311405182,
0.4108729660511017,
-0.14280590415000916,
-0.06365901976823807,
0.38094088435173035,
0.22090135514736176,
0.12906956672668457,
0.021976744756102562,
-0.0029659769497811794,
0.030637919902801514,
-0.16526064276695251,
-0.19391685724258423,
-0.12639370560646057,
0.32333436608314514,
0.3226048946380615,
-0.3285636603832245,
0.363103985786438,
0.24002061784267426,
-0.19653227925300598,
0.26426151394844055,
0.08626917004585266,
0.418176531791687,
0.17871765792369843,
-0.015060428529977798,
-0.22605852782726288,
0.09349172562360764,
-0.3113801181316376,
-0.10890481621026993,
-0.5400241613388062,
-0.3593544363975525,
-0.28587743639945984,
-0.404820054769516,
0.08445055782794952,
-0.10974704474210739,
0.13666802644729614,
0.038808926939964294,
0.4288270175457001,
0.414849191904068,
-0.007404495496302843,
0.062010083347558975,
-0.344251811504364,
-0.33464962244033813,
0.205423966050148,
0.18493571877479553,
0.1545531451702118,
0.13360565900802612,
0.3543210029602051,
-0.11048880219459534,
0.032439082860946655,
0.14997100830078125,
0.3291165232658386,
-0.2717333137989044,
0.014666428789496422,
-0.3850998878479004,
-0.1955573707818985,
0.08477403968572617,
0.12554024159908295,
-0.13098493218421936,
-0.10809203237295151,
0.18082058429718018,
-0.22841975092887878,
0.06403255462646484,
0.10623224079608917,
0.018657777458429337,
-0.08574409782886505,
-0.10249719768762589,
0.4515937268733978,
-0.000875625410117209,
0.1554407924413681,
0.031898632645606995,
-0.09653107821941376,
-0.263557106256485,
-0.24497005343437195,
0.01697341911494732,
-0.1624910980463028,
0.036989640444517136,
0.24863216280937195,
0.0441599115729332,
0.4317739009857178,
-0.03476347774267197,
-0.11773703247308731,
-0.053242336958646774,
0.07220320403575897,
-0.09130161255598068,
0.1049099713563919,
0.13069212436676025,
0.11441123485565186,
0.04419667646288872,
0.20640712976455688,
0.21367134153842926,
-0.03549961373209953,
-0.03623148798942566,
-0.11144905537366867,
0.2867627739906311,
0.21304795145988464,
-0.1770394742488861,
0.20983129739761353,
-0.044031500816345215,
0.08559572696685791,
0.003280235454440117,
-0.25297051668167114,
0.22819888591766357,
0.27487510442733765,
0.0562671534717083,
-0.05746147036552429,
0.13113361597061157,
-0.044064540416002274,
-0.05366525799036026,
-0.19697816669940948,
0.039453860372304916,
-0.03349090367555618,
-0.10016147792339325,
-0.018448127433657646,
0.031663935631513596
] |
https://github.com/huggingface/datasets/issues/2212
|
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
I've contacted Martin (first author of the fquad paper) regarding a possible new url. Hopefully we can get one soon !
|
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
| 21 |
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
[
-0.4642374515533447,
0.43511566519737244,
-0.20049060881137848,
-0.017762718722224236,
0.32672369480133057,
0.12850016355514526,
0.3063697814941406,
0.17314910888671875,
0.25220736861228943,
0.22710326313972473,
-0.17721663415431976,
-0.08033333718776703,
0.3741396367549896,
0.20074231922626495,
-0.005389299243688583,
0.18888439238071442,
-0.009338012896478176,
0.025150474160909653,
-0.11287767440080643,
-0.06411823630332947,
-0.2572081983089447,
0.41523197293281555,
-0.21132932603359222,
0.21585243940353394,
-0.31124043464660645,
0.024413570761680603,
0.06344623863697052,
0.38985922932624817,
-0.38521429896354675,
0.04193197190761566,
0.21524471044540405,
0.2640494406223297,
-0.12770958244800568,
0.2450367510318756,
-0.00010582234972389415,
0.2027992308139801,
0.2889106571674347,
0.014755532145500183,
-0.20469798147678375,
-0.21708601713180542,
-0.18457183241844177,
0.08647925406694412,
0.13146378099918365,
-0.15293250977993011,
-0.138808473944664,
-0.36393964290618896,
0.1892520785331726,
-0.29191237688064575,
0.1520361453294754,
0.40999355912208557,
0.2307361662387848,
-0.2105073481798172,
0.1512749344110489,
-0.19949181377887726,
-0.17505717277526855,
-0.21572628617286682,
0.03331277519464493,
0.4675024151802063,
0.12119702994823456,
-0.17356689274311066,
-0.2893563210964203,
0.04084701091051102,
0.15395237505435944,
0.11514277011156082,
-0.06688572466373444,
0.06694406270980835,
-0.426123708486557,
-0.036921240389347076,
0.1560400128364563,
0.04550996795296669,
0.43341881036758423,
-0.09273050725460052,
-0.26911792159080505,
0.061333928257226944,
0.05311163514852524,
-0.19074532389640808,
0.551646888256073,
-0.04908920079469681,
-0.13025322556495667,
0.3244178593158722,
-0.3235695958137512,
-0.3093435764312744,
-0.0869356319308281,
0.28176361322402954,
-0.4342292547225952,
0.33106034994125366,
-0.1242704913020134,
0.07960959523916245,
0.3633344769477844,
-0.21327587962150574,
-0.226140558719635,
0.18872526288032532,
-0.007029966451227665,
0.15504895150661469,
-0.29780834913253784,
-0.0502360537648201,
0.0033194227144122124,
-0.4333864152431488,
0.19852569699287415,
0.31007134914398193,
-0.06887152791023254,
0.1679055392742157,
-0.09911074489355087,
0.17609164118766785,
0.3012990951538086,
0.19230511784553528,
0.028323432430624962,
0.28493764996528625,
0.32214295864105225,
0.4649592936038971,
-0.16919046640396118,
-0.018238354474306107,
-0.376968652009964,
-0.09662699699401855,
-0.34326815605163574,
-0.0930204913020134,
-0.14439021050930023,
-0.20853157341480255,
-0.1682833433151245,
0.042738012969493866,
-0.19309324026107788,
-0.09197764098644257,
-0.05073407664895058,
0.2902804911136627,
-0.04722313582897186,
0.037926383316516876,
0.002077921759337187,
0.2508412301540375,
-0.0914168655872345,
0.07274179905653,
-0.19989439845085144,
0.22258862853050232,
-0.20524504780769348,
0.0223167035728693,
0.2563934624195099,
0.04633081704378128,
0.4071342945098877,
-0.534503698348999,
-0.032747890800237656,
0.056320056319236755,
0.20354238152503967,
-0.10059870034456253,
-0.1318853497505188,
0.3106285333633423,
0.21451283991336823,
-0.11870170384645462,
0.08994263410568237,
0.10465501993894577,
0.0022719043772667646,
-0.10174675285816193,
-0.25856927037239075,
-0.1280280351638794,
-0.32921555638313293,
0.2605043649673462,
-0.014877069741487503,
-0.04669227451086044,
-0.22829683125019073,
0.21606864035129547,
-0.4079105257987976,
-0.27197712659835815,
-0.2064862996339798,
0.306972473859787,
-0.005919629707932472,
-0.0015888045309111476,
0.23847907781600952,
0.18968528509140015,
-0.2549572288990021,
0.006134870462119579,
-0.2179446965456009,
-0.229093536734581,
-0.09063392877578735,
0.30334216356277466,
-0.20087745785713196,
0.13015297055244446,
-0.4226956367492676,
0.43842753767967224,
0.7431551218032837,
-0.06648393720388412,
-0.7608040571212769,
0.4116881787776947,
-0.26779744029045105,
-0.20536182820796967,
-0.12456804513931274,
0.012318801134824753,
-0.03207613527774811,
0.1757259964942932,
0.6117702722549438,
0.4520474374294281,
0.10176459699869156,
-0.11083579808473587,
0.06745175272226334,
-0.3609705865383148,
-0.11668600142002106,
0.3062000274658203,
-0.00676747178658843,
0.27887997031211853,
0.3026657700538635,
-0.2808440029621124,
0.17472590506076813,
0.18049192428588867,
-0.2793371379375458,
0.36687952280044556,
-0.18744796514511108,
-0.16550786793231964,
-0.028229208663105965,
0.03165755793452263,
-0.6034233570098877,
0.11657737195491791,
-0.220260351896286,
-0.13285309076309204,
-0.37154972553253174,
0.2353595644235611,
-0.31705644726753235,
-0.07917477190494537,
-0.08626968413591385,
0.128060445189476,
0.2116529941558838,
0.11788538843393326,
0.07798343151807785,
0.22859063744544983,
-0.1779099851846695,
0.16707934439182281,
-0.07312381267547607,
0.15818475186824799,
-0.27789080142974854,
0.14346589148044586,
-0.2446320801973343,
0.038704875856637955,
0.1635790318250656,
-0.13976919651031494,
0.02065703272819519,
-0.33066341280937195,
-0.08064574748277664,
0.29740363359451294,
-0.32260623574256897,
0.2260526865720749,
0.5464051961898804,
0.4359164237976074,
0.10290931165218353,
-0.10764683037996292,
0.011934857815504074,
-0.23127999901771545,
0.0078112040646374226,
-0.0023430015426129103,
-0.07326533645391464,
0.05892645940184593,
0.20820897817611694,
0.21636314690113068,
0.11015342175960541,
0.026352258399128914,
0.5346857309341431,
0.0967731848359108,
0.02425464428961277,
-0.18014098703861237,
0.13188989460468292,
0.676838755607605,
0.023849034681916237,
0.07575313001871109,
-0.17348875105381012,
0.08421601355075836,
0.6387072801589966,
-0.22946231067180634,
0.038957104086875916,
0.11545019596815109,
0.148310586810112,
-0.32938915491104126,
0.2756935656070709,
0.01566207781434059,
0.3024139702320099,
0.12518993020057678,
0.2245805263519287,
0.07016023993492126,
-0.3003760576248169,
-0.25068795680999756,
0.019969364628195763,
0.03715038672089577,
0.12666596472263336,
0.12545384466648102,
0.12142907083034515,
-0.09898027777671814,
-0.1996147483587265,
-0.3614577353000641,
0.1002567857503891,
0.019511856138706207,
0.07464665919542313,
0.26731276512145996,
-0.16937755048274994,
0.01788407936692238,
0.40971875190734863,
-0.23845523595809937,
-0.13663683831691742,
-0.5098510384559631,
0.11063224077224731,
0.04144900292158127,
-0.03773888945579529,
0.2274165004491806,
-0.2515510022640228,
0.11411350965499878,
0.1898224800825119,
-0.20887143909931183,
-0.11549147963523865,
-0.19102813303470612,
-0.217237189412117,
0.18666578829288483,
0.18138429522514343,
-0.075747549533844,
0.12175057828426361,
-0.2790156304836273,
0.09357619285583496,
-0.48752278089523315,
-0.0013206142466515303,
0.21741949021816254,
-0.0031922077760100365,
0.29138633608818054,
0.1493002474308014,
0.24544404447078705,
-0.10176663100719452,
-0.06816636770963669,
0.17932848632335663,
0.05142342671751976,
-0.17380879819393158,
-0.19466988742351532,
-0.05593246594071388,
0.07146091759204865,
0.028387654572725296,
-0.33721670508384705,
0.0034088108222931623,
-0.29725340008735657,
0.2849738597869873,
-0.07976002246141434,
-0.010526314377784729,
-0.14825712144374847,
0.15995335578918457,
0.3381737768650055,
0.319217324256897,
-0.15591081976890564,
-0.42838624119758606,
-0.502850353717804,
0.5249762535095215,
-0.2710711359977722,
-0.13195504248142242,
0.2247796207666397,
0.15216538310050964,
0.23073796927928925,
0.29288095235824585,
-0.3729020655155182,
-0.3825802505016327,
-0.15591326355934143,
0.03457826375961304,
-0.10106640309095383,
-0.3112100660800934,
0.19035010039806366,
-0.21343809366226196,
-0.13516461849212646,
0.05899360030889511,
-0.3082864284515381,
0.2477789968252182,
0.01747468113899231,
0.251151978969574,
0.09770234674215317,
0.5149989128112793,
-0.14808370172977448,
0.42241236567497253,
-0.2293567657470703,
-0.060820259153842926,
0.19667012989521027,
-0.22815831005573273,
0.1598997265100479,
-0.21761636435985565,
-0.010295607149600983,
0.10243381559848785,
0.1297038197517395,
-0.15506209433078766,
0.022726302966475487,
-0.05731120705604553,
-0.15843603014945984,
-0.14378075301647186,
0.39878877997398376,
-0.3807941675186157,
-0.09291519224643707,
-0.13384193181991577,
-0.012926793657243252,
-0.18378086388111115,
0.18075180053710938,
0.10366304218769073,
0.0036695394665002823,
0.12652403116226196,
0.23440654575824738,
0.012272627092897892,
-0.08575862646102905,
0.12631788849830627,
-0.0011809810530394316,
-0.5185654163360596,
-0.3830219805240631,
0.3679753839969635,
-0.024915123358368874,
0.16618147492408752,
-0.29478538036346436,
0.056521058082580566,
0.22865119576454163,
-0.15500704944133759,
0.6204712986946106,
-0.15486882627010345,
-0.056747693568468094,
0.23538509011268616,
0.13126561045646667,
0.15600146353244781,
0.022513145580887794,
0.06542812287807465,
0.20470288395881653,
0.1085164025425911,
0.5451292991638184,
-0.36773958802223206,
-0.07140225172042847,
0.4370552599430084,
-0.18326830863952637,
-0.030691072344779968,
0.0968891978263855,
-0.1827203333377838,
-0.4269365668296814,
-0.35651251673698425,
-0.17398129403591156,
0.11321379989385605,
0.2269095927476883,
0.1511366218328476,
-0.2574782073497772,
0.09870234876871109,
-0.26262885332107544,
-0.2366410195827484,
0.2381361722946167,
0.2373732626438141,
-0.055392712354660034,
-0.2783142328262329,
0.5237162113189697,
-0.02715243585407734,
-0.010363006964325905,
0.807910680770874,
0.27849265933036804,
-0.10211309045553207,
0.6285175681114197,
0.008453285321593285,
-0.04758353531360626,
0.16611900925636292,
-0.0704110637307167,
-0.38510239124298096,
-0.024027753621339798,
0.18075628578662872,
-0.025475524365901947,
0.46139612793922424,
0.29711541533470154,
-0.0917205810546875,
-0.14560259878635406,
-0.24342899024486542,
0.439166784286499,
-0.1468835324048996,
0.041475843638181686,
0.5342013239860535,
-0.15308794379234314,
-0.01785619556903839,
-0.03136768937110901,
0.047069888561964035,
0.5510367155075073,
-0.33940622210502625,
0.019015679135918617,
0.208194762468338,
-0.11741788685321808,
0.06302691251039505,
-0.5523282885551453,
0.19082999229431152,
-0.15775297582149506,
0.010488961823284626,
-0.05542192608118057,
0.023067593574523926,
0.04357960820198059,
0.37941980361938477,
0.1036456748843193,
0.34369760751724243,
0.14335179328918457,
-0.2005494385957718,
0.2185148298740387,
0.15553097426891327,
-0.053079329431056976,
-0.030495142564177513,
-0.31939226388931274,
0.18134109675884247,
0.12568500638008118,
0.13737420737743378,
-0.009074695408344269,
-0.05791393294930458,
-0.027593187987804413,
-0.16235989332199097,
-0.22708266973495483,
0.18981973826885223,
-0.40796053409576416,
0.33191898465156555,
0.03310161828994751,
0.09679191559553146,
-0.32426175475120544,
0.19750602543354034,
-0.14866921305656433,
0.12587115168571472,
-0.25308603048324585,
0.3592415153980255,
-0.11855270713567734,
-0.24664342403411865,
-0.17753928899765015,
0.16174131631851196,
0.137418732047081,
-0.09505996853113174,
-0.0002680663310457021,
0.28328052163124084,
-0.17444325983524323,
-0.43447059392929077,
-0.04302556812763214,
-0.04307267442345619,
0.13969530165195465,
0.031086141243577003,
0.05152783542871475,
-0.22133173048496246,
-0.24898280203342438,
-0.02487383410334587,
0.13893243670463562,
0.004874636419117451,
0.2184428721666336,
-0.34408631920814514,
0.16299940645694733,
-0.236477792263031,
-0.13143308460712433,
0.426723450422287,
-0.20218591392040253,
-0.3516027629375458,
0.3713058829307556,
0.08582697063684464,
-0.07851260900497437,
-0.3042430877685547,
-0.4113732576370239,
0.15883754193782806,
-0.01501505821943283,
0.06739047914743423,
0.0709080845117569,
-0.3147270381450653,
0.00740458257496357,
0.19118386507034302,
0.027283716946840286,
-0.18317943811416626,
-0.021652784198522568,
-0.33460733294487,
-0.3057222068309784,
0.25815925002098083,
-0.3365698754787445,
0.14082524180412292,
0.1868238002061844,
-0.30968397855758667,
0.19078895449638367,
-0.4118914008140564,
-0.33503586053848267,
0.08064363896846771,
-0.5897402763366699,
-0.34977930784225464,
-0.233623206615448,
-0.15580619871616364,
0.4625265598297119,
0.27152755856513977,
0.25567033886909485,
-0.06535517424345016,
-0.2769436240196228,
-0.21649110317230225,
0.2106546312570572,
0.03702164441347122,
0.027314577251672745,
-0.15244241058826447,
0.15790733695030212,
0.003476259298622608,
-0.2990369200706482,
0.039350900799036026,
0.15326352417469025,
-0.07978177070617676,
0.195159450173378,
-0.3212992250919342,
0.3001424968242645,
-0.1511884182691574,
-0.0417168065905571,
-0.08379153162240982,
0.10342752188444138,
0.2662908434867859,
-0.0003981457557529211,
-0.004140944220125675,
-0.12785257399082184,
-0.060949236154556274,
0.013340831734240055,
0.10338680446147919,
0.022980429232120514,
0.16056185960769653,
0.40110623836517334,
-0.24747416377067566,
-0.00014644993643742055,
0.21741551160812378,
0.1992824524641037,
0.2981013059616089,
-0.4346033036708832,
-0.20912395417690277,
-0.014158982783555984,
0.28776973485946655,
-0.09632319211959839,
-0.12982448935508728,
-0.06671754270792007,
-0.1557190865278244,
-0.0162836741656065,
-0.03083190880715847,
0.11289370805025101,
-0.056896645575761795,
0.2939252257347107,
0.06563767045736313,
0.26442134380340576,
-0.0053684595040977,
0.07789269834756851,
-0.10964162647724152,
-0.12322214990854263,
0.037682175636291504,
0.2779679596424103,
0.10411214828491211,
0.326302170753479,
0.2975761294364929,
-0.009710865095257759,
-0.10238891839981079,
-0.09439511597156525,
0.4178067445755005,
-0.2557057738304138,
-0.49675947427749634,
0.07643810659646988,
0.4155076742172241,
-0.24416202306747437,
0.28733953833580017,
-0.08572540432214737,
0.09097909927368164,
-0.35086068511009216,
0.1789897382259369,
-0.3316971957683563,
0.030975401401519775,
-0.03446125611662865,
-0.06932900846004486,
0.0742434486746788,
-0.1156960129737854,
-0.16808421909809113,
0.14244472980499268,
-0.010165792889893055,
0.027678053826093674,
0.018225187435746193,
-0.2230435609817505,
-0.1437058448791504,
-0.07101815193891525,
0.27359071373939514,
-0.13209529221057892,
0.10137418657541275,
-0.1250993311405182,
0.4108729660511017,
-0.14280590415000916,
-0.06365901976823807,
0.38094088435173035,
0.22090135514736176,
0.12906956672668457,
0.021976744756102562,
-0.0029659769497811794,
0.030637919902801514,
-0.16526064276695251,
-0.19391685724258423,
-0.12639370560646057,
0.32333436608314514,
0.3226048946380615,
-0.3285636603832245,
0.363103985786438,
0.24002061784267426,
-0.19653227925300598,
0.26426151394844055,
0.08626917004585266,
0.418176531791687,
0.17871765792369843,
-0.015060428529977798,
-0.22605852782726288,
0.09349172562360764,
-0.3113801181316376,
-0.10890481621026993,
-0.5400241613388062,
-0.3593544363975525,
-0.28587743639945984,
-0.404820054769516,
0.08445055782794952,
-0.10974704474210739,
0.13666802644729614,
0.038808926939964294,
0.4288270175457001,
0.414849191904068,
-0.007404495496302843,
0.062010083347558975,
-0.344251811504364,
-0.33464962244033813,
0.205423966050148,
0.18493571877479553,
0.1545531451702118,
0.13360565900802612,
0.3543210029602051,
-0.11048880219459534,
0.032439082860946655,
0.14997100830078125,
0.3291165232658386,
-0.2717333137989044,
0.014666428789496422,
-0.3850998878479004,
-0.1955573707818985,
0.08477403968572617,
0.12554024159908295,
-0.13098493218421936,
-0.10809203237295151,
0.18082058429718018,
-0.22841975092887878,
0.06403255462646484,
0.10623224079608917,
0.018657777458429337,
-0.08574409782886505,
-0.10249719768762589,
0.4515937268733978,
-0.000875625410117209,
0.1554407924413681,
0.031898632645606995,
-0.09653107821941376,
-0.263557106256485,
-0.24497005343437195,
0.01697341911494732,
-0.1624910980463028,
0.036989640444517136,
0.24863216280937195,
0.0441599115729332,
0.4317739009857178,
-0.03476347774267197,
-0.11773703247308731,
-0.053242336958646774,
0.07220320403575897,
-0.09130161255598068,
0.1049099713563919,
0.13069212436676025,
0.11441123485565186,
0.04419667646288872,
0.20640712976455688,
0.21367134153842926,
-0.03549961373209953,
-0.03623148798942566,
-0.11144905537366867,
0.2867627739906311,
0.21304795145988464,
-0.1770394742488861,
0.20983129739761353,
-0.044031500816345215,
0.08559572696685791,
0.003280235454440117,
-0.25297051668167114,
0.22819888591766357,
0.27487510442733765,
0.0562671534717083,
-0.05746147036552429,
0.13113361597061157,
-0.044064540416002274,
-0.05366525799036026,
-0.19697816669940948,
0.039453860372304916,
-0.03349090367555618,
-0.10016147792339325,
-0.018448127433657646,
0.031663935631513596
] |
https://github.com/huggingface/datasets/issues/2212
|
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
They now made a website to force people who want to use the dataset for commercial purposes to seek a commercial license from them ...
|
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
| 25 |
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
[
-0.4642374515533447,
0.43511566519737244,
-0.20049060881137848,
-0.017762718722224236,
0.32672369480133057,
0.12850016355514526,
0.3063697814941406,
0.17314910888671875,
0.25220736861228943,
0.22710326313972473,
-0.17721663415431976,
-0.08033333718776703,
0.3741396367549896,
0.20074231922626495,
-0.005389299243688583,
0.18888439238071442,
-0.009338012896478176,
0.025150474160909653,
-0.11287767440080643,
-0.06411823630332947,
-0.2572081983089447,
0.41523197293281555,
-0.21132932603359222,
0.21585243940353394,
-0.31124043464660645,
0.024413570761680603,
0.06344623863697052,
0.38985922932624817,
-0.38521429896354675,
0.04193197190761566,
0.21524471044540405,
0.2640494406223297,
-0.12770958244800568,
0.2450367510318756,
-0.00010582234972389415,
0.2027992308139801,
0.2889106571674347,
0.014755532145500183,
-0.20469798147678375,
-0.21708601713180542,
-0.18457183241844177,
0.08647925406694412,
0.13146378099918365,
-0.15293250977993011,
-0.138808473944664,
-0.36393964290618896,
0.1892520785331726,
-0.29191237688064575,
0.1520361453294754,
0.40999355912208557,
0.2307361662387848,
-0.2105073481798172,
0.1512749344110489,
-0.19949181377887726,
-0.17505717277526855,
-0.21572628617286682,
0.03331277519464493,
0.4675024151802063,
0.12119702994823456,
-0.17356689274311066,
-0.2893563210964203,
0.04084701091051102,
0.15395237505435944,
0.11514277011156082,
-0.06688572466373444,
0.06694406270980835,
-0.426123708486557,
-0.036921240389347076,
0.1560400128364563,
0.04550996795296669,
0.43341881036758423,
-0.09273050725460052,
-0.26911792159080505,
0.061333928257226944,
0.05311163514852524,
-0.19074532389640808,
0.551646888256073,
-0.04908920079469681,
-0.13025322556495667,
0.3244178593158722,
-0.3235695958137512,
-0.3093435764312744,
-0.0869356319308281,
0.28176361322402954,
-0.4342292547225952,
0.33106034994125366,
-0.1242704913020134,
0.07960959523916245,
0.3633344769477844,
-0.21327587962150574,
-0.226140558719635,
0.18872526288032532,
-0.007029966451227665,
0.15504895150661469,
-0.29780834913253784,
-0.0502360537648201,
0.0033194227144122124,
-0.4333864152431488,
0.19852569699287415,
0.31007134914398193,
-0.06887152791023254,
0.1679055392742157,
-0.09911074489355087,
0.17609164118766785,
0.3012990951538086,
0.19230511784553528,
0.028323432430624962,
0.28493764996528625,
0.32214295864105225,
0.4649592936038971,
-0.16919046640396118,
-0.018238354474306107,
-0.376968652009964,
-0.09662699699401855,
-0.34326815605163574,
-0.0930204913020134,
-0.14439021050930023,
-0.20853157341480255,
-0.1682833433151245,
0.042738012969493866,
-0.19309324026107788,
-0.09197764098644257,
-0.05073407664895058,
0.2902804911136627,
-0.04722313582897186,
0.037926383316516876,
0.002077921759337187,
0.2508412301540375,
-0.0914168655872345,
0.07274179905653,
-0.19989439845085144,
0.22258862853050232,
-0.20524504780769348,
0.0223167035728693,
0.2563934624195099,
0.04633081704378128,
0.4071342945098877,
-0.534503698348999,
-0.032747890800237656,
0.056320056319236755,
0.20354238152503967,
-0.10059870034456253,
-0.1318853497505188,
0.3106285333633423,
0.21451283991336823,
-0.11870170384645462,
0.08994263410568237,
0.10465501993894577,
0.0022719043772667646,
-0.10174675285816193,
-0.25856927037239075,
-0.1280280351638794,
-0.32921555638313293,
0.2605043649673462,
-0.014877069741487503,
-0.04669227451086044,
-0.22829683125019073,
0.21606864035129547,
-0.4079105257987976,
-0.27197712659835815,
-0.2064862996339798,
0.306972473859787,
-0.005919629707932472,
-0.0015888045309111476,
0.23847907781600952,
0.18968528509140015,
-0.2549572288990021,
0.006134870462119579,
-0.2179446965456009,
-0.229093536734581,
-0.09063392877578735,
0.30334216356277466,
-0.20087745785713196,
0.13015297055244446,
-0.4226956367492676,
0.43842753767967224,
0.7431551218032837,
-0.06648393720388412,
-0.7608040571212769,
0.4116881787776947,
-0.26779744029045105,
-0.20536182820796967,
-0.12456804513931274,
0.012318801134824753,
-0.03207613527774811,
0.1757259964942932,
0.6117702722549438,
0.4520474374294281,
0.10176459699869156,
-0.11083579808473587,
0.06745175272226334,
-0.3609705865383148,
-0.11668600142002106,
0.3062000274658203,
-0.00676747178658843,
0.27887997031211853,
0.3026657700538635,
-0.2808440029621124,
0.17472590506076813,
0.18049192428588867,
-0.2793371379375458,
0.36687952280044556,
-0.18744796514511108,
-0.16550786793231964,
-0.028229208663105965,
0.03165755793452263,
-0.6034233570098877,
0.11657737195491791,
-0.220260351896286,
-0.13285309076309204,
-0.37154972553253174,
0.2353595644235611,
-0.31705644726753235,
-0.07917477190494537,
-0.08626968413591385,
0.128060445189476,
0.2116529941558838,
0.11788538843393326,
0.07798343151807785,
0.22859063744544983,
-0.1779099851846695,
0.16707934439182281,
-0.07312381267547607,
0.15818475186824799,
-0.27789080142974854,
0.14346589148044586,
-0.2446320801973343,
0.038704875856637955,
0.1635790318250656,
-0.13976919651031494,
0.02065703272819519,
-0.33066341280937195,
-0.08064574748277664,
0.29740363359451294,
-0.32260623574256897,
0.2260526865720749,
0.5464051961898804,
0.4359164237976074,
0.10290931165218353,
-0.10764683037996292,
0.011934857815504074,
-0.23127999901771545,
0.0078112040646374226,
-0.0023430015426129103,
-0.07326533645391464,
0.05892645940184593,
0.20820897817611694,
0.21636314690113068,
0.11015342175960541,
0.026352258399128914,
0.5346857309341431,
0.0967731848359108,
0.02425464428961277,
-0.18014098703861237,
0.13188989460468292,
0.676838755607605,
0.023849034681916237,
0.07575313001871109,
-0.17348875105381012,
0.08421601355075836,
0.6387072801589966,
-0.22946231067180634,
0.038957104086875916,
0.11545019596815109,
0.148310586810112,
-0.32938915491104126,
0.2756935656070709,
0.01566207781434059,
0.3024139702320099,
0.12518993020057678,
0.2245805263519287,
0.07016023993492126,
-0.3003760576248169,
-0.25068795680999756,
0.019969364628195763,
0.03715038672089577,
0.12666596472263336,
0.12545384466648102,
0.12142907083034515,
-0.09898027777671814,
-0.1996147483587265,
-0.3614577353000641,
0.1002567857503891,
0.019511856138706207,
0.07464665919542313,
0.26731276512145996,
-0.16937755048274994,
0.01788407936692238,
0.40971875190734863,
-0.23845523595809937,
-0.13663683831691742,
-0.5098510384559631,
0.11063224077224731,
0.04144900292158127,
-0.03773888945579529,
0.2274165004491806,
-0.2515510022640228,
0.11411350965499878,
0.1898224800825119,
-0.20887143909931183,
-0.11549147963523865,
-0.19102813303470612,
-0.217237189412117,
0.18666578829288483,
0.18138429522514343,
-0.075747549533844,
0.12175057828426361,
-0.2790156304836273,
0.09357619285583496,
-0.48752278089523315,
-0.0013206142466515303,
0.21741949021816254,
-0.0031922077760100365,
0.29138633608818054,
0.1493002474308014,
0.24544404447078705,
-0.10176663100719452,
-0.06816636770963669,
0.17932848632335663,
0.05142342671751976,
-0.17380879819393158,
-0.19466988742351532,
-0.05593246594071388,
0.07146091759204865,
0.028387654572725296,
-0.33721670508384705,
0.0034088108222931623,
-0.29725340008735657,
0.2849738597869873,
-0.07976002246141434,
-0.010526314377784729,
-0.14825712144374847,
0.15995335578918457,
0.3381737768650055,
0.319217324256897,
-0.15591081976890564,
-0.42838624119758606,
-0.502850353717804,
0.5249762535095215,
-0.2710711359977722,
-0.13195504248142242,
0.2247796207666397,
0.15216538310050964,
0.23073796927928925,
0.29288095235824585,
-0.3729020655155182,
-0.3825802505016327,
-0.15591326355934143,
0.03457826375961304,
-0.10106640309095383,
-0.3112100660800934,
0.19035010039806366,
-0.21343809366226196,
-0.13516461849212646,
0.05899360030889511,
-0.3082864284515381,
0.2477789968252182,
0.01747468113899231,
0.251151978969574,
0.09770234674215317,
0.5149989128112793,
-0.14808370172977448,
0.42241236567497253,
-0.2293567657470703,
-0.060820259153842926,
0.19667012989521027,
-0.22815831005573273,
0.1598997265100479,
-0.21761636435985565,
-0.010295607149600983,
0.10243381559848785,
0.1297038197517395,
-0.15506209433078766,
0.022726302966475487,
-0.05731120705604553,
-0.15843603014945984,
-0.14378075301647186,
0.39878877997398376,
-0.3807941675186157,
-0.09291519224643707,
-0.13384193181991577,
-0.012926793657243252,
-0.18378086388111115,
0.18075180053710938,
0.10366304218769073,
0.0036695394665002823,
0.12652403116226196,
0.23440654575824738,
0.012272627092897892,
-0.08575862646102905,
0.12631788849830627,
-0.0011809810530394316,
-0.5185654163360596,
-0.3830219805240631,
0.3679753839969635,
-0.024915123358368874,
0.16618147492408752,
-0.29478538036346436,
0.056521058082580566,
0.22865119576454163,
-0.15500704944133759,
0.6204712986946106,
-0.15486882627010345,
-0.056747693568468094,
0.23538509011268616,
0.13126561045646667,
0.15600146353244781,
0.022513145580887794,
0.06542812287807465,
0.20470288395881653,
0.1085164025425911,
0.5451292991638184,
-0.36773958802223206,
-0.07140225172042847,
0.4370552599430084,
-0.18326830863952637,
-0.030691072344779968,
0.0968891978263855,
-0.1827203333377838,
-0.4269365668296814,
-0.35651251673698425,
-0.17398129403591156,
0.11321379989385605,
0.2269095927476883,
0.1511366218328476,
-0.2574782073497772,
0.09870234876871109,
-0.26262885332107544,
-0.2366410195827484,
0.2381361722946167,
0.2373732626438141,
-0.055392712354660034,
-0.2783142328262329,
0.5237162113189697,
-0.02715243585407734,
-0.010363006964325905,
0.807910680770874,
0.27849265933036804,
-0.10211309045553207,
0.6285175681114197,
0.008453285321593285,
-0.04758353531360626,
0.16611900925636292,
-0.0704110637307167,
-0.38510239124298096,
-0.024027753621339798,
0.18075628578662872,
-0.025475524365901947,
0.46139612793922424,
0.29711541533470154,
-0.0917205810546875,
-0.14560259878635406,
-0.24342899024486542,
0.439166784286499,
-0.1468835324048996,
0.041475843638181686,
0.5342013239860535,
-0.15308794379234314,
-0.01785619556903839,
-0.03136768937110901,
0.047069888561964035,
0.5510367155075073,
-0.33940622210502625,
0.019015679135918617,
0.208194762468338,
-0.11741788685321808,
0.06302691251039505,
-0.5523282885551453,
0.19082999229431152,
-0.15775297582149506,
0.010488961823284626,
-0.05542192608118057,
0.023067593574523926,
0.04357960820198059,
0.37941980361938477,
0.1036456748843193,
0.34369760751724243,
0.14335179328918457,
-0.2005494385957718,
0.2185148298740387,
0.15553097426891327,
-0.053079329431056976,
-0.030495142564177513,
-0.31939226388931274,
0.18134109675884247,
0.12568500638008118,
0.13737420737743378,
-0.009074695408344269,
-0.05791393294930458,
-0.027593187987804413,
-0.16235989332199097,
-0.22708266973495483,
0.18981973826885223,
-0.40796053409576416,
0.33191898465156555,
0.03310161828994751,
0.09679191559553146,
-0.32426175475120544,
0.19750602543354034,
-0.14866921305656433,
0.12587115168571472,
-0.25308603048324585,
0.3592415153980255,
-0.11855270713567734,
-0.24664342403411865,
-0.17753928899765015,
0.16174131631851196,
0.137418732047081,
-0.09505996853113174,
-0.0002680663310457021,
0.28328052163124084,
-0.17444325983524323,
-0.43447059392929077,
-0.04302556812763214,
-0.04307267442345619,
0.13969530165195465,
0.031086141243577003,
0.05152783542871475,
-0.22133173048496246,
-0.24898280203342438,
-0.02487383410334587,
0.13893243670463562,
0.004874636419117451,
0.2184428721666336,
-0.34408631920814514,
0.16299940645694733,
-0.236477792263031,
-0.13143308460712433,
0.426723450422287,
-0.20218591392040253,
-0.3516027629375458,
0.3713058829307556,
0.08582697063684464,
-0.07851260900497437,
-0.3042430877685547,
-0.4113732576370239,
0.15883754193782806,
-0.01501505821943283,
0.06739047914743423,
0.0709080845117569,
-0.3147270381450653,
0.00740458257496357,
0.19118386507034302,
0.027283716946840286,
-0.18317943811416626,
-0.021652784198522568,
-0.33460733294487,
-0.3057222068309784,
0.25815925002098083,
-0.3365698754787445,
0.14082524180412292,
0.1868238002061844,
-0.30968397855758667,
0.19078895449638367,
-0.4118914008140564,
-0.33503586053848267,
0.08064363896846771,
-0.5897402763366699,
-0.34977930784225464,
-0.233623206615448,
-0.15580619871616364,
0.4625265598297119,
0.27152755856513977,
0.25567033886909485,
-0.06535517424345016,
-0.2769436240196228,
-0.21649110317230225,
0.2106546312570572,
0.03702164441347122,
0.027314577251672745,
-0.15244241058826447,
0.15790733695030212,
0.003476259298622608,
-0.2990369200706482,
0.039350900799036026,
0.15326352417469025,
-0.07978177070617676,
0.195159450173378,
-0.3212992250919342,
0.3001424968242645,
-0.1511884182691574,
-0.0417168065905571,
-0.08379153162240982,
0.10342752188444138,
0.2662908434867859,
-0.0003981457557529211,
-0.004140944220125675,
-0.12785257399082184,
-0.060949236154556274,
0.013340831734240055,
0.10338680446147919,
0.022980429232120514,
0.16056185960769653,
0.40110623836517334,
-0.24747416377067566,
-0.00014644993643742055,
0.21741551160812378,
0.1992824524641037,
0.2981013059616089,
-0.4346033036708832,
-0.20912395417690277,
-0.014158982783555984,
0.28776973485946655,
-0.09632319211959839,
-0.12982448935508728,
-0.06671754270792007,
-0.1557190865278244,
-0.0162836741656065,
-0.03083190880715847,
0.11289370805025101,
-0.056896645575761795,
0.2939252257347107,
0.06563767045736313,
0.26442134380340576,
-0.0053684595040977,
0.07789269834756851,
-0.10964162647724152,
-0.12322214990854263,
0.037682175636291504,
0.2779679596424103,
0.10411214828491211,
0.326302170753479,
0.2975761294364929,
-0.009710865095257759,
-0.10238891839981079,
-0.09439511597156525,
0.4178067445755005,
-0.2557057738304138,
-0.49675947427749634,
0.07643810659646988,
0.4155076742172241,
-0.24416202306747437,
0.28733953833580017,
-0.08572540432214737,
0.09097909927368164,
-0.35086068511009216,
0.1789897382259369,
-0.3316971957683563,
0.030975401401519775,
-0.03446125611662865,
-0.06932900846004486,
0.0742434486746788,
-0.1156960129737854,
-0.16808421909809113,
0.14244472980499268,
-0.010165792889893055,
0.027678053826093674,
0.018225187435746193,
-0.2230435609817505,
-0.1437058448791504,
-0.07101815193891525,
0.27359071373939514,
-0.13209529221057892,
0.10137418657541275,
-0.1250993311405182,
0.4108729660511017,
-0.14280590415000916,
-0.06365901976823807,
0.38094088435173035,
0.22090135514736176,
0.12906956672668457,
0.021976744756102562,
-0.0029659769497811794,
0.030637919902801514,
-0.16526064276695251,
-0.19391685724258423,
-0.12639370560646057,
0.32333436608314514,
0.3226048946380615,
-0.3285636603832245,
0.363103985786438,
0.24002061784267426,
-0.19653227925300598,
0.26426151394844055,
0.08626917004585266,
0.418176531791687,
0.17871765792369843,
-0.015060428529977798,
-0.22605852782726288,
0.09349172562360764,
-0.3113801181316376,
-0.10890481621026993,
-0.5400241613388062,
-0.3593544363975525,
-0.28587743639945984,
-0.404820054769516,
0.08445055782794952,
-0.10974704474210739,
0.13666802644729614,
0.038808926939964294,
0.4288270175457001,
0.414849191904068,
-0.007404495496302843,
0.062010083347558975,
-0.344251811504364,
-0.33464962244033813,
0.205423966050148,
0.18493571877479553,
0.1545531451702118,
0.13360565900802612,
0.3543210029602051,
-0.11048880219459534,
0.032439082860946655,
0.14997100830078125,
0.3291165232658386,
-0.2717333137989044,
0.014666428789496422,
-0.3850998878479004,
-0.1955573707818985,
0.08477403968572617,
0.12554024159908295,
-0.13098493218421936,
-0.10809203237295151,
0.18082058429718018,
-0.22841975092887878,
0.06403255462646484,
0.10623224079608917,
0.018657777458429337,
-0.08574409782886505,
-0.10249719768762589,
0.4515937268733978,
-0.000875625410117209,
0.1554407924413681,
0.031898632645606995,
-0.09653107821941376,
-0.263557106256485,
-0.24497005343437195,
0.01697341911494732,
-0.1624910980463028,
0.036989640444517136,
0.24863216280937195,
0.0441599115729332,
0.4317739009857178,
-0.03476347774267197,
-0.11773703247308731,
-0.053242336958646774,
0.07220320403575897,
-0.09130161255598068,
0.1049099713563919,
0.13069212436676025,
0.11441123485565186,
0.04419667646288872,
0.20640712976455688,
0.21367134153842926,
-0.03549961373209953,
-0.03623148798942566,
-0.11144905537366867,
0.2867627739906311,
0.21304795145988464,
-0.1770394742488861,
0.20983129739761353,
-0.044031500816345215,
0.08559572696685791,
0.003280235454440117,
-0.25297051668167114,
0.22819888591766357,
0.27487510442733765,
0.0562671534717083,
-0.05746147036552429,
0.13113361597061157,
-0.044064540416002274,
-0.05366525799036026,
-0.19697816669940948,
0.039453860372304916,
-0.03349090367555618,
-0.10016147792339325,
-0.018448127433657646,
0.031663935631513596
] |
https://github.com/huggingface/datasets/issues/2212
|
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
The script has been adopted to support manual download from the website, so I'm closing this issue.
|
I'm trying to load the [fquad dataset](https://huggingface.co/datasets/fquad) by running:
```Python
fquad = load_dataset("fquad")
```
which produces the following error:
```
Using custom data configuration default
Downloading and preparing dataset fquad/default (download: 3.14 MiB, generated: 6.62 MiB, post-processed: Unknown size, total: 9.76 MiB) to /root/.cache/huggingface/datasets/fquad/default/0.1.0/778dc2c85813d05ddd0c17087294d5f8f24820752340958070876b677af9f061...
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-48-a2721797e23b> in <module>()
----> 1 fquad = load_dataset("fquad")
11 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
614 raise FileNotFoundError("Couldn't find file at {}".format(url))
615 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
--> 616 raise ConnectionError("Couldn't reach {}".format(url))
617
618 # Try a second time
ConnectionError: Couldn't reach https://storage.googleapis.com/illuin/fquad/train.json.zip
```
Does anyone know why that is and how to fix it?
| 17 |
Can't reach "https://storage.googleapis.com/illuin/fquad/train.json.zip" when trying to load fquad dataset
|
[
-0.4642374515533447,
0.43511566519737244,
-0.20049060881137848,
-0.017762718722224236,
0.32672369480133057,
0.12850016355514526,
0.3063697814941406,
0.17314910888671875,
0.25220736861228943,
0.22710326313972473,
-0.17721663415431976,
-0.08033333718776703,
0.3741396367549896,
0.20074231922626495,
-0.005389299243688583,
0.18888439238071442,
-0.009338012896478176,
0.025150474160909653,
-0.11287767440080643,
-0.06411823630332947,
-0.2572081983089447,
0.41523197293281555,
-0.21132932603359222,
0.21585243940353394,
-0.31124043464660645,
0.024413570761680603,
0.06344623863697052,
0.38985922932624817,
-0.38521429896354675,
0.04193197190761566,
0.21524471044540405,
0.2640494406223297,
-0.12770958244800568,
0.2450367510318756,
-0.00010582234972389415,
0.2027992308139801,
0.2889106571674347,
0.014755532145500183,
-0.20469798147678375,
-0.21708601713180542,
-0.18457183241844177,
0.08647925406694412,
0.13146378099918365,
-0.15293250977993011,
-0.138808473944664,
-0.36393964290618896,
0.1892520785331726,
-0.29191237688064575,
0.1520361453294754,
0.40999355912208557,
0.2307361662387848,
-0.2105073481798172,
0.1512749344110489,
-0.19949181377887726,
-0.17505717277526855,
-0.21572628617286682,
0.03331277519464493,
0.4675024151802063,
0.12119702994823456,
-0.17356689274311066,
-0.2893563210964203,
0.04084701091051102,
0.15395237505435944,
0.11514277011156082,
-0.06688572466373444,
0.06694406270980835,
-0.426123708486557,
-0.036921240389347076,
0.1560400128364563,
0.04550996795296669,
0.43341881036758423,
-0.09273050725460052,
-0.26911792159080505,
0.061333928257226944,
0.05311163514852524,
-0.19074532389640808,
0.551646888256073,
-0.04908920079469681,
-0.13025322556495667,
0.3244178593158722,
-0.3235695958137512,
-0.3093435764312744,
-0.0869356319308281,
0.28176361322402954,
-0.4342292547225952,
0.33106034994125366,
-0.1242704913020134,
0.07960959523916245,
0.3633344769477844,
-0.21327587962150574,
-0.226140558719635,
0.18872526288032532,
-0.007029966451227665,
0.15504895150661469,
-0.29780834913253784,
-0.0502360537648201,
0.0033194227144122124,
-0.4333864152431488,
0.19852569699287415,
0.31007134914398193,
-0.06887152791023254,
0.1679055392742157,
-0.09911074489355087,
0.17609164118766785,
0.3012990951538086,
0.19230511784553528,
0.028323432430624962,
0.28493764996528625,
0.32214295864105225,
0.4649592936038971,
-0.16919046640396118,
-0.018238354474306107,
-0.376968652009964,
-0.09662699699401855,
-0.34326815605163574,
-0.0930204913020134,
-0.14439021050930023,
-0.20853157341480255,
-0.1682833433151245,
0.042738012969493866,
-0.19309324026107788,
-0.09197764098644257,
-0.05073407664895058,
0.2902804911136627,
-0.04722313582897186,
0.037926383316516876,
0.002077921759337187,
0.2508412301540375,
-0.0914168655872345,
0.07274179905653,
-0.19989439845085144,
0.22258862853050232,
-0.20524504780769348,
0.0223167035728693,
0.2563934624195099,
0.04633081704378128,
0.4071342945098877,
-0.534503698348999,
-0.032747890800237656,
0.056320056319236755,
0.20354238152503967,
-0.10059870034456253,
-0.1318853497505188,
0.3106285333633423,
0.21451283991336823,
-0.11870170384645462,
0.08994263410568237,
0.10465501993894577,
0.0022719043772667646,
-0.10174675285816193,
-0.25856927037239075,
-0.1280280351638794,
-0.32921555638313293,
0.2605043649673462,
-0.014877069741487503,
-0.04669227451086044,
-0.22829683125019073,
0.21606864035129547,
-0.4079105257987976,
-0.27197712659835815,
-0.2064862996339798,
0.306972473859787,
-0.005919629707932472,
-0.0015888045309111476,
0.23847907781600952,
0.18968528509140015,
-0.2549572288990021,
0.006134870462119579,
-0.2179446965456009,
-0.229093536734581,
-0.09063392877578735,
0.30334216356277466,
-0.20087745785713196,
0.13015297055244446,
-0.4226956367492676,
0.43842753767967224,
0.7431551218032837,
-0.06648393720388412,
-0.7608040571212769,
0.4116881787776947,
-0.26779744029045105,
-0.20536182820796967,
-0.12456804513931274,
0.012318801134824753,
-0.03207613527774811,
0.1757259964942932,
0.6117702722549438,
0.4520474374294281,
0.10176459699869156,
-0.11083579808473587,
0.06745175272226334,
-0.3609705865383148,
-0.11668600142002106,
0.3062000274658203,
-0.00676747178658843,
0.27887997031211853,
0.3026657700538635,
-0.2808440029621124,
0.17472590506076813,
0.18049192428588867,
-0.2793371379375458,
0.36687952280044556,
-0.18744796514511108,
-0.16550786793231964,
-0.028229208663105965,
0.03165755793452263,
-0.6034233570098877,
0.11657737195491791,
-0.220260351896286,
-0.13285309076309204,
-0.37154972553253174,
0.2353595644235611,
-0.31705644726753235,
-0.07917477190494537,
-0.08626968413591385,
0.128060445189476,
0.2116529941558838,
0.11788538843393326,
0.07798343151807785,
0.22859063744544983,
-0.1779099851846695,
0.16707934439182281,
-0.07312381267547607,
0.15818475186824799,
-0.27789080142974854,
0.14346589148044586,
-0.2446320801973343,
0.038704875856637955,
0.1635790318250656,
-0.13976919651031494,
0.02065703272819519,
-0.33066341280937195,
-0.08064574748277664,
0.29740363359451294,
-0.32260623574256897,
0.2260526865720749,
0.5464051961898804,
0.4359164237976074,
0.10290931165218353,
-0.10764683037996292,
0.011934857815504074,
-0.23127999901771545,
0.0078112040646374226,
-0.0023430015426129103,
-0.07326533645391464,
0.05892645940184593,
0.20820897817611694,
0.21636314690113068,
0.11015342175960541,
0.026352258399128914,
0.5346857309341431,
0.0967731848359108,
0.02425464428961277,
-0.18014098703861237,
0.13188989460468292,
0.676838755607605,
0.023849034681916237,
0.07575313001871109,
-0.17348875105381012,
0.08421601355075836,
0.6387072801589966,
-0.22946231067180634,
0.038957104086875916,
0.11545019596815109,
0.148310586810112,
-0.32938915491104126,
0.2756935656070709,
0.01566207781434059,
0.3024139702320099,
0.12518993020057678,
0.2245805263519287,
0.07016023993492126,
-0.3003760576248169,
-0.25068795680999756,
0.019969364628195763,
0.03715038672089577,
0.12666596472263336,
0.12545384466648102,
0.12142907083034515,
-0.09898027777671814,
-0.1996147483587265,
-0.3614577353000641,
0.1002567857503891,
0.019511856138706207,
0.07464665919542313,
0.26731276512145996,
-0.16937755048274994,
0.01788407936692238,
0.40971875190734863,
-0.23845523595809937,
-0.13663683831691742,
-0.5098510384559631,
0.11063224077224731,
0.04144900292158127,
-0.03773888945579529,
0.2274165004491806,
-0.2515510022640228,
0.11411350965499878,
0.1898224800825119,
-0.20887143909931183,
-0.11549147963523865,
-0.19102813303470612,
-0.217237189412117,
0.18666578829288483,
0.18138429522514343,
-0.075747549533844,
0.12175057828426361,
-0.2790156304836273,
0.09357619285583496,
-0.48752278089523315,
-0.0013206142466515303,
0.21741949021816254,
-0.0031922077760100365,
0.29138633608818054,
0.1493002474308014,
0.24544404447078705,
-0.10176663100719452,
-0.06816636770963669,
0.17932848632335663,
0.05142342671751976,
-0.17380879819393158,
-0.19466988742351532,
-0.05593246594071388,
0.07146091759204865,
0.028387654572725296,
-0.33721670508384705,
0.0034088108222931623,
-0.29725340008735657,
0.2849738597869873,
-0.07976002246141434,
-0.010526314377784729,
-0.14825712144374847,
0.15995335578918457,
0.3381737768650055,
0.319217324256897,
-0.15591081976890564,
-0.42838624119758606,
-0.502850353717804,
0.5249762535095215,
-0.2710711359977722,
-0.13195504248142242,
0.2247796207666397,
0.15216538310050964,
0.23073796927928925,
0.29288095235824585,
-0.3729020655155182,
-0.3825802505016327,
-0.15591326355934143,
0.03457826375961304,
-0.10106640309095383,
-0.3112100660800934,
0.19035010039806366,
-0.21343809366226196,
-0.13516461849212646,
0.05899360030889511,
-0.3082864284515381,
0.2477789968252182,
0.01747468113899231,
0.251151978969574,
0.09770234674215317,
0.5149989128112793,
-0.14808370172977448,
0.42241236567497253,
-0.2293567657470703,
-0.060820259153842926,
0.19667012989521027,
-0.22815831005573273,
0.1598997265100479,
-0.21761636435985565,
-0.010295607149600983,
0.10243381559848785,
0.1297038197517395,
-0.15506209433078766,
0.022726302966475487,
-0.05731120705604553,
-0.15843603014945984,
-0.14378075301647186,
0.39878877997398376,
-0.3807941675186157,
-0.09291519224643707,
-0.13384193181991577,
-0.012926793657243252,
-0.18378086388111115,
0.18075180053710938,
0.10366304218769073,
0.0036695394665002823,
0.12652403116226196,
0.23440654575824738,
0.012272627092897892,
-0.08575862646102905,
0.12631788849830627,
-0.0011809810530394316,
-0.5185654163360596,
-0.3830219805240631,
0.3679753839969635,
-0.024915123358368874,
0.16618147492408752,
-0.29478538036346436,
0.056521058082580566,
0.22865119576454163,
-0.15500704944133759,
0.6204712986946106,
-0.15486882627010345,
-0.056747693568468094,
0.23538509011268616,
0.13126561045646667,
0.15600146353244781,
0.022513145580887794,
0.06542812287807465,
0.20470288395881653,
0.1085164025425911,
0.5451292991638184,
-0.36773958802223206,
-0.07140225172042847,
0.4370552599430084,
-0.18326830863952637,
-0.030691072344779968,
0.0968891978263855,
-0.1827203333377838,
-0.4269365668296814,
-0.35651251673698425,
-0.17398129403591156,
0.11321379989385605,
0.2269095927476883,
0.1511366218328476,
-0.2574782073497772,
0.09870234876871109,
-0.26262885332107544,
-0.2366410195827484,
0.2381361722946167,
0.2373732626438141,
-0.055392712354660034,
-0.2783142328262329,
0.5237162113189697,
-0.02715243585407734,
-0.010363006964325905,
0.807910680770874,
0.27849265933036804,
-0.10211309045553207,
0.6285175681114197,
0.008453285321593285,
-0.04758353531360626,
0.16611900925636292,
-0.0704110637307167,
-0.38510239124298096,
-0.024027753621339798,
0.18075628578662872,
-0.025475524365901947,
0.46139612793922424,
0.29711541533470154,
-0.0917205810546875,
-0.14560259878635406,
-0.24342899024486542,
0.439166784286499,
-0.1468835324048996,
0.041475843638181686,
0.5342013239860535,
-0.15308794379234314,
-0.01785619556903839,
-0.03136768937110901,
0.047069888561964035,
0.5510367155075073,
-0.33940622210502625,
0.019015679135918617,
0.208194762468338,
-0.11741788685321808,
0.06302691251039505,
-0.5523282885551453,
0.19082999229431152,
-0.15775297582149506,
0.010488961823284626,
-0.05542192608118057,
0.023067593574523926,
0.04357960820198059,
0.37941980361938477,
0.1036456748843193,
0.34369760751724243,
0.14335179328918457,
-0.2005494385957718,
0.2185148298740387,
0.15553097426891327,
-0.053079329431056976,
-0.030495142564177513,
-0.31939226388931274,
0.18134109675884247,
0.12568500638008118,
0.13737420737743378,
-0.009074695408344269,
-0.05791393294930458,
-0.027593187987804413,
-0.16235989332199097,
-0.22708266973495483,
0.18981973826885223,
-0.40796053409576416,
0.33191898465156555,
0.03310161828994751,
0.09679191559553146,
-0.32426175475120544,
0.19750602543354034,
-0.14866921305656433,
0.12587115168571472,
-0.25308603048324585,
0.3592415153980255,
-0.11855270713567734,
-0.24664342403411865,
-0.17753928899765015,
0.16174131631851196,
0.137418732047081,
-0.09505996853113174,
-0.0002680663310457021,
0.28328052163124084,
-0.17444325983524323,
-0.43447059392929077,
-0.04302556812763214,
-0.04307267442345619,
0.13969530165195465,
0.031086141243577003,
0.05152783542871475,
-0.22133173048496246,
-0.24898280203342438,
-0.02487383410334587,
0.13893243670463562,
0.004874636419117451,
0.2184428721666336,
-0.34408631920814514,
0.16299940645694733,
-0.236477792263031,
-0.13143308460712433,
0.426723450422287,
-0.20218591392040253,
-0.3516027629375458,
0.3713058829307556,
0.08582697063684464,
-0.07851260900497437,
-0.3042430877685547,
-0.4113732576370239,
0.15883754193782806,
-0.01501505821943283,
0.06739047914743423,
0.0709080845117569,
-0.3147270381450653,
0.00740458257496357,
0.19118386507034302,
0.027283716946840286,
-0.18317943811416626,
-0.021652784198522568,
-0.33460733294487,
-0.3057222068309784,
0.25815925002098083,
-0.3365698754787445,
0.14082524180412292,
0.1868238002061844,
-0.30968397855758667,
0.19078895449638367,
-0.4118914008140564,
-0.33503586053848267,
0.08064363896846771,
-0.5897402763366699,
-0.34977930784225464,
-0.233623206615448,
-0.15580619871616364,
0.4625265598297119,
0.27152755856513977,
0.25567033886909485,
-0.06535517424345016,
-0.2769436240196228,
-0.21649110317230225,
0.2106546312570572,
0.03702164441347122,
0.027314577251672745,
-0.15244241058826447,
0.15790733695030212,
0.003476259298622608,
-0.2990369200706482,
0.039350900799036026,
0.15326352417469025,
-0.07978177070617676,
0.195159450173378,
-0.3212992250919342,
0.3001424968242645,
-0.1511884182691574,
-0.0417168065905571,
-0.08379153162240982,
0.10342752188444138,
0.2662908434867859,
-0.0003981457557529211,
-0.004140944220125675,
-0.12785257399082184,
-0.060949236154556274,
0.013340831734240055,
0.10338680446147919,
0.022980429232120514,
0.16056185960769653,
0.40110623836517334,
-0.24747416377067566,
-0.00014644993643742055,
0.21741551160812378,
0.1992824524641037,
0.2981013059616089,
-0.4346033036708832,
-0.20912395417690277,
-0.014158982783555984,
0.28776973485946655,
-0.09632319211959839,
-0.12982448935508728,
-0.06671754270792007,
-0.1557190865278244,
-0.0162836741656065,
-0.03083190880715847,
0.11289370805025101,
-0.056896645575761795,
0.2939252257347107,
0.06563767045736313,
0.26442134380340576,
-0.0053684595040977,
0.07789269834756851,
-0.10964162647724152,
-0.12322214990854263,
0.037682175636291504,
0.2779679596424103,
0.10411214828491211,
0.326302170753479,
0.2975761294364929,
-0.009710865095257759,
-0.10238891839981079,
-0.09439511597156525,
0.4178067445755005,
-0.2557057738304138,
-0.49675947427749634,
0.07643810659646988,
0.4155076742172241,
-0.24416202306747437,
0.28733953833580017,
-0.08572540432214737,
0.09097909927368164,
-0.35086068511009216,
0.1789897382259369,
-0.3316971957683563,
0.030975401401519775,
-0.03446125611662865,
-0.06932900846004486,
0.0742434486746788,
-0.1156960129737854,
-0.16808421909809113,
0.14244472980499268,
-0.010165792889893055,
0.027678053826093674,
0.018225187435746193,
-0.2230435609817505,
-0.1437058448791504,
-0.07101815193891525,
0.27359071373939514,
-0.13209529221057892,
0.10137418657541275,
-0.1250993311405182,
0.4108729660511017,
-0.14280590415000916,
-0.06365901976823807,
0.38094088435173035,
0.22090135514736176,
0.12906956672668457,
0.021976744756102562,
-0.0029659769497811794,
0.030637919902801514,
-0.16526064276695251,
-0.19391685724258423,
-0.12639370560646057,
0.32333436608314514,
0.3226048946380615,
-0.3285636603832245,
0.363103985786438,
0.24002061784267426,
-0.19653227925300598,
0.26426151394844055,
0.08626917004585266,
0.418176531791687,
0.17871765792369843,
-0.015060428529977798,
-0.22605852782726288,
0.09349172562360764,
-0.3113801181316376,
-0.10890481621026993,
-0.5400241613388062,
-0.3593544363975525,
-0.28587743639945984,
-0.404820054769516,
0.08445055782794952,
-0.10974704474210739,
0.13666802644729614,
0.038808926939964294,
0.4288270175457001,
0.414849191904068,
-0.007404495496302843,
0.062010083347558975,
-0.344251811504364,
-0.33464962244033813,
0.205423966050148,
0.18493571877479553,
0.1545531451702118,
0.13360565900802612,
0.3543210029602051,
-0.11048880219459534,
0.032439082860946655,
0.14997100830078125,
0.3291165232658386,
-0.2717333137989044,
0.014666428789496422,
-0.3850998878479004,
-0.1955573707818985,
0.08477403968572617,
0.12554024159908295,
-0.13098493218421936,
-0.10809203237295151,
0.18082058429718018,
-0.22841975092887878,
0.06403255462646484,
0.10623224079608917,
0.018657777458429337,
-0.08574409782886505,
-0.10249719768762589,
0.4515937268733978,
-0.000875625410117209,
0.1554407924413681,
0.031898632645606995,
-0.09653107821941376,
-0.263557106256485,
-0.24497005343437195,
0.01697341911494732,
-0.1624910980463028,
0.036989640444517136,
0.24863216280937195,
0.0441599115729332,
0.4317739009857178,
-0.03476347774267197,
-0.11773703247308731,
-0.053242336958646774,
0.07220320403575897,
-0.09130161255598068,
0.1049099713563919,
0.13069212436676025,
0.11441123485565186,
0.04419667646288872,
0.20640712976455688,
0.21367134153842926,
-0.03549961373209953,
-0.03623148798942566,
-0.11144905537366867,
0.2867627739906311,
0.21304795145988464,
-0.1770394742488861,
0.20983129739761353,
-0.044031500816345215,
0.08559572696685791,
0.003280235454440117,
-0.25297051668167114,
0.22819888591766357,
0.27487510442733765,
0.0562671534717083,
-0.05746147036552429,
0.13113361597061157,
-0.044064540416002274,
-0.05366525799036026,
-0.19697816669940948,
0.039453860372304916,
-0.03349090367555618,
-0.10016147792339325,
-0.018448127433657646,
0.031663935631513596
] |
https://github.com/huggingface/datasets/issues/2211
|
Getting checksum error when trying to load lc_quad dataset
|
Hi,
I've already opened a PR with the fix. If you are in a hurry, just build the project from source and run:
```bash
datasets-cli test datasets/lc_quad --save_infos --all_configs --ignore_verifications
```
|
I'm having issues loading the [lc_quad](https://huggingface.co/datasets/fquad) dataset by running:
```Python
lc_quad = load_dataset("lc_quad")
```
which is giving me the following error:
```
Using custom data configuration default
Downloading and preparing dataset lc_quad/default (download: 3.69 MiB, generated: 19.77 MiB, post-processed: Unknown size, total: 23.46 MiB) to /root/.cache/huggingface/datasets/lc_quad/default/2.0.0/5a98fe174603f5dec6df07edf1c2b4d2317210d2ad61f5a393839bca4d64e5a7...
---------------------------------------------------------------------------
NonMatchingChecksumError Traceback (most recent call last)
<ipython-input-42-404ace83f73c> in <module>()
----> 1 lc_quad = load_dataset("lc_quad")
3 frames
/usr/local/lib/python3.7/dist-packages/datasets/utils/info_utils.py in verify_checksums(expected_checksums, recorded_checksums, verification_name)
37 if len(bad_urls) > 0:
38 error_msg = "Checksums didn't match" + for_verification_name + ":\n"
---> 39 raise NonMatchingChecksumError(error_msg + str(bad_urls))
40 logger.info("All the checksums matched successfully" + for_verification_name)
41
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/AskNowQA/LC-QuAD2.0/archive/master.zip']
```
Does anyone know why this could be and how I fix it?
| 31 |
Getting checksum error when trying to load lc_quad dataset
|
[
-0.33042454719543457,
0.11266197264194489,
-0.12358788400888443,
0.30873292684555054,
0.32577309012413025,
0.008301861584186554,
0.10322827845811844,
0.3250947594642639,
0.255262166261673,
0.1421831250190735,
-0.03230619430541992,
0.243381530046463,
0.020718052983283997,
0.09054120630025864,
-0.38191527128219604,
0.1547400802373886,
0.027232466265559196,
0.35159099102020264,
0.06346797198057175,
-0.07904332876205444,
-0.15971945226192474,
0.15011723339557648,
-0.08625014871358871,
-0.2447388917207718,
-0.2071695476770401,
-0.12202167510986328,
0.21620747447013855,
0.6160032749176025,
-0.352223664522171,
0.015429184772074223,
0.07238169014453888,
0.3346233069896698,
0.2518764138221741,
0.21909330785274506,
-0.00010453935101395473,
-0.0004917370970360935,
0.20992720127105713,
-0.15546192228794098,
-0.36088836193084717,
0.267307311296463,
-0.029011238366365433,
0.19763924181461334,
-0.013707282021641731,
-0.3515680134296417,
-0.038604963570833206,
-0.08622311055660248,
-0.16017669439315796,
-0.14273352921009064,
-0.002139405580237508,
-0.019763316959142685,
0.3340640962123871,
0.5628112554550171,
0.013159915804862976,
-0.09914994239807129,
0.007210778072476387,
-0.40686291456222534,
0.08785424381494522,
0.5815281867980957,
0.1750413477420807,
-0.0002511808124836534,
-0.16546322405338287,
0.34655842185020447,
-0.0022018058225512505,
-0.009031894616782665,
-0.061517857015132904,
-0.2092190980911255,
-0.18530628085136414,
0.2835690379142761,
0.2885960340499878,
0.20856846868991852,
0.4769963026046753,
-0.14656740427017212,
-0.0960715189576149,
0.4207541346549988,
0.14801408350467682,
-0.018010543659329414,
0.23625226318836212,
0.13139459490776062,
-0.025609472766518593,
-0.10422345995903015,
0.10583862662315369,
-0.04955471307039261,
0.06659795343875885,
0.0354783795773983,
-0.12480403482913971,
0.17003455758094788,
-0.014410675503313541,
0.025543751195073128,
0.21265384554862976,
0.043571703135967255,
-0.13313381373882294,
0.13876982033252716,
-0.3244599401950836,
-0.007485463283956051,
-0.3139895498752594,
-0.039299000054597855,
0.08396391570568085,
0.1845715045928955,
-0.06117858365178108,
0.4002188444137573,
0.39926204085350037,
0.33773350715637207,
-0.16867992281913757,
0.11098036915063858,
0.007062206044793129,
0.035279933363199234,
0.04150624945759773,
0.23166914284229279,
0.09510312974452972,
0.39975786209106445,
-0.14485953748226166,
-0.0403561033308506,
-0.3207573890686035,
-0.26635774970054626,
-0.09321402758359909,
0.2920311987400055,
-0.01637909561395645,
-0.4790016710758209,
-0.26757553219795227,
0.2668924927711487,
0.2749224901199341,
0.0016221220139414072,
0.3442913293838501,
0.5907613635063171,
0.10920003056526184,
0.07940232753753662,
0.049645714461803436,
0.13917961716651917,
-0.20586378872394562,
-0.23017320036888123,
-0.2887866497039795,
0.25375619530677795,
0.03176127001643181,
-0.09295099228620529,
0.1977495700120926,
-0.05792398378252983,
0.16406679153442383,
-0.3885769546031952,
0.3345488905906677,
-0.1038692444562912,
-0.027989471331238747,
-0.21983802318572998,
0.054254233837127686,
0.34589311480522156,
-0.02553848922252655,
0.013950335793197155,
0.4072571098804474,
0.017245454713702202,
-0.07434945553541183,
0.02270747348666191,
-0.06508208066225052,
-0.00860322080552578,
-0.310682088136673,
0.24894098937511444,
-0.043323975056409836,
0.0706230029463768,
0.030354969203472137,
-0.4007517993450165,
0.24184025824069977,
-0.3781526982784271,
0.028509052470326424,
-0.07542590796947479,
-0.01047461573034525,
-0.3024492859840393,
0.13021795451641083,
0.26598405838012695,
-0.47062525153160095,
0.24075356125831604,
0.1964603215456009,
-0.21341440081596375,
0.34188684821128845,
0.23476730287075043,
-0.16888639330863953,
-0.018297184258699417,
-0.02204884961247444,
-0.02344905026257038,
0.2706971764564514,
-0.3019793629646301,
-0.520508348941803,
0.12828105688095093,
0.13315348327159882,
-0.2980165481567383,
-0.1797751784324646,
0.07980681210756302,
-0.13609418272972107,
-0.11941811442375183,
-0.03501321002840996,
0.06582967191934586,
0.09597216546535492,
0.025492751970887184,
-0.3239140808582306,
-0.2180999219417572,
0.3111411929130554,
0.20477180182933807,
-0.015006677247583866,
0.014378546737134457,
0.33064138889312744,
0.1333353966474533,
0.2537290155887604,
-0.11726944148540497,
-0.15356941521167755,
0.09822069108486176,
0.25149109959602356,
-0.3932420611381531,
0.1495070457458496,
-0.06856152415275574,
-0.12494152039289474,
0.07768279314041138,
-0.02755829691886902,
0.14051643013954163,
-0.08842062950134277,
0.11623458564281464,
-0.3567165732383728,
-0.034346070140600204,
-0.14063455164432526,
0.3095273971557617,
0.2504282593727112,
0.0712609812617302,
-0.0027227362152189016,
-0.01424536295235157,
-0.12529639899730682,
-0.18871237337589264,
-0.5295644998550415,
-0.018708396703004837,
-0.12819908559322357,
0.38586491346359253,
0.013725965283811092,
-0.1940809041261673,
0.17247170209884644,
0.15259407460689545,
0.08363013714551926,
0.09693440049886703,
-0.1904851645231247,
0.22989481687545776,
0.21393872797489166,
0.0540253147482872,
0.13027895987033844,
-0.016646143049001694,
-0.05205230787396431,
-0.24850624799728394,
0.04122161492705345,
0.1988157480955124,
0.32040515542030334,
-0.023925982415676117,
0.23843367397785187,
0.29128462076187134,
-0.08348248153924942,
-0.25057700276374817,
0.025259926915168762,
-0.05174856632947922,
0.27420246601104736,
0.0028351142536848783,
0.07390126585960388,
-0.3889610767364502,
0.26420244574546814,
0.5937595367431641,
0.12913580238819122,
-0.09329444915056229,
0.030439846217632294,
-0.095004141330719,
0.23465140163898468,
0.14685186743736267,
0.1041664406657219,
-0.2791898548603058,
0.2716492712497711,
0.1000000536441803,
0.2655530273914337,
0.3991048038005829,
0.09574242681264877,
0.05769573152065277,
0.018445037305355072,
-0.03057829849421978,
-0.27278172969818115,
-0.17289751768112183,
-0.13652439415454865,
-0.0807170569896698,
0.40076544880867004,
0.18970489501953125,
-0.049376048147678375,
-0.12337896227836609,
-0.3182772696018219,
-0.0811002254486084,
0.20373587310314178,
0.21541744470596313,
-0.15135593712329865,
0.015925640240311623,
-0.2921690344810486,
-0.19513997435569763,
0.01272774301469326,
0.013024003244936466,
-0.052969980984926224,
-0.38855892419815063,
-0.015595909208059311,
0.06683221459388733,
-0.17875339090824127,
-0.028625695034861565,
-0.3221793472766876,
0.16498379409313202,
0.3159950375556946,
-0.21944336593151093,
0.11806157976388931,
-0.3223120868206024,
-0.11575640738010406,
0.16984041035175323,
0.37081193923950195,
0.14291279017925262,
0.320882648229599,
-0.030177878215909004,
0.11079869419336319,
-0.13286758959293365,
-0.10751809924840927,
0.03744428977370262,
0.04928445443511009,
0.04605523869395256,
0.07333680242300034,
0.3579476475715637,
-0.10031773895025253,
-0.33859479427337646,
0.26815474033355713,
-0.13475479185581207,
-0.11894291639328003,
0.27042651176452637,
-0.07128048688173294,
-0.25148242712020874,
-0.20821063220500946,
0.10600730776786804,
-0.03812097758054733,
-0.3745827078819275,
-0.3715790808200836,
0.06637976318597794,
0.19290533661842346,
-0.3690756559371948,
0.041005995124578476,
-0.009486294351518154,
0.2071295827627182,
-0.006463209632784128,
-0.3211534023284912,
-0.33042198419570923,
0.18290850520133972,
-0.11046621948480606,
-0.5518738031387329,
0.09218970686197281,
-0.04372437670826912,
0.41792601346969604,
0.03541715443134308,
-0.13616202771663666,
-0.16544191539287567,
0.02539953775703907,
0.02480163425207138,
0.1433841586112976,
-0.072274349629879,
0.06305261701345444,
-0.13263264298439026,
-0.0940985232591629,
-0.08660491555929184,
0.03215986117720604,
-0.0007665099110454321,
-0.039495207369327545,
0.39817383885383606,
-0.2527400851249695,
-0.0021214308217167854,
-0.12272168695926666,
0.3233926594257355,
0.03640502318739891,
-0.15817897021770477,
0.4006112515926361,
0.06259536743164062,
0.35698384046554565,
-0.1011379286646843,
-0.09950172901153564,
0.06253943592309952,
-0.10947107523679733,
-0.18110597133636475,
0.18352074921131134,
-0.12786157429218292,
-0.36199378967285156,
-0.2959653437137604,
-0.005941644310951233,
-0.24055887758731842,
-0.27109187841415405,
0.006905114743858576,
-0.045451659709215164,
-0.2531585693359375,
-0.08293092995882034,
0.1852007955312729,
0.024163423106074333,
-0.18402431905269623,
0.16795675456523895,
0.3604416847229004,
-0.24834011495113373,
-0.23776884377002716,
-0.44789230823516846,
-0.28928956389427185,
-0.15432529151439667,
0.31452229619026184,
0.09411542862653732,
0.4223429262638092,
-0.07012998312711716,
-0.23469214141368866,
-0.007706538308411837,
-0.3774329125881195,
0.1618308275938034,
-0.058539457619190216,
0.2065119594335556,
0.36816319823265076,
0.04546627029776573,
-0.2631033957004547,
-0.10272262990474701,
-0.32905977964401245,
0.1334589421749115,
0.04033635929226875,
-0.006053153891116381,
-0.3907066583633423,
0.24044881761074066,
-0.050481777638196945,
0.10625560581684113,
-0.20358549058437347,
-0.2670910656452179,
-0.5422957539558411,
-0.3247855603694916,
-0.41157764196395874,
-0.05715952441096306,
-0.2528986930847168,
0.45130670070648193,
-0.20345233380794525,
0.19393694400787354,
0.12568038702011108,
-0.2708396315574646,
0.1917184442281723,
0.215236097574234,
0.31026023626327515,
0.22371920943260193,
-0.11094269901514053,
-0.15065880119800568,
-0.0004454609879758209,
0.13983364403247833,
0.7421299815177917,
-0.12118474394083023,
0.10228240489959717,
0.30405327677726746,
-0.07426850497722626,
-0.056537169963121414,
0.11448168754577637,
-0.08560623228549957,
0.06418968737125397,
0.4150657653808594,
-0.181244358420372,
-0.13478918373584747,
0.17476366460323334,
-0.4143739938735962,
-0.010840005241334438,
-0.18397198617458344,
-0.05863431096076965,
0.036853041499853134,
-0.35042843222618103,
0.06290098279714584,
0.6093202829360962,
0.0005340675124898553,
0.08307632058858871,
0.2937392592430115,
0.3113578259944916,
0.7417393922805786,
-0.29847732186317444,
-0.07523564249277115,
0.42244529724121094,
-0.0857618972659111,
0.10713504999876022,
0.02856835164129734,
-0.0025385767221450806,
-0.5102206468582153,
-0.5418767333030701,
0.033721644431352615,
-0.011809967458248138,
0.20165632665157318,
-0.09942933917045593,
-0.10004103928804398,
-0.09643982350826263,
-0.2557128667831421,
-0.1305651217699051,
-0.016198288649320602,
0.1869213879108429,
-0.2903291881084442,
-0.1161380186676979,
-0.2564544081687927,
0.22954896092414856,
-0.02161276899278164,
-0.09581921249628067,
-0.28481000661849976,
0.07414092868566513,
-0.03750358521938324,
-0.35587701201438904,
-0.20817376673221588,
0.22449539601802826,
0.03310323506593704,
0.17671936750411987,
0.2412763237953186,
0.11704052984714508,
-0.20767293870449066,
-0.1063653752207756,
0.1850893199443817,
0.29602673649787903,
-0.15172988176345825,
0.1717076152563095,
0.20010867714881897,
-0.11739404499530792,
-0.11899319291114807,
0.04642218351364136,
0.4451245665550232,
-0.12824557721614838,
-0.16344599425792694,
0.2409377098083496,
0.10742124170064926,
-0.3947865962982178,
0.325504332780838,
0.12875212728977203,
-0.3444930613040924,
-0.3549076020717621,
-0.22660881280899048,
0.01768808253109455,
-0.07469402998685837,
-0.06234743818640709,
0.22002479434013367,
0.2688685655593872,
-0.1631091833114624,
-0.05877147987484932,
0.3895000219345093,
-0.22145581245422363,
-0.0036152382381260395,
0.30872324109077454,
0.0702086091041565,
-0.06418423354625702,
0.3263546824455261,
0.11780214309692383,
-0.1407143473625183,
-0.39717474579811096,
-0.4222792387008667,
0.07802785933017731,
-0.19093330204486847,
0.16218724846839905,
-0.06528721004724503,
-0.3142215609550476,
0.12870843708515167,
0.3087123930454254,
0.28491881489753723,
0.06183471903204918,
0.11932412534952164,
-0.6143888235092163,
-0.4418083727359772,
0.18773457407951355,
-0.16441011428833008,
0.13557401299476624,
0.04281558096408844,
0.013921691104769707,
-0.168948233127594,
0.17558549344539642,
-0.415666788816452,
-0.008215386420488358,
-0.5370103716850281,
-0.057050611823797226,
-0.30646708607673645,
-0.032205767929553986,
0.1497940719127655,
0.1344454139471054,
0.24279195070266724,
0.10157585144042969,
-0.1588747650384903,
-0.29234713315963745,
-0.04494670405983925,
0.04948016628623009,
0.060117967426776886,
-0.042216453701257706,
-0.005632470361888409,
-0.2579582929611206,
-0.11006540060043335,
-0.001167784328572452,
0.056551769375801086,
-0.15461356937885284,
-0.16113393008708954,
0.2885173559188843,
0.36420977115631104,
0.0029857056215405464,
-0.2891860604286194,
0.2362116426229477,
-0.18052631616592407,
0.14970830082893372,
0.11858392506837845,
-0.04155655950307846,
-0.05057144910097122,
-0.032187320291996,
0.1178290992975235,
0.08469199389219284,
-0.05001241713762283,
-0.052242618054151535,
0.18607382476329803,
-0.12657341361045837,
0.10979321599006653,
-0.18255732953548431,
0.3329937756061554,
0.0539814718067646,
-0.32281848788261414,
-0.16136176884174347,
0.13561639189720154,
0.2389562577009201,
-0.2626922130584717,
-0.08334629982709885,
0.08605590462684631,
0.14517828822135925,
0.10536323487758636,
0.34739142656326294,
0.18168365955352783,
-0.5017487406730652,
0.26331183314323425,
-0.1315920203924179,
0.1419253647327423,
0.0006947864894755185,
0.022339971736073494,
-0.05862048268318176,
-0.08368097245693207,
0.04125845059752464,
-0.044876616448163986,
-0.08144091814756393,
-0.20658978819847107,
-0.016535311937332153,
-0.03373675420880318,
0.28089097142219543,
0.020724672824144363,
0.13052988052368164,
-0.2809927463531494,
-0.6759107112884521,
0.562164843082428,
0.26083317399024963,
-0.026500800624489784,
0.12098494172096252,
0.07578141242265701,
0.18259263038635254,
0.05022437125444412,
0.14617858827114105,
-0.37100112438201904,
0.1365412324666977,
-0.2753145694732666,
-0.043978750705718994,
-0.39111998677253723,
-0.16368475556373596,
0.14368963241577148,
0.05595409497618675,
0.08758283406496048,
0.17032462358474731,
0.07256536930799484,
0.11383233964443207,
-0.12102250754833221,
-0.2110484391450882,
-0.07778366655111313,
0.13818451762199402,
-0.1608671098947525,
-0.2407953143119812,
0.31470534205436707,
0.11895820498466492,
0.17667315900325775,
0.5065826177597046,
-0.19405299425125122,
0.2740567624568939,
0.33047062158584595,
0.0914868488907814,
-0.22026915848255157,
0.054256170988082886,
0.03455016762018204,
-0.07499449700117111,
0.3566551208496094,
0.4053904712200165,
0.28870442509651184,
0.6234042048454285,
0.22075657546520233,
-0.15671373903751373,
-0.21738578379154205,
0.25732216238975525,
0.2367529273033142,
0.2759082317352295,
-0.1736650913953781,
-0.022896163165569305,
0.18432950973510742,
-0.23857170343399048,
0.2432721108198166,
-0.5755215883255005,
-0.03247848153114319,
-0.09814085811376572,
-0.0898827388882637,
0.319295734167099,
0.07443693280220032,
0.11673872172832489,
-0.029889661818742752,
0.7338337898254395,
0.33714184165000916,
0.3983618915081024,
-0.18579748272895813,
-0.39795416593551636,
-0.595494270324707,
0.4336741864681244,
0.09096256643533707,
-0.27635514736175537,
0.0013932903530076146,
0.20995207130908966,
0.3235164284706116,
0.06159311160445213,
0.25504299998283386,
-0.060722898691892624,
0.20425111055374146,
-0.14329929649829865,
-0.2624483108520508,
-0.07761037349700928,
0.12098093330860138,
-0.2488604187965393,
-0.22226780652999878,
-0.41640177369117737,
0.07777603715658188,
0.13248702883720398,
0.27323299646377563,
-0.037918005138635635,
-0.48949670791625977,
-0.22317442297935486,
0.2568656802177429,
0.0793711394071579,
0.036230720579624176,
0.7290301322937012,
-0.14802683889865875,
-0.026831606402993202,
-0.07410259544849396,
0.008518465794622898,
0.15993621945381165,
-0.09343697875738144,
0.28466910123825073,
0.35655853152275085,
0.2400059551000595,
0.5269674062728882,
-0.13905900716781616,
0.5882436037063599,
0.08723437786102295,
-0.11380549520254135,
-0.43835383653640747,
0.22541159391403198,
0.09906759858131409,
-0.1998467743396759,
0.10186213254928589,
0.14011472463607788,
0.11229454725980759,
0.17775654792785645,
-0.012373301200568676,
-0.17206355929374695,
0.42890721559524536,
-0.16717755794525146,
-0.19774800539016724,
-0.13631989061832428,
0.11836504936218262,
-0.18622079491615295,
0.12284039705991745,
-0.6005606651306152,
0.11363102495670319,
0.007360969204455614,
-0.04063919931650162,
-0.09948020428419113,
0.267945259809494,
-0.06712380796670914,
0.06265871226787567,
-0.11952190846204758,
-0.04320981726050377,
-0.1230907291173935,
-0.18956266343593597,
-0.30779483914375305,
-0.16741713881492615
] |
https://github.com/huggingface/datasets/issues/2210
|
dataloading slow when using HUGE dataset
|
Hi ! Yes this is an issue with `datasets<=1.5.0`
This issue has been fixed by #2122 , we'll do a new release soon :)
For now you can test it on the `master` branch.
|
Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
| 34 |
dataloading slow when using HUGE dataset
|
[
-0.46786004304885864,
0.09271056950092316,
-0.24258475005626678,
0.22507663071155548,
0.15218883752822876,
-0.02091222256422043,
0.2444206029176712,
0.41463756561279297,
0.13683423399925232,
0.14643827080726624,
-0.2210727035999298,
-0.09887029230594635,
0.10926832258701324,
0.06968370825052261,
-0.35460570454597473,
0.12173345685005188,
-0.05184260755777359,
0.1635529100894928,
-0.329567551612854,
-0.27639058232307434,
0.06570228189229965,
-0.3043351471424103,
-0.0007142871618270874,
-0.1320909559726715,
-0.27191784977912903,
-0.11286262422800064,
0.13741174340248108,
0.20024937391281128,
-0.16095739603042603,
-0.010259619913995266,
-0.12445521354675293,
0.32723283767700195,
-0.021144619211554527,
0.48174965381622314,
-0.00010165198182221502,
0.07449983060359955,
0.1583532989025116,
0.13990862667560577,
-0.4574804902076721,
0.5573951005935669,
0.05116165056824684,
-0.3680476248264313,
-0.08712100237607956,
-0.17396511137485504,
0.01114668883383274,
-0.1665971577167511,
-0.07994496822357178,
-0.221571683883667,
0.28888794779777527,
-0.03329385444521904,
0.2930925190448761,
0.021496301516890526,
-0.2518404722213745,
-0.10946671664714813,
0.03234098479151726,
-0.02226557955145836,
0.004594643134623766,
0.2567807734012604,
0.4880111515522003,
0.07868514955043793,
-0.3903358578681946,
0.08455236256122589,
-0.06682634353637695,
0.0423063226044178,
-0.053239237517118454,
-0.13514962792396545,
-0.1165371686220169,
0.094813771545887,
0.27611058950424194,
0.33568575978279114,
0.4755919277667999,
0.08313441276550293,
-0.14946724474430084,
-0.20793387293815613,
-0.18444719910621643,
-0.2568034529685974,
0.06687604635953903,
-0.037340741604566574,
-0.06836501508951187,
-0.09313280880451202,
-0.061370499432086945,
-0.13188761472702026,
-0.0752619281411171,
-0.0036146831698715687,
-0.08322297036647797,
-0.17976264655590057,
-0.08694281429052353,
-0.04885072261095047,
0.07522322237491608,
-0.23632760345935822,
0.017785944044589996,
-0.1982654631137848,
0.26537612080574036,
0.050264883786439896,
-0.39906975626945496,
-0.03591727092862129,
0.2107207328081131,
-0.032879624515771866,
0.04008636251091957,
-0.11803373694419861,
0.07895360141992569,
0.2501850724220276,
0.022639118134975433,
-0.1739133894443512,
0.4217030704021454,
-0.04760400578379631,
-0.5117993950843811,
-0.19559776782989502,
0.36116093397140503,
-0.031283535063266754,
-0.26152941584587097,
-0.009737766347825527,
-0.1490076631307602,
-0.10911241918802261,
0.2042687088251114,
-0.29980507493019104,
-0.1187702864408493,
-0.12214937061071396,
-0.14455878734588623,
-0.15496370196342468,
0.24171659350395203,
-0.11073926836252213,
0.10421690344810486,
0.4651402533054352,
-0.17536035180091858,
0.1301717758178711,
-0.04962307959794998,
-0.20938324928283691,
-0.1674324870109558,
-0.3122677206993103,
-0.2630142569541931,
-0.17335373163223267,
-0.06148340553045273,
0.08313243836164474,
0.2805020213127136,
-0.07499969750642776,
-0.13223397731781006,
0.009937283582985401,
-0.08785267919301987,
0.018315250054001808,
0.019188106060028076,
-0.2881163954734802,
-0.07800079882144928,
-0.030923407524824142,
-0.022936349734663963,
0.25853025913238525,
-0.052676036953926086,
0.1807328760623932,
-0.1967795491218567,
-0.06673470139503479,
-0.39826884865760803,
-0.2831747531890869,
0.03919845074415207,
0.3116990625858307,
0.10528392344713211,
0.005955170374363661,
-0.18397513031959534,
0.04663693159818649,
-0.28110271692276,
-0.05882691591978073,
-0.41238638758659363,
0.08227550238370895,
0.0763104259967804,
-0.013921626843512058,
0.04186651110649109,
0.36768341064453125,
-0.22175933420658112,
0.16950064897537231,
-0.1754778027534485,
0.1861545890569687,
0.28497520089149475,
0.5548359751701355,
-0.29128095507621765,
0.28488168120384216,
0.030205966904759407,
-0.15758147835731506,
0.41276538372039795,
-0.15125684440135956,
-0.625588059425354,
0.5315316915512085,
-0.26209741830825806,
-0.16613203287124634,
0.3745591938495636,
0.3088013231754303,
0.4069204032421112,
-0.30432701110839844,
0.21264700591564178,
0.4736315608024597,
0.02175736427307129,
0.2726476788520813,
-0.24727994203567505,
-0.1222461611032486,
-0.09347045421600342,
0.5047563314437866,
-0.1451779007911682,
0.10393249988555908,
0.2810700833797455,
0.21856945753097534,
0.2809695303440094,
-0.24471479654312134,
-0.021846355870366096,
0.25394704937934875,
-0.032043371349573135,
-0.07970979809761047,
-0.06537305563688278,
0.1976318359375,
-0.4186663031578064,
0.09396667778491974,
0.22760246694087982,
-0.05972849577665329,
0.2703385055065155,
-0.012208296917378902,
-0.17270134389400482,
-0.1369655728340149,
-0.18150857090950012,
0.3414113521575928,
0.20302064716815948,
0.09320022910833359,
0.15529654920101166,
0.06634382903575897,
0.2245343029499054,
0.22369688749313354,
-0.27914899587631226,
-0.06951430439949036,
-0.13512398302555084,
-0.02016253024339676,
0.24439874291419983,
-0.16505490243434906,
0.349839448928833,
-0.09487100690603256,
-0.00257101864553988,
-0.20524653792381287,
-0.0053300559520721436,
-0.04918700084090233,
-0.09634295850992203,
0.2104269564151764,
0.15309938788414001,
0.21356457471847534,
-0.030581075698137283,
0.08951152116060257,
0.2578136920928955,
-0.05469699203968048,
0.24668237566947937,
-0.12658432126045227,
-0.1325223594903946,
0.2783452272415161,
-0.187541663646698,
0.11911311745643616,
0.3000979721546173,
-0.38996389508247375,
0.3737626075744629,
0.03246397525072098,
0.3877170979976654,
-0.0016189898597076535,
0.40815871953964233,
0.21941129863262177,
0.37336504459381104,
0.3561581075191498,
-0.06759583204984665,
0.01809725910425186,
0.3339029848575592,
-0.060870613902807236,
-0.0303233303129673,
0.11902356892824173,
-0.02134709805250168,
0.005028991959989071,
0.08254549652338028,
-0.161969855427742,
0.32494574785232544,
0.4266197681427002,
0.20353062450885773,
-0.2660510540008545,
0.312590092420578,
-0.22836482524871826,
0.047627124935388565,
-0.06213921681046486,
0.18187856674194336,
0.08452800661325455,
0.21016143262386322,
-0.17673246562480927,
-0.35822731256484985,
-0.2165936529636383,
0.24528126418590546,
0.24779212474822998,
0.05607873946428299,
-0.0022986449766904116,
-0.14370130002498627,
0.015759732574224472,
0.03322342038154602,
0.027099506929516792,
0.14147569239139557,
-0.23649553954601288,
0.055878665298223495,
0.17318980395793915,
-0.048589076846838,
0.06164779141545296,
-0.10389208048582077,
0.17061904072761536,
0.19812794029712677,
-0.23667262494564056,
-0.006898379884660244,
-0.11653386056423187,
-0.03130677342414856,
0.22861461341381073,
0.2501753866672516,
-0.0011987374164164066,
0.14950227737426758,
0.09017402678728104,
-0.026330552995204926,
-0.17129912972450256,
-0.13601240515708923,
0.020337603986263275,
0.11236423999071121,
-0.22288818657398224,
-0.318757027387619,
0.2623365819454193,
0.24167843163013458,
-0.07442770898342133,
0.14110714197158813,
-0.2469554990530014,
-0.106843501329422,
0.21861256659030914,
-0.22248569130897522,
0.07632281631231308,
0.21947766840457916,
-0.27489209175109863,
-0.17297177016735077,
-0.41785168647766113,
0.2211337387561798,
-0.004070351365953684,
0.171428844332695,
0.04378896951675415,
0.10503851622343063,
-0.07670488208532333,
0.19646601378917694,
0.23013874888420105,
-0.04965962469577789,
-0.40918269753456116,
0.23644521832466125,
0.046330492943525314,
-0.34274518489837646,
-0.39335203170776367,
0.0012114616110920906,
0.02427002601325512,
0.33090025186538696,
-0.3321753144264221,
0.1830352246761322,
-0.520125150680542,
0.23370406031608582,
0.01544139627367258,
0.19807352125644684,
-0.014557781629264355,
-0.19818080961704254,
-0.34797847270965576,
0.07401283830404282,
0.08396153897047043,
-0.013736501336097717,
-0.14526544511318207,
-0.026875149458646774,
-0.26117536425590515,
0.27192452549934387,
-0.04895782470703125,
0.38245028257369995,
0.09589309990406036,
-0.23806868493556976,
0.3432270586490631,
0.07465526461601257,
0.3892074525356293,
-0.15574979782104492,
-0.2584359645843506,
0.10909068584442139,
-0.053094882518053055,
0.05138891190290451,
0.2379961460828781,
-0.06922818720340729,
-0.2723952829837799,
-0.08680238574743271,
-0.09206223487854004,
-0.20607644319534302,
-0.2175976037979126,
0.22704839706420898,
0.14523018896579742,
-0.06963617354631424,
0.20754721760749817,
-0.16321344673633575,
-0.3522716164588928,
-0.2033017873764038,
0.18942204117774963,
-0.23570720851421356,
-0.0911974236369133,
-0.36239907145500183,
-0.22418345510959625,
0.29655852913856506,
-0.4351571500301361,
0.11308717727661133,
-0.2447364181280136,
0.05986113101243973,
0.12539729475975037,
-0.17587724328041077,
0.21701395511627197,
0.006027530413120985,
0.5396121144294739,
0.14942781627178192,
0.2369953691959381,
-0.183338463306427,
-0.20219840109348297,
-0.13219475746154785,
0.17581047117710114,
-0.32944247126579285,
0.09618433564901352,
0.4592854082584381,
0.21507330238819122,
-0.4550459682941437,
-0.05226614698767662,
0.1818133294582367,
0.1892581284046173,
-0.0951623022556305,
-0.37005671858787537,
-0.2607990801334381,
-0.10651815682649612,
-0.012803311459720135,
0.024297310039401054,
-0.08956370502710342,
0.09899231791496277,
0.007987385615706444,
-0.31462010741233826,
-0.32443347573280334,
0.09918463975191116,
0.16561728715896606,
0.10580126196146011,
-0.01766512729227543,
0.06831275671720505,
0.31955328583717346,
-0.10843152552843094,
0.40140148997306824,
0.30841246247291565,
0.5160698294639587,
0.0764862596988678,
-0.0506814569234848,
0.2984510362148285,
0.06662111729383469,
0.16466429829597473,
0.34945157170295715,
0.312296599149704,
-0.015764662995934486,
-0.1112191304564476,
0.3868967592716217,
-0.24660995602607727,
0.2226458191871643,
0.18741177022457123,
-0.025089344009757042,
-0.2700062692165375,
-0.06155506148934364,
0.30681297183036804,
0.04652583599090576,
0.04808240756392479,
0.34230726957321167,
-0.06603311002254486,
0.2108376920223236,
-0.076901875436306,
-0.08278219401836395,
0.7730644345283508,
-0.46430957317352295,
0.1185959056019783,
-0.09811462461948395,
0.10709604620933533,
0.18146786093711853,
-0.38358283042907715,
0.006497479509562254,
-0.16080188751220703,
-0.4807470142841339,
0.27660098671913147,
-0.049527499824762344,
-0.0382109172642231,
0.16936048865318298,
-0.013943837024271488,
0.12252543121576309,
-0.019459588453173637,
0.21227790415287018,
-0.2141156643629074,
0.587341845035553,
-0.01873987540602684,
-0.2677222788333893,
-0.49563348293304443,
0.25059595704078674,
0.08140240609645844,
-0.048658985644578934,
-0.11583869904279709,
0.01606309786438942,
-0.05382022261619568,
-0.006880836561322212,
0.12993572652339935,
0.07321129739284515,
-0.06547534465789795,
0.3978103697299957,
-0.17340125143527985,
0.03012736700475216,
-0.09662026911973953,
-0.12283633649349213,
-0.3437366783618927,
0.1971442997455597,
-0.00994491670280695,
0.09953807294368744,
-0.20966000854969025,
0.15655846893787384,
0.03258931636810303,
-0.12482872605323792,
0.0845417007803917,
-0.1024123877286911,
0.01755390129983425,
0.2670862674713135,
0.0036510585341602564,
-0.19903124868869781,
-0.05008236691355705,
0.21031071245670319,
0.17519259452819824,
-0.33644068241119385,
-0.07816231995820999,
-0.05249059945344925,
-0.17027992010116577,
-0.09372061491012573,
0.22593626379966736,
0.21330896019935608,
0.07067963480949402,
0.2268296778202057,
0.2856403887271881,
-0.4186381697654724,
-0.2518540024757385,
0.49206241965293884,
0.16121815145015717,
-0.024405401200056076,
0.45077788829803467,
-0.1078658178448677,
-0.20860101282596588,
-0.2697789967060089,
0.10802949965000153,
0.3454316556453705,
-0.30154088139533997,
0.08166804164648056,
-0.05977127328515053,
-0.11353439092636108,
0.16584813594818115,
-0.15130279958248138,
0.04807592183351517,
-0.10121659934520721,
-0.1825864464044571,
-0.08807960152626038,
-0.3604218661785126,
-0.03880859538912773,
-0.12219026684761047,
-0.08205390721559525,
-0.13013684749603271,
-0.22150225937366486,
-0.13264310359954834,
0.43333226442337036,
-0.4277666211128235,
0.09478595852851868,
-0.10604222863912582,
0.11661987751722336,
0.1653759628534317,
-0.3847518861293793,
0.14376801252365112,
0.12441461533308029,
0.30452948808670044,
-0.03737562894821167,
-0.0720336064696312,
-0.4416823983192444,
0.2211276888847351,
0.06701390445232391,
-0.09255646914243698,
-0.04181074723601341,
-0.09111417084932327,
-0.2544807493686676,
-0.06450352817773819,
-0.16038097441196442,
0.19965125620365143,
-0.17342326045036316,
-0.0601528063416481,
-0.3370034992694855,
0.3270924985408783,
-0.13730782270431519,
-0.1566084623336792,
0.22471202909946442,
0.061864398419857025,
0.24436840415000916,
-0.0159407127648592,
-0.09007253497838974,
0.1894931048154831,
-0.2917207181453705,
-0.13892602920532227,
0.11499106884002686,
0.38883882761001587,
-0.10784175246953964,
0.23351508378982544,
-0.30150407552719116,
0.13660450279712677,
0.22456158697605133,
0.21944890916347504,
0.43979689478874207,
0.17327402532100677,
-0.2647351920604706,
0.005347347352653742,
0.3043404817581177,
-0.09288015961647034,
-0.2405901849269867,
0.08538278937339783,
-0.24714884161949158,
0.24047240614891052,
0.11805988848209381,
-0.06563566625118256,
-0.008833816275000572,
0.12052179872989655,
-0.08888807147741318,
0.019714446738362312,
0.0160811860114336,
-0.246767058968544,
0.21514514088630676,
0.2988736629486084,
-0.1647423356771469,
0.4025062322616577,
0.38289475440979004,
0.0037355865351855755,
0.4056767523288727,
0.1257631629705429,
0.44923895597457886,
-0.1790647953748703,
0.1799972802400589,
-0.3047860264778137,
-0.45128190517425537,
0.1092691421508789,
0.549422025680542,
-0.19404883682727814,
0.09956493973731995,
-0.14278358221054077,
-0.07301966100931168,
0.09349196404218674,
-0.008532802574336529,
-0.3145790696144104,
0.025630850344896317,
-0.2528792917728424,
0.00889144092798233,
0.24126236140727997,
-0.04494328424334526,
-0.11250763386487961,
0.12317194044589996,
-0.2355215698480606,
-0.001031791791319847,
-0.03158656135201454,
0.02519231103360653,
0.1357540786266327,
-0.3508082330226898,
0.043710943311452866,
0.06622905284166336,
0.056696657091379166,
-0.1818954348564148,
0.09972361475229263,
0.03738084062933922,
0.04192356765270233,
0.22508621215820312,
0.1717701107263565,
0.2845744788646698,
0.30800139904022217,
0.17417219281196594,
0.15737131237983704,
0.09817105531692505,
-0.22022365033626556,
-0.28123700618743896,
0.2902633249759674,
0.040612269192934036,
0.212192565202713,
0.24038958549499512,
0.17714063823223114,
-0.40994107723236084,
-0.35276153683662415,
0.01111811026930809,
-0.1861145943403244,
-0.09427782148122787,
-0.032717932015657425,
0.1757751852273941,
-0.2893252968788147,
-0.27246540784835815,
-0.07475240528583527,
-0.3047289252281189,
-0.17687025666236877,
0.26398026943206787,
-0.4871159493923187,
0.05465930700302124,
0.012782633304595947,
0.15308654308319092,
-0.32362693548202515,
0.7160385251045227,
0.17446599900722504,
0.37167805433273315,
-0.26128578186035156,
-0.14033716917037964,
-0.4538108706474304,
0.2955547571182251,
-0.39740586280822754,
-0.0402265340089798,
0.05668874457478523,
0.45953693985939026,
0.3137468099594116,
0.1151585653424263,
0.013926079496741295,
-0.046008411794900894,
-0.03294367343187332,
-0.2736922800540924,
-0.44679272174835205,
-0.000992296845652163,
0.051903847604990005,
0.09433883428573608,
-0.08890106528997421,
-0.5732507109642029,
0.35127344727516174,
-0.06503588706254959,
0.2594696879386902,
0.03325958177447319,
0.05267021432518959,
-0.2693410813808441,
0.4109971523284912,
0.27764132618904114,
-0.0239576306194067,
0.38620689511299133,
-0.03881377354264259,
-0.24116423726081848,
-0.17678137123584747,
-0.038681939244270325,
-0.0502360537648201,
0.12128967046737671,
0.31738489866256714,
-0.19865266978740692,
0.06561336666345596,
0.058499135076999664,
-0.013419226743280888,
0.146941140294075,
-0.11527769267559052,
-0.0031137869227677584,
0.12662287056446075,
-0.08695951104164124,
0.09333285689353943,
0.303137868642807,
0.14276082813739777,
0.12751463055610657,
-0.03661549836397171,
-0.11941581964492798,
-0.21217437088489532,
-0.06305462121963501,
0.24200770258903503,
-0.14294588565826416,
-0.16693924367427826,
-0.259103387594223,
0.39065229892730713,
0.06500154733657837,
0.2733932137489319,
0.012411542236804962,
0.2809833884239197,
0.2810167074203491,
-0.05984469875693321,
-0.03187425434589386,
0.30721911787986755,
-0.13718903064727783,
-0.06950806826353073,
0.031067505478858948,
0.19970479607582092,
-0.11822229623794556,
-0.20942288637161255,
-0.12340974062681198,
-0.025825344026088715
] |
https://github.com/huggingface/datasets/issues/2210
|
dataloading slow when using HUGE dataset
|
Hi, thank you for your answer. I did not realize that my issue stems from the same problem.
|
Hi,
When I use datasets with 600GB data, the dataloading speed increases significantly.
I am experimenting with two datasets, and one is about 60GB and the other 600GB.
Simply speaking, my code uses `datasets.set_format("torch")` function and let pytorch-lightning handle ddp training.
When looking at the pytorch-lightning supported profile of two different runs, I see that fetching a batch(`get_train_batch`) consumes an unreasonable amount of time when data is large. What could be the cause?
* 60GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 200.33 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 71.994 |1 | 71.994 | 35.937 |
run_training_batch | 0.64373 |100 | 64.373 | 32.133 |
optimizer_step_and_closure_0 | 0.64322 |100 | 64.322 | 32.108 |
training_step_and_backward | 0.61004 |100 | 61.004 | 30.452 |
model_backward | 0.37552 |100 | 37.552 | 18.745 |
model_forward | 0.22813 |100 | 22.813 | 11.387 |
training_step | 0.22759 |100 | 22.759 | 11.361 |
get_train_batch | 0.066385 |100 | 6.6385 | 3.3138 |
```
* 600GB data
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 3285.6 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
run_training_epoch | 1397.9 |1 | 1397.9 | 42.546 |
run_training_batch | 7.2596 |100 | 725.96 | 22.095 |
optimizer_step_and_closure_0 | 7.2589 |100 | 725.89 | 22.093 |
training_step_and_backward | 7.223 |100 | 722.3 | 21.984 |
model_backward | 6.9662 |100 | 696.62 | 21.202 |
get_train_batch | 6.322 |100 | 632.2 | 19.241 |
model_forward | 0.24902 |100 | 24.902 | 0.75789 |
training_step | 0.2485 |100 | 24.85 | 0.75633 |
```
| 18 |
dataloading slow when using HUGE dataset
|
[
-0.46786004304885864,
0.09271056950092316,
-0.24258475005626678,
0.22507663071155548,
0.15218883752822876,
-0.02091222256422043,
0.2444206029176712,
0.41463756561279297,
0.13683423399925232,
0.14643827080726624,
-0.2210727035999298,
-0.09887029230594635,
0.10926832258701324,
0.06968370825052261,
-0.35460570454597473,
0.12173345685005188,
-0.05184260755777359,
0.1635529100894928,
-0.329567551612854,
-0.27639058232307434,
0.06570228189229965,
-0.3043351471424103,
-0.0007142871618270874,
-0.1320909559726715,
-0.27191784977912903,
-0.11286262422800064,
0.13741174340248108,
0.20024937391281128,
-0.16095739603042603,
-0.010259619913995266,
-0.12445521354675293,
0.32723283767700195,
-0.021144619211554527,
0.48174965381622314,
-0.00010165198182221502,
0.07449983060359955,
0.1583532989025116,
0.13990862667560577,
-0.4574804902076721,
0.5573951005935669,
0.05116165056824684,
-0.3680476248264313,
-0.08712100237607956,
-0.17396511137485504,
0.01114668883383274,
-0.1665971577167511,
-0.07994496822357178,
-0.221571683883667,
0.28888794779777527,
-0.03329385444521904,
0.2930925190448761,
0.021496301516890526,
-0.2518404722213745,
-0.10946671664714813,
0.03234098479151726,
-0.02226557955145836,
0.004594643134623766,
0.2567807734012604,
0.4880111515522003,
0.07868514955043793,
-0.3903358578681946,
0.08455236256122589,
-0.06682634353637695,
0.0423063226044178,
-0.053239237517118454,
-0.13514962792396545,
-0.1165371686220169,
0.094813771545887,
0.27611058950424194,
0.33568575978279114,
0.4755919277667999,
0.08313441276550293,
-0.14946724474430084,
-0.20793387293815613,
-0.18444719910621643,
-0.2568034529685974,
0.06687604635953903,
-0.037340741604566574,
-0.06836501508951187,
-0.09313280880451202,
-0.061370499432086945,
-0.13188761472702026,
-0.0752619281411171,
-0.0036146831698715687,
-0.08322297036647797,
-0.17976264655590057,
-0.08694281429052353,
-0.04885072261095047,
0.07522322237491608,
-0.23632760345935822,
0.017785944044589996,
-0.1982654631137848,
0.26537612080574036,
0.050264883786439896,
-0.39906975626945496,
-0.03591727092862129,
0.2107207328081131,
-0.032879624515771866,
0.04008636251091957,
-0.11803373694419861,
0.07895360141992569,
0.2501850724220276,
0.022639118134975433,
-0.1739133894443512,
0.4217030704021454,
-0.04760400578379631,
-0.5117993950843811,
-0.19559776782989502,
0.36116093397140503,
-0.031283535063266754,
-0.26152941584587097,
-0.009737766347825527,
-0.1490076631307602,
-0.10911241918802261,
0.2042687088251114,
-0.29980507493019104,
-0.1187702864408493,
-0.12214937061071396,
-0.14455878734588623,
-0.15496370196342468,
0.24171659350395203,
-0.11073926836252213,
0.10421690344810486,
0.4651402533054352,
-0.17536035180091858,
0.1301717758178711,
-0.04962307959794998,
-0.20938324928283691,
-0.1674324870109558,
-0.3122677206993103,
-0.2630142569541931,
-0.17335373163223267,
-0.06148340553045273,
0.08313243836164474,
0.2805020213127136,
-0.07499969750642776,
-0.13223397731781006,
0.009937283582985401,
-0.08785267919301987,
0.018315250054001808,
0.019188106060028076,
-0.2881163954734802,
-0.07800079882144928,
-0.030923407524824142,
-0.022936349734663963,
0.25853025913238525,
-0.052676036953926086,
0.1807328760623932,
-0.1967795491218567,
-0.06673470139503479,
-0.39826884865760803,
-0.2831747531890869,
0.03919845074415207,
0.3116990625858307,
0.10528392344713211,
0.005955170374363661,
-0.18397513031959534,
0.04663693159818649,
-0.28110271692276,
-0.05882691591978073,
-0.41238638758659363,
0.08227550238370895,
0.0763104259967804,
-0.013921626843512058,
0.04186651110649109,
0.36768341064453125,
-0.22175933420658112,
0.16950064897537231,
-0.1754778027534485,
0.1861545890569687,
0.28497520089149475,
0.5548359751701355,
-0.29128095507621765,
0.28488168120384216,
0.030205966904759407,
-0.15758147835731506,
0.41276538372039795,
-0.15125684440135956,
-0.625588059425354,
0.5315316915512085,
-0.26209741830825806,
-0.16613203287124634,
0.3745591938495636,
0.3088013231754303,
0.4069204032421112,
-0.30432701110839844,
0.21264700591564178,
0.4736315608024597,
0.02175736427307129,
0.2726476788520813,
-0.24727994203567505,
-0.1222461611032486,
-0.09347045421600342,
0.5047563314437866,
-0.1451779007911682,
0.10393249988555908,
0.2810700833797455,
0.21856945753097534,
0.2809695303440094,
-0.24471479654312134,
-0.021846355870366096,
0.25394704937934875,
-0.032043371349573135,
-0.07970979809761047,
-0.06537305563688278,
0.1976318359375,
-0.4186663031578064,
0.09396667778491974,
0.22760246694087982,
-0.05972849577665329,
0.2703385055065155,
-0.012208296917378902,
-0.17270134389400482,
-0.1369655728340149,
-0.18150857090950012,
0.3414113521575928,
0.20302064716815948,
0.09320022910833359,
0.15529654920101166,
0.06634382903575897,
0.2245343029499054,
0.22369688749313354,
-0.27914899587631226,
-0.06951430439949036,
-0.13512398302555084,
-0.02016253024339676,
0.24439874291419983,
-0.16505490243434906,
0.349839448928833,
-0.09487100690603256,
-0.00257101864553988,
-0.20524653792381287,
-0.0053300559520721436,
-0.04918700084090233,
-0.09634295850992203,
0.2104269564151764,
0.15309938788414001,
0.21356457471847534,
-0.030581075698137283,
0.08951152116060257,
0.2578136920928955,
-0.05469699203968048,
0.24668237566947937,
-0.12658432126045227,
-0.1325223594903946,
0.2783452272415161,
-0.187541663646698,
0.11911311745643616,
0.3000979721546173,
-0.38996389508247375,
0.3737626075744629,
0.03246397525072098,
0.3877170979976654,
-0.0016189898597076535,
0.40815871953964233,
0.21941129863262177,
0.37336504459381104,
0.3561581075191498,
-0.06759583204984665,
0.01809725910425186,
0.3339029848575592,
-0.060870613902807236,
-0.0303233303129673,
0.11902356892824173,
-0.02134709805250168,
0.005028991959989071,
0.08254549652338028,
-0.161969855427742,
0.32494574785232544,
0.4266197681427002,
0.20353062450885773,
-0.2660510540008545,
0.312590092420578,
-0.22836482524871826,
0.047627124935388565,
-0.06213921681046486,
0.18187856674194336,
0.08452800661325455,
0.21016143262386322,
-0.17673246562480927,
-0.35822731256484985,
-0.2165936529636383,
0.24528126418590546,
0.24779212474822998,
0.05607873946428299,
-0.0022986449766904116,
-0.14370130002498627,
0.015759732574224472,
0.03322342038154602,
0.027099506929516792,
0.14147569239139557,
-0.23649553954601288,
0.055878665298223495,
0.17318980395793915,
-0.048589076846838,
0.06164779141545296,
-0.10389208048582077,
0.17061904072761536,
0.19812794029712677,
-0.23667262494564056,
-0.006898379884660244,
-0.11653386056423187,
-0.03130677342414856,
0.22861461341381073,
0.2501753866672516,
-0.0011987374164164066,
0.14950227737426758,
0.09017402678728104,
-0.026330552995204926,
-0.17129912972450256,
-0.13601240515708923,
0.020337603986263275,
0.11236423999071121,
-0.22288818657398224,
-0.318757027387619,
0.2623365819454193,
0.24167843163013458,
-0.07442770898342133,
0.14110714197158813,
-0.2469554990530014,
-0.106843501329422,
0.21861256659030914,
-0.22248569130897522,
0.07632281631231308,
0.21947766840457916,
-0.27489209175109863,
-0.17297177016735077,
-0.41785168647766113,
0.2211337387561798,
-0.004070351365953684,
0.171428844332695,
0.04378896951675415,
0.10503851622343063,
-0.07670488208532333,
0.19646601378917694,
0.23013874888420105,
-0.04965962469577789,
-0.40918269753456116,
0.23644521832466125,
0.046330492943525314,
-0.34274518489837646,
-0.39335203170776367,
0.0012114616110920906,
0.02427002601325512,
0.33090025186538696,
-0.3321753144264221,
0.1830352246761322,
-0.520125150680542,
0.23370406031608582,
0.01544139627367258,
0.19807352125644684,
-0.014557781629264355,
-0.19818080961704254,
-0.34797847270965576,
0.07401283830404282,
0.08396153897047043,
-0.013736501336097717,
-0.14526544511318207,
-0.026875149458646774,
-0.26117536425590515,
0.27192452549934387,
-0.04895782470703125,
0.38245028257369995,
0.09589309990406036,
-0.23806868493556976,
0.3432270586490631,
0.07465526461601257,
0.3892074525356293,
-0.15574979782104492,
-0.2584359645843506,
0.10909068584442139,
-0.053094882518053055,
0.05138891190290451,
0.2379961460828781,
-0.06922818720340729,
-0.2723952829837799,
-0.08680238574743271,
-0.09206223487854004,
-0.20607644319534302,
-0.2175976037979126,
0.22704839706420898,
0.14523018896579742,
-0.06963617354631424,
0.20754721760749817,
-0.16321344673633575,
-0.3522716164588928,
-0.2033017873764038,
0.18942204117774963,
-0.23570720851421356,
-0.0911974236369133,
-0.36239907145500183,
-0.22418345510959625,
0.29655852913856506,
-0.4351571500301361,
0.11308717727661133,
-0.2447364181280136,
0.05986113101243973,
0.12539729475975037,
-0.17587724328041077,
0.21701395511627197,
0.006027530413120985,
0.5396121144294739,
0.14942781627178192,
0.2369953691959381,
-0.183338463306427,
-0.20219840109348297,
-0.13219475746154785,
0.17581047117710114,
-0.32944247126579285,
0.09618433564901352,
0.4592854082584381,
0.21507330238819122,
-0.4550459682941437,
-0.05226614698767662,
0.1818133294582367,
0.1892581284046173,
-0.0951623022556305,
-0.37005671858787537,
-0.2607990801334381,
-0.10651815682649612,
-0.012803311459720135,
0.024297310039401054,
-0.08956370502710342,
0.09899231791496277,
0.007987385615706444,
-0.31462010741233826,
-0.32443347573280334,
0.09918463975191116,
0.16561728715896606,
0.10580126196146011,
-0.01766512729227543,
0.06831275671720505,
0.31955328583717346,
-0.10843152552843094,
0.40140148997306824,
0.30841246247291565,
0.5160698294639587,
0.0764862596988678,
-0.0506814569234848,
0.2984510362148285,
0.06662111729383469,
0.16466429829597473,
0.34945157170295715,
0.312296599149704,
-0.015764662995934486,
-0.1112191304564476,
0.3868967592716217,
-0.24660995602607727,
0.2226458191871643,
0.18741177022457123,
-0.025089344009757042,
-0.2700062692165375,
-0.06155506148934364,
0.30681297183036804,
0.04652583599090576,
0.04808240756392479,
0.34230726957321167,
-0.06603311002254486,
0.2108376920223236,
-0.076901875436306,
-0.08278219401836395,
0.7730644345283508,
-0.46430957317352295,
0.1185959056019783,
-0.09811462461948395,
0.10709604620933533,
0.18146786093711853,
-0.38358283042907715,
0.006497479509562254,
-0.16080188751220703,
-0.4807470142841339,
0.27660098671913147,
-0.049527499824762344,
-0.0382109172642231,
0.16936048865318298,
-0.013943837024271488,
0.12252543121576309,
-0.019459588453173637,
0.21227790415287018,
-0.2141156643629074,
0.587341845035553,
-0.01873987540602684,
-0.2677222788333893,
-0.49563348293304443,
0.25059595704078674,
0.08140240609645844,
-0.048658985644578934,
-0.11583869904279709,
0.01606309786438942,
-0.05382022261619568,
-0.006880836561322212,
0.12993572652339935,
0.07321129739284515,
-0.06547534465789795,
0.3978103697299957,
-0.17340125143527985,
0.03012736700475216,
-0.09662026911973953,
-0.12283633649349213,
-0.3437366783618927,
0.1971442997455597,
-0.00994491670280695,
0.09953807294368744,
-0.20966000854969025,
0.15655846893787384,
0.03258931636810303,
-0.12482872605323792,
0.0845417007803917,
-0.1024123877286911,
0.01755390129983425,
0.2670862674713135,
0.0036510585341602564,
-0.19903124868869781,
-0.05008236691355705,
0.21031071245670319,
0.17519259452819824,
-0.33644068241119385,
-0.07816231995820999,
-0.05249059945344925,
-0.17027992010116577,
-0.09372061491012573,
0.22593626379966736,
0.21330896019935608,
0.07067963480949402,
0.2268296778202057,
0.2856403887271881,
-0.4186381697654724,
-0.2518540024757385,
0.49206241965293884,
0.16121815145015717,
-0.024405401200056076,
0.45077788829803467,
-0.1078658178448677,
-0.20860101282596588,
-0.2697789967060089,
0.10802949965000153,
0.3454316556453705,
-0.30154088139533997,
0.08166804164648056,
-0.05977127328515053,
-0.11353439092636108,
0.16584813594818115,
-0.15130279958248138,
0.04807592183351517,
-0.10121659934520721,
-0.1825864464044571,
-0.08807960152626038,
-0.3604218661785126,
-0.03880859538912773,
-0.12219026684761047,
-0.08205390721559525,
-0.13013684749603271,
-0.22150225937366486,
-0.13264310359954834,
0.43333226442337036,
-0.4277666211128235,
0.09478595852851868,
-0.10604222863912582,
0.11661987751722336,
0.1653759628534317,
-0.3847518861293793,
0.14376801252365112,
0.12441461533308029,
0.30452948808670044,
-0.03737562894821167,
-0.0720336064696312,
-0.4416823983192444,
0.2211276888847351,
0.06701390445232391,
-0.09255646914243698,
-0.04181074723601341,
-0.09111417084932327,
-0.2544807493686676,
-0.06450352817773819,
-0.16038097441196442,
0.19965125620365143,
-0.17342326045036316,
-0.0601528063416481,
-0.3370034992694855,
0.3270924985408783,
-0.13730782270431519,
-0.1566084623336792,
0.22471202909946442,
0.061864398419857025,
0.24436840415000916,
-0.0159407127648592,
-0.09007253497838974,
0.1894931048154831,
-0.2917207181453705,
-0.13892602920532227,
0.11499106884002686,
0.38883882761001587,
-0.10784175246953964,
0.23351508378982544,
-0.30150407552719116,
0.13660450279712677,
0.22456158697605133,
0.21944890916347504,
0.43979689478874207,
0.17327402532100677,
-0.2647351920604706,
0.005347347352653742,
0.3043404817581177,
-0.09288015961647034,
-0.2405901849269867,
0.08538278937339783,
-0.24714884161949158,
0.24047240614891052,
0.11805988848209381,
-0.06563566625118256,
-0.008833816275000572,
0.12052179872989655,
-0.08888807147741318,
0.019714446738362312,
0.0160811860114336,
-0.246767058968544,
0.21514514088630676,
0.2988736629486084,
-0.1647423356771469,
0.4025062322616577,
0.38289475440979004,
0.0037355865351855755,
0.4056767523288727,
0.1257631629705429,
0.44923895597457886,
-0.1790647953748703,
0.1799972802400589,
-0.3047860264778137,
-0.45128190517425537,
0.1092691421508789,
0.549422025680542,
-0.19404883682727814,
0.09956493973731995,
-0.14278358221054077,
-0.07301966100931168,
0.09349196404218674,
-0.008532802574336529,
-0.3145790696144104,
0.025630850344896317,
-0.2528792917728424,
0.00889144092798233,
0.24126236140727997,
-0.04494328424334526,
-0.11250763386487961,
0.12317194044589996,
-0.2355215698480606,
-0.001031791791319847,
-0.03158656135201454,
0.02519231103360653,
0.1357540786266327,
-0.3508082330226898,
0.043710943311452866,
0.06622905284166336,
0.056696657091379166,
-0.1818954348564148,
0.09972361475229263,
0.03738084062933922,
0.04192356765270233,
0.22508621215820312,
0.1717701107263565,
0.2845744788646698,
0.30800139904022217,
0.17417219281196594,
0.15737131237983704,
0.09817105531692505,
-0.22022365033626556,
-0.28123700618743896,
0.2902633249759674,
0.040612269192934036,
0.212192565202713,
0.24038958549499512,
0.17714063823223114,
-0.40994107723236084,
-0.35276153683662415,
0.01111811026930809,
-0.1861145943403244,
-0.09427782148122787,
-0.032717932015657425,
0.1757751852273941,
-0.2893252968788147,
-0.27246540784835815,
-0.07475240528583527,
-0.3047289252281189,
-0.17687025666236877,
0.26398026943206787,
-0.4871159493923187,
0.05465930700302124,
0.012782633304595947,
0.15308654308319092,
-0.32362693548202515,
0.7160385251045227,
0.17446599900722504,
0.37167805433273315,
-0.26128578186035156,
-0.14033716917037964,
-0.4538108706474304,
0.2955547571182251,
-0.39740586280822754,
-0.0402265340089798,
0.05668874457478523,
0.45953693985939026,
0.3137468099594116,
0.1151585653424263,
0.013926079496741295,
-0.046008411794900894,
-0.03294367343187332,
-0.2736922800540924,
-0.44679272174835205,
-0.000992296845652163,
0.051903847604990005,
0.09433883428573608,
-0.08890106528997421,
-0.5732507109642029,
0.35127344727516174,
-0.06503588706254959,
0.2594696879386902,
0.03325958177447319,
0.05267021432518959,
-0.2693410813808441,
0.4109971523284912,
0.27764132618904114,
-0.0239576306194067,
0.38620689511299133,
-0.03881377354264259,
-0.24116423726081848,
-0.17678137123584747,
-0.038681939244270325,
-0.0502360537648201,
0.12128967046737671,
0.31738489866256714,
-0.19865266978740692,
0.06561336666345596,
0.058499135076999664,
-0.013419226743280888,
0.146941140294075,
-0.11527769267559052,
-0.0031137869227677584,
0.12662287056446075,
-0.08695951104164124,
0.09333285689353943,
0.303137868642807,
0.14276082813739777,
0.12751463055610657,
-0.03661549836397171,
-0.11941581964492798,
-0.21217437088489532,
-0.06305462121963501,
0.24200770258903503,
-0.14294588565826416,
-0.16693924367427826,
-0.259103387594223,
0.39065229892730713,
0.06500154733657837,
0.2733932137489319,
0.012411542236804962,
0.2809833884239197,
0.2810167074203491,
-0.05984469875693321,
-0.03187425434589386,
0.30721911787986755,
-0.13718903064727783,
-0.06950806826353073,
0.031067505478858948,
0.19970479607582092,
-0.11822229623794556,
-0.20942288637161255,
-0.12340974062681198,
-0.025825344026088715
] |
https://github.com/huggingface/datasets/issues/2207
|
making labels consistent across the datasets
|
Hi ! The ClassLabel feature type encodes the labels as integers.
The integer corresponds to the index of the label name in the `names` list of the ClassLabel.
Here that means that the labels are 'entailment' (0), 'neutral' (1), 'contradiction' (2).
You can get the label names back by using `a.features['label'].int2str(i)`.
|
Hi
For accessing the labels one can type
```
>>> a.features['label']
ClassLabel(num_classes=3, names=['entailment', 'neutral', 'contradiction'], names_file=None, id=None)
```
The labels however are not consistent with the actual labels sometimes, for instance in case of XNLI, the actual labels are 0,1,2, but if one try to access as above they are entailment, neutral,contradiction,
it would be great to have the labels consistent.
thanks
| 51 |
making labels consistent across the datasets
|
[
-0.19770100712776184,
-0.007855950854718685,
-0.24613383412361145,
0.22967474162578583,
0.23171186447143555,
-0.12778949737548828,
0.5936294198036194,
0.08079245686531067,
0.09082098305225372,
0.32094237208366394,
-0.22393546998500824,
0.2839377522468567,
0.12439657002687454,
0.3009837865829468,
-0.42008012533187866,
0.048475347459316254,
-0.03523929417133331,
0.2094159722328186,
-0.10289707034826279,
-0.36729899048805237,
-0.03206533566117287,
-0.1789257824420929,
0.011557496152818203,
0.03638998419046402,
-0.36551016569137573,
-0.17166276276111603,
0.12931649386882782,
-0.32742589712142944,
0.20273259282112122,
-0.22589211165905,
0.022345401346683502,
0.49197855591773987,
-0.12376154959201813,
0.23462006449699402,
-0.00009452478843741119,
-0.14829477667808533,
-0.012234397232532501,
-0.012173917144536972,
-0.09992887079715729,
0.04242872819304466,
-0.32293084263801575,
-0.0735417902469635,
-0.07498405128717422,
-0.29539954662323,
-0.045389026403427124,
-0.18997541069984436,
-0.0070410179905593395,
-0.24111990630626678,
-0.1343439519405365,
-0.3703255355358124,
0.3373984396457672,
-0.08709472417831421,
-0.17241807281970978,
-0.021952224895358086,
0.118067666888237,
-0.0193483866751194,
0.1655973494052887,
0.3243124485015869,
0.21790042519569397,
0.08782833069562912,
-0.06170941889286041,
0.5770336985588074,
-0.12105289101600647,
0.27121275663375854,
0.1275186687707901,
0.05423684045672417,
0.24395518004894257,
-0.058128416538238525,
0.0354992114007473,
0.4234374463558197,
0.519752025604248,
-0.32301065325737,
-0.3563805818557739,
-0.30809393525123596,
-0.06909924745559692,
-0.2351011484861374,
-0.1528676450252533,
-0.0032068295404314995,
0.3037004768848419,
-0.10139085352420807,
-0.11824087798595428,
-0.0017444315599277616,
-0.05984116345643997,
0.037715885788202286,
-0.020833846181631088,
0.49487897753715515,
-0.011187376454472542,
-0.062065593898296356,
-0.09457549452781677,
-0.16718828678131104,
0.02022520639002323,
-0.17585064470767975,
0.03472820669412613,
-0.212273970246315,
-0.018675971776247025,
-0.027980942279100418,
-0.3040514588356018,
-0.00622930284589529,
0.09452582150697708,
0.025781672447919846,
0.03925994038581848,
0.05970365181565285,
-0.09361839294433594,
0.07119933515787125,
0.14914238452911377,
0.23006382584571838,
0.3118339776992798,
0.23992210626602173,
0.07701660692691803,
-0.069599948823452,
-0.560577392578125,
0.11931899935007095,
-0.0979580506682396,
-0.13374073803424835,
0.29187190532684326,
-0.03586770221590996,
0.006030667573213577,
-0.30272650718688965,
-0.34997624158859253,
0.06777720898389816,
-0.1463601291179657,
-0.2190360724925995,
-0.05244150012731552,
0.06073162332177162,
0.12934419512748718,
0.1999470293521881,
-0.2127435803413391,
0.2052161693572998,
-0.08062142878770828,
-0.2459903210401535,
-0.36415377259254456,
-0.06007165461778641,
-0.019637737423181534,
0.006524432450532913,
-0.10764952749013901,
0.09567494690418243,
0.20178532600402832,
-0.03336755931377411,
0.13806700706481934,
-0.20895138382911682,
-0.049299441277980804,
-0.0639624372124672,
0.047320302575826645,
-0.2659989297389984,
-0.09504730999469757,
0.2196904718875885,
-0.03295823931694031,
-0.24116025865077972,
-0.22908666729927063,
-0.1387449949979782,
-0.14156268537044525,
0.17055799067020416,
0.26822662353515625,
0.3557278513908386,
0.04443205147981644,
-0.2690727114677429,
0.1103891059756279,
0.18944764137268066,
0.015748223289847374,
-0.18727877736091614,
0.12579016387462616,
-0.08198390156030655,
0.08509723097085953,
0.038383159786462784,
-0.12228795140981674,
0.1407860815525055,
-0.47624900937080383,
-0.3541656732559204,
0.18838399648666382,
0.0262822974473238,
0.004973108880221844,
0.2037004679441452,
0.007896129041910172,
0.10942525416612625,
0.1617891639471054,
0.02886825054883957,
0.23130422830581665,
-0.33008602261543274,
-0.33527693152427673,
-0.1830059289932251,
-0.06208433210849762,
-0.10429665446281433,
0.22578243911266327,
0.14097534120082855,
0.3001439869403839,
-0.13112948834896088,
-0.016922738403081894,
-0.09885206073522568,
-0.058863285928964615,
0.085318922996521,
-0.22590355575084686,
-0.012545798905193806,
0.040217820554971695,
0.1019565686583519,
-0.16224735975265503,
-0.035744573920965195,
0.15713119506835938,
-0.0002041187253780663,
-0.016625726595520973,
-0.23398590087890625,
-0.019132880493998528,
0.35402926802635193,
0.2323731631040573,
0.13134534657001495,
-0.23216137290000916,
0.03250623494386673,
-0.2211276739835739,
-0.13060420751571655,
0.09518591314554214,
0.12977124750614166,
0.29842710494995117,
-0.269959032535553,
-0.23685552179813385,
-0.2695170044898987,
-0.13359495997428894,
0.1620142012834549,
0.3145993649959564,
0.23642116785049438,
-0.12163518369197845,
-0.0378686785697937,
0.08080495148897171,
0.05545409396290779,
-0.14258885383605957,
0.0821729451417923,
0.03351183608174324,
0.03204784914851189,
0.08308755606412888,
0.05216661095619202,
0.10395285487174988,
0.3102775812149048,
0.14859479665756226,
0.0940638855099678,
-0.02774333953857422,
0.018286792561411858,
0.01927756518125534,
0.22089871764183044,
0.22524544596672058,
0.30635249614715576,
0.06546402722597122,
-0.04467210918664932,
0.17569753527641296,
-0.3471316993236542,
-0.09348341822624207,
0.1575014591217041,
-0.05260327085852623,
0.26714593172073364,
-0.13621336221694946,
0.12028848379850388,
-0.036674413830041885,
-0.13057798147201538,
0.025115426629781723,
-0.18055735528469086,
0.0045865667052567005,
-0.3079308569431305,
0.060152702033519745,
-0.13024576008319855,
0.29366952180862427,
0.34328794479370117,
-0.33202022314071655,
0.3665158450603485,
0.4770136773586273,
0.021986791864037514,
0.2023005485534668,
-0.20578044652938843,
-0.2228672206401825,
0.18365447223186493,
0.24216018617153168,
0.32559388875961304,
0.0021135497372597456,
0.49353739619255066,
0.15916718542575836,
-0.11686056852340698,
-0.16352565586566925,
-0.23535247147083282,
-0.0923667773604393,
0.004987010732293129,
0.09811412543058395,
0.0896168127655983,
-0.10548704117536545,
-0.05529642477631569,
-0.032004062086343765,
-0.18494616448879242,
-0.10080468654632568,
-0.04416586086153984,
-0.17330919206142426,
0.08878841996192932,
-0.3024444878101349,
-0.2826172709465027,
-0.43012112379074097,
-0.32737088203430176,
-0.43264392018318176,
-0.33484625816345215,
0.13479481637477875,
0.01247044000774622,
-0.2893666625022888,
0.5626018643379211,
0.014359898865222931,
0.3466685116291046,
-0.07549525052309036,
-0.2264845222234726,
0.09357854723930359,
-0.4939524233341217,
-0.20374509692192078,
0.1909305900335312,
-0.0031113566365092993,
0.021744441241025925,
0.22865773737430573,
-0.21886494755744934,
0.21097655594348907,
-0.11174813657999039,
-0.4175916314125061,
0.03812998905777931,
-0.03701578825712204,
-0.08174308389425278,
-0.08727194368839264,
0.09525813162326813,
-0.18604405224323273,
-0.14581148326396942,
0.10370244085788727,
-0.2004861980676651,
0.11307080835103989,
-0.19204363226890564,
-0.18991313874721527,
-0.23750154674053192,
-0.028886703774333,
-0.3821941018104553,
-0.3069804012775421,
-0.24872231483459473,
-0.002450816798955202,
-0.07236956804990768,
0.11774613708257675,
0.10524439066648483,
-0.16384972631931305,
-0.4207456111907959,
-0.16351918876171112,
0.587321937084198,
-0.25526484847068787,
-0.11556858569383621,
0.17447113990783691,
-0.08997625857591629,
0.11747580766677856,
-0.24654336273670197,
-0.21011897921562195,
0.2943088710308075,
0.06676281988620758,
-0.039202477782964706,
-0.2089882493019104,
0.09767285734415054,
-0.0727790892124176,
0.33656778931617737,
0.4072834253311157,
-0.07816078513860703,
0.23018886148929596,
-0.16736334562301636,
-0.16170522570610046,
-0.21449947357177734,
0.3213920593261719,
-0.08798734843730927,
-0.07517259567975998,
-0.1438640058040619,
-0.14121869206428528,
-0.25406885147094727,
0.15633271634578705,
0.1094689816236496,
-0.3314613699913025,
0.1877681016921997,
0.004279277753084898,
0.3408247232437134,
0.13412487506866455,
0.12260106205940247,
0.12722432613372803,
0.3125523030757904,
-0.003951705526560545,
0.23956674337387085,
-0.1509101241827011,
-0.1033303514122963,
0.0607045516371727,
0.05078952759504318,
-0.429696261882782,
-0.2552661597728729,
-0.1574474573135376,
0.024279609322547913,
0.036362797021865845,
0.21541659533977509,
0.038247689604759216,
-0.18049921095371246,
-0.056268028914928436,
0.0726686641573906,
-0.09699379652738571,
-0.25176799297332764,
-0.04799247905611992,
-0.5742065906524658,
0.03528256341814995,
0.12394939363002777,
0.39950549602508545,
0.06673869490623474,
0.12636610865592957,
0.14007031917572021,
-0.20838186144828796,
-0.18870094418525696,
0.24263086915016174,
0.2365141659975052,
-0.2215823531150818,
-0.06263893097639084,
-0.19611060619354248,
0.2219565212726593,
-0.0045184846967458725,
-0.021361494436860085,
-0.060259860008955,
-0.3251033127307892,
0.12101240456104279,
0.24255266785621643,
-0.49593865871429443,
-0.03509048372507095,
0.15829747915267944,
0.1473797708749771,
-0.1106792464852333,
0.047240570187568665,
-0.0016451322007924318,
0.05188648775219917,
-0.040640827268362045,
0.005391367711126804,
-0.13905297219753265,
0.2181147336959839,
-0.1486435830593109,
0.07609742134809494,
-0.06653470546007156,
0.15825439989566803,
0.39113935828208923,
0.4818841814994812,
0.4273717999458313,
-0.03650522604584694,
-0.0050390600226819515,
0.26274579763412476,
0.3441925644874573,
0.3442249000072479,
0.46626025438308716,
-0.6941599249839783,
-0.2940467894077301,
-0.014455767348408699,
-0.12785670161247253,
0.34226179122924805,
0.28312668204307556,
0.4181673526763916,
-0.07745258510112762,
-0.26409274339675903,
0.03541063517332077,
-0.3026750385761261,
0.17654459178447723,
-0.2171490639448166,
0.33981868624687195,
-0.2794460654258728,
-0.3722556531429291,
0.3295820355415344,
0.22052474319934845,
-0.20804926753044128,
0.21637964248657227,
0.23945780098438263,
-0.21621087193489075,
0.2662012577056885,
0.16331279277801514,
0.8228636980056763,
0.05902290344238281,
0.07899847626686096,
-0.1147235557436943,
-0.15983761847019196,
0.4442572295665741,
-0.11891427636146545,
0.049006540328264236,
-0.41108933091163635,
-0.266671746969223,
0.05989915132522583,
-0.008791337721049786,
-0.2256094366312027,
0.4948889911174774,
0.01778256520628929,
0.4689677059650421,
0.1811673939228058,
0.03037864901125431,
-0.11869557201862335,
0.09845753759145737,
0.0697292760014534,
-0.09802732616662979,
-0.05523302033543587,
0.1794106811285019,
-0.19488389790058136,
0.16327597200870514,
-0.21572133898735046,
-0.004550940357148647,
-0.1275494396686554,
-0.057052817195653915,
0.22044703364372253,
-0.10071096569299698,
0.02248217724263668,
-0.11692392081022263,
0.04471559077501297,
0.006635362282395363,
-0.25036710500717163,
-0.15107430517673492,
0.588681161403656,
-0.019137809053063393,
0.15557345747947693,
0.08345646411180496,
0.1963878870010376,
0.37144625186920166,
0.12764550745487213,
-0.05304637923836708,
0.21728049218654633,
0.297658771276474,
-0.18153902888298035,
-0.21820256114006042,
0.3104645013809204,
-0.07424041628837585,
-0.44113069772720337,
-0.2694389522075653,
-0.16458140313625336,
-0.18496327102184296,
0.2311951220035553,
0.17691321671009064,
0.1268560290336609,
-0.10593337565660477,
0.26472923159599304,
-0.10095024853944778,
0.0998956710100174,
0.3699105679988861,
0.22848297655582428,
-0.2699207365512848,
-0.28470465540885925,
0.04059898108243942,
-0.08399523794651031,
0.1565263718366623,
-0.07371503859758377,
-0.3570858836174011,
-0.2276614010334015,
-0.2794494330883026,
0.11013155430555344,
0.2361435443162918,
-0.31012892723083496,
-0.03565121442079544,
-0.2217639535665512,
-0.30047351121902466,
0.015695618465542793,
0.29529643058776855,
0.29006361961364746,
0.47996100783348083,
0.17765076458454132,
-0.1884084790945053,
-0.153679758310318,
0.38754358887672424,
0.042117584496736526,
0.4114261567592621,
0.16857914626598358,
0.08506718277931213,
-0.30484843254089355,
0.12497210502624512,
-0.5132281184196472,
-0.20539067685604095,
0.124946229159832,
0.03686344251036644,
-0.01876097545027733,
0.021419687196612358,
0.08517292886972427,
-0.06023767590522766,
0.32292288541793823,
0.10020048171281815,
-0.01438763365149498,
-0.3348841965198517,
-0.23193760216236115,
0.03745412454009056,
-0.1970556378364563,
0.15056508779525757,
-0.24437561631202698,
-0.09086558222770691,
0.29420843720436096,
-0.39432141184806824,
0.07780781388282776,
0.12104114890098572,
0.10988783836364746,
0.47009849548339844,
-0.06461334228515625,
0.13508586585521698,
-0.04450191929936409,
0.08002834767103195,
0.22845211625099182,
-0.004314957186579704,
0.21289777755737305,
0.11133275926113129,
-0.09591007232666016,
0.0758792906999588,
0.12450914084911346,
0.03956872969865799,
0.12196071445941925,
-0.005392066203057766,
-0.19222843647003174,
-0.0036640064790844917,
0.018285740166902542,
0.46215981245040894,
0.3147490620613098,
0.3813672363758087,
-0.24031773209571838,
-0.34850820899009705,
0.14248839020729065,
0.4659012258052826,
-0.2103731483221054,
-0.1741543710231781,
0.2550572454929352,
0.05205801874399185,
0.21084187924861908,
0.500397801399231,
0.3545971214771271,
0.1077563688158989,
-0.0774238184094429,
0.040116991847753525,
0.2535073459148407,
-0.2542146146297455,
0.32490071654319763,
0.27252277731895447,
0.09921683371067047,
0.015043448656797409,
0.5023253560066223,
0.34288814663887024,
0.16844338178634644,
0.24394561350345612,
0.19404718279838562,
0.35397869348526,
-0.18912971019744873,
-0.20923100411891937,
0.005454718135297298,
0.09722726792097092,
0.20340800285339355,
0.3260630667209625,
0.05584009364247322,
0.13451044261455536,
0.08303382247686386,
-0.16561999917030334,
-0.26517245173454285,
-0.2677905261516571,
0.034244995564222336,
0.020417623221874237,
-0.15583808720111847,
-0.22176630795001984,
-0.19717001914978027,
-0.27940672636032104,
-0.03780849277973175,
-0.22568897902965546,
-0.050258196890354156,
-0.28001925349235535,
0.30359572172164917,
0.01358726341277361,
0.12134751677513123,
-0.3843453824520111,
-0.33872750401496887,
0.16205506026744843,
0.35414183139801025,
-0.06974845379590988,
0.16644424200057983,
0.09797833859920502,
-0.18217191100120544,
0.43948280811309814,
0.2845602333545685,
0.02401484176516533,
-0.024601958692073822,
0.09362013638019562,
-0.27503952383995056,
-0.059579577296972275,
-0.23464952409267426,
-0.03857012093067169,
-0.1418524533510208,
0.20719920098781586,
-0.29006585478782654,
0.433218389749527,
0.33700329065322876,
-0.20231762528419495,
0.29221275448799133,
0.06618664413690567,
0.026438666507601738,
-0.05202699452638626,
0.1707105189561844,
0.30546191334724426,
0.006821879651397467,
-0.01126581709831953,
-0.028989549726247787,
-0.2354789823293686,
-0.14328935742378235,
0.23011142015457153,
-0.06758579611778259,
0.15251320600509644,
-0.1759006530046463,
0.19006331264972687,
0.2571844458580017,
0.021693237125873566,
0.1439628154039383,
0.06629196554422379,
-0.18848817050457,
-0.011330822482705116,
-0.4924266040325165,
0.199771448969841,
-0.06761320680379868,
-0.3344522714614868,
-0.17858292162418365,
0.07609401643276215,
0.2046613097190857,
-0.0014982165303081274,
0.27523213624954224,
-0.07539341598749161,
0.14823521673679352,
-0.08740800619125366,
-0.5530561804771423,
-0.12774133682250977,
0.07488321512937546,
-0.12047791481018066,
0.2592364549636841,
-0.1060749888420105,
-0.062095757573843,
0.11744106560945511,
0.22234903275966644,
-0.06644213199615479,
0.3077329993247986,
0.1248469278216362,
0.24937735497951508,
0.20342309772968292,
-0.15016894042491913,
0.40961411595344543,
-0.11494158208370209,
-0.1423785239458084,
0.05135349929332733,
-0.22338610887527466,
-0.3775816261768341,
0.1736472249031067,
-0.12813954055309296,
0.2248259037733078,
-0.10670097917318344,
-0.011366359889507294,
-0.1558915227651596,
-0.21642683446407318,
-0.0017086827429011464,
0.06293753534555435,
-0.10232308506965637,
0.07683264464139938,
0.14018628001213074,
-0.11615442484617233,
0.14740295708179474,
0.35475239157676697,
0.2485552579164505,
0.27431079745292664,
0.04122348129749298,
-0.24313093721866608,
0.3295036256313324,
0.02288602851331234,
-0.1992250680923462,
-0.062248438596725464,
0.14391806721687317,
0.20289404690265656,
-0.15747994184494019,
-0.3698500394821167,
0.2151748389005661,
0.4660905599594116,
-0.1787218451499939,
-0.14232824742794037,
0.10487717390060425,
0.06134096905589104,
-0.04652919992804527,
-0.12852515280246735,
0.27889665961265564,
0.10788493603467941,
-0.34670770168304443,
-0.18228958547115326,
-0.24579139053821564
] |
https://github.com/huggingface/datasets/issues/2206
|
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
Hi,
the output of the tokenizers is treated specially in the lib to optimize the dataset size (see the code [here](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_writer.py#L138-L141)). It looks like that one of the values in a dictionary returned by the tokenizer is out of the assumed range.
Can you please provide a minimal reproducible example for more help?
|
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
| 53 |
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
[
-0.30897170305252075,
0.4055931568145752,
-0.07608239352703094,
0.03618088737130165,
0.36590299010276794,
-0.14709879457950592,
0.1483515053987503,
0.12841637432575226,
-0.3896856904029846,
0.04695077985525131,
-0.14953932166099548,
0.5155912637710571,
-0.1445295810699463,
0.05200037360191345,
0.13605378568172455,
-0.05998845770955086,
0.15429650247097015,
0.42665979266166687,
0.256109356880188,
0.05443771183490753,
-0.0707269236445427,
0.10945941507816315,
-0.1680394560098648,
0.3761958181858063,
-0.49062082171440125,
-0.029642747715115547,
0.03350016847252846,
0.11923826485872269,
-0.2120494395494461,
-0.6330580711364746,
-0.16227702796459198,
0.22744697332382202,
0.20422163605690002,
0.2120445817708969,
-0.00010684304288588464,
0.08612442761659622,
0.18671952188014984,
0.05093606561422348,
-0.135593980550766,
0.0812402293086052,
0.167697936296463,
-0.07285735756158829,
0.048738207668066025,
-0.14014330506324768,
0.10583125799894333,
-0.709212064743042,
-0.021385731175541878,
0.27964943647384644,
0.20057722926139832,
0.37240901589393616,
0.2777716815471649,
0.5433839559555054,
0.0372563898563385,
-0.050568219274282455,
0.5747066736221313,
-0.04956657811999321,
0.10765888541936874,
0.060507241636514664,
0.1941862553358078,
-0.053756073117256165,
-0.11220098286867142,
-0.011184762232005596,
-0.09648102521896362,
-0.09746017307043076,
0.07040567696094513,
0.07537294924259186,
-0.007009005174040794,
-0.004612604156136513,
0.08220739662647247,
-0.08879974484443665,
0.38174688816070557,
-0.2900778353214264,
-0.11621007323265076,
-0.009967274963855743,
-0.008918781764805317,
-0.3989097476005554,
0.04620549455285072,
-0.07729929685592651,
-0.10706305503845215,
0.012882656417787075,
0.07972171902656555,
-0.065013088285923,
-0.16352199018001556,
0.2718081772327423,
-0.2456239014863968,
0.45515167713165283,
-0.00642046332359314,
0.12027042359113693,
-0.15856756269931793,
-0.13465678691864014,
0.16571994125843048,
0.024167979136109352,
-0.15089912712574005,
0.14763861894607544,
-0.12216559797525406,
0.02079036645591259,
-0.004778334405273199,
-0.10887220501899719,
0.20923025906085968,
0.10328676551580429,
-0.11153604835271835,
0.2660713195800781,
0.16684123873710632,
0.21492169797420502,
-0.09203264117240906,
0.15667319297790527,
-0.0665196105837822,
0.2351931482553482,
0.19046953320503235,
-0.27704358100891113,
-0.12073125690221786,
-0.06829943507909775,
-0.3081552982330322,
-0.055579107254743576,
0.19701126217842102,
-0.1363135725259781,
0.07898560166358948,
0.02248416841030121,
-0.16048774123191833,
0.06294962763786316,
-0.22300860285758972,
-0.0010947718983516097,
0.07115977257490158,
0.46591195464134216,
0.10303644090890884,
-0.34996578097343445,
-0.3529745638370514,
0.3955211043357849,
-0.1916089504957199,
-0.13974449038505554,
-0.2523546516895294,
0.150193452835083,
-0.06993371993303299,
-0.02837025560438633,
0.14322248101234436,
0.15478476881980896,
0.23784710466861725,
0.17771971225738525,
0.062209706753492355,
0.0685104951262474,
0.16932691633701324,
-0.012075666338205338,
-0.034804437309503555,
0.16605797410011292,
0.13749630749225616,
0.16142457723617554,
0.028616299852728844,
-0.30149897933006287,
-0.026846831664443016,
0.19841919839382172,
-0.06777612119913101,
-0.40250861644744873,
-0.31008556485176086,
0.2656112611293793,
-0.1478831022977829,
-0.21451307833194733,
-0.16411682963371277,
0.05558066815137863,
0.2179000824689865,
-0.21342813968658447,
-0.15917259454727173,
-0.11336283385753632,
0.10289853066205978,
-0.2378131002187729,
0.21065565943717957,
-0.05797901749610901,
-0.45628151297569275,
-0.13843441009521484,
0.20925967395305634,
-0.27850887179374695,
0.33993157744407654,
0.3796745538711548,
-0.2668919861316681,
0.41579505801200867,
-0.25097110867500305,
0.8668917417526245,
0.44677841663360596,
-0.02490997686982155,
-0.26473677158355713,
0.0037575573660433292,
-0.16977670788764954,
-0.13608139753341675,
0.04563954472541809,
-0.0011625641491264105,
0.43838006258010864,
0.08135829120874405,
0.16278710961341858,
0.15922483801841736,
0.09208361804485321,
0.07727635651826859,
-0.1863395869731903,
-0.019970187917351723,
0.2616305351257324,
0.21780286729335785,
0.14471480250358582,
-0.06738840788602829,
0.10835108160972595,
-0.11710494011640549,
0.006070719100534916,
-0.31598159670829773,
0.0810050293803215,
-0.07522521913051605,
0.294725626707077,
0.10643686354160309,
0.05217352136969566,
-0.07274366170167923,
-0.12202771753072739,
0.0608065091073513,
-0.22057540714740753,
0.16095459461212158,
-0.4041179120540619,
-0.10160773992538452,
-0.3508574366569519,
0.21713189780712128,
-0.2074071317911148,
0.054863981902599335,
0.24829119443893433,
0.13057447969913483,
-0.08503589034080505,
0.28695565462112427,
-0.008851425722241402,
-0.2644532322883606,
0.143127903342247,
0.12063690274953842,
0.28770139813423157,
0.17252270877361298,
-0.24641600251197815,
-0.48015546798706055,
0.08668400347232819,
0.12271832674741745,
0.2584191560745239,
0.0005567671032622457,
0.021385811269283295,
0.18055982887744904,
0.023171478882431984,
-0.057772956788539886,
-0.2645532488822937,
0.041315771639347076,
0.0028003256302326918,
-0.08859682083129883,
-0.0021094484254717827,
-0.10591260343790054,
0.0880884900689125,
-0.09896037727594376,
0.3821808993816376,
0.34586381912231445,
0.3512187898159027,
-0.15592561662197113,
-0.057151373475790024,
-0.10886159539222717,
0.41896915435791016,
-0.04119434580206871,
0.2659563720226288,
-0.1569688618183136,
-0.053304072469472885,
0.2814994156360626,
0.22704488039016724,
-0.02913569286465645,
-0.18700425326824188,
-0.046371687203645706,
0.27512437105178833,
-0.14191311597824097,
0.22527219355106354,
-0.06374654173851013,
-0.23195351660251617,
-0.1274203658103943,
0.21089455485343933,
-0.36873650550842285,
0.21617427468299866,
0.3495454490184784,
-0.04341783747076988,
0.016065847128629684,
-0.15647536516189575,
-0.26138436794281006,
0.1437440812587738,
0.0009382247808389366,
-0.04472490772604942,
0.3564412295818329,
0.2837355434894562,
-0.051114968955516815,
-0.5715952515602112,
-0.11474744230508804,
0.19952774047851562,
0.20824435353279114,
-0.39812973141670227,
-0.04964565485715866,
-0.20723272860050201,
-0.1593366116285324,
0.2349129319190979,
-0.3719785213470459,
-0.03269167244434357,
-0.2440781146287918,
0.29789507389068604,
0.08388195931911469,
-0.005095146596431732,
0.40325385332107544,
0.13971228897571564,
0.16433292627334595,
0.09831909090280533,
-0.03256456181406975,
-0.19435670971870422,
-0.25741589069366455,
-0.43839743733406067,
0.14590714871883392,
0.17331665754318237,
0.00971483625471592,
0.2719748914241791,
0.016300728544592857,
0.14338378608226776,
-0.21649444103240967,
-0.5072538256645203,
0.22909307479858398,
-0.025162216275930405,
0.26944974064826965,
0.06254591792821884,
-0.07352300733327866,
0.0419851690530777,
-0.40535789728164673,
0.3040679395198822,
-0.15629027783870697,
-0.270226389169693,
0.16793227195739746,
-0.27997562289237976,
-0.2417411059141159,
-0.07538622617721558,
-0.10810532420873642,
-0.22493040561676025,
-0.08681811392307281,
-0.09031520038843155,
0.103107750415802,
0.12265992164611816,
-0.1955285221338272,
0.08684083819389343,
0.0964142456650734,
-0.19266733527183533,
-0.2548818290233612,
-0.33381715416908264,
0.004083935637027025,
0.49443286657333374,
-0.3106500208377838,
-0.33828237652778625,
0.09779979288578033,
-0.20131585001945496,
0.23685458302497864,
0.10276784747838974,
-0.20165890455245972,
0.0024379717651754618,
0.02878461964428425,
0.44856956601142883,
-0.08284859359264374,
-0.15224875509738922,
0.11880947649478912,
0.027854837477207184,
-0.1820821315050125,
0.010759538970887661,
-0.13392698764801025,
-0.06368350982666016,
-0.2717314660549164,
-0.04215322434902191,
-0.3543474078178406,
0.29789629578590393,
0.05386500805616379,
0.7404306530952454,
-0.5370520949363708,
-0.12117420881986618,
0.5505082011222839,
-0.4353282153606415,
0.14656037092208862,
-0.03923884034156799,
-0.08729895949363708,
0.030474932864308357,
0.03221968561410904,
-0.016824379563331604,
0.26638564467430115,
-0.19834476709365845,
-0.2875024378299713,
0.2601868808269501,
-0.04508640989661217,
-0.1954939067363739,
-0.18650655448436737,
0.1126093789935112,
0.15539893507957458,
0.009531932882964611,
0.1079244315624237,
0.03605683147907257,
-0.2964444160461426,
-0.08382054418325424,
0.14378933608531952,
-0.030490029603242874,
-0.28843384981155396,
-0.030787581577897072,
-0.6243004202842712,
0.05422402545809746,
-0.3421120345592499,
0.258767306804657,
0.16356490552425385,
0.26126760244369507,
-0.06161104142665863,
-0.041257258504629135,
0.14127862453460693,
-0.1078895553946495,
0.7498197555541992,
0.0916622132062912,
-0.01656743325293064,
0.22620606422424316,
-0.004279387183487415,
-0.28557685017585754,
-0.16657841205596924,
-0.21745891869068146,
0.19861653447151184,
0.1432514190673828,
0.4252372086048126,
-0.3894381821155548,
0.060357049107551575,
-0.07648476213216782,
-0.11364446580410004,
-0.04898932948708534,
-0.24099749326705933,
-0.1369180977344513,
-0.28232747316360474,
-0.5182370543479919,
0.12678216397762299,
0.024863561615347862,
0.33603158593177795,
0.09031731635332108,
-0.22185668349266052,
-0.1575891375541687,
-0.08876614272594452,
0.0057285805232822895,
0.2584598660469055,
0.07943981885910034,
0.012811058200895786,
-0.1100349947810173,
-0.06133390590548515,
-0.07123486697673798,
0.4190424084663391,
0.03155180811882019,
0.32806578278541565,
-0.5093815922737122,
-0.04448726773262024,
-0.017156386747956276,
0.25280246138572693,
0.05243675783276558,
-0.14383909106254578,
0.3167624771595001,
-0.14389899373054504,
0.050471123307943344,
0.06678938865661621,
0.5942487716674805,
0.24734511971473694,
-0.04612373188138008,
-0.3125636875629425,
0.0872403085231781,
0.09281887114048004,
-0.03822912275791168,
-0.07098335027694702,
-0.029804544523358345,
0.06288086622953415,
-0.37341225147247314,
0.447323203086853,
0.09258286654949188,
0.7007001638412476,
-0.17073999345302582,
0.30534282326698303,
0.6452827453613281,
-0.10880540311336517,
0.2540002763271332,
-0.2714126408100128,
-0.142194926738739,
-0.3598727881908417,
0.14066515862941742,
0.1268530935049057,
-0.11925090104341507,
-0.045587752014398575,
0.1679883450269699,
-0.14322993159294128,
-0.09371118247509003,
-0.01546104159206152,
0.4786778688430786,
0.1942773461341858,
0.3889674246311188,
0.057145651429891586,
-0.16987639665603638,
-0.18317332863807678,
0.21390503644943237,
-0.04444378986954689,
-0.06983869522809982,
-0.1924707591533661,
-0.002798971487209201,
0.04208268225193024,
-0.23006655275821686,
0.038358524441719055,
0.004677572287619114,
-0.296299546957016,
0.28108665347099304,
0.20459438860416412,
-0.14193503558635712,
-0.0985553190112114,
-0.06549879163503647,
0.0020430602598935366,
0.13173945248126984,
-0.08900715410709381,
0.21441492438316345,
-0.03892461210489273,
-0.18957306444644928,
-0.16483648121356964,
-0.20852263271808624,
-0.026392344385385513,
-0.11788799613714218,
-0.2213272899389267,
0.2864733040332794,
0.056477516889572144,
-0.1605992615222931,
-0.07816775888204575,
-0.03973837569355965,
0.3070293366909027,
-0.4019243121147156,
0.05719399452209473,
-0.3252283036708832,
0.20253761112689972,
-0.24396882951259613,
0.18957370519638062,
-0.0389423631131649,
-0.021777518093585968,
-0.021355047821998596,
0.07561555504798889,
0.026173055171966553,
-0.1517265886068344,
0.08328773081302643,
-0.1518092006444931,
-0.0018282224191352725,
0.70506352186203,
0.04057884216308594,
-0.11295051127672195,
-0.203643798828125,
-0.08539561182260513,
0.25474461913108826,
-0.302349716424942,
0.08252830803394318,
0.1992599219083786,
-0.15453267097473145,
-0.12462969869375229,
0.3978864848613739,
0.1624492108821869,
-0.023472553119063377,
0.11338446289300919,
-0.27097976207733154,
-0.3463476300239563,
0.05753840506076813,
0.07800201326608658,
0.16644911468029022,
0.3028993606567383,
0.4726239740848541,
-0.3015042841434479,
0.20820026099681854,
-0.38536420464515686,
0.0686919242143631,
-0.23845067620277405,
0.15259763598442078,
-0.3551488220691681,
-0.20526023209095,
-0.10282757878303528,
0.10746365040540695,
0.2787960171699524,
0.09280425310134888,
-0.06836003065109253,
-0.28819170594215393,
-0.2296648472547531,
0.08471851050853729,
0.26504790782928467,
-0.2120727300643921,
0.12375926971435547,
0.11278105527162552,
-0.0015063066966831684,
-0.056517813354730606,
0.3081408739089966,
0.0776202380657196,
-0.2505300045013428,
0.1111036092042923,
0.592181384563446,
-0.07659949362277985,
-0.16456571221351624,
0.006106678396463394,
-0.07839427888393402,
0.0988008975982666,
0.18455375730991364,
0.2819567620754242,
-0.21413789689540863,
-0.007205369882285595,
0.3499433100223541,
0.18659856915473938,
0.4559263288974762,
0.03263036534190178,
0.049123022705316544,
-0.3490314185619354,
-0.21375052630901337,
-0.01965942792594433,
0.0012266056146472692,
0.13824042677879333,
-0.3447354733943939,
-0.2978059649467468,
0.4043281078338623,
0.28670534491539,
-0.16024579107761383,
-0.325697660446167,
0.19166412949562073,
-0.32268840074539185,
-0.006972617004066706,
0.05651424080133438,
0.2503926455974579,
-0.14390993118286133,
-0.041489679366350174,
0.04562745615839958,
0.4177839159965515,
0.1997782438993454,
-0.3197242021560669,
-0.07975970953702927,
-0.3528236448764801,
0.0765819251537323,
0.40182819962501526,
0.19015654921531677,
-0.06661178171634674,
0.27333348989486694,
-0.24564382433891296,
0.19716212153434753,
0.058029018342494965,
0.1831250637769699,
-0.004915105178952217,
-0.3754424750804901,
-0.04509561136364937,
0.14054922759532928,
0.26847994327545166,
-0.06901361048221588,
0.09235255420207977,
0.3056265711784363,
0.4787783920764923,
0.13407491147518158,
-0.0058572678826749325,
0.38911429047584534,
-0.23005419969558716,
-0.161634624004364,
-0.4251536726951599,
-0.11394060403108597,
-0.03068598546087742,
-0.01748107559978962,
-0.16156186163425446,
-0.18296031653881073,
-0.22248221933841705,
-0.0033166632056236267,
-0.1830255687236786,
-0.31411638855934143,
0.3666456937789917,
0.11654941737651825,
-0.3271212875843048,
-0.27766212821006775,
0.28810760378837585,
-0.03879551216959953,
-0.05340995639562607,
0.27640068531036377,
-0.010955440811812878,
0.688417911529541,
0.2924543023109436,
-0.12287421524524689,
-0.07927059382200241,
-0.3259628713130951,
-0.026736119762063026,
-0.09096323698759079,
0.2114732265472412,
0.30305901169776917,
0.1856168508529663,
0.1467868685722351,
0.2025323212146759,
-0.27970653772354126,
-0.22801820933818817,
0.31840789318084717,
-0.1688210517168045,
0.22123460471630096,
-0.11196320503950119,
0.05387839302420616,
-0.31209778785705566,
-0.1559111326932907,
0.03504941612482071,
-0.2352515161037445,
0.08887821435928345,
0.3028607964515686,
0.08443954586982727,
0.19256916642189026,
-0.10659769922494888,
0.14272120594978333,
-0.10733243077993393,
0.5459739565849304,
0.3189663290977478,
0.20246832072734833,
-0.3789909780025482,
-0.13727641105651855,
-0.5676916241645813,
0.442623108625412,
-0.1167263388633728,
-0.12072008103132248,
0.09621674567461014,
0.15912018716335297,
0.1832960844039917,
0.04763878881931305,
-0.06366799026727676,
0.44304728507995605,
-0.3306940197944641,
0.0057580131106078625,
-0.3567465543746948,
0.2899416387081146,
0.10109934210777283,
-0.04996560141444206,
-0.067470982670784,
-0.1776786744594574,
0.2722306549549103,
-0.3564906716346741,
0.21251210570335388,
-0.11970200389623642,
-0.13601280748844147,
0.004999988712370396,
-0.09613579511642456,
0.4867601692676544,
-0.006344574503600597,
0.496871680021286,
-0.1446746587753296,
0.4019797444343567,
0.038874298334121704,
-0.24481284618377686,
-0.2022351175546646,
0.04249754175543785,
0.10351825505495071,
0.15506203472614288,
0.15566639602184296,
0.15217624604701996,
-0.18365179002285004,
0.15249089896678925,
-0.012598208151757717,
-0.12019450217485428,
-0.0030115817207843065,
0.46110332012176514,
-0.04363923519849777,
0.033128269016742706,
-0.22885315120220184,
0.027642440050840378,
0.15263588726520538,
0.2267368733882904,
-0.27045661211013794,
-0.4732050597667694,
0.365266889333725,
-0.5546078681945801,
-0.35777610540390015,
-0.07633950561285019,
0.03622787818312645,
0.22483119368553162,
-0.15258067846298218,
-0.1592683345079422,
0.05694133788347244,
0.43299922347068787,
-0.06775245070457458,
-0.2632969915866852,
0.18779852986335754,
0.0935552790760994,
-0.0032134936191141605,
-0.09110217541456223,
0.26139944791793823,
0.07837457954883575,
-0.09310419857501984,
-0.2422768771648407,
-0.32711103558540344
] |
https://github.com/huggingface/datasets/issues/2206
|
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
Hi @yana-xuyan, thanks for reporting.
As clearly @mariosasko explained, `datasets` performs some optimizations in order to reduce the size of the dataset cache files. And one of them is storing the field `special_tokens_mask` as `int8`, which means that this field can only contain integers between `-128` to `127`. As your message error states, one of the values of this field is `50259`, and therefore it cannot be stored as an `int8`.
Maybe we could implement a way to disable this optimization and allow using any integer value; although the size of the cache files would be much larger.
|
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
| 98 |
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
[
-0.30897170305252075,
0.4055931568145752,
-0.07608239352703094,
0.03618088737130165,
0.36590299010276794,
-0.14709879457950592,
0.1483515053987503,
0.12841637432575226,
-0.3896856904029846,
0.04695077985525131,
-0.14953932166099548,
0.5155912637710571,
-0.1445295810699463,
0.05200037360191345,
0.13605378568172455,
-0.05998845770955086,
0.15429650247097015,
0.42665979266166687,
0.256109356880188,
0.05443771183490753,
-0.0707269236445427,
0.10945941507816315,
-0.1680394560098648,
0.3761958181858063,
-0.49062082171440125,
-0.029642747715115547,
0.03350016847252846,
0.11923826485872269,
-0.2120494395494461,
-0.6330580711364746,
-0.16227702796459198,
0.22744697332382202,
0.20422163605690002,
0.2120445817708969,
-0.00010684304288588464,
0.08612442761659622,
0.18671952188014984,
0.05093606561422348,
-0.135593980550766,
0.0812402293086052,
0.167697936296463,
-0.07285735756158829,
0.048738207668066025,
-0.14014330506324768,
0.10583125799894333,
-0.709212064743042,
-0.021385731175541878,
0.27964943647384644,
0.20057722926139832,
0.37240901589393616,
0.2777716815471649,
0.5433839559555054,
0.0372563898563385,
-0.050568219274282455,
0.5747066736221313,
-0.04956657811999321,
0.10765888541936874,
0.060507241636514664,
0.1941862553358078,
-0.053756073117256165,
-0.11220098286867142,
-0.011184762232005596,
-0.09648102521896362,
-0.09746017307043076,
0.07040567696094513,
0.07537294924259186,
-0.007009005174040794,
-0.004612604156136513,
0.08220739662647247,
-0.08879974484443665,
0.38174688816070557,
-0.2900778353214264,
-0.11621007323265076,
-0.009967274963855743,
-0.008918781764805317,
-0.3989097476005554,
0.04620549455285072,
-0.07729929685592651,
-0.10706305503845215,
0.012882656417787075,
0.07972171902656555,
-0.065013088285923,
-0.16352199018001556,
0.2718081772327423,
-0.2456239014863968,
0.45515167713165283,
-0.00642046332359314,
0.12027042359113693,
-0.15856756269931793,
-0.13465678691864014,
0.16571994125843048,
0.024167979136109352,
-0.15089912712574005,
0.14763861894607544,
-0.12216559797525406,
0.02079036645591259,
-0.004778334405273199,
-0.10887220501899719,
0.20923025906085968,
0.10328676551580429,
-0.11153604835271835,
0.2660713195800781,
0.16684123873710632,
0.21492169797420502,
-0.09203264117240906,
0.15667319297790527,
-0.0665196105837822,
0.2351931482553482,
0.19046953320503235,
-0.27704358100891113,
-0.12073125690221786,
-0.06829943507909775,
-0.3081552982330322,
-0.055579107254743576,
0.19701126217842102,
-0.1363135725259781,
0.07898560166358948,
0.02248416841030121,
-0.16048774123191833,
0.06294962763786316,
-0.22300860285758972,
-0.0010947718983516097,
0.07115977257490158,
0.46591195464134216,
0.10303644090890884,
-0.34996578097343445,
-0.3529745638370514,
0.3955211043357849,
-0.1916089504957199,
-0.13974449038505554,
-0.2523546516895294,
0.150193452835083,
-0.06993371993303299,
-0.02837025560438633,
0.14322248101234436,
0.15478476881980896,
0.23784710466861725,
0.17771971225738525,
0.062209706753492355,
0.0685104951262474,
0.16932691633701324,
-0.012075666338205338,
-0.034804437309503555,
0.16605797410011292,
0.13749630749225616,
0.16142457723617554,
0.028616299852728844,
-0.30149897933006287,
-0.026846831664443016,
0.19841919839382172,
-0.06777612119913101,
-0.40250861644744873,
-0.31008556485176086,
0.2656112611293793,
-0.1478831022977829,
-0.21451307833194733,
-0.16411682963371277,
0.05558066815137863,
0.2179000824689865,
-0.21342813968658447,
-0.15917259454727173,
-0.11336283385753632,
0.10289853066205978,
-0.2378131002187729,
0.21065565943717957,
-0.05797901749610901,
-0.45628151297569275,
-0.13843441009521484,
0.20925967395305634,
-0.27850887179374695,
0.33993157744407654,
0.3796745538711548,
-0.2668919861316681,
0.41579505801200867,
-0.25097110867500305,
0.8668917417526245,
0.44677841663360596,
-0.02490997686982155,
-0.26473677158355713,
0.0037575573660433292,
-0.16977670788764954,
-0.13608139753341675,
0.04563954472541809,
-0.0011625641491264105,
0.43838006258010864,
0.08135829120874405,
0.16278710961341858,
0.15922483801841736,
0.09208361804485321,
0.07727635651826859,
-0.1863395869731903,
-0.019970187917351723,
0.2616305351257324,
0.21780286729335785,
0.14471480250358582,
-0.06738840788602829,
0.10835108160972595,
-0.11710494011640549,
0.006070719100534916,
-0.31598159670829773,
0.0810050293803215,
-0.07522521913051605,
0.294725626707077,
0.10643686354160309,
0.05217352136969566,
-0.07274366170167923,
-0.12202771753072739,
0.0608065091073513,
-0.22057540714740753,
0.16095459461212158,
-0.4041179120540619,
-0.10160773992538452,
-0.3508574366569519,
0.21713189780712128,
-0.2074071317911148,
0.054863981902599335,
0.24829119443893433,
0.13057447969913483,
-0.08503589034080505,
0.28695565462112427,
-0.008851425722241402,
-0.2644532322883606,
0.143127903342247,
0.12063690274953842,
0.28770139813423157,
0.17252270877361298,
-0.24641600251197815,
-0.48015546798706055,
0.08668400347232819,
0.12271832674741745,
0.2584191560745239,
0.0005567671032622457,
0.021385811269283295,
0.18055982887744904,
0.023171478882431984,
-0.057772956788539886,
-0.2645532488822937,
0.041315771639347076,
0.0028003256302326918,
-0.08859682083129883,
-0.0021094484254717827,
-0.10591260343790054,
0.0880884900689125,
-0.09896037727594376,
0.3821808993816376,
0.34586381912231445,
0.3512187898159027,
-0.15592561662197113,
-0.057151373475790024,
-0.10886159539222717,
0.41896915435791016,
-0.04119434580206871,
0.2659563720226288,
-0.1569688618183136,
-0.053304072469472885,
0.2814994156360626,
0.22704488039016724,
-0.02913569286465645,
-0.18700425326824188,
-0.046371687203645706,
0.27512437105178833,
-0.14191311597824097,
0.22527219355106354,
-0.06374654173851013,
-0.23195351660251617,
-0.1274203658103943,
0.21089455485343933,
-0.36873650550842285,
0.21617427468299866,
0.3495454490184784,
-0.04341783747076988,
0.016065847128629684,
-0.15647536516189575,
-0.26138436794281006,
0.1437440812587738,
0.0009382247808389366,
-0.04472490772604942,
0.3564412295818329,
0.2837355434894562,
-0.051114968955516815,
-0.5715952515602112,
-0.11474744230508804,
0.19952774047851562,
0.20824435353279114,
-0.39812973141670227,
-0.04964565485715866,
-0.20723272860050201,
-0.1593366116285324,
0.2349129319190979,
-0.3719785213470459,
-0.03269167244434357,
-0.2440781146287918,
0.29789507389068604,
0.08388195931911469,
-0.005095146596431732,
0.40325385332107544,
0.13971228897571564,
0.16433292627334595,
0.09831909090280533,
-0.03256456181406975,
-0.19435670971870422,
-0.25741589069366455,
-0.43839743733406067,
0.14590714871883392,
0.17331665754318237,
0.00971483625471592,
0.2719748914241791,
0.016300728544592857,
0.14338378608226776,
-0.21649444103240967,
-0.5072538256645203,
0.22909307479858398,
-0.025162216275930405,
0.26944974064826965,
0.06254591792821884,
-0.07352300733327866,
0.0419851690530777,
-0.40535789728164673,
0.3040679395198822,
-0.15629027783870697,
-0.270226389169693,
0.16793227195739746,
-0.27997562289237976,
-0.2417411059141159,
-0.07538622617721558,
-0.10810532420873642,
-0.22493040561676025,
-0.08681811392307281,
-0.09031520038843155,
0.103107750415802,
0.12265992164611816,
-0.1955285221338272,
0.08684083819389343,
0.0964142456650734,
-0.19266733527183533,
-0.2548818290233612,
-0.33381715416908264,
0.004083935637027025,
0.49443286657333374,
-0.3106500208377838,
-0.33828237652778625,
0.09779979288578033,
-0.20131585001945496,
0.23685458302497864,
0.10276784747838974,
-0.20165890455245972,
0.0024379717651754618,
0.02878461964428425,
0.44856956601142883,
-0.08284859359264374,
-0.15224875509738922,
0.11880947649478912,
0.027854837477207184,
-0.1820821315050125,
0.010759538970887661,
-0.13392698764801025,
-0.06368350982666016,
-0.2717314660549164,
-0.04215322434902191,
-0.3543474078178406,
0.29789629578590393,
0.05386500805616379,
0.7404306530952454,
-0.5370520949363708,
-0.12117420881986618,
0.5505082011222839,
-0.4353282153606415,
0.14656037092208862,
-0.03923884034156799,
-0.08729895949363708,
0.030474932864308357,
0.03221968561410904,
-0.016824379563331604,
0.26638564467430115,
-0.19834476709365845,
-0.2875024378299713,
0.2601868808269501,
-0.04508640989661217,
-0.1954939067363739,
-0.18650655448436737,
0.1126093789935112,
0.15539893507957458,
0.009531932882964611,
0.1079244315624237,
0.03605683147907257,
-0.2964444160461426,
-0.08382054418325424,
0.14378933608531952,
-0.030490029603242874,
-0.28843384981155396,
-0.030787581577897072,
-0.6243004202842712,
0.05422402545809746,
-0.3421120345592499,
0.258767306804657,
0.16356490552425385,
0.26126760244369507,
-0.06161104142665863,
-0.041257258504629135,
0.14127862453460693,
-0.1078895553946495,
0.7498197555541992,
0.0916622132062912,
-0.01656743325293064,
0.22620606422424316,
-0.004279387183487415,
-0.28557685017585754,
-0.16657841205596924,
-0.21745891869068146,
0.19861653447151184,
0.1432514190673828,
0.4252372086048126,
-0.3894381821155548,
0.060357049107551575,
-0.07648476213216782,
-0.11364446580410004,
-0.04898932948708534,
-0.24099749326705933,
-0.1369180977344513,
-0.28232747316360474,
-0.5182370543479919,
0.12678216397762299,
0.024863561615347862,
0.33603158593177795,
0.09031731635332108,
-0.22185668349266052,
-0.1575891375541687,
-0.08876614272594452,
0.0057285805232822895,
0.2584598660469055,
0.07943981885910034,
0.012811058200895786,
-0.1100349947810173,
-0.06133390590548515,
-0.07123486697673798,
0.4190424084663391,
0.03155180811882019,
0.32806578278541565,
-0.5093815922737122,
-0.04448726773262024,
-0.017156386747956276,
0.25280246138572693,
0.05243675783276558,
-0.14383909106254578,
0.3167624771595001,
-0.14389899373054504,
0.050471123307943344,
0.06678938865661621,
0.5942487716674805,
0.24734511971473694,
-0.04612373188138008,
-0.3125636875629425,
0.0872403085231781,
0.09281887114048004,
-0.03822912275791168,
-0.07098335027694702,
-0.029804544523358345,
0.06288086622953415,
-0.37341225147247314,
0.447323203086853,
0.09258286654949188,
0.7007001638412476,
-0.17073999345302582,
0.30534282326698303,
0.6452827453613281,
-0.10880540311336517,
0.2540002763271332,
-0.2714126408100128,
-0.142194926738739,
-0.3598727881908417,
0.14066515862941742,
0.1268530935049057,
-0.11925090104341507,
-0.045587752014398575,
0.1679883450269699,
-0.14322993159294128,
-0.09371118247509003,
-0.01546104159206152,
0.4786778688430786,
0.1942773461341858,
0.3889674246311188,
0.057145651429891586,
-0.16987639665603638,
-0.18317332863807678,
0.21390503644943237,
-0.04444378986954689,
-0.06983869522809982,
-0.1924707591533661,
-0.002798971487209201,
0.04208268225193024,
-0.23006655275821686,
0.038358524441719055,
0.004677572287619114,
-0.296299546957016,
0.28108665347099304,
0.20459438860416412,
-0.14193503558635712,
-0.0985553190112114,
-0.06549879163503647,
0.0020430602598935366,
0.13173945248126984,
-0.08900715410709381,
0.21441492438316345,
-0.03892461210489273,
-0.18957306444644928,
-0.16483648121356964,
-0.20852263271808624,
-0.026392344385385513,
-0.11788799613714218,
-0.2213272899389267,
0.2864733040332794,
0.056477516889572144,
-0.1605992615222931,
-0.07816775888204575,
-0.03973837569355965,
0.3070293366909027,
-0.4019243121147156,
0.05719399452209473,
-0.3252283036708832,
0.20253761112689972,
-0.24396882951259613,
0.18957370519638062,
-0.0389423631131649,
-0.021777518093585968,
-0.021355047821998596,
0.07561555504798889,
0.026173055171966553,
-0.1517265886068344,
0.08328773081302643,
-0.1518092006444931,
-0.0018282224191352725,
0.70506352186203,
0.04057884216308594,
-0.11295051127672195,
-0.203643798828125,
-0.08539561182260513,
0.25474461913108826,
-0.302349716424942,
0.08252830803394318,
0.1992599219083786,
-0.15453267097473145,
-0.12462969869375229,
0.3978864848613739,
0.1624492108821869,
-0.023472553119063377,
0.11338446289300919,
-0.27097976207733154,
-0.3463476300239563,
0.05753840506076813,
0.07800201326608658,
0.16644911468029022,
0.3028993606567383,
0.4726239740848541,
-0.3015042841434479,
0.20820026099681854,
-0.38536420464515686,
0.0686919242143631,
-0.23845067620277405,
0.15259763598442078,
-0.3551488220691681,
-0.20526023209095,
-0.10282757878303528,
0.10746365040540695,
0.2787960171699524,
0.09280425310134888,
-0.06836003065109253,
-0.28819170594215393,
-0.2296648472547531,
0.08471851050853729,
0.26504790782928467,
-0.2120727300643921,
0.12375926971435547,
0.11278105527162552,
-0.0015063066966831684,
-0.056517813354730606,
0.3081408739089966,
0.0776202380657196,
-0.2505300045013428,
0.1111036092042923,
0.592181384563446,
-0.07659949362277985,
-0.16456571221351624,
0.006106678396463394,
-0.07839427888393402,
0.0988008975982666,
0.18455375730991364,
0.2819567620754242,
-0.21413789689540863,
-0.007205369882285595,
0.3499433100223541,
0.18659856915473938,
0.4559263288974762,
0.03263036534190178,
0.049123022705316544,
-0.3490314185619354,
-0.21375052630901337,
-0.01965942792594433,
0.0012266056146472692,
0.13824042677879333,
-0.3447354733943939,
-0.2978059649467468,
0.4043281078338623,
0.28670534491539,
-0.16024579107761383,
-0.325697660446167,
0.19166412949562073,
-0.32268840074539185,
-0.006972617004066706,
0.05651424080133438,
0.2503926455974579,
-0.14390993118286133,
-0.041489679366350174,
0.04562745615839958,
0.4177839159965515,
0.1997782438993454,
-0.3197242021560669,
-0.07975970953702927,
-0.3528236448764801,
0.0765819251537323,
0.40182819962501526,
0.19015654921531677,
-0.06661178171634674,
0.27333348989486694,
-0.24564382433891296,
0.19716212153434753,
0.058029018342494965,
0.1831250637769699,
-0.004915105178952217,
-0.3754424750804901,
-0.04509561136364937,
0.14054922759532928,
0.26847994327545166,
-0.06901361048221588,
0.09235255420207977,
0.3056265711784363,
0.4787783920764923,
0.13407491147518158,
-0.0058572678826749325,
0.38911429047584534,
-0.23005419969558716,
-0.161634624004364,
-0.4251536726951599,
-0.11394060403108597,
-0.03068598546087742,
-0.01748107559978962,
-0.16156186163425446,
-0.18296031653881073,
-0.22248221933841705,
-0.0033166632056236267,
-0.1830255687236786,
-0.31411638855934143,
0.3666456937789917,
0.11654941737651825,
-0.3271212875843048,
-0.27766212821006775,
0.28810760378837585,
-0.03879551216959953,
-0.05340995639562607,
0.27640068531036377,
-0.010955440811812878,
0.688417911529541,
0.2924543023109436,
-0.12287421524524689,
-0.07927059382200241,
-0.3259628713130951,
-0.026736119762063026,
-0.09096323698759079,
0.2114732265472412,
0.30305901169776917,
0.1856168508529663,
0.1467868685722351,
0.2025323212146759,
-0.27970653772354126,
-0.22801820933818817,
0.31840789318084717,
-0.1688210517168045,
0.22123460471630096,
-0.11196320503950119,
0.05387839302420616,
-0.31209778785705566,
-0.1559111326932907,
0.03504941612482071,
-0.2352515161037445,
0.08887821435928345,
0.3028607964515686,
0.08443954586982727,
0.19256916642189026,
-0.10659769922494888,
0.14272120594978333,
-0.10733243077993393,
0.5459739565849304,
0.3189663290977478,
0.20246832072734833,
-0.3789909780025482,
-0.13727641105651855,
-0.5676916241645813,
0.442623108625412,
-0.1167263388633728,
-0.12072008103132248,
0.09621674567461014,
0.15912018716335297,
0.1832960844039917,
0.04763878881931305,
-0.06366799026727676,
0.44304728507995605,
-0.3306940197944641,
0.0057580131106078625,
-0.3567465543746948,
0.2899416387081146,
0.10109934210777283,
-0.04996560141444206,
-0.067470982670784,
-0.1776786744594574,
0.2722306549549103,
-0.3564906716346741,
0.21251210570335388,
-0.11970200389623642,
-0.13601280748844147,
0.004999988712370396,
-0.09613579511642456,
0.4867601692676544,
-0.006344574503600597,
0.496871680021286,
-0.1446746587753296,
0.4019797444343567,
0.038874298334121704,
-0.24481284618377686,
-0.2022351175546646,
0.04249754175543785,
0.10351825505495071,
0.15506203472614288,
0.15566639602184296,
0.15217624604701996,
-0.18365179002285004,
0.15249089896678925,
-0.012598208151757717,
-0.12019450217485428,
-0.0030115817207843065,
0.46110332012176514,
-0.04363923519849777,
0.033128269016742706,
-0.22885315120220184,
0.027642440050840378,
0.15263588726520538,
0.2267368733882904,
-0.27045661211013794,
-0.4732050597667694,
0.365266889333725,
-0.5546078681945801,
-0.35777610540390015,
-0.07633950561285019,
0.03622787818312645,
0.22483119368553162,
-0.15258067846298218,
-0.1592683345079422,
0.05694133788347244,
0.43299922347068787,
-0.06775245070457458,
-0.2632969915866852,
0.18779852986335754,
0.0935552790760994,
-0.0032134936191141605,
-0.09110217541456223,
0.26139944791793823,
0.07837457954883575,
-0.09310419857501984,
-0.2422768771648407,
-0.32711103558540344
] |
https://github.com/huggingface/datasets/issues/2206
|
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
I'm facing same issue @mariosasko @albertvillanova
```
ArrowInvalid: Integer value 50260 not in range: -128 to 127
```
To reproduce:
```python
SPECIAL_TOKENS = ['<bos>','<eos>','<speaker1>','<speaker2>','<pad>']
ATTR_TO_SPECIAL_TOKEN = {
'bos_token': '<bos>',
'eos_token': '<eos>',
'pad_token': '<pad>',
'additional_special_tokens': ['<speaker1>', '<speaker2>']
}
tokenizer = AutoTokenizer.from_pretrained("gpt2", use_fast=False)
num_added_tokens =tokenizer.add_special_tokens(ATTR_TO_SPECIAL_TOKEN)
vocab_size = len(self.tokenizer.encoder) + num_added_tokens
vocab =tokenizer.get_vocab()
pad_index = tokenizer.pad_token_id
eos_index = tokenizer.eos_token_id
bos_index = tokenizer.bos_token_id
speaker1_index = vocab["<speaker1>"]
speaker2_index = vocab["<speaker2>"]
```
```python
tokenizer.decode(['50260'])
'<speaker1>'
```
|
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
| 70 |
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
[
-0.30897170305252075,
0.4055931568145752,
-0.07608239352703094,
0.03618088737130165,
0.36590299010276794,
-0.14709879457950592,
0.1483515053987503,
0.12841637432575226,
-0.3896856904029846,
0.04695077985525131,
-0.14953932166099548,
0.5155912637710571,
-0.1445295810699463,
0.05200037360191345,
0.13605378568172455,
-0.05998845770955086,
0.15429650247097015,
0.42665979266166687,
0.256109356880188,
0.05443771183490753,
-0.0707269236445427,
0.10945941507816315,
-0.1680394560098648,
0.3761958181858063,
-0.49062082171440125,
-0.029642747715115547,
0.03350016847252846,
0.11923826485872269,
-0.2120494395494461,
-0.6330580711364746,
-0.16227702796459198,
0.22744697332382202,
0.20422163605690002,
0.2120445817708969,
-0.00010684304288588464,
0.08612442761659622,
0.18671952188014984,
0.05093606561422348,
-0.135593980550766,
0.0812402293086052,
0.167697936296463,
-0.07285735756158829,
0.048738207668066025,
-0.14014330506324768,
0.10583125799894333,
-0.709212064743042,
-0.021385731175541878,
0.27964943647384644,
0.20057722926139832,
0.37240901589393616,
0.2777716815471649,
0.5433839559555054,
0.0372563898563385,
-0.050568219274282455,
0.5747066736221313,
-0.04956657811999321,
0.10765888541936874,
0.060507241636514664,
0.1941862553358078,
-0.053756073117256165,
-0.11220098286867142,
-0.011184762232005596,
-0.09648102521896362,
-0.09746017307043076,
0.07040567696094513,
0.07537294924259186,
-0.007009005174040794,
-0.004612604156136513,
0.08220739662647247,
-0.08879974484443665,
0.38174688816070557,
-0.2900778353214264,
-0.11621007323265076,
-0.009967274963855743,
-0.008918781764805317,
-0.3989097476005554,
0.04620549455285072,
-0.07729929685592651,
-0.10706305503845215,
0.012882656417787075,
0.07972171902656555,
-0.065013088285923,
-0.16352199018001556,
0.2718081772327423,
-0.2456239014863968,
0.45515167713165283,
-0.00642046332359314,
0.12027042359113693,
-0.15856756269931793,
-0.13465678691864014,
0.16571994125843048,
0.024167979136109352,
-0.15089912712574005,
0.14763861894607544,
-0.12216559797525406,
0.02079036645591259,
-0.004778334405273199,
-0.10887220501899719,
0.20923025906085968,
0.10328676551580429,
-0.11153604835271835,
0.2660713195800781,
0.16684123873710632,
0.21492169797420502,
-0.09203264117240906,
0.15667319297790527,
-0.0665196105837822,
0.2351931482553482,
0.19046953320503235,
-0.27704358100891113,
-0.12073125690221786,
-0.06829943507909775,
-0.3081552982330322,
-0.055579107254743576,
0.19701126217842102,
-0.1363135725259781,
0.07898560166358948,
0.02248416841030121,
-0.16048774123191833,
0.06294962763786316,
-0.22300860285758972,
-0.0010947718983516097,
0.07115977257490158,
0.46591195464134216,
0.10303644090890884,
-0.34996578097343445,
-0.3529745638370514,
0.3955211043357849,
-0.1916089504957199,
-0.13974449038505554,
-0.2523546516895294,
0.150193452835083,
-0.06993371993303299,
-0.02837025560438633,
0.14322248101234436,
0.15478476881980896,
0.23784710466861725,
0.17771971225738525,
0.062209706753492355,
0.0685104951262474,
0.16932691633701324,
-0.012075666338205338,
-0.034804437309503555,
0.16605797410011292,
0.13749630749225616,
0.16142457723617554,
0.028616299852728844,
-0.30149897933006287,
-0.026846831664443016,
0.19841919839382172,
-0.06777612119913101,
-0.40250861644744873,
-0.31008556485176086,
0.2656112611293793,
-0.1478831022977829,
-0.21451307833194733,
-0.16411682963371277,
0.05558066815137863,
0.2179000824689865,
-0.21342813968658447,
-0.15917259454727173,
-0.11336283385753632,
0.10289853066205978,
-0.2378131002187729,
0.21065565943717957,
-0.05797901749610901,
-0.45628151297569275,
-0.13843441009521484,
0.20925967395305634,
-0.27850887179374695,
0.33993157744407654,
0.3796745538711548,
-0.2668919861316681,
0.41579505801200867,
-0.25097110867500305,
0.8668917417526245,
0.44677841663360596,
-0.02490997686982155,
-0.26473677158355713,
0.0037575573660433292,
-0.16977670788764954,
-0.13608139753341675,
0.04563954472541809,
-0.0011625641491264105,
0.43838006258010864,
0.08135829120874405,
0.16278710961341858,
0.15922483801841736,
0.09208361804485321,
0.07727635651826859,
-0.1863395869731903,
-0.019970187917351723,
0.2616305351257324,
0.21780286729335785,
0.14471480250358582,
-0.06738840788602829,
0.10835108160972595,
-0.11710494011640549,
0.006070719100534916,
-0.31598159670829773,
0.0810050293803215,
-0.07522521913051605,
0.294725626707077,
0.10643686354160309,
0.05217352136969566,
-0.07274366170167923,
-0.12202771753072739,
0.0608065091073513,
-0.22057540714740753,
0.16095459461212158,
-0.4041179120540619,
-0.10160773992538452,
-0.3508574366569519,
0.21713189780712128,
-0.2074071317911148,
0.054863981902599335,
0.24829119443893433,
0.13057447969913483,
-0.08503589034080505,
0.28695565462112427,
-0.008851425722241402,
-0.2644532322883606,
0.143127903342247,
0.12063690274953842,
0.28770139813423157,
0.17252270877361298,
-0.24641600251197815,
-0.48015546798706055,
0.08668400347232819,
0.12271832674741745,
0.2584191560745239,
0.0005567671032622457,
0.021385811269283295,
0.18055982887744904,
0.023171478882431984,
-0.057772956788539886,
-0.2645532488822937,
0.041315771639347076,
0.0028003256302326918,
-0.08859682083129883,
-0.0021094484254717827,
-0.10591260343790054,
0.0880884900689125,
-0.09896037727594376,
0.3821808993816376,
0.34586381912231445,
0.3512187898159027,
-0.15592561662197113,
-0.057151373475790024,
-0.10886159539222717,
0.41896915435791016,
-0.04119434580206871,
0.2659563720226288,
-0.1569688618183136,
-0.053304072469472885,
0.2814994156360626,
0.22704488039016724,
-0.02913569286465645,
-0.18700425326824188,
-0.046371687203645706,
0.27512437105178833,
-0.14191311597824097,
0.22527219355106354,
-0.06374654173851013,
-0.23195351660251617,
-0.1274203658103943,
0.21089455485343933,
-0.36873650550842285,
0.21617427468299866,
0.3495454490184784,
-0.04341783747076988,
0.016065847128629684,
-0.15647536516189575,
-0.26138436794281006,
0.1437440812587738,
0.0009382247808389366,
-0.04472490772604942,
0.3564412295818329,
0.2837355434894562,
-0.051114968955516815,
-0.5715952515602112,
-0.11474744230508804,
0.19952774047851562,
0.20824435353279114,
-0.39812973141670227,
-0.04964565485715866,
-0.20723272860050201,
-0.1593366116285324,
0.2349129319190979,
-0.3719785213470459,
-0.03269167244434357,
-0.2440781146287918,
0.29789507389068604,
0.08388195931911469,
-0.005095146596431732,
0.40325385332107544,
0.13971228897571564,
0.16433292627334595,
0.09831909090280533,
-0.03256456181406975,
-0.19435670971870422,
-0.25741589069366455,
-0.43839743733406067,
0.14590714871883392,
0.17331665754318237,
0.00971483625471592,
0.2719748914241791,
0.016300728544592857,
0.14338378608226776,
-0.21649444103240967,
-0.5072538256645203,
0.22909307479858398,
-0.025162216275930405,
0.26944974064826965,
0.06254591792821884,
-0.07352300733327866,
0.0419851690530777,
-0.40535789728164673,
0.3040679395198822,
-0.15629027783870697,
-0.270226389169693,
0.16793227195739746,
-0.27997562289237976,
-0.2417411059141159,
-0.07538622617721558,
-0.10810532420873642,
-0.22493040561676025,
-0.08681811392307281,
-0.09031520038843155,
0.103107750415802,
0.12265992164611816,
-0.1955285221338272,
0.08684083819389343,
0.0964142456650734,
-0.19266733527183533,
-0.2548818290233612,
-0.33381715416908264,
0.004083935637027025,
0.49443286657333374,
-0.3106500208377838,
-0.33828237652778625,
0.09779979288578033,
-0.20131585001945496,
0.23685458302497864,
0.10276784747838974,
-0.20165890455245972,
0.0024379717651754618,
0.02878461964428425,
0.44856956601142883,
-0.08284859359264374,
-0.15224875509738922,
0.11880947649478912,
0.027854837477207184,
-0.1820821315050125,
0.010759538970887661,
-0.13392698764801025,
-0.06368350982666016,
-0.2717314660549164,
-0.04215322434902191,
-0.3543474078178406,
0.29789629578590393,
0.05386500805616379,
0.7404306530952454,
-0.5370520949363708,
-0.12117420881986618,
0.5505082011222839,
-0.4353282153606415,
0.14656037092208862,
-0.03923884034156799,
-0.08729895949363708,
0.030474932864308357,
0.03221968561410904,
-0.016824379563331604,
0.26638564467430115,
-0.19834476709365845,
-0.2875024378299713,
0.2601868808269501,
-0.04508640989661217,
-0.1954939067363739,
-0.18650655448436737,
0.1126093789935112,
0.15539893507957458,
0.009531932882964611,
0.1079244315624237,
0.03605683147907257,
-0.2964444160461426,
-0.08382054418325424,
0.14378933608531952,
-0.030490029603242874,
-0.28843384981155396,
-0.030787581577897072,
-0.6243004202842712,
0.05422402545809746,
-0.3421120345592499,
0.258767306804657,
0.16356490552425385,
0.26126760244369507,
-0.06161104142665863,
-0.041257258504629135,
0.14127862453460693,
-0.1078895553946495,
0.7498197555541992,
0.0916622132062912,
-0.01656743325293064,
0.22620606422424316,
-0.004279387183487415,
-0.28557685017585754,
-0.16657841205596924,
-0.21745891869068146,
0.19861653447151184,
0.1432514190673828,
0.4252372086048126,
-0.3894381821155548,
0.060357049107551575,
-0.07648476213216782,
-0.11364446580410004,
-0.04898932948708534,
-0.24099749326705933,
-0.1369180977344513,
-0.28232747316360474,
-0.5182370543479919,
0.12678216397762299,
0.024863561615347862,
0.33603158593177795,
0.09031731635332108,
-0.22185668349266052,
-0.1575891375541687,
-0.08876614272594452,
0.0057285805232822895,
0.2584598660469055,
0.07943981885910034,
0.012811058200895786,
-0.1100349947810173,
-0.06133390590548515,
-0.07123486697673798,
0.4190424084663391,
0.03155180811882019,
0.32806578278541565,
-0.5093815922737122,
-0.04448726773262024,
-0.017156386747956276,
0.25280246138572693,
0.05243675783276558,
-0.14383909106254578,
0.3167624771595001,
-0.14389899373054504,
0.050471123307943344,
0.06678938865661621,
0.5942487716674805,
0.24734511971473694,
-0.04612373188138008,
-0.3125636875629425,
0.0872403085231781,
0.09281887114048004,
-0.03822912275791168,
-0.07098335027694702,
-0.029804544523358345,
0.06288086622953415,
-0.37341225147247314,
0.447323203086853,
0.09258286654949188,
0.7007001638412476,
-0.17073999345302582,
0.30534282326698303,
0.6452827453613281,
-0.10880540311336517,
0.2540002763271332,
-0.2714126408100128,
-0.142194926738739,
-0.3598727881908417,
0.14066515862941742,
0.1268530935049057,
-0.11925090104341507,
-0.045587752014398575,
0.1679883450269699,
-0.14322993159294128,
-0.09371118247509003,
-0.01546104159206152,
0.4786778688430786,
0.1942773461341858,
0.3889674246311188,
0.057145651429891586,
-0.16987639665603638,
-0.18317332863807678,
0.21390503644943237,
-0.04444378986954689,
-0.06983869522809982,
-0.1924707591533661,
-0.002798971487209201,
0.04208268225193024,
-0.23006655275821686,
0.038358524441719055,
0.004677572287619114,
-0.296299546957016,
0.28108665347099304,
0.20459438860416412,
-0.14193503558635712,
-0.0985553190112114,
-0.06549879163503647,
0.0020430602598935366,
0.13173945248126984,
-0.08900715410709381,
0.21441492438316345,
-0.03892461210489273,
-0.18957306444644928,
-0.16483648121356964,
-0.20852263271808624,
-0.026392344385385513,
-0.11788799613714218,
-0.2213272899389267,
0.2864733040332794,
0.056477516889572144,
-0.1605992615222931,
-0.07816775888204575,
-0.03973837569355965,
0.3070293366909027,
-0.4019243121147156,
0.05719399452209473,
-0.3252283036708832,
0.20253761112689972,
-0.24396882951259613,
0.18957370519638062,
-0.0389423631131649,
-0.021777518093585968,
-0.021355047821998596,
0.07561555504798889,
0.026173055171966553,
-0.1517265886068344,
0.08328773081302643,
-0.1518092006444931,
-0.0018282224191352725,
0.70506352186203,
0.04057884216308594,
-0.11295051127672195,
-0.203643798828125,
-0.08539561182260513,
0.25474461913108826,
-0.302349716424942,
0.08252830803394318,
0.1992599219083786,
-0.15453267097473145,
-0.12462969869375229,
0.3978864848613739,
0.1624492108821869,
-0.023472553119063377,
0.11338446289300919,
-0.27097976207733154,
-0.3463476300239563,
0.05753840506076813,
0.07800201326608658,
0.16644911468029022,
0.3028993606567383,
0.4726239740848541,
-0.3015042841434479,
0.20820026099681854,
-0.38536420464515686,
0.0686919242143631,
-0.23845067620277405,
0.15259763598442078,
-0.3551488220691681,
-0.20526023209095,
-0.10282757878303528,
0.10746365040540695,
0.2787960171699524,
0.09280425310134888,
-0.06836003065109253,
-0.28819170594215393,
-0.2296648472547531,
0.08471851050853729,
0.26504790782928467,
-0.2120727300643921,
0.12375926971435547,
0.11278105527162552,
-0.0015063066966831684,
-0.056517813354730606,
0.3081408739089966,
0.0776202380657196,
-0.2505300045013428,
0.1111036092042923,
0.592181384563446,
-0.07659949362277985,
-0.16456571221351624,
0.006106678396463394,
-0.07839427888393402,
0.0988008975982666,
0.18455375730991364,
0.2819567620754242,
-0.21413789689540863,
-0.007205369882285595,
0.3499433100223541,
0.18659856915473938,
0.4559263288974762,
0.03263036534190178,
0.049123022705316544,
-0.3490314185619354,
-0.21375052630901337,
-0.01965942792594433,
0.0012266056146472692,
0.13824042677879333,
-0.3447354733943939,
-0.2978059649467468,
0.4043281078338623,
0.28670534491539,
-0.16024579107761383,
-0.325697660446167,
0.19166412949562073,
-0.32268840074539185,
-0.006972617004066706,
0.05651424080133438,
0.2503926455974579,
-0.14390993118286133,
-0.041489679366350174,
0.04562745615839958,
0.4177839159965515,
0.1997782438993454,
-0.3197242021560669,
-0.07975970953702927,
-0.3528236448764801,
0.0765819251537323,
0.40182819962501526,
0.19015654921531677,
-0.06661178171634674,
0.27333348989486694,
-0.24564382433891296,
0.19716212153434753,
0.058029018342494965,
0.1831250637769699,
-0.004915105178952217,
-0.3754424750804901,
-0.04509561136364937,
0.14054922759532928,
0.26847994327545166,
-0.06901361048221588,
0.09235255420207977,
0.3056265711784363,
0.4787783920764923,
0.13407491147518158,
-0.0058572678826749325,
0.38911429047584534,
-0.23005419969558716,
-0.161634624004364,
-0.4251536726951599,
-0.11394060403108597,
-0.03068598546087742,
-0.01748107559978962,
-0.16156186163425446,
-0.18296031653881073,
-0.22248221933841705,
-0.0033166632056236267,
-0.1830255687236786,
-0.31411638855934143,
0.3666456937789917,
0.11654941737651825,
-0.3271212875843048,
-0.27766212821006775,
0.28810760378837585,
-0.03879551216959953,
-0.05340995639562607,
0.27640068531036377,
-0.010955440811812878,
0.688417911529541,
0.2924543023109436,
-0.12287421524524689,
-0.07927059382200241,
-0.3259628713130951,
-0.026736119762063026,
-0.09096323698759079,
0.2114732265472412,
0.30305901169776917,
0.1856168508529663,
0.1467868685722351,
0.2025323212146759,
-0.27970653772354126,
-0.22801820933818817,
0.31840789318084717,
-0.1688210517168045,
0.22123460471630096,
-0.11196320503950119,
0.05387839302420616,
-0.31209778785705566,
-0.1559111326932907,
0.03504941612482071,
-0.2352515161037445,
0.08887821435928345,
0.3028607964515686,
0.08443954586982727,
0.19256916642189026,
-0.10659769922494888,
0.14272120594978333,
-0.10733243077993393,
0.5459739565849304,
0.3189663290977478,
0.20246832072734833,
-0.3789909780025482,
-0.13727641105651855,
-0.5676916241645813,
0.442623108625412,
-0.1167263388633728,
-0.12072008103132248,
0.09621674567461014,
0.15912018716335297,
0.1832960844039917,
0.04763878881931305,
-0.06366799026727676,
0.44304728507995605,
-0.3306940197944641,
0.0057580131106078625,
-0.3567465543746948,
0.2899416387081146,
0.10109934210777283,
-0.04996560141444206,
-0.067470982670784,
-0.1776786744594574,
0.2722306549549103,
-0.3564906716346741,
0.21251210570335388,
-0.11970200389623642,
-0.13601280748844147,
0.004999988712370396,
-0.09613579511642456,
0.4867601692676544,
-0.006344574503600597,
0.496871680021286,
-0.1446746587753296,
0.4019797444343567,
0.038874298334121704,
-0.24481284618377686,
-0.2022351175546646,
0.04249754175543785,
0.10351825505495071,
0.15506203472614288,
0.15566639602184296,
0.15217624604701996,
-0.18365179002285004,
0.15249089896678925,
-0.012598208151757717,
-0.12019450217485428,
-0.0030115817207843065,
0.46110332012176514,
-0.04363923519849777,
0.033128269016742706,
-0.22885315120220184,
0.027642440050840378,
0.15263588726520538,
0.2267368733882904,
-0.27045661211013794,
-0.4732050597667694,
0.365266889333725,
-0.5546078681945801,
-0.35777610540390015,
-0.07633950561285019,
0.03622787818312645,
0.22483119368553162,
-0.15258067846298218,
-0.1592683345079422,
0.05694133788347244,
0.43299922347068787,
-0.06775245070457458,
-0.2632969915866852,
0.18779852986335754,
0.0935552790760994,
-0.0032134936191141605,
-0.09110217541456223,
0.26139944791793823,
0.07837457954883575,
-0.09310419857501984,
-0.2422768771648407,
-0.32711103558540344
] |
https://github.com/huggingface/datasets/issues/2206
|
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
@mariosasko
I am hitting this bug in the Bert tokenizer too. I see that @albertvillanova labeled this as a bug back in April. Has there been a fix released yet?
What I did for now is to just disable the optimization in the HF library. @yana-xuyan and @thomas-happify, is that what you did and did that work for you?
|
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
| 59 |
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
[
-0.30897170305252075,
0.4055931568145752,
-0.07608239352703094,
0.03618088737130165,
0.36590299010276794,
-0.14709879457950592,
0.1483515053987503,
0.12841637432575226,
-0.3896856904029846,
0.04695077985525131,
-0.14953932166099548,
0.5155912637710571,
-0.1445295810699463,
0.05200037360191345,
0.13605378568172455,
-0.05998845770955086,
0.15429650247097015,
0.42665979266166687,
0.256109356880188,
0.05443771183490753,
-0.0707269236445427,
0.10945941507816315,
-0.1680394560098648,
0.3761958181858063,
-0.49062082171440125,
-0.029642747715115547,
0.03350016847252846,
0.11923826485872269,
-0.2120494395494461,
-0.6330580711364746,
-0.16227702796459198,
0.22744697332382202,
0.20422163605690002,
0.2120445817708969,
-0.00010684304288588464,
0.08612442761659622,
0.18671952188014984,
0.05093606561422348,
-0.135593980550766,
0.0812402293086052,
0.167697936296463,
-0.07285735756158829,
0.048738207668066025,
-0.14014330506324768,
0.10583125799894333,
-0.709212064743042,
-0.021385731175541878,
0.27964943647384644,
0.20057722926139832,
0.37240901589393616,
0.2777716815471649,
0.5433839559555054,
0.0372563898563385,
-0.050568219274282455,
0.5747066736221313,
-0.04956657811999321,
0.10765888541936874,
0.060507241636514664,
0.1941862553358078,
-0.053756073117256165,
-0.11220098286867142,
-0.011184762232005596,
-0.09648102521896362,
-0.09746017307043076,
0.07040567696094513,
0.07537294924259186,
-0.007009005174040794,
-0.004612604156136513,
0.08220739662647247,
-0.08879974484443665,
0.38174688816070557,
-0.2900778353214264,
-0.11621007323265076,
-0.009967274963855743,
-0.008918781764805317,
-0.3989097476005554,
0.04620549455285072,
-0.07729929685592651,
-0.10706305503845215,
0.012882656417787075,
0.07972171902656555,
-0.065013088285923,
-0.16352199018001556,
0.2718081772327423,
-0.2456239014863968,
0.45515167713165283,
-0.00642046332359314,
0.12027042359113693,
-0.15856756269931793,
-0.13465678691864014,
0.16571994125843048,
0.024167979136109352,
-0.15089912712574005,
0.14763861894607544,
-0.12216559797525406,
0.02079036645591259,
-0.004778334405273199,
-0.10887220501899719,
0.20923025906085968,
0.10328676551580429,
-0.11153604835271835,
0.2660713195800781,
0.16684123873710632,
0.21492169797420502,
-0.09203264117240906,
0.15667319297790527,
-0.0665196105837822,
0.2351931482553482,
0.19046953320503235,
-0.27704358100891113,
-0.12073125690221786,
-0.06829943507909775,
-0.3081552982330322,
-0.055579107254743576,
0.19701126217842102,
-0.1363135725259781,
0.07898560166358948,
0.02248416841030121,
-0.16048774123191833,
0.06294962763786316,
-0.22300860285758972,
-0.0010947718983516097,
0.07115977257490158,
0.46591195464134216,
0.10303644090890884,
-0.34996578097343445,
-0.3529745638370514,
0.3955211043357849,
-0.1916089504957199,
-0.13974449038505554,
-0.2523546516895294,
0.150193452835083,
-0.06993371993303299,
-0.02837025560438633,
0.14322248101234436,
0.15478476881980896,
0.23784710466861725,
0.17771971225738525,
0.062209706753492355,
0.0685104951262474,
0.16932691633701324,
-0.012075666338205338,
-0.034804437309503555,
0.16605797410011292,
0.13749630749225616,
0.16142457723617554,
0.028616299852728844,
-0.30149897933006287,
-0.026846831664443016,
0.19841919839382172,
-0.06777612119913101,
-0.40250861644744873,
-0.31008556485176086,
0.2656112611293793,
-0.1478831022977829,
-0.21451307833194733,
-0.16411682963371277,
0.05558066815137863,
0.2179000824689865,
-0.21342813968658447,
-0.15917259454727173,
-0.11336283385753632,
0.10289853066205978,
-0.2378131002187729,
0.21065565943717957,
-0.05797901749610901,
-0.45628151297569275,
-0.13843441009521484,
0.20925967395305634,
-0.27850887179374695,
0.33993157744407654,
0.3796745538711548,
-0.2668919861316681,
0.41579505801200867,
-0.25097110867500305,
0.8668917417526245,
0.44677841663360596,
-0.02490997686982155,
-0.26473677158355713,
0.0037575573660433292,
-0.16977670788764954,
-0.13608139753341675,
0.04563954472541809,
-0.0011625641491264105,
0.43838006258010864,
0.08135829120874405,
0.16278710961341858,
0.15922483801841736,
0.09208361804485321,
0.07727635651826859,
-0.1863395869731903,
-0.019970187917351723,
0.2616305351257324,
0.21780286729335785,
0.14471480250358582,
-0.06738840788602829,
0.10835108160972595,
-0.11710494011640549,
0.006070719100534916,
-0.31598159670829773,
0.0810050293803215,
-0.07522521913051605,
0.294725626707077,
0.10643686354160309,
0.05217352136969566,
-0.07274366170167923,
-0.12202771753072739,
0.0608065091073513,
-0.22057540714740753,
0.16095459461212158,
-0.4041179120540619,
-0.10160773992538452,
-0.3508574366569519,
0.21713189780712128,
-0.2074071317911148,
0.054863981902599335,
0.24829119443893433,
0.13057447969913483,
-0.08503589034080505,
0.28695565462112427,
-0.008851425722241402,
-0.2644532322883606,
0.143127903342247,
0.12063690274953842,
0.28770139813423157,
0.17252270877361298,
-0.24641600251197815,
-0.48015546798706055,
0.08668400347232819,
0.12271832674741745,
0.2584191560745239,
0.0005567671032622457,
0.021385811269283295,
0.18055982887744904,
0.023171478882431984,
-0.057772956788539886,
-0.2645532488822937,
0.041315771639347076,
0.0028003256302326918,
-0.08859682083129883,
-0.0021094484254717827,
-0.10591260343790054,
0.0880884900689125,
-0.09896037727594376,
0.3821808993816376,
0.34586381912231445,
0.3512187898159027,
-0.15592561662197113,
-0.057151373475790024,
-0.10886159539222717,
0.41896915435791016,
-0.04119434580206871,
0.2659563720226288,
-0.1569688618183136,
-0.053304072469472885,
0.2814994156360626,
0.22704488039016724,
-0.02913569286465645,
-0.18700425326824188,
-0.046371687203645706,
0.27512437105178833,
-0.14191311597824097,
0.22527219355106354,
-0.06374654173851013,
-0.23195351660251617,
-0.1274203658103943,
0.21089455485343933,
-0.36873650550842285,
0.21617427468299866,
0.3495454490184784,
-0.04341783747076988,
0.016065847128629684,
-0.15647536516189575,
-0.26138436794281006,
0.1437440812587738,
0.0009382247808389366,
-0.04472490772604942,
0.3564412295818329,
0.2837355434894562,
-0.051114968955516815,
-0.5715952515602112,
-0.11474744230508804,
0.19952774047851562,
0.20824435353279114,
-0.39812973141670227,
-0.04964565485715866,
-0.20723272860050201,
-0.1593366116285324,
0.2349129319190979,
-0.3719785213470459,
-0.03269167244434357,
-0.2440781146287918,
0.29789507389068604,
0.08388195931911469,
-0.005095146596431732,
0.40325385332107544,
0.13971228897571564,
0.16433292627334595,
0.09831909090280533,
-0.03256456181406975,
-0.19435670971870422,
-0.25741589069366455,
-0.43839743733406067,
0.14590714871883392,
0.17331665754318237,
0.00971483625471592,
0.2719748914241791,
0.016300728544592857,
0.14338378608226776,
-0.21649444103240967,
-0.5072538256645203,
0.22909307479858398,
-0.025162216275930405,
0.26944974064826965,
0.06254591792821884,
-0.07352300733327866,
0.0419851690530777,
-0.40535789728164673,
0.3040679395198822,
-0.15629027783870697,
-0.270226389169693,
0.16793227195739746,
-0.27997562289237976,
-0.2417411059141159,
-0.07538622617721558,
-0.10810532420873642,
-0.22493040561676025,
-0.08681811392307281,
-0.09031520038843155,
0.103107750415802,
0.12265992164611816,
-0.1955285221338272,
0.08684083819389343,
0.0964142456650734,
-0.19266733527183533,
-0.2548818290233612,
-0.33381715416908264,
0.004083935637027025,
0.49443286657333374,
-0.3106500208377838,
-0.33828237652778625,
0.09779979288578033,
-0.20131585001945496,
0.23685458302497864,
0.10276784747838974,
-0.20165890455245972,
0.0024379717651754618,
0.02878461964428425,
0.44856956601142883,
-0.08284859359264374,
-0.15224875509738922,
0.11880947649478912,
0.027854837477207184,
-0.1820821315050125,
0.010759538970887661,
-0.13392698764801025,
-0.06368350982666016,
-0.2717314660549164,
-0.04215322434902191,
-0.3543474078178406,
0.29789629578590393,
0.05386500805616379,
0.7404306530952454,
-0.5370520949363708,
-0.12117420881986618,
0.5505082011222839,
-0.4353282153606415,
0.14656037092208862,
-0.03923884034156799,
-0.08729895949363708,
0.030474932864308357,
0.03221968561410904,
-0.016824379563331604,
0.26638564467430115,
-0.19834476709365845,
-0.2875024378299713,
0.2601868808269501,
-0.04508640989661217,
-0.1954939067363739,
-0.18650655448436737,
0.1126093789935112,
0.15539893507957458,
0.009531932882964611,
0.1079244315624237,
0.03605683147907257,
-0.2964444160461426,
-0.08382054418325424,
0.14378933608531952,
-0.030490029603242874,
-0.28843384981155396,
-0.030787581577897072,
-0.6243004202842712,
0.05422402545809746,
-0.3421120345592499,
0.258767306804657,
0.16356490552425385,
0.26126760244369507,
-0.06161104142665863,
-0.041257258504629135,
0.14127862453460693,
-0.1078895553946495,
0.7498197555541992,
0.0916622132062912,
-0.01656743325293064,
0.22620606422424316,
-0.004279387183487415,
-0.28557685017585754,
-0.16657841205596924,
-0.21745891869068146,
0.19861653447151184,
0.1432514190673828,
0.4252372086048126,
-0.3894381821155548,
0.060357049107551575,
-0.07648476213216782,
-0.11364446580410004,
-0.04898932948708534,
-0.24099749326705933,
-0.1369180977344513,
-0.28232747316360474,
-0.5182370543479919,
0.12678216397762299,
0.024863561615347862,
0.33603158593177795,
0.09031731635332108,
-0.22185668349266052,
-0.1575891375541687,
-0.08876614272594452,
0.0057285805232822895,
0.2584598660469055,
0.07943981885910034,
0.012811058200895786,
-0.1100349947810173,
-0.06133390590548515,
-0.07123486697673798,
0.4190424084663391,
0.03155180811882019,
0.32806578278541565,
-0.5093815922737122,
-0.04448726773262024,
-0.017156386747956276,
0.25280246138572693,
0.05243675783276558,
-0.14383909106254578,
0.3167624771595001,
-0.14389899373054504,
0.050471123307943344,
0.06678938865661621,
0.5942487716674805,
0.24734511971473694,
-0.04612373188138008,
-0.3125636875629425,
0.0872403085231781,
0.09281887114048004,
-0.03822912275791168,
-0.07098335027694702,
-0.029804544523358345,
0.06288086622953415,
-0.37341225147247314,
0.447323203086853,
0.09258286654949188,
0.7007001638412476,
-0.17073999345302582,
0.30534282326698303,
0.6452827453613281,
-0.10880540311336517,
0.2540002763271332,
-0.2714126408100128,
-0.142194926738739,
-0.3598727881908417,
0.14066515862941742,
0.1268530935049057,
-0.11925090104341507,
-0.045587752014398575,
0.1679883450269699,
-0.14322993159294128,
-0.09371118247509003,
-0.01546104159206152,
0.4786778688430786,
0.1942773461341858,
0.3889674246311188,
0.057145651429891586,
-0.16987639665603638,
-0.18317332863807678,
0.21390503644943237,
-0.04444378986954689,
-0.06983869522809982,
-0.1924707591533661,
-0.002798971487209201,
0.04208268225193024,
-0.23006655275821686,
0.038358524441719055,
0.004677572287619114,
-0.296299546957016,
0.28108665347099304,
0.20459438860416412,
-0.14193503558635712,
-0.0985553190112114,
-0.06549879163503647,
0.0020430602598935366,
0.13173945248126984,
-0.08900715410709381,
0.21441492438316345,
-0.03892461210489273,
-0.18957306444644928,
-0.16483648121356964,
-0.20852263271808624,
-0.026392344385385513,
-0.11788799613714218,
-0.2213272899389267,
0.2864733040332794,
0.056477516889572144,
-0.1605992615222931,
-0.07816775888204575,
-0.03973837569355965,
0.3070293366909027,
-0.4019243121147156,
0.05719399452209473,
-0.3252283036708832,
0.20253761112689972,
-0.24396882951259613,
0.18957370519638062,
-0.0389423631131649,
-0.021777518093585968,
-0.021355047821998596,
0.07561555504798889,
0.026173055171966553,
-0.1517265886068344,
0.08328773081302643,
-0.1518092006444931,
-0.0018282224191352725,
0.70506352186203,
0.04057884216308594,
-0.11295051127672195,
-0.203643798828125,
-0.08539561182260513,
0.25474461913108826,
-0.302349716424942,
0.08252830803394318,
0.1992599219083786,
-0.15453267097473145,
-0.12462969869375229,
0.3978864848613739,
0.1624492108821869,
-0.023472553119063377,
0.11338446289300919,
-0.27097976207733154,
-0.3463476300239563,
0.05753840506076813,
0.07800201326608658,
0.16644911468029022,
0.3028993606567383,
0.4726239740848541,
-0.3015042841434479,
0.20820026099681854,
-0.38536420464515686,
0.0686919242143631,
-0.23845067620277405,
0.15259763598442078,
-0.3551488220691681,
-0.20526023209095,
-0.10282757878303528,
0.10746365040540695,
0.2787960171699524,
0.09280425310134888,
-0.06836003065109253,
-0.28819170594215393,
-0.2296648472547531,
0.08471851050853729,
0.26504790782928467,
-0.2120727300643921,
0.12375926971435547,
0.11278105527162552,
-0.0015063066966831684,
-0.056517813354730606,
0.3081408739089966,
0.0776202380657196,
-0.2505300045013428,
0.1111036092042923,
0.592181384563446,
-0.07659949362277985,
-0.16456571221351624,
0.006106678396463394,
-0.07839427888393402,
0.0988008975982666,
0.18455375730991364,
0.2819567620754242,
-0.21413789689540863,
-0.007205369882285595,
0.3499433100223541,
0.18659856915473938,
0.4559263288974762,
0.03263036534190178,
0.049123022705316544,
-0.3490314185619354,
-0.21375052630901337,
-0.01965942792594433,
0.0012266056146472692,
0.13824042677879333,
-0.3447354733943939,
-0.2978059649467468,
0.4043281078338623,
0.28670534491539,
-0.16024579107761383,
-0.325697660446167,
0.19166412949562073,
-0.32268840074539185,
-0.006972617004066706,
0.05651424080133438,
0.2503926455974579,
-0.14390993118286133,
-0.041489679366350174,
0.04562745615839958,
0.4177839159965515,
0.1997782438993454,
-0.3197242021560669,
-0.07975970953702927,
-0.3528236448764801,
0.0765819251537323,
0.40182819962501526,
0.19015654921531677,
-0.06661178171634674,
0.27333348989486694,
-0.24564382433891296,
0.19716212153434753,
0.058029018342494965,
0.1831250637769699,
-0.004915105178952217,
-0.3754424750804901,
-0.04509561136364937,
0.14054922759532928,
0.26847994327545166,
-0.06901361048221588,
0.09235255420207977,
0.3056265711784363,
0.4787783920764923,
0.13407491147518158,
-0.0058572678826749325,
0.38911429047584534,
-0.23005419969558716,
-0.161634624004364,
-0.4251536726951599,
-0.11394060403108597,
-0.03068598546087742,
-0.01748107559978962,
-0.16156186163425446,
-0.18296031653881073,
-0.22248221933841705,
-0.0033166632056236267,
-0.1830255687236786,
-0.31411638855934143,
0.3666456937789917,
0.11654941737651825,
-0.3271212875843048,
-0.27766212821006775,
0.28810760378837585,
-0.03879551216959953,
-0.05340995639562607,
0.27640068531036377,
-0.010955440811812878,
0.688417911529541,
0.2924543023109436,
-0.12287421524524689,
-0.07927059382200241,
-0.3259628713130951,
-0.026736119762063026,
-0.09096323698759079,
0.2114732265472412,
0.30305901169776917,
0.1856168508529663,
0.1467868685722351,
0.2025323212146759,
-0.27970653772354126,
-0.22801820933818817,
0.31840789318084717,
-0.1688210517168045,
0.22123460471630096,
-0.11196320503950119,
0.05387839302420616,
-0.31209778785705566,
-0.1559111326932907,
0.03504941612482071,
-0.2352515161037445,
0.08887821435928345,
0.3028607964515686,
0.08443954586982727,
0.19256916642189026,
-0.10659769922494888,
0.14272120594978333,
-0.10733243077993393,
0.5459739565849304,
0.3189663290977478,
0.20246832072734833,
-0.3789909780025482,
-0.13727641105651855,
-0.5676916241645813,
0.442623108625412,
-0.1167263388633728,
-0.12072008103132248,
0.09621674567461014,
0.15912018716335297,
0.1832960844039917,
0.04763878881931305,
-0.06366799026727676,
0.44304728507995605,
-0.3306940197944641,
0.0057580131106078625,
-0.3567465543746948,
0.2899416387081146,
0.10109934210777283,
-0.04996560141444206,
-0.067470982670784,
-0.1776786744594574,
0.2722306549549103,
-0.3564906716346741,
0.21251210570335388,
-0.11970200389623642,
-0.13601280748844147,
0.004999988712370396,
-0.09613579511642456,
0.4867601692676544,
-0.006344574503600597,
0.496871680021286,
-0.1446746587753296,
0.4019797444343567,
0.038874298334121704,
-0.24481284618377686,
-0.2022351175546646,
0.04249754175543785,
0.10351825505495071,
0.15506203472614288,
0.15566639602184296,
0.15217624604701996,
-0.18365179002285004,
0.15249089896678925,
-0.012598208151757717,
-0.12019450217485428,
-0.0030115817207843065,
0.46110332012176514,
-0.04363923519849777,
0.033128269016742706,
-0.22885315120220184,
0.027642440050840378,
0.15263588726520538,
0.2267368733882904,
-0.27045661211013794,
-0.4732050597667694,
0.365266889333725,
-0.5546078681945801,
-0.35777610540390015,
-0.07633950561285019,
0.03622787818312645,
0.22483119368553162,
-0.15258067846298218,
-0.1592683345079422,
0.05694133788347244,
0.43299922347068787,
-0.06775245070457458,
-0.2632969915866852,
0.18779852986335754,
0.0935552790760994,
-0.0032134936191141605,
-0.09110217541456223,
0.26139944791793823,
0.07837457954883575,
-0.09310419857501984,
-0.2422768771648407,
-0.32711103558540344
] |
https://github.com/huggingface/datasets/issues/2206
|
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
Hi @gregg-ADP,
This is still a bug.
As @albertvillanova has suggested, maybe it's indeed worth adding a variable to `config.py` to have a way to disable this behavior.
In the meantime, this forced optimization can be disabled by specifying `features` (of the returned examples) in the `map` call:
```python
from datasets import *
... # dataset init
ds.map(process_example, features=Features({"special_tokens_mask": Sequence(Value("int32")), ... rest of the features})
```
cc @lhoestq so he is also aware of this issue
|
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
| 76 |
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
[
-0.30897170305252075,
0.4055931568145752,
-0.07608239352703094,
0.03618088737130165,
0.36590299010276794,
-0.14709879457950592,
0.1483515053987503,
0.12841637432575226,
-0.3896856904029846,
0.04695077985525131,
-0.14953932166099548,
0.5155912637710571,
-0.1445295810699463,
0.05200037360191345,
0.13605378568172455,
-0.05998845770955086,
0.15429650247097015,
0.42665979266166687,
0.256109356880188,
0.05443771183490753,
-0.0707269236445427,
0.10945941507816315,
-0.1680394560098648,
0.3761958181858063,
-0.49062082171440125,
-0.029642747715115547,
0.03350016847252846,
0.11923826485872269,
-0.2120494395494461,
-0.6330580711364746,
-0.16227702796459198,
0.22744697332382202,
0.20422163605690002,
0.2120445817708969,
-0.00010684304288588464,
0.08612442761659622,
0.18671952188014984,
0.05093606561422348,
-0.135593980550766,
0.0812402293086052,
0.167697936296463,
-0.07285735756158829,
0.048738207668066025,
-0.14014330506324768,
0.10583125799894333,
-0.709212064743042,
-0.021385731175541878,
0.27964943647384644,
0.20057722926139832,
0.37240901589393616,
0.2777716815471649,
0.5433839559555054,
0.0372563898563385,
-0.050568219274282455,
0.5747066736221313,
-0.04956657811999321,
0.10765888541936874,
0.060507241636514664,
0.1941862553358078,
-0.053756073117256165,
-0.11220098286867142,
-0.011184762232005596,
-0.09648102521896362,
-0.09746017307043076,
0.07040567696094513,
0.07537294924259186,
-0.007009005174040794,
-0.004612604156136513,
0.08220739662647247,
-0.08879974484443665,
0.38174688816070557,
-0.2900778353214264,
-0.11621007323265076,
-0.009967274963855743,
-0.008918781764805317,
-0.3989097476005554,
0.04620549455285072,
-0.07729929685592651,
-0.10706305503845215,
0.012882656417787075,
0.07972171902656555,
-0.065013088285923,
-0.16352199018001556,
0.2718081772327423,
-0.2456239014863968,
0.45515167713165283,
-0.00642046332359314,
0.12027042359113693,
-0.15856756269931793,
-0.13465678691864014,
0.16571994125843048,
0.024167979136109352,
-0.15089912712574005,
0.14763861894607544,
-0.12216559797525406,
0.02079036645591259,
-0.004778334405273199,
-0.10887220501899719,
0.20923025906085968,
0.10328676551580429,
-0.11153604835271835,
0.2660713195800781,
0.16684123873710632,
0.21492169797420502,
-0.09203264117240906,
0.15667319297790527,
-0.0665196105837822,
0.2351931482553482,
0.19046953320503235,
-0.27704358100891113,
-0.12073125690221786,
-0.06829943507909775,
-0.3081552982330322,
-0.055579107254743576,
0.19701126217842102,
-0.1363135725259781,
0.07898560166358948,
0.02248416841030121,
-0.16048774123191833,
0.06294962763786316,
-0.22300860285758972,
-0.0010947718983516097,
0.07115977257490158,
0.46591195464134216,
0.10303644090890884,
-0.34996578097343445,
-0.3529745638370514,
0.3955211043357849,
-0.1916089504957199,
-0.13974449038505554,
-0.2523546516895294,
0.150193452835083,
-0.06993371993303299,
-0.02837025560438633,
0.14322248101234436,
0.15478476881980896,
0.23784710466861725,
0.17771971225738525,
0.062209706753492355,
0.0685104951262474,
0.16932691633701324,
-0.012075666338205338,
-0.034804437309503555,
0.16605797410011292,
0.13749630749225616,
0.16142457723617554,
0.028616299852728844,
-0.30149897933006287,
-0.026846831664443016,
0.19841919839382172,
-0.06777612119913101,
-0.40250861644744873,
-0.31008556485176086,
0.2656112611293793,
-0.1478831022977829,
-0.21451307833194733,
-0.16411682963371277,
0.05558066815137863,
0.2179000824689865,
-0.21342813968658447,
-0.15917259454727173,
-0.11336283385753632,
0.10289853066205978,
-0.2378131002187729,
0.21065565943717957,
-0.05797901749610901,
-0.45628151297569275,
-0.13843441009521484,
0.20925967395305634,
-0.27850887179374695,
0.33993157744407654,
0.3796745538711548,
-0.2668919861316681,
0.41579505801200867,
-0.25097110867500305,
0.8668917417526245,
0.44677841663360596,
-0.02490997686982155,
-0.26473677158355713,
0.0037575573660433292,
-0.16977670788764954,
-0.13608139753341675,
0.04563954472541809,
-0.0011625641491264105,
0.43838006258010864,
0.08135829120874405,
0.16278710961341858,
0.15922483801841736,
0.09208361804485321,
0.07727635651826859,
-0.1863395869731903,
-0.019970187917351723,
0.2616305351257324,
0.21780286729335785,
0.14471480250358582,
-0.06738840788602829,
0.10835108160972595,
-0.11710494011640549,
0.006070719100534916,
-0.31598159670829773,
0.0810050293803215,
-0.07522521913051605,
0.294725626707077,
0.10643686354160309,
0.05217352136969566,
-0.07274366170167923,
-0.12202771753072739,
0.0608065091073513,
-0.22057540714740753,
0.16095459461212158,
-0.4041179120540619,
-0.10160773992538452,
-0.3508574366569519,
0.21713189780712128,
-0.2074071317911148,
0.054863981902599335,
0.24829119443893433,
0.13057447969913483,
-0.08503589034080505,
0.28695565462112427,
-0.008851425722241402,
-0.2644532322883606,
0.143127903342247,
0.12063690274953842,
0.28770139813423157,
0.17252270877361298,
-0.24641600251197815,
-0.48015546798706055,
0.08668400347232819,
0.12271832674741745,
0.2584191560745239,
0.0005567671032622457,
0.021385811269283295,
0.18055982887744904,
0.023171478882431984,
-0.057772956788539886,
-0.2645532488822937,
0.041315771639347076,
0.0028003256302326918,
-0.08859682083129883,
-0.0021094484254717827,
-0.10591260343790054,
0.0880884900689125,
-0.09896037727594376,
0.3821808993816376,
0.34586381912231445,
0.3512187898159027,
-0.15592561662197113,
-0.057151373475790024,
-0.10886159539222717,
0.41896915435791016,
-0.04119434580206871,
0.2659563720226288,
-0.1569688618183136,
-0.053304072469472885,
0.2814994156360626,
0.22704488039016724,
-0.02913569286465645,
-0.18700425326824188,
-0.046371687203645706,
0.27512437105178833,
-0.14191311597824097,
0.22527219355106354,
-0.06374654173851013,
-0.23195351660251617,
-0.1274203658103943,
0.21089455485343933,
-0.36873650550842285,
0.21617427468299866,
0.3495454490184784,
-0.04341783747076988,
0.016065847128629684,
-0.15647536516189575,
-0.26138436794281006,
0.1437440812587738,
0.0009382247808389366,
-0.04472490772604942,
0.3564412295818329,
0.2837355434894562,
-0.051114968955516815,
-0.5715952515602112,
-0.11474744230508804,
0.19952774047851562,
0.20824435353279114,
-0.39812973141670227,
-0.04964565485715866,
-0.20723272860050201,
-0.1593366116285324,
0.2349129319190979,
-0.3719785213470459,
-0.03269167244434357,
-0.2440781146287918,
0.29789507389068604,
0.08388195931911469,
-0.005095146596431732,
0.40325385332107544,
0.13971228897571564,
0.16433292627334595,
0.09831909090280533,
-0.03256456181406975,
-0.19435670971870422,
-0.25741589069366455,
-0.43839743733406067,
0.14590714871883392,
0.17331665754318237,
0.00971483625471592,
0.2719748914241791,
0.016300728544592857,
0.14338378608226776,
-0.21649444103240967,
-0.5072538256645203,
0.22909307479858398,
-0.025162216275930405,
0.26944974064826965,
0.06254591792821884,
-0.07352300733327866,
0.0419851690530777,
-0.40535789728164673,
0.3040679395198822,
-0.15629027783870697,
-0.270226389169693,
0.16793227195739746,
-0.27997562289237976,
-0.2417411059141159,
-0.07538622617721558,
-0.10810532420873642,
-0.22493040561676025,
-0.08681811392307281,
-0.09031520038843155,
0.103107750415802,
0.12265992164611816,
-0.1955285221338272,
0.08684083819389343,
0.0964142456650734,
-0.19266733527183533,
-0.2548818290233612,
-0.33381715416908264,
0.004083935637027025,
0.49443286657333374,
-0.3106500208377838,
-0.33828237652778625,
0.09779979288578033,
-0.20131585001945496,
0.23685458302497864,
0.10276784747838974,
-0.20165890455245972,
0.0024379717651754618,
0.02878461964428425,
0.44856956601142883,
-0.08284859359264374,
-0.15224875509738922,
0.11880947649478912,
0.027854837477207184,
-0.1820821315050125,
0.010759538970887661,
-0.13392698764801025,
-0.06368350982666016,
-0.2717314660549164,
-0.04215322434902191,
-0.3543474078178406,
0.29789629578590393,
0.05386500805616379,
0.7404306530952454,
-0.5370520949363708,
-0.12117420881986618,
0.5505082011222839,
-0.4353282153606415,
0.14656037092208862,
-0.03923884034156799,
-0.08729895949363708,
0.030474932864308357,
0.03221968561410904,
-0.016824379563331604,
0.26638564467430115,
-0.19834476709365845,
-0.2875024378299713,
0.2601868808269501,
-0.04508640989661217,
-0.1954939067363739,
-0.18650655448436737,
0.1126093789935112,
0.15539893507957458,
0.009531932882964611,
0.1079244315624237,
0.03605683147907257,
-0.2964444160461426,
-0.08382054418325424,
0.14378933608531952,
-0.030490029603242874,
-0.28843384981155396,
-0.030787581577897072,
-0.6243004202842712,
0.05422402545809746,
-0.3421120345592499,
0.258767306804657,
0.16356490552425385,
0.26126760244369507,
-0.06161104142665863,
-0.041257258504629135,
0.14127862453460693,
-0.1078895553946495,
0.7498197555541992,
0.0916622132062912,
-0.01656743325293064,
0.22620606422424316,
-0.004279387183487415,
-0.28557685017585754,
-0.16657841205596924,
-0.21745891869068146,
0.19861653447151184,
0.1432514190673828,
0.4252372086048126,
-0.3894381821155548,
0.060357049107551575,
-0.07648476213216782,
-0.11364446580410004,
-0.04898932948708534,
-0.24099749326705933,
-0.1369180977344513,
-0.28232747316360474,
-0.5182370543479919,
0.12678216397762299,
0.024863561615347862,
0.33603158593177795,
0.09031731635332108,
-0.22185668349266052,
-0.1575891375541687,
-0.08876614272594452,
0.0057285805232822895,
0.2584598660469055,
0.07943981885910034,
0.012811058200895786,
-0.1100349947810173,
-0.06133390590548515,
-0.07123486697673798,
0.4190424084663391,
0.03155180811882019,
0.32806578278541565,
-0.5093815922737122,
-0.04448726773262024,
-0.017156386747956276,
0.25280246138572693,
0.05243675783276558,
-0.14383909106254578,
0.3167624771595001,
-0.14389899373054504,
0.050471123307943344,
0.06678938865661621,
0.5942487716674805,
0.24734511971473694,
-0.04612373188138008,
-0.3125636875629425,
0.0872403085231781,
0.09281887114048004,
-0.03822912275791168,
-0.07098335027694702,
-0.029804544523358345,
0.06288086622953415,
-0.37341225147247314,
0.447323203086853,
0.09258286654949188,
0.7007001638412476,
-0.17073999345302582,
0.30534282326698303,
0.6452827453613281,
-0.10880540311336517,
0.2540002763271332,
-0.2714126408100128,
-0.142194926738739,
-0.3598727881908417,
0.14066515862941742,
0.1268530935049057,
-0.11925090104341507,
-0.045587752014398575,
0.1679883450269699,
-0.14322993159294128,
-0.09371118247509003,
-0.01546104159206152,
0.4786778688430786,
0.1942773461341858,
0.3889674246311188,
0.057145651429891586,
-0.16987639665603638,
-0.18317332863807678,
0.21390503644943237,
-0.04444378986954689,
-0.06983869522809982,
-0.1924707591533661,
-0.002798971487209201,
0.04208268225193024,
-0.23006655275821686,
0.038358524441719055,
0.004677572287619114,
-0.296299546957016,
0.28108665347099304,
0.20459438860416412,
-0.14193503558635712,
-0.0985553190112114,
-0.06549879163503647,
0.0020430602598935366,
0.13173945248126984,
-0.08900715410709381,
0.21441492438316345,
-0.03892461210489273,
-0.18957306444644928,
-0.16483648121356964,
-0.20852263271808624,
-0.026392344385385513,
-0.11788799613714218,
-0.2213272899389267,
0.2864733040332794,
0.056477516889572144,
-0.1605992615222931,
-0.07816775888204575,
-0.03973837569355965,
0.3070293366909027,
-0.4019243121147156,
0.05719399452209473,
-0.3252283036708832,
0.20253761112689972,
-0.24396882951259613,
0.18957370519638062,
-0.0389423631131649,
-0.021777518093585968,
-0.021355047821998596,
0.07561555504798889,
0.026173055171966553,
-0.1517265886068344,
0.08328773081302643,
-0.1518092006444931,
-0.0018282224191352725,
0.70506352186203,
0.04057884216308594,
-0.11295051127672195,
-0.203643798828125,
-0.08539561182260513,
0.25474461913108826,
-0.302349716424942,
0.08252830803394318,
0.1992599219083786,
-0.15453267097473145,
-0.12462969869375229,
0.3978864848613739,
0.1624492108821869,
-0.023472553119063377,
0.11338446289300919,
-0.27097976207733154,
-0.3463476300239563,
0.05753840506076813,
0.07800201326608658,
0.16644911468029022,
0.3028993606567383,
0.4726239740848541,
-0.3015042841434479,
0.20820026099681854,
-0.38536420464515686,
0.0686919242143631,
-0.23845067620277405,
0.15259763598442078,
-0.3551488220691681,
-0.20526023209095,
-0.10282757878303528,
0.10746365040540695,
0.2787960171699524,
0.09280425310134888,
-0.06836003065109253,
-0.28819170594215393,
-0.2296648472547531,
0.08471851050853729,
0.26504790782928467,
-0.2120727300643921,
0.12375926971435547,
0.11278105527162552,
-0.0015063066966831684,
-0.056517813354730606,
0.3081408739089966,
0.0776202380657196,
-0.2505300045013428,
0.1111036092042923,
0.592181384563446,
-0.07659949362277985,
-0.16456571221351624,
0.006106678396463394,
-0.07839427888393402,
0.0988008975982666,
0.18455375730991364,
0.2819567620754242,
-0.21413789689540863,
-0.007205369882285595,
0.3499433100223541,
0.18659856915473938,
0.4559263288974762,
0.03263036534190178,
0.049123022705316544,
-0.3490314185619354,
-0.21375052630901337,
-0.01965942792594433,
0.0012266056146472692,
0.13824042677879333,
-0.3447354733943939,
-0.2978059649467468,
0.4043281078338623,
0.28670534491539,
-0.16024579107761383,
-0.325697660446167,
0.19166412949562073,
-0.32268840074539185,
-0.006972617004066706,
0.05651424080133438,
0.2503926455974579,
-0.14390993118286133,
-0.041489679366350174,
0.04562745615839958,
0.4177839159965515,
0.1997782438993454,
-0.3197242021560669,
-0.07975970953702927,
-0.3528236448764801,
0.0765819251537323,
0.40182819962501526,
0.19015654921531677,
-0.06661178171634674,
0.27333348989486694,
-0.24564382433891296,
0.19716212153434753,
0.058029018342494965,
0.1831250637769699,
-0.004915105178952217,
-0.3754424750804901,
-0.04509561136364937,
0.14054922759532928,
0.26847994327545166,
-0.06901361048221588,
0.09235255420207977,
0.3056265711784363,
0.4787783920764923,
0.13407491147518158,
-0.0058572678826749325,
0.38911429047584534,
-0.23005419969558716,
-0.161634624004364,
-0.4251536726951599,
-0.11394060403108597,
-0.03068598546087742,
-0.01748107559978962,
-0.16156186163425446,
-0.18296031653881073,
-0.22248221933841705,
-0.0033166632056236267,
-0.1830255687236786,
-0.31411638855934143,
0.3666456937789917,
0.11654941737651825,
-0.3271212875843048,
-0.27766212821006775,
0.28810760378837585,
-0.03879551216959953,
-0.05340995639562607,
0.27640068531036377,
-0.010955440811812878,
0.688417911529541,
0.2924543023109436,
-0.12287421524524689,
-0.07927059382200241,
-0.3259628713130951,
-0.026736119762063026,
-0.09096323698759079,
0.2114732265472412,
0.30305901169776917,
0.1856168508529663,
0.1467868685722351,
0.2025323212146759,
-0.27970653772354126,
-0.22801820933818817,
0.31840789318084717,
-0.1688210517168045,
0.22123460471630096,
-0.11196320503950119,
0.05387839302420616,
-0.31209778785705566,
-0.1559111326932907,
0.03504941612482071,
-0.2352515161037445,
0.08887821435928345,
0.3028607964515686,
0.08443954586982727,
0.19256916642189026,
-0.10659769922494888,
0.14272120594978333,
-0.10733243077993393,
0.5459739565849304,
0.3189663290977478,
0.20246832072734833,
-0.3789909780025482,
-0.13727641105651855,
-0.5676916241645813,
0.442623108625412,
-0.1167263388633728,
-0.12072008103132248,
0.09621674567461014,
0.15912018716335297,
0.1832960844039917,
0.04763878881931305,
-0.06366799026727676,
0.44304728507995605,
-0.3306940197944641,
0.0057580131106078625,
-0.3567465543746948,
0.2899416387081146,
0.10109934210777283,
-0.04996560141444206,
-0.067470982670784,
-0.1776786744594574,
0.2722306549549103,
-0.3564906716346741,
0.21251210570335388,
-0.11970200389623642,
-0.13601280748844147,
0.004999988712370396,
-0.09613579511642456,
0.4867601692676544,
-0.006344574503600597,
0.496871680021286,
-0.1446746587753296,
0.4019797444343567,
0.038874298334121704,
-0.24481284618377686,
-0.2022351175546646,
0.04249754175543785,
0.10351825505495071,
0.15506203472614288,
0.15566639602184296,
0.15217624604701996,
-0.18365179002285004,
0.15249089896678925,
-0.012598208151757717,
-0.12019450217485428,
-0.0030115817207843065,
0.46110332012176514,
-0.04363923519849777,
0.033128269016742706,
-0.22885315120220184,
0.027642440050840378,
0.15263588726520538,
0.2267368733882904,
-0.27045661211013794,
-0.4732050597667694,
0.365266889333725,
-0.5546078681945801,
-0.35777610540390015,
-0.07633950561285019,
0.03622787818312645,
0.22483119368553162,
-0.15258067846298218,
-0.1592683345079422,
0.05694133788347244,
0.43299922347068787,
-0.06775245070457458,
-0.2632969915866852,
0.18779852986335754,
0.0935552790760994,
-0.0032134936191141605,
-0.09110217541456223,
0.26139944791793823,
0.07837457954883575,
-0.09310419857501984,
-0.2422768771648407,
-0.32711103558540344
] |
https://github.com/huggingface/datasets/issues/2206
|
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
Thanks for the quick reply @mariosasko. What I did was to changed the optimizer to use int32 instead of int8.
What you're suggesting specifies the type for each feature explicitly without changing the HF code. This is definitely a better option. However, we are hitting a new error later:
```
File "/Users/ccccc/PycharmProjects/aaaa-ml/venv-source/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() got an unexpected keyword argument 'pos'
```
Where 'pos' is the name of a new feature we added. Do you agree that your way of fixing the optimizer issue will not fix our new issue? If not, I will continue with this optimizer fix until we resolve our other issue.
|
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
| 111 |
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
[
-0.30897170305252075,
0.4055931568145752,
-0.07608239352703094,
0.03618088737130165,
0.36590299010276794,
-0.14709879457950592,
0.1483515053987503,
0.12841637432575226,
-0.3896856904029846,
0.04695077985525131,
-0.14953932166099548,
0.5155912637710571,
-0.1445295810699463,
0.05200037360191345,
0.13605378568172455,
-0.05998845770955086,
0.15429650247097015,
0.42665979266166687,
0.256109356880188,
0.05443771183490753,
-0.0707269236445427,
0.10945941507816315,
-0.1680394560098648,
0.3761958181858063,
-0.49062082171440125,
-0.029642747715115547,
0.03350016847252846,
0.11923826485872269,
-0.2120494395494461,
-0.6330580711364746,
-0.16227702796459198,
0.22744697332382202,
0.20422163605690002,
0.2120445817708969,
-0.00010684304288588464,
0.08612442761659622,
0.18671952188014984,
0.05093606561422348,
-0.135593980550766,
0.0812402293086052,
0.167697936296463,
-0.07285735756158829,
0.048738207668066025,
-0.14014330506324768,
0.10583125799894333,
-0.709212064743042,
-0.021385731175541878,
0.27964943647384644,
0.20057722926139832,
0.37240901589393616,
0.2777716815471649,
0.5433839559555054,
0.0372563898563385,
-0.050568219274282455,
0.5747066736221313,
-0.04956657811999321,
0.10765888541936874,
0.060507241636514664,
0.1941862553358078,
-0.053756073117256165,
-0.11220098286867142,
-0.011184762232005596,
-0.09648102521896362,
-0.09746017307043076,
0.07040567696094513,
0.07537294924259186,
-0.007009005174040794,
-0.004612604156136513,
0.08220739662647247,
-0.08879974484443665,
0.38174688816070557,
-0.2900778353214264,
-0.11621007323265076,
-0.009967274963855743,
-0.008918781764805317,
-0.3989097476005554,
0.04620549455285072,
-0.07729929685592651,
-0.10706305503845215,
0.012882656417787075,
0.07972171902656555,
-0.065013088285923,
-0.16352199018001556,
0.2718081772327423,
-0.2456239014863968,
0.45515167713165283,
-0.00642046332359314,
0.12027042359113693,
-0.15856756269931793,
-0.13465678691864014,
0.16571994125843048,
0.024167979136109352,
-0.15089912712574005,
0.14763861894607544,
-0.12216559797525406,
0.02079036645591259,
-0.004778334405273199,
-0.10887220501899719,
0.20923025906085968,
0.10328676551580429,
-0.11153604835271835,
0.2660713195800781,
0.16684123873710632,
0.21492169797420502,
-0.09203264117240906,
0.15667319297790527,
-0.0665196105837822,
0.2351931482553482,
0.19046953320503235,
-0.27704358100891113,
-0.12073125690221786,
-0.06829943507909775,
-0.3081552982330322,
-0.055579107254743576,
0.19701126217842102,
-0.1363135725259781,
0.07898560166358948,
0.02248416841030121,
-0.16048774123191833,
0.06294962763786316,
-0.22300860285758972,
-0.0010947718983516097,
0.07115977257490158,
0.46591195464134216,
0.10303644090890884,
-0.34996578097343445,
-0.3529745638370514,
0.3955211043357849,
-0.1916089504957199,
-0.13974449038505554,
-0.2523546516895294,
0.150193452835083,
-0.06993371993303299,
-0.02837025560438633,
0.14322248101234436,
0.15478476881980896,
0.23784710466861725,
0.17771971225738525,
0.062209706753492355,
0.0685104951262474,
0.16932691633701324,
-0.012075666338205338,
-0.034804437309503555,
0.16605797410011292,
0.13749630749225616,
0.16142457723617554,
0.028616299852728844,
-0.30149897933006287,
-0.026846831664443016,
0.19841919839382172,
-0.06777612119913101,
-0.40250861644744873,
-0.31008556485176086,
0.2656112611293793,
-0.1478831022977829,
-0.21451307833194733,
-0.16411682963371277,
0.05558066815137863,
0.2179000824689865,
-0.21342813968658447,
-0.15917259454727173,
-0.11336283385753632,
0.10289853066205978,
-0.2378131002187729,
0.21065565943717957,
-0.05797901749610901,
-0.45628151297569275,
-0.13843441009521484,
0.20925967395305634,
-0.27850887179374695,
0.33993157744407654,
0.3796745538711548,
-0.2668919861316681,
0.41579505801200867,
-0.25097110867500305,
0.8668917417526245,
0.44677841663360596,
-0.02490997686982155,
-0.26473677158355713,
0.0037575573660433292,
-0.16977670788764954,
-0.13608139753341675,
0.04563954472541809,
-0.0011625641491264105,
0.43838006258010864,
0.08135829120874405,
0.16278710961341858,
0.15922483801841736,
0.09208361804485321,
0.07727635651826859,
-0.1863395869731903,
-0.019970187917351723,
0.2616305351257324,
0.21780286729335785,
0.14471480250358582,
-0.06738840788602829,
0.10835108160972595,
-0.11710494011640549,
0.006070719100534916,
-0.31598159670829773,
0.0810050293803215,
-0.07522521913051605,
0.294725626707077,
0.10643686354160309,
0.05217352136969566,
-0.07274366170167923,
-0.12202771753072739,
0.0608065091073513,
-0.22057540714740753,
0.16095459461212158,
-0.4041179120540619,
-0.10160773992538452,
-0.3508574366569519,
0.21713189780712128,
-0.2074071317911148,
0.054863981902599335,
0.24829119443893433,
0.13057447969913483,
-0.08503589034080505,
0.28695565462112427,
-0.008851425722241402,
-0.2644532322883606,
0.143127903342247,
0.12063690274953842,
0.28770139813423157,
0.17252270877361298,
-0.24641600251197815,
-0.48015546798706055,
0.08668400347232819,
0.12271832674741745,
0.2584191560745239,
0.0005567671032622457,
0.021385811269283295,
0.18055982887744904,
0.023171478882431984,
-0.057772956788539886,
-0.2645532488822937,
0.041315771639347076,
0.0028003256302326918,
-0.08859682083129883,
-0.0021094484254717827,
-0.10591260343790054,
0.0880884900689125,
-0.09896037727594376,
0.3821808993816376,
0.34586381912231445,
0.3512187898159027,
-0.15592561662197113,
-0.057151373475790024,
-0.10886159539222717,
0.41896915435791016,
-0.04119434580206871,
0.2659563720226288,
-0.1569688618183136,
-0.053304072469472885,
0.2814994156360626,
0.22704488039016724,
-0.02913569286465645,
-0.18700425326824188,
-0.046371687203645706,
0.27512437105178833,
-0.14191311597824097,
0.22527219355106354,
-0.06374654173851013,
-0.23195351660251617,
-0.1274203658103943,
0.21089455485343933,
-0.36873650550842285,
0.21617427468299866,
0.3495454490184784,
-0.04341783747076988,
0.016065847128629684,
-0.15647536516189575,
-0.26138436794281006,
0.1437440812587738,
0.0009382247808389366,
-0.04472490772604942,
0.3564412295818329,
0.2837355434894562,
-0.051114968955516815,
-0.5715952515602112,
-0.11474744230508804,
0.19952774047851562,
0.20824435353279114,
-0.39812973141670227,
-0.04964565485715866,
-0.20723272860050201,
-0.1593366116285324,
0.2349129319190979,
-0.3719785213470459,
-0.03269167244434357,
-0.2440781146287918,
0.29789507389068604,
0.08388195931911469,
-0.005095146596431732,
0.40325385332107544,
0.13971228897571564,
0.16433292627334595,
0.09831909090280533,
-0.03256456181406975,
-0.19435670971870422,
-0.25741589069366455,
-0.43839743733406067,
0.14590714871883392,
0.17331665754318237,
0.00971483625471592,
0.2719748914241791,
0.016300728544592857,
0.14338378608226776,
-0.21649444103240967,
-0.5072538256645203,
0.22909307479858398,
-0.025162216275930405,
0.26944974064826965,
0.06254591792821884,
-0.07352300733327866,
0.0419851690530777,
-0.40535789728164673,
0.3040679395198822,
-0.15629027783870697,
-0.270226389169693,
0.16793227195739746,
-0.27997562289237976,
-0.2417411059141159,
-0.07538622617721558,
-0.10810532420873642,
-0.22493040561676025,
-0.08681811392307281,
-0.09031520038843155,
0.103107750415802,
0.12265992164611816,
-0.1955285221338272,
0.08684083819389343,
0.0964142456650734,
-0.19266733527183533,
-0.2548818290233612,
-0.33381715416908264,
0.004083935637027025,
0.49443286657333374,
-0.3106500208377838,
-0.33828237652778625,
0.09779979288578033,
-0.20131585001945496,
0.23685458302497864,
0.10276784747838974,
-0.20165890455245972,
0.0024379717651754618,
0.02878461964428425,
0.44856956601142883,
-0.08284859359264374,
-0.15224875509738922,
0.11880947649478912,
0.027854837477207184,
-0.1820821315050125,
0.010759538970887661,
-0.13392698764801025,
-0.06368350982666016,
-0.2717314660549164,
-0.04215322434902191,
-0.3543474078178406,
0.29789629578590393,
0.05386500805616379,
0.7404306530952454,
-0.5370520949363708,
-0.12117420881986618,
0.5505082011222839,
-0.4353282153606415,
0.14656037092208862,
-0.03923884034156799,
-0.08729895949363708,
0.030474932864308357,
0.03221968561410904,
-0.016824379563331604,
0.26638564467430115,
-0.19834476709365845,
-0.2875024378299713,
0.2601868808269501,
-0.04508640989661217,
-0.1954939067363739,
-0.18650655448436737,
0.1126093789935112,
0.15539893507957458,
0.009531932882964611,
0.1079244315624237,
0.03605683147907257,
-0.2964444160461426,
-0.08382054418325424,
0.14378933608531952,
-0.030490029603242874,
-0.28843384981155396,
-0.030787581577897072,
-0.6243004202842712,
0.05422402545809746,
-0.3421120345592499,
0.258767306804657,
0.16356490552425385,
0.26126760244369507,
-0.06161104142665863,
-0.041257258504629135,
0.14127862453460693,
-0.1078895553946495,
0.7498197555541992,
0.0916622132062912,
-0.01656743325293064,
0.22620606422424316,
-0.004279387183487415,
-0.28557685017585754,
-0.16657841205596924,
-0.21745891869068146,
0.19861653447151184,
0.1432514190673828,
0.4252372086048126,
-0.3894381821155548,
0.060357049107551575,
-0.07648476213216782,
-0.11364446580410004,
-0.04898932948708534,
-0.24099749326705933,
-0.1369180977344513,
-0.28232747316360474,
-0.5182370543479919,
0.12678216397762299,
0.024863561615347862,
0.33603158593177795,
0.09031731635332108,
-0.22185668349266052,
-0.1575891375541687,
-0.08876614272594452,
0.0057285805232822895,
0.2584598660469055,
0.07943981885910034,
0.012811058200895786,
-0.1100349947810173,
-0.06133390590548515,
-0.07123486697673798,
0.4190424084663391,
0.03155180811882019,
0.32806578278541565,
-0.5093815922737122,
-0.04448726773262024,
-0.017156386747956276,
0.25280246138572693,
0.05243675783276558,
-0.14383909106254578,
0.3167624771595001,
-0.14389899373054504,
0.050471123307943344,
0.06678938865661621,
0.5942487716674805,
0.24734511971473694,
-0.04612373188138008,
-0.3125636875629425,
0.0872403085231781,
0.09281887114048004,
-0.03822912275791168,
-0.07098335027694702,
-0.029804544523358345,
0.06288086622953415,
-0.37341225147247314,
0.447323203086853,
0.09258286654949188,
0.7007001638412476,
-0.17073999345302582,
0.30534282326698303,
0.6452827453613281,
-0.10880540311336517,
0.2540002763271332,
-0.2714126408100128,
-0.142194926738739,
-0.3598727881908417,
0.14066515862941742,
0.1268530935049057,
-0.11925090104341507,
-0.045587752014398575,
0.1679883450269699,
-0.14322993159294128,
-0.09371118247509003,
-0.01546104159206152,
0.4786778688430786,
0.1942773461341858,
0.3889674246311188,
0.057145651429891586,
-0.16987639665603638,
-0.18317332863807678,
0.21390503644943237,
-0.04444378986954689,
-0.06983869522809982,
-0.1924707591533661,
-0.002798971487209201,
0.04208268225193024,
-0.23006655275821686,
0.038358524441719055,
0.004677572287619114,
-0.296299546957016,
0.28108665347099304,
0.20459438860416412,
-0.14193503558635712,
-0.0985553190112114,
-0.06549879163503647,
0.0020430602598935366,
0.13173945248126984,
-0.08900715410709381,
0.21441492438316345,
-0.03892461210489273,
-0.18957306444644928,
-0.16483648121356964,
-0.20852263271808624,
-0.026392344385385513,
-0.11788799613714218,
-0.2213272899389267,
0.2864733040332794,
0.056477516889572144,
-0.1605992615222931,
-0.07816775888204575,
-0.03973837569355965,
0.3070293366909027,
-0.4019243121147156,
0.05719399452209473,
-0.3252283036708832,
0.20253761112689972,
-0.24396882951259613,
0.18957370519638062,
-0.0389423631131649,
-0.021777518093585968,
-0.021355047821998596,
0.07561555504798889,
0.026173055171966553,
-0.1517265886068344,
0.08328773081302643,
-0.1518092006444931,
-0.0018282224191352725,
0.70506352186203,
0.04057884216308594,
-0.11295051127672195,
-0.203643798828125,
-0.08539561182260513,
0.25474461913108826,
-0.302349716424942,
0.08252830803394318,
0.1992599219083786,
-0.15453267097473145,
-0.12462969869375229,
0.3978864848613739,
0.1624492108821869,
-0.023472553119063377,
0.11338446289300919,
-0.27097976207733154,
-0.3463476300239563,
0.05753840506076813,
0.07800201326608658,
0.16644911468029022,
0.3028993606567383,
0.4726239740848541,
-0.3015042841434479,
0.20820026099681854,
-0.38536420464515686,
0.0686919242143631,
-0.23845067620277405,
0.15259763598442078,
-0.3551488220691681,
-0.20526023209095,
-0.10282757878303528,
0.10746365040540695,
0.2787960171699524,
0.09280425310134888,
-0.06836003065109253,
-0.28819170594215393,
-0.2296648472547531,
0.08471851050853729,
0.26504790782928467,
-0.2120727300643921,
0.12375926971435547,
0.11278105527162552,
-0.0015063066966831684,
-0.056517813354730606,
0.3081408739089966,
0.0776202380657196,
-0.2505300045013428,
0.1111036092042923,
0.592181384563446,
-0.07659949362277985,
-0.16456571221351624,
0.006106678396463394,
-0.07839427888393402,
0.0988008975982666,
0.18455375730991364,
0.2819567620754242,
-0.21413789689540863,
-0.007205369882285595,
0.3499433100223541,
0.18659856915473938,
0.4559263288974762,
0.03263036534190178,
0.049123022705316544,
-0.3490314185619354,
-0.21375052630901337,
-0.01965942792594433,
0.0012266056146472692,
0.13824042677879333,
-0.3447354733943939,
-0.2978059649467468,
0.4043281078338623,
0.28670534491539,
-0.16024579107761383,
-0.325697660446167,
0.19166412949562073,
-0.32268840074539185,
-0.006972617004066706,
0.05651424080133438,
0.2503926455974579,
-0.14390993118286133,
-0.041489679366350174,
0.04562745615839958,
0.4177839159965515,
0.1997782438993454,
-0.3197242021560669,
-0.07975970953702927,
-0.3528236448764801,
0.0765819251537323,
0.40182819962501526,
0.19015654921531677,
-0.06661178171634674,
0.27333348989486694,
-0.24564382433891296,
0.19716212153434753,
0.058029018342494965,
0.1831250637769699,
-0.004915105178952217,
-0.3754424750804901,
-0.04509561136364937,
0.14054922759532928,
0.26847994327545166,
-0.06901361048221588,
0.09235255420207977,
0.3056265711784363,
0.4787783920764923,
0.13407491147518158,
-0.0058572678826749325,
0.38911429047584534,
-0.23005419969558716,
-0.161634624004364,
-0.4251536726951599,
-0.11394060403108597,
-0.03068598546087742,
-0.01748107559978962,
-0.16156186163425446,
-0.18296031653881073,
-0.22248221933841705,
-0.0033166632056236267,
-0.1830255687236786,
-0.31411638855934143,
0.3666456937789917,
0.11654941737651825,
-0.3271212875843048,
-0.27766212821006775,
0.28810760378837585,
-0.03879551216959953,
-0.05340995639562607,
0.27640068531036377,
-0.010955440811812878,
0.688417911529541,
0.2924543023109436,
-0.12287421524524689,
-0.07927059382200241,
-0.3259628713130951,
-0.026736119762063026,
-0.09096323698759079,
0.2114732265472412,
0.30305901169776917,
0.1856168508529663,
0.1467868685722351,
0.2025323212146759,
-0.27970653772354126,
-0.22801820933818817,
0.31840789318084717,
-0.1688210517168045,
0.22123460471630096,
-0.11196320503950119,
0.05387839302420616,
-0.31209778785705566,
-0.1559111326932907,
0.03504941612482071,
-0.2352515161037445,
0.08887821435928345,
0.3028607964515686,
0.08443954586982727,
0.19256916642189026,
-0.10659769922494888,
0.14272120594978333,
-0.10733243077993393,
0.5459739565849304,
0.3189663290977478,
0.20246832072734833,
-0.3789909780025482,
-0.13727641105651855,
-0.5676916241645813,
0.442623108625412,
-0.1167263388633728,
-0.12072008103132248,
0.09621674567461014,
0.15912018716335297,
0.1832960844039917,
0.04763878881931305,
-0.06366799026727676,
0.44304728507995605,
-0.3306940197944641,
0.0057580131106078625,
-0.3567465543746948,
0.2899416387081146,
0.10109934210777283,
-0.04996560141444206,
-0.067470982670784,
-0.1776786744594574,
0.2722306549549103,
-0.3564906716346741,
0.21251210570335388,
-0.11970200389623642,
-0.13601280748844147,
0.004999988712370396,
-0.09613579511642456,
0.4867601692676544,
-0.006344574503600597,
0.496871680021286,
-0.1446746587753296,
0.4019797444343567,
0.038874298334121704,
-0.24481284618377686,
-0.2022351175546646,
0.04249754175543785,
0.10351825505495071,
0.15506203472614288,
0.15566639602184296,
0.15217624604701996,
-0.18365179002285004,
0.15249089896678925,
-0.012598208151757717,
-0.12019450217485428,
-0.0030115817207843065,
0.46110332012176514,
-0.04363923519849777,
0.033128269016742706,
-0.22885315120220184,
0.027642440050840378,
0.15263588726520538,
0.2267368733882904,
-0.27045661211013794,
-0.4732050597667694,
0.365266889333725,
-0.5546078681945801,
-0.35777610540390015,
-0.07633950561285019,
0.03622787818312645,
0.22483119368553162,
-0.15258067846298218,
-0.1592683345079422,
0.05694133788347244,
0.43299922347068787,
-0.06775245070457458,
-0.2632969915866852,
0.18779852986335754,
0.0935552790760994,
-0.0032134936191141605,
-0.09110217541456223,
0.26139944791793823,
0.07837457954883575,
-0.09310419857501984,
-0.2422768771648407,
-0.32711103558540344
] |
https://github.com/huggingface/datasets/issues/2206
|
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
Hi @gwc4github,
the fix was merged a few minutes ago, and it doesn't require any changes on the user side (e.g. no need for specifying `features`). If you find time, feel free to install `datasets` from master with:
```
pip install git+https://github.com/huggingface/datasets.git
```
and let us know if it works for your use case!
|
I added five more special tokens into the GPT2 tokenizer. But after that, when I try to pre-process the data using my previous code, I got an error shown below:
Traceback (most recent call last):
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_dataset.py", line 1687, in _map_single
writer.write(example)
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 296, in write
self.write_on_file()
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 270, in write_on_file
pa_array = pa.array(typed_sequence)
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/datasets/arrow_writer.py", line 108, in __arrow_array__
out = out.cast(pa.list_(self.optimized_int_type))
File "pyarrow/array.pxi", line 810, in pyarrow.lib.Array.cast
File "/home/xuyan/anaconda3/envs/convqa/lib/python3.7/site-packages/pyarrow/compute.py", line 281, in cast
return call_function("cast", [arr], options)
File "pyarrow/_compute.pyx", line 465, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 294, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Integer value 50259 not in range: -128 to 127
Do you have any idea about it?
| 54 |
Got pyarrow error when loading a dataset while adding special tokens into the tokenizer
|
[
-0.30897170305252075,
0.4055931568145752,
-0.07608239352703094,
0.03618088737130165,
0.36590299010276794,
-0.14709879457950592,
0.1483515053987503,
0.12841637432575226,
-0.3896856904029846,
0.04695077985525131,
-0.14953932166099548,
0.5155912637710571,
-0.1445295810699463,
0.05200037360191345,
0.13605378568172455,
-0.05998845770955086,
0.15429650247097015,
0.42665979266166687,
0.256109356880188,
0.05443771183490753,
-0.0707269236445427,
0.10945941507816315,
-0.1680394560098648,
0.3761958181858063,
-0.49062082171440125,
-0.029642747715115547,
0.03350016847252846,
0.11923826485872269,
-0.2120494395494461,
-0.6330580711364746,
-0.16227702796459198,
0.22744697332382202,
0.20422163605690002,
0.2120445817708969,
-0.00010684304288588464,
0.08612442761659622,
0.18671952188014984,
0.05093606561422348,
-0.135593980550766,
0.0812402293086052,
0.167697936296463,
-0.07285735756158829,
0.048738207668066025,
-0.14014330506324768,
0.10583125799894333,
-0.709212064743042,
-0.021385731175541878,
0.27964943647384644,
0.20057722926139832,
0.37240901589393616,
0.2777716815471649,
0.5433839559555054,
0.0372563898563385,
-0.050568219274282455,
0.5747066736221313,
-0.04956657811999321,
0.10765888541936874,
0.060507241636514664,
0.1941862553358078,
-0.053756073117256165,
-0.11220098286867142,
-0.011184762232005596,
-0.09648102521896362,
-0.09746017307043076,
0.07040567696094513,
0.07537294924259186,
-0.007009005174040794,
-0.004612604156136513,
0.08220739662647247,
-0.08879974484443665,
0.38174688816070557,
-0.2900778353214264,
-0.11621007323265076,
-0.009967274963855743,
-0.008918781764805317,
-0.3989097476005554,
0.04620549455285072,
-0.07729929685592651,
-0.10706305503845215,
0.012882656417787075,
0.07972171902656555,
-0.065013088285923,
-0.16352199018001556,
0.2718081772327423,
-0.2456239014863968,
0.45515167713165283,
-0.00642046332359314,
0.12027042359113693,
-0.15856756269931793,
-0.13465678691864014,
0.16571994125843048,
0.024167979136109352,
-0.15089912712574005,
0.14763861894607544,
-0.12216559797525406,
0.02079036645591259,
-0.004778334405273199,
-0.10887220501899719,
0.20923025906085968,
0.10328676551580429,
-0.11153604835271835,
0.2660713195800781,
0.16684123873710632,
0.21492169797420502,
-0.09203264117240906,
0.15667319297790527,
-0.0665196105837822,
0.2351931482553482,
0.19046953320503235,
-0.27704358100891113,
-0.12073125690221786,
-0.06829943507909775,
-0.3081552982330322,
-0.055579107254743576,
0.19701126217842102,
-0.1363135725259781,
0.07898560166358948,
0.02248416841030121,
-0.16048774123191833,
0.06294962763786316,
-0.22300860285758972,
-0.0010947718983516097,
0.07115977257490158,
0.46591195464134216,
0.10303644090890884,
-0.34996578097343445,
-0.3529745638370514,
0.3955211043357849,
-0.1916089504957199,
-0.13974449038505554,
-0.2523546516895294,
0.150193452835083,
-0.06993371993303299,
-0.02837025560438633,
0.14322248101234436,
0.15478476881980896,
0.23784710466861725,
0.17771971225738525,
0.062209706753492355,
0.0685104951262474,
0.16932691633701324,
-0.012075666338205338,
-0.034804437309503555,
0.16605797410011292,
0.13749630749225616,
0.16142457723617554,
0.028616299852728844,
-0.30149897933006287,
-0.026846831664443016,
0.19841919839382172,
-0.06777612119913101,
-0.40250861644744873,
-0.31008556485176086,
0.2656112611293793,
-0.1478831022977829,
-0.21451307833194733,
-0.16411682963371277,
0.05558066815137863,
0.2179000824689865,
-0.21342813968658447,
-0.15917259454727173,
-0.11336283385753632,
0.10289853066205978,
-0.2378131002187729,
0.21065565943717957,
-0.05797901749610901,
-0.45628151297569275,
-0.13843441009521484,
0.20925967395305634,
-0.27850887179374695,
0.33993157744407654,
0.3796745538711548,
-0.2668919861316681,
0.41579505801200867,
-0.25097110867500305,
0.8668917417526245,
0.44677841663360596,
-0.02490997686982155,
-0.26473677158355713,
0.0037575573660433292,
-0.16977670788764954,
-0.13608139753341675,
0.04563954472541809,
-0.0011625641491264105,
0.43838006258010864,
0.08135829120874405,
0.16278710961341858,
0.15922483801841736,
0.09208361804485321,
0.07727635651826859,
-0.1863395869731903,
-0.019970187917351723,
0.2616305351257324,
0.21780286729335785,
0.14471480250358582,
-0.06738840788602829,
0.10835108160972595,
-0.11710494011640549,
0.006070719100534916,
-0.31598159670829773,
0.0810050293803215,
-0.07522521913051605,
0.294725626707077,
0.10643686354160309,
0.05217352136969566,
-0.07274366170167923,
-0.12202771753072739,
0.0608065091073513,
-0.22057540714740753,
0.16095459461212158,
-0.4041179120540619,
-0.10160773992538452,
-0.3508574366569519,
0.21713189780712128,
-0.2074071317911148,
0.054863981902599335,
0.24829119443893433,
0.13057447969913483,
-0.08503589034080505,
0.28695565462112427,
-0.008851425722241402,
-0.2644532322883606,
0.143127903342247,
0.12063690274953842,
0.28770139813423157,
0.17252270877361298,
-0.24641600251197815,
-0.48015546798706055,
0.08668400347232819,
0.12271832674741745,
0.2584191560745239,
0.0005567671032622457,
0.021385811269283295,
0.18055982887744904,
0.023171478882431984,
-0.057772956788539886,
-0.2645532488822937,
0.041315771639347076,
0.0028003256302326918,
-0.08859682083129883,
-0.0021094484254717827,
-0.10591260343790054,
0.0880884900689125,
-0.09896037727594376,
0.3821808993816376,
0.34586381912231445,
0.3512187898159027,
-0.15592561662197113,
-0.057151373475790024,
-0.10886159539222717,
0.41896915435791016,
-0.04119434580206871,
0.2659563720226288,
-0.1569688618183136,
-0.053304072469472885,
0.2814994156360626,
0.22704488039016724,
-0.02913569286465645,
-0.18700425326824188,
-0.046371687203645706,
0.27512437105178833,
-0.14191311597824097,
0.22527219355106354,
-0.06374654173851013,
-0.23195351660251617,
-0.1274203658103943,
0.21089455485343933,
-0.36873650550842285,
0.21617427468299866,
0.3495454490184784,
-0.04341783747076988,
0.016065847128629684,
-0.15647536516189575,
-0.26138436794281006,
0.1437440812587738,
0.0009382247808389366,
-0.04472490772604942,
0.3564412295818329,
0.2837355434894562,
-0.051114968955516815,
-0.5715952515602112,
-0.11474744230508804,
0.19952774047851562,
0.20824435353279114,
-0.39812973141670227,
-0.04964565485715866,
-0.20723272860050201,
-0.1593366116285324,
0.2349129319190979,
-0.3719785213470459,
-0.03269167244434357,
-0.2440781146287918,
0.29789507389068604,
0.08388195931911469,
-0.005095146596431732,
0.40325385332107544,
0.13971228897571564,
0.16433292627334595,
0.09831909090280533,
-0.03256456181406975,
-0.19435670971870422,
-0.25741589069366455,
-0.43839743733406067,
0.14590714871883392,
0.17331665754318237,
0.00971483625471592,
0.2719748914241791,
0.016300728544592857,
0.14338378608226776,
-0.21649444103240967,
-0.5072538256645203,
0.22909307479858398,
-0.025162216275930405,
0.26944974064826965,
0.06254591792821884,
-0.07352300733327866,
0.0419851690530777,
-0.40535789728164673,
0.3040679395198822,
-0.15629027783870697,
-0.270226389169693,
0.16793227195739746,
-0.27997562289237976,
-0.2417411059141159,
-0.07538622617721558,
-0.10810532420873642,
-0.22493040561676025,
-0.08681811392307281,
-0.09031520038843155,
0.103107750415802,
0.12265992164611816,
-0.1955285221338272,
0.08684083819389343,
0.0964142456650734,
-0.19266733527183533,
-0.2548818290233612,
-0.33381715416908264,
0.004083935637027025,
0.49443286657333374,
-0.3106500208377838,
-0.33828237652778625,
0.09779979288578033,
-0.20131585001945496,
0.23685458302497864,
0.10276784747838974,
-0.20165890455245972,
0.0024379717651754618,
0.02878461964428425,
0.44856956601142883,
-0.08284859359264374,
-0.15224875509738922,
0.11880947649478912,
0.027854837477207184,
-0.1820821315050125,
0.010759538970887661,
-0.13392698764801025,
-0.06368350982666016,
-0.2717314660549164,
-0.04215322434902191,
-0.3543474078178406,
0.29789629578590393,
0.05386500805616379,
0.7404306530952454,
-0.5370520949363708,
-0.12117420881986618,
0.5505082011222839,
-0.4353282153606415,
0.14656037092208862,
-0.03923884034156799,
-0.08729895949363708,
0.030474932864308357,
0.03221968561410904,
-0.016824379563331604,
0.26638564467430115,
-0.19834476709365845,
-0.2875024378299713,
0.2601868808269501,
-0.04508640989661217,
-0.1954939067363739,
-0.18650655448436737,
0.1126093789935112,
0.15539893507957458,
0.009531932882964611,
0.1079244315624237,
0.03605683147907257,
-0.2964444160461426,
-0.08382054418325424,
0.14378933608531952,
-0.030490029603242874,
-0.28843384981155396,
-0.030787581577897072,
-0.6243004202842712,
0.05422402545809746,
-0.3421120345592499,
0.258767306804657,
0.16356490552425385,
0.26126760244369507,
-0.06161104142665863,
-0.041257258504629135,
0.14127862453460693,
-0.1078895553946495,
0.7498197555541992,
0.0916622132062912,
-0.01656743325293064,
0.22620606422424316,
-0.004279387183487415,
-0.28557685017585754,
-0.16657841205596924,
-0.21745891869068146,
0.19861653447151184,
0.1432514190673828,
0.4252372086048126,
-0.3894381821155548,
0.060357049107551575,
-0.07648476213216782,
-0.11364446580410004,
-0.04898932948708534,
-0.24099749326705933,
-0.1369180977344513,
-0.28232747316360474,
-0.5182370543479919,
0.12678216397762299,
0.024863561615347862,
0.33603158593177795,
0.09031731635332108,
-0.22185668349266052,
-0.1575891375541687,
-0.08876614272594452,
0.0057285805232822895,
0.2584598660469055,
0.07943981885910034,
0.012811058200895786,
-0.1100349947810173,
-0.06133390590548515,
-0.07123486697673798,
0.4190424084663391,
0.03155180811882019,
0.32806578278541565,
-0.5093815922737122,
-0.04448726773262024,
-0.017156386747956276,
0.25280246138572693,
0.05243675783276558,
-0.14383909106254578,
0.3167624771595001,
-0.14389899373054504,
0.050471123307943344,
0.06678938865661621,
0.5942487716674805,
0.24734511971473694,
-0.04612373188138008,
-0.3125636875629425,
0.0872403085231781,
0.09281887114048004,
-0.03822912275791168,
-0.07098335027694702,
-0.029804544523358345,
0.06288086622953415,
-0.37341225147247314,
0.447323203086853,
0.09258286654949188,
0.7007001638412476,
-0.17073999345302582,
0.30534282326698303,
0.6452827453613281,
-0.10880540311336517,
0.2540002763271332,
-0.2714126408100128,
-0.142194926738739,
-0.3598727881908417,
0.14066515862941742,
0.1268530935049057,
-0.11925090104341507,
-0.045587752014398575,
0.1679883450269699,
-0.14322993159294128,
-0.09371118247509003,
-0.01546104159206152,
0.4786778688430786,
0.1942773461341858,
0.3889674246311188,
0.057145651429891586,
-0.16987639665603638,
-0.18317332863807678,
0.21390503644943237,
-0.04444378986954689,
-0.06983869522809982,
-0.1924707591533661,
-0.002798971487209201,
0.04208268225193024,
-0.23006655275821686,
0.038358524441719055,
0.004677572287619114,
-0.296299546957016,
0.28108665347099304,
0.20459438860416412,
-0.14193503558635712,
-0.0985553190112114,
-0.06549879163503647,
0.0020430602598935366,
0.13173945248126984,
-0.08900715410709381,
0.21441492438316345,
-0.03892461210489273,
-0.18957306444644928,
-0.16483648121356964,
-0.20852263271808624,
-0.026392344385385513,
-0.11788799613714218,
-0.2213272899389267,
0.2864733040332794,
0.056477516889572144,
-0.1605992615222931,
-0.07816775888204575,
-0.03973837569355965,
0.3070293366909027,
-0.4019243121147156,
0.05719399452209473,
-0.3252283036708832,
0.20253761112689972,
-0.24396882951259613,
0.18957370519638062,
-0.0389423631131649,
-0.021777518093585968,
-0.021355047821998596,
0.07561555504798889,
0.026173055171966553,
-0.1517265886068344,
0.08328773081302643,
-0.1518092006444931,
-0.0018282224191352725,
0.70506352186203,
0.04057884216308594,
-0.11295051127672195,
-0.203643798828125,
-0.08539561182260513,
0.25474461913108826,
-0.302349716424942,
0.08252830803394318,
0.1992599219083786,
-0.15453267097473145,
-0.12462969869375229,
0.3978864848613739,
0.1624492108821869,
-0.023472553119063377,
0.11338446289300919,
-0.27097976207733154,
-0.3463476300239563,
0.05753840506076813,
0.07800201326608658,
0.16644911468029022,
0.3028993606567383,
0.4726239740848541,
-0.3015042841434479,
0.20820026099681854,
-0.38536420464515686,
0.0686919242143631,
-0.23845067620277405,
0.15259763598442078,
-0.3551488220691681,
-0.20526023209095,
-0.10282757878303528,
0.10746365040540695,
0.2787960171699524,
0.09280425310134888,
-0.06836003065109253,
-0.28819170594215393,
-0.2296648472547531,
0.08471851050853729,
0.26504790782928467,
-0.2120727300643921,
0.12375926971435547,
0.11278105527162552,
-0.0015063066966831684,
-0.056517813354730606,
0.3081408739089966,
0.0776202380657196,
-0.2505300045013428,
0.1111036092042923,
0.592181384563446,
-0.07659949362277985,
-0.16456571221351624,
0.006106678396463394,
-0.07839427888393402,
0.0988008975982666,
0.18455375730991364,
0.2819567620754242,
-0.21413789689540863,
-0.007205369882285595,
0.3499433100223541,
0.18659856915473938,
0.4559263288974762,
0.03263036534190178,
0.049123022705316544,
-0.3490314185619354,
-0.21375052630901337,
-0.01965942792594433,
0.0012266056146472692,
0.13824042677879333,
-0.3447354733943939,
-0.2978059649467468,
0.4043281078338623,
0.28670534491539,
-0.16024579107761383,
-0.325697660446167,
0.19166412949562073,
-0.32268840074539185,
-0.006972617004066706,
0.05651424080133438,
0.2503926455974579,
-0.14390993118286133,
-0.041489679366350174,
0.04562745615839958,
0.4177839159965515,
0.1997782438993454,
-0.3197242021560669,
-0.07975970953702927,
-0.3528236448764801,
0.0765819251537323,
0.40182819962501526,
0.19015654921531677,
-0.06661178171634674,
0.27333348989486694,
-0.24564382433891296,
0.19716212153434753,
0.058029018342494965,
0.1831250637769699,
-0.004915105178952217,
-0.3754424750804901,
-0.04509561136364937,
0.14054922759532928,
0.26847994327545166,
-0.06901361048221588,
0.09235255420207977,
0.3056265711784363,
0.4787783920764923,
0.13407491147518158,
-0.0058572678826749325,
0.38911429047584534,
-0.23005419969558716,
-0.161634624004364,
-0.4251536726951599,
-0.11394060403108597,
-0.03068598546087742,
-0.01748107559978962,
-0.16156186163425446,
-0.18296031653881073,
-0.22248221933841705,
-0.0033166632056236267,
-0.1830255687236786,
-0.31411638855934143,
0.3666456937789917,
0.11654941737651825,
-0.3271212875843048,
-0.27766212821006775,
0.28810760378837585,
-0.03879551216959953,
-0.05340995639562607,
0.27640068531036377,
-0.010955440811812878,
0.688417911529541,
0.2924543023109436,
-0.12287421524524689,
-0.07927059382200241,
-0.3259628713130951,
-0.026736119762063026,
-0.09096323698759079,
0.2114732265472412,
0.30305901169776917,
0.1856168508529663,
0.1467868685722351,
0.2025323212146759,
-0.27970653772354126,
-0.22801820933818817,
0.31840789318084717,
-0.1688210517168045,
0.22123460471630096,
-0.11196320503950119,
0.05387839302420616,
-0.31209778785705566,
-0.1559111326932907,
0.03504941612482071,
-0.2352515161037445,
0.08887821435928345,
0.3028607964515686,
0.08443954586982727,
0.19256916642189026,
-0.10659769922494888,
0.14272120594978333,
-0.10733243077993393,
0.5459739565849304,
0.3189663290977478,
0.20246832072734833,
-0.3789909780025482,
-0.13727641105651855,
-0.5676916241645813,
0.442623108625412,
-0.1167263388633728,
-0.12072008103132248,
0.09621674567461014,
0.15912018716335297,
0.1832960844039917,
0.04763878881931305,
-0.06366799026727676,
0.44304728507995605,
-0.3306940197944641,
0.0057580131106078625,
-0.3567465543746948,
0.2899416387081146,
0.10109934210777283,
-0.04996560141444206,
-0.067470982670784,
-0.1776786744594574,
0.2722306549549103,
-0.3564906716346741,
0.21251210570335388,
-0.11970200389623642,
-0.13601280748844147,
0.004999988712370396,
-0.09613579511642456,
0.4867601692676544,
-0.006344574503600597,
0.496871680021286,
-0.1446746587753296,
0.4019797444343567,
0.038874298334121704,
-0.24481284618377686,
-0.2022351175546646,
0.04249754175543785,
0.10351825505495071,
0.15506203472614288,
0.15566639602184296,
0.15217624604701996,
-0.18365179002285004,
0.15249089896678925,
-0.012598208151757717,
-0.12019450217485428,
-0.0030115817207843065,
0.46110332012176514,
-0.04363923519849777,
0.033128269016742706,
-0.22885315120220184,
0.027642440050840378,
0.15263588726520538,
0.2267368733882904,
-0.27045661211013794,
-0.4732050597667694,
0.365266889333725,
-0.5546078681945801,
-0.35777610540390015,
-0.07633950561285019,
0.03622787818312645,
0.22483119368553162,
-0.15258067846298218,
-0.1592683345079422,
0.05694133788347244,
0.43299922347068787,
-0.06775245070457458,
-0.2632969915866852,
0.18779852986335754,
0.0935552790760994,
-0.0032134936191141605,
-0.09110217541456223,
0.26139944791793823,
0.07837457954883575,
-0.09310419857501984,
-0.2422768771648407,
-0.32711103558540344
] |
https://github.com/huggingface/datasets/issues/2200
|
_prepare_split will overwrite DatasetBuilder.info.features
|
Hi ! This might be related to #2153
You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
I'm opening a PR to fix this and also to figure out how it was not caught in the tests
EDIT: opened #2201
|
Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function?
| 43 |
_prepare_split will overwrite DatasetBuilder.info.features
|
[
-0.59914231300354,
0.041074976325035095,
-0.22032207250595093,
0.02633989043533802,
0.09497273713350296,
0.18443043529987335,
0.4017350673675537,
0.38238200545310974,
-0.37454718351364136,
0.19540511071681976,
0.008909691125154495,
0.2174227088689804,
0.11164065450429916,
0.5282535552978516,
-0.23074178397655487,
0.03062172420322895,
0.03665986657142639,
0.4406864047050476,
0.12923702597618103,
0.07971273362636566,
-0.3009754717350006,
0.1559508740901947,
-0.20835676789283752,
0.035855866968631744,
-0.6418583393096924,
0.07149965316057205,
0.09243931621313095,
0.2119077891111374,
-0.15339156985282898,
-0.18208451569080353,
-0.035339489579200745,
0.2064887136220932,
-0.21042340993881226,
-0.01647188328206539,
-0.00010393855336587876,
0.1535310596227646,
0.1153850108385086,
0.109957255423069,
-0.38918396830558777,
0.42030707001686096,
-0.5126035213470459,
-0.14585357904434204,
-0.07226080447435379,
0.036467257887125015,
-0.12343999743461609,
-0.2906543016433716,
-0.11399787664413452,
0.22048188745975494,
0.2888614535331726,
0.19140809774398804,
0.27429866790771484,
-0.13545183837413788,
0.18610845506191254,
-0.11767369508743286,
0.3393454849720001,
0.4383717477321625,
-0.2228192836046219,
-0.2753528654575348,
-0.19080452620983124,
0.07282640039920807,
-0.2758883237838745,
0.4175678789615631,
-0.11517716199159622,
-0.03378518298268318,
-0.07253101468086243,
-0.03675903379917145,
-0.057464197278022766,
-0.1196591928601265,
0.2673695385456085,
-0.33654311299324036,
0.14230976998806,
-0.0120170246809721,
-0.09182821214199066,
-0.4726006090641022,
-0.1585138589143753,
-0.23527127504348755,
0.2208256721496582,
-0.08292016386985779,
0.13156750798225403,
0.2808103859424591,
-0.12476957589387894,
-0.49125608801841736,
-0.003977892454713583,
-0.25089961290359497,
-0.12826217710971832,
0.5043308734893799,
-0.29302820563316345,
0.12288126349449158,
0.0552569255232811,
-0.01320136059075594,
0.4882236123085022,
-0.12246877700090408,
-0.32906264066696167,
-0.24552536010742188,
-0.006961817387491465,
-0.24242140352725983,
-0.027096007019281387,
-0.10856964439153671,
0.21985013782978058,
0.15680614113807678,
-0.21335533261299133,
0.24555031955242157,
0.03462295979261398,
-0.15207912027835846,
0.3503526449203491,
-0.015740541741251945,
0.12649525701999664,
0.21906791627407074,
0.07219770550727844,
0.11758167296648026,
-0.25099900364875793,
0.09027205407619476,
0.4121156930923462,
-0.22578422725200653,
-0.11377939581871033,
0.010144141502678394,
0.35772186517715454,
-0.05039127171039581,
-0.41487500071525574,
0.14779649674892426,
0.4601167142391205,
-0.0016972642624750733,
-0.08654654771089554,
0.08910053968429565,
0.015520616434514523,
-0.037804681807756424,
-0.2663108706474304,
0.1383759081363678,
-0.26359567046165466,
-0.369368314743042,
-0.3126271367073059,
-0.1321907937526703,
-0.05525985732674599,
0.07959365099668503,
0.07353422045707703,
0.027545029297471046,
0.23279257118701935,
0.04253494739532471,
-0.010303262621164322,
-0.29726070165634155,
0.09268216788768768,
-0.12742646038532257,
0.12819719314575195,
0.285271018743515,
0.1458529531955719,
0.018012873828411102,
0.09087808430194855,
0.07215440273284912,
-0.012955787591636181,
0.23247748613357544,
-0.27370116114616394,
-0.4412485361099243,
0.04693196341395378,
0.31076759099960327,
0.06737352162599564,
0.23664399981498718,
0.2643566131591797,
0.27225571870803833,
0.2449256032705307,
-0.2803836464881897,
-0.17231187224388123,
0.035577788949012756,
-0.29148954153060913,
-0.04862447455525398,
0.14471325278282166,
0.22534161806106567,
-0.2949775457382202,
0.020959604531526566,
-0.1704111397266388,
-0.29472461342811584,
0.2613215148448944,
0.031234433874487877,
-0.03202979639172554,
0.15515470504760742,
-0.21322613954544067,
0.20718644559383392,
0.5497777462005615,
0.20536035299301147,
-0.20285364985466003,
0.6956440806388855,
-0.17029067873954773,
-0.08581569790840149,
-0.02336118184030056,
-0.050918616354465485,
0.05415317043662071,
0.06754211336374283,
0.07541454583406448,
0.11334527283906937,
-0.24955548346042633,
0.0033635718282312155,
-0.13892784714698792,
-0.30614179372787476,
-0.08425423502922058,
-0.04326752573251724,
0.11174649000167847,
0.20418234169483185,
-0.03150635585188866,
0.09327264130115509,
0.2163701355457306,
0.15940776467323303,
0.04327360540628433,
0.21379883587360382,
-0.22902463376522064,
0.08939722925424576,
-0.12357797473669052,
-0.21948248147964478,
-0.21325038373470306,
-0.22780556976795197,
-0.007082104682922363,
-0.23859970271587372,
-0.12196630239486694,
-0.3080013394355774,
-0.2939566373825073,
0.08677476644515991,
-0.3633909523487091,
-0.17880208790302277,
0.22069114446640015,
0.10342820733785629,
-0.016045933589339256,
-0.2337629795074463,
-0.17492017149925232,
0.13916152715682983,
-0.13270336389541626,
0.18212497234344482,
-0.014195236377418041,
0.10204186290502548,
-0.1794256567955017,
-0.18871238827705383,
0.0287973340600729,
0.1605924814939499,
-0.02834004908800125,
-0.1006377711892128,
-0.14109046757221222,
0.4317169189453125,
0.062432870268821716,
-0.1368495225906372,
-0.036552853882312775,
-0.3287162184715271,
0.12968690693378448,
-0.07746034115552902,
-0.017346501350402832,
-0.21311849355697632,
-0.20206958055496216,
-0.044729653745889664,
-0.06919845193624496,
0.13015024363994598,
-0.28947481513023376,
0.1403837949037552,
0.06516562402248383,
-0.02882680669426918,
0.265075147151947,
0.042808596044778824,
0.27520331740379333,
-0.676828145980835,
-0.2878066301345825,
-0.038512494415044785,
-0.20545165240764618,
0.07033219188451767,
-0.126814067363739,
0.4058207869529724,
0.6260292530059814,
0.09681679308414459,
-0.07734934985637665,
-0.05538833513855934,
-0.06082693859934807,
-0.18777915835380554,
0.1527954488992691,
-0.020365813747048378,
0.43585965037345886,
0.1590077131986618,
0.391289085149765,
0.06472960859537125,
-0.14660079777240753,
-0.11007584631443024,
0.2319730669260025,
0.12274807691574097,
0.10202991217374802,
0.26105979084968567,
0.01726306602358818,
-0.22232598066329956,
-0.2534836530685425,
0.3119440972805023,
0.20960725843906403,
0.0622425377368927,
-0.1550397127866745,
0.1199866235256195,
-0.280177503824234,
0.06988928467035294,
-0.050978370010852814,
-0.0024935046676546335,
-0.016631152480840683,
-0.4518752694129944,
0.3687749207019806,
0.24752403795719147,
-0.31950679421424866,
0.25244903564453125,
-0.04333576187491417,
-0.037984780967235565,
0.07470212131738663,
0.006611478980630636,
0.22605445981025696,
0.10455496609210968,
-0.21919365227222443,
0.17987535893917084,
-0.04478560388088226,
0.16561979055404663,
0.11662749946117401,
-0.1841498613357544,
-0.13983787596225739,
-0.3736780881881714,
-0.08063338696956635,
0.29100507497787476,
-0.20768891274929047,
-0.042862992733716965,
0.19595812261104584,
-0.09728550910949707,
0.35350334644317627,
-0.3702263832092285,
0.044455260038375854,
0.07291465252637863,
-0.02636459842324257,
-0.15675245225429535,
0.1673744171857834,
0.05623241513967514,
-0.2802141606807709,
-0.45392268896102905,
0.18299603462219238,
-0.34720736742019653,
0.0811370238661766,
-0.005446441937237978,
0.10174507647752762,
0.008618535473942757,
0.14295178651809692,
-0.1524934023618698,
-0.08119872212409973,
-0.024583477526903152,
-0.48095035552978516,
-0.12237108498811722,
-0.0916045606136322,
-0.35658180713653564,
0.07732799649238586,
0.05627811700105667,
-0.09245073795318604,
0.13294510543346405,
0.1646396964788437,
-0.1679905503988266,
0.2563183903694153,
-0.23184390366077423,
0.08628963679075241,
-0.08486802130937576,
-0.05075187236070633,
0.08095633238554001,
0.29833507537841797,
-0.15419206023216248,
-0.02050628326833248,
-0.11754518002271652,
0.21030990779399872,
-0.3356624245643616,
-0.01905643753707409,
-0.39310315251350403,
0.18801888823509216,
-0.15954914689064026,
0.5181732177734375,
-0.039369840174913406,
0.1654796451330185,
-0.04912373796105385,
-0.03801141679286957,
0.5323779582977295,
-0.35024914145469666,
-0.2755894958972931,
0.09041119366884232,
-0.00893668457865715,
0.012958578765392303,
0.4453962743282318,
-0.04688972234725952,
-0.03294169902801514,
0.08946655690670013,
0.06028872728347778,
0.028412071987986565,
-0.4515203833580017,
-0.06601426005363464,
0.18158802390098572,
0.35730957984924316,
0.2351418137550354,
0.19629977643489838,
-0.1770220249891281,
0.04947781190276146,
-0.054996829479932785,
0.01677226833999157,
0.10484705120325089,
-0.2397225946187973,
-0.24669097363948822,
-0.06772668659687042,
0.15391747653484344,
0.09414751827716827,
-0.027007903903722763,
0.1095956340432167,
-0.19175422191619873,
-0.3623449504375458,
-0.005281706806272268,
-0.06021152064204216,
0.4885549545288086,
-0.28036871552467346,
0.02884865179657936,
0.11369380354881287,
0.18665362894535065,
0.38803622126579285,
-0.10152729600667953,
-0.04268443584442139,
0.6625034809112549,
0.11339864879846573,
0.19734586775302887,
-0.03396528214216232,
-0.22793464362621307,
0.8839101195335388,
0.15100377798080444,
-0.17498831450939178,
0.06760922074317932,
-0.07429221272468567,
0.01130748726427555,
-0.20926883816719055,
0.019755249843001366,
0.13141924142837524,
-0.0517168827354908,
-0.14972472190856934,
-0.20245292782783508,
-0.20482534170150757,
-0.2500912547111511,
-0.033098652958869934,
0.011629672721028328,
0.17111407220363617,
-0.1265646517276764,
0.1556343287229538,
-0.04462014138698578,
0.12616869807243347,
0.15624915063381195,
0.4770677983760834,
-0.12893235683441162,
-0.4630449414253235,
0.34630173444747925,
-0.3543514609336853,
0.34412240982055664,
0.47870728373527527,
-0.1222432479262352,
0.13099363446235657,
-0.021390020847320557,
0.11532922834157944,
-0.40743112564086914,
0.48711496591567993,
0.404170960187912,
-0.07347148656845093,
-0.2020030915737152,
-0.444707989692688,
0.18298859894275665,
0.0470748245716095,
-0.014187335036695004,
-0.10916036367416382,
0.10781032592058182,
-0.3524656891822815,
0.17393124103546143,
-0.02200130932033062,
0.5797179341316223,
0.2733570635318756,
0.1881040334701538,
-0.031661275774240494,
0.29707324504852295,
0.2574942111968994,
-0.44934317469596863,
0.3067488670349121,
-0.31866273283958435,
-0.5386605262756348,
0.05965357646346092,
0.10330567508935928,
0.23868303000926971,
-0.036556754261255264,
-0.06047159805893898,
0.17397549748420715,
-0.21531419456005096,
0.22187747061252594,
-0.1411965787410736,
0.16056685149669647,
-0.03781953081488609,
-0.0754598006606102,
0.2532895803451538,
0.1596595197916031,
0.11631371080875397,
-0.17514388263225555,
0.03125983849167824,
0.038853924721479416,
0.42858752608299255,
0.08031827211380005,
-0.07659558206796646,
0.1190163716673851,
0.13351401686668396,
0.27933067083358765,
-0.16322684288024902,
-0.14847910404205322,
0.15617060661315918,
-0.3726794421672821,
0.5204432606697083,
0.2919548451900482,
0.09246570616960526,
0.04996621236205101,
0.14202973246574402,
-0.0006390063790604472,
-0.34185951948165894,
0.23213930428028107,
0.2632066607475281,
0.048828985542058945,
-0.10709498077630997,
0.024821899831295013,
-0.005677328445017338,
-0.004955091513693333,
-0.41207823157310486,
-0.11858650296926498,
0.16691961884498596,
-0.8562381863594055,
0.0075384341180324554,
0.03969615697860718,
0.10956083983182907,
-0.36804836988449097,
0.15238645672798157,
-0.1457500159740448,
-0.20589058101177216,
0.15258273482322693,
0.02480546198785305,
-0.30664199590682983,
-0.2150631546974182,
-0.06497693806886673,
0.2782965302467346,
-0.0250296238809824,
0.458971232175827,
-0.09566666930913925,
-0.2165151685476303,
-0.3913472294807434,
-0.10522991418838501,
-0.008168255910277367,
-0.08443703502416611,
0.16026850044727325,
-0.10816369205713272,
-0.4103626608848572,
0.12361681461334229,
0.1912752091884613,
-0.0821545273065567,
0.26570552587509155,
-0.14553886651992798,
0.06853555887937546,
-0.44032764434814453,
-0.012763984501361847,
-0.09236239641904831,
0.11058837920427322,
0.1815013736486435,
0.3190213441848755,
-0.15876248478889465,
0.2722145617008209,
-0.3755645453929901,
-0.11339646577835083,
0.0045284610241651535,
0.15997350215911865,
-0.16962401568889618,
-0.03561520576477051,
0.024436278268694878,
0.07726599276065826,
0.19694456458091736,
0.08032242953777313,
0.09972433745861053,
-0.2830239534378052,
-0.043761711567640305,
0.09861286729574203,
-0.16936840116977692,
0.0794428214430809,
-0.18832871317863464,
0.04290097579360008,
-0.13430042564868927,
-0.021573709324002266,
0.44998589158058167,
-0.20209412276744843,
0.30447298288345337,
0.19715866446495056,
-0.031327273696660995,
0.0568799152970314,
0.1381254941225052,
-0.08069289475679398,
-0.009711960330605507,
0.29064232110977173,
-0.09773847460746765,
0.12803855538368225,
-0.2672656774520874,
-0.074076808989048,
0.37057238817214966,
-0.01704835332930088,
0.13584254682064056,
0.051818788051605225,
0.06449158489704132,
-0.34133315086364746,
-0.04349035397171974,
0.01376366801559925,
0.30249443650245667,
0.4460652470588684,
0.10703787952661514,
-0.28664669394493103,
0.18308527767658234,
0.25072982907295227,
-0.22745521366596222,
-0.18943573534488678,
0.3103063106536865,
-0.27922186255455017,
0.30130618810653687,
0.33189502358436584,
0.2455219179391861,
0.37077224254608154,
0.19122207164764404,
0.41650205850601196,
-0.06616538763046265,
-0.07499399036169052,
0.19140134751796722,
0.5693800449371338,
-0.11839289963245392,
0.178476944565773,
0.21290957927703857,
0.16471637785434723,
0.13562066853046417,
0.46422359347343445,
-0.045544013381004333,
0.4474242925643921,
-0.060051340609788895,
-0.09630753844976425,
0.02013770490884781,
-0.42563843727111816,
0.041342806071043015,
0.018947897478938103,
-0.0669783279299736,
0.18933676183223724,
0.004945949651300907,
0.2007184624671936,
-0.14352978765964508,
-0.19653822481632233,
-0.0305551216006279,
0.16951890289783478,
-0.37191638350486755,
-0.2073487788438797,
0.23052552342414856,
-0.21372085809707642,
-0.3453967869281769,
0.056986309587955475,
-0.018514806404709816,
0.16522137820720673,
0.4635143280029297,
-0.3108419179916382,
-0.022941971197724342,
0.10676635056734085,
0.532434344291687,
-0.14809128642082214,
-0.08615673333406448,
-0.04808790609240532,
0.2499500811100006,
-0.07598468661308289,
0.1319366842508316,
0.19469857215881348,
0.06655561178922653,
0.2503415048122406,
-0.04238995537161827,
-0.25830191373825073,
-0.3030152916908264,
-0.15202221274375916,
-0.23272615671157837,
-0.27930349111557007,
0.055861130356788635,
-0.08827514201402664,
0.10853824764490128,
0.3644164204597473,
0.1452612429857254,
-0.18696905672550201,
-0.13321374356746674,
0.41629305481910706,
-0.05402963235974312,
-0.16182294487953186,
0.3776734173297882,
0.37442225217819214,
-0.28435957431793213,
0.10910557210445404,
-0.09215178340673447,
-0.34983229637145996,
-0.49237164855003357,
0.5752959847450256,
-0.07015953212976456,
0.2249915897846222,
0.18979384005069733,
0.1283227503299713,
0.11225241422653198,
0.4169226586818695,
-0.0978008508682251,
-0.17257338762283325,
-0.19763538241386414,
-0.02908569760620594,
-0.23882023990154266,
0.18903401494026184,
0.030730346217751503,
-0.10140717029571533,
0.12263630330562592,
0.08572813123464584,
0.009323435835540295,
0.13191267848014832,
-0.027110150083899498,
-0.2182019203901291,
0.3726600706577301,
-0.24371843039989471,
-0.22726549208164215,
-0.10584913194179535,
-0.08182038366794586,
-0.01777650974690914,
-0.01644778810441494,
-0.2131938487291336,
0.2404790222644806,
0.2591429650783539,
0.03882996737957001,
0.2293701469898224,
-0.06271851062774658,
0.24734599888324738,
-0.16165459156036377,
-0.10378126055002213,
0.16081379354000092,
0.19709311425685883,
-0.38815081119537354,
0.0668712854385376,
-0.24024993181228638,
-0.20963039994239807,
-0.23451538383960724,
0.30607202649116516,
0.3341185450553894,
0.14868921041488647,
-0.3080717623233795,
0.17886097729206085,
-0.19325894117355347,
0.030440978705883026,
0.2686086893081665,
0.1733599454164505,
-0.23903705179691315,
0.48826539516448975,
0.09020127356052399,
0.21652290225028992,
0.5419861078262329,
0.306655615568161,
-0.08437749743461609,
0.06382456421852112,
-0.19533440470695496,
-0.364900141954422,
0.3808979392051697,
0.35324627161026,
-0.6471919417381287,
-0.11266227066516876,
0.19877229630947113,
0.5482624173164368,
-0.16652153432369232,
-0.43954816460609436,
-0.18573319911956787,
0.17504316568374634,
-0.24448353052139282,
0.02505396120250225,
0.209124356508255,
0.10603845119476318,
-0.12726879119873047,
-0.04764353111386299,
0.1950446367263794,
0.2523244023323059,
-0.4181760549545288,
0.06902769953012466,
-0.07793577760457993
] |
https://github.com/huggingface/datasets/issues/2200
|
_prepare_split will overwrite DatasetBuilder.info.features
|
> Hi ! This might be related to #2153
>
> You're right the ArrowWriter should be initialized with `features=self.info.features` ! Good catch
> I'm opening a PR to fix this and also to figure out how it was not caught in the tests
>
> EDIT: opened #2201
Glad to hear that! Thank you for your fix, I'm new to huggingface, it's a fantastic project 😁
|
Hi, here is my issue:
I initialized a Csv datasetbuilder with specific features:
```
def get_dataset_features(data_args):
features = {}
if data_args.text_features:
features.update({text_feature: hf_features.Value("string") for text_feature in data_args.text_features.strip().split(",")})
if data_args.num_features:
features.update({text_feature: hf_features.Value("float32") for text_feature in data_args.num_features.strip().split(",")})
if data_args.label_classes:
features["label"] = hf_features.ClassLabel(names=data_args.label_classes.strip().split(","))
else:
features["label"] = hf_features.Value("float32")
return hf_features.Features(features)
datasets = load_dataset(extension,
data_files=data_files,
sep=data_args.delimiter,
header=data_args.header,
column_names=data_args.column_names.split(",") if data_args.column_names else None,
features=get_dataset_features(data_args=data_args))
```
The `features` is printout as below before `builder_instance.as_dataset` is called:
```
{'label': ClassLabel(num_classes=2, names=['unacceptable', 'acceptable'], names_file=None, id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
````
But after the `builder_instance.as_dataset` is called for Csv dataset builder, the `features` is changed to:
```
{'label': Value(dtype='int64', id=None), 'notated': Value(dtype='string', id=None), 'sentence': Value(dtype='string', id=None), 'src_code': Value(dtype='string', id=None)}
```
After digged into the code, I releazed that in `ArrowBasedBuilder._prepare_split`, the DatasetBuilder's info's features will be overwrited by `ArrowWriter`'s `_features`.
But `ArrowWriter` is initailized without passing `features`.
So my concern is:
It's this overwrite must be done, or, should it be an option to pass features in `_prepare_split` function?
| 67 |
_prepare_split will overwrite DatasetBuilder.info.features
|
[
-0.59914231300354,
0.041074976325035095,
-0.22032207250595093,
0.02633989043533802,
0.09497273713350296,
0.18443043529987335,
0.4017350673675537,
0.38238200545310974,
-0.37454718351364136,
0.19540511071681976,
0.008909691125154495,
0.2174227088689804,
0.11164065450429916,
0.5282535552978516,
-0.23074178397655487,
0.03062172420322895,
0.03665986657142639,
0.4406864047050476,
0.12923702597618103,
0.07971273362636566,
-0.3009754717350006,
0.1559508740901947,
-0.20835676789283752,
0.035855866968631744,
-0.6418583393096924,
0.07149965316057205,
0.09243931621313095,
0.2119077891111374,
-0.15339156985282898,
-0.18208451569080353,
-0.035339489579200745,
0.2064887136220932,
-0.21042340993881226,
-0.01647188328206539,
-0.00010393855336587876,
0.1535310596227646,
0.1153850108385086,
0.109957255423069,
-0.38918396830558777,
0.42030707001686096,
-0.5126035213470459,
-0.14585357904434204,
-0.07226080447435379,
0.036467257887125015,
-0.12343999743461609,
-0.2906543016433716,
-0.11399787664413452,
0.22048188745975494,
0.2888614535331726,
0.19140809774398804,
0.27429866790771484,
-0.13545183837413788,
0.18610845506191254,
-0.11767369508743286,
0.3393454849720001,
0.4383717477321625,
-0.2228192836046219,
-0.2753528654575348,
-0.19080452620983124,
0.07282640039920807,
-0.2758883237838745,
0.4175678789615631,
-0.11517716199159622,
-0.03378518298268318,
-0.07253101468086243,
-0.03675903379917145,
-0.057464197278022766,
-0.1196591928601265,
0.2673695385456085,
-0.33654311299324036,
0.14230976998806,
-0.0120170246809721,
-0.09182821214199066,
-0.4726006090641022,
-0.1585138589143753,
-0.23527127504348755,
0.2208256721496582,
-0.08292016386985779,
0.13156750798225403,
0.2808103859424591,
-0.12476957589387894,
-0.49125608801841736,
-0.003977892454713583,
-0.25089961290359497,
-0.12826217710971832,
0.5043308734893799,
-0.29302820563316345,
0.12288126349449158,
0.0552569255232811,
-0.01320136059075594,
0.4882236123085022,
-0.12246877700090408,
-0.32906264066696167,
-0.24552536010742188,
-0.006961817387491465,
-0.24242140352725983,
-0.027096007019281387,
-0.10856964439153671,
0.21985013782978058,
0.15680614113807678,
-0.21335533261299133,
0.24555031955242157,
0.03462295979261398,
-0.15207912027835846,
0.3503526449203491,
-0.015740541741251945,
0.12649525701999664,
0.21906791627407074,
0.07219770550727844,
0.11758167296648026,
-0.25099900364875793,
0.09027205407619476,
0.4121156930923462,
-0.22578422725200653,
-0.11377939581871033,
0.010144141502678394,
0.35772186517715454,
-0.05039127171039581,
-0.41487500071525574,
0.14779649674892426,
0.4601167142391205,
-0.0016972642624750733,
-0.08654654771089554,
0.08910053968429565,
0.015520616434514523,
-0.037804681807756424,
-0.2663108706474304,
0.1383759081363678,
-0.26359567046165466,
-0.369368314743042,
-0.3126271367073059,
-0.1321907937526703,
-0.05525985732674599,
0.07959365099668503,
0.07353422045707703,
0.027545029297471046,
0.23279257118701935,
0.04253494739532471,
-0.010303262621164322,
-0.29726070165634155,
0.09268216788768768,
-0.12742646038532257,
0.12819719314575195,
0.285271018743515,
0.1458529531955719,
0.018012873828411102,
0.09087808430194855,
0.07215440273284912,
-0.012955787591636181,
0.23247748613357544,
-0.27370116114616394,
-0.4412485361099243,
0.04693196341395378,
0.31076759099960327,
0.06737352162599564,
0.23664399981498718,
0.2643566131591797,
0.27225571870803833,
0.2449256032705307,
-0.2803836464881897,
-0.17231187224388123,
0.035577788949012756,
-0.29148954153060913,
-0.04862447455525398,
0.14471325278282166,
0.22534161806106567,
-0.2949775457382202,
0.020959604531526566,
-0.1704111397266388,
-0.29472461342811584,
0.2613215148448944,
0.031234433874487877,
-0.03202979639172554,
0.15515470504760742,
-0.21322613954544067,
0.20718644559383392,
0.5497777462005615,
0.20536035299301147,
-0.20285364985466003,
0.6956440806388855,
-0.17029067873954773,
-0.08581569790840149,
-0.02336118184030056,
-0.050918616354465485,
0.05415317043662071,
0.06754211336374283,
0.07541454583406448,
0.11334527283906937,
-0.24955548346042633,
0.0033635718282312155,
-0.13892784714698792,
-0.30614179372787476,
-0.08425423502922058,
-0.04326752573251724,
0.11174649000167847,
0.20418234169483185,
-0.03150635585188866,
0.09327264130115509,
0.2163701355457306,
0.15940776467323303,
0.04327360540628433,
0.21379883587360382,
-0.22902463376522064,
0.08939722925424576,
-0.12357797473669052,
-0.21948248147964478,
-0.21325038373470306,
-0.22780556976795197,
-0.007082104682922363,
-0.23859970271587372,
-0.12196630239486694,
-0.3080013394355774,
-0.2939566373825073,
0.08677476644515991,
-0.3633909523487091,
-0.17880208790302277,
0.22069114446640015,
0.10342820733785629,
-0.016045933589339256,
-0.2337629795074463,
-0.17492017149925232,
0.13916152715682983,
-0.13270336389541626,
0.18212497234344482,
-0.014195236377418041,
0.10204186290502548,
-0.1794256567955017,
-0.18871238827705383,
0.0287973340600729,
0.1605924814939499,
-0.02834004908800125,
-0.1006377711892128,
-0.14109046757221222,
0.4317169189453125,
0.062432870268821716,
-0.1368495225906372,
-0.036552853882312775,
-0.3287162184715271,
0.12968690693378448,
-0.07746034115552902,
-0.017346501350402832,
-0.21311849355697632,
-0.20206958055496216,
-0.044729653745889664,
-0.06919845193624496,
0.13015024363994598,
-0.28947481513023376,
0.1403837949037552,
0.06516562402248383,
-0.02882680669426918,
0.265075147151947,
0.042808596044778824,
0.27520331740379333,
-0.676828145980835,
-0.2878066301345825,
-0.038512494415044785,
-0.20545165240764618,
0.07033219188451767,
-0.126814067363739,
0.4058207869529724,
0.6260292530059814,
0.09681679308414459,
-0.07734934985637665,
-0.05538833513855934,
-0.06082693859934807,
-0.18777915835380554,
0.1527954488992691,
-0.020365813747048378,
0.43585965037345886,
0.1590077131986618,
0.391289085149765,
0.06472960859537125,
-0.14660079777240753,
-0.11007584631443024,
0.2319730669260025,
0.12274807691574097,
0.10202991217374802,
0.26105979084968567,
0.01726306602358818,
-0.22232598066329956,
-0.2534836530685425,
0.3119440972805023,
0.20960725843906403,
0.0622425377368927,
-0.1550397127866745,
0.1199866235256195,
-0.280177503824234,
0.06988928467035294,
-0.050978370010852814,
-0.0024935046676546335,
-0.016631152480840683,
-0.4518752694129944,
0.3687749207019806,
0.24752403795719147,
-0.31950679421424866,
0.25244903564453125,
-0.04333576187491417,
-0.037984780967235565,
0.07470212131738663,
0.006611478980630636,
0.22605445981025696,
0.10455496609210968,
-0.21919365227222443,
0.17987535893917084,
-0.04478560388088226,
0.16561979055404663,
0.11662749946117401,
-0.1841498613357544,
-0.13983787596225739,
-0.3736780881881714,
-0.08063338696956635,
0.29100507497787476,
-0.20768891274929047,
-0.042862992733716965,
0.19595812261104584,
-0.09728550910949707,
0.35350334644317627,
-0.3702263832092285,
0.044455260038375854,
0.07291465252637863,
-0.02636459842324257,
-0.15675245225429535,
0.1673744171857834,
0.05623241513967514,
-0.2802141606807709,
-0.45392268896102905,
0.18299603462219238,
-0.34720736742019653,
0.0811370238661766,
-0.005446441937237978,
0.10174507647752762,
0.008618535473942757,
0.14295178651809692,
-0.1524934023618698,
-0.08119872212409973,
-0.024583477526903152,
-0.48095035552978516,
-0.12237108498811722,
-0.0916045606136322,
-0.35658180713653564,
0.07732799649238586,
0.05627811700105667,
-0.09245073795318604,
0.13294510543346405,
0.1646396964788437,
-0.1679905503988266,
0.2563183903694153,
-0.23184390366077423,
0.08628963679075241,
-0.08486802130937576,
-0.05075187236070633,
0.08095633238554001,
0.29833507537841797,
-0.15419206023216248,
-0.02050628326833248,
-0.11754518002271652,
0.21030990779399872,
-0.3356624245643616,
-0.01905643753707409,
-0.39310315251350403,
0.18801888823509216,
-0.15954914689064026,
0.5181732177734375,
-0.039369840174913406,
0.1654796451330185,
-0.04912373796105385,
-0.03801141679286957,
0.5323779582977295,
-0.35024914145469666,
-0.2755894958972931,
0.09041119366884232,
-0.00893668457865715,
0.012958578765392303,
0.4453962743282318,
-0.04688972234725952,
-0.03294169902801514,
0.08946655690670013,
0.06028872728347778,
0.028412071987986565,
-0.4515203833580017,
-0.06601426005363464,
0.18158802390098572,
0.35730957984924316,
0.2351418137550354,
0.19629977643489838,
-0.1770220249891281,
0.04947781190276146,
-0.054996829479932785,
0.01677226833999157,
0.10484705120325089,
-0.2397225946187973,
-0.24669097363948822,
-0.06772668659687042,
0.15391747653484344,
0.09414751827716827,
-0.027007903903722763,
0.1095956340432167,
-0.19175422191619873,
-0.3623449504375458,
-0.005281706806272268,
-0.06021152064204216,
0.4885549545288086,
-0.28036871552467346,
0.02884865179657936,
0.11369380354881287,
0.18665362894535065,
0.38803622126579285,
-0.10152729600667953,
-0.04268443584442139,
0.6625034809112549,
0.11339864879846573,
0.19734586775302887,
-0.03396528214216232,
-0.22793464362621307,
0.8839101195335388,
0.15100377798080444,
-0.17498831450939178,
0.06760922074317932,
-0.07429221272468567,
0.01130748726427555,
-0.20926883816719055,
0.019755249843001366,
0.13141924142837524,
-0.0517168827354908,
-0.14972472190856934,
-0.20245292782783508,
-0.20482534170150757,
-0.2500912547111511,
-0.033098652958869934,
0.011629672721028328,
0.17111407220363617,
-0.1265646517276764,
0.1556343287229538,
-0.04462014138698578,
0.12616869807243347,
0.15624915063381195,
0.4770677983760834,
-0.12893235683441162,
-0.4630449414253235,
0.34630173444747925,
-0.3543514609336853,
0.34412240982055664,
0.47870728373527527,
-0.1222432479262352,
0.13099363446235657,
-0.021390020847320557,
0.11532922834157944,
-0.40743112564086914,
0.48711496591567993,
0.404170960187912,
-0.07347148656845093,
-0.2020030915737152,
-0.444707989692688,
0.18298859894275665,
0.0470748245716095,
-0.014187335036695004,
-0.10916036367416382,
0.10781032592058182,
-0.3524656891822815,
0.17393124103546143,
-0.02200130932033062,
0.5797179341316223,
0.2733570635318756,
0.1881040334701538,
-0.031661275774240494,
0.29707324504852295,
0.2574942111968994,
-0.44934317469596863,
0.3067488670349121,
-0.31866273283958435,
-0.5386605262756348,
0.05965357646346092,
0.10330567508935928,
0.23868303000926971,
-0.036556754261255264,
-0.06047159805893898,
0.17397549748420715,
-0.21531419456005096,
0.22187747061252594,
-0.1411965787410736,
0.16056685149669647,
-0.03781953081488609,
-0.0754598006606102,
0.2532895803451538,
0.1596595197916031,
0.11631371080875397,
-0.17514388263225555,
0.03125983849167824,
0.038853924721479416,
0.42858752608299255,
0.08031827211380005,
-0.07659558206796646,
0.1190163716673851,
0.13351401686668396,
0.27933067083358765,
-0.16322684288024902,
-0.14847910404205322,
0.15617060661315918,
-0.3726794421672821,
0.5204432606697083,
0.2919548451900482,
0.09246570616960526,
0.04996621236205101,
0.14202973246574402,
-0.0006390063790604472,
-0.34185951948165894,
0.23213930428028107,
0.2632066607475281,
0.048828985542058945,
-0.10709498077630997,
0.024821899831295013,
-0.005677328445017338,
-0.004955091513693333,
-0.41207823157310486,
-0.11858650296926498,
0.16691961884498596,
-0.8562381863594055,
0.0075384341180324554,
0.03969615697860718,
0.10956083983182907,
-0.36804836988449097,
0.15238645672798157,
-0.1457500159740448,
-0.20589058101177216,
0.15258273482322693,
0.02480546198785305,
-0.30664199590682983,
-0.2150631546974182,
-0.06497693806886673,
0.2782965302467346,
-0.0250296238809824,
0.458971232175827,
-0.09566666930913925,
-0.2165151685476303,
-0.3913472294807434,
-0.10522991418838501,
-0.008168255910277367,
-0.08443703502416611,
0.16026850044727325,
-0.10816369205713272,
-0.4103626608848572,
0.12361681461334229,
0.1912752091884613,
-0.0821545273065567,
0.26570552587509155,
-0.14553886651992798,
0.06853555887937546,
-0.44032764434814453,
-0.012763984501361847,
-0.09236239641904831,
0.11058837920427322,
0.1815013736486435,
0.3190213441848755,
-0.15876248478889465,
0.2722145617008209,
-0.3755645453929901,
-0.11339646577835083,
0.0045284610241651535,
0.15997350215911865,
-0.16962401568889618,
-0.03561520576477051,
0.024436278268694878,
0.07726599276065826,
0.19694456458091736,
0.08032242953777313,
0.09972433745861053,
-0.2830239534378052,
-0.043761711567640305,
0.09861286729574203,
-0.16936840116977692,
0.0794428214430809,
-0.18832871317863464,
0.04290097579360008,
-0.13430042564868927,
-0.021573709324002266,
0.44998589158058167,
-0.20209412276744843,
0.30447298288345337,
0.19715866446495056,
-0.031327273696660995,
0.0568799152970314,
0.1381254941225052,
-0.08069289475679398,
-0.009711960330605507,
0.29064232110977173,
-0.09773847460746765,
0.12803855538368225,
-0.2672656774520874,
-0.074076808989048,
0.37057238817214966,
-0.01704835332930088,
0.13584254682064056,
0.051818788051605225,
0.06449158489704132,
-0.34133315086364746,
-0.04349035397171974,
0.01376366801559925,
0.30249443650245667,
0.4460652470588684,
0.10703787952661514,
-0.28664669394493103,
0.18308527767658234,
0.25072982907295227,
-0.22745521366596222,
-0.18943573534488678,
0.3103063106536865,
-0.27922186255455017,
0.30130618810653687,
0.33189502358436584,
0.2455219179391861,
0.37077224254608154,
0.19122207164764404,
0.41650205850601196,
-0.06616538763046265,
-0.07499399036169052,
0.19140134751796722,
0.5693800449371338,
-0.11839289963245392,
0.178476944565773,
0.21290957927703857,
0.16471637785434723,
0.13562066853046417,
0.46422359347343445,
-0.045544013381004333,
0.4474242925643921,
-0.060051340609788895,
-0.09630753844976425,
0.02013770490884781,
-0.42563843727111816,
0.041342806071043015,
0.018947897478938103,
-0.0669783279299736,
0.18933676183223724,
0.004945949651300907,
0.2007184624671936,
-0.14352978765964508,
-0.19653822481632233,
-0.0305551216006279,
0.16951890289783478,
-0.37191638350486755,
-0.2073487788438797,
0.23052552342414856,
-0.21372085809707642,
-0.3453967869281769,
0.056986309587955475,
-0.018514806404709816,
0.16522137820720673,
0.4635143280029297,
-0.3108419179916382,
-0.022941971197724342,
0.10676635056734085,
0.532434344291687,
-0.14809128642082214,
-0.08615673333406448,
-0.04808790609240532,
0.2499500811100006,
-0.07598468661308289,
0.1319366842508316,
0.19469857215881348,
0.06655561178922653,
0.2503415048122406,
-0.04238995537161827,
-0.25830191373825073,
-0.3030152916908264,
-0.15202221274375916,
-0.23272615671157837,
-0.27930349111557007,
0.055861130356788635,
-0.08827514201402664,
0.10853824764490128,
0.3644164204597473,
0.1452612429857254,
-0.18696905672550201,
-0.13321374356746674,
0.41629305481910706,
-0.05402963235974312,
-0.16182294487953186,
0.3776734173297882,
0.37442225217819214,
-0.28435957431793213,
0.10910557210445404,
-0.09215178340673447,
-0.34983229637145996,
-0.49237164855003357,
0.5752959847450256,
-0.07015953212976456,
0.2249915897846222,
0.18979384005069733,
0.1283227503299713,
0.11225241422653198,
0.4169226586818695,
-0.0978008508682251,
-0.17257338762283325,
-0.19763538241386414,
-0.02908569760620594,
-0.23882023990154266,
0.18903401494026184,
0.030730346217751503,
-0.10140717029571533,
0.12263630330562592,
0.08572813123464584,
0.009323435835540295,
0.13191267848014832,
-0.027110150083899498,
-0.2182019203901291,
0.3726600706577301,
-0.24371843039989471,
-0.22726549208164215,
-0.10584913194179535,
-0.08182038366794586,
-0.01777650974690914,
-0.01644778810441494,
-0.2131938487291336,
0.2404790222644806,
0.2591429650783539,
0.03882996737957001,
0.2293701469898224,
-0.06271851062774658,
0.24734599888324738,
-0.16165459156036377,
-0.10378126055002213,
0.16081379354000092,
0.19709311425685883,
-0.38815081119537354,
0.0668712854385376,
-0.24024993181228638,
-0.20963039994239807,
-0.23451538383960724,
0.30607202649116516,
0.3341185450553894,
0.14868921041488647,
-0.3080717623233795,
0.17886097729206085,
-0.19325894117355347,
0.030440978705883026,
0.2686086893081665,
0.1733599454164505,
-0.23903705179691315,
0.48826539516448975,
0.09020127356052399,
0.21652290225028992,
0.5419861078262329,
0.306655615568161,
-0.08437749743461609,
0.06382456421852112,
-0.19533440470695496,
-0.364900141954422,
0.3808979392051697,
0.35324627161026,
-0.6471919417381287,
-0.11266227066516876,
0.19877229630947113,
0.5482624173164368,
-0.16652153432369232,
-0.43954816460609436,
-0.18573319911956787,
0.17504316568374634,
-0.24448353052139282,
0.02505396120250225,
0.209124356508255,
0.10603845119476318,
-0.12726879119873047,
-0.04764353111386299,
0.1950446367263794,
0.2523244023323059,
-0.4181760549545288,
0.06902769953012466,
-0.07793577760457993
] |
https://github.com/huggingface/datasets/issues/2196
|
`load_dataset` caches two arrow files?
|
Hi ! Files that starts with `cache-*` are cached computation files, i.e. they are the cached results of map/filter/cast/etc. operations. For example if you used `map` on your dataset to transform it, then the resulting dataset is going to be stored and cached in a `cache-*` file. These files are used to avoid having to load the dataset in RAM, even after many transforms
|
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
| 64 |
`load_dataset` caches two arrow files?
|
[
-0.3498983383178711,
0.17637695372104645,
-0.17681044340133667,
0.4604908525943756,
-0.06200379133224487,
0.10633523762226105,
0.35136693716049194,
0.20241834223270416,
0.19506977498531342,
-0.09080465883016586,
-0.05004303529858589,
0.2720124423503876,
0.11735876649618149,
-0.2811722755432129,
0.07094632089138031,
0.19687463343143463,
0.03659278526902199,
0.20550502836704254,
-0.45465409755706787,
-0.18914642930030823,
-0.061140332370996475,
0.2721247971057892,
0.050718337297439575,
-0.07566729187965393,
-0.354606568813324,
-0.014512020163238049,
0.11348908394575119,
0.29827985167503357,
-0.11574512720108032,
-0.18611283600330353,
0.1515120416879654,
0.2019628882408142,
-0.10228671133518219,
0.3488774299621582,
-0.00011200369044672698,
0.0984860435128212,
0.24196386337280273,
0.13247816264629364,
-0.5962035655975342,
0.1979733258485794,
-0.2897881865501404,
-0.038826435804367065,
0.27200809121131897,
-0.10983829945325851,
0.2129489928483963,
-0.3360268175601959,
0.06137556582689285,
-0.5348456501960754,
0.5073311924934387,
0.008228914812207222,
0.26696038246154785,
0.03556947037577629,
-0.28795725107192993,
-0.10743175446987152,
0.5600388646125793,
0.08720631152391434,
-0.0051956879906356335,
-0.0663507729768753,
-0.1958012878894806,
0.07303143292665482,
-0.38938069343566895,
0.43466681241989136,
-0.048744119703769684,
0.08110074698925018,
0.1041354238986969,
0.2145386040210724,
0.02840934693813324,
0.12775109708309174,
0.24608318507671356,
-0.05042989179491997,
0.6776103973388672,
-0.3587712347507477,
-0.13402022421360016,
-0.400113046169281,
-0.16904263198375702,
-0.18255621194839478,
0.12769895792007446,
-0.06150112673640251,
0.10851956158876419,
-0.01092319656163454,
0.18329954147338867,
-0.28266167640686035,
0.10662629455327988,
-0.17341457307338715,
-0.02489851787686348,
-0.13703908026218414,
-0.12929695844650269,
0.17585442960262299,
0.08390895277261734,
0.270371675491333,
0.3990825414657593,
-0.05172564834356308,
-0.17453917860984802,
0.009434271603822708,
-0.0715944841504097,
0.2750864624977112,
0.223662331700325,
-0.12419281154870987,
-0.011311234906315804,
0.31760191917419434,
0.4925782382488251,
-0.010350923053920269,
-0.12498261779546738,
-0.02184291183948517,
0.20413610339164734,
0.2321501076221466,
0.1584385484457016,
0.12661994993686676,
0.02224038913846016,
-0.20584695041179657,
-0.22283142805099487,
-0.1025303527712822,
0.009872421622276306,
-0.4962140917778015,
0.27495813369750977,
-0.11006899178028107,
0.04701122269034386,
-0.18417513370513916,
-0.10134582966566086,
0.16472694277763367,
0.3174629807472229,
-0.305000901222229,
-0.018464231863617897,
0.22040265798568726,
0.17568762600421906,
0.3954739272594452,
-0.10542205721139908,
0.16717411577701569,
-0.22315360605716705,
-0.19715259969234467,
-0.39975717663764954,
-0.15139037370681763,
-0.18344755470752716,
0.20956966280937195,
0.31621819734573364,
0.05620252713561058,
0.19340690970420837,
0.19699685275554657,
-0.10760489851236343,
-0.0018311559688299894,
0.4167127311229706,
-0.1217534989118576,
0.32946065068244934,
0.2693508267402649,
0.006597917526960373,
0.48300108313560486,
0.14293059706687927,
0.12882550060749054,
-0.11074107140302658,
0.19153177738189697,
-0.39087745547294617,
-0.131394624710083,
0.2873537242412567,
0.22099298238754272,
0.07087831944227219,
0.2541498839855194,
-0.24598118662834167,
0.10812276601791382,
0.29056304693222046,
-0.42084604501724243,
0.07252195477485657,
0.020869964733719826,
-0.24697192013263702,
-0.3375145494937897,
0.03329986706376076,
0.47693899273872375,
-0.3580686151981354,
-0.03794754296541214,
0.0004977929638698697,
-0.08871357887983322,
-0.022426797077059746,
0.11691085994243622,
-0.4594758152961731,
0.04978173226118088,
-0.44443202018737793,
0.2693278193473816,
0.6576906442642212,
-0.5046505331993103,
-0.40178731083869934,
0.21647752821445465,
-0.22341521084308624,
0.06456028670072556,
0.3232354521751404,
0.1276637464761734,
-0.048063311725854874,
-0.13857930898666382,
-0.07587969303131104,
0.03927549347281456,
0.18740302324295044,
-0.1131737157702446,
-0.15246577560901642,
0.026231426745653152,
0.08994287997484207,
-0.09312285482883453,
-0.10644218325614929,
-0.14906679093837738,
0.0950099304318428,
-0.1326015442609787,
0.3852997422218323,
0.10708785802125931,
0.135191410779953,
0.24715448915958405,
-0.28312572836875916,
-0.16865767538547516,
0.09862767904996872,
0.157306969165802,
-0.6384114027023315,
0.06292979419231415,
0.009995833039283752,
-0.5474028587341309,
-0.14931342005729675,
-0.08496600389480591,
-0.18305732309818268,
0.004092030227184296,
-0.20904475450515747,
-0.071444571018219,
0.14292073249816895,
0.268982470035553,
-0.1902589648962021,
0.0056349653750658035,
-0.1912345439195633,
0.27955523133277893,
0.07689764350652695,
-0.07145365327596664,
-0.3976316452026367,
0.009321512654423714,
0.1737479418516159,
0.08847450464963913,
-0.2300732284784317,
-0.17135387659072876,
0.041143834590911865,
0.04294111952185631,
-0.07353774458169937,
0.26176100969314575,
0.17748035490512848,
0.2445918470621109,
0.15913137793540955,
0.005849179811775684,
0.019077716395258904,
-0.07035710662603378,
0.1619480848312378,
-0.1101144328713417,
0.06379120796918869,
-0.23968234658241272,
-0.19421261548995972,
0.27039673924446106,
-0.16292794048786163,
0.010999942198395729,
0.18226110935211182,
-0.2827984392642975,
0.19487160444259644,
0.10152256488800049,
-0.09478647261857986,
-0.47774767875671387,
0.004635034129023552,
0.12821905314922333,
0.4317452609539032,
0.3958395719528198,
0.016059817746281624,
0.38048675656318665,
0.49719128012657166,
0.12056367844343185,
0.07322238385677338,
-0.13136526942253113,
-0.31282803416252136,
-0.3371816575527191,
0.12941259145736694,
0.33493441343307495,
0.49191054701805115,
0.25416824221611023,
0.5022711157798767,
-0.1518617570400238,
-0.06986133754253387,
-0.2698497772216797,
0.1731216311454773,
-0.2782631516456604,
0.2619909346103668,
0.29915425181388855,
0.08830569684505463,
-0.23871482908725739,
-0.3934762477874756,
0.12724345922470093,
0.15717045962810516,
-0.18126480281352997,
-0.30215445160865784,
-0.034311093389987946,
-0.23933640122413635,
-0.0017347123939543962,
-0.3213748037815094,
-0.004249218851327896,
0.09345364570617676,
-0.2077130377292633,
0.08979474008083344,
0.13260383903980255,
-0.11554432660341263,
0.04996510222554207,
-0.35061296820640564,
0.1887698918581009,
0.11512845754623413,
-0.08825910091400146,
-0.06814710050821304,
-0.059332750737667084,
-0.15032745897769928,
0.07021366059780121,
0.008084499277174473,
0.10695420205593109,
0.09537994116544724,
-0.06851652264595032,
0.048271942883729935,
-0.3384850025177002,
0.11137477308511734,
0.2520505487918854,
0.36485975980758667,
-0.21455149352550507,
0.004252974409610033,
0.09067655354738235,
-0.11123417317867279,
-0.1939932256937027,
0.13676223158836365,
-0.15850594639778137,
-0.27201202511787415,
-0.03490256518125534,
-0.12064176797866821,
0.1166672557592392,
-0.13424372673034668,
-0.24122658371925354,
0.156599223613739,
-0.15511752665042877,
0.04954487830400467,
0.03539121523499489,
-0.00275345123372972,
0.17608670890331268,
-0.021749140694737434,
-0.045871198177337646,
-0.022427795454859734,
0.2492721974849701,
-0.441324919462204,
-0.22977344691753387,
0.24324047565460205,
-0.3790125846862793,
-0.07704626768827438,
-0.13682612776756287,
0.03347586840391159,
0.1729022115468979,
0.3752785623073578,
-0.6116209626197815,
0.0120119983330369,
-0.0678645446896553,
0.15438435971736908,
-0.276790052652359,
0.14963653683662415,
0.37083524465560913,
0.3460519015789032,
-0.22859607636928558,
-0.22279947996139526,
0.1068287268280983,
0.3784448802471161,
-0.2539699971675873,
-0.020304717123508453,
-0.3366526961326599,
0.05650356039404869,
-0.19408459961414337,
0.6906999349594116,
0.04540875926613808,
0.1952276974916458,
0.3014991581439972,
-0.01171567477285862,
0.5723437666893005,
-0.16635802388191223,
0.01879310794174671,
-0.1237538531422615,
-0.12949958443641663,
0.02337290160357952,
0.18686543405056,
0.09843757748603821,
-0.23289726674556732,
0.05166918784379959,
0.11253007501363754,
-0.26541227102279663,
-0.19394536316394806,
0.1128021627664566,
-0.2805238366127014,
-0.18016332387924194,
0.20313242077827454,
0.04646138846874237,
-0.2614765465259552,
0.12478753924369812,
0.1027785912156105,
-0.2427317202091217,
0.035201143473386765,
-0.04185700789093971,
-0.10461191833019257,
0.2964559495449066,
-0.17959940433502197,
-0.03143736720085144,
-0.055081047117710114,
-0.09594529867172241,
0.031143231317400932,
-0.4123555123806,
-0.002790610771626234,
-0.081751249730587,
0.6099305748939514,
0.10989885777235031,
0.19862902164459229,
0.14225248992443085,
0.1240181028842926,
-0.4465860426425934,
0.008600631728768349,
0.07726844400167465,
0.32549726963043213,
-0.046701058745384216,
0.09306683391332626,
-0.06519030034542084,
0.005312521941959858,
-0.1828273981809616,
0.3655679225921631,
-0.1824498027563095,
-0.07156842201948166,
-0.23176153004169464,
0.050342634320259094,
0.034175626933574677,
-0.19653692841529846,
0.008497502654790878,
-0.2417435199022293,
-0.167600616812706,
-0.1572001725435257,
-0.32765594124794006,
-0.22225122153759003,
-0.10125428438186646,
0.1736351102590561,
0.6195594072341919,
-0.0660228431224823,
0.1852283626794815,
0.4289928376674652,
0.3679961562156677,
0.1879679560661316,
0.7477388978004456,
-0.23219673335552216,
-0.14756062626838684,
0.1857786774635315,
-0.19862894713878632,
-0.1410495489835739,
0.4498656392097473,
-0.2654746472835541,
-0.0024540137965232134,
-0.06155054271221161,
-0.3350204825401306,
-0.039397675544023514,
0.17505234479904175,
0.1188972145318985,
-0.11282265186309814,
-0.043891482055187225,
-0.46241337060928345,
0.3723682463169098,
0.003482554107904434,
-0.3140643537044525,
0.7437441349029541,
-0.1547435224056244,
-0.2061527967453003,
0.22991587221622467,
-0.23485919833183289,
0.6457909345626831,
0.06981132924556732,
0.45201054215431213,
0.19095295667648315,
-0.19396650791168213,
0.22826014459133148,
-0.08580305427312851,
-0.010599601082503796,
-0.17099303007125854,
-0.20643441379070282,
0.12581253051757812,
-0.16361327469348907,
-0.2213548719882965,
0.37232154607772827,
0.0858587697148323,
-0.07610037922859192,
-0.04245787486433983,
0.03321227803826332,
-0.25268489122390747,
0.06172036752104759,
0.0775439664721489,
-0.08478701859712601,
0.013079228810966015,
0.1552475243806839,
0.3088809549808502,
-0.22435703873634338,
-0.1496220976114273,
0.18711356818675995,
0.00021267910778988153,
-0.2862303555011749,
0.1835053712129593,
0.14803385734558105,
-0.2319421023130417,
0.5192545652389526,
-0.27215075492858887,
-0.5395985245704651,
-0.4220840036869049,
0.28312814235687256,
-0.0908728763461113,
-0.25826749205589294,
-0.04151279479265213,
0.31310054659843445,
0.3422641456127167,
0.26990363001823425,
-0.3804675340652466,
-0.2531382441520691,
0.22932548820972443,
-0.04383763670921326,
0.048724185675382614,
-0.017779579386115074,
-0.24665723741054535,
-0.30703502893447876,
0.27418142557144165,
0.3690894544124603,
-0.2186627984046936,
-0.10305698215961456,
-0.049962785094976425,
0.27853232622146606,
0.21397152543067932,
-0.09978049248456955,
0.1267339289188385,
0.2442551851272583,
0.14495424926280975,
-0.17126265168190002,
0.09934008866548538,
-0.32904765009880066,
-0.01248769462108612,
0.4790792167186737,
0.1165887862443924,
-0.1723092794418335,
0.5575206875801086,
-0.0429689958691597,
-0.2211112678050995,
-0.25778764486312866,
-0.14106930792331696,
0.541249692440033,
-0.6860920190811157,
0.28714677691459656,
-0.19218192994594574,
-0.09377127885818481,
0.06556574255228043,
0.12991011142730713,
0.08640869706869125,
0.2273307740688324,
-0.034158967435359955,
-0.08092982321977615,
-0.28766313195228577,
0.018350787460803986,
-0.1607065051794052,
0.20071837306022644,
0.2333628386259079,
-0.5251275300979614,
-0.020729752257466316,
0.2697030305862427,
-0.3357112407684326,
0.22816795110702515,
0.30390045046806335,
0.02452831342816353,
-0.1940689980983734,
-0.009392042644321918,
0.21162378787994385,
0.03375616297125816,
0.17434152960777283,
-0.18381252884864807,
-0.28694504499435425,
-0.23169049620628357,
-0.01892642118036747,
0.11787770688533783,
-0.31737223267555237,
0.051413971930742264,
-0.08584147691726685,
-0.16386310756206512,
0.09032504260540009,
-0.2158772051334381,
0.2724321782588959,
0.1650688499212265,
-0.0418991819024086,
-0.23714037239551544,
0.230543315410614,
-0.03221186250448227,
-0.2557838559150696,
0.1514522135257721,
-0.07596207410097122,
0.12486489117145538,
0.00814868975430727,
0.1883305162191391,
-0.1814742088317871,
-0.06704611331224442,
0.22813189029693604,
0.02253517508506775,
0.26215052604675293,
-0.04086357727646828,
-0.1004125252366066,
-0.412733793258667,
-0.12774498760700226,
0.09297403693199158,
0.4822632074356079,
0.44701212644577026,
-0.03486181050539017,
-0.2660447657108307,
-0.08428926020860672,
0.23774299025535583,
-0.12215578556060791,
-0.18046113848686218,
0.18307361006736755,
-0.0073554725386202335,
-0.0112523902207613,
0.05360378697514534,
0.3039625883102417,
-0.1269054412841797,
0.07145403325557709,
0.17796172201633453,
0.25161319971084595,
-0.28327739238739014,
0.12704156339168549,
0.08012218028306961,
0.07479806989431381,
0.004344718996435404,
0.19103257358074188,
0.20267626643180847,
0.19508197903633118,
0.512665331363678,
-0.06521648913621902,
0.26107820868492126,
0.3465299904346466,
-0.09056557714939117,
-0.3705277740955353,
-0.5218075513839722,
0.029776977375149727,
0.32975447177886963,
-0.27173933386802673,
0.10778020322322845,
0.22279924154281616,
0.35000717639923096,
0.2102566808462143,
-0.14902329444885254,
-0.129209503531456,
0.038422565907239914,
-0.16177165508270264,
-0.22311696410179138,
0.026720786467194557,
-0.3437240719795227,
-0.05894120782613754,
0.18323251605033875,
-0.18150654435157776,
0.3271912932395935,
0.37016621232032776,
0.028719870373606682,
0.0020128251053392887,
-0.3358975052833557,
0.308575838804245,
-0.07040397822856903,
-0.005752487573772669,
-0.08267076313495636,
0.30284634232521057,
0.2797262370586395,
-0.0473528653383255,
0.25249436497688293,
0.03325788304209709,
0.12644757330417633,
0.07219308614730835,
0.09545290470123291,
-0.1148870512843132,
0.264261394739151,
-0.055472683161497116,
-0.5049274563789368,
-0.023417674005031586,
0.2168840765953064,
-0.33637288212776184,
0.35089120268821716,
0.17685489356517792,
-0.200636625289917,
0.20714257657527924,
0.1917450726032257,
0.09911948442459106,
-0.06952586770057678,
-0.22717325389385223,
-0.30599239468574524,
-0.051484379917383194,
-0.23538470268249512,
0.10760535299777985,
-0.3455299139022827,
-0.16690559685230255,
0.45244237780570984,
-0.21730338037014008,
0.10986953973770142,
-0.16301417350769043,
0.09423882514238358,
-0.036064837127923965,
0.5822142958641052,
0.16096943616867065,
0.22856760025024414,
0.06004789471626282,
-0.29185715317726135,
-0.7372671365737915,
0.328874409198761,
-0.2305981069803238,
0.2548387348651886,
-0.15051007270812988,
0.4139472246170044,
0.1637115627527237,
0.041569922119379044,
0.46267348527908325,
0.039105869829654694,
0.2121206670999527,
0.04427318274974823,
-0.36961573362350464,
0.02383572608232498,
0.2704392671585083,
0.0514795258641243,
-0.14068666100502014,
-0.2902223765850067,
-0.06693248450756073,
0.08063246309757233,
0.18689210712909698,
0.06010828912258148,
-0.22434236109256744,
0.06956053525209427,
0.23729632794857025,
0.6019418835639954,
0.05942486226558685,
0.21273541450500488,
-0.20380397140979767,
-0.14669372141361237,
-0.30147144198417664,
-0.2111058533191681,
0.036308642476797104,
0.10187564045190811,
0.17669695615768433,
0.14963781833648682,
-0.5095234513282776,
0.2492653876543045,
-0.030620500445365906,
0.011680933646857738,
0.07426194101572037,
0.18800842761993408,
-0.22092598676681519,
0.2197244018316269,
-0.1386396735906601,
0.09897421300411224,
-0.011166330426931381,
0.1753416657447815,
0.027320394292473793,
0.0210446547716856,
-0.00004368451482150704,
-0.23273441195487976,
0.27169108390808105,
-0.20593862235546112,
-0.1209162250161171,
-0.03163255378603935,
0.22263143956661224,
0.33148306608200073,
-0.0041511463932693005,
-0.46707797050476074,
-0.02917047217488289,
0.2382763773202896,
-0.06002172455191612,
-0.43930789828300476,
0.09596799314022064,
-0.2002180814743042,
-0.023097118362784386,
-0.030108517035841942,
0.6469705700874329,
0.23411206901073456,
-0.31063076853752136,
-0.18873803317546844,
-0.30595663189888
] |
https://github.com/huggingface/datasets/issues/2196
|
`load_dataset` caches two arrow files?
|
Thanks @lhoestq! Hmm.. that's strange because I specifically turned off auto caching, and saved mapped result, using `save_to_disk`, to another location. At this location, the following file is created:`355G cache-ed205e500a7dc44c.arrow`
To my observation, both `load_dataset` and `map` creates `cache-*` files, and I wonder what the `cache-*` file from `load_dataset` is for (as I believe the same information is stored in `json-train.arrow`.
|
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
| 61 |
`load_dataset` caches two arrow files?
|
[
-0.3498983383178711,
0.17637695372104645,
-0.17681044340133667,
0.4604908525943756,
-0.06200379133224487,
0.10633523762226105,
0.35136693716049194,
0.20241834223270416,
0.19506977498531342,
-0.09080465883016586,
-0.05004303529858589,
0.2720124423503876,
0.11735876649618149,
-0.2811722755432129,
0.07094632089138031,
0.19687463343143463,
0.03659278526902199,
0.20550502836704254,
-0.45465409755706787,
-0.18914642930030823,
-0.061140332370996475,
0.2721247971057892,
0.050718337297439575,
-0.07566729187965393,
-0.354606568813324,
-0.014512020163238049,
0.11348908394575119,
0.29827985167503357,
-0.11574512720108032,
-0.18611283600330353,
0.1515120416879654,
0.2019628882408142,
-0.10228671133518219,
0.3488774299621582,
-0.00011200369044672698,
0.0984860435128212,
0.24196386337280273,
0.13247816264629364,
-0.5962035655975342,
0.1979733258485794,
-0.2897881865501404,
-0.038826435804367065,
0.27200809121131897,
-0.10983829945325851,
0.2129489928483963,
-0.3360268175601959,
0.06137556582689285,
-0.5348456501960754,
0.5073311924934387,
0.008228914812207222,
0.26696038246154785,
0.03556947037577629,
-0.28795725107192993,
-0.10743175446987152,
0.5600388646125793,
0.08720631152391434,
-0.0051956879906356335,
-0.0663507729768753,
-0.1958012878894806,
0.07303143292665482,
-0.38938069343566895,
0.43466681241989136,
-0.048744119703769684,
0.08110074698925018,
0.1041354238986969,
0.2145386040210724,
0.02840934693813324,
0.12775109708309174,
0.24608318507671356,
-0.05042989179491997,
0.6776103973388672,
-0.3587712347507477,
-0.13402022421360016,
-0.400113046169281,
-0.16904263198375702,
-0.18255621194839478,
0.12769895792007446,
-0.06150112673640251,
0.10851956158876419,
-0.01092319656163454,
0.18329954147338867,
-0.28266167640686035,
0.10662629455327988,
-0.17341457307338715,
-0.02489851787686348,
-0.13703908026218414,
-0.12929695844650269,
0.17585442960262299,
0.08390895277261734,
0.270371675491333,
0.3990825414657593,
-0.05172564834356308,
-0.17453917860984802,
0.009434271603822708,
-0.0715944841504097,
0.2750864624977112,
0.223662331700325,
-0.12419281154870987,
-0.011311234906315804,
0.31760191917419434,
0.4925782382488251,
-0.010350923053920269,
-0.12498261779546738,
-0.02184291183948517,
0.20413610339164734,
0.2321501076221466,
0.1584385484457016,
0.12661994993686676,
0.02224038913846016,
-0.20584695041179657,
-0.22283142805099487,
-0.1025303527712822,
0.009872421622276306,
-0.4962140917778015,
0.27495813369750977,
-0.11006899178028107,
0.04701122269034386,
-0.18417513370513916,
-0.10134582966566086,
0.16472694277763367,
0.3174629807472229,
-0.305000901222229,
-0.018464231863617897,
0.22040265798568726,
0.17568762600421906,
0.3954739272594452,
-0.10542205721139908,
0.16717411577701569,
-0.22315360605716705,
-0.19715259969234467,
-0.39975717663764954,
-0.15139037370681763,
-0.18344755470752716,
0.20956966280937195,
0.31621819734573364,
0.05620252713561058,
0.19340690970420837,
0.19699685275554657,
-0.10760489851236343,
-0.0018311559688299894,
0.4167127311229706,
-0.1217534989118576,
0.32946065068244934,
0.2693508267402649,
0.006597917526960373,
0.48300108313560486,
0.14293059706687927,
0.12882550060749054,
-0.11074107140302658,
0.19153177738189697,
-0.39087745547294617,
-0.131394624710083,
0.2873537242412567,
0.22099298238754272,
0.07087831944227219,
0.2541498839855194,
-0.24598118662834167,
0.10812276601791382,
0.29056304693222046,
-0.42084604501724243,
0.07252195477485657,
0.020869964733719826,
-0.24697192013263702,
-0.3375145494937897,
0.03329986706376076,
0.47693899273872375,
-0.3580686151981354,
-0.03794754296541214,
0.0004977929638698697,
-0.08871357887983322,
-0.022426797077059746,
0.11691085994243622,
-0.4594758152961731,
0.04978173226118088,
-0.44443202018737793,
0.2693278193473816,
0.6576906442642212,
-0.5046505331993103,
-0.40178731083869934,
0.21647752821445465,
-0.22341521084308624,
0.06456028670072556,
0.3232354521751404,
0.1276637464761734,
-0.048063311725854874,
-0.13857930898666382,
-0.07587969303131104,
0.03927549347281456,
0.18740302324295044,
-0.1131737157702446,
-0.15246577560901642,
0.026231426745653152,
0.08994287997484207,
-0.09312285482883453,
-0.10644218325614929,
-0.14906679093837738,
0.0950099304318428,
-0.1326015442609787,
0.3852997422218323,
0.10708785802125931,
0.135191410779953,
0.24715448915958405,
-0.28312572836875916,
-0.16865767538547516,
0.09862767904996872,
0.157306969165802,
-0.6384114027023315,
0.06292979419231415,
0.009995833039283752,
-0.5474028587341309,
-0.14931342005729675,
-0.08496600389480591,
-0.18305732309818268,
0.004092030227184296,
-0.20904475450515747,
-0.071444571018219,
0.14292073249816895,
0.268982470035553,
-0.1902589648962021,
0.0056349653750658035,
-0.1912345439195633,
0.27955523133277893,
0.07689764350652695,
-0.07145365327596664,
-0.3976316452026367,
0.009321512654423714,
0.1737479418516159,
0.08847450464963913,
-0.2300732284784317,
-0.17135387659072876,
0.041143834590911865,
0.04294111952185631,
-0.07353774458169937,
0.26176100969314575,
0.17748035490512848,
0.2445918470621109,
0.15913137793540955,
0.005849179811775684,
0.019077716395258904,
-0.07035710662603378,
0.1619480848312378,
-0.1101144328713417,
0.06379120796918869,
-0.23968234658241272,
-0.19421261548995972,
0.27039673924446106,
-0.16292794048786163,
0.010999942198395729,
0.18226110935211182,
-0.2827984392642975,
0.19487160444259644,
0.10152256488800049,
-0.09478647261857986,
-0.47774767875671387,
0.004635034129023552,
0.12821905314922333,
0.4317452609539032,
0.3958395719528198,
0.016059817746281624,
0.38048675656318665,
0.49719128012657166,
0.12056367844343185,
0.07322238385677338,
-0.13136526942253113,
-0.31282803416252136,
-0.3371816575527191,
0.12941259145736694,
0.33493441343307495,
0.49191054701805115,
0.25416824221611023,
0.5022711157798767,
-0.1518617570400238,
-0.06986133754253387,
-0.2698497772216797,
0.1731216311454773,
-0.2782631516456604,
0.2619909346103668,
0.29915425181388855,
0.08830569684505463,
-0.23871482908725739,
-0.3934762477874756,
0.12724345922470093,
0.15717045962810516,
-0.18126480281352997,
-0.30215445160865784,
-0.034311093389987946,
-0.23933640122413635,
-0.0017347123939543962,
-0.3213748037815094,
-0.004249218851327896,
0.09345364570617676,
-0.2077130377292633,
0.08979474008083344,
0.13260383903980255,
-0.11554432660341263,
0.04996510222554207,
-0.35061296820640564,
0.1887698918581009,
0.11512845754623413,
-0.08825910091400146,
-0.06814710050821304,
-0.059332750737667084,
-0.15032745897769928,
0.07021366059780121,
0.008084499277174473,
0.10695420205593109,
0.09537994116544724,
-0.06851652264595032,
0.048271942883729935,
-0.3384850025177002,
0.11137477308511734,
0.2520505487918854,
0.36485975980758667,
-0.21455149352550507,
0.004252974409610033,
0.09067655354738235,
-0.11123417317867279,
-0.1939932256937027,
0.13676223158836365,
-0.15850594639778137,
-0.27201202511787415,
-0.03490256518125534,
-0.12064176797866821,
0.1166672557592392,
-0.13424372673034668,
-0.24122658371925354,
0.156599223613739,
-0.15511752665042877,
0.04954487830400467,
0.03539121523499489,
-0.00275345123372972,
0.17608670890331268,
-0.021749140694737434,
-0.045871198177337646,
-0.022427795454859734,
0.2492721974849701,
-0.441324919462204,
-0.22977344691753387,
0.24324047565460205,
-0.3790125846862793,
-0.07704626768827438,
-0.13682612776756287,
0.03347586840391159,
0.1729022115468979,
0.3752785623073578,
-0.6116209626197815,
0.0120119983330369,
-0.0678645446896553,
0.15438435971736908,
-0.276790052652359,
0.14963653683662415,
0.37083524465560913,
0.3460519015789032,
-0.22859607636928558,
-0.22279947996139526,
0.1068287268280983,
0.3784448802471161,
-0.2539699971675873,
-0.020304717123508453,
-0.3366526961326599,
0.05650356039404869,
-0.19408459961414337,
0.6906999349594116,
0.04540875926613808,
0.1952276974916458,
0.3014991581439972,
-0.01171567477285862,
0.5723437666893005,
-0.16635802388191223,
0.01879310794174671,
-0.1237538531422615,
-0.12949958443641663,
0.02337290160357952,
0.18686543405056,
0.09843757748603821,
-0.23289726674556732,
0.05166918784379959,
0.11253007501363754,
-0.26541227102279663,
-0.19394536316394806,
0.1128021627664566,
-0.2805238366127014,
-0.18016332387924194,
0.20313242077827454,
0.04646138846874237,
-0.2614765465259552,
0.12478753924369812,
0.1027785912156105,
-0.2427317202091217,
0.035201143473386765,
-0.04185700789093971,
-0.10461191833019257,
0.2964559495449066,
-0.17959940433502197,
-0.03143736720085144,
-0.055081047117710114,
-0.09594529867172241,
0.031143231317400932,
-0.4123555123806,
-0.002790610771626234,
-0.081751249730587,
0.6099305748939514,
0.10989885777235031,
0.19862902164459229,
0.14225248992443085,
0.1240181028842926,
-0.4465860426425934,
0.008600631728768349,
0.07726844400167465,
0.32549726963043213,
-0.046701058745384216,
0.09306683391332626,
-0.06519030034542084,
0.005312521941959858,
-0.1828273981809616,
0.3655679225921631,
-0.1824498027563095,
-0.07156842201948166,
-0.23176153004169464,
0.050342634320259094,
0.034175626933574677,
-0.19653692841529846,
0.008497502654790878,
-0.2417435199022293,
-0.167600616812706,
-0.1572001725435257,
-0.32765594124794006,
-0.22225122153759003,
-0.10125428438186646,
0.1736351102590561,
0.6195594072341919,
-0.0660228431224823,
0.1852283626794815,
0.4289928376674652,
0.3679961562156677,
0.1879679560661316,
0.7477388978004456,
-0.23219673335552216,
-0.14756062626838684,
0.1857786774635315,
-0.19862894713878632,
-0.1410495489835739,
0.4498656392097473,
-0.2654746472835541,
-0.0024540137965232134,
-0.06155054271221161,
-0.3350204825401306,
-0.039397675544023514,
0.17505234479904175,
0.1188972145318985,
-0.11282265186309814,
-0.043891482055187225,
-0.46241337060928345,
0.3723682463169098,
0.003482554107904434,
-0.3140643537044525,
0.7437441349029541,
-0.1547435224056244,
-0.2061527967453003,
0.22991587221622467,
-0.23485919833183289,
0.6457909345626831,
0.06981132924556732,
0.45201054215431213,
0.19095295667648315,
-0.19396650791168213,
0.22826014459133148,
-0.08580305427312851,
-0.010599601082503796,
-0.17099303007125854,
-0.20643441379070282,
0.12581253051757812,
-0.16361327469348907,
-0.2213548719882965,
0.37232154607772827,
0.0858587697148323,
-0.07610037922859192,
-0.04245787486433983,
0.03321227803826332,
-0.25268489122390747,
0.06172036752104759,
0.0775439664721489,
-0.08478701859712601,
0.013079228810966015,
0.1552475243806839,
0.3088809549808502,
-0.22435703873634338,
-0.1496220976114273,
0.18711356818675995,
0.00021267910778988153,
-0.2862303555011749,
0.1835053712129593,
0.14803385734558105,
-0.2319421023130417,
0.5192545652389526,
-0.27215075492858887,
-0.5395985245704651,
-0.4220840036869049,
0.28312814235687256,
-0.0908728763461113,
-0.25826749205589294,
-0.04151279479265213,
0.31310054659843445,
0.3422641456127167,
0.26990363001823425,
-0.3804675340652466,
-0.2531382441520691,
0.22932548820972443,
-0.04383763670921326,
0.048724185675382614,
-0.017779579386115074,
-0.24665723741054535,
-0.30703502893447876,
0.27418142557144165,
0.3690894544124603,
-0.2186627984046936,
-0.10305698215961456,
-0.049962785094976425,
0.27853232622146606,
0.21397152543067932,
-0.09978049248456955,
0.1267339289188385,
0.2442551851272583,
0.14495424926280975,
-0.17126265168190002,
0.09934008866548538,
-0.32904765009880066,
-0.01248769462108612,
0.4790792167186737,
0.1165887862443924,
-0.1723092794418335,
0.5575206875801086,
-0.0429689958691597,
-0.2211112678050995,
-0.25778764486312866,
-0.14106930792331696,
0.541249692440033,
-0.6860920190811157,
0.28714677691459656,
-0.19218192994594574,
-0.09377127885818481,
0.06556574255228043,
0.12991011142730713,
0.08640869706869125,
0.2273307740688324,
-0.034158967435359955,
-0.08092982321977615,
-0.28766313195228577,
0.018350787460803986,
-0.1607065051794052,
0.20071837306022644,
0.2333628386259079,
-0.5251275300979614,
-0.020729752257466316,
0.2697030305862427,
-0.3357112407684326,
0.22816795110702515,
0.30390045046806335,
0.02452831342816353,
-0.1940689980983734,
-0.009392042644321918,
0.21162378787994385,
0.03375616297125816,
0.17434152960777283,
-0.18381252884864807,
-0.28694504499435425,
-0.23169049620628357,
-0.01892642118036747,
0.11787770688533783,
-0.31737223267555237,
0.051413971930742264,
-0.08584147691726685,
-0.16386310756206512,
0.09032504260540009,
-0.2158772051334381,
0.2724321782588959,
0.1650688499212265,
-0.0418991819024086,
-0.23714037239551544,
0.230543315410614,
-0.03221186250448227,
-0.2557838559150696,
0.1514522135257721,
-0.07596207410097122,
0.12486489117145538,
0.00814868975430727,
0.1883305162191391,
-0.1814742088317871,
-0.06704611331224442,
0.22813189029693604,
0.02253517508506775,
0.26215052604675293,
-0.04086357727646828,
-0.1004125252366066,
-0.412733793258667,
-0.12774498760700226,
0.09297403693199158,
0.4822632074356079,
0.44701212644577026,
-0.03486181050539017,
-0.2660447657108307,
-0.08428926020860672,
0.23774299025535583,
-0.12215578556060791,
-0.18046113848686218,
0.18307361006736755,
-0.0073554725386202335,
-0.0112523902207613,
0.05360378697514534,
0.3039625883102417,
-0.1269054412841797,
0.07145403325557709,
0.17796172201633453,
0.25161319971084595,
-0.28327739238739014,
0.12704156339168549,
0.08012218028306961,
0.07479806989431381,
0.004344718996435404,
0.19103257358074188,
0.20267626643180847,
0.19508197903633118,
0.512665331363678,
-0.06521648913621902,
0.26107820868492126,
0.3465299904346466,
-0.09056557714939117,
-0.3705277740955353,
-0.5218075513839722,
0.029776977375149727,
0.32975447177886963,
-0.27173933386802673,
0.10778020322322845,
0.22279924154281616,
0.35000717639923096,
0.2102566808462143,
-0.14902329444885254,
-0.129209503531456,
0.038422565907239914,
-0.16177165508270264,
-0.22311696410179138,
0.026720786467194557,
-0.3437240719795227,
-0.05894120782613754,
0.18323251605033875,
-0.18150654435157776,
0.3271912932395935,
0.37016621232032776,
0.028719870373606682,
0.0020128251053392887,
-0.3358975052833557,
0.308575838804245,
-0.07040397822856903,
-0.005752487573772669,
-0.08267076313495636,
0.30284634232521057,
0.2797262370586395,
-0.0473528653383255,
0.25249436497688293,
0.03325788304209709,
0.12644757330417633,
0.07219308614730835,
0.09545290470123291,
-0.1148870512843132,
0.264261394739151,
-0.055472683161497116,
-0.5049274563789368,
-0.023417674005031586,
0.2168840765953064,
-0.33637288212776184,
0.35089120268821716,
0.17685489356517792,
-0.200636625289917,
0.20714257657527924,
0.1917450726032257,
0.09911948442459106,
-0.06952586770057678,
-0.22717325389385223,
-0.30599239468574524,
-0.051484379917383194,
-0.23538470268249512,
0.10760535299777985,
-0.3455299139022827,
-0.16690559685230255,
0.45244237780570984,
-0.21730338037014008,
0.10986953973770142,
-0.16301417350769043,
0.09423882514238358,
-0.036064837127923965,
0.5822142958641052,
0.16096943616867065,
0.22856760025024414,
0.06004789471626282,
-0.29185715317726135,
-0.7372671365737915,
0.328874409198761,
-0.2305981069803238,
0.2548387348651886,
-0.15051007270812988,
0.4139472246170044,
0.1637115627527237,
0.041569922119379044,
0.46267348527908325,
0.039105869829654694,
0.2121206670999527,
0.04427318274974823,
-0.36961573362350464,
0.02383572608232498,
0.2704392671585083,
0.0514795258641243,
-0.14068666100502014,
-0.2902223765850067,
-0.06693248450756073,
0.08063246309757233,
0.18689210712909698,
0.06010828912258148,
-0.22434236109256744,
0.06956053525209427,
0.23729632794857025,
0.6019418835639954,
0.05942486226558685,
0.21273541450500488,
-0.20380397140979767,
-0.14669372141361237,
-0.30147144198417664,
-0.2111058533191681,
0.036308642476797104,
0.10187564045190811,
0.17669695615768433,
0.14963781833648682,
-0.5095234513282776,
0.2492653876543045,
-0.030620500445365906,
0.011680933646857738,
0.07426194101572037,
0.18800842761993408,
-0.22092598676681519,
0.2197244018316269,
-0.1386396735906601,
0.09897421300411224,
-0.011166330426931381,
0.1753416657447815,
0.027320394292473793,
0.0210446547716856,
-0.00004368451482150704,
-0.23273441195487976,
0.27169108390808105,
-0.20593862235546112,
-0.1209162250161171,
-0.03163255378603935,
0.22263143956661224,
0.33148306608200073,
-0.0041511463932693005,
-0.46707797050476074,
-0.02917047217488289,
0.2382763773202896,
-0.06002172455191612,
-0.43930789828300476,
0.09596799314022064,
-0.2002180814743042,
-0.023097118362784386,
-0.030108517035841942,
0.6469705700874329,
0.23411206901073456,
-0.31063076853752136,
-0.18873803317546844,
-0.30595663189888
] |
https://github.com/huggingface/datasets/issues/2196
|
`load_dataset` caches two arrow files?
|
This is a wrong report -- `cache-*` files are created only my `map`, not by `load_dataset`.
|
Hi,
I am using datasets to load large json file of 587G.
I checked the cached folder and found that there are two arrow files created:
* `cache-ed205e500a7dc44c.arrow` - 355G
* `json-train.arrow` - 582G
Why is the first file created?
If I delete it, would I still be able to `load_from_disk`?
| 16 |
`load_dataset` caches two arrow files?
|
[
-0.3498983383178711,
0.17637695372104645,
-0.17681044340133667,
0.4604908525943756,
-0.06200379133224487,
0.10633523762226105,
0.35136693716049194,
0.20241834223270416,
0.19506977498531342,
-0.09080465883016586,
-0.05004303529858589,
0.2720124423503876,
0.11735876649618149,
-0.2811722755432129,
0.07094632089138031,
0.19687463343143463,
0.03659278526902199,
0.20550502836704254,
-0.45465409755706787,
-0.18914642930030823,
-0.061140332370996475,
0.2721247971057892,
0.050718337297439575,
-0.07566729187965393,
-0.354606568813324,
-0.014512020163238049,
0.11348908394575119,
0.29827985167503357,
-0.11574512720108032,
-0.18611283600330353,
0.1515120416879654,
0.2019628882408142,
-0.10228671133518219,
0.3488774299621582,
-0.00011200369044672698,
0.0984860435128212,
0.24196386337280273,
0.13247816264629364,
-0.5962035655975342,
0.1979733258485794,
-0.2897881865501404,
-0.038826435804367065,
0.27200809121131897,
-0.10983829945325851,
0.2129489928483963,
-0.3360268175601959,
0.06137556582689285,
-0.5348456501960754,
0.5073311924934387,
0.008228914812207222,
0.26696038246154785,
0.03556947037577629,
-0.28795725107192993,
-0.10743175446987152,
0.5600388646125793,
0.08720631152391434,
-0.0051956879906356335,
-0.0663507729768753,
-0.1958012878894806,
0.07303143292665482,
-0.38938069343566895,
0.43466681241989136,
-0.048744119703769684,
0.08110074698925018,
0.1041354238986969,
0.2145386040210724,
0.02840934693813324,
0.12775109708309174,
0.24608318507671356,
-0.05042989179491997,
0.6776103973388672,
-0.3587712347507477,
-0.13402022421360016,
-0.400113046169281,
-0.16904263198375702,
-0.18255621194839478,
0.12769895792007446,
-0.06150112673640251,
0.10851956158876419,
-0.01092319656163454,
0.18329954147338867,
-0.28266167640686035,
0.10662629455327988,
-0.17341457307338715,
-0.02489851787686348,
-0.13703908026218414,
-0.12929695844650269,
0.17585442960262299,
0.08390895277261734,
0.270371675491333,
0.3990825414657593,
-0.05172564834356308,
-0.17453917860984802,
0.009434271603822708,
-0.0715944841504097,
0.2750864624977112,
0.223662331700325,
-0.12419281154870987,
-0.011311234906315804,
0.31760191917419434,
0.4925782382488251,
-0.010350923053920269,
-0.12498261779546738,
-0.02184291183948517,
0.20413610339164734,
0.2321501076221466,
0.1584385484457016,
0.12661994993686676,
0.02224038913846016,
-0.20584695041179657,
-0.22283142805099487,
-0.1025303527712822,
0.009872421622276306,
-0.4962140917778015,
0.27495813369750977,
-0.11006899178028107,
0.04701122269034386,
-0.18417513370513916,
-0.10134582966566086,
0.16472694277763367,
0.3174629807472229,
-0.305000901222229,
-0.018464231863617897,
0.22040265798568726,
0.17568762600421906,
0.3954739272594452,
-0.10542205721139908,
0.16717411577701569,
-0.22315360605716705,
-0.19715259969234467,
-0.39975717663764954,
-0.15139037370681763,
-0.18344755470752716,
0.20956966280937195,
0.31621819734573364,
0.05620252713561058,
0.19340690970420837,
0.19699685275554657,
-0.10760489851236343,
-0.0018311559688299894,
0.4167127311229706,
-0.1217534989118576,
0.32946065068244934,
0.2693508267402649,
0.006597917526960373,
0.48300108313560486,
0.14293059706687927,
0.12882550060749054,
-0.11074107140302658,
0.19153177738189697,
-0.39087745547294617,
-0.131394624710083,
0.2873537242412567,
0.22099298238754272,
0.07087831944227219,
0.2541498839855194,
-0.24598118662834167,
0.10812276601791382,
0.29056304693222046,
-0.42084604501724243,
0.07252195477485657,
0.020869964733719826,
-0.24697192013263702,
-0.3375145494937897,
0.03329986706376076,
0.47693899273872375,
-0.3580686151981354,
-0.03794754296541214,
0.0004977929638698697,
-0.08871357887983322,
-0.022426797077059746,
0.11691085994243622,
-0.4594758152961731,
0.04978173226118088,
-0.44443202018737793,
0.2693278193473816,
0.6576906442642212,
-0.5046505331993103,
-0.40178731083869934,
0.21647752821445465,
-0.22341521084308624,
0.06456028670072556,
0.3232354521751404,
0.1276637464761734,
-0.048063311725854874,
-0.13857930898666382,
-0.07587969303131104,
0.03927549347281456,
0.18740302324295044,
-0.1131737157702446,
-0.15246577560901642,
0.026231426745653152,
0.08994287997484207,
-0.09312285482883453,
-0.10644218325614929,
-0.14906679093837738,
0.0950099304318428,
-0.1326015442609787,
0.3852997422218323,
0.10708785802125931,
0.135191410779953,
0.24715448915958405,
-0.28312572836875916,
-0.16865767538547516,
0.09862767904996872,
0.157306969165802,
-0.6384114027023315,
0.06292979419231415,
0.009995833039283752,
-0.5474028587341309,
-0.14931342005729675,
-0.08496600389480591,
-0.18305732309818268,
0.004092030227184296,
-0.20904475450515747,
-0.071444571018219,
0.14292073249816895,
0.268982470035553,
-0.1902589648962021,
0.0056349653750658035,
-0.1912345439195633,
0.27955523133277893,
0.07689764350652695,
-0.07145365327596664,
-0.3976316452026367,
0.009321512654423714,
0.1737479418516159,
0.08847450464963913,
-0.2300732284784317,
-0.17135387659072876,
0.041143834590911865,
0.04294111952185631,
-0.07353774458169937,
0.26176100969314575,
0.17748035490512848,
0.2445918470621109,
0.15913137793540955,
0.005849179811775684,
0.019077716395258904,
-0.07035710662603378,
0.1619480848312378,
-0.1101144328713417,
0.06379120796918869,
-0.23968234658241272,
-0.19421261548995972,
0.27039673924446106,
-0.16292794048786163,
0.010999942198395729,
0.18226110935211182,
-0.2827984392642975,
0.19487160444259644,
0.10152256488800049,
-0.09478647261857986,
-0.47774767875671387,
0.004635034129023552,
0.12821905314922333,
0.4317452609539032,
0.3958395719528198,
0.016059817746281624,
0.38048675656318665,
0.49719128012657166,
0.12056367844343185,
0.07322238385677338,
-0.13136526942253113,
-0.31282803416252136,
-0.3371816575527191,
0.12941259145736694,
0.33493441343307495,
0.49191054701805115,
0.25416824221611023,
0.5022711157798767,
-0.1518617570400238,
-0.06986133754253387,
-0.2698497772216797,
0.1731216311454773,
-0.2782631516456604,
0.2619909346103668,
0.29915425181388855,
0.08830569684505463,
-0.23871482908725739,
-0.3934762477874756,
0.12724345922470093,
0.15717045962810516,
-0.18126480281352997,
-0.30215445160865784,
-0.034311093389987946,
-0.23933640122413635,
-0.0017347123939543962,
-0.3213748037815094,
-0.004249218851327896,
0.09345364570617676,
-0.2077130377292633,
0.08979474008083344,
0.13260383903980255,
-0.11554432660341263,
0.04996510222554207,
-0.35061296820640564,
0.1887698918581009,
0.11512845754623413,
-0.08825910091400146,
-0.06814710050821304,
-0.059332750737667084,
-0.15032745897769928,
0.07021366059780121,
0.008084499277174473,
0.10695420205593109,
0.09537994116544724,
-0.06851652264595032,
0.048271942883729935,
-0.3384850025177002,
0.11137477308511734,
0.2520505487918854,
0.36485975980758667,
-0.21455149352550507,
0.004252974409610033,
0.09067655354738235,
-0.11123417317867279,
-0.1939932256937027,
0.13676223158836365,
-0.15850594639778137,
-0.27201202511787415,
-0.03490256518125534,
-0.12064176797866821,
0.1166672557592392,
-0.13424372673034668,
-0.24122658371925354,
0.156599223613739,
-0.15511752665042877,
0.04954487830400467,
0.03539121523499489,
-0.00275345123372972,
0.17608670890331268,
-0.021749140694737434,
-0.045871198177337646,
-0.022427795454859734,
0.2492721974849701,
-0.441324919462204,
-0.22977344691753387,
0.24324047565460205,
-0.3790125846862793,
-0.07704626768827438,
-0.13682612776756287,
0.03347586840391159,
0.1729022115468979,
0.3752785623073578,
-0.6116209626197815,
0.0120119983330369,
-0.0678645446896553,
0.15438435971736908,
-0.276790052652359,
0.14963653683662415,
0.37083524465560913,
0.3460519015789032,
-0.22859607636928558,
-0.22279947996139526,
0.1068287268280983,
0.3784448802471161,
-0.2539699971675873,
-0.020304717123508453,
-0.3366526961326599,
0.05650356039404869,
-0.19408459961414337,
0.6906999349594116,
0.04540875926613808,
0.1952276974916458,
0.3014991581439972,
-0.01171567477285862,
0.5723437666893005,
-0.16635802388191223,
0.01879310794174671,
-0.1237538531422615,
-0.12949958443641663,
0.02337290160357952,
0.18686543405056,
0.09843757748603821,
-0.23289726674556732,
0.05166918784379959,
0.11253007501363754,
-0.26541227102279663,
-0.19394536316394806,
0.1128021627664566,
-0.2805238366127014,
-0.18016332387924194,
0.20313242077827454,
0.04646138846874237,
-0.2614765465259552,
0.12478753924369812,
0.1027785912156105,
-0.2427317202091217,
0.035201143473386765,
-0.04185700789093971,
-0.10461191833019257,
0.2964559495449066,
-0.17959940433502197,
-0.03143736720085144,
-0.055081047117710114,
-0.09594529867172241,
0.031143231317400932,
-0.4123555123806,
-0.002790610771626234,
-0.081751249730587,
0.6099305748939514,
0.10989885777235031,
0.19862902164459229,
0.14225248992443085,
0.1240181028842926,
-0.4465860426425934,
0.008600631728768349,
0.07726844400167465,
0.32549726963043213,
-0.046701058745384216,
0.09306683391332626,
-0.06519030034542084,
0.005312521941959858,
-0.1828273981809616,
0.3655679225921631,
-0.1824498027563095,
-0.07156842201948166,
-0.23176153004169464,
0.050342634320259094,
0.034175626933574677,
-0.19653692841529846,
0.008497502654790878,
-0.2417435199022293,
-0.167600616812706,
-0.1572001725435257,
-0.32765594124794006,
-0.22225122153759003,
-0.10125428438186646,
0.1736351102590561,
0.6195594072341919,
-0.0660228431224823,
0.1852283626794815,
0.4289928376674652,
0.3679961562156677,
0.1879679560661316,
0.7477388978004456,
-0.23219673335552216,
-0.14756062626838684,
0.1857786774635315,
-0.19862894713878632,
-0.1410495489835739,
0.4498656392097473,
-0.2654746472835541,
-0.0024540137965232134,
-0.06155054271221161,
-0.3350204825401306,
-0.039397675544023514,
0.17505234479904175,
0.1188972145318985,
-0.11282265186309814,
-0.043891482055187225,
-0.46241337060928345,
0.3723682463169098,
0.003482554107904434,
-0.3140643537044525,
0.7437441349029541,
-0.1547435224056244,
-0.2061527967453003,
0.22991587221622467,
-0.23485919833183289,
0.6457909345626831,
0.06981132924556732,
0.45201054215431213,
0.19095295667648315,
-0.19396650791168213,
0.22826014459133148,
-0.08580305427312851,
-0.010599601082503796,
-0.17099303007125854,
-0.20643441379070282,
0.12581253051757812,
-0.16361327469348907,
-0.2213548719882965,
0.37232154607772827,
0.0858587697148323,
-0.07610037922859192,
-0.04245787486433983,
0.03321227803826332,
-0.25268489122390747,
0.06172036752104759,
0.0775439664721489,
-0.08478701859712601,
0.013079228810966015,
0.1552475243806839,
0.3088809549808502,
-0.22435703873634338,
-0.1496220976114273,
0.18711356818675995,
0.00021267910778988153,
-0.2862303555011749,
0.1835053712129593,
0.14803385734558105,
-0.2319421023130417,
0.5192545652389526,
-0.27215075492858887,
-0.5395985245704651,
-0.4220840036869049,
0.28312814235687256,
-0.0908728763461113,
-0.25826749205589294,
-0.04151279479265213,
0.31310054659843445,
0.3422641456127167,
0.26990363001823425,
-0.3804675340652466,
-0.2531382441520691,
0.22932548820972443,
-0.04383763670921326,
0.048724185675382614,
-0.017779579386115074,
-0.24665723741054535,
-0.30703502893447876,
0.27418142557144165,
0.3690894544124603,
-0.2186627984046936,
-0.10305698215961456,
-0.049962785094976425,
0.27853232622146606,
0.21397152543067932,
-0.09978049248456955,
0.1267339289188385,
0.2442551851272583,
0.14495424926280975,
-0.17126265168190002,
0.09934008866548538,
-0.32904765009880066,
-0.01248769462108612,
0.4790792167186737,
0.1165887862443924,
-0.1723092794418335,
0.5575206875801086,
-0.0429689958691597,
-0.2211112678050995,
-0.25778764486312866,
-0.14106930792331696,
0.541249692440033,
-0.6860920190811157,
0.28714677691459656,
-0.19218192994594574,
-0.09377127885818481,
0.06556574255228043,
0.12991011142730713,
0.08640869706869125,
0.2273307740688324,
-0.034158967435359955,
-0.08092982321977615,
-0.28766313195228577,
0.018350787460803986,
-0.1607065051794052,
0.20071837306022644,
0.2333628386259079,
-0.5251275300979614,
-0.020729752257466316,
0.2697030305862427,
-0.3357112407684326,
0.22816795110702515,
0.30390045046806335,
0.02452831342816353,
-0.1940689980983734,
-0.009392042644321918,
0.21162378787994385,
0.03375616297125816,
0.17434152960777283,
-0.18381252884864807,
-0.28694504499435425,
-0.23169049620628357,
-0.01892642118036747,
0.11787770688533783,
-0.31737223267555237,
0.051413971930742264,
-0.08584147691726685,
-0.16386310756206512,
0.09032504260540009,
-0.2158772051334381,
0.2724321782588959,
0.1650688499212265,
-0.0418991819024086,
-0.23714037239551544,
0.230543315410614,
-0.03221186250448227,
-0.2557838559150696,
0.1514522135257721,
-0.07596207410097122,
0.12486489117145538,
0.00814868975430727,
0.1883305162191391,
-0.1814742088317871,
-0.06704611331224442,
0.22813189029693604,
0.02253517508506775,
0.26215052604675293,
-0.04086357727646828,
-0.1004125252366066,
-0.412733793258667,
-0.12774498760700226,
0.09297403693199158,
0.4822632074356079,
0.44701212644577026,
-0.03486181050539017,
-0.2660447657108307,
-0.08428926020860672,
0.23774299025535583,
-0.12215578556060791,
-0.18046113848686218,
0.18307361006736755,
-0.0073554725386202335,
-0.0112523902207613,
0.05360378697514534,
0.3039625883102417,
-0.1269054412841797,
0.07145403325557709,
0.17796172201633453,
0.25161319971084595,
-0.28327739238739014,
0.12704156339168549,
0.08012218028306961,
0.07479806989431381,
0.004344718996435404,
0.19103257358074188,
0.20267626643180847,
0.19508197903633118,
0.512665331363678,
-0.06521648913621902,
0.26107820868492126,
0.3465299904346466,
-0.09056557714939117,
-0.3705277740955353,
-0.5218075513839722,
0.029776977375149727,
0.32975447177886963,
-0.27173933386802673,
0.10778020322322845,
0.22279924154281616,
0.35000717639923096,
0.2102566808462143,
-0.14902329444885254,
-0.129209503531456,
0.038422565907239914,
-0.16177165508270264,
-0.22311696410179138,
0.026720786467194557,
-0.3437240719795227,
-0.05894120782613754,
0.18323251605033875,
-0.18150654435157776,
0.3271912932395935,
0.37016621232032776,
0.028719870373606682,
0.0020128251053392887,
-0.3358975052833557,
0.308575838804245,
-0.07040397822856903,
-0.005752487573772669,
-0.08267076313495636,
0.30284634232521057,
0.2797262370586395,
-0.0473528653383255,
0.25249436497688293,
0.03325788304209709,
0.12644757330417633,
0.07219308614730835,
0.09545290470123291,
-0.1148870512843132,
0.264261394739151,
-0.055472683161497116,
-0.5049274563789368,
-0.023417674005031586,
0.2168840765953064,
-0.33637288212776184,
0.35089120268821716,
0.17685489356517792,
-0.200636625289917,
0.20714257657527924,
0.1917450726032257,
0.09911948442459106,
-0.06952586770057678,
-0.22717325389385223,
-0.30599239468574524,
-0.051484379917383194,
-0.23538470268249512,
0.10760535299777985,
-0.3455299139022827,
-0.16690559685230255,
0.45244237780570984,
-0.21730338037014008,
0.10986953973770142,
-0.16301417350769043,
0.09423882514238358,
-0.036064837127923965,
0.5822142958641052,
0.16096943616867065,
0.22856760025024414,
0.06004789471626282,
-0.29185715317726135,
-0.7372671365737915,
0.328874409198761,
-0.2305981069803238,
0.2548387348651886,
-0.15051007270812988,
0.4139472246170044,
0.1637115627527237,
0.041569922119379044,
0.46267348527908325,
0.039105869829654694,
0.2121206670999527,
0.04427318274974823,
-0.36961573362350464,
0.02383572608232498,
0.2704392671585083,
0.0514795258641243,
-0.14068666100502014,
-0.2902223765850067,
-0.06693248450756073,
0.08063246309757233,
0.18689210712909698,
0.06010828912258148,
-0.22434236109256744,
0.06956053525209427,
0.23729632794857025,
0.6019418835639954,
0.05942486226558685,
0.21273541450500488,
-0.20380397140979767,
-0.14669372141361237,
-0.30147144198417664,
-0.2111058533191681,
0.036308642476797104,
0.10187564045190811,
0.17669695615768433,
0.14963781833648682,
-0.5095234513282776,
0.2492653876543045,
-0.030620500445365906,
0.011680933646857738,
0.07426194101572037,
0.18800842761993408,
-0.22092598676681519,
0.2197244018316269,
-0.1386396735906601,
0.09897421300411224,
-0.011166330426931381,
0.1753416657447815,
0.027320394292473793,
0.0210446547716856,
-0.00004368451482150704,
-0.23273441195487976,
0.27169108390808105,
-0.20593862235546112,
-0.1209162250161171,
-0.03163255378603935,
0.22263143956661224,
0.33148306608200073,
-0.0041511463932693005,
-0.46707797050476074,
-0.02917047217488289,
0.2382763773202896,
-0.06002172455191612,
-0.43930789828300476,
0.09596799314022064,
-0.2002180814743042,
-0.023097118362784386,
-0.030108517035841942,
0.6469705700874329,
0.23411206901073456,
-0.31063076853752136,
-0.18873803317546844,
-0.30595663189888
] |
https://github.com/huggingface/datasets/issues/2195
|
KeyError: '_indices_files' in `arrow_dataset.py`
|
Thanks @samsontmr this should be fixed on master now
Feel free to reopen if you're still having issues
|
After pulling the latest master, I'm getting a crash when `load_from_disk` tries to load my local dataset.
Trace:
```
Traceback (most recent call last):
File "load_data.py", line 11, in <module>
dataset = load_from_disk(SRC)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/load.py", line 784, in load_from_disk
return DatasetDict.load_from_disk(dataset_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/dataset_dict.py", line 692, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/opt/conda/envs/py38/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 634, in load_from_disk
if state["_indices_files"]:
KeyError: '_indices_files'
```
I believe this is the line causing the error since there may not be a `_indices_files` key in the older versions:
https://github.com/huggingface/datasets/blob/b70141e3c5149430951773aaa0155555c5fb3e76/src/datasets/arrow_dataset.py#L634
May I suggest using `state.get()` instead of directly indexing the dictionary?
@lhoestq
| 18 |
KeyError: '_indices_files' in `arrow_dataset.py`
|
[
-0.24589622020721436,
0.3032014071941376,
-0.24315916001796722,
0.1224786788225174,
0.14545926451683044,
0.19981254637241364,
0.2972983419895172,
0.5577781796455383,
0.04399442672729492,
0.08864769339561462,
0.15199100971221924,
0.34793487191200256,
-0.26971539855003357,
0.14633674919605255,
-0.2747640311717987,
0.013412030413746834,
0.006654724944382906,
0.3427632749080658,
-0.21328996121883392,
-0.1158507764339447,
-0.34828922152519226,
0.1685100793838501,
-0.07982306182384491,
0.3172219395637512,
-0.21285884082317352,
-0.3379933834075928,
0.10325343906879425,
0.08294472843408585,
-0.26948806643486023,
-0.48937541246414185,
0.19715547561645508,
-0.16097672283649445,
-0.03625506907701492,
0.32384923100471497,
-0.00010164466220885515,
0.15951691567897797,
0.31299760937690735,
0.030192023143172264,
-0.34779125452041626,
-0.024750620126724243,
-0.18247956037521362,
-0.1711215078830719,
0.23851600289344788,
-0.2746008038520813,
0.15784059464931488,
-0.7495226860046387,
-0.04311125725507736,
-0.3284797966480255,
0.36335405707359314,
0.33925846219062805,
0.32949796319007874,
0.11057067662477493,
0.2531392574310303,
-0.16709531843662262,
0.38900768756866455,
-0.11636253446340561,
-0.010346115566790104,
0.11342436820268631,
-0.168901264667511,
-0.2237408459186554,
0.0598636157810688,
0.38094162940979004,
0.026075273752212524,
0.16675327718257904,
0.179118350148201,
-0.04266015812754631,
0.21838022768497467,
-0.41761159896850586,
0.11339573562145233,
0.021670984104275703,
0.4354200065135956,
-0.2557694613933563,
-0.3845728933811188,
-0.09831798821687698,
0.003845758503302932,
-0.2402026653289795,
-0.041549041867256165,
0.0876685380935669,
0.06405582278966904,
0.06965753436088562,
0.4255909323692322,
0.021336447447538376,
-0.15343575179576874,
0.07697799056768417,
0.1818385124206543,
0.10796362906694412,
-0.06551659107208252,
0.03274911269545555,
0.2503799498081207,
-0.19007755815982819,
0.29512423276901245,
0.1656663864850998,
-0.2142430543899536,
0.016465533524751663,
-0.1791599839925766,
0.16022519767284393,
0.13807550072669983,
-0.22588412463665009,
0.08057325333356857,
0.12790758907794952,
0.04717981070280075,
0.09741773456335068,
0.03138117864727974,
0.15147995948791504,
0.1842806339263916,
0.21736669540405273,
-0.007486787624657154,
0.509251594543457,
0.2036450207233429,
0.03324117884039879,
-0.08535237610340118,
-0.13941442966461182,
-0.1741352528333664,
-0.5608714818954468,
0.12270419299602509,
0.07708131521940231,
0.15648861229419708,
0.03096182830631733,
-0.1398417055606842,
0.04067743942141533,
0.07477325201034546,
-0.147467702627182,
-0.02333013527095318,
0.25041747093200684,
0.265890508890152,
0.06514587998390198,
-0.012452148832380772,
0.46059277653694153,
-0.06978479772806168,
0.39647847414016724,
-0.31060364842414856,
0.12994138896465302,
0.010557880625128746,
-0.22761090099811554,
0.07331699877977371,
0.020197078585624695,
0.2344513237476349,
-0.10936184972524643,
0.16519126296043396,
-0.00756909279152751,
0.3680731952190399,
-0.004106731154024601,
0.08115404099225998,
0.3730005919933319,
-0.20167042315006256,
0.23491846024990082,
0.42933735251426697,
-0.11999733000993729,
-0.06635959446430206,
0.06561572849750519,
-0.44858789443969727,
-0.288686603307724,
0.018136242404580116,
0.30216115713119507,
0.21582238376140594,
0.019401395693421364,
-0.08684593439102173,
-0.2717199921607971,
0.1553189605474472,
-0.21690063178539276,
0.02684442326426506,
-0.27094659209251404,
0.31998300552368164,
-0.3184202313423157,
0.12601061165332794,
0.12106986343860626,
-0.3083385229110718,
0.14384257793426514,
-0.03670690208673477,
-0.10296303778886795,
-0.04587358981370926,
0.2860238552093506,
-0.20289306342601776,
0.03802724555134773,
-0.19337143003940582,
0.24921201169490814,
0.46076858043670654,
-0.31606176495552063,
-0.38251417875289917,
0.048704586923122406,
-0.019650408998131752,
-0.3475717008113861,
0.1630215346813202,
0.06349984556436539,
0.0200786292552948,
0.11491300910711288,
0.12048864364624023,
-0.14015069603919983,
0.17416995763778687,
-0.03402188420295715,
-0.12064166367053986,
-0.15853901207447052,
0.09131387621164322,
0.08510731160640717,
0.07370804250240326,
-0.22880546748638153,
0.01060376688838005,
-0.5415216088294983,
0.14664259552955627,
-0.07786303013563156,
-0.00580702954903245,
0.20267167687416077,
0.22951960563659668,
-0.15068785846233368,
0.22631150484085083,
0.06103495508432388,
-0.03177319094538689,
0.049426157027482986,
-0.06035200506448746,
-0.009311765432357788,
-0.6208534836769104,
-0.07670020312070847,
-0.2502610385417938,
0.14794719219207764,
-0.2889987826347351,
-0.1345226913690567,
0.27572116255760193,
-0.18052838742733002,
-0.1055772677063942,
0.15575291216373444,
-0.39930832386016846,
-0.21176555752754211,
-0.005542689003050327,
0.07942137122154236,
-0.11753812432289124,
0.1019715964794159,
-0.27670323848724365,
-0.14217609167099,
0.14539660513401031,
0.03309762105345726,
0.033293046057224274,
-0.1395881474018097,
-0.18655943870544434,
0.23039449751377106,
0.06153241544961929,
-0.07060236483812332,
0.3459095060825348,
0.15345902740955353,
-0.07340337336063385,
-0.3396964371204376,
0.11043915897607803,
0.25184792280197144,
0.0970463827252388,
0.014634070917963982,
0.09205161780118942,
0.3951168954372406,
-0.2816217541694641,
0.24959178268909454,
0.1557566374540329,
0.04627419635653496,
0.25897035002708435,
0.14134423434734344,
-0.07248568534851074,
-0.2503620982170105,
-0.008310964331030846,
-0.26405787467956543,
0.14280390739440918,
-0.13814589381217957,
0.05164487287402153,
0.10102026909589767,
0.4209868013858795,
0.19343222677707672,
0.1910163313150406,
0.035166069865226746,
-0.24657583236694336,
0.055577825754880905,
-0.028586700558662415,
0.3678654432296753,
0.150803804397583,
0.2585563063621521,
-0.10973925143480301,
-0.09241147339344025,
0.08647941052913666,
-0.1876392960548401,
0.198385089635849,
0.02702251262962818,
0.19904612004756927,
0.2031055986881256,
-0.08930572867393494,
-0.1826232671737671,
-0.2066371887922287,
-0.09724085032939911,
-0.2925396263599396,
0.27980390191078186,
-0.13459819555282593,
0.1606884002685547,
-0.23130951821804047,
-0.22227081656455994,
0.08927596360445023,
-0.1849583089351654,
0.09001383185386658,
-0.34839385747909546,
0.09181366115808487,
-0.21014709770679474,
-0.21758604049682617,
0.3024280369281769,
-0.22380492091178894,
-0.11506318300962448,
0.39401715993881226,
-0.06139172613620758,
0.09947055578231812,
-0.4054993987083435,
0.020266562700271606,
0.1685071587562561,
0.1344083845615387,
0.013235587626695633,
0.16600002348423004,
-0.05347982794046402,
0.23526842892169952,
-0.18822787702083588,
-0.05499153956770897,
-0.01265728659927845,
-0.11575985699892044,
-0.019255373626947403,
0.26553958654403687,
0.3343797028064728,
-0.22227637469768524,
-0.40526503324508667,
0.2624693214893341,
-0.23500484228134155,
-0.04461464285850525,
0.1652216911315918,
0.01984839141368866,
-0.07421504706144333,
-0.03596723824739456,
-0.3656620681285858,
-0.3185153901576996,
-0.37317854166030884,
0.2758835554122925,
0.2417401820421219,
0.16131864488124847,
0.2835361659526825,
0.4714737832546234,
0.15858864784240723,
-0.004649804905056953,
-0.0718354731798172,
0.015647929161787033,
0.11568132042884827,
0.3174697458744049,
-0.18724976480007172,
-0.28065571188926697,
-0.01850629597902298,
-0.27889949083328247,
0.09847761690616608,
-0.03918484225869179,
-0.37485677003860474,
-0.02153470180928707,
-0.0963350459933281,
0.08515515923500061,
-0.16093795001506805,
0.31027138233184814,
0.1454002857208252,
0.2981221377849579,
-0.304058700799942,
-0.18722914159297943,
0.11581076681613922,
0.1817472279071808,
-0.11737237125635147,
-0.09557487070560455,
-0.21653026342391968,
0.3681885004043579,
-0.17993807792663574,
0.6490105986595154,
0.09841620177030563,
0.10269851982593536,
0.334614098072052,
-0.19842444360256195,
0.4940837323665619,
-0.23139835894107819,
-0.3099140524864197,
-0.18687666952610016,
-0.0015045165782794356,
-0.0853758454322815,
-0.04729228839278221,
-0.04287554323673248,
-0.18533842265605927,
0.039824094623327255,
-0.036093782633543015,
-0.3044443428516388,
-0.15487563610076904,
0.16390743851661682,
-0.06371749192476273,
-0.0000867007183842361,
-0.026987625285983086,
0.04953179880976677,
-0.2060583382844925,
0.0915217250585556,
0.10207279771566391,
0.05312785506248474,
-0.02724389359354973,
-0.031936779618263245,
0.0031755859963595867,
-0.2744695246219635,
-0.338649183511734,
0.24580730497837067,
-0.06691969186067581,
0.0801842138171196,
0.06459689885377884,
-0.27051353454589844,
-0.12167530506849289,
-0.14352256059646606,
0.37673813104629517,
-0.026717374101281166,
-0.17827652394771576,
0.21086157858371735,
0.34537598490715027,
-0.48421046137809753,
-0.07896760106086731,
-0.20934124290943146,
0.4469030797481537,
-0.32327935099601746,
0.389756441116333,
-0.18317590653896332,
0.016539011150598526,
-0.041797976940870285,
0.2957732379436493,
-0.1255953013896942,
0.17259904742240906,
-0.29487258195877075,
-0.24937795102596283,
-0.4490211308002472,
-0.039383359253406525,
0.05735042318701744,
-0.07115226984024048,
-0.018909161910414696,
-0.08006183803081512,
-0.15118400752544403,
-0.14493776857852936,
-0.13127730786800385,
0.11026410758495331,
0.4841638505458832,
-0.07361581921577454,
-0.05893457680940628,
0.1725034862756729,
0.09073397517204285,
0.5148053169250488,
0.49432089924812317,
-0.1089618131518364,
0.003622223623096943,
-0.049024567008018494,
-0.23177629709243774,
0.22912845015525818,
0.09408903121948242,
-0.39218953251838684,
0.13343149423599243,
-0.0896342545747757,
0.04411649331450462,
0.11259135603904724,
-0.04325561970472336,
0.37983566522598267,
-0.035789210349321365,
-0.09408232569694519,
-0.3799571394920349,
0.3077847957611084,
-0.058190301060676575,
-0.019932055845856667,
0.5162286758422852,
0.3266710340976715,
0.03346659988164902,
0.5265634059906006,
-0.1298794448375702,
0.44260019063949585,
0.024372274056077003,
0.3201613426208496,
0.26234644651412964,
-0.11471997946500778,
0.11845557391643524,
0.18894775211811066,
0.07939073443412781,
-0.35656994581222534,
-0.2805807292461395,
0.03852834179997444,
-0.18381758034229279,
-0.08785860985517502,
0.239064022898674,
-0.06842614710330963,
0.1721891611814499,
-0.32835862040519714,
-0.20756176114082336,
-0.3167189061641693,
0.0340399406850338,
0.0598660483956337,
-0.037533167749643326,
-0.11565881222486496,
0.2499430924654007,
0.18754449486732483,
-0.02250075899064541,
-0.08254938572645187,
-0.10702961683273315,
-0.16609153151512146,
-0.2527140974998474,
-0.021810278296470642,
-0.013886692933738232,
-0.20696240663528442,
0.5891083478927612,
-0.162051260471344,
-0.33033573627471924,
-0.13955026865005493,
0.009659464471042156,
0.013038713485002518,
0.04631596431136131,
-0.003960959613323212,
-0.022775590419769287,
0.23088009655475616,
-0.2085477113723755,
-0.1663667857646942,
0.22168457508087158,
0.23853079974651337,
-0.10754097253084183,
-0.20136213302612305,
-0.006195785012096167,
-0.04003787040710449,
-0.29800528287887573,
0.16635316610336304,
0.21910972893238068,
-0.20310330390930176,
-0.08656303584575653,
-0.2455078363418579,
-0.12629759311676025,
-0.3795246481895447,
-0.1962229162454605,
0.2455805093050003,
0.20271119475364685,
0.07901963591575623,
0.21068216860294342,
0.1385585516691208,
-0.1741124987602234,
0.029873274266719818,
0.1871890276670456,
-0.07032454758882523,
0.20799784362316132,
0.7254230976104736,
-0.048835158348083496,
-0.18167023360729218,
-0.4502623379230499,
0.11683709919452667,
0.37148135900497437,
-0.2391669750213623,
0.3433011770248413,
0.04148878529667854,
0.0018000180134549737,
0.05607009306550026,
0.08611057698726654,
0.2587471306324005,
0.1929101198911667,
-0.21134251356124878,
-0.3319111466407776,
-0.540589451789856,
0.4489770531654358,
-0.07276991009712219,
0.11667515337467194,
-0.29559704661369324,
-0.38614264130592346,
0.07152440398931503,
-0.10008403658866882,
-0.42239829897880554,
0.16380088031291962,
-0.12491681426763535,
-0.024216298013925552,
0.03820798918604851,
-0.05104915052652359,
0.2675265371799469,
0.035412728786468506,
0.26759570837020874,
-0.11132431030273438,
-0.24552620947360992,
-0.3780215084552765,
0.036513131111860275,
0.03860814496874809,
-0.08040622621774673,
-0.016532856971025467,
0.11579528450965881,
-0.2746797204017639,
-0.25854310393333435,
-0.04615451395511627,
-0.1651315689086914,
-0.06929841637611389,
-0.10449125617742538,
0.11022284626960754,
0.05640814080834389,
-0.13586021959781647,
0.13339829444885254,
0.11687126755714417,
-0.12456785887479782,
0.04887160286307335,
-0.01511416956782341,
-0.040163323283195496,
0.003435043850913644,
-0.07846112549304962,
0.16273252665996552,
0.015102102421224117,
-0.21474875509738922,
0.01100114081054926,
0.21436136960983276,
-0.38015520572662354,
-0.06154860556125641,
0.10855478793382645,
0.5144784450531006,
0.34427177906036377,
-0.06726939976215363,
0.14573827385902405,
0.1124987080693245,
0.2805788218975067,
-0.36632418632507324,
-0.11401563137769699,
0.02524217963218689,
-0.011395509354770184,
0.05330725386738777,
0.13308413326740265,
0.15635065734386444,
-0.09086332470178604,
-0.05643891915678978,
0.10807399451732635,
0.048367176204919815,
-0.25342267751693726,
0.12947988510131836,
0.3712781071662903,
-0.086310975253582,
-0.14719730615615845,
0.18851996958255768,
0.19435134530067444,
0.3794231414794922,
0.5305909514427185,
-0.3101463317871094,
0.20384980738162994,
0.39510706067085266,
-0.3768957257270813,
-0.08780442178249359,
-0.2801865339279175,
0.000041846742533380166,
-0.06963546574115753,
0.17796222865581512,
0.040220752358436584,
0.20897069573402405,
0.47502705454826355,
-0.007825370877981186,
0.05874241515994072,
0.032973214983940125,
0.05404168739914894,
-0.04822780564427376,
-0.06945843249559402,
0.199546679854393,
-0.18755708634853363,
-0.014888363890349865,
-0.3003152012825012,
-0.05613093823194504,
0.09929022938013077,
-0.01452910527586937,
0.07713223248720169,
0.021890781819820404,
-0.11488097906112671,
0.23486225306987762,
0.23279385268688202,
0.2752743065357208,
-0.07367386668920517,
-0.0013975031906738877,
0.3635527789592743,
0.16874904930591583,
0.009240568615496159,
0.2556663453578949,
0.6364975571632385,
0.24740828573703766,
-0.36939647793769836,
0.062107544392347336,
-0.07924866676330566,
-0.21784447133541107,
-0.03242408484220505,
-0.04667480289936066,
0.1406335085630417,
-0.02661025896668434,
0.21997740864753723,
0.2681574523448944,
-0.2498580366373062,
0.06438786536455154,
0.08228067308664322,
0.14660876989364624,
0.16475191712379456,
-0.15014831721782684,
-0.21321627497673035,
-0.3038484752178192,
-0.16949498653411865,
0.049955856055021286,
-0.29193639755249023,
-0.04558928310871124,
0.4722536504268646,
0.02521502412855625,
0.029749909415841103,
-0.13791005313396454,
0.17615167796611786,
-0.17907272279262543,
0.696946382522583,
0.331222265958786,
0.36034348607063293,
-0.10727234929800034,
-0.013787227682769299,
-0.583667516708374,
0.07260744273662567,
-0.3888565003871918,
-0.005442262627184391,
0.09117913246154785,
0.13471198081970215,
0.22014428675174713,
-0.009562653489410877,
0.5390029549598694,
0.06663931161165237,
0.02327352575957775,
0.04069037362933159,
-0.365289568901062,
-0.07330189645290375,
0.026598293334245682,
0.0679212287068367,
0.08136708289384842,
-0.21899020671844482,
-0.020083768293261528,
-0.15884993970394135,
0.2745014727115631,
-0.006933372933417559,
-0.06927430629730225,
-0.06416569650173187,
0.028038231655955315,
0.5017520189285278,
-0.11327356100082397,
0.23609095811843872,
-0.16666315495967865,
-0.043840616941452026,
-0.12688714265823364,
-0.46793410181999207,
-0.1198035255074501,
0.29014208912849426,
0.23271888494491577,
0.30426353216171265,
-0.16305866837501526,
-0.22952648997306824,
-0.2585105299949646,
-0.055173758417367935,
0.00010214838403044268,
-0.04424519091844559,
-0.04745618999004364,
0.3220230042934418,
0.18290644884109497,
-0.15724283456802368,
-0.04375791922211647,
0.07563333213329315,
-0.05588824301958084,
-0.0051780869252979755,
-0.08550278842449188,
-0.49539366364479065,
0.36345747113227844,
-0.2377091497182846,
-0.26085788011550903,
0.2116105705499649,
0.1473817080259323,
0.25919315218925476,
0.10712351649999619,
-0.2725704312324524,
0.24301578104496002,
0.1648397594690323,
0.06788229942321777,
-0.3063919246196747,
-0.1398206353187561,
-0.08051852136850357,
0.06244634464383125,
0.08076751232147217,
0.34196344017982483,
0.023096995428204536,
-0.06412878632545471,
-0.23302528262138367,
-0.14064474403858185
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
Hi ! Yes we are working on making `filter` significantly faster. You can look at related PRs here: #2060 #2178
I think you can expect to have the fast version of `filter` available next week.
We'll make it only select one column, and we'll also make the overall filtering operation way faster by avoiding many arrow<->python conversions especially during writing.
I'll let you know how it goes !
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 68 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
@lhoestq Thanks for the response— it's great to hear that we'll be getting a much faster `filter` method soon. However, my use case does also involve using `map` over a single column in order to pre-compute roughly uniformly sized batches, and right now that is also very slow. Is there any plan to make `map` faster for single column operations?
If that's not a priority for the maintainers right now, I could try my hand at adding the feature, but I can't guarantee I would do a good job given my lack of familiarity with pyarrow.
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 96 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
Currently the optimal setup for single-column computations is probably to do something like
```python
result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
```
This has two advantages:
- input_columns="my_col" allows to only read the column "my_col"
- remove_columns=dataset.column_names makes `map` only keep the output of your function `f`, and it drops the other columns of the dataset instead of keeping them.
Let me know if it improves speed on your side.
You can also get more speed by using `batched=True` and setting `num_proc=` for multiprocessing
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 82 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
Hi @lhoestq ,
I'm hijacking this issue, because I'm currently trying to do the approach you recommend:
> Currently the optimal setup for single-column computations is probably to do something like
>
> ```python
> result = dataset.map(f, input_columns="my_col", remove_columns=dataset.column_names)
> ```
Here is my code: (see edit, in which I added a simplified version
```
This is the error:
```bash
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 8964 but got length 1000
```
I wonder why this error occurs, when I delete every column? Can you give me a hint?
### Edit:
I preprocessed my dataset before (using map with the features argument) and saved it to disk. May this be part of the error? I can iterate over the
complete dataset and print every sample before calling map. There seems to be no other problem with the dataset.
I tried to simplify the code that crashes:
```python
# works
log.debug(dataset.column_names)
log.debug(dataset)
for i, sample in enumerate(dataset):
log.debug(i, sample)
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
)
```
```
pyarrow.lib.ArrowInvalid: Column 1 named tokens expected length 20 but got length 1000
```
Edit2:
May this be a problem with a schema I set when preprocessing the dataset before? I tried to add the `features` argument to the function and then I get a new error:
```python
# crashes
counted_dataset = dataset.map(
lambda x: {"a": list(range(20))},
input_columns=column,
remove_columns=dataset.column_names,
load_from_cache_file=False,
num_proc=num_workers,
batched=True,
features=datasets.Features(
{
"a": datasets.Sequence(datasets.Value("int32"))
}
)
)
```
```
File "env/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 1704, in _map_single
writer.write_batch(batch)
File "env/lib/python3.8/site-packages/datasets/arrow_writer.py", line 312, in write_batch
col_type = schema.field(col).type if schema is not None else None
File "pyarrow/types.pxi", line 1341, in pyarrow.lib.Schema.field
KeyError: 'Column tokens does not exist in schema'
```
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 285 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
Hi ! Can you open a separate issue for that ?
Also if you could provide a google colab or a sample code to reproduce this issue that would be helpful.
On my side I was not able to reproduce this error.
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 42 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
@lhoestq Sorry I'm just responding now. I'm currently using your recommendation for the map on a single column, and I've gotten it to be fast enough to sort of work for my use case by just setting `num_proc=10`, although it's still quite slow. It's clear that it is still loading the entirety of each row into memory and then discarding everything except the selected column, instead of exploiting the columnar data format to only load the selected column.
My code is like this:
```
self.dataset = self.dataset.sort('num_tokens')
batch_dataset = self.dataset.map(
compute_uniform_sized_batches,
batched=True, batch_size=10_000, num_proc=10, input_columns=['num_tokens'],
remove_columns=get_columns_all_equal(self.dataset),
with_indices=True,
fn_kwargs=dict(max_size=tokens_per_batch)
)
self.batches = {
name: list(zip(split['start'], split['length']))
for name, split in batch_dataset.items()
}
```
I find that the processes with higher IDs take significantly longer to complete, presumably because the dataset is sorted by article length and they're loading the entire article text into memory, instead of just the 'num_tokens' column.
I should note that my batching procedure would work best if I just used `batch_size=None` and loaded the whole column into memory at once, but I found that this was intolerably slow and gave me no progress information, so I'm using the less than ideal `batch_size=10_000`.
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 195 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
Hi @norabelrose ! I'm glad you managed to make this work on your side.
Regarding memory usage, you can try to drop the columns that you don't want to use for your `map` for now.
In the future we'll try to find a way to not load unnecessary columns in memory in `map`. Currently the way it works is that it gets the batch as a python dict, then it updates it using the output of your mapping function, and finally it removes columns from `remove_columns`. Therefore for a moment some columns are loaded in memory even if you remove them or don't use them for your mapping function.
It would be nice to have a way to optimize memory for cases such as yours !
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 126 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
@lhoestq After looking through the source code, it looks like the following solution has at least some chance of working:
- refactor `Dataset.map()` so that the `input_columns` parameter is implemented by using the `self.formatted_as()` context manager with `columns=input_columns`
- change `Dataset._getitem()` so that it passes `self._data.drop(drop_columns)` to the `query_table()` function whenever `format_columns` is non-None and `output_all_columns` is False, instead of `self._data` itself
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 62 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
Looks like a great direction :)
Note that `query_table` doesn't bring data into memory. Only `format_table` does.
Also the dataset may already have a format with `columns=` already defined so we would need to define the formatted `input_dataset` like:
```python
# before the `map` main for loop
input_columns = input_columns if input_columns is not None else self.column_names
if not self._output_all_columns:
columns = [col for col in input_columns if self._format_columns is None or col in self._format_columns]
input_dataset = self.with_format(
type=self._format_type,
columns=columns
)
else:
# in this case we could find a way to filter both format_columns and unformatted columns eventually
input_dataset = self
# then input_dataset can be used in the main for loop of `map`
```
EDIT: oh and regarding streaming format versus file format for arrow, we plan to start using the file format #1933 at one point (though I'm not sure if it would improve performance)
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 148 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
Good to know about `query_table` not bringing anything into memory. I was under the impression that it did because a while back I looked at my `map` operation in pdb and it looked like it was spending forever in line 93 of formatting.py, `return pa.concat_tables(....)`, although that was before the `fast_slice` interpolation search was implemented, so it may have had more to do with the slow ChunkedArray slice implementation than anything else.
If `query_table` is I/O free then the fix may be as simple as just adding this to line 1779 of arrow_dataset.py:
```python
# Only load the columns we actually need
if input_columns:
stack.enter_context(self.formatted_as(
self._format_type,
columns=input_columns,
output_all_columns=False,
**self._format_kwargs
))
```
It's not clear to me why the `[col for col in input_columns if self._format_columns is None or col in self._format_columns]` check would be necessary— it seems like either `input_columns` should simply temporarily override the `_format_columns` within the `map` operation, or we should throw an error if there are any conflicts. Currently it doesn't look like this case is checked for at all within `map`, but maybe I'm just missing it.
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 181 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
`query_table` simply slices/concatenates parts of the table. The actual data inside the table is not brought in memory.
Also I'm more in favor of declaring `input_dataset = self.with_format(...)` since `formatted_as` may update the dataset fingerprint of `self`, which is not expected when someone runs `map`.
> It's not clear to me why the [col for col in input_columns if self._format_columns is None or col in self._format_columns] check would be necessary— it seems like either input_columns should simply temporarily override the _format_columns within the map operation, or we should throw an error if there are any conflicts. Currently it doesn't look like this case is checked for at all within map, but maybe I'm just missing it.
Actually yes we can just use input_columns. And we do need to add a check to make sure there are not conflicts or this could lead to confusing errors.
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 145 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2193
|
Filtering/mapping on one column is very slow
|
That sounds good to me! I just submitted a PR (#2246) implementing your approach. I also changed how `_query_table` handles Iterable keys since it still seemed like `pa.concat_tables` was taking a long time to create the table for each batch. Now my whole `map()` operation takes 1 min 46 seconds where it used to take somewhere on the order of 10 minutes.
|
I'm currently using the `wikipedia` dataset— I'm tokenizing the articles with the `tokenizers` library using `map()` and also adding a new `num_tokens` column to the dataset as part of that map operation.
I want to be able to _filter_ the dataset based on this `num_tokens` column, but even when I specify `input_columns=['num_tokens']`, it seems that the entirety of each row is loaded into memory, which makes the operation take much longer than it should. Indeed, `filter` currently just calls `map`, and I found that in `_map_single` on lines 1690-1704 of `arrow_dataset.py`, the method is just grabbing slices of _all the rows_ of the dataset and then passing only the specified columns to the map function. It seems that, when the user passes a value for `input_columns`, the `map` function should create a temporary pyarrow table by selecting just those columns, and then get slices from that table. Or something like that— I'm not very familiar with the pyarrow API.
I know that in the meantime I can sort of get around this by simply only returning the rows that match my filter criterion from the tokenizing function I pass to `map()`, but I actually _also_ want to map on just the `num_tokens` column in order to compute batches with a roughly uniform number of tokens per batch. I would also ideally like to be able to change my minimum and maximum article lengths without having to re-tokenize the entire dataset.
PS: This is definitely not a "dataset request." I'm realizing that I don't actually know how to remove labels from my own issues on other people's repos, if that is even possible.
| 62 |
Filtering/mapping on one column is very slow
|
[
-0.2736397087574005,
-0.11035767197608948,
-0.2589493989944458,
-0.15230002999305725,
0.03224069997668266,
-0.05055930092930794,
0.29345938563346863,
0.46981653571128845,
0.3149034082889557,
0.1930060237646103,
-0.12911660969257355,
0.019783271476626396,
0.07816459238529205,
0.013890855014324188,
-0.4612656533718109,
0.20244671404361725,
-0.19036749005317688,
0.1658584177494049,
0.08577375113964081,
-0.11824812740087509,
-0.029747847467660904,
-0.07231716066598892,
0.03316069766879082,
0.031702809035778046,
0.13523410260677338,
-0.1876709908246994,
0.46227383613586426,
-0.3332279920578003,
-0.1835779845714569,
0.09853264689445496,
-0.09921601414680481,
0.1610340029001236,
-0.4654121398925781,
0.2590746581554413,
-0.00010254765948047861,
-0.04557444155216217,
-0.0355675108730793,
0.19229921698570251,
0.06894351541996002,
0.2727457880973816,
-0.06004545837640762,
-0.15667730569839478,
-0.10891324281692505,
-0.1270824670791626,
-0.29652801156044006,
0.12644734978675842,
-0.10333326458930969,
-0.19938495755195618,
-0.12271222472190857,
-0.037287965416908264,
0.3114105463027954,
-0.005530314985662699,
-0.5017258524894714,
-0.02481849305331707,
0.2720034718513489,
-0.019925182685256004,
-0.1193973496556282,
-0.03165755048394203,
0.5523320436477661,
-0.31199464201927185,
-0.1874769926071167,
0.7453194856643677,
-0.28039222955703735,
-0.06653401255607605,
0.11811845004558563,
0.06423839926719666,
0.5475066900253296,
0.11351262778043747,
0.3520805835723877,
-0.10163328796625137,
-0.17563457787036896,
0.2597072124481201,
0.07043192535638809,
-0.12073966860771179,
-0.2504172623157501,
-0.1064654141664505,
0.14356528222560883,
-0.19294467568397522,
-0.1900939643383026,
-0.15329323709011078,
-0.2028946876525879,
-0.20777416229248047,
0.09130890667438507,
0.010870536789298058,
-0.3062671720981598,
0.2237349897623062,
0.0882682353258133,
-0.04226420074701309,
0.19123314321041107,
-0.19699828326702118,
0.06309008598327637,
-0.23001724481582642,
0.3817584216594696,
0.25788170099258423,
-0.1764703392982483,
-0.2077508419752121,
0.2282019853591919,
0.21267719566822052,
-0.19654744863510132,
-0.39651060104370117,
-0.019151993095874786,
0.3735926151275635,
0.43103083968162537,
-0.025168662890791893,
0.05928490683436394,
0.0019034487195312977,
-0.16883541643619537,
0.2272571474313736,
0.31655561923980713,
-0.06394883990287781,
-0.2572661340236664,
-0.021445926278829575,
0.2529832124710083,
-0.011083860881626606,
-0.08085444569587708,
-0.3332606256008148,
-0.29516229033470154,
-0.15992319583892822,
-0.30969172716140747,
0.07327961921691895,
-0.006129565183073282,
-0.052694596350193024,
0.38295087218284607,
0.33110639452934265,
0.03578849509358406,
-0.01723245158791542,
0.007378355599939823,
-0.2847723364830017,
-0.34517255425453186,
0.053730808198451996,
-0.1802126169204712,
0.23579353094100952,
-0.22441381216049194,
-0.019986281171441078,
-0.04047749936580658,
-0.038196347653865814,
-0.39826518297195435,
-0.03517133742570877,
-0.14564000070095062,
0.10637898743152618,
-0.08662911504507065,
-0.23861068487167358,
0.12923794984817505,
0.2504578232765198,
-0.24201993644237518,
0.3466753661632538,
0.1780078113079071,
-0.1474822759628296,
-0.32885414361953735,
-0.011298790574073792,
-0.17255085706710815,
-0.19484703242778778,
0.23510439693927765,
0.2997669577598572,
0.16584748029708862,
0.1109544187784195,
0.3418906033039093,
0.3972415328025818,
0.17243579030036926,
-0.32582396268844604,
-0.3023391366004944,
0.17338527739048004,
-0.3830687999725342,
-0.029910355806350708,
0.027119731530547142,
0.17865265905857086,
-0.27302128076553345,
0.06540904194116592,
-0.2529255747795105,
0.2601311504840851,
0.5074946880340576,
0.3073127269744873,
-0.05365637317299843,
-0.12612749636173248,
0.194705069065094,
-0.05411216616630554,
0.3829513490200043,
0.06259684264659882,
-0.46645963191986084,
0.2816193103790283,
-0.39324986934661865,
0.19923420250415802,
0.1300131380558014,
0.2905922830104828,
0.22280564904212952,
-0.011048633605241776,
0.3208965063095093,
0.059720829129219055,
-0.11435236036777496,
0.1400371938943863,
-0.20472298562526703,
0.1721464842557907,
0.09959308803081512,
0.03513113036751747,
-0.09025143086910248,
0.19262830913066864,
-0.011577668599784374,
-0.10270927846431732,
-0.04890879616141319,
0.09985962510108948,
0.06745506078004837,
0.06412119418382645,
0.04427865892648697,
-0.043542973697185516,
-0.03894853964447975,
-0.2049098163843155,
0.06761977821588516,
0.05217721685767174,
0.4027279019355774,
-0.10183733701705933,
-0.002028347458690405,
-0.05424043908715248,
-0.24482734501361847,
-0.03029802069067955,
0.14340649545192719,
0.192140132188797,
0.21840062737464905,
-0.07773271948099136,
0.07477841526269913,
-0.34327200055122375,
-0.12657307088375092,
0.19047458469867706,
-0.13577260076999664,
-0.24019059538841248,
0.039268504828214645,
-0.030364926904439926,
-0.00019149310537613928,
-0.04629868268966675,
0.09268274158239365,
-0.0831526666879654,
0.1818391978740692,
0.0010114434408023953,
0.04914876073598862,
-0.06611190736293793,
-0.028022870421409607,
0.08433631807565689,
0.2085696905851364,
0.47314220666885376,
-0.07973070442676544,
0.27315184473991394,
-0.08070117235183716,
-0.05174199864268303,
0.01984127052128315,
-0.08345984667539597,
-0.5027409791946411,
0.39566799998283386,
0.0029902076348662376,
0.45801740884780884,
0.08644505590200424,
0.09040118008852005,
0.1884881854057312,
0.14835068583488464,
0.034033384174108505,
-0.3866201639175415,
0.30432775616645813,
-0.028475187718868256,
-0.1292918473482132,
0.257000207901001,
-0.1340380758047104,
0.41145870089530945,
0.12902331352233887,
-0.02299312874674797,
-0.12482479214668274,
0.19781549274921417,
0.2794804275035858,
0.0025466843508183956,
-0.0013577115023508668,
0.12405569106340408,
0.008049721829593182,
0.26147472858428955,
0.19247160851955414,
-0.25314414501190186,
-0.09300795197486877,
-0.1690376251935959,
0.211185485124588,
0.04746841639280319,
-0.07231779396533966,
-0.08916490525007248,
0.17838554084300995,
-0.09830028563737869,
-0.3933052122592926,
-0.16531628370285034,
-0.021863218396902084,
0.34596386551856995,
0.05245203897356987,
-0.11072186380624771,
-0.20618101954460144,
-0.14475171267986298,
0.3557601571083069,
-0.07220569252967834,
0.3632698655128479,
-0.17200008034706116,
0.30483826994895935,
0.21940821409225464,
-0.07369685173034668,
0.1061171442270279,
-0.00040389716741628945,
0.29686239361763,
0.140384703874588,
-0.12300699204206467,
-0.3400212526321411,
-0.23320545256137848,
0.02420087531208992,
0.1784791350364685,
0.029094792902469635,
0.26254358887672424,
0.1262410581111908,
0.09840550273656845,
-0.11048086732625961,
-0.008609038777649403,
-0.38211265206336975,
-0.12258709222078323,
-0.10854446887969971,
-0.051638972014188766,
0.0696113184094429,
0.3758540451526642,
-0.21801893413066864,
0.029172556474804878,
0.27291008830070496,
-0.09432921558618546,
-0.14989455044269562,
0.031362373381853104,
-0.07827690243721008,
0.17034326493740082,
0.017221566289663315,
0.057818345725536346,
0.16128970682621002,
-0.2772035300731659,
-0.2392457276582718,
-0.1954323798418045,
0.3785903751850128,
-0.15646600723266602,
-0.050974566489458084,
-0.3238453269004822,
-0.19987237453460693,
0.2983119785785675,
-0.15734487771987915,
0.11463761329650879,
0.23256908357143402,
0.1747829169034958,
-0.07342028617858887,
-0.3106382489204407,
-0.04308122396469116,
-0.06247422471642494,
0.10617269575595856,
0.0005392945604398847,
0.04493744298815727,
-0.5680397748947144,
-0.09521862864494324,
0.24858510494232178,
-0.1782861053943634,
0.30330654978752136,
-0.03758011385798454,
-0.3373410701751709,
-0.008461442776024342,
-0.2620064616203308,
-0.15622380375862122,
0.008904009126126766,
-0.14331483840942383,
-0.12538647651672363,
0.4083496630191803,
-0.0003477700229268521,
0.12932872772216797,
0.16197216510772705,
0.1734703779220581,
-0.04878808557987213,
0.12404502928256989,
-0.1033984124660492,
-0.08213658630847931,
-0.3939177691936493,
-0.2382698506116867,
0.11799519509077072,
-0.00047380352043546736,
0.14743572473526,
0.15524497628211975,
-0.43175143003463745,
-0.20113304257392883,
0.009610822424292564,
0.08096744120121002,
-0.14469745755195618,
0.11747531592845917,
0.09206290543079376,
0.058987878262996674,
0.30696478486061096,
0.08172950893640518,
-0.29377612471580505,
-0.13864006102085114,
-0.020293233916163445,
-0.06718619167804718,
0.11324501037597656,
-0.3388901352882385,
-0.11488386243581772,
-0.26837852597236633,
-0.49279317259788513,
0.24902848899364471,
0.017104381695389748,
0.022156184539198875,
-0.13013356924057007,
-0.1581229567527771,
0.26160308718681335,
0.009887556545436382,
0.4899599552154541,
-0.14022301137447357,
-0.0724811926484108,
0.12705957889556885,
-0.3353320360183716,
-0.2869056761264801,
0.2021716982126236,
-0.029842764139175415,
-0.035201169550418854,
0.2533521056175232,
0.6049525141716003,
-0.2525540292263031,
-0.18032121658325195,
0.25190532207489014,
-0.15337294340133667,
0.04820647090673447,
-0.11747370660305023,
-0.004065174609422684,
-0.14574255049228668,
0.14041674137115479,
0.2503315508365631,
-0.12688426673412323,
0.14478161931037903,
0.49956098198890686,
-0.30276405811309814,
0.1251366138458252,
-0.060208261013031006,
0.2068483680486679,
0.26398220658302307,
-0.17608563601970673,
0.2539493143558502,
0.23527082800865173,
0.12888295948505402,
0.18149122595787048,
-0.47643861174583435,
0.2550823986530304,
0.030062668025493622,
0.2333199679851532,
0.1965579390525818,
0.13596005737781525,
0.04103152081370354,
0.49223828315734863,
0.16582877933979034,
0.32446086406707764,
-0.12593306601047516,
0.2733837366104126,
-0.04333256557583809,
-0.227492094039917,
0.08573537319898605,
0.27158859372138977,
0.05084652826189995,
-0.15519332885742188,
0.19768480956554413,
0.08492402732372284,
-0.3204592764377594,
0.49723997712135315,
-0.0497979000210762,
0.06754248589277267,
0.07992002367973328,
0.18790844082832336,
0.8607970476150513,
-0.36164090037345886,
-0.2740599811077118,
-0.08167193084955215,
-0.18287409842014313,
-0.09274281561374664,
-0.12751373648643494,
0.14977404475212097,
0.05830663815140724,
-0.482619971036911,
0.10287457704544067,
-0.04614996910095215,
0.04311135783791542,
-0.08000249415636063,
0.04288686066865921,
-0.029803656041622162,
-0.16272178292274475,
0.28748205304145813,
-0.08203309029340744,
-0.07332196086645126,
0.3894712030887604,
-0.23604701459407806,
-0.3259085714817047,
0.17377279698848724,
0.2386549413204193,
0.1696273684501648,
0.04969525337219238,
0.09848805516958237,
-0.19515188038349152,
-0.09179482609033585,
-0.005894784815609455,
-0.20710597932338715,
0.18773430585861206,
-0.00522591732442379,
-0.10730509459972382,
-0.05817115679383278,
-0.1404988318681717,
-0.3667088747024536,
-0.44446811079978943,
0.16639791429042816,
0.04743829369544983,
0.19675131142139435,
0.33767426013946533,
0.3962451219558716,
0.008268100209534168,
-0.14058952033519745,
-0.12115593999624252,
-0.06005924940109253,
0.0405198372900486,
0.09893248230218887,
-0.16645990312099457,
-0.11338954418897629,
-0.27865689992904663,
0.27749836444854736,
0.22063444554805756,
0.07304753363132477,
-0.08626370877027512,
0.09293360263109207,
-0.12026268243789673,
-0.23445287346839905,
0.2820691764354706,
-0.27693018317222595,
0.10024081915616989,
0.4601198732852936,
0.17044630646705627,
-0.2721004784107208,
-0.1384613960981369,
0.48086315393447876,
0.33256322145462036,
0.13153070211410522,
0.1683521568775177,
-0.18922542035579681,
-0.6270054578781128,
-0.26969578862190247,
-0.20665103197097778,
0.31693747639656067,
0.03732255473732948,
0.20373904705047607,
-0.48041924834251404,
-0.3986521065235138,
0.2966742217540741,
0.17900611460208893,
0.04626191407442093,
0.03552914410829544,
-0.24449697136878967,
-0.09005353599786758,
-0.04960162192583084,
0.010752781294286251,
0.16696828603744507,
-0.12562914192676544,
-0.3591483235359192,
0.03647281602025032,
-0.30749043822288513,
0.5580560564994812,
-0.4487760066986084,
-0.26107126474380493,
-0.1469590812921524,
0.1099856048822403,
0.024322865530848503,
0.04318232461810112,
0.0788843184709549,
0.08438675105571747,
0.372623473405838,
0.1414676457643509,
-0.06490516662597656,
-0.3837428092956543,
0.31021246314048767,
0.09076865017414093,
-0.3624259829521179,
-0.06690182536840439,
0.15197190642356873,
-0.10070236027240753,
-0.263812780380249,
-0.2723371088504791,
-0.019929366186261177,
-0.06671228259801865,
-0.026104377582669258,
-0.6429129838943481,
-0.1533103734254837,
-0.43964436650276184,
0.21961867809295654,
0.015530905686318874,
-0.15998123586177826,
-0.17156408727169037,
0.054980143904685974,
-0.12096092849969864,
0.08785758912563324,
-0.14899374544620514,
0.02487872913479805,
0.05285732075572014,
-0.29440543055534363,
-0.19388534128665924,
0.3334231376647949,
0.04143049195408821,
0.14827214181423187,
0.451302170753479,
0.18119709193706512,
0.21438397467136383,
0.27419567108154297,
-0.1299770623445511,
-0.05273124948143959,
0.3286772668361664,
-0.32664841413497925,
-0.29442742466926575,
0.2373439371585846,
0.011633354239165783,
0.4265652298927307,
0.1659168004989624,
-0.16233955323696136,
0.11159307509660721,
0.3961077630519867,
-0.051667630672454834,
0.06857620179653168,
-0.2931095361709595,
-0.3681710958480835,
0.1980496644973755,
0.46945080161094666,
-0.17677521705627441,
0.41399362683296204,
0.125554621219635,
-0.21765193343162537,
0.393136203289032,
0.20895688235759735,
0.028467845171689987,
0.040025584399700165,
0.43247073888778687,
-0.5177799463272095,
-0.22439676523208618,
0.29541027545928955,
0.49049046635627747,
-0.1833718866109848,
0.013968056067824364,
0.28196898102760315,
-0.42913541197776794,
-0.0450124517083168,
-0.04095371812582016,
0.20904378592967987,
0.2829917073249817,
-0.03052579239010811,
-0.042863015085458755,
-0.13597138226032257,
-0.18587736785411835,
-0.024420475587248802,
-0.1391461044549942,
0.12115467339754105,
0.22102992236614227,
0.46536490321159363,
-0.1886083483695984,
0.4156474769115448,
-0.139481782913208,
-0.07649853080511093,
-0.43721628189086914,
0.47505858540534973,
-0.19160299003124237,
0.23667162656784058,
-0.3437742590904236,
0.32476070523262024,
0.1872488260269165,
0.014919627457857132,
-0.10956819355487823,
0.3734280467033386,
0.3028755187988281,
-0.009745858609676361,
-0.27504464983940125,
-0.40486928820610046,
-0.15252730250358582,
0.34227025508880615,
0.06515324115753174,
0.22001415491104126,
0.018304036930203438,
0.14505675435066223,
-0.3208306133747101,
0.04990708455443382,
0.07661651819944382,
0.11852069944143295,
0.19463130831718445,
0.04371434822678566,
0.1087738499045372,
-0.2059824913740158,
-0.17212921380996704,
-0.09372461587190628,
0.10479404777288437,
-0.0725392997264862,
-0.09973917156457901,
-0.3612131178379059,
0.15925635397434235,
0.17976556718349457,
0.16118019819259644,
0.0749485194683075,
0.29016217589378357,
-0.22148138284683228,
0.027074666693806648,
-0.2654685974121094,
-0.3249971866607666,
-0.19420060515403748,
0.15500055253505707,
-0.4828656315803528,
-0.11303170025348663,
0.16664311289787292,
0.307575523853302,
0.3378077745437622,
0.0745941549539566,
0.23133186995983124,
-0.2611349821090698,
-0.18551039695739746,
0.14638808369636536,
-0.07146862894296646,
0.3784109354019165,
0.09613761305809021,
0.03959443047642708,
-0.08593086153268814,
-0.25967350602149963,
0.4052395224571228,
-0.027767624706029892,
0.3580555021762848,
0.011814822442829609,
0.05733155831694603,
-0.15143662691116333,
0.3764107823371887,
-0.024733087047934532,
-0.0063435691408813,
0.19284459948539734,
-0.2339468002319336,
-0.01799846440553665,
-0.10916133224964142,
0.20232591032981873,
-0.18475857377052307,
0.02681821584701538,
0.21964047849178314,
0.03811808302998543,
0.13710035383701324,
-0.06858356297016144,
-0.038981758058071136,
0.22088998556137085,
-0.13082891702651978,
0.14027893543243408,
0.29275089502334595,
0.056959573179483414,
0.2348829209804535,
0.351384699344635,
-0.20637865364551544,
0.006895808968693018,
0.1771000325679779,
0.009070014581084251,
-0.30979013442993164,
-0.19744519889354706,
0.46108278632164,
-0.2573406398296356,
-0.48153045773506165,
0.08274092525243759,
0.2413841336965561,
-0.03110332414507866,
0.188400000333786,
0.21832533180713654,
-0.31989315152168274,
0.15369157493114471,
-0.2264776974916458,
0.03465327247977257,
0.17579339444637299,
0.008220508694648743,
-0.16101670265197754,
-0.04102062061429024,
-0.08648984879255295,
0.011138794012367725,
0.0019400957971811295,
-0.45824819803237915,
-0.27558591961860657
] |
https://github.com/huggingface/datasets/issues/2190
|
News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs
|
Hi @anassalamah,
Could you please try with this:
```python
train_ds = load_dataset("news_commentary", lang1="ar", lang2="en", split='train[:98%]')
val_ds = load_dataset("news_commentary", lang1="ar", lang2="en", split='train[98%:]')
```
|
I used load_dataset to load the news_commentary dataset for "ar-en" translation pairs but found translations from Arabic to Hindi.
```
train_ds = load_dataset("news_commentary", "ar-en", split='train[:98%]')
val_ds = load_dataset("news_commentary", "ar-en", split='train[98%:]')
# filtering out examples that are not ar-en translations but ar-hi
val_ds = val_ds.filter(lambda example, indice: indice not in chain(range(1312,1327) ,range(1384,1399), range(1030,1042)), with_indices=True)
```
* I'm fairly new to using datasets so I might be doing something wrong
| 22 |
News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs
|
[
-0.13581499457359314,
0.24351142346858978,
-0.24798603355884552,
0.2603115141391754,
-0.05960937216877937,
0.011690008454024792,
0.2828880250453949,
0.17603597044944763,
-0.30779561400413513,
-0.040189873427152634,
-0.216168612241745,
0.1984269917011261,
0.15970931947231293,
0.10663074254989624,
-0.1379166543483734,
-0.14241977035999298,
0.05008993297815323,
0.032243821769952774,
-0.17117099463939667,
-0.3010956943035126,
-0.16731035709381104,
0.5094773173332214,
-0.14763619005680084,
0.10513295233249664,
-0.21690887212753296,
0.008757153525948524,
0.28766900300979614,
0.0788591131567955,
-0.02629796788096428,
-0.12543116509914398,
-0.18362148106098175,
0.21985089778900146,
-0.14650729298591614,
0.10447520017623901,
-0.00010344062320655212,
-0.05329485982656479,
0.019672533497214317,
-0.09969905018806458,
-0.1777571737766266,
-0.086690254509449,
-0.061072543263435364,
-0.22140508890151978,
-0.2205224186182022,
-0.1492837518453598,
-0.11446894705295563,
-0.5478355288505554,
-0.06862562149763107,
-0.43147531151771545,
0.21539776027202606,
0.4467571973800659,
0.2802421450614929,
0.3123193085193634,
-0.0732135996222496,
-0.14722386002540588,
0.11782664805650711,
-0.23099581897258759,
0.059804871678352356,
0.14550386369228363,
0.14797504246234894,
0.1432696282863617,
-0.2589249014854431,
0.4573119878768921,
-0.008683059364557266,
-0.062494564801454544,
-0.4636600613594055,
-0.048775430768728256,
0.0798405259847641,
-0.07529087364673615,
0.32813161611557007,
0.19231420755386353,
0.3640657961368561,
-0.019032606855034828,
-0.04178735613822937,
0.0628337562084198,
-0.10401424765586853,
0.23589688539505005,
0.0116313137114048,
0.10472024232149124,
-0.12479272484779358,
0.2920606732368469,
0.08969283849000931,
-0.015799226239323616,
0.0808979794383049,
0.05164719372987747,
0.03565338999032974,
0.24602052569389343,
0.05382722243666649,
0.12516680359840393,
-0.1935918629169464,
-0.27574068307876587,
0.07145984470844269,
0.061621952801942825,
-0.10903947800397873,
0.090850830078125,
-0.09860478341579437,
0.06653431057929993,
0.28772175312042236,
-0.15467606484889984,
-0.14454495906829834,
-0.30303138494491577,
-0.38605770468711853,
0.3006230592727661,
-0.12559618055820465,
0.06848209351301193,
0.04152834787964821,
-0.2261614352464676,
0.23515687882900238,
0.126153364777565,
0.2154085636138916,
-0.16213902831077576,
-0.009618518874049187,
0.3125589191913605,
-0.04281185194849968,
-0.2748361825942993,
-0.3666327893733978,
-0.08243058621883392,
-0.05665293708443642,
-0.022203324362635612,
-0.2901843786239624,
0.48925071954727173,
-0.13048788905143738,
-0.07882869243621826,
-0.1366102248430252,
0.27015790343284607,
0.1855453997850418,
0.10806172341108322,
0.10440826416015625,
0.1535358726978302,
-0.1599680334329605,
-0.2551526129245758,
-0.31370267271995544,
0.10566984862089157,
-0.10499198734760284,
-0.13566559553146362,
0.028666626662015915,
0.33656954765319824,
0.28396356105804443,
0.04657232016324997,
0.28713101148605347,
-0.16954860091209412,
-0.37055474519729614,
-0.137939915060997,
0.1211976408958435,
-0.21428076922893524,
0.10091433674097061,
0.25357821583747864,
0.1000160425901413,
-0.2496211677789688,
0.05307048186659813,
0.1406814604997635,
-0.195816308259964,
0.2248598337173462,
-0.32934433221817017,
0.24643374979496002,
-0.12411656975746155,
-0.0018703200621530414,
0.3178682029247284,
0.5792199373245239,
0.30703940987586975,
-0.1247999370098114,
-0.03827417269349098,
-0.03276897966861725,
-0.192074254155159,
0.05925784260034561,
-0.06786768138408661,
0.18677324056625366,
-0.7347331643104553,
-0.09019488841295242,
0.44537732005119324,
-0.03259642422199249,
0.3735804855823517,
0.45205479860305786,
-0.15033112466335297,
0.10343839228153229,
-0.15704235434532166,
0.09046769142150879,
0.2030908763408661,
0.19079431891441345,
-0.21628394722938538,
-0.19705675542354584,
-0.08300246298313141,
-0.05383547395467758,
0.2201349139213562,
0.1509612649679184,
0.26670393347740173,
-0.014314930886030197,
0.22389216721057892,
0.13624653220176697,
0.22913481295108795,
0.20457087457180023,
-0.3356378972530365,
-0.14538677036762238,
0.4903970956802368,
0.08449987322092056,
0.15801307559013367,
-0.1614568531513214,
0.07827864587306976,
0.24530981481075287,
0.417656272649765,
-0.10589462518692017,
0.0923834815621376,
0.19797511398792267,
-0.07729068398475647,
-0.03900551050901413,
0.2543533742427826,
0.06811649352312088,
-0.19435229897499084,
-0.03715183958411217,
0.08129054307937622,
0.4828231930732727,
0.03652355819940567,
0.07866546511650085,
-0.5520574450492859,
-0.16996338963508606,
0.011157871223986149,
0.08293095976114273,
0.35038426518440247,
0.20961546897888184,
-0.21765735745429993,
0.41276031732559204,
0.09313157200813293,
0.3144330084323883,
-0.45346012711524963,
-0.1449698954820633,
-0.14985841512680054,
0.40659576654434204,
-0.10336903482675552,
-0.32540905475616455,
0.05814431235194206,
0.19379284977912903,
0.14905770123004913,
0.08469017595052719,
-0.19199326634407043,
0.17791321873664856,
0.19544650614261627,
0.3753303289413452,
-0.13554434478282928,
-0.21217495203018188,
0.052975669503211975,
-0.5057902932167053,
0.02050858736038208,
0.20341511070728302,
0.10886295884847641,
-0.028987227007746696,
0.05527203530073166,
0.3379948139190674,
-0.07926104217767715,
-0.06669910252094269,
-0.006731217727065086,
-0.07865972816944122,
0.5075298547744751,
0.18618156015872955,
0.0387059710919857,
-0.49204644560813904,
0.12416469305753708,
0.1791936606168747,
0.17550520598888397,
0.3880714476108551,
-0.08336695283651352,
0.15805956721305847,
0.7951170206069946,
0.2374020367860794,
0.136924147605896,
0.04904809221625328,
0.024529321119189262,
-0.21401716768741608,
-0.10900438576936722,
0.1085360124707222,
0.026895808055996895,
0.14481712877750397,
0.2590448260307312,
0.00005258219243842177,
-0.06537505239248276,
-0.3295459747314453,
0.11029315739870071,
-0.158298522233963,
0.08997353166341782,
0.1798330396413803,
0.1758294552564621,
-0.4030807316303253,
-0.41916143894195557,
0.3675306439399719,
0.22986000776290894,
0.18642184138298035,
-0.22276055812835693,
-0.22077491879463196,
-0.3368268609046936,
-0.41020387411117554,
-0.3497435450553894,
-0.08596137911081314,
0.05062713474035263,
-0.29319140315055847,
0.33917468786239624,
-0.294505774974823,
-0.13352911174297333,
0.25356268882751465,
0.30922943353652954,
-0.021080175414681435,
-0.029230188578367233,
0.2267279177904129,
0.022927718237042427,
-0.4265439212322235,
-0.1648595929145813,
0.2013287991285324,
-0.16689638793468475,
0.002525836694985628,
-0.008431937545537949,
-0.34035980701446533,
-0.4807702600955963,
-0.34836432337760925,
-0.4140273630619049,
0.15408748388290405,
-0.09003755450248718,
0.15950044989585876,
0.10729894787073135,
0.17248068749904633,
-0.004804346244782209,
-0.32921281456947327,
0.14985790848731995,
0.18512015044689178,
-0.05402956157922745,
0.14336669445037842,
-0.2186664193868637,
-0.22045302391052246,
-0.17484799027442932,
-0.6822782754898071,
-0.2535663843154907,
-0.21473707258701324,
-0.08202894032001495,
-0.32898950576782227,
0.1711864471435547,
-0.3882075250148773,
-0.002021737862378359,
-0.22232018411159515,
-0.11894655972719193,
-0.004130937624722719,
-0.5210620164871216,
-0.04413815960288048,
0.2399493157863617,
-0.17293502390384674,
-0.2679717540740967,
-0.22725625336170197,
0.21516382694244385,
0.28611549735069275,
-0.15881752967834473,
-0.0669492706656456,
0.14164485037326813,
-0.21785371005535126,
0.43379226326942444,
0.097848080098629,
0.06672708690166473,
0.06192496418952942,
-0.06520827114582062,
-0.08977502584457397,
-0.3740347623825073,
-0.1890539824962616,
0.21460503339767456,
0.042451564222574234,
0.07383444160223007,
-0.03281325101852417,
0.15071700513362885,
0.10733871161937714,
0.302937775850296,
0.31186801195144653,
-0.2755974233150482,
0.23583103716373444,
-0.1652766317129135,
0.2873806953430176,
-0.07610709220170975,
-0.005392122082412243,
0.19272471964359283,
0.20328624546527863,
-0.0037643881514668465,
0.37305551767349243,
-0.2526540756225586,
-0.5450705289840698,
0.09339796751737595,
0.21063098311424255,
-0.445022851228714,
-0.14177562296390533,
0.04099743440747261,
-0.030548110604286194,
0.1914699226617813,
0.29096952080726624,
0.0046797203831374645,
0.0020946040749549866,
-0.11967067420482635,
0.046999529004096985,
-0.16522321105003357,
-0.23490023612976074,
0.1001129001379013,
-0.21747711300849915,
-0.0784897431731224,
-0.19615139067173004,
-0.039254285395145416,
0.17409281432628632,
0.4285537898540497,
-0.1863924115896225,
0.0018122229957953095,
0.04724811762571335,
0.01957913674414158,
0.07171833515167236,
-0.3268807530403137,
-0.016285555437207222,
0.22771470248699188,
0.5268371105194092,
-0.1569850742816925,
-0.04739779606461525,
-0.4079277813434601,
0.23937594890594482,
0.4264332354068756,
0.045472968369722366,
-0.24282525479793549,
-0.09738333523273468,
0.09458855539560318,
-0.01965431682765484,
-0.18429212272167206,
0.14805518090724945,
-0.11434431374073029,
-0.22959090769290924,
-0.12353269010782242,
0.027558626607060432,
0.2767679691314697,
0.07542317360639572,
-0.07816226035356522,
-0.07575342804193497,
0.3595285713672638,
0.29724305868148804,
0.02252265065908432,
0.3550550937652588,
0.3122529089450836,
0.17542444169521332,
0.015292653813958168,
-0.07352714985609055,
-0.07701020687818527,
0.04155193269252777,
0.26949867606163025,
0.10968758910894394,
-0.48679032921791077,
0.013756928034126759,
-0.6071311235427856,
0.3497515320777893,
0.22790274024009705,
-0.19250090420246124,
0.2709304094314575,
-0.08902859687805176,
-0.048820942640304565,
0.17812186479568481,
0.11211761832237244,
0.3394908905029297,
0.069060318171978,
0.23687532544136047,
-0.34123459458351135,
-0.10195691138505936,
-0.06805864721536636,
-0.195966899394989,
-0.02598234824836254,
0.020149284973740578,
-0.21417661011219025,
0.26059049367904663,
0.06908150017261505,
0.7594024538993835,
0.13417911529541016,
-0.11502992361783981,
0.20639967918395996,
-0.413065642118454,
0.24218539893627167,
0.017925210297107697,
-0.09353508800268173,
-0.2523786425590515,
0.3720909357070923,
0.12868264317512512,
0.20713521540164948,
0.009991195052862167,
0.29786431789398193,
-0.34343260526657104,
-0.004815404303371906,
-0.0400262251496315,
-0.2784097492694855,
0.0839032530784607,
-0.12087748944759369,
0.10892564803361893,
-0.10040803253650665,
-0.16398508846759796,
0.17184603214263916,
-0.10694625228643417,
-0.21888147294521332,
-0.18443019688129425,
0.040491290390491486,
0.09046537429094315,
-0.2085544615983963,
-0.5217234492301941,
-0.010667864233255386,
-0.19057874381542206,
0.18389436602592468,
-0.066660575568676,
-0.007665757089853287,
0.06855960190296173,
0.4060584306716919,
0.39091068506240845,
0.17820483446121216,
0.11337454617023468,
0.10944336652755737,
0.20528464019298553,
0.05499252304434776,
0.0917007103562355,
0.0782201811671257,
0.10190922766923904,
-0.02907790057361126,
-0.4586879014968872,
0.13056881725788116,
0.005532063078135252,
0.07969287037849426,
-0.42567551136016846,
-0.049596115946769714,
0.10159773379564285,
0.17097808420658112,
0.08877982944250107,
0.43011045455932617,
-0.07207793742418289,
-0.3494766056537628,
0.22201977670192719,
-0.14481699466705322,
-0.173068568110466,
0.16214926540851593,
-0.11686456203460693,
-0.44294238090515137,
-0.11365729570388794,
0.3057798147201538,
0.358338326215744,
-0.018216285854578018,
0.40819308161735535,
0.33219215273857117,
-0.31273090839385986,
-0.3064993619918823,
-0.07260879874229431,
-0.01579689420759678,
-0.47156664729118347,
0.028007332235574722,
-0.024009941145777702,
-0.2949373424053192,
-0.05200167000293732,
0.19009718298912048,
-0.07381854206323624,
0.2684445083141327,
-0.12108787894248962,
-0.20408089458942413,
0.1322246938943863,
0.12077225744724274,
0.08209525048732758,
-0.19407889246940613,
0.08473673462867737,
-0.09952310472726822,
-0.08045803010463715,
0.04197481647133827,
-0.4129168391227722,
0.1482914537191391,
-0.257541298866272,
0.23401959240436554,
-0.1903315633535385,
-0.018933400511741638,
-0.10180826485157013,
-0.01734561286866665,
0.13333383202552795,
-0.10811962932348251,
-0.09209165722131729,
-0.27798381447792053,
-0.18958857655525208,
0.06347024440765381,
-0.055944569408893585,
0.053321726620197296,
-0.035079266875982285,
-0.10311984270811081,
-0.029604585841298103,
0.03715617582201958,
0.38168832659721375,
0.3964414596557617,
-0.019681068137288094,
0.3570668697357178,
-0.1850024312734604,
0.08539014309644699,
-0.019179513677954674,
-0.33535322546958923,
0.15685462951660156,
0.13662520051002502,
0.10771926492452621,
0.0746065154671669,
-0.020900709554553032,
-0.0652523785829544,
0.31191277503967285,
-0.0003374003281351179,
0.10062606632709503,
0.3234674632549286,
0.006342070642858744,
-0.2357952743768692,
-0.0628734678030014,
-0.004677856341004372,
0.18187859654426575,
0.18709227442741394,
-0.13211607933044434,
-0.314818799495697,
0.22292611002922058,
0.2662210464477539,
-0.4008422791957855,
-0.17845182120800018,
0.217193603515625,
-0.20914755761623383,
0.3629152774810791,
0.21487566828727722,
0.37391480803489685,
0.05156313627958298,
0.23873229324817657,
-0.19166651368141174,
0.16276641190052032,
-0.3041429817676544,
-0.00468201469630003,
0.19526399672031403,
0.17750191688537598,
0.1257224828004837,
0.033816903829574585,
-0.18441791832447052,
-0.054587267339229584,
0.1557321697473526,
0.022276021540164948,
0.38694077730178833,
0.3317566215991974,
0.16204696893692017,
0.14273136854171753,
0.10039461404085159,
0.34305042028427124,
0.14117848873138428,
-0.29283615946769714,
0.16884057223796844,
0.09045375138521194,
0.2838905453681946,
0.2243966907262802,
-0.010860508307814598,
-0.17093686759471893,
0.044187288731336594,
-0.3158801198005676,
-0.277834415435791,
-0.16672097146511078,
-0.23992231488227844,
-0.6014895439147949,
-0.09013110399246216,
-0.0886758342385292,
0.14182394742965698,
0.37143808603286743,
-0.014208393171429634,
0.04487811401486397,
-0.39107367396354675,
-0.032151468098163605,
-0.2949192523956299,
-0.01733071357011795,
-0.028518246486783028,
0.563758134841919,
0.1825989931821823,
-0.13847926259040833,
0.13464714586734772,
0.47104501724243164,
0.14218451082706451,
0.22360102832317352,
0.13458657264709473,
-0.07173405587673187,
0.02052857168018818,
-0.05839843675494194,
-0.17295636236667633,
0.21419377624988556,
0.07779193669557571,
-0.031888991594314575,
0.13956521451473236,
0.23448055982589722,
-0.2799414098262787,
0.027578629553318024,
0.5973977446556091,
0.20028582215309143,
0.22613197565078735,
-0.23273324966430664,
-0.4450519382953644,
0.18186123669147491,
-0.2303743213415146,
-0.2742537260055542,
-0.29811128973960876,
-0.1689804345369339,
0.2554071247577667,
0.018457641825079918,
0.24454350769519806,
0.083783358335495,
0.17841430008411407,
0.20161251723766327,
0.6022980809211731,
0.16691496968269348,
0.0490901917219162,
-0.015141368843615055,
-0.46797993779182434,
-0.4148651659488678,
0.36113470792770386,
0.045289769768714905,
-0.0865134745836258,
-0.2826077342033386,
0.2986784279346466,
0.5847193002700806,
0.18632669746875763,
0.2874699831008911,
-0.01229023840278387,
-0.34142130613327026,
-0.002556618768721819,
-0.5393650531768799,
-0.01368989422917366,
0.3398447632789612,
-0.015430967323482037,
-0.08061392605304718,
-0.015126291662454605,
-0.04350833222270012,
0.32523268461227417,
0.2019534856081009,
-0.06846051663160324,
-0.3552928864955902,
-0.049891430884599686,
-0.03028418868780136,
0.07778961956501007,
0.03651820495724678,
0.1882612705230713,
-0.3785336911678314,
0.10875998437404633,
0.03202485293149948,
-0.3669613003730774,
-0.07865917682647705,
0.3357186019420624,
-0.029208658263087273,
0.4276444613933563,
-0.08796084672212601,
0.08469106256961823,
0.15627042949199677,
-0.09820776432752609,
0.18269549310207367,
-0.07172092795372009,
-0.31021836400032043,
0.15317678451538086,
0.08807151019573212,
-0.12369129061698914,
-0.21935826539993286,
0.30748412013053894,
0.06435490399599075,
-0.014908057637512684,
-0.08065491914749146,
-0.3813606798648834,
0.2105053961277008,
0.006270843092352152,
-0.4065242409706116,
-0.21599902212619781,
0.07165532559156418,
0.18014907836914062,
-0.09897147864103317,
-0.3721677362918854,
0.059446290135383606,
0.23877909779548645,
0.11842126399278641,
0.037000395357608795,
0.18417881429195404,
-0.17960937321186066,
0.06547897309064865,
-0.08419843018054962,
-0.08405093103647232,
0.36322733759880066,
-0.19280096888542175,
0.005123606882989407,
-0.3210855722427368
] |
https://github.com/huggingface/datasets/issues/2190
|
News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs
|
Hello @albertvillanova,
Thanks for the suggestion. I didn't know you could do that. however, it didn't resolve the issue

|
I used load_dataset to load the news_commentary dataset for "ar-en" translation pairs but found translations from Arabic to Hindi.
```
train_ds = load_dataset("news_commentary", "ar-en", split='train[:98%]')
val_ds = load_dataset("news_commentary", "ar-en", split='train[98%:]')
# filtering out examples that are not ar-en translations but ar-hi
val_ds = val_ds.filter(lambda example, indice: indice not in chain(range(1312,1327) ,range(1384,1399), range(1030,1042)), with_indices=True)
```
* I'm fairly new to using datasets so I might be doing something wrong
| 20 |
News_commentary Dataset Translation Pairs are of Incorrect Language Specified Pairs
|
[
-0.13581499457359314,
0.24351142346858978,
-0.24798603355884552,
0.2603115141391754,
-0.05960937216877937,
0.011690008454024792,
0.2828880250453949,
0.17603597044944763,
-0.30779561400413513,
-0.040189873427152634,
-0.216168612241745,
0.1984269917011261,
0.15970931947231293,
0.10663074254989624,
-0.1379166543483734,
-0.14241977035999298,
0.05008993297815323,
0.032243821769952774,
-0.17117099463939667,
-0.3010956943035126,
-0.16731035709381104,
0.5094773173332214,
-0.14763619005680084,
0.10513295233249664,
-0.21690887212753296,
0.008757153525948524,
0.28766900300979614,
0.0788591131567955,
-0.02629796788096428,
-0.12543116509914398,
-0.18362148106098175,
0.21985089778900146,
-0.14650729298591614,
0.10447520017623901,
-0.00010344062320655212,
-0.05329485982656479,
0.019672533497214317,
-0.09969905018806458,
-0.1777571737766266,
-0.086690254509449,
-0.061072543263435364,
-0.22140508890151978,
-0.2205224186182022,
-0.1492837518453598,
-0.11446894705295563,
-0.5478355288505554,
-0.06862562149763107,
-0.43147531151771545,
0.21539776027202606,
0.4467571973800659,
0.2802421450614929,
0.3123193085193634,
-0.0732135996222496,
-0.14722386002540588,
0.11782664805650711,
-0.23099581897258759,
0.059804871678352356,
0.14550386369228363,
0.14797504246234894,
0.1432696282863617,
-0.2589249014854431,
0.4573119878768921,
-0.008683059364557266,
-0.062494564801454544,
-0.4636600613594055,
-0.048775430768728256,
0.0798405259847641,
-0.07529087364673615,
0.32813161611557007,
0.19231420755386353,
0.3640657961368561,
-0.019032606855034828,
-0.04178735613822937,
0.0628337562084198,
-0.10401424765586853,
0.23589688539505005,
0.0116313137114048,
0.10472024232149124,
-0.12479272484779358,
0.2920606732368469,
0.08969283849000931,
-0.015799226239323616,
0.0808979794383049,
0.05164719372987747,
0.03565338999032974,
0.24602052569389343,
0.05382722243666649,
0.12516680359840393,
-0.1935918629169464,
-0.27574068307876587,
0.07145984470844269,
0.061621952801942825,
-0.10903947800397873,
0.090850830078125,
-0.09860478341579437,
0.06653431057929993,
0.28772175312042236,
-0.15467606484889984,
-0.14454495906829834,
-0.30303138494491577,
-0.38605770468711853,
0.3006230592727661,
-0.12559618055820465,
0.06848209351301193,
0.04152834787964821,
-0.2261614352464676,
0.23515687882900238,
0.126153364777565,
0.2154085636138916,
-0.16213902831077576,
-0.009618518874049187,
0.3125589191913605,
-0.04281185194849968,
-0.2748361825942993,
-0.3666327893733978,
-0.08243058621883392,
-0.05665293708443642,
-0.022203324362635612,
-0.2901843786239624,
0.48925071954727173,
-0.13048788905143738,
-0.07882869243621826,
-0.1366102248430252,
0.27015790343284607,
0.1855453997850418,
0.10806172341108322,
0.10440826416015625,
0.1535358726978302,
-0.1599680334329605,
-0.2551526129245758,
-0.31370267271995544,
0.10566984862089157,
-0.10499198734760284,
-0.13566559553146362,
0.028666626662015915,
0.33656954765319824,
0.28396356105804443,
0.04657232016324997,
0.28713101148605347,
-0.16954860091209412,
-0.37055474519729614,
-0.137939915060997,
0.1211976408958435,
-0.21428076922893524,
0.10091433674097061,
0.25357821583747864,
0.1000160425901413,
-0.2496211677789688,
0.05307048186659813,
0.1406814604997635,
-0.195816308259964,
0.2248598337173462,
-0.32934433221817017,
0.24643374979496002,
-0.12411656975746155,
-0.0018703200621530414,
0.3178682029247284,
0.5792199373245239,
0.30703940987586975,
-0.1247999370098114,
-0.03827417269349098,
-0.03276897966861725,
-0.192074254155159,
0.05925784260034561,
-0.06786768138408661,
0.18677324056625366,
-0.7347331643104553,
-0.09019488841295242,
0.44537732005119324,
-0.03259642422199249,
0.3735804855823517,
0.45205479860305786,
-0.15033112466335297,
0.10343839228153229,
-0.15704235434532166,
0.09046769142150879,
0.2030908763408661,
0.19079431891441345,
-0.21628394722938538,
-0.19705675542354584,
-0.08300246298313141,
-0.05383547395467758,
0.2201349139213562,
0.1509612649679184,
0.26670393347740173,
-0.014314930886030197,
0.22389216721057892,
0.13624653220176697,
0.22913481295108795,
0.20457087457180023,
-0.3356378972530365,
-0.14538677036762238,
0.4903970956802368,
0.08449987322092056,
0.15801307559013367,
-0.1614568531513214,
0.07827864587306976,
0.24530981481075287,
0.417656272649765,
-0.10589462518692017,
0.0923834815621376,
0.19797511398792267,
-0.07729068398475647,
-0.03900551050901413,
0.2543533742427826,
0.06811649352312088,
-0.19435229897499084,
-0.03715183958411217,
0.08129054307937622,
0.4828231930732727,
0.03652355819940567,
0.07866546511650085,
-0.5520574450492859,
-0.16996338963508606,
0.011157871223986149,
0.08293095976114273,
0.35038426518440247,
0.20961546897888184,
-0.21765735745429993,
0.41276031732559204,
0.09313157200813293,
0.3144330084323883,
-0.45346012711524963,
-0.1449698954820633,
-0.14985841512680054,
0.40659576654434204,
-0.10336903482675552,
-0.32540905475616455,
0.05814431235194206,
0.19379284977912903,
0.14905770123004913,
0.08469017595052719,
-0.19199326634407043,
0.17791321873664856,
0.19544650614261627,
0.3753303289413452,
-0.13554434478282928,
-0.21217495203018188,
0.052975669503211975,
-0.5057902932167053,
0.02050858736038208,
0.20341511070728302,
0.10886295884847641,
-0.028987227007746696,
0.05527203530073166,
0.3379948139190674,
-0.07926104217767715,
-0.06669910252094269,
-0.006731217727065086,
-0.07865972816944122,
0.5075298547744751,
0.18618156015872955,
0.0387059710919857,
-0.49204644560813904,
0.12416469305753708,
0.1791936606168747,
0.17550520598888397,
0.3880714476108551,
-0.08336695283651352,
0.15805956721305847,
0.7951170206069946,
0.2374020367860794,
0.136924147605896,
0.04904809221625328,
0.024529321119189262,
-0.21401716768741608,
-0.10900438576936722,
0.1085360124707222,
0.026895808055996895,
0.14481712877750397,
0.2590448260307312,
0.00005258219243842177,
-0.06537505239248276,
-0.3295459747314453,
0.11029315739870071,
-0.158298522233963,
0.08997353166341782,
0.1798330396413803,
0.1758294552564621,
-0.4030807316303253,
-0.41916143894195557,
0.3675306439399719,
0.22986000776290894,
0.18642184138298035,
-0.22276055812835693,
-0.22077491879463196,
-0.3368268609046936,
-0.41020387411117554,
-0.3497435450553894,
-0.08596137911081314,
0.05062713474035263,
-0.29319140315055847,
0.33917468786239624,
-0.294505774974823,
-0.13352911174297333,
0.25356268882751465,
0.30922943353652954,
-0.021080175414681435,
-0.029230188578367233,
0.2267279177904129,
0.022927718237042427,
-0.4265439212322235,
-0.1648595929145813,
0.2013287991285324,
-0.16689638793468475,
0.002525836694985628,
-0.008431937545537949,
-0.34035980701446533,
-0.4807702600955963,
-0.34836432337760925,
-0.4140273630619049,
0.15408748388290405,
-0.09003755450248718,
0.15950044989585876,
0.10729894787073135,
0.17248068749904633,
-0.004804346244782209,
-0.32921281456947327,
0.14985790848731995,
0.18512015044689178,
-0.05402956157922745,
0.14336669445037842,
-0.2186664193868637,
-0.22045302391052246,
-0.17484799027442932,
-0.6822782754898071,
-0.2535663843154907,
-0.21473707258701324,
-0.08202894032001495,
-0.32898950576782227,
0.1711864471435547,
-0.3882075250148773,
-0.002021737862378359,
-0.22232018411159515,
-0.11894655972719193,
-0.004130937624722719,
-0.5210620164871216,
-0.04413815960288048,
0.2399493157863617,
-0.17293502390384674,
-0.2679717540740967,
-0.22725625336170197,
0.21516382694244385,
0.28611549735069275,
-0.15881752967834473,
-0.0669492706656456,
0.14164485037326813,
-0.21785371005535126,
0.43379226326942444,
0.097848080098629,
0.06672708690166473,
0.06192496418952942,
-0.06520827114582062,
-0.08977502584457397,
-0.3740347623825073,
-0.1890539824962616,
0.21460503339767456,
0.042451564222574234,
0.07383444160223007,
-0.03281325101852417,
0.15071700513362885,
0.10733871161937714,
0.302937775850296,
0.31186801195144653,
-0.2755974233150482,
0.23583103716373444,
-0.1652766317129135,
0.2873806953430176,
-0.07610709220170975,
-0.005392122082412243,
0.19272471964359283,
0.20328624546527863,
-0.0037643881514668465,
0.37305551767349243,
-0.2526540756225586,
-0.5450705289840698,
0.09339796751737595,
0.21063098311424255,
-0.445022851228714,
-0.14177562296390533,
0.04099743440747261,
-0.030548110604286194,
0.1914699226617813,
0.29096952080726624,
0.0046797203831374645,
0.0020946040749549866,
-0.11967067420482635,
0.046999529004096985,
-0.16522321105003357,
-0.23490023612976074,
0.1001129001379013,
-0.21747711300849915,
-0.0784897431731224,
-0.19615139067173004,
-0.039254285395145416,
0.17409281432628632,
0.4285537898540497,
-0.1863924115896225,
0.0018122229957953095,
0.04724811762571335,
0.01957913674414158,
0.07171833515167236,
-0.3268807530403137,
-0.016285555437207222,
0.22771470248699188,
0.5268371105194092,
-0.1569850742816925,
-0.04739779606461525,
-0.4079277813434601,
0.23937594890594482,
0.4264332354068756,
0.045472968369722366,
-0.24282525479793549,
-0.09738333523273468,
0.09458855539560318,
-0.01965431682765484,
-0.18429212272167206,
0.14805518090724945,
-0.11434431374073029,
-0.22959090769290924,
-0.12353269010782242,
0.027558626607060432,
0.2767679691314697,
0.07542317360639572,
-0.07816226035356522,
-0.07575342804193497,
0.3595285713672638,
0.29724305868148804,
0.02252265065908432,
0.3550550937652588,
0.3122529089450836,
0.17542444169521332,
0.015292653813958168,
-0.07352714985609055,
-0.07701020687818527,
0.04155193269252777,
0.26949867606163025,
0.10968758910894394,
-0.48679032921791077,
0.013756928034126759,
-0.6071311235427856,
0.3497515320777893,
0.22790274024009705,
-0.19250090420246124,
0.2709304094314575,
-0.08902859687805176,
-0.048820942640304565,
0.17812186479568481,
0.11211761832237244,
0.3394908905029297,
0.069060318171978,
0.23687532544136047,
-0.34123459458351135,
-0.10195691138505936,
-0.06805864721536636,
-0.195966899394989,
-0.02598234824836254,
0.020149284973740578,
-0.21417661011219025,
0.26059049367904663,
0.06908150017261505,
0.7594024538993835,
0.13417911529541016,
-0.11502992361783981,
0.20639967918395996,
-0.413065642118454,
0.24218539893627167,
0.017925210297107697,
-0.09353508800268173,
-0.2523786425590515,
0.3720909357070923,
0.12868264317512512,
0.20713521540164948,
0.009991195052862167,
0.29786431789398193,
-0.34343260526657104,
-0.004815404303371906,
-0.0400262251496315,
-0.2784097492694855,
0.0839032530784607,
-0.12087748944759369,
0.10892564803361893,
-0.10040803253650665,
-0.16398508846759796,
0.17184603214263916,
-0.10694625228643417,
-0.21888147294521332,
-0.18443019688129425,
0.040491290390491486,
0.09046537429094315,
-0.2085544615983963,
-0.5217234492301941,
-0.010667864233255386,
-0.19057874381542206,
0.18389436602592468,
-0.066660575568676,
-0.007665757089853287,
0.06855960190296173,
0.4060584306716919,
0.39091068506240845,
0.17820483446121216,
0.11337454617023468,
0.10944336652755737,
0.20528464019298553,
0.05499252304434776,
0.0917007103562355,
0.0782201811671257,
0.10190922766923904,
-0.02907790057361126,
-0.4586879014968872,
0.13056881725788116,
0.005532063078135252,
0.07969287037849426,
-0.42567551136016846,
-0.049596115946769714,
0.10159773379564285,
0.17097808420658112,
0.08877982944250107,
0.43011045455932617,
-0.07207793742418289,
-0.3494766056537628,
0.22201977670192719,
-0.14481699466705322,
-0.173068568110466,
0.16214926540851593,
-0.11686456203460693,
-0.44294238090515137,
-0.11365729570388794,
0.3057798147201538,
0.358338326215744,
-0.018216285854578018,
0.40819308161735535,
0.33219215273857117,
-0.31273090839385986,
-0.3064993619918823,
-0.07260879874229431,
-0.01579689420759678,
-0.47156664729118347,
0.028007332235574722,
-0.024009941145777702,
-0.2949373424053192,
-0.05200167000293732,
0.19009718298912048,
-0.07381854206323624,
0.2684445083141327,
-0.12108787894248962,
-0.20408089458942413,
0.1322246938943863,
0.12077225744724274,
0.08209525048732758,
-0.19407889246940613,
0.08473673462867737,
-0.09952310472726822,
-0.08045803010463715,
0.04197481647133827,
-0.4129168391227722,
0.1482914537191391,
-0.257541298866272,
0.23401959240436554,
-0.1903315633535385,
-0.018933400511741638,
-0.10180826485157013,
-0.01734561286866665,
0.13333383202552795,
-0.10811962932348251,
-0.09209165722131729,
-0.27798381447792053,
-0.18958857655525208,
0.06347024440765381,
-0.055944569408893585,
0.053321726620197296,
-0.035079266875982285,
-0.10311984270811081,
-0.029604585841298103,
0.03715617582201958,
0.38168832659721375,
0.3964414596557617,
-0.019681068137288094,
0.3570668697357178,
-0.1850024312734604,
0.08539014309644699,
-0.019179513677954674,
-0.33535322546958923,
0.15685462951660156,
0.13662520051002502,
0.10771926492452621,
0.0746065154671669,
-0.020900709554553032,
-0.0652523785829544,
0.31191277503967285,
-0.0003374003281351179,
0.10062606632709503,
0.3234674632549286,
0.006342070642858744,
-0.2357952743768692,
-0.0628734678030014,
-0.004677856341004372,
0.18187859654426575,
0.18709227442741394,
-0.13211607933044434,
-0.314818799495697,
0.22292611002922058,
0.2662210464477539,
-0.4008422791957855,
-0.17845182120800018,
0.217193603515625,
-0.20914755761623383,
0.3629152774810791,
0.21487566828727722,
0.37391480803489685,
0.05156313627958298,
0.23873229324817657,
-0.19166651368141174,
0.16276641190052032,
-0.3041429817676544,
-0.00468201469630003,
0.19526399672031403,
0.17750191688537598,
0.1257224828004837,
0.033816903829574585,
-0.18441791832447052,
-0.054587267339229584,
0.1557321697473526,
0.022276021540164948,
0.38694077730178833,
0.3317566215991974,
0.16204696893692017,
0.14273136854171753,
0.10039461404085159,
0.34305042028427124,
0.14117848873138428,
-0.29283615946769714,
0.16884057223796844,
0.09045375138521194,
0.2838905453681946,
0.2243966907262802,
-0.010860508307814598,
-0.17093686759471893,
0.044187288731336594,
-0.3158801198005676,
-0.277834415435791,
-0.16672097146511078,
-0.23992231488227844,
-0.6014895439147949,
-0.09013110399246216,
-0.0886758342385292,
0.14182394742965698,
0.37143808603286743,
-0.014208393171429634,
0.04487811401486397,
-0.39107367396354675,
-0.032151468098163605,
-0.2949192523956299,
-0.01733071357011795,
-0.028518246486783028,
0.563758134841919,
0.1825989931821823,
-0.13847926259040833,
0.13464714586734772,
0.47104501724243164,
0.14218451082706451,
0.22360102832317352,
0.13458657264709473,
-0.07173405587673187,
0.02052857168018818,
-0.05839843675494194,
-0.17295636236667633,
0.21419377624988556,
0.07779193669557571,
-0.031888991594314575,
0.13956521451473236,
0.23448055982589722,
-0.2799414098262787,
0.027578629553318024,
0.5973977446556091,
0.20028582215309143,
0.22613197565078735,
-0.23273324966430664,
-0.4450519382953644,
0.18186123669147491,
-0.2303743213415146,
-0.2742537260055542,
-0.29811128973960876,
-0.1689804345369339,
0.2554071247577667,
0.018457641825079918,
0.24454350769519806,
0.083783358335495,
0.17841430008411407,
0.20161251723766327,
0.6022980809211731,
0.16691496968269348,
0.0490901917219162,
-0.015141368843615055,
-0.46797993779182434,
-0.4148651659488678,
0.36113470792770386,
0.045289769768714905,
-0.0865134745836258,
-0.2826077342033386,
0.2986784279346466,
0.5847193002700806,
0.18632669746875763,
0.2874699831008911,
-0.01229023840278387,
-0.34142130613327026,
-0.002556618768721819,
-0.5393650531768799,
-0.01368989422917366,
0.3398447632789612,
-0.015430967323482037,
-0.08061392605304718,
-0.015126291662454605,
-0.04350833222270012,
0.32523268461227417,
0.2019534856081009,
-0.06846051663160324,
-0.3552928864955902,
-0.049891430884599686,
-0.03028418868780136,
0.07778961956501007,
0.03651820495724678,
0.1882612705230713,
-0.3785336911678314,
0.10875998437404633,
0.03202485293149948,
-0.3669613003730774,
-0.07865917682647705,
0.3357186019420624,
-0.029208658263087273,
0.4276444613933563,
-0.08796084672212601,
0.08469106256961823,
0.15627042949199677,
-0.09820776432752609,
0.18269549310207367,
-0.07172092795372009,
-0.31021836400032043,
0.15317678451538086,
0.08807151019573212,
-0.12369129061698914,
-0.21935826539993286,
0.30748412013053894,
0.06435490399599075,
-0.014908057637512684,
-0.08065491914749146,
-0.3813606798648834,
0.2105053961277008,
0.006270843092352152,
-0.4065242409706116,
-0.21599902212619781,
0.07165532559156418,
0.18014907836914062,
-0.09897147864103317,
-0.3721677362918854,
0.059446290135383606,
0.23877909779548645,
0.11842126399278641,
0.037000395357608795,
0.18417881429195404,
-0.17960937321186066,
0.06547897309064865,
-0.08419843018054962,
-0.08405093103647232,
0.36322733759880066,
-0.19280096888542175,
0.005123606882989407,
-0.3210855722427368
] |
https://github.com/huggingface/datasets/issues/2189
|
save_to_disk doesn't work when we use concatenate_datasets function before creating the final dataset_object.
|
Hi ! We refactored save_to_disk in #2025 so this doesn't happen.
Feel free to try it on master for now
We'll do a new release soon
|
As you can see, it saves the entire dataset.
@lhoestq
You can check by going through the following example,
```
from datasets import load_from_disk,concatenate_datasets
loaded_data=load_from_disk('/home/gsir059/HNSW-ori/my_knowledge_dataset')
n=20
kb_list=[loaded_data.shard(n, i, contiguous=True) for i in range(n)]
final_dataset=concatenate_datasets([kb_list[1],kb_list[2]])
final_dataset.save_to_disk('/home/gsir059/haha/k.arrow')
```
| 26 |
save_to_disk doesn't work when we use concatenate_datasets function before creating the final dataset_object.
|
[
-0.4631026089191437,
-0.07110439240932465,
-0.137419655919075,
0.1536790430545807,
0.26589271426200867,
0.16042329370975494,
0.1779123693704605,
0.15857990086078644,
-0.28372907638549805,
0.21806111931800842,
-0.1547621488571167,
0.23617669939994812,
-0.04027179628610611,
0.19619975984096527,
-0.0922706350684166,
0.19384078681468964,
0.3526194393634796,
0.31885868310928345,
-0.3547602891921997,
-0.04050581902265549,
-0.29556140303611755,
0.28627443313598633,
-0.06151476874947548,
-0.32636597752571106,
-0.1596662998199463,
0.05144297704100609,
-0.2929459810256958,
0.2611532509326935,
-0.07399594783782959,
0.030687758699059486,
-0.0529913567006588,
0.17137610912322998,
0.009925522841513157,
0.10276459902524948,
-0.0001000892007141374,
0.003527929075062275,
-0.05934600532054901,
-0.15847836434841156,
-0.3884347379207611,
0.1333935409784317,
-0.277843177318573,
-0.15318091213703156,
-0.2251039445400238,
-0.21581602096557617,
0.05760079622268677,
-0.08950413018465042,
0.08866386860609055,
-0.41657912731170654,
0.1850503385066986,
0.12666451930999756,
0.3294285237789154,
0.130793496966362,
0.1399356573820114,
-0.17950457334518433,
-0.09558823704719543,
0.07130344212055206,
-0.11643406748771667,
-0.03593945875763893,
-0.3966365158557892,
0.06973909586668015,
0.22303171455860138,
0.1409420520067215,
0.1131415069103241,
-0.23422294855117798,
-0.038287997245788574,
0.21390753984451294,
0.042126405984163284,
-0.17054259777069092,
0.10653449594974518,
-0.10681302100419998,
0.3794379234313965,
-0.49859434366226196,
-0.17978666722774506,
0.08044712245464325,
-0.0713372454047203,
-0.1760709136724472,
0.002269994467496872,
0.1394324153661728,
0.10827770084142685,
0.1671072393655777,
-0.17620566487312317,
-0.19088204205036163,
-0.1704283207654953,
0.03210543468594551,
0.10588284581899643,
-0.07824389636516571,
-0.2488849014043808,
0.16406764090061188,
0.1965520977973938,
-0.09531077742576599,
0.23652398586273193,
-0.5135634541511536,
-0.08845727145671844,
-0.1803504079580307,
-0.14998844265937805,
-0.1789935678243637,
-0.1091877743601799,
-0.015166101977229118,
0.2551019489765167,
0.09110495448112488,
0.05724789574742317,
0.010354839265346527,
0.2578449845314026,
0.16776128113269806,
0.1695779711008072,
-0.0030983767937868834,
0.21112018823623657,
0.05425792187452316,
0.09897370636463165,
-0.2414046823978424,
-0.07317114621400833,
-0.03427175059914589,
0.09116139262914658,
-0.05986825004220009,
0.309468150138855,
-0.19501177966594696,
0.14401115477085114,
0.015926379710435867,
-0.14896373450756073,
0.10609926283359528,
0.21916423738002777,
0.05942854657769203,
-0.13935552537441254,
0.32911503314971924,
0.052227746695280075,
0.09030184894800186,
-0.06979458034038544,
0.2660612165927887,
0.11162910610437393,
0.16071589291095734,
-0.36125800013542175,
-0.06586439907550812,
0.09526369720697403,
0.10162843018770218,
0.03319726139307022,
-0.083267942070961,
0.1945294439792633,
0.03718249127268791,
0.13689719140529633,
0.027416987344622612,
0.17763172090053558,
-0.3467896282672882,
0.3866633176803589,
0.13256137073040009,
0.29507526755332947,
-0.08128859102725983,
-0.077407605946064,
-0.15932968258857727,
-0.07728104293346405,
0.20395630598068237,
0.08134942501783371,
-0.1738671362400055,
-0.3058266043663025,
0.3521495461463928,
0.11421716958284378,
0.11765950918197632,
-0.12748126685619354,
0.15198341012001038,
0.2876717448234558,
-0.07825606316328049,
-0.1617400050163269,
-0.11191796511411667,
-0.012678410857915878,
-0.3915227949619293,
0.18713636696338654,
0.16001364588737488,
-0.17863957583904266,
0.20456600189208984,
0.01669309474527836,
-0.3170478343963623,
0.11838215589523315,
-0.00679660914465785,
0.030476927757263184,
0.10972701013088226,
-0.4628024399280548,
0.28217726945877075,
0.35521769523620605,
-0.06776919960975647,
-0.18361584842205048,
0.06321226805448532,
-0.012083726935088634,
-0.0591936819255352,
0.1253879815340042,
0.21034802496433258,
0.04014826565980911,
-0.059123482555150986,
0.17240425944328308,
0.18058262765407562,
0.012546364217996597,
0.016542408615350723,
-0.25780022144317627,
0.08481567353010178,
0.05970174819231033,
-0.1778729259967804,
-0.2526479661464691,
0.2983635365962982,
0.2287638634443283,
0.03518633171916008,
0.24323274195194244,
-0.21254251897335052,
0.20589277148246765,
0.2673109471797943,
0.21233253180980682,
-0.37742719054222107,
-0.21709884703159332,
0.11883796751499176,
-0.5812885165214539,
-0.014161105267703533,
0.23496152460575104,
-0.23038968443870544,
0.05824028700590134,
-0.1316264569759369,
-0.1389825940132141,
0.09123927354812622,
-0.13313078880310059,
0.19429855048656464,
0.28997093439102173,
0.3315042555332184,
0.1376381665468216,
-0.0026098242960870266,
-0.06771760433912277,
0.36766695976257324,
-0.10467631369829178,
-0.03735272213816643,
-0.1973676234483719,
0.12980686128139496,
-0.22442348301410675,
-0.2754281163215637,
-0.03715582191944122,
-0.003174968995153904,
0.014056810177862644,
-0.10136067867279053,
0.05738154053688049,
0.5803455114364624,
-0.1585748940706253,
-0.03752852976322174,
0.10239625722169876,
-0.09142406284809113,
-0.08730357140302658,
0.005505358800292015,
-0.07073681801557541,
-0.1592336744070053,
0.19318562746047974,
0.043882351368665695,
-0.32368025183677673,
0.2961103320121765,
0.1826637238264084,
-0.06410843878984451,
0.3347102701663971,
-0.12814339995384216,
0.22528983652591705,
0.026138275861740112,
0.06009463220834732,
-0.39852192997932434,
-0.21252559125423431,
0.2530671954154968,
0.12997794151306152,
0.024797504767775536,
-0.4187757968902588,
0.32294026017189026,
0.6829226016998291,
0.06281405687332153,
0.2867559790611267,
0.03005211427807808,
-0.1920134574174881,
-0.2379903346300125,
0.11219481378793716,
0.247916117310524,
0.6369041800498962,
0.26295924186706543,
0.15688921511173248,
-0.046680010855197906,
-0.20061811804771423,
-0.10313586890697479,
0.2938787043094635,
-0.09056385606527328,
0.09046965837478638,
0.3593466281890869,
0.13719063997268677,
-0.2553381025791168,
-0.42879727482795715,
0.08768527209758759,
0.024963822215795517,
-0.017833953723311424,
-0.19605425000190735,
-0.10296440869569778,
-0.10337483882904053,
-0.12027418613433838,
-0.06666196882724762,
0.067780040204525,
-0.09763811528682709,
-0.35790127515792847,
-0.0037054691929370165,
0.4837726354598999,
-0.15534503757953644,
0.1394006758928299,
0.13537199795246124,
0.20807141065597534,
0.15916399657726288,
-0.03767900913953781,
-0.09684202075004578,
0.29250839352607727,
-0.0830056220293045,
0.221627876162529,
-0.1254688948392868,
-0.09714184701442719,
0.313669353723526,
-0.13924086093902588,
0.22454194724559784,
-0.4201144576072693,
0.005152235738933086,
0.11074843257665634,
0.0010846309596672654,
0.046168334782123566,
0.03277362510561943,
0.11836142092943192,
-0.08101087063550949,
-0.26733291149139404,
0.09614867717027664,
0.08702418208122253,
-0.24498094618320465,
0.15966184437274933,
0.12716612219810486,
-0.26835307478904724,
-0.25791075825691223,
-0.3153648376464844,
-0.05102892220020294,
-0.27496007084846497,
0.189788356423378,
-0.009009430184960365,
0.10650873184204102,
0.05917513743042946,
0.31976625323295593,
0.013684463687241077,
-0.0067300391383469105,
-0.09832077473402023,
-0.42480534315109253,
-0.34897708892822266,
0.44671136140823364,
-0.3086307942867279,
-0.36060869693756104,
0.0425388477742672,
0.025302400812506676,
0.037842296063899994,
0.08728525787591934,
-0.24833989143371582,
-0.17061491310596466,
0.050224099308252335,
0.08472564816474915,
-0.16631151735782623,
0.24480774998664856,
0.27676597237586975,
0.13370218873023987,
-0.21128185093402863,
-0.20133443176746368,
-0.08779211342334747,
0.3305783271789551,
0.11003807932138443,
0.3480774164199829,
-0.3317871689796448,
0.18872535228729248,
0.0712694525718689,
-0.015155663713812828,
0.15019264817237854,
-0.03576476871967316,
0.33229774236679077,
0.031146792694926262,
0.6275281310081482,
-0.2892346680164337,
-0.19768206775188446,
-0.06753184646368027,
-0.04060909524559975,
0.1750827431678772,
0.08446303009986877,
-0.046930957585573196,
0.043381642550230026,
0.13072507083415985,
0.19594350457191467,
-0.08421500027179718,
-0.10058862715959549,
-0.11402329057455063,
0.11379313468933105,
0.11579263210296631,
0.0693855956196785,
-0.07777354121208191,
0.05121324211359024,
0.2595980763435364,
-0.21226182579994202,
0.17764192819595337,
0.08184947073459625,
-0.12765975296497345,
-0.4669889509677887,
0.020274819806218147,
-0.46761855483055115,
0.2532391846179962,
0.03586086258292198,
0.23738063871860504,
0.07347846031188965,
-0.22574013471603394,
-0.24690726399421692,
-0.16365502774715424,
0.5859971046447754,
-0.1980874389410019,
-0.20987223088741302,
0.36002475023269653,
0.07286639511585236,
-0.23553213477134705,
0.1387505680322647,
-0.010483249090611935,
0.08815965056419373,
-0.02274569310247898,
0.535848081111908,
-0.20989997684955597,
-0.04072870314121246,
0.07407931983470917,
0.29831042885780334,
-0.16062967479228973,
0.012081699445843697,
-0.22518861293792725,
-0.22359216213226318,
-0.39671120047569275,
-0.1295243352651596,
-0.0572345107793808,
0.2814261019229889,
-0.14092786610126495,
-0.2484566569328308,
-0.20171277225017548,
-0.559361457824707,
0.04507405683398247,
-0.12925967574119568,
0.4345508813858032,
0.053933173418045044,
0.30320584774017334,
-0.17973601818084717,
0.26222744584083557,
0.36430779099464417,
0.2280297875404358,
-0.17147593200206757,
-0.12542203068733215,
0.25303444266319275,
-0.1760215014219284,
0.3969142735004425,
0.03986183926463127,
-0.24710968136787415,
-0.02406604401767254,
-0.24297745525836945,
0.11838904023170471,
-0.011223707348108292,
0.2019658386707306,
0.15087103843688965,
-0.1273277997970581,
-0.38195860385894775,
0.005289062857627869,
0.1517314612865448,
-0.06353817135095596,
0.12983335554599762,
-0.06877810508012772,
-0.1422426998615265,
-0.42888909578323364,
0.12024496495723724,
-0.2009015679359436,
0.6928682327270508,
0.16737818717956543,
0.34687650203704834,
0.009580525569617748,
-0.3132627308368683,
0.12606827914714813,
-0.03997112065553665,
0.0765141174197197,
-0.33407366275787354,
-0.10331667959690094,
0.10693875700235367,
-0.12398412078619003,
0.16859665513038635,
0.15430299937725067,
-0.45109355449676514,
0.07359299063682556,
-0.1856444627046585,
0.08503596484661102,
-0.16939857602119446,
0.20365546643733978,
-0.11520650237798691,
-0.32705554366111755,
-0.012172643095254898,
0.3261153995990753,
0.3274405002593994,
-0.31979748606681824,
-0.056123293936252594,
-0.09717152267694473,
-0.006979999598115683,
-0.06981097161769867,
0.21087665855884552,
0.22125500440597534,
-0.18916553258895874,
0.38472479581832886,
-0.3207431137561798,
-0.3571130931377411,
-0.4076649844646454,
0.15583236515522003,
0.364864319562912,
0.17119969427585602,
-0.019064029678702354,
-0.2407449632883072,
-0.03558836877346039,
0.040249064564704895,
-0.2549437880516052,
-0.24834932386875153,
0.22294625639915466,
-0.003190824296325445,
0.15061405301094055,
-0.1422071009874344,
0.008053301833570004,
-0.24447613954544067,
-0.013812072575092316,
-0.12196192890405655,
-0.0620773546397686,
-0.3257148265838623,
-0.14268247783184052,
0.23322755098342896,
-0.17648059129714966,
-0.3401668667793274,
0.25487640500068665,
0.04384567588567734,
-0.11581552028656006,
0.28305864334106445,
-0.2439711093902588,
-0.010445969179272652,
-0.23823148012161255,
0.38107091188430786,
0.2160671204328537,
0.22039984166622162,
0.19088944792747498,
-0.27950531244277954,
-0.07305733114480972,
-0.34629401564598083,
0.18901027739048004,
-0.008208831772208214,
-0.1373234987258911,
0.45748499035835266,
-0.044372137635946274,
-0.090163454413414,
-0.13600948452949524,
0.2351776361465454,
-0.10584858059883118,
0.0969315692782402,
0.023915771394968033,
-0.07225419580936432,
-0.4477580189704895,
-0.16320191323757172,
0.19947592914104462,
0.39191704988479614,
0.17997539043426514,
0.18380476534366608,
-0.08779782801866531,
0.083030566573143,
-0.4921627938747406,
-0.1765442043542862,
-0.23303578794002533,
-0.0056719533167779446,
0.03813960403203964,
-0.04003560543060303,
0.11662895977497101,
-0.12448195368051529,
0.34077030420303345,
0.1975908726453781,
-0.08503701537847519,
-0.41100624203681946,
0.0029199293348938227,
0.0192145686596632,
0.10217989236116409,
0.027528127655386925,
-0.10309388488531113,
-0.1726805865764618,
-0.2564812898635864,
-0.18685652315616608,
-0.07960633188486099,
0.009317032992839813,
-0.10769885033369064,
-0.07970118522644043,
0.004958382807672024,
0.14586971700191498,
0.25062456727027893,
-0.20987288653850555,
0.13340464234352112,
0.12282523512840271,
-0.21294839680194855,
0.04369043931365013,
-0.3805607855319977,
-0.20515458285808563,
-0.04918305203318596,
-0.029504336416721344,
0.08729325979948044,
0.13305698335170746,
0.11833074688911438,
-0.07914146780967712,
-0.41897472739219666,
-0.06055156886577606,
0.38986140489578247,
0.1355418860912323,
-0.21968699991703033,
-0.14689557254314423,
0.11655460298061371,
0.3024173676967621,
-0.21331197023391724,
-0.3498871624469757,
0.028739284723997116,
-0.3176054060459137,
0.022326907142996788,
0.1022939532995224,
0.15870340168476105,
0.08096687495708466,
-0.04329829663038254,
0.09276478737592697,
0.13812214136123657,
-0.09776593744754791,
0.05736347660422325,
0.198819100856781,
0.11206184327602386,
0.4969257116317749,
0.14972823858261108,
0.35111144185066223,
0.15266625583171844,
0.4506184756755829,
-0.10571113973855972,
0.39752423763275146,
0.33794528245925903,
-0.03748815506696701,
0.053729817271232605,
-0.15517136454582214,
0.34968921542167664,
0.04361972585320473,
-0.13094452023506165,
0.27714940905570984,
0.052721571177244186,
-0.27379730343818665,
-0.3461877405643463,
-0.20907732844352722,
-0.19219018518924713,
0.27377423644065857,
-0.2541717290878296,
-0.19389377534389496,
0.184518963098526,
-0.051734812557697296,
0.11653049290180206,
-0.03279317915439606,
-0.010217883624136448,
-0.21873213350772858,
0.20597387850284576,
-0.27605360746383667,
0.2314397543668747,
0.11604424566030502,
0.22412395477294922,
0.10205692797899246,
-0.11235111206769943,
-0.11196886003017426,
0.08944867551326752,
0.16496331989765167,
0.07402084022760391,
-0.11279015243053436,
0.2721942365169525,
0.2982464134693146,
0.19018039107322693,
0.2864256203174591,
0.18020537495613098,
0.17420412600040436,
-0.14009088277816772,
-0.051635514944791794,
0.03264398127794266,
0.13064813613891602,
-0.11838676035404205,
0.39534589648246765,
0.27992740273475647,
-0.28645557165145874,
0.13326860964298248,
0.3562665581703186,
-0.037426043301820755,
-0.17289559543132782,
-0.03067377209663391,
0.02916605956852436,
-0.3724873960018158,
-0.007088847458362579,
0.02907763607800007,
-0.2512739300727844,
-0.32278576493263245,
0.4805406928062439,
-0.14080952107906342,
0.22296206653118134,
-0.08110059052705765,
0.17944833636283875,
0.13807861506938934,
0.505180835723877,
-0.09420252591371536,
-0.1582958847284317,
-0.3444034457206726,
-0.309979110956192,
-0.34929025173187256,
-0.030204538255929947,
0.3396082818508148,
0.20164315402507782,
-0.36737531423568726,
0.45792412757873535,
0.14683797955513,
-0.008286265656352043,
0.03825104609131813,
0.08740467578172684,
0.09724457561969757,
0.15898331999778748,
-0.20354819297790527,
-0.08612705022096634,
0.11121147871017456,
0.0276993028819561,
0.18416538834571838,
-0.390901118516922,
0.3141592741012573,
0.13161417841911316,
0.2939217686653137,
-0.028282450512051582,
0.26850858330726624,
0.03965504840016365,
0.049971044063568115,
0.29904595017433167,
0.11814693361520767,
0.0444132536649704,
-0.4097524881362915,
0.02409704029560089,
0.27890902757644653,
-0.047330960631370544,
-0.07445427030324936,
-0.12996739149093628,
0.24257861077785492,
0.21463876962661743,
-0.22838684916496277,
0.15868957340717316,
0.11270821839570999,
-0.10682016611099243,
0.33003875613212585,
0.09132584929466248,
-0.04533684626221657,
0.4301702380180359,
0.12739841639995575,
-0.0996173620223999,
0.10385625809431076,
0.18621698021888733,
-0.17070263624191284,
0.22648222744464874,
-0.2382027953863144,
-0.36561447381973267,
0.15053720772266388,
0.22777439653873444,
-0.3285856246948242,
-0.11314801871776581,
0.27330565452575684,
0.11353318393230438,
0.09598284214735031,
-0.4039614498615265,
-0.04564600810408592,
0.3322248160839081,
-0.19673268496990204,
-0.24665537476539612,
0.5545693635940552,
-0.18467357754707336,
0.06044675409793854,
0.021041158586740494,
0.4235672056674957,
0.1526148021221161,
-0.4558323621749878,
0.13325092196464539,
-0.2410569041967392
] |
https://github.com/huggingface/datasets/issues/2188
|
Duplicate data in Timit dataset
|
Hi ! Thanks for reporting
If I recall correctly this has been recently fixed #1995
Can you try to upgrade your local version of `datasets` ?
```
pip install --upgrade datasets
```
|
I ran a simple code to list all texts in Timit dataset and the texts were all the same.
Is this dataset corrupted?
**Code:**
timit = load_dataset("timit_asr")
print(*timit['train']['text'], sep='\n')
**Result:**
Would such an act of refusal be useful?
Would such an act of refusal be useful?
Would such an act of refusal be useful?
Would such an act of refusal be useful?
...
...
Would such an act of refusal be useful?
| 32 |
Duplicate data in Timit dataset
|
[
-0.02025657519698143,
-0.44943755865097046,
-0.19171452522277832,
0.34231510758399963,
0.0603678859770298,
-0.0372968465089798,
0.24992352724075317,
0.11007029563188553,
-0.7260578274726868,
0.06229253113269806,
-0.27653881907463074,
0.24543674290180206,
-0.09262356907129288,
0.461468368768692,
0.15238980948925018,
0.216805100440979,
-0.07445341348648071,
0.16071119904518127,
-0.5271716117858887,
-0.14135845005512238,
0.02532791532576084,
0.17351143062114716,
0.09037955850362778,
0.05384398251771927,
-0.3291594088077545,
0.09966859221458435,
-0.10137080401182175,
0.21491970121860504,
0.1574757695198059,
-0.11689914762973785,
-0.06485975533723831,
0.23521257936954498,
-0.10588038712739944,
0.41296854615211487,
-0.00011390959843993187,
0.1808532327413559,
-0.1183682382106781,
-0.06791873276233673,
-0.17843349277973175,
0.14054307341575623,
-0.0722227618098259,
0.1367543786764145,
0.049344517290592194,
-0.08875757455825806,
-0.3121289610862732,
-0.2057255208492279,
-0.1990254521369934,
-0.11981472373008728,
0.3225986659526825,
-0.07982050627470016,
0.2320619523525238,
0.07777734845876694,
-0.1275731772184372,
0.10356693714857101,
0.24487581849098206,
0.09785008430480957,
0.18379785120487213,
0.13696543872356415,
0.1371067762374878,
0.11266639083623886,
0.3800871670246124,
0.12711982429027557,
0.17615051567554474,
0.25857439637184143,
-0.24782682955265045,
0.16465997695922852,
-0.04568704962730408,
0.02241857908666134,
0.015720656141638756,
0.3797622621059418,
0.7532251477241516,
-0.3623758554458618,
-0.05131111294031143,
0.1350669413805008,
0.04521509259939194,
0.02097293548285961,
0.11110680550336838,
-0.11189024895429611,
0.053947288542985916,
0.12413069605827332,
-0.13037921488285065,
0.031227249652147293,
-0.1380717009305954,
-0.05629454925656319,
0.02172120474278927,
-0.44976869225502014,
0.09492748230695724,
0.14635837078094482,
-0.21075640618801117,
-0.06566474586725235,
-0.021363932639360428,
0.07850783318281174,
-0.0613127164542675,
-0.08791328966617584,
0.013998032547533512,
-0.36403918266296387,
-0.22254978120326996,
-0.278415322303772,
0.0839117169380188,
0.3266091048717499,
0.5555556416511536,
0.11865890771150589,
-0.2623888850212097,
-0.11743197590112686,
0.3588949143886566,
-0.13218943774700165,
-0.15286953747272491,
-0.24602779746055603,
-0.020616086199879646,
-0.5455920100212097,
-0.4602578282356262,
-0.05043184012174606,
0.11800012737512589,
0.06557466089725494,
0.316314697265625,
-0.13600486516952515,
0.16133275628089905,
-0.16879305243492126,
-0.5012229084968567,
-0.1693015694618225,
-0.24989424645900726,
-0.06574665009975433,
-0.16134977340698242,
-0.11416815221309662,
0.05633697658777237,
-0.004047380294650793,
-0.18439824879169464,
0.07638512551784515,
-0.24176055192947388,
-0.044331133365631104,
-0.2354763150215149,
-0.12881091237068176,
0.1263168603181839,
-0.1568702906370163,
0.024400094524025917,
-0.3530324101448059,
0.32128483057022095,
0.3456312119960785,
-0.01533451210707426,
-0.04858771339058876,
0.5002753138542175,
-0.09497048705816269,
0.1597573459148407,
0.04920955002307892,
0.03678543120622635,
0.1409781128168106,
-0.19940464198589325,
0.05738900601863861,
0.080510213971138,
0.21421387791633606,
-0.14337070286273956,
-0.17613157629966736,
0.0963945984840393,
0.26357215642929077,
-0.05314132943749428,
-0.06762085855007172,
0.11254411190748215,
0.10196700692176819,
0.008834433741867542,
-0.1540842056274414,
-0.2793501317501068,
0.1745430827140808,
-0.2210075557231903,
-0.12989741563796997,
-0.16628682613372803,
0.08080796897411346,
-0.4174950420856476,
0.018839402124285698,
0.03875800967216492,
-0.08739963918924332,
0.11656862497329712,
0.171751007437706,
-0.11412651091814041,
0.49316519498825073,
-0.17269134521484375,
0.019592510536313057,
0.15760809183120728,
-0.1328968107700348,
-0.23862960934638977,
-0.06644131988286972,
-0.22208653390407562,
-0.13686130940914154,
0.2577146589756012,
0.46152934432029724,
0.06359096616506577,
-0.12731316685676575,
-0.032744526863098145,
-0.19721463322639465,
0.06942858546972275,
-0.1214284896850586,
-0.24238716065883636,
0.006162100005894899,
0.09120751917362213,
-0.07388164848089218,
-0.32152411341667175,
-0.09035003930330276,
0.2996690273284912,
0.2098991423845291,
0.13422121107578278,
0.014552256092429161,
-0.14562450349330902,
0.26485535502433777,
0.29232528805732727,
-0.016402609646320343,
0.1459880769252777,
-0.07341154664754868,
0.09068639576435089,
-0.10921066254377365,
0.11499449610710144,
0.024207843467593193,
0.4715528190135956,
-0.18034030497074127,
-0.2210051715373993,
-0.10974491387605667,
-0.2522614002227783,
0.24717004597187042,
0.2618405520915985,
0.4215356111526489,
-0.23890560865402222,
-0.11167827993631363,
0.039689529687166214,
0.4861401319503784,
-0.10496189445257187,
-0.2408619374036789,
-0.04857882484793663,
0.19971400499343872,
-0.022321848198771477,
0.009829233400523663,
0.2565864324569702,
0.23368404805660248,
0.002228398574516177,
-0.13456495106220245,
0.18751160800457,
0.0709686204791069,
0.1086929589509964,
0.1975845843553543,
0.27154895663261414,
-0.2609291970729828,
0.25544869899749756,
-0.27143171429634094,
-0.24647456407546997,
0.31827306747436523,
0.15831850469112396,
-0.08247023820877075,
-0.14798468351364136,
0.19009719789028168,
-0.17347925901412964,
-0.22301290929317474,
-0.010369030758738518,
-0.05614292621612549,
0.13656294345855713,
-0.15038347244262695,
0.26526936888694763,
-0.455878883600235,
0.10630734264850616,
0.25809192657470703,
-0.11659786105155945,
0.20945832133293152,
-0.10789833217859268,
0.5099522471427917,
0.010927306488156319,
0.07792530953884125,
0.015257329680025578,
-0.1065596267580986,
-0.014091924764215946,
0.08328107744455338,
0.0034473156556487083,
0.15672236680984497,
0.4028033912181854,
0.37545251846313477,
0.20265322923660278,
0.014745894819498062,
-0.16755355894565582,
-0.047493040561676025,
0.20051179826259613,
-0.054985545575618744,
-0.3246140778064728,
0.20204347372055054,
-0.046420566737651825,
-0.06009040027856827,
-0.4724583625793457,
0.12408891320228577,
0.32511472702026367,
0.15449997782707214,
-0.2382022738456726,
-0.2702137231826782,
-0.35810327529907227,
-0.13759943842887878,
-0.3095126450061798,
0.03908941149711609,
-0.0270069669932127,
-0.08498644083738327,
0.3538513481616974,
0.3057500720024109,
-0.018961092457175255,
0.02556142583489418,
0.10838966071605682,
0.10402024537324905,
0.0884777382016182,
0.17109327018260956,
0.04845403879880905,
-0.11884991079568863,
-0.15913523733615875,
0.30679571628570557,
0.02131308987736702,
0.14587156474590302,
0.4832104742527008,
-0.32418227195739746,
0.14639268815517426,
-0.4755915403366089,
-0.37151479721069336,
0.1777953803539276,
0.024503327906131744,
0.3751470744609833,
0.16988204419612885,
0.17029911279678345,
-0.25007256865501404,
-0.13456974923610687,
-0.02480865828692913,
0.08167696744203568,
-0.5035902857780457,
0.056348975747823715,
-0.1683398187160492,
0.05003765970468521,
-0.14392231404781342,
-0.7206704020500183,
0.1034432053565979,
0.07518690079450607,
0.2043009251356125,
0.2769865095615387,
0.2636549770832062,
0.13042670488357544,
-0.06249580532312393,
-0.12625671923160553,
0.1347091794013977,
0.0772944763302803,
-0.5488633513450623,
-0.4730675220489502,
-0.05834716185927391,
-0.16765786707401276,
-0.2138042002916336,
-0.09340273588895798,
0.052226223051548004,
0.266173392534256,
0.26273488998413086,
-0.3049027919769287,
-0.10244249552488327,
0.12295128405094147,
0.05578949674963951,
-0.1313147097826004,
0.0001708851777948439,
0.0687858909368515,
0.19746801257133484,
-0.22874321043491364,
-0.08847767859697342,
0.2239965945482254,
0.27184364199638367,
-0.03218180686235428,
0.150572270154953,
0.028726190328598022,
0.21359683573246002,
0.03725847974419594,
0.37245458364486694,
0.5572360754013062,
-0.1356544941663742,
0.35092785954475403,
-0.29267439246177673,
0.4270443022251129,
0.07714492827653885,
-0.14924609661102295,
-0.07422546297311783,
0.18642044067382812,
0.38170692324638367,
0.4235224723815918,
0.10003271698951721,
0.0774674192070961,
0.006176651921123266,
0.017450876533985138,
-0.31391799449920654,
-0.2155836671590805,
-0.13725414872169495,
-0.10228653997182846,
0.06792988628149033,
0.27251332998275757,
-0.3807413578033447,
-0.12507298588752747,
-0.2611992061138153,
-0.10229463130235672,
-0.06666147708892822,
-0.10933272540569305,
-0.05913107097148895,
-0.44084492325782776,
-0.2747969627380371,
-0.13245393335819244,
0.055888473987579346,
0.360513299703598,
0.2453794926404953,
-0.002619788283482194,
-0.1681569665670395,
0.2099274843931198,
0.09706607460975647,
0.5415937900543213,
-0.5633367896080017,
-0.04167685657739639,
0.09487367421388626,
0.10226305574178696,
-0.3247562348842621,
0.241505965590477,
-0.28357017040252686,
0.18977564573287964,
0.3507853150367737,
0.1987461894750595,
-0.13130559027194977,
0.04378766193985939,
0.2071029096841812,
0.30874091386795044,
-0.34169620275497437,
-0.017686551436781883,
-0.12966866791248322,
-0.3556365668773651,
-0.08475213497877121,
-0.08915787935256958,
-0.05614525079727173,
0.02444169856607914,
0.10649127513170242,
-0.33751094341278076,
-0.36480724811553955,
-0.04648755118250847,
0.4288348853588104,
0.06849993020296097,
0.48355400562286377,
0.11034117639064789,
0.5278109312057495,
0.020753471180796623,
-0.04088249057531357,
0.10933609306812286,
0.5948025584220886,
0.06457976996898651,
0.13405591249465942,
-0.08953945338726044,
-0.6127922534942627,
0.2778158187866211,
0.15472020208835602,
0.11375483125448227,
0.17618761956691742,
-0.43792983889579773,
-0.06595399975776672,
0.01920575089752674,
0.29685908555984497,
0.15704245865345,
-0.021129723638296127,
-0.0443684421479702,
-0.08261232078075409,
-0.13641206920146942,
0.1748155653476715,
-0.2545998692512512,
0.5866621136665344,
-0.21422012150287628,
-0.12257355451583862,
0.02927463874220848,
0.011532515287399292,
1.0112814903259277,
0.0032847344409674406,
0.23343606293201447,
-0.01453318540006876,
-0.22919349372386932,
-0.05435546115040779,
-0.2707763910293579,
-0.1644054651260376,
-0.18642915785312653,
-0.3607700765132904,
-0.0170460008084774,
0.012608797289431095,
-0.1284693032503128,
0.3339407742023468,
-0.2117776870727539,
-0.028265969827771187,
0.15814945101737976,
0.49698716402053833,
-0.0402878113090992,
0.09907245635986328,
0.07202370464801788,
0.30839601159095764,
0.46052947640419006,
0.11697253584861755,
0.0468294620513916,
-0.010547149926424026,
0.08583023399114609,
-0.008125197142362595,
0.20174716413021088,
-0.15999244153499603,
-0.05791572481393814,
-0.2597608268260956,
-0.24303358793258667,
0.38404449820518494,
-0.2959928810596466,
-0.5785379409790039,
-0.4480513632297516,
0.00047722680028527975,
0.4121917188167572,
0.10522674024105072,
-0.04713289067149162,
-0.14389248192310333,
0.3120975196361542,
0.2297000288963318,
-0.26722028851509094,
0.006234948057681322,
0.0840439721941948,
-0.13917668163776398,
-0.40149080753326416,
0.060050733387470245,
0.29658591747283936,
-0.15534161031246185,
-0.39783093333244324,
0.2555208206176758,
-0.1287701576948166,
-0.46027517318725586,
0.375149130821228,
0.2690158486366272,
-0.24052117764949799,
-0.27701708674430847,
0.14837832748889923,
-0.0072636655531823635,
-0.18818353116512299,
0.4915616512298584,
0.054820768535137177,
-0.35171693563461304,
-0.25013789534568787,
0.35820692777633667,
0.6288341283798218,
0.3641575872898102,
0.3115291893482208,
-0.44664135575294495,
-0.03422781080007553,
-0.3118824362754822,
0.44698861241340637,
-0.11213485151529312,
-0.3394533693790436,
0.04188559949398041,
-0.007376703433692455,
0.16240331530570984,
0.23826877772808075,
0.15433567762374878,
0.06003683805465698,
0.2766185700893402,
-0.2158907949924469,
-0.03285474330186844,
-0.21192510426044464,
0.09621977806091309,
0.20513424277305603,
0.497549444437027,
0.046122271567583084,
0.26118582487106323,
0.04379322752356529,
0.10416751354932785,
-0.3636781871318817,
0.19456805288791656,
0.16344398260116577,
0.33062544465065,
-0.07312480360269547,
-0.24457839131355286,
0.06378090381622314,
0.07385320961475372,
0.23725442588329315,
0.08575692772865295,
-0.010243702679872513,
-0.3109387457370758,
-0.07654866576194763,
0.0926012396812439,
-0.17877399921417236,
0.011572595685720444,
-0.3267117738723755,
0.09976252913475037,
0.07847755402326584,
0.23012582957744598,
0.03889809176325798,
-0.05468560755252838,
0.23993386328220367,
0.06179669126868248,
0.3548307716846466,
-0.31277817487716675,
-0.23670028150081635,
-0.059624288231134415,
0.10851640999317169,
0.12683020532131195,
0.022718125954270363,
-0.05069172382354736,
-0.1944045126438141,
-0.23896414041519165,
-0.1018066555261612,
-0.0030957572162151337,
0.24138304591178894,
-0.1771801859140396,
-0.21294265985488892,
-0.13266994059085846,
-0.20017024874687195,
0.2638621926307678,
0.25545451045036316,
0.288128525018692,
-0.044319670647382736,
-0.20602025091648102,
0.06795277446508408,
0.20011760294437408,
-0.4304112195968628,
-0.34024733304977417,
-0.0470990352332592,
-0.11732108891010284,
0.1356772929430008,
0.1305823028087616,
0.1755494475364685,
-0.289956271648407,
0.5212223529815674,
-0.08944299817085266,
0.10255879163742065,
-0.35646623373031616,
0.020134173333644867,
0.36467909812927246,
0.018009871244430542,
-0.22292037308216095,
0.01726534031331539,
0.14951013028621674,
-0.09679019451141357,
0.3172919452190399,
0.06632434576749802,
0.14360225200653076,
-0.4723404347896576,
-0.16281074285507202,
0.021764514967799187,
-0.0004167089646216482,
-0.013533785939216614,
0.29085347056388855,
-0.12400364875793457,
0.07818038761615753,
0.45551982522010803,
0.5876002907752991,
0.22042909264564514,
-0.23234201967716217,
-0.30129286646842957,
-0.028330670669674873,
-0.2657378315925598,
0.05428912118077278,
-0.3468675911426544,
-0.11955006420612335,
-0.011220385320484638,
-0.08863158524036407,
-0.07555045187473297,
-0.015372859314084053,
0.24814361333847046,
0.2220866084098816,
0.14774629473686218,
-0.5108089447021484,
-0.09726480394601822,
0.16199849545955658,
-0.1364717334508896,
-0.21441958844661713,
0.23952463269233704,
0.4188143312931061,
-0.11533012986183167,
0.1605057716369629,
0.5991941094398499,
0.19071507453918457,
-0.30554309487342834,
0.05381196364760399,
0.16423048079013824,
-0.17711442708969116,
-0.20555296540260315,
-0.21995553374290466,
0.11844398826360703,
-0.23174315690994263,
-0.3673193156719208,
0.18568256497383118,
0.15866562724113464,
-0.09304320067167282,
-0.02888280712068081,
0.3709476888179779,
-0.2207905799150467,
-0.4557695984840393,
0.14192986488342285,
-0.0897921696305275,
-0.08152806013822556,
0.09709065407514572,
-0.11889585107564926,
-0.294228732585907,
0.04541416093707085,
0.43036046624183655,
-0.05098854750394821,
0.060111816972494125,
-0.10199541598558426,
0.10289082676172256,
-0.20721633732318878,
0.28119462728500366,
-0.12305963784456253,
-0.14649084210395813,
-0.19365976750850677,
-0.3230138421058655,
-0.6599064469337463,
0.3022792935371399,
-0.1300687938928604,
0.02081347443163395,
0.003812831826508045,
0.04711713269352913,
-0.09182059019804001,
0.23540349304676056,
0.25708478689193726,
0.08813216537237167,
-0.3971599340438843,
0.09471704810857773,
-0.5843663811683655,
-0.21895304322242737,
0.04009120538830757,
0.0343865305185318,
-0.0696067363023758,
-0.1768953949213028,
0.24571581184864044,
-0.08701436221599579,
0.13579145073890686,
-0.14466489851474762,
-0.19528721272945404,
0.03239865601062775,
0.5627548694610596,
-0.04418768361210823,
-0.1608547419309616,
0.2587555944919586,
-0.07997327297925949,
0.22315949201583862,
0.1777176856994629,
-0.44261157512664795,
-0.17109407484531403,
0.51021409034729,
0.48529836535453796,
-0.13141000270843506,
-0.3210960924625397,
-0.021711360663175583,
0.3510212302207947,
-0.0990661233663559,
0.2435556799173355,
0.22795218229293823,
0.10972951352596283,
-0.042224906384944916,
-0.1934761255979538,
0.10588691383600235,
-0.07237061858177185,
0.49377480149269104,
0.11479118466377258,
0.13180580735206604,
-0.07443549484014511,
-0.6221574544906616,
0.259659081697464,
-0.20124608278274536,
0.0528859980404377,
-0.18026167154312134,
0.15933538973331451,
-0.09756597876548767,
0.051667578518390656,
-0.15131935477256775,
0.16323977708816528,
0.6054785251617432,
-0.13700151443481445,
0.05664539709687233,
0.41350436210632324,
0.08187443017959595,
-0.09625012427568436,
0.005105763208121061,
0.6335159540176392,
0.24148090183734894,
-0.20925308763980865,
0.41317352652549744,
-0.03968285396695137
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
An educated guess: does this refer to the fact that depending on the custom column names in the dataset files (csv in this case), there is a dataset loader being created? and this dataset loader - using the "custom data configuration" is used among all jobs running using this particular csv files? (thinking out loud here...)
If this is the case, it may be ok for my use case (have to think about it more), still a bit surprising given that datasets caching is disabled (or so I hope) by the lines I pasted above.
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 95 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
Hi ! Currently disabling the caching means that all the dataset transform like `map`, `filter` etc. ignore the cache: it doesn't write nor read processed cache files.
However `load_dataset` reuses datasets that have already been prepared: it does reload prepared dataset files.
Indeed from the documentation:
> datasets.set_caching_enabled(boolean: bool)
> When applying transforms on a dataset, the data are stored in cache files. The caching mechanism allows to reload an existing cache file if it’s already been computed.
> Reloading a dataset is possible since the cache files are named using the dataset fingerprint, which is updated after each transform.
> If disabled, the library will no longer reload cached datasets files when applying transforms to the datasets. More precisely, if the caching is disabled:
> - cache files are always recreated
> - cache files are written to a temporary directory that is deleted when session closes
> - cache files are named using a random hash instead of the dataset fingerprint - use datasets.Dataset.save_to_disk() to save a transformed dataset or it will be deleted when session closes
> - caching doesn’t affect datasets.load_dataset(). If you want to regenerate a dataset from scratch you should use the download_mode parameter in datasets.load_dataset().
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 202 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
Thank you for the clarification.
This is a bit confusing. On one hand, it says that cache files are always recreated and written to a temporary directory that is removed; on the other hand the last bullet point makes me think that since the default according to the docs for `download_mode (Optional datasets.GenerateMode) – select the download/generate mode - Default to REUSE_DATASET_IF_EXISTS` => it almost sounds that it could reload prepared dataset files. Where are these files stored? I guess not in the temporary directory that is removed...
I find this type of api design error-prone. When I see as a programmer `datasets.set_caching_enabled(False)` I expect no reuse of anything in the cache.
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 112 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
It would be nice if the documentation elaborated on all the possible values for `download_mode` and/or a link to `datasets.GenerateMode`.
This info here:
```
"""`Enum` for how to treat pre-existing downloads and data.
The default mode is `REUSE_DATASET_IF_EXISTS`, which will reuse both
raw downloads and the prepared dataset if they exist.
The generations modes:
| | Downloads | Dataset |
| -----------------------------------|-----------|---------|
| `REUSE_DATASET_IF_EXISTS` (default)| Reuse | Reuse |
| `REUSE_CACHE_IF_EXISTS` | Reuse | Fresh |
| `FORCE_REDOWNLOAD` | Fresh | Fresh |
```
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 84 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
I have another question. Assuming that I understood correctly and there is reuse of datasets files when caching is disabled (!), I'm guessing there is a directory that is created based on some information on the dataset file. I'm interested in the situation where I'm loading a (custom) dataset from local disk. What information is used to create the directory/filenames where the files are stored?
I'm concerned about the following scenario: if I have a file, let's say `train.csv` at path `the_path`, run once, the dataset is prepared, some models are run, etc. Now let's say there is an issue and I recreate `train.csv` at the same path `the_path`. Is there enough information in the temporary name/hash to *not* reload the *old* prepared dataset (e.g., timestamp of the file)? Or is it going to reload the *old* prepared file?
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 139 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
Thanks for the feedback, we'll work in improving this aspect of the documentation.
> Where are these files stored? I guess not in the temporary directory that is removed...
We're using the Arrow file format to load datasets. Therefore each time you load a dataset, it is prepared as an arrow file on your disk. By default the file is located in the ~/.cache/huggingface/datasets/<dataset_name>/<config_id>/<version> directory.
> What information is used to create the directory/filenames where the files are stored?
The config_id contains a hash that takes into account:
- the dataset loader used and its source code (e.g. the "csv" loader)
- the arguments passed to the loader (e.g. the csv delimiter)
- metadata of the local data files if any (e.g. their timestamps)
> I'm concerned about the following scenario: if I have a file, let's say train.csv at path the_path, run once, the dataset is prepared, some models are run, etc. Now let's say there is an issue and I recreate train.csv at the same path the_path. Is there enough information in the temporary name/hash to not reload the old prepared dataset (e.g., timestamp of the file)? Or is it going to reload the old prepared file?
Yes the timestamp of the local csv file is taken into account. If you edit your csv file, the config_id will change and loading the dataset will create a new arrow file.
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 231 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
Thank you for all your clarifications, really helpful!
If you have the bandwidth, please do revisit the api wrt cache disabling. Anywhere in the computer stack (hardware included) where you disable the cache, one assumes there is no caching that happens.
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 41 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
I have another question about caching, this time in the case where FORCE_REDOWNLOAD is used to load the dataset, the datasets cache is one directory as defined by HF_HOME and there are multiple concurrent jobs running in a cluster using the same local dataset (i.e., same local files in the cluster). Does anything in the naming convention and/or file access/locking that you're using prevent race conditions between the concurrent jobs on the caching of the local dataset they all use?
I noticed some errors (can provide more details if helpful) in load_dataset/prepare_split that lead to my question above.
Let me know if my question is clear, I can elaborate more if needed @lhoestq Thank you!
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 115 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
I got another error that convinces me there is a race condition (one of the test files had zero samples at prediction time). I think it comes down to the fact that the `config_id` above (used in the naming for the cache) has no information on who's touching the data. If I have 2 concurrent jobs, both loading the same dataset and forcing redownload, they may step on each other foot/caching of the dataset.
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 74 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
We're using a locking mechanism to prevent two processes from writing at the same time. The locking is based on the `filelock` module.
Also directories that are being written use a suffix ".incomplete" so that reading is not possible on a dataset being written.
Do you think you could provide a simple code to reproduce the race condition you experienced ?
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 61 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
I can provide details about the code I'm running (it's really-really close to some official samples from the huggingface transformers examples, I can point to the exact sample file, I kept a record of that). I can also describe in which conditions this race occurs (I'm convinced it has to do with forcing the redownloading of the dataset, I've been running hundreds of experiments before and didn't have a problem before I forced the redownload). I also can provide samples of the different stack errors I get and some details about the level of concurrency of jobs I was running. I can also try to imagine how the race manifests (I'm fairly sure that it's a combo of one job cleaning up and another job being in the middle of the run).
However, I have to cleanup all this to make sure I'm no spilling any info I shouldn't be spilling. I'll try to do it by the end of the week, if you think all this is helpful.
For now, I have a workaround. Don't use forcing redownloading. And to be ultra careful (although I don't think this is a problem), I run a series of jobs that will prepare the datasets and I know there is no concurrency wrt the dataset. Once that's done (and I believe even having multiple jobs loading the datasets at the same time doesn't create problems, as long as REUSE_DATASET_IF_EXISTS is the policy for loading the dataset, so the filelock mechanism you're using is working in that scenario), the prepared datasets will be reused, no race possible in any way.
Thanks for all the details you provided, it helped me understand the underlying implementation and coming up with workarounds when I ran into issues.
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 291 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
Hi! I have the same challenge with caching, where the **.cache** folder is required even though it isn't possible for me.
I'd like to run transformers in Snowflake, using Snowpark for Python, this would mean I could provide configurable transformers in real-time for business users without having data leave an environment (for security reasons). With no need for data transfer,n the compute is faster. It is a large use case - is it possible to entirely disable caching in certain scenarios?
@lhoestq ?
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 83 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
You can try to change the location of the cache folder using the `HF_CACHE_HOME` environment variable, and set a location where you have read/write access.
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 25 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2187
|
Question (potential issue?) related to datasets caching
|
Thanks @lhoestq
I wanted to do that, however, snowflake does not allow it to write at all. I'm asking around to see if they can help me out with that issue 😅
|
I thought I had disabled datasets caching in my code, as follows:
```
from datasets import set_caching_enabled
...
def main():
# disable caching in datasets
set_caching_enabled(False)
```
However, in my log files I see messages like the following:
```
04/07/2021 18:34:42 - WARNING - datasets.builder - Using custom data configuration default-888a87931cbc5877
04/07/2021 18:34:42 - WARNING - datasets.builder - Reusing dataset csv (xxxx/cache-transformers/datasets/csv/default-888a87931cbc5877/0.0.0/965b6429be0fc05f975b608ce64e1fa941cc8fb4f30629b523d2390f3c0e1a93
```
Can you please let me know what this reusing dataset csv means? I wouldn't expect any reusing with the datasets caching disabled. Thank you!
| 32 |
Question (potential issue?) related to datasets caching
|
[
-0.18837054073810577,
0.14480839669704437,
-0.24334955215454102,
0.3189409077167511,
-0.07832013815641403,
0.07467462867498398,
0.3790329098701477,
0.043782539665699005,
0.029422303661704063,
-0.15099267661571503,
0.06050752475857735,
-0.16130545735359192,
-0.057712554931640625,
-0.13131865859031677,
-0.23774904012680054,
0.2675555646419525,
0.1700427085161209,
-0.06175500899553299,
0.011799037456512451,
-0.12145322561264038,
-0.16490715742111206,
-0.1245788037776947,
0.014329509809613228,
-0.15073344111442566,
-0.3985976576805115,
-0.10772520303726196,
-0.06888741999864578,
0.034293483942747116,
-0.0005024673882871866,
-0.08504966646432877,
0.0778338760137558,
0.32649385929107666,
0.07461628317832947,
0.34334349632263184,
-0.00010040533379651606,
-0.18597359955310822,
0.07433577626943588,
0.12827005982398987,
-0.30524542927742004,
0.3326588273048401,
-0.5877276062965393,
-0.10662516951560974,
-0.2025650590658188,
-0.23283152282238007,
0.058566831052303314,
0.13090379536151886,
-0.03280377760529518,
-0.675094723701477,
0.23983345925807953,
0.057201750576496124,
0.41355422139167786,
0.17687346041202545,
-0.4400898516178131,
0.015609131194651127,
0.2825414538383484,
-0.06129070371389389,
-0.03128533810377121,
-0.05396326258778572,
0.16047640144824982,
-0.12692634761333466,
-0.21302059292793274,
0.5513499975204468,
0.05888282507658005,
0.1577664613723755,
0.22805404663085938,
0.034386880695819855,
-0.16514526307582855,
0.10289029777050018,
0.22291941940784454,
-0.0755828320980072,
0.7479138374328613,
-0.1805625855922699,
-0.5163039565086365,
-0.2186436504125595,
-0.18175244331359863,
-0.18386809527873993,
0.27466288208961487,
-0.02031085081398487,
0.12669852375984192,
0.088824562728405,
-0.25947317481040955,
-0.1857062727212906,
-0.007255317643284798,
-0.08099541813135147,
-0.2014358639717102,
0.013247013092041016,
-0.0064705740660429,
-0.06814564764499664,
-0.20725257694721222,
-0.06145172566175461,
0.5814447999000549,
-0.16333502531051636,
0.15813803672790527,
0.12865746021270752,
-0.1486533284187317,
-0.15845851600170135,
0.09412592649459839,
0.4052157700061798,
0.16344577074050903,
0.029902717098593712,
0.11900912970304489,
0.027075713500380516,
-0.048492856323719025,
-0.1415829360485077,
0.44245797395706177,
0.13399001955986023,
-0.06527203321456909,
-0.03758826106786728,
0.22287780046463013,
-0.34295740723609924,
-0.40208882093429565,
-0.08290078490972519,
0.16722281277179718,
-0.16774536669254303,
0.583605170249939,
0.026003465056419373,
0.13194459676742554,
-0.4149478077888489,
-0.1305779218673706,
0.31366753578186035,
0.0035193266812711954,
-0.2270698845386505,
-0.0521567277610302,
0.1784132421016693,
-0.13428492844104767,
0.033958688378334045,
-0.12535464763641357,
0.14409250020980835,
-0.2583751678466797,
-0.4445120096206665,
-0.4405992329120636,
-0.2731567621231079,
-0.21253687143325806,
0.24726764857769012,
0.12997832894325256,
0.12111236900091171,
-0.10105352848768234,
-0.015334983356297016,
-0.07684624940156937,
0.06309278309345245,
0.15704376995563507,
-0.2820880115032196,
0.20842105150222778,
-0.034762974828481674,
-0.47026586532592773,
0.25263968110084534,
-0.010099763050675392,
0.14776216447353363,
-0.16948702931404114,
0.06914971023797989,
-0.0778174102306366,
-0.17163854837417603,
0.1654464453458786,
0.3348405361175537,
-0.2780801057815552,
-0.029169591143727303,
0.028214966878294945,
0.08688610792160034,
0.3497115969657898,
-0.30395999550819397,
0.00811124686151743,
-0.0004994763294234872,
-0.3359801471233368,
-0.16560515761375427,
-0.1300690919160843,
0.47098150849342346,
-0.14534637331962585,
0.03931750729680061,
-0.07676128298044205,
0.17306996881961823,
-0.11352363228797913,
0.3133474290370941,
-0.21938230097293854,
-0.009204121306538582,
-0.1141306683421135,
0.01706673949956894,
0.06805377453565598,
-0.24822546541690826,
-0.5217384099960327,
-0.03302096202969551,
-0.09670780599117279,
0.08417779952287674,
0.04935529828071594,
0.2709345519542694,
0.048682067543268204,
-0.39522451162338257,
0.1420411467552185,
0.06929861009120941,
-0.04202626645565033,
0.005047594662755728,
-0.3947699964046478,
-0.2577628195285797,
0.20390662550926208,
-0.06717117130756378,
0.11900839954614639,
0.3672097325325012,
0.07517600804567337,
0.030820207670331,
-0.0934230387210846,
0.10497025400400162,
0.15146198868751526,
0.15878532826900482,
0.08149445056915283,
-0.1040038913488388,
-0.05789349600672722,
-0.11248571425676346,
-0.4333816170692444,
0.1991511434316635,
0.1893584281206131,
-0.2670286297798157,
0.11005618423223495,
-0.20381644368171692,
-0.08472569286823273,
-0.03970973566174507,
0.0847763791680336,
0.13782380521297455,
0.2517040967941284,
0.149275004863739,
-0.12313348799943924,
-0.11795583367347717,
-0.10433127731084824,
0.467062771320343,
-0.010314357466995716,
-0.23542702198028564,
-0.16724233329296112,
0.1631808876991272,
-0.014843345619738102,
0.006685122847557068,
-0.21254727244377136,
0.018453260883688927,
0.13126294314861298,
0.0822094976902008,
0.07135254889726639,
0.0278345737606287,
-0.05836982652544975,
0.2333143651485443,
0.1433476358652115,
0.3574712872505188,
-0.005648408085107803,
0.03731593117117882,
0.3719438910484314,
-0.08480960875749588,
0.0020500211976468563,
-0.11016090214252472,
-0.22999390959739685,
0.43228447437286377,
-0.01256501954048872,
0.10799582302570343,
-0.05277329310774803,
-0.26201435923576355,
0.15019260346889496,
-0.16464784741401672,
0.13115453720092773,
-0.3680499196052551,
0.16427727043628693,
0.053886353969573975,
0.16008740663528442,
0.26718518137931824,
-0.20442095398902893,
0.4312059283256531,
0.2049817591905594,
0.1072889193892479,
0.060869500041007996,
-0.09484872967004776,
-0.019629033282399178,
-0.16505035758018494,
0.3017922639846802,
0.3658052384853363,
0.5482028126716614,
0.2976694703102112,
0.239394411444664,
-0.045811887830495834,
-0.009741446003317833,
-0.2342524230480194,
-0.020849009975790977,
-0.12559132277965546,
-0.04364684969186783,
0.06798014789819717,
0.2544896900653839,
-0.06338025629520416,
-0.0030024966690689325,
0.08544106036424637,
0.09729136526584625,
0.01948987878859043,
-0.2261108160018921,
0.21851687133312225,
-0.2409772425889969,
-0.3266924321651459,
-0.03655285760760307,
0.09783118963241577,
-0.2447756677865982,
-0.2620774805545807,
0.10167379677295685,
0.11185090243816376,
-0.31723159551620483,
-0.04942578822374344,
-0.3609926402568817,
0.5170576572418213,
-0.057882267981767654,
0.10395106673240662,
0.0022383928298950195,
-0.43564367294311523,
-0.04374714940786362,
0.1684184968471527,
0.17682933807373047,
-0.04566171392798424,
0.28007376194000244,
-0.1079220175743103,
-0.06955678761005402,
-0.32779765129089355,
0.042563363909721375,
-0.022403474897146225,
0.21830326318740845,
0.09420675039291382,
-0.40029239654541016,
-0.09417729824781418,
-0.1068255603313446,
-0.10312941670417786,
0.14037099480628967,
-0.12748822569847107,
-0.060333821922540665,
-0.25114402174949646,
0.36561286449432373,
0.13659794628620148,
0.1309850513935089,
-0.10257378965616226,
-0.29471704363822937,
-0.1533111184835434,
0.011265463195741177,
0.11631377041339874,
-0.015269961208105087,
0.20084501802921295,
-0.18011656403541565,
-0.348681777715683,
0.1210002452135086,
0.11740543693304062,
-0.7409593462944031,
-0.4133250117301941,
0.2625708281993866,
-0.13757950067520142,
-0.35721105337142944,
-0.08088602870702744,
0.0016078322660177946,
0.1725243479013443,
0.5554066300392151,
-0.3763468861579895,
-0.06138012558221817,
0.0491986908018589,
0.1732056885957718,
0.042606815695762634,
-0.1351008266210556,
0.20975792407989502,
-0.1259954422712326,
-0.263847291469574,
-0.19969941675662994,
-0.14558489620685577,
0.22768723964691162,
-0.04704730957746506,
0.23700061440467834,
-0.20802389085292816,
-0.021505650132894516,
-0.18013373017311096,
0.7307103872299194,
0.0413760207593441,
-0.1996547430753708,
0.26721617579460144,
0.186838760972023,
0.40805694460868835,
-0.030797259882092476,
-0.051216814666986465,
-0.03357597440481186,
-0.1879015862941742,
-0.23681339621543884,
0.19243447482585907,
0.22401723265647888,
-0.23251433670520782,
-0.05800049006938934,
0.0715084820985794,
-0.14801065623760223,
-0.4003162682056427,
0.04516806825995445,
-0.14670896530151367,
0.27752184867858887,
0.4228314757347107,
0.013661021366715431,
-0.4658740758895874,
-0.20014117658138275,
-0.12416325509548187,
-0.12338364124298096,
0.24571387469768524,
-0.24629861116409302,
-0.2705131769180298,
0.22589747607707977,
-0.12524442374706268,
0.15030941367149353,
0.12007895112037659,
0.3671039044857025,
-0.09328862279653549,
-0.17963272333145142,
0.07322029024362564,
0.08978321403265,
0.558540403842926,
-0.31091737747192383,
0.3222390413284302,
0.17058761417865753,
-0.06741219758987427,
-0.07869503647089005,
-0.025541068986058235,
-0.008347547613084316,
0.22109006345272064,
-0.0251951664686203,
0.021459516137838364,
-0.09926261007785797,
-0.04614856466650963,
-0.029643524438142776,
0.308049738407135,
-0.11922603100538254,
-0.2938792109489441,
-0.0854913592338562,
0.2160862684249878,
0.1545429676771164,
0.027225583791732788,
0.047163527458906174,
-0.15504339337348938,
-0.11083399504423141,
0.15254010260105133,
-0.34526342153549194,
0.10228179395198822,
0.013276385143399239,
-0.012619257904589176,
0.2939338684082031,
0.027894388884305954,
0.3409930467605591,
0.2870224714279175,
0.14620929956436157,
0.20879732072353363,
0.35162752866744995,
-0.07278710603713989,
0.08825885504484177,
0.17279405891895294,
0.014974947087466717,
-0.12712445855140686,
0.5866672992706299,
0.014644809067249298,
0.06921208649873734,
0.1585305780172348,
-0.12608025968074799,
-0.3115323483943939,
0.0574733130633831,
-0.03607802093029022,
0.0712820366024971,
-0.2661186158657074,
-0.31272056698799133,
0.4042701721191406,
0.14112813770771027,
-0.2978394031524658,
0.2935420274734497,
0.03151305392384529,
-0.25149649381637573,
0.1745826005935669,
0.20256058871746063,
1.044985294342041,
0.08123821020126343,
0.27606311440467834,
-0.18860217928886414,
-0.11871396005153656,
0.2982591986656189,
-0.22799371182918549,
-0.02286458946764469,
-0.1128883883357048,
-0.3493122160434723,
-0.05203600600361824,
-0.08609366416931152,
-0.1271374672651291,
0.265736848115921,
0.04579862579703331,
0.07860592752695084,
-0.0793854370713234,
0.43139609694480896,
-0.07846476137638092,
0.15320132672786713,
-0.10537122935056686,
0.06701827794313431,
-0.1350923329591751,
0.3615558445453644,
0.14665618538856506,
0.04467688128352165,
-0.24823401868343353,
0.024302812293171883,
-0.2088654339313507,
0.14063404500484467,
-0.10955224931240082,
-0.13444505631923676,
-0.07922714948654175,
0.2061365395784378,
-0.21285545825958252,
-0.34997060894966125,
-0.07176937162876129,
0.018010534346103668,
0.4205407500267029,
-0.1069624200463295,
-0.17997261881828308,
0.09719819575548172,
0.09340222179889679,
0.25050869584083557,
0.1329280585050583,
-0.27674978971481323,
0.26836541295051575,
-0.010268929414451122,
-0.04659562557935715,
-0.047754935920238495,
-0.03715234622359276,
-0.33230116963386536,
-0.1618225872516632,
0.26168951392173767,
-0.07007057964801788,
-0.46603789925575256,
-0.07031954824924469,
0.19520513713359833,
0.09212679415941238,
-0.057072438299655914,
0.3120371401309967,
0.34297695755958557,
0.18136635422706604,
0.27488571405410767,
-0.1008702889084816,
-0.07853502780199051,
-0.23157866299152374,
0.7543032169342041,
0.16731420159339905,
-0.18003471195697784,
0.2871614992618561,
-0.27352190017700195,
-0.3756569027900696,
-0.24726362526416779,
-0.19575907289981842,
-0.035891804844141006,
-0.24464955925941467,
0.11623523384332657,
-0.3595317602157593,
-0.12268812954425812,
-0.1413470059633255,
-0.025372207164764404,
0.1979837268590927,
0.038273103535175323,
0.00949815846979618,
-0.1617165207862854,
-0.2846210300922394,
0.14924439787864685,
-0.025564078241586685,
0.1329532116651535,
-0.059982772916555405,
-0.2370329052209854,
-0.1752745807170868,
0.14529769122600555,
-0.48659971356391907,
-0.08525851368904114,
0.008009339682757854,
0.17698784172534943,
-0.06715460866689682,
-0.10131599754095078,
0.0923420861363411,
-0.4175877869129181,
0.17533713579177856,
-0.059402789920568466,
-0.29094240069389343,
-0.38781362771987915,
0.18111790716648102,
0.059782903641462326,
0.017496708780527115,
-0.22039732336997986,
-0.1432775855064392,
-0.2934243679046631,
0.08395954966545105,
-0.10986794531345367,
-0.03906085342168808,
0.4160739481449127,
0.1422952264547348,
-0.18944492936134338,
0.19721361994743347,
0.04674964025616646,
-0.03968256711959839,
0.2542335093021393,
0.06942922621965408,
0.07289764285087585,
-0.09363777935504913,
0.1386183798313141,
-0.043200548738241196,
0.01968120038509369,
0.1059161052107811,
0.03144315630197525,
-0.170179545879364,
-0.032810330390930176,
0.23425672948360443,
-0.2961238622665405,
0.04867206886410713,
0.5341599583625793,
0.437016099691391,
0.2621801793575287,
-0.13352878391742706,
-0.3239687383174896,
0.2255258858203888,
0.3886691629886627,
-0.15240411460399628,
-0.1989118903875351,
0.26627829670906067,
0.007968720048666,
0.07156706601381302,
0.22056974470615387,
0.3623063862323761,
-0.06783850491046906,
0.33521148562431335,
0.11978933960199356,
0.4829023480415344,
-0.23882576823234558,
0.18011604249477386,
-0.023216303437948227,
0.1818196177482605,
0.11577875167131424,
0.416645884513855,
0.486512690782547,
0.07739146798849106,
0.3246346712112427,
0.24372883141040802,
0.17836293578147888,
0.38942310214042664,
0.20654304325580597,
-0.30652403831481934,
-0.34502464532852173,
0.2922924757003784,
0.35832539200782776,
0.16269250214099884,
0.10914148390293121,
-0.013163884170353413,
0.08027534186840057,
0.00940717849880457,
-0.12914907932281494,
-0.1019924134016037,
0.021150121465325356,
-0.19480043649673462,
-0.004988815635442734,
0.1573183834552765,
-0.2049608677625656,
0.15714214742183685,
0.01585952751338482,
-0.3833724856376648,
-0.1503775268793106,
0.23553889989852905,
-0.051768362522125244,
0.13998644053936005,
-0.21843913197517395,
0.265292227268219,
-0.09741444140672684,
0.2612626254558563,
-0.10940837860107422,
0.25332075357437134,
0.019472716376185417,
0.13325822353363037,
0.5092050433158875,
0.28323107957839966,
0.09869956225156784,
0.04315411299467087,
0.09851456433534622,
0.07810831815004349,
0.14091657102108002,
-0.16024905443191528,
-0.2502131760120392,
0.27064642310142517,
0.09481124579906464,
-0.15334360301494598,
0.20625601708889008,
0.26656603813171387,
-0.24994970858097076,
0.2859683632850647,
0.17394819855690002,
0.08298590779304504,
-0.17836757004261017,
-0.033121977001428604,
-0.018693890422582626,
-0.2283850759267807,
-0.02828606218099594,
-0.12305527180433273,
-0.09427647292613983,
-0.06719280779361725,
0.2812676429748535,
-0.32632768154144287,
0.2564161717891693,
0.11220064759254456,
0.15334878861904144,
-0.06497538834810257,
0.37339773774147034,
0.18607480823993683,
0.18852990865707397,
-0.3141314685344696,
-0.11288484930992126,
-0.6305381655693054,
0.18250121176242828,
-0.25383660197257996,
0.07639382779598236,
-0.004209283273667097,
0.28888604044914246,
-0.07037463039159775,
0.12495146691799164,
0.10335388034582138,
-0.10051554441452026,
-0.15729162096977234,
0.09074250608682632,
-0.4663521945476532,
-0.1149592325091362,
0.05899926647543907,
-0.042754221707582474,
0.06869231909513474,
-0.155602365732193,
0.26043903827667236,
0.12112665921449661,
0.24216803908348083,
0.02988654375076294,
-0.11935164034366608,
-0.11742222309112549,
0.26783740520477295,
0.31266406178474426,
-0.05697207897901535,
0.3358626365661621,
0.13985541462898254,
0.06292210519313812,
-0.4397519528865814,
-0.2976154386997223,
-0.07172450423240662,
0.110514797270298,
0.07144086062908173,
-0.03577538952231407,
-0.40883252024650574,
0.156587615609169,
0.07346414774656296,
0.24231897294521332,
-0.10691278427839279,
0.17681929469108582,
-0.09736721217632294,
0.03151958808302879,
-0.10379107296466827,
0.10404939949512482,
0.0231457632035017,
0.16965597867965698,
-0.07731661200523376,
0.3875359296798706,
-0.2888384163379669,
-0.11044962704181671,
0.38848674297332764,
-0.23113718628883362,
-0.09594492614269257,
0.032294075936079025,
0.37268269062042236,
0.2711018919944763,
-0.4181654155254364,
-0.39336514472961426,
0.027839163318276405,
0.3777412176132202,
-0.1503063142299652,
0.060833148658275604,
0.1878378838300705,
-0.08479086309671402,
-0.02004178613424301,
-0.05759899318218231,
0.3507024645805359,
0.02643754333257675,
-0.3353426158428192,
0.021238284185528755,
-0.11117793619632721
] |
https://github.com/huggingface/datasets/issues/2185
|
.map() and distributed training
|
Hi, one workaround would be to save the mapped(tokenized in your case) file using `save_to_disk`, and having each process load this file using `load_from_disk`. This is what I am doing, and in this case, I turn off the ability to automatically load from the cache.
Also, multiprocessing the map function seems to be slower at the moment (#1992), hope this helps you.
|
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
| 62 |
.map() and distributed training
|
[
-0.21202944219112396,
-0.5038100481033325,
-0.1766359508037567,
-0.05507750064134598,
0.33732613921165466,
-0.016366643831133842,
0.3805316090583801,
0.12343519926071167,
0.44184768199920654,
0.15533435344696045,
0.029744481667876244,
0.4924279451370239,
-0.18595775961875916,
-0.010955989360809326,
0.07227134704589844,
-0.2115742266178131,
0.1267465502023697,
0.12145557254552841,
-0.3119722604751587,
-0.4715406000614166,
-0.10132420063018799,
-0.10141588747501373,
-0.33801788091659546,
0.1731644570827484,
-0.24553638696670532,
-0.30862054228782654,
-0.040440548211336136,
0.031275857239961624,
-0.18040868639945984,
-0.15813511610031128,
0.058952782303094864,
-0.20781981945037842,
-0.05194273963570595,
0.4229956865310669,
-0.00010195867798756808,
0.14346754550933838,
-0.03886542096734047,
-0.07142549753189087,
0.14583392441272736,
0.17659211158752441,
-0.21721771359443665,
0.10442665219306946,
-0.1832178235054016,
-0.43332669138908386,
-0.03431776911020279,
0.22874470055103302,
0.5493246912956238,
-0.18374507129192352,
0.21815481781959534,
-0.0684090107679367,
0.27879124879837036,
0.09700687229633331,
0.007189374882727861,
0.015189039520919323,
-0.039401825517416,
-0.07311400026082993,
0.0862954705953598,
0.3454136550426483,
0.13077053427696228,
-0.2795253396034241,
-0.22975045442581177,
0.15355166792869568,
0.15457749366760254,
0.03454185649752617,
0.5041362643241882,
0.16885346174240112,
0.3112838864326477,
-0.22782424092292786,
-0.22247719764709473,
-0.0010515636531636119,
-0.0870433896780014,
0.024596665054559708,
-0.1389104127883911,
0.06676125526428223,
-0.15510626137256622,
0.11314947158098221,
0.029664935544133186,
0.18236838281154633,
-0.05493363365530968,
0.03797666355967522,
-0.4703134000301361,
-0.11210209876298904,
-0.16114512085914612,
0.04559117928147316,
-0.21778802573680878,
0.38897818326950073,
0.018372930586338043,
0.21641887724399567,
0.16886891424655914,
0.0016772982198745012,
-0.4289834499359131,
-0.02732064761221409,
0.19858793914318085,
0.4056888520717621,
0.2460632622241974,
-0.39869967103004456,
0.03411342203617096,
0.039931993931531906,
0.034033291041851044,
-0.3503480553627014,
0.2996905446052551,
-0.08998683840036392,
-0.0653134360909462,
0.2655141353607178,
0.37185072898864746,
-0.1533750742673874,
-0.12087994068861008,
0.7005578875541687,
0.02861017733812332,
0.055431850254535675,
-0.6280344724655151,
0.1244424507021904,
0.09479410946369171,
0.02200138010084629,
0.03630879521369934,
0.03767066076397896,
-0.2777407467365265,
0.24968400597572327,
0.23217573761940002,
-0.16257622838020325,
-0.4171721339225769,
-0.03574644401669502,
-0.23179054260253906,
0.22388489544391632,
0.04355311021208763,
-0.12953390181064606,
-0.04983144626021385,
-0.08334735035896301,
-0.004581129178404808,
0.1273031234741211,
-0.20430073142051697,
0.13451476395130157,
-0.4355446994304657,
-0.09051107615232468,
-0.29165616631507874,
0.21948710083961487,
0.3454931974411011,
-0.09882467240095139,
-0.12069167196750641,
0.10877171158790588,
0.02734474651515484,
-0.11486812680959702,
0.47004514932632446,
-0.1441158503293991,
-0.4535214602947235,
-0.18311285972595215,
-0.059068650007247925,
0.20921161770820618,
-0.20001952350139618,
0.005861783865839243,
-0.38773518800735474,
-0.00939915981143713,
0.5472254753112793,
0.2240845412015915,
0.28010839223861694,
0.06276179850101471,
0.2687346339225769,
0.32121706008911133,
0.23159365355968475,
-0.34365418553352356,
0.06821742653846741,
-0.16580680012702942,
-0.08909434080123901,
-0.24725821614265442,
-0.04331986978650093,
0.1085810735821724,
0.31871142983436584,
-0.15941829979419708,
0.23133429884910583,
0.018304605036973953,
0.17416444420814514,
0.14401590824127197,
-0.41578471660614014,
0.2020048052072525,
-0.08444716036319733,
0.3337959945201874,
0.36117637157440186,
-0.22548119723796844,
-0.07412146031856537,
0.31508952379226685,
-0.2692066431045532,
-0.1842525601387024,
-0.3749779760837555,
0.0036807602737098932,
0.22505086660385132,
0.14185956120491028,
0.21667486429214478,
0.1227135881781578,
-0.20194214582443237,
0.09386800974607468,
-0.1937175840139389,
-0.02152150869369507,
0.01805850677192211,
-0.10625215619802475,
0.21038509905338287,
0.18763165175914764,
0.13784322142601013,
-0.021283108741044998,
0.32569482922554016,
0.008056579157710075,
0.1904638558626175,
-0.08865729719400406,
-0.20060676336288452,
-0.13442298769950867,
-0.20097723603248596,
-0.16945725679397583,
0.09767886251211166,
-0.11112550646066666,
0.03426434472203255,
0.006266274955123663,
0.18836399912834167,
-0.0671534612774849,
0.15463918447494507,
0.009785706177353859,
0.13041090965270996,
0.024819390848279,
0.22295956313610077,
0.02704141102731228,
0.04041200131177902,
-0.03191553056240082,
-0.35213348269462585,
-0.3826054334640503,
-0.009547937661409378,
-0.048830050975084305,
0.10773451626300812,
-0.03649032488465309,
-0.03380788117647171,
0.0038028459530323744,
-0.3233323097229004,
-0.16794399917125702,
-0.19971002638339996,
-0.19364039599895477,
0.14637236297130585,
0.1841585785150528,
-0.18464241921901703,
0.00941335130482912,
0.08527649939060211,
0.2820975184440613,
0.22818335890769958,
-0.040727950632572174,
0.010993821546435356,
0.13795049488544464,
0.14492292702198029,
0.02498060092329979,
-0.18078681826591492,
0.10156229138374329,
0.34573906660079956,
0.02402985654771328,
0.11018897593021393,
0.08713921904563904,
-0.08934517949819565,
-0.0026633632369339466,
-0.1578214168548584,
-0.02110203355550766,
-0.46906909346580505,
-0.11797459423542023,
0.1098160520195961,
0.15473732352256775,
-0.2676028609275818,
0.008779819123446941,
0.36698445677757263,
-0.13202519714832306,
0.18892613053321838,
-0.26270660758018494,
0.11701754480600357,
0.2201855629682541,
0.11521084606647491,
0.17765606939792633,
0.3576430380344391,
0.04319993406534195,
0.48339319229125977,
0.04610631987452507,
-0.18848344683647156,
-0.008279080502688885,
-0.0426219180226326,
-0.23704631626605988,
0.2606196105480194,
-0.012986747547984123,
-0.17654433846473694,
-0.042456261813640594,
-0.1709611564874649,
0.006144480314105749,
0.014450590126216412,
-0.08496809750795364,
-0.05088343098759651,
-0.09066873043775558,
0.07857385277748108,
0.12010986357927322,
-0.15428350865840912,
0.2082444578409195,
0.04487399011850357,
0.08953899145126343,
0.07284436374902725,
-0.16855697333812714,
-0.21859890222549438,
0.2733052670955658,
0.20304566621780396,
0.369516521692276,
0.17444045841693878,
-0.06964246183633804,
0.2759251594543457,
-0.11663764715194702,
0.09076672047376633,
0.21257559955120087,
-0.2119482159614563,
-0.2506752014160156,
0.13012418150901794,
-0.06521230936050415,
-0.2402629405260086,
0.05766473710536957,
0.001047998433932662,
-0.018427925184369087,
-0.1555730551481247,
-0.19745217263698578,
0.23535653948783875,
0.07428286969661713,
-0.6374350786209106,
0.031024865806102753,
0.323823481798172,
-0.668595016002655,
-0.1501316875219345,
-0.49111664295196533,
0.20830364525318146,
-0.2677674889564514,
-0.2799621820449829,
-0.41215062141418457,
-0.11780800670385361,
-0.14405326545238495,
0.3699592053890228,
0.1819191575050354,
0.10421425104141235,
-0.013652198947966099,
0.26885178685188293,
-0.08203957229852676,
-0.20546884834766388,
-0.2499530017375946,
-0.13984477519989014,
-0.4774767756462097,
0.2721596956253052,
-0.1771361082792282,
-0.07227160036563873,
-0.08382480591535568,
-0.21980807185173035,
0.12028734385967255,
0.612079918384552,
-0.2812514305114746,
-0.14083795249462128,
0.17159025371074677,
0.1561852991580963,
-0.018434597179293633,
0.4930324852466583,
0.34539514780044556,
0.13358917832374573,
-0.20531125366687775,
-0.06897107511758804,
-0.1301414519548416,
0.4144354462623596,
0.3094618320465088,
0.03955382481217384,
0.022852785885334015,
-0.2207377701997757,
0.006521323230117559,
0.7125012874603271,
0.16873224079608917,
-0.1299007683992386,
0.07401509582996368,
-0.04932112246751785,
0.03272095322608948,
0.007056662812829018,
0.03419611230492592,
0.36987555027008057,
0.018478592857718468,
-0.12371914088726044,
0.08719826489686966,
-0.08492380380630493,
-0.6873331069946289,
-0.038030222058296204,
-0.07597123831510544,
-0.051659759134054184,
-0.08465495705604553,
0.24435622990131378,
-0.35540246963500977,
0.5332075357437134,
-0.05396982654929161,
0.12296374887228012,
-0.13334333896636963,
0.21417029201984406,
0.187668576836586,
-0.2961578369140625,
0.49048054218292236,
-0.11398423463106155,
-0.5446246862411499,
-0.26835137605667114,
0.11729571968317032,
-0.15885424613952637,
0.18561503291130066,
0.019842185080051422,
-0.2065219283103943,
-0.2938760817050934,
-0.009412609972059727,
0.29877692461013794,
0.3057129383087158,
-0.4307138919830322,
-0.0022114012390375137,
-0.16492003202438354,
-0.12629452347755432,
0.1109405905008316,
0.04446963220834732,
-0.2167629897594452,
0.23321524262428284,
-0.12510916590690613,
0.2910875976085663,
-0.03239746391773224,
0.11272799223661423,
0.18847641348838806,
-0.2587072253227234,
-0.009381071664392948,
0.015937862917780876,
0.011417848989367485,
0.03561481460928917,
-0.05813097581267357,
0.2892589271068573,
0.07637865841388702,
-0.21560317277908325,
0.38279104232788086,
-0.24580523371696472,
0.11792425811290741,
0.5514757633209229,
0.0015104538761079311,
0.1003972589969635,
0.06309757381677628,
0.21661825478076935,
-0.21211858093738556,
0.23852698504924774,
0.337944358587265,
-0.13597707450389862,
0.24394911527633667,
-0.3322429358959198,
0.19198912382125854,
-0.21523232758045197,
0.09564251452684402,
0.3376103341579437,
0.37816259264945984,
0.15654002130031586,
-0.18764381110668182,
-0.15678294003009796,
-0.13703027367591858,
-0.41499853134155273,
0.14491620659828186,
0.2848706543445587,
0.08989842236042023,
-0.06394518166780472,
-0.47735825181007385,
-0.14135150611400604,
-0.24843402206897736,
-0.21524286270141602,
0.18498334288597107,
-0.42152413725852966,
-0.2686510384082794,
0.2584216296672821,
0.27437689900398254,
0.7662138938903809,
-0.0036823817063122988,
0.09409238398075104,
0.1756208837032318,
0.3082679212093353,
0.050561707466840744,
-0.2414911389350891,
0.33797910809516907,
-0.1974785178899765,
-0.23774905502796173,
-0.07673751562833786,
-0.12530618906021118,
0.053787197917699814,
0.6896060109138489,
-0.054000113159418106,
-0.03118884563446045,
0.37881001830101013,
0.47222277522087097,
-0.16567814350128174,
-0.3329325318336487,
0.3210727870464325,
-0.00021940853912383318,
-0.1406191736459732,
0.19360294938087463,
0.3174534738063812,
0.012678650207817554,
0.025221629068255424,
-0.2497846484184265,
-0.2815767228603363,
-0.22102795541286469,
0.2753329873085022,
-0.005388343706727028,
-0.3722802698612213,
0.3607385754585266,
0.17781975865364075,
0.3081478178501129,
-0.3263483941555023,
0.4760924279689789,
-0.1613290160894394,
0.11578293144702911,
0.013609997928142548,
0.02141372300684452,
0.15865246951580048,
0.024987468495965004,
-0.02758781984448433,
0.05901466682553291,
0.14725527167320251,
-0.0358295664191246,
-0.16366586089134216,
0.17269562184810638,
-0.22722774744033813,
-0.23623833060264587,
-0.5619831681251526,
0.25183847546577454,
0.2136005163192749,
-0.0958411917090416,
-0.15277525782585144,
0.17539426684379578,
-0.28506362438201904,
0.10688859224319458,
0.18813440203666687,
-0.11437653005123138,
-0.15289154648780823,
0.5903802514076233,
0.2087925225496292,
-0.18747250735759735,
0.016455886885523796,
0.527604341506958,
0.016014128923416138,
0.2843795120716095,
0.07780462503433228,
-0.5239210724830627,
-0.11409932374954224,
-0.307562917470932,
0.05882681533694267,
0.22083647549152374,
0.14504176378250122,
0.17252449691295624,
-0.16326101124286652,
-0.20438113808631897,
-0.10027100145816803,
0.13098248839378357,
0.33510467410087585,
0.30689454078674316,
-0.18618731200695038,
-0.02813352830708027,
-0.5466020107269287,
0.15629945695400238,
-0.058108773082494736,
-0.03275855630636215,
0.17906454205513,
0.2430478036403656,
0.304360032081604,
0.19417017698287964,
-0.4460430145263672,
0.037380509078502655,
0.07385362684726715,
0.3082766532897949,
0.15885765850543976,
0.04689810052514076,
-0.06833429634571075,
-0.07480355352163315,
0.22530639171600342,
0.06477542221546173,
-0.3401898145675659,
-0.2945323884487152,
0.1296086460351944,
0.06821217387914658,
0.01800094172358513,
-0.005404963158071041,
0.15226012468338013,
-0.15239810943603516,
-0.13266383111476898,
-0.2538757920265198,
-0.020117109641432762,
-0.1173361986875534,
-0.11124138534069061,
0.22364956140518188,
0.3325323760509491,
-0.05444849655032158,
0.048380229622125626,
-0.0011318048927932978,
-0.03838822618126869,
0.010489106178283691,
-0.13918638229370117,
-0.1290186643600464,
0.09185344725847244,
-0.33210742473602295,
0.20216074585914612,
0.04092682898044586,
-0.008803226053714752,
0.17743250727653503,
0.6313282251358032,
-0.05809110030531883,
0.06285692751407623,
0.05701692774891853,
0.2478976994752884,
0.20951129496097565,
-0.46365606784820557,
0.22815605998039246,
-0.022954564541578293,
0.2995140850543976,
-0.11208561062812805,
-0.03164267539978027,
0.6195294857025146,
0.16643977165222168,
0.1602601408958435,
0.25311481952667236,
0.0663277879357338,
-0.19752423465251923,
-0.24804340302944183,
0.030789140611886978,
-0.12319449335336685,
-0.31289657950401306,
0.16497167944908142,
0.37091854214668274,
0.044334590435028076,
0.10230513662099838,
0.04445052519440651,
0.3170382082462311,
0.2850078046321869,
0.0726686418056488,
0.19580596685409546,
0.056059978902339935,
0.06143387034535408,
0.1206146776676178,
-0.05124511942267418,
-0.17480941116809845,
0.10968215763568878,
0.26648595929145813,
0.034467101097106934,
0.2208629846572876,
0.2434590458869934,
0.04361575469374657,
-0.5127515196800232,
-0.6893739700317383,
0.09451606124639511,
-0.1039707288146019,
-0.2628253102302551,
-0.008252187632024288,
0.020270252600312233,
-0.11579792946577072,
-0.21436256170272827,
0.16869619488716125,
0.041239622980356216,
0.19942335784435272,
0.8999794721603394,
-0.14754126965999603,
0.1760028600692749,
0.10451444983482361,
-0.07092273235321045,
-0.06575437635183334,
0.4546264708042145,
-0.18804627656936646,
0.04156564548611641,
-0.46247735619544983,
0.06716378778219223,
-0.08585620671510696,
0.2347431778907776,
-0.14003092050552368,
0.2876266837120056,
0.07905597239732742,
0.2436159998178482,
0.13097727298736572,
-0.05130898579955101,
-0.18797114491462708,
0.10005993396043777,
0.26661407947540283,
-0.10333053022623062,
0.3161768913269043,
0.1510026454925537,
-0.21145856380462646,
0.36036157608032227,
-0.007839195430278778,
0.3022204637527466,
0.1462443768978119,
0.1701902151107788,
0.09129489213228226,
-0.11679905652999878,
-0.0375453345477581,
-0.07982879132032394,
-0.3605795204639435,
0.16396550834178925,
-0.2629067599773407,
-0.3433399200439453,
0.18149030208587646,
-0.05027031525969505,
0.13623878359794617,
0.1905045509338379,
0.41022205352783203,
0.12708495557308197,
-0.07709554582834244,
-0.20537006855010986,
-0.2839968800544739,
-0.2011570930480957,
0.2431045025587082,
-0.1086030974984169,
0.07982377707958221,
-0.40886160731315613,
0.10797683894634247,
0.20216000080108643,
-0.044770609587430954,
-0.1441706269979477,
-0.6082401275634766,
0.0016902812058106065,
0.3201904594898224,
0.04748718440532684,
-0.0794147476553917,
-0.4039556682109833,
0.17245984077453613,
0.3015247583389282,
-0.16757699847221375,
0.2954341471195221,
-0.16134445369243622,
0.16723868250846863,
0.19734910130500793,
-0.01970910094678402,
-0.40008676052093506,
-0.08584263920783997,
0.5211647152900696,
-0.16131582856178284,
0.1931609809398651,
-0.3598874509334564,
-0.04097053036093712,
-0.04114488512277603,
0.06921601295471191,
-0.12265349179506302,
0.356887549161911,
0.09232868999242783,
0.19859816133975983,
-0.35818254947662354,
0.055685173720121384,
-0.05706815794110298,
-0.37812912464141846,
0.07932737469673157,
0.2274700254201889,
0.10465333610773087,
-0.12333414703607559,
-0.12833961844444275,
-0.20374085009098053,
0.13064856827259064,
0.341056764125824,
-0.1877012997865677,
-0.31233611702919006,
0.18065747618675232,
-0.09540829807519913,
0.26514509320259094,
-0.18803639709949493,
-0.24114857614040375,
-0.04099012166261673,
-0.053467150777578354,
0.0027331674937158823,
-0.2135593742132187,
-0.5234158635139465,
-0.23923763632774353,
0.2726324498653412,
-0.21525688469409943,
-0.4072614908218384,
0.09872182458639145,
-0.11710331588983536,
-0.11589770019054413,
-0.09407021850347519,
0.25732874870300293,
-0.2568689286708832,
-0.2019607573747635,
0.09923609346151352,
-0.28449103236198425
] |
https://github.com/huggingface/datasets/issues/2185
|
.map() and distributed training
|
Thanks @hwijeen for the workaround, feels a bit prototypical but it works! (it seems files are written twice then though)
(I haven't observed slowness using multiprocessed map function but I could be wrong)
|
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
| 33 |
.map() and distributed training
|
[
-0.21202944219112396,
-0.5038100481033325,
-0.1766359508037567,
-0.05507750064134598,
0.33732613921165466,
-0.016366643831133842,
0.3805316090583801,
0.12343519926071167,
0.44184768199920654,
0.15533435344696045,
0.029744481667876244,
0.4924279451370239,
-0.18595775961875916,
-0.010955989360809326,
0.07227134704589844,
-0.2115742266178131,
0.1267465502023697,
0.12145557254552841,
-0.3119722604751587,
-0.4715406000614166,
-0.10132420063018799,
-0.10141588747501373,
-0.33801788091659546,
0.1731644570827484,
-0.24553638696670532,
-0.30862054228782654,
-0.040440548211336136,
0.031275857239961624,
-0.18040868639945984,
-0.15813511610031128,
0.058952782303094864,
-0.20781981945037842,
-0.05194273963570595,
0.4229956865310669,
-0.00010195867798756808,
0.14346754550933838,
-0.03886542096734047,
-0.07142549753189087,
0.14583392441272736,
0.17659211158752441,
-0.21721771359443665,
0.10442665219306946,
-0.1832178235054016,
-0.43332669138908386,
-0.03431776911020279,
0.22874470055103302,
0.5493246912956238,
-0.18374507129192352,
0.21815481781959534,
-0.0684090107679367,
0.27879124879837036,
0.09700687229633331,
0.007189374882727861,
0.015189039520919323,
-0.039401825517416,
-0.07311400026082993,
0.0862954705953598,
0.3454136550426483,
0.13077053427696228,
-0.2795253396034241,
-0.22975045442581177,
0.15355166792869568,
0.15457749366760254,
0.03454185649752617,
0.5041362643241882,
0.16885346174240112,
0.3112838864326477,
-0.22782424092292786,
-0.22247719764709473,
-0.0010515636531636119,
-0.0870433896780014,
0.024596665054559708,
-0.1389104127883911,
0.06676125526428223,
-0.15510626137256622,
0.11314947158098221,
0.029664935544133186,
0.18236838281154633,
-0.05493363365530968,
0.03797666355967522,
-0.4703134000301361,
-0.11210209876298904,
-0.16114512085914612,
0.04559117928147316,
-0.21778802573680878,
0.38897818326950073,
0.018372930586338043,
0.21641887724399567,
0.16886891424655914,
0.0016772982198745012,
-0.4289834499359131,
-0.02732064761221409,
0.19858793914318085,
0.4056888520717621,
0.2460632622241974,
-0.39869967103004456,
0.03411342203617096,
0.039931993931531906,
0.034033291041851044,
-0.3503480553627014,
0.2996905446052551,
-0.08998683840036392,
-0.0653134360909462,
0.2655141353607178,
0.37185072898864746,
-0.1533750742673874,
-0.12087994068861008,
0.7005578875541687,
0.02861017733812332,
0.055431850254535675,
-0.6280344724655151,
0.1244424507021904,
0.09479410946369171,
0.02200138010084629,
0.03630879521369934,
0.03767066076397896,
-0.2777407467365265,
0.24968400597572327,
0.23217573761940002,
-0.16257622838020325,
-0.4171721339225769,
-0.03574644401669502,
-0.23179054260253906,
0.22388489544391632,
0.04355311021208763,
-0.12953390181064606,
-0.04983144626021385,
-0.08334735035896301,
-0.004581129178404808,
0.1273031234741211,
-0.20430073142051697,
0.13451476395130157,
-0.4355446994304657,
-0.09051107615232468,
-0.29165616631507874,
0.21948710083961487,
0.3454931974411011,
-0.09882467240095139,
-0.12069167196750641,
0.10877171158790588,
0.02734474651515484,
-0.11486812680959702,
0.47004514932632446,
-0.1441158503293991,
-0.4535214602947235,
-0.18311285972595215,
-0.059068650007247925,
0.20921161770820618,
-0.20001952350139618,
0.005861783865839243,
-0.38773518800735474,
-0.00939915981143713,
0.5472254753112793,
0.2240845412015915,
0.28010839223861694,
0.06276179850101471,
0.2687346339225769,
0.32121706008911133,
0.23159365355968475,
-0.34365418553352356,
0.06821742653846741,
-0.16580680012702942,
-0.08909434080123901,
-0.24725821614265442,
-0.04331986978650093,
0.1085810735821724,
0.31871142983436584,
-0.15941829979419708,
0.23133429884910583,
0.018304605036973953,
0.17416444420814514,
0.14401590824127197,
-0.41578471660614014,
0.2020048052072525,
-0.08444716036319733,
0.3337959945201874,
0.36117637157440186,
-0.22548119723796844,
-0.07412146031856537,
0.31508952379226685,
-0.2692066431045532,
-0.1842525601387024,
-0.3749779760837555,
0.0036807602737098932,
0.22505086660385132,
0.14185956120491028,
0.21667486429214478,
0.1227135881781578,
-0.20194214582443237,
0.09386800974607468,
-0.1937175840139389,
-0.02152150869369507,
0.01805850677192211,
-0.10625215619802475,
0.21038509905338287,
0.18763165175914764,
0.13784322142601013,
-0.021283108741044998,
0.32569482922554016,
0.008056579157710075,
0.1904638558626175,
-0.08865729719400406,
-0.20060676336288452,
-0.13442298769950867,
-0.20097723603248596,
-0.16945725679397583,
0.09767886251211166,
-0.11112550646066666,
0.03426434472203255,
0.006266274955123663,
0.18836399912834167,
-0.0671534612774849,
0.15463918447494507,
0.009785706177353859,
0.13041090965270996,
0.024819390848279,
0.22295956313610077,
0.02704141102731228,
0.04041200131177902,
-0.03191553056240082,
-0.35213348269462585,
-0.3826054334640503,
-0.009547937661409378,
-0.048830050975084305,
0.10773451626300812,
-0.03649032488465309,
-0.03380788117647171,
0.0038028459530323744,
-0.3233323097229004,
-0.16794399917125702,
-0.19971002638339996,
-0.19364039599895477,
0.14637236297130585,
0.1841585785150528,
-0.18464241921901703,
0.00941335130482912,
0.08527649939060211,
0.2820975184440613,
0.22818335890769958,
-0.040727950632572174,
0.010993821546435356,
0.13795049488544464,
0.14492292702198029,
0.02498060092329979,
-0.18078681826591492,
0.10156229138374329,
0.34573906660079956,
0.02402985654771328,
0.11018897593021393,
0.08713921904563904,
-0.08934517949819565,
-0.0026633632369339466,
-0.1578214168548584,
-0.02110203355550766,
-0.46906909346580505,
-0.11797459423542023,
0.1098160520195961,
0.15473732352256775,
-0.2676028609275818,
0.008779819123446941,
0.36698445677757263,
-0.13202519714832306,
0.18892613053321838,
-0.26270660758018494,
0.11701754480600357,
0.2201855629682541,
0.11521084606647491,
0.17765606939792633,
0.3576430380344391,
0.04319993406534195,
0.48339319229125977,
0.04610631987452507,
-0.18848344683647156,
-0.008279080502688885,
-0.0426219180226326,
-0.23704631626605988,
0.2606196105480194,
-0.012986747547984123,
-0.17654433846473694,
-0.042456261813640594,
-0.1709611564874649,
0.006144480314105749,
0.014450590126216412,
-0.08496809750795364,
-0.05088343098759651,
-0.09066873043775558,
0.07857385277748108,
0.12010986357927322,
-0.15428350865840912,
0.2082444578409195,
0.04487399011850357,
0.08953899145126343,
0.07284436374902725,
-0.16855697333812714,
-0.21859890222549438,
0.2733052670955658,
0.20304566621780396,
0.369516521692276,
0.17444045841693878,
-0.06964246183633804,
0.2759251594543457,
-0.11663764715194702,
0.09076672047376633,
0.21257559955120087,
-0.2119482159614563,
-0.2506752014160156,
0.13012418150901794,
-0.06521230936050415,
-0.2402629405260086,
0.05766473710536957,
0.001047998433932662,
-0.018427925184369087,
-0.1555730551481247,
-0.19745217263698578,
0.23535653948783875,
0.07428286969661713,
-0.6374350786209106,
0.031024865806102753,
0.323823481798172,
-0.668595016002655,
-0.1501316875219345,
-0.49111664295196533,
0.20830364525318146,
-0.2677674889564514,
-0.2799621820449829,
-0.41215062141418457,
-0.11780800670385361,
-0.14405326545238495,
0.3699592053890228,
0.1819191575050354,
0.10421425104141235,
-0.013652198947966099,
0.26885178685188293,
-0.08203957229852676,
-0.20546884834766388,
-0.2499530017375946,
-0.13984477519989014,
-0.4774767756462097,
0.2721596956253052,
-0.1771361082792282,
-0.07227160036563873,
-0.08382480591535568,
-0.21980807185173035,
0.12028734385967255,
0.612079918384552,
-0.2812514305114746,
-0.14083795249462128,
0.17159025371074677,
0.1561852991580963,
-0.018434597179293633,
0.4930324852466583,
0.34539514780044556,
0.13358917832374573,
-0.20531125366687775,
-0.06897107511758804,
-0.1301414519548416,
0.4144354462623596,
0.3094618320465088,
0.03955382481217384,
0.022852785885334015,
-0.2207377701997757,
0.006521323230117559,
0.7125012874603271,
0.16873224079608917,
-0.1299007683992386,
0.07401509582996368,
-0.04932112246751785,
0.03272095322608948,
0.007056662812829018,
0.03419611230492592,
0.36987555027008057,
0.018478592857718468,
-0.12371914088726044,
0.08719826489686966,
-0.08492380380630493,
-0.6873331069946289,
-0.038030222058296204,
-0.07597123831510544,
-0.051659759134054184,
-0.08465495705604553,
0.24435622990131378,
-0.35540246963500977,
0.5332075357437134,
-0.05396982654929161,
0.12296374887228012,
-0.13334333896636963,
0.21417029201984406,
0.187668576836586,
-0.2961578369140625,
0.49048054218292236,
-0.11398423463106155,
-0.5446246862411499,
-0.26835137605667114,
0.11729571968317032,
-0.15885424613952637,
0.18561503291130066,
0.019842185080051422,
-0.2065219283103943,
-0.2938760817050934,
-0.009412609972059727,
0.29877692461013794,
0.3057129383087158,
-0.4307138919830322,
-0.0022114012390375137,
-0.16492003202438354,
-0.12629452347755432,
0.1109405905008316,
0.04446963220834732,
-0.2167629897594452,
0.23321524262428284,
-0.12510916590690613,
0.2910875976085663,
-0.03239746391773224,
0.11272799223661423,
0.18847641348838806,
-0.2587072253227234,
-0.009381071664392948,
0.015937862917780876,
0.011417848989367485,
0.03561481460928917,
-0.05813097581267357,
0.2892589271068573,
0.07637865841388702,
-0.21560317277908325,
0.38279104232788086,
-0.24580523371696472,
0.11792425811290741,
0.5514757633209229,
0.0015104538761079311,
0.1003972589969635,
0.06309757381677628,
0.21661825478076935,
-0.21211858093738556,
0.23852698504924774,
0.337944358587265,
-0.13597707450389862,
0.24394911527633667,
-0.3322429358959198,
0.19198912382125854,
-0.21523232758045197,
0.09564251452684402,
0.3376103341579437,
0.37816259264945984,
0.15654002130031586,
-0.18764381110668182,
-0.15678294003009796,
-0.13703027367591858,
-0.41499853134155273,
0.14491620659828186,
0.2848706543445587,
0.08989842236042023,
-0.06394518166780472,
-0.47735825181007385,
-0.14135150611400604,
-0.24843402206897736,
-0.21524286270141602,
0.18498334288597107,
-0.42152413725852966,
-0.2686510384082794,
0.2584216296672821,
0.27437689900398254,
0.7662138938903809,
-0.0036823817063122988,
0.09409238398075104,
0.1756208837032318,
0.3082679212093353,
0.050561707466840744,
-0.2414911389350891,
0.33797910809516907,
-0.1974785178899765,
-0.23774905502796173,
-0.07673751562833786,
-0.12530618906021118,
0.053787197917699814,
0.6896060109138489,
-0.054000113159418106,
-0.03118884563446045,
0.37881001830101013,
0.47222277522087097,
-0.16567814350128174,
-0.3329325318336487,
0.3210727870464325,
-0.00021940853912383318,
-0.1406191736459732,
0.19360294938087463,
0.3174534738063812,
0.012678650207817554,
0.025221629068255424,
-0.2497846484184265,
-0.2815767228603363,
-0.22102795541286469,
0.2753329873085022,
-0.005388343706727028,
-0.3722802698612213,
0.3607385754585266,
0.17781975865364075,
0.3081478178501129,
-0.3263483941555023,
0.4760924279689789,
-0.1613290160894394,
0.11578293144702911,
0.013609997928142548,
0.02141372300684452,
0.15865246951580048,
0.024987468495965004,
-0.02758781984448433,
0.05901466682553291,
0.14725527167320251,
-0.0358295664191246,
-0.16366586089134216,
0.17269562184810638,
-0.22722774744033813,
-0.23623833060264587,
-0.5619831681251526,
0.25183847546577454,
0.2136005163192749,
-0.0958411917090416,
-0.15277525782585144,
0.17539426684379578,
-0.28506362438201904,
0.10688859224319458,
0.18813440203666687,
-0.11437653005123138,
-0.15289154648780823,
0.5903802514076233,
0.2087925225496292,
-0.18747250735759735,
0.016455886885523796,
0.527604341506958,
0.016014128923416138,
0.2843795120716095,
0.07780462503433228,
-0.5239210724830627,
-0.11409932374954224,
-0.307562917470932,
0.05882681533694267,
0.22083647549152374,
0.14504176378250122,
0.17252449691295624,
-0.16326101124286652,
-0.20438113808631897,
-0.10027100145816803,
0.13098248839378357,
0.33510467410087585,
0.30689454078674316,
-0.18618731200695038,
-0.02813352830708027,
-0.5466020107269287,
0.15629945695400238,
-0.058108773082494736,
-0.03275855630636215,
0.17906454205513,
0.2430478036403656,
0.304360032081604,
0.19417017698287964,
-0.4460430145263672,
0.037380509078502655,
0.07385362684726715,
0.3082766532897949,
0.15885765850543976,
0.04689810052514076,
-0.06833429634571075,
-0.07480355352163315,
0.22530639171600342,
0.06477542221546173,
-0.3401898145675659,
-0.2945323884487152,
0.1296086460351944,
0.06821217387914658,
0.01800094172358513,
-0.005404963158071041,
0.15226012468338013,
-0.15239810943603516,
-0.13266383111476898,
-0.2538757920265198,
-0.020117109641432762,
-0.1173361986875534,
-0.11124138534069061,
0.22364956140518188,
0.3325323760509491,
-0.05444849655032158,
0.048380229622125626,
-0.0011318048927932978,
-0.03838822618126869,
0.010489106178283691,
-0.13918638229370117,
-0.1290186643600464,
0.09185344725847244,
-0.33210742473602295,
0.20216074585914612,
0.04092682898044586,
-0.008803226053714752,
0.17743250727653503,
0.6313282251358032,
-0.05809110030531883,
0.06285692751407623,
0.05701692774891853,
0.2478976994752884,
0.20951129496097565,
-0.46365606784820557,
0.22815605998039246,
-0.022954564541578293,
0.2995140850543976,
-0.11208561062812805,
-0.03164267539978027,
0.6195294857025146,
0.16643977165222168,
0.1602601408958435,
0.25311481952667236,
0.0663277879357338,
-0.19752423465251923,
-0.24804340302944183,
0.030789140611886978,
-0.12319449335336685,
-0.31289657950401306,
0.16497167944908142,
0.37091854214668274,
0.044334590435028076,
0.10230513662099838,
0.04445052519440651,
0.3170382082462311,
0.2850078046321869,
0.0726686418056488,
0.19580596685409546,
0.056059978902339935,
0.06143387034535408,
0.1206146776676178,
-0.05124511942267418,
-0.17480941116809845,
0.10968215763568878,
0.26648595929145813,
0.034467101097106934,
0.2208629846572876,
0.2434590458869934,
0.04361575469374657,
-0.5127515196800232,
-0.6893739700317383,
0.09451606124639511,
-0.1039707288146019,
-0.2628253102302551,
-0.008252187632024288,
0.020270252600312233,
-0.11579792946577072,
-0.21436256170272827,
0.16869619488716125,
0.041239622980356216,
0.19942335784435272,
0.8999794721603394,
-0.14754126965999603,
0.1760028600692749,
0.10451444983482361,
-0.07092273235321045,
-0.06575437635183334,
0.4546264708042145,
-0.18804627656936646,
0.04156564548611641,
-0.46247735619544983,
0.06716378778219223,
-0.08585620671510696,
0.2347431778907776,
-0.14003092050552368,
0.2876266837120056,
0.07905597239732742,
0.2436159998178482,
0.13097727298736572,
-0.05130898579955101,
-0.18797114491462708,
0.10005993396043777,
0.26661407947540283,
-0.10333053022623062,
0.3161768913269043,
0.1510026454925537,
-0.21145856380462646,
0.36036157608032227,
-0.007839195430278778,
0.3022204637527466,
0.1462443768978119,
0.1701902151107788,
0.09129489213228226,
-0.11679905652999878,
-0.0375453345477581,
-0.07982879132032394,
-0.3605795204639435,
0.16396550834178925,
-0.2629067599773407,
-0.3433399200439453,
0.18149030208587646,
-0.05027031525969505,
0.13623878359794617,
0.1905045509338379,
0.41022205352783203,
0.12708495557308197,
-0.07709554582834244,
-0.20537006855010986,
-0.2839968800544739,
-0.2011570930480957,
0.2431045025587082,
-0.1086030974984169,
0.07982377707958221,
-0.40886160731315613,
0.10797683894634247,
0.20216000080108643,
-0.044770609587430954,
-0.1441706269979477,
-0.6082401275634766,
0.0016902812058106065,
0.3201904594898224,
0.04748718440532684,
-0.0794147476553917,
-0.4039556682109833,
0.17245984077453613,
0.3015247583389282,
-0.16757699847221375,
0.2954341471195221,
-0.16134445369243622,
0.16723868250846863,
0.19734910130500793,
-0.01970910094678402,
-0.40008676052093506,
-0.08584263920783997,
0.5211647152900696,
-0.16131582856178284,
0.1931609809398651,
-0.3598874509334564,
-0.04097053036093712,
-0.04114488512277603,
0.06921601295471191,
-0.12265349179506302,
0.356887549161911,
0.09232868999242783,
0.19859816133975983,
-0.35818254947662354,
0.055685173720121384,
-0.05706815794110298,
-0.37812912464141846,
0.07932737469673157,
0.2274700254201889,
0.10465333610773087,
-0.12333414703607559,
-0.12833961844444275,
-0.20374085009098053,
0.13064856827259064,
0.341056764125824,
-0.1877012997865677,
-0.31233611702919006,
0.18065747618675232,
-0.09540829807519913,
0.26514509320259094,
-0.18803639709949493,
-0.24114857614040375,
-0.04099012166261673,
-0.053467150777578354,
0.0027331674937158823,
-0.2135593742132187,
-0.5234158635139465,
-0.23923763632774353,
0.2726324498653412,
-0.21525688469409943,
-0.4072614908218384,
0.09872182458639145,
-0.11710331588983536,
-0.11589770019054413,
-0.09407021850347519,
0.25732874870300293,
-0.2568689286708832,
-0.2019607573747635,
0.09923609346151352,
-0.28449103236198425
] |
https://github.com/huggingface/datasets/issues/2185
|
.map() and distributed training
|
To my understanding, files are written twice anyhow(one after load_dataset, another aftet map). It's just that you now have it at the location where you can see, whereas it was secretlely saved at caching folder(.cache/huggingface/datasets by default)! Correct me if I'm wrong!
|
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
| 42 |
.map() and distributed training
|
[
-0.21202944219112396,
-0.5038100481033325,
-0.1766359508037567,
-0.05507750064134598,
0.33732613921165466,
-0.016366643831133842,
0.3805316090583801,
0.12343519926071167,
0.44184768199920654,
0.15533435344696045,
0.029744481667876244,
0.4924279451370239,
-0.18595775961875916,
-0.010955989360809326,
0.07227134704589844,
-0.2115742266178131,
0.1267465502023697,
0.12145557254552841,
-0.3119722604751587,
-0.4715406000614166,
-0.10132420063018799,
-0.10141588747501373,
-0.33801788091659546,
0.1731644570827484,
-0.24553638696670532,
-0.30862054228782654,
-0.040440548211336136,
0.031275857239961624,
-0.18040868639945984,
-0.15813511610031128,
0.058952782303094864,
-0.20781981945037842,
-0.05194273963570595,
0.4229956865310669,
-0.00010195867798756808,
0.14346754550933838,
-0.03886542096734047,
-0.07142549753189087,
0.14583392441272736,
0.17659211158752441,
-0.21721771359443665,
0.10442665219306946,
-0.1832178235054016,
-0.43332669138908386,
-0.03431776911020279,
0.22874470055103302,
0.5493246912956238,
-0.18374507129192352,
0.21815481781959534,
-0.0684090107679367,
0.27879124879837036,
0.09700687229633331,
0.007189374882727861,
0.015189039520919323,
-0.039401825517416,
-0.07311400026082993,
0.0862954705953598,
0.3454136550426483,
0.13077053427696228,
-0.2795253396034241,
-0.22975045442581177,
0.15355166792869568,
0.15457749366760254,
0.03454185649752617,
0.5041362643241882,
0.16885346174240112,
0.3112838864326477,
-0.22782424092292786,
-0.22247719764709473,
-0.0010515636531636119,
-0.0870433896780014,
0.024596665054559708,
-0.1389104127883911,
0.06676125526428223,
-0.15510626137256622,
0.11314947158098221,
0.029664935544133186,
0.18236838281154633,
-0.05493363365530968,
0.03797666355967522,
-0.4703134000301361,
-0.11210209876298904,
-0.16114512085914612,
0.04559117928147316,
-0.21778802573680878,
0.38897818326950073,
0.018372930586338043,
0.21641887724399567,
0.16886891424655914,
0.0016772982198745012,
-0.4289834499359131,
-0.02732064761221409,
0.19858793914318085,
0.4056888520717621,
0.2460632622241974,
-0.39869967103004456,
0.03411342203617096,
0.039931993931531906,
0.034033291041851044,
-0.3503480553627014,
0.2996905446052551,
-0.08998683840036392,
-0.0653134360909462,
0.2655141353607178,
0.37185072898864746,
-0.1533750742673874,
-0.12087994068861008,
0.7005578875541687,
0.02861017733812332,
0.055431850254535675,
-0.6280344724655151,
0.1244424507021904,
0.09479410946369171,
0.02200138010084629,
0.03630879521369934,
0.03767066076397896,
-0.2777407467365265,
0.24968400597572327,
0.23217573761940002,
-0.16257622838020325,
-0.4171721339225769,
-0.03574644401669502,
-0.23179054260253906,
0.22388489544391632,
0.04355311021208763,
-0.12953390181064606,
-0.04983144626021385,
-0.08334735035896301,
-0.004581129178404808,
0.1273031234741211,
-0.20430073142051697,
0.13451476395130157,
-0.4355446994304657,
-0.09051107615232468,
-0.29165616631507874,
0.21948710083961487,
0.3454931974411011,
-0.09882467240095139,
-0.12069167196750641,
0.10877171158790588,
0.02734474651515484,
-0.11486812680959702,
0.47004514932632446,
-0.1441158503293991,
-0.4535214602947235,
-0.18311285972595215,
-0.059068650007247925,
0.20921161770820618,
-0.20001952350139618,
0.005861783865839243,
-0.38773518800735474,
-0.00939915981143713,
0.5472254753112793,
0.2240845412015915,
0.28010839223861694,
0.06276179850101471,
0.2687346339225769,
0.32121706008911133,
0.23159365355968475,
-0.34365418553352356,
0.06821742653846741,
-0.16580680012702942,
-0.08909434080123901,
-0.24725821614265442,
-0.04331986978650093,
0.1085810735821724,
0.31871142983436584,
-0.15941829979419708,
0.23133429884910583,
0.018304605036973953,
0.17416444420814514,
0.14401590824127197,
-0.41578471660614014,
0.2020048052072525,
-0.08444716036319733,
0.3337959945201874,
0.36117637157440186,
-0.22548119723796844,
-0.07412146031856537,
0.31508952379226685,
-0.2692066431045532,
-0.1842525601387024,
-0.3749779760837555,
0.0036807602737098932,
0.22505086660385132,
0.14185956120491028,
0.21667486429214478,
0.1227135881781578,
-0.20194214582443237,
0.09386800974607468,
-0.1937175840139389,
-0.02152150869369507,
0.01805850677192211,
-0.10625215619802475,
0.21038509905338287,
0.18763165175914764,
0.13784322142601013,
-0.021283108741044998,
0.32569482922554016,
0.008056579157710075,
0.1904638558626175,
-0.08865729719400406,
-0.20060676336288452,
-0.13442298769950867,
-0.20097723603248596,
-0.16945725679397583,
0.09767886251211166,
-0.11112550646066666,
0.03426434472203255,
0.006266274955123663,
0.18836399912834167,
-0.0671534612774849,
0.15463918447494507,
0.009785706177353859,
0.13041090965270996,
0.024819390848279,
0.22295956313610077,
0.02704141102731228,
0.04041200131177902,
-0.03191553056240082,
-0.35213348269462585,
-0.3826054334640503,
-0.009547937661409378,
-0.048830050975084305,
0.10773451626300812,
-0.03649032488465309,
-0.03380788117647171,
0.0038028459530323744,
-0.3233323097229004,
-0.16794399917125702,
-0.19971002638339996,
-0.19364039599895477,
0.14637236297130585,
0.1841585785150528,
-0.18464241921901703,
0.00941335130482912,
0.08527649939060211,
0.2820975184440613,
0.22818335890769958,
-0.040727950632572174,
0.010993821546435356,
0.13795049488544464,
0.14492292702198029,
0.02498060092329979,
-0.18078681826591492,
0.10156229138374329,
0.34573906660079956,
0.02402985654771328,
0.11018897593021393,
0.08713921904563904,
-0.08934517949819565,
-0.0026633632369339466,
-0.1578214168548584,
-0.02110203355550766,
-0.46906909346580505,
-0.11797459423542023,
0.1098160520195961,
0.15473732352256775,
-0.2676028609275818,
0.008779819123446941,
0.36698445677757263,
-0.13202519714832306,
0.18892613053321838,
-0.26270660758018494,
0.11701754480600357,
0.2201855629682541,
0.11521084606647491,
0.17765606939792633,
0.3576430380344391,
0.04319993406534195,
0.48339319229125977,
0.04610631987452507,
-0.18848344683647156,
-0.008279080502688885,
-0.0426219180226326,
-0.23704631626605988,
0.2606196105480194,
-0.012986747547984123,
-0.17654433846473694,
-0.042456261813640594,
-0.1709611564874649,
0.006144480314105749,
0.014450590126216412,
-0.08496809750795364,
-0.05088343098759651,
-0.09066873043775558,
0.07857385277748108,
0.12010986357927322,
-0.15428350865840912,
0.2082444578409195,
0.04487399011850357,
0.08953899145126343,
0.07284436374902725,
-0.16855697333812714,
-0.21859890222549438,
0.2733052670955658,
0.20304566621780396,
0.369516521692276,
0.17444045841693878,
-0.06964246183633804,
0.2759251594543457,
-0.11663764715194702,
0.09076672047376633,
0.21257559955120087,
-0.2119482159614563,
-0.2506752014160156,
0.13012418150901794,
-0.06521230936050415,
-0.2402629405260086,
0.05766473710536957,
0.001047998433932662,
-0.018427925184369087,
-0.1555730551481247,
-0.19745217263698578,
0.23535653948783875,
0.07428286969661713,
-0.6374350786209106,
0.031024865806102753,
0.323823481798172,
-0.668595016002655,
-0.1501316875219345,
-0.49111664295196533,
0.20830364525318146,
-0.2677674889564514,
-0.2799621820449829,
-0.41215062141418457,
-0.11780800670385361,
-0.14405326545238495,
0.3699592053890228,
0.1819191575050354,
0.10421425104141235,
-0.013652198947966099,
0.26885178685188293,
-0.08203957229852676,
-0.20546884834766388,
-0.2499530017375946,
-0.13984477519989014,
-0.4774767756462097,
0.2721596956253052,
-0.1771361082792282,
-0.07227160036563873,
-0.08382480591535568,
-0.21980807185173035,
0.12028734385967255,
0.612079918384552,
-0.2812514305114746,
-0.14083795249462128,
0.17159025371074677,
0.1561852991580963,
-0.018434597179293633,
0.4930324852466583,
0.34539514780044556,
0.13358917832374573,
-0.20531125366687775,
-0.06897107511758804,
-0.1301414519548416,
0.4144354462623596,
0.3094618320465088,
0.03955382481217384,
0.022852785885334015,
-0.2207377701997757,
0.006521323230117559,
0.7125012874603271,
0.16873224079608917,
-0.1299007683992386,
0.07401509582996368,
-0.04932112246751785,
0.03272095322608948,
0.007056662812829018,
0.03419611230492592,
0.36987555027008057,
0.018478592857718468,
-0.12371914088726044,
0.08719826489686966,
-0.08492380380630493,
-0.6873331069946289,
-0.038030222058296204,
-0.07597123831510544,
-0.051659759134054184,
-0.08465495705604553,
0.24435622990131378,
-0.35540246963500977,
0.5332075357437134,
-0.05396982654929161,
0.12296374887228012,
-0.13334333896636963,
0.21417029201984406,
0.187668576836586,
-0.2961578369140625,
0.49048054218292236,
-0.11398423463106155,
-0.5446246862411499,
-0.26835137605667114,
0.11729571968317032,
-0.15885424613952637,
0.18561503291130066,
0.019842185080051422,
-0.2065219283103943,
-0.2938760817050934,
-0.009412609972059727,
0.29877692461013794,
0.3057129383087158,
-0.4307138919830322,
-0.0022114012390375137,
-0.16492003202438354,
-0.12629452347755432,
0.1109405905008316,
0.04446963220834732,
-0.2167629897594452,
0.23321524262428284,
-0.12510916590690613,
0.2910875976085663,
-0.03239746391773224,
0.11272799223661423,
0.18847641348838806,
-0.2587072253227234,
-0.009381071664392948,
0.015937862917780876,
0.011417848989367485,
0.03561481460928917,
-0.05813097581267357,
0.2892589271068573,
0.07637865841388702,
-0.21560317277908325,
0.38279104232788086,
-0.24580523371696472,
0.11792425811290741,
0.5514757633209229,
0.0015104538761079311,
0.1003972589969635,
0.06309757381677628,
0.21661825478076935,
-0.21211858093738556,
0.23852698504924774,
0.337944358587265,
-0.13597707450389862,
0.24394911527633667,
-0.3322429358959198,
0.19198912382125854,
-0.21523232758045197,
0.09564251452684402,
0.3376103341579437,
0.37816259264945984,
0.15654002130031586,
-0.18764381110668182,
-0.15678294003009796,
-0.13703027367591858,
-0.41499853134155273,
0.14491620659828186,
0.2848706543445587,
0.08989842236042023,
-0.06394518166780472,
-0.47735825181007385,
-0.14135150611400604,
-0.24843402206897736,
-0.21524286270141602,
0.18498334288597107,
-0.42152413725852966,
-0.2686510384082794,
0.2584216296672821,
0.27437689900398254,
0.7662138938903809,
-0.0036823817063122988,
0.09409238398075104,
0.1756208837032318,
0.3082679212093353,
0.050561707466840744,
-0.2414911389350891,
0.33797910809516907,
-0.1974785178899765,
-0.23774905502796173,
-0.07673751562833786,
-0.12530618906021118,
0.053787197917699814,
0.6896060109138489,
-0.054000113159418106,
-0.03118884563446045,
0.37881001830101013,
0.47222277522087097,
-0.16567814350128174,
-0.3329325318336487,
0.3210727870464325,
-0.00021940853912383318,
-0.1406191736459732,
0.19360294938087463,
0.3174534738063812,
0.012678650207817554,
0.025221629068255424,
-0.2497846484184265,
-0.2815767228603363,
-0.22102795541286469,
0.2753329873085022,
-0.005388343706727028,
-0.3722802698612213,
0.3607385754585266,
0.17781975865364075,
0.3081478178501129,
-0.3263483941555023,
0.4760924279689789,
-0.1613290160894394,
0.11578293144702911,
0.013609997928142548,
0.02141372300684452,
0.15865246951580048,
0.024987468495965004,
-0.02758781984448433,
0.05901466682553291,
0.14725527167320251,
-0.0358295664191246,
-0.16366586089134216,
0.17269562184810638,
-0.22722774744033813,
-0.23623833060264587,
-0.5619831681251526,
0.25183847546577454,
0.2136005163192749,
-0.0958411917090416,
-0.15277525782585144,
0.17539426684379578,
-0.28506362438201904,
0.10688859224319458,
0.18813440203666687,
-0.11437653005123138,
-0.15289154648780823,
0.5903802514076233,
0.2087925225496292,
-0.18747250735759735,
0.016455886885523796,
0.527604341506958,
0.016014128923416138,
0.2843795120716095,
0.07780462503433228,
-0.5239210724830627,
-0.11409932374954224,
-0.307562917470932,
0.05882681533694267,
0.22083647549152374,
0.14504176378250122,
0.17252449691295624,
-0.16326101124286652,
-0.20438113808631897,
-0.10027100145816803,
0.13098248839378357,
0.33510467410087585,
0.30689454078674316,
-0.18618731200695038,
-0.02813352830708027,
-0.5466020107269287,
0.15629945695400238,
-0.058108773082494736,
-0.03275855630636215,
0.17906454205513,
0.2430478036403656,
0.304360032081604,
0.19417017698287964,
-0.4460430145263672,
0.037380509078502655,
0.07385362684726715,
0.3082766532897949,
0.15885765850543976,
0.04689810052514076,
-0.06833429634571075,
-0.07480355352163315,
0.22530639171600342,
0.06477542221546173,
-0.3401898145675659,
-0.2945323884487152,
0.1296086460351944,
0.06821217387914658,
0.01800094172358513,
-0.005404963158071041,
0.15226012468338013,
-0.15239810943603516,
-0.13266383111476898,
-0.2538757920265198,
-0.020117109641432762,
-0.1173361986875534,
-0.11124138534069061,
0.22364956140518188,
0.3325323760509491,
-0.05444849655032158,
0.048380229622125626,
-0.0011318048927932978,
-0.03838822618126869,
0.010489106178283691,
-0.13918638229370117,
-0.1290186643600464,
0.09185344725847244,
-0.33210742473602295,
0.20216074585914612,
0.04092682898044586,
-0.008803226053714752,
0.17743250727653503,
0.6313282251358032,
-0.05809110030531883,
0.06285692751407623,
0.05701692774891853,
0.2478976994752884,
0.20951129496097565,
-0.46365606784820557,
0.22815605998039246,
-0.022954564541578293,
0.2995140850543976,
-0.11208561062812805,
-0.03164267539978027,
0.6195294857025146,
0.16643977165222168,
0.1602601408958435,
0.25311481952667236,
0.0663277879357338,
-0.19752423465251923,
-0.24804340302944183,
0.030789140611886978,
-0.12319449335336685,
-0.31289657950401306,
0.16497167944908142,
0.37091854214668274,
0.044334590435028076,
0.10230513662099838,
0.04445052519440651,
0.3170382082462311,
0.2850078046321869,
0.0726686418056488,
0.19580596685409546,
0.056059978902339935,
0.06143387034535408,
0.1206146776676178,
-0.05124511942267418,
-0.17480941116809845,
0.10968215763568878,
0.26648595929145813,
0.034467101097106934,
0.2208629846572876,
0.2434590458869934,
0.04361575469374657,
-0.5127515196800232,
-0.6893739700317383,
0.09451606124639511,
-0.1039707288146019,
-0.2628253102302551,
-0.008252187632024288,
0.020270252600312233,
-0.11579792946577072,
-0.21436256170272827,
0.16869619488716125,
0.041239622980356216,
0.19942335784435272,
0.8999794721603394,
-0.14754126965999603,
0.1760028600692749,
0.10451444983482361,
-0.07092273235321045,
-0.06575437635183334,
0.4546264708042145,
-0.18804627656936646,
0.04156564548611641,
-0.46247735619544983,
0.06716378778219223,
-0.08585620671510696,
0.2347431778907776,
-0.14003092050552368,
0.2876266837120056,
0.07905597239732742,
0.2436159998178482,
0.13097727298736572,
-0.05130898579955101,
-0.18797114491462708,
0.10005993396043777,
0.26661407947540283,
-0.10333053022623062,
0.3161768913269043,
0.1510026454925537,
-0.21145856380462646,
0.36036157608032227,
-0.007839195430278778,
0.3022204637527466,
0.1462443768978119,
0.1701902151107788,
0.09129489213228226,
-0.11679905652999878,
-0.0375453345477581,
-0.07982879132032394,
-0.3605795204639435,
0.16396550834178925,
-0.2629067599773407,
-0.3433399200439453,
0.18149030208587646,
-0.05027031525969505,
0.13623878359794617,
0.1905045509338379,
0.41022205352783203,
0.12708495557308197,
-0.07709554582834244,
-0.20537006855010986,
-0.2839968800544739,
-0.2011570930480957,
0.2431045025587082,
-0.1086030974984169,
0.07982377707958221,
-0.40886160731315613,
0.10797683894634247,
0.20216000080108643,
-0.044770609587430954,
-0.1441706269979477,
-0.6082401275634766,
0.0016902812058106065,
0.3201904594898224,
0.04748718440532684,
-0.0794147476553917,
-0.4039556682109833,
0.17245984077453613,
0.3015247583389282,
-0.16757699847221375,
0.2954341471195221,
-0.16134445369243622,
0.16723868250846863,
0.19734910130500793,
-0.01970910094678402,
-0.40008676052093506,
-0.08584263920783997,
0.5211647152900696,
-0.16131582856178284,
0.1931609809398651,
-0.3598874509334564,
-0.04097053036093712,
-0.04114488512277603,
0.06921601295471191,
-0.12265349179506302,
0.356887549161911,
0.09232868999242783,
0.19859816133975983,
-0.35818254947662354,
0.055685173720121384,
-0.05706815794110298,
-0.37812912464141846,
0.07932737469673157,
0.2274700254201889,
0.10465333610773087,
-0.12333414703607559,
-0.12833961844444275,
-0.20374085009098053,
0.13064856827259064,
0.341056764125824,
-0.1877012997865677,
-0.31233611702919006,
0.18065747618675232,
-0.09540829807519913,
0.26514509320259094,
-0.18803639709949493,
-0.24114857614040375,
-0.04099012166261673,
-0.053467150777578354,
0.0027331674937158823,
-0.2135593742132187,
-0.5234158635139465,
-0.23923763632774353,
0.2726324498653412,
-0.21525688469409943,
-0.4072614908218384,
0.09872182458639145,
-0.11710331588983536,
-0.11589770019054413,
-0.09407021850347519,
0.25732874870300293,
-0.2568689286708832,
-0.2019607573747635,
0.09923609346151352,
-0.28449103236198425
] |
https://github.com/huggingface/datasets/issues/2185
|
.map() and distributed training
|
So to answer my initial question, I was just doing something stupid as I was not re-giving the `preprocessing_num_workers` arguments when launching the distributed training (and it was then set to `None`). I initially thought the hash was computed only with the `tokenize_function` but it's all arguments. Thanks @lhoestq for clarifying!
|
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
| 51 |
.map() and distributed training
|
[
-0.21202944219112396,
-0.5038100481033325,
-0.1766359508037567,
-0.05507750064134598,
0.33732613921165466,
-0.016366643831133842,
0.3805316090583801,
0.12343519926071167,
0.44184768199920654,
0.15533435344696045,
0.029744481667876244,
0.4924279451370239,
-0.18595775961875916,
-0.010955989360809326,
0.07227134704589844,
-0.2115742266178131,
0.1267465502023697,
0.12145557254552841,
-0.3119722604751587,
-0.4715406000614166,
-0.10132420063018799,
-0.10141588747501373,
-0.33801788091659546,
0.1731644570827484,
-0.24553638696670532,
-0.30862054228782654,
-0.040440548211336136,
0.031275857239961624,
-0.18040868639945984,
-0.15813511610031128,
0.058952782303094864,
-0.20781981945037842,
-0.05194273963570595,
0.4229956865310669,
-0.00010195867798756808,
0.14346754550933838,
-0.03886542096734047,
-0.07142549753189087,
0.14583392441272736,
0.17659211158752441,
-0.21721771359443665,
0.10442665219306946,
-0.1832178235054016,
-0.43332669138908386,
-0.03431776911020279,
0.22874470055103302,
0.5493246912956238,
-0.18374507129192352,
0.21815481781959534,
-0.0684090107679367,
0.27879124879837036,
0.09700687229633331,
0.007189374882727861,
0.015189039520919323,
-0.039401825517416,
-0.07311400026082993,
0.0862954705953598,
0.3454136550426483,
0.13077053427696228,
-0.2795253396034241,
-0.22975045442581177,
0.15355166792869568,
0.15457749366760254,
0.03454185649752617,
0.5041362643241882,
0.16885346174240112,
0.3112838864326477,
-0.22782424092292786,
-0.22247719764709473,
-0.0010515636531636119,
-0.0870433896780014,
0.024596665054559708,
-0.1389104127883911,
0.06676125526428223,
-0.15510626137256622,
0.11314947158098221,
0.029664935544133186,
0.18236838281154633,
-0.05493363365530968,
0.03797666355967522,
-0.4703134000301361,
-0.11210209876298904,
-0.16114512085914612,
0.04559117928147316,
-0.21778802573680878,
0.38897818326950073,
0.018372930586338043,
0.21641887724399567,
0.16886891424655914,
0.0016772982198745012,
-0.4289834499359131,
-0.02732064761221409,
0.19858793914318085,
0.4056888520717621,
0.2460632622241974,
-0.39869967103004456,
0.03411342203617096,
0.039931993931531906,
0.034033291041851044,
-0.3503480553627014,
0.2996905446052551,
-0.08998683840036392,
-0.0653134360909462,
0.2655141353607178,
0.37185072898864746,
-0.1533750742673874,
-0.12087994068861008,
0.7005578875541687,
0.02861017733812332,
0.055431850254535675,
-0.6280344724655151,
0.1244424507021904,
0.09479410946369171,
0.02200138010084629,
0.03630879521369934,
0.03767066076397896,
-0.2777407467365265,
0.24968400597572327,
0.23217573761940002,
-0.16257622838020325,
-0.4171721339225769,
-0.03574644401669502,
-0.23179054260253906,
0.22388489544391632,
0.04355311021208763,
-0.12953390181064606,
-0.04983144626021385,
-0.08334735035896301,
-0.004581129178404808,
0.1273031234741211,
-0.20430073142051697,
0.13451476395130157,
-0.4355446994304657,
-0.09051107615232468,
-0.29165616631507874,
0.21948710083961487,
0.3454931974411011,
-0.09882467240095139,
-0.12069167196750641,
0.10877171158790588,
0.02734474651515484,
-0.11486812680959702,
0.47004514932632446,
-0.1441158503293991,
-0.4535214602947235,
-0.18311285972595215,
-0.059068650007247925,
0.20921161770820618,
-0.20001952350139618,
0.005861783865839243,
-0.38773518800735474,
-0.00939915981143713,
0.5472254753112793,
0.2240845412015915,
0.28010839223861694,
0.06276179850101471,
0.2687346339225769,
0.32121706008911133,
0.23159365355968475,
-0.34365418553352356,
0.06821742653846741,
-0.16580680012702942,
-0.08909434080123901,
-0.24725821614265442,
-0.04331986978650093,
0.1085810735821724,
0.31871142983436584,
-0.15941829979419708,
0.23133429884910583,
0.018304605036973953,
0.17416444420814514,
0.14401590824127197,
-0.41578471660614014,
0.2020048052072525,
-0.08444716036319733,
0.3337959945201874,
0.36117637157440186,
-0.22548119723796844,
-0.07412146031856537,
0.31508952379226685,
-0.2692066431045532,
-0.1842525601387024,
-0.3749779760837555,
0.0036807602737098932,
0.22505086660385132,
0.14185956120491028,
0.21667486429214478,
0.1227135881781578,
-0.20194214582443237,
0.09386800974607468,
-0.1937175840139389,
-0.02152150869369507,
0.01805850677192211,
-0.10625215619802475,
0.21038509905338287,
0.18763165175914764,
0.13784322142601013,
-0.021283108741044998,
0.32569482922554016,
0.008056579157710075,
0.1904638558626175,
-0.08865729719400406,
-0.20060676336288452,
-0.13442298769950867,
-0.20097723603248596,
-0.16945725679397583,
0.09767886251211166,
-0.11112550646066666,
0.03426434472203255,
0.006266274955123663,
0.18836399912834167,
-0.0671534612774849,
0.15463918447494507,
0.009785706177353859,
0.13041090965270996,
0.024819390848279,
0.22295956313610077,
0.02704141102731228,
0.04041200131177902,
-0.03191553056240082,
-0.35213348269462585,
-0.3826054334640503,
-0.009547937661409378,
-0.048830050975084305,
0.10773451626300812,
-0.03649032488465309,
-0.03380788117647171,
0.0038028459530323744,
-0.3233323097229004,
-0.16794399917125702,
-0.19971002638339996,
-0.19364039599895477,
0.14637236297130585,
0.1841585785150528,
-0.18464241921901703,
0.00941335130482912,
0.08527649939060211,
0.2820975184440613,
0.22818335890769958,
-0.040727950632572174,
0.010993821546435356,
0.13795049488544464,
0.14492292702198029,
0.02498060092329979,
-0.18078681826591492,
0.10156229138374329,
0.34573906660079956,
0.02402985654771328,
0.11018897593021393,
0.08713921904563904,
-0.08934517949819565,
-0.0026633632369339466,
-0.1578214168548584,
-0.02110203355550766,
-0.46906909346580505,
-0.11797459423542023,
0.1098160520195961,
0.15473732352256775,
-0.2676028609275818,
0.008779819123446941,
0.36698445677757263,
-0.13202519714832306,
0.18892613053321838,
-0.26270660758018494,
0.11701754480600357,
0.2201855629682541,
0.11521084606647491,
0.17765606939792633,
0.3576430380344391,
0.04319993406534195,
0.48339319229125977,
0.04610631987452507,
-0.18848344683647156,
-0.008279080502688885,
-0.0426219180226326,
-0.23704631626605988,
0.2606196105480194,
-0.012986747547984123,
-0.17654433846473694,
-0.042456261813640594,
-0.1709611564874649,
0.006144480314105749,
0.014450590126216412,
-0.08496809750795364,
-0.05088343098759651,
-0.09066873043775558,
0.07857385277748108,
0.12010986357927322,
-0.15428350865840912,
0.2082444578409195,
0.04487399011850357,
0.08953899145126343,
0.07284436374902725,
-0.16855697333812714,
-0.21859890222549438,
0.2733052670955658,
0.20304566621780396,
0.369516521692276,
0.17444045841693878,
-0.06964246183633804,
0.2759251594543457,
-0.11663764715194702,
0.09076672047376633,
0.21257559955120087,
-0.2119482159614563,
-0.2506752014160156,
0.13012418150901794,
-0.06521230936050415,
-0.2402629405260086,
0.05766473710536957,
0.001047998433932662,
-0.018427925184369087,
-0.1555730551481247,
-0.19745217263698578,
0.23535653948783875,
0.07428286969661713,
-0.6374350786209106,
0.031024865806102753,
0.323823481798172,
-0.668595016002655,
-0.1501316875219345,
-0.49111664295196533,
0.20830364525318146,
-0.2677674889564514,
-0.2799621820449829,
-0.41215062141418457,
-0.11780800670385361,
-0.14405326545238495,
0.3699592053890228,
0.1819191575050354,
0.10421425104141235,
-0.013652198947966099,
0.26885178685188293,
-0.08203957229852676,
-0.20546884834766388,
-0.2499530017375946,
-0.13984477519989014,
-0.4774767756462097,
0.2721596956253052,
-0.1771361082792282,
-0.07227160036563873,
-0.08382480591535568,
-0.21980807185173035,
0.12028734385967255,
0.612079918384552,
-0.2812514305114746,
-0.14083795249462128,
0.17159025371074677,
0.1561852991580963,
-0.018434597179293633,
0.4930324852466583,
0.34539514780044556,
0.13358917832374573,
-0.20531125366687775,
-0.06897107511758804,
-0.1301414519548416,
0.4144354462623596,
0.3094618320465088,
0.03955382481217384,
0.022852785885334015,
-0.2207377701997757,
0.006521323230117559,
0.7125012874603271,
0.16873224079608917,
-0.1299007683992386,
0.07401509582996368,
-0.04932112246751785,
0.03272095322608948,
0.007056662812829018,
0.03419611230492592,
0.36987555027008057,
0.018478592857718468,
-0.12371914088726044,
0.08719826489686966,
-0.08492380380630493,
-0.6873331069946289,
-0.038030222058296204,
-0.07597123831510544,
-0.051659759134054184,
-0.08465495705604553,
0.24435622990131378,
-0.35540246963500977,
0.5332075357437134,
-0.05396982654929161,
0.12296374887228012,
-0.13334333896636963,
0.21417029201984406,
0.187668576836586,
-0.2961578369140625,
0.49048054218292236,
-0.11398423463106155,
-0.5446246862411499,
-0.26835137605667114,
0.11729571968317032,
-0.15885424613952637,
0.18561503291130066,
0.019842185080051422,
-0.2065219283103943,
-0.2938760817050934,
-0.009412609972059727,
0.29877692461013794,
0.3057129383087158,
-0.4307138919830322,
-0.0022114012390375137,
-0.16492003202438354,
-0.12629452347755432,
0.1109405905008316,
0.04446963220834732,
-0.2167629897594452,
0.23321524262428284,
-0.12510916590690613,
0.2910875976085663,
-0.03239746391773224,
0.11272799223661423,
0.18847641348838806,
-0.2587072253227234,
-0.009381071664392948,
0.015937862917780876,
0.011417848989367485,
0.03561481460928917,
-0.05813097581267357,
0.2892589271068573,
0.07637865841388702,
-0.21560317277908325,
0.38279104232788086,
-0.24580523371696472,
0.11792425811290741,
0.5514757633209229,
0.0015104538761079311,
0.1003972589969635,
0.06309757381677628,
0.21661825478076935,
-0.21211858093738556,
0.23852698504924774,
0.337944358587265,
-0.13597707450389862,
0.24394911527633667,
-0.3322429358959198,
0.19198912382125854,
-0.21523232758045197,
0.09564251452684402,
0.3376103341579437,
0.37816259264945984,
0.15654002130031586,
-0.18764381110668182,
-0.15678294003009796,
-0.13703027367591858,
-0.41499853134155273,
0.14491620659828186,
0.2848706543445587,
0.08989842236042023,
-0.06394518166780472,
-0.47735825181007385,
-0.14135150611400604,
-0.24843402206897736,
-0.21524286270141602,
0.18498334288597107,
-0.42152413725852966,
-0.2686510384082794,
0.2584216296672821,
0.27437689900398254,
0.7662138938903809,
-0.0036823817063122988,
0.09409238398075104,
0.1756208837032318,
0.3082679212093353,
0.050561707466840744,
-0.2414911389350891,
0.33797910809516907,
-0.1974785178899765,
-0.23774905502796173,
-0.07673751562833786,
-0.12530618906021118,
0.053787197917699814,
0.6896060109138489,
-0.054000113159418106,
-0.03118884563446045,
0.37881001830101013,
0.47222277522087097,
-0.16567814350128174,
-0.3329325318336487,
0.3210727870464325,
-0.00021940853912383318,
-0.1406191736459732,
0.19360294938087463,
0.3174534738063812,
0.012678650207817554,
0.025221629068255424,
-0.2497846484184265,
-0.2815767228603363,
-0.22102795541286469,
0.2753329873085022,
-0.005388343706727028,
-0.3722802698612213,
0.3607385754585266,
0.17781975865364075,
0.3081478178501129,
-0.3263483941555023,
0.4760924279689789,
-0.1613290160894394,
0.11578293144702911,
0.013609997928142548,
0.02141372300684452,
0.15865246951580048,
0.024987468495965004,
-0.02758781984448433,
0.05901466682553291,
0.14725527167320251,
-0.0358295664191246,
-0.16366586089134216,
0.17269562184810638,
-0.22722774744033813,
-0.23623833060264587,
-0.5619831681251526,
0.25183847546577454,
0.2136005163192749,
-0.0958411917090416,
-0.15277525782585144,
0.17539426684379578,
-0.28506362438201904,
0.10688859224319458,
0.18813440203666687,
-0.11437653005123138,
-0.15289154648780823,
0.5903802514076233,
0.2087925225496292,
-0.18747250735759735,
0.016455886885523796,
0.527604341506958,
0.016014128923416138,
0.2843795120716095,
0.07780462503433228,
-0.5239210724830627,
-0.11409932374954224,
-0.307562917470932,
0.05882681533694267,
0.22083647549152374,
0.14504176378250122,
0.17252449691295624,
-0.16326101124286652,
-0.20438113808631897,
-0.10027100145816803,
0.13098248839378357,
0.33510467410087585,
0.30689454078674316,
-0.18618731200695038,
-0.02813352830708027,
-0.5466020107269287,
0.15629945695400238,
-0.058108773082494736,
-0.03275855630636215,
0.17906454205513,
0.2430478036403656,
0.304360032081604,
0.19417017698287964,
-0.4460430145263672,
0.037380509078502655,
0.07385362684726715,
0.3082766532897949,
0.15885765850543976,
0.04689810052514076,
-0.06833429634571075,
-0.07480355352163315,
0.22530639171600342,
0.06477542221546173,
-0.3401898145675659,
-0.2945323884487152,
0.1296086460351944,
0.06821217387914658,
0.01800094172358513,
-0.005404963158071041,
0.15226012468338013,
-0.15239810943603516,
-0.13266383111476898,
-0.2538757920265198,
-0.020117109641432762,
-0.1173361986875534,
-0.11124138534069061,
0.22364956140518188,
0.3325323760509491,
-0.05444849655032158,
0.048380229622125626,
-0.0011318048927932978,
-0.03838822618126869,
0.010489106178283691,
-0.13918638229370117,
-0.1290186643600464,
0.09185344725847244,
-0.33210742473602295,
0.20216074585914612,
0.04092682898044586,
-0.008803226053714752,
0.17743250727653503,
0.6313282251358032,
-0.05809110030531883,
0.06285692751407623,
0.05701692774891853,
0.2478976994752884,
0.20951129496097565,
-0.46365606784820557,
0.22815605998039246,
-0.022954564541578293,
0.2995140850543976,
-0.11208561062812805,
-0.03164267539978027,
0.6195294857025146,
0.16643977165222168,
0.1602601408958435,
0.25311481952667236,
0.0663277879357338,
-0.19752423465251923,
-0.24804340302944183,
0.030789140611886978,
-0.12319449335336685,
-0.31289657950401306,
0.16497167944908142,
0.37091854214668274,
0.044334590435028076,
0.10230513662099838,
0.04445052519440651,
0.3170382082462311,
0.2850078046321869,
0.0726686418056488,
0.19580596685409546,
0.056059978902339935,
0.06143387034535408,
0.1206146776676178,
-0.05124511942267418,
-0.17480941116809845,
0.10968215763568878,
0.26648595929145813,
0.034467101097106934,
0.2208629846572876,
0.2434590458869934,
0.04361575469374657,
-0.5127515196800232,
-0.6893739700317383,
0.09451606124639511,
-0.1039707288146019,
-0.2628253102302551,
-0.008252187632024288,
0.020270252600312233,
-0.11579792946577072,
-0.21436256170272827,
0.16869619488716125,
0.041239622980356216,
0.19942335784435272,
0.8999794721603394,
-0.14754126965999603,
0.1760028600692749,
0.10451444983482361,
-0.07092273235321045,
-0.06575437635183334,
0.4546264708042145,
-0.18804627656936646,
0.04156564548611641,
-0.46247735619544983,
0.06716378778219223,
-0.08585620671510696,
0.2347431778907776,
-0.14003092050552368,
0.2876266837120056,
0.07905597239732742,
0.2436159998178482,
0.13097727298736572,
-0.05130898579955101,
-0.18797114491462708,
0.10005993396043777,
0.26661407947540283,
-0.10333053022623062,
0.3161768913269043,
0.1510026454925537,
-0.21145856380462646,
0.36036157608032227,
-0.007839195430278778,
0.3022204637527466,
0.1462443768978119,
0.1701902151107788,
0.09129489213228226,
-0.11679905652999878,
-0.0375453345477581,
-0.07982879132032394,
-0.3605795204639435,
0.16396550834178925,
-0.2629067599773407,
-0.3433399200439453,
0.18149030208587646,
-0.05027031525969505,
0.13623878359794617,
0.1905045509338379,
0.41022205352783203,
0.12708495557308197,
-0.07709554582834244,
-0.20537006855010986,
-0.2839968800544739,
-0.2011570930480957,
0.2431045025587082,
-0.1086030974984169,
0.07982377707958221,
-0.40886160731315613,
0.10797683894634247,
0.20216000080108643,
-0.044770609587430954,
-0.1441706269979477,
-0.6082401275634766,
0.0016902812058106065,
0.3201904594898224,
0.04748718440532684,
-0.0794147476553917,
-0.4039556682109833,
0.17245984077453613,
0.3015247583389282,
-0.16757699847221375,
0.2954341471195221,
-0.16134445369243622,
0.16723868250846863,
0.19734910130500793,
-0.01970910094678402,
-0.40008676052093506,
-0.08584263920783997,
0.5211647152900696,
-0.16131582856178284,
0.1931609809398651,
-0.3598874509334564,
-0.04097053036093712,
-0.04114488512277603,
0.06921601295471191,
-0.12265349179506302,
0.356887549161911,
0.09232868999242783,
0.19859816133975983,
-0.35818254947662354,
0.055685173720121384,
-0.05706815794110298,
-0.37812912464141846,
0.07932737469673157,
0.2274700254201889,
0.10465333610773087,
-0.12333414703607559,
-0.12833961844444275,
-0.20374085009098053,
0.13064856827259064,
0.341056764125824,
-0.1877012997865677,
-0.31233611702919006,
0.18065747618675232,
-0.09540829807519913,
0.26514509320259094,
-0.18803639709949493,
-0.24114857614040375,
-0.04099012166261673,
-0.053467150777578354,
0.0027331674937158823,
-0.2135593742132187,
-0.5234158635139465,
-0.23923763632774353,
0.2726324498653412,
-0.21525688469409943,
-0.4072614908218384,
0.09872182458639145,
-0.11710331588983536,
-0.11589770019054413,
-0.09407021850347519,
0.25732874870300293,
-0.2568689286708832,
-0.2019607573747635,
0.09923609346151352,
-0.28449103236198425
] |
https://github.com/huggingface/datasets/issues/2185
|
.map() and distributed training
|
This cache process isn't really consistent. I just changed `per_device_train_batch_size` of training script and now it rebuilding the dataset cache!!!! Why?
|
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
| 21 |
.map() and distributed training
|
[
-0.21202944219112396,
-0.5038100481033325,
-0.1766359508037567,
-0.05507750064134598,
0.33732613921165466,
-0.016366643831133842,
0.3805316090583801,
0.12343519926071167,
0.44184768199920654,
0.15533435344696045,
0.029744481667876244,
0.4924279451370239,
-0.18595775961875916,
-0.010955989360809326,
0.07227134704589844,
-0.2115742266178131,
0.1267465502023697,
0.12145557254552841,
-0.3119722604751587,
-0.4715406000614166,
-0.10132420063018799,
-0.10141588747501373,
-0.33801788091659546,
0.1731644570827484,
-0.24553638696670532,
-0.30862054228782654,
-0.040440548211336136,
0.031275857239961624,
-0.18040868639945984,
-0.15813511610031128,
0.058952782303094864,
-0.20781981945037842,
-0.05194273963570595,
0.4229956865310669,
-0.00010195867798756808,
0.14346754550933838,
-0.03886542096734047,
-0.07142549753189087,
0.14583392441272736,
0.17659211158752441,
-0.21721771359443665,
0.10442665219306946,
-0.1832178235054016,
-0.43332669138908386,
-0.03431776911020279,
0.22874470055103302,
0.5493246912956238,
-0.18374507129192352,
0.21815481781959534,
-0.0684090107679367,
0.27879124879837036,
0.09700687229633331,
0.007189374882727861,
0.015189039520919323,
-0.039401825517416,
-0.07311400026082993,
0.0862954705953598,
0.3454136550426483,
0.13077053427696228,
-0.2795253396034241,
-0.22975045442581177,
0.15355166792869568,
0.15457749366760254,
0.03454185649752617,
0.5041362643241882,
0.16885346174240112,
0.3112838864326477,
-0.22782424092292786,
-0.22247719764709473,
-0.0010515636531636119,
-0.0870433896780014,
0.024596665054559708,
-0.1389104127883911,
0.06676125526428223,
-0.15510626137256622,
0.11314947158098221,
0.029664935544133186,
0.18236838281154633,
-0.05493363365530968,
0.03797666355967522,
-0.4703134000301361,
-0.11210209876298904,
-0.16114512085914612,
0.04559117928147316,
-0.21778802573680878,
0.38897818326950073,
0.018372930586338043,
0.21641887724399567,
0.16886891424655914,
0.0016772982198745012,
-0.4289834499359131,
-0.02732064761221409,
0.19858793914318085,
0.4056888520717621,
0.2460632622241974,
-0.39869967103004456,
0.03411342203617096,
0.039931993931531906,
0.034033291041851044,
-0.3503480553627014,
0.2996905446052551,
-0.08998683840036392,
-0.0653134360909462,
0.2655141353607178,
0.37185072898864746,
-0.1533750742673874,
-0.12087994068861008,
0.7005578875541687,
0.02861017733812332,
0.055431850254535675,
-0.6280344724655151,
0.1244424507021904,
0.09479410946369171,
0.02200138010084629,
0.03630879521369934,
0.03767066076397896,
-0.2777407467365265,
0.24968400597572327,
0.23217573761940002,
-0.16257622838020325,
-0.4171721339225769,
-0.03574644401669502,
-0.23179054260253906,
0.22388489544391632,
0.04355311021208763,
-0.12953390181064606,
-0.04983144626021385,
-0.08334735035896301,
-0.004581129178404808,
0.1273031234741211,
-0.20430073142051697,
0.13451476395130157,
-0.4355446994304657,
-0.09051107615232468,
-0.29165616631507874,
0.21948710083961487,
0.3454931974411011,
-0.09882467240095139,
-0.12069167196750641,
0.10877171158790588,
0.02734474651515484,
-0.11486812680959702,
0.47004514932632446,
-0.1441158503293991,
-0.4535214602947235,
-0.18311285972595215,
-0.059068650007247925,
0.20921161770820618,
-0.20001952350139618,
0.005861783865839243,
-0.38773518800735474,
-0.00939915981143713,
0.5472254753112793,
0.2240845412015915,
0.28010839223861694,
0.06276179850101471,
0.2687346339225769,
0.32121706008911133,
0.23159365355968475,
-0.34365418553352356,
0.06821742653846741,
-0.16580680012702942,
-0.08909434080123901,
-0.24725821614265442,
-0.04331986978650093,
0.1085810735821724,
0.31871142983436584,
-0.15941829979419708,
0.23133429884910583,
0.018304605036973953,
0.17416444420814514,
0.14401590824127197,
-0.41578471660614014,
0.2020048052072525,
-0.08444716036319733,
0.3337959945201874,
0.36117637157440186,
-0.22548119723796844,
-0.07412146031856537,
0.31508952379226685,
-0.2692066431045532,
-0.1842525601387024,
-0.3749779760837555,
0.0036807602737098932,
0.22505086660385132,
0.14185956120491028,
0.21667486429214478,
0.1227135881781578,
-0.20194214582443237,
0.09386800974607468,
-0.1937175840139389,
-0.02152150869369507,
0.01805850677192211,
-0.10625215619802475,
0.21038509905338287,
0.18763165175914764,
0.13784322142601013,
-0.021283108741044998,
0.32569482922554016,
0.008056579157710075,
0.1904638558626175,
-0.08865729719400406,
-0.20060676336288452,
-0.13442298769950867,
-0.20097723603248596,
-0.16945725679397583,
0.09767886251211166,
-0.11112550646066666,
0.03426434472203255,
0.006266274955123663,
0.18836399912834167,
-0.0671534612774849,
0.15463918447494507,
0.009785706177353859,
0.13041090965270996,
0.024819390848279,
0.22295956313610077,
0.02704141102731228,
0.04041200131177902,
-0.03191553056240082,
-0.35213348269462585,
-0.3826054334640503,
-0.009547937661409378,
-0.048830050975084305,
0.10773451626300812,
-0.03649032488465309,
-0.03380788117647171,
0.0038028459530323744,
-0.3233323097229004,
-0.16794399917125702,
-0.19971002638339996,
-0.19364039599895477,
0.14637236297130585,
0.1841585785150528,
-0.18464241921901703,
0.00941335130482912,
0.08527649939060211,
0.2820975184440613,
0.22818335890769958,
-0.040727950632572174,
0.010993821546435356,
0.13795049488544464,
0.14492292702198029,
0.02498060092329979,
-0.18078681826591492,
0.10156229138374329,
0.34573906660079956,
0.02402985654771328,
0.11018897593021393,
0.08713921904563904,
-0.08934517949819565,
-0.0026633632369339466,
-0.1578214168548584,
-0.02110203355550766,
-0.46906909346580505,
-0.11797459423542023,
0.1098160520195961,
0.15473732352256775,
-0.2676028609275818,
0.008779819123446941,
0.36698445677757263,
-0.13202519714832306,
0.18892613053321838,
-0.26270660758018494,
0.11701754480600357,
0.2201855629682541,
0.11521084606647491,
0.17765606939792633,
0.3576430380344391,
0.04319993406534195,
0.48339319229125977,
0.04610631987452507,
-0.18848344683647156,
-0.008279080502688885,
-0.0426219180226326,
-0.23704631626605988,
0.2606196105480194,
-0.012986747547984123,
-0.17654433846473694,
-0.042456261813640594,
-0.1709611564874649,
0.006144480314105749,
0.014450590126216412,
-0.08496809750795364,
-0.05088343098759651,
-0.09066873043775558,
0.07857385277748108,
0.12010986357927322,
-0.15428350865840912,
0.2082444578409195,
0.04487399011850357,
0.08953899145126343,
0.07284436374902725,
-0.16855697333812714,
-0.21859890222549438,
0.2733052670955658,
0.20304566621780396,
0.369516521692276,
0.17444045841693878,
-0.06964246183633804,
0.2759251594543457,
-0.11663764715194702,
0.09076672047376633,
0.21257559955120087,
-0.2119482159614563,
-0.2506752014160156,
0.13012418150901794,
-0.06521230936050415,
-0.2402629405260086,
0.05766473710536957,
0.001047998433932662,
-0.018427925184369087,
-0.1555730551481247,
-0.19745217263698578,
0.23535653948783875,
0.07428286969661713,
-0.6374350786209106,
0.031024865806102753,
0.323823481798172,
-0.668595016002655,
-0.1501316875219345,
-0.49111664295196533,
0.20830364525318146,
-0.2677674889564514,
-0.2799621820449829,
-0.41215062141418457,
-0.11780800670385361,
-0.14405326545238495,
0.3699592053890228,
0.1819191575050354,
0.10421425104141235,
-0.013652198947966099,
0.26885178685188293,
-0.08203957229852676,
-0.20546884834766388,
-0.2499530017375946,
-0.13984477519989014,
-0.4774767756462097,
0.2721596956253052,
-0.1771361082792282,
-0.07227160036563873,
-0.08382480591535568,
-0.21980807185173035,
0.12028734385967255,
0.612079918384552,
-0.2812514305114746,
-0.14083795249462128,
0.17159025371074677,
0.1561852991580963,
-0.018434597179293633,
0.4930324852466583,
0.34539514780044556,
0.13358917832374573,
-0.20531125366687775,
-0.06897107511758804,
-0.1301414519548416,
0.4144354462623596,
0.3094618320465088,
0.03955382481217384,
0.022852785885334015,
-0.2207377701997757,
0.006521323230117559,
0.7125012874603271,
0.16873224079608917,
-0.1299007683992386,
0.07401509582996368,
-0.04932112246751785,
0.03272095322608948,
0.007056662812829018,
0.03419611230492592,
0.36987555027008057,
0.018478592857718468,
-0.12371914088726044,
0.08719826489686966,
-0.08492380380630493,
-0.6873331069946289,
-0.038030222058296204,
-0.07597123831510544,
-0.051659759134054184,
-0.08465495705604553,
0.24435622990131378,
-0.35540246963500977,
0.5332075357437134,
-0.05396982654929161,
0.12296374887228012,
-0.13334333896636963,
0.21417029201984406,
0.187668576836586,
-0.2961578369140625,
0.49048054218292236,
-0.11398423463106155,
-0.5446246862411499,
-0.26835137605667114,
0.11729571968317032,
-0.15885424613952637,
0.18561503291130066,
0.019842185080051422,
-0.2065219283103943,
-0.2938760817050934,
-0.009412609972059727,
0.29877692461013794,
0.3057129383087158,
-0.4307138919830322,
-0.0022114012390375137,
-0.16492003202438354,
-0.12629452347755432,
0.1109405905008316,
0.04446963220834732,
-0.2167629897594452,
0.23321524262428284,
-0.12510916590690613,
0.2910875976085663,
-0.03239746391773224,
0.11272799223661423,
0.18847641348838806,
-0.2587072253227234,
-0.009381071664392948,
0.015937862917780876,
0.011417848989367485,
0.03561481460928917,
-0.05813097581267357,
0.2892589271068573,
0.07637865841388702,
-0.21560317277908325,
0.38279104232788086,
-0.24580523371696472,
0.11792425811290741,
0.5514757633209229,
0.0015104538761079311,
0.1003972589969635,
0.06309757381677628,
0.21661825478076935,
-0.21211858093738556,
0.23852698504924774,
0.337944358587265,
-0.13597707450389862,
0.24394911527633667,
-0.3322429358959198,
0.19198912382125854,
-0.21523232758045197,
0.09564251452684402,
0.3376103341579437,
0.37816259264945984,
0.15654002130031586,
-0.18764381110668182,
-0.15678294003009796,
-0.13703027367591858,
-0.41499853134155273,
0.14491620659828186,
0.2848706543445587,
0.08989842236042023,
-0.06394518166780472,
-0.47735825181007385,
-0.14135150611400604,
-0.24843402206897736,
-0.21524286270141602,
0.18498334288597107,
-0.42152413725852966,
-0.2686510384082794,
0.2584216296672821,
0.27437689900398254,
0.7662138938903809,
-0.0036823817063122988,
0.09409238398075104,
0.1756208837032318,
0.3082679212093353,
0.050561707466840744,
-0.2414911389350891,
0.33797910809516907,
-0.1974785178899765,
-0.23774905502796173,
-0.07673751562833786,
-0.12530618906021118,
0.053787197917699814,
0.6896060109138489,
-0.054000113159418106,
-0.03118884563446045,
0.37881001830101013,
0.47222277522087097,
-0.16567814350128174,
-0.3329325318336487,
0.3210727870464325,
-0.00021940853912383318,
-0.1406191736459732,
0.19360294938087463,
0.3174534738063812,
0.012678650207817554,
0.025221629068255424,
-0.2497846484184265,
-0.2815767228603363,
-0.22102795541286469,
0.2753329873085022,
-0.005388343706727028,
-0.3722802698612213,
0.3607385754585266,
0.17781975865364075,
0.3081478178501129,
-0.3263483941555023,
0.4760924279689789,
-0.1613290160894394,
0.11578293144702911,
0.013609997928142548,
0.02141372300684452,
0.15865246951580048,
0.024987468495965004,
-0.02758781984448433,
0.05901466682553291,
0.14725527167320251,
-0.0358295664191246,
-0.16366586089134216,
0.17269562184810638,
-0.22722774744033813,
-0.23623833060264587,
-0.5619831681251526,
0.25183847546577454,
0.2136005163192749,
-0.0958411917090416,
-0.15277525782585144,
0.17539426684379578,
-0.28506362438201904,
0.10688859224319458,
0.18813440203666687,
-0.11437653005123138,
-0.15289154648780823,
0.5903802514076233,
0.2087925225496292,
-0.18747250735759735,
0.016455886885523796,
0.527604341506958,
0.016014128923416138,
0.2843795120716095,
0.07780462503433228,
-0.5239210724830627,
-0.11409932374954224,
-0.307562917470932,
0.05882681533694267,
0.22083647549152374,
0.14504176378250122,
0.17252449691295624,
-0.16326101124286652,
-0.20438113808631897,
-0.10027100145816803,
0.13098248839378357,
0.33510467410087585,
0.30689454078674316,
-0.18618731200695038,
-0.02813352830708027,
-0.5466020107269287,
0.15629945695400238,
-0.058108773082494736,
-0.03275855630636215,
0.17906454205513,
0.2430478036403656,
0.304360032081604,
0.19417017698287964,
-0.4460430145263672,
0.037380509078502655,
0.07385362684726715,
0.3082766532897949,
0.15885765850543976,
0.04689810052514076,
-0.06833429634571075,
-0.07480355352163315,
0.22530639171600342,
0.06477542221546173,
-0.3401898145675659,
-0.2945323884487152,
0.1296086460351944,
0.06821217387914658,
0.01800094172358513,
-0.005404963158071041,
0.15226012468338013,
-0.15239810943603516,
-0.13266383111476898,
-0.2538757920265198,
-0.020117109641432762,
-0.1173361986875534,
-0.11124138534069061,
0.22364956140518188,
0.3325323760509491,
-0.05444849655032158,
0.048380229622125626,
-0.0011318048927932978,
-0.03838822618126869,
0.010489106178283691,
-0.13918638229370117,
-0.1290186643600464,
0.09185344725847244,
-0.33210742473602295,
0.20216074585914612,
0.04092682898044586,
-0.008803226053714752,
0.17743250727653503,
0.6313282251358032,
-0.05809110030531883,
0.06285692751407623,
0.05701692774891853,
0.2478976994752884,
0.20951129496097565,
-0.46365606784820557,
0.22815605998039246,
-0.022954564541578293,
0.2995140850543976,
-0.11208561062812805,
-0.03164267539978027,
0.6195294857025146,
0.16643977165222168,
0.1602601408958435,
0.25311481952667236,
0.0663277879357338,
-0.19752423465251923,
-0.24804340302944183,
0.030789140611886978,
-0.12319449335336685,
-0.31289657950401306,
0.16497167944908142,
0.37091854214668274,
0.044334590435028076,
0.10230513662099838,
0.04445052519440651,
0.3170382082462311,
0.2850078046321869,
0.0726686418056488,
0.19580596685409546,
0.056059978902339935,
0.06143387034535408,
0.1206146776676178,
-0.05124511942267418,
-0.17480941116809845,
0.10968215763568878,
0.26648595929145813,
0.034467101097106934,
0.2208629846572876,
0.2434590458869934,
0.04361575469374657,
-0.5127515196800232,
-0.6893739700317383,
0.09451606124639511,
-0.1039707288146019,
-0.2628253102302551,
-0.008252187632024288,
0.020270252600312233,
-0.11579792946577072,
-0.21436256170272827,
0.16869619488716125,
0.041239622980356216,
0.19942335784435272,
0.8999794721603394,
-0.14754126965999603,
0.1760028600692749,
0.10451444983482361,
-0.07092273235321045,
-0.06575437635183334,
0.4546264708042145,
-0.18804627656936646,
0.04156564548611641,
-0.46247735619544983,
0.06716378778219223,
-0.08585620671510696,
0.2347431778907776,
-0.14003092050552368,
0.2876266837120056,
0.07905597239732742,
0.2436159998178482,
0.13097727298736572,
-0.05130898579955101,
-0.18797114491462708,
0.10005993396043777,
0.26661407947540283,
-0.10333053022623062,
0.3161768913269043,
0.1510026454925537,
-0.21145856380462646,
0.36036157608032227,
-0.007839195430278778,
0.3022204637527466,
0.1462443768978119,
0.1701902151107788,
0.09129489213228226,
-0.11679905652999878,
-0.0375453345477581,
-0.07982879132032394,
-0.3605795204639435,
0.16396550834178925,
-0.2629067599773407,
-0.3433399200439453,
0.18149030208587646,
-0.05027031525969505,
0.13623878359794617,
0.1905045509338379,
0.41022205352783203,
0.12708495557308197,
-0.07709554582834244,
-0.20537006855010986,
-0.2839968800544739,
-0.2011570930480957,
0.2431045025587082,
-0.1086030974984169,
0.07982377707958221,
-0.40886160731315613,
0.10797683894634247,
0.20216000080108643,
-0.044770609587430954,
-0.1441706269979477,
-0.6082401275634766,
0.0016902812058106065,
0.3201904594898224,
0.04748718440532684,
-0.0794147476553917,
-0.4039556682109833,
0.17245984077453613,
0.3015247583389282,
-0.16757699847221375,
0.2954341471195221,
-0.16134445369243622,
0.16723868250846863,
0.19734910130500793,
-0.01970910094678402,
-0.40008676052093506,
-0.08584263920783997,
0.5211647152900696,
-0.16131582856178284,
0.1931609809398651,
-0.3598874509334564,
-0.04097053036093712,
-0.04114488512277603,
0.06921601295471191,
-0.12265349179506302,
0.356887549161911,
0.09232868999242783,
0.19859816133975983,
-0.35818254947662354,
0.055685173720121384,
-0.05706815794110298,
-0.37812912464141846,
0.07932737469673157,
0.2274700254201889,
0.10465333610773087,
-0.12333414703607559,
-0.12833961844444275,
-0.20374085009098053,
0.13064856827259064,
0.341056764125824,
-0.1877012997865677,
-0.31233611702919006,
0.18065747618675232,
-0.09540829807519913,
0.26514509320259094,
-0.18803639709949493,
-0.24114857614040375,
-0.04099012166261673,
-0.053467150777578354,
0.0027331674937158823,
-0.2135593742132187,
-0.5234158635139465,
-0.23923763632774353,
0.2726324498653412,
-0.21525688469409943,
-0.4072614908218384,
0.09872182458639145,
-0.11710331588983536,
-0.11589770019054413,
-0.09407021850347519,
0.25732874870300293,
-0.2568689286708832,
-0.2019607573747635,
0.09923609346151352,
-0.28449103236198425
] |
https://github.com/huggingface/datasets/issues/2185
|
.map() and distributed training
|
Hi ! A `map` function is recomputed if the code changes or if any of the variables it uses changes. Can you check that your function doesn't use `per_device_train_batch_size` or any variable that contains `per_device_train_batch_size` ?
|
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
| 36 |
.map() and distributed training
|
[
-0.21202944219112396,
-0.5038100481033325,
-0.1766359508037567,
-0.05507750064134598,
0.33732613921165466,
-0.016366643831133842,
0.3805316090583801,
0.12343519926071167,
0.44184768199920654,
0.15533435344696045,
0.029744481667876244,
0.4924279451370239,
-0.18595775961875916,
-0.010955989360809326,
0.07227134704589844,
-0.2115742266178131,
0.1267465502023697,
0.12145557254552841,
-0.3119722604751587,
-0.4715406000614166,
-0.10132420063018799,
-0.10141588747501373,
-0.33801788091659546,
0.1731644570827484,
-0.24553638696670532,
-0.30862054228782654,
-0.040440548211336136,
0.031275857239961624,
-0.18040868639945984,
-0.15813511610031128,
0.058952782303094864,
-0.20781981945037842,
-0.05194273963570595,
0.4229956865310669,
-0.00010195867798756808,
0.14346754550933838,
-0.03886542096734047,
-0.07142549753189087,
0.14583392441272736,
0.17659211158752441,
-0.21721771359443665,
0.10442665219306946,
-0.1832178235054016,
-0.43332669138908386,
-0.03431776911020279,
0.22874470055103302,
0.5493246912956238,
-0.18374507129192352,
0.21815481781959534,
-0.0684090107679367,
0.27879124879837036,
0.09700687229633331,
0.007189374882727861,
0.015189039520919323,
-0.039401825517416,
-0.07311400026082993,
0.0862954705953598,
0.3454136550426483,
0.13077053427696228,
-0.2795253396034241,
-0.22975045442581177,
0.15355166792869568,
0.15457749366760254,
0.03454185649752617,
0.5041362643241882,
0.16885346174240112,
0.3112838864326477,
-0.22782424092292786,
-0.22247719764709473,
-0.0010515636531636119,
-0.0870433896780014,
0.024596665054559708,
-0.1389104127883911,
0.06676125526428223,
-0.15510626137256622,
0.11314947158098221,
0.029664935544133186,
0.18236838281154633,
-0.05493363365530968,
0.03797666355967522,
-0.4703134000301361,
-0.11210209876298904,
-0.16114512085914612,
0.04559117928147316,
-0.21778802573680878,
0.38897818326950073,
0.018372930586338043,
0.21641887724399567,
0.16886891424655914,
0.0016772982198745012,
-0.4289834499359131,
-0.02732064761221409,
0.19858793914318085,
0.4056888520717621,
0.2460632622241974,
-0.39869967103004456,
0.03411342203617096,
0.039931993931531906,
0.034033291041851044,
-0.3503480553627014,
0.2996905446052551,
-0.08998683840036392,
-0.0653134360909462,
0.2655141353607178,
0.37185072898864746,
-0.1533750742673874,
-0.12087994068861008,
0.7005578875541687,
0.02861017733812332,
0.055431850254535675,
-0.6280344724655151,
0.1244424507021904,
0.09479410946369171,
0.02200138010084629,
0.03630879521369934,
0.03767066076397896,
-0.2777407467365265,
0.24968400597572327,
0.23217573761940002,
-0.16257622838020325,
-0.4171721339225769,
-0.03574644401669502,
-0.23179054260253906,
0.22388489544391632,
0.04355311021208763,
-0.12953390181064606,
-0.04983144626021385,
-0.08334735035896301,
-0.004581129178404808,
0.1273031234741211,
-0.20430073142051697,
0.13451476395130157,
-0.4355446994304657,
-0.09051107615232468,
-0.29165616631507874,
0.21948710083961487,
0.3454931974411011,
-0.09882467240095139,
-0.12069167196750641,
0.10877171158790588,
0.02734474651515484,
-0.11486812680959702,
0.47004514932632446,
-0.1441158503293991,
-0.4535214602947235,
-0.18311285972595215,
-0.059068650007247925,
0.20921161770820618,
-0.20001952350139618,
0.005861783865839243,
-0.38773518800735474,
-0.00939915981143713,
0.5472254753112793,
0.2240845412015915,
0.28010839223861694,
0.06276179850101471,
0.2687346339225769,
0.32121706008911133,
0.23159365355968475,
-0.34365418553352356,
0.06821742653846741,
-0.16580680012702942,
-0.08909434080123901,
-0.24725821614265442,
-0.04331986978650093,
0.1085810735821724,
0.31871142983436584,
-0.15941829979419708,
0.23133429884910583,
0.018304605036973953,
0.17416444420814514,
0.14401590824127197,
-0.41578471660614014,
0.2020048052072525,
-0.08444716036319733,
0.3337959945201874,
0.36117637157440186,
-0.22548119723796844,
-0.07412146031856537,
0.31508952379226685,
-0.2692066431045532,
-0.1842525601387024,
-0.3749779760837555,
0.0036807602737098932,
0.22505086660385132,
0.14185956120491028,
0.21667486429214478,
0.1227135881781578,
-0.20194214582443237,
0.09386800974607468,
-0.1937175840139389,
-0.02152150869369507,
0.01805850677192211,
-0.10625215619802475,
0.21038509905338287,
0.18763165175914764,
0.13784322142601013,
-0.021283108741044998,
0.32569482922554016,
0.008056579157710075,
0.1904638558626175,
-0.08865729719400406,
-0.20060676336288452,
-0.13442298769950867,
-0.20097723603248596,
-0.16945725679397583,
0.09767886251211166,
-0.11112550646066666,
0.03426434472203255,
0.006266274955123663,
0.18836399912834167,
-0.0671534612774849,
0.15463918447494507,
0.009785706177353859,
0.13041090965270996,
0.024819390848279,
0.22295956313610077,
0.02704141102731228,
0.04041200131177902,
-0.03191553056240082,
-0.35213348269462585,
-0.3826054334640503,
-0.009547937661409378,
-0.048830050975084305,
0.10773451626300812,
-0.03649032488465309,
-0.03380788117647171,
0.0038028459530323744,
-0.3233323097229004,
-0.16794399917125702,
-0.19971002638339996,
-0.19364039599895477,
0.14637236297130585,
0.1841585785150528,
-0.18464241921901703,
0.00941335130482912,
0.08527649939060211,
0.2820975184440613,
0.22818335890769958,
-0.040727950632572174,
0.010993821546435356,
0.13795049488544464,
0.14492292702198029,
0.02498060092329979,
-0.18078681826591492,
0.10156229138374329,
0.34573906660079956,
0.02402985654771328,
0.11018897593021393,
0.08713921904563904,
-0.08934517949819565,
-0.0026633632369339466,
-0.1578214168548584,
-0.02110203355550766,
-0.46906909346580505,
-0.11797459423542023,
0.1098160520195961,
0.15473732352256775,
-0.2676028609275818,
0.008779819123446941,
0.36698445677757263,
-0.13202519714832306,
0.18892613053321838,
-0.26270660758018494,
0.11701754480600357,
0.2201855629682541,
0.11521084606647491,
0.17765606939792633,
0.3576430380344391,
0.04319993406534195,
0.48339319229125977,
0.04610631987452507,
-0.18848344683647156,
-0.008279080502688885,
-0.0426219180226326,
-0.23704631626605988,
0.2606196105480194,
-0.012986747547984123,
-0.17654433846473694,
-0.042456261813640594,
-0.1709611564874649,
0.006144480314105749,
0.014450590126216412,
-0.08496809750795364,
-0.05088343098759651,
-0.09066873043775558,
0.07857385277748108,
0.12010986357927322,
-0.15428350865840912,
0.2082444578409195,
0.04487399011850357,
0.08953899145126343,
0.07284436374902725,
-0.16855697333812714,
-0.21859890222549438,
0.2733052670955658,
0.20304566621780396,
0.369516521692276,
0.17444045841693878,
-0.06964246183633804,
0.2759251594543457,
-0.11663764715194702,
0.09076672047376633,
0.21257559955120087,
-0.2119482159614563,
-0.2506752014160156,
0.13012418150901794,
-0.06521230936050415,
-0.2402629405260086,
0.05766473710536957,
0.001047998433932662,
-0.018427925184369087,
-0.1555730551481247,
-0.19745217263698578,
0.23535653948783875,
0.07428286969661713,
-0.6374350786209106,
0.031024865806102753,
0.323823481798172,
-0.668595016002655,
-0.1501316875219345,
-0.49111664295196533,
0.20830364525318146,
-0.2677674889564514,
-0.2799621820449829,
-0.41215062141418457,
-0.11780800670385361,
-0.14405326545238495,
0.3699592053890228,
0.1819191575050354,
0.10421425104141235,
-0.013652198947966099,
0.26885178685188293,
-0.08203957229852676,
-0.20546884834766388,
-0.2499530017375946,
-0.13984477519989014,
-0.4774767756462097,
0.2721596956253052,
-0.1771361082792282,
-0.07227160036563873,
-0.08382480591535568,
-0.21980807185173035,
0.12028734385967255,
0.612079918384552,
-0.2812514305114746,
-0.14083795249462128,
0.17159025371074677,
0.1561852991580963,
-0.018434597179293633,
0.4930324852466583,
0.34539514780044556,
0.13358917832374573,
-0.20531125366687775,
-0.06897107511758804,
-0.1301414519548416,
0.4144354462623596,
0.3094618320465088,
0.03955382481217384,
0.022852785885334015,
-0.2207377701997757,
0.006521323230117559,
0.7125012874603271,
0.16873224079608917,
-0.1299007683992386,
0.07401509582996368,
-0.04932112246751785,
0.03272095322608948,
0.007056662812829018,
0.03419611230492592,
0.36987555027008057,
0.018478592857718468,
-0.12371914088726044,
0.08719826489686966,
-0.08492380380630493,
-0.6873331069946289,
-0.038030222058296204,
-0.07597123831510544,
-0.051659759134054184,
-0.08465495705604553,
0.24435622990131378,
-0.35540246963500977,
0.5332075357437134,
-0.05396982654929161,
0.12296374887228012,
-0.13334333896636963,
0.21417029201984406,
0.187668576836586,
-0.2961578369140625,
0.49048054218292236,
-0.11398423463106155,
-0.5446246862411499,
-0.26835137605667114,
0.11729571968317032,
-0.15885424613952637,
0.18561503291130066,
0.019842185080051422,
-0.2065219283103943,
-0.2938760817050934,
-0.009412609972059727,
0.29877692461013794,
0.3057129383087158,
-0.4307138919830322,
-0.0022114012390375137,
-0.16492003202438354,
-0.12629452347755432,
0.1109405905008316,
0.04446963220834732,
-0.2167629897594452,
0.23321524262428284,
-0.12510916590690613,
0.2910875976085663,
-0.03239746391773224,
0.11272799223661423,
0.18847641348838806,
-0.2587072253227234,
-0.009381071664392948,
0.015937862917780876,
0.011417848989367485,
0.03561481460928917,
-0.05813097581267357,
0.2892589271068573,
0.07637865841388702,
-0.21560317277908325,
0.38279104232788086,
-0.24580523371696472,
0.11792425811290741,
0.5514757633209229,
0.0015104538761079311,
0.1003972589969635,
0.06309757381677628,
0.21661825478076935,
-0.21211858093738556,
0.23852698504924774,
0.337944358587265,
-0.13597707450389862,
0.24394911527633667,
-0.3322429358959198,
0.19198912382125854,
-0.21523232758045197,
0.09564251452684402,
0.3376103341579437,
0.37816259264945984,
0.15654002130031586,
-0.18764381110668182,
-0.15678294003009796,
-0.13703027367591858,
-0.41499853134155273,
0.14491620659828186,
0.2848706543445587,
0.08989842236042023,
-0.06394518166780472,
-0.47735825181007385,
-0.14135150611400604,
-0.24843402206897736,
-0.21524286270141602,
0.18498334288597107,
-0.42152413725852966,
-0.2686510384082794,
0.2584216296672821,
0.27437689900398254,
0.7662138938903809,
-0.0036823817063122988,
0.09409238398075104,
0.1756208837032318,
0.3082679212093353,
0.050561707466840744,
-0.2414911389350891,
0.33797910809516907,
-0.1974785178899765,
-0.23774905502796173,
-0.07673751562833786,
-0.12530618906021118,
0.053787197917699814,
0.6896060109138489,
-0.054000113159418106,
-0.03118884563446045,
0.37881001830101013,
0.47222277522087097,
-0.16567814350128174,
-0.3329325318336487,
0.3210727870464325,
-0.00021940853912383318,
-0.1406191736459732,
0.19360294938087463,
0.3174534738063812,
0.012678650207817554,
0.025221629068255424,
-0.2497846484184265,
-0.2815767228603363,
-0.22102795541286469,
0.2753329873085022,
-0.005388343706727028,
-0.3722802698612213,
0.3607385754585266,
0.17781975865364075,
0.3081478178501129,
-0.3263483941555023,
0.4760924279689789,
-0.1613290160894394,
0.11578293144702911,
0.013609997928142548,
0.02141372300684452,
0.15865246951580048,
0.024987468495965004,
-0.02758781984448433,
0.05901466682553291,
0.14725527167320251,
-0.0358295664191246,
-0.16366586089134216,
0.17269562184810638,
-0.22722774744033813,
-0.23623833060264587,
-0.5619831681251526,
0.25183847546577454,
0.2136005163192749,
-0.0958411917090416,
-0.15277525782585144,
0.17539426684379578,
-0.28506362438201904,
0.10688859224319458,
0.18813440203666687,
-0.11437653005123138,
-0.15289154648780823,
0.5903802514076233,
0.2087925225496292,
-0.18747250735759735,
0.016455886885523796,
0.527604341506958,
0.016014128923416138,
0.2843795120716095,
0.07780462503433228,
-0.5239210724830627,
-0.11409932374954224,
-0.307562917470932,
0.05882681533694267,
0.22083647549152374,
0.14504176378250122,
0.17252449691295624,
-0.16326101124286652,
-0.20438113808631897,
-0.10027100145816803,
0.13098248839378357,
0.33510467410087585,
0.30689454078674316,
-0.18618731200695038,
-0.02813352830708027,
-0.5466020107269287,
0.15629945695400238,
-0.058108773082494736,
-0.03275855630636215,
0.17906454205513,
0.2430478036403656,
0.304360032081604,
0.19417017698287964,
-0.4460430145263672,
0.037380509078502655,
0.07385362684726715,
0.3082766532897949,
0.15885765850543976,
0.04689810052514076,
-0.06833429634571075,
-0.07480355352163315,
0.22530639171600342,
0.06477542221546173,
-0.3401898145675659,
-0.2945323884487152,
0.1296086460351944,
0.06821217387914658,
0.01800094172358513,
-0.005404963158071041,
0.15226012468338013,
-0.15239810943603516,
-0.13266383111476898,
-0.2538757920265198,
-0.020117109641432762,
-0.1173361986875534,
-0.11124138534069061,
0.22364956140518188,
0.3325323760509491,
-0.05444849655032158,
0.048380229622125626,
-0.0011318048927932978,
-0.03838822618126869,
0.010489106178283691,
-0.13918638229370117,
-0.1290186643600464,
0.09185344725847244,
-0.33210742473602295,
0.20216074585914612,
0.04092682898044586,
-0.008803226053714752,
0.17743250727653503,
0.6313282251358032,
-0.05809110030531883,
0.06285692751407623,
0.05701692774891853,
0.2478976994752884,
0.20951129496097565,
-0.46365606784820557,
0.22815605998039246,
-0.022954564541578293,
0.2995140850543976,
-0.11208561062812805,
-0.03164267539978027,
0.6195294857025146,
0.16643977165222168,
0.1602601408958435,
0.25311481952667236,
0.0663277879357338,
-0.19752423465251923,
-0.24804340302944183,
0.030789140611886978,
-0.12319449335336685,
-0.31289657950401306,
0.16497167944908142,
0.37091854214668274,
0.044334590435028076,
0.10230513662099838,
0.04445052519440651,
0.3170382082462311,
0.2850078046321869,
0.0726686418056488,
0.19580596685409546,
0.056059978902339935,
0.06143387034535408,
0.1206146776676178,
-0.05124511942267418,
-0.17480941116809845,
0.10968215763568878,
0.26648595929145813,
0.034467101097106934,
0.2208629846572876,
0.2434590458869934,
0.04361575469374657,
-0.5127515196800232,
-0.6893739700317383,
0.09451606124639511,
-0.1039707288146019,
-0.2628253102302551,
-0.008252187632024288,
0.020270252600312233,
-0.11579792946577072,
-0.21436256170272827,
0.16869619488716125,
0.041239622980356216,
0.19942335784435272,
0.8999794721603394,
-0.14754126965999603,
0.1760028600692749,
0.10451444983482361,
-0.07092273235321045,
-0.06575437635183334,
0.4546264708042145,
-0.18804627656936646,
0.04156564548611641,
-0.46247735619544983,
0.06716378778219223,
-0.08585620671510696,
0.2347431778907776,
-0.14003092050552368,
0.2876266837120056,
0.07905597239732742,
0.2436159998178482,
0.13097727298736572,
-0.05130898579955101,
-0.18797114491462708,
0.10005993396043777,
0.26661407947540283,
-0.10333053022623062,
0.3161768913269043,
0.1510026454925537,
-0.21145856380462646,
0.36036157608032227,
-0.007839195430278778,
0.3022204637527466,
0.1462443768978119,
0.1701902151107788,
0.09129489213228226,
-0.11679905652999878,
-0.0375453345477581,
-0.07982879132032394,
-0.3605795204639435,
0.16396550834178925,
-0.2629067599773407,
-0.3433399200439453,
0.18149030208587646,
-0.05027031525969505,
0.13623878359794617,
0.1905045509338379,
0.41022205352783203,
0.12708495557308197,
-0.07709554582834244,
-0.20537006855010986,
-0.2839968800544739,
-0.2011570930480957,
0.2431045025587082,
-0.1086030974984169,
0.07982377707958221,
-0.40886160731315613,
0.10797683894634247,
0.20216000080108643,
-0.044770609587430954,
-0.1441706269979477,
-0.6082401275634766,
0.0016902812058106065,
0.3201904594898224,
0.04748718440532684,
-0.0794147476553917,
-0.4039556682109833,
0.17245984077453613,
0.3015247583389282,
-0.16757699847221375,
0.2954341471195221,
-0.16134445369243622,
0.16723868250846863,
0.19734910130500793,
-0.01970910094678402,
-0.40008676052093506,
-0.08584263920783997,
0.5211647152900696,
-0.16131582856178284,
0.1931609809398651,
-0.3598874509334564,
-0.04097053036093712,
-0.04114488512277603,
0.06921601295471191,
-0.12265349179506302,
0.356887549161911,
0.09232868999242783,
0.19859816133975983,
-0.35818254947662354,
0.055685173720121384,
-0.05706815794110298,
-0.37812912464141846,
0.07932737469673157,
0.2274700254201889,
0.10465333610773087,
-0.12333414703607559,
-0.12833961844444275,
-0.20374085009098053,
0.13064856827259064,
0.341056764125824,
-0.1877012997865677,
-0.31233611702919006,
0.18065747618675232,
-0.09540829807519913,
0.26514509320259094,
-0.18803639709949493,
-0.24114857614040375,
-0.04099012166261673,
-0.053467150777578354,
0.0027331674937158823,
-0.2135593742132187,
-0.5234158635139465,
-0.23923763632774353,
0.2726324498653412,
-0.21525688469409943,
-0.4072614908218384,
0.09872182458639145,
-0.11710331588983536,
-0.11589770019054413,
-0.09407021850347519,
0.25732874870300293,
-0.2568689286708832,
-0.2019607573747635,
0.09923609346151352,
-0.28449103236198425
] |
https://github.com/huggingface/datasets/issues/2185
|
.map() and distributed training
|
My code is actually a transformer's example for training t5, I modified a bit:
https://github.com/puraminy/transformers/blob/4b40877132eedb566043f83de8f1d29a84d71430/examples/flax/language-modeling/run_t5_mlm_flax.py#L614
No, it doesn't use `per_device_train_batch_size`. I remember it worked for several times and then for no reason or various reasons like the above it started to build the cache again, as if it had an expiration date (maybe), or maybe I had changed the code!
So, to get rid of these problems I saved cache with a name (was forced to not use multiple_processes, because otherwise it generates multiple files) and then I load it from this cache file.
|
Hi,
I have a question regarding distributed training and the `.map` call on a dataset.
I have a local dataset "my_custom_dataset" that I am loading with `datasets = load_from_disk(dataset_path=my_path)`.
`dataset` is then tokenized:
```python
datasets = load_from_disk(dataset_path=my_path)
[...]
def tokenize_function(examples):
return tokenizer(examples[text_column_name])
logger.info("Mapping dataset to tokenized dataset.")
tokenized_datasets = datasets.map(
tokenize_function,
batched=True,
num_proc=preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=True,
)
```
I am using 31 workers (`preprocessing_num_workers=31`) and thus it creates 31 `cache*.arrow` files in `my_path/train` (there is only a train split).
When I relaunch the script, the map is tokenization is skipped in favor of loading the 31 previously cached files, and that's perfect.
Everything so far was done by launching a **single process script**.
I now launch the same training script in **distributed mode** (`pytorch -m torch.distributed.launch --nproc_per_node 2`). However, once it reaches the map call, it re-does the tokenization... instead of loading the 31 cached files.
I tried adding the `cache_file_name` argument: `cache_file_name={"train": my_path/one_of_the_arrow_file}`, but I can't give the 31 cached files, so it probably isn't the right way to do it.
**My question: what is the best way to load cached files if they were pre-processed and dumped in multiple arrow files?** It seems automatically handled for single processes but fails on distributed training.
- I am following the same structure as the examples of transformers (more specifically [run_clm.py](https://github.com/huggingface/transformers/blob/master/examples/language-modeling/run_clm.py) in my case)
- I am using 1.5.0 version of datasets if that matters.
| 94 |
.map() and distributed training
|
[
-0.21202944219112396,
-0.5038100481033325,
-0.1766359508037567,
-0.05507750064134598,
0.33732613921165466,
-0.016366643831133842,
0.3805316090583801,
0.12343519926071167,
0.44184768199920654,
0.15533435344696045,
0.029744481667876244,
0.4924279451370239,
-0.18595775961875916,
-0.010955989360809326,
0.07227134704589844,
-0.2115742266178131,
0.1267465502023697,
0.12145557254552841,
-0.3119722604751587,
-0.4715406000614166,
-0.10132420063018799,
-0.10141588747501373,
-0.33801788091659546,
0.1731644570827484,
-0.24553638696670532,
-0.30862054228782654,
-0.040440548211336136,
0.031275857239961624,
-0.18040868639945984,
-0.15813511610031128,
0.058952782303094864,
-0.20781981945037842,
-0.05194273963570595,
0.4229956865310669,
-0.00010195867798756808,
0.14346754550933838,
-0.03886542096734047,
-0.07142549753189087,
0.14583392441272736,
0.17659211158752441,
-0.21721771359443665,
0.10442665219306946,
-0.1832178235054016,
-0.43332669138908386,
-0.03431776911020279,
0.22874470055103302,
0.5493246912956238,
-0.18374507129192352,
0.21815481781959534,
-0.0684090107679367,
0.27879124879837036,
0.09700687229633331,
0.007189374882727861,
0.015189039520919323,
-0.039401825517416,
-0.07311400026082993,
0.0862954705953598,
0.3454136550426483,
0.13077053427696228,
-0.2795253396034241,
-0.22975045442581177,
0.15355166792869568,
0.15457749366760254,
0.03454185649752617,
0.5041362643241882,
0.16885346174240112,
0.3112838864326477,
-0.22782424092292786,
-0.22247719764709473,
-0.0010515636531636119,
-0.0870433896780014,
0.024596665054559708,
-0.1389104127883911,
0.06676125526428223,
-0.15510626137256622,
0.11314947158098221,
0.029664935544133186,
0.18236838281154633,
-0.05493363365530968,
0.03797666355967522,
-0.4703134000301361,
-0.11210209876298904,
-0.16114512085914612,
0.04559117928147316,
-0.21778802573680878,
0.38897818326950073,
0.018372930586338043,
0.21641887724399567,
0.16886891424655914,
0.0016772982198745012,
-0.4289834499359131,
-0.02732064761221409,
0.19858793914318085,
0.4056888520717621,
0.2460632622241974,
-0.39869967103004456,
0.03411342203617096,
0.039931993931531906,
0.034033291041851044,
-0.3503480553627014,
0.2996905446052551,
-0.08998683840036392,
-0.0653134360909462,
0.2655141353607178,
0.37185072898864746,
-0.1533750742673874,
-0.12087994068861008,
0.7005578875541687,
0.02861017733812332,
0.055431850254535675,
-0.6280344724655151,
0.1244424507021904,
0.09479410946369171,
0.02200138010084629,
0.03630879521369934,
0.03767066076397896,
-0.2777407467365265,
0.24968400597572327,
0.23217573761940002,
-0.16257622838020325,
-0.4171721339225769,
-0.03574644401669502,
-0.23179054260253906,
0.22388489544391632,
0.04355311021208763,
-0.12953390181064606,
-0.04983144626021385,
-0.08334735035896301,
-0.004581129178404808,
0.1273031234741211,
-0.20430073142051697,
0.13451476395130157,
-0.4355446994304657,
-0.09051107615232468,
-0.29165616631507874,
0.21948710083961487,
0.3454931974411011,
-0.09882467240095139,
-0.12069167196750641,
0.10877171158790588,
0.02734474651515484,
-0.11486812680959702,
0.47004514932632446,
-0.1441158503293991,
-0.4535214602947235,
-0.18311285972595215,
-0.059068650007247925,
0.20921161770820618,
-0.20001952350139618,
0.005861783865839243,
-0.38773518800735474,
-0.00939915981143713,
0.5472254753112793,
0.2240845412015915,
0.28010839223861694,
0.06276179850101471,
0.2687346339225769,
0.32121706008911133,
0.23159365355968475,
-0.34365418553352356,
0.06821742653846741,
-0.16580680012702942,
-0.08909434080123901,
-0.24725821614265442,
-0.04331986978650093,
0.1085810735821724,
0.31871142983436584,
-0.15941829979419708,
0.23133429884910583,
0.018304605036973953,
0.17416444420814514,
0.14401590824127197,
-0.41578471660614014,
0.2020048052072525,
-0.08444716036319733,
0.3337959945201874,
0.36117637157440186,
-0.22548119723796844,
-0.07412146031856537,
0.31508952379226685,
-0.2692066431045532,
-0.1842525601387024,
-0.3749779760837555,
0.0036807602737098932,
0.22505086660385132,
0.14185956120491028,
0.21667486429214478,
0.1227135881781578,
-0.20194214582443237,
0.09386800974607468,
-0.1937175840139389,
-0.02152150869369507,
0.01805850677192211,
-0.10625215619802475,
0.21038509905338287,
0.18763165175914764,
0.13784322142601013,
-0.021283108741044998,
0.32569482922554016,
0.008056579157710075,
0.1904638558626175,
-0.08865729719400406,
-0.20060676336288452,
-0.13442298769950867,
-0.20097723603248596,
-0.16945725679397583,
0.09767886251211166,
-0.11112550646066666,
0.03426434472203255,
0.006266274955123663,
0.18836399912834167,
-0.0671534612774849,
0.15463918447494507,
0.009785706177353859,
0.13041090965270996,
0.024819390848279,
0.22295956313610077,
0.02704141102731228,
0.04041200131177902,
-0.03191553056240082,
-0.35213348269462585,
-0.3826054334640503,
-0.009547937661409378,
-0.048830050975084305,
0.10773451626300812,
-0.03649032488465309,
-0.03380788117647171,
0.0038028459530323744,
-0.3233323097229004,
-0.16794399917125702,
-0.19971002638339996,
-0.19364039599895477,
0.14637236297130585,
0.1841585785150528,
-0.18464241921901703,
0.00941335130482912,
0.08527649939060211,
0.2820975184440613,
0.22818335890769958,
-0.040727950632572174,
0.010993821546435356,
0.13795049488544464,
0.14492292702198029,
0.02498060092329979,
-0.18078681826591492,
0.10156229138374329,
0.34573906660079956,
0.02402985654771328,
0.11018897593021393,
0.08713921904563904,
-0.08934517949819565,
-0.0026633632369339466,
-0.1578214168548584,
-0.02110203355550766,
-0.46906909346580505,
-0.11797459423542023,
0.1098160520195961,
0.15473732352256775,
-0.2676028609275818,
0.008779819123446941,
0.36698445677757263,
-0.13202519714832306,
0.18892613053321838,
-0.26270660758018494,
0.11701754480600357,
0.2201855629682541,
0.11521084606647491,
0.17765606939792633,
0.3576430380344391,
0.04319993406534195,
0.48339319229125977,
0.04610631987452507,
-0.18848344683647156,
-0.008279080502688885,
-0.0426219180226326,
-0.23704631626605988,
0.2606196105480194,
-0.012986747547984123,
-0.17654433846473694,
-0.042456261813640594,
-0.1709611564874649,
0.006144480314105749,
0.014450590126216412,
-0.08496809750795364,
-0.05088343098759651,
-0.09066873043775558,
0.07857385277748108,
0.12010986357927322,
-0.15428350865840912,
0.2082444578409195,
0.04487399011850357,
0.08953899145126343,
0.07284436374902725,
-0.16855697333812714,
-0.21859890222549438,
0.2733052670955658,
0.20304566621780396,
0.369516521692276,
0.17444045841693878,
-0.06964246183633804,
0.2759251594543457,
-0.11663764715194702,
0.09076672047376633,
0.21257559955120087,
-0.2119482159614563,
-0.2506752014160156,
0.13012418150901794,
-0.06521230936050415,
-0.2402629405260086,
0.05766473710536957,
0.001047998433932662,
-0.018427925184369087,
-0.1555730551481247,
-0.19745217263698578,
0.23535653948783875,
0.07428286969661713,
-0.6374350786209106,
0.031024865806102753,
0.323823481798172,
-0.668595016002655,
-0.1501316875219345,
-0.49111664295196533,
0.20830364525318146,
-0.2677674889564514,
-0.2799621820449829,
-0.41215062141418457,
-0.11780800670385361,
-0.14405326545238495,
0.3699592053890228,
0.1819191575050354,
0.10421425104141235,
-0.013652198947966099,
0.26885178685188293,
-0.08203957229852676,
-0.20546884834766388,
-0.2499530017375946,
-0.13984477519989014,
-0.4774767756462097,
0.2721596956253052,
-0.1771361082792282,
-0.07227160036563873,
-0.08382480591535568,
-0.21980807185173035,
0.12028734385967255,
0.612079918384552,
-0.2812514305114746,
-0.14083795249462128,
0.17159025371074677,
0.1561852991580963,
-0.018434597179293633,
0.4930324852466583,
0.34539514780044556,
0.13358917832374573,
-0.20531125366687775,
-0.06897107511758804,
-0.1301414519548416,
0.4144354462623596,
0.3094618320465088,
0.03955382481217384,
0.022852785885334015,
-0.2207377701997757,
0.006521323230117559,
0.7125012874603271,
0.16873224079608917,
-0.1299007683992386,
0.07401509582996368,
-0.04932112246751785,
0.03272095322608948,
0.007056662812829018,
0.03419611230492592,
0.36987555027008057,
0.018478592857718468,
-0.12371914088726044,
0.08719826489686966,
-0.08492380380630493,
-0.6873331069946289,
-0.038030222058296204,
-0.07597123831510544,
-0.051659759134054184,
-0.08465495705604553,
0.24435622990131378,
-0.35540246963500977,
0.5332075357437134,
-0.05396982654929161,
0.12296374887228012,
-0.13334333896636963,
0.21417029201984406,
0.187668576836586,
-0.2961578369140625,
0.49048054218292236,
-0.11398423463106155,
-0.5446246862411499,
-0.26835137605667114,
0.11729571968317032,
-0.15885424613952637,
0.18561503291130066,
0.019842185080051422,
-0.2065219283103943,
-0.2938760817050934,
-0.009412609972059727,
0.29877692461013794,
0.3057129383087158,
-0.4307138919830322,
-0.0022114012390375137,
-0.16492003202438354,
-0.12629452347755432,
0.1109405905008316,
0.04446963220834732,
-0.2167629897594452,
0.23321524262428284,
-0.12510916590690613,
0.2910875976085663,
-0.03239746391773224,
0.11272799223661423,
0.18847641348838806,
-0.2587072253227234,
-0.009381071664392948,
0.015937862917780876,
0.011417848989367485,
0.03561481460928917,
-0.05813097581267357,
0.2892589271068573,
0.07637865841388702,
-0.21560317277908325,
0.38279104232788086,
-0.24580523371696472,
0.11792425811290741,
0.5514757633209229,
0.0015104538761079311,
0.1003972589969635,
0.06309757381677628,
0.21661825478076935,
-0.21211858093738556,
0.23852698504924774,
0.337944358587265,
-0.13597707450389862,
0.24394911527633667,
-0.3322429358959198,
0.19198912382125854,
-0.21523232758045197,
0.09564251452684402,
0.3376103341579437,
0.37816259264945984,
0.15654002130031586,
-0.18764381110668182,
-0.15678294003009796,
-0.13703027367591858,
-0.41499853134155273,
0.14491620659828186,
0.2848706543445587,
0.08989842236042023,
-0.06394518166780472,
-0.47735825181007385,
-0.14135150611400604,
-0.24843402206897736,
-0.21524286270141602,
0.18498334288597107,
-0.42152413725852966,
-0.2686510384082794,
0.2584216296672821,
0.27437689900398254,
0.7662138938903809,
-0.0036823817063122988,
0.09409238398075104,
0.1756208837032318,
0.3082679212093353,
0.050561707466840744,
-0.2414911389350891,
0.33797910809516907,
-0.1974785178899765,
-0.23774905502796173,
-0.07673751562833786,
-0.12530618906021118,
0.053787197917699814,
0.6896060109138489,
-0.054000113159418106,
-0.03118884563446045,
0.37881001830101013,
0.47222277522087097,
-0.16567814350128174,
-0.3329325318336487,
0.3210727870464325,
-0.00021940853912383318,
-0.1406191736459732,
0.19360294938087463,
0.3174534738063812,
0.012678650207817554,
0.025221629068255424,
-0.2497846484184265,
-0.2815767228603363,
-0.22102795541286469,
0.2753329873085022,
-0.005388343706727028,
-0.3722802698612213,
0.3607385754585266,
0.17781975865364075,
0.3081478178501129,
-0.3263483941555023,
0.4760924279689789,
-0.1613290160894394,
0.11578293144702911,
0.013609997928142548,
0.02141372300684452,
0.15865246951580048,
0.024987468495965004,
-0.02758781984448433,
0.05901466682553291,
0.14725527167320251,
-0.0358295664191246,
-0.16366586089134216,
0.17269562184810638,
-0.22722774744033813,
-0.23623833060264587,
-0.5619831681251526,
0.25183847546577454,
0.2136005163192749,
-0.0958411917090416,
-0.15277525782585144,
0.17539426684379578,
-0.28506362438201904,
0.10688859224319458,
0.18813440203666687,
-0.11437653005123138,
-0.15289154648780823,
0.5903802514076233,
0.2087925225496292,
-0.18747250735759735,
0.016455886885523796,
0.527604341506958,
0.016014128923416138,
0.2843795120716095,
0.07780462503433228,
-0.5239210724830627,
-0.11409932374954224,
-0.307562917470932,
0.05882681533694267,
0.22083647549152374,
0.14504176378250122,
0.17252449691295624,
-0.16326101124286652,
-0.20438113808631897,
-0.10027100145816803,
0.13098248839378357,
0.33510467410087585,
0.30689454078674316,
-0.18618731200695038,
-0.02813352830708027,
-0.5466020107269287,
0.15629945695400238,
-0.058108773082494736,
-0.03275855630636215,
0.17906454205513,
0.2430478036403656,
0.304360032081604,
0.19417017698287964,
-0.4460430145263672,
0.037380509078502655,
0.07385362684726715,
0.3082766532897949,
0.15885765850543976,
0.04689810052514076,
-0.06833429634571075,
-0.07480355352163315,
0.22530639171600342,
0.06477542221546173,
-0.3401898145675659,
-0.2945323884487152,
0.1296086460351944,
0.06821217387914658,
0.01800094172358513,
-0.005404963158071041,
0.15226012468338013,
-0.15239810943603516,
-0.13266383111476898,
-0.2538757920265198,
-0.020117109641432762,
-0.1173361986875534,
-0.11124138534069061,
0.22364956140518188,
0.3325323760509491,
-0.05444849655032158,
0.048380229622125626,
-0.0011318048927932978,
-0.03838822618126869,
0.010489106178283691,
-0.13918638229370117,
-0.1290186643600464,
0.09185344725847244,
-0.33210742473602295,
0.20216074585914612,
0.04092682898044586,
-0.008803226053714752,
0.17743250727653503,
0.6313282251358032,
-0.05809110030531883,
0.06285692751407623,
0.05701692774891853,
0.2478976994752884,
0.20951129496097565,
-0.46365606784820557,
0.22815605998039246,
-0.022954564541578293,
0.2995140850543976,
-0.11208561062812805,
-0.03164267539978027,
0.6195294857025146,
0.16643977165222168,
0.1602601408958435,
0.25311481952667236,
0.0663277879357338,
-0.19752423465251923,
-0.24804340302944183,
0.030789140611886978,
-0.12319449335336685,
-0.31289657950401306,
0.16497167944908142,
0.37091854214668274,
0.044334590435028076,
0.10230513662099838,
0.04445052519440651,
0.3170382082462311,
0.2850078046321869,
0.0726686418056488,
0.19580596685409546,
0.056059978902339935,
0.06143387034535408,
0.1206146776676178,
-0.05124511942267418,
-0.17480941116809845,
0.10968215763568878,
0.26648595929145813,
0.034467101097106934,
0.2208629846572876,
0.2434590458869934,
0.04361575469374657,
-0.5127515196800232,
-0.6893739700317383,
0.09451606124639511,
-0.1039707288146019,
-0.2628253102302551,
-0.008252187632024288,
0.020270252600312233,
-0.11579792946577072,
-0.21436256170272827,
0.16869619488716125,
0.041239622980356216,
0.19942335784435272,
0.8999794721603394,
-0.14754126965999603,
0.1760028600692749,
0.10451444983482361,
-0.07092273235321045,
-0.06575437635183334,
0.4546264708042145,
-0.18804627656936646,
0.04156564548611641,
-0.46247735619544983,
0.06716378778219223,
-0.08585620671510696,
0.2347431778907776,
-0.14003092050552368,
0.2876266837120056,
0.07905597239732742,
0.2436159998178482,
0.13097727298736572,
-0.05130898579955101,
-0.18797114491462708,
0.10005993396043777,
0.26661407947540283,
-0.10333053022623062,
0.3161768913269043,
0.1510026454925537,
-0.21145856380462646,
0.36036157608032227,
-0.007839195430278778,
0.3022204637527466,
0.1462443768978119,
0.1701902151107788,
0.09129489213228226,
-0.11679905652999878,
-0.0375453345477581,
-0.07982879132032394,
-0.3605795204639435,
0.16396550834178925,
-0.2629067599773407,
-0.3433399200439453,
0.18149030208587646,
-0.05027031525969505,
0.13623878359794617,
0.1905045509338379,
0.41022205352783203,
0.12708495557308197,
-0.07709554582834244,
-0.20537006855010986,
-0.2839968800544739,
-0.2011570930480957,
0.2431045025587082,
-0.1086030974984169,
0.07982377707958221,
-0.40886160731315613,
0.10797683894634247,
0.20216000080108643,
-0.044770609587430954,
-0.1441706269979477,
-0.6082401275634766,
0.0016902812058106065,
0.3201904594898224,
0.04748718440532684,
-0.0794147476553917,
-0.4039556682109833,
0.17245984077453613,
0.3015247583389282,
-0.16757699847221375,
0.2954341471195221,
-0.16134445369243622,
0.16723868250846863,
0.19734910130500793,
-0.01970910094678402,
-0.40008676052093506,
-0.08584263920783997,
0.5211647152900696,
-0.16131582856178284,
0.1931609809398651,
-0.3598874509334564,
-0.04097053036093712,
-0.04114488512277603,
0.06921601295471191,
-0.12265349179506302,
0.356887549161911,
0.09232868999242783,
0.19859816133975983,
-0.35818254947662354,
0.055685173720121384,
-0.05706815794110298,
-0.37812912464141846,
0.07932737469673157,
0.2274700254201889,
0.10465333610773087,
-0.12333414703607559,
-0.12833961844444275,
-0.20374085009098053,
0.13064856827259064,
0.341056764125824,
-0.1877012997865677,
-0.31233611702919006,
0.18065747618675232,
-0.09540829807519913,
0.26514509320259094,
-0.18803639709949493,
-0.24114857614040375,
-0.04099012166261673,
-0.053467150777578354,
0.0027331674937158823,
-0.2135593742132187,
-0.5234158635139465,
-0.23923763632774353,
0.2726324498653412,
-0.21525688469409943,
-0.4072614908218384,
0.09872182458639145,
-0.11710331588983536,
-0.11589770019054413,
-0.09407021850347519,
0.25732874870300293,
-0.2568689286708832,
-0.2019607573747635,
0.09923609346151352,
-0.28449103236198425
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
Hi ! Can you try to increase the block size ? For example
```python
block_size_10MB = 10<<20
load_dataset("json", ..., block_size=block_size_10MB)
```
The block size corresponds to how much bytes to process at a time from the input stream.
This will determine multi-threading granularity as well as the size of individual chunks in the dataset.
You can also try with bigger block sizes if needed
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 64 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
Hi @lhoestq! Thank you for your prompt reply.
I have experimented with (10<<20, 10<<28, 10<<30, 10<<33, 10<<34), since my machine has 192G of memory, but it's either the above-mentioned error or processed killed because of OOM.
Could you give me a bit of background on why block size needs to be exactly calibrated?
To my understanding, small block sized should run just fine despite its slowness..
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 66 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
We're using the JSON loader of pyarrow. It parses the file chunk by chunk to load the dataset.
This issue happens when there's no delimiter in one chunk of data. For json line, the delimiter is the end of line.
So with a big value for chunk_size this should have worked unless you have one extremely long line in your file.
Also what version of pyarrow are you using ?
FInally I wonder if it could be an issue on pyarrow's side when using big json files. (I haven't tested big json files like yours)
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 95 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
I'm using `pyarrow==3.0.0` with `datasets==1.5.0`.
Your point totally makes sense. I will check if my jsonl file contains an extremely long file and let you know.
Here are some different error messages that I got when tweaking `block_size`. I also suspect that this is related to the pyarrow... but I guess it would be wonderful if datasesets could give a clear guide on how to play with large datasets! (I am suddenly experiencing various issue when working with large datasets.. e.g. #1992 )
```python
return paj.ReadOptions(use_threads=self.use_threads, block_size=self.block_size)
File "pyarrow/_json.pyx", line 56, in pyarrow._json.ReadOptions.__init__
File "pyarrow/_json.pyx", line 81, in pyarrow._json.ReadOptions.block_size.__set__
OverflowError: value too large to convert to int32_t
```
```python
line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Exceeded maximum rows
```
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 137 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
I am getting the same error. When I tweak the block_size, I also find:
`OverflowError: value too large to convert to int32_t`
and
`pyarrow.lib.ArrowInvalid: Exceeded maximum rows`
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 27 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
I made more tests. I used a smaller dataset and I was getting the same error, which means that it was not necessarily linked to the dataset size. To make both my smaller and larger datasets work, I got rid of lists with the json file. I had the following data format:
```python
[
{'key': "a", 'value': ['one', 'two', 'three']},
{'key': "b", 'value': ['four', 'five', 'six']}
]
```
I changed to:
```python
{'key': "a", 'value': 'one\ntwo\nthree'},
{'key': "b", 'value': 'four\nfive\nsix']}
```
and that worked!
I used the following to reformat my json file:
```python
with open(file_name, "w", encoding="utf-8") as f:
for item in list_:
f.write(json.dumps(item) + "\n")
```
This works with `block_size_10MB = 10 << 20` or without specifying `block_size`.
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 120 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
Thanks @hwijeen for reporting and thanks @jpilaul for pointing this out.
Indeed, those are different JSON-like formats:
- the first one is the **standard JSON** format: all the file content is JSON-valid, thus all content is either a JSON object (between curly brackets `{...}`) or a JSON array (between square brackets `[...]`)
- the second one is called **JSON Lines**: the entire file content is not JSON-valid, but only every line (newline-delimited) is JSON-valid
Currently PyArrow only supports **JSON Lines** format:
- https://arrow.apache.org/docs/python/generated/pyarrow.json.read_json.html
> Currently only the line-delimited JSON format is supported.
- https://arrow.apache.org/docs/python/json.html
> Arrow supports reading columnar data from line-delimited JSON files.
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 104 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2181
|
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
Thanks @albertvillanova for your explanation, it is helpful to know (maybe add to docs?)!
However, the problem I described above happened when I was dealing with jsonl files 😿
Although I did not thoroughly inspect, I suspect the cause was the one extremely long document in my case.
|
Hi, thanks for the great library. I have used the brilliant library for a couple of small projects, and now using it for a fairly big project.
When loading a huge json file of 500GB, pyarrow complains as follows:
```
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 531, in incomplete_dir
yield tmp_dir
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 573, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 650, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/datasets/builder.py", line 1027, in _prepare_split
for key, table in utils.tqdm(generator, unit=" tables", leave=False, disable=not_verbose):
File "/home/user/.pyenv/versions/3.7.9/lib/python3.7/site-packages/tqdm/std.py", line 1133, in __iter__
for obj in iterable:
File "/app/.cache/huggingface/modules/datasets_modules/datasets/json/9498524fd296a6cca99c66d6c5be507d1c0991f5a814e535b507f4a66096a641/json.py", line 83, in _generate_tables
parse_options=self.config.pa_parse_options,
File "pyarrow/_json.pyx", line 247, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 122, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries (try to increase block size?)
```
When using only a small portion of the sample file, say first 100 lines, it works perfectly well..
I see that it is the error from pyarrow, but could you give me a hint or possible solutions?
#369 describes the same error and #372 claims to have fixed the issue, but I have no clue why I am still getting this one. Thanks in advance!
| 48 |
Error when loading a HUGE json file (pyarrow.lib.ArrowInvalid: straddling object straddles two block boundaries)
|
[
-0.07362496107816696,
0.09588402509689331,
-0.13991905748844147,
0.2250278890132904,
0.17964577674865723,
-0.17289811372756958,
0.0705561488866806,
0.6229325532913208,
-0.01650034636259079,
0.10956895351409912,
0.11578171700239182,
0.2445160448551178,
0.025477644056081772,
0.005429770331829786,
-0.16266247630119324,
-0.14700746536254883,
-0.03720273822546005,
0.22623588144779205,
0.017547810450196266,
0.11057929694652557,
0.029140695929527283,
0.19708703458309174,
0.07281399518251419,
0.17924635112285614,
0.048185236752033234,
-0.14272969961166382,
0.2871125638484955,
0.3293956220149994,
-0.26796194911003113,
-0.48324257135391235,
0.10851284116506577,
-0.2735070586204529,
-0.05228947475552559,
0.20218248665332794,
-0.00010395082063041627,
0.14711715281009674,
0.28197363018989563,
0.14917466044425964,
-0.06448999047279358,
0.13246430456638336,
0.27847039699554443,
-0.22598102688789368,
0.19268448650836945,
-0.08643530309200287,
0.08644291013479233,
-0.4125053286552429,
-0.27093571424484253,
0.37471508979797363,
0.5370851755142212,
0.009688698686659336,
0.2710970938205719,
0.014173288829624653,
0.1865534633398056,
0.10171853005886078,
0.49339574575424194,
-0.16019637882709503,
0.049480028450489044,
0.3797878324985504,
0.23589560389518738,
-0.09938954561948776,
-0.4519389271736145,
0.034524042159318924,
-0.1630396544933319,
0.08671066164970398,
0.1692696362733841,
-0.10469144582748413,
0.09414421021938324,
0.10998216271400452,
0.02803266979753971,
-0.03358911722898483,
0.06776118278503418,
-0.2770010232925415,
-0.11511564999818802,
-0.05883008986711502,
-0.19795605540275574,
-0.1247795969247818,
0.14429450035095215,
0.32159289717674255,
-0.11384695023298264,
0.06782017648220062,
-0.07695971429347992,
-0.01815468817949295,
-0.1739063709974289,
0.0483490452170372,
-0.1930571347475052,
0.0008338496554642916,
0.046409063041210175,
0.21009671688079834,
0.10648444294929504,
0.03751109912991524,
-0.03451691195368767,
0.08715976774692535,
-0.2259218841791153,
-0.266926646232605,
0.022578388452529907,
0.09864992648363113,
0.1321312040090561,
-0.34779995679855347,
0.26069656014442444,
0.1443863958120346,
0.2658282518386841,
0.17804524302482605,
0.2584420144557953,
0.2572923004627228,
0.35746368765830994,
-0.052806176245212555,
-0.30837252736091614,
-0.21988260746002197,
0.22075700759887695,
0.20860877633094788,
-0.05481206998229027,
0.036289893090724945,
-0.07877341657876968,
-0.35183316469192505,
-0.011454480700194836,
-0.23014968633651733,
0.13225328922271729,
-0.12278901040554047,
-0.0805162861943245,
0.16261158883571625,
-0.6306960582733154,
0.1944967657327652,
0.004525497555732727,
0.3094894289970398,
0.057646021246910095,
0.05970717594027519,
0.06693179905414581,
0.10443887859582901,
-0.07157918065786362,
0.049076277762651443,
-0.14835681021213531,
0.11301317065954208,
-0.11547011882066727,
-0.09455756843090057,
0.21441465616226196,
-0.04489349573850632,
0.1428290456533432,
0.12256854772567749,
0.1127208024263382,
-0.1331067979335785,
0.3173367977142334,
0.18969611823558807,
0.030359983444213867,
0.36303412914276123,
0.08375702053308487,
0.01452676486223936,
-0.09319312125444412,
0.005256124772131443,
-0.16049212217330933,
0.36964181065559387,
-0.06899208575487137,
-0.2233811467885971,
-0.0025347075425088406,
0.23382769525051117,
0.01268549170345068,
0.270755410194397,
0.16351261734962463,
-0.08516941964626312,
0.04214038699865341,
-0.3041958808898926,
0.14377273619174957,
-0.05823218449950218,
0.2838403880596161,
-0.29688331484794617,
0.025709299370646477,
-0.08049830049276352,
-0.5075458884239197,
0.03968239948153496,
0.364153653383255,
0.05261720344424248,
-0.13896115124225616,
0.5219210386276245,
-0.43358883261680603,
0.05406326428055763,
0.041901133954524994,
0.3293352723121643,
0.04750116169452667,
0.049085572361946106,
-0.5753465890884399,
0.3109939396381378,
-0.3861847519874573,
-0.09579258412122726,
0.14722445607185364,
-0.009959212504327297,
-0.08271633833646774,
0.1095825806260109,
0.131902277469635,
0.29584911465644836,
0.07220792025327682,
0.2827366292476654,
-0.3267735540866852,
-0.21291285753250122,
-0.09084483236074448,
0.3202672600746155,
-0.1669408082962036,
-0.4226003587245941,
-0.009386158548295498,
-0.24824388325214386,
0.04979705438017845,
-0.19020983576774597,
0.0927819237112999,
0.3390444815158844,
-0.021090257912874222,
-0.18911078572273254,
0.15341489017009735,
0.12325895577669144,
-0.47887030243873596,
-0.025764932855963707,
0.014799429103732109,
-0.08488575369119644,
-0.45325967669487,
-0.12216775119304657,
-0.0928635224699974,
0.21833090484142303,
0.09114979952573776,
0.13903096318244934,
0.2280975878238678,
-0.048914190381765366,
0.13482406735420227,
-0.09038965404033661,
-0.07859961688518524,
-0.305177241563797,
0.04566456377506256,
0.10216037184000015,
-0.0289834663271904,
0.22126133739948273,
-0.13761457800865173,
-0.35293492674827576,
0.16159889101982117,
-0.013653208501636982,
-0.0687481164932251,
-0.19465172290802002,
-0.017533475533127785,
0.14228476583957672,
-0.03034946694970131,
-0.03951767086982727,
-0.11949728429317474,
0.015271928161382675,
0.14992240071296692,
-0.23212729394435883,
0.0491328164935112,
0.15498772263526917,
0.09531506896018982,
-0.08621084690093994,
0.06198727339506149,
0.4346548616886139,
-0.09392758458852768,
0.15223827958106995,
0.2388513684272766,
-0.3599647283554077,
0.25112345814704895,
-0.18159648776054382,
-0.06434819847345352,
0.08605271577835083,
0.24581556022167206,
0.3009190261363983,
0.20386146008968353,
0.13047027587890625,
-0.18617460131645203,
-0.07236205786466599,
0.5339872241020203,
-0.10495676100254059,
-0.08431164920330048,
0.0804181843996048,
-0.11578576266765594,
-0.04794331267476082,
0.059671465307474136,
-0.10904137045145035,
-0.04804019629955292,
0.35765740275382996,
-0.07217603176832199,
-0.004521118942648172,
-0.07151878625154495,
-0.32987695932388306,
0.11288629472255707,
0.0735638216137886,
0.12955527007579803,
0.3022896349430084,
0.4953863322734833,
-0.19434569776058197,
-0.3642473816871643,
-0.1835535168647766,
0.1441633105278015,
0.08623028546571732,
-0.15707677602767944,
0.04936572536826134,
-0.03525464981794357,
0.10929599404335022,
0.04002757370471954,
-0.5137231349945068,
0.0018156298901885748,
-0.07690532505512238,
0.15310131013393402,
0.35906755924224854,
-0.428019255399704,
0.13950999081134796,
0.10835228860378265,
0.15324978530406952,
0.12129034101963043,
-0.09765999764204025,
0.054796360433101654,
-0.472709596157074,
-0.1562749445438385,
0.11854670196771622,
0.3146038353443146,
0.1762022078037262,
0.12780985236167908,
0.23254422843456268,
0.14791053533554077,
0.06208893284201622,
-0.27048519253730774,
0.2086820900440216,
0.09038330614566803,
-0.12565353512763977,
-0.010580670088529587,
0.17093227803707123,
-0.14518201351165771,
-0.428934246301651,
0.2752108871936798,
-0.12455925345420837,
-0.3249506950378418,
0.35601282119750977,
-0.17557482421398163,
-0.051450252532958984,
-0.2883757948875427,
-0.09857706725597382,
0.2465711534023285,
-0.4192773103713989,
0.4499775469303131,
-0.031216463074088097,
0.055301420390605927,
-0.256840318441391,
0.3196948766708374,
0.19815166294574738,
-0.00017434509936720133,
0.09310907870531082,
0.10966482013463974,
-0.23176802694797516,
0.14948929846286774,
-0.14449594914913177,
-0.2802259027957916,
0.03713943436741829,
-0.08248047530651093,
-0.015878409147262573,
0.24261488020420074,
-0.46491920948028564,
-0.024798167869448662,
-0.18893387913703918,
0.4018977880477905,
-0.23747165501117706,
-0.1978493183851242,
0.24912451207637787,
0.2431725114583969,
-0.22682739794254303,
0.054870110005140305,
-0.20522451400756836,
0.22817644476890564,
-0.1550108790397644,
0.021321061998605728,
-0.2752619683742523,
0.5081446170806885,
0.0343238040804863,
0.5936533212661743,
-0.30404677987098694,
-0.12498518079519272,
0.22798526287078857,
0.11726997047662735,
0.1362944394350052,
-0.06735445559024811,
0.06464792788028717,
-0.07769642770290375,
-0.09746995568275452,
-0.1303192675113678,
0.044944215565919876,
0.08588220179080963,
-0.2905745208263397,
0.11540807038545609,
-0.06921862810850143,
-0.2507222890853882,
-0.18337391316890717,
0.29769235849380493,
0.31288814544677734,
-0.2526131570339203,
-0.10976943373680115,
-0.14084723591804504,
-0.06402674317359924,
0.10159158706665039,
0.16657014191150665,
-0.10398527979850769,
-0.10694791376590729,
0.00016582805255893618,
-0.004319319501519203,
-0.2833590507507324,
-0.07950232923030853,
0.028210623189806938,
0.2565746605396271,
-0.21915364265441895,
0.06280208379030228,
-0.12319290637969971,
0.12397144734859467,
-0.6248476505279541,
0.6584805846214294,
0.32456567883491516,
0.19097571074962616,
0.13038919866085052,
-0.01954953372478485,
-0.37506479024887085,
0.010971387848258018,
-0.14818018674850464,
0.19466441869735718,
0.48756712675094604,
0.16491854190826416,
-0.41113394498825073,
-0.02648824080824852,
-0.1361960917711258,
0.1818767935037613,
0.0631680116057396,
-0.2803594172000885,
-0.43353596329689026,
-0.5037432909011841,
-0.5971443057060242,
0.012414052151143551,
0.20618097484111786,
0.056774795055389404,
0.09823162108659744,
-0.21025115251541138,
0.08124912530183792,
-0.13046984374523163,
-0.5113383531570435,
0.08110472559928894,
0.15755735337734222,
-0.3283511996269226,
0.026440486311912537,
-0.07059871405363083,
0.37442055344581604,
0.4830144941806793,
0.49285438656806946,
0.447710782289505,
-0.028614645823836327,
-0.06037406250834465,
0.2799842059612274,
-0.007560360711067915,
0.15248094499111176,
0.1793202906847,
0.07196059823036194,
-0.002760165836662054,
0.17509236931800842,
0.2925666272640228,
0.046607229858636856,
0.07563494145870209,
-0.24897994101047516,
0.22660039365291595,
0.3064233362674713,
0.33161604404449463,
-0.21176692843437195,
0.07317035645246506,
0.42910289764404297,
0.21761466562747955,
-0.01821940951049328,
0.28670361638069153,
-0.05515790730714798,
0.5728838443756104,
0.030955364927649498,
0.11267345398664474,
0.6098549962043762,
-0.48960942029953003,
0.27770718932151794,
-0.3230122923851013,
0.09118157625198364,
-0.41606202721595764,
0.39537757635116577,
0.16982099413871765,
-0.18243291974067688,
-0.1726575642824173,
0.10310894250869751,
-0.051103223115205765,
-0.34135687351226807,
-0.07846170663833618,
0.15567466616630554,
-0.1967628449201584,
0.2374238222837448,
0.0730278491973877,
-0.023346079513430595,
-0.23830348253250122,
0.12388156354427338,
-0.17767664790153503,
-0.25450196862220764,
-0.12984541058540344,
-0.2765624523162842,
-0.06131119653582573,
-0.14557534456253052,
-0.09022637456655502,
0.3113924264907837,
0.101899653673172,
0.3696276545524597,
0.05727355554699898,
-0.12551508843898773,
-0.26508694887161255,
-0.49386683106422424,
-0.21973441541194916,
-0.16208837926387787,
-0.04171403869986534,
0.23724137246608734,
0.03210466355085373,
-0.19756147265434265,
-0.11711695045232773,
0.0911175087094307,
0.0701988935470581,
-0.2084808200597763,
-0.1920388638973236,
0.060617417097091675,
-0.17462052404880524,
-0.1932162642478943,
0.11977867037057877,
0.165744811296463,
-0.23859773576259613,
-0.016305994242429733,
-0.11098863929510117,
-0.10657776147127151,
-0.07078678905963898,
-0.14278455078601837,
0.19258028268814087,
-0.04692819342017174,
0.08777717500925064,
-0.324645459651947,
0.34032344818115234,
-0.2875095307826996,
-0.09356140345335007,
0.21658004820346832,
-0.026560058817267418,
0.19402658939361572,
0.47699740529060364,
0.2886323630809784,
-0.12048772722482681,
-0.20624978840351105,
-0.18011817336082458,
0.6061556935310364,
-0.40217164158821106,
0.2834562361240387,
-0.1468685120344162,
-0.12698857486248016,
0.12332296371459961,
0.11873935163021088,
0.2678966820240021,
0.1644451767206192,
0.025745876133441925,
-0.16149498522281647,
-0.3200308382511139,
0.39677804708480835,
0.0096906628459692,
-0.06407633423805237,
0.071861632168293,
0.28835514187812805,
-0.015260668471455574,
0.1931396722793579,
-0.35742050409317017,
0.30499568581581116,
-0.015449360944330692,
0.001877048285678029,
-0.5938820242881775,
-0.32717934250831604,
-0.102442666888237,
0.1907365322113037,
0.1850239485502243,
0.15491092205047607,
-0.18682008981704712,
-0.27839305996894836,
-0.06682293862104416,
0.02272200770676136,
0.005733632482588291,
0.031215576454997063,
-0.041951827704906464,
-0.12814299762248993,
0.053983476012945175,
0.17946021258831024,
0.26075479388237,
-0.24469906091690063,
-0.035835690796375275,
-0.18186049163341522,
0.08852539956569672,
-0.018580058589577675,
-0.19851887226104736,
-0.06179850921034813,
-0.13359345495700836,
0.20897206664085388,
-0.033888112753629684,
0.06331614404916763,
-0.12662957608699799,
-0.07970340549945831,
0.07722730189561844,
0.09462953358888626,
0.17104381322860718,
0.12297241389751434,
0.27570974826812744,
-0.34323784708976746,
-0.13013041019439697,
-0.13770915567874908,
0.27422037720680237,
0.42554259300231934,
-0.2007514238357544,
-0.005161668639630079,
-0.06318365782499313,
0.29395899176597595,
-0.09189151227474213,
-0.09766387939453125,
-0.003118290798738599,
-0.2028326839208603,
-0.000825641502160579,
-0.14983533322811127,
-0.09243985265493393,
-0.3034718632698059,
-0.1578381210565567,
0.1867721974849701,
0.2295510619878769,
0.10680991411209106,
-0.4889475703239441,
0.25935885310173035,
-0.2800073027610779,
-0.2154759168624878,
0.30590739846229553,
0.2260451465845108,
0.5826676487922668,
-0.013384651392698288,
-0.0013656378723680973,
-0.022390516474843025,
0.04462096095085144,
0.05737005174160004,
-0.27516141533851624,
-0.2613443434238434,
-0.17901133000850677,
0.4047454297542572,
0.17081497609615326,
-0.18304167687892914,
0.373273640871048,
0.34763455390930176,
0.4663133919239044,
-0.06293859332799911,
-0.09203857183456421,
0.2035435289144516,
-0.20334193110466003,
0.004017811734229326,
-0.49244001507759094,
-0.14407694339752197,
-0.003399751614779234,
0.38100549578666687,
-0.14365942776203156,
0.15739746391773224,
0.3412778675556183,
0.07624398916959763,
-0.07294835895299911,
-0.5200628638267517,
0.011048693209886551,
-0.040237218141555786,
0.04687091335654259,
-0.20595553517341614,
0.21086986362934113,
0.5761855840682983,
-0.3991796672344208,
-0.10726040601730347,
-0.23021480441093445,
0.4065117835998535,
0.164250910282135,
-0.30846673250198364,
-0.21917180716991425,
-0.1581454873085022,
-0.1673946976661682,
-0.284574955701828,
0.11271950602531433,
0.6822471022605896,
0.22399407625198364,
0.22634626924991608,
0.2028193473815918,
-0.35733139514923096,
0.12193642556667328,
0.2271106243133545,
0.029881950467824936,
0.2502445876598358,
-0.33381661772727966,
-0.12436439841985703,
-0.4126223027706146,
-0.16739417612552643,
-0.19613607227802277,
-0.4619970917701721,
-0.3702079951763153,
0.017755990847945213,
-0.14765146374702454,
-0.03550879657268524,
-0.1162119135260582,
0.13611988723278046,
-0.08404876291751862,
0.7313417196273804,
0.21491077542304993,
0.21551771461963654,
-0.08485794067382812,
-0.19460295140743256,
-0.22169087827205658,
0.39512163400650024,
-0.5131507515907288,
0.08560366928577423,
0.14613303542137146,
0.30259034037590027,
0.10859597474336624,
0.21197505295276642,
-0.19695796072483063,
0.46598342061042786,
-0.10549312084913254,
-0.18344852328300476,
-0.38834092020988464,
0.19089408218860626,
0.37176477909088135,
-0.15356768667697906,
-0.06590890884399414,
-0.0881894901394844,
0.23531562089920044,
-0.11347182840108871,
0.2932201623916626,
-0.044085633009672165,
-0.024281799793243408,
-0.03521965444087982,
0.004747927188873291,
0.3942345678806305,
-0.0028348718769848347,
0.24723626673221588,
-0.1694156527519226,
-0.17151549458503723,
-0.009805472567677498,
-0.14411070942878723,
-0.15767766535282135,
0.19999253749847412,
0.1592482030391693,
0.3756176829338074,
-0.043164871633052826,
0.047430261969566345,
0.0034980089403688908,
0.042856615036726,
-0.30540189146995544,
-0.007720413152128458,
0.12903271615505219,
0.015177309513092041,
0.0770215168595314,
0.09467139095067978,
-0.17000988125801086,
0.10189437121152878,
0.1142624169588089,
-0.08175477385520935,
-0.2578934133052826,
-0.3421688377857208,
0.3946777582168579,
-0.29385095834732056,
-0.3258759677410126,
0.5241207480430603,
0.0992383286356926,
0.3372799754142761,
-0.17327991127967834,
-0.27973222732543945,
0.2784058451652527,
0.02098352275788784,
0.061127081513404846,
-0.4389852285385132,
0.1575702726840973,
-0.0010982087114825845,
-0.12309742718935013,
0.044961318373680115,
0.36140453815460205,
0.29028084874153137,
-0.36717385053634644,
-0.217858225107193,
-0.21520085632801056
] |
https://github.com/huggingface/datasets/issues/2176
|
Converting a Value to a ClassLabel
|
Hi @nelson-liu!
Here is what I do to convert a string to class label:
```python
from datasets import load_dataset, features
dset = load_dataset(...)
col_name = "the string column name"
class_names = dset.unique(col_name)
class_feature = features.ClassLabel(names=sorted(class_names))
dset = dset.map(lambda str_value: {col_name: class_feature.str2int(str_value)}, input_columns=col_name)
dset = dset.cast(features.Features({
...
col_name: class_feature
})
```
|
Hi!
In the docs for `cast`, it's noted that `For non-trivial conversion, e.g. string <-> ClassLabel you should use map() to update the Dataset.`
Would it be possible to have an example that demonstrates such a string <-> ClassLabel conversion using `map`? Thanks!
| 50 |
Converting a Value to a ClassLabel
|
[
-0.06046634539961815,
0.08465937525033951,
-0.1698905974626541,
0.22766301035881042,
0.3815324306488037,
-0.1258070021867752,
0.41478782892227173,
0.10919926315546036,
-0.08781926333904266,
0.22626173496246338,
-0.06874948740005493,
0.4328647255897522,
-0.09085547924041748,
0.2994617223739624,
-0.22996209561824799,
0.003622240386903286,
-0.07436512410640717,
0.20457543432712555,
0.15522423386573792,
-0.06981150805950165,
-0.2894550859928131,
0.17755760252475739,
0.018088947981595993,
0.2128135710954666,
-0.23944397270679474,
-0.14608915150165558,
0.08415234088897705,
-0.1998409777879715,
-0.12392982095479965,
-0.1665474772453308,
0.03222556784749031,
0.015228064730763435,
0.03583319112658501,
0.1436440646648407,
-0.00009594349103281274,
-0.32634592056274414,
-0.15317204594612122,
0.03559434786438942,
-0.2500159740447998,
0.21599197387695312,
-0.14307935535907745,
0.3306393027305603,
-0.1580587774515152,
-0.2990093529224396,
-0.2561619281768799,
0.18703998625278473,
-0.2480897605419159,
-0.06115638092160225,
-0.2424527257680893,
-0.17335428297519684,
0.3271216154098511,
-0.4640325605869293,
-0.03910933434963226,
0.023621952161192894,
0.36397436261177063,
-0.3587462306022644,
0.19124019145965576,
0.40725383162498474,
0.08251070231199265,
0.07828120142221451,
-0.10529248416423798,
0.42987340688705444,
0.08013453334569931,
-0.22182367742061615,
0.25718924403190613,
0.15323270857334137,
0.25843095779418945,
0.25646698474884033,
0.20209245383739471,
0.05137436464428902,
0.12530723214149475,
-0.30299538373947144,
-0.19217796623706818,
0.03422040492296219,
0.2920423448085785,
-0.4227239191532135,
-0.18603117763996124,
0.02905936725437641,
0.11512274295091629,
0.15441368520259857,
0.08289600908756256,
0.059822238981723785,
-0.3302030861377716,
-0.017519403249025345,
-0.11363402754068375,
0.5574792623519897,
-0.22421589493751526,
0.03099651262164116,
0.07749909907579422,
-0.11575549095869064,
-0.08787602931261063,
0.07243852317333221,
-0.07526686787605286,
0.06872320920228958,
0.38290703296661377,
0.0022040822077542543,
-0.2109992504119873,
0.29890790581703186,
-0.12684446573257446,
-0.2504379153251648,
-0.12891270220279694,
0.1131305918097496,
0.1718822717666626,
0.1347006857395172,
0.04566317796707153,
0.0662078782916069,
0.6241327524185181,
0.08176280558109283,
-0.12121965736150742,
-0.013786433264613152,
-0.28046637773513794,
0.13055898249149323,
-0.27264198660850525,
-0.06182226911187172,
0.24876011908054352,
0.34448227286338806,
-0.31251996755599976,
-0.1313304305076599,
-0.3565196096897125,
0.11808780580759048,
-0.22086937725543976,
0.13569305837154388,
0.14282485842704773,
0.2537749409675598,
0.21034762263298035,
0.2283317595720291,
0.5116713047027588,
-0.07468554377555847,
0.1381683200597763,
-0.4076959490776062,
-0.19132031500339508,
0.2790541350841522,
-0.04849446937441826,
-0.13904398679733276,
-0.17453843355178833,
0.3164999186992645,
-0.1235089898109436,
-0.16412359476089478,
0.1544918566942215,
-0.5589589476585388,
-0.19230856001377106,
0.1666213721036911,
0.10215084254741669,
-0.0828920379281044,
-0.3497885465621948,
-0.1577247530221939,
0.14477138221263885,
-0.35137656331062317,
-0.24156565964221954,
0.04784707725048065,
0.10396724194288254,
0.03308660909533501,
0.28032851219177246,
0.3718993663787842,
0.5010886192321777,
-0.23587952554225922,
0.1678592413663864,
0.20337752997875214,
0.1846613734960556,
0.027838360518217087,
0.2421061247587204,
-0.3218863308429718,
-0.2034015655517578,
-0.18015912175178528,
-0.06173356622457504,
-0.011850379407405853,
-0.36843934655189514,
-0.2622174024581909,
0.22538316249847412,
-0.12353666871786118,
-0.2396087795495987,
-0.2507348358631134,
-0.09330633282661438,
0.31060880422592163,
0.24148625135421753,
-0.15693262219429016,
0.16991354525089264,
-0.5529239773750305,
-0.1245279386639595,
-0.014353062957525253,
-0.08702976256608963,
-0.5643094778060913,
-0.003995333332568407,
0.28518226742744446,
-0.08541352301836014,
-0.2005918323993683,
0.408013254404068,
-0.1957385390996933,
-0.049973320215940475,
-0.16761504113674164,
0.07978025823831558,
-0.07643185555934906,
0.03696369752287865,
0.06594954431056976,
-0.15525472164154053,
0.13918492197990417,
-0.113673135638237,
0.21867826581001282,
-0.14709316194057465,
-0.31230494379997253,
0.14884261786937714,
0.024403788149356842,
0.16824178397655487,
0.11105295270681381,
-0.1330186277627945,
-0.16048400104045868,
0.17881110310554504,
-0.05143766477704048,
-0.26911136507987976,
0.1533825397491455,
0.3810870945453644,
-0.3561146557331085,
-0.09856122732162476,
0.09387797117233276,
0.12062349170446396,
0.015811817720532417,
0.3170408308506012,
-0.010124198161065578,
0.01326918974518776,
-0.41046205163002014,
0.04557109251618385,
-0.2605620324611664,
-0.3056587874889374,
0.03722692281007767,
0.3291051387786865,
-0.404901385307312,
0.03351591154932976,
-0.00715226074680686,
-0.1381220668554306,
0.27895206212997437,
0.36714014410972595,
0.18983501195907593,
0.09906165301799774,
0.09976831823587418,
0.046739377081394196,
-0.15162858366966248,
-0.038804419338703156,
-0.04527333006262779,
-0.06277986615896225,
0.027563784271478653,
0.07514911890029907,
-0.11179644614458084,
0.1488446444272995,
-0.05712153762578964,
-0.15231718122959137,
0.6104629039764404,
0.08850271254777908,
0.035295769572257996,
-0.2177475541830063,
-0.04302706569433212,
-0.0021962476894259453,
-0.012817277573049068,
-0.1066088154911995,
0.09882394969463348,
-0.12224598973989487,
-0.20448683202266693,
-0.05154811963438988,
0.05893835425376892,
-0.2158861607313156,
0.31291794776916504,
0.06689435243606567,
-0.18329760432243347,
0.1579531580209732,
-0.08074810355901718,
0.02262134850025177,
0.31029900908470154,
0.12032006680965424,
0.2863927185535431,
-0.041009873151779175,
0.2293187826871872,
-0.04931473359465599,
-0.006624278146773577,
-0.21905705332756042,
0.06315064430236816,
0.208148792386055,
-0.06792575120925903,
0.2850700616836548,
-0.17510205507278442,
-0.14933864772319794,
-0.15335026383399963,
0.1072285994887352,
-0.2426566481590271,
-0.1169736236333847,
-0.08316205441951752,
-0.3344770073890686,
0.19150961935520172,
0.12687857449054718,
0.04947895184159279,
-0.18062585592269897,
-0.132509246468544,
0.09189261496067047,
-0.15476278960704803,
0.07912110537290573,
0.0596720427274704,
-0.07555638998746872,
-0.058176346123218536,
-0.23851832747459412,
0.4536273777484894,
0.17479023337364197,
-0.20877274870872498,
0.1815313994884491,
-0.48415130376815796,
-0.3488997220993042,
0.218138188123703,
-0.1573135107755661,
-0.2039838284254074,
0.15313215553760529,
-0.07518912851810455,
0.13258898258209229,
0.11629465967416763,
-0.26438823342323303,
0.0016673824284225702,
-0.14306016266345978,
-0.2376498430967331,
0.10176403820514679,
-0.07282397150993347,
-0.29704946279525757,
0.13570073246955872,
0.17314355075359344,
-0.17251825332641602,
0.07010223716497421,
-0.2662191689014435,
0.09666089713573456,
-0.1333959847688675,
-0.07885761559009552,
-0.14628444612026215,
-0.04635268449783325,
0.0031028753146529198,
-0.148118793964386,
-0.07005788385868073,
0.013577146455645561,
0.05477064847946167,
0.0877470150589943,
0.3772764801979065,
0.35824811458587646,
0.09721469134092331,
-0.25484493374824524,
-0.06869781762361526,
-0.18544241786003113,
-0.007731379941105843,
-0.11146232485771179,
-0.09306555241346359,
-0.09988611936569214,
0.21609479188919067,
-0.1942587047815323,
0.10075754672288895,
-0.1817196011543274,
0.31902700662612915,
-0.04253910481929779,
-0.1554492861032486,
0.033776283264160156,
-0.04189683124423027,
0.17171861231327057,
-0.27009567618370056,
-0.31975600123405457,
-0.25556278228759766,
0.2377469688653946,
-0.35004499554634094,
0.04313777759671211,
-0.08686361461877823,
-0.006425453349947929,
-0.07778789103031158,
0.3337409794330597,
0.007795436307787895,
-0.40846115350723267,
-0.17648088932037354,
-0.18226340413093567,
0.1138194128870964,
0.30869200825691223,
0.12012887001037598,
-0.1283925622701645,
-0.05405209958553314,
-0.11003919690847397,
0.12534716725349426,
-0.08001895248889923,
0.0064236801117658615,
0.10334903746843338,
0.39413005113601685,
-0.374184787273407,
-0.13800324499607086,
-0.04818979650735855,
0.12468092143535614,
-0.03090403415262699,
-0.22391699254512787,
0.010845717042684555,
-0.10454301536083221,
0.07927390933036804,
0.0638999417424202,
-0.12967775762081146,
-0.2825532555580139,
-0.05198170617222786,
-0.1743745654821396,
-0.16016043722629547,
0.146981343626976,
0.18447040021419525,
0.3232801556587219,
-0.058970820158720016,
-0.11476133018732071,
0.007136269938200712,
0.041794389486312866,
-0.08929210901260376,
0.4505293667316437,
-0.015582999214529991,
0.43879270553588867,
0.4265627861022949,
-0.004751121625304222,
0.058690395206213,
0.17133305966854095,
-0.5815971493721008,
-0.13952527940273285,
0.336386114358902,
-0.07975027710199356,
-0.3744971454143524,
0.06547252833843231,
0.2300124615430832,
-0.26093658804893494,
-0.1404413878917694,
0.061211228370666504,
-0.035200085490942,
0.015389838255941868,
-0.10329090803861618,
0.13559626042842865,
0.20102640986442566,
0.4643093943595886,
0.19758553802967072,
0.0187845379114151,
-0.008207008242607117,
-0.0726868286728859,
0.33281707763671875,
-0.13638781011104584,
0.02255699783563614,
0.2379216104745865,
-0.21323733031749725,
-0.088164322078228,
0.11749474704265594,
0.037759553641080856,
0.2179306298494339,
-0.14740802347660065,
-0.08160872757434845,
0.13651436567306519,
0.27227047085762024,
0.3119441866874695,
0.2660122811794281,
0.06946863234043121,
-0.2812488079071045,
0.02834305167198181,
0.06350767612457275,
-0.11031804233789444,
0.060510825365781784,
-0.1506578028202057,
0.3387490510940552,
-0.29423078894615173,
0.005027501843869686,
0.7390229105949402,
-0.1729619950056076,
-0.15405015647411346,
-0.05189273878931999,
0.5096181035041809,
-0.556053876876831,
0.07603389024734497,
0.48616135120391846,
0.8784089684486389,
-0.14906303584575653,
0.1419268101453781,
-0.004485223907977343,
-0.21362075209617615,
0.4876534640789032,
0.05503910407423973,
0.15395155549049377,
-0.5290869474411011,
0.3942186236381531,
-0.03763527795672417,
0.0734388455748558,
-0.1962004005908966,
0.4510279893875122,
-0.08099440485239029,
0.0993911474943161,
-0.3023526072502136,
0.0854698047041893,
0.22825996577739716,
0.005852006375789642,
-0.06477504968643188,
-0.24191369116306305,
0.10148559510707855,
0.4169536828994751,
-0.05899585410952568,
-0.030986005440354347,
-0.3436979055404663,
-0.046128951013088226,
-0.3514442443847656,
0.1850006878376007,
0.001254169037565589,
0.027875034138560295,
-0.11078637093305588,
0.007464786525815725,
0.11101630330085754,
0.04684017226099968,
-0.16172842681407928,
-0.06254283338785172,
0.23782598972320557,
-0.08660776913166046,
-0.1733265519142151,
0.051220301538705826,
-0.3107125461101532,
0.20902012288570404,
0.12543140351772308,
0.13742119073867798,
0.358003169298172,
0.05910573527216911,
0.1480102837085724,
-0.043075017631053925,
0.11564738303422928,
-0.2490779012441635,
-0.06531322002410889,
-0.12117614597082138,
0.1970810443162918,
-0.6159153580665588,
0.0017367565305903554,
0.1528993397951126,
0.10913021117448807,
-0.09453832358121872,
0.2872679531574249,
-0.032309990376234055,
-0.30703413486480713,
-0.2689822018146515,
0.3610904812812805,
-0.3962981700897217,
0.1821868121623993,
0.03215564414858818,
-0.023541096597909927,
0.03765337914228439,
0.1754770576953888,
-0.11623288691043854,
0.017508966848254204,
-0.28106024861335754,
0.27619633078575134,
0.40654855966567993,
-0.0944591611623764,
0.20871864259243011,
-0.04337230697274208,
-0.34427720308303833,
0.06426076591014862,
0.1472223997116089,
0.2664453089237213,
0.5678602457046509,
-0.004068579059094191,
-0.14475801587104797,
-0.3200185000896454,
-0.028028834611177444,
0.05657211318612099,
0.23183418810367584,
0.07531679421663284,
0.17788822948932648,
-0.14843778312206268,
-0.1714419573545456,
-0.47658422589302063,
-0.14201734960079193,
-0.06435413658618927,
0.05302785709500313,
0.34078651666641235,
0.12349244207143784,
-0.16635553538799286,
0.40672776103019714,
0.3144550621509552,
0.19366778433322906,
0.19146111607551575,
-0.3771149814128876,
-0.2508060038089752,
0.03696131706237793,
0.2174832969903946,
0.3584964871406555,
-0.21327145397663116,
0.08196724951267242,
-0.16507498919963837,
-0.12381359189748764,
-0.08746204525232315,
-0.10115466266870499,
0.19726316630840302,
0.38821473717689514,
-0.041798535734415054,
0.39473435282707214,
0.06449286639690399,
-0.14412619173526764,
0.3310422897338867,
0.1776892989873886,
-0.18958425521850586,
0.12361028045415878,
0.22210416197776794,
-0.05515675991773605,
0.05390952154994011,
0.2749694883823395,
0.054906513541936874,
-0.23166772723197937,
0.026928629726171494,
-0.11270960420370102,
0.2692144513130188,
0.12021315842866898,
0.19560593366622925,
-0.05532502382993698,
-0.151693195104599,
-0.00025712698698043823,
-0.013690484687685966,
0.31127965450286865,
0.02813243679702282,
0.010036739520728588,
-0.24440324306488037,
-0.20404009521007538,
-0.08881756663322449,
0.3103417158126831,
-0.3716992437839508,
0.25479164719581604,
0.08125418424606323,
-0.2655181586742401,
0.14583663642406464,
-0.09334952384233475,
-0.12510383129119873,
0.006265282165259123,
-0.04676184058189392,
0.03404998406767845,
0.512033224105835,
0.31199049949645996,
0.3046594560146332,
0.24569915235042572,
0.3213081955909729,
0.32746586203575134,
-0.026285087689757347,
0.14279285073280334,
0.03909311816096306,
0.16560614109039307,
0.03673092648386955,
0.45494717359542847,
0.14271560311317444,
0.2003253996372223,
0.03957178443670273,
-0.06877993792295456,
-0.5358778238296509,
-0.43217089772224426,
0.14283610880374908,
0.258382648229599,
-0.29673412442207336,
-0.21786577999591827,
-0.3113870620727539,
-0.0578019954264164,
0.08842108398675919,
-0.009714817628264427,
-0.15730464458465576,
-0.16440202295780182,
0.12138619273900986,
-0.047629550099372864,
-0.0736813023686409,
-0.252588152885437,
-0.43386131525039673,
0.11615345627069473,
0.10606086999177933,
-0.27747753262519836,
-0.11942334473133087,
-0.24478274583816528,
0.1660218983888626,
0.34694334864616394,
0.10833300650119781,
0.18547508120536804,
0.09728801250457764,
-0.03673580288887024,
-0.042230889201164246,
-0.277365505695343,
-0.20220918953418732,
-0.05579815059900284,
-0.34016069769859314,
0.22880354523658752,
-0.0629887580871582,
0.17775671184062958,
0.2751775085926056,
-0.25891560316085815,
-0.11811097711324692,
0.3162854015827179,
0.1448383927345276,
0.046317629516124725,
0.31081417202949524,
0.158946692943573,
0.03841337934136391,
-0.2716546058654785,
0.2030017375946045,
-0.2014564573764801,
-0.0798192098736763,
-0.15732823312282562,
-0.03844194859266281,
0.23492087423801422,
0.1300608366727829,
0.20205602049827576,
0.4621134102344513,
0.071377694606781,
-0.042962998151779175,
-0.030439764261245728,
-0.0572749488055706,
0.18681207299232483,
-0.27399662137031555,
-0.02233053743839264,
0.27273982763290405,
-0.3295351564884186,
-0.12435565888881683,
-0.14382506906986237,
0.099542036652565,
0.13090769946575165,
0.2669520974159241,
0.03469638526439667,
0.2912944555282593,
-0.3502728343009949,
0.09797617793083191,
-0.04776032269001007,
0.3195151686668396,
-0.05194704607129097,
0.27853822708129883,
-0.1230873316526413,
-0.05677823722362518,
0.0013849327806383371,
0.26504436135292053,
-0.12014246731996536,
0.003271929221227765,
-0.1450110673904419,
-0.07958690822124481,
0.06665302813053131,
-0.047346074134111404,
0.28352126479148865,
-0.09302014857530594,
0.12676292657852173,
0.2236865609884262,
0.02001308836042881,
-0.13469107449054718,
0.2661576569080353,
-0.31156614422798157,
0.09825252741575241,
0.0784384086728096,
-0.023766040802001953,
-0.013129174709320068,
0.025921722874045372,
0.1406816989183426,
-0.07082909345626831,
-0.2279481589794159,
0.24264386296272278,
-0.35570529103279114,
-0.02340620756149292,
-0.02343001961708069,
0.22206391394138336,
-0.029067786410450935,
0.46586668491363525,
-0.22787494957447052,
-0.18751345574855804,
0.21299515664577484,
-0.4748508930206299,
-0.4714246690273285,
0.42343783378601074,
0.22823500633239746,
0.084413081407547,
-0.019085245206952095,
-0.1603824347257614,
0.050126366317272186,
0.2618887722492218,
-0.08463048189878464,
-0.3995607793331146,
0.10588618367910385,
-0.27874821424484253,
-0.015301704406738281,
-0.04545213282108307,
0.019430063664913177,
0.061524469405412674,
0.16432206332683563,
-0.12906619906425476,
-0.38513731956481934
] |
https://github.com/huggingface/datasets/issues/2176
|
Converting a Value to a ClassLabel
|
Hi! You can use `Dataset.class_encode_column` for this. And in the next release of `datasets` (this feature is only available on `master`), you'll also be able to use `cast` to do the conversion.
An example of conversion via `cast`:
```python
from datasets import Dataset, Features, ClassLabel
d = Dataset.from_dict({"a": ["no", "yes", "no"]})
d = d.cast(Features({"a": ClassLabel(names=["yes", "no"])}))
```
|
Hi!
In the docs for `cast`, it's noted that `For non-trivial conversion, e.g. string <-> ClassLabel you should use map() to update the Dataset.`
Would it be possible to have an example that demonstrates such a string <-> ClassLabel conversion using `map`? Thanks!
| 57 |
Converting a Value to a ClassLabel
|
[
-0.06046634539961815,
0.08465937525033951,
-0.1698905974626541,
0.22766301035881042,
0.3815324306488037,
-0.1258070021867752,
0.41478782892227173,
0.10919926315546036,
-0.08781926333904266,
0.22626173496246338,
-0.06874948740005493,
0.4328647255897522,
-0.09085547924041748,
0.2994617223739624,
-0.22996209561824799,
0.003622240386903286,
-0.07436512410640717,
0.20457543432712555,
0.15522423386573792,
-0.06981150805950165,
-0.2894550859928131,
0.17755760252475739,
0.018088947981595993,
0.2128135710954666,
-0.23944397270679474,
-0.14608915150165558,
0.08415234088897705,
-0.1998409777879715,
-0.12392982095479965,
-0.1665474772453308,
0.03222556784749031,
0.015228064730763435,
0.03583319112658501,
0.1436440646648407,
-0.00009594349103281274,
-0.32634592056274414,
-0.15317204594612122,
0.03559434786438942,
-0.2500159740447998,
0.21599197387695312,
-0.14307935535907745,
0.3306393027305603,
-0.1580587774515152,
-0.2990093529224396,
-0.2561619281768799,
0.18703998625278473,
-0.2480897605419159,
-0.06115638092160225,
-0.2424527257680893,
-0.17335428297519684,
0.3271216154098511,
-0.4640325605869293,
-0.03910933434963226,
0.023621952161192894,
0.36397436261177063,
-0.3587462306022644,
0.19124019145965576,
0.40725383162498474,
0.08251070231199265,
0.07828120142221451,
-0.10529248416423798,
0.42987340688705444,
0.08013453334569931,
-0.22182367742061615,
0.25718924403190613,
0.15323270857334137,
0.25843095779418945,
0.25646698474884033,
0.20209245383739471,
0.05137436464428902,
0.12530723214149475,
-0.30299538373947144,
-0.19217796623706818,
0.03422040492296219,
0.2920423448085785,
-0.4227239191532135,
-0.18603117763996124,
0.02905936725437641,
0.11512274295091629,
0.15441368520259857,
0.08289600908756256,
0.059822238981723785,
-0.3302030861377716,
-0.017519403249025345,
-0.11363402754068375,
0.5574792623519897,
-0.22421589493751526,
0.03099651262164116,
0.07749909907579422,
-0.11575549095869064,
-0.08787602931261063,
0.07243852317333221,
-0.07526686787605286,
0.06872320920228958,
0.38290703296661377,
0.0022040822077542543,
-0.2109992504119873,
0.29890790581703186,
-0.12684446573257446,
-0.2504379153251648,
-0.12891270220279694,
0.1131305918097496,
0.1718822717666626,
0.1347006857395172,
0.04566317796707153,
0.0662078782916069,
0.6241327524185181,
0.08176280558109283,
-0.12121965736150742,
-0.013786433264613152,
-0.28046637773513794,
0.13055898249149323,
-0.27264198660850525,
-0.06182226911187172,
0.24876011908054352,
0.34448227286338806,
-0.31251996755599976,
-0.1313304305076599,
-0.3565196096897125,
0.11808780580759048,
-0.22086937725543976,
0.13569305837154388,
0.14282485842704773,
0.2537749409675598,
0.21034762263298035,
0.2283317595720291,
0.5116713047027588,
-0.07468554377555847,
0.1381683200597763,
-0.4076959490776062,
-0.19132031500339508,
0.2790541350841522,
-0.04849446937441826,
-0.13904398679733276,
-0.17453843355178833,
0.3164999186992645,
-0.1235089898109436,
-0.16412359476089478,
0.1544918566942215,
-0.5589589476585388,
-0.19230856001377106,
0.1666213721036911,
0.10215084254741669,
-0.0828920379281044,
-0.3497885465621948,
-0.1577247530221939,
0.14477138221263885,
-0.35137656331062317,
-0.24156565964221954,
0.04784707725048065,
0.10396724194288254,
0.03308660909533501,
0.28032851219177246,
0.3718993663787842,
0.5010886192321777,
-0.23587952554225922,
0.1678592413663864,
0.20337752997875214,
0.1846613734960556,
0.027838360518217087,
0.2421061247587204,
-0.3218863308429718,
-0.2034015655517578,
-0.18015912175178528,
-0.06173356622457504,
-0.011850379407405853,
-0.36843934655189514,
-0.2622174024581909,
0.22538316249847412,
-0.12353666871786118,
-0.2396087795495987,
-0.2507348358631134,
-0.09330633282661438,
0.31060880422592163,
0.24148625135421753,
-0.15693262219429016,
0.16991354525089264,
-0.5529239773750305,
-0.1245279386639595,
-0.014353062957525253,
-0.08702976256608963,
-0.5643094778060913,
-0.003995333332568407,
0.28518226742744446,
-0.08541352301836014,
-0.2005918323993683,
0.408013254404068,
-0.1957385390996933,
-0.049973320215940475,
-0.16761504113674164,
0.07978025823831558,
-0.07643185555934906,
0.03696369752287865,
0.06594954431056976,
-0.15525472164154053,
0.13918492197990417,
-0.113673135638237,
0.21867826581001282,
-0.14709316194057465,
-0.31230494379997253,
0.14884261786937714,
0.024403788149356842,
0.16824178397655487,
0.11105295270681381,
-0.1330186277627945,
-0.16048400104045868,
0.17881110310554504,
-0.05143766477704048,
-0.26911136507987976,
0.1533825397491455,
0.3810870945453644,
-0.3561146557331085,
-0.09856122732162476,
0.09387797117233276,
0.12062349170446396,
0.015811817720532417,
0.3170408308506012,
-0.010124198161065578,
0.01326918974518776,
-0.41046205163002014,
0.04557109251618385,
-0.2605620324611664,
-0.3056587874889374,
0.03722692281007767,
0.3291051387786865,
-0.404901385307312,
0.03351591154932976,
-0.00715226074680686,
-0.1381220668554306,
0.27895206212997437,
0.36714014410972595,
0.18983501195907593,
0.09906165301799774,
0.09976831823587418,
0.046739377081394196,
-0.15162858366966248,
-0.038804419338703156,
-0.04527333006262779,
-0.06277986615896225,
0.027563784271478653,
0.07514911890029907,
-0.11179644614458084,
0.1488446444272995,
-0.05712153762578964,
-0.15231718122959137,
0.6104629039764404,
0.08850271254777908,
0.035295769572257996,
-0.2177475541830063,
-0.04302706569433212,
-0.0021962476894259453,
-0.012817277573049068,
-0.1066088154911995,
0.09882394969463348,
-0.12224598973989487,
-0.20448683202266693,
-0.05154811963438988,
0.05893835425376892,
-0.2158861607313156,
0.31291794776916504,
0.06689435243606567,
-0.18329760432243347,
0.1579531580209732,
-0.08074810355901718,
0.02262134850025177,
0.31029900908470154,
0.12032006680965424,
0.2863927185535431,
-0.041009873151779175,
0.2293187826871872,
-0.04931473359465599,
-0.006624278146773577,
-0.21905705332756042,
0.06315064430236816,
0.208148792386055,
-0.06792575120925903,
0.2850700616836548,
-0.17510205507278442,
-0.14933864772319794,
-0.15335026383399963,
0.1072285994887352,
-0.2426566481590271,
-0.1169736236333847,
-0.08316205441951752,
-0.3344770073890686,
0.19150961935520172,
0.12687857449054718,
0.04947895184159279,
-0.18062585592269897,
-0.132509246468544,
0.09189261496067047,
-0.15476278960704803,
0.07912110537290573,
0.0596720427274704,
-0.07555638998746872,
-0.058176346123218536,
-0.23851832747459412,
0.4536273777484894,
0.17479023337364197,
-0.20877274870872498,
0.1815313994884491,
-0.48415130376815796,
-0.3488997220993042,
0.218138188123703,
-0.1573135107755661,
-0.2039838284254074,
0.15313215553760529,
-0.07518912851810455,
0.13258898258209229,
0.11629465967416763,
-0.26438823342323303,
0.0016673824284225702,
-0.14306016266345978,
-0.2376498430967331,
0.10176403820514679,
-0.07282397150993347,
-0.29704946279525757,
0.13570073246955872,
0.17314355075359344,
-0.17251825332641602,
0.07010223716497421,
-0.2662191689014435,
0.09666089713573456,
-0.1333959847688675,
-0.07885761559009552,
-0.14628444612026215,
-0.04635268449783325,
0.0031028753146529198,
-0.148118793964386,
-0.07005788385868073,
0.013577146455645561,
0.05477064847946167,
0.0877470150589943,
0.3772764801979065,
0.35824811458587646,
0.09721469134092331,
-0.25484493374824524,
-0.06869781762361526,
-0.18544241786003113,
-0.007731379941105843,
-0.11146232485771179,
-0.09306555241346359,
-0.09988611936569214,
0.21609479188919067,
-0.1942587047815323,
0.10075754672288895,
-0.1817196011543274,
0.31902700662612915,
-0.04253910481929779,
-0.1554492861032486,
0.033776283264160156,
-0.04189683124423027,
0.17171861231327057,
-0.27009567618370056,
-0.31975600123405457,
-0.25556278228759766,
0.2377469688653946,
-0.35004499554634094,
0.04313777759671211,
-0.08686361461877823,
-0.006425453349947929,
-0.07778789103031158,
0.3337409794330597,
0.007795436307787895,
-0.40846115350723267,
-0.17648088932037354,
-0.18226340413093567,
0.1138194128870964,
0.30869200825691223,
0.12012887001037598,
-0.1283925622701645,
-0.05405209958553314,
-0.11003919690847397,
0.12534716725349426,
-0.08001895248889923,
0.0064236801117658615,
0.10334903746843338,
0.39413005113601685,
-0.374184787273407,
-0.13800324499607086,
-0.04818979650735855,
0.12468092143535614,
-0.03090403415262699,
-0.22391699254512787,
0.010845717042684555,
-0.10454301536083221,
0.07927390933036804,
0.0638999417424202,
-0.12967775762081146,
-0.2825532555580139,
-0.05198170617222786,
-0.1743745654821396,
-0.16016043722629547,
0.146981343626976,
0.18447040021419525,
0.3232801556587219,
-0.058970820158720016,
-0.11476133018732071,
0.007136269938200712,
0.041794389486312866,
-0.08929210901260376,
0.4505293667316437,
-0.015582999214529991,
0.43879270553588867,
0.4265627861022949,
-0.004751121625304222,
0.058690395206213,
0.17133305966854095,
-0.5815971493721008,
-0.13952527940273285,
0.336386114358902,
-0.07975027710199356,
-0.3744971454143524,
0.06547252833843231,
0.2300124615430832,
-0.26093658804893494,
-0.1404413878917694,
0.061211228370666504,
-0.035200085490942,
0.015389838255941868,
-0.10329090803861618,
0.13559626042842865,
0.20102640986442566,
0.4643093943595886,
0.19758553802967072,
0.0187845379114151,
-0.008207008242607117,
-0.0726868286728859,
0.33281707763671875,
-0.13638781011104584,
0.02255699783563614,
0.2379216104745865,
-0.21323733031749725,
-0.088164322078228,
0.11749474704265594,
0.037759553641080856,
0.2179306298494339,
-0.14740802347660065,
-0.08160872757434845,
0.13651436567306519,
0.27227047085762024,
0.3119441866874695,
0.2660122811794281,
0.06946863234043121,
-0.2812488079071045,
0.02834305167198181,
0.06350767612457275,
-0.11031804233789444,
0.060510825365781784,
-0.1506578028202057,
0.3387490510940552,
-0.29423078894615173,
0.005027501843869686,
0.7390229105949402,
-0.1729619950056076,
-0.15405015647411346,
-0.05189273878931999,
0.5096181035041809,
-0.556053876876831,
0.07603389024734497,
0.48616135120391846,
0.8784089684486389,
-0.14906303584575653,
0.1419268101453781,
-0.004485223907977343,
-0.21362075209617615,
0.4876534640789032,
0.05503910407423973,
0.15395155549049377,
-0.5290869474411011,
0.3942186236381531,
-0.03763527795672417,
0.0734388455748558,
-0.1962004005908966,
0.4510279893875122,
-0.08099440485239029,
0.0993911474943161,
-0.3023526072502136,
0.0854698047041893,
0.22825996577739716,
0.005852006375789642,
-0.06477504968643188,
-0.24191369116306305,
0.10148559510707855,
0.4169536828994751,
-0.05899585410952568,
-0.030986005440354347,
-0.3436979055404663,
-0.046128951013088226,
-0.3514442443847656,
0.1850006878376007,
0.001254169037565589,
0.027875034138560295,
-0.11078637093305588,
0.007464786525815725,
0.11101630330085754,
0.04684017226099968,
-0.16172842681407928,
-0.06254283338785172,
0.23782598972320557,
-0.08660776913166046,
-0.1733265519142151,
0.051220301538705826,
-0.3107125461101532,
0.20902012288570404,
0.12543140351772308,
0.13742119073867798,
0.358003169298172,
0.05910573527216911,
0.1480102837085724,
-0.043075017631053925,
0.11564738303422928,
-0.2490779012441635,
-0.06531322002410889,
-0.12117614597082138,
0.1970810443162918,
-0.6159153580665588,
0.0017367565305903554,
0.1528993397951126,
0.10913021117448807,
-0.09453832358121872,
0.2872679531574249,
-0.032309990376234055,
-0.30703413486480713,
-0.2689822018146515,
0.3610904812812805,
-0.3962981700897217,
0.1821868121623993,
0.03215564414858818,
-0.023541096597909927,
0.03765337914228439,
0.1754770576953888,
-0.11623288691043854,
0.017508966848254204,
-0.28106024861335754,
0.27619633078575134,
0.40654855966567993,
-0.0944591611623764,
0.20871864259243011,
-0.04337230697274208,
-0.34427720308303833,
0.06426076591014862,
0.1472223997116089,
0.2664453089237213,
0.5678602457046509,
-0.004068579059094191,
-0.14475801587104797,
-0.3200185000896454,
-0.028028834611177444,
0.05657211318612099,
0.23183418810367584,
0.07531679421663284,
0.17788822948932648,
-0.14843778312206268,
-0.1714419573545456,
-0.47658422589302063,
-0.14201734960079193,
-0.06435413658618927,
0.05302785709500313,
0.34078651666641235,
0.12349244207143784,
-0.16635553538799286,
0.40672776103019714,
0.3144550621509552,
0.19366778433322906,
0.19146111607551575,
-0.3771149814128876,
-0.2508060038089752,
0.03696131706237793,
0.2174832969903946,
0.3584964871406555,
-0.21327145397663116,
0.08196724951267242,
-0.16507498919963837,
-0.12381359189748764,
-0.08746204525232315,
-0.10115466266870499,
0.19726316630840302,
0.38821473717689514,
-0.041798535734415054,
0.39473435282707214,
0.06449286639690399,
-0.14412619173526764,
0.3310422897338867,
0.1776892989873886,
-0.18958425521850586,
0.12361028045415878,
0.22210416197776794,
-0.05515675991773605,
0.05390952154994011,
0.2749694883823395,
0.054906513541936874,
-0.23166772723197937,
0.026928629726171494,
-0.11270960420370102,
0.2692144513130188,
0.12021315842866898,
0.19560593366622925,
-0.05532502382993698,
-0.151693195104599,
-0.00025712698698043823,
-0.013690484687685966,
0.31127965450286865,
0.02813243679702282,
0.010036739520728588,
-0.24440324306488037,
-0.20404009521007538,
-0.08881756663322449,
0.3103417158126831,
-0.3716992437839508,
0.25479164719581604,
0.08125418424606323,
-0.2655181586742401,
0.14583663642406464,
-0.09334952384233475,
-0.12510383129119873,
0.006265282165259123,
-0.04676184058189392,
0.03404998406767845,
0.512033224105835,
0.31199049949645996,
0.3046594560146332,
0.24569915235042572,
0.3213081955909729,
0.32746586203575134,
-0.026285087689757347,
0.14279285073280334,
0.03909311816096306,
0.16560614109039307,
0.03673092648386955,
0.45494717359542847,
0.14271560311317444,
0.2003253996372223,
0.03957178443670273,
-0.06877993792295456,
-0.5358778238296509,
-0.43217089772224426,
0.14283610880374908,
0.258382648229599,
-0.29673412442207336,
-0.21786577999591827,
-0.3113870620727539,
-0.0578019954264164,
0.08842108398675919,
-0.009714817628264427,
-0.15730464458465576,
-0.16440202295780182,
0.12138619273900986,
-0.047629550099372864,
-0.0736813023686409,
-0.252588152885437,
-0.43386131525039673,
0.11615345627069473,
0.10606086999177933,
-0.27747753262519836,
-0.11942334473133087,
-0.24478274583816528,
0.1660218983888626,
0.34694334864616394,
0.10833300650119781,
0.18547508120536804,
0.09728801250457764,
-0.03673580288887024,
-0.042230889201164246,
-0.277365505695343,
-0.20220918953418732,
-0.05579815059900284,
-0.34016069769859314,
0.22880354523658752,
-0.0629887580871582,
0.17775671184062958,
0.2751775085926056,
-0.25891560316085815,
-0.11811097711324692,
0.3162854015827179,
0.1448383927345276,
0.046317629516124725,
0.31081417202949524,
0.158946692943573,
0.03841337934136391,
-0.2716546058654785,
0.2030017375946045,
-0.2014564573764801,
-0.0798192098736763,
-0.15732823312282562,
-0.03844194859266281,
0.23492087423801422,
0.1300608366727829,
0.20205602049827576,
0.4621134102344513,
0.071377694606781,
-0.042962998151779175,
-0.030439764261245728,
-0.0572749488055706,
0.18681207299232483,
-0.27399662137031555,
-0.02233053743839264,
0.27273982763290405,
-0.3295351564884186,
-0.12435565888881683,
-0.14382506906986237,
0.099542036652565,
0.13090769946575165,
0.2669520974159241,
0.03469638526439667,
0.2912944555282593,
-0.3502728343009949,
0.09797617793083191,
-0.04776032269001007,
0.3195151686668396,
-0.05194704607129097,
0.27853822708129883,
-0.1230873316526413,
-0.05677823722362518,
0.0013849327806383371,
0.26504436135292053,
-0.12014246731996536,
0.003271929221227765,
-0.1450110673904419,
-0.07958690822124481,
0.06665302813053131,
-0.047346074134111404,
0.28352126479148865,
-0.09302014857530594,
0.12676292657852173,
0.2236865609884262,
0.02001308836042881,
-0.13469107449054718,
0.2661576569080353,
-0.31156614422798157,
0.09825252741575241,
0.0784384086728096,
-0.023766040802001953,
-0.013129174709320068,
0.025921722874045372,
0.1406816989183426,
-0.07082909345626831,
-0.2279481589794159,
0.24264386296272278,
-0.35570529103279114,
-0.02340620756149292,
-0.02343001961708069,
0.22206391394138336,
-0.029067786410450935,
0.46586668491363525,
-0.22787494957447052,
-0.18751345574855804,
0.21299515664577484,
-0.4748508930206299,
-0.4714246690273285,
0.42343783378601074,
0.22823500633239746,
0.084413081407547,
-0.019085245206952095,
-0.1603824347257614,
0.050126366317272186,
0.2618887722492218,
-0.08463048189878464,
-0.3995607793331146,
0.10588618367910385,
-0.27874821424484253,
-0.015301704406738281,
-0.04545213282108307,
0.019430063664913177,
0.061524469405412674,
0.16432206332683563,
-0.12906619906425476,
-0.38513731956481934
] |
https://github.com/huggingface/datasets/issues/2175
|
dataset.search_batch() function outputs all -1 indices sometime.
|
Actually, I found the answer [here](https://github.com/facebookresearch/faiss/wiki/FAQ#what-does-it-mean-when-a-search-returns--1-ids).
So we have to do some modifications to the code for instances where the index doesn't retrieve any IDs.
|
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 25 |
dataset.search_batch() function outputs all -1 indices sometime.
|
[
-0.29404038190841675,
-0.07587619870901108,
-0.21337218582630157,
0.1111055538058281,
0.11482501029968262,
-0.04728453606367111,
0.24745327234268188,
0.42615529894828796,
0.04280871897935867,
0.4052085876464844,
0.14434874057769775,
-0.11353979259729385,
-0.09642420709133148,
0.20890887081623077,
-0.16371986269950867,
0.15429602563381195,
0.0924735739827156,
0.4189704656600952,
-0.15901657938957214,
-0.4247385859489441,
-0.2177097350358963,
0.16438548266887665,
-0.292836993932724,
0.09918282181024551,
-0.273875892162323,
-0.0054437932558357716,
0.159163236618042,
-0.1567697674036026,
-0.05994042381644249,
-0.3637959957122803,
0.2554668188095093,
-0.10565976798534393,
0.016076939180493355,
0.41387173533439636,
-0.00010544010001467541,
0.006773150060325861,
0.30423957109451294,
-0.018347330391407013,
-0.39675459265708923,
-0.042986851185560226,
-0.5275683999061584,
0.05971382558345795,
0.07463295012712479,
-0.06793329119682312,
-0.06507007777690887,
-0.08746551722288132,
0.23269955813884735,
-0.5223621726036072,
-0.043256741017103195,
0.33736538887023926,
0.3027816414833069,
0.011656297370791435,
-0.2877003252506256,
-0.1349918097257614,
0.5562706589698792,
-0.007802091538906097,
0.17377059161663055,
-0.22563694417476654,
0.26020586490631104,
-0.14889083802700043,
-0.06187529116868973,
0.44272303581237793,
-0.0027719440404325724,
0.07731190323829651,
-0.02870914340019226,
0.024867011234164238,
0.3152991235256195,
-0.48007732629776,
0.32006415724754333,
-0.04855243116617203,
0.36140909790992737,
-0.06068309023976326,
-0.1829526424407959,
-0.11944674700498581,
-0.1573811024427414,
-0.20662148296833038,
-0.054650548845529556,
0.18530794978141785,
-0.19166867434978485,
-0.031306009739637375,
-0.13288356363773346,
0.2641383409500122,
-0.15256917476654053,
-0.02009834535419941,
-0.2297702580690384,
0.45373281836509705,
-0.06331366300582886,
0.14950862526893616,
0.13326896727085114,
-0.09405598044395447,
0.4378458559513092,
0.03050311468541622,
-0.041789934039115906,
0.04282202944159508,
-0.34087032079696655,
0.03749258071184158,
0.34730252623558044,
-0.20096172392368317,
0.22588606178760529,
-0.1164480596780777,
0.10122306644916534,
0.2725220322608948,
0.11230223625898361,
-0.0767935961484909,
0.3910321295261383,
0.19888511300086975,
0.3451099991798401,
0.273070365190506,
0.30251726508140564,
-0.555443286895752,
-0.09076860547065735,
0.1294839233160019,
0.2279222309589386,
-0.19965018332004547,
0.26802822947502136,
-0.04421237111091614,
-0.07364211231470108,
-0.0247958954423666,
-0.29625576734542847,
0.05910991132259369,
-0.03963463380932808,
-0.09615135937929153,
-0.03931623697280884,
0.2053704708814621,
0.22613732516765594,
-0.12181723117828369,
-0.1840512603521347,
0.12123160809278488,
-0.22161300480365753,
-0.14845801889896393,
-0.4902675747871399,
-0.09012392163276672,
0.032459162175655365,
-0.20011325180530548,
0.25020426511764526,
-0.2348499745130539,
0.07595071196556091,
-0.06406475603580475,
0.09272968769073486,
-0.03298308700323105,
0.10386907309293747,
-0.10165209323167801,
0.5358109474182129,
0.32826319336891174,
-0.012393885292112827,
0.3014694154262543,
0.22226591408252716,
-0.049594178795814514,
0.04759196564555168,
0.24275356531143188,
-0.09465119242668152,
-0.15637443959712982,
0.2165471911430359,
0.2923238277435303,
0.1771811693906784,
0.1613660603761673,
-0.003645879216492176,
0.2845022976398468,
0.023079710081219673,
0.11458341032266617,
-0.07369119673967361,
-0.39167043566703796,
0.05447297543287277,
0.0246694628149271,
0.10921543836593628,
0.16834378242492676,
-0.1357281357049942,
0.14989906549453735,
0.19353371858596802,
-0.030804332345724106,
0.2517489492893219,
0.15148626267910004,
-0.0737859383225441,
0.04693419486284256,
-0.36144185066223145,
0.4743559658527374,
0.2829725742340088,
-0.20881333947181702,
-0.3004736602306366,
0.06709739565849304,
-0.23676279187202454,
-0.45332345366477966,
-0.1435612291097641,
0.15307819843292236,
0.31272587180137634,
0.20680846273899078,
0.44983845949172974,
0.003046982455998659,
-0.02646969072520733,
0.2137426882982254,
-0.0693855956196785,
0.23836761713027954,
-0.08404357731342316,
-0.059432219713926315,
0.3230428993701935,
0.14372457563877106,
0.11572284996509552,
-0.6393337249755859,
0.2788347601890564,
-0.04908493533730507,
0.1312171071767807,
0.10571462661027908,
0.1565634161233902,
-0.0948013961315155,
0.32197660207748413,
-0.11465351283550262,
-0.07198129594326019,
0.1357128620147705,
-0.031527578830718994,
-0.12110677361488342,
-0.08340750634670258,
-0.130404993891716,
-0.15171267092227936,
0.08514730632305145,
-0.05355897918343544,
0.24893386662006378,
0.20590214431285858,
0.17300188541412354,
-0.14230749011039734,
0.07180628180503845,
-0.14468006789684296,
-0.09198814630508423,
0.21170933544635773,
-0.20054860413074493,
-0.2622799873352051,
-0.0396471805870533,
0.10067541897296906,
-0.09499696642160416,
0.012522641569375992,
-0.06375326216220856,
0.3330830931663513,
-0.03119366057217121,
-0.110454261302948,
0.244991734623909,
-0.1228783056139946,
-0.0750032439827919,
0.16602782905101776,
-0.012240849435329437,
-0.09760231524705887,
-0.07094339281320572,
-0.036398861557245255,
0.16808749735355377,
0.11732559651136398,
-0.05115455389022827,
-0.2377614676952362,
0.3604854643344879,
-0.23444847762584686,
0.15585020184516907,
0.007768278941512108,
-0.056603774428367615,
0.4228781759738922,
0.23822104930877686,
-0.11117324978113174,
-0.34628212451934814,
-0.16089196503162384,
-0.09915641695261002,
-0.05745925381779671,
-0.004661517217755318,
-0.4400566816329956,
0.2687910795211792,
0.1723218560218811,
-0.20608797669410706,
0.2516711950302124,
0.07266245782375336,
-0.14702646434307098,
-0.09070427715778351,
0.06625996530056,
0.2639062702655792,
0.1306445300579071,
0.3726389706134796,
0.285969614982605,
-0.390497088432312,
-0.026499155908823013,
-0.1815314143896103,
0.11191131919622421,
-0.016615822911262512,
-0.16017811000347137,
0.17101767659187317,
0.32391247153282166,
-0.3701731860637665,
-0.48063036799430847,
0.007067373488098383,
-0.05543690174818039,
0.2076433002948761,
-0.3149874806404114,
-0.009544995613396168,
-0.13799817860126495,
-0.23578818142414093,
-0.21768590807914734,
0.07832879573106766,
0.14084504544734955,
-0.3804806172847748,
0.1422777771949768,
-0.0050604939460754395,
-0.10635963827371597,
0.10312968492507935,
-0.1899605095386505,
0.3880246579647064,
0.351792573928833,
0.15235929191112518,
-0.1064695492386818,
0.01656568981707096,
-0.4356100261211395,
0.08210896700620651,
-0.2243715226650238,
0.23125094175338745,
0.18023501336574554,
-0.11832606792449951,
-0.06205965578556061,
-0.49419206380844116,
0.03497018665075302,
0.07121642678976059,
-0.12545566260814667,
-0.006918597500771284,
0.20951464772224426,
0.08642035722732544,
-0.4370402693748474,
0.00284600374288857,
-0.03445127606391907,
-0.07512394338846207,
-0.017561694607138634,
0.041572947055101395,
-0.03225400298833847,
0.14993147552013397,
-0.244997039437294,
-0.17021910846233368,
-0.041169583797454834,
-0.03119603544473648,
-0.018810825422406197,
-0.023554695770144463,
0.2646828293800354,
0.23495516180992126,
0.02123955264687538,
-0.10322312265634537,
0.030839011073112488,
-0.1082271859049797,
-0.3431864380836487,
-0.2120264768600464,
0.19335849583148956,
-0.025641119107604027,
-0.22549383342266083,
-0.287346214056015,
-0.12484883517026901,
-0.3188024163246155,
0.36271145939826965,
-0.3429906964302063,
0.1628570258617401,
-0.1601879745721817,
-0.1522444188594818,
-0.08320694416761398,
0.24433472752571106,
0.15343904495239258,
-0.00029289282974787056,
-0.2644725441932678,
-0.31779882311820984,
-0.17742888629436493,
0.23864366114139557,
0.011170822195708752,
0.024355044588446617,
-0.19374921917915344,
0.3689059913158417,
-0.18493889272212982,
0.5601325035095215,
-0.04178231209516525,
-0.0838155671954155,
0.13827873766422272,
-0.13761772215366364,
0.29499366879463196,
-0.03467057645320892,
-0.1852641999721527,
0.13299375772476196,
0.20171768963336945,
-0.14233550429344177,
0.11779766529798508,
-0.09670905023813248,
-0.09855266660451889,
0.11619749665260315,
-0.02329845353960991,
-0.21408870816230774,
-0.23606279492378235,
-0.07588091492652893,
-0.09982934594154358,
0.10424758493900299,
0.3162616789340973,
0.23820345103740692,
-0.2749473750591278,
-0.013065537437796593,
-0.27974697947502136,
-0.41959673166275024,
-0.04600953683257103,
-0.04052528738975525,
0.06616789102554321,
-0.11013564467430115,
-0.584339439868927,
0.13379605114459991,
-0.025025073438882828,
0.4848845303058624,
0.21146166324615479,
-0.20372769236564636,
0.1390875279903412,
0.10392547398805618,
0.8822842836380005,
-0.1320267766714096,
0.33931657671928406,
0.09954993426799774,
0.0655873641371727,
-0.2481849491596222,
-0.10813184082508087,
-0.32061830163002014,
0.6482236981391907,
-0.07590777426958084,
0.38444018363952637,
0.04024854674935341,
-0.07259257882833481,
0.18812532722949982,
-0.008515764959156513,
0.016127025708556175,
-0.05067233368754387,
-0.3273419737815857,
-0.28916576504707336,
0.2959098815917969,
0.3187352418899536,
0.26145753264427185,
0.002998730866238475,
-0.06587577611207962,
-0.5092999339103699,
-0.2358924299478531,
-0.19584974646568298,
0.044271256774663925,
0.12071805447340012,
0.3030267059803009,
0.23569001257419586,
0.10096977651119232,
0.18207553029060364,
0.040179938077926636,
0.24752120673656464,
0.07437653839588165,
-0.36139026284217834,
0.3086409568786621,
0.236299529671669,
-0.33826372027397156,
0.19675953686237335,
0.29498857259750366,
-0.1619461178779602,
-0.15534047782421112,
-0.13857580721378326,
0.23386356234550476,
0.025472603738307953,
0.0013695560628548265,
0.2800304591655731,
0.07209838181734085,
-0.31303542852401733,
-0.3138696551322937,
0.3948414623737335,
-0.013760133646428585,
-0.24297258257865906,
0.3272378146648407,
-0.002837371313944459,
-0.2631716728210449,
0.28855058550834656,
-0.014284334145486355,
0.42862555384635925,
-0.08170762658119202,
0.12597928941249847,
-0.0006569463876076043,
0.25147756934165955,
0.12270524352788925,
0.35505297780036926,
0.38184547424316406,
-0.35643818974494934,
-0.39191344380378723,
0.06683425605297089,
-0.11478430032730103,
-0.34927746653556824,
0.2808842062950134,
-0.03748302906751633,
0.18740463256835938,
-0.0394701212644577,
-0.005092788487672806,
-0.10847623646259308,
-0.07014431804418564,
0.230552077293396,
0.007977008819580078,
-0.0018151614349335432,
0.21230153739452362,
0.21670138835906982,
0.07012605667114258,
-0.02034730091691017,
-0.03984901309013367,
0.18264029920101166,
-0.3323439657688141,
0.07479029893875122,
-0.11110613495111465,
-0.1008128747344017,
0.36842742562294006,
0.03533143177628517,
-0.35558611154556274,
-0.338906466960907,
-0.12880399823188782,
0.20728598535060883,
0.0879412516951561,
0.07257412374019623,
0.0867585614323616,
0.5402178764343262,
0.3633711338043213,
-0.021831899881362915,
-0.0023422150406986475,
0.17793115973472595,
0.06474260985851288,
-0.19776126742362976,
-0.19131885468959808,
0.14965644478797913,
-0.07034477591514587,
-0.15062949061393738,
0.32556605339050293,
-0.46248742938041687,
-0.0396762453019619,
-0.008439111523330212,
0.00905685592442751,
0.06151627376675606,
-0.24007607996463776,
0.18454161286354065,
0.09465479850769043,
0.004465350415557623,
0.5052645802497864,
0.1111207902431488,
-0.45360293984413147,
-0.1451522558927536,
0.3345709443092346,
0.18783816695213318,
0.07279250770807266,
0.3218372166156769,
-0.05765055492520332,
-0.1233515664935112,
-0.3469974100589752,
0.14815650880336761,
0.28470858931541443,
0.19598504900932312,
0.5777711272239685,
-0.3755914270877838,
0.07266824692487717,
0.3222358524799347,
0.33879658579826355,
-0.14033636450767517,
0.09715654700994492,
-0.22712180018424988,
-0.06567532569169998,
-0.08693327009677887,
-0.08528058230876923,
0.09475061297416687,
0.28016671538352966,
-0.015981322154402733,
-0.18673554062843323,
0.16274617612361908,
-0.23046256601810455,
-0.42216891050338745,
-0.16293077170848846,
-0.11921913176774979,
0.27580875158309937,
-0.3156631886959076,
0.23948389291763306,
-0.05715814605355263,
0.037210557609796524,
0.23892536759376526,
0.0018024872988462448,
-0.05460217967629433,
-0.3460875451564789,
0.15875224769115448,
0.08776762336492538,
-0.11437465995550156,
0.189097061753273,
-0.021576130762696266,
-0.1659422218799591,
-0.3857114315032959,
-0.16701270639896393,
0.0261852964758873,
0.41574370861053467,
-0.05154494196176529,
-0.05238965153694153,
0.34406062960624695,
-0.09733658283948898,
0.6132326722145081,
-0.048052798956632614,
-0.011967875063419342,
-0.12676994502544403,
-0.13166165351867676,
0.24751628935337067,
-0.01585639826953411,
-0.06725431233644485,
0.06461158394813538,
-0.014777938835322857,
-0.21904876828193665,
0.13387884199619293,
-0.0636284202337265,
-0.3820212483406067,
-0.2978622019290924,
0.4119755029678345,
0.3817130923271179,
0.2772909700870514,
-0.24315717816352844,
-0.25335729122161865,
0.11315422505140305,
0.32658928632736206,
-0.33985331654548645,
-0.2887231707572937,
0.03074800781905651,
0.018717719241976738,
0.23757325112819672,
0.16200612485408783,
0.0553583987057209,
-0.23171131312847137,
-0.05335848778486252,
0.08701305836439133,
0.41079360246658325,
-0.25850963592529297,
-0.09303537756204605,
0.040182601660490036,
0.11204701662063599,
-0.1348763406276703,
0.31966444849967957,
0.12499378621578217,
0.2145882099866867,
0.7398802042007446,
0.003585678990930319,
0.2964409291744232,
0.17972148954868317,
-0.14371530711650848,
-0.2697785794734955,
-0.2864271402359009,
0.319623202085495,
0.3358162045478821,
-0.4585089087486267,
0.06005357205867767,
0.2970444858074188,
0.032780926674604416,
-0.4250414967536926,
0.1216026023030281,
-0.13281576335430145,
-0.09765852242708206,
-0.1180155873298645,
-0.11444849520921707,
-0.045370105654001236,
-0.2516714632511139,
0.06651585549116135,
-0.04823354259133339,
-0.049961138516664505,
0.2599700689315796,
-0.12670515477657318,
-0.10918834805488586,
-0.018135761842131615,
-0.11986234784126282,
-0.1101338192820549,
0.0012788946041837335,
0.09629359096288681,
-0.18857203423976898,
0.04643940553069115,
-0.01146235316991806,
0.030986366793513298,
0.2609630227088928,
0.26255926489830017,
0.21847034990787506,
0.3585488796234131,
-0.07708234339952469,
0.03136763721704483,
-0.13187383115291595,
-0.2714037001132965,
-0.4039422273635864,
-0.09291016310453415,
0.0069273910485208035,
-0.18596261739730835,
0.30620357394218445,
0.24723201990127563,
-0.07084047049283981,
0.18564443290233612,
0.29722824692726135,
0.1820814460515976,
-0.1383855640888214,
-0.14310000836849213,
-0.0022049143444746733,
-0.07529167830944061,
-0.1809903234243393,
-0.12914589047431946,
-0.3248516023159027,
-0.07913798838853836,
0.3013514578342438,
-0.18372780084609985,
0.3511919677257538,
-0.06731250137090683,
0.14950717985630035,
-0.18598859012126923,
0.486377477645874,
-0.2534703314304352,
0.1088021770119667,
-0.005833912640810013,
-0.056097377091646194,
-0.48497939109802246,
0.12630490958690643,
-0.23675978183746338,
0.1244855523109436,
0.05455262213945389,
0.32299041748046875,
-0.0443711020052433,
-0.4196699559688568,
0.3156551122665405,
0.31507307291030884,
-0.23943302035331726,
0.12424952536821365,
-0.10761674493551254,
-0.01308463141322136,
-0.4162071943283081,
0.18928173184394836,
0.03755173087120056,
-0.20886977016925812,
0.36842599511146545,
-0.17609548568725586,
0.2669323682785034,
0.0834757536649704,
0.06122913211584091,
0.12620528042316437,
-0.11648792028427124,
0.45391935110092163,
0.06228981912136078,
0.1590372622013092,
-0.19427892565727234,
0.3377153277397156,
-0.21278056502342224,
-0.11563247442245483,
-0.3309916853904724,
-0.038171492516994476,
0.18955068290233612,
0.09269199520349503,
-0.18233174085617065,
-0.22089356184005737,
0.030040916055440903,
0.09449411928653717,
0.31302329897880554,
0.10735198110342026,
-0.05588310956954956,
0.3016713261604309,
-0.1001918762922287,
0.003721646498888731,
-0.1275130957365036,
-0.09189199656248093,
0.11538935452699661,
0.10581445693969727,
-0.05201959237456322,
-0.5365822911262512,
0.3319375514984131,
-0.4051196873188019,
-0.4870537221431732,
-0.7009401321411133,
0.28037020564079285,
0.1669822633266449,
-0.07477796822786331,
-0.06824260205030441,
0.04728717356920242,
0.2763405442237854,
0.06584558635950089,
-0.42752864956855774,
-0.03130137175321579,
-0.22986933588981628,
0.09541881084442139,
-0.12975603342056274,
0.016146330162882805,
0.47125470638275146,
-0.24272987246513367,
-0.023364301770925522,
-0.28201064467430115
] |
https://github.com/huggingface/datasets/issues/2175
|
dataset.search_batch() function outputs all -1 indices sometime.
|
@lhoestq @patrickvonplaten
I also found another short bug in the retrieval part. Especially, when retrieving documents. If Faiss returns the -1 as the index, the retriever will always use the last element in the dataset.
please check [def get_doc_dicts function](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L222)
Does the use of the HNSW guarantee to retrieve valid indexes always?
|
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 52 |
dataset.search_batch() function outputs all -1 indices sometime.
|
[
-0.29404038190841675,
-0.07587619870901108,
-0.21337218582630157,
0.1111055538058281,
0.11482501029968262,
-0.04728453606367111,
0.24745327234268188,
0.42615529894828796,
0.04280871897935867,
0.4052085876464844,
0.14434874057769775,
-0.11353979259729385,
-0.09642420709133148,
0.20890887081623077,
-0.16371986269950867,
0.15429602563381195,
0.0924735739827156,
0.4189704656600952,
-0.15901657938957214,
-0.4247385859489441,
-0.2177097350358963,
0.16438548266887665,
-0.292836993932724,
0.09918282181024551,
-0.273875892162323,
-0.0054437932558357716,
0.159163236618042,
-0.1567697674036026,
-0.05994042381644249,
-0.3637959957122803,
0.2554668188095093,
-0.10565976798534393,
0.016076939180493355,
0.41387173533439636,
-0.00010544010001467541,
0.006773150060325861,
0.30423957109451294,
-0.018347330391407013,
-0.39675459265708923,
-0.042986851185560226,
-0.5275683999061584,
0.05971382558345795,
0.07463295012712479,
-0.06793329119682312,
-0.06507007777690887,
-0.08746551722288132,
0.23269955813884735,
-0.5223621726036072,
-0.043256741017103195,
0.33736538887023926,
0.3027816414833069,
0.011656297370791435,
-0.2877003252506256,
-0.1349918097257614,
0.5562706589698792,
-0.007802091538906097,
0.17377059161663055,
-0.22563694417476654,
0.26020586490631104,
-0.14889083802700043,
-0.06187529116868973,
0.44272303581237793,
-0.0027719440404325724,
0.07731190323829651,
-0.02870914340019226,
0.024867011234164238,
0.3152991235256195,
-0.48007732629776,
0.32006415724754333,
-0.04855243116617203,
0.36140909790992737,
-0.06068309023976326,
-0.1829526424407959,
-0.11944674700498581,
-0.1573811024427414,
-0.20662148296833038,
-0.054650548845529556,
0.18530794978141785,
-0.19166867434978485,
-0.031306009739637375,
-0.13288356363773346,
0.2641383409500122,
-0.15256917476654053,
-0.02009834535419941,
-0.2297702580690384,
0.45373281836509705,
-0.06331366300582886,
0.14950862526893616,
0.13326896727085114,
-0.09405598044395447,
0.4378458559513092,
0.03050311468541622,
-0.041789934039115906,
0.04282202944159508,
-0.34087032079696655,
0.03749258071184158,
0.34730252623558044,
-0.20096172392368317,
0.22588606178760529,
-0.1164480596780777,
0.10122306644916534,
0.2725220322608948,
0.11230223625898361,
-0.0767935961484909,
0.3910321295261383,
0.19888511300086975,
0.3451099991798401,
0.273070365190506,
0.30251726508140564,
-0.555443286895752,
-0.09076860547065735,
0.1294839233160019,
0.2279222309589386,
-0.19965018332004547,
0.26802822947502136,
-0.04421237111091614,
-0.07364211231470108,
-0.0247958954423666,
-0.29625576734542847,
0.05910991132259369,
-0.03963463380932808,
-0.09615135937929153,
-0.03931623697280884,
0.2053704708814621,
0.22613732516765594,
-0.12181723117828369,
-0.1840512603521347,
0.12123160809278488,
-0.22161300480365753,
-0.14845801889896393,
-0.4902675747871399,
-0.09012392163276672,
0.032459162175655365,
-0.20011325180530548,
0.25020426511764526,
-0.2348499745130539,
0.07595071196556091,
-0.06406475603580475,
0.09272968769073486,
-0.03298308700323105,
0.10386907309293747,
-0.10165209323167801,
0.5358109474182129,
0.32826319336891174,
-0.012393885292112827,
0.3014694154262543,
0.22226591408252716,
-0.049594178795814514,
0.04759196564555168,
0.24275356531143188,
-0.09465119242668152,
-0.15637443959712982,
0.2165471911430359,
0.2923238277435303,
0.1771811693906784,
0.1613660603761673,
-0.003645879216492176,
0.2845022976398468,
0.023079710081219673,
0.11458341032266617,
-0.07369119673967361,
-0.39167043566703796,
0.05447297543287277,
0.0246694628149271,
0.10921543836593628,
0.16834378242492676,
-0.1357281357049942,
0.14989906549453735,
0.19353371858596802,
-0.030804332345724106,
0.2517489492893219,
0.15148626267910004,
-0.0737859383225441,
0.04693419486284256,
-0.36144185066223145,
0.4743559658527374,
0.2829725742340088,
-0.20881333947181702,
-0.3004736602306366,
0.06709739565849304,
-0.23676279187202454,
-0.45332345366477966,
-0.1435612291097641,
0.15307819843292236,
0.31272587180137634,
0.20680846273899078,
0.44983845949172974,
0.003046982455998659,
-0.02646969072520733,
0.2137426882982254,
-0.0693855956196785,
0.23836761713027954,
-0.08404357731342316,
-0.059432219713926315,
0.3230428993701935,
0.14372457563877106,
0.11572284996509552,
-0.6393337249755859,
0.2788347601890564,
-0.04908493533730507,
0.1312171071767807,
0.10571462661027908,
0.1565634161233902,
-0.0948013961315155,
0.32197660207748413,
-0.11465351283550262,
-0.07198129594326019,
0.1357128620147705,
-0.031527578830718994,
-0.12110677361488342,
-0.08340750634670258,
-0.130404993891716,
-0.15171267092227936,
0.08514730632305145,
-0.05355897918343544,
0.24893386662006378,
0.20590214431285858,
0.17300188541412354,
-0.14230749011039734,
0.07180628180503845,
-0.14468006789684296,
-0.09198814630508423,
0.21170933544635773,
-0.20054860413074493,
-0.2622799873352051,
-0.0396471805870533,
0.10067541897296906,
-0.09499696642160416,
0.012522641569375992,
-0.06375326216220856,
0.3330830931663513,
-0.03119366057217121,
-0.110454261302948,
0.244991734623909,
-0.1228783056139946,
-0.0750032439827919,
0.16602782905101776,
-0.012240849435329437,
-0.09760231524705887,
-0.07094339281320572,
-0.036398861557245255,
0.16808749735355377,
0.11732559651136398,
-0.05115455389022827,
-0.2377614676952362,
0.3604854643344879,
-0.23444847762584686,
0.15585020184516907,
0.007768278941512108,
-0.056603774428367615,
0.4228781759738922,
0.23822104930877686,
-0.11117324978113174,
-0.34628212451934814,
-0.16089196503162384,
-0.09915641695261002,
-0.05745925381779671,
-0.004661517217755318,
-0.4400566816329956,
0.2687910795211792,
0.1723218560218811,
-0.20608797669410706,
0.2516711950302124,
0.07266245782375336,
-0.14702646434307098,
-0.09070427715778351,
0.06625996530056,
0.2639062702655792,
0.1306445300579071,
0.3726389706134796,
0.285969614982605,
-0.390497088432312,
-0.026499155908823013,
-0.1815314143896103,
0.11191131919622421,
-0.016615822911262512,
-0.16017811000347137,
0.17101767659187317,
0.32391247153282166,
-0.3701731860637665,
-0.48063036799430847,
0.007067373488098383,
-0.05543690174818039,
0.2076433002948761,
-0.3149874806404114,
-0.009544995613396168,
-0.13799817860126495,
-0.23578818142414093,
-0.21768590807914734,
0.07832879573106766,
0.14084504544734955,
-0.3804806172847748,
0.1422777771949768,
-0.0050604939460754395,
-0.10635963827371597,
0.10312968492507935,
-0.1899605095386505,
0.3880246579647064,
0.351792573928833,
0.15235929191112518,
-0.1064695492386818,
0.01656568981707096,
-0.4356100261211395,
0.08210896700620651,
-0.2243715226650238,
0.23125094175338745,
0.18023501336574554,
-0.11832606792449951,
-0.06205965578556061,
-0.49419206380844116,
0.03497018665075302,
0.07121642678976059,
-0.12545566260814667,
-0.006918597500771284,
0.20951464772224426,
0.08642035722732544,
-0.4370402693748474,
0.00284600374288857,
-0.03445127606391907,
-0.07512394338846207,
-0.017561694607138634,
0.041572947055101395,
-0.03225400298833847,
0.14993147552013397,
-0.244997039437294,
-0.17021910846233368,
-0.041169583797454834,
-0.03119603544473648,
-0.018810825422406197,
-0.023554695770144463,
0.2646828293800354,
0.23495516180992126,
0.02123955264687538,
-0.10322312265634537,
0.030839011073112488,
-0.1082271859049797,
-0.3431864380836487,
-0.2120264768600464,
0.19335849583148956,
-0.025641119107604027,
-0.22549383342266083,
-0.287346214056015,
-0.12484883517026901,
-0.3188024163246155,
0.36271145939826965,
-0.3429906964302063,
0.1628570258617401,
-0.1601879745721817,
-0.1522444188594818,
-0.08320694416761398,
0.24433472752571106,
0.15343904495239258,
-0.00029289282974787056,
-0.2644725441932678,
-0.31779882311820984,
-0.17742888629436493,
0.23864366114139557,
0.011170822195708752,
0.024355044588446617,
-0.19374921917915344,
0.3689059913158417,
-0.18493889272212982,
0.5601325035095215,
-0.04178231209516525,
-0.0838155671954155,
0.13827873766422272,
-0.13761772215366364,
0.29499366879463196,
-0.03467057645320892,
-0.1852641999721527,
0.13299375772476196,
0.20171768963336945,
-0.14233550429344177,
0.11779766529798508,
-0.09670905023813248,
-0.09855266660451889,
0.11619749665260315,
-0.02329845353960991,
-0.21408870816230774,
-0.23606279492378235,
-0.07588091492652893,
-0.09982934594154358,
0.10424758493900299,
0.3162616789340973,
0.23820345103740692,
-0.2749473750591278,
-0.013065537437796593,
-0.27974697947502136,
-0.41959673166275024,
-0.04600953683257103,
-0.04052528738975525,
0.06616789102554321,
-0.11013564467430115,
-0.584339439868927,
0.13379605114459991,
-0.025025073438882828,
0.4848845303058624,
0.21146166324615479,
-0.20372769236564636,
0.1390875279903412,
0.10392547398805618,
0.8822842836380005,
-0.1320267766714096,
0.33931657671928406,
0.09954993426799774,
0.0655873641371727,
-0.2481849491596222,
-0.10813184082508087,
-0.32061830163002014,
0.6482236981391907,
-0.07590777426958084,
0.38444018363952637,
0.04024854674935341,
-0.07259257882833481,
0.18812532722949982,
-0.008515764959156513,
0.016127025708556175,
-0.05067233368754387,
-0.3273419737815857,
-0.28916576504707336,
0.2959098815917969,
0.3187352418899536,
0.26145753264427185,
0.002998730866238475,
-0.06587577611207962,
-0.5092999339103699,
-0.2358924299478531,
-0.19584974646568298,
0.044271256774663925,
0.12071805447340012,
0.3030267059803009,
0.23569001257419586,
0.10096977651119232,
0.18207553029060364,
0.040179938077926636,
0.24752120673656464,
0.07437653839588165,
-0.36139026284217834,
0.3086409568786621,
0.236299529671669,
-0.33826372027397156,
0.19675953686237335,
0.29498857259750366,
-0.1619461178779602,
-0.15534047782421112,
-0.13857580721378326,
0.23386356234550476,
0.025472603738307953,
0.0013695560628548265,
0.2800304591655731,
0.07209838181734085,
-0.31303542852401733,
-0.3138696551322937,
0.3948414623737335,
-0.013760133646428585,
-0.24297258257865906,
0.3272378146648407,
-0.002837371313944459,
-0.2631716728210449,
0.28855058550834656,
-0.014284334145486355,
0.42862555384635925,
-0.08170762658119202,
0.12597928941249847,
-0.0006569463876076043,
0.25147756934165955,
0.12270524352788925,
0.35505297780036926,
0.38184547424316406,
-0.35643818974494934,
-0.39191344380378723,
0.06683425605297089,
-0.11478430032730103,
-0.34927746653556824,
0.2808842062950134,
-0.03748302906751633,
0.18740463256835938,
-0.0394701212644577,
-0.005092788487672806,
-0.10847623646259308,
-0.07014431804418564,
0.230552077293396,
0.007977008819580078,
-0.0018151614349335432,
0.21230153739452362,
0.21670138835906982,
0.07012605667114258,
-0.02034730091691017,
-0.03984901309013367,
0.18264029920101166,
-0.3323439657688141,
0.07479029893875122,
-0.11110613495111465,
-0.1008128747344017,
0.36842742562294006,
0.03533143177628517,
-0.35558611154556274,
-0.338906466960907,
-0.12880399823188782,
0.20728598535060883,
0.0879412516951561,
0.07257412374019623,
0.0867585614323616,
0.5402178764343262,
0.3633711338043213,
-0.021831899881362915,
-0.0023422150406986475,
0.17793115973472595,
0.06474260985851288,
-0.19776126742362976,
-0.19131885468959808,
0.14965644478797913,
-0.07034477591514587,
-0.15062949061393738,
0.32556605339050293,
-0.46248742938041687,
-0.0396762453019619,
-0.008439111523330212,
0.00905685592442751,
0.06151627376675606,
-0.24007607996463776,
0.18454161286354065,
0.09465479850769043,
0.004465350415557623,
0.5052645802497864,
0.1111207902431488,
-0.45360293984413147,
-0.1451522558927536,
0.3345709443092346,
0.18783816695213318,
0.07279250770807266,
0.3218372166156769,
-0.05765055492520332,
-0.1233515664935112,
-0.3469974100589752,
0.14815650880336761,
0.28470858931541443,
0.19598504900932312,
0.5777711272239685,
-0.3755914270877838,
0.07266824692487717,
0.3222358524799347,
0.33879658579826355,
-0.14033636450767517,
0.09715654700994492,
-0.22712180018424988,
-0.06567532569169998,
-0.08693327009677887,
-0.08528058230876923,
0.09475061297416687,
0.28016671538352966,
-0.015981322154402733,
-0.18673554062843323,
0.16274617612361908,
-0.23046256601810455,
-0.42216891050338745,
-0.16293077170848846,
-0.11921913176774979,
0.27580875158309937,
-0.3156631886959076,
0.23948389291763306,
-0.05715814605355263,
0.037210557609796524,
0.23892536759376526,
0.0018024872988462448,
-0.05460217967629433,
-0.3460875451564789,
0.15875224769115448,
0.08776762336492538,
-0.11437465995550156,
0.189097061753273,
-0.021576130762696266,
-0.1659422218799591,
-0.3857114315032959,
-0.16701270639896393,
0.0261852964758873,
0.41574370861053467,
-0.05154494196176529,
-0.05238965153694153,
0.34406062960624695,
-0.09733658283948898,
0.6132326722145081,
-0.048052798956632614,
-0.011967875063419342,
-0.12676994502544403,
-0.13166165351867676,
0.24751628935337067,
-0.01585639826953411,
-0.06725431233644485,
0.06461158394813538,
-0.014777938835322857,
-0.21904876828193665,
0.13387884199619293,
-0.0636284202337265,
-0.3820212483406067,
-0.2978622019290924,
0.4119755029678345,
0.3817130923271179,
0.2772909700870514,
-0.24315717816352844,
-0.25335729122161865,
0.11315422505140305,
0.32658928632736206,
-0.33985331654548645,
-0.2887231707572937,
0.03074800781905651,
0.018717719241976738,
0.23757325112819672,
0.16200612485408783,
0.0553583987057209,
-0.23171131312847137,
-0.05335848778486252,
0.08701305836439133,
0.41079360246658325,
-0.25850963592529297,
-0.09303537756204605,
0.040182601660490036,
0.11204701662063599,
-0.1348763406276703,
0.31966444849967957,
0.12499378621578217,
0.2145882099866867,
0.7398802042007446,
0.003585678990930319,
0.2964409291744232,
0.17972148954868317,
-0.14371530711650848,
-0.2697785794734955,
-0.2864271402359009,
0.319623202085495,
0.3358162045478821,
-0.4585089087486267,
0.06005357205867767,
0.2970444858074188,
0.032780926674604416,
-0.4250414967536926,
0.1216026023030281,
-0.13281576335430145,
-0.09765852242708206,
-0.1180155873298645,
-0.11444849520921707,
-0.045370105654001236,
-0.2516714632511139,
0.06651585549116135,
-0.04823354259133339,
-0.049961138516664505,
0.2599700689315796,
-0.12670515477657318,
-0.10918834805488586,
-0.018135761842131615,
-0.11986234784126282,
-0.1101338192820549,
0.0012788946041837335,
0.09629359096288681,
-0.18857203423976898,
0.04643940553069115,
-0.01146235316991806,
0.030986366793513298,
0.2609630227088928,
0.26255926489830017,
0.21847034990787506,
0.3585488796234131,
-0.07708234339952469,
0.03136763721704483,
-0.13187383115291595,
-0.2714037001132965,
-0.4039422273635864,
-0.09291016310453415,
0.0069273910485208035,
-0.18596261739730835,
0.30620357394218445,
0.24723201990127563,
-0.07084047049283981,
0.18564443290233612,
0.29722824692726135,
0.1820814460515976,
-0.1383855640888214,
-0.14310000836849213,
-0.0022049143444746733,
-0.07529167830944061,
-0.1809903234243393,
-0.12914589047431946,
-0.3248516023159027,
-0.07913798838853836,
0.3013514578342438,
-0.18372780084609985,
0.3511919677257538,
-0.06731250137090683,
0.14950717985630035,
-0.18598859012126923,
0.486377477645874,
-0.2534703314304352,
0.1088021770119667,
-0.005833912640810013,
-0.056097377091646194,
-0.48497939109802246,
0.12630490958690643,
-0.23675978183746338,
0.1244855523109436,
0.05455262213945389,
0.32299041748046875,
-0.0443711020052433,
-0.4196699559688568,
0.3156551122665405,
0.31507307291030884,
-0.23943302035331726,
0.12424952536821365,
-0.10761674493551254,
-0.01308463141322136,
-0.4162071943283081,
0.18928173184394836,
0.03755173087120056,
-0.20886977016925812,
0.36842599511146545,
-0.17609548568725586,
0.2669323682785034,
0.0834757536649704,
0.06122913211584091,
0.12620528042316437,
-0.11648792028427124,
0.45391935110092163,
0.06228981912136078,
0.1590372622013092,
-0.19427892565727234,
0.3377153277397156,
-0.21278056502342224,
-0.11563247442245483,
-0.3309916853904724,
-0.038171492516994476,
0.18955068290233612,
0.09269199520349503,
-0.18233174085617065,
-0.22089356184005737,
0.030040916055440903,
0.09449411928653717,
0.31302329897880554,
0.10735198110342026,
-0.05588310956954956,
0.3016713261604309,
-0.1001918762922287,
0.003721646498888731,
-0.1275130957365036,
-0.09189199656248093,
0.11538935452699661,
0.10581445693969727,
-0.05201959237456322,
-0.5365822911262512,
0.3319375514984131,
-0.4051196873188019,
-0.4870537221431732,
-0.7009401321411133,
0.28037020564079285,
0.1669822633266449,
-0.07477796822786331,
-0.06824260205030441,
0.04728717356920242,
0.2763405442237854,
0.06584558635950089,
-0.42752864956855774,
-0.03130137175321579,
-0.22986933588981628,
0.09541881084442139,
-0.12975603342056274,
0.016146330162882805,
0.47125470638275146,
-0.24272987246513367,
-0.023364301770925522,
-0.28201064467430115
] |
https://github.com/huggingface/datasets/issues/2175
|
dataset.search_batch() function outputs all -1 indices sometime.
|
Hi !
No it happens sometimes to return -1, especially if your dataset is small.
If your dataset is big enough it shouldn't happen in my experience.
Ideally we should ignore all the -1 that are returned. It should be possible to change that in RAG's code
|
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 47 |
dataset.search_batch() function outputs all -1 indices sometime.
|
[
-0.29404038190841675,
-0.07587619870901108,
-0.21337218582630157,
0.1111055538058281,
0.11482501029968262,
-0.04728453606367111,
0.24745327234268188,
0.42615529894828796,
0.04280871897935867,
0.4052085876464844,
0.14434874057769775,
-0.11353979259729385,
-0.09642420709133148,
0.20890887081623077,
-0.16371986269950867,
0.15429602563381195,
0.0924735739827156,
0.4189704656600952,
-0.15901657938957214,
-0.4247385859489441,
-0.2177097350358963,
0.16438548266887665,
-0.292836993932724,
0.09918282181024551,
-0.273875892162323,
-0.0054437932558357716,
0.159163236618042,
-0.1567697674036026,
-0.05994042381644249,
-0.3637959957122803,
0.2554668188095093,
-0.10565976798534393,
0.016076939180493355,
0.41387173533439636,
-0.00010544010001467541,
0.006773150060325861,
0.30423957109451294,
-0.018347330391407013,
-0.39675459265708923,
-0.042986851185560226,
-0.5275683999061584,
0.05971382558345795,
0.07463295012712479,
-0.06793329119682312,
-0.06507007777690887,
-0.08746551722288132,
0.23269955813884735,
-0.5223621726036072,
-0.043256741017103195,
0.33736538887023926,
0.3027816414833069,
0.011656297370791435,
-0.2877003252506256,
-0.1349918097257614,
0.5562706589698792,
-0.007802091538906097,
0.17377059161663055,
-0.22563694417476654,
0.26020586490631104,
-0.14889083802700043,
-0.06187529116868973,
0.44272303581237793,
-0.0027719440404325724,
0.07731190323829651,
-0.02870914340019226,
0.024867011234164238,
0.3152991235256195,
-0.48007732629776,
0.32006415724754333,
-0.04855243116617203,
0.36140909790992737,
-0.06068309023976326,
-0.1829526424407959,
-0.11944674700498581,
-0.1573811024427414,
-0.20662148296833038,
-0.054650548845529556,
0.18530794978141785,
-0.19166867434978485,
-0.031306009739637375,
-0.13288356363773346,
0.2641383409500122,
-0.15256917476654053,
-0.02009834535419941,
-0.2297702580690384,
0.45373281836509705,
-0.06331366300582886,
0.14950862526893616,
0.13326896727085114,
-0.09405598044395447,
0.4378458559513092,
0.03050311468541622,
-0.041789934039115906,
0.04282202944159508,
-0.34087032079696655,
0.03749258071184158,
0.34730252623558044,
-0.20096172392368317,
0.22588606178760529,
-0.1164480596780777,
0.10122306644916534,
0.2725220322608948,
0.11230223625898361,
-0.0767935961484909,
0.3910321295261383,
0.19888511300086975,
0.3451099991798401,
0.273070365190506,
0.30251726508140564,
-0.555443286895752,
-0.09076860547065735,
0.1294839233160019,
0.2279222309589386,
-0.19965018332004547,
0.26802822947502136,
-0.04421237111091614,
-0.07364211231470108,
-0.0247958954423666,
-0.29625576734542847,
0.05910991132259369,
-0.03963463380932808,
-0.09615135937929153,
-0.03931623697280884,
0.2053704708814621,
0.22613732516765594,
-0.12181723117828369,
-0.1840512603521347,
0.12123160809278488,
-0.22161300480365753,
-0.14845801889896393,
-0.4902675747871399,
-0.09012392163276672,
0.032459162175655365,
-0.20011325180530548,
0.25020426511764526,
-0.2348499745130539,
0.07595071196556091,
-0.06406475603580475,
0.09272968769073486,
-0.03298308700323105,
0.10386907309293747,
-0.10165209323167801,
0.5358109474182129,
0.32826319336891174,
-0.012393885292112827,
0.3014694154262543,
0.22226591408252716,
-0.049594178795814514,
0.04759196564555168,
0.24275356531143188,
-0.09465119242668152,
-0.15637443959712982,
0.2165471911430359,
0.2923238277435303,
0.1771811693906784,
0.1613660603761673,
-0.003645879216492176,
0.2845022976398468,
0.023079710081219673,
0.11458341032266617,
-0.07369119673967361,
-0.39167043566703796,
0.05447297543287277,
0.0246694628149271,
0.10921543836593628,
0.16834378242492676,
-0.1357281357049942,
0.14989906549453735,
0.19353371858596802,
-0.030804332345724106,
0.2517489492893219,
0.15148626267910004,
-0.0737859383225441,
0.04693419486284256,
-0.36144185066223145,
0.4743559658527374,
0.2829725742340088,
-0.20881333947181702,
-0.3004736602306366,
0.06709739565849304,
-0.23676279187202454,
-0.45332345366477966,
-0.1435612291097641,
0.15307819843292236,
0.31272587180137634,
0.20680846273899078,
0.44983845949172974,
0.003046982455998659,
-0.02646969072520733,
0.2137426882982254,
-0.0693855956196785,
0.23836761713027954,
-0.08404357731342316,
-0.059432219713926315,
0.3230428993701935,
0.14372457563877106,
0.11572284996509552,
-0.6393337249755859,
0.2788347601890564,
-0.04908493533730507,
0.1312171071767807,
0.10571462661027908,
0.1565634161233902,
-0.0948013961315155,
0.32197660207748413,
-0.11465351283550262,
-0.07198129594326019,
0.1357128620147705,
-0.031527578830718994,
-0.12110677361488342,
-0.08340750634670258,
-0.130404993891716,
-0.15171267092227936,
0.08514730632305145,
-0.05355897918343544,
0.24893386662006378,
0.20590214431285858,
0.17300188541412354,
-0.14230749011039734,
0.07180628180503845,
-0.14468006789684296,
-0.09198814630508423,
0.21170933544635773,
-0.20054860413074493,
-0.2622799873352051,
-0.0396471805870533,
0.10067541897296906,
-0.09499696642160416,
0.012522641569375992,
-0.06375326216220856,
0.3330830931663513,
-0.03119366057217121,
-0.110454261302948,
0.244991734623909,
-0.1228783056139946,
-0.0750032439827919,
0.16602782905101776,
-0.012240849435329437,
-0.09760231524705887,
-0.07094339281320572,
-0.036398861557245255,
0.16808749735355377,
0.11732559651136398,
-0.05115455389022827,
-0.2377614676952362,
0.3604854643344879,
-0.23444847762584686,
0.15585020184516907,
0.007768278941512108,
-0.056603774428367615,
0.4228781759738922,
0.23822104930877686,
-0.11117324978113174,
-0.34628212451934814,
-0.16089196503162384,
-0.09915641695261002,
-0.05745925381779671,
-0.004661517217755318,
-0.4400566816329956,
0.2687910795211792,
0.1723218560218811,
-0.20608797669410706,
0.2516711950302124,
0.07266245782375336,
-0.14702646434307098,
-0.09070427715778351,
0.06625996530056,
0.2639062702655792,
0.1306445300579071,
0.3726389706134796,
0.285969614982605,
-0.390497088432312,
-0.026499155908823013,
-0.1815314143896103,
0.11191131919622421,
-0.016615822911262512,
-0.16017811000347137,
0.17101767659187317,
0.32391247153282166,
-0.3701731860637665,
-0.48063036799430847,
0.007067373488098383,
-0.05543690174818039,
0.2076433002948761,
-0.3149874806404114,
-0.009544995613396168,
-0.13799817860126495,
-0.23578818142414093,
-0.21768590807914734,
0.07832879573106766,
0.14084504544734955,
-0.3804806172847748,
0.1422777771949768,
-0.0050604939460754395,
-0.10635963827371597,
0.10312968492507935,
-0.1899605095386505,
0.3880246579647064,
0.351792573928833,
0.15235929191112518,
-0.1064695492386818,
0.01656568981707096,
-0.4356100261211395,
0.08210896700620651,
-0.2243715226650238,
0.23125094175338745,
0.18023501336574554,
-0.11832606792449951,
-0.06205965578556061,
-0.49419206380844116,
0.03497018665075302,
0.07121642678976059,
-0.12545566260814667,
-0.006918597500771284,
0.20951464772224426,
0.08642035722732544,
-0.4370402693748474,
0.00284600374288857,
-0.03445127606391907,
-0.07512394338846207,
-0.017561694607138634,
0.041572947055101395,
-0.03225400298833847,
0.14993147552013397,
-0.244997039437294,
-0.17021910846233368,
-0.041169583797454834,
-0.03119603544473648,
-0.018810825422406197,
-0.023554695770144463,
0.2646828293800354,
0.23495516180992126,
0.02123955264687538,
-0.10322312265634537,
0.030839011073112488,
-0.1082271859049797,
-0.3431864380836487,
-0.2120264768600464,
0.19335849583148956,
-0.025641119107604027,
-0.22549383342266083,
-0.287346214056015,
-0.12484883517026901,
-0.3188024163246155,
0.36271145939826965,
-0.3429906964302063,
0.1628570258617401,
-0.1601879745721817,
-0.1522444188594818,
-0.08320694416761398,
0.24433472752571106,
0.15343904495239258,
-0.00029289282974787056,
-0.2644725441932678,
-0.31779882311820984,
-0.17742888629436493,
0.23864366114139557,
0.011170822195708752,
0.024355044588446617,
-0.19374921917915344,
0.3689059913158417,
-0.18493889272212982,
0.5601325035095215,
-0.04178231209516525,
-0.0838155671954155,
0.13827873766422272,
-0.13761772215366364,
0.29499366879463196,
-0.03467057645320892,
-0.1852641999721527,
0.13299375772476196,
0.20171768963336945,
-0.14233550429344177,
0.11779766529798508,
-0.09670905023813248,
-0.09855266660451889,
0.11619749665260315,
-0.02329845353960991,
-0.21408870816230774,
-0.23606279492378235,
-0.07588091492652893,
-0.09982934594154358,
0.10424758493900299,
0.3162616789340973,
0.23820345103740692,
-0.2749473750591278,
-0.013065537437796593,
-0.27974697947502136,
-0.41959673166275024,
-0.04600953683257103,
-0.04052528738975525,
0.06616789102554321,
-0.11013564467430115,
-0.584339439868927,
0.13379605114459991,
-0.025025073438882828,
0.4848845303058624,
0.21146166324615479,
-0.20372769236564636,
0.1390875279903412,
0.10392547398805618,
0.8822842836380005,
-0.1320267766714096,
0.33931657671928406,
0.09954993426799774,
0.0655873641371727,
-0.2481849491596222,
-0.10813184082508087,
-0.32061830163002014,
0.6482236981391907,
-0.07590777426958084,
0.38444018363952637,
0.04024854674935341,
-0.07259257882833481,
0.18812532722949982,
-0.008515764959156513,
0.016127025708556175,
-0.05067233368754387,
-0.3273419737815857,
-0.28916576504707336,
0.2959098815917969,
0.3187352418899536,
0.26145753264427185,
0.002998730866238475,
-0.06587577611207962,
-0.5092999339103699,
-0.2358924299478531,
-0.19584974646568298,
0.044271256774663925,
0.12071805447340012,
0.3030267059803009,
0.23569001257419586,
0.10096977651119232,
0.18207553029060364,
0.040179938077926636,
0.24752120673656464,
0.07437653839588165,
-0.36139026284217834,
0.3086409568786621,
0.236299529671669,
-0.33826372027397156,
0.19675953686237335,
0.29498857259750366,
-0.1619461178779602,
-0.15534047782421112,
-0.13857580721378326,
0.23386356234550476,
0.025472603738307953,
0.0013695560628548265,
0.2800304591655731,
0.07209838181734085,
-0.31303542852401733,
-0.3138696551322937,
0.3948414623737335,
-0.013760133646428585,
-0.24297258257865906,
0.3272378146648407,
-0.002837371313944459,
-0.2631716728210449,
0.28855058550834656,
-0.014284334145486355,
0.42862555384635925,
-0.08170762658119202,
0.12597928941249847,
-0.0006569463876076043,
0.25147756934165955,
0.12270524352788925,
0.35505297780036926,
0.38184547424316406,
-0.35643818974494934,
-0.39191344380378723,
0.06683425605297089,
-0.11478430032730103,
-0.34927746653556824,
0.2808842062950134,
-0.03748302906751633,
0.18740463256835938,
-0.0394701212644577,
-0.005092788487672806,
-0.10847623646259308,
-0.07014431804418564,
0.230552077293396,
0.007977008819580078,
-0.0018151614349335432,
0.21230153739452362,
0.21670138835906982,
0.07012605667114258,
-0.02034730091691017,
-0.03984901309013367,
0.18264029920101166,
-0.3323439657688141,
0.07479029893875122,
-0.11110613495111465,
-0.1008128747344017,
0.36842742562294006,
0.03533143177628517,
-0.35558611154556274,
-0.338906466960907,
-0.12880399823188782,
0.20728598535060883,
0.0879412516951561,
0.07257412374019623,
0.0867585614323616,
0.5402178764343262,
0.3633711338043213,
-0.021831899881362915,
-0.0023422150406986475,
0.17793115973472595,
0.06474260985851288,
-0.19776126742362976,
-0.19131885468959808,
0.14965644478797913,
-0.07034477591514587,
-0.15062949061393738,
0.32556605339050293,
-0.46248742938041687,
-0.0396762453019619,
-0.008439111523330212,
0.00905685592442751,
0.06151627376675606,
-0.24007607996463776,
0.18454161286354065,
0.09465479850769043,
0.004465350415557623,
0.5052645802497864,
0.1111207902431488,
-0.45360293984413147,
-0.1451522558927536,
0.3345709443092346,
0.18783816695213318,
0.07279250770807266,
0.3218372166156769,
-0.05765055492520332,
-0.1233515664935112,
-0.3469974100589752,
0.14815650880336761,
0.28470858931541443,
0.19598504900932312,
0.5777711272239685,
-0.3755914270877838,
0.07266824692487717,
0.3222358524799347,
0.33879658579826355,
-0.14033636450767517,
0.09715654700994492,
-0.22712180018424988,
-0.06567532569169998,
-0.08693327009677887,
-0.08528058230876923,
0.09475061297416687,
0.28016671538352966,
-0.015981322154402733,
-0.18673554062843323,
0.16274617612361908,
-0.23046256601810455,
-0.42216891050338745,
-0.16293077170848846,
-0.11921913176774979,
0.27580875158309937,
-0.3156631886959076,
0.23948389291763306,
-0.05715814605355263,
0.037210557609796524,
0.23892536759376526,
0.0018024872988462448,
-0.05460217967629433,
-0.3460875451564789,
0.15875224769115448,
0.08776762336492538,
-0.11437465995550156,
0.189097061753273,
-0.021576130762696266,
-0.1659422218799591,
-0.3857114315032959,
-0.16701270639896393,
0.0261852964758873,
0.41574370861053467,
-0.05154494196176529,
-0.05238965153694153,
0.34406062960624695,
-0.09733658283948898,
0.6132326722145081,
-0.048052798956632614,
-0.011967875063419342,
-0.12676994502544403,
-0.13166165351867676,
0.24751628935337067,
-0.01585639826953411,
-0.06725431233644485,
0.06461158394813538,
-0.014777938835322857,
-0.21904876828193665,
0.13387884199619293,
-0.0636284202337265,
-0.3820212483406067,
-0.2978622019290924,
0.4119755029678345,
0.3817130923271179,
0.2772909700870514,
-0.24315717816352844,
-0.25335729122161865,
0.11315422505140305,
0.32658928632736206,
-0.33985331654548645,
-0.2887231707572937,
0.03074800781905651,
0.018717719241976738,
0.23757325112819672,
0.16200612485408783,
0.0553583987057209,
-0.23171131312847137,
-0.05335848778486252,
0.08701305836439133,
0.41079360246658325,
-0.25850963592529297,
-0.09303537756204605,
0.040182601660490036,
0.11204701662063599,
-0.1348763406276703,
0.31966444849967957,
0.12499378621578217,
0.2145882099866867,
0.7398802042007446,
0.003585678990930319,
0.2964409291744232,
0.17972148954868317,
-0.14371530711650848,
-0.2697785794734955,
-0.2864271402359009,
0.319623202085495,
0.3358162045478821,
-0.4585089087486267,
0.06005357205867767,
0.2970444858074188,
0.032780926674604416,
-0.4250414967536926,
0.1216026023030281,
-0.13281576335430145,
-0.09765852242708206,
-0.1180155873298645,
-0.11444849520921707,
-0.045370105654001236,
-0.2516714632511139,
0.06651585549116135,
-0.04823354259133339,
-0.049961138516664505,
0.2599700689315796,
-0.12670515477657318,
-0.10918834805488586,
-0.018135761842131615,
-0.11986234784126282,
-0.1101338192820549,
0.0012788946041837335,
0.09629359096288681,
-0.18857203423976898,
0.04643940553069115,
-0.01146235316991806,
0.030986366793513298,
0.2609630227088928,
0.26255926489830017,
0.21847034990787506,
0.3585488796234131,
-0.07708234339952469,
0.03136763721704483,
-0.13187383115291595,
-0.2714037001132965,
-0.4039422273635864,
-0.09291016310453415,
0.0069273910485208035,
-0.18596261739730835,
0.30620357394218445,
0.24723201990127563,
-0.07084047049283981,
0.18564443290233612,
0.29722824692726135,
0.1820814460515976,
-0.1383855640888214,
-0.14310000836849213,
-0.0022049143444746733,
-0.07529167830944061,
-0.1809903234243393,
-0.12914589047431946,
-0.3248516023159027,
-0.07913798838853836,
0.3013514578342438,
-0.18372780084609985,
0.3511919677257538,
-0.06731250137090683,
0.14950717985630035,
-0.18598859012126923,
0.486377477645874,
-0.2534703314304352,
0.1088021770119667,
-0.005833912640810013,
-0.056097377091646194,
-0.48497939109802246,
0.12630490958690643,
-0.23675978183746338,
0.1244855523109436,
0.05455262213945389,
0.32299041748046875,
-0.0443711020052433,
-0.4196699559688568,
0.3156551122665405,
0.31507307291030884,
-0.23943302035331726,
0.12424952536821365,
-0.10761674493551254,
-0.01308463141322136,
-0.4162071943283081,
0.18928173184394836,
0.03755173087120056,
-0.20886977016925812,
0.36842599511146545,
-0.17609548568725586,
0.2669323682785034,
0.0834757536649704,
0.06122913211584091,
0.12620528042316437,
-0.11648792028427124,
0.45391935110092163,
0.06228981912136078,
0.1590372622013092,
-0.19427892565727234,
0.3377153277397156,
-0.21278056502342224,
-0.11563247442245483,
-0.3309916853904724,
-0.038171492516994476,
0.18955068290233612,
0.09269199520349503,
-0.18233174085617065,
-0.22089356184005737,
0.030040916055440903,
0.09449411928653717,
0.31302329897880554,
0.10735198110342026,
-0.05588310956954956,
0.3016713261604309,
-0.1001918762922287,
0.003721646498888731,
-0.1275130957365036,
-0.09189199656248093,
0.11538935452699661,
0.10581445693969727,
-0.05201959237456322,
-0.5365822911262512,
0.3319375514984131,
-0.4051196873188019,
-0.4870537221431732,
-0.7009401321411133,
0.28037020564079285,
0.1669822633266449,
-0.07477796822786331,
-0.06824260205030441,
0.04728717356920242,
0.2763405442237854,
0.06584558635950089,
-0.42752864956855774,
-0.03130137175321579,
-0.22986933588981628,
0.09541881084442139,
-0.12975603342056274,
0.016146330162882805,
0.47125470638275146,
-0.24272987246513367,
-0.023364301770925522,
-0.28201064467430115
] |
https://github.com/huggingface/datasets/issues/2175
|
dataset.search_batch() function outputs all -1 indices sometime.
|
I also checked with some indexes it returns more -1s. Specially with IVF
when nprobr is very low. It doesn't happen when using HNSW though. But at
the moment if it happens, dataset will always return the last element.
Maybe we should change it to repeat the most last valid retrieved doc id.
What do you think?
On Wed, Apr 7, 2021, 21:09 Quentin Lhoest ***@***.***> wrote:
> Hi !
> No it happens sometimes to return -1, especially if your dataset is small.
> If your dataset is big enough it shouldn't happen.
>
> Ideally we should ignore all the -1 that are returned. It should be
> possible to change that in RAG's code
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2175#issuecomment-814746509>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEA4FGTENOTLBEZTXEO2RS3THQOMPANCNFSM42PRVYDA>
> .
>
|
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 150 |
dataset.search_batch() function outputs all -1 indices sometime.
|
[
-0.29404038190841675,
-0.07587619870901108,
-0.21337218582630157,
0.1111055538058281,
0.11482501029968262,
-0.04728453606367111,
0.24745327234268188,
0.42615529894828796,
0.04280871897935867,
0.4052085876464844,
0.14434874057769775,
-0.11353979259729385,
-0.09642420709133148,
0.20890887081623077,
-0.16371986269950867,
0.15429602563381195,
0.0924735739827156,
0.4189704656600952,
-0.15901657938957214,
-0.4247385859489441,
-0.2177097350358963,
0.16438548266887665,
-0.292836993932724,
0.09918282181024551,
-0.273875892162323,
-0.0054437932558357716,
0.159163236618042,
-0.1567697674036026,
-0.05994042381644249,
-0.3637959957122803,
0.2554668188095093,
-0.10565976798534393,
0.016076939180493355,
0.41387173533439636,
-0.00010544010001467541,
0.006773150060325861,
0.30423957109451294,
-0.018347330391407013,
-0.39675459265708923,
-0.042986851185560226,
-0.5275683999061584,
0.05971382558345795,
0.07463295012712479,
-0.06793329119682312,
-0.06507007777690887,
-0.08746551722288132,
0.23269955813884735,
-0.5223621726036072,
-0.043256741017103195,
0.33736538887023926,
0.3027816414833069,
0.011656297370791435,
-0.2877003252506256,
-0.1349918097257614,
0.5562706589698792,
-0.007802091538906097,
0.17377059161663055,
-0.22563694417476654,
0.26020586490631104,
-0.14889083802700043,
-0.06187529116868973,
0.44272303581237793,
-0.0027719440404325724,
0.07731190323829651,
-0.02870914340019226,
0.024867011234164238,
0.3152991235256195,
-0.48007732629776,
0.32006415724754333,
-0.04855243116617203,
0.36140909790992737,
-0.06068309023976326,
-0.1829526424407959,
-0.11944674700498581,
-0.1573811024427414,
-0.20662148296833038,
-0.054650548845529556,
0.18530794978141785,
-0.19166867434978485,
-0.031306009739637375,
-0.13288356363773346,
0.2641383409500122,
-0.15256917476654053,
-0.02009834535419941,
-0.2297702580690384,
0.45373281836509705,
-0.06331366300582886,
0.14950862526893616,
0.13326896727085114,
-0.09405598044395447,
0.4378458559513092,
0.03050311468541622,
-0.041789934039115906,
0.04282202944159508,
-0.34087032079696655,
0.03749258071184158,
0.34730252623558044,
-0.20096172392368317,
0.22588606178760529,
-0.1164480596780777,
0.10122306644916534,
0.2725220322608948,
0.11230223625898361,
-0.0767935961484909,
0.3910321295261383,
0.19888511300086975,
0.3451099991798401,
0.273070365190506,
0.30251726508140564,
-0.555443286895752,
-0.09076860547065735,
0.1294839233160019,
0.2279222309589386,
-0.19965018332004547,
0.26802822947502136,
-0.04421237111091614,
-0.07364211231470108,
-0.0247958954423666,
-0.29625576734542847,
0.05910991132259369,
-0.03963463380932808,
-0.09615135937929153,
-0.03931623697280884,
0.2053704708814621,
0.22613732516765594,
-0.12181723117828369,
-0.1840512603521347,
0.12123160809278488,
-0.22161300480365753,
-0.14845801889896393,
-0.4902675747871399,
-0.09012392163276672,
0.032459162175655365,
-0.20011325180530548,
0.25020426511764526,
-0.2348499745130539,
0.07595071196556091,
-0.06406475603580475,
0.09272968769073486,
-0.03298308700323105,
0.10386907309293747,
-0.10165209323167801,
0.5358109474182129,
0.32826319336891174,
-0.012393885292112827,
0.3014694154262543,
0.22226591408252716,
-0.049594178795814514,
0.04759196564555168,
0.24275356531143188,
-0.09465119242668152,
-0.15637443959712982,
0.2165471911430359,
0.2923238277435303,
0.1771811693906784,
0.1613660603761673,
-0.003645879216492176,
0.2845022976398468,
0.023079710081219673,
0.11458341032266617,
-0.07369119673967361,
-0.39167043566703796,
0.05447297543287277,
0.0246694628149271,
0.10921543836593628,
0.16834378242492676,
-0.1357281357049942,
0.14989906549453735,
0.19353371858596802,
-0.030804332345724106,
0.2517489492893219,
0.15148626267910004,
-0.0737859383225441,
0.04693419486284256,
-0.36144185066223145,
0.4743559658527374,
0.2829725742340088,
-0.20881333947181702,
-0.3004736602306366,
0.06709739565849304,
-0.23676279187202454,
-0.45332345366477966,
-0.1435612291097641,
0.15307819843292236,
0.31272587180137634,
0.20680846273899078,
0.44983845949172974,
0.003046982455998659,
-0.02646969072520733,
0.2137426882982254,
-0.0693855956196785,
0.23836761713027954,
-0.08404357731342316,
-0.059432219713926315,
0.3230428993701935,
0.14372457563877106,
0.11572284996509552,
-0.6393337249755859,
0.2788347601890564,
-0.04908493533730507,
0.1312171071767807,
0.10571462661027908,
0.1565634161233902,
-0.0948013961315155,
0.32197660207748413,
-0.11465351283550262,
-0.07198129594326019,
0.1357128620147705,
-0.031527578830718994,
-0.12110677361488342,
-0.08340750634670258,
-0.130404993891716,
-0.15171267092227936,
0.08514730632305145,
-0.05355897918343544,
0.24893386662006378,
0.20590214431285858,
0.17300188541412354,
-0.14230749011039734,
0.07180628180503845,
-0.14468006789684296,
-0.09198814630508423,
0.21170933544635773,
-0.20054860413074493,
-0.2622799873352051,
-0.0396471805870533,
0.10067541897296906,
-0.09499696642160416,
0.012522641569375992,
-0.06375326216220856,
0.3330830931663513,
-0.03119366057217121,
-0.110454261302948,
0.244991734623909,
-0.1228783056139946,
-0.0750032439827919,
0.16602782905101776,
-0.012240849435329437,
-0.09760231524705887,
-0.07094339281320572,
-0.036398861557245255,
0.16808749735355377,
0.11732559651136398,
-0.05115455389022827,
-0.2377614676952362,
0.3604854643344879,
-0.23444847762584686,
0.15585020184516907,
0.007768278941512108,
-0.056603774428367615,
0.4228781759738922,
0.23822104930877686,
-0.11117324978113174,
-0.34628212451934814,
-0.16089196503162384,
-0.09915641695261002,
-0.05745925381779671,
-0.004661517217755318,
-0.4400566816329956,
0.2687910795211792,
0.1723218560218811,
-0.20608797669410706,
0.2516711950302124,
0.07266245782375336,
-0.14702646434307098,
-0.09070427715778351,
0.06625996530056,
0.2639062702655792,
0.1306445300579071,
0.3726389706134796,
0.285969614982605,
-0.390497088432312,
-0.026499155908823013,
-0.1815314143896103,
0.11191131919622421,
-0.016615822911262512,
-0.16017811000347137,
0.17101767659187317,
0.32391247153282166,
-0.3701731860637665,
-0.48063036799430847,
0.007067373488098383,
-0.05543690174818039,
0.2076433002948761,
-0.3149874806404114,
-0.009544995613396168,
-0.13799817860126495,
-0.23578818142414093,
-0.21768590807914734,
0.07832879573106766,
0.14084504544734955,
-0.3804806172847748,
0.1422777771949768,
-0.0050604939460754395,
-0.10635963827371597,
0.10312968492507935,
-0.1899605095386505,
0.3880246579647064,
0.351792573928833,
0.15235929191112518,
-0.1064695492386818,
0.01656568981707096,
-0.4356100261211395,
0.08210896700620651,
-0.2243715226650238,
0.23125094175338745,
0.18023501336574554,
-0.11832606792449951,
-0.06205965578556061,
-0.49419206380844116,
0.03497018665075302,
0.07121642678976059,
-0.12545566260814667,
-0.006918597500771284,
0.20951464772224426,
0.08642035722732544,
-0.4370402693748474,
0.00284600374288857,
-0.03445127606391907,
-0.07512394338846207,
-0.017561694607138634,
0.041572947055101395,
-0.03225400298833847,
0.14993147552013397,
-0.244997039437294,
-0.17021910846233368,
-0.041169583797454834,
-0.03119603544473648,
-0.018810825422406197,
-0.023554695770144463,
0.2646828293800354,
0.23495516180992126,
0.02123955264687538,
-0.10322312265634537,
0.030839011073112488,
-0.1082271859049797,
-0.3431864380836487,
-0.2120264768600464,
0.19335849583148956,
-0.025641119107604027,
-0.22549383342266083,
-0.287346214056015,
-0.12484883517026901,
-0.3188024163246155,
0.36271145939826965,
-0.3429906964302063,
0.1628570258617401,
-0.1601879745721817,
-0.1522444188594818,
-0.08320694416761398,
0.24433472752571106,
0.15343904495239258,
-0.00029289282974787056,
-0.2644725441932678,
-0.31779882311820984,
-0.17742888629436493,
0.23864366114139557,
0.011170822195708752,
0.024355044588446617,
-0.19374921917915344,
0.3689059913158417,
-0.18493889272212982,
0.5601325035095215,
-0.04178231209516525,
-0.0838155671954155,
0.13827873766422272,
-0.13761772215366364,
0.29499366879463196,
-0.03467057645320892,
-0.1852641999721527,
0.13299375772476196,
0.20171768963336945,
-0.14233550429344177,
0.11779766529798508,
-0.09670905023813248,
-0.09855266660451889,
0.11619749665260315,
-0.02329845353960991,
-0.21408870816230774,
-0.23606279492378235,
-0.07588091492652893,
-0.09982934594154358,
0.10424758493900299,
0.3162616789340973,
0.23820345103740692,
-0.2749473750591278,
-0.013065537437796593,
-0.27974697947502136,
-0.41959673166275024,
-0.04600953683257103,
-0.04052528738975525,
0.06616789102554321,
-0.11013564467430115,
-0.584339439868927,
0.13379605114459991,
-0.025025073438882828,
0.4848845303058624,
0.21146166324615479,
-0.20372769236564636,
0.1390875279903412,
0.10392547398805618,
0.8822842836380005,
-0.1320267766714096,
0.33931657671928406,
0.09954993426799774,
0.0655873641371727,
-0.2481849491596222,
-0.10813184082508087,
-0.32061830163002014,
0.6482236981391907,
-0.07590777426958084,
0.38444018363952637,
0.04024854674935341,
-0.07259257882833481,
0.18812532722949982,
-0.008515764959156513,
0.016127025708556175,
-0.05067233368754387,
-0.3273419737815857,
-0.28916576504707336,
0.2959098815917969,
0.3187352418899536,
0.26145753264427185,
0.002998730866238475,
-0.06587577611207962,
-0.5092999339103699,
-0.2358924299478531,
-0.19584974646568298,
0.044271256774663925,
0.12071805447340012,
0.3030267059803009,
0.23569001257419586,
0.10096977651119232,
0.18207553029060364,
0.040179938077926636,
0.24752120673656464,
0.07437653839588165,
-0.36139026284217834,
0.3086409568786621,
0.236299529671669,
-0.33826372027397156,
0.19675953686237335,
0.29498857259750366,
-0.1619461178779602,
-0.15534047782421112,
-0.13857580721378326,
0.23386356234550476,
0.025472603738307953,
0.0013695560628548265,
0.2800304591655731,
0.07209838181734085,
-0.31303542852401733,
-0.3138696551322937,
0.3948414623737335,
-0.013760133646428585,
-0.24297258257865906,
0.3272378146648407,
-0.002837371313944459,
-0.2631716728210449,
0.28855058550834656,
-0.014284334145486355,
0.42862555384635925,
-0.08170762658119202,
0.12597928941249847,
-0.0006569463876076043,
0.25147756934165955,
0.12270524352788925,
0.35505297780036926,
0.38184547424316406,
-0.35643818974494934,
-0.39191344380378723,
0.06683425605297089,
-0.11478430032730103,
-0.34927746653556824,
0.2808842062950134,
-0.03748302906751633,
0.18740463256835938,
-0.0394701212644577,
-0.005092788487672806,
-0.10847623646259308,
-0.07014431804418564,
0.230552077293396,
0.007977008819580078,
-0.0018151614349335432,
0.21230153739452362,
0.21670138835906982,
0.07012605667114258,
-0.02034730091691017,
-0.03984901309013367,
0.18264029920101166,
-0.3323439657688141,
0.07479029893875122,
-0.11110613495111465,
-0.1008128747344017,
0.36842742562294006,
0.03533143177628517,
-0.35558611154556274,
-0.338906466960907,
-0.12880399823188782,
0.20728598535060883,
0.0879412516951561,
0.07257412374019623,
0.0867585614323616,
0.5402178764343262,
0.3633711338043213,
-0.021831899881362915,
-0.0023422150406986475,
0.17793115973472595,
0.06474260985851288,
-0.19776126742362976,
-0.19131885468959808,
0.14965644478797913,
-0.07034477591514587,
-0.15062949061393738,
0.32556605339050293,
-0.46248742938041687,
-0.0396762453019619,
-0.008439111523330212,
0.00905685592442751,
0.06151627376675606,
-0.24007607996463776,
0.18454161286354065,
0.09465479850769043,
0.004465350415557623,
0.5052645802497864,
0.1111207902431488,
-0.45360293984413147,
-0.1451522558927536,
0.3345709443092346,
0.18783816695213318,
0.07279250770807266,
0.3218372166156769,
-0.05765055492520332,
-0.1233515664935112,
-0.3469974100589752,
0.14815650880336761,
0.28470858931541443,
0.19598504900932312,
0.5777711272239685,
-0.3755914270877838,
0.07266824692487717,
0.3222358524799347,
0.33879658579826355,
-0.14033636450767517,
0.09715654700994492,
-0.22712180018424988,
-0.06567532569169998,
-0.08693327009677887,
-0.08528058230876923,
0.09475061297416687,
0.28016671538352966,
-0.015981322154402733,
-0.18673554062843323,
0.16274617612361908,
-0.23046256601810455,
-0.42216891050338745,
-0.16293077170848846,
-0.11921913176774979,
0.27580875158309937,
-0.3156631886959076,
0.23948389291763306,
-0.05715814605355263,
0.037210557609796524,
0.23892536759376526,
0.0018024872988462448,
-0.05460217967629433,
-0.3460875451564789,
0.15875224769115448,
0.08776762336492538,
-0.11437465995550156,
0.189097061753273,
-0.021576130762696266,
-0.1659422218799591,
-0.3857114315032959,
-0.16701270639896393,
0.0261852964758873,
0.41574370861053467,
-0.05154494196176529,
-0.05238965153694153,
0.34406062960624695,
-0.09733658283948898,
0.6132326722145081,
-0.048052798956632614,
-0.011967875063419342,
-0.12676994502544403,
-0.13166165351867676,
0.24751628935337067,
-0.01585639826953411,
-0.06725431233644485,
0.06461158394813538,
-0.014777938835322857,
-0.21904876828193665,
0.13387884199619293,
-0.0636284202337265,
-0.3820212483406067,
-0.2978622019290924,
0.4119755029678345,
0.3817130923271179,
0.2772909700870514,
-0.24315717816352844,
-0.25335729122161865,
0.11315422505140305,
0.32658928632736206,
-0.33985331654548645,
-0.2887231707572937,
0.03074800781905651,
0.018717719241976738,
0.23757325112819672,
0.16200612485408783,
0.0553583987057209,
-0.23171131312847137,
-0.05335848778486252,
0.08701305836439133,
0.41079360246658325,
-0.25850963592529297,
-0.09303537756204605,
0.040182601660490036,
0.11204701662063599,
-0.1348763406276703,
0.31966444849967957,
0.12499378621578217,
0.2145882099866867,
0.7398802042007446,
0.003585678990930319,
0.2964409291744232,
0.17972148954868317,
-0.14371530711650848,
-0.2697785794734955,
-0.2864271402359009,
0.319623202085495,
0.3358162045478821,
-0.4585089087486267,
0.06005357205867767,
0.2970444858074188,
0.032780926674604416,
-0.4250414967536926,
0.1216026023030281,
-0.13281576335430145,
-0.09765852242708206,
-0.1180155873298645,
-0.11444849520921707,
-0.045370105654001236,
-0.2516714632511139,
0.06651585549116135,
-0.04823354259133339,
-0.049961138516664505,
0.2599700689315796,
-0.12670515477657318,
-0.10918834805488586,
-0.018135761842131615,
-0.11986234784126282,
-0.1101338192820549,
0.0012788946041837335,
0.09629359096288681,
-0.18857203423976898,
0.04643940553069115,
-0.01146235316991806,
0.030986366793513298,
0.2609630227088928,
0.26255926489830017,
0.21847034990787506,
0.3585488796234131,
-0.07708234339952469,
0.03136763721704483,
-0.13187383115291595,
-0.2714037001132965,
-0.4039422273635864,
-0.09291016310453415,
0.0069273910485208035,
-0.18596261739730835,
0.30620357394218445,
0.24723201990127563,
-0.07084047049283981,
0.18564443290233612,
0.29722824692726135,
0.1820814460515976,
-0.1383855640888214,
-0.14310000836849213,
-0.0022049143444746733,
-0.07529167830944061,
-0.1809903234243393,
-0.12914589047431946,
-0.3248516023159027,
-0.07913798838853836,
0.3013514578342438,
-0.18372780084609985,
0.3511919677257538,
-0.06731250137090683,
0.14950717985630035,
-0.18598859012126923,
0.486377477645874,
-0.2534703314304352,
0.1088021770119667,
-0.005833912640810013,
-0.056097377091646194,
-0.48497939109802246,
0.12630490958690643,
-0.23675978183746338,
0.1244855523109436,
0.05455262213945389,
0.32299041748046875,
-0.0443711020052433,
-0.4196699559688568,
0.3156551122665405,
0.31507307291030884,
-0.23943302035331726,
0.12424952536821365,
-0.10761674493551254,
-0.01308463141322136,
-0.4162071943283081,
0.18928173184394836,
0.03755173087120056,
-0.20886977016925812,
0.36842599511146545,
-0.17609548568725586,
0.2669323682785034,
0.0834757536649704,
0.06122913211584091,
0.12620528042316437,
-0.11648792028427124,
0.45391935110092163,
0.06228981912136078,
0.1590372622013092,
-0.19427892565727234,
0.3377153277397156,
-0.21278056502342224,
-0.11563247442245483,
-0.3309916853904724,
-0.038171492516994476,
0.18955068290233612,
0.09269199520349503,
-0.18233174085617065,
-0.22089356184005737,
0.030040916055440903,
0.09449411928653717,
0.31302329897880554,
0.10735198110342026,
-0.05588310956954956,
0.3016713261604309,
-0.1001918762922287,
0.003721646498888731,
-0.1275130957365036,
-0.09189199656248093,
0.11538935452699661,
0.10581445693969727,
-0.05201959237456322,
-0.5365822911262512,
0.3319375514984131,
-0.4051196873188019,
-0.4870537221431732,
-0.7009401321411133,
0.28037020564079285,
0.1669822633266449,
-0.07477796822786331,
-0.06824260205030441,
0.04728717356920242,
0.2763405442237854,
0.06584558635950089,
-0.42752864956855774,
-0.03130137175321579,
-0.22986933588981628,
0.09541881084442139,
-0.12975603342056274,
0.016146330162882805,
0.47125470638275146,
-0.24272987246513367,
-0.023364301770925522,
-0.28201064467430115
] |
https://github.com/huggingface/datasets/issues/2175
|
dataset.search_batch() function outputs all -1 indices sometime.
|
That would be an easy way to workaround this issue. Feel free to open a PR on `transformers` and ping me ! :)
|
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 23 |
dataset.search_batch() function outputs all -1 indices sometime.
|
[
-0.29404038190841675,
-0.07587619870901108,
-0.21337218582630157,
0.1111055538058281,
0.11482501029968262,
-0.04728453606367111,
0.24745327234268188,
0.42615529894828796,
0.04280871897935867,
0.4052085876464844,
0.14434874057769775,
-0.11353979259729385,
-0.09642420709133148,
0.20890887081623077,
-0.16371986269950867,
0.15429602563381195,
0.0924735739827156,
0.4189704656600952,
-0.15901657938957214,
-0.4247385859489441,
-0.2177097350358963,
0.16438548266887665,
-0.292836993932724,
0.09918282181024551,
-0.273875892162323,
-0.0054437932558357716,
0.159163236618042,
-0.1567697674036026,
-0.05994042381644249,
-0.3637959957122803,
0.2554668188095093,
-0.10565976798534393,
0.016076939180493355,
0.41387173533439636,
-0.00010544010001467541,
0.006773150060325861,
0.30423957109451294,
-0.018347330391407013,
-0.39675459265708923,
-0.042986851185560226,
-0.5275683999061584,
0.05971382558345795,
0.07463295012712479,
-0.06793329119682312,
-0.06507007777690887,
-0.08746551722288132,
0.23269955813884735,
-0.5223621726036072,
-0.043256741017103195,
0.33736538887023926,
0.3027816414833069,
0.011656297370791435,
-0.2877003252506256,
-0.1349918097257614,
0.5562706589698792,
-0.007802091538906097,
0.17377059161663055,
-0.22563694417476654,
0.26020586490631104,
-0.14889083802700043,
-0.06187529116868973,
0.44272303581237793,
-0.0027719440404325724,
0.07731190323829651,
-0.02870914340019226,
0.024867011234164238,
0.3152991235256195,
-0.48007732629776,
0.32006415724754333,
-0.04855243116617203,
0.36140909790992737,
-0.06068309023976326,
-0.1829526424407959,
-0.11944674700498581,
-0.1573811024427414,
-0.20662148296833038,
-0.054650548845529556,
0.18530794978141785,
-0.19166867434978485,
-0.031306009739637375,
-0.13288356363773346,
0.2641383409500122,
-0.15256917476654053,
-0.02009834535419941,
-0.2297702580690384,
0.45373281836509705,
-0.06331366300582886,
0.14950862526893616,
0.13326896727085114,
-0.09405598044395447,
0.4378458559513092,
0.03050311468541622,
-0.041789934039115906,
0.04282202944159508,
-0.34087032079696655,
0.03749258071184158,
0.34730252623558044,
-0.20096172392368317,
0.22588606178760529,
-0.1164480596780777,
0.10122306644916534,
0.2725220322608948,
0.11230223625898361,
-0.0767935961484909,
0.3910321295261383,
0.19888511300086975,
0.3451099991798401,
0.273070365190506,
0.30251726508140564,
-0.555443286895752,
-0.09076860547065735,
0.1294839233160019,
0.2279222309589386,
-0.19965018332004547,
0.26802822947502136,
-0.04421237111091614,
-0.07364211231470108,
-0.0247958954423666,
-0.29625576734542847,
0.05910991132259369,
-0.03963463380932808,
-0.09615135937929153,
-0.03931623697280884,
0.2053704708814621,
0.22613732516765594,
-0.12181723117828369,
-0.1840512603521347,
0.12123160809278488,
-0.22161300480365753,
-0.14845801889896393,
-0.4902675747871399,
-0.09012392163276672,
0.032459162175655365,
-0.20011325180530548,
0.25020426511764526,
-0.2348499745130539,
0.07595071196556091,
-0.06406475603580475,
0.09272968769073486,
-0.03298308700323105,
0.10386907309293747,
-0.10165209323167801,
0.5358109474182129,
0.32826319336891174,
-0.012393885292112827,
0.3014694154262543,
0.22226591408252716,
-0.049594178795814514,
0.04759196564555168,
0.24275356531143188,
-0.09465119242668152,
-0.15637443959712982,
0.2165471911430359,
0.2923238277435303,
0.1771811693906784,
0.1613660603761673,
-0.003645879216492176,
0.2845022976398468,
0.023079710081219673,
0.11458341032266617,
-0.07369119673967361,
-0.39167043566703796,
0.05447297543287277,
0.0246694628149271,
0.10921543836593628,
0.16834378242492676,
-0.1357281357049942,
0.14989906549453735,
0.19353371858596802,
-0.030804332345724106,
0.2517489492893219,
0.15148626267910004,
-0.0737859383225441,
0.04693419486284256,
-0.36144185066223145,
0.4743559658527374,
0.2829725742340088,
-0.20881333947181702,
-0.3004736602306366,
0.06709739565849304,
-0.23676279187202454,
-0.45332345366477966,
-0.1435612291097641,
0.15307819843292236,
0.31272587180137634,
0.20680846273899078,
0.44983845949172974,
0.003046982455998659,
-0.02646969072520733,
0.2137426882982254,
-0.0693855956196785,
0.23836761713027954,
-0.08404357731342316,
-0.059432219713926315,
0.3230428993701935,
0.14372457563877106,
0.11572284996509552,
-0.6393337249755859,
0.2788347601890564,
-0.04908493533730507,
0.1312171071767807,
0.10571462661027908,
0.1565634161233902,
-0.0948013961315155,
0.32197660207748413,
-0.11465351283550262,
-0.07198129594326019,
0.1357128620147705,
-0.031527578830718994,
-0.12110677361488342,
-0.08340750634670258,
-0.130404993891716,
-0.15171267092227936,
0.08514730632305145,
-0.05355897918343544,
0.24893386662006378,
0.20590214431285858,
0.17300188541412354,
-0.14230749011039734,
0.07180628180503845,
-0.14468006789684296,
-0.09198814630508423,
0.21170933544635773,
-0.20054860413074493,
-0.2622799873352051,
-0.0396471805870533,
0.10067541897296906,
-0.09499696642160416,
0.012522641569375992,
-0.06375326216220856,
0.3330830931663513,
-0.03119366057217121,
-0.110454261302948,
0.244991734623909,
-0.1228783056139946,
-0.0750032439827919,
0.16602782905101776,
-0.012240849435329437,
-0.09760231524705887,
-0.07094339281320572,
-0.036398861557245255,
0.16808749735355377,
0.11732559651136398,
-0.05115455389022827,
-0.2377614676952362,
0.3604854643344879,
-0.23444847762584686,
0.15585020184516907,
0.007768278941512108,
-0.056603774428367615,
0.4228781759738922,
0.23822104930877686,
-0.11117324978113174,
-0.34628212451934814,
-0.16089196503162384,
-0.09915641695261002,
-0.05745925381779671,
-0.004661517217755318,
-0.4400566816329956,
0.2687910795211792,
0.1723218560218811,
-0.20608797669410706,
0.2516711950302124,
0.07266245782375336,
-0.14702646434307098,
-0.09070427715778351,
0.06625996530056,
0.2639062702655792,
0.1306445300579071,
0.3726389706134796,
0.285969614982605,
-0.390497088432312,
-0.026499155908823013,
-0.1815314143896103,
0.11191131919622421,
-0.016615822911262512,
-0.16017811000347137,
0.17101767659187317,
0.32391247153282166,
-0.3701731860637665,
-0.48063036799430847,
0.007067373488098383,
-0.05543690174818039,
0.2076433002948761,
-0.3149874806404114,
-0.009544995613396168,
-0.13799817860126495,
-0.23578818142414093,
-0.21768590807914734,
0.07832879573106766,
0.14084504544734955,
-0.3804806172847748,
0.1422777771949768,
-0.0050604939460754395,
-0.10635963827371597,
0.10312968492507935,
-0.1899605095386505,
0.3880246579647064,
0.351792573928833,
0.15235929191112518,
-0.1064695492386818,
0.01656568981707096,
-0.4356100261211395,
0.08210896700620651,
-0.2243715226650238,
0.23125094175338745,
0.18023501336574554,
-0.11832606792449951,
-0.06205965578556061,
-0.49419206380844116,
0.03497018665075302,
0.07121642678976059,
-0.12545566260814667,
-0.006918597500771284,
0.20951464772224426,
0.08642035722732544,
-0.4370402693748474,
0.00284600374288857,
-0.03445127606391907,
-0.07512394338846207,
-0.017561694607138634,
0.041572947055101395,
-0.03225400298833847,
0.14993147552013397,
-0.244997039437294,
-0.17021910846233368,
-0.041169583797454834,
-0.03119603544473648,
-0.018810825422406197,
-0.023554695770144463,
0.2646828293800354,
0.23495516180992126,
0.02123955264687538,
-0.10322312265634537,
0.030839011073112488,
-0.1082271859049797,
-0.3431864380836487,
-0.2120264768600464,
0.19335849583148956,
-0.025641119107604027,
-0.22549383342266083,
-0.287346214056015,
-0.12484883517026901,
-0.3188024163246155,
0.36271145939826965,
-0.3429906964302063,
0.1628570258617401,
-0.1601879745721817,
-0.1522444188594818,
-0.08320694416761398,
0.24433472752571106,
0.15343904495239258,
-0.00029289282974787056,
-0.2644725441932678,
-0.31779882311820984,
-0.17742888629436493,
0.23864366114139557,
0.011170822195708752,
0.024355044588446617,
-0.19374921917915344,
0.3689059913158417,
-0.18493889272212982,
0.5601325035095215,
-0.04178231209516525,
-0.0838155671954155,
0.13827873766422272,
-0.13761772215366364,
0.29499366879463196,
-0.03467057645320892,
-0.1852641999721527,
0.13299375772476196,
0.20171768963336945,
-0.14233550429344177,
0.11779766529798508,
-0.09670905023813248,
-0.09855266660451889,
0.11619749665260315,
-0.02329845353960991,
-0.21408870816230774,
-0.23606279492378235,
-0.07588091492652893,
-0.09982934594154358,
0.10424758493900299,
0.3162616789340973,
0.23820345103740692,
-0.2749473750591278,
-0.013065537437796593,
-0.27974697947502136,
-0.41959673166275024,
-0.04600953683257103,
-0.04052528738975525,
0.06616789102554321,
-0.11013564467430115,
-0.584339439868927,
0.13379605114459991,
-0.025025073438882828,
0.4848845303058624,
0.21146166324615479,
-0.20372769236564636,
0.1390875279903412,
0.10392547398805618,
0.8822842836380005,
-0.1320267766714096,
0.33931657671928406,
0.09954993426799774,
0.0655873641371727,
-0.2481849491596222,
-0.10813184082508087,
-0.32061830163002014,
0.6482236981391907,
-0.07590777426958084,
0.38444018363952637,
0.04024854674935341,
-0.07259257882833481,
0.18812532722949982,
-0.008515764959156513,
0.016127025708556175,
-0.05067233368754387,
-0.3273419737815857,
-0.28916576504707336,
0.2959098815917969,
0.3187352418899536,
0.26145753264427185,
0.002998730866238475,
-0.06587577611207962,
-0.5092999339103699,
-0.2358924299478531,
-0.19584974646568298,
0.044271256774663925,
0.12071805447340012,
0.3030267059803009,
0.23569001257419586,
0.10096977651119232,
0.18207553029060364,
0.040179938077926636,
0.24752120673656464,
0.07437653839588165,
-0.36139026284217834,
0.3086409568786621,
0.236299529671669,
-0.33826372027397156,
0.19675953686237335,
0.29498857259750366,
-0.1619461178779602,
-0.15534047782421112,
-0.13857580721378326,
0.23386356234550476,
0.025472603738307953,
0.0013695560628548265,
0.2800304591655731,
0.07209838181734085,
-0.31303542852401733,
-0.3138696551322937,
0.3948414623737335,
-0.013760133646428585,
-0.24297258257865906,
0.3272378146648407,
-0.002837371313944459,
-0.2631716728210449,
0.28855058550834656,
-0.014284334145486355,
0.42862555384635925,
-0.08170762658119202,
0.12597928941249847,
-0.0006569463876076043,
0.25147756934165955,
0.12270524352788925,
0.35505297780036926,
0.38184547424316406,
-0.35643818974494934,
-0.39191344380378723,
0.06683425605297089,
-0.11478430032730103,
-0.34927746653556824,
0.2808842062950134,
-0.03748302906751633,
0.18740463256835938,
-0.0394701212644577,
-0.005092788487672806,
-0.10847623646259308,
-0.07014431804418564,
0.230552077293396,
0.007977008819580078,
-0.0018151614349335432,
0.21230153739452362,
0.21670138835906982,
0.07012605667114258,
-0.02034730091691017,
-0.03984901309013367,
0.18264029920101166,
-0.3323439657688141,
0.07479029893875122,
-0.11110613495111465,
-0.1008128747344017,
0.36842742562294006,
0.03533143177628517,
-0.35558611154556274,
-0.338906466960907,
-0.12880399823188782,
0.20728598535060883,
0.0879412516951561,
0.07257412374019623,
0.0867585614323616,
0.5402178764343262,
0.3633711338043213,
-0.021831899881362915,
-0.0023422150406986475,
0.17793115973472595,
0.06474260985851288,
-0.19776126742362976,
-0.19131885468959808,
0.14965644478797913,
-0.07034477591514587,
-0.15062949061393738,
0.32556605339050293,
-0.46248742938041687,
-0.0396762453019619,
-0.008439111523330212,
0.00905685592442751,
0.06151627376675606,
-0.24007607996463776,
0.18454161286354065,
0.09465479850769043,
0.004465350415557623,
0.5052645802497864,
0.1111207902431488,
-0.45360293984413147,
-0.1451522558927536,
0.3345709443092346,
0.18783816695213318,
0.07279250770807266,
0.3218372166156769,
-0.05765055492520332,
-0.1233515664935112,
-0.3469974100589752,
0.14815650880336761,
0.28470858931541443,
0.19598504900932312,
0.5777711272239685,
-0.3755914270877838,
0.07266824692487717,
0.3222358524799347,
0.33879658579826355,
-0.14033636450767517,
0.09715654700994492,
-0.22712180018424988,
-0.06567532569169998,
-0.08693327009677887,
-0.08528058230876923,
0.09475061297416687,
0.28016671538352966,
-0.015981322154402733,
-0.18673554062843323,
0.16274617612361908,
-0.23046256601810455,
-0.42216891050338745,
-0.16293077170848846,
-0.11921913176774979,
0.27580875158309937,
-0.3156631886959076,
0.23948389291763306,
-0.05715814605355263,
0.037210557609796524,
0.23892536759376526,
0.0018024872988462448,
-0.05460217967629433,
-0.3460875451564789,
0.15875224769115448,
0.08776762336492538,
-0.11437465995550156,
0.189097061753273,
-0.021576130762696266,
-0.1659422218799591,
-0.3857114315032959,
-0.16701270639896393,
0.0261852964758873,
0.41574370861053467,
-0.05154494196176529,
-0.05238965153694153,
0.34406062960624695,
-0.09733658283948898,
0.6132326722145081,
-0.048052798956632614,
-0.011967875063419342,
-0.12676994502544403,
-0.13166165351867676,
0.24751628935337067,
-0.01585639826953411,
-0.06725431233644485,
0.06461158394813538,
-0.014777938835322857,
-0.21904876828193665,
0.13387884199619293,
-0.0636284202337265,
-0.3820212483406067,
-0.2978622019290924,
0.4119755029678345,
0.3817130923271179,
0.2772909700870514,
-0.24315717816352844,
-0.25335729122161865,
0.11315422505140305,
0.32658928632736206,
-0.33985331654548645,
-0.2887231707572937,
0.03074800781905651,
0.018717719241976738,
0.23757325112819672,
0.16200612485408783,
0.0553583987057209,
-0.23171131312847137,
-0.05335848778486252,
0.08701305836439133,
0.41079360246658325,
-0.25850963592529297,
-0.09303537756204605,
0.040182601660490036,
0.11204701662063599,
-0.1348763406276703,
0.31966444849967957,
0.12499378621578217,
0.2145882099866867,
0.7398802042007446,
0.003585678990930319,
0.2964409291744232,
0.17972148954868317,
-0.14371530711650848,
-0.2697785794734955,
-0.2864271402359009,
0.319623202085495,
0.3358162045478821,
-0.4585089087486267,
0.06005357205867767,
0.2970444858074188,
0.032780926674604416,
-0.4250414967536926,
0.1216026023030281,
-0.13281576335430145,
-0.09765852242708206,
-0.1180155873298645,
-0.11444849520921707,
-0.045370105654001236,
-0.2516714632511139,
0.06651585549116135,
-0.04823354259133339,
-0.049961138516664505,
0.2599700689315796,
-0.12670515477657318,
-0.10918834805488586,
-0.018135761842131615,
-0.11986234784126282,
-0.1101338192820549,
0.0012788946041837335,
0.09629359096288681,
-0.18857203423976898,
0.04643940553069115,
-0.01146235316991806,
0.030986366793513298,
0.2609630227088928,
0.26255926489830017,
0.21847034990787506,
0.3585488796234131,
-0.07708234339952469,
0.03136763721704483,
-0.13187383115291595,
-0.2714037001132965,
-0.4039422273635864,
-0.09291016310453415,
0.0069273910485208035,
-0.18596261739730835,
0.30620357394218445,
0.24723201990127563,
-0.07084047049283981,
0.18564443290233612,
0.29722824692726135,
0.1820814460515976,
-0.1383855640888214,
-0.14310000836849213,
-0.0022049143444746733,
-0.07529167830944061,
-0.1809903234243393,
-0.12914589047431946,
-0.3248516023159027,
-0.07913798838853836,
0.3013514578342438,
-0.18372780084609985,
0.3511919677257538,
-0.06731250137090683,
0.14950717985630035,
-0.18598859012126923,
0.486377477645874,
-0.2534703314304352,
0.1088021770119667,
-0.005833912640810013,
-0.056097377091646194,
-0.48497939109802246,
0.12630490958690643,
-0.23675978183746338,
0.1244855523109436,
0.05455262213945389,
0.32299041748046875,
-0.0443711020052433,
-0.4196699559688568,
0.3156551122665405,
0.31507307291030884,
-0.23943302035331726,
0.12424952536821365,
-0.10761674493551254,
-0.01308463141322136,
-0.4162071943283081,
0.18928173184394836,
0.03755173087120056,
-0.20886977016925812,
0.36842599511146545,
-0.17609548568725586,
0.2669323682785034,
0.0834757536649704,
0.06122913211584091,
0.12620528042316437,
-0.11648792028427124,
0.45391935110092163,
0.06228981912136078,
0.1590372622013092,
-0.19427892565727234,
0.3377153277397156,
-0.21278056502342224,
-0.11563247442245483,
-0.3309916853904724,
-0.038171492516994476,
0.18955068290233612,
0.09269199520349503,
-0.18233174085617065,
-0.22089356184005737,
0.030040916055440903,
0.09449411928653717,
0.31302329897880554,
0.10735198110342026,
-0.05588310956954956,
0.3016713261604309,
-0.1001918762922287,
0.003721646498888731,
-0.1275130957365036,
-0.09189199656248093,
0.11538935452699661,
0.10581445693969727,
-0.05201959237456322,
-0.5365822911262512,
0.3319375514984131,
-0.4051196873188019,
-0.4870537221431732,
-0.7009401321411133,
0.28037020564079285,
0.1669822633266449,
-0.07477796822786331,
-0.06824260205030441,
0.04728717356920242,
0.2763405442237854,
0.06584558635950089,
-0.42752864956855774,
-0.03130137175321579,
-0.22986933588981628,
0.09541881084442139,
-0.12975603342056274,
0.016146330162882805,
0.47125470638275146,
-0.24272987246513367,
-0.023364301770925522,
-0.28201064467430115
] |
https://github.com/huggingface/datasets/issues/2175
|
dataset.search_batch() function outputs all -1 indices sometime.
|
Sure. Will push everything together with RAG end to end. :) thanks a lot.
On Wed, Apr 7, 2021, 21:16 Quentin Lhoest ***@***.***> wrote:
> That would be an easy way to workaround this issue. Feel free to open a PR
> on transformers and ping me ! :)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2175#issuecomment-814752589>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEA4FGWLROCGARKN7WOJYSTTHQPH5ANCNFSM42PRVYDA>
> .
>
|
I am working with RAG and playing around with different faiss indexes. At the moment I use **index = faiss.index_factory(768, "IVF65536_HNSW32,Flat")**.
During the retrieval phase exactly in [this line of retrieval_rag.py](https://github.com/huggingface/transformers/blob/master/src/transformers/models/rag/retrieval_rag.py#L231) an error issue when all retrieved indices are -1. Please refer to the screenshot of a PID worker.

Here, my retrieve batch size is 2 and n_docs is 5. I can solve this by working around np. stack, but I want to ask, why we get an output index of -1. Do you have any idea :) ?
Is this a problem of the index, where the faiss can't find any similar vector?
Is there documentation on the output index being -1?
@lhoestq
| 82 |
dataset.search_batch() function outputs all -1 indices sometime.
|
[
-0.29404038190841675,
-0.07587619870901108,
-0.21337218582630157,
0.1111055538058281,
0.11482501029968262,
-0.04728453606367111,
0.24745327234268188,
0.42615529894828796,
0.04280871897935867,
0.4052085876464844,
0.14434874057769775,
-0.11353979259729385,
-0.09642420709133148,
0.20890887081623077,
-0.16371986269950867,
0.15429602563381195,
0.0924735739827156,
0.4189704656600952,
-0.15901657938957214,
-0.4247385859489441,
-0.2177097350358963,
0.16438548266887665,
-0.292836993932724,
0.09918282181024551,
-0.273875892162323,
-0.0054437932558357716,
0.159163236618042,
-0.1567697674036026,
-0.05994042381644249,
-0.3637959957122803,
0.2554668188095093,
-0.10565976798534393,
0.016076939180493355,
0.41387173533439636,
-0.00010544010001467541,
0.006773150060325861,
0.30423957109451294,
-0.018347330391407013,
-0.39675459265708923,
-0.042986851185560226,
-0.5275683999061584,
0.05971382558345795,
0.07463295012712479,
-0.06793329119682312,
-0.06507007777690887,
-0.08746551722288132,
0.23269955813884735,
-0.5223621726036072,
-0.043256741017103195,
0.33736538887023926,
0.3027816414833069,
0.011656297370791435,
-0.2877003252506256,
-0.1349918097257614,
0.5562706589698792,
-0.007802091538906097,
0.17377059161663055,
-0.22563694417476654,
0.26020586490631104,
-0.14889083802700043,
-0.06187529116868973,
0.44272303581237793,
-0.0027719440404325724,
0.07731190323829651,
-0.02870914340019226,
0.024867011234164238,
0.3152991235256195,
-0.48007732629776,
0.32006415724754333,
-0.04855243116617203,
0.36140909790992737,
-0.06068309023976326,
-0.1829526424407959,
-0.11944674700498581,
-0.1573811024427414,
-0.20662148296833038,
-0.054650548845529556,
0.18530794978141785,
-0.19166867434978485,
-0.031306009739637375,
-0.13288356363773346,
0.2641383409500122,
-0.15256917476654053,
-0.02009834535419941,
-0.2297702580690384,
0.45373281836509705,
-0.06331366300582886,
0.14950862526893616,
0.13326896727085114,
-0.09405598044395447,
0.4378458559513092,
0.03050311468541622,
-0.041789934039115906,
0.04282202944159508,
-0.34087032079696655,
0.03749258071184158,
0.34730252623558044,
-0.20096172392368317,
0.22588606178760529,
-0.1164480596780777,
0.10122306644916534,
0.2725220322608948,
0.11230223625898361,
-0.0767935961484909,
0.3910321295261383,
0.19888511300086975,
0.3451099991798401,
0.273070365190506,
0.30251726508140564,
-0.555443286895752,
-0.09076860547065735,
0.1294839233160019,
0.2279222309589386,
-0.19965018332004547,
0.26802822947502136,
-0.04421237111091614,
-0.07364211231470108,
-0.0247958954423666,
-0.29625576734542847,
0.05910991132259369,
-0.03963463380932808,
-0.09615135937929153,
-0.03931623697280884,
0.2053704708814621,
0.22613732516765594,
-0.12181723117828369,
-0.1840512603521347,
0.12123160809278488,
-0.22161300480365753,
-0.14845801889896393,
-0.4902675747871399,
-0.09012392163276672,
0.032459162175655365,
-0.20011325180530548,
0.25020426511764526,
-0.2348499745130539,
0.07595071196556091,
-0.06406475603580475,
0.09272968769073486,
-0.03298308700323105,
0.10386907309293747,
-0.10165209323167801,
0.5358109474182129,
0.32826319336891174,
-0.012393885292112827,
0.3014694154262543,
0.22226591408252716,
-0.049594178795814514,
0.04759196564555168,
0.24275356531143188,
-0.09465119242668152,
-0.15637443959712982,
0.2165471911430359,
0.2923238277435303,
0.1771811693906784,
0.1613660603761673,
-0.003645879216492176,
0.2845022976398468,
0.023079710081219673,
0.11458341032266617,
-0.07369119673967361,
-0.39167043566703796,
0.05447297543287277,
0.0246694628149271,
0.10921543836593628,
0.16834378242492676,
-0.1357281357049942,
0.14989906549453735,
0.19353371858596802,
-0.030804332345724106,
0.2517489492893219,
0.15148626267910004,
-0.0737859383225441,
0.04693419486284256,
-0.36144185066223145,
0.4743559658527374,
0.2829725742340088,
-0.20881333947181702,
-0.3004736602306366,
0.06709739565849304,
-0.23676279187202454,
-0.45332345366477966,
-0.1435612291097641,
0.15307819843292236,
0.31272587180137634,
0.20680846273899078,
0.44983845949172974,
0.003046982455998659,
-0.02646969072520733,
0.2137426882982254,
-0.0693855956196785,
0.23836761713027954,
-0.08404357731342316,
-0.059432219713926315,
0.3230428993701935,
0.14372457563877106,
0.11572284996509552,
-0.6393337249755859,
0.2788347601890564,
-0.04908493533730507,
0.1312171071767807,
0.10571462661027908,
0.1565634161233902,
-0.0948013961315155,
0.32197660207748413,
-0.11465351283550262,
-0.07198129594326019,
0.1357128620147705,
-0.031527578830718994,
-0.12110677361488342,
-0.08340750634670258,
-0.130404993891716,
-0.15171267092227936,
0.08514730632305145,
-0.05355897918343544,
0.24893386662006378,
0.20590214431285858,
0.17300188541412354,
-0.14230749011039734,
0.07180628180503845,
-0.14468006789684296,
-0.09198814630508423,
0.21170933544635773,
-0.20054860413074493,
-0.2622799873352051,
-0.0396471805870533,
0.10067541897296906,
-0.09499696642160416,
0.012522641569375992,
-0.06375326216220856,
0.3330830931663513,
-0.03119366057217121,
-0.110454261302948,
0.244991734623909,
-0.1228783056139946,
-0.0750032439827919,
0.16602782905101776,
-0.012240849435329437,
-0.09760231524705887,
-0.07094339281320572,
-0.036398861557245255,
0.16808749735355377,
0.11732559651136398,
-0.05115455389022827,
-0.2377614676952362,
0.3604854643344879,
-0.23444847762584686,
0.15585020184516907,
0.007768278941512108,
-0.056603774428367615,
0.4228781759738922,
0.23822104930877686,
-0.11117324978113174,
-0.34628212451934814,
-0.16089196503162384,
-0.09915641695261002,
-0.05745925381779671,
-0.004661517217755318,
-0.4400566816329956,
0.2687910795211792,
0.1723218560218811,
-0.20608797669410706,
0.2516711950302124,
0.07266245782375336,
-0.14702646434307098,
-0.09070427715778351,
0.06625996530056,
0.2639062702655792,
0.1306445300579071,
0.3726389706134796,
0.285969614982605,
-0.390497088432312,
-0.026499155908823013,
-0.1815314143896103,
0.11191131919622421,
-0.016615822911262512,
-0.16017811000347137,
0.17101767659187317,
0.32391247153282166,
-0.3701731860637665,
-0.48063036799430847,
0.007067373488098383,
-0.05543690174818039,
0.2076433002948761,
-0.3149874806404114,
-0.009544995613396168,
-0.13799817860126495,
-0.23578818142414093,
-0.21768590807914734,
0.07832879573106766,
0.14084504544734955,
-0.3804806172847748,
0.1422777771949768,
-0.0050604939460754395,
-0.10635963827371597,
0.10312968492507935,
-0.1899605095386505,
0.3880246579647064,
0.351792573928833,
0.15235929191112518,
-0.1064695492386818,
0.01656568981707096,
-0.4356100261211395,
0.08210896700620651,
-0.2243715226650238,
0.23125094175338745,
0.18023501336574554,
-0.11832606792449951,
-0.06205965578556061,
-0.49419206380844116,
0.03497018665075302,
0.07121642678976059,
-0.12545566260814667,
-0.006918597500771284,
0.20951464772224426,
0.08642035722732544,
-0.4370402693748474,
0.00284600374288857,
-0.03445127606391907,
-0.07512394338846207,
-0.017561694607138634,
0.041572947055101395,
-0.03225400298833847,
0.14993147552013397,
-0.244997039437294,
-0.17021910846233368,
-0.041169583797454834,
-0.03119603544473648,
-0.018810825422406197,
-0.023554695770144463,
0.2646828293800354,
0.23495516180992126,
0.02123955264687538,
-0.10322312265634537,
0.030839011073112488,
-0.1082271859049797,
-0.3431864380836487,
-0.2120264768600464,
0.19335849583148956,
-0.025641119107604027,
-0.22549383342266083,
-0.287346214056015,
-0.12484883517026901,
-0.3188024163246155,
0.36271145939826965,
-0.3429906964302063,
0.1628570258617401,
-0.1601879745721817,
-0.1522444188594818,
-0.08320694416761398,
0.24433472752571106,
0.15343904495239258,
-0.00029289282974787056,
-0.2644725441932678,
-0.31779882311820984,
-0.17742888629436493,
0.23864366114139557,
0.011170822195708752,
0.024355044588446617,
-0.19374921917915344,
0.3689059913158417,
-0.18493889272212982,
0.5601325035095215,
-0.04178231209516525,
-0.0838155671954155,
0.13827873766422272,
-0.13761772215366364,
0.29499366879463196,
-0.03467057645320892,
-0.1852641999721527,
0.13299375772476196,
0.20171768963336945,
-0.14233550429344177,
0.11779766529798508,
-0.09670905023813248,
-0.09855266660451889,
0.11619749665260315,
-0.02329845353960991,
-0.21408870816230774,
-0.23606279492378235,
-0.07588091492652893,
-0.09982934594154358,
0.10424758493900299,
0.3162616789340973,
0.23820345103740692,
-0.2749473750591278,
-0.013065537437796593,
-0.27974697947502136,
-0.41959673166275024,
-0.04600953683257103,
-0.04052528738975525,
0.06616789102554321,
-0.11013564467430115,
-0.584339439868927,
0.13379605114459991,
-0.025025073438882828,
0.4848845303058624,
0.21146166324615479,
-0.20372769236564636,
0.1390875279903412,
0.10392547398805618,
0.8822842836380005,
-0.1320267766714096,
0.33931657671928406,
0.09954993426799774,
0.0655873641371727,
-0.2481849491596222,
-0.10813184082508087,
-0.32061830163002014,
0.6482236981391907,
-0.07590777426958084,
0.38444018363952637,
0.04024854674935341,
-0.07259257882833481,
0.18812532722949982,
-0.008515764959156513,
0.016127025708556175,
-0.05067233368754387,
-0.3273419737815857,
-0.28916576504707336,
0.2959098815917969,
0.3187352418899536,
0.26145753264427185,
0.002998730866238475,
-0.06587577611207962,
-0.5092999339103699,
-0.2358924299478531,
-0.19584974646568298,
0.044271256774663925,
0.12071805447340012,
0.3030267059803009,
0.23569001257419586,
0.10096977651119232,
0.18207553029060364,
0.040179938077926636,
0.24752120673656464,
0.07437653839588165,
-0.36139026284217834,
0.3086409568786621,
0.236299529671669,
-0.33826372027397156,
0.19675953686237335,
0.29498857259750366,
-0.1619461178779602,
-0.15534047782421112,
-0.13857580721378326,
0.23386356234550476,
0.025472603738307953,
0.0013695560628548265,
0.2800304591655731,
0.07209838181734085,
-0.31303542852401733,
-0.3138696551322937,
0.3948414623737335,
-0.013760133646428585,
-0.24297258257865906,
0.3272378146648407,
-0.002837371313944459,
-0.2631716728210449,
0.28855058550834656,
-0.014284334145486355,
0.42862555384635925,
-0.08170762658119202,
0.12597928941249847,
-0.0006569463876076043,
0.25147756934165955,
0.12270524352788925,
0.35505297780036926,
0.38184547424316406,
-0.35643818974494934,
-0.39191344380378723,
0.06683425605297089,
-0.11478430032730103,
-0.34927746653556824,
0.2808842062950134,
-0.03748302906751633,
0.18740463256835938,
-0.0394701212644577,
-0.005092788487672806,
-0.10847623646259308,
-0.07014431804418564,
0.230552077293396,
0.007977008819580078,
-0.0018151614349335432,
0.21230153739452362,
0.21670138835906982,
0.07012605667114258,
-0.02034730091691017,
-0.03984901309013367,
0.18264029920101166,
-0.3323439657688141,
0.07479029893875122,
-0.11110613495111465,
-0.1008128747344017,
0.36842742562294006,
0.03533143177628517,
-0.35558611154556274,
-0.338906466960907,
-0.12880399823188782,
0.20728598535060883,
0.0879412516951561,
0.07257412374019623,
0.0867585614323616,
0.5402178764343262,
0.3633711338043213,
-0.021831899881362915,
-0.0023422150406986475,
0.17793115973472595,
0.06474260985851288,
-0.19776126742362976,
-0.19131885468959808,
0.14965644478797913,
-0.07034477591514587,
-0.15062949061393738,
0.32556605339050293,
-0.46248742938041687,
-0.0396762453019619,
-0.008439111523330212,
0.00905685592442751,
0.06151627376675606,
-0.24007607996463776,
0.18454161286354065,
0.09465479850769043,
0.004465350415557623,
0.5052645802497864,
0.1111207902431488,
-0.45360293984413147,
-0.1451522558927536,
0.3345709443092346,
0.18783816695213318,
0.07279250770807266,
0.3218372166156769,
-0.05765055492520332,
-0.1233515664935112,
-0.3469974100589752,
0.14815650880336761,
0.28470858931541443,
0.19598504900932312,
0.5777711272239685,
-0.3755914270877838,
0.07266824692487717,
0.3222358524799347,
0.33879658579826355,
-0.14033636450767517,
0.09715654700994492,
-0.22712180018424988,
-0.06567532569169998,
-0.08693327009677887,
-0.08528058230876923,
0.09475061297416687,
0.28016671538352966,
-0.015981322154402733,
-0.18673554062843323,
0.16274617612361908,
-0.23046256601810455,
-0.42216891050338745,
-0.16293077170848846,
-0.11921913176774979,
0.27580875158309937,
-0.3156631886959076,
0.23948389291763306,
-0.05715814605355263,
0.037210557609796524,
0.23892536759376526,
0.0018024872988462448,
-0.05460217967629433,
-0.3460875451564789,
0.15875224769115448,
0.08776762336492538,
-0.11437465995550156,
0.189097061753273,
-0.021576130762696266,
-0.1659422218799591,
-0.3857114315032959,
-0.16701270639896393,
0.0261852964758873,
0.41574370861053467,
-0.05154494196176529,
-0.05238965153694153,
0.34406062960624695,
-0.09733658283948898,
0.6132326722145081,
-0.048052798956632614,
-0.011967875063419342,
-0.12676994502544403,
-0.13166165351867676,
0.24751628935337067,
-0.01585639826953411,
-0.06725431233644485,
0.06461158394813538,
-0.014777938835322857,
-0.21904876828193665,
0.13387884199619293,
-0.0636284202337265,
-0.3820212483406067,
-0.2978622019290924,
0.4119755029678345,
0.3817130923271179,
0.2772909700870514,
-0.24315717816352844,
-0.25335729122161865,
0.11315422505140305,
0.32658928632736206,
-0.33985331654548645,
-0.2887231707572937,
0.03074800781905651,
0.018717719241976738,
0.23757325112819672,
0.16200612485408783,
0.0553583987057209,
-0.23171131312847137,
-0.05335848778486252,
0.08701305836439133,
0.41079360246658325,
-0.25850963592529297,
-0.09303537756204605,
0.040182601660490036,
0.11204701662063599,
-0.1348763406276703,
0.31966444849967957,
0.12499378621578217,
0.2145882099866867,
0.7398802042007446,
0.003585678990930319,
0.2964409291744232,
0.17972148954868317,
-0.14371530711650848,
-0.2697785794734955,
-0.2864271402359009,
0.319623202085495,
0.3358162045478821,
-0.4585089087486267,
0.06005357205867767,
0.2970444858074188,
0.032780926674604416,
-0.4250414967536926,
0.1216026023030281,
-0.13281576335430145,
-0.09765852242708206,
-0.1180155873298645,
-0.11444849520921707,
-0.045370105654001236,
-0.2516714632511139,
0.06651585549116135,
-0.04823354259133339,
-0.049961138516664505,
0.2599700689315796,
-0.12670515477657318,
-0.10918834805488586,
-0.018135761842131615,
-0.11986234784126282,
-0.1101338192820549,
0.0012788946041837335,
0.09629359096288681,
-0.18857203423976898,
0.04643940553069115,
-0.01146235316991806,
0.030986366793513298,
0.2609630227088928,
0.26255926489830017,
0.21847034990787506,
0.3585488796234131,
-0.07708234339952469,
0.03136763721704483,
-0.13187383115291595,
-0.2714037001132965,
-0.4039422273635864,
-0.09291016310453415,
0.0069273910485208035,
-0.18596261739730835,
0.30620357394218445,
0.24723201990127563,
-0.07084047049283981,
0.18564443290233612,
0.29722824692726135,
0.1820814460515976,
-0.1383855640888214,
-0.14310000836849213,
-0.0022049143444746733,
-0.07529167830944061,
-0.1809903234243393,
-0.12914589047431946,
-0.3248516023159027,
-0.07913798838853836,
0.3013514578342438,
-0.18372780084609985,
0.3511919677257538,
-0.06731250137090683,
0.14950717985630035,
-0.18598859012126923,
0.486377477645874,
-0.2534703314304352,
0.1088021770119667,
-0.005833912640810013,
-0.056097377091646194,
-0.48497939109802246,
0.12630490958690643,
-0.23675978183746338,
0.1244855523109436,
0.05455262213945389,
0.32299041748046875,
-0.0443711020052433,
-0.4196699559688568,
0.3156551122665405,
0.31507307291030884,
-0.23943302035331726,
0.12424952536821365,
-0.10761674493551254,
-0.01308463141322136,
-0.4162071943283081,
0.18928173184394836,
0.03755173087120056,
-0.20886977016925812,
0.36842599511146545,
-0.17609548568725586,
0.2669323682785034,
0.0834757536649704,
0.06122913211584091,
0.12620528042316437,
-0.11648792028427124,
0.45391935110092163,
0.06228981912136078,
0.1590372622013092,
-0.19427892565727234,
0.3377153277397156,
-0.21278056502342224,
-0.11563247442245483,
-0.3309916853904724,
-0.038171492516994476,
0.18955068290233612,
0.09269199520349503,
-0.18233174085617065,
-0.22089356184005737,
0.030040916055440903,
0.09449411928653717,
0.31302329897880554,
0.10735198110342026,
-0.05588310956954956,
0.3016713261604309,
-0.1001918762922287,
0.003721646498888731,
-0.1275130957365036,
-0.09189199656248093,
0.11538935452699661,
0.10581445693969727,
-0.05201959237456322,
-0.5365822911262512,
0.3319375514984131,
-0.4051196873188019,
-0.4870537221431732,
-0.7009401321411133,
0.28037020564079285,
0.1669822633266449,
-0.07477796822786331,
-0.06824260205030441,
0.04728717356920242,
0.2763405442237854,
0.06584558635950089,
-0.42752864956855774,
-0.03130137175321579,
-0.22986933588981628,
0.09541881084442139,
-0.12975603342056274,
0.016146330162882805,
0.47125470638275146,
-0.24272987246513367,
-0.023364301770925522,
-0.28201064467430115
] |
https://github.com/huggingface/datasets/issues/2170
|
Wikipedia historic dumps are deleted but hf/datasets hardcodes dump date
|
It seems that this can be fixed from user's end by including a `date` argument, like this:
`dataset = datasets.load_dataset('wikipedia', '20200501.en', date='20210420')`
You can get available dates from [here](https://dumps.wikimedia.org/enwiki/).
This is not a proper fix however as all the files will still have '20200501' in their file names.
|
Wikimedia does not keep all historical dumps. For example, as of today https://dumps.wikimedia.org/kowiki/ only provides
```
20201220/ 02-Feb-2021 01:36 -
20210101/ 21-Feb-2021 01:26 -
20210120/ 02-Mar-2021 01:25 -
20210201/ 21-Mar-2021 01:26 -
20210220/ 02-Apr-2021 01:26 -
20210301/ 03-Mar-2021 08:10 -
20210320/ 21-Mar-2021 18:13 -
20210401/ 03-Apr-2021 10:08 -
latest/ 03-Apr-2021 10:08 -
```
However, the wikipedia dataset provided in the library, only supports the following configs, none of which are applicable anymore when disregarding the cached datasets:
```
ValueError: BuilderConfig 20210401.ko not found. Available: ['20200501.aa', '20200501.ab', '20200501.ace', '20200501.ady', '20200501.af', '20200501.ak', '20200501.als', '20200501.am', '20200501.an', '20200501.ang', '20200501.ar', '20200501.arc', '20200501.arz', '20200501.as', '20200501.ast', '20200501.atj', '20200501.av', '20200501.ay', '20200501.az', '20200501.azb', '20200501.ba', '20200501.bar', '20200501.bat-smg', '20200501.bcl', '20200501.be', '20200501.be-x-old', '20200501.bg', '20200501.bh', '20200501.bi', '20200501.bjn', '20200501.bm', '20200501.bn', '20200501.bo', '20200501.bpy', '20200501.br', '20200501.bs', '20200501.bug', '20200501.bxr', '20200501.ca', '20200501.cbk-zam', '20200501.cdo', '20200501.ce', '20200501.ceb', '20200501.ch', '20200501.cho', '20200501.chr', '20200501.chy', '20200501.ckb', '20200501.co', '20200501.cr', '20200501.crh', '20200501.cs', '20200501.csb', '20200501.cu', '20200501.cv', '20200501.cy', '20200501.da', '20200501.de', '20200501.din', '20200501.diq', '20200501.dsb', '20200501.dty', '20200501.dv', '20200501.dz', '20200501.ee', '20200501.el', '20200501.eml', '20200501.en', '20200501.eo', '20200501.es', '20200501.et', '20200501.eu', '20200501.ext', '20200501.fa', '20200501.ff', '20200501.fi', '20200501.fiu-vro', '20200501.fj', '20200501.fo', '20200501.fr', '20200501.frp', '20200501.frr', '20200501.fur', '20200501.fy', '20200501.ga', '20200501.gag', '20200501.gan', '20200501.gd', '20200501.gl', '20200501.glk', '20200501.gn', '20200501.gom', '20200501.gor', '20200501.got', '20200501.gu', '20200501.gv', '20200501.ha', '20200501.hak', '20200501.haw', '20200501.he', '20200501.hi', '20200501.hif', '20200501.ho', '20200501.hr', '20200501.hsb', '20200501.ht', '20200501.hu', '20200501.hy', '20200501.ia', '20200501.id', '20200501.ie', '20200501.ig', '20200501.ii', '20200501.ik', '20200501.ilo', '20200501.inh', '20200501.io', '20200501.is', '20200501.it', '20200501.iu', '20200501.ja', '20200501.jam', '20200501.jbo', '20200501.jv', '20200501.ka', '20200501.kaa', '20200501.kab', '20200501.kbd', '20200501.kbp', '20200501.kg', '20200501.ki', '20200501.kj', '20200501.kk', '20200501.kl', '20200501.km', '20200501.kn', '20200501.ko', '20200501.koi', '20200501.krc', '20200501.ks', '20200501.ksh', '20200501.ku', '20200501.kv', '20200501.kw', '20200501.ky', '20200501.la', '20200501.lad', '20200501.lb', '20200501.lbe', '20200501.lez', '20200501.lfn', '20200501.lg', '20200501.li', '20200501.lij', '20200501.lmo', '20200501.ln', '20200501.lo', '20200501.lrc', '20200501.lt', '20200501.ltg', '20200501.lv', '20200501.mai', '20200501.map-bms', '20200501.mdf', '20200501.mg', '20200501.mh', '20200501.mhr', '20200501.mi', '20200501.min', '20200501.mk', '20200501.ml', '20200501.mn', '20200501.mr', '20200501.mrj', '20200501.ms', '20200501.mt', '20200501.mus', '20200501.mwl', '20200501.my', '20200501.myv', '20200501.mzn', '20200501.na', '20200501.nah', '20200501.nap', '20200501.nds', '20200501.nds-nl', '20200501.ne', '20200501.new', '20200501.ng', '20200501.nl', '20200501.nn', '20200501.no', '20200501.nov', '20200501.nrm', '20200501.nso', '20200501.nv', '20200501.ny', '20200501.oc', '20200501.olo', '20200501.om', '20200501.or', '20200501.os', '20200501.pa', '20200501.pag', '20200501.pam', '20200501.pap', '20200501.pcd', '20200501.pdc', '20200501.pfl', '20200501.pi', '20200501.pih', '20200501.pl', '20200501.pms', '20200501.pnb', '20200501.pnt', '20200501.ps', '20200501.pt', '20200501.qu', '20200501.rm', '20200501.rmy', '20200501.rn', '20200501.ro', '20200501.roa-rup', '20200501.roa-tara', '20200501.ru', '20200501.rue', '20200501.rw', '20200501.sa', '20200501.sah', '20200501.sat', '20200501.sc', '20200501.scn', '20200501.sco', '20200501.sd', '20200501.se', '20200501.sg', '20200501.sh', '20200501.si', '20200501.simple', '20200501.sk', '20200501.sl', '20200501.sm', '20200501.sn', '20200501.so', '20200501.sq', '20200501.sr', '20200501.srn', '20200501.ss', '20200501.st', '20200501.stq', '20200501.su', '20200501.sv', '20200501.sw', '20200501.szl', '20200501.ta', '20200501.tcy', '20200501.te', '20200501.tet', '20200501.tg', '20200501.th', '20200501.ti', '20200501.tk', '20200501.tl', '20200501.tn', '20200501.to', '20200501.tpi', '20200501.tr', '20200501.ts', '20200501.tt', '20200501.tum', '20200501.tw', '20200501.ty', '20200501.tyv', '20200501.udm', '20200501.ug', '20200501.uk', '20200501.ur', '20200501.uz', '20200501.ve', '20200501.vec', '20200501.vep', '20200501.vi', '20200501.vls', '20200501.vo', '20200501.wa', '20200501.war', '20200501.wo', '20200501.wuu', '20200501.xal', '20200501.xh', '20200501.xmf', '20200501.yi', '20200501.yo', '20200501.za', '20200501.zea', '20200501.zh', '20200501.zh-classical', '20200501.zh-min-nan', '20200501.zh-yue', '20200501.zu']
```
The cached datasets:
```
% aws s3 --no-sign-request --endpoint-url https://storage.googleapis.com ls s3://huggingface-nlp/cache/datasets/wikipedia/
PRE 20200501.de/
PRE 20200501.en/
PRE 20200501.fr/
PRE 20200501.frr/
PRE 20200501.it/
PRE 20200501.simple/
```
| 48 |
Wikipedia historic dumps are deleted but hf/datasets hardcodes dump date
|
[
0.09745564311742783,
0.4552955627441406,
-0.0567820742726326,
0.10348381847143173,
-0.31279003620147705,
0.20511937141418457,
0.2566525340080261,
0.25971078872680664,
0.17151494324207306,
0.09288663417100906,
-0.34277108311653137,
0.08903767913579941,
0.13220414519309998,
-0.22770263254642487,
-0.1517012119293213,
0.12813133001327515,
-0.03455734625458717,
0.18001152575016022,
-0.417252779006958,
-0.38833802938461304,
-0.02089245431125164,
0.03320105001330376,
-0.17619237303733826,
-0.07098669558763504,
-0.15431220829486847,
0.09737467765808105,
0.015211524441838264,
-0.008971170522272587,
-0.3446216285228729,
-0.20154854655265808,
0.12414749711751938,
0.27865079045295715,
0.17250998318195343,
0.426250159740448,
-0.00011317636381136253,
-0.07749510556459427,
0.26163947582244873,
0.035567548125982285,
-0.8043832778930664,
0.5575284957885742,
-0.49441760778427124,
-0.030061889439821243,
-0.14522583782672882,
-0.14784754812717438,
0.03112811967730522,
-0.15651723742485046,
0.006557978689670563,
-0.07383739203214645,
0.1487896591424942,
0.3209824562072754,
0.2303207963705063,
0.13278648257255554,
-0.08186263591051102,
-0.08777185529470444,
0.4862917363643646,
0.32098010182380676,
-0.11439119279384613,
-0.10935258865356445,
-0.37717926502227783,
-0.03447660431265831,
-0.12182746827602386,
0.4410647451877594,
0.26252371072769165,
-0.16551068425178528,
0.06101785972714424,
-0.07808665186166763,
-0.24139797687530518,
0.030942916870117188,
0.3599904179573059,
0.011900939978659153,
0.530943751335144,
-0.2687697112560272,
-0.03570146486163139,
0.218322291970253,
-0.2593234181404114,
-0.29883602261543274,
0.2186543196439743,
0.08937058597803116,
0.060908522456884384,
0.20968659222126007,
0.2162594497203827,
-0.10675788670778275,
-0.07466570287942886,
0.26561039686203003,
-0.1746060848236084,
0.1944252997636795,
0.006159223150461912,
-0.10753569006919861,
-0.2726578116416931,
0.015257569029927254,
0.277753084897995,
-0.21369780600070953,
0.1153298169374466,
0.2834717631340027,
0.150199756026268,
-0.1749197542667389,
0.036772895604372025,
0.19104790687561035,
0.15379363298416138,
-0.3443417251110077,
-0.11842817813158035,
0.03098781406879425,
-0.10803946107625961,
-0.07954329252243042,
0.39601194858551025,
-0.2945503890514374,
0.13188521564006805,
0.16200390458106995,
0.3516390919685364,
0.16992242634296417,
-0.11423569172620773,
-0.1068456843495369,
0.41521650552749634,
0.16899949312210083,
0.14531445503234863,
-0.21808551251888275,
0.12885424494743347,
-0.48077261447906494,
-0.006362479645758867,
0.28679487109184265,
0.03711319714784622,
-0.20979300141334534,
-0.39032095670700073,
0.4386385679244995,
-0.12909048795700073,
-0.1645933836698532,
0.021321387961506844,
-0.13467615842819214,
-0.28895413875579834,
-0.20879527926445007,
-0.2864396870136261,
-0.13687348365783691,
0.1578359454870224,
-0.13396815955638885,
0.22718532383441925,
0.11442562937736511,
0.06619551032781601,
0.20338311791419983,
-0.24020366370677948,
0.09835662692785263,
-0.015688585117459297,
-0.14174386858940125,
0.21343395113945007,
0.325757771730423,
0.042131707072257996,
0.24635350704193115,
-0.08878492563962936,
-0.20315368473529816,
-0.03412638604640961,
-0.04371429234743118,
-0.07725769281387329,
0.22790424525737762,
-0.34652042388916016,
0.2363516390323639,
0.22763559222221375,
-0.045107401907444,
-0.03862076252698898,
-0.030767150223255157,
0.13491478562355042,
-0.07678442448377609,
0.02716853655874729,
-0.03607666492462158,
0.008104340173304081,
0.06212834268808365,
-0.014911976642906666,
0.10585042834281921,
-0.18069177865982056,
-0.12245779484510422,
-0.1137799471616745,
0.07116198539733887,
0.27522069215774536,
0.2359168976545334,
-0.03442501649260521,
0.20603470504283905,
-0.2449312061071396,
-0.10538899898529053,
0.20328262448310852,
0.09045124799013138,
-0.2848260998725891,
0.1224551722407341,
0.24997258186340332,
-0.022215494886040688,
-0.16315561532974243,
-0.10460297763347626,
0.4486978054046631,
-0.3007693588733673,
-0.1121908649802208,
0.04565570503473282,
0.3275281488895416,
-0.07713522762060165,
-0.34955498576164246,
-0.10168170183897018,
-0.08243171125650406,
-0.18641693890094757,
0.5598786473274231,
0.13686351478099823,
0.4772668182849884,
0.6155215501785278,
0.3107832670211792,
0.17134355008602142,
0.23878131806850433,
0.45797213912010193,
0.15058806538581848,
0.09982278198003769,
0.1584692746400833,
-0.15691666305065155,
-0.4521494507789612,
-0.041842490434646606,
-0.2908703088760376,
0.17683370411396027,
-0.09020717442035675,
-0.48423582315444946,
-0.29712367057800293,
-0.006482044234871864,
-0.15589196979999542,
-0.23843984305858612,
0.2650592029094696,
0.057244203984737396,
-0.0520034097135067,
0.5110613107681274,
0.15896114706993103,
-0.1946728229522705,
-0.06368511915206909,
0.07918232679367065,
-0.20714280009269714,
0.2008061707019806,
-0.3673337996006012,
0.11200162768363953,
-0.08839839696884155,
0.05077839642763138,
0.09952805936336517,
0.10352018475532532,
0.020913217216730118,
-0.14719326794147491,
0.07348404079675674,
0.11931265890598297,
0.16175323724746704,
-0.05799970403313637,
0.14762794971466064,
-0.2280483841896057,
0.18295465409755707,
0.43372267484664917,
0.036668915301561356,
-0.013297236524522305,
-0.29632478952407837,
0.04791855439543724,
0.14607343077659607,
-0.5487253069877625,
-0.0383843332529068,
-0.17362430691719055,
0.23090055584907532,
-0.1467488706111908,
0.1906295269727707,
-0.5560762286186218,
-0.18267373740673065,
0.3927793800830841,
-0.14340592920780182,
0.35009104013442993,
-0.017233464866876602,
0.102223239839077,
0.8118206262588501,
0.000294726574793458,
0.13341589272022247,
0.11960641294717789,
-0.3678446412086487,
-0.5180395841598511,
0.2820888161659241,
-0.13962167501449585,
-0.1798522174358368,
0.10097962617874146,
0.3842076361179352,
-0.15135696530342102,
-0.0783858522772789,
-0.05519983544945717,
0.18791382014751434,
-0.1197434663772583,
-0.0019240137189626694,
0.04955558106303215,
0.3267883360385895,
0.18763367831707,
-0.4058569669723511,
0.3648087680339813,
0.1297772079706192,
0.09455104917287827,
-0.13261261582374573,
-0.001939614536240697,
-0.5372320413589478,
0.039044175297021866,
0.009140056557953358,
0.17126984894275665,
-0.23220078647136688,
-0.6782131791114807,
0.24516677856445312,
0.09592630714178085,
-0.14533521234989166,
0.05385773256421089,
-0.26717376708984375,
0.2830561399459839,
0.2185659259557724,
0.33628255128860474,
-0.1765318214893341,
-0.23263633251190186,
-0.14862854778766632,
0.08533041179180145,
-0.09089495241641998,
0.08258390426635742,
0.22599641978740692,
0.06575004756450653,
-0.41706013679504395,
-0.632917582988739,
-0.5000090599060059,
0.3837079703807831,
0.0698651373386383,
-0.11925936490297318,
0.07644631713628769,
0.2603917419910431,
-0.06932561099529266,
-0.0466378889977932,
-0.10595104098320007,
-0.043115828186273575,
-0.09718016535043716,
-0.06964172422885895,
-0.253059059381485,
0.36137884855270386,
-0.2009422332048416,
0.06953953951597214,
-0.16332365572452545,
-0.10660357028245926,
-0.10248469561338425,
0.129856675863266,
0.09472622722387314,
0.19237370789051056,
-0.2523287832736969,
-0.29182741045951843,
-0.14458434283733368,
0.07912268489599228,
-0.6000087857246399,
-0.3031300902366638,
0.2559526264667511,
-0.35697346925735474,
-0.35746800899505615,
0.09440188109874725,
0.09476783126592636,
-0.2808109521865845,
0.1878170669078827,
-0.5055822134017944,
-0.02246428281068802,
-0.03652738034725189,
0.5416026711463928,
0.3268683850765228,
-0.0158932376652956,
0.16462759673595428,
-0.10505054891109467,
-0.03634706139564514,
-0.24953041970729828,
0.16698510944843292,
0.04473482444882393,
-0.14999692142009735,
0.34337931871414185,
0.06069082394242287,
0.18968628346920013,
0.11147334426641464,
0.7105253338813782,
0.08336170017719269,
0.03376909717917442,
0.3404984176158905,
-0.007789362221956253,
0.49059826135635376,
-0.2784751355648041,
0.026611030101776123,
-0.03653706982731819,
0.20321893692016602,
0.1822841763496399,
0.34925952553749084,
-0.031985700130462646,
-0.2567228674888611,
0.2446635365486145,
0.03389745578169823,
-0.15593849122524261,
-0.30248716473579407,
-0.10425976663827896,
0.2161111980676651,
0.08330779522657394,
0.4409821331501007,
0.183341845870018,
-0.26875850558280945,
-0.2823113203048706,
0.320995956659317,
-0.0409436859190464,
-0.09098336100578308,
0.14323930442333221,
-0.11838724464178085,
0.35054272413253784,
-0.5200175046920776,
0.036584384739398956,
-0.130841925740242,
0.1555892527103424,
-0.06519709527492523,
-0.0580512173473835,
0.07934419065713882,
0.20254182815551758,
0.07194563746452332,
-0.21149182319641113,
0.33759593963623047,
0.034779757261276245,
0.057609401643276215,
-0.012094270437955856,
0.10136066377162933,
-0.20032232999801636,
0.15146927535533905,
0.27867817878723145,
0.14954210817813873,
-0.3248504102230072,
-0.18801532685756683,
0.4926034212112427,
0.027125446125864983,
-0.06773685663938522,
0.1376614272594452,
0.10111931711435318,
-0.15561647713184357,
-0.014906485565006733,
-0.40624481439590454,
0.1373647153377533,
-0.23945459723472595,
-0.17488530278205872,
0.03368014097213745,
-0.285695344209671,
0.22527435421943665,
-0.0414506159722805,
0.00621738051995635,
0.19927139580249786,
0.2488403618335724,
0.041415609419345856,
-0.2165687084197998,
0.21783804893493652,
0.2956765592098236,
0.19968560338020325,
-0.36584919691085815,
-0.15099896490573883,
0.13264349102973938,
-0.4351791739463806,
0.0017996910028159618,
0.27012133598327637,
-0.03153599426150322,
0.05645182356238365,
-0.024872398003935814,
0.1880541741847992,
-0.21344874799251556,
0.07144340127706528,
0.007819540798664093,
-0.09280324727296829,
-0.17600995302200317,
0.06456606090068817,
0.28273865580558777,
-0.06984049826860428,
0.058698467910289764,
0.20836706459522247,
0.26147225499153137,
-0.31704649329185486,
0.38930556178092957,
-0.0029008931014686823,
0.6108665466308594,
0.07836537063121796,
0.237113818526268,
0.14881764352321625,
0.08217411488294601,
0.2469104826450348,
0.0703473836183548,
-0.10431279987096786,
-0.08144485205411911,
-0.08256204426288605,
-0.1386806070804596,
0.30709710717201233,
-0.16227851808071136,
-0.11048926413059235,
-0.06801245361566544,
0.24869048595428467,
-0.17035457491874695,
0.5184510946273804,
0.054676979780197144,
0.24038605391979218,
0.0914275199174881,
-0.032031431794166565,
-0.2376875877380371,
0.20119208097457886,
0.08687855303287506,
0.18030549585819244,
-0.2289942502975464,
-0.008962254039943218,
0.30162107944488525,
-0.0467255525290966,
0.042682062834501266,
-0.12211263179779053,
0.035954590886831284,
0.499868780374527,
-0.24063418805599213,
-0.2171044498682022,
-0.26781460642814636,
0.19738122820854187,
0.2809998691082001,
0.07498466223478317,
0.07789832353591919,
0.20552188158035278,
0.02244930900633335,
-0.08708393573760986,
-0.11530812829732895,
0.2837875187397003,
0.14360761642456055,
-0.1355053037405014,
0.07681015133857727,
0.08755746483802795,
-0.1325223296880722,
-0.40838858485221863,
-0.0007317527779377997,
0.017060087993741035,
-0.48721060156822205,
-0.04079129174351692,
-0.08372223377227783,
-0.07118625938892365,
-0.19205886125564575,
-0.25431352853775024,
0.14437203109264374,
0.002031533047556877,
0.31935662031173706,
-0.008847571909427643,
0.12327411770820618,
-0.2686813771724701,
-0.39962124824523926,
0.4222349524497986,
-0.030736837536096573,
0.29578155279159546,
0.6159838438034058,
0.11504215002059937,
-0.4109019637107849,
-0.26919060945510864,
-0.1698046624660492,
-0.15506954491138458,
-0.44174543023109436,
0.08503453433513641,
-0.42737632989883423,
-0.17478205263614655,
-0.11998807638883591,
0.23476152122020721,
-0.1664985567331314,
-0.2648929953575134,
-0.33470848202705383,
-0.10815005004405975,
0.0860862135887146,
0.13959312438964844,
-0.055164508521556854,
0.12326135486364365,
0.2111719250679016,
0.1536698341369629,
-0.08163229376077652,
-0.062303993850946426,
-0.32218676805496216,
0.30764323472976685,
0.15949878096580505,
0.11823982745409012,
-0.2774854898452759,
-0.24521565437316895,
0.09080198407173157,
-0.2766595482826233,
0.17459043860435486,
-0.0022643080446869135,
0.039071060717105865,
-0.1986529380083084,
-0.04119657352566719,
0.08634864538908005,
-0.159930020570755,
0.03940224647521973,
-0.23906688392162323,
-0.09572411328554153,
-0.16105163097381592,
-0.04137091711163521,
0.2538219094276428,
0.26795244216918945,
0.19054801762104034,
0.26846402883529663,
0.3756260275840759,
-0.11864080280065536,
0.14187727868556976,
0.02178090438246727,
0.30159202218055725,
0.4309529960155487,
-0.09823253005743027,
0.19305813312530518,
-0.3081357181072235,
-0.05299536883831024,
-0.1405499428510666,
0.25380516052246094,
-0.2114296704530716,
-0.02859465777873993,
0.5433163046836853,
-0.26100954413414,
-0.1103440448641777,
0.4646110534667969,
0.06710167974233627,
-0.0663319081068039,
-0.10817047953605652,
-0.34641751646995544,
-0.06598784774541855,
0.2216820865869522,
-0.25196754932403564,
-0.02779305912554264,
0.07752621173858643,
-0.1576983779668808,
0.05957629904150963,
0.0505233071744442,
0.2713138163089752,
-0.07122208923101425,
-0.021052053198218346,
0.3511500358581543,
0.22409476339817047,
-0.21017013490200043,
0.006409464403986931,
0.15505735576152802,
0.11265718191862106,
0.2557576894760132,
0.04832932725548744,
0.2022913545370102,
-0.16211004555225372,
0.0627104714512825,
0.2722717225551605,
0.04242284223437309,
0.46232882142066956,
0.07834401726722717,
0.1787944734096527,
-0.36711180210113525,
0.23700028657913208,
0.5520957112312317,
-0.1306999772787094,
0.35922086238861084,
0.25803476572036743,
-0.1695738583803177,
0.31117871403694153,
-0.05947893485426903,
-0.35718682408332825,
0.20501701533794403,
-0.20223328471183777,
-0.03719721734523773,
-0.12364498525857925,
-0.047871168702840805,
0.06352616846561432,
-0.04861241579055786,
0.053530920296907425,
-0.1565178483724594,
0.2331480085849762,
0.1059475764632225,
-0.19499367475509644,
-0.25062835216522217,
0.5501900315284729,
-0.24829962849617004,
0.362273633480072,
-0.03370090201497078,
0.04725205898284912,
-0.2363160401582718,
0.050425853580236435,
0.030444389209151268,
0.20401310920715332,
0.11224991828203201,
-0.14474312961101532,
-0.04168914258480072,
0.025310402736067772,
0.15655209124088287,
-0.23367872834205627,
-0.1563454121351242,
-0.016586698591709137,
0.06775777786970139,
-0.07189156115055084,
0.25240787863731384,
0.14573165774345398,
-0.1279716044664383,
-0.5240659117698669,
0.2916453778743744,
0.30448731780052185,
-0.06762675195932388,
-0.060406558215618134,
-0.031224897131323814,
-0.12641394138336182,
0.20315630733966827,
-0.1877744346857071,
-0.20277011394500732,
0.006826684344559908,
0.21781976521015167,
-0.11418122053146362,
0.49107587337493896,
-0.12299953401088715,
0.10357724875211716,
-0.18144872784614563,
0.06377366930246353,
0.4488377571105957,
-0.13648845255374908,
0.05972025915980339,
-0.2620169222354889,
-0.43682512640953064,
0.0062885708175599575,
-0.4557344913482666,
-0.10225674510002136,
0.25502845644950867,
0.5203264355659485,
0.16970714926719666,
-0.19604578614234924,
0.2652003765106201,
-0.4915158748626709,
0.022294769063591957,
-0.06497202813625336,
-0.3212910592556,
0.058147720992565155,
0.1083468496799469,
0.11033984273672104,
-0.18020786345005035,
-0.4086802899837494,
0.3585062325000763,
-0.01139324065297842,
0.1307515949010849,
-0.08859409391880035,
0.07232902199029922,
0.08149993419647217,
-0.04662375524640083,
0.02934078872203827,
0.06572195887565613,
-0.020872535184025764,
-0.17044630646705627,
-0.4650132358074188,
-0.11525845527648926,
0.08080652356147766,
0.12347505241632462,
0.025177745148539543,
-0.22193647921085358,
0.2121952772140503,
0.08462601900100708,
-0.11396200954914093,
0.08777881413698196,
0.7201064229011536,
0.0049712262116372585,
0.22838318347930908,
-0.28100502490997314,
0.1627800464630127,
-0.1347888559103012,
-0.0885077640414238,
0.1705922782421112,
0.1851242482662201,
-0.04282282665371895,
0.08064279705286026,
0.009971903637051582,
-0.6603410840034485,
0.03764823079109192,
-0.1711028665304184,
-0.2517804503440857,
-0.40862298011779785,
0.08517657220363617,
0.04459969699382782,
-0.1394575834274292,
-0.318022221326828,
0.14003032445907593,
0.2339758425951004,
-0.241362065076828,
-0.07640793919563293,
0.15486706793308258,
-0.03695792704820633,
0.2845381796360016,
0.031050682067871094,
0.45184627175331116,
0.03630630671977997,
-0.2948707044124603,
-0.20850591361522675,
-0.12399575859308243
] |
https://github.com/huggingface/datasets/issues/2166
|
Regarding Test Sets for the GEM datasets
|
Hi @vyraun ! The test references for CommonGen are not publicly available: you can reach out to the original dataset authors if you would like to ask for them, but we will not be releasing them as part of GEM (March 31st was the release date for the test set inputs, references are incidentally released for some of the test sets but shouldn't really be used for benchmark submissions)
cc @sebastiangehrmann
|
@yjernite Hi, are the test sets for the GEM datasets scheduled to be [added soon](https://gem-benchmark.com/shared_task)?
e.g.
```
from datasets import load_dataset
DATASET_NAME="common_gen"
data = load_dataset("gem", DATASET_NAME)
```
The test set doesn't have the target or references.
```
data['test'][0]
{'concept_set_id': 0, 'concepts': ['drill', 'field', 'run', 'team'], 'gem_id': 'common_gen-test-0', 'gem_parent_id': 'common_gen-test-0', 'references': [], 'target': ''}
```
| 71 |
Regarding Test Sets for the GEM datasets
|
[
-0.35963597893714905,
-0.04420850798487663,
-0.3000245690345764,
0.270079106092453,
-0.11493562906980515,
0.06780324876308441,
0.4011662006378174,
0.2400999516248703,
0.024253522977232933,
-0.06628210842609406,
0.08313394337892532,
0.2761348783969879,
-0.34262439608573914,
0.30574166774749756,
-0.04316706955432892,
0.0256339143961668,
-0.21251463890075684,
0.08050708472728729,
-0.40063244104385376,
-0.0929919108748436,
-0.015928469598293304,
0.09477549046278,
-0.03172042593359947,
0.06530369073152542,
-0.3836052119731903,
-0.2560887634754181,
0.05934467911720276,
0.2811488211154938,
-0.1674244999885559,
-0.2400229424238205,
0.1023019328713417,
0.05645206198096275,
-0.12144125998020172,
0.3822530210018158,
-0.00010212519555352628,
-0.02621847577393055,
0.051640987396240234,
-0.03575080260634422,
-0.2724364995956421,
-0.10982348769903183,
-0.6339738965034485,
-0.061917658895254135,
-0.05589716136455536,
-0.23107920587062836,
0.00326693058013916,
-0.11592069268226624,
-0.12371958047151566,
-0.22923706471920013,
0.03148944303393364,
0.3809298574924469,
0.3215372860431671,
0.3935851454734802,
-0.28644242882728577,
-0.09564799070358276,
0.14329563081264496,
-0.18853387236595154,
-0.022570619359612465,
0.1245785504579544,
0.10046035796403885,
0.24582678079605103,
-0.006133166141808033,
0.14833593368530273,
0.1970556676387787,
0.18862487375736237,
-0.07891156524419785,
0.007124598603695631,
-0.06805004924535751,
-0.17883825302124023,
-0.15351487696170807,
0.3299894630908966,
0.5994961857795715,
-0.17637547850608826,
-0.4697953462600708,
0.12313038855791092,
-0.2843794822692871,
-0.11375682055950165,
0.12308662384748459,
0.43354156613349915,
0.13477663695812225,
0.11010459810495377,
-0.5003582835197449,
-0.38465380668640137,
-0.09102056920528412,
-0.13310052454471588,
0.04234989732503891,
-0.028307337313890457,
0.05263041704893112,
-0.048241183161735535,
-0.10050413012504578,
-0.005272060167044401,
-0.2876063883304596,
-0.29228225350379944,
-0.40169963240623474,
-0.14765362441539764,
-0.0761004388332367,
-0.5002003908157349,
-0.33979442715644836,
0.24310582876205444,
0.1805790215730667,
0.5670698285102844,
0.158903568983078,
0.3246857821941376,
-0.26719701290130615,
0.06746034324169159,
0.2975372076034546,
0.09025552123785019,
0.4983082115650177,
0.04317639395594597,
0.2206503450870514,
-0.23412683606147766,
-0.17998476326465607,
0.2061770260334015,
0.13334757089614868,
-0.28113454580307007,
0.05406680330634117,
0.015178808942437172,
-0.0085417116060853,
-0.31650760769844055,
0.006908345967531204,
0.2945628762245178,
0.19263525307178497,
-0.26310989260673523,
-0.011826834641397,
0.363811194896698,
0.0917988047003746,
-0.5143162608146667,
-0.4383266866207123,
0.3087539076805115,
0.02126929722726345,
-0.2476344108581543,
-0.23212802410125732,
0.19555546343326569,
0.18428069353103638,
-0.020661454647779465,
0.09981928020715714,
-0.307564914226532,
0.5594216585159302,
-0.26908770203590393,
0.1247221827507019,
-0.03680863231420517,
0.4211235046386719,
0.046248212456703186,
0.216863214969635,
0.2922265827655792,
-0.10098148137331009,
0.059874724596738815,
-0.036823421716690063,
-0.009853011928498745,
-0.21109694242477417,
0.20243695378303528,
-0.009381106123328209,
-0.2878185510635376,
0.2692725360393524,
0.263720840215683,
-0.385547012090683,
-0.20929257571697235,
-0.018723560497164726,
0.19554536044597626,
-0.16248272359371185,
-0.20350328087806702,
0.11156181246042252,
-0.16996152698993683,
0.15646012127399445,
-0.04971852898597717,
-0.19711215794086456,
0.18012607097625732,
-0.2261161357164383,
0.07180186361074448,
0.2111363559961319,
-0.20152981579303741,
0.03765328601002693,
0.19559809565544128,
-0.2593095004558563,
-0.2635563015937805,
-0.08312555402517319,
0.3018312454223633,
0.5556578636169434,
0.05885197967290878,
-0.09236855059862137,
-0.09815961867570877,
0.08639538288116455,
-0.21795417368412018,
0.14308473467826843,
-0.05306170880794525,
-0.05248713120818138,
-0.16374173760414124,
-0.4113163352012634,
-0.07817252725362778,
-0.118626169860363,
0.08422629535198212,
-0.35739678144454956,
-0.14314138889312744,
0.4677893817424774,
-0.053047239780426025,
0.1031082272529602,
-0.23956429958343506,
-0.031536687165498734,
-0.09719733148813248,
0.2112523764371872,
0.031858839094638824,
-0.17250743508338928,
-0.10612482577562332,
0.0703129991889,
-0.3518623411655426,
-0.1263018399477005,
-0.15625397861003876,
0.09217464178800583,
0.12918533384799957,
0.29724565148353577,
0.29106995463371277,
0.486209511756897,
0.06052175164222717,
-0.31321755051612854,
-0.011403770186007023,
0.037708912044763565,
-0.1457146853208542,
0.20666974782943726,
0.11984146386384964,
-0.039208002388477325,
-0.14527690410614014,
-0.3315204679965973,
-0.20963498950004578,
-0.3192417323589325,
-0.04514351487159729,
0.10935632884502411,
0.16514749825000763,
-0.11261934041976929,
0.039706405252218246,
0.10318826138973236,
-0.05866742879152298,
-0.23069965839385986,
-0.37874266505241394,
-0.08151256293058395,
0.2429594248533249,
0.2364475280046463,
0.0075448197312653065,
0.6198344230651855,
0.347401887178421,
0.01607486419379711,
-0.262101948261261,
-0.023737560957670212,
-0.20132134854793549,
0.04819732531905174,
0.1358800083398819,
-0.3343096971511841,
0.32217708230018616,
0.24827338755130768,
-0.15072444081306458,
0.12863382697105408,
-0.17814208567142487,
0.17081178724765778,
-0.04324481636285782,
-0.12487942725419998,
-0.13517019152641296,
0.11143762618303299,
-0.2461651712656021,
-0.17533718049526215,
0.24780260026454926,
-0.16702525317668915,
-0.0822656899690628,
0.36235716938972473,
-0.10060133785009384,
0.24047046899795532,
-0.16131730377674103,
0.025774316862225533,
-0.20474663376808167,
0.07488144189119339,
0.16382592916488647,
0.30129969120025635,
0.22006481885910034,
0.3422051966190338,
-0.18571706116199493,
-0.17069806158542633,
-0.2554416060447693,
0.29732635617256165,
0.17351295053958893,
0.002822499256581068,
0.13261021673679352,
0.05330340936779976,
-0.44371235370635986,
-0.2050529271364212,
-0.08100715279579163,
0.17323948442935944,
0.12494499981403351,
-0.2816237807273865,
-0.066855289041996,
-0.08517659455537796,
0.4937690496444702,
-0.11348139494657516,
-0.20674695074558258,
-0.04202716052532196,
-0.15366508066654205,
0.32301104068756104,
-0.45443323254585266,
-0.04112422093749046,
0.0910482406616211,
-0.03345315158367157,
0.31386274099349976,
-0.17850764095783234,
0.028294842690229416,
-0.1371384561061859,
-0.3363719880580902,
-0.08297935128211975,
0.29781192541122437,
0.07732345908880234,
0.043872952461242676,
0.37286725640296936,
-0.13394322991371155,
-0.34880679845809937,
-0.026608798652887344,
-0.059572264552116394,
0.15065395832061768,
0.03904208540916443,
0.606586217880249,
0.09446302801370621,
0.17043474316596985,
0.08653762191534042,
-0.023426664993166924,
0.11448090523481369,
-0.14182420074939728,
-0.11692564189434052,
-0.2530486285686493,
0.16849610209465027,
-0.05963565409183502,
0.03153498098254204,
-0.944171667098999,
-0.06144139915704727,
-0.044708676636219025,
-0.12316282093524933,
0.240492045879364,
0.06718048453330994,
-0.04732503741979599,
0.11549761891365051,
-0.0703519880771637,
-0.18867412209510803,
0.11579208076000214,
-0.09470818191766739,
-0.3783694803714752,
0.2157982587814331,
-0.2233947366476059,
-0.21846716105937958,
-0.0164529737085104,
-0.3487684726715088,
0.3811275362968445,
0.07532331347465515,
-0.25625088810920715,
-0.28775137662887573,
0.08278945088386536,
0.035802219063043594,
0.341013640165329,
-0.21662461757659912,
0.010750376619398594,
-0.036320868879556656,
-0.26915544271469116,
-0.2546294927597046,
-0.09276680648326874,
0.28231626749038696,
0.31187814474105835,
-0.09895826131105423,
-0.07692530751228333,
-0.05866561457514763,
-0.16002938151359558,
0.848523736000061,
0.23847928643226624,
-0.2991715669631958,
0.0550149604678154,
-0.20340225100517273,
0.06946214288473129,
0.06611822545528412,
0.010927537456154823,
-0.15162330865859985,
0.22700519859790802,
-0.1621755063533783,
0.1360282599925995,
0.12929998338222504,
-0.08635561168193817,
0.10209052264690399,
0.0961347296833992,
-0.35943955183029175,
-0.11239417642354965,
-0.02524057775735855,
-0.07087608426809311,
0.17018243670463562,
0.14688870310783386,
0.012876790016889572,
0.08909327536821365,
0.053387146443128586,
0.11226211488246918,
0.19288325309753418,
0.15231052041053772,
-0.23420783877372742,
-0.5414116382598877,
0.029272593557834625,
0.044377461075782776,
0.21088454127311707,
0.22720925509929657,
0.33752205967903137,
-0.10482389479875565,
-0.13936273753643036,
-0.08187884837388992,
0.012648198753595352,
0.17170986533164978,
-0.4963752329349518,
0.0999397560954094,
0.04084498807787895,
-0.37750598788261414,
-0.07066790759563446,
0.15655837953090668,
-0.2926110327243805,
0.0842985063791275,
0.1514543741941452,
0.05285264924168587,
0.008379451930522919,
-0.17009946703910828,
0.1957554966211319,
0.18909123539924622,
-0.3096868395805359,
0.2638818919658661,
0.03338922560214996,
-0.16827929019927979,
-0.08865261822938919,
0.08211513608694077,
-0.2698425054550171,
-0.10122168809175491,
-0.2871427536010742,
-0.13049854338169098,
-0.11710717529058456,
0.07221943885087967,
0.3282311260700226,
0.17995689809322357,
0.22573673725128174,
0.06536179780960083,
0.21737395226955414,
0.11432422697544098,
-0.08237746357917786,
0.06743253022432327,
0.3108673393726349,
0.02787322923541069,
0.4245263636112213,
0.06457766890525818,
-0.23599030077457428,
0.5586041808128357,
0.24323716759681702,
0.003036417067050934,
-0.17656433582305908,
-0.23840154707431793,
-0.0423143170773983,
-0.012780432589352131,
0.34894177317619324,
0.06316255778074265,
0.15239852666854858,
0.02172192931175232,
-0.5206217169761658,
0.13142600655555725,
-0.20072290301322937,
-0.3746058940887451,
0.09089265763759613,
0.20807825028896332,
0.12107878178358078,
0.26944592595100403,
0.22401569783687592,
0.7038816213607788,
-0.027063218876719475,
0.016373760998249054,
0.03143959864974022,
0.0036171111278235912,
0.08482291549444199,
-0.2585463523864746,
-0.05048668384552002,
-0.3788703978061676,
-0.20765367150306702,
-0.012324020266532898,
-0.23499755561351776,
0.1911337971687317,
0.2758762836456299,
0.016378000378608704,
0.17690317332744598,
0.19521750509738922,
-0.13334517180919647,
-0.13246747851371765,
0.13001078367233276,
-0.0214134119451046,
0.3473631739616394,
0.08833996951580048,
0.2686074674129486,
0.22532396018505096,
-0.13026590645313263,
-0.0041832150891423225,
0.043228618800640106,
-0.018656743690371513,
-0.07511644810438156,
-0.12710562348365784,
-0.2503560483455658,
0.02315804362297058,
0.010251600295305252,
-0.0669478103518486,
-0.3493744432926178,
0.09005602449178696,
0.4099024832248688,
0.002396141644567251,
0.17333659529685974,
0.011509468778967857,
0.10879847407341003,
-0.4433092474937439,
0.02986350655555725,
0.121754489839077,
0.29949527978897095,
0.19482451677322388,
-0.15349893271923065,
-0.3413758873939514,
0.15962077677249908,
-0.15065225958824158,
0.09622551500797272,
-0.046968717128038406,
-0.01381233986467123,
0.10329641401767731,
-0.414971262216568,
0.052689846605062485,
0.11349400132894516,
-0.2698146402835846,
-0.1439265012741089,
0.2253517210483551,
0.1522117704153061,
0.00397119764238596,
0.41336408257484436,
0.4253793954849243,
-0.3023279011249542,
-0.21761150658130646,
-0.036129195243120193,
-0.04482410475611687,
0.411580353975296,
0.32696688175201416,
-0.2252482920885086,
0.023699289187788963,
-0.47858819365501404,
0.1005939468741417,
0.04659508541226387,
-0.17843618988990784,
0.2989261746406555,
-0.1174042597413063,
-0.027199504896998405,
-0.08742578327655792,
0.21142147481441498,
0.26251882314682007,
0.08569326996803284,
-0.2602042257785797,
-0.14023490250110626,
0.0059076896868646145,
0.09767235815525055,
0.15030643343925476,
0.5237666368484497,
-0.27448922395706177,
-0.3330795168876648,
-0.18596485257148743,
0.3988150358200073,
-0.45025157928466797,
0.028191378340125084,
-0.1293269395828247,
0.20745156705379486,
0.04775936156511307,
0.1782694309949875,
0.1870935559272766,
-0.13374485075473785,
0.20276381075382233,
-0.2933402955532074,
-0.25887417793273926,
-0.3868008852005005,
-0.07372891902923584,
0.08268468081951141,
0.02621804177761078,
-0.12527021765708923,
-0.1583312302827835,
0.1131029725074768,
0.05358531326055527,
-0.1575818508863449,
-0.026843588799238205,
-0.23294906318187714,
-0.01067479606717825,
0.4666045904159546,
0.25026845932006836,
-0.2868044376373291,
-0.32306548953056335,
-0.05142727121710777,
0.003985717426985502,
0.22882278263568878,
0.13019131124019623,
-0.04283902794122696,
0.28181329369544983,
-0.23763710260391235,
0.33993208408355713,
0.1182330772280693,
0.09191475808620453,
-0.13169363141059875,
0.014527669176459312,
-0.027673544362187386,
0.10088197886943817,
0.15444892644882202,
0.32672709226608276,
0.22247099876403809,
-0.04457783326506615,
0.14582650363445282,
0.07664473354816437,
0.3048178553581238,
-0.0943947434425354,
-0.23054279386997223,
0.12037306278944016,
0.06075659766793251,
0.21841725707054138,
0.3435913622379303,
0.20243887603282928,
0.01447802223265171,
0.05181101709604263,
0.007445713505148888,
0.1359366476535797,
-0.08530383557081223,
-0.00030384809360839427,
0.06562776118516922,
-0.280979722738266,
-0.0038134537171572447,
0.19932472705841064,
-0.11859272420406342,
0.17454664409160614,
-0.1484212577342987,
0.15302090346813202,
0.8506295680999756,
0.11385398358106613,
-0.1122627705335617,
-0.10563231259584427,
-0.0011811505537480116,
0.27405494451522827,
0.03279174491763115,
0.258806437253952,
0.11503040790557861,
0.2538757920265198,
0.38006117939949036,
0.07490380853414536,
0.01711198501288891,
-0.19297471642494202,
-0.1199013814330101,
0.06493235379457474,
-0.22860287129878998,
0.05414917320013046,
-0.3008127808570862,
-0.03240988031029701,
0.2315906435251236,
-0.004138681571930647,
-0.06206139922142029,
0.257384717464447,
-0.04974719136953354,
0.1267249435186386,
-0.28483709692955017,
0.5424020290374756,
0.07523603737354279,
-0.13045112788677216,
-0.12599986791610718,
0.07194622606039047,
0.27790361642837524,
-0.0452551394701004,
0.31166690587997437,
0.21132203936576843,
0.04206646978855133,
-0.27551788091659546,
-0.023028060793876648,
-0.16509941220283508,
-0.07220101356506348,
-0.15554295480251312,
-0.28442806005477905,
0.2552964389324188,
-0.15741904079914093,
-0.13436153531074524,
0.4027002155780792,
0.3640517294406891,
-0.17795677483081818,
0.23497197031974792,
0.23854736983776093,
-0.17689399421215057,
-0.28612229228019714,
0.3095995783805847,
0.3677489757537842,
-0.05976272001862526,
0.062278855592012405,
-0.10545292496681213,
-0.020314598456025124,
-0.2909983992576599,
0.4116981625556946,
-0.09744242578744888,
0.15847046673297882,
0.03419296815991402,
0.15785787999629974,
-0.028592366725206375,
0.6263330578804016,
-0.03417760878801346,
0.21794147789478302,
-0.39555278420448303,
-0.032986417412757874,
-0.31557920575141907,
0.0004449056868907064,
0.3247596323490143,
0.0822695642709732,
0.07346073538064957,
0.04466724768280983,
0.4651951491832733,
0.201640322804451,
0.1633448749780655,
-0.028476350009441376,
-0.008135522715747356,
0.12488550692796707,
-0.43326517939567566,
-0.01884927973151207,
-0.20072370767593384,
0.14900439977645874,
0.08688199520111084,
-0.011980480514466763,
-0.0059918747283518314,
-0.2303425371646881,
0.06684639304876328,
-0.03354330360889435,
-0.07162315398454666,
0.3466969430446625,
-0.06259547173976898,
0.34806352853775024,
-0.21942713856697083,
0.7160775065422058,
-0.09284037351608276,
0.08789647370576859,
0.09707891196012497,
-0.23108889162540436,
0.012306669726967812,
0.0437653586268425,
-0.08693408966064453,
0.3122721314430237,
-0.061171624809503555,
0.12609080970287323,
0.14459660649299622,
-0.133050337433815,
0.03252018615603447,
0.17525149881839752,
0.09551496058702469,
-0.1769973635673523,
-0.007193290628492832,
-0.2905738353729248,
0.14039628207683563,
0.24812622368335724,
-0.08707752823829651,
-0.034028105437755585,
-0.052120376378297806,
-0.005346531979739666,
0.49146461486816406,
0.12103573232889175,
-0.007412145845592022,
-0.3856145441532135,
0.09649655222892761,
0.44682541489601135,
-0.10983051359653473,
-0.35085368156433105,
-0.13867820799350739,
0.4010179042816162,
0.026653101667761803,
-0.08456016331911087,
0.23982076346874237,
0.24293185770511627,
0.008990094996988773,
-0.036544233560562134,
0.3735091984272003,
-0.2268242985010147,
-0.24287469685077667,
-0.2882332503795624,
-0.07115232199430466
] |
https://github.com/huggingface/datasets/issues/2165
|
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
Hi,
a HF dataset can be converted to a Torch Dataset with a simple wrapper as follows:
```python
from torch.utils.data import Dataset
class HFDataset(Dataset):
def __init__(self, dset):
self.dset = dset
def __getitem__(self, idx):
return self.dset[idx]
def __len__(self):
return len(self.dset)
train_ds = HFDataset(train_ds)
```
@lhoestq Since the Arrow Dataset already provides `__getitem__` and `__len__`, I think we could use the [virtual subclass](https://docs.python.org/3/library/abc.html#abc.ABCMeta.register) mechanism from the `abc` module to elegantly solve this issue. This mechanism would allow the Arrow Dataset to be used in place of the Torch Dataset because the `isinstance(instance of Arrow Dataset, TorchDataset)` check would return True (DeepSpeed has this check [here](https://github.com/microsoft/DeepSpeed/blob/ab5534fc4c0f8ca21ada321f9730d723aa31288b/deepspeed/runtime/engine.py#L823)).
And it requires a minimal change in the `arrow_dataset.py` file:
```python
if config.TORCH_AVAILABLE:
from torch.utils.data import Dataset as TorchDataset
TorchDataset.register(Dataset)
```
|
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 124 |
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
[
-0.38135045766830444,
0.03989590331912041,
-0.19329914450645447,
0.2075767070055008,
0.22860665619373322,
0.1434226632118225,
0.23101210594177246,
0.1419614851474762,
-0.15852558612823486,
-0.025924254208803177,
-0.29995226860046387,
0.6370788216590881,
-0.31550097465515137,
-0.16834385693073273,
-0.05090397596359253,
-0.18689921498298645,
0.14982102811336517,
-0.03684714809060097,
-0.45705148577690125,
-0.09293872863054276,
-0.10118813812732697,
0.11987213790416718,
0.0993996411561966,
0.20764999091625214,
-0.15383778512477875,
-0.14523416757583618,
0.14525039494037628,
0.17706440389156342,
-0.2736078202724457,
-0.18368789553642273,
0.2902565598487854,
-0.0808589905500412,
0.08718127757310867,
0.388640820980072,
-0.00011034605267923325,
0.09828883409500122,
0.1085897833108902,
-0.05350222438573837,
-0.31159475445747375,
0.07780467718839645,
0.13661475479602814,
-0.010738607496023178,
0.2576044499874115,
-0.13324664533138275,
-0.04271801561117172,
-0.29689714312553406,
0.03904181718826294,
-0.5213894248008728,
0.04419028386473656,
0.3848278224468231,
0.2270476371049881,
0.25647419691085815,
0.12020330131053925,
-0.1612054705619812,
0.33273494243621826,
0.14598213136196136,
-0.008245774544775486,
0.07848277688026428,
0.18425600230693817,
0.30388006567955017,
-0.2997905910015106,
0.41424301266670227,
-0.0751725435256958,
0.09025824069976807,
0.2032509297132492,
-0.21123956143856049,
-0.6463906168937683,
0.06500528752803802,
0.26223888993263245,
0.0695805698633194,
0.48022356629371643,
-0.43060970306396484,
-0.1998085081577301,
0.16041365265846252,
-0.12221022695302963,
0.06508252769708633,
-0.1115967407822609,
0.11058276891708374,
0.08882337808609009,
0.10574260354042053,
-0.049716658890247345,
-0.3124726116657257,
-0.07318223267793655,
-0.08580995351076126,
-0.15096722543239594,
0.3734937012195587,
-0.15965667366981506,
0.1523943841457367,
0.013941564597189426,
-0.36234280467033386,
0.696965217590332,
0.014654526486992836,
-0.09309815615415573,
-0.2351994663476944,
-0.031238730996847153,
0.1036495789885521,
-0.11107921600341797,
0.06164754927158356,
0.3027217388153076,
0.25235405564308167,
0.2385917603969574,
0.23770351707935333,
-0.15985046327114105,
0.08237171173095703,
-0.0673648789525032,
-0.13970403373241425,
0.25213623046875,
0.43406227231025696,
0.030001860111951828,
-0.18375065922737122,
-0.08135774731636047,
0.1155591681599617,
-0.185363307595253,
-0.4941827654838562,
-0.14179062843322754,
0.17466233670711517,
0.3066730499267578,
-0.18303407728672028,
-0.19038614630699158,
-0.22425764799118042,
0.1659044474363327,
0.010263095609843731,
0.05159252509474754,
0.23623590171337128,
0.12254326790571213,
0.03700552135705948,
0.19425036013126373,
0.22309058904647827,
0.04783601686358452,
-0.20011499524116516,
-0.18156112730503082,
-0.005752598866820335,
0.05624408274888992,
-0.22789621353149414,
0.05976565182209015,
-0.08103342354297638,
0.31329774856567383,
-0.10293610394001007,
-0.1920599341392517,
0.3921719193458557,
0.13500994443893433,
0.08376970142126083,
0.3866766691207886,
-0.033189479261636734,
0.008761152625083923,
0.09285490959882736,
0.15316127240657806,
0.37483251094818115,
-0.18439555168151855,
0.23005928099155426,
-0.3605666160583496,
-0.2418285459280014,
-0.30233126878738403,
0.20322921872138977,
0.22354920208454132,
-0.20168933272361755,
-0.09609955549240112,
0.0502953939139843,
0.1158096119761467,
-0.10412756353616714,
0.14726243913173676,
-0.16530942916870117,
0.12420646846294403,
-0.19698596000671387,
0.002310421783477068,
0.12358565628528595,
-0.5695286393165588,
0.040713921189308167,
0.20301330089569092,
-0.36121904850006104,
-0.13329128921031952,
0.16248498857021332,
-0.35669344663619995,
-0.156098410487175,
-0.2983241081237793,
-0.00027227247483097017,
0.5006659626960754,
-0.35737985372543335,
-0.2753264009952545,
0.004903463181108236,
-0.043547261506319046,
-0.3395160138607025,
0.21183839440345764,
0.10210716724395752,
0.005660193972289562,
0.018354035913944244,
0.1854080855846405,
0.08607020229101181,
0.05955208092927933,
-0.16098426282405853,
-0.07614517956972122,
-0.15937213599681854,
0.26196780800819397,
-0.10468357056379318,
-0.029570570215582848,
0.009316902607679367,
0.08982216566801071,
-0.2247377187013626,
0.12114331871271133,
-0.19082365930080414,
0.03430641442537308,
0.28503623604774475,
-0.1728491634130478,
-0.2114083170890808,
0.02415967732667923,
0.013791406527161598,
-0.2626331150531769,
-0.1964300125837326,
0.22130778431892395,
-0.21818070113658905,
-0.2991935610771179,
-0.2596094310283661,
-0.21331758797168732,
0.20301641523838043,
-0.10218551754951477,
-0.16269661486148834,
0.12765266001224518,
0.24882151186466217,
-0.08063571155071259,
-0.2550404667854309,
-0.047138068825006485,
-0.11190079152584076,
-0.32117974758148193,
0.17057831585407257,
-0.390645831823349,
-0.0012144180946052074,
-0.10010849684476852,
-0.05423253774642944,
0.06333281844854355,
-0.08337467908859253,
0.04433777183294296,
-0.0018192505231127143,
-0.08251670747995377,
0.24335815012454987,
-0.11682239919900894,
0.2320248782634735,
0.40377870202064514,
0.11358778178691864,
0.086489237844944,
-0.5137045979499817,
0.3729441463947296,
0.2700335681438446,
0.06459119915962219,
0.1442117542028427,
-0.3261021673679352,
0.33628132939338684,
0.0368778295814991,
0.06686054915189743,
0.04698275029659271,
0.006994715891778469,
0.33930522203445435,
0.23268301784992218,
-0.16115200519561768,
-0.018568579107522964,
-0.17617812752723694,
-0.026053203269839287,
0.5001412630081177,
0.014923958107829094,
-0.4206916093826294,
0.28842291235923767,
0.47961971163749695,
0.08038900792598724,
0.1773197501897812,
-0.059933070093393326,
-0.4276590943336487,
-0.07817884534597397,
0.39896708726882935,
-0.047093022614717484,
0.14419986307621002,
0.2707662880420685,
0.4553217887878418,
-0.09978924691677094,
0.04164974391460419,
-0.12039828300476074,
0.16746780276298523,
-0.04008885473012924,
0.08953981846570969,
0.10388113558292389,
0.16605335474014282,
-0.2490202784538269,
-0.33526062965393066,
0.04564174637198448,
-0.14598317444324493,
0.0374755933880806,
-0.3315855860710144,
0.14793920516967773,
-0.37230613827705383,
-0.04480878263711929,
-0.3312760293483734,
-0.12037938833236694,
-0.04173810034990311,
-0.337336927652359,
0.07677341997623444,
-0.07874391227960587,
-0.13334298133850098,
0.28515246510505676,
-0.052738167345523834,
-0.32533299922943115,
0.23360398411750793,
-0.18679454922676086,
0.047091297805309296,
-0.28809788823127747,
-0.10458100587129593,
0.12593574821949005,
0.1643669158220291,
0.02398679405450821,
0.25468435883522034,
-0.09458636492490768,
0.4533022344112396,
-0.7649535536766052,
-0.07661543041467667,
0.16161318123340607,
0.06045052409172058,
-0.133457750082016,
0.38204342126846313,
0.02489309012889862,
0.15594425797462463,
-0.21401798725128174,
-0.08544298261404037,
-0.13483433425426483,
-0.1401313990354538,
-0.01967477984726429,
-0.305363267660141,
0.01779637485742569,
0.10916534811258316,
-0.44022971391677856,
-0.2610240876674652,
-0.22506852447986603,
-0.13092069327831268,
0.010475308634340763,
0.11308304220438004,
-0.22244182229042053,
0.32840001583099365,
0.13312923908233643,
0.1405652016401291,
0.0019101561047136784,
-0.15815848112106323,
-0.3929418623447418,
0.3876182436943054,
-0.2171190232038498,
-0.21326278150081635,
-0.05608299374580383,
-0.16547201573848724,
0.39125940203666687,
0.4633409082889557,
-0.002867078874260187,
-0.0005811635055579245,
0.04649405553936958,
0.18418706953525543,
0.06649822741746902,
0.20885051786899567,
0.38055339455604553,
0.21719975769519806,
-0.1585596203804016,
-0.20393908023834229,
0.005765993148088455,
-0.04227474704384804,
-0.38526633381843567,
0.246219202876091,
0.10178619623184204,
0.3061688244342804,
-0.023041129112243652,
0.8837363123893738,
-0.20986482501029968,
-0.44949865341186523,
0.18864761292934418,
-0.3326237201690674,
0.36936038732528687,
-0.027934221550822258,
-0.20609880983829498,
-0.01085465494543314,
-0.08683411031961441,
0.15422359108924866,
-0.049423567950725555,
-0.13784365355968475,
0.02444113790988922,
0.18523992598056793,
0.06598495692014694,
-0.3764213025569916,
-0.15698972344398499,
0.21663188934326172,
-0.5246581435203552,
-0.014353640377521515,
0.045840777456760406,
0.23020349442958832,
-0.25915589928627014,
0.1401807814836502,
0.2680855393409729,
0.0681549608707428,
0.03550216183066368,
0.13287390768527985,
-0.2640725374221802,
0.15000483393669128,
-0.30984726548194885,
0.5070409774780273,
-0.04640813544392586,
0.056835804134607315,
0.12553994357585907,
-0.1784297227859497,
-0.11320925503969193,
-0.2050289362668991,
0.4603605568408966,
-0.07167361676692963,
-0.005332073662430048,
0.0588664747774601,
0.19050051271915436,
-0.4233792722225189,
0.10113711655139923,
-0.16653195023536682,
0.31922873854637146,
-0.076961949467659,
0.06671328842639923,
-0.24643996357917786,
-0.1759706437587738,
0.015442506410181522,
0.15870614349842072,
-0.02964068204164505,
0.5472052097320557,
-0.059714097529649734,
-0.22064973413944244,
-0.24967996776103973,
0.002734825946390629,
0.012728589586913586,
-0.10743257403373718,
-0.013173275627195835,
-0.21547994017601013,
-0.5934467911720276,
-0.009749767370522022,
0.11225544661283493,
0.016266584396362305,
0.42651280760765076,
-0.22527992725372314,
-0.1313968300819397,
-0.10336577892303467,
0.5777080655097961,
0.5634111166000366,
0.46305736899375916,
-0.27683383226394653,
-0.18793988227844238,
0.18490715324878693,
0.07382258772850037,
0.2833022177219391,
0.16506493091583252,
-0.2194560021162033,
-0.06689975410699844,
-0.2058783918619156,
-0.19208115339279175,
0.08946346491575241,
0.1717907190322876,
0.03231138363480568,
0.16672147810459137,
-0.2116202414035797,
-0.30396443605422974,
0.3107945919036865,
0.31910714507102966,
0.06361376494169235,
0.34502044320106506,
0.08769359439611435,
-0.2705687880516052,
0.058144208043813705,
0.2637712061405182,
0.8254712224006653,
-0.08193513751029968,
0.2732759118080139,
0.13307800889015198,
-0.3706185519695282,
0.20734253525733948,
-0.20532268285751343,
-0.0397515706717968,
-0.46357184648513794,
0.03612567484378815,
-0.1011117547750473,
-0.11224539577960968,
0.07983240485191345,
0.3213277757167816,
-0.0037271755281835794,
0.22060677409172058,
-0.25426915287971497,
0.2913197875022888,
-0.1395702362060547,
0.1430388242006302,
-0.16782431304454803,
-0.1156955435872078,
-0.036628611385822296,
0.23118750751018524,
-0.17557959258556366,
-0.012439987622201443,
-0.04689105972647667,
-0.14131025969982147,
-0.19740161299705505,
-0.12921170890331268,
0.10496172308921814,
0.08798955380916595,
-0.3173060417175293,
0.4021243453025818,
-0.10770918428897858,
-0.7258673310279846,
-0.21829737722873688,
0.31559255719184875,
0.2704029977321625,
-0.14591258764266968,
-0.0437905453145504,
0.24824829399585724,
0.12437774240970612,
-0.058012671768665314,
-0.17003966867923737,
0.023771125823259354,
0.2326822727918625,
0.030465219169855118,
0.0952550545334816,
0.10284777730703354,
0.06655727326869965,
-0.38799911737442017,
0.035776011645793915,
-0.11514943093061447,
0.2534385323524475,
-0.48269152641296387,
-0.12149431556463242,
0.15822623670101166,
-0.13027121126651764,
-0.1657184511423111,
0.11839427053928375,
-0.08394726365804672,
-0.04346177726984024,
-0.10050509870052338,
0.26069775223731995,
-0.16317754983901978,
0.1497558206319809,
0.3528069257736206,
-0.07500211149454117,
0.1131429523229599,
0.34381434321403503,
-0.037637192755937576,
-0.23170378804206848,
-0.2663249671459198,
0.04912060871720314,
0.760040819644928,
-0.37130066752433777,
0.1506849080324173,
-0.2838551700115204,
-0.2343343049287796,
0.13770395517349243,
-0.05379060283303261,
0.11778993159532547,
0.2653788626194,
-0.24788859486579895,
-0.033653534948825836,
-0.48388051986694336,
0.28080976009368896,
-0.19238892197608948,
0.28903037309646606,
0.001324775512330234,
-0.15400801599025726,
-0.12940998375415802,
-0.16129331290721893,
-0.3264099657535553,
0.22057192027568817,
0.12561972439289093,
0.1682310551404953,
0.06379319727420807,
0.01909862644970417,
-0.10634607821702957,
0.02144099958240986,
0.1597110480070114,
-0.006045505870133638,
-0.15040959417819977,
-0.27731385827064514,
0.030589265748858452,
0.068194180727005,
-0.052166346460580826,
0.13993582129478455,
-0.06376885622739792,
-0.0872921273112297,
-0.14984668791294098,
-0.14803381264209747,
0.16708460450172424,
0.18409402668476105,
0.15187692642211914,
0.17283450067043304,
0.16865308582782745,
0.163788840174675,
-0.019405756145715714,
-0.09527114033699036,
0.2320377230644226,
0.11654829233884811,
-0.2220211923122406,
0.23281633853912354,
-0.0517503060400486,
-0.20433740317821503,
0.2866244912147522,
0.31486061215400696,
0.4239186644554138,
0.16479387879371643,
-0.0921979546546936,
-0.08282860368490219,
-0.07594011723995209,
0.04268355295062065,
0.2614602744579315,
0.3995290696620941,
-0.08033055812120438,
0.04726802930235863,
-0.03076918050646782,
0.17511820793151855,
-0.39232301712036133,
-0.18610535562038422,
-0.03210526704788208,
-0.19083847105503082,
-0.0172258373349905,
-0.14409831166267395,
0.1874065101146698,
0.2988895773887634,
0.24131105840206146,
-0.039361584931612015,
0.1408943384885788,
-0.25226354598999023,
0.06668387353420258,
0.4477623403072357,
-0.05764065682888031,
-0.11260706931352615,
0.4983672797679901,
0.25924667716026306,
0.4102182686328888,
0.469868004322052,
-0.14805440604686737,
0.8135538697242737,
0.505167543888092,
0.030884098261594772,
0.466094434261322,
-0.14355362951755524,
-0.25580310821533203,
-0.2909408509731293,
0.2931876480579376,
0.09047465026378632,
0.3213995695114136,
0.4613780677318573,
0.09333500266075134,
-0.44872209429740906,
0.10551252216100693,
0.35485485196113586,
-0.20826302468776703,
-0.3523745536804199,
-0.1865788698196411,
-0.2023444026708603,
-0.022891240194439888,
0.012327609583735466,
-0.28872498869895935,
-0.11826162785291672,
0.2549114227294922,
-0.2350497990846634,
0.012399174273014069,
-0.19235505163669586,
0.48845532536506653,
0.13499975204467773,
-0.2794124484062195,
0.007739666849374771,
0.16713380813598633,
0.12926185131072998,
0.030372904613614082,
0.16587962210178375,
0.20437076687812805,
0.27896353602409363,
-0.069073386490345,
-0.1949634850025177,
0.028730642050504684,
0.07239513844251633,
-0.28400400280952454,
-0.11853815615177155,
-0.17854945361614227,
-0.00753847835585475,
-0.24165162444114685,
0.34615588188171387,
0.22655676305294037,
-0.12925228476524353,
-0.0669044777750969,
0.1022942066192627,
-0.06402644515037537,
0.186601459980011,
-0.001890548155643046,
-0.12314769625663757,
-0.25690197944641113,
-0.14542187750339508,
-0.017088569700717926,
-0.3904106914997101,
-0.3772371709346771,
0.48787882924079895,
0.010029182769358158,
0.16246619820594788,
-0.01405356451869011,
0.1328064650297165,
0.05478804558515549,
0.3443194329738617,
0.1325402557849884,
0.21883009374141693,
0.018226517364382744,
-0.219355970621109,
-0.5118173360824585,
0.05173439159989357,
0.3462425470352173,
-0.07937660068273544,
-0.27169862389564514,
0.06076694652438164,
0.43459081649780273,
0.145656019449234,
0.14982932806015015,
0.14863374829292297,
0.4030667245388031,
0.17473846673965454,
-0.17168909311294556,
-0.1843622773885727,
0.15004496276378632,
-0.052975673228502274,
0.13522374629974365,
-0.4141637980937958,
-0.16242048144340515,
0.1642540842294693,
0.12695519626140594,
-0.24220359325408936,
-0.1504528671503067,
0.26059556007385254,
-0.06900686025619507,
0.4706857204437256,
-0.0985930934548378,
0.342410147190094,
-0.21078456938266754,
0.2454601675271988,
-0.08572519570589066,
-0.1790267825126648,
-0.17851199209690094,
0.4607303738594055,
0.14526116847991943,
0.09203844517469406,
-0.05011121556162834,
-0.08926299959421158,
-0.1534014791250229,
0.21861137449741364,
0.14986693859100342,
0.081387959420681,
-0.22133846580982208,
0.38425785303115845,
-0.18214714527130127,
-0.21307659149169922,
-0.019007936120033264,
0.24546489119529724,
0.033239513635635376,
0.11948918551206589,
-0.18874377012252808,
-0.3287672698497772,
0.4431082010269165,
0.11370880901813507,
-0.22514782845973969,
-0.04528056085109711,
-0.07084640115499496,
0.6525447368621826,
0.034560538828372955,
-0.5654698610305786,
0.0478203184902668,
0.14383544027805328,
-0.3495510220527649,
0.1700378805398941,
0.1190812960267067,
0.16414996981620789,
0.23254302144050598,
-0.30557119846343994,
0.5031844973564148,
0.2675768733024597,
0.017550192773342133,
-0.36084091663360596,
-0.3606509864330292
] |
https://github.com/huggingface/datasets/issues/2165
|
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
Interesting ! Thanks for sharing this @mariosasko . I like the idea
This looks like something we should add IMO
|
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 20 |
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
[
-0.38135045766830444,
0.03989590331912041,
-0.19329914450645447,
0.2075767070055008,
0.22860665619373322,
0.1434226632118225,
0.23101210594177246,
0.1419614851474762,
-0.15852558612823486,
-0.025924254208803177,
-0.29995226860046387,
0.6370788216590881,
-0.31550097465515137,
-0.16834385693073273,
-0.05090397596359253,
-0.18689921498298645,
0.14982102811336517,
-0.03684714809060097,
-0.45705148577690125,
-0.09293872863054276,
-0.10118813812732697,
0.11987213790416718,
0.0993996411561966,
0.20764999091625214,
-0.15383778512477875,
-0.14523416757583618,
0.14525039494037628,
0.17706440389156342,
-0.2736078202724457,
-0.18368789553642273,
0.2902565598487854,
-0.0808589905500412,
0.08718127757310867,
0.388640820980072,
-0.00011034605267923325,
0.09828883409500122,
0.1085897833108902,
-0.05350222438573837,
-0.31159475445747375,
0.07780467718839645,
0.13661475479602814,
-0.010738607496023178,
0.2576044499874115,
-0.13324664533138275,
-0.04271801561117172,
-0.29689714312553406,
0.03904181718826294,
-0.5213894248008728,
0.04419028386473656,
0.3848278224468231,
0.2270476371049881,
0.25647419691085815,
0.12020330131053925,
-0.1612054705619812,
0.33273494243621826,
0.14598213136196136,
-0.008245774544775486,
0.07848277688026428,
0.18425600230693817,
0.30388006567955017,
-0.2997905910015106,
0.41424301266670227,
-0.0751725435256958,
0.09025824069976807,
0.2032509297132492,
-0.21123956143856049,
-0.6463906168937683,
0.06500528752803802,
0.26223888993263245,
0.0695805698633194,
0.48022356629371643,
-0.43060970306396484,
-0.1998085081577301,
0.16041365265846252,
-0.12221022695302963,
0.06508252769708633,
-0.1115967407822609,
0.11058276891708374,
0.08882337808609009,
0.10574260354042053,
-0.049716658890247345,
-0.3124726116657257,
-0.07318223267793655,
-0.08580995351076126,
-0.15096722543239594,
0.3734937012195587,
-0.15965667366981506,
0.1523943841457367,
0.013941564597189426,
-0.36234280467033386,
0.696965217590332,
0.014654526486992836,
-0.09309815615415573,
-0.2351994663476944,
-0.031238730996847153,
0.1036495789885521,
-0.11107921600341797,
0.06164754927158356,
0.3027217388153076,
0.25235405564308167,
0.2385917603969574,
0.23770351707935333,
-0.15985046327114105,
0.08237171173095703,
-0.0673648789525032,
-0.13970403373241425,
0.25213623046875,
0.43406227231025696,
0.030001860111951828,
-0.18375065922737122,
-0.08135774731636047,
0.1155591681599617,
-0.185363307595253,
-0.4941827654838562,
-0.14179062843322754,
0.17466233670711517,
0.3066730499267578,
-0.18303407728672028,
-0.19038614630699158,
-0.22425764799118042,
0.1659044474363327,
0.010263095609843731,
0.05159252509474754,
0.23623590171337128,
0.12254326790571213,
0.03700552135705948,
0.19425036013126373,
0.22309058904647827,
0.04783601686358452,
-0.20011499524116516,
-0.18156112730503082,
-0.005752598866820335,
0.05624408274888992,
-0.22789621353149414,
0.05976565182209015,
-0.08103342354297638,
0.31329774856567383,
-0.10293610394001007,
-0.1920599341392517,
0.3921719193458557,
0.13500994443893433,
0.08376970142126083,
0.3866766691207886,
-0.033189479261636734,
0.008761152625083923,
0.09285490959882736,
0.15316127240657806,
0.37483251094818115,
-0.18439555168151855,
0.23005928099155426,
-0.3605666160583496,
-0.2418285459280014,
-0.30233126878738403,
0.20322921872138977,
0.22354920208454132,
-0.20168933272361755,
-0.09609955549240112,
0.0502953939139843,
0.1158096119761467,
-0.10412756353616714,
0.14726243913173676,
-0.16530942916870117,
0.12420646846294403,
-0.19698596000671387,
0.002310421783477068,
0.12358565628528595,
-0.5695286393165588,
0.040713921189308167,
0.20301330089569092,
-0.36121904850006104,
-0.13329128921031952,
0.16248498857021332,
-0.35669344663619995,
-0.156098410487175,
-0.2983241081237793,
-0.00027227247483097017,
0.5006659626960754,
-0.35737985372543335,
-0.2753264009952545,
0.004903463181108236,
-0.043547261506319046,
-0.3395160138607025,
0.21183839440345764,
0.10210716724395752,
0.005660193972289562,
0.018354035913944244,
0.1854080855846405,
0.08607020229101181,
0.05955208092927933,
-0.16098426282405853,
-0.07614517956972122,
-0.15937213599681854,
0.26196780800819397,
-0.10468357056379318,
-0.029570570215582848,
0.009316902607679367,
0.08982216566801071,
-0.2247377187013626,
0.12114331871271133,
-0.19082365930080414,
0.03430641442537308,
0.28503623604774475,
-0.1728491634130478,
-0.2114083170890808,
0.02415967732667923,
0.013791406527161598,
-0.2626331150531769,
-0.1964300125837326,
0.22130778431892395,
-0.21818070113658905,
-0.2991935610771179,
-0.2596094310283661,
-0.21331758797168732,
0.20301641523838043,
-0.10218551754951477,
-0.16269661486148834,
0.12765266001224518,
0.24882151186466217,
-0.08063571155071259,
-0.2550404667854309,
-0.047138068825006485,
-0.11190079152584076,
-0.32117974758148193,
0.17057831585407257,
-0.390645831823349,
-0.0012144180946052074,
-0.10010849684476852,
-0.05423253774642944,
0.06333281844854355,
-0.08337467908859253,
0.04433777183294296,
-0.0018192505231127143,
-0.08251670747995377,
0.24335815012454987,
-0.11682239919900894,
0.2320248782634735,
0.40377870202064514,
0.11358778178691864,
0.086489237844944,
-0.5137045979499817,
0.3729441463947296,
0.2700335681438446,
0.06459119915962219,
0.1442117542028427,
-0.3261021673679352,
0.33628132939338684,
0.0368778295814991,
0.06686054915189743,
0.04698275029659271,
0.006994715891778469,
0.33930522203445435,
0.23268301784992218,
-0.16115200519561768,
-0.018568579107522964,
-0.17617812752723694,
-0.026053203269839287,
0.5001412630081177,
0.014923958107829094,
-0.4206916093826294,
0.28842291235923767,
0.47961971163749695,
0.08038900792598724,
0.1773197501897812,
-0.059933070093393326,
-0.4276590943336487,
-0.07817884534597397,
0.39896708726882935,
-0.047093022614717484,
0.14419986307621002,
0.2707662880420685,
0.4553217887878418,
-0.09978924691677094,
0.04164974391460419,
-0.12039828300476074,
0.16746780276298523,
-0.04008885473012924,
0.08953981846570969,
0.10388113558292389,
0.16605335474014282,
-0.2490202784538269,
-0.33526062965393066,
0.04564174637198448,
-0.14598317444324493,
0.0374755933880806,
-0.3315855860710144,
0.14793920516967773,
-0.37230613827705383,
-0.04480878263711929,
-0.3312760293483734,
-0.12037938833236694,
-0.04173810034990311,
-0.337336927652359,
0.07677341997623444,
-0.07874391227960587,
-0.13334298133850098,
0.28515246510505676,
-0.052738167345523834,
-0.32533299922943115,
0.23360398411750793,
-0.18679454922676086,
0.047091297805309296,
-0.28809788823127747,
-0.10458100587129593,
0.12593574821949005,
0.1643669158220291,
0.02398679405450821,
0.25468435883522034,
-0.09458636492490768,
0.4533022344112396,
-0.7649535536766052,
-0.07661543041467667,
0.16161318123340607,
0.06045052409172058,
-0.133457750082016,
0.38204342126846313,
0.02489309012889862,
0.15594425797462463,
-0.21401798725128174,
-0.08544298261404037,
-0.13483433425426483,
-0.1401313990354538,
-0.01967477984726429,
-0.305363267660141,
0.01779637485742569,
0.10916534811258316,
-0.44022971391677856,
-0.2610240876674652,
-0.22506852447986603,
-0.13092069327831268,
0.010475308634340763,
0.11308304220438004,
-0.22244182229042053,
0.32840001583099365,
0.13312923908233643,
0.1405652016401291,
0.0019101561047136784,
-0.15815848112106323,
-0.3929418623447418,
0.3876182436943054,
-0.2171190232038498,
-0.21326278150081635,
-0.05608299374580383,
-0.16547201573848724,
0.39125940203666687,
0.4633409082889557,
-0.002867078874260187,
-0.0005811635055579245,
0.04649405553936958,
0.18418706953525543,
0.06649822741746902,
0.20885051786899567,
0.38055339455604553,
0.21719975769519806,
-0.1585596203804016,
-0.20393908023834229,
0.005765993148088455,
-0.04227474704384804,
-0.38526633381843567,
0.246219202876091,
0.10178619623184204,
0.3061688244342804,
-0.023041129112243652,
0.8837363123893738,
-0.20986482501029968,
-0.44949865341186523,
0.18864761292934418,
-0.3326237201690674,
0.36936038732528687,
-0.027934221550822258,
-0.20609880983829498,
-0.01085465494543314,
-0.08683411031961441,
0.15422359108924866,
-0.049423567950725555,
-0.13784365355968475,
0.02444113790988922,
0.18523992598056793,
0.06598495692014694,
-0.3764213025569916,
-0.15698972344398499,
0.21663188934326172,
-0.5246581435203552,
-0.014353640377521515,
0.045840777456760406,
0.23020349442958832,
-0.25915589928627014,
0.1401807814836502,
0.2680855393409729,
0.0681549608707428,
0.03550216183066368,
0.13287390768527985,
-0.2640725374221802,
0.15000483393669128,
-0.30984726548194885,
0.5070409774780273,
-0.04640813544392586,
0.056835804134607315,
0.12553994357585907,
-0.1784297227859497,
-0.11320925503969193,
-0.2050289362668991,
0.4603605568408966,
-0.07167361676692963,
-0.005332073662430048,
0.0588664747774601,
0.19050051271915436,
-0.4233792722225189,
0.10113711655139923,
-0.16653195023536682,
0.31922873854637146,
-0.076961949467659,
0.06671328842639923,
-0.24643996357917786,
-0.1759706437587738,
0.015442506410181522,
0.15870614349842072,
-0.02964068204164505,
0.5472052097320557,
-0.059714097529649734,
-0.22064973413944244,
-0.24967996776103973,
0.002734825946390629,
0.012728589586913586,
-0.10743257403373718,
-0.013173275627195835,
-0.21547994017601013,
-0.5934467911720276,
-0.009749767370522022,
0.11225544661283493,
0.016266584396362305,
0.42651280760765076,
-0.22527992725372314,
-0.1313968300819397,
-0.10336577892303467,
0.5777080655097961,
0.5634111166000366,
0.46305736899375916,
-0.27683383226394653,
-0.18793988227844238,
0.18490715324878693,
0.07382258772850037,
0.2833022177219391,
0.16506493091583252,
-0.2194560021162033,
-0.06689975410699844,
-0.2058783918619156,
-0.19208115339279175,
0.08946346491575241,
0.1717907190322876,
0.03231138363480568,
0.16672147810459137,
-0.2116202414035797,
-0.30396443605422974,
0.3107945919036865,
0.31910714507102966,
0.06361376494169235,
0.34502044320106506,
0.08769359439611435,
-0.2705687880516052,
0.058144208043813705,
0.2637712061405182,
0.8254712224006653,
-0.08193513751029968,
0.2732759118080139,
0.13307800889015198,
-0.3706185519695282,
0.20734253525733948,
-0.20532268285751343,
-0.0397515706717968,
-0.46357184648513794,
0.03612567484378815,
-0.1011117547750473,
-0.11224539577960968,
0.07983240485191345,
0.3213277757167816,
-0.0037271755281835794,
0.22060677409172058,
-0.25426915287971497,
0.2913197875022888,
-0.1395702362060547,
0.1430388242006302,
-0.16782431304454803,
-0.1156955435872078,
-0.036628611385822296,
0.23118750751018524,
-0.17557959258556366,
-0.012439987622201443,
-0.04689105972647667,
-0.14131025969982147,
-0.19740161299705505,
-0.12921170890331268,
0.10496172308921814,
0.08798955380916595,
-0.3173060417175293,
0.4021243453025818,
-0.10770918428897858,
-0.7258673310279846,
-0.21829737722873688,
0.31559255719184875,
0.2704029977321625,
-0.14591258764266968,
-0.0437905453145504,
0.24824829399585724,
0.12437774240970612,
-0.058012671768665314,
-0.17003966867923737,
0.023771125823259354,
0.2326822727918625,
0.030465219169855118,
0.0952550545334816,
0.10284777730703354,
0.06655727326869965,
-0.38799911737442017,
0.035776011645793915,
-0.11514943093061447,
0.2534385323524475,
-0.48269152641296387,
-0.12149431556463242,
0.15822623670101166,
-0.13027121126651764,
-0.1657184511423111,
0.11839427053928375,
-0.08394726365804672,
-0.04346177726984024,
-0.10050509870052338,
0.26069775223731995,
-0.16317754983901978,
0.1497558206319809,
0.3528069257736206,
-0.07500211149454117,
0.1131429523229599,
0.34381434321403503,
-0.037637192755937576,
-0.23170378804206848,
-0.2663249671459198,
0.04912060871720314,
0.760040819644928,
-0.37130066752433777,
0.1506849080324173,
-0.2838551700115204,
-0.2343343049287796,
0.13770395517349243,
-0.05379060283303261,
0.11778993159532547,
0.2653788626194,
-0.24788859486579895,
-0.033653534948825836,
-0.48388051986694336,
0.28080976009368896,
-0.19238892197608948,
0.28903037309646606,
0.001324775512330234,
-0.15400801599025726,
-0.12940998375415802,
-0.16129331290721893,
-0.3264099657535553,
0.22057192027568817,
0.12561972439289093,
0.1682310551404953,
0.06379319727420807,
0.01909862644970417,
-0.10634607821702957,
0.02144099958240986,
0.1597110480070114,
-0.006045505870133638,
-0.15040959417819977,
-0.27731385827064514,
0.030589265748858452,
0.068194180727005,
-0.052166346460580826,
0.13993582129478455,
-0.06376885622739792,
-0.0872921273112297,
-0.14984668791294098,
-0.14803381264209747,
0.16708460450172424,
0.18409402668476105,
0.15187692642211914,
0.17283450067043304,
0.16865308582782745,
0.163788840174675,
-0.019405756145715714,
-0.09527114033699036,
0.2320377230644226,
0.11654829233884811,
-0.2220211923122406,
0.23281633853912354,
-0.0517503060400486,
-0.20433740317821503,
0.2866244912147522,
0.31486061215400696,
0.4239186644554138,
0.16479387879371643,
-0.0921979546546936,
-0.08282860368490219,
-0.07594011723995209,
0.04268355295062065,
0.2614602744579315,
0.3995290696620941,
-0.08033055812120438,
0.04726802930235863,
-0.03076918050646782,
0.17511820793151855,
-0.39232301712036133,
-0.18610535562038422,
-0.03210526704788208,
-0.19083847105503082,
-0.0172258373349905,
-0.14409831166267395,
0.1874065101146698,
0.2988895773887634,
0.24131105840206146,
-0.039361584931612015,
0.1408943384885788,
-0.25226354598999023,
0.06668387353420258,
0.4477623403072357,
-0.05764065682888031,
-0.11260706931352615,
0.4983672797679901,
0.25924667716026306,
0.4102182686328888,
0.469868004322052,
-0.14805440604686737,
0.8135538697242737,
0.505167543888092,
0.030884098261594772,
0.466094434261322,
-0.14355362951755524,
-0.25580310821533203,
-0.2909408509731293,
0.2931876480579376,
0.09047465026378632,
0.3213995695114136,
0.4613780677318573,
0.09333500266075134,
-0.44872209429740906,
0.10551252216100693,
0.35485485196113586,
-0.20826302468776703,
-0.3523745536804199,
-0.1865788698196411,
-0.2023444026708603,
-0.022891240194439888,
0.012327609583735466,
-0.28872498869895935,
-0.11826162785291672,
0.2549114227294922,
-0.2350497990846634,
0.012399174273014069,
-0.19235505163669586,
0.48845532536506653,
0.13499975204467773,
-0.2794124484062195,
0.007739666849374771,
0.16713380813598633,
0.12926185131072998,
0.030372904613614082,
0.16587962210178375,
0.20437076687812805,
0.27896353602409363,
-0.069073386490345,
-0.1949634850025177,
0.028730642050504684,
0.07239513844251633,
-0.28400400280952454,
-0.11853815615177155,
-0.17854945361614227,
-0.00753847835585475,
-0.24165162444114685,
0.34615588188171387,
0.22655676305294037,
-0.12925228476524353,
-0.0669044777750969,
0.1022942066192627,
-0.06402644515037537,
0.186601459980011,
-0.001890548155643046,
-0.12314769625663757,
-0.25690197944641113,
-0.14542187750339508,
-0.017088569700717926,
-0.3904106914997101,
-0.3772371709346771,
0.48787882924079895,
0.010029182769358158,
0.16246619820594788,
-0.01405356451869011,
0.1328064650297165,
0.05478804558515549,
0.3443194329738617,
0.1325402557849884,
0.21883009374141693,
0.018226517364382744,
-0.219355970621109,
-0.5118173360824585,
0.05173439159989357,
0.3462425470352173,
-0.07937660068273544,
-0.27169862389564514,
0.06076694652438164,
0.43459081649780273,
0.145656019449234,
0.14982932806015015,
0.14863374829292297,
0.4030667245388031,
0.17473846673965454,
-0.17168909311294556,
-0.1843622773885727,
0.15004496276378632,
-0.052975673228502274,
0.13522374629974365,
-0.4141637980937958,
-0.16242048144340515,
0.1642540842294693,
0.12695519626140594,
-0.24220359325408936,
-0.1504528671503067,
0.26059556007385254,
-0.06900686025619507,
0.4706857204437256,
-0.0985930934548378,
0.342410147190094,
-0.21078456938266754,
0.2454601675271988,
-0.08572519570589066,
-0.1790267825126648,
-0.17851199209690094,
0.4607303738594055,
0.14526116847991943,
0.09203844517469406,
-0.05011121556162834,
-0.08926299959421158,
-0.1534014791250229,
0.21861137449741364,
0.14986693859100342,
0.081387959420681,
-0.22133846580982208,
0.38425785303115845,
-0.18214714527130127,
-0.21307659149169922,
-0.019007936120033264,
0.24546489119529724,
0.033239513635635376,
0.11948918551206589,
-0.18874377012252808,
-0.3287672698497772,
0.4431082010269165,
0.11370880901813507,
-0.22514782845973969,
-0.04528056085109711,
-0.07084640115499496,
0.6525447368621826,
0.034560538828372955,
-0.5654698610305786,
0.0478203184902668,
0.14383544027805328,
-0.3495510220527649,
0.1700378805398941,
0.1190812960267067,
0.16414996981620789,
0.23254302144050598,
-0.30557119846343994,
0.5031844973564148,
0.2675768733024597,
0.017550192773342133,
-0.36084091663360596,
-0.3606509864330292
] |
https://github.com/huggingface/datasets/issues/2165
|
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
@mariosasko
Thx for your code!
It perfectly works with a small modification for HF NLP dataset:
```
original_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds = HFDataset(train_ds['train']) # needs splitting
```
|
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 28 |
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
[
-0.38135045766830444,
0.03989590331912041,
-0.19329914450645447,
0.2075767070055008,
0.22860665619373322,
0.1434226632118225,
0.23101210594177246,
0.1419614851474762,
-0.15852558612823486,
-0.025924254208803177,
-0.29995226860046387,
0.6370788216590881,
-0.31550097465515137,
-0.16834385693073273,
-0.05090397596359253,
-0.18689921498298645,
0.14982102811336517,
-0.03684714809060097,
-0.45705148577690125,
-0.09293872863054276,
-0.10118813812732697,
0.11987213790416718,
0.0993996411561966,
0.20764999091625214,
-0.15383778512477875,
-0.14523416757583618,
0.14525039494037628,
0.17706440389156342,
-0.2736078202724457,
-0.18368789553642273,
0.2902565598487854,
-0.0808589905500412,
0.08718127757310867,
0.388640820980072,
-0.00011034605267923325,
0.09828883409500122,
0.1085897833108902,
-0.05350222438573837,
-0.31159475445747375,
0.07780467718839645,
0.13661475479602814,
-0.010738607496023178,
0.2576044499874115,
-0.13324664533138275,
-0.04271801561117172,
-0.29689714312553406,
0.03904181718826294,
-0.5213894248008728,
0.04419028386473656,
0.3848278224468231,
0.2270476371049881,
0.25647419691085815,
0.12020330131053925,
-0.1612054705619812,
0.33273494243621826,
0.14598213136196136,
-0.008245774544775486,
0.07848277688026428,
0.18425600230693817,
0.30388006567955017,
-0.2997905910015106,
0.41424301266670227,
-0.0751725435256958,
0.09025824069976807,
0.2032509297132492,
-0.21123956143856049,
-0.6463906168937683,
0.06500528752803802,
0.26223888993263245,
0.0695805698633194,
0.48022356629371643,
-0.43060970306396484,
-0.1998085081577301,
0.16041365265846252,
-0.12221022695302963,
0.06508252769708633,
-0.1115967407822609,
0.11058276891708374,
0.08882337808609009,
0.10574260354042053,
-0.049716658890247345,
-0.3124726116657257,
-0.07318223267793655,
-0.08580995351076126,
-0.15096722543239594,
0.3734937012195587,
-0.15965667366981506,
0.1523943841457367,
0.013941564597189426,
-0.36234280467033386,
0.696965217590332,
0.014654526486992836,
-0.09309815615415573,
-0.2351994663476944,
-0.031238730996847153,
0.1036495789885521,
-0.11107921600341797,
0.06164754927158356,
0.3027217388153076,
0.25235405564308167,
0.2385917603969574,
0.23770351707935333,
-0.15985046327114105,
0.08237171173095703,
-0.0673648789525032,
-0.13970403373241425,
0.25213623046875,
0.43406227231025696,
0.030001860111951828,
-0.18375065922737122,
-0.08135774731636047,
0.1155591681599617,
-0.185363307595253,
-0.4941827654838562,
-0.14179062843322754,
0.17466233670711517,
0.3066730499267578,
-0.18303407728672028,
-0.19038614630699158,
-0.22425764799118042,
0.1659044474363327,
0.010263095609843731,
0.05159252509474754,
0.23623590171337128,
0.12254326790571213,
0.03700552135705948,
0.19425036013126373,
0.22309058904647827,
0.04783601686358452,
-0.20011499524116516,
-0.18156112730503082,
-0.005752598866820335,
0.05624408274888992,
-0.22789621353149414,
0.05976565182209015,
-0.08103342354297638,
0.31329774856567383,
-0.10293610394001007,
-0.1920599341392517,
0.3921719193458557,
0.13500994443893433,
0.08376970142126083,
0.3866766691207886,
-0.033189479261636734,
0.008761152625083923,
0.09285490959882736,
0.15316127240657806,
0.37483251094818115,
-0.18439555168151855,
0.23005928099155426,
-0.3605666160583496,
-0.2418285459280014,
-0.30233126878738403,
0.20322921872138977,
0.22354920208454132,
-0.20168933272361755,
-0.09609955549240112,
0.0502953939139843,
0.1158096119761467,
-0.10412756353616714,
0.14726243913173676,
-0.16530942916870117,
0.12420646846294403,
-0.19698596000671387,
0.002310421783477068,
0.12358565628528595,
-0.5695286393165588,
0.040713921189308167,
0.20301330089569092,
-0.36121904850006104,
-0.13329128921031952,
0.16248498857021332,
-0.35669344663619995,
-0.156098410487175,
-0.2983241081237793,
-0.00027227247483097017,
0.5006659626960754,
-0.35737985372543335,
-0.2753264009952545,
0.004903463181108236,
-0.043547261506319046,
-0.3395160138607025,
0.21183839440345764,
0.10210716724395752,
0.005660193972289562,
0.018354035913944244,
0.1854080855846405,
0.08607020229101181,
0.05955208092927933,
-0.16098426282405853,
-0.07614517956972122,
-0.15937213599681854,
0.26196780800819397,
-0.10468357056379318,
-0.029570570215582848,
0.009316902607679367,
0.08982216566801071,
-0.2247377187013626,
0.12114331871271133,
-0.19082365930080414,
0.03430641442537308,
0.28503623604774475,
-0.1728491634130478,
-0.2114083170890808,
0.02415967732667923,
0.013791406527161598,
-0.2626331150531769,
-0.1964300125837326,
0.22130778431892395,
-0.21818070113658905,
-0.2991935610771179,
-0.2596094310283661,
-0.21331758797168732,
0.20301641523838043,
-0.10218551754951477,
-0.16269661486148834,
0.12765266001224518,
0.24882151186466217,
-0.08063571155071259,
-0.2550404667854309,
-0.047138068825006485,
-0.11190079152584076,
-0.32117974758148193,
0.17057831585407257,
-0.390645831823349,
-0.0012144180946052074,
-0.10010849684476852,
-0.05423253774642944,
0.06333281844854355,
-0.08337467908859253,
0.04433777183294296,
-0.0018192505231127143,
-0.08251670747995377,
0.24335815012454987,
-0.11682239919900894,
0.2320248782634735,
0.40377870202064514,
0.11358778178691864,
0.086489237844944,
-0.5137045979499817,
0.3729441463947296,
0.2700335681438446,
0.06459119915962219,
0.1442117542028427,
-0.3261021673679352,
0.33628132939338684,
0.0368778295814991,
0.06686054915189743,
0.04698275029659271,
0.006994715891778469,
0.33930522203445435,
0.23268301784992218,
-0.16115200519561768,
-0.018568579107522964,
-0.17617812752723694,
-0.026053203269839287,
0.5001412630081177,
0.014923958107829094,
-0.4206916093826294,
0.28842291235923767,
0.47961971163749695,
0.08038900792598724,
0.1773197501897812,
-0.059933070093393326,
-0.4276590943336487,
-0.07817884534597397,
0.39896708726882935,
-0.047093022614717484,
0.14419986307621002,
0.2707662880420685,
0.4553217887878418,
-0.09978924691677094,
0.04164974391460419,
-0.12039828300476074,
0.16746780276298523,
-0.04008885473012924,
0.08953981846570969,
0.10388113558292389,
0.16605335474014282,
-0.2490202784538269,
-0.33526062965393066,
0.04564174637198448,
-0.14598317444324493,
0.0374755933880806,
-0.3315855860710144,
0.14793920516967773,
-0.37230613827705383,
-0.04480878263711929,
-0.3312760293483734,
-0.12037938833236694,
-0.04173810034990311,
-0.337336927652359,
0.07677341997623444,
-0.07874391227960587,
-0.13334298133850098,
0.28515246510505676,
-0.052738167345523834,
-0.32533299922943115,
0.23360398411750793,
-0.18679454922676086,
0.047091297805309296,
-0.28809788823127747,
-0.10458100587129593,
0.12593574821949005,
0.1643669158220291,
0.02398679405450821,
0.25468435883522034,
-0.09458636492490768,
0.4533022344112396,
-0.7649535536766052,
-0.07661543041467667,
0.16161318123340607,
0.06045052409172058,
-0.133457750082016,
0.38204342126846313,
0.02489309012889862,
0.15594425797462463,
-0.21401798725128174,
-0.08544298261404037,
-0.13483433425426483,
-0.1401313990354538,
-0.01967477984726429,
-0.305363267660141,
0.01779637485742569,
0.10916534811258316,
-0.44022971391677856,
-0.2610240876674652,
-0.22506852447986603,
-0.13092069327831268,
0.010475308634340763,
0.11308304220438004,
-0.22244182229042053,
0.32840001583099365,
0.13312923908233643,
0.1405652016401291,
0.0019101561047136784,
-0.15815848112106323,
-0.3929418623447418,
0.3876182436943054,
-0.2171190232038498,
-0.21326278150081635,
-0.05608299374580383,
-0.16547201573848724,
0.39125940203666687,
0.4633409082889557,
-0.002867078874260187,
-0.0005811635055579245,
0.04649405553936958,
0.18418706953525543,
0.06649822741746902,
0.20885051786899567,
0.38055339455604553,
0.21719975769519806,
-0.1585596203804016,
-0.20393908023834229,
0.005765993148088455,
-0.04227474704384804,
-0.38526633381843567,
0.246219202876091,
0.10178619623184204,
0.3061688244342804,
-0.023041129112243652,
0.8837363123893738,
-0.20986482501029968,
-0.44949865341186523,
0.18864761292934418,
-0.3326237201690674,
0.36936038732528687,
-0.027934221550822258,
-0.20609880983829498,
-0.01085465494543314,
-0.08683411031961441,
0.15422359108924866,
-0.049423567950725555,
-0.13784365355968475,
0.02444113790988922,
0.18523992598056793,
0.06598495692014694,
-0.3764213025569916,
-0.15698972344398499,
0.21663188934326172,
-0.5246581435203552,
-0.014353640377521515,
0.045840777456760406,
0.23020349442958832,
-0.25915589928627014,
0.1401807814836502,
0.2680855393409729,
0.0681549608707428,
0.03550216183066368,
0.13287390768527985,
-0.2640725374221802,
0.15000483393669128,
-0.30984726548194885,
0.5070409774780273,
-0.04640813544392586,
0.056835804134607315,
0.12553994357585907,
-0.1784297227859497,
-0.11320925503969193,
-0.2050289362668991,
0.4603605568408966,
-0.07167361676692963,
-0.005332073662430048,
0.0588664747774601,
0.19050051271915436,
-0.4233792722225189,
0.10113711655139923,
-0.16653195023536682,
0.31922873854637146,
-0.076961949467659,
0.06671328842639923,
-0.24643996357917786,
-0.1759706437587738,
0.015442506410181522,
0.15870614349842072,
-0.02964068204164505,
0.5472052097320557,
-0.059714097529649734,
-0.22064973413944244,
-0.24967996776103973,
0.002734825946390629,
0.012728589586913586,
-0.10743257403373718,
-0.013173275627195835,
-0.21547994017601013,
-0.5934467911720276,
-0.009749767370522022,
0.11225544661283493,
0.016266584396362305,
0.42651280760765076,
-0.22527992725372314,
-0.1313968300819397,
-0.10336577892303467,
0.5777080655097961,
0.5634111166000366,
0.46305736899375916,
-0.27683383226394653,
-0.18793988227844238,
0.18490715324878693,
0.07382258772850037,
0.2833022177219391,
0.16506493091583252,
-0.2194560021162033,
-0.06689975410699844,
-0.2058783918619156,
-0.19208115339279175,
0.08946346491575241,
0.1717907190322876,
0.03231138363480568,
0.16672147810459137,
-0.2116202414035797,
-0.30396443605422974,
0.3107945919036865,
0.31910714507102966,
0.06361376494169235,
0.34502044320106506,
0.08769359439611435,
-0.2705687880516052,
0.058144208043813705,
0.2637712061405182,
0.8254712224006653,
-0.08193513751029968,
0.2732759118080139,
0.13307800889015198,
-0.3706185519695282,
0.20734253525733948,
-0.20532268285751343,
-0.0397515706717968,
-0.46357184648513794,
0.03612567484378815,
-0.1011117547750473,
-0.11224539577960968,
0.07983240485191345,
0.3213277757167816,
-0.0037271755281835794,
0.22060677409172058,
-0.25426915287971497,
0.2913197875022888,
-0.1395702362060547,
0.1430388242006302,
-0.16782431304454803,
-0.1156955435872078,
-0.036628611385822296,
0.23118750751018524,
-0.17557959258556366,
-0.012439987622201443,
-0.04689105972647667,
-0.14131025969982147,
-0.19740161299705505,
-0.12921170890331268,
0.10496172308921814,
0.08798955380916595,
-0.3173060417175293,
0.4021243453025818,
-0.10770918428897858,
-0.7258673310279846,
-0.21829737722873688,
0.31559255719184875,
0.2704029977321625,
-0.14591258764266968,
-0.0437905453145504,
0.24824829399585724,
0.12437774240970612,
-0.058012671768665314,
-0.17003966867923737,
0.023771125823259354,
0.2326822727918625,
0.030465219169855118,
0.0952550545334816,
0.10284777730703354,
0.06655727326869965,
-0.38799911737442017,
0.035776011645793915,
-0.11514943093061447,
0.2534385323524475,
-0.48269152641296387,
-0.12149431556463242,
0.15822623670101166,
-0.13027121126651764,
-0.1657184511423111,
0.11839427053928375,
-0.08394726365804672,
-0.04346177726984024,
-0.10050509870052338,
0.26069775223731995,
-0.16317754983901978,
0.1497558206319809,
0.3528069257736206,
-0.07500211149454117,
0.1131429523229599,
0.34381434321403503,
-0.037637192755937576,
-0.23170378804206848,
-0.2663249671459198,
0.04912060871720314,
0.760040819644928,
-0.37130066752433777,
0.1506849080324173,
-0.2838551700115204,
-0.2343343049287796,
0.13770395517349243,
-0.05379060283303261,
0.11778993159532547,
0.2653788626194,
-0.24788859486579895,
-0.033653534948825836,
-0.48388051986694336,
0.28080976009368896,
-0.19238892197608948,
0.28903037309646606,
0.001324775512330234,
-0.15400801599025726,
-0.12940998375415802,
-0.16129331290721893,
-0.3264099657535553,
0.22057192027568817,
0.12561972439289093,
0.1682310551404953,
0.06379319727420807,
0.01909862644970417,
-0.10634607821702957,
0.02144099958240986,
0.1597110480070114,
-0.006045505870133638,
-0.15040959417819977,
-0.27731385827064514,
0.030589265748858452,
0.068194180727005,
-0.052166346460580826,
0.13993582129478455,
-0.06376885622739792,
-0.0872921273112297,
-0.14984668791294098,
-0.14803381264209747,
0.16708460450172424,
0.18409402668476105,
0.15187692642211914,
0.17283450067043304,
0.16865308582782745,
0.163788840174675,
-0.019405756145715714,
-0.09527114033699036,
0.2320377230644226,
0.11654829233884811,
-0.2220211923122406,
0.23281633853912354,
-0.0517503060400486,
-0.20433740317821503,
0.2866244912147522,
0.31486061215400696,
0.4239186644554138,
0.16479387879371643,
-0.0921979546546936,
-0.08282860368490219,
-0.07594011723995209,
0.04268355295062065,
0.2614602744579315,
0.3995290696620941,
-0.08033055812120438,
0.04726802930235863,
-0.03076918050646782,
0.17511820793151855,
-0.39232301712036133,
-0.18610535562038422,
-0.03210526704788208,
-0.19083847105503082,
-0.0172258373349905,
-0.14409831166267395,
0.1874065101146698,
0.2988895773887634,
0.24131105840206146,
-0.039361584931612015,
0.1408943384885788,
-0.25226354598999023,
0.06668387353420258,
0.4477623403072357,
-0.05764065682888031,
-0.11260706931352615,
0.4983672797679901,
0.25924667716026306,
0.4102182686328888,
0.469868004322052,
-0.14805440604686737,
0.8135538697242737,
0.505167543888092,
0.030884098261594772,
0.466094434261322,
-0.14355362951755524,
-0.25580310821533203,
-0.2909408509731293,
0.2931876480579376,
0.09047465026378632,
0.3213995695114136,
0.4613780677318573,
0.09333500266075134,
-0.44872209429740906,
0.10551252216100693,
0.35485485196113586,
-0.20826302468776703,
-0.3523745536804199,
-0.1865788698196411,
-0.2023444026708603,
-0.022891240194439888,
0.012327609583735466,
-0.28872498869895935,
-0.11826162785291672,
0.2549114227294922,
-0.2350497990846634,
0.012399174273014069,
-0.19235505163669586,
0.48845532536506653,
0.13499975204467773,
-0.2794124484062195,
0.007739666849374771,
0.16713380813598633,
0.12926185131072998,
0.030372904613614082,
0.16587962210178375,
0.20437076687812805,
0.27896353602409363,
-0.069073386490345,
-0.1949634850025177,
0.028730642050504684,
0.07239513844251633,
-0.28400400280952454,
-0.11853815615177155,
-0.17854945361614227,
-0.00753847835585475,
-0.24165162444114685,
0.34615588188171387,
0.22655676305294037,
-0.12925228476524353,
-0.0669044777750969,
0.1022942066192627,
-0.06402644515037537,
0.186601459980011,
-0.001890548155643046,
-0.12314769625663757,
-0.25690197944641113,
-0.14542187750339508,
-0.017088569700717926,
-0.3904106914997101,
-0.3772371709346771,
0.48787882924079895,
0.010029182769358158,
0.16246619820594788,
-0.01405356451869011,
0.1328064650297165,
0.05478804558515549,
0.3443194329738617,
0.1325402557849884,
0.21883009374141693,
0.018226517364382744,
-0.219355970621109,
-0.5118173360824585,
0.05173439159989357,
0.3462425470352173,
-0.07937660068273544,
-0.27169862389564514,
0.06076694652438164,
0.43459081649780273,
0.145656019449234,
0.14982932806015015,
0.14863374829292297,
0.4030667245388031,
0.17473846673965454,
-0.17168909311294556,
-0.1843622773885727,
0.15004496276378632,
-0.052975673228502274,
0.13522374629974365,
-0.4141637980937958,
-0.16242048144340515,
0.1642540842294693,
0.12695519626140594,
-0.24220359325408936,
-0.1504528671503067,
0.26059556007385254,
-0.06900686025619507,
0.4706857204437256,
-0.0985930934548378,
0.342410147190094,
-0.21078456938266754,
0.2454601675271988,
-0.08572519570589066,
-0.1790267825126648,
-0.17851199209690094,
0.4607303738594055,
0.14526116847991943,
0.09203844517469406,
-0.05011121556162834,
-0.08926299959421158,
-0.1534014791250229,
0.21861137449741364,
0.14986693859100342,
0.081387959420681,
-0.22133846580982208,
0.38425785303115845,
-0.18214714527130127,
-0.21307659149169922,
-0.019007936120033264,
0.24546489119529724,
0.033239513635635376,
0.11948918551206589,
-0.18874377012252808,
-0.3287672698497772,
0.4431082010269165,
0.11370880901813507,
-0.22514782845973969,
-0.04528056085109711,
-0.07084640115499496,
0.6525447368621826,
0.034560538828372955,
-0.5654698610305786,
0.0478203184902668,
0.14383544027805328,
-0.3495510220527649,
0.1700378805398941,
0.1190812960267067,
0.16414996981620789,
0.23254302144050598,
-0.30557119846343994,
0.5031844973564148,
0.2675768733024597,
0.017550192773342133,
-0.36084091663360596,
-0.3606509864330292
] |
https://github.com/huggingface/datasets/issues/2165
|
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
@lhoestq Sadly, from Python 3.7 onwards `torch.utils.data.Dataset` doesn't support the virtual subclass mechanism due to `typing.Generic` type no longer having `abc.ABCMeta` as its metaclass.
With that in mind, another option is to remove a direct type check (`isinstance(dataset, torch.utils.data.Dataset)`) in `deepspeed.initalize` and to rewrite the checks in a manner similar to `torch.utils.data.DataLoader` ([link](https://github.com/pytorch/pytorch/blob/b80c6f863f2327c712c478f67c248b94d66b65ac/torch/utils/data/dataloader.py#L197-L239)). This is exactly why the `DataLoader` works with arbitrary objects that provide `__getitem__` and `__len__` (and in our case, the `ArrowDataset`). By doing so, their code wouldn't be any stricter in comparison to the `DataLoader`.
So if you agree, I can open an issue in their repo and fix this if they like the idea.
|
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 108 |
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
[
-0.38135045766830444,
0.03989590331912041,
-0.19329914450645447,
0.2075767070055008,
0.22860665619373322,
0.1434226632118225,
0.23101210594177246,
0.1419614851474762,
-0.15852558612823486,
-0.025924254208803177,
-0.29995226860046387,
0.6370788216590881,
-0.31550097465515137,
-0.16834385693073273,
-0.05090397596359253,
-0.18689921498298645,
0.14982102811336517,
-0.03684714809060097,
-0.45705148577690125,
-0.09293872863054276,
-0.10118813812732697,
0.11987213790416718,
0.0993996411561966,
0.20764999091625214,
-0.15383778512477875,
-0.14523416757583618,
0.14525039494037628,
0.17706440389156342,
-0.2736078202724457,
-0.18368789553642273,
0.2902565598487854,
-0.0808589905500412,
0.08718127757310867,
0.388640820980072,
-0.00011034605267923325,
0.09828883409500122,
0.1085897833108902,
-0.05350222438573837,
-0.31159475445747375,
0.07780467718839645,
0.13661475479602814,
-0.010738607496023178,
0.2576044499874115,
-0.13324664533138275,
-0.04271801561117172,
-0.29689714312553406,
0.03904181718826294,
-0.5213894248008728,
0.04419028386473656,
0.3848278224468231,
0.2270476371049881,
0.25647419691085815,
0.12020330131053925,
-0.1612054705619812,
0.33273494243621826,
0.14598213136196136,
-0.008245774544775486,
0.07848277688026428,
0.18425600230693817,
0.30388006567955017,
-0.2997905910015106,
0.41424301266670227,
-0.0751725435256958,
0.09025824069976807,
0.2032509297132492,
-0.21123956143856049,
-0.6463906168937683,
0.06500528752803802,
0.26223888993263245,
0.0695805698633194,
0.48022356629371643,
-0.43060970306396484,
-0.1998085081577301,
0.16041365265846252,
-0.12221022695302963,
0.06508252769708633,
-0.1115967407822609,
0.11058276891708374,
0.08882337808609009,
0.10574260354042053,
-0.049716658890247345,
-0.3124726116657257,
-0.07318223267793655,
-0.08580995351076126,
-0.15096722543239594,
0.3734937012195587,
-0.15965667366981506,
0.1523943841457367,
0.013941564597189426,
-0.36234280467033386,
0.696965217590332,
0.014654526486992836,
-0.09309815615415573,
-0.2351994663476944,
-0.031238730996847153,
0.1036495789885521,
-0.11107921600341797,
0.06164754927158356,
0.3027217388153076,
0.25235405564308167,
0.2385917603969574,
0.23770351707935333,
-0.15985046327114105,
0.08237171173095703,
-0.0673648789525032,
-0.13970403373241425,
0.25213623046875,
0.43406227231025696,
0.030001860111951828,
-0.18375065922737122,
-0.08135774731636047,
0.1155591681599617,
-0.185363307595253,
-0.4941827654838562,
-0.14179062843322754,
0.17466233670711517,
0.3066730499267578,
-0.18303407728672028,
-0.19038614630699158,
-0.22425764799118042,
0.1659044474363327,
0.010263095609843731,
0.05159252509474754,
0.23623590171337128,
0.12254326790571213,
0.03700552135705948,
0.19425036013126373,
0.22309058904647827,
0.04783601686358452,
-0.20011499524116516,
-0.18156112730503082,
-0.005752598866820335,
0.05624408274888992,
-0.22789621353149414,
0.05976565182209015,
-0.08103342354297638,
0.31329774856567383,
-0.10293610394001007,
-0.1920599341392517,
0.3921719193458557,
0.13500994443893433,
0.08376970142126083,
0.3866766691207886,
-0.033189479261636734,
0.008761152625083923,
0.09285490959882736,
0.15316127240657806,
0.37483251094818115,
-0.18439555168151855,
0.23005928099155426,
-0.3605666160583496,
-0.2418285459280014,
-0.30233126878738403,
0.20322921872138977,
0.22354920208454132,
-0.20168933272361755,
-0.09609955549240112,
0.0502953939139843,
0.1158096119761467,
-0.10412756353616714,
0.14726243913173676,
-0.16530942916870117,
0.12420646846294403,
-0.19698596000671387,
0.002310421783477068,
0.12358565628528595,
-0.5695286393165588,
0.040713921189308167,
0.20301330089569092,
-0.36121904850006104,
-0.13329128921031952,
0.16248498857021332,
-0.35669344663619995,
-0.156098410487175,
-0.2983241081237793,
-0.00027227247483097017,
0.5006659626960754,
-0.35737985372543335,
-0.2753264009952545,
0.004903463181108236,
-0.043547261506319046,
-0.3395160138607025,
0.21183839440345764,
0.10210716724395752,
0.005660193972289562,
0.018354035913944244,
0.1854080855846405,
0.08607020229101181,
0.05955208092927933,
-0.16098426282405853,
-0.07614517956972122,
-0.15937213599681854,
0.26196780800819397,
-0.10468357056379318,
-0.029570570215582848,
0.009316902607679367,
0.08982216566801071,
-0.2247377187013626,
0.12114331871271133,
-0.19082365930080414,
0.03430641442537308,
0.28503623604774475,
-0.1728491634130478,
-0.2114083170890808,
0.02415967732667923,
0.013791406527161598,
-0.2626331150531769,
-0.1964300125837326,
0.22130778431892395,
-0.21818070113658905,
-0.2991935610771179,
-0.2596094310283661,
-0.21331758797168732,
0.20301641523838043,
-0.10218551754951477,
-0.16269661486148834,
0.12765266001224518,
0.24882151186466217,
-0.08063571155071259,
-0.2550404667854309,
-0.047138068825006485,
-0.11190079152584076,
-0.32117974758148193,
0.17057831585407257,
-0.390645831823349,
-0.0012144180946052074,
-0.10010849684476852,
-0.05423253774642944,
0.06333281844854355,
-0.08337467908859253,
0.04433777183294296,
-0.0018192505231127143,
-0.08251670747995377,
0.24335815012454987,
-0.11682239919900894,
0.2320248782634735,
0.40377870202064514,
0.11358778178691864,
0.086489237844944,
-0.5137045979499817,
0.3729441463947296,
0.2700335681438446,
0.06459119915962219,
0.1442117542028427,
-0.3261021673679352,
0.33628132939338684,
0.0368778295814991,
0.06686054915189743,
0.04698275029659271,
0.006994715891778469,
0.33930522203445435,
0.23268301784992218,
-0.16115200519561768,
-0.018568579107522964,
-0.17617812752723694,
-0.026053203269839287,
0.5001412630081177,
0.014923958107829094,
-0.4206916093826294,
0.28842291235923767,
0.47961971163749695,
0.08038900792598724,
0.1773197501897812,
-0.059933070093393326,
-0.4276590943336487,
-0.07817884534597397,
0.39896708726882935,
-0.047093022614717484,
0.14419986307621002,
0.2707662880420685,
0.4553217887878418,
-0.09978924691677094,
0.04164974391460419,
-0.12039828300476074,
0.16746780276298523,
-0.04008885473012924,
0.08953981846570969,
0.10388113558292389,
0.16605335474014282,
-0.2490202784538269,
-0.33526062965393066,
0.04564174637198448,
-0.14598317444324493,
0.0374755933880806,
-0.3315855860710144,
0.14793920516967773,
-0.37230613827705383,
-0.04480878263711929,
-0.3312760293483734,
-0.12037938833236694,
-0.04173810034990311,
-0.337336927652359,
0.07677341997623444,
-0.07874391227960587,
-0.13334298133850098,
0.28515246510505676,
-0.052738167345523834,
-0.32533299922943115,
0.23360398411750793,
-0.18679454922676086,
0.047091297805309296,
-0.28809788823127747,
-0.10458100587129593,
0.12593574821949005,
0.1643669158220291,
0.02398679405450821,
0.25468435883522034,
-0.09458636492490768,
0.4533022344112396,
-0.7649535536766052,
-0.07661543041467667,
0.16161318123340607,
0.06045052409172058,
-0.133457750082016,
0.38204342126846313,
0.02489309012889862,
0.15594425797462463,
-0.21401798725128174,
-0.08544298261404037,
-0.13483433425426483,
-0.1401313990354538,
-0.01967477984726429,
-0.305363267660141,
0.01779637485742569,
0.10916534811258316,
-0.44022971391677856,
-0.2610240876674652,
-0.22506852447986603,
-0.13092069327831268,
0.010475308634340763,
0.11308304220438004,
-0.22244182229042053,
0.32840001583099365,
0.13312923908233643,
0.1405652016401291,
0.0019101561047136784,
-0.15815848112106323,
-0.3929418623447418,
0.3876182436943054,
-0.2171190232038498,
-0.21326278150081635,
-0.05608299374580383,
-0.16547201573848724,
0.39125940203666687,
0.4633409082889557,
-0.002867078874260187,
-0.0005811635055579245,
0.04649405553936958,
0.18418706953525543,
0.06649822741746902,
0.20885051786899567,
0.38055339455604553,
0.21719975769519806,
-0.1585596203804016,
-0.20393908023834229,
0.005765993148088455,
-0.04227474704384804,
-0.38526633381843567,
0.246219202876091,
0.10178619623184204,
0.3061688244342804,
-0.023041129112243652,
0.8837363123893738,
-0.20986482501029968,
-0.44949865341186523,
0.18864761292934418,
-0.3326237201690674,
0.36936038732528687,
-0.027934221550822258,
-0.20609880983829498,
-0.01085465494543314,
-0.08683411031961441,
0.15422359108924866,
-0.049423567950725555,
-0.13784365355968475,
0.02444113790988922,
0.18523992598056793,
0.06598495692014694,
-0.3764213025569916,
-0.15698972344398499,
0.21663188934326172,
-0.5246581435203552,
-0.014353640377521515,
0.045840777456760406,
0.23020349442958832,
-0.25915589928627014,
0.1401807814836502,
0.2680855393409729,
0.0681549608707428,
0.03550216183066368,
0.13287390768527985,
-0.2640725374221802,
0.15000483393669128,
-0.30984726548194885,
0.5070409774780273,
-0.04640813544392586,
0.056835804134607315,
0.12553994357585907,
-0.1784297227859497,
-0.11320925503969193,
-0.2050289362668991,
0.4603605568408966,
-0.07167361676692963,
-0.005332073662430048,
0.0588664747774601,
0.19050051271915436,
-0.4233792722225189,
0.10113711655139923,
-0.16653195023536682,
0.31922873854637146,
-0.076961949467659,
0.06671328842639923,
-0.24643996357917786,
-0.1759706437587738,
0.015442506410181522,
0.15870614349842072,
-0.02964068204164505,
0.5472052097320557,
-0.059714097529649734,
-0.22064973413944244,
-0.24967996776103973,
0.002734825946390629,
0.012728589586913586,
-0.10743257403373718,
-0.013173275627195835,
-0.21547994017601013,
-0.5934467911720276,
-0.009749767370522022,
0.11225544661283493,
0.016266584396362305,
0.42651280760765076,
-0.22527992725372314,
-0.1313968300819397,
-0.10336577892303467,
0.5777080655097961,
0.5634111166000366,
0.46305736899375916,
-0.27683383226394653,
-0.18793988227844238,
0.18490715324878693,
0.07382258772850037,
0.2833022177219391,
0.16506493091583252,
-0.2194560021162033,
-0.06689975410699844,
-0.2058783918619156,
-0.19208115339279175,
0.08946346491575241,
0.1717907190322876,
0.03231138363480568,
0.16672147810459137,
-0.2116202414035797,
-0.30396443605422974,
0.3107945919036865,
0.31910714507102966,
0.06361376494169235,
0.34502044320106506,
0.08769359439611435,
-0.2705687880516052,
0.058144208043813705,
0.2637712061405182,
0.8254712224006653,
-0.08193513751029968,
0.2732759118080139,
0.13307800889015198,
-0.3706185519695282,
0.20734253525733948,
-0.20532268285751343,
-0.0397515706717968,
-0.46357184648513794,
0.03612567484378815,
-0.1011117547750473,
-0.11224539577960968,
0.07983240485191345,
0.3213277757167816,
-0.0037271755281835794,
0.22060677409172058,
-0.25426915287971497,
0.2913197875022888,
-0.1395702362060547,
0.1430388242006302,
-0.16782431304454803,
-0.1156955435872078,
-0.036628611385822296,
0.23118750751018524,
-0.17557959258556366,
-0.012439987622201443,
-0.04689105972647667,
-0.14131025969982147,
-0.19740161299705505,
-0.12921170890331268,
0.10496172308921814,
0.08798955380916595,
-0.3173060417175293,
0.4021243453025818,
-0.10770918428897858,
-0.7258673310279846,
-0.21829737722873688,
0.31559255719184875,
0.2704029977321625,
-0.14591258764266968,
-0.0437905453145504,
0.24824829399585724,
0.12437774240970612,
-0.058012671768665314,
-0.17003966867923737,
0.023771125823259354,
0.2326822727918625,
0.030465219169855118,
0.0952550545334816,
0.10284777730703354,
0.06655727326869965,
-0.38799911737442017,
0.035776011645793915,
-0.11514943093061447,
0.2534385323524475,
-0.48269152641296387,
-0.12149431556463242,
0.15822623670101166,
-0.13027121126651764,
-0.1657184511423111,
0.11839427053928375,
-0.08394726365804672,
-0.04346177726984024,
-0.10050509870052338,
0.26069775223731995,
-0.16317754983901978,
0.1497558206319809,
0.3528069257736206,
-0.07500211149454117,
0.1131429523229599,
0.34381434321403503,
-0.037637192755937576,
-0.23170378804206848,
-0.2663249671459198,
0.04912060871720314,
0.760040819644928,
-0.37130066752433777,
0.1506849080324173,
-0.2838551700115204,
-0.2343343049287796,
0.13770395517349243,
-0.05379060283303261,
0.11778993159532547,
0.2653788626194,
-0.24788859486579895,
-0.033653534948825836,
-0.48388051986694336,
0.28080976009368896,
-0.19238892197608948,
0.28903037309646606,
0.001324775512330234,
-0.15400801599025726,
-0.12940998375415802,
-0.16129331290721893,
-0.3264099657535553,
0.22057192027568817,
0.12561972439289093,
0.1682310551404953,
0.06379319727420807,
0.01909862644970417,
-0.10634607821702957,
0.02144099958240986,
0.1597110480070114,
-0.006045505870133638,
-0.15040959417819977,
-0.27731385827064514,
0.030589265748858452,
0.068194180727005,
-0.052166346460580826,
0.13993582129478455,
-0.06376885622739792,
-0.0872921273112297,
-0.14984668791294098,
-0.14803381264209747,
0.16708460450172424,
0.18409402668476105,
0.15187692642211914,
0.17283450067043304,
0.16865308582782745,
0.163788840174675,
-0.019405756145715714,
-0.09527114033699036,
0.2320377230644226,
0.11654829233884811,
-0.2220211923122406,
0.23281633853912354,
-0.0517503060400486,
-0.20433740317821503,
0.2866244912147522,
0.31486061215400696,
0.4239186644554138,
0.16479387879371643,
-0.0921979546546936,
-0.08282860368490219,
-0.07594011723995209,
0.04268355295062065,
0.2614602744579315,
0.3995290696620941,
-0.08033055812120438,
0.04726802930235863,
-0.03076918050646782,
0.17511820793151855,
-0.39232301712036133,
-0.18610535562038422,
-0.03210526704788208,
-0.19083847105503082,
-0.0172258373349905,
-0.14409831166267395,
0.1874065101146698,
0.2988895773887634,
0.24131105840206146,
-0.039361584931612015,
0.1408943384885788,
-0.25226354598999023,
0.06668387353420258,
0.4477623403072357,
-0.05764065682888031,
-0.11260706931352615,
0.4983672797679901,
0.25924667716026306,
0.4102182686328888,
0.469868004322052,
-0.14805440604686737,
0.8135538697242737,
0.505167543888092,
0.030884098261594772,
0.466094434261322,
-0.14355362951755524,
-0.25580310821533203,
-0.2909408509731293,
0.2931876480579376,
0.09047465026378632,
0.3213995695114136,
0.4613780677318573,
0.09333500266075134,
-0.44872209429740906,
0.10551252216100693,
0.35485485196113586,
-0.20826302468776703,
-0.3523745536804199,
-0.1865788698196411,
-0.2023444026708603,
-0.022891240194439888,
0.012327609583735466,
-0.28872498869895935,
-0.11826162785291672,
0.2549114227294922,
-0.2350497990846634,
0.012399174273014069,
-0.19235505163669586,
0.48845532536506653,
0.13499975204467773,
-0.2794124484062195,
0.007739666849374771,
0.16713380813598633,
0.12926185131072998,
0.030372904613614082,
0.16587962210178375,
0.20437076687812805,
0.27896353602409363,
-0.069073386490345,
-0.1949634850025177,
0.028730642050504684,
0.07239513844251633,
-0.28400400280952454,
-0.11853815615177155,
-0.17854945361614227,
-0.00753847835585475,
-0.24165162444114685,
0.34615588188171387,
0.22655676305294037,
-0.12925228476524353,
-0.0669044777750969,
0.1022942066192627,
-0.06402644515037537,
0.186601459980011,
-0.001890548155643046,
-0.12314769625663757,
-0.25690197944641113,
-0.14542187750339508,
-0.017088569700717926,
-0.3904106914997101,
-0.3772371709346771,
0.48787882924079895,
0.010029182769358158,
0.16246619820594788,
-0.01405356451869011,
0.1328064650297165,
0.05478804558515549,
0.3443194329738617,
0.1325402557849884,
0.21883009374141693,
0.018226517364382744,
-0.219355970621109,
-0.5118173360824585,
0.05173439159989357,
0.3462425470352173,
-0.07937660068273544,
-0.27169862389564514,
0.06076694652438164,
0.43459081649780273,
0.145656019449234,
0.14982932806015015,
0.14863374829292297,
0.4030667245388031,
0.17473846673965454,
-0.17168909311294556,
-0.1843622773885727,
0.15004496276378632,
-0.052975673228502274,
0.13522374629974365,
-0.4141637980937958,
-0.16242048144340515,
0.1642540842294693,
0.12695519626140594,
-0.24220359325408936,
-0.1504528671503067,
0.26059556007385254,
-0.06900686025619507,
0.4706857204437256,
-0.0985930934548378,
0.342410147190094,
-0.21078456938266754,
0.2454601675271988,
-0.08572519570589066,
-0.1790267825126648,
-0.17851199209690094,
0.4607303738594055,
0.14526116847991943,
0.09203844517469406,
-0.05011121556162834,
-0.08926299959421158,
-0.1534014791250229,
0.21861137449741364,
0.14986693859100342,
0.081387959420681,
-0.22133846580982208,
0.38425785303115845,
-0.18214714527130127,
-0.21307659149169922,
-0.019007936120033264,
0.24546489119529724,
0.033239513635635376,
0.11948918551206589,
-0.18874377012252808,
-0.3287672698497772,
0.4431082010269165,
0.11370880901813507,
-0.22514782845973969,
-0.04528056085109711,
-0.07084640115499496,
0.6525447368621826,
0.034560538828372955,
-0.5654698610305786,
0.0478203184902668,
0.14383544027805328,
-0.3495510220527649,
0.1700378805398941,
0.1190812960267067,
0.16414996981620789,
0.23254302144050598,
-0.30557119846343994,
0.5031844973564148,
0.2675768733024597,
0.017550192773342133,
-0.36084091663360596,
-0.3606509864330292
] |
https://github.com/huggingface/datasets/issues/2165
|
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
That makes sense ! Feel free to open an issue on their repo and discuss this idea
|
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 17 |
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
[
-0.38135045766830444,
0.03989590331912041,
-0.19329914450645447,
0.2075767070055008,
0.22860665619373322,
0.1434226632118225,
0.23101210594177246,
0.1419614851474762,
-0.15852558612823486,
-0.025924254208803177,
-0.29995226860046387,
0.6370788216590881,
-0.31550097465515137,
-0.16834385693073273,
-0.05090397596359253,
-0.18689921498298645,
0.14982102811336517,
-0.03684714809060097,
-0.45705148577690125,
-0.09293872863054276,
-0.10118813812732697,
0.11987213790416718,
0.0993996411561966,
0.20764999091625214,
-0.15383778512477875,
-0.14523416757583618,
0.14525039494037628,
0.17706440389156342,
-0.2736078202724457,
-0.18368789553642273,
0.2902565598487854,
-0.0808589905500412,
0.08718127757310867,
0.388640820980072,
-0.00011034605267923325,
0.09828883409500122,
0.1085897833108902,
-0.05350222438573837,
-0.31159475445747375,
0.07780467718839645,
0.13661475479602814,
-0.010738607496023178,
0.2576044499874115,
-0.13324664533138275,
-0.04271801561117172,
-0.29689714312553406,
0.03904181718826294,
-0.5213894248008728,
0.04419028386473656,
0.3848278224468231,
0.2270476371049881,
0.25647419691085815,
0.12020330131053925,
-0.1612054705619812,
0.33273494243621826,
0.14598213136196136,
-0.008245774544775486,
0.07848277688026428,
0.18425600230693817,
0.30388006567955017,
-0.2997905910015106,
0.41424301266670227,
-0.0751725435256958,
0.09025824069976807,
0.2032509297132492,
-0.21123956143856049,
-0.6463906168937683,
0.06500528752803802,
0.26223888993263245,
0.0695805698633194,
0.48022356629371643,
-0.43060970306396484,
-0.1998085081577301,
0.16041365265846252,
-0.12221022695302963,
0.06508252769708633,
-0.1115967407822609,
0.11058276891708374,
0.08882337808609009,
0.10574260354042053,
-0.049716658890247345,
-0.3124726116657257,
-0.07318223267793655,
-0.08580995351076126,
-0.15096722543239594,
0.3734937012195587,
-0.15965667366981506,
0.1523943841457367,
0.013941564597189426,
-0.36234280467033386,
0.696965217590332,
0.014654526486992836,
-0.09309815615415573,
-0.2351994663476944,
-0.031238730996847153,
0.1036495789885521,
-0.11107921600341797,
0.06164754927158356,
0.3027217388153076,
0.25235405564308167,
0.2385917603969574,
0.23770351707935333,
-0.15985046327114105,
0.08237171173095703,
-0.0673648789525032,
-0.13970403373241425,
0.25213623046875,
0.43406227231025696,
0.030001860111951828,
-0.18375065922737122,
-0.08135774731636047,
0.1155591681599617,
-0.185363307595253,
-0.4941827654838562,
-0.14179062843322754,
0.17466233670711517,
0.3066730499267578,
-0.18303407728672028,
-0.19038614630699158,
-0.22425764799118042,
0.1659044474363327,
0.010263095609843731,
0.05159252509474754,
0.23623590171337128,
0.12254326790571213,
0.03700552135705948,
0.19425036013126373,
0.22309058904647827,
0.04783601686358452,
-0.20011499524116516,
-0.18156112730503082,
-0.005752598866820335,
0.05624408274888992,
-0.22789621353149414,
0.05976565182209015,
-0.08103342354297638,
0.31329774856567383,
-0.10293610394001007,
-0.1920599341392517,
0.3921719193458557,
0.13500994443893433,
0.08376970142126083,
0.3866766691207886,
-0.033189479261636734,
0.008761152625083923,
0.09285490959882736,
0.15316127240657806,
0.37483251094818115,
-0.18439555168151855,
0.23005928099155426,
-0.3605666160583496,
-0.2418285459280014,
-0.30233126878738403,
0.20322921872138977,
0.22354920208454132,
-0.20168933272361755,
-0.09609955549240112,
0.0502953939139843,
0.1158096119761467,
-0.10412756353616714,
0.14726243913173676,
-0.16530942916870117,
0.12420646846294403,
-0.19698596000671387,
0.002310421783477068,
0.12358565628528595,
-0.5695286393165588,
0.040713921189308167,
0.20301330089569092,
-0.36121904850006104,
-0.13329128921031952,
0.16248498857021332,
-0.35669344663619995,
-0.156098410487175,
-0.2983241081237793,
-0.00027227247483097017,
0.5006659626960754,
-0.35737985372543335,
-0.2753264009952545,
0.004903463181108236,
-0.043547261506319046,
-0.3395160138607025,
0.21183839440345764,
0.10210716724395752,
0.005660193972289562,
0.018354035913944244,
0.1854080855846405,
0.08607020229101181,
0.05955208092927933,
-0.16098426282405853,
-0.07614517956972122,
-0.15937213599681854,
0.26196780800819397,
-0.10468357056379318,
-0.029570570215582848,
0.009316902607679367,
0.08982216566801071,
-0.2247377187013626,
0.12114331871271133,
-0.19082365930080414,
0.03430641442537308,
0.28503623604774475,
-0.1728491634130478,
-0.2114083170890808,
0.02415967732667923,
0.013791406527161598,
-0.2626331150531769,
-0.1964300125837326,
0.22130778431892395,
-0.21818070113658905,
-0.2991935610771179,
-0.2596094310283661,
-0.21331758797168732,
0.20301641523838043,
-0.10218551754951477,
-0.16269661486148834,
0.12765266001224518,
0.24882151186466217,
-0.08063571155071259,
-0.2550404667854309,
-0.047138068825006485,
-0.11190079152584076,
-0.32117974758148193,
0.17057831585407257,
-0.390645831823349,
-0.0012144180946052074,
-0.10010849684476852,
-0.05423253774642944,
0.06333281844854355,
-0.08337467908859253,
0.04433777183294296,
-0.0018192505231127143,
-0.08251670747995377,
0.24335815012454987,
-0.11682239919900894,
0.2320248782634735,
0.40377870202064514,
0.11358778178691864,
0.086489237844944,
-0.5137045979499817,
0.3729441463947296,
0.2700335681438446,
0.06459119915962219,
0.1442117542028427,
-0.3261021673679352,
0.33628132939338684,
0.0368778295814991,
0.06686054915189743,
0.04698275029659271,
0.006994715891778469,
0.33930522203445435,
0.23268301784992218,
-0.16115200519561768,
-0.018568579107522964,
-0.17617812752723694,
-0.026053203269839287,
0.5001412630081177,
0.014923958107829094,
-0.4206916093826294,
0.28842291235923767,
0.47961971163749695,
0.08038900792598724,
0.1773197501897812,
-0.059933070093393326,
-0.4276590943336487,
-0.07817884534597397,
0.39896708726882935,
-0.047093022614717484,
0.14419986307621002,
0.2707662880420685,
0.4553217887878418,
-0.09978924691677094,
0.04164974391460419,
-0.12039828300476074,
0.16746780276298523,
-0.04008885473012924,
0.08953981846570969,
0.10388113558292389,
0.16605335474014282,
-0.2490202784538269,
-0.33526062965393066,
0.04564174637198448,
-0.14598317444324493,
0.0374755933880806,
-0.3315855860710144,
0.14793920516967773,
-0.37230613827705383,
-0.04480878263711929,
-0.3312760293483734,
-0.12037938833236694,
-0.04173810034990311,
-0.337336927652359,
0.07677341997623444,
-0.07874391227960587,
-0.13334298133850098,
0.28515246510505676,
-0.052738167345523834,
-0.32533299922943115,
0.23360398411750793,
-0.18679454922676086,
0.047091297805309296,
-0.28809788823127747,
-0.10458100587129593,
0.12593574821949005,
0.1643669158220291,
0.02398679405450821,
0.25468435883522034,
-0.09458636492490768,
0.4533022344112396,
-0.7649535536766052,
-0.07661543041467667,
0.16161318123340607,
0.06045052409172058,
-0.133457750082016,
0.38204342126846313,
0.02489309012889862,
0.15594425797462463,
-0.21401798725128174,
-0.08544298261404037,
-0.13483433425426483,
-0.1401313990354538,
-0.01967477984726429,
-0.305363267660141,
0.01779637485742569,
0.10916534811258316,
-0.44022971391677856,
-0.2610240876674652,
-0.22506852447986603,
-0.13092069327831268,
0.010475308634340763,
0.11308304220438004,
-0.22244182229042053,
0.32840001583099365,
0.13312923908233643,
0.1405652016401291,
0.0019101561047136784,
-0.15815848112106323,
-0.3929418623447418,
0.3876182436943054,
-0.2171190232038498,
-0.21326278150081635,
-0.05608299374580383,
-0.16547201573848724,
0.39125940203666687,
0.4633409082889557,
-0.002867078874260187,
-0.0005811635055579245,
0.04649405553936958,
0.18418706953525543,
0.06649822741746902,
0.20885051786899567,
0.38055339455604553,
0.21719975769519806,
-0.1585596203804016,
-0.20393908023834229,
0.005765993148088455,
-0.04227474704384804,
-0.38526633381843567,
0.246219202876091,
0.10178619623184204,
0.3061688244342804,
-0.023041129112243652,
0.8837363123893738,
-0.20986482501029968,
-0.44949865341186523,
0.18864761292934418,
-0.3326237201690674,
0.36936038732528687,
-0.027934221550822258,
-0.20609880983829498,
-0.01085465494543314,
-0.08683411031961441,
0.15422359108924866,
-0.049423567950725555,
-0.13784365355968475,
0.02444113790988922,
0.18523992598056793,
0.06598495692014694,
-0.3764213025569916,
-0.15698972344398499,
0.21663188934326172,
-0.5246581435203552,
-0.014353640377521515,
0.045840777456760406,
0.23020349442958832,
-0.25915589928627014,
0.1401807814836502,
0.2680855393409729,
0.0681549608707428,
0.03550216183066368,
0.13287390768527985,
-0.2640725374221802,
0.15000483393669128,
-0.30984726548194885,
0.5070409774780273,
-0.04640813544392586,
0.056835804134607315,
0.12553994357585907,
-0.1784297227859497,
-0.11320925503969193,
-0.2050289362668991,
0.4603605568408966,
-0.07167361676692963,
-0.005332073662430048,
0.0588664747774601,
0.19050051271915436,
-0.4233792722225189,
0.10113711655139923,
-0.16653195023536682,
0.31922873854637146,
-0.076961949467659,
0.06671328842639923,
-0.24643996357917786,
-0.1759706437587738,
0.015442506410181522,
0.15870614349842072,
-0.02964068204164505,
0.5472052097320557,
-0.059714097529649734,
-0.22064973413944244,
-0.24967996776103973,
0.002734825946390629,
0.012728589586913586,
-0.10743257403373718,
-0.013173275627195835,
-0.21547994017601013,
-0.5934467911720276,
-0.009749767370522022,
0.11225544661283493,
0.016266584396362305,
0.42651280760765076,
-0.22527992725372314,
-0.1313968300819397,
-0.10336577892303467,
0.5777080655097961,
0.5634111166000366,
0.46305736899375916,
-0.27683383226394653,
-0.18793988227844238,
0.18490715324878693,
0.07382258772850037,
0.2833022177219391,
0.16506493091583252,
-0.2194560021162033,
-0.06689975410699844,
-0.2058783918619156,
-0.19208115339279175,
0.08946346491575241,
0.1717907190322876,
0.03231138363480568,
0.16672147810459137,
-0.2116202414035797,
-0.30396443605422974,
0.3107945919036865,
0.31910714507102966,
0.06361376494169235,
0.34502044320106506,
0.08769359439611435,
-0.2705687880516052,
0.058144208043813705,
0.2637712061405182,
0.8254712224006653,
-0.08193513751029968,
0.2732759118080139,
0.13307800889015198,
-0.3706185519695282,
0.20734253525733948,
-0.20532268285751343,
-0.0397515706717968,
-0.46357184648513794,
0.03612567484378815,
-0.1011117547750473,
-0.11224539577960968,
0.07983240485191345,
0.3213277757167816,
-0.0037271755281835794,
0.22060677409172058,
-0.25426915287971497,
0.2913197875022888,
-0.1395702362060547,
0.1430388242006302,
-0.16782431304454803,
-0.1156955435872078,
-0.036628611385822296,
0.23118750751018524,
-0.17557959258556366,
-0.012439987622201443,
-0.04689105972647667,
-0.14131025969982147,
-0.19740161299705505,
-0.12921170890331268,
0.10496172308921814,
0.08798955380916595,
-0.3173060417175293,
0.4021243453025818,
-0.10770918428897858,
-0.7258673310279846,
-0.21829737722873688,
0.31559255719184875,
0.2704029977321625,
-0.14591258764266968,
-0.0437905453145504,
0.24824829399585724,
0.12437774240970612,
-0.058012671768665314,
-0.17003966867923737,
0.023771125823259354,
0.2326822727918625,
0.030465219169855118,
0.0952550545334816,
0.10284777730703354,
0.06655727326869965,
-0.38799911737442017,
0.035776011645793915,
-0.11514943093061447,
0.2534385323524475,
-0.48269152641296387,
-0.12149431556463242,
0.15822623670101166,
-0.13027121126651764,
-0.1657184511423111,
0.11839427053928375,
-0.08394726365804672,
-0.04346177726984024,
-0.10050509870052338,
0.26069775223731995,
-0.16317754983901978,
0.1497558206319809,
0.3528069257736206,
-0.07500211149454117,
0.1131429523229599,
0.34381434321403503,
-0.037637192755937576,
-0.23170378804206848,
-0.2663249671459198,
0.04912060871720314,
0.760040819644928,
-0.37130066752433777,
0.1506849080324173,
-0.2838551700115204,
-0.2343343049287796,
0.13770395517349243,
-0.05379060283303261,
0.11778993159532547,
0.2653788626194,
-0.24788859486579895,
-0.033653534948825836,
-0.48388051986694336,
0.28080976009368896,
-0.19238892197608948,
0.28903037309646606,
0.001324775512330234,
-0.15400801599025726,
-0.12940998375415802,
-0.16129331290721893,
-0.3264099657535553,
0.22057192027568817,
0.12561972439289093,
0.1682310551404953,
0.06379319727420807,
0.01909862644970417,
-0.10634607821702957,
0.02144099958240986,
0.1597110480070114,
-0.006045505870133638,
-0.15040959417819977,
-0.27731385827064514,
0.030589265748858452,
0.068194180727005,
-0.052166346460580826,
0.13993582129478455,
-0.06376885622739792,
-0.0872921273112297,
-0.14984668791294098,
-0.14803381264209747,
0.16708460450172424,
0.18409402668476105,
0.15187692642211914,
0.17283450067043304,
0.16865308582782745,
0.163788840174675,
-0.019405756145715714,
-0.09527114033699036,
0.2320377230644226,
0.11654829233884811,
-0.2220211923122406,
0.23281633853912354,
-0.0517503060400486,
-0.20433740317821503,
0.2866244912147522,
0.31486061215400696,
0.4239186644554138,
0.16479387879371643,
-0.0921979546546936,
-0.08282860368490219,
-0.07594011723995209,
0.04268355295062065,
0.2614602744579315,
0.3995290696620941,
-0.08033055812120438,
0.04726802930235863,
-0.03076918050646782,
0.17511820793151855,
-0.39232301712036133,
-0.18610535562038422,
-0.03210526704788208,
-0.19083847105503082,
-0.0172258373349905,
-0.14409831166267395,
0.1874065101146698,
0.2988895773887634,
0.24131105840206146,
-0.039361584931612015,
0.1408943384885788,
-0.25226354598999023,
0.06668387353420258,
0.4477623403072357,
-0.05764065682888031,
-0.11260706931352615,
0.4983672797679901,
0.25924667716026306,
0.4102182686328888,
0.469868004322052,
-0.14805440604686737,
0.8135538697242737,
0.505167543888092,
0.030884098261594772,
0.466094434261322,
-0.14355362951755524,
-0.25580310821533203,
-0.2909408509731293,
0.2931876480579376,
0.09047465026378632,
0.3213995695114136,
0.4613780677318573,
0.09333500266075134,
-0.44872209429740906,
0.10551252216100693,
0.35485485196113586,
-0.20826302468776703,
-0.3523745536804199,
-0.1865788698196411,
-0.2023444026708603,
-0.022891240194439888,
0.012327609583735466,
-0.28872498869895935,
-0.11826162785291672,
0.2549114227294922,
-0.2350497990846634,
0.012399174273014069,
-0.19235505163669586,
0.48845532536506653,
0.13499975204467773,
-0.2794124484062195,
0.007739666849374771,
0.16713380813598633,
0.12926185131072998,
0.030372904613614082,
0.16587962210178375,
0.20437076687812805,
0.27896353602409363,
-0.069073386490345,
-0.1949634850025177,
0.028730642050504684,
0.07239513844251633,
-0.28400400280952454,
-0.11853815615177155,
-0.17854945361614227,
-0.00753847835585475,
-0.24165162444114685,
0.34615588188171387,
0.22655676305294037,
-0.12925228476524353,
-0.0669044777750969,
0.1022942066192627,
-0.06402644515037537,
0.186601459980011,
-0.001890548155643046,
-0.12314769625663757,
-0.25690197944641113,
-0.14542187750339508,
-0.017088569700717926,
-0.3904106914997101,
-0.3772371709346771,
0.48787882924079895,
0.010029182769358158,
0.16246619820594788,
-0.01405356451869011,
0.1328064650297165,
0.05478804558515549,
0.3443194329738617,
0.1325402557849884,
0.21883009374141693,
0.018226517364382744,
-0.219355970621109,
-0.5118173360824585,
0.05173439159989357,
0.3462425470352173,
-0.07937660068273544,
-0.27169862389564514,
0.06076694652438164,
0.43459081649780273,
0.145656019449234,
0.14982932806015015,
0.14863374829292297,
0.4030667245388031,
0.17473846673965454,
-0.17168909311294556,
-0.1843622773885727,
0.15004496276378632,
-0.052975673228502274,
0.13522374629974365,
-0.4141637980937958,
-0.16242048144340515,
0.1642540842294693,
0.12695519626140594,
-0.24220359325408936,
-0.1504528671503067,
0.26059556007385254,
-0.06900686025619507,
0.4706857204437256,
-0.0985930934548378,
0.342410147190094,
-0.21078456938266754,
0.2454601675271988,
-0.08572519570589066,
-0.1790267825126648,
-0.17851199209690094,
0.4607303738594055,
0.14526116847991943,
0.09203844517469406,
-0.05011121556162834,
-0.08926299959421158,
-0.1534014791250229,
0.21861137449741364,
0.14986693859100342,
0.081387959420681,
-0.22133846580982208,
0.38425785303115845,
-0.18214714527130127,
-0.21307659149169922,
-0.019007936120033264,
0.24546489119529724,
0.033239513635635376,
0.11948918551206589,
-0.18874377012252808,
-0.3287672698497772,
0.4431082010269165,
0.11370880901813507,
-0.22514782845973969,
-0.04528056085109711,
-0.07084640115499496,
0.6525447368621826,
0.034560538828372955,
-0.5654698610305786,
0.0478203184902668,
0.14383544027805328,
-0.3495510220527649,
0.1700378805398941,
0.1190812960267067,
0.16414996981620789,
0.23254302144050598,
-0.30557119846343994,
0.5031844973564148,
0.2675768733024597,
0.017550192773342133,
-0.36084091663360596,
-0.3606509864330292
] |
https://github.com/huggingface/datasets/issues/2165
|
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
@y-rokutan Hi, now if you install `deepspeed` from master (this feature will be available in the next official release), the code should work without subclassing. Let us know if you still have any issues.
|
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 34 |
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
[
-0.38135045766830444,
0.03989590331912041,
-0.19329914450645447,
0.2075767070055008,
0.22860665619373322,
0.1434226632118225,
0.23101210594177246,
0.1419614851474762,
-0.15852558612823486,
-0.025924254208803177,
-0.29995226860046387,
0.6370788216590881,
-0.31550097465515137,
-0.16834385693073273,
-0.05090397596359253,
-0.18689921498298645,
0.14982102811336517,
-0.03684714809060097,
-0.45705148577690125,
-0.09293872863054276,
-0.10118813812732697,
0.11987213790416718,
0.0993996411561966,
0.20764999091625214,
-0.15383778512477875,
-0.14523416757583618,
0.14525039494037628,
0.17706440389156342,
-0.2736078202724457,
-0.18368789553642273,
0.2902565598487854,
-0.0808589905500412,
0.08718127757310867,
0.388640820980072,
-0.00011034605267923325,
0.09828883409500122,
0.1085897833108902,
-0.05350222438573837,
-0.31159475445747375,
0.07780467718839645,
0.13661475479602814,
-0.010738607496023178,
0.2576044499874115,
-0.13324664533138275,
-0.04271801561117172,
-0.29689714312553406,
0.03904181718826294,
-0.5213894248008728,
0.04419028386473656,
0.3848278224468231,
0.2270476371049881,
0.25647419691085815,
0.12020330131053925,
-0.1612054705619812,
0.33273494243621826,
0.14598213136196136,
-0.008245774544775486,
0.07848277688026428,
0.18425600230693817,
0.30388006567955017,
-0.2997905910015106,
0.41424301266670227,
-0.0751725435256958,
0.09025824069976807,
0.2032509297132492,
-0.21123956143856049,
-0.6463906168937683,
0.06500528752803802,
0.26223888993263245,
0.0695805698633194,
0.48022356629371643,
-0.43060970306396484,
-0.1998085081577301,
0.16041365265846252,
-0.12221022695302963,
0.06508252769708633,
-0.1115967407822609,
0.11058276891708374,
0.08882337808609009,
0.10574260354042053,
-0.049716658890247345,
-0.3124726116657257,
-0.07318223267793655,
-0.08580995351076126,
-0.15096722543239594,
0.3734937012195587,
-0.15965667366981506,
0.1523943841457367,
0.013941564597189426,
-0.36234280467033386,
0.696965217590332,
0.014654526486992836,
-0.09309815615415573,
-0.2351994663476944,
-0.031238730996847153,
0.1036495789885521,
-0.11107921600341797,
0.06164754927158356,
0.3027217388153076,
0.25235405564308167,
0.2385917603969574,
0.23770351707935333,
-0.15985046327114105,
0.08237171173095703,
-0.0673648789525032,
-0.13970403373241425,
0.25213623046875,
0.43406227231025696,
0.030001860111951828,
-0.18375065922737122,
-0.08135774731636047,
0.1155591681599617,
-0.185363307595253,
-0.4941827654838562,
-0.14179062843322754,
0.17466233670711517,
0.3066730499267578,
-0.18303407728672028,
-0.19038614630699158,
-0.22425764799118042,
0.1659044474363327,
0.010263095609843731,
0.05159252509474754,
0.23623590171337128,
0.12254326790571213,
0.03700552135705948,
0.19425036013126373,
0.22309058904647827,
0.04783601686358452,
-0.20011499524116516,
-0.18156112730503082,
-0.005752598866820335,
0.05624408274888992,
-0.22789621353149414,
0.05976565182209015,
-0.08103342354297638,
0.31329774856567383,
-0.10293610394001007,
-0.1920599341392517,
0.3921719193458557,
0.13500994443893433,
0.08376970142126083,
0.3866766691207886,
-0.033189479261636734,
0.008761152625083923,
0.09285490959882736,
0.15316127240657806,
0.37483251094818115,
-0.18439555168151855,
0.23005928099155426,
-0.3605666160583496,
-0.2418285459280014,
-0.30233126878738403,
0.20322921872138977,
0.22354920208454132,
-0.20168933272361755,
-0.09609955549240112,
0.0502953939139843,
0.1158096119761467,
-0.10412756353616714,
0.14726243913173676,
-0.16530942916870117,
0.12420646846294403,
-0.19698596000671387,
0.002310421783477068,
0.12358565628528595,
-0.5695286393165588,
0.040713921189308167,
0.20301330089569092,
-0.36121904850006104,
-0.13329128921031952,
0.16248498857021332,
-0.35669344663619995,
-0.156098410487175,
-0.2983241081237793,
-0.00027227247483097017,
0.5006659626960754,
-0.35737985372543335,
-0.2753264009952545,
0.004903463181108236,
-0.043547261506319046,
-0.3395160138607025,
0.21183839440345764,
0.10210716724395752,
0.005660193972289562,
0.018354035913944244,
0.1854080855846405,
0.08607020229101181,
0.05955208092927933,
-0.16098426282405853,
-0.07614517956972122,
-0.15937213599681854,
0.26196780800819397,
-0.10468357056379318,
-0.029570570215582848,
0.009316902607679367,
0.08982216566801071,
-0.2247377187013626,
0.12114331871271133,
-0.19082365930080414,
0.03430641442537308,
0.28503623604774475,
-0.1728491634130478,
-0.2114083170890808,
0.02415967732667923,
0.013791406527161598,
-0.2626331150531769,
-0.1964300125837326,
0.22130778431892395,
-0.21818070113658905,
-0.2991935610771179,
-0.2596094310283661,
-0.21331758797168732,
0.20301641523838043,
-0.10218551754951477,
-0.16269661486148834,
0.12765266001224518,
0.24882151186466217,
-0.08063571155071259,
-0.2550404667854309,
-0.047138068825006485,
-0.11190079152584076,
-0.32117974758148193,
0.17057831585407257,
-0.390645831823349,
-0.0012144180946052074,
-0.10010849684476852,
-0.05423253774642944,
0.06333281844854355,
-0.08337467908859253,
0.04433777183294296,
-0.0018192505231127143,
-0.08251670747995377,
0.24335815012454987,
-0.11682239919900894,
0.2320248782634735,
0.40377870202064514,
0.11358778178691864,
0.086489237844944,
-0.5137045979499817,
0.3729441463947296,
0.2700335681438446,
0.06459119915962219,
0.1442117542028427,
-0.3261021673679352,
0.33628132939338684,
0.0368778295814991,
0.06686054915189743,
0.04698275029659271,
0.006994715891778469,
0.33930522203445435,
0.23268301784992218,
-0.16115200519561768,
-0.018568579107522964,
-0.17617812752723694,
-0.026053203269839287,
0.5001412630081177,
0.014923958107829094,
-0.4206916093826294,
0.28842291235923767,
0.47961971163749695,
0.08038900792598724,
0.1773197501897812,
-0.059933070093393326,
-0.4276590943336487,
-0.07817884534597397,
0.39896708726882935,
-0.047093022614717484,
0.14419986307621002,
0.2707662880420685,
0.4553217887878418,
-0.09978924691677094,
0.04164974391460419,
-0.12039828300476074,
0.16746780276298523,
-0.04008885473012924,
0.08953981846570969,
0.10388113558292389,
0.16605335474014282,
-0.2490202784538269,
-0.33526062965393066,
0.04564174637198448,
-0.14598317444324493,
0.0374755933880806,
-0.3315855860710144,
0.14793920516967773,
-0.37230613827705383,
-0.04480878263711929,
-0.3312760293483734,
-0.12037938833236694,
-0.04173810034990311,
-0.337336927652359,
0.07677341997623444,
-0.07874391227960587,
-0.13334298133850098,
0.28515246510505676,
-0.052738167345523834,
-0.32533299922943115,
0.23360398411750793,
-0.18679454922676086,
0.047091297805309296,
-0.28809788823127747,
-0.10458100587129593,
0.12593574821949005,
0.1643669158220291,
0.02398679405450821,
0.25468435883522034,
-0.09458636492490768,
0.4533022344112396,
-0.7649535536766052,
-0.07661543041467667,
0.16161318123340607,
0.06045052409172058,
-0.133457750082016,
0.38204342126846313,
0.02489309012889862,
0.15594425797462463,
-0.21401798725128174,
-0.08544298261404037,
-0.13483433425426483,
-0.1401313990354538,
-0.01967477984726429,
-0.305363267660141,
0.01779637485742569,
0.10916534811258316,
-0.44022971391677856,
-0.2610240876674652,
-0.22506852447986603,
-0.13092069327831268,
0.010475308634340763,
0.11308304220438004,
-0.22244182229042053,
0.32840001583099365,
0.13312923908233643,
0.1405652016401291,
0.0019101561047136784,
-0.15815848112106323,
-0.3929418623447418,
0.3876182436943054,
-0.2171190232038498,
-0.21326278150081635,
-0.05608299374580383,
-0.16547201573848724,
0.39125940203666687,
0.4633409082889557,
-0.002867078874260187,
-0.0005811635055579245,
0.04649405553936958,
0.18418706953525543,
0.06649822741746902,
0.20885051786899567,
0.38055339455604553,
0.21719975769519806,
-0.1585596203804016,
-0.20393908023834229,
0.005765993148088455,
-0.04227474704384804,
-0.38526633381843567,
0.246219202876091,
0.10178619623184204,
0.3061688244342804,
-0.023041129112243652,
0.8837363123893738,
-0.20986482501029968,
-0.44949865341186523,
0.18864761292934418,
-0.3326237201690674,
0.36936038732528687,
-0.027934221550822258,
-0.20609880983829498,
-0.01085465494543314,
-0.08683411031961441,
0.15422359108924866,
-0.049423567950725555,
-0.13784365355968475,
0.02444113790988922,
0.18523992598056793,
0.06598495692014694,
-0.3764213025569916,
-0.15698972344398499,
0.21663188934326172,
-0.5246581435203552,
-0.014353640377521515,
0.045840777456760406,
0.23020349442958832,
-0.25915589928627014,
0.1401807814836502,
0.2680855393409729,
0.0681549608707428,
0.03550216183066368,
0.13287390768527985,
-0.2640725374221802,
0.15000483393669128,
-0.30984726548194885,
0.5070409774780273,
-0.04640813544392586,
0.056835804134607315,
0.12553994357585907,
-0.1784297227859497,
-0.11320925503969193,
-0.2050289362668991,
0.4603605568408966,
-0.07167361676692963,
-0.005332073662430048,
0.0588664747774601,
0.19050051271915436,
-0.4233792722225189,
0.10113711655139923,
-0.16653195023536682,
0.31922873854637146,
-0.076961949467659,
0.06671328842639923,
-0.24643996357917786,
-0.1759706437587738,
0.015442506410181522,
0.15870614349842072,
-0.02964068204164505,
0.5472052097320557,
-0.059714097529649734,
-0.22064973413944244,
-0.24967996776103973,
0.002734825946390629,
0.012728589586913586,
-0.10743257403373718,
-0.013173275627195835,
-0.21547994017601013,
-0.5934467911720276,
-0.009749767370522022,
0.11225544661283493,
0.016266584396362305,
0.42651280760765076,
-0.22527992725372314,
-0.1313968300819397,
-0.10336577892303467,
0.5777080655097961,
0.5634111166000366,
0.46305736899375916,
-0.27683383226394653,
-0.18793988227844238,
0.18490715324878693,
0.07382258772850037,
0.2833022177219391,
0.16506493091583252,
-0.2194560021162033,
-0.06689975410699844,
-0.2058783918619156,
-0.19208115339279175,
0.08946346491575241,
0.1717907190322876,
0.03231138363480568,
0.16672147810459137,
-0.2116202414035797,
-0.30396443605422974,
0.3107945919036865,
0.31910714507102966,
0.06361376494169235,
0.34502044320106506,
0.08769359439611435,
-0.2705687880516052,
0.058144208043813705,
0.2637712061405182,
0.8254712224006653,
-0.08193513751029968,
0.2732759118080139,
0.13307800889015198,
-0.3706185519695282,
0.20734253525733948,
-0.20532268285751343,
-0.0397515706717968,
-0.46357184648513794,
0.03612567484378815,
-0.1011117547750473,
-0.11224539577960968,
0.07983240485191345,
0.3213277757167816,
-0.0037271755281835794,
0.22060677409172058,
-0.25426915287971497,
0.2913197875022888,
-0.1395702362060547,
0.1430388242006302,
-0.16782431304454803,
-0.1156955435872078,
-0.036628611385822296,
0.23118750751018524,
-0.17557959258556366,
-0.012439987622201443,
-0.04689105972647667,
-0.14131025969982147,
-0.19740161299705505,
-0.12921170890331268,
0.10496172308921814,
0.08798955380916595,
-0.3173060417175293,
0.4021243453025818,
-0.10770918428897858,
-0.7258673310279846,
-0.21829737722873688,
0.31559255719184875,
0.2704029977321625,
-0.14591258764266968,
-0.0437905453145504,
0.24824829399585724,
0.12437774240970612,
-0.058012671768665314,
-0.17003966867923737,
0.023771125823259354,
0.2326822727918625,
0.030465219169855118,
0.0952550545334816,
0.10284777730703354,
0.06655727326869965,
-0.38799911737442017,
0.035776011645793915,
-0.11514943093061447,
0.2534385323524475,
-0.48269152641296387,
-0.12149431556463242,
0.15822623670101166,
-0.13027121126651764,
-0.1657184511423111,
0.11839427053928375,
-0.08394726365804672,
-0.04346177726984024,
-0.10050509870052338,
0.26069775223731995,
-0.16317754983901978,
0.1497558206319809,
0.3528069257736206,
-0.07500211149454117,
0.1131429523229599,
0.34381434321403503,
-0.037637192755937576,
-0.23170378804206848,
-0.2663249671459198,
0.04912060871720314,
0.760040819644928,
-0.37130066752433777,
0.1506849080324173,
-0.2838551700115204,
-0.2343343049287796,
0.13770395517349243,
-0.05379060283303261,
0.11778993159532547,
0.2653788626194,
-0.24788859486579895,
-0.033653534948825836,
-0.48388051986694336,
0.28080976009368896,
-0.19238892197608948,
0.28903037309646606,
0.001324775512330234,
-0.15400801599025726,
-0.12940998375415802,
-0.16129331290721893,
-0.3264099657535553,
0.22057192027568817,
0.12561972439289093,
0.1682310551404953,
0.06379319727420807,
0.01909862644970417,
-0.10634607821702957,
0.02144099958240986,
0.1597110480070114,
-0.006045505870133638,
-0.15040959417819977,
-0.27731385827064514,
0.030589265748858452,
0.068194180727005,
-0.052166346460580826,
0.13993582129478455,
-0.06376885622739792,
-0.0872921273112297,
-0.14984668791294098,
-0.14803381264209747,
0.16708460450172424,
0.18409402668476105,
0.15187692642211914,
0.17283450067043304,
0.16865308582782745,
0.163788840174675,
-0.019405756145715714,
-0.09527114033699036,
0.2320377230644226,
0.11654829233884811,
-0.2220211923122406,
0.23281633853912354,
-0.0517503060400486,
-0.20433740317821503,
0.2866244912147522,
0.31486061215400696,
0.4239186644554138,
0.16479387879371643,
-0.0921979546546936,
-0.08282860368490219,
-0.07594011723995209,
0.04268355295062065,
0.2614602744579315,
0.3995290696620941,
-0.08033055812120438,
0.04726802930235863,
-0.03076918050646782,
0.17511820793151855,
-0.39232301712036133,
-0.18610535562038422,
-0.03210526704788208,
-0.19083847105503082,
-0.0172258373349905,
-0.14409831166267395,
0.1874065101146698,
0.2988895773887634,
0.24131105840206146,
-0.039361584931612015,
0.1408943384885788,
-0.25226354598999023,
0.06668387353420258,
0.4477623403072357,
-0.05764065682888031,
-0.11260706931352615,
0.4983672797679901,
0.25924667716026306,
0.4102182686328888,
0.469868004322052,
-0.14805440604686737,
0.8135538697242737,
0.505167543888092,
0.030884098261594772,
0.466094434261322,
-0.14355362951755524,
-0.25580310821533203,
-0.2909408509731293,
0.2931876480579376,
0.09047465026378632,
0.3213995695114136,
0.4613780677318573,
0.09333500266075134,
-0.44872209429740906,
0.10551252216100693,
0.35485485196113586,
-0.20826302468776703,
-0.3523745536804199,
-0.1865788698196411,
-0.2023444026708603,
-0.022891240194439888,
0.012327609583735466,
-0.28872498869895935,
-0.11826162785291672,
0.2549114227294922,
-0.2350497990846634,
0.012399174273014069,
-0.19235505163669586,
0.48845532536506653,
0.13499975204467773,
-0.2794124484062195,
0.007739666849374771,
0.16713380813598633,
0.12926185131072998,
0.030372904613614082,
0.16587962210178375,
0.20437076687812805,
0.27896353602409363,
-0.069073386490345,
-0.1949634850025177,
0.028730642050504684,
0.07239513844251633,
-0.28400400280952454,
-0.11853815615177155,
-0.17854945361614227,
-0.00753847835585475,
-0.24165162444114685,
0.34615588188171387,
0.22655676305294037,
-0.12925228476524353,
-0.0669044777750969,
0.1022942066192627,
-0.06402644515037537,
0.186601459980011,
-0.001890548155643046,
-0.12314769625663757,
-0.25690197944641113,
-0.14542187750339508,
-0.017088569700717926,
-0.3904106914997101,
-0.3772371709346771,
0.48787882924079895,
0.010029182769358158,
0.16246619820594788,
-0.01405356451869011,
0.1328064650297165,
0.05478804558515549,
0.3443194329738617,
0.1325402557849884,
0.21883009374141693,
0.018226517364382744,
-0.219355970621109,
-0.5118173360824585,
0.05173439159989357,
0.3462425470352173,
-0.07937660068273544,
-0.27169862389564514,
0.06076694652438164,
0.43459081649780273,
0.145656019449234,
0.14982932806015015,
0.14863374829292297,
0.4030667245388031,
0.17473846673965454,
-0.17168909311294556,
-0.1843622773885727,
0.15004496276378632,
-0.052975673228502274,
0.13522374629974365,
-0.4141637980937958,
-0.16242048144340515,
0.1642540842294693,
0.12695519626140594,
-0.24220359325408936,
-0.1504528671503067,
0.26059556007385254,
-0.06900686025619507,
0.4706857204437256,
-0.0985930934548378,
0.342410147190094,
-0.21078456938266754,
0.2454601675271988,
-0.08572519570589066,
-0.1790267825126648,
-0.17851199209690094,
0.4607303738594055,
0.14526116847991943,
0.09203844517469406,
-0.05011121556162834,
-0.08926299959421158,
-0.1534014791250229,
0.21861137449741364,
0.14986693859100342,
0.081387959420681,
-0.22133846580982208,
0.38425785303115845,
-0.18214714527130127,
-0.21307659149169922,
-0.019007936120033264,
0.24546489119529724,
0.033239513635635376,
0.11948918551206589,
-0.18874377012252808,
-0.3287672698497772,
0.4431082010269165,
0.11370880901813507,
-0.22514782845973969,
-0.04528056085109711,
-0.07084640115499496,
0.6525447368621826,
0.034560538828372955,
-0.5654698610305786,
0.0478203184902668,
0.14383544027805328,
-0.3495510220527649,
0.1700378805398941,
0.1190812960267067,
0.16414996981620789,
0.23254302144050598,
-0.30557119846343994,
0.5031844973564148,
0.2675768733024597,
0.017550192773342133,
-0.36084091663360596,
-0.3606509864330292
] |
https://github.com/huggingface/datasets/issues/2165
|
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
Worth mentioning that any function that expects a `torch..Dataset` (like `torch..DataLoader`) will fail a mypy-esque typecheck if a `datasets.Dataset` is passed, even though it implements the interface correctly (I think). The virtual subclass idea was a good one- I wonder if there's another workaround given the Generic issue. What we're really talking about is something similar to the structural subtyping semantics that `typing.Protocol` defines. If `torch..DataLoader` accepted anything that supports `__getitem__` and `__len__` methods this would be much easier. Not sure if there's a way to do this without the wrapper from the perspective of `datasets`.
|
Hi,
I'm trying to pretraine deep-speed model using HF arxiv dataset like:
```
train_ds = nlp.load_dataset('scientific_papers', 'arxiv')
train_ds.set_format(
type="torch",
columns=["input_ids", "attention_mask", "global_attention_mask", "labels"],
)
engine, _, _, _ = deepspeed.initialize(
args=args,
model=model,
model_parameters=[p for p in model.parameters() if p.requires_grad],
training_data=train_ds)
```
but deepspeed.initialize accepts torch.utils.data.Dataset only. How can I convert HF-style dataset to torch-style dataset?
| 96 |
How to convert datasets.arrow_dataset.Dataset to torch.utils.data.Dataset
|
[
-0.38135045766830444,
0.03989590331912041,
-0.19329914450645447,
0.2075767070055008,
0.22860665619373322,
0.1434226632118225,
0.23101210594177246,
0.1419614851474762,
-0.15852558612823486,
-0.025924254208803177,
-0.29995226860046387,
0.6370788216590881,
-0.31550097465515137,
-0.16834385693073273,
-0.05090397596359253,
-0.18689921498298645,
0.14982102811336517,
-0.03684714809060097,
-0.45705148577690125,
-0.09293872863054276,
-0.10118813812732697,
0.11987213790416718,
0.0993996411561966,
0.20764999091625214,
-0.15383778512477875,
-0.14523416757583618,
0.14525039494037628,
0.17706440389156342,
-0.2736078202724457,
-0.18368789553642273,
0.2902565598487854,
-0.0808589905500412,
0.08718127757310867,
0.388640820980072,
-0.00011034605267923325,
0.09828883409500122,
0.1085897833108902,
-0.05350222438573837,
-0.31159475445747375,
0.07780467718839645,
0.13661475479602814,
-0.010738607496023178,
0.2576044499874115,
-0.13324664533138275,
-0.04271801561117172,
-0.29689714312553406,
0.03904181718826294,
-0.5213894248008728,
0.04419028386473656,
0.3848278224468231,
0.2270476371049881,
0.25647419691085815,
0.12020330131053925,
-0.1612054705619812,
0.33273494243621826,
0.14598213136196136,
-0.008245774544775486,
0.07848277688026428,
0.18425600230693817,
0.30388006567955017,
-0.2997905910015106,
0.41424301266670227,
-0.0751725435256958,
0.09025824069976807,
0.2032509297132492,
-0.21123956143856049,
-0.6463906168937683,
0.06500528752803802,
0.26223888993263245,
0.0695805698633194,
0.48022356629371643,
-0.43060970306396484,
-0.1998085081577301,
0.16041365265846252,
-0.12221022695302963,
0.06508252769708633,
-0.1115967407822609,
0.11058276891708374,
0.08882337808609009,
0.10574260354042053,
-0.049716658890247345,
-0.3124726116657257,
-0.07318223267793655,
-0.08580995351076126,
-0.15096722543239594,
0.3734937012195587,
-0.15965667366981506,
0.1523943841457367,
0.013941564597189426,
-0.36234280467033386,
0.696965217590332,
0.014654526486992836,
-0.09309815615415573,
-0.2351994663476944,
-0.031238730996847153,
0.1036495789885521,
-0.11107921600341797,
0.06164754927158356,
0.3027217388153076,
0.25235405564308167,
0.2385917603969574,
0.23770351707935333,
-0.15985046327114105,
0.08237171173095703,
-0.0673648789525032,
-0.13970403373241425,
0.25213623046875,
0.43406227231025696,
0.030001860111951828,
-0.18375065922737122,
-0.08135774731636047,
0.1155591681599617,
-0.185363307595253,
-0.4941827654838562,
-0.14179062843322754,
0.17466233670711517,
0.3066730499267578,
-0.18303407728672028,
-0.19038614630699158,
-0.22425764799118042,
0.1659044474363327,
0.010263095609843731,
0.05159252509474754,
0.23623590171337128,
0.12254326790571213,
0.03700552135705948,
0.19425036013126373,
0.22309058904647827,
0.04783601686358452,
-0.20011499524116516,
-0.18156112730503082,
-0.005752598866820335,
0.05624408274888992,
-0.22789621353149414,
0.05976565182209015,
-0.08103342354297638,
0.31329774856567383,
-0.10293610394001007,
-0.1920599341392517,
0.3921719193458557,
0.13500994443893433,
0.08376970142126083,
0.3866766691207886,
-0.033189479261636734,
0.008761152625083923,
0.09285490959882736,
0.15316127240657806,
0.37483251094818115,
-0.18439555168151855,
0.23005928099155426,
-0.3605666160583496,
-0.2418285459280014,
-0.30233126878738403,
0.20322921872138977,
0.22354920208454132,
-0.20168933272361755,
-0.09609955549240112,
0.0502953939139843,
0.1158096119761467,
-0.10412756353616714,
0.14726243913173676,
-0.16530942916870117,
0.12420646846294403,
-0.19698596000671387,
0.002310421783477068,
0.12358565628528595,
-0.5695286393165588,
0.040713921189308167,
0.20301330089569092,
-0.36121904850006104,
-0.13329128921031952,
0.16248498857021332,
-0.35669344663619995,
-0.156098410487175,
-0.2983241081237793,
-0.00027227247483097017,
0.5006659626960754,
-0.35737985372543335,
-0.2753264009952545,
0.004903463181108236,
-0.043547261506319046,
-0.3395160138607025,
0.21183839440345764,
0.10210716724395752,
0.005660193972289562,
0.018354035913944244,
0.1854080855846405,
0.08607020229101181,
0.05955208092927933,
-0.16098426282405853,
-0.07614517956972122,
-0.15937213599681854,
0.26196780800819397,
-0.10468357056379318,
-0.029570570215582848,
0.009316902607679367,
0.08982216566801071,
-0.2247377187013626,
0.12114331871271133,
-0.19082365930080414,
0.03430641442537308,
0.28503623604774475,
-0.1728491634130478,
-0.2114083170890808,
0.02415967732667923,
0.013791406527161598,
-0.2626331150531769,
-0.1964300125837326,
0.22130778431892395,
-0.21818070113658905,
-0.2991935610771179,
-0.2596094310283661,
-0.21331758797168732,
0.20301641523838043,
-0.10218551754951477,
-0.16269661486148834,
0.12765266001224518,
0.24882151186466217,
-0.08063571155071259,
-0.2550404667854309,
-0.047138068825006485,
-0.11190079152584076,
-0.32117974758148193,
0.17057831585407257,
-0.390645831823349,
-0.0012144180946052074,
-0.10010849684476852,
-0.05423253774642944,
0.06333281844854355,
-0.08337467908859253,
0.04433777183294296,
-0.0018192505231127143,
-0.08251670747995377,
0.24335815012454987,
-0.11682239919900894,
0.2320248782634735,
0.40377870202064514,
0.11358778178691864,
0.086489237844944,
-0.5137045979499817,
0.3729441463947296,
0.2700335681438446,
0.06459119915962219,
0.1442117542028427,
-0.3261021673679352,
0.33628132939338684,
0.0368778295814991,
0.06686054915189743,
0.04698275029659271,
0.006994715891778469,
0.33930522203445435,
0.23268301784992218,
-0.16115200519561768,
-0.018568579107522964,
-0.17617812752723694,
-0.026053203269839287,
0.5001412630081177,
0.014923958107829094,
-0.4206916093826294,
0.28842291235923767,
0.47961971163749695,
0.08038900792598724,
0.1773197501897812,
-0.059933070093393326,
-0.4276590943336487,
-0.07817884534597397,
0.39896708726882935,
-0.047093022614717484,
0.14419986307621002,
0.2707662880420685,
0.4553217887878418,
-0.09978924691677094,
0.04164974391460419,
-0.12039828300476074,
0.16746780276298523,
-0.04008885473012924,
0.08953981846570969,
0.10388113558292389,
0.16605335474014282,
-0.2490202784538269,
-0.33526062965393066,
0.04564174637198448,
-0.14598317444324493,
0.0374755933880806,
-0.3315855860710144,
0.14793920516967773,
-0.37230613827705383,
-0.04480878263711929,
-0.3312760293483734,
-0.12037938833236694,
-0.04173810034990311,
-0.337336927652359,
0.07677341997623444,
-0.07874391227960587,
-0.13334298133850098,
0.28515246510505676,
-0.052738167345523834,
-0.32533299922943115,
0.23360398411750793,
-0.18679454922676086,
0.047091297805309296,
-0.28809788823127747,
-0.10458100587129593,
0.12593574821949005,
0.1643669158220291,
0.02398679405450821,
0.25468435883522034,
-0.09458636492490768,
0.4533022344112396,
-0.7649535536766052,
-0.07661543041467667,
0.16161318123340607,
0.06045052409172058,
-0.133457750082016,
0.38204342126846313,
0.02489309012889862,
0.15594425797462463,
-0.21401798725128174,
-0.08544298261404037,
-0.13483433425426483,
-0.1401313990354538,
-0.01967477984726429,
-0.305363267660141,
0.01779637485742569,
0.10916534811258316,
-0.44022971391677856,
-0.2610240876674652,
-0.22506852447986603,
-0.13092069327831268,
0.010475308634340763,
0.11308304220438004,
-0.22244182229042053,
0.32840001583099365,
0.13312923908233643,
0.1405652016401291,
0.0019101561047136784,
-0.15815848112106323,
-0.3929418623447418,
0.3876182436943054,
-0.2171190232038498,
-0.21326278150081635,
-0.05608299374580383,
-0.16547201573848724,
0.39125940203666687,
0.4633409082889557,
-0.002867078874260187,
-0.0005811635055579245,
0.04649405553936958,
0.18418706953525543,
0.06649822741746902,
0.20885051786899567,
0.38055339455604553,
0.21719975769519806,
-0.1585596203804016,
-0.20393908023834229,
0.005765993148088455,
-0.04227474704384804,
-0.38526633381843567,
0.246219202876091,
0.10178619623184204,
0.3061688244342804,
-0.023041129112243652,
0.8837363123893738,
-0.20986482501029968,
-0.44949865341186523,
0.18864761292934418,
-0.3326237201690674,
0.36936038732528687,
-0.027934221550822258,
-0.20609880983829498,
-0.01085465494543314,
-0.08683411031961441,
0.15422359108924866,
-0.049423567950725555,
-0.13784365355968475,
0.02444113790988922,
0.18523992598056793,
0.06598495692014694,
-0.3764213025569916,
-0.15698972344398499,
0.21663188934326172,
-0.5246581435203552,
-0.014353640377521515,
0.045840777456760406,
0.23020349442958832,
-0.25915589928627014,
0.1401807814836502,
0.2680855393409729,
0.0681549608707428,
0.03550216183066368,
0.13287390768527985,
-0.2640725374221802,
0.15000483393669128,
-0.30984726548194885,
0.5070409774780273,
-0.04640813544392586,
0.056835804134607315,
0.12553994357585907,
-0.1784297227859497,
-0.11320925503969193,
-0.2050289362668991,
0.4603605568408966,
-0.07167361676692963,
-0.005332073662430048,
0.0588664747774601,
0.19050051271915436,
-0.4233792722225189,
0.10113711655139923,
-0.16653195023536682,
0.31922873854637146,
-0.076961949467659,
0.06671328842639923,
-0.24643996357917786,
-0.1759706437587738,
0.015442506410181522,
0.15870614349842072,
-0.02964068204164505,
0.5472052097320557,
-0.059714097529649734,
-0.22064973413944244,
-0.24967996776103973,
0.002734825946390629,
0.012728589586913586,
-0.10743257403373718,
-0.013173275627195835,
-0.21547994017601013,
-0.5934467911720276,
-0.009749767370522022,
0.11225544661283493,
0.016266584396362305,
0.42651280760765076,
-0.22527992725372314,
-0.1313968300819397,
-0.10336577892303467,
0.5777080655097961,
0.5634111166000366,
0.46305736899375916,
-0.27683383226394653,
-0.18793988227844238,
0.18490715324878693,
0.07382258772850037,
0.2833022177219391,
0.16506493091583252,
-0.2194560021162033,
-0.06689975410699844,
-0.2058783918619156,
-0.19208115339279175,
0.08946346491575241,
0.1717907190322876,
0.03231138363480568,
0.16672147810459137,
-0.2116202414035797,
-0.30396443605422974,
0.3107945919036865,
0.31910714507102966,
0.06361376494169235,
0.34502044320106506,
0.08769359439611435,
-0.2705687880516052,
0.058144208043813705,
0.2637712061405182,
0.8254712224006653,
-0.08193513751029968,
0.2732759118080139,
0.13307800889015198,
-0.3706185519695282,
0.20734253525733948,
-0.20532268285751343,
-0.0397515706717968,
-0.46357184648513794,
0.03612567484378815,
-0.1011117547750473,
-0.11224539577960968,
0.07983240485191345,
0.3213277757167816,
-0.0037271755281835794,
0.22060677409172058,
-0.25426915287971497,
0.2913197875022888,
-0.1395702362060547,
0.1430388242006302,
-0.16782431304454803,
-0.1156955435872078,
-0.036628611385822296,
0.23118750751018524,
-0.17557959258556366,
-0.012439987622201443,
-0.04689105972647667,
-0.14131025969982147,
-0.19740161299705505,
-0.12921170890331268,
0.10496172308921814,
0.08798955380916595,
-0.3173060417175293,
0.4021243453025818,
-0.10770918428897858,
-0.7258673310279846,
-0.21829737722873688,
0.31559255719184875,
0.2704029977321625,
-0.14591258764266968,
-0.0437905453145504,
0.24824829399585724,
0.12437774240970612,
-0.058012671768665314,
-0.17003966867923737,
0.023771125823259354,
0.2326822727918625,
0.030465219169855118,
0.0952550545334816,
0.10284777730703354,
0.06655727326869965,
-0.38799911737442017,
0.035776011645793915,
-0.11514943093061447,
0.2534385323524475,
-0.48269152641296387,
-0.12149431556463242,
0.15822623670101166,
-0.13027121126651764,
-0.1657184511423111,
0.11839427053928375,
-0.08394726365804672,
-0.04346177726984024,
-0.10050509870052338,
0.26069775223731995,
-0.16317754983901978,
0.1497558206319809,
0.3528069257736206,
-0.07500211149454117,
0.1131429523229599,
0.34381434321403503,
-0.037637192755937576,
-0.23170378804206848,
-0.2663249671459198,
0.04912060871720314,
0.760040819644928,
-0.37130066752433777,
0.1506849080324173,
-0.2838551700115204,
-0.2343343049287796,
0.13770395517349243,
-0.05379060283303261,
0.11778993159532547,
0.2653788626194,
-0.24788859486579895,
-0.033653534948825836,
-0.48388051986694336,
0.28080976009368896,
-0.19238892197608948,
0.28903037309646606,
0.001324775512330234,
-0.15400801599025726,
-0.12940998375415802,
-0.16129331290721893,
-0.3264099657535553,
0.22057192027568817,
0.12561972439289093,
0.1682310551404953,
0.06379319727420807,
0.01909862644970417,
-0.10634607821702957,
0.02144099958240986,
0.1597110480070114,
-0.006045505870133638,
-0.15040959417819977,
-0.27731385827064514,
0.030589265748858452,
0.068194180727005,
-0.052166346460580826,
0.13993582129478455,
-0.06376885622739792,
-0.0872921273112297,
-0.14984668791294098,
-0.14803381264209747,
0.16708460450172424,
0.18409402668476105,
0.15187692642211914,
0.17283450067043304,
0.16865308582782745,
0.163788840174675,
-0.019405756145715714,
-0.09527114033699036,
0.2320377230644226,
0.11654829233884811,
-0.2220211923122406,
0.23281633853912354,
-0.0517503060400486,
-0.20433740317821503,
0.2866244912147522,
0.31486061215400696,
0.4239186644554138,
0.16479387879371643,
-0.0921979546546936,
-0.08282860368490219,
-0.07594011723995209,
0.04268355295062065,
0.2614602744579315,
0.3995290696620941,
-0.08033055812120438,
0.04726802930235863,
-0.03076918050646782,
0.17511820793151855,
-0.39232301712036133,
-0.18610535562038422,
-0.03210526704788208,
-0.19083847105503082,
-0.0172258373349905,
-0.14409831166267395,
0.1874065101146698,
0.2988895773887634,
0.24131105840206146,
-0.039361584931612015,
0.1408943384885788,
-0.25226354598999023,
0.06668387353420258,
0.4477623403072357,
-0.05764065682888031,
-0.11260706931352615,
0.4983672797679901,
0.25924667716026306,
0.4102182686328888,
0.469868004322052,
-0.14805440604686737,
0.8135538697242737,
0.505167543888092,
0.030884098261594772,
0.466094434261322,
-0.14355362951755524,
-0.25580310821533203,
-0.2909408509731293,
0.2931876480579376,
0.09047465026378632,
0.3213995695114136,
0.4613780677318573,
0.09333500266075134,
-0.44872209429740906,
0.10551252216100693,
0.35485485196113586,
-0.20826302468776703,
-0.3523745536804199,
-0.1865788698196411,
-0.2023444026708603,
-0.022891240194439888,
0.012327609583735466,
-0.28872498869895935,
-0.11826162785291672,
0.2549114227294922,
-0.2350497990846634,
0.012399174273014069,
-0.19235505163669586,
0.48845532536506653,
0.13499975204467773,
-0.2794124484062195,
0.007739666849374771,
0.16713380813598633,
0.12926185131072998,
0.030372904613614082,
0.16587962210178375,
0.20437076687812805,
0.27896353602409363,
-0.069073386490345,
-0.1949634850025177,
0.028730642050504684,
0.07239513844251633,
-0.28400400280952454,
-0.11853815615177155,
-0.17854945361614227,
-0.00753847835585475,
-0.24165162444114685,
0.34615588188171387,
0.22655676305294037,
-0.12925228476524353,
-0.0669044777750969,
0.1022942066192627,
-0.06402644515037537,
0.186601459980011,
-0.001890548155643046,
-0.12314769625663757,
-0.25690197944641113,
-0.14542187750339508,
-0.017088569700717926,
-0.3904106914997101,
-0.3772371709346771,
0.48787882924079895,
0.010029182769358158,
0.16246619820594788,
-0.01405356451869011,
0.1328064650297165,
0.05478804558515549,
0.3443194329738617,
0.1325402557849884,
0.21883009374141693,
0.018226517364382744,
-0.219355970621109,
-0.5118173360824585,
0.05173439159989357,
0.3462425470352173,
-0.07937660068273544,
-0.27169862389564514,
0.06076694652438164,
0.43459081649780273,
0.145656019449234,
0.14982932806015015,
0.14863374829292297,
0.4030667245388031,
0.17473846673965454,
-0.17168909311294556,
-0.1843622773885727,
0.15004496276378632,
-0.052975673228502274,
0.13522374629974365,
-0.4141637980937958,
-0.16242048144340515,
0.1642540842294693,
0.12695519626140594,
-0.24220359325408936,
-0.1504528671503067,
0.26059556007385254,
-0.06900686025619507,
0.4706857204437256,
-0.0985930934548378,
0.342410147190094,
-0.21078456938266754,
0.2454601675271988,
-0.08572519570589066,
-0.1790267825126648,
-0.17851199209690094,
0.4607303738594055,
0.14526116847991943,
0.09203844517469406,
-0.05011121556162834,
-0.08926299959421158,
-0.1534014791250229,
0.21861137449741364,
0.14986693859100342,
0.081387959420681,
-0.22133846580982208,
0.38425785303115845,
-0.18214714527130127,
-0.21307659149169922,
-0.019007936120033264,
0.24546489119529724,
0.033239513635635376,
0.11948918551206589,
-0.18874377012252808,
-0.3287672698497772,
0.4431082010269165,
0.11370880901813507,
-0.22514782845973969,
-0.04528056085109711,
-0.07084640115499496,
0.6525447368621826,
0.034560538828372955,
-0.5654698610305786,
0.0478203184902668,
0.14383544027805328,
-0.3495510220527649,
0.1700378805398941,
0.1190812960267067,
0.16414996981620789,
0.23254302144050598,
-0.30557119846343994,
0.5031844973564148,
0.2675768733024597,
0.017550192773342133,
-0.36084091663360596,
-0.3606509864330292
] |
https://github.com/huggingface/datasets/issues/2162
|
visualization for cc100 is broken
|
This looks like an issue with the cc100 dataset itself but not sure
Did you try loading cc100 on your machine ?
|
Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
| 22 |
visualization for cc100 is broken
|
[
-0.44503095746040344,
-0.2475239485502243,
-0.13035760819911957,
0.1258925199508667,
0.19424894452095032,
-0.18637271225452423,
0.22891782224178314,
0.03727361187338829,
-0.17787307500839233,
0.47925153374671936,
0.021368853747844696,
0.32801738381385803,
0.19501516222953796,
0.28570741415023804,
-0.09296669065952301,
-0.1594058871269226,
-0.04546210169792175,
0.3766046166419983,
-0.2958516776561737,
0.0218337532132864,
0.06561248749494553,
0.14438948035240173,
-0.3209032416343689,
-0.129725381731987,
-0.16866743564605713,
-0.2989935278892517,
-0.0562402680516243,
0.16773387789726257,
-0.10100715607404709,
-0.4542061686515808,
-0.24898815155029297,
0.19327384233474731,
0.027135776355862617,
0.30054473876953125,
-0.00010383460903540254,
-0.08495336025953293,
0.3133295476436615,
0.11080873757600784,
-0.185113325715065,
0.3596085011959076,
-0.21650093793869019,
-0.09423179179430008,
0.25341829657554626,
-0.08102414011955261,
-0.07699549198150635,
0.2711542546749115,
-0.13566061854362488,
0.2680213749408722,
0.29684770107269287,
-0.4304318130016327,
0.3687693476676941,
-0.1877654492855072,
0.056261543184518814,
-0.14232555031776428,
-0.054080694913864136,
0.17312856018543243,
-0.11706340312957764,
0.17644405364990234,
0.14985132217407227,
-0.0720958262681961,
-0.02107452228665352,
0.11045168340206146,
0.05648817867040634,
-0.16215713322162628,
-0.017435647547245026,
-0.11328554153442383,
0.13324613869190216,
-0.1907399743795395,
0.2376750409603119,
0.033293649554252625,
0.3086620569229126,
0.2763424217700958,
0.3707325756549835,
0.32235482335090637,
-0.16267129778862,
-0.8150608539581299,
0.013455596752464771,
-0.0347113311290741,
-0.027960123494267464,
0.15360435843467712,
-0.38873231410980225,
-0.20188835263252258,
-0.285150945186615,
0.113668292760849,
-0.19791531562805176,
-0.05425119772553444,
-0.1655779480934143,
0.13591769337654114,
0.04581911116838455,
0.37822917103767395,
-0.23274755477905273,
0.2200026959180832,
-0.298617959022522,
-0.1864784061908722,
-0.24122321605682373,
0.01567136123776436,
0.22306391596794128,
0.37666091322898865,
-0.257327139377594,
0.15300144255161285,
0.3879181146621704,
0.3193480968475342,
0.42282751202583313,
0.11627376824617386,
0.044258859008550644,
0.05998314917087555,
-0.27865925431251526,
0.09448978304862976,
0.41743624210357666,
0.3343701660633087,
-0.088175930082798,
-0.1877211183309555,
-0.2281181663274765,
-0.2613106667995453,
-0.08775769919157028,
0.110649473965168,
-0.061645664274692535,
0.056780289858579636,
-0.18837612867355347,
0.22309906780719757,
-0.003723170142620802,
0.31911197304725647,
0.1601141095161438,
0.3391551673412323,
0.020432597026228905,
0.23585671186447144,
0.11243344098329544,
0.06821631640195847,
-0.11251526325941086,
-0.16674946248531342,
-0.18760211765766144,
-0.10444347560405731,
-0.40535739064216614,
-0.06157565489411354,
-0.0844457671046257,
-0.17018616199493408,
0.014836449176073074,
0.22064919769763947,
0.1890210211277008,
-0.21045158803462982,
-0.26324909925460815,
0.1418377161026001,
0.024499209597706795,
0.2020951807498932,
-0.052428461611270905,
0.03828676789999008,
0.18336492776870728,
-0.024084631353616714,
0.31811240315437317,
-0.041657280176877975,
-0.0019367195200175047,
-0.11086919158697128,
-0.336443692445755,
0.20598538219928741,
0.00014357468171510845,
0.1657780110836029,
0.01612122729420662,
0.04235205799341202,
0.09447406232357025,
-0.04009512811899185,
0.0025417900178581476,
0.0174857210367918,
-0.0366036556661129,
-0.2103511244058609,
0.07841020077466965,
0.28602075576782227,
-0.7610483169555664,
0.03337308391928673,
-0.25012123584747314,
-0.09586207568645477,
0.04053414985537529,
-0.011893326416611671,
-0.17176498472690582,
-0.1510162204504013,
-0.14455091953277588,
-0.27898311614990234,
-0.20481635630130768,
-0.41051167249679565,
-0.4273621737957001,
0.17695128917694092,
0.021831324324011803,
-0.1370910406112671,
-0.12657809257507324,
-0.12233299762010574,
0.3415343165397644,
-0.04520060494542122,
-0.3143497109413147,
-0.309678316116333,
0.02886192873120308,
-0.16826282441616058,
-0.26750198006629944,
-0.1483519822359085,
0.14193111658096313,
-0.39015209674835205,
0.18941858410835266,
0.16324059665203094,
0.17064492404460907,
-0.2840658128261566,
0.13702932000160217,
0.03162930905818939,
-0.014794725924730301,
0.027176328003406525,
0.39283287525177,
-0.23725681006908417,
-0.0003349403850734234,
0.15436811745166779,
0.016364064067602158,
-0.16322219371795654,
0.045478083193302155,
0.3577727973461151,
0.08201910555362701,
0.19787146151065826,
-0.339494526386261,
0.05089249834418297,
-0.2172994315624237,
-0.2535070776939392,
0.3200332522392273,
0.19749881327152252,
-0.30985844135284424,
-0.12077867984771729,
0.024125782772898674,
-0.01533571071922779,
-0.11442039906978607,
-0.06355974823236465,
0.3932216763496399,
0.28130611777305603,
-0.25064823031425476,
-0.17229633033275604,
0.06832168996334076,
0.07182006537914276,
0.36982932686805725,
-0.19555652141571045,
-0.22026491165161133,
0.5063876509666443,
-0.1174798458814621,
0.38090842962265015,
-0.14258895814418793,
-0.2028730809688568,
0.31743505597114563,
-0.6806397438049316,
-0.04531695693731308,
-0.10470454394817352,
0.026917940005660057,
0.0913616344332695,
0.10794467478990555,
-0.21689364314079285,
0.09968148916959763,
0.05992404744029045,
-0.0696120485663414,
0.22022724151611328,
0.124636210501194,
0.05544186383485794,
-0.052950531244277954,
-0.32444465160369873,
0.04713253304362297,
0.4401410222053528,
0.37347716093063354,
-0.27129337191581726,
-0.2240568995475769,
0.21486540138721466,
0.08944200724363327,
0.16651439666748047,
0.0265064537525177,
-0.2247675061225891,
-0.32813212275505066,
0.0980745255947113,
0.48670029640197754,
-0.10816831141710281,
-0.38265421986579895,
0.13393813371658325,
-0.3315248191356659,
-0.00008878934750100598,
-0.25366154313087463,
-0.0478312186896801,
0.1485125869512558,
0.012190379202365875,
0.5308798551559448,
-0.006342610344290733,
0.024908743798732758,
-0.10223237425088882,
-0.2405707836151123,
-0.02314067631959915,
-0.09093765914440155,
0.16359351575374603,
-0.2559037208557129,
0.0013950113207101822,
-0.41812044382095337,
-0.06940094381570816,
0.3520578444004059,
0.12142739444971085,
0.31053149700164795,
-0.2076188176870346,
-0.040593091398477554,
0.17864109575748444,
-0.05705055594444275,
0.22901779413223267,
-0.1243893951177597,
0.20062872767448425,
0.032105833292007446,
0.44163182377815247,
-0.16904233396053314,
-0.23821543157100677,
-0.20512939989566803,
0.2186105102300644,
0.0646461769938469,
-0.1456979513168335,
-0.05313044413924217,
0.016596000641584396,
0.2562313973903656,
0.05097275972366333,
-0.46395283937454224,
0.40913140773773193,
-0.04233618453145027,
0.07150285691022873,
0.0036643766798079014,
0.18332593142986298,
-0.3011949062347412,
-0.03188700973987579,
0.18197272717952728,
-0.1524365097284317,
-0.00043091928819194436,
0.18753571808338165,
-0.03259817883372307,
-0.44727134704589844,
-0.17020556330680847,
0.19611936807632446,
0.10894113779067993,
-0.2681529223918915,
-0.05904524028301239,
0.26476651430130005,
0.14045125246047974,
0.33554646372795105,
0.38081565499305725,
-0.28729307651519775,
0.29977843165397644,
-0.152828648686409,
-0.17068015038967133,
-0.309077650308609,
0.09856303781270981,
-0.4794558584690094,
-0.32986560463905334,
0.12559470534324646,
-0.08944673091173172,
0.45594900846481323,
0.1209830567240715,
-0.15568511188030243,
0.24476447701454163,
0.013922269456088543,
-0.21149422228336334,
0.1720227301120758,
-0.12096899747848511,
0.15524885058403015,
0.23827964067459106,
-0.21142913401126862,
-0.2080680876970291,
-0.3400689363479614,
-0.07136419415473938,
0.033160991966724396,
0.16207638382911682,
-0.20221231877803802,
0.04190126806497574,
0.0010627808514982462,
0.5707306265830994,
-0.05313711613416672,
-0.055911507457494736,
0.3232482373714447,
-0.11238305270671844,
0.7022426128387451,
-0.03974203020334244,
-0.22314457595348358,
0.17772620916366577,
0.06828197836875916,
-0.23820798099040985,
0.20534466207027435,
-0.0525469034910202,
-0.3928282558917999,
-0.20798450708389282,
0.14652155339717865,
-0.3874078691005707,
-0.09800893813371658,
-0.34940996766090393,
0.1230054497718811,
0.12830857932567596,
0.035996366292238235,
0.38335612416267395,
0.14883439242839813,
-0.1906357705593109,
0.17166048288345337,
-0.13428311049938202,
0.10663971304893494,
-0.19887994229793549,
-0.3331010341644287,
-0.28526946902275085,
-0.12319859117269516,
0.0700160339474678,
-0.1826922744512558,
0.150888592004776,
-0.13814862072467804,
-0.17924824357032776,
0.05678132176399231,
-0.14216063916683197,
0.2647058963775635,
-0.13732479512691498,
-0.134582057595253,
0.35590967535972595,
-0.06422735750675201,
0.11880894750356674,
-0.15772463381290436,
0.08876707404851913,
0.25992798805236816,
-0.16838979721069336,
-0.20607633888721466,
0.09610703587532043,
0.2021539956331253,
0.15366731584072113,
0.0332939475774765,
-0.20193350315093994,
0.09741366654634476,
-0.1644914448261261,
0.2516079246997833,
-0.24217374622821808,
-0.22702252864837646,
-0.19267426431179047,
-0.06498044729232788,
-0.1971847116947174,
-0.30008119344711304,
0.04201902449131012,
-0.5166875123977661,
-0.20076286792755127,
0.49903395771980286,
0.3143855035305023,
-0.10673830658197403,
-0.20967161655426025,
0.14980654418468475,
0.25474318861961365,
0.21349291503429413,
0.10788305103778839,
0.38178741931915283,
-0.03254862129688263,
0.51603764295578,
-0.057850830256938934,
0.1170467808842659,
0.35677823424339294,
0.014882015064358711,
-0.09201962500810623,
0.19413191080093384,
0.15211178362369537,
-0.2439793348312378,
0.07431544363498688,
0.21116018295288086,
-0.009926569648087025,
-0.37026768922805786,
0.19634896516799927,
0.25473353266716003,
-0.15188086032867432,
-0.10431293398141861,
0.29605045914649963,
0.06959427893161774,
-0.033959586173295975,
-0.1673530638217926,
0.32294952869415283,
0.912010133266449,
0.03938530385494232,
-0.36031386256217957,
0.08720900118350983,
-0.15525980293750763,
0.26076820492744446,
-0.033480674028396606,
0.016294941306114197,
-0.3864002227783203,
0.07095567137002945,
0.03150397911667824,
-0.00935460440814495,
0.16757619380950928,
-0.1501600593328476,
-0.15158557891845703,
0.005003479775041342,
-0.40595147013664246,
0.5342379808425903,
0.02762727625668049,
-0.16462652385234833,
0.19125045835971832,
0.09494639933109283,
0.3157116174697876,
0.2702745795249939,
-0.041927605867385864,
0.04688623547554016,
-0.3278147280216217,
0.10927025228738785,
-0.13751178979873657,
0.10642139613628387,
-0.3509864807128906,
0.1141798347234726,
-0.27971065044403076,
0.05594500154256821,
-0.11847218126058578,
-0.6136876344680786,
-0.05659278854727745,
-0.10557010024785995,
-0.18628835678100586,
0.31299033761024475,
-0.19883295893669128,
0.3385732173919678,
0.039535507559776306,
-0.32407891750335693,
-0.16573366522789001,
0.35949766635894775,
-0.03546750172972679,
-0.16500777006149292,
-0.23573294281959534,
0.3275904953479767,
0.18799185752868652,
-0.15211108326911926,
0.05502573028206825,
0.20366528630256653,
0.5739783644676208,
0.19390657544136047,
0.15855543315410614,
0.05160009115934372,
-0.044741805642843246,
-0.2940349280834198,
0.23830899596214294,
-0.17835457623004913,
0.11524531245231628,
-0.03334365040063858,
0.3614870309829712,
0.10438056290149689,
-0.09797457605600357,
-0.20573949813842773,
-0.149245023727417,
-0.18573832511901855,
0.06830685585737228,
0.16916587948799133,
-0.2695143520832062,
-0.33654099702835083,
-0.09824726730585098,
0.0396965853869915,
-0.3053101897239685,
0.05983893945813179,
0.02802446112036705,
-0.15888112783432007,
-0.03026835434138775,
0.43611547350883484,
0.08615562319755554,
0.052023760974407196,
-0.2315962314605713,
-0.13736994564533234,
-0.4434223473072052,
-0.039144326001405716,
-0.30219945311546326,
0.19879677891731262,
0.013685552403330803,
0.3053129017353058,
-0.007191745098680258,
0.12304843217134476,
-0.4190347194671631,
-0.20524582266807556,
-0.04352341219782829,
-0.12008565664291382,
0.10856401920318604,
0.044541385024785995,
-0.27614474296569824,
-0.181197389960289,
0.25810229778289795,
0.3023480176925659,
-0.06432770192623138,
-0.34652549028396606,
-0.074950210750103,
0.06378643959760666,
0.1427118480205536,
-0.4113180935382843,
0.1911896914243698,
0.32956117391586304,
0.0033451709896326065,
-0.08863180130720139,
-0.17378613352775574,
-0.17279277741909027,
0.14676852524280548,
-0.054810069501399994,
-0.3611167073249817,
0.04452415183186531,
0.03266209363937378,
-0.18580172955989838,
0.2648475170135498,
0.581151008605957,
0.04083803668618202,
0.016157126054167747,
0.22957265377044678,
-0.03987622633576393,
0.008221727795898914,
0.12489861994981766,
-0.20153528451919556,
0.25839486718177795,
0.3906930983066559,
-0.1785334050655365,
0.28084585070610046,
-0.1952717900276184,
0.2283661961555481,
-0.0560230128467083,
0.13687337934970856,
-0.19747352600097656,
0.21529348194599152,
0.29208630323410034,
-0.12784048914909363,
0.2653983235359192,
0.010055283084511757,
0.011081683449447155,
0.21649473905563354,
0.06220376491546631,
0.3474656045436859,
-0.3609922230243683,
0.0664210319519043,
0.0024321398232132196,
0.2162628471851349,
-0.2664155066013336,
0.35378777980804443,
0.4630148112773895,
0.005261397920548916,
0.21368038654327393,
-0.061247263103723526,
0.1787380576133728,
0.04708684980869293,
0.35723716020584106,
0.1014169305562973,
-0.3492130935192108,
0.17032964527606964,
0.10902153700590134,
0.18164563179016113,
0.041655708104372025,
0.16101700067520142,
0.13730831444263458,
-0.12212938815355301,
0.14101357758045197,
0.31325477361679077,
0.3367571532726288,
0.20693372189998627,
-0.2925869822502136,
-0.123192697763443,
0.08599981665611267,
-0.15645113587379456,
0.18813768029212952,
-0.6168816089630127,
-0.2587476968765259,
0.004566741641610861,
0.23877111077308655,
0.10179831087589264,
0.06347334384918213,
0.2125421017408371,
0.021114572882652283,
-0.09854438900947571,
-0.31546804308891296,
0.10991579294204712,
0.17035546898841858,
0.45621421933174133,
0.01393972709774971,
0.14235475659370422,
0.17514047026634216,
0.10780296474695206,
-0.06632378697395325,
0.3629613220691681,
0.1902138590812683,
0.10649363696575165,
-0.06743213534355164,
-0.3037043511867523,
0.4369058609008789,
-0.22606883943080902,
0.016872884705662727,
-0.1615070104598999,
0.2894669473171234,
0.04733213037252426,
-0.09340187162160873,
0.1983376294374466,
-0.2708766758441925,
0.16783811151981354,
0.12802141904830933,
0.0005516670644283295,
0.1624445617198944,
-0.44155067205429077,
-0.2674729526042938,
-0.22326210141181946,
0.10384490340948105,
-0.31307098269462585,
-0.17989514768123627,
0.07435668259859085,
0.06081235036253929,
-0.3070596158504486,
-0.0030158809386193752,
-0.28955593705177307,
0.13389107584953308,
0.038560908287763596,
0.23726977407932281,
0.13713601231575012,
0.3688163459300995,
-0.07492723315954208,
-0.3489149808883667,
-0.14056529104709625,
0.32159924507141113,
0.09053032100200653,
-0.10249292850494385,
-0.23090198636054993,
0.2142149657011032,
0.21084193885326385,
0.23341616988182068,
0.6602914333343506,
-0.03372853994369507,
0.28266873955726624,
0.11349650472402573,
-0.14939390122890472,
0.21893176436424255,
0.0884423777461052,
-0.011122959665954113,
-0.18528708815574646,
-0.03733592852950096,
0.09960587322711945,
-0.02204447239637375,
0.2497256100177765,
-0.19378651678562164,
0.03732450678944588,
-0.39560073614120483,
-0.08005967736244202,
0.3753461539745331,
0.11722061783075333,
0.28647270798683167,
-0.25884586572647095,
-0.0019278661347925663,
-0.07084851711988449,
-0.06014310568571091,
0.020899925380945206,
0.2699982523918152,
0.16463381052017212,
0.25921764969825745,
0.1334884762763977,
-0.06867361068725586,
-0.145155131816864,
0.0360293872654438,
0.3798193037509918,
0.4139631390571594,
-0.16255033016204834,
0.10332974791526794,
-0.049415431916713715,
-0.14916034042835236,
0.33088186383247375,
0.0643671378493309,
-0.11816605180501938,
-0.011559038423001766,
-0.10984581708908081,
-0.2557957172393799,
-0.021223174408078194,
-0.1336207538843155,
-0.39456307888031006,
0.08590869605541229,
-0.15762381255626678,
0.3871314227581024,
0.20125389099121094,
0.06926301121711731,
-0.14443761110305786,
0.022549530491232872,
-0.12679286301136017,
-0.017079999670386314,
0.3768673241138458,
-0.10851521044969559,
-0.08785776048898697,
0.21500949561595917,
0.552961528301239,
0.330484002828598,
-0.14022289216518402,
-0.13958655297756195,
-0.21581263840198517
] |
https://github.com/huggingface/datasets/issues/2162
|
visualization for cc100 is broken
|
Hi
loading works fine, but the viewer only is broken
thanks
On Wed, Apr 7, 2021 at 12:17 PM Quentin Lhoest ***@***.***>
wrote:
> This looks like an issue with the cc100 dataset itself but not sure
> Did you try loading cc100 on your machine ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2162#issuecomment-814793809>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMRUO33JSOYGT6RETWLTHQWNLANCNFSM42IUOR6Q>
> .
>
|
Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
| 80 |
visualization for cc100 is broken
|
[
-0.44503095746040344,
-0.2475239485502243,
-0.13035760819911957,
0.1258925199508667,
0.19424894452095032,
-0.18637271225452423,
0.22891782224178314,
0.03727361187338829,
-0.17787307500839233,
0.47925153374671936,
0.021368853747844696,
0.32801738381385803,
0.19501516222953796,
0.28570741415023804,
-0.09296669065952301,
-0.1594058871269226,
-0.04546210169792175,
0.3766046166419983,
-0.2958516776561737,
0.0218337532132864,
0.06561248749494553,
0.14438948035240173,
-0.3209032416343689,
-0.129725381731987,
-0.16866743564605713,
-0.2989935278892517,
-0.0562402680516243,
0.16773387789726257,
-0.10100715607404709,
-0.4542061686515808,
-0.24898815155029297,
0.19327384233474731,
0.027135776355862617,
0.30054473876953125,
-0.00010383460903540254,
-0.08495336025953293,
0.3133295476436615,
0.11080873757600784,
-0.185113325715065,
0.3596085011959076,
-0.21650093793869019,
-0.09423179179430008,
0.25341829657554626,
-0.08102414011955261,
-0.07699549198150635,
0.2711542546749115,
-0.13566061854362488,
0.2680213749408722,
0.29684770107269287,
-0.4304318130016327,
0.3687693476676941,
-0.1877654492855072,
0.056261543184518814,
-0.14232555031776428,
-0.054080694913864136,
0.17312856018543243,
-0.11706340312957764,
0.17644405364990234,
0.14985132217407227,
-0.0720958262681961,
-0.02107452228665352,
0.11045168340206146,
0.05648817867040634,
-0.16215713322162628,
-0.017435647547245026,
-0.11328554153442383,
0.13324613869190216,
-0.1907399743795395,
0.2376750409603119,
0.033293649554252625,
0.3086620569229126,
0.2763424217700958,
0.3707325756549835,
0.32235482335090637,
-0.16267129778862,
-0.8150608539581299,
0.013455596752464771,
-0.0347113311290741,
-0.027960123494267464,
0.15360435843467712,
-0.38873231410980225,
-0.20188835263252258,
-0.285150945186615,
0.113668292760849,
-0.19791531562805176,
-0.05425119772553444,
-0.1655779480934143,
0.13591769337654114,
0.04581911116838455,
0.37822917103767395,
-0.23274755477905273,
0.2200026959180832,
-0.298617959022522,
-0.1864784061908722,
-0.24122321605682373,
0.01567136123776436,
0.22306391596794128,
0.37666091322898865,
-0.257327139377594,
0.15300144255161285,
0.3879181146621704,
0.3193480968475342,
0.42282751202583313,
0.11627376824617386,
0.044258859008550644,
0.05998314917087555,
-0.27865925431251526,
0.09448978304862976,
0.41743624210357666,
0.3343701660633087,
-0.088175930082798,
-0.1877211183309555,
-0.2281181663274765,
-0.2613106667995453,
-0.08775769919157028,
0.110649473965168,
-0.061645664274692535,
0.056780289858579636,
-0.18837612867355347,
0.22309906780719757,
-0.003723170142620802,
0.31911197304725647,
0.1601141095161438,
0.3391551673412323,
0.020432597026228905,
0.23585671186447144,
0.11243344098329544,
0.06821631640195847,
-0.11251526325941086,
-0.16674946248531342,
-0.18760211765766144,
-0.10444347560405731,
-0.40535739064216614,
-0.06157565489411354,
-0.0844457671046257,
-0.17018616199493408,
0.014836449176073074,
0.22064919769763947,
0.1890210211277008,
-0.21045158803462982,
-0.26324909925460815,
0.1418377161026001,
0.024499209597706795,
0.2020951807498932,
-0.052428461611270905,
0.03828676789999008,
0.18336492776870728,
-0.024084631353616714,
0.31811240315437317,
-0.041657280176877975,
-0.0019367195200175047,
-0.11086919158697128,
-0.336443692445755,
0.20598538219928741,
0.00014357468171510845,
0.1657780110836029,
0.01612122729420662,
0.04235205799341202,
0.09447406232357025,
-0.04009512811899185,
0.0025417900178581476,
0.0174857210367918,
-0.0366036556661129,
-0.2103511244058609,
0.07841020077466965,
0.28602075576782227,
-0.7610483169555664,
0.03337308391928673,
-0.25012123584747314,
-0.09586207568645477,
0.04053414985537529,
-0.011893326416611671,
-0.17176498472690582,
-0.1510162204504013,
-0.14455091953277588,
-0.27898311614990234,
-0.20481635630130768,
-0.41051167249679565,
-0.4273621737957001,
0.17695128917694092,
0.021831324324011803,
-0.1370910406112671,
-0.12657809257507324,
-0.12233299762010574,
0.3415343165397644,
-0.04520060494542122,
-0.3143497109413147,
-0.309678316116333,
0.02886192873120308,
-0.16826282441616058,
-0.26750198006629944,
-0.1483519822359085,
0.14193111658096313,
-0.39015209674835205,
0.18941858410835266,
0.16324059665203094,
0.17064492404460907,
-0.2840658128261566,
0.13702932000160217,
0.03162930905818939,
-0.014794725924730301,
0.027176328003406525,
0.39283287525177,
-0.23725681006908417,
-0.0003349403850734234,
0.15436811745166779,
0.016364064067602158,
-0.16322219371795654,
0.045478083193302155,
0.3577727973461151,
0.08201910555362701,
0.19787146151065826,
-0.339494526386261,
0.05089249834418297,
-0.2172994315624237,
-0.2535070776939392,
0.3200332522392273,
0.19749881327152252,
-0.30985844135284424,
-0.12077867984771729,
0.024125782772898674,
-0.01533571071922779,
-0.11442039906978607,
-0.06355974823236465,
0.3932216763496399,
0.28130611777305603,
-0.25064823031425476,
-0.17229633033275604,
0.06832168996334076,
0.07182006537914276,
0.36982932686805725,
-0.19555652141571045,
-0.22026491165161133,
0.5063876509666443,
-0.1174798458814621,
0.38090842962265015,
-0.14258895814418793,
-0.2028730809688568,
0.31743505597114563,
-0.6806397438049316,
-0.04531695693731308,
-0.10470454394817352,
0.026917940005660057,
0.0913616344332695,
0.10794467478990555,
-0.21689364314079285,
0.09968148916959763,
0.05992404744029045,
-0.0696120485663414,
0.22022724151611328,
0.124636210501194,
0.05544186383485794,
-0.052950531244277954,
-0.32444465160369873,
0.04713253304362297,
0.4401410222053528,
0.37347716093063354,
-0.27129337191581726,
-0.2240568995475769,
0.21486540138721466,
0.08944200724363327,
0.16651439666748047,
0.0265064537525177,
-0.2247675061225891,
-0.32813212275505066,
0.0980745255947113,
0.48670029640197754,
-0.10816831141710281,
-0.38265421986579895,
0.13393813371658325,
-0.3315248191356659,
-0.00008878934750100598,
-0.25366154313087463,
-0.0478312186896801,
0.1485125869512558,
0.012190379202365875,
0.5308798551559448,
-0.006342610344290733,
0.024908743798732758,
-0.10223237425088882,
-0.2405707836151123,
-0.02314067631959915,
-0.09093765914440155,
0.16359351575374603,
-0.2559037208557129,
0.0013950113207101822,
-0.41812044382095337,
-0.06940094381570816,
0.3520578444004059,
0.12142739444971085,
0.31053149700164795,
-0.2076188176870346,
-0.040593091398477554,
0.17864109575748444,
-0.05705055594444275,
0.22901779413223267,
-0.1243893951177597,
0.20062872767448425,
0.032105833292007446,
0.44163182377815247,
-0.16904233396053314,
-0.23821543157100677,
-0.20512939989566803,
0.2186105102300644,
0.0646461769938469,
-0.1456979513168335,
-0.05313044413924217,
0.016596000641584396,
0.2562313973903656,
0.05097275972366333,
-0.46395283937454224,
0.40913140773773193,
-0.04233618453145027,
0.07150285691022873,
0.0036643766798079014,
0.18332593142986298,
-0.3011949062347412,
-0.03188700973987579,
0.18197272717952728,
-0.1524365097284317,
-0.00043091928819194436,
0.18753571808338165,
-0.03259817883372307,
-0.44727134704589844,
-0.17020556330680847,
0.19611936807632446,
0.10894113779067993,
-0.2681529223918915,
-0.05904524028301239,
0.26476651430130005,
0.14045125246047974,
0.33554646372795105,
0.38081565499305725,
-0.28729307651519775,
0.29977843165397644,
-0.152828648686409,
-0.17068015038967133,
-0.309077650308609,
0.09856303781270981,
-0.4794558584690094,
-0.32986560463905334,
0.12559470534324646,
-0.08944673091173172,
0.45594900846481323,
0.1209830567240715,
-0.15568511188030243,
0.24476447701454163,
0.013922269456088543,
-0.21149422228336334,
0.1720227301120758,
-0.12096899747848511,
0.15524885058403015,
0.23827964067459106,
-0.21142913401126862,
-0.2080680876970291,
-0.3400689363479614,
-0.07136419415473938,
0.033160991966724396,
0.16207638382911682,
-0.20221231877803802,
0.04190126806497574,
0.0010627808514982462,
0.5707306265830994,
-0.05313711613416672,
-0.055911507457494736,
0.3232482373714447,
-0.11238305270671844,
0.7022426128387451,
-0.03974203020334244,
-0.22314457595348358,
0.17772620916366577,
0.06828197836875916,
-0.23820798099040985,
0.20534466207027435,
-0.0525469034910202,
-0.3928282558917999,
-0.20798450708389282,
0.14652155339717865,
-0.3874078691005707,
-0.09800893813371658,
-0.34940996766090393,
0.1230054497718811,
0.12830857932567596,
0.035996366292238235,
0.38335612416267395,
0.14883439242839813,
-0.1906357705593109,
0.17166048288345337,
-0.13428311049938202,
0.10663971304893494,
-0.19887994229793549,
-0.3331010341644287,
-0.28526946902275085,
-0.12319859117269516,
0.0700160339474678,
-0.1826922744512558,
0.150888592004776,
-0.13814862072467804,
-0.17924824357032776,
0.05678132176399231,
-0.14216063916683197,
0.2647058963775635,
-0.13732479512691498,
-0.134582057595253,
0.35590967535972595,
-0.06422735750675201,
0.11880894750356674,
-0.15772463381290436,
0.08876707404851913,
0.25992798805236816,
-0.16838979721069336,
-0.20607633888721466,
0.09610703587532043,
0.2021539956331253,
0.15366731584072113,
0.0332939475774765,
-0.20193350315093994,
0.09741366654634476,
-0.1644914448261261,
0.2516079246997833,
-0.24217374622821808,
-0.22702252864837646,
-0.19267426431179047,
-0.06498044729232788,
-0.1971847116947174,
-0.30008119344711304,
0.04201902449131012,
-0.5166875123977661,
-0.20076286792755127,
0.49903395771980286,
0.3143855035305023,
-0.10673830658197403,
-0.20967161655426025,
0.14980654418468475,
0.25474318861961365,
0.21349291503429413,
0.10788305103778839,
0.38178741931915283,
-0.03254862129688263,
0.51603764295578,
-0.057850830256938934,
0.1170467808842659,
0.35677823424339294,
0.014882015064358711,
-0.09201962500810623,
0.19413191080093384,
0.15211178362369537,
-0.2439793348312378,
0.07431544363498688,
0.21116018295288086,
-0.009926569648087025,
-0.37026768922805786,
0.19634896516799927,
0.25473353266716003,
-0.15188086032867432,
-0.10431293398141861,
0.29605045914649963,
0.06959427893161774,
-0.033959586173295975,
-0.1673530638217926,
0.32294952869415283,
0.912010133266449,
0.03938530385494232,
-0.36031386256217957,
0.08720900118350983,
-0.15525980293750763,
0.26076820492744446,
-0.033480674028396606,
0.016294941306114197,
-0.3864002227783203,
0.07095567137002945,
0.03150397911667824,
-0.00935460440814495,
0.16757619380950928,
-0.1501600593328476,
-0.15158557891845703,
0.005003479775041342,
-0.40595147013664246,
0.5342379808425903,
0.02762727625668049,
-0.16462652385234833,
0.19125045835971832,
0.09494639933109283,
0.3157116174697876,
0.2702745795249939,
-0.041927605867385864,
0.04688623547554016,
-0.3278147280216217,
0.10927025228738785,
-0.13751178979873657,
0.10642139613628387,
-0.3509864807128906,
0.1141798347234726,
-0.27971065044403076,
0.05594500154256821,
-0.11847218126058578,
-0.6136876344680786,
-0.05659278854727745,
-0.10557010024785995,
-0.18628835678100586,
0.31299033761024475,
-0.19883295893669128,
0.3385732173919678,
0.039535507559776306,
-0.32407891750335693,
-0.16573366522789001,
0.35949766635894775,
-0.03546750172972679,
-0.16500777006149292,
-0.23573294281959534,
0.3275904953479767,
0.18799185752868652,
-0.15211108326911926,
0.05502573028206825,
0.20366528630256653,
0.5739783644676208,
0.19390657544136047,
0.15855543315410614,
0.05160009115934372,
-0.044741805642843246,
-0.2940349280834198,
0.23830899596214294,
-0.17835457623004913,
0.11524531245231628,
-0.03334365040063858,
0.3614870309829712,
0.10438056290149689,
-0.09797457605600357,
-0.20573949813842773,
-0.149245023727417,
-0.18573832511901855,
0.06830685585737228,
0.16916587948799133,
-0.2695143520832062,
-0.33654099702835083,
-0.09824726730585098,
0.0396965853869915,
-0.3053101897239685,
0.05983893945813179,
0.02802446112036705,
-0.15888112783432007,
-0.03026835434138775,
0.43611547350883484,
0.08615562319755554,
0.052023760974407196,
-0.2315962314605713,
-0.13736994564533234,
-0.4434223473072052,
-0.039144326001405716,
-0.30219945311546326,
0.19879677891731262,
0.013685552403330803,
0.3053129017353058,
-0.007191745098680258,
0.12304843217134476,
-0.4190347194671631,
-0.20524582266807556,
-0.04352341219782829,
-0.12008565664291382,
0.10856401920318604,
0.044541385024785995,
-0.27614474296569824,
-0.181197389960289,
0.25810229778289795,
0.3023480176925659,
-0.06432770192623138,
-0.34652549028396606,
-0.074950210750103,
0.06378643959760666,
0.1427118480205536,
-0.4113180935382843,
0.1911896914243698,
0.32956117391586304,
0.0033451709896326065,
-0.08863180130720139,
-0.17378613352775574,
-0.17279277741909027,
0.14676852524280548,
-0.054810069501399994,
-0.3611167073249817,
0.04452415183186531,
0.03266209363937378,
-0.18580172955989838,
0.2648475170135498,
0.581151008605957,
0.04083803668618202,
0.016157126054167747,
0.22957265377044678,
-0.03987622633576393,
0.008221727795898914,
0.12489861994981766,
-0.20153528451919556,
0.25839486718177795,
0.3906930983066559,
-0.1785334050655365,
0.28084585070610046,
-0.1952717900276184,
0.2283661961555481,
-0.0560230128467083,
0.13687337934970856,
-0.19747352600097656,
0.21529348194599152,
0.29208630323410034,
-0.12784048914909363,
0.2653983235359192,
0.010055283084511757,
0.011081683449447155,
0.21649473905563354,
0.06220376491546631,
0.3474656045436859,
-0.3609922230243683,
0.0664210319519043,
0.0024321398232132196,
0.2162628471851349,
-0.2664155066013336,
0.35378777980804443,
0.4630148112773895,
0.005261397920548916,
0.21368038654327393,
-0.061247263103723526,
0.1787380576133728,
0.04708684980869293,
0.35723716020584106,
0.1014169305562973,
-0.3492130935192108,
0.17032964527606964,
0.10902153700590134,
0.18164563179016113,
0.041655708104372025,
0.16101700067520142,
0.13730831444263458,
-0.12212938815355301,
0.14101357758045197,
0.31325477361679077,
0.3367571532726288,
0.20693372189998627,
-0.2925869822502136,
-0.123192697763443,
0.08599981665611267,
-0.15645113587379456,
0.18813768029212952,
-0.6168816089630127,
-0.2587476968765259,
0.004566741641610861,
0.23877111077308655,
0.10179831087589264,
0.06347334384918213,
0.2125421017408371,
0.021114572882652283,
-0.09854438900947571,
-0.31546804308891296,
0.10991579294204712,
0.17035546898841858,
0.45621421933174133,
0.01393972709774971,
0.14235475659370422,
0.17514047026634216,
0.10780296474695206,
-0.06632378697395325,
0.3629613220691681,
0.1902138590812683,
0.10649363696575165,
-0.06743213534355164,
-0.3037043511867523,
0.4369058609008789,
-0.22606883943080902,
0.016872884705662727,
-0.1615070104598999,
0.2894669473171234,
0.04733213037252426,
-0.09340187162160873,
0.1983376294374466,
-0.2708766758441925,
0.16783811151981354,
0.12802141904830933,
0.0005516670644283295,
0.1624445617198944,
-0.44155067205429077,
-0.2674729526042938,
-0.22326210141181946,
0.10384490340948105,
-0.31307098269462585,
-0.17989514768123627,
0.07435668259859085,
0.06081235036253929,
-0.3070596158504486,
-0.0030158809386193752,
-0.28955593705177307,
0.13389107584953308,
0.038560908287763596,
0.23726977407932281,
0.13713601231575012,
0.3688163459300995,
-0.07492723315954208,
-0.3489149808883667,
-0.14056529104709625,
0.32159924507141113,
0.09053032100200653,
-0.10249292850494385,
-0.23090198636054993,
0.2142149657011032,
0.21084193885326385,
0.23341616988182068,
0.6602914333343506,
-0.03372853994369507,
0.28266873955726624,
0.11349650472402573,
-0.14939390122890472,
0.21893176436424255,
0.0884423777461052,
-0.011122959665954113,
-0.18528708815574646,
-0.03733592852950096,
0.09960587322711945,
-0.02204447239637375,
0.2497256100177765,
-0.19378651678562164,
0.03732450678944588,
-0.39560073614120483,
-0.08005967736244202,
0.3753461539745331,
0.11722061783075333,
0.28647270798683167,
-0.25884586572647095,
-0.0019278661347925663,
-0.07084851711988449,
-0.06014310568571091,
0.020899925380945206,
0.2699982523918152,
0.16463381052017212,
0.25921764969825745,
0.1334884762763977,
-0.06867361068725586,
-0.145155131816864,
0.0360293872654438,
0.3798193037509918,
0.4139631390571594,
-0.16255033016204834,
0.10332974791526794,
-0.049415431916713715,
-0.14916034042835236,
0.33088186383247375,
0.0643671378493309,
-0.11816605180501938,
-0.011559038423001766,
-0.10984581708908081,
-0.2557957172393799,
-0.021223174408078194,
-0.1336207538843155,
-0.39456307888031006,
0.08590869605541229,
-0.15762381255626678,
0.3871314227581024,
0.20125389099121094,
0.06926301121711731,
-0.14443761110305786,
0.022549530491232872,
-0.12679286301136017,
-0.017079999670386314,
0.3768673241138458,
-0.10851521044969559,
-0.08785776048898697,
0.21500949561595917,
0.552961528301239,
0.330484002828598,
-0.14022289216518402,
-0.13958655297756195,
-0.21581263840198517
] |
https://github.com/huggingface/datasets/issues/2162
|
visualization for cc100 is broken
|
Hi! This visualization tool is deprecated now. The viewer at https://huggingface.co/datasets/cc100 works fine, so I'm closing this issue.
|
Hi
visualization through dataset viewer for cc100 is broken
https://huggingface.co/datasets/viewer/
thanks a lot
| 18 |
visualization for cc100 is broken
|
[
-0.44503095746040344,
-0.2475239485502243,
-0.13035760819911957,
0.1258925199508667,
0.19424894452095032,
-0.18637271225452423,
0.22891782224178314,
0.03727361187338829,
-0.17787307500839233,
0.47925153374671936,
0.021368853747844696,
0.32801738381385803,
0.19501516222953796,
0.28570741415023804,
-0.09296669065952301,
-0.1594058871269226,
-0.04546210169792175,
0.3766046166419983,
-0.2958516776561737,
0.0218337532132864,
0.06561248749494553,
0.14438948035240173,
-0.3209032416343689,
-0.129725381731987,
-0.16866743564605713,
-0.2989935278892517,
-0.0562402680516243,
0.16773387789726257,
-0.10100715607404709,
-0.4542061686515808,
-0.24898815155029297,
0.19327384233474731,
0.027135776355862617,
0.30054473876953125,
-0.00010383460903540254,
-0.08495336025953293,
0.3133295476436615,
0.11080873757600784,
-0.185113325715065,
0.3596085011959076,
-0.21650093793869019,
-0.09423179179430008,
0.25341829657554626,
-0.08102414011955261,
-0.07699549198150635,
0.2711542546749115,
-0.13566061854362488,
0.2680213749408722,
0.29684770107269287,
-0.4304318130016327,
0.3687693476676941,
-0.1877654492855072,
0.056261543184518814,
-0.14232555031776428,
-0.054080694913864136,
0.17312856018543243,
-0.11706340312957764,
0.17644405364990234,
0.14985132217407227,
-0.0720958262681961,
-0.02107452228665352,
0.11045168340206146,
0.05648817867040634,
-0.16215713322162628,
-0.017435647547245026,
-0.11328554153442383,
0.13324613869190216,
-0.1907399743795395,
0.2376750409603119,
0.033293649554252625,
0.3086620569229126,
0.2763424217700958,
0.3707325756549835,
0.32235482335090637,
-0.16267129778862,
-0.8150608539581299,
0.013455596752464771,
-0.0347113311290741,
-0.027960123494267464,
0.15360435843467712,
-0.38873231410980225,
-0.20188835263252258,
-0.285150945186615,
0.113668292760849,
-0.19791531562805176,
-0.05425119772553444,
-0.1655779480934143,
0.13591769337654114,
0.04581911116838455,
0.37822917103767395,
-0.23274755477905273,
0.2200026959180832,
-0.298617959022522,
-0.1864784061908722,
-0.24122321605682373,
0.01567136123776436,
0.22306391596794128,
0.37666091322898865,
-0.257327139377594,
0.15300144255161285,
0.3879181146621704,
0.3193480968475342,
0.42282751202583313,
0.11627376824617386,
0.044258859008550644,
0.05998314917087555,
-0.27865925431251526,
0.09448978304862976,
0.41743624210357666,
0.3343701660633087,
-0.088175930082798,
-0.1877211183309555,
-0.2281181663274765,
-0.2613106667995453,
-0.08775769919157028,
0.110649473965168,
-0.061645664274692535,
0.056780289858579636,
-0.18837612867355347,
0.22309906780719757,
-0.003723170142620802,
0.31911197304725647,
0.1601141095161438,
0.3391551673412323,
0.020432597026228905,
0.23585671186447144,
0.11243344098329544,
0.06821631640195847,
-0.11251526325941086,
-0.16674946248531342,
-0.18760211765766144,
-0.10444347560405731,
-0.40535739064216614,
-0.06157565489411354,
-0.0844457671046257,
-0.17018616199493408,
0.014836449176073074,
0.22064919769763947,
0.1890210211277008,
-0.21045158803462982,
-0.26324909925460815,
0.1418377161026001,
0.024499209597706795,
0.2020951807498932,
-0.052428461611270905,
0.03828676789999008,
0.18336492776870728,
-0.024084631353616714,
0.31811240315437317,
-0.041657280176877975,
-0.0019367195200175047,
-0.11086919158697128,
-0.336443692445755,
0.20598538219928741,
0.00014357468171510845,
0.1657780110836029,
0.01612122729420662,
0.04235205799341202,
0.09447406232357025,
-0.04009512811899185,
0.0025417900178581476,
0.0174857210367918,
-0.0366036556661129,
-0.2103511244058609,
0.07841020077466965,
0.28602075576782227,
-0.7610483169555664,
0.03337308391928673,
-0.25012123584747314,
-0.09586207568645477,
0.04053414985537529,
-0.011893326416611671,
-0.17176498472690582,
-0.1510162204504013,
-0.14455091953277588,
-0.27898311614990234,
-0.20481635630130768,
-0.41051167249679565,
-0.4273621737957001,
0.17695128917694092,
0.021831324324011803,
-0.1370910406112671,
-0.12657809257507324,
-0.12233299762010574,
0.3415343165397644,
-0.04520060494542122,
-0.3143497109413147,
-0.309678316116333,
0.02886192873120308,
-0.16826282441616058,
-0.26750198006629944,
-0.1483519822359085,
0.14193111658096313,
-0.39015209674835205,
0.18941858410835266,
0.16324059665203094,
0.17064492404460907,
-0.2840658128261566,
0.13702932000160217,
0.03162930905818939,
-0.014794725924730301,
0.027176328003406525,
0.39283287525177,
-0.23725681006908417,
-0.0003349403850734234,
0.15436811745166779,
0.016364064067602158,
-0.16322219371795654,
0.045478083193302155,
0.3577727973461151,
0.08201910555362701,
0.19787146151065826,
-0.339494526386261,
0.05089249834418297,
-0.2172994315624237,
-0.2535070776939392,
0.3200332522392273,
0.19749881327152252,
-0.30985844135284424,
-0.12077867984771729,
0.024125782772898674,
-0.01533571071922779,
-0.11442039906978607,
-0.06355974823236465,
0.3932216763496399,
0.28130611777305603,
-0.25064823031425476,
-0.17229633033275604,
0.06832168996334076,
0.07182006537914276,
0.36982932686805725,
-0.19555652141571045,
-0.22026491165161133,
0.5063876509666443,
-0.1174798458814621,
0.38090842962265015,
-0.14258895814418793,
-0.2028730809688568,
0.31743505597114563,
-0.6806397438049316,
-0.04531695693731308,
-0.10470454394817352,
0.026917940005660057,
0.0913616344332695,
0.10794467478990555,
-0.21689364314079285,
0.09968148916959763,
0.05992404744029045,
-0.0696120485663414,
0.22022724151611328,
0.124636210501194,
0.05544186383485794,
-0.052950531244277954,
-0.32444465160369873,
0.04713253304362297,
0.4401410222053528,
0.37347716093063354,
-0.27129337191581726,
-0.2240568995475769,
0.21486540138721466,
0.08944200724363327,
0.16651439666748047,
0.0265064537525177,
-0.2247675061225891,
-0.32813212275505066,
0.0980745255947113,
0.48670029640197754,
-0.10816831141710281,
-0.38265421986579895,
0.13393813371658325,
-0.3315248191356659,
-0.00008878934750100598,
-0.25366154313087463,
-0.0478312186896801,
0.1485125869512558,
0.012190379202365875,
0.5308798551559448,
-0.006342610344290733,
0.024908743798732758,
-0.10223237425088882,
-0.2405707836151123,
-0.02314067631959915,
-0.09093765914440155,
0.16359351575374603,
-0.2559037208557129,
0.0013950113207101822,
-0.41812044382095337,
-0.06940094381570816,
0.3520578444004059,
0.12142739444971085,
0.31053149700164795,
-0.2076188176870346,
-0.040593091398477554,
0.17864109575748444,
-0.05705055594444275,
0.22901779413223267,
-0.1243893951177597,
0.20062872767448425,
0.032105833292007446,
0.44163182377815247,
-0.16904233396053314,
-0.23821543157100677,
-0.20512939989566803,
0.2186105102300644,
0.0646461769938469,
-0.1456979513168335,
-0.05313044413924217,
0.016596000641584396,
0.2562313973903656,
0.05097275972366333,
-0.46395283937454224,
0.40913140773773193,
-0.04233618453145027,
0.07150285691022873,
0.0036643766798079014,
0.18332593142986298,
-0.3011949062347412,
-0.03188700973987579,
0.18197272717952728,
-0.1524365097284317,
-0.00043091928819194436,
0.18753571808338165,
-0.03259817883372307,
-0.44727134704589844,
-0.17020556330680847,
0.19611936807632446,
0.10894113779067993,
-0.2681529223918915,
-0.05904524028301239,
0.26476651430130005,
0.14045125246047974,
0.33554646372795105,
0.38081565499305725,
-0.28729307651519775,
0.29977843165397644,
-0.152828648686409,
-0.17068015038967133,
-0.309077650308609,
0.09856303781270981,
-0.4794558584690094,
-0.32986560463905334,
0.12559470534324646,
-0.08944673091173172,
0.45594900846481323,
0.1209830567240715,
-0.15568511188030243,
0.24476447701454163,
0.013922269456088543,
-0.21149422228336334,
0.1720227301120758,
-0.12096899747848511,
0.15524885058403015,
0.23827964067459106,
-0.21142913401126862,
-0.2080680876970291,
-0.3400689363479614,
-0.07136419415473938,
0.033160991966724396,
0.16207638382911682,
-0.20221231877803802,
0.04190126806497574,
0.0010627808514982462,
0.5707306265830994,
-0.05313711613416672,
-0.055911507457494736,
0.3232482373714447,
-0.11238305270671844,
0.7022426128387451,
-0.03974203020334244,
-0.22314457595348358,
0.17772620916366577,
0.06828197836875916,
-0.23820798099040985,
0.20534466207027435,
-0.0525469034910202,
-0.3928282558917999,
-0.20798450708389282,
0.14652155339717865,
-0.3874078691005707,
-0.09800893813371658,
-0.34940996766090393,
0.1230054497718811,
0.12830857932567596,
0.035996366292238235,
0.38335612416267395,
0.14883439242839813,
-0.1906357705593109,
0.17166048288345337,
-0.13428311049938202,
0.10663971304893494,
-0.19887994229793549,
-0.3331010341644287,
-0.28526946902275085,
-0.12319859117269516,
0.0700160339474678,
-0.1826922744512558,
0.150888592004776,
-0.13814862072467804,
-0.17924824357032776,
0.05678132176399231,
-0.14216063916683197,
0.2647058963775635,
-0.13732479512691498,
-0.134582057595253,
0.35590967535972595,
-0.06422735750675201,
0.11880894750356674,
-0.15772463381290436,
0.08876707404851913,
0.25992798805236816,
-0.16838979721069336,
-0.20607633888721466,
0.09610703587532043,
0.2021539956331253,
0.15366731584072113,
0.0332939475774765,
-0.20193350315093994,
0.09741366654634476,
-0.1644914448261261,
0.2516079246997833,
-0.24217374622821808,
-0.22702252864837646,
-0.19267426431179047,
-0.06498044729232788,
-0.1971847116947174,
-0.30008119344711304,
0.04201902449131012,
-0.5166875123977661,
-0.20076286792755127,
0.49903395771980286,
0.3143855035305023,
-0.10673830658197403,
-0.20967161655426025,
0.14980654418468475,
0.25474318861961365,
0.21349291503429413,
0.10788305103778839,
0.38178741931915283,
-0.03254862129688263,
0.51603764295578,
-0.057850830256938934,
0.1170467808842659,
0.35677823424339294,
0.014882015064358711,
-0.09201962500810623,
0.19413191080093384,
0.15211178362369537,
-0.2439793348312378,
0.07431544363498688,
0.21116018295288086,
-0.009926569648087025,
-0.37026768922805786,
0.19634896516799927,
0.25473353266716003,
-0.15188086032867432,
-0.10431293398141861,
0.29605045914649963,
0.06959427893161774,
-0.033959586173295975,
-0.1673530638217926,
0.32294952869415283,
0.912010133266449,
0.03938530385494232,
-0.36031386256217957,
0.08720900118350983,
-0.15525980293750763,
0.26076820492744446,
-0.033480674028396606,
0.016294941306114197,
-0.3864002227783203,
0.07095567137002945,
0.03150397911667824,
-0.00935460440814495,
0.16757619380950928,
-0.1501600593328476,
-0.15158557891845703,
0.005003479775041342,
-0.40595147013664246,
0.5342379808425903,
0.02762727625668049,
-0.16462652385234833,
0.19125045835971832,
0.09494639933109283,
0.3157116174697876,
0.2702745795249939,
-0.041927605867385864,
0.04688623547554016,
-0.3278147280216217,
0.10927025228738785,
-0.13751178979873657,
0.10642139613628387,
-0.3509864807128906,
0.1141798347234726,
-0.27971065044403076,
0.05594500154256821,
-0.11847218126058578,
-0.6136876344680786,
-0.05659278854727745,
-0.10557010024785995,
-0.18628835678100586,
0.31299033761024475,
-0.19883295893669128,
0.3385732173919678,
0.039535507559776306,
-0.32407891750335693,
-0.16573366522789001,
0.35949766635894775,
-0.03546750172972679,
-0.16500777006149292,
-0.23573294281959534,
0.3275904953479767,
0.18799185752868652,
-0.15211108326911926,
0.05502573028206825,
0.20366528630256653,
0.5739783644676208,
0.19390657544136047,
0.15855543315410614,
0.05160009115934372,
-0.044741805642843246,
-0.2940349280834198,
0.23830899596214294,
-0.17835457623004913,
0.11524531245231628,
-0.03334365040063858,
0.3614870309829712,
0.10438056290149689,
-0.09797457605600357,
-0.20573949813842773,
-0.149245023727417,
-0.18573832511901855,
0.06830685585737228,
0.16916587948799133,
-0.2695143520832062,
-0.33654099702835083,
-0.09824726730585098,
0.0396965853869915,
-0.3053101897239685,
0.05983893945813179,
0.02802446112036705,
-0.15888112783432007,
-0.03026835434138775,
0.43611547350883484,
0.08615562319755554,
0.052023760974407196,
-0.2315962314605713,
-0.13736994564533234,
-0.4434223473072052,
-0.039144326001405716,
-0.30219945311546326,
0.19879677891731262,
0.013685552403330803,
0.3053129017353058,
-0.007191745098680258,
0.12304843217134476,
-0.4190347194671631,
-0.20524582266807556,
-0.04352341219782829,
-0.12008565664291382,
0.10856401920318604,
0.044541385024785995,
-0.27614474296569824,
-0.181197389960289,
0.25810229778289795,
0.3023480176925659,
-0.06432770192623138,
-0.34652549028396606,
-0.074950210750103,
0.06378643959760666,
0.1427118480205536,
-0.4113180935382843,
0.1911896914243698,
0.32956117391586304,
0.0033451709896326065,
-0.08863180130720139,
-0.17378613352775574,
-0.17279277741909027,
0.14676852524280548,
-0.054810069501399994,
-0.3611167073249817,
0.04452415183186531,
0.03266209363937378,
-0.18580172955989838,
0.2648475170135498,
0.581151008605957,
0.04083803668618202,
0.016157126054167747,
0.22957265377044678,
-0.03987622633576393,
0.008221727795898914,
0.12489861994981766,
-0.20153528451919556,
0.25839486718177795,
0.3906930983066559,
-0.1785334050655365,
0.28084585070610046,
-0.1952717900276184,
0.2283661961555481,
-0.0560230128467083,
0.13687337934970856,
-0.19747352600097656,
0.21529348194599152,
0.29208630323410034,
-0.12784048914909363,
0.2653983235359192,
0.010055283084511757,
0.011081683449447155,
0.21649473905563354,
0.06220376491546631,
0.3474656045436859,
-0.3609922230243683,
0.0664210319519043,
0.0024321398232132196,
0.2162628471851349,
-0.2664155066013336,
0.35378777980804443,
0.4630148112773895,
0.005261397920548916,
0.21368038654327393,
-0.061247263103723526,
0.1787380576133728,
0.04708684980869293,
0.35723716020584106,
0.1014169305562973,
-0.3492130935192108,
0.17032964527606964,
0.10902153700590134,
0.18164563179016113,
0.041655708104372025,
0.16101700067520142,
0.13730831444263458,
-0.12212938815355301,
0.14101357758045197,
0.31325477361679077,
0.3367571532726288,
0.20693372189998627,
-0.2925869822502136,
-0.123192697763443,
0.08599981665611267,
-0.15645113587379456,
0.18813768029212952,
-0.6168816089630127,
-0.2587476968765259,
0.004566741641610861,
0.23877111077308655,
0.10179831087589264,
0.06347334384918213,
0.2125421017408371,
0.021114572882652283,
-0.09854438900947571,
-0.31546804308891296,
0.10991579294204712,
0.17035546898841858,
0.45621421933174133,
0.01393972709774971,
0.14235475659370422,
0.17514047026634216,
0.10780296474695206,
-0.06632378697395325,
0.3629613220691681,
0.1902138590812683,
0.10649363696575165,
-0.06743213534355164,
-0.3037043511867523,
0.4369058609008789,
-0.22606883943080902,
0.016872884705662727,
-0.1615070104598999,
0.2894669473171234,
0.04733213037252426,
-0.09340187162160873,
0.1983376294374466,
-0.2708766758441925,
0.16783811151981354,
0.12802141904830933,
0.0005516670644283295,
0.1624445617198944,
-0.44155067205429077,
-0.2674729526042938,
-0.22326210141181946,
0.10384490340948105,
-0.31307098269462585,
-0.17989514768123627,
0.07435668259859085,
0.06081235036253929,
-0.3070596158504486,
-0.0030158809386193752,
-0.28955593705177307,
0.13389107584953308,
0.038560908287763596,
0.23726977407932281,
0.13713601231575012,
0.3688163459300995,
-0.07492723315954208,
-0.3489149808883667,
-0.14056529104709625,
0.32159924507141113,
0.09053032100200653,
-0.10249292850494385,
-0.23090198636054993,
0.2142149657011032,
0.21084193885326385,
0.23341616988182068,
0.6602914333343506,
-0.03372853994369507,
0.28266873955726624,
0.11349650472402573,
-0.14939390122890472,
0.21893176436424255,
0.0884423777461052,
-0.011122959665954113,
-0.18528708815574646,
-0.03733592852950096,
0.09960587322711945,
-0.02204447239637375,
0.2497256100177765,
-0.19378651678562164,
0.03732450678944588,
-0.39560073614120483,
-0.08005967736244202,
0.3753461539745331,
0.11722061783075333,
0.28647270798683167,
-0.25884586572647095,
-0.0019278661347925663,
-0.07084851711988449,
-0.06014310568571091,
0.020899925380945206,
0.2699982523918152,
0.16463381052017212,
0.25921764969825745,
0.1334884762763977,
-0.06867361068725586,
-0.145155131816864,
0.0360293872654438,
0.3798193037509918,
0.4139631390571594,
-0.16255033016204834,
0.10332974791526794,
-0.049415431916713715,
-0.14916034042835236,
0.33088186383247375,
0.0643671378493309,
-0.11816605180501938,
-0.011559038423001766,
-0.10984581708908081,
-0.2557957172393799,
-0.021223174408078194,
-0.1336207538843155,
-0.39456307888031006,
0.08590869605541229,
-0.15762381255626678,
0.3871314227581024,
0.20125389099121094,
0.06926301121711731,
-0.14443761110305786,
0.022549530491232872,
-0.12679286301136017,
-0.017079999670386314,
0.3768673241138458,
-0.10851521044969559,
-0.08785776048898697,
0.21500949561595917,
0.552961528301239,
0.330484002828598,
-0.14022289216518402,
-0.13958655297756195,
-0.21581263840198517
] |
https://github.com/huggingface/datasets/issues/2161
|
any possibility to download part of large datasets only?
|
oh, great, really awesome feature to have, thank you very much for the great, fabulous work
|
Hi
Some of the datasets I need like cc100 are very large, and then I wonder if I can download first X samples of the shuffled/unshuffled data without going through first downloading the whole data then sampling? thanks
| 16 |
any possibility to download part of large datasets only?
|
[
-0.5164613127708435,
0.01674460433423519,
-0.2895768880844116,
0.2692464292049408,
-0.07541868090629578,
0.2113526612520218,
-0.09322147816419601,
0.6230628490447998,
-0.003443585941568017,
0.2585667669773102,
-0.4474884569644928,
-0.19838735461235046,
-0.1973884105682373,
0.2996545433998108,
0.11865279078483582,
0.06078588217496872,
-0.14974986016750336,
0.3622376322746277,
-0.2596433162689209,
-0.2000127136707306,
0.009106162935495377,
-0.21079081296920776,
0.11559657752513885,
-0.13382074236869812,
0.30736038088798523,
-0.04524904862046242,
0.1639791578054428,
-0.1698404997587204,
-0.3202555775642395,
0.03620138764381409,
-0.022605448961257935,
0.015796419233083725,
0.16307459771633148,
0.0658908560872078,
-0.00010486058454262093,
-0.1462060809135437,
-0.10496354848146439,
-0.09619010984897614,
-0.3614945709705353,
0.09319209307432175,
-0.29662561416625977,
-0.08729524910449982,
-0.10471059381961823,
-0.4239000082015991,
0.2139597237110138,
0.045048460364341736,
0.1145755872130394,
0.0040275766514241695,
0.3813396692276001,
0.1735626757144928,
0.3449546992778778,
0.07226071506738663,
-0.07205692678689957,
-0.033609844744205475,
0.21451203525066376,
-0.12817078828811646,
0.023439308628439903,
0.21486833691596985,
0.45098188519477844,
0.2888915240764618,
0.08415679633617401,
0.2060314267873764,
0.01282720360904932,
0.23640769720077515,
-0.23692741990089417,
-0.1405520737171173,
0.02038474753499031,
-0.5098349452018738,
0.36821436882019043,
0.40133553743362427,
0.31187543272972107,
-0.02385897934436798,
-0.3465106189250946,
-0.22599263489246368,
-0.003819121979176998,
-0.2682879567146301,
-0.2741965055465698,
0.6338961720466614,
-0.33175817131996155,
0.2303112894296646,
-0.2706291973590851,
-0.3253735303878784,
-0.15749411284923553,
0.1291516274213791,
-0.2142917364835739,
0.022458497434854507,
-0.06393031030893326,
-0.07740945369005203,
0.15802371501922607,
0.07686340808868408,
-0.06001653894782066,
0.04734188690781593,
0.026329895481467247,
0.14472107589244843,
-0.06840912252664566,
-0.3317646086215973,
-0.2633333206176758,
0.032081302255392075,
0.45891302824020386,
0.07384396344423294,
0.08962994813919067,
0.21550986170768738,
0.11904457956552505,
-0.055941712111234665,
0.31158745288848877,
-0.29005444049835205,
-0.28009188175201416,
-0.014505685307085514,
0.31014442443847656,
-0.12396255135536194,
0.050070926547050476,
0.09075222909450531,
-0.13212884962558746,
0.11577614396810532,
-0.28570327162742615,
0.03491808474063873,
-0.19718310236930847,
-0.25325608253479004,
-0.1120811477303505,
-0.09578432887792587,
0.20621588826179504,
0.05250287428498268,
-0.2600052058696747,
0.27030637860298157,
0.03161821886897087,
-0.013104149140417576,
-0.10106948763132095,
-0.06891093403100967,
0.11526759713888168,
-0.4302910268306732,
-0.17048439383506775,
0.22647885978221893,
0.23310300707817078,
-0.10629327595233917,
0.21730472147464752,
-0.13962216675281525,
0.11365385353565216,
-0.357848584651947,
-0.0780390128493309,
0.004906234797090292,
0.0020217576529830694,
-0.35890042781829834,
0.05133189260959625,
0.16663525998592377,
0.13058242201805115,
0.18270018696784973,
-0.12048523873090744,
0.27071240544319153,
-0.19290363788604736,
0.13388478755950928,
-0.04256051033735275,
-0.132285013794899,
0.14729537069797516,
0.23979370296001434,
-0.09797738492488861,
-0.04061032086610794,
-0.14081718027591705,
0.17813740670681,
-0.09979292750358582,
-0.058420006185770035,
-0.09653223305940628,
0.3299591541290283,
-0.19258522987365723,
-0.050271157175302505,
0.1604183316230774,
0.2853817641735077,
-0.10106584429740906,
-0.1568663865327835,
-0.016839681193232536,
-0.27573809027671814,
0.2370194047689438,
0.379000723361969,
-0.10360106080770493,
-0.040002550929784775,
-0.0716475173830986,
0.08215561509132385,
0.5079103708267212,
0.05603307485580444,
-0.5426387190818787,
0.4304245710372925,
-0.17434906959533691,
-0.4008110463619232,
0.09830302745103836,
0.37634143233299255,
0.47282564640045166,
-0.10531153529882431,
-0.07468301057815552,
0.3979344964027405,
-0.018155165016651154,
0.11252215504646301,
-0.0062570045702159405,
-0.5173815488815308,
-0.24134132266044617,
0.2773667871952057,
0.39163169264793396,
0.3428660035133362,
0.26880398392677307,
-0.08572591841220856,
0.413030207157135,
-0.049735184758901596,
0.28611570596694946,
0.26358866691589355,
0.023745611310005188,
-0.1618790477514267,
-0.3643455505371094,
-0.40222153067588806,
-0.16995932161808014,
0.07307499647140503,
0.000911372946575284,
-0.46031367778778076,
0.037606608122587204,
-0.09742864221334457,
-0.16423442959785461,
-0.173587366938591,
0.45387160778045654,
0.17650894820690155,
0.16070912778377533,
-0.13840094208717346,
0.28549546003341675,
0.05324440449476242,
-0.2343073934316635,
0.02965223789215088,
-0.03933058679103851,
-0.003655144013464451,
0.03364173322916031,
0.06506745517253876,
0.17301784455776215,
0.191510409116745,
0.4317861795425415,
-0.2795974314212799,
0.015526621602475643,
-0.1357763111591339,
0.2582015097141266,
-0.010644608177244663,
-0.23610979318618774,
0.01499014813452959,
0.1065312996506691,
0.08807821571826935,
0.09444794058799744,
-0.025193465873599052,
-0.009672666899859905,
0.030301660299301147,
0.22921298444271088,
0.18260282278060913,
-0.2622597813606262,
0.17035174369812012,
0.04189487174153328,
0.01919458992779255,
0.2927432358264923,
0.06354543566703796,
0.4363323748111725,
-0.3200452923774719,
0.2332780808210373,
-0.25613266229629517,
0.19714011251926422,
0.05612888187170029,
0.0684003233909607,
0.0841827392578125,
-0.299562007188797,
-0.08209781348705292,
0.22896265983581543,
-0.13041111826896667,
0.25185826420783997,
0.18184037506580353,
-0.21391133964061737,
0.12812821567058563,
0.055797696113586426,
0.2947588562965393,
0.14389346539974213,
0.2919166386127472,
0.5020671486854553,
-0.05787501856684685,
0.4327150881290436,
-0.07268428802490234,
0.03483377769589424,
0.04505382105708122,
-0.1987631618976593,
0.13622507452964783,
0.027383778244256973,
-0.04038141295313835,
-0.1504562497138977,
-0.012533511035144329,
0.17456543445587158,
-0.07442968338727951,
0.17185357213020325,
-0.34273862838745117,
-0.2910558879375458,
-0.4412775933742523,
0.03731474280357361,
0.22389274835586548,
0.13880132138729095,
-0.11194419115781784,
0.14810387790203094,
0.2667495012283325,
-0.25575828552246094,
-0.00369520066305995,
-0.26171866059303284,
0.2613801956176758,
0.06940235942602158,
0.043159570544958115,
0.07435698062181473,
-0.11645784229040146,
0.17367559671401978,
0.26613980531692505,
0.07652663439512253,
0.10260510444641113,
0.3998182415962219,
-0.1678522825241089,
-0.26136186718940735,
-0.5997964143753052,
0.1469661295413971,
0.1020057201385498,
0.3105963170528412,
-0.2721955180168152,
-0.13244940340518951,
0.4124753177165985,
0.056154441088438034,
-0.010660979896783829,
-0.1786738485097885,
-0.12888723611831665,
-0.17575398087501526,
-0.07505115121603012,
0.08353281021118164,
0.21773940324783325,
-0.0676729828119278,
-0.09896598756313324,
-0.5232558250427246,
-0.46027544140815735,
0.536063551902771,
0.2613391578197479,
0.28069546818733215,
-0.30025190114974976,
-0.004611692391335964,
-0.13417081534862518,
-0.23428046703338623,
0.05979049950838089,
-0.020694570615887642,
-0.13053472340106964,
0.38413432240486145,
-0.05866328626871109,
-0.3403083086013794,
-0.10746817290782928,
0.10794926434755325,
-0.13716252148151398,
0.36240917444229126,
-0.4732556939125061,
-0.007147920783609152,
-0.2944728136062622,
0.0028892483096569777,
-0.07344676554203033,
0.1257813274860382,
-0.09417068958282471,
-0.4497155547142029,
-0.22822698950767517,
0.13324344158172607,
0.2438989281654358,
-0.1324622929096222,
-0.09482534229755402,
-0.11393103003501892,
-0.24898485839366913,
0.17619098722934723,
0.21970264613628387,
0.4135845899581909,
0.08707030117511749,
0.046965569257736206,
0.16295473277568817,
0.017575614154338837,
0.13269081711769104,
-0.0079908836632967,
0.0013068643165752292,
0.2229606807231903,
-0.08315803110599518,
-0.003362188581377268,
0.2313048541545868,
-0.13454915583133698,
-0.16521784663200378,
-0.17336846888065338,
-0.21460367739200592,
-0.3277505934238434,
-0.2488347589969635,
-0.010496845468878746,
0.20804432034492493,
0.11841703951358795,
0.1577674299478531,
-0.11023720353841782,
-0.07025003433227539,
-0.03676478937268257,
0.1746678203344345,
-0.17472010850906372,
0.14676164090633392,
-0.09540987014770508,
-0.18281236290931702,
0.10757845640182495,
-0.41955387592315674,
0.030584322288632393,
-0.12990209460258484,
-0.1023300364613533,
0.015331014059484005,
-0.06434102356433868,
-0.09597285091876984,
0.030818844214081764,
0.3942485749721527,
0.20808880031108856,
0.35622185468673706,
-0.1701505482196808,
-0.2667134702205658,
-0.24208678305149078,
0.1753675639629364,
-0.10059203207492828,
-0.023913651704788208,
0.3729771077632904,
-0.06800716370344162,
-0.5442940592765808,
0.27107691764831543,
0.3019632399082184,
0.39875125885009766,
-0.03492399677634239,
0.09704200178384781,
0.24344056844711304,
-0.17716380953788757,
-0.41306114196777344,
0.20744110643863678,
0.0535828061401844,
-0.17948408424854279,
0.13269485533237457,
-0.20311897993087769,
-0.20042766630649567,
-0.007111666724085808,
0.0028166593983769417,
-0.03263230621814728,
-0.07432489842176437,
0.07595957815647125,
0.4050045311450958,
-0.2329189032316208,
0.08079545199871063,
0.3044503629207611,
0.495783269405365,
0.08000165224075317,
-0.08929450064897537,
0.1650964319705963,
-0.10059047490358353,
0.033110082149505615,
0.27853429317474365,
0.023025669157505035,
0.264663964509964,
0.1165686771273613,
0.29852935671806335,
-0.07547736912965775,
0.15281376242637634,
-0.32090145349502563,
-0.15930618345737457,
-0.3022630214691162,
-0.21745556592941284,
0.41304001212120056,
0.09641920775175095,
-0.03861920163035393,
0.08102375268936157,
-0.1260961890220642,
0.06894728541374207,
-0.24305474758148193,
-0.0049890209920704365,
0.7875773310661316,
-0.13238073885440826,
0.19423675537109375,
-0.30192339420318604,
-0.12222778797149658,
0.5235981941223145,
-0.0270066000521183,
-0.017202354967594147,
-0.14704832434654236,
-0.4114272892475128,
-0.0696963518857956,
-0.016576115041971207,
-0.25454577803611755,
0.1999559998512268,
0.06042284145951271,
0.23178374767303467,
-0.05365012213587761,
0.18113815784454346,
0.10648871213197708,
0.1487032175064087,
-0.34181681275367737,
-0.09578340500593185,
-0.022867143154144287,
0.19536690413951874,
0.07765419036149979,
0.04997064918279648,
-0.03900808468461037,
-0.10289964824914932,
0.015089146792888641,
0.06922613829374313,
-0.14943037927150726,
0.08844411373138428,
-0.2853318452835083,
0.22694574296474457,
-0.4122275412082672,
-0.12700696289539337,
-0.15628527104854584,
-0.1104804128408432,
-0.17478640377521515,
0.21091164648532867,
-0.1932552605867386,
0.05905824154615402,
-0.16880014538764954,
-0.009736506268382072,
-0.04501654952764511,
0.1671912670135498,
-0.23317494988441467,
-0.0929671972990036,
0.05071292817592621,
0.23339669406414032,
-0.019189167767763138,
-0.10660404711961746,
0.14062826335430145,
0.25683796405792236,
-0.031130516901612282,
0.016768209636211395,
-0.22795182466506958,
-0.06443066149950027,
-0.11536827683448792,
-0.25453951954841614,
0.17193254828453064,
0.1850491315126419,
-0.1079157143831253,
0.22189173102378845,
0.12293076515197754,
-0.22649158537387848,
-0.324255108833313,
0.6595109105110168,
-0.027246614918112755,
-0.04293625056743622,
0.19235530495643616,
-0.2554589509963989,
-0.28163570165634155,
-0.3677677810192108,
-0.08677461743354797,
-0.2391122430562973,
-0.2076534926891327,
0.12386538833379745,
-0.45183244347572327,
0.07459493726491928,
-0.20318196713924408,
-0.06381621211767197,
0.23280897736549377,
0.06103979051113129,
-0.07218735665082932,
-0.3480593264102936,
-0.20900867879390717,
0.25273430347442627,
0.05776281654834747,
0.1699487268924713,
-0.07707078754901886,
-0.04342307522892952,
-0.17198731005191803,
0.3332325518131256,
-0.38247814774513245,
0.2778500020503998,
-0.2017413079738617,
0.18508172035217285,
0.297846257686615,
0.18670476973056793,
-0.04358789697289467,
0.1415262222290039,
0.21810230612754822,
0.34962281584739685,
-0.09853233397006989,
-0.33193835616111755,
-0.10220501571893692,
0.09269900619983673,
-0.14956194162368774,
-0.10995474457740784,
0.24647118151187897,
-0.2327509969472885,
-0.15570789575576782,
0.0542416051030159,
0.11987495422363281,
0.08413596451282501,
0.21500898897647858,
-0.28375962376594543,
0.48602381348609924,
-0.09169860184192657,
-0.3666270971298218,
0.29368987679481506,
-0.20328661799430847,
0.20087622106075287,
-0.015680978074669838,
0.36112019419670105,
0.175111323595047,
0.027768468484282494,
-0.1887451708316803,
-0.2604216933250427,
0.39903390407562256,
-0.24558144807815552,
0.2146676927804947,
0.22892408072948456,
0.023191142827272415,
0.3235442638397217,
0.20418626070022583,
0.4967449903488159,
-0.06786710768938065,
0.1435011923313141,
0.27032193541526794,
0.34414172172546387,
-0.26990440487861633,
-0.24447450041770935,
0.033131275326013565,
-0.3001727759838104,
0.24154125154018402,
0.1951114982366562,
-0.0659533217549324,
-0.23292286694049835,
0.11664634943008423,
-0.3182126581668854,
0.19744975864887238,
0.2662661075592041,
-0.1563260406255722,
0.5767971277236938,
0.28159263730049133,
-0.19157527387142181,
-0.16800889372825623,
0.3795035779476166,
0.4236961007118225,
0.36693277955055237,
-0.21145713329315186,
0.14948371052742004,
-0.06241719797253609,
-0.046147674322128296,
-0.23328010737895966,
-0.44809234142303467,
-0.005820292513817549,
0.38855284452438354,
-0.005411058664321899,
0.08593463897705078,
-0.13602839410305023,
-0.22823722660541534,
0.19718237221240997,
0.13955174386501312,
-0.17642754316329956,
0.3624625504016876,
0.2975601255893707,
0.019113117828965187,
0.022479252889752388,
-0.1712789386510849,
-0.0014470467576757073,
0.23274648189544678,
0.11649627983570099,
-0.5298469066619873,
0.19021743535995483,
0.28424957394599915,
0.05256359651684761,
-0.1425573229789734,
0.028827957808971405,
0.07583226263523102,
-0.09584818035364151,
-0.43961429595947266,
-0.15008260309696198,
-0.019906822592020035,
0.1259521096944809,
0.069203220307827,
0.07905768603086472,
-0.07635463029146194,
-0.036723289638757706,
0.37846413254737854,
-0.10771531611680984,
0.18762610852718353,
-0.03104959987103939,
-0.5165870785713196,
-0.03409948945045471,
0.24007858335971832,
0.2828553020954132,
0.5737729668617249,
0.2184896320104599,
-0.29016703367233276,
0.10688824206590652,
0.002956787124276161,
-0.23261962831020355,
-0.4717673659324646,
-0.06355990469455719,
0.21236194670200348,
-0.20925010740756989,
-0.10619767755270004,
-0.11839412897825241,
-0.11803331971168518,
0.016868343576788902,
-0.18522894382476807,
-0.42014873027801514,
0.250451922416687,
0.3232353925704956,
0.11700538545846939,
-0.1952112466096878,
0.3825214207172394,
0.15788009762763977,
0.2623538672924042,
-0.12646660208702087,
-0.33185848593711853,
-0.22999916970729828,
0.11676060408353806,
-0.2848546802997589,
-0.07106426358222961,
-0.07204876095056534,
0.3407008945941925,
0.18231019377708435,
0.31091195344924927,
-0.05401451140642166,
0.2583227753639221,
-0.020257817581295967,
0.29477232694625854,
-0.17196732759475708,
-0.20004379749298096,
0.17431631684303284,
0.4366302788257599,
0.1089877039194107,
-0.4899705946445465,
0.3238481879234314,
-0.1155225858092308,
0.2249937504529953,
0.2568027675151825,
-0.19442208111286163,
-0.03615207597613335,
-0.024457648396492004,
0.5402953624725342,
-0.2178969383239746,
0.24720190465450287,
-0.3413129448890686,
-0.07503064721822739,
0.033734992146492004,
-0.028023410588502884,
-0.18123699724674225,
0.146253302693367,
0.32367756962776184,
-0.08873287588357925,
-0.19817835092544556,
0.2706508934497833,
0.10330819338560104,
0.08329411596059799,
-0.1363804191350937,
0.28445830941200256,
0.21836256980895996,
-0.16748058795928955,
0.029586151242256165,
0.15358054637908936,
0.13771334290504456,
0.03602689504623413,
-0.3187694549560547,
-0.26313352584838867,
-0.15905602276325226,
-0.1308964043855667,
0.3064955174922943,
-0.045326896011829376,
-0.09743593633174896,
-0.20894722640514374,
0.3542238175868988,
0.07061491906642914,
0.13370098173618317,
-0.06720452755689621,
0.14287349581718445,
0.3947151303291321,
-0.2406417727470398,
-0.17293263971805573,
0.10428499430418015,
-0.056723710149526596,
-0.20802780985832214,
-0.008529664017260075,
0.37805619835853577,
0.1406690776348114,
-0.46073272824287415,
-0.2434752881526947,
-0.40969306230545044
] |
https://github.com/huggingface/datasets/issues/2161
|
any possibility to download part of large datasets only?
|
We'll work on dataset streaming soon. This should allow you to only load the examples you need ;)
|
Hi
Some of the datasets I need like cc100 are very large, and then I wonder if I can download first X samples of the shuffled/unshuffled data without going through first downloading the whole data then sampling? thanks
| 18 |
any possibility to download part of large datasets only?
|
[
-0.5164613127708435,
0.01674460433423519,
-0.2895768880844116,
0.2692464292049408,
-0.07541868090629578,
0.2113526612520218,
-0.09322147816419601,
0.6230628490447998,
-0.003443585941568017,
0.2585667669773102,
-0.4474884569644928,
-0.19838735461235046,
-0.1973884105682373,
0.2996545433998108,
0.11865279078483582,
0.06078588217496872,
-0.14974986016750336,
0.3622376322746277,
-0.2596433162689209,
-0.2000127136707306,
0.009106162935495377,
-0.21079081296920776,
0.11559657752513885,
-0.13382074236869812,
0.30736038088798523,
-0.04524904862046242,
0.1639791578054428,
-0.1698404997587204,
-0.3202555775642395,
0.03620138764381409,
-0.022605448961257935,
0.015796419233083725,
0.16307459771633148,
0.0658908560872078,
-0.00010486058454262093,
-0.1462060809135437,
-0.10496354848146439,
-0.09619010984897614,
-0.3614945709705353,
0.09319209307432175,
-0.29662561416625977,
-0.08729524910449982,
-0.10471059381961823,
-0.4239000082015991,
0.2139597237110138,
0.045048460364341736,
0.1145755872130394,
0.0040275766514241695,
0.3813396692276001,
0.1735626757144928,
0.3449546992778778,
0.07226071506738663,
-0.07205692678689957,
-0.033609844744205475,
0.21451203525066376,
-0.12817078828811646,
0.023439308628439903,
0.21486833691596985,
0.45098188519477844,
0.2888915240764618,
0.08415679633617401,
0.2060314267873764,
0.01282720360904932,
0.23640769720077515,
-0.23692741990089417,
-0.1405520737171173,
0.02038474753499031,
-0.5098349452018738,
0.36821436882019043,
0.40133553743362427,
0.31187543272972107,
-0.02385897934436798,
-0.3465106189250946,
-0.22599263489246368,
-0.003819121979176998,
-0.2682879567146301,
-0.2741965055465698,
0.6338961720466614,
-0.33175817131996155,
0.2303112894296646,
-0.2706291973590851,
-0.3253735303878784,
-0.15749411284923553,
0.1291516274213791,
-0.2142917364835739,
0.022458497434854507,
-0.06393031030893326,
-0.07740945369005203,
0.15802371501922607,
0.07686340808868408,
-0.06001653894782066,
0.04734188690781593,
0.026329895481467247,
0.14472107589244843,
-0.06840912252664566,
-0.3317646086215973,
-0.2633333206176758,
0.032081302255392075,
0.45891302824020386,
0.07384396344423294,
0.08962994813919067,
0.21550986170768738,
0.11904457956552505,
-0.055941712111234665,
0.31158745288848877,
-0.29005444049835205,
-0.28009188175201416,
-0.014505685307085514,
0.31014442443847656,
-0.12396255135536194,
0.050070926547050476,
0.09075222909450531,
-0.13212884962558746,
0.11577614396810532,
-0.28570327162742615,
0.03491808474063873,
-0.19718310236930847,
-0.25325608253479004,
-0.1120811477303505,
-0.09578432887792587,
0.20621588826179504,
0.05250287428498268,
-0.2600052058696747,
0.27030637860298157,
0.03161821886897087,
-0.013104149140417576,
-0.10106948763132095,
-0.06891093403100967,
0.11526759713888168,
-0.4302910268306732,
-0.17048439383506775,
0.22647885978221893,
0.23310300707817078,
-0.10629327595233917,
0.21730472147464752,
-0.13962216675281525,
0.11365385353565216,
-0.357848584651947,
-0.0780390128493309,
0.004906234797090292,
0.0020217576529830694,
-0.35890042781829834,
0.05133189260959625,
0.16663525998592377,
0.13058242201805115,
0.18270018696784973,
-0.12048523873090744,
0.27071240544319153,
-0.19290363788604736,
0.13388478755950928,
-0.04256051033735275,
-0.132285013794899,
0.14729537069797516,
0.23979370296001434,
-0.09797738492488861,
-0.04061032086610794,
-0.14081718027591705,
0.17813740670681,
-0.09979292750358582,
-0.058420006185770035,
-0.09653223305940628,
0.3299591541290283,
-0.19258522987365723,
-0.050271157175302505,
0.1604183316230774,
0.2853817641735077,
-0.10106584429740906,
-0.1568663865327835,
-0.016839681193232536,
-0.27573809027671814,
0.2370194047689438,
0.379000723361969,
-0.10360106080770493,
-0.040002550929784775,
-0.0716475173830986,
0.08215561509132385,
0.5079103708267212,
0.05603307485580444,
-0.5426387190818787,
0.4304245710372925,
-0.17434906959533691,
-0.4008110463619232,
0.09830302745103836,
0.37634143233299255,
0.47282564640045166,
-0.10531153529882431,
-0.07468301057815552,
0.3979344964027405,
-0.018155165016651154,
0.11252215504646301,
-0.0062570045702159405,
-0.5173815488815308,
-0.24134132266044617,
0.2773667871952057,
0.39163169264793396,
0.3428660035133362,
0.26880398392677307,
-0.08572591841220856,
0.413030207157135,
-0.049735184758901596,
0.28611570596694946,
0.26358866691589355,
0.023745611310005188,
-0.1618790477514267,
-0.3643455505371094,
-0.40222153067588806,
-0.16995932161808014,
0.07307499647140503,
0.000911372946575284,
-0.46031367778778076,
0.037606608122587204,
-0.09742864221334457,
-0.16423442959785461,
-0.173587366938591,
0.45387160778045654,
0.17650894820690155,
0.16070912778377533,
-0.13840094208717346,
0.28549546003341675,
0.05324440449476242,
-0.2343073934316635,
0.02965223789215088,
-0.03933058679103851,
-0.003655144013464451,
0.03364173322916031,
0.06506745517253876,
0.17301784455776215,
0.191510409116745,
0.4317861795425415,
-0.2795974314212799,
0.015526621602475643,
-0.1357763111591339,
0.2582015097141266,
-0.010644608177244663,
-0.23610979318618774,
0.01499014813452959,
0.1065312996506691,
0.08807821571826935,
0.09444794058799744,
-0.025193465873599052,
-0.009672666899859905,
0.030301660299301147,
0.22921298444271088,
0.18260282278060913,
-0.2622597813606262,
0.17035174369812012,
0.04189487174153328,
0.01919458992779255,
0.2927432358264923,
0.06354543566703796,
0.4363323748111725,
-0.3200452923774719,
0.2332780808210373,
-0.25613266229629517,
0.19714011251926422,
0.05612888187170029,
0.0684003233909607,
0.0841827392578125,
-0.299562007188797,
-0.08209781348705292,
0.22896265983581543,
-0.13041111826896667,
0.25185826420783997,
0.18184037506580353,
-0.21391133964061737,
0.12812821567058563,
0.055797696113586426,
0.2947588562965393,
0.14389346539974213,
0.2919166386127472,
0.5020671486854553,
-0.05787501856684685,
0.4327150881290436,
-0.07268428802490234,
0.03483377769589424,
0.04505382105708122,
-0.1987631618976593,
0.13622507452964783,
0.027383778244256973,
-0.04038141295313835,
-0.1504562497138977,
-0.012533511035144329,
0.17456543445587158,
-0.07442968338727951,
0.17185357213020325,
-0.34273862838745117,
-0.2910558879375458,
-0.4412775933742523,
0.03731474280357361,
0.22389274835586548,
0.13880132138729095,
-0.11194419115781784,
0.14810387790203094,
0.2667495012283325,
-0.25575828552246094,
-0.00369520066305995,
-0.26171866059303284,
0.2613801956176758,
0.06940235942602158,
0.043159570544958115,
0.07435698062181473,
-0.11645784229040146,
0.17367559671401978,
0.26613980531692505,
0.07652663439512253,
0.10260510444641113,
0.3998182415962219,
-0.1678522825241089,
-0.26136186718940735,
-0.5997964143753052,
0.1469661295413971,
0.1020057201385498,
0.3105963170528412,
-0.2721955180168152,
-0.13244940340518951,
0.4124753177165985,
0.056154441088438034,
-0.010660979896783829,
-0.1786738485097885,
-0.12888723611831665,
-0.17575398087501526,
-0.07505115121603012,
0.08353281021118164,
0.21773940324783325,
-0.0676729828119278,
-0.09896598756313324,
-0.5232558250427246,
-0.46027544140815735,
0.536063551902771,
0.2613391578197479,
0.28069546818733215,
-0.30025190114974976,
-0.004611692391335964,
-0.13417081534862518,
-0.23428046703338623,
0.05979049950838089,
-0.020694570615887642,
-0.13053472340106964,
0.38413432240486145,
-0.05866328626871109,
-0.3403083086013794,
-0.10746817290782928,
0.10794926434755325,
-0.13716252148151398,
0.36240917444229126,
-0.4732556939125061,
-0.007147920783609152,
-0.2944728136062622,
0.0028892483096569777,
-0.07344676554203033,
0.1257813274860382,
-0.09417068958282471,
-0.4497155547142029,
-0.22822698950767517,
0.13324344158172607,
0.2438989281654358,
-0.1324622929096222,
-0.09482534229755402,
-0.11393103003501892,
-0.24898485839366913,
0.17619098722934723,
0.21970264613628387,
0.4135845899581909,
0.08707030117511749,
0.046965569257736206,
0.16295473277568817,
0.017575614154338837,
0.13269081711769104,
-0.0079908836632967,
0.0013068643165752292,
0.2229606807231903,
-0.08315803110599518,
-0.003362188581377268,
0.2313048541545868,
-0.13454915583133698,
-0.16521784663200378,
-0.17336846888065338,
-0.21460367739200592,
-0.3277505934238434,
-0.2488347589969635,
-0.010496845468878746,
0.20804432034492493,
0.11841703951358795,
0.1577674299478531,
-0.11023720353841782,
-0.07025003433227539,
-0.03676478937268257,
0.1746678203344345,
-0.17472010850906372,
0.14676164090633392,
-0.09540987014770508,
-0.18281236290931702,
0.10757845640182495,
-0.41955387592315674,
0.030584322288632393,
-0.12990209460258484,
-0.1023300364613533,
0.015331014059484005,
-0.06434102356433868,
-0.09597285091876984,
0.030818844214081764,
0.3942485749721527,
0.20808880031108856,
0.35622185468673706,
-0.1701505482196808,
-0.2667134702205658,
-0.24208678305149078,
0.1753675639629364,
-0.10059203207492828,
-0.023913651704788208,
0.3729771077632904,
-0.06800716370344162,
-0.5442940592765808,
0.27107691764831543,
0.3019632399082184,
0.39875125885009766,
-0.03492399677634239,
0.09704200178384781,
0.24344056844711304,
-0.17716380953788757,
-0.41306114196777344,
0.20744110643863678,
0.0535828061401844,
-0.17948408424854279,
0.13269485533237457,
-0.20311897993087769,
-0.20042766630649567,
-0.007111666724085808,
0.0028166593983769417,
-0.03263230621814728,
-0.07432489842176437,
0.07595957815647125,
0.4050045311450958,
-0.2329189032316208,
0.08079545199871063,
0.3044503629207611,
0.495783269405365,
0.08000165224075317,
-0.08929450064897537,
0.1650964319705963,
-0.10059047490358353,
0.033110082149505615,
0.27853429317474365,
0.023025669157505035,
0.264663964509964,
0.1165686771273613,
0.29852935671806335,
-0.07547736912965775,
0.15281376242637634,
-0.32090145349502563,
-0.15930618345737457,
-0.3022630214691162,
-0.21745556592941284,
0.41304001212120056,
0.09641920775175095,
-0.03861920163035393,
0.08102375268936157,
-0.1260961890220642,
0.06894728541374207,
-0.24305474758148193,
-0.0049890209920704365,
0.7875773310661316,
-0.13238073885440826,
0.19423675537109375,
-0.30192339420318604,
-0.12222778797149658,
0.5235981941223145,
-0.0270066000521183,
-0.017202354967594147,
-0.14704832434654236,
-0.4114272892475128,
-0.0696963518857956,
-0.016576115041971207,
-0.25454577803611755,
0.1999559998512268,
0.06042284145951271,
0.23178374767303467,
-0.05365012213587761,
0.18113815784454346,
0.10648871213197708,
0.1487032175064087,
-0.34181681275367737,
-0.09578340500593185,
-0.022867143154144287,
0.19536690413951874,
0.07765419036149979,
0.04997064918279648,
-0.03900808468461037,
-0.10289964824914932,
0.015089146792888641,
0.06922613829374313,
-0.14943037927150726,
0.08844411373138428,
-0.2853318452835083,
0.22694574296474457,
-0.4122275412082672,
-0.12700696289539337,
-0.15628527104854584,
-0.1104804128408432,
-0.17478640377521515,
0.21091164648532867,
-0.1932552605867386,
0.05905824154615402,
-0.16880014538764954,
-0.009736506268382072,
-0.04501654952764511,
0.1671912670135498,
-0.23317494988441467,
-0.0929671972990036,
0.05071292817592621,
0.23339669406414032,
-0.019189167767763138,
-0.10660404711961746,
0.14062826335430145,
0.25683796405792236,
-0.031130516901612282,
0.016768209636211395,
-0.22795182466506958,
-0.06443066149950027,
-0.11536827683448792,
-0.25453951954841614,
0.17193254828453064,
0.1850491315126419,
-0.1079157143831253,
0.22189173102378845,
0.12293076515197754,
-0.22649158537387848,
-0.324255108833313,
0.6595109105110168,
-0.027246614918112755,
-0.04293625056743622,
0.19235530495643616,
-0.2554589509963989,
-0.28163570165634155,
-0.3677677810192108,
-0.08677461743354797,
-0.2391122430562973,
-0.2076534926891327,
0.12386538833379745,
-0.45183244347572327,
0.07459493726491928,
-0.20318196713924408,
-0.06381621211767197,
0.23280897736549377,
0.06103979051113129,
-0.07218735665082932,
-0.3480593264102936,
-0.20900867879390717,
0.25273430347442627,
0.05776281654834747,
0.1699487268924713,
-0.07707078754901886,
-0.04342307522892952,
-0.17198731005191803,
0.3332325518131256,
-0.38247814774513245,
0.2778500020503998,
-0.2017413079738617,
0.18508172035217285,
0.297846257686615,
0.18670476973056793,
-0.04358789697289467,
0.1415262222290039,
0.21810230612754822,
0.34962281584739685,
-0.09853233397006989,
-0.33193835616111755,
-0.10220501571893692,
0.09269900619983673,
-0.14956194162368774,
-0.10995474457740784,
0.24647118151187897,
-0.2327509969472885,
-0.15570789575576782,
0.0542416051030159,
0.11987495422363281,
0.08413596451282501,
0.21500898897647858,
-0.28375962376594543,
0.48602381348609924,
-0.09169860184192657,
-0.3666270971298218,
0.29368987679481506,
-0.20328661799430847,
0.20087622106075287,
-0.015680978074669838,
0.36112019419670105,
0.175111323595047,
0.027768468484282494,
-0.1887451708316803,
-0.2604216933250427,
0.39903390407562256,
-0.24558144807815552,
0.2146676927804947,
0.22892408072948456,
0.023191142827272415,
0.3235442638397217,
0.20418626070022583,
0.4967449903488159,
-0.06786710768938065,
0.1435011923313141,
0.27032193541526794,
0.34414172172546387,
-0.26990440487861633,
-0.24447450041770935,
0.033131275326013565,
-0.3001727759838104,
0.24154125154018402,
0.1951114982366562,
-0.0659533217549324,
-0.23292286694049835,
0.11664634943008423,
-0.3182126581668854,
0.19744975864887238,
0.2662661075592041,
-0.1563260406255722,
0.5767971277236938,
0.28159263730049133,
-0.19157527387142181,
-0.16800889372825623,
0.3795035779476166,
0.4236961007118225,
0.36693277955055237,
-0.21145713329315186,
0.14948371052742004,
-0.06241719797253609,
-0.046147674322128296,
-0.23328010737895966,
-0.44809234142303467,
-0.005820292513817549,
0.38855284452438354,
-0.005411058664321899,
0.08593463897705078,
-0.13602839410305023,
-0.22823722660541534,
0.19718237221240997,
0.13955174386501312,
-0.17642754316329956,
0.3624625504016876,
0.2975601255893707,
0.019113117828965187,
0.022479252889752388,
-0.1712789386510849,
-0.0014470467576757073,
0.23274648189544678,
0.11649627983570099,
-0.5298469066619873,
0.19021743535995483,
0.28424957394599915,
0.05256359651684761,
-0.1425573229789734,
0.028827957808971405,
0.07583226263523102,
-0.09584818035364151,
-0.43961429595947266,
-0.15008260309696198,
-0.019906822592020035,
0.1259521096944809,
0.069203220307827,
0.07905768603086472,
-0.07635463029146194,
-0.036723289638757706,
0.37846413254737854,
-0.10771531611680984,
0.18762610852718353,
-0.03104959987103939,
-0.5165870785713196,
-0.03409948945045471,
0.24007858335971832,
0.2828553020954132,
0.5737729668617249,
0.2184896320104599,
-0.29016703367233276,
0.10688824206590652,
0.002956787124276161,
-0.23261962831020355,
-0.4717673659324646,
-0.06355990469455719,
0.21236194670200348,
-0.20925010740756989,
-0.10619767755270004,
-0.11839412897825241,
-0.11803331971168518,
0.016868343576788902,
-0.18522894382476807,
-0.42014873027801514,
0.250451922416687,
0.3232353925704956,
0.11700538545846939,
-0.1952112466096878,
0.3825214207172394,
0.15788009762763977,
0.2623538672924042,
-0.12646660208702087,
-0.33185848593711853,
-0.22999916970729828,
0.11676060408353806,
-0.2848546802997589,
-0.07106426358222961,
-0.07204876095056534,
0.3407008945941925,
0.18231019377708435,
0.31091195344924927,
-0.05401451140642166,
0.2583227753639221,
-0.020257817581295967,
0.29477232694625854,
-0.17196732759475708,
-0.20004379749298096,
0.17431631684303284,
0.4366302788257599,
0.1089877039194107,
-0.4899705946445465,
0.3238481879234314,
-0.1155225858092308,
0.2249937504529953,
0.2568027675151825,
-0.19442208111286163,
-0.03615207597613335,
-0.024457648396492004,
0.5402953624725342,
-0.2178969383239746,
0.24720190465450287,
-0.3413129448890686,
-0.07503064721822739,
0.033734992146492004,
-0.028023410588502884,
-0.18123699724674225,
0.146253302693367,
0.32367756962776184,
-0.08873287588357925,
-0.19817835092544556,
0.2706508934497833,
0.10330819338560104,
0.08329411596059799,
-0.1363804191350937,
0.28445830941200256,
0.21836256980895996,
-0.16748058795928955,
0.029586151242256165,
0.15358054637908936,
0.13771334290504456,
0.03602689504623413,
-0.3187694549560547,
-0.26313352584838867,
-0.15905602276325226,
-0.1308964043855667,
0.3064955174922943,
-0.045326896011829376,
-0.09743593633174896,
-0.20894722640514374,
0.3542238175868988,
0.07061491906642914,
0.13370098173618317,
-0.06720452755689621,
0.14287349581718445,
0.3947151303291321,
-0.2406417727470398,
-0.17293263971805573,
0.10428499430418015,
-0.056723710149526596,
-0.20802780985832214,
-0.008529664017260075,
0.37805619835853577,
0.1406690776348114,
-0.46073272824287415,
-0.2434752881526947,
-0.40969306230545044
] |
https://github.com/huggingface/datasets/issues/2161
|
any possibility to download part of large datasets only?
|
thanks a lot Quentin, this would be really really a great feature to have
On Wed, Apr 7, 2021 at 12:14 PM Quentin Lhoest ***@***.***>
wrote:
> We'll work on dataset streaming soon. This should allow you to only load
> the examples you need ;)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2161#issuecomment-814791922>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS37NMROD62QAKIJMAKWISTTHQWBVANCNFSM42IUI5JQ>
> .
>
|
Hi
Some of the datasets I need like cc100 are very large, and then I wonder if I can download first X samples of the shuffled/unshuffled data without going through first downloading the whole data then sampling? thanks
| 79 |
any possibility to download part of large datasets only?
|
[
-0.5164613127708435,
0.01674460433423519,
-0.2895768880844116,
0.2692464292049408,
-0.07541868090629578,
0.2113526612520218,
-0.09322147816419601,
0.6230628490447998,
-0.003443585941568017,
0.2585667669773102,
-0.4474884569644928,
-0.19838735461235046,
-0.1973884105682373,
0.2996545433998108,
0.11865279078483582,
0.06078588217496872,
-0.14974986016750336,
0.3622376322746277,
-0.2596433162689209,
-0.2000127136707306,
0.009106162935495377,
-0.21079081296920776,
0.11559657752513885,
-0.13382074236869812,
0.30736038088798523,
-0.04524904862046242,
0.1639791578054428,
-0.1698404997587204,
-0.3202555775642395,
0.03620138764381409,
-0.022605448961257935,
0.015796419233083725,
0.16307459771633148,
0.0658908560872078,
-0.00010486058454262093,
-0.1462060809135437,
-0.10496354848146439,
-0.09619010984897614,
-0.3614945709705353,
0.09319209307432175,
-0.29662561416625977,
-0.08729524910449982,
-0.10471059381961823,
-0.4239000082015991,
0.2139597237110138,
0.045048460364341736,
0.1145755872130394,
0.0040275766514241695,
0.3813396692276001,
0.1735626757144928,
0.3449546992778778,
0.07226071506738663,
-0.07205692678689957,
-0.033609844744205475,
0.21451203525066376,
-0.12817078828811646,
0.023439308628439903,
0.21486833691596985,
0.45098188519477844,
0.2888915240764618,
0.08415679633617401,
0.2060314267873764,
0.01282720360904932,
0.23640769720077515,
-0.23692741990089417,
-0.1405520737171173,
0.02038474753499031,
-0.5098349452018738,
0.36821436882019043,
0.40133553743362427,
0.31187543272972107,
-0.02385897934436798,
-0.3465106189250946,
-0.22599263489246368,
-0.003819121979176998,
-0.2682879567146301,
-0.2741965055465698,
0.6338961720466614,
-0.33175817131996155,
0.2303112894296646,
-0.2706291973590851,
-0.3253735303878784,
-0.15749411284923553,
0.1291516274213791,
-0.2142917364835739,
0.022458497434854507,
-0.06393031030893326,
-0.07740945369005203,
0.15802371501922607,
0.07686340808868408,
-0.06001653894782066,
0.04734188690781593,
0.026329895481467247,
0.14472107589244843,
-0.06840912252664566,
-0.3317646086215973,
-0.2633333206176758,
0.032081302255392075,
0.45891302824020386,
0.07384396344423294,
0.08962994813919067,
0.21550986170768738,
0.11904457956552505,
-0.055941712111234665,
0.31158745288848877,
-0.29005444049835205,
-0.28009188175201416,
-0.014505685307085514,
0.31014442443847656,
-0.12396255135536194,
0.050070926547050476,
0.09075222909450531,
-0.13212884962558746,
0.11577614396810532,
-0.28570327162742615,
0.03491808474063873,
-0.19718310236930847,
-0.25325608253479004,
-0.1120811477303505,
-0.09578432887792587,
0.20621588826179504,
0.05250287428498268,
-0.2600052058696747,
0.27030637860298157,
0.03161821886897087,
-0.013104149140417576,
-0.10106948763132095,
-0.06891093403100967,
0.11526759713888168,
-0.4302910268306732,
-0.17048439383506775,
0.22647885978221893,
0.23310300707817078,
-0.10629327595233917,
0.21730472147464752,
-0.13962216675281525,
0.11365385353565216,
-0.357848584651947,
-0.0780390128493309,
0.004906234797090292,
0.0020217576529830694,
-0.35890042781829834,
0.05133189260959625,
0.16663525998592377,
0.13058242201805115,
0.18270018696784973,
-0.12048523873090744,
0.27071240544319153,
-0.19290363788604736,
0.13388478755950928,
-0.04256051033735275,
-0.132285013794899,
0.14729537069797516,
0.23979370296001434,
-0.09797738492488861,
-0.04061032086610794,
-0.14081718027591705,
0.17813740670681,
-0.09979292750358582,
-0.058420006185770035,
-0.09653223305940628,
0.3299591541290283,
-0.19258522987365723,
-0.050271157175302505,
0.1604183316230774,
0.2853817641735077,
-0.10106584429740906,
-0.1568663865327835,
-0.016839681193232536,
-0.27573809027671814,
0.2370194047689438,
0.379000723361969,
-0.10360106080770493,
-0.040002550929784775,
-0.0716475173830986,
0.08215561509132385,
0.5079103708267212,
0.05603307485580444,
-0.5426387190818787,
0.4304245710372925,
-0.17434906959533691,
-0.4008110463619232,
0.09830302745103836,
0.37634143233299255,
0.47282564640045166,
-0.10531153529882431,
-0.07468301057815552,
0.3979344964027405,
-0.018155165016651154,
0.11252215504646301,
-0.0062570045702159405,
-0.5173815488815308,
-0.24134132266044617,
0.2773667871952057,
0.39163169264793396,
0.3428660035133362,
0.26880398392677307,
-0.08572591841220856,
0.413030207157135,
-0.049735184758901596,
0.28611570596694946,
0.26358866691589355,
0.023745611310005188,
-0.1618790477514267,
-0.3643455505371094,
-0.40222153067588806,
-0.16995932161808014,
0.07307499647140503,
0.000911372946575284,
-0.46031367778778076,
0.037606608122587204,
-0.09742864221334457,
-0.16423442959785461,
-0.173587366938591,
0.45387160778045654,
0.17650894820690155,
0.16070912778377533,
-0.13840094208717346,
0.28549546003341675,
0.05324440449476242,
-0.2343073934316635,
0.02965223789215088,
-0.03933058679103851,
-0.003655144013464451,
0.03364173322916031,
0.06506745517253876,
0.17301784455776215,
0.191510409116745,
0.4317861795425415,
-0.2795974314212799,
0.015526621602475643,
-0.1357763111591339,
0.2582015097141266,
-0.010644608177244663,
-0.23610979318618774,
0.01499014813452959,
0.1065312996506691,
0.08807821571826935,
0.09444794058799744,
-0.025193465873599052,
-0.009672666899859905,
0.030301660299301147,
0.22921298444271088,
0.18260282278060913,
-0.2622597813606262,
0.17035174369812012,
0.04189487174153328,
0.01919458992779255,
0.2927432358264923,
0.06354543566703796,
0.4363323748111725,
-0.3200452923774719,
0.2332780808210373,
-0.25613266229629517,
0.19714011251926422,
0.05612888187170029,
0.0684003233909607,
0.0841827392578125,
-0.299562007188797,
-0.08209781348705292,
0.22896265983581543,
-0.13041111826896667,
0.25185826420783997,
0.18184037506580353,
-0.21391133964061737,
0.12812821567058563,
0.055797696113586426,
0.2947588562965393,
0.14389346539974213,
0.2919166386127472,
0.5020671486854553,
-0.05787501856684685,
0.4327150881290436,
-0.07268428802490234,
0.03483377769589424,
0.04505382105708122,
-0.1987631618976593,
0.13622507452964783,
0.027383778244256973,
-0.04038141295313835,
-0.1504562497138977,
-0.012533511035144329,
0.17456543445587158,
-0.07442968338727951,
0.17185357213020325,
-0.34273862838745117,
-0.2910558879375458,
-0.4412775933742523,
0.03731474280357361,
0.22389274835586548,
0.13880132138729095,
-0.11194419115781784,
0.14810387790203094,
0.2667495012283325,
-0.25575828552246094,
-0.00369520066305995,
-0.26171866059303284,
0.2613801956176758,
0.06940235942602158,
0.043159570544958115,
0.07435698062181473,
-0.11645784229040146,
0.17367559671401978,
0.26613980531692505,
0.07652663439512253,
0.10260510444641113,
0.3998182415962219,
-0.1678522825241089,
-0.26136186718940735,
-0.5997964143753052,
0.1469661295413971,
0.1020057201385498,
0.3105963170528412,
-0.2721955180168152,
-0.13244940340518951,
0.4124753177165985,
0.056154441088438034,
-0.010660979896783829,
-0.1786738485097885,
-0.12888723611831665,
-0.17575398087501526,
-0.07505115121603012,
0.08353281021118164,
0.21773940324783325,
-0.0676729828119278,
-0.09896598756313324,
-0.5232558250427246,
-0.46027544140815735,
0.536063551902771,
0.2613391578197479,
0.28069546818733215,
-0.30025190114974976,
-0.004611692391335964,
-0.13417081534862518,
-0.23428046703338623,
0.05979049950838089,
-0.020694570615887642,
-0.13053472340106964,
0.38413432240486145,
-0.05866328626871109,
-0.3403083086013794,
-0.10746817290782928,
0.10794926434755325,
-0.13716252148151398,
0.36240917444229126,
-0.4732556939125061,
-0.007147920783609152,
-0.2944728136062622,
0.0028892483096569777,
-0.07344676554203033,
0.1257813274860382,
-0.09417068958282471,
-0.4497155547142029,
-0.22822698950767517,
0.13324344158172607,
0.2438989281654358,
-0.1324622929096222,
-0.09482534229755402,
-0.11393103003501892,
-0.24898485839366913,
0.17619098722934723,
0.21970264613628387,
0.4135845899581909,
0.08707030117511749,
0.046965569257736206,
0.16295473277568817,
0.017575614154338837,
0.13269081711769104,
-0.0079908836632967,
0.0013068643165752292,
0.2229606807231903,
-0.08315803110599518,
-0.003362188581377268,
0.2313048541545868,
-0.13454915583133698,
-0.16521784663200378,
-0.17336846888065338,
-0.21460367739200592,
-0.3277505934238434,
-0.2488347589969635,
-0.010496845468878746,
0.20804432034492493,
0.11841703951358795,
0.1577674299478531,
-0.11023720353841782,
-0.07025003433227539,
-0.03676478937268257,
0.1746678203344345,
-0.17472010850906372,
0.14676164090633392,
-0.09540987014770508,
-0.18281236290931702,
0.10757845640182495,
-0.41955387592315674,
0.030584322288632393,
-0.12990209460258484,
-0.1023300364613533,
0.015331014059484005,
-0.06434102356433868,
-0.09597285091876984,
0.030818844214081764,
0.3942485749721527,
0.20808880031108856,
0.35622185468673706,
-0.1701505482196808,
-0.2667134702205658,
-0.24208678305149078,
0.1753675639629364,
-0.10059203207492828,
-0.023913651704788208,
0.3729771077632904,
-0.06800716370344162,
-0.5442940592765808,
0.27107691764831543,
0.3019632399082184,
0.39875125885009766,
-0.03492399677634239,
0.09704200178384781,
0.24344056844711304,
-0.17716380953788757,
-0.41306114196777344,
0.20744110643863678,
0.0535828061401844,
-0.17948408424854279,
0.13269485533237457,
-0.20311897993087769,
-0.20042766630649567,
-0.007111666724085808,
0.0028166593983769417,
-0.03263230621814728,
-0.07432489842176437,
0.07595957815647125,
0.4050045311450958,
-0.2329189032316208,
0.08079545199871063,
0.3044503629207611,
0.495783269405365,
0.08000165224075317,
-0.08929450064897537,
0.1650964319705963,
-0.10059047490358353,
0.033110082149505615,
0.27853429317474365,
0.023025669157505035,
0.264663964509964,
0.1165686771273613,
0.29852935671806335,
-0.07547736912965775,
0.15281376242637634,
-0.32090145349502563,
-0.15930618345737457,
-0.3022630214691162,
-0.21745556592941284,
0.41304001212120056,
0.09641920775175095,
-0.03861920163035393,
0.08102375268936157,
-0.1260961890220642,
0.06894728541374207,
-0.24305474758148193,
-0.0049890209920704365,
0.7875773310661316,
-0.13238073885440826,
0.19423675537109375,
-0.30192339420318604,
-0.12222778797149658,
0.5235981941223145,
-0.0270066000521183,
-0.017202354967594147,
-0.14704832434654236,
-0.4114272892475128,
-0.0696963518857956,
-0.016576115041971207,
-0.25454577803611755,
0.1999559998512268,
0.06042284145951271,
0.23178374767303467,
-0.05365012213587761,
0.18113815784454346,
0.10648871213197708,
0.1487032175064087,
-0.34181681275367737,
-0.09578340500593185,
-0.022867143154144287,
0.19536690413951874,
0.07765419036149979,
0.04997064918279648,
-0.03900808468461037,
-0.10289964824914932,
0.015089146792888641,
0.06922613829374313,
-0.14943037927150726,
0.08844411373138428,
-0.2853318452835083,
0.22694574296474457,
-0.4122275412082672,
-0.12700696289539337,
-0.15628527104854584,
-0.1104804128408432,
-0.17478640377521515,
0.21091164648532867,
-0.1932552605867386,
0.05905824154615402,
-0.16880014538764954,
-0.009736506268382072,
-0.04501654952764511,
0.1671912670135498,
-0.23317494988441467,
-0.0929671972990036,
0.05071292817592621,
0.23339669406414032,
-0.019189167767763138,
-0.10660404711961746,
0.14062826335430145,
0.25683796405792236,
-0.031130516901612282,
0.016768209636211395,
-0.22795182466506958,
-0.06443066149950027,
-0.11536827683448792,
-0.25453951954841614,
0.17193254828453064,
0.1850491315126419,
-0.1079157143831253,
0.22189173102378845,
0.12293076515197754,
-0.22649158537387848,
-0.324255108833313,
0.6595109105110168,
-0.027246614918112755,
-0.04293625056743622,
0.19235530495643616,
-0.2554589509963989,
-0.28163570165634155,
-0.3677677810192108,
-0.08677461743354797,
-0.2391122430562973,
-0.2076534926891327,
0.12386538833379745,
-0.45183244347572327,
0.07459493726491928,
-0.20318196713924408,
-0.06381621211767197,
0.23280897736549377,
0.06103979051113129,
-0.07218735665082932,
-0.3480593264102936,
-0.20900867879390717,
0.25273430347442627,
0.05776281654834747,
0.1699487268924713,
-0.07707078754901886,
-0.04342307522892952,
-0.17198731005191803,
0.3332325518131256,
-0.38247814774513245,
0.2778500020503998,
-0.2017413079738617,
0.18508172035217285,
0.297846257686615,
0.18670476973056793,
-0.04358789697289467,
0.1415262222290039,
0.21810230612754822,
0.34962281584739685,
-0.09853233397006989,
-0.33193835616111755,
-0.10220501571893692,
0.09269900619983673,
-0.14956194162368774,
-0.10995474457740784,
0.24647118151187897,
-0.2327509969472885,
-0.15570789575576782,
0.0542416051030159,
0.11987495422363281,
0.08413596451282501,
0.21500898897647858,
-0.28375962376594543,
0.48602381348609924,
-0.09169860184192657,
-0.3666270971298218,
0.29368987679481506,
-0.20328661799430847,
0.20087622106075287,
-0.015680978074669838,
0.36112019419670105,
0.175111323595047,
0.027768468484282494,
-0.1887451708316803,
-0.2604216933250427,
0.39903390407562256,
-0.24558144807815552,
0.2146676927804947,
0.22892408072948456,
0.023191142827272415,
0.3235442638397217,
0.20418626070022583,
0.4967449903488159,
-0.06786710768938065,
0.1435011923313141,
0.27032193541526794,
0.34414172172546387,
-0.26990440487861633,
-0.24447450041770935,
0.033131275326013565,
-0.3001727759838104,
0.24154125154018402,
0.1951114982366562,
-0.0659533217549324,
-0.23292286694049835,
0.11664634943008423,
-0.3182126581668854,
0.19744975864887238,
0.2662661075592041,
-0.1563260406255722,
0.5767971277236938,
0.28159263730049133,
-0.19157527387142181,
-0.16800889372825623,
0.3795035779476166,
0.4236961007118225,
0.36693277955055237,
-0.21145713329315186,
0.14948371052742004,
-0.06241719797253609,
-0.046147674322128296,
-0.23328010737895966,
-0.44809234142303467,
-0.005820292513817549,
0.38855284452438354,
-0.005411058664321899,
0.08593463897705078,
-0.13602839410305023,
-0.22823722660541534,
0.19718237221240997,
0.13955174386501312,
-0.17642754316329956,
0.3624625504016876,
0.2975601255893707,
0.019113117828965187,
0.022479252889752388,
-0.1712789386510849,
-0.0014470467576757073,
0.23274648189544678,
0.11649627983570099,
-0.5298469066619873,
0.19021743535995483,
0.28424957394599915,
0.05256359651684761,
-0.1425573229789734,
0.028827957808971405,
0.07583226263523102,
-0.09584818035364151,
-0.43961429595947266,
-0.15008260309696198,
-0.019906822592020035,
0.1259521096944809,
0.069203220307827,
0.07905768603086472,
-0.07635463029146194,
-0.036723289638757706,
0.37846413254737854,
-0.10771531611680984,
0.18762610852718353,
-0.03104959987103939,
-0.5165870785713196,
-0.03409948945045471,
0.24007858335971832,
0.2828553020954132,
0.5737729668617249,
0.2184896320104599,
-0.29016703367233276,
0.10688824206590652,
0.002956787124276161,
-0.23261962831020355,
-0.4717673659324646,
-0.06355990469455719,
0.21236194670200348,
-0.20925010740756989,
-0.10619767755270004,
-0.11839412897825241,
-0.11803331971168518,
0.016868343576788902,
-0.18522894382476807,
-0.42014873027801514,
0.250451922416687,
0.3232353925704956,
0.11700538545846939,
-0.1952112466096878,
0.3825214207172394,
0.15788009762763977,
0.2623538672924042,
-0.12646660208702087,
-0.33185848593711853,
-0.22999916970729828,
0.11676060408353806,
-0.2848546802997589,
-0.07106426358222961,
-0.07204876095056534,
0.3407008945941925,
0.18231019377708435,
0.31091195344924927,
-0.05401451140642166,
0.2583227753639221,
-0.020257817581295967,
0.29477232694625854,
-0.17196732759475708,
-0.20004379749298096,
0.17431631684303284,
0.4366302788257599,
0.1089877039194107,
-0.4899705946445465,
0.3238481879234314,
-0.1155225858092308,
0.2249937504529953,
0.2568027675151825,
-0.19442208111286163,
-0.03615207597613335,
-0.024457648396492004,
0.5402953624725342,
-0.2178969383239746,
0.24720190465450287,
-0.3413129448890686,
-0.07503064721822739,
0.033734992146492004,
-0.028023410588502884,
-0.18123699724674225,
0.146253302693367,
0.32367756962776184,
-0.08873287588357925,
-0.19817835092544556,
0.2706508934497833,
0.10330819338560104,
0.08329411596059799,
-0.1363804191350937,
0.28445830941200256,
0.21836256980895996,
-0.16748058795928955,
0.029586151242256165,
0.15358054637908936,
0.13771334290504456,
0.03602689504623413,
-0.3187694549560547,
-0.26313352584838867,
-0.15905602276325226,
-0.1308964043855667,
0.3064955174922943,
-0.045326896011829376,
-0.09743593633174896,
-0.20894722640514374,
0.3542238175868988,
0.07061491906642914,
0.13370098173618317,
-0.06720452755689621,
0.14287349581718445,
0.3947151303291321,
-0.2406417727470398,
-0.17293263971805573,
0.10428499430418015,
-0.056723710149526596,
-0.20802780985832214,
-0.008529664017260075,
0.37805619835853577,
0.1406690776348114,
-0.46073272824287415,
-0.2434752881526947,
-0.40969306230545044
] |
https://github.com/huggingface/datasets/issues/2161
|
any possibility to download part of large datasets only?
|
Is streaming completed? On the 1.8.0 docs it is mentioned (https://huggingface.co/docs/datasets/dataset_streaming.html), but when following the example I get the following error:
```
>>> dataset2 = load_dataset("amazon_us_reviews", "Pet_Products_v1_00", split='train', streaming=True)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-21-1eedab26cff1> in <module>()
----> 1 en_dataset = load_dataset('oscar', "unshuffled_deduplicated_en", split='train', streaming=True)
3 frames
/usr/local/lib/python3.7/dist-packages/datasets/builder.py in _create_builder_config(self, name, custom_features, **config_kwargs)
339 if value is not None:
340 if not hasattr(builder_config, key):
--> 341 raise ValueError(f"BuilderConfig {builder_config} doesn't have a '{key}' key.")
342 setattr(builder_config, key, value)
343
ValueError: BuilderConfig OscarConfig(name='unshuffled_deduplicated_en', version=1.0.0, data_dir=None, data_files=None, description='Unshuffled and deduplicated, English OSCAR dataset') doesn't have a 'streaming' key.
```
UPDATE: Managed to get streaming working by building from source and installing the additional `datasets[streaming]` package:
```
!pip install git+https://github.com/huggingface/datasets.git
!pip install datasets[streaming]
```
|
Hi
Some of the datasets I need like cc100 are very large, and then I wonder if I can download first X samples of the shuffled/unshuffled data without going through first downloading the whole data then sampling? thanks
| 123 |
any possibility to download part of large datasets only?
|
[
-0.5164613127708435,
0.01674460433423519,
-0.2895768880844116,
0.2692464292049408,
-0.07541868090629578,
0.2113526612520218,
-0.09322147816419601,
0.6230628490447998,
-0.003443585941568017,
0.2585667669773102,
-0.4474884569644928,
-0.19838735461235046,
-0.1973884105682373,
0.2996545433998108,
0.11865279078483582,
0.06078588217496872,
-0.14974986016750336,
0.3622376322746277,
-0.2596433162689209,
-0.2000127136707306,
0.009106162935495377,
-0.21079081296920776,
0.11559657752513885,
-0.13382074236869812,
0.30736038088798523,
-0.04524904862046242,
0.1639791578054428,
-0.1698404997587204,
-0.3202555775642395,
0.03620138764381409,
-0.022605448961257935,
0.015796419233083725,
0.16307459771633148,
0.0658908560872078,
-0.00010486058454262093,
-0.1462060809135437,
-0.10496354848146439,
-0.09619010984897614,
-0.3614945709705353,
0.09319209307432175,
-0.29662561416625977,
-0.08729524910449982,
-0.10471059381961823,
-0.4239000082015991,
0.2139597237110138,
0.045048460364341736,
0.1145755872130394,
0.0040275766514241695,
0.3813396692276001,
0.1735626757144928,
0.3449546992778778,
0.07226071506738663,
-0.07205692678689957,
-0.033609844744205475,
0.21451203525066376,
-0.12817078828811646,
0.023439308628439903,
0.21486833691596985,
0.45098188519477844,
0.2888915240764618,
0.08415679633617401,
0.2060314267873764,
0.01282720360904932,
0.23640769720077515,
-0.23692741990089417,
-0.1405520737171173,
0.02038474753499031,
-0.5098349452018738,
0.36821436882019043,
0.40133553743362427,
0.31187543272972107,
-0.02385897934436798,
-0.3465106189250946,
-0.22599263489246368,
-0.003819121979176998,
-0.2682879567146301,
-0.2741965055465698,
0.6338961720466614,
-0.33175817131996155,
0.2303112894296646,
-0.2706291973590851,
-0.3253735303878784,
-0.15749411284923553,
0.1291516274213791,
-0.2142917364835739,
0.022458497434854507,
-0.06393031030893326,
-0.07740945369005203,
0.15802371501922607,
0.07686340808868408,
-0.06001653894782066,
0.04734188690781593,
0.026329895481467247,
0.14472107589244843,
-0.06840912252664566,
-0.3317646086215973,
-0.2633333206176758,
0.032081302255392075,
0.45891302824020386,
0.07384396344423294,
0.08962994813919067,
0.21550986170768738,
0.11904457956552505,
-0.055941712111234665,
0.31158745288848877,
-0.29005444049835205,
-0.28009188175201416,
-0.014505685307085514,
0.31014442443847656,
-0.12396255135536194,
0.050070926547050476,
0.09075222909450531,
-0.13212884962558746,
0.11577614396810532,
-0.28570327162742615,
0.03491808474063873,
-0.19718310236930847,
-0.25325608253479004,
-0.1120811477303505,
-0.09578432887792587,
0.20621588826179504,
0.05250287428498268,
-0.2600052058696747,
0.27030637860298157,
0.03161821886897087,
-0.013104149140417576,
-0.10106948763132095,
-0.06891093403100967,
0.11526759713888168,
-0.4302910268306732,
-0.17048439383506775,
0.22647885978221893,
0.23310300707817078,
-0.10629327595233917,
0.21730472147464752,
-0.13962216675281525,
0.11365385353565216,
-0.357848584651947,
-0.0780390128493309,
0.004906234797090292,
0.0020217576529830694,
-0.35890042781829834,
0.05133189260959625,
0.16663525998592377,
0.13058242201805115,
0.18270018696784973,
-0.12048523873090744,
0.27071240544319153,
-0.19290363788604736,
0.13388478755950928,
-0.04256051033735275,
-0.132285013794899,
0.14729537069797516,
0.23979370296001434,
-0.09797738492488861,
-0.04061032086610794,
-0.14081718027591705,
0.17813740670681,
-0.09979292750358582,
-0.058420006185770035,
-0.09653223305940628,
0.3299591541290283,
-0.19258522987365723,
-0.050271157175302505,
0.1604183316230774,
0.2853817641735077,
-0.10106584429740906,
-0.1568663865327835,
-0.016839681193232536,
-0.27573809027671814,
0.2370194047689438,
0.379000723361969,
-0.10360106080770493,
-0.040002550929784775,
-0.0716475173830986,
0.08215561509132385,
0.5079103708267212,
0.05603307485580444,
-0.5426387190818787,
0.4304245710372925,
-0.17434906959533691,
-0.4008110463619232,
0.09830302745103836,
0.37634143233299255,
0.47282564640045166,
-0.10531153529882431,
-0.07468301057815552,
0.3979344964027405,
-0.018155165016651154,
0.11252215504646301,
-0.0062570045702159405,
-0.5173815488815308,
-0.24134132266044617,
0.2773667871952057,
0.39163169264793396,
0.3428660035133362,
0.26880398392677307,
-0.08572591841220856,
0.413030207157135,
-0.049735184758901596,
0.28611570596694946,
0.26358866691589355,
0.023745611310005188,
-0.1618790477514267,
-0.3643455505371094,
-0.40222153067588806,
-0.16995932161808014,
0.07307499647140503,
0.000911372946575284,
-0.46031367778778076,
0.037606608122587204,
-0.09742864221334457,
-0.16423442959785461,
-0.173587366938591,
0.45387160778045654,
0.17650894820690155,
0.16070912778377533,
-0.13840094208717346,
0.28549546003341675,
0.05324440449476242,
-0.2343073934316635,
0.02965223789215088,
-0.03933058679103851,
-0.003655144013464451,
0.03364173322916031,
0.06506745517253876,
0.17301784455776215,
0.191510409116745,
0.4317861795425415,
-0.2795974314212799,
0.015526621602475643,
-0.1357763111591339,
0.2582015097141266,
-0.010644608177244663,
-0.23610979318618774,
0.01499014813452959,
0.1065312996506691,
0.08807821571826935,
0.09444794058799744,
-0.025193465873599052,
-0.009672666899859905,
0.030301660299301147,
0.22921298444271088,
0.18260282278060913,
-0.2622597813606262,
0.17035174369812012,
0.04189487174153328,
0.01919458992779255,
0.2927432358264923,
0.06354543566703796,
0.4363323748111725,
-0.3200452923774719,
0.2332780808210373,
-0.25613266229629517,
0.19714011251926422,
0.05612888187170029,
0.0684003233909607,
0.0841827392578125,
-0.299562007188797,
-0.08209781348705292,
0.22896265983581543,
-0.13041111826896667,
0.25185826420783997,
0.18184037506580353,
-0.21391133964061737,
0.12812821567058563,
0.055797696113586426,
0.2947588562965393,
0.14389346539974213,
0.2919166386127472,
0.5020671486854553,
-0.05787501856684685,
0.4327150881290436,
-0.07268428802490234,
0.03483377769589424,
0.04505382105708122,
-0.1987631618976593,
0.13622507452964783,
0.027383778244256973,
-0.04038141295313835,
-0.1504562497138977,
-0.012533511035144329,
0.17456543445587158,
-0.07442968338727951,
0.17185357213020325,
-0.34273862838745117,
-0.2910558879375458,
-0.4412775933742523,
0.03731474280357361,
0.22389274835586548,
0.13880132138729095,
-0.11194419115781784,
0.14810387790203094,
0.2667495012283325,
-0.25575828552246094,
-0.00369520066305995,
-0.26171866059303284,
0.2613801956176758,
0.06940235942602158,
0.043159570544958115,
0.07435698062181473,
-0.11645784229040146,
0.17367559671401978,
0.26613980531692505,
0.07652663439512253,
0.10260510444641113,
0.3998182415962219,
-0.1678522825241089,
-0.26136186718940735,
-0.5997964143753052,
0.1469661295413971,
0.1020057201385498,
0.3105963170528412,
-0.2721955180168152,
-0.13244940340518951,
0.4124753177165985,
0.056154441088438034,
-0.010660979896783829,
-0.1786738485097885,
-0.12888723611831665,
-0.17575398087501526,
-0.07505115121603012,
0.08353281021118164,
0.21773940324783325,
-0.0676729828119278,
-0.09896598756313324,
-0.5232558250427246,
-0.46027544140815735,
0.536063551902771,
0.2613391578197479,
0.28069546818733215,
-0.30025190114974976,
-0.004611692391335964,
-0.13417081534862518,
-0.23428046703338623,
0.05979049950838089,
-0.020694570615887642,
-0.13053472340106964,
0.38413432240486145,
-0.05866328626871109,
-0.3403083086013794,
-0.10746817290782928,
0.10794926434755325,
-0.13716252148151398,
0.36240917444229126,
-0.4732556939125061,
-0.007147920783609152,
-0.2944728136062622,
0.0028892483096569777,
-0.07344676554203033,
0.1257813274860382,
-0.09417068958282471,
-0.4497155547142029,
-0.22822698950767517,
0.13324344158172607,
0.2438989281654358,
-0.1324622929096222,
-0.09482534229755402,
-0.11393103003501892,
-0.24898485839366913,
0.17619098722934723,
0.21970264613628387,
0.4135845899581909,
0.08707030117511749,
0.046965569257736206,
0.16295473277568817,
0.017575614154338837,
0.13269081711769104,
-0.0079908836632967,
0.0013068643165752292,
0.2229606807231903,
-0.08315803110599518,
-0.003362188581377268,
0.2313048541545868,
-0.13454915583133698,
-0.16521784663200378,
-0.17336846888065338,
-0.21460367739200592,
-0.3277505934238434,
-0.2488347589969635,
-0.010496845468878746,
0.20804432034492493,
0.11841703951358795,
0.1577674299478531,
-0.11023720353841782,
-0.07025003433227539,
-0.03676478937268257,
0.1746678203344345,
-0.17472010850906372,
0.14676164090633392,
-0.09540987014770508,
-0.18281236290931702,
0.10757845640182495,
-0.41955387592315674,
0.030584322288632393,
-0.12990209460258484,
-0.1023300364613533,
0.015331014059484005,
-0.06434102356433868,
-0.09597285091876984,
0.030818844214081764,
0.3942485749721527,
0.20808880031108856,
0.35622185468673706,
-0.1701505482196808,
-0.2667134702205658,
-0.24208678305149078,
0.1753675639629364,
-0.10059203207492828,
-0.023913651704788208,
0.3729771077632904,
-0.06800716370344162,
-0.5442940592765808,
0.27107691764831543,
0.3019632399082184,
0.39875125885009766,
-0.03492399677634239,
0.09704200178384781,
0.24344056844711304,
-0.17716380953788757,
-0.41306114196777344,
0.20744110643863678,
0.0535828061401844,
-0.17948408424854279,
0.13269485533237457,
-0.20311897993087769,
-0.20042766630649567,
-0.007111666724085808,
0.0028166593983769417,
-0.03263230621814728,
-0.07432489842176437,
0.07595957815647125,
0.4050045311450958,
-0.2329189032316208,
0.08079545199871063,
0.3044503629207611,
0.495783269405365,
0.08000165224075317,
-0.08929450064897537,
0.1650964319705963,
-0.10059047490358353,
0.033110082149505615,
0.27853429317474365,
0.023025669157505035,
0.264663964509964,
0.1165686771273613,
0.29852935671806335,
-0.07547736912965775,
0.15281376242637634,
-0.32090145349502563,
-0.15930618345737457,
-0.3022630214691162,
-0.21745556592941284,
0.41304001212120056,
0.09641920775175095,
-0.03861920163035393,
0.08102375268936157,
-0.1260961890220642,
0.06894728541374207,
-0.24305474758148193,
-0.0049890209920704365,
0.7875773310661316,
-0.13238073885440826,
0.19423675537109375,
-0.30192339420318604,
-0.12222778797149658,
0.5235981941223145,
-0.0270066000521183,
-0.017202354967594147,
-0.14704832434654236,
-0.4114272892475128,
-0.0696963518857956,
-0.016576115041971207,
-0.25454577803611755,
0.1999559998512268,
0.06042284145951271,
0.23178374767303467,
-0.05365012213587761,
0.18113815784454346,
0.10648871213197708,
0.1487032175064087,
-0.34181681275367737,
-0.09578340500593185,
-0.022867143154144287,
0.19536690413951874,
0.07765419036149979,
0.04997064918279648,
-0.03900808468461037,
-0.10289964824914932,
0.015089146792888641,
0.06922613829374313,
-0.14943037927150726,
0.08844411373138428,
-0.2853318452835083,
0.22694574296474457,
-0.4122275412082672,
-0.12700696289539337,
-0.15628527104854584,
-0.1104804128408432,
-0.17478640377521515,
0.21091164648532867,
-0.1932552605867386,
0.05905824154615402,
-0.16880014538764954,
-0.009736506268382072,
-0.04501654952764511,
0.1671912670135498,
-0.23317494988441467,
-0.0929671972990036,
0.05071292817592621,
0.23339669406414032,
-0.019189167767763138,
-0.10660404711961746,
0.14062826335430145,
0.25683796405792236,
-0.031130516901612282,
0.016768209636211395,
-0.22795182466506958,
-0.06443066149950027,
-0.11536827683448792,
-0.25453951954841614,
0.17193254828453064,
0.1850491315126419,
-0.1079157143831253,
0.22189173102378845,
0.12293076515197754,
-0.22649158537387848,
-0.324255108833313,
0.6595109105110168,
-0.027246614918112755,
-0.04293625056743622,
0.19235530495643616,
-0.2554589509963989,
-0.28163570165634155,
-0.3677677810192108,
-0.08677461743354797,
-0.2391122430562973,
-0.2076534926891327,
0.12386538833379745,
-0.45183244347572327,
0.07459493726491928,
-0.20318196713924408,
-0.06381621211767197,
0.23280897736549377,
0.06103979051113129,
-0.07218735665082932,
-0.3480593264102936,
-0.20900867879390717,
0.25273430347442627,
0.05776281654834747,
0.1699487268924713,
-0.07707078754901886,
-0.04342307522892952,
-0.17198731005191803,
0.3332325518131256,
-0.38247814774513245,
0.2778500020503998,
-0.2017413079738617,
0.18508172035217285,
0.297846257686615,
0.18670476973056793,
-0.04358789697289467,
0.1415262222290039,
0.21810230612754822,
0.34962281584739685,
-0.09853233397006989,
-0.33193835616111755,
-0.10220501571893692,
0.09269900619983673,
-0.14956194162368774,
-0.10995474457740784,
0.24647118151187897,
-0.2327509969472885,
-0.15570789575576782,
0.0542416051030159,
0.11987495422363281,
0.08413596451282501,
0.21500898897647858,
-0.28375962376594543,
0.48602381348609924,
-0.09169860184192657,
-0.3666270971298218,
0.29368987679481506,
-0.20328661799430847,
0.20087622106075287,
-0.015680978074669838,
0.36112019419670105,
0.175111323595047,
0.027768468484282494,
-0.1887451708316803,
-0.2604216933250427,
0.39903390407562256,
-0.24558144807815552,
0.2146676927804947,
0.22892408072948456,
0.023191142827272415,
0.3235442638397217,
0.20418626070022583,
0.4967449903488159,
-0.06786710768938065,
0.1435011923313141,
0.27032193541526794,
0.34414172172546387,
-0.26990440487861633,
-0.24447450041770935,
0.033131275326013565,
-0.3001727759838104,
0.24154125154018402,
0.1951114982366562,
-0.0659533217549324,
-0.23292286694049835,
0.11664634943008423,
-0.3182126581668854,
0.19744975864887238,
0.2662661075592041,
-0.1563260406255722,
0.5767971277236938,
0.28159263730049133,
-0.19157527387142181,
-0.16800889372825623,
0.3795035779476166,
0.4236961007118225,
0.36693277955055237,
-0.21145713329315186,
0.14948371052742004,
-0.06241719797253609,
-0.046147674322128296,
-0.23328010737895966,
-0.44809234142303467,
-0.005820292513817549,
0.38855284452438354,
-0.005411058664321899,
0.08593463897705078,
-0.13602839410305023,
-0.22823722660541534,
0.19718237221240997,
0.13955174386501312,
-0.17642754316329956,
0.3624625504016876,
0.2975601255893707,
0.019113117828965187,
0.022479252889752388,
-0.1712789386510849,
-0.0014470467576757073,
0.23274648189544678,
0.11649627983570099,
-0.5298469066619873,
0.19021743535995483,
0.28424957394599915,
0.05256359651684761,
-0.1425573229789734,
0.028827957808971405,
0.07583226263523102,
-0.09584818035364151,
-0.43961429595947266,
-0.15008260309696198,
-0.019906822592020035,
0.1259521096944809,
0.069203220307827,
0.07905768603086472,
-0.07635463029146194,
-0.036723289638757706,
0.37846413254737854,
-0.10771531611680984,
0.18762610852718353,
-0.03104959987103939,
-0.5165870785713196,
-0.03409948945045471,
0.24007858335971832,
0.2828553020954132,
0.5737729668617249,
0.2184896320104599,
-0.29016703367233276,
0.10688824206590652,
0.002956787124276161,
-0.23261962831020355,
-0.4717673659324646,
-0.06355990469455719,
0.21236194670200348,
-0.20925010740756989,
-0.10619767755270004,
-0.11839412897825241,
-0.11803331971168518,
0.016868343576788902,
-0.18522894382476807,
-0.42014873027801514,
0.250451922416687,
0.3232353925704956,
0.11700538545846939,
-0.1952112466096878,
0.3825214207172394,
0.15788009762763977,
0.2623538672924042,
-0.12646660208702087,
-0.33185848593711853,
-0.22999916970729828,
0.11676060408353806,
-0.2848546802997589,
-0.07106426358222961,
-0.07204876095056534,
0.3407008945941925,
0.18231019377708435,
0.31091195344924927,
-0.05401451140642166,
0.2583227753639221,
-0.020257817581295967,
0.29477232694625854,
-0.17196732759475708,
-0.20004379749298096,
0.17431631684303284,
0.4366302788257599,
0.1089877039194107,
-0.4899705946445465,
0.3238481879234314,
-0.1155225858092308,
0.2249937504529953,
0.2568027675151825,
-0.19442208111286163,
-0.03615207597613335,
-0.024457648396492004,
0.5402953624725342,
-0.2178969383239746,
0.24720190465450287,
-0.3413129448890686,
-0.07503064721822739,
0.033734992146492004,
-0.028023410588502884,
-0.18123699724674225,
0.146253302693367,
0.32367756962776184,
-0.08873287588357925,
-0.19817835092544556,
0.2706508934497833,
0.10330819338560104,
0.08329411596059799,
-0.1363804191350937,
0.28445830941200256,
0.21836256980895996,
-0.16748058795928955,
0.029586151242256165,
0.15358054637908936,
0.13771334290504456,
0.03602689504623413,
-0.3187694549560547,
-0.26313352584838867,
-0.15905602276325226,
-0.1308964043855667,
0.3064955174922943,
-0.045326896011829376,
-0.09743593633174896,
-0.20894722640514374,
0.3542238175868988,
0.07061491906642914,
0.13370098173618317,
-0.06720452755689621,
0.14287349581718445,
0.3947151303291321,
-0.2406417727470398,
-0.17293263971805573,
0.10428499430418015,
-0.056723710149526596,
-0.20802780985832214,
-0.008529664017260075,
0.37805619835853577,
0.1406690776348114,
-0.46073272824287415,
-0.2434752881526947,
-0.40969306230545044
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.